@siteable/core 0.1.1 → 0.1.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +874 -822
- package/package.json +1 -1
- package/src/blocks/faq/FaqBlock.tsx +4 -6
- package/src/blocks/footer/FooterBlock.tsx +4 -6
- package/src/blocks/gallery/GalleryBlock.tsx +5 -6
- package/src/blocks/image/ImageBlock.tsx +5 -1
- package/src/blocks/logocloud/LogoCloudBlock.tsx +3 -2
- package/src/blocks/pricing/PricingBlock.tsx +4 -27
- package/src/blocks/stats/StatsBlock.tsx +4 -6
- package/src/blocks/team/TeamBlock.tsx +4 -6
- package/src/blocks/testimonials/TestimonialsBlock.tsx +4 -6
- package/src/editor/AgentPanel.tsx +3 -1
- package/src/editor/LayersPanel.tsx +3 -1
- package/src/editor/LeftSidebar.tsx +3 -1
- package/src/lib/block-default-content.ts +110 -0
- package/src/lib/block-metadata.ts +28 -11
- package/src/lib/generate-site.ts +15 -2
- package/src/lib/generation-prompt.ts +4 -3
- package/src/lib/prop-normalization.ts +121 -0
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as t, jsxs as i, Fragment as
|
|
2
|
-
import { useState as C, createElement as U, Component as
|
|
3
|
-
import { Menu as
|
|
1
|
+
import { jsx as t, jsxs as i, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { useState as C, createElement as U, Component as Pt, useRef as D, useEffect as I, useMemo as W, useReducer as Tt, useCallback as It } from "react";
|
|
3
|
+
import { Menu as He, Sparkles as he, ArrowRight as H, Zap as me, Settings as jt, Lock as At, Star as ve, Rocket as Dt, Palette as Bt, Layers as ge, Globe as Lt, Shield as Mt, Bot as Ot, Code as ye, Blocks as Ft, Check as ae, Quote as we, ChevronLeft as Et, ChevronRight as ze, ChevronDown as oe, Send as Re, Mail as ke, ImageIcon as se, Play as Ne, ChevronUp as Ht, Copy as Ge, Trash2 as Ue, X as ie, Plus as le, Monitor as zt, Tablet as Rt, Smartphone as Gt, Undo2 as Ut, Redo2 as qt, Eye as _t, Clock as qe, HelpCircle as Se, Loader2 as Jt, Download as Vt, GalleryHorizontalEnd as _e, FileText as Je, Flag as Ve, Minus as We, Image as Ke, Newspaper as Ye, Users as Ze, BarChart3 as Qe, MessageSquare as Xe, PanelBottom as et, Megaphone as tt, DollarSign as rt, Grid3X3 as nt, Type as at, Layout as Z, GripVertical as Wt, Search as ot, MousePointer2 as Kt, RotateCcw as Yt, FolderOpen as Zt, BookOpen as Qt, Building2 as Xt, UtensilsCrossed as er, Briefcase as tr } from "lucide-react";
|
|
4
4
|
import { toast as S } from "sonner";
|
|
5
|
-
import { create as
|
|
6
|
-
import { persist as
|
|
7
|
-
import { produce as
|
|
8
|
-
import { useSensors as
|
|
9
|
-
import { sortableKeyboardCoordinates as
|
|
10
|
-
import { CSS as
|
|
11
|
-
function
|
|
5
|
+
import { create as st } from "zustand";
|
|
6
|
+
import { persist as rr } from "zustand/middleware";
|
|
7
|
+
import { produce as Q } from "immer";
|
|
8
|
+
import { useSensors as nr, useSensor as Be, PointerSensor as ar, KeyboardSensor as or, DndContext as sr, closestCenter as ir } from "@dnd-kit/core";
|
|
9
|
+
import { sortableKeyboardCoordinates as lr, SortableContext as cr, verticalListSortingStrategy as dr, useSortable as pr } from "@dnd-kit/sortable";
|
|
10
|
+
import { CSS as ur } from "@dnd-kit/utilities";
|
|
11
|
+
function mr({ props: e }) {
|
|
12
12
|
const { logo: n, links: r = [], ctaText: a } = e;
|
|
13
13
|
return /* @__PURE__ */ i("nav", { className: "px-6 @md:px-10 py-4 flex items-center justify-between", children: [
|
|
14
14
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
@@ -25,11 +25,11 @@ function tr({ props: e }) {
|
|
|
25
25
|
)) }),
|
|
26
26
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
|
|
27
27
|
/* @__PURE__ */ t("button", { className: "px-4 py-2 rounded-lg bg-green text-black text-[13px] font-semibold hover:bg-green-dim transition-colors", children: a }),
|
|
28
|
-
/* @__PURE__ */ t("button", { className: "@2xl:hidden w-9 h-9 rounded-lg border border-border-default flex items-center justify-center text-text-2 hover:text-text-0 hover:bg-bg-3 transition-colors", children: /* @__PURE__ */ t(
|
|
28
|
+
/* @__PURE__ */ t("button", { className: "@2xl:hidden w-9 h-9 rounded-lg border border-border-default flex items-center justify-center text-text-2 hover:text-text-0 hover:bg-bg-3 transition-colors", children: /* @__PURE__ */ t(He, { size: 16 }) })
|
|
29
29
|
] })
|
|
30
30
|
] });
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function gr({ props: e }) {
|
|
33
33
|
const { logo: n, links: r = [], ctaText: a } = e, o = Math.ceil(r.length / 2), s = r.slice(0, o), l = r.slice(o);
|
|
34
34
|
return /* @__PURE__ */ i("nav", { className: "px-6 @md:px-10 py-4 flex items-center justify-between", children: [
|
|
35
35
|
/* @__PURE__ */ t("div", { className: "hidden @2xl:flex items-center gap-6 flex-1", children: s.map((c, d) => /* @__PURE__ */ t("span", { className: "text-[13px] text-text-2 hover:text-text-0 transition-colors cursor-pointer", children: c }, d)) }),
|
|
@@ -41,17 +41,17 @@ function rr({ props: e }) {
|
|
|
41
41
|
l.map((c, d) => /* @__PURE__ */ t("span", { className: "text-[13px] text-text-2 hover:text-text-0 transition-colors cursor-pointer", children: c }, d)),
|
|
42
42
|
/* @__PURE__ */ t("button", { className: "px-4 py-2 rounded-lg bg-green text-black text-[13px] font-semibold hover:bg-green-dim transition-colors ml-2", children: a })
|
|
43
43
|
] }),
|
|
44
|
-
/* @__PURE__ */ t("button", { className: "@2xl:hidden w-9 h-9 rounded-lg border border-border-default flex items-center justify-center text-text-2 hover:text-text-0 hover:bg-bg-3 transition-colors", children: /* @__PURE__ */ t(
|
|
44
|
+
/* @__PURE__ */ t("button", { className: "@2xl:hidden w-9 h-9 rounded-lg border border-border-default flex items-center justify-center text-text-2 hover:text-text-0 hover:bg-bg-3 transition-colors", children: /* @__PURE__ */ t(He, { size: 16 }) })
|
|
45
45
|
] });
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function xr({ block: e }) {
|
|
48
48
|
const n = e.props;
|
|
49
|
-
return e.variant === "centered" ? /* @__PURE__ */ t(
|
|
49
|
+
return e.variant === "centered" ? /* @__PURE__ */ t(gr, { props: n }) : /* @__PURE__ */ t(mr, { props: n });
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function br({ props: e }) {
|
|
52
52
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-20 @md:py-28 text-center", children: [
|
|
53
53
|
e.badge && /* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green/10 border border-green/20 text-green text-[11px] font-medium mb-6", children: [
|
|
54
|
-
/* @__PURE__ */ t(
|
|
54
|
+
/* @__PURE__ */ t(he, { size: 12 }),
|
|
55
55
|
e.badge
|
|
56
56
|
] }),
|
|
57
57
|
/* @__PURE__ */ t("h1", { className: "reveal-fade-up reveal-d2 text-4xl @md:text-5xl font-bold tracking-tight leading-[1.1] mb-4 max-w-3xl mx-auto", children: e.headline }),
|
|
@@ -59,17 +59,17 @@ function ar({ props: e }) {
|
|
|
59
59
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d4 flex flex-wrap items-center justify-center gap-3", children: [
|
|
60
60
|
/* @__PURE__ */ i("button", { className: "px-6 py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all hover:accent-glow-xl flex items-center gap-2", children: [
|
|
61
61
|
e.primaryCta,
|
|
62
|
-
/* @__PURE__ */ t(
|
|
62
|
+
/* @__PURE__ */ t(H, { size: 16 })
|
|
63
63
|
] }),
|
|
64
64
|
e.secondaryCta && /* @__PURE__ */ t("button", { className: "px-6 py-3 rounded-lg bg-bg-3 text-text-0 text-sm font-medium border border-border-default hover:bg-bg-4 hover:border-border-hover transition-all", children: e.secondaryCta })
|
|
65
65
|
] })
|
|
66
66
|
] });
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function fr({ props: e }) {
|
|
69
69
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-24 flex flex-col @2xl:flex-row items-center gap-10", children: [
|
|
70
70
|
/* @__PURE__ */ i("div", { className: "flex-1", children: [
|
|
71
71
|
e.badge && /* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green/10 border border-green/20 text-green text-[11px] font-medium mb-4", children: [
|
|
72
|
-
/* @__PURE__ */ t(
|
|
72
|
+
/* @__PURE__ */ t(he, { size: 12 }),
|
|
73
73
|
e.badge
|
|
74
74
|
] }),
|
|
75
75
|
/* @__PURE__ */ t("h1", { className: "reveal-fade-up reveal-d2 text-3xl @md:text-5xl font-bold tracking-tight leading-[1.1] mb-4", children: e.headline }),
|
|
@@ -77,7 +77,7 @@ function or({ props: e }) {
|
|
|
77
77
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d4 flex flex-wrap items-center gap-3", children: [
|
|
78
78
|
/* @__PURE__ */ i("button", { className: "px-6 py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all flex items-center gap-2", children: [
|
|
79
79
|
e.primaryCta,
|
|
80
|
-
/* @__PURE__ */ t(
|
|
80
|
+
/* @__PURE__ */ t(H, { size: 16 })
|
|
81
81
|
] }),
|
|
82
82
|
e.secondaryCta && /* @__PURE__ */ t("button", { className: "px-6 py-3 rounded-lg bg-bg-3 text-text-0 text-sm font-medium border border-border-default hover:bg-bg-4 transition-all", children: e.secondaryCta })
|
|
83
83
|
] })
|
|
@@ -88,13 +88,13 @@ function or({ props: e }) {
|
|
|
88
88
|
] }) })
|
|
89
89
|
] });
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function hr({ props: e }) {
|
|
92
92
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-20 @md:py-32 text-center relative overflow-hidden", children: [
|
|
93
93
|
/* @__PURE__ */ t("div", { className: "absolute inset-0 bg-gradient-to-b from-green/5 via-transparent to-transparent pointer-events-none" }),
|
|
94
94
|
/* @__PURE__ */ t("div", { className: "absolute top-0 left-1/2 -translate-x-1/2 w-[600px] h-[300px] bg-green/8 rounded-full blur-[100px] pointer-events-none" }),
|
|
95
95
|
/* @__PURE__ */ i("div", { className: "relative z-10", children: [
|
|
96
96
|
e.badge && /* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green/10 border border-green/20 text-green text-[11px] font-medium mb-6", children: [
|
|
97
|
-
/* @__PURE__ */ t(
|
|
97
|
+
/* @__PURE__ */ t(he, { size: 12 }),
|
|
98
98
|
e.badge
|
|
99
99
|
] }),
|
|
100
100
|
/* @__PURE__ */ t("h1", { className: "reveal-fade-up reveal-d2 text-4xl @md:text-5xl font-bold tracking-tight leading-[1.1] mb-4 max-w-3xl mx-auto", style: { color: "var(--color-text-0)" }, children: e.headline }),
|
|
@@ -102,54 +102,54 @@ function sr({ props: e }) {
|
|
|
102
102
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d4 flex flex-wrap items-center justify-center gap-3", children: [
|
|
103
103
|
/* @__PURE__ */ i("button", { className: "px-6 py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all hover:accent-glow-xl flex items-center gap-2", children: [
|
|
104
104
|
e.primaryCta,
|
|
105
|
-
/* @__PURE__ */ t(
|
|
105
|
+
/* @__PURE__ */ t(H, { size: 16 })
|
|
106
106
|
] }),
|
|
107
107
|
e.secondaryCta && /* @__PURE__ */ t("button", { className: "px-6 py-3 rounded-lg bg-bg-3 text-text-0 text-sm font-medium border border-border-default hover:bg-bg-4 transition-all", children: e.secondaryCta })
|
|
108
108
|
] })
|
|
109
109
|
] })
|
|
110
110
|
] });
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function vr({ props: e }) {
|
|
113
113
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-24 @md:py-36 text-center", children: [
|
|
114
114
|
/* @__PURE__ */ t("h1", { className: "reveal-fade-up reveal-d1 text-5xl @md:text-7xl font-bold tracking-tighter leading-[1.05] mb-6 max-w-4xl mx-auto", children: e.headline }),
|
|
115
115
|
/* @__PURE__ */ t("p", { className: "reveal-fade-up reveal-d2 text-text-2 text-lg @md:text-xl leading-relaxed max-w-lg mx-auto mb-10", children: e.subheadline }),
|
|
116
116
|
/* @__PURE__ */ t("div", { className: "reveal-fade-up reveal-d3", children: /* @__PURE__ */ i("button", { className: "px-8 py-4 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all hover:accent-glow-xl flex items-center gap-2 mx-auto", children: [
|
|
117
117
|
e.primaryCta,
|
|
118
|
-
/* @__PURE__ */ t(
|
|
118
|
+
/* @__PURE__ */ t(H, { size: 16 })
|
|
119
119
|
] }) })
|
|
120
120
|
] });
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function yr({ block: e }) {
|
|
123
123
|
const n = e.props;
|
|
124
124
|
switch (e.variant) {
|
|
125
125
|
case "split":
|
|
126
|
-
return /* @__PURE__ */ t(
|
|
126
|
+
return /* @__PURE__ */ t(fr, { props: n });
|
|
127
127
|
case "gradient":
|
|
128
|
-
return /* @__PURE__ */ t(
|
|
128
|
+
return /* @__PURE__ */ t(hr, { props: n });
|
|
129
129
|
case "minimal":
|
|
130
|
-
return /* @__PURE__ */ t(
|
|
130
|
+
return /* @__PURE__ */ t(vr, { props: n });
|
|
131
131
|
default:
|
|
132
|
-
return /* @__PURE__ */ t(
|
|
132
|
+
return /* @__PURE__ */ t(br, { props: n });
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
const
|
|
136
|
-
Blocks:
|
|
137
|
-
Code:
|
|
138
|
-
Bot:
|
|
139
|
-
Zap:
|
|
140
|
-
Shield:
|
|
141
|
-
Globe:
|
|
142
|
-
Layers:
|
|
143
|
-
Palette:
|
|
144
|
-
Rocket:
|
|
145
|
-
Star:
|
|
146
|
-
Lock:
|
|
147
|
-
Settings:
|
|
135
|
+
const wr = {
|
|
136
|
+
Blocks: Ft,
|
|
137
|
+
Code: ye,
|
|
138
|
+
Bot: Ot,
|
|
139
|
+
Zap: me,
|
|
140
|
+
Shield: Mt,
|
|
141
|
+
Globe: Lt,
|
|
142
|
+
Layers: ge,
|
|
143
|
+
Palette: Bt,
|
|
144
|
+
Rocket: Dt,
|
|
145
|
+
Star: ve,
|
|
146
|
+
Lock: At,
|
|
147
|
+
Settings: jt
|
|
148
148
|
};
|
|
149
|
-
function
|
|
150
|
-
return e ?
|
|
149
|
+
function Ce(e) {
|
|
150
|
+
return e ? wr[e] || me : me;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function kr({ props: e }) {
|
|
153
153
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
154
154
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: [
|
|
155
155
|
e.label && /* @__PURE__ */ t("div", { className: "text-[11px] font-semibold uppercase tracking-widest text-green mb-2", children: e.label }),
|
|
@@ -157,7 +157,7 @@ function dr({ props: e }) {
|
|
|
157
157
|
e.subtitle && /* @__PURE__ */ t("p", { className: "text-text-2 text-sm max-w-lg mx-auto", children: e.subtitle })
|
|
158
158
|
] }),
|
|
159
159
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-1 @lg:grid-cols-2 @3xl:grid-cols-3 gap-4", children: e.items.map((n, r) => {
|
|
160
|
-
const a =
|
|
160
|
+
const a = Ce(n.icon);
|
|
161
161
|
return /* @__PURE__ */ i(
|
|
162
162
|
"div",
|
|
163
163
|
{
|
|
@@ -173,7 +173,7 @@ function dr({ props: e }) {
|
|
|
173
173
|
}) })
|
|
174
174
|
] });
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Nr({ props: e }) {
|
|
177
177
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
178
178
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: [
|
|
179
179
|
e.label && /* @__PURE__ */ t("div", { className: "text-[11px] font-semibold uppercase tracking-widest text-green mb-2", children: e.label }),
|
|
@@ -181,7 +181,7 @@ function pr({ props: e }) {
|
|
|
181
181
|
e.subtitle && /* @__PURE__ */ t("p", { className: "text-text-2 text-sm max-w-lg mx-auto", children: e.subtitle })
|
|
182
182
|
] }),
|
|
183
183
|
/* @__PURE__ */ t("div", { className: "max-w-2xl mx-auto space-y-4", children: e.items.map((n, r) => {
|
|
184
|
-
const a =
|
|
184
|
+
const a = Ce(n.icon);
|
|
185
185
|
return /* @__PURE__ */ i(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
@@ -199,7 +199,7 @@ function pr({ props: e }) {
|
|
|
199
199
|
}) })
|
|
200
200
|
] });
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Sr({ props: e }) {
|
|
203
203
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
204
204
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-12", children: [
|
|
205
205
|
e.label && /* @__PURE__ */ t("div", { className: "text-[11px] font-semibold uppercase tracking-widest text-green mb-2", children: e.label }),
|
|
@@ -207,7 +207,7 @@ function mr({ props: e }) {
|
|
|
207
207
|
e.subtitle && /* @__PURE__ */ t("p", { className: "text-text-2 text-sm max-w-lg mx-auto", children: e.subtitle })
|
|
208
208
|
] }),
|
|
209
209
|
/* @__PURE__ */ t("div", { className: "space-y-8", children: e.items.map((n, r) => {
|
|
210
|
-
const a =
|
|
210
|
+
const a = Ce(n.icon), o = n.image, s = r % 2 === 1;
|
|
211
211
|
return /* @__PURE__ */ i(
|
|
212
212
|
"div",
|
|
213
213
|
{
|
|
@@ -226,18 +226,23 @@ function mr({ props: e }) {
|
|
|
226
226
|
}) })
|
|
227
227
|
] });
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function Cr({ block: e }) {
|
|
230
230
|
const n = e.props;
|
|
231
231
|
switch (e.variant) {
|
|
232
232
|
case "list":
|
|
233
|
-
return /* @__PURE__ */ t(
|
|
233
|
+
return /* @__PURE__ */ t(Nr, { props: n });
|
|
234
234
|
case "alternating":
|
|
235
|
-
return /* @__PURE__ */ t(
|
|
235
|
+
return /* @__PURE__ */ t(Sr, { props: n });
|
|
236
236
|
default:
|
|
237
|
-
return /* @__PURE__ */ t(
|
|
237
|
+
return /* @__PURE__ */ t(kr, { props: n });
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const it = ["Vercel", "Stripe", "GitHub", "Figma", "Notion", "Linear"], lt = [
|
|
241
|
+
{ title: "Product", links: ["Features", "Pricing", "Changelog", "Roadmap"] },
|
|
242
|
+
{ title: "Company", links: ["About", "Blog", "Careers", "Press"] },
|
|
243
|
+
{ title: "Resources", links: ["Documentation", "API Reference", "Guides", "Community"] },
|
|
244
|
+
{ title: "Legal", links: ["Privacy", "Terms", "Security", "Cookie Policy"] }
|
|
245
|
+
], ct = [
|
|
241
246
|
{
|
|
242
247
|
name: "Starter",
|
|
243
248
|
price: "$0",
|
|
@@ -263,9 +268,40 @@ const at = [
|
|
|
263
268
|
features: ["Everything in Pro", "Team collaboration", "Custom components", "SSO", "Dedicated support"],
|
|
264
269
|
cta: "Contact Sales"
|
|
265
270
|
}
|
|
266
|
-
]
|
|
267
|
-
|
|
268
|
-
|
|
271
|
+
], dt = [
|
|
272
|
+
{ value: "10K+", label: "Sites built" },
|
|
273
|
+
{ value: "99.9%", label: "Uptime" },
|
|
274
|
+
{ value: "50ms", label: "Avg. response" },
|
|
275
|
+
{ value: "4.9/5", label: "User rating" }
|
|
276
|
+
], pt = [
|
|
277
|
+
{ question: "What is OpenPage?", answer: "OpenPage is a visual website builder that uses structured JSON config as the source of truth. Both humans and AI agents can edit the same config to build beautiful websites." },
|
|
278
|
+
{ question: "How does the JSON config work?", answer: "Every website is represented as a JSON document with blocks, styles, and content. The visual editor reads and writes this JSON, and agents can make surgical edits via the API." },
|
|
279
|
+
{ question: "Can I use my own components?", answer: "Yes! OpenPage supports custom components. You can build your own blocks following our component schema and register them in the block registry." },
|
|
280
|
+
{ question: "Is it free to use?", answer: "OpenPage offers a free tier for personal projects with up to 5 blocks. Pro and Team plans unlock unlimited blocks, custom domains, and priority support." }
|
|
281
|
+
], ut = [
|
|
282
|
+
{ name: "Alex Rivera", role: "CEO & Founder" },
|
|
283
|
+
{ name: "Jordan Lee", role: "CTO" },
|
|
284
|
+
{ name: "Sam Patel", role: "Head of Design" },
|
|
285
|
+
{ name: "Casey Morgan", role: "Lead Engineer" }
|
|
286
|
+
], ce = [
|
|
287
|
+
{ name: "Sarah Chen", role: "CEO at TechCorp", quote: "OpenPage completely changed how we build landing pages. The JSON config approach is genius.", rating: 5, avatar: "" },
|
|
288
|
+
{ name: "Marcus Johnson", role: "Lead Developer", quote: "Finally, a tool where both designers and AI agents can work together seamlessly.", rating: 5, avatar: "" },
|
|
289
|
+
{ name: "Emma Wilson", role: "Product Manager", quote: "We shipped our marketing site in half the time. The component library is incredible.", rating: 4, avatar: "" }
|
|
290
|
+
], mt = [
|
|
291
|
+
{ src: "", alt: "Image 1", caption: "" },
|
|
292
|
+
{ src: "", alt: "Image 2", caption: "" },
|
|
293
|
+
{ src: "", alt: "Image 3", caption: "" },
|
|
294
|
+
{ src: "", alt: "Image 4", caption: "" },
|
|
295
|
+
{ src: "", alt: "Image 5", caption: "" },
|
|
296
|
+
{ src: "", alt: "Image 6", caption: "" }
|
|
297
|
+
], gt = [
|
|
298
|
+
{ src: "", alt: "1" },
|
|
299
|
+
{ src: "", alt: "2" },
|
|
300
|
+
{ src: "", alt: "3" },
|
|
301
|
+
{ src: "", alt: "4" }
|
|
302
|
+
], xt = ct;
|
|
303
|
+
function $r({ props: e }) {
|
|
304
|
+
const n = e.tiers || xt;
|
|
269
305
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
270
306
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: [
|
|
271
307
|
/* @__PURE__ */ t("h2", { className: "text-2xl @md:text-3xl font-bold tracking-tight mb-2", children: e.title }),
|
|
@@ -277,7 +313,7 @@ function gr({ props: e }) {
|
|
|
277
313
|
className: `reveal-fade-up reveal-d${Math.min(a + 2, 8)} relative rounded-xl p-6 flex flex-col transition-all ${r.featured ? "bg-bg-2 border-2 border-green accent-glow-ring" : "bg-bg-2 border border-border-default hover:border-border-hover"}`,
|
|
278
314
|
children: [
|
|
279
315
|
r.featured && /* @__PURE__ */ i("div", { className: "absolute -top-3 left-1/2 -translate-x-1/2 px-3 py-0.5 rounded-full bg-green text-black text-[10px] font-bold uppercase tracking-wider flex items-center gap-1", children: [
|
|
280
|
-
/* @__PURE__ */ t(
|
|
316
|
+
/* @__PURE__ */ t(ve, { size: 10, fill: "currentColor" }),
|
|
281
317
|
"Recommended"
|
|
282
318
|
] }),
|
|
283
319
|
/* @__PURE__ */ i("div", { className: "mb-4", children: [
|
|
@@ -289,7 +325,7 @@ function gr({ props: e }) {
|
|
|
289
325
|
r.period && /* @__PURE__ */ t("span", { className: "text-text-3 text-sm", children: r.period })
|
|
290
326
|
] }),
|
|
291
327
|
/* @__PURE__ */ t("ul", { className: "space-y-2 mb-6 flex-1", children: r.features.map((o, s) => /* @__PURE__ */ i("li", { className: "flex items-start gap-2 text-[12.5px] text-text-1", children: [
|
|
292
|
-
/* @__PURE__ */ t(
|
|
328
|
+
/* @__PURE__ */ t(ae, { size: 14, className: "text-green shrink-0 mt-0.5" }),
|
|
293
329
|
o
|
|
294
330
|
] }, s)) }),
|
|
295
331
|
/* @__PURE__ */ t(
|
|
@@ -305,8 +341,8 @@ function gr({ props: e }) {
|
|
|
305
341
|
)) })
|
|
306
342
|
] });
|
|
307
343
|
}
|
|
308
|
-
function
|
|
309
|
-
const n = e.tiers ||
|
|
344
|
+
function Pr({ props: e }) {
|
|
345
|
+
const n = e.tiers || xt, r = [...new Set(n.flatMap((a) => a.features))];
|
|
310
346
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
311
347
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: [
|
|
312
348
|
/* @__PURE__ */ t("h2", { className: "text-2xl @md:text-3xl font-bold tracking-tight mb-2", children: e.title }),
|
|
@@ -322,16 +358,16 @@ function xr({ props: e }) {
|
|
|
322
358
|
] }) }),
|
|
323
359
|
/* @__PURE__ */ t("tbody", { children: r.map((a, o) => /* @__PURE__ */ i("tr", { className: "border-b border-border-subtle", children: [
|
|
324
360
|
/* @__PURE__ */ t("td", { className: "py-2.5 px-3 text-text-1", children: a }),
|
|
325
|
-
n.map((s, l) => /* @__PURE__ */ t("td", { className: "py-2.5 px-3 text-center", children: s.features.includes(a) ? /* @__PURE__ */ t(
|
|
361
|
+
n.map((s, l) => /* @__PURE__ */ t("td", { className: "py-2.5 px-3 text-center", children: s.features.includes(a) ? /* @__PURE__ */ t(ae, { size: 14, className: "text-green mx-auto" }) : /* @__PURE__ */ t("span", { className: "text-text-3", children: "-" }) }, l))
|
|
326
362
|
] }, o)) })
|
|
327
363
|
] }) })
|
|
328
364
|
] });
|
|
329
365
|
}
|
|
330
|
-
function
|
|
366
|
+
function Tr({ block: e }) {
|
|
331
367
|
const n = e.props;
|
|
332
|
-
return e.variant === "comparison" ? /* @__PURE__ */ t(
|
|
368
|
+
return e.variant === "comparison" ? /* @__PURE__ */ t(Pr, { props: n }) : /* @__PURE__ */ t($r, { props: n });
|
|
333
369
|
}
|
|
334
|
-
function
|
|
370
|
+
function Ir({ props: e }) {
|
|
335
371
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20 text-center relative overflow-hidden", children: [
|
|
336
372
|
/* @__PURE__ */ t("div", { className: "absolute inset-0 bg-gradient-to-b from-green/6 via-green/3 to-transparent pointer-events-none" }),
|
|
337
373
|
/* @__PURE__ */ i("div", { className: "relative z-10", children: [
|
|
@@ -339,12 +375,12 @@ function fr({ props: e }) {
|
|
|
339
375
|
e.subheadline && /* @__PURE__ */ t("p", { className: "reveal-fade-up reveal-d2 text-text-2 text-sm mb-6 max-w-md mx-auto", children: e.subheadline }),
|
|
340
376
|
/* @__PURE__ */ t("div", { className: "reveal-fade-up reveal-d3", children: /* @__PURE__ */ i("button", { className: "px-8 py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all hover:accent-glow-xl inline-flex items-center gap-2", children: [
|
|
341
377
|
e.buttonText,
|
|
342
|
-
/* @__PURE__ */ t(
|
|
378
|
+
/* @__PURE__ */ t(H, { size: 16 })
|
|
343
379
|
] }) })
|
|
344
380
|
] })
|
|
345
381
|
] });
|
|
346
382
|
}
|
|
347
|
-
function
|
|
383
|
+
function jr({ props: e }) {
|
|
348
384
|
return /* @__PURE__ */ t("section", { className: "px-6 @md:px-10 py-12 @md:py-16", children: /* @__PURE__ */ i("div", { className: "reveal-scale reveal-d1 flex flex-col @lg:flex-row items-center justify-between gap-6 p-8 rounded-xl bg-bg-2 border border-border-default relative overflow-hidden", children: [
|
|
349
385
|
/* @__PURE__ */ t("div", { className: "absolute inset-0 bg-gradient-to-r from-green/5 to-transparent pointer-events-none" }),
|
|
350
386
|
/* @__PURE__ */ i("div", { className: "relative z-10", children: [
|
|
@@ -353,15 +389,15 @@ function hr({ props: e }) {
|
|
|
353
389
|
] }),
|
|
354
390
|
/* @__PURE__ */ i("button", { className: "relative z-10 px-6 py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all shrink-0 flex items-center gap-2", children: [
|
|
355
391
|
e.buttonText,
|
|
356
|
-
/* @__PURE__ */ t(
|
|
392
|
+
/* @__PURE__ */ t(H, { size: 16 })
|
|
357
393
|
] })
|
|
358
394
|
] }) });
|
|
359
395
|
}
|
|
360
|
-
function
|
|
396
|
+
function Ar({ block: e }) {
|
|
361
397
|
const n = e.props;
|
|
362
|
-
return e.variant === "split" ? /* @__PURE__ */ t(
|
|
398
|
+
return e.variant === "split" ? /* @__PURE__ */ t(jr, { props: n }) : /* @__PURE__ */ t(Ir, { props: n });
|
|
363
399
|
}
|
|
364
|
-
function
|
|
400
|
+
function Dr({ props: e }) {
|
|
365
401
|
return /* @__PURE__ */ t("footer", { className: "px-6 @md:px-10 py-8 border-t border-border-subtle", children: /* @__PURE__ */ i("div", { className: "flex flex-col @lg:flex-row items-center justify-between gap-4", children: [
|
|
366
402
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
367
403
|
e.logoImage ? /* @__PURE__ */ t("img", { src: e.logoImage, alt: e.logo, className: "h-6 w-auto object-contain" }) : /* @__PURE__ */ t("div", { className: "w-6 h-6 rounded-md bg-green/10 flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "w-3 h-3 rounded-full bg-green" }) }),
|
|
@@ -378,13 +414,8 @@ function yr({ props: e }) {
|
|
|
378
414
|
/* @__PURE__ */ t("span", { className: "text-[11px] text-text-3", children: e.copyright })
|
|
379
415
|
] }) });
|
|
380
416
|
}
|
|
381
|
-
function
|
|
382
|
-
const n = e.columns ||
|
|
383
|
-
{ title: "Product", links: ["Features", "Pricing", "Changelog", "Roadmap"] },
|
|
384
|
-
{ title: "Company", links: ["About", "Blog", "Careers", "Press"] },
|
|
385
|
-
{ title: "Resources", links: ["Documentation", "API Reference", "Guides", "Community"] },
|
|
386
|
-
{ title: "Legal", links: ["Privacy", "Terms", "Security", "Cookie Policy"] }
|
|
387
|
-
];
|
|
417
|
+
function Br({ props: e }) {
|
|
418
|
+
const n = e.columns || lt;
|
|
388
419
|
return /* @__PURE__ */ i("footer", { className: "px-6 @md:px-10 py-12 border-t border-border-subtle", children: [
|
|
389
420
|
/* @__PURE__ */ i("div", { className: "grid grid-cols-2 @2xl:grid-cols-5 gap-8 mb-10", children: [
|
|
390
421
|
/* @__PURE__ */ i("div", { className: "col-span-2 @2xl:col-span-1", children: [
|
|
@@ -412,7 +443,7 @@ function wr({ props: e }) {
|
|
|
412
443
|
] })
|
|
413
444
|
] });
|
|
414
445
|
}
|
|
415
|
-
function
|
|
446
|
+
function Lr({ props: e }) {
|
|
416
447
|
return /* @__PURE__ */ t("footer", { className: "px-6 @md:px-10 py-6", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-1.5 text-[11px] text-text-3", children: [
|
|
417
448
|
/* @__PURE__ */ t("span", { children: e.copyright }),
|
|
418
449
|
e.links.length > 0 && /* @__PURE__ */ t("span", { className: "mx-1", children: "|" }),
|
|
@@ -422,25 +453,20 @@ function kr({ props: e }) {
|
|
|
422
453
|
] }, r))
|
|
423
454
|
] }) });
|
|
424
455
|
}
|
|
425
|
-
function
|
|
456
|
+
function Mr({ block: e }) {
|
|
426
457
|
const n = e.props;
|
|
427
458
|
switch (e.variant) {
|
|
428
459
|
case "multi-column":
|
|
429
|
-
return /* @__PURE__ */ t(
|
|
460
|
+
return /* @__PURE__ */ t(Br, { props: n });
|
|
430
461
|
case "minimal":
|
|
431
|
-
return /* @__PURE__ */ t(
|
|
462
|
+
return /* @__PURE__ */ t(Lr, { props: n });
|
|
432
463
|
default:
|
|
433
|
-
return /* @__PURE__ */ t(
|
|
464
|
+
return /* @__PURE__ */ t(Dr, { props: n });
|
|
434
465
|
}
|
|
435
466
|
}
|
|
436
|
-
|
|
437
|
-
{ name: "Sarah Chen", role: "CEO at TechCorp", quote: "OpenPage completely changed how we build landing pages. The JSON config approach is genius.", rating: 5 },
|
|
438
|
-
{ name: "Marcus Johnson", role: "Lead Developer", quote: "Finally, a tool where both designers and AI agents can work together seamlessly.", rating: 5 },
|
|
439
|
-
{ name: "Emma Wilson", role: "Product Manager", quote: "We shipped our marketing site in half the time. The component library is incredible.", rating: 4 }
|
|
440
|
-
];
|
|
441
|
-
function Se({ rating: e }) {
|
|
467
|
+
function $e({ rating: e }) {
|
|
442
468
|
return /* @__PURE__ */ t("div", { className: "flex gap-0.5", children: [1, 2, 3, 4, 5].map((n) => /* @__PURE__ */ t(
|
|
443
|
-
|
|
469
|
+
ve,
|
|
444
470
|
{
|
|
445
471
|
size: 12,
|
|
446
472
|
className: n <= e ? "text-status-yellow fill-status-yellow" : "text-text-3"
|
|
@@ -448,8 +474,8 @@ function Se({ rating: e }) {
|
|
|
448
474
|
n
|
|
449
475
|
)) });
|
|
450
476
|
}
|
|
451
|
-
function
|
|
452
|
-
const n = e.items ||
|
|
477
|
+
function Or({ props: e }) {
|
|
478
|
+
const n = e.items || ce;
|
|
453
479
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
454
480
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: [
|
|
455
481
|
/* @__PURE__ */ t("h2", { className: "text-2xl @md:text-3xl font-bold tracking-tight mb-2", children: e.title || "What people say" }),
|
|
@@ -460,13 +486,13 @@ function Sr({ props: e }) {
|
|
|
460
486
|
{
|
|
461
487
|
className: `reveal-fade-up reveal-d${Math.min(a + 2, 8)} bg-bg-2 border border-border-default rounded-xl p-5 transition-all hover:border-border-hover`,
|
|
462
488
|
children: [
|
|
463
|
-
/* @__PURE__ */ t(
|
|
489
|
+
/* @__PURE__ */ t(we, { size: 20, className: "text-green/30 mb-3" }),
|
|
464
490
|
/* @__PURE__ */ i("p", { className: "text-[13px] text-text-1 leading-relaxed mb-4 italic", children: [
|
|
465
491
|
'"',
|
|
466
492
|
r.quote,
|
|
467
493
|
'"'
|
|
468
494
|
] }),
|
|
469
|
-
r.rating && /* @__PURE__ */ t(
|
|
495
|
+
r.rating && /* @__PURE__ */ t($e, { rating: r.rating }),
|
|
470
496
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 mt-4 pt-4 border-t border-border-subtle", children: [
|
|
471
497
|
r.avatar ? /* @__PURE__ */ t("img", { src: r.avatar, alt: r.name, className: "w-9 h-9 rounded-full object-cover border border-border-default" }) : /* @__PURE__ */ t("div", { className: "w-9 h-9 rounded-full bg-bg-4 border border-border-default flex items-center justify-center text-[11px] font-semibold text-text-2", children: r.name.split(" ").map((o) => o[0]).join("") }),
|
|
472
498
|
/* @__PURE__ */ i("div", { children: [
|
|
@@ -480,8 +506,8 @@ function Sr({ props: e }) {
|
|
|
480
506
|
)) })
|
|
481
507
|
] });
|
|
482
508
|
}
|
|
483
|
-
function
|
|
484
|
-
const n = e.items ||
|
|
509
|
+
function Fr({ props: e }) {
|
|
510
|
+
const n = e.items || ce, [r, a] = C(0), o = (c) => {
|
|
485
511
|
a((c % n.length + n.length) % n.length);
|
|
486
512
|
};
|
|
487
513
|
if (n.length === 0) return null;
|
|
@@ -489,13 +515,13 @@ function Cr({ props: e }) {
|
|
|
489
515
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
490
516
|
/* @__PURE__ */ t("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: /* @__PURE__ */ t("h2", { className: "text-2xl @md:text-3xl font-bold tracking-tight mb-2", children: e.title || "What people say" }) }),
|
|
491
517
|
/* @__PURE__ */ t("div", { className: "reveal-fade-up reveal-d2 max-w-2xl mx-auto", children: /* @__PURE__ */ i("div", { className: "text-center", children: [
|
|
492
|
-
/* @__PURE__ */ t(
|
|
518
|
+
/* @__PURE__ */ t(we, { size: 32, className: "text-green/20 mx-auto mb-4" }),
|
|
493
519
|
/* @__PURE__ */ i("p", { className: "text-lg text-text-0 leading-relaxed mb-4 italic", children: [
|
|
494
520
|
'"',
|
|
495
521
|
l.quote,
|
|
496
522
|
'"'
|
|
497
523
|
] }),
|
|
498
|
-
l.rating && /* @__PURE__ */ t("div", { className: "flex justify-center mb-4", children: /* @__PURE__ */ t(
|
|
524
|
+
l.rating && /* @__PURE__ */ t("div", { className: "flex justify-center mb-4", children: /* @__PURE__ */ t($e, { rating: l.rating }) }),
|
|
499
525
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-3", children: [
|
|
500
526
|
l.avatar ? /* @__PURE__ */ t("img", { src: l.avatar, alt: l.name, className: "w-10 h-10 rounded-full object-cover border border-border-default" }) : /* @__PURE__ */ t("div", { className: "w-10 h-10 rounded-full bg-bg-4 border border-border-default flex items-center justify-center text-xs font-semibold text-text-2", children: l.name.split(" ").map((c) => c[0]).join("") }),
|
|
501
527
|
/* @__PURE__ */ i("div", { className: "text-left", children: [
|
|
@@ -509,7 +535,7 @@ function Cr({ props: e }) {
|
|
|
509
535
|
{
|
|
510
536
|
onClick: () => o(s - 1),
|
|
511
537
|
className: "w-8 h-8 rounded-full border border-border-default bg-bg-2 flex items-center justify-center text-text-2 hover:text-text-0 hover:border-border-hover transition-colors",
|
|
512
|
-
children: /* @__PURE__ */ t(
|
|
538
|
+
children: /* @__PURE__ */ t(Et, { size: 16 })
|
|
513
539
|
}
|
|
514
540
|
),
|
|
515
541
|
/* @__PURE__ */ t("div", { className: "flex gap-1.5", children: n.map((c, d) => /* @__PURE__ */ t(
|
|
@@ -525,23 +551,23 @@ function Cr({ props: e }) {
|
|
|
525
551
|
{
|
|
526
552
|
onClick: () => o(s + 1),
|
|
527
553
|
className: "w-8 h-8 rounded-full border border-border-default bg-bg-2 flex items-center justify-center text-text-2 hover:text-text-0 hover:border-border-hover transition-colors",
|
|
528
|
-
children: /* @__PURE__ */ t(
|
|
554
|
+
children: /* @__PURE__ */ t(ze, { size: 16 })
|
|
529
555
|
}
|
|
530
556
|
)
|
|
531
557
|
] })
|
|
532
558
|
] }) })
|
|
533
559
|
] });
|
|
534
560
|
}
|
|
535
|
-
function
|
|
536
|
-
const r = (e.items ||
|
|
561
|
+
function Er({ props: e }) {
|
|
562
|
+
const r = (e.items || ce)[0];
|
|
537
563
|
return r ? /* @__PURE__ */ t("section", { className: "px-6 @md:px-10 py-16 @md:py-24", children: /* @__PURE__ */ i("div", { className: "max-w-2xl mx-auto text-center", children: [
|
|
538
|
-
/* @__PURE__ */ t("div", { className: "reveal-fade-up reveal-d1", children: /* @__PURE__ */ t(
|
|
564
|
+
/* @__PURE__ */ t("div", { className: "reveal-fade-up reveal-d1", children: /* @__PURE__ */ t(we, { size: 48, className: "text-green/20 mx-auto mb-6" }) }),
|
|
539
565
|
/* @__PURE__ */ i("p", { className: "reveal-fade-up reveal-d2 text-xl @md:text-2xl text-text-0 leading-relaxed mb-8 italic font-display", children: [
|
|
540
566
|
'"',
|
|
541
567
|
r.quote,
|
|
542
568
|
'"'
|
|
543
569
|
] }),
|
|
544
|
-
r.rating && /* @__PURE__ */ t("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ t(
|
|
570
|
+
r.rating && /* @__PURE__ */ t("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ t($e, { rating: r.rating }) }),
|
|
545
571
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-3", children: [
|
|
546
572
|
/* @__PURE__ */ t("div", { className: "w-12 h-12 rounded-full bg-bg-4 border border-border-default flex items-center justify-center text-sm font-semibold text-text-2", children: r.name.split(" ").map((a) => a[0]).join("") }),
|
|
547
573
|
/* @__PURE__ */ i("div", { className: "text-left", children: [
|
|
@@ -551,25 +577,20 @@ function $r({ props: e }) {
|
|
|
551
577
|
] })
|
|
552
578
|
] }) }) : null;
|
|
553
579
|
}
|
|
554
|
-
function
|
|
580
|
+
function Hr({ block: e }) {
|
|
555
581
|
const n = e.props;
|
|
556
582
|
switch (e.variant) {
|
|
557
583
|
case "carousel":
|
|
558
|
-
return /* @__PURE__ */ t(
|
|
584
|
+
return /* @__PURE__ */ t(Fr, { props: n });
|
|
559
585
|
case "spotlight":
|
|
560
|
-
return /* @__PURE__ */ t(
|
|
586
|
+
return /* @__PURE__ */ t(Er, { props: n });
|
|
561
587
|
default:
|
|
562
|
-
return /* @__PURE__ */ t(
|
|
588
|
+
return /* @__PURE__ */ t(Or, { props: n });
|
|
563
589
|
}
|
|
564
590
|
}
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
{ value: "50ms", label: "Avg. response" },
|
|
569
|
-
{ value: "4.9/5", label: "User rating" }
|
|
570
|
-
];
|
|
571
|
-
function Tr({ props: e }) {
|
|
572
|
-
const n = e.items || Ce;
|
|
591
|
+
const Pe = dt;
|
|
592
|
+
function zr({ props: e }) {
|
|
593
|
+
const n = e.items || Pe;
|
|
573
594
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-12 @md:py-16", children: [
|
|
574
595
|
e.title && /* @__PURE__ */ t("h2", { className: "reveal-fade-up reveal-d1 text-xl font-bold tracking-tight text-center mb-8", children: e.title }),
|
|
575
596
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @2xl:grid-cols-4 gap-4", children: n.map((r, a) => /* @__PURE__ */ i("div", { className: `reveal-fade-up reveal-d${Math.min(a + 2, 8)} text-center p-4 rounded-xl bg-bg-2 border border-border-default`, children: [
|
|
@@ -578,15 +599,15 @@ function Tr({ props: e }) {
|
|
|
578
599
|
] }, a)) })
|
|
579
600
|
] });
|
|
580
601
|
}
|
|
581
|
-
function
|
|
582
|
-
const n = e.items ||
|
|
602
|
+
function Rr({ props: e }) {
|
|
603
|
+
const n = e.items || Pe;
|
|
583
604
|
return /* @__PURE__ */ t("section", { className: "px-6 @md:px-10 py-10", children: /* @__PURE__ */ t("div", { className: "reveal-scale reveal-d1 flex flex-wrap items-center justify-center gap-8 @md:gap-12 py-6 px-4 rounded-xl bg-bg-2 border border-border-default", children: n.map((r, a) => /* @__PURE__ */ i("div", { className: "text-center", children: [
|
|
584
605
|
/* @__PURE__ */ t("div", { className: "text-2xl @md:text-3xl font-bold tracking-tight text-text-0 mb-0.5", children: r.value }),
|
|
585
606
|
/* @__PURE__ */ t("div", { className: "text-[11px] text-text-3 font-medium uppercase tracking-wider", children: r.label })
|
|
586
607
|
] }, a)) }) });
|
|
587
608
|
}
|
|
588
|
-
function
|
|
589
|
-
const n = e.items ||
|
|
609
|
+
function Gr({ props: e }) {
|
|
610
|
+
const n = e.items || Pe;
|
|
590
611
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-12 @md:py-16", children: [
|
|
591
612
|
e.title && /* @__PURE__ */ t("h2", { className: "reveal-fade-up reveal-d1 text-xl font-bold tracking-tight text-center mb-8", children: e.title }),
|
|
592
613
|
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @2xl:grid-cols-4 gap-4", children: n.map((r, a) => /* @__PURE__ */ i("div", { className: `reveal-fade-up reveal-d${Math.min(a + 2, 8)} text-center p-5 rounded-xl bg-green/8 border border-green/15`, children: [
|
|
@@ -595,24 +616,19 @@ function jr({ props: e }) {
|
|
|
595
616
|
] }, a)) })
|
|
596
617
|
] });
|
|
597
618
|
}
|
|
598
|
-
function
|
|
619
|
+
function Ur({ block: e }) {
|
|
599
620
|
const n = e.props;
|
|
600
621
|
switch (e.variant) {
|
|
601
622
|
case "bar":
|
|
602
|
-
return /* @__PURE__ */ t(
|
|
623
|
+
return /* @__PURE__ */ t(Rr, { props: n });
|
|
603
624
|
case "counter":
|
|
604
|
-
return /* @__PURE__ */ t(
|
|
625
|
+
return /* @__PURE__ */ t(Gr, { props: n });
|
|
605
626
|
default:
|
|
606
|
-
return /* @__PURE__ */ t(
|
|
627
|
+
return /* @__PURE__ */ t(zr, { props: n });
|
|
607
628
|
}
|
|
608
629
|
}
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
{ question: "How does the JSON config work?", answer: "Every website is represented as a JSON document with blocks, styles, and content. The visual editor reads and writes this JSON, and agents can make surgical edits via the API." },
|
|
612
|
-
{ question: "Can I use my own components?", answer: "Yes! OpenPage supports custom components. You can build your own blocks following our component schema and register them in the block registry." },
|
|
613
|
-
{ question: "Is it free to use?", answer: "OpenPage offers a free tier for personal projects with up to 5 blocks. Pro and Team plans unlock unlimited blocks, custom domains, and priority support." }
|
|
614
|
-
];
|
|
615
|
-
function Br({ item: e, isOpen: n, onToggle: r }) {
|
|
630
|
+
const qr = pt;
|
|
631
|
+
function _r({ item: e, isOpen: n, onToggle: r }) {
|
|
616
632
|
return /* @__PURE__ */ i("div", { className: "border-b border-border-subtle", children: [
|
|
617
633
|
/* @__PURE__ */ i(
|
|
618
634
|
"button",
|
|
@@ -622,7 +638,7 @@ function Br({ item: e, isOpen: n, onToggle: r }) {
|
|
|
622
638
|
children: [
|
|
623
639
|
/* @__PURE__ */ t("span", { className: "text-[13.5px] font-medium text-text-0 group-hover:text-green transition-colors", children: e.question }),
|
|
624
640
|
/* @__PURE__ */ t(
|
|
625
|
-
|
|
641
|
+
oe,
|
|
626
642
|
{
|
|
627
643
|
size: 16,
|
|
628
644
|
className: `text-text-3 shrink-0 ml-4 transition-transform duration-200 ${n ? "rotate-180 text-green" : ""}`
|
|
@@ -640,15 +656,15 @@ function Br({ item: e, isOpen: n, onToggle: r }) {
|
|
|
640
656
|
)
|
|
641
657
|
] });
|
|
642
658
|
}
|
|
643
|
-
function
|
|
644
|
-
const n = e.props, r = n.items ||
|
|
659
|
+
function Jr({ block: e }) {
|
|
660
|
+
const n = e.props, r = n.items || qr, [a, o] = C(0);
|
|
645
661
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
646
662
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: [
|
|
647
663
|
/* @__PURE__ */ t("h2", { className: "text-2xl @md:text-3xl font-bold tracking-tight mb-2", children: n.title || "Frequently Asked Questions" }),
|
|
648
664
|
n.subtitle && /* @__PURE__ */ t("p", { className: "text-text-2 text-sm max-w-lg mx-auto", children: n.subtitle })
|
|
649
665
|
] }),
|
|
650
666
|
/* @__PURE__ */ t("div", { className: "max-w-2xl mx-auto", children: r.map((s, l) => /* @__PURE__ */ t("div", { className: `reveal-fade-up reveal-d${Math.min(l + 2, 8)}`, children: /* @__PURE__ */ t(
|
|
651
|
-
|
|
667
|
+
_r,
|
|
652
668
|
{
|
|
653
669
|
item: s,
|
|
654
670
|
isOpen: a === l,
|
|
@@ -657,14 +673,9 @@ function Mr({ block: e }) {
|
|
|
657
673
|
) }, l)) })
|
|
658
674
|
] });
|
|
659
675
|
}
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
{ name: "Sam Patel", role: "Head of Design" },
|
|
664
|
-
{ name: "Casey Morgan", role: "Lead Engineer" }
|
|
665
|
-
];
|
|
666
|
-
function Or({ block: e }) {
|
|
667
|
-
const n = e.props, r = n.members || Lr;
|
|
676
|
+
const Vr = ut;
|
|
677
|
+
function Wr({ block: e }) {
|
|
678
|
+
const n = e.props, r = n.members || Vr;
|
|
668
679
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: [
|
|
669
680
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-10", children: [
|
|
670
681
|
/* @__PURE__ */ t("h2", { className: "text-2xl @md:text-3xl font-bold tracking-tight mb-2", children: n.title || "Meet the Team" }),
|
|
@@ -677,7 +688,7 @@ function Or({ block: e }) {
|
|
|
677
688
|
] }, o)) })
|
|
678
689
|
] });
|
|
679
690
|
}
|
|
680
|
-
function
|
|
691
|
+
function Kr({ block: e }) {
|
|
681
692
|
const n = e.props;
|
|
682
693
|
return /* @__PURE__ */ t("section", { className: "px-6 @md:px-10 py-16 @md:py-20", children: /* @__PURE__ */ i("div", { className: "max-w-lg mx-auto", children: [
|
|
683
694
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 text-center mb-8", children: [
|
|
@@ -726,7 +737,7 @@ function Er({ block: e }) {
|
|
|
726
737
|
onClick: () => S("Message sent! We'll be in touch soon."),
|
|
727
738
|
className: "w-full py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all hover:accent-glow-lg flex items-center justify-center gap-2",
|
|
728
739
|
children: [
|
|
729
|
-
/* @__PURE__ */ t(
|
|
740
|
+
/* @__PURE__ */ t(Re, { size: 14 }),
|
|
730
741
|
"Send Message"
|
|
731
742
|
]
|
|
732
743
|
}
|
|
@@ -734,10 +745,10 @@ function Er({ block: e }) {
|
|
|
734
745
|
] })
|
|
735
746
|
] }) });
|
|
736
747
|
}
|
|
737
|
-
function
|
|
748
|
+
function Yr({ block: e }) {
|
|
738
749
|
const n = e.props;
|
|
739
750
|
return /* @__PURE__ */ t("section", { className: "px-6 @md:px-10 py-12 @md:py-16", children: /* @__PURE__ */ i("div", { className: "max-w-xl mx-auto text-center", children: [
|
|
740
|
-
/* @__PURE__ */ t("div", { className: "reveal-scale reveal-d1 w-12 h-12 rounded-xl bg-green/10 border border-green/20 flex items-center justify-center text-green mx-auto mb-4", children: /* @__PURE__ */ t(
|
|
751
|
+
/* @__PURE__ */ t("div", { className: "reveal-scale reveal-d1 w-12 h-12 rounded-xl bg-green/10 border border-green/20 flex items-center justify-center text-green mx-auto mb-4", children: /* @__PURE__ */ t(ke, { size: 22 }) }),
|
|
741
752
|
/* @__PURE__ */ t("h2", { className: "reveal-fade-up reveal-d2 text-xl @md:text-2xl font-bold tracking-tight mb-2", children: n.title || "Stay in the loop" }),
|
|
742
753
|
/* @__PURE__ */ t("p", { className: "reveal-fade-up reveal-d3 text-text-2 text-sm mb-6", children: n.subtitle || "Get updates on new features and releases. No spam, ever." }),
|
|
743
754
|
/* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d4 flex gap-2 max-w-sm mx-auto", children: [
|
|
@@ -762,8 +773,7 @@ function Hr({ block: e }) {
|
|
|
762
773
|
!n.socialProof && /* @__PURE__ */ t("p", { className: "text-[11px] text-text-3 mt-3", children: "Join 2,000+ developers and designers" })
|
|
763
774
|
] }) });
|
|
764
775
|
}
|
|
765
|
-
|
|
766
|
-
function zr({ name: e }) {
|
|
776
|
+
function Zr({ name: e }) {
|
|
767
777
|
return /* @__PURE__ */ t("div", { className: "group cursor-pointer transition-all", children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2 opacity-50 group-hover:opacity-100 transition-all group-hover:scale-105 grayscale group-hover:grayscale-0", children: [
|
|
768
778
|
/* @__PURE__ */ i(
|
|
769
779
|
"svg",
|
|
@@ -806,34 +816,34 @@ function zr({ name: e }) {
|
|
|
806
816
|
/* @__PURE__ */ t("span", { className: "text-sm font-semibold text-text-3 group-hover:text-text-0 tracking-tight transition-colors", children: e })
|
|
807
817
|
] }) });
|
|
808
818
|
}
|
|
809
|
-
function
|
|
810
|
-
const n = e.props, r = n.logos ||
|
|
819
|
+
function Qr({ block: e }) {
|
|
820
|
+
const n = e.props, r = n.logos || it;
|
|
811
821
|
return /* @__PURE__ */ i("section", { className: "px-6 @md:px-10 py-10 @md:py-14", children: [
|
|
812
822
|
/* @__PURE__ */ t("p", { className: "reveal-fade-up reveal-d1 text-center text-[11px] font-medium uppercase tracking-widest text-text-3 mb-6", children: n.title || "Trusted by teams at" }),
|
|
813
|
-
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center justify-center gap-8 @md:gap-12", children: r.map((a, o) => /* @__PURE__ */ t("div", { className: `reveal-fade-up reveal-d${Math.min(o + 2, 8)}`, children: /* @__PURE__ */ t(
|
|
823
|
+
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center justify-center gap-8 @md:gap-12", children: r.map((a, o) => /* @__PURE__ */ t("div", { className: `reveal-fade-up reveal-d${Math.min(o + 2, 8)}`, children: /* @__PURE__ */ t(Zr, { name: a }) }, o)) })
|
|
814
824
|
] });
|
|
815
825
|
}
|
|
816
|
-
function
|
|
826
|
+
function Xr({ block: e }) {
|
|
817
827
|
const { variant: n } = e, r = Number(e.props.height) || 60, a = e.props.width || "full", o = a === "narrow" ? "max-w-32" : a === "centered" ? "max-w-xs" : "w-full";
|
|
818
828
|
return n === "space" ? /* @__PURE__ */ t("div", { style: { height: `${r}px` } }) : n === "dots" ? /* @__PURE__ */ t("div", { className: "flex items-center justify-center gap-2 py-8", style: { minHeight: `${r}px` }, children: [0, 1, 2].map((s) => /* @__PURE__ */ t("span", { className: "w-1.5 h-1.5 rounded-full bg-text-3" }, s)) }) : /* @__PURE__ */ t("div", { className: "flex items-center justify-center", style: { minHeight: `${r}px` }, children: /* @__PURE__ */ t("div", { className: `${o} mx-auto border-t border-border-default` }) });
|
|
819
829
|
}
|
|
820
|
-
function
|
|
830
|
+
function en({ block: e }) {
|
|
821
831
|
const { variant: n, props: r } = e, a = r.text || "Announcement", o = r.linkText, s = r.linkUrl || "#";
|
|
822
832
|
return n === "bar" ? /* @__PURE__ */ t("div", { className: "px-6 py-3 @lg:px-9", children: /* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 flex items-center justify-between gap-4 px-5 py-3.5 rounded-lg border border-border-default bg-bg-2", children: [
|
|
823
833
|
/* @__PURE__ */ t("span", { className: "text-[13px] text-text-1", children: a }),
|
|
824
834
|
o && /* @__PURE__ */ i("a", { href: s, className: "text-[13px] font-medium text-green hover:text-green-dim transition-colors flex items-center gap-1 shrink-0", children: [
|
|
825
835
|
o,
|
|
826
|
-
/* @__PURE__ */ t(
|
|
836
|
+
/* @__PURE__ */ t(H, { size: 13 })
|
|
827
837
|
] })
|
|
828
838
|
] }) }) : /* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 flex items-center justify-center gap-3 px-4 py-2.5 bg-green/10 border-b border-green/20", children: [
|
|
829
839
|
/* @__PURE__ */ t("span", { className: "text-[12.5px] text-text-0 font-medium", children: a }),
|
|
830
840
|
o && /* @__PURE__ */ i("a", { href: s, className: "text-[12.5px] font-semibold text-green hover:text-green-dim transition-colors flex items-center gap-1", children: [
|
|
831
841
|
o,
|
|
832
|
-
/* @__PURE__ */ t(
|
|
842
|
+
/* @__PURE__ */ t(H, { size: 12 })
|
|
833
843
|
] })
|
|
834
844
|
] });
|
|
835
845
|
}
|
|
836
|
-
function
|
|
846
|
+
function tn(e) {
|
|
837
847
|
const n = e.split(`
|
|
838
848
|
`), r = [];
|
|
839
849
|
let a = [], o = 0;
|
|
@@ -847,22 +857,22 @@ function qr(e) {
|
|
|
847
857
|
continue;
|
|
848
858
|
}
|
|
849
859
|
if (c.startsWith("### ")) {
|
|
850
|
-
s(), r.push(U("h3", { key: o++, className: "text-lg font-semibold font-display mb-2 mt-4" },
|
|
860
|
+
s(), r.push(U("h3", { key: o++, className: "text-lg font-semibold font-display mb-2 mt-4" }, X(c.slice(4))));
|
|
851
861
|
continue;
|
|
852
862
|
}
|
|
853
863
|
if (c.startsWith("## ")) {
|
|
854
|
-
s(), r.push(U("h2", { key: o++, className: "text-xl font-semibold font-display mb-3 mt-5" },
|
|
864
|
+
s(), r.push(U("h2", { key: o++, className: "text-xl font-semibold font-display mb-3 mt-5" }, X(c.slice(3))));
|
|
855
865
|
continue;
|
|
856
866
|
}
|
|
857
867
|
if (c.startsWith("- ") || c.startsWith("* ")) {
|
|
858
|
-
a.push(U("li", { key: o++ },
|
|
868
|
+
a.push(U("li", { key: o++ }, X(c.slice(2))));
|
|
859
869
|
continue;
|
|
860
870
|
}
|
|
861
|
-
s(), r.push(U("p", { key: o++, className: "text-text-1 leading-relaxed mb-3" },
|
|
871
|
+
s(), r.push(U("p", { key: o++, className: "text-text-1 leading-relaxed mb-3" }, X(c)));
|
|
862
872
|
}
|
|
863
873
|
return s(), r;
|
|
864
874
|
}
|
|
865
|
-
function
|
|
875
|
+
function X(e) {
|
|
866
876
|
const n = [];
|
|
867
877
|
let r = e, a = 0;
|
|
868
878
|
for (; r.length > 0; ) {
|
|
@@ -875,8 +885,8 @@ function Q(e) {
|
|
|
875
885
|
}
|
|
876
886
|
return n;
|
|
877
887
|
}
|
|
878
|
-
function
|
|
879
|
-
const { variant: n, props: r } = e, a = r.body || "", o =
|
|
888
|
+
function rn({ block: e }) {
|
|
889
|
+
const { variant: n, props: r } = e, a = r.body || "", o = tn(a);
|
|
880
890
|
if (n === "columns") {
|
|
881
891
|
const s = Math.ceil(o.length / 2);
|
|
882
892
|
return /* @__PURE__ */ t("div", { className: "px-6 py-12 @lg:px-16 @lg:py-16", children: /* @__PURE__ */ i("div", { className: "reveal-fade-up reveal-d1 grid grid-cols-1 @lg:grid-cols-2 gap-8 @lg:gap-12", children: [
|
|
@@ -886,51 +896,51 @@ function _r({ block: e }) {
|
|
|
886
896
|
}
|
|
887
897
|
return n === "highlight" ? /* @__PURE__ */ t("div", { className: "px-6 py-12 @lg:px-16 @lg:py-16", children: /* @__PURE__ */ t("div", { className: "reveal-slide-right reveal-d1 border-l-2 border-green pl-6 @lg:pl-8 bg-green-glow2 rounded-r-lg py-6 px-4", children: o }) }) : /* @__PURE__ */ t("div", { className: "reveal-fade-up reveal-d1 px-6 py-12 @lg:px-16 @lg:py-16 max-w-3xl mx-auto", children: o });
|
|
888
898
|
}
|
|
889
|
-
function
|
|
890
|
-
return /* @__PURE__ */ t("div", { className: `bg-gradient-to-br from-bg-3 to-bg-4 flex items-center justify-center ${e || ""}`, children: /* @__PURE__ */ t(
|
|
899
|
+
function pe({ className: e }) {
|
|
900
|
+
return /* @__PURE__ */ t("div", { className: `bg-gradient-to-br from-bg-3 to-bg-4 flex items-center justify-center ${e || ""}`, children: /* @__PURE__ */ t(se, { size: 32, className: "text-text-3" }) });
|
|
891
901
|
}
|
|
892
|
-
function
|
|
902
|
+
function nn({ block: e }) {
|
|
893
903
|
const { variant: n, props: r } = e, a = r.src, o = r.alt || "", s = r.title, l = r.subtitle, c = r.imageSide || "left", d = r.images || [];
|
|
894
904
|
if (n === "side-by-side")
|
|
895
905
|
return /* @__PURE__ */ t("div", { className: "px-6 py-12 @lg:px-16 @lg:py-16", children: /* @__PURE__ */ i("div", { className: "grid grid-cols-1 @lg:grid-cols-2 gap-8 @lg:gap-12 items-center ", children: [
|
|
896
|
-
/* @__PURE__ */ t("div", { className: `reveal-scale reveal-d1 ${c === "right" ? "@lg:order-2" : ""}`, children: a ? /* @__PURE__ */ t("img", { src: a, alt: o, className: "w-full h-full object-cover rounded-lg" }) : /* @__PURE__ */ t(
|
|
906
|
+
/* @__PURE__ */ t("div", { className: `reveal-scale reveal-d1 ${c === "right" ? "@lg:order-2" : ""}`, children: a ? /* @__PURE__ */ t("img", { src: a, alt: o, className: "w-full h-full object-cover rounded-lg" }) : /* @__PURE__ */ t(pe, { className: "w-full h-64 @lg:h-80 rounded-lg" }) }),
|
|
897
907
|
/* @__PURE__ */ i("div", { className: `reveal-fade-up reveal-d2 ${c === "right" ? "@lg:order-1" : ""}`, children: [
|
|
898
908
|
s && /* @__PURE__ */ t("h2", { className: "text-2xl font-display font-semibold mb-3", children: s }),
|
|
899
909
|
l && /* @__PURE__ */ t("p", { className: "text-text-1 leading-relaxed", children: l })
|
|
900
910
|
] })
|
|
901
911
|
] }) });
|
|
902
912
|
if (n === "grid") {
|
|
903
|
-
const p = d.length > 0 ? d.slice(0, 4) :
|
|
913
|
+
const p = d.length > 0 ? d.slice(0, 4) : gt;
|
|
904
914
|
return /* @__PURE__ */ i("div", { className: "px-6 py-12 @lg:px-16 @lg:py-16", children: [
|
|
905
915
|
s && /* @__PURE__ */ t("h2", { className: "reveal-fade-up reveal-d1 text-2xl font-display font-semibold mb-6 text-center", children: s }),
|
|
906
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @lg:grid-cols-4 gap-3", children: p.map((
|
|
916
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @lg:grid-cols-4 gap-3", children: p.map((u, f) => /* @__PURE__ */ t("div", { className: `reveal-scale reveal-d${Math.min(f + 2, 8)} aspect-square rounded-lg overflow-hidden`, children: u.src ? /* @__PURE__ */ t("img", { src: u.src, alt: u.alt || "", className: "w-full h-full object-cover" }) : /* @__PURE__ */ t(pe, { className: "w-full h-full" }) }, f)) })
|
|
907
917
|
] });
|
|
908
918
|
}
|
|
909
919
|
return /* @__PURE__ */ i("div", { className: "reveal-scale reveal-d1 relative", children: [
|
|
910
|
-
a ? /* @__PURE__ */ t("img", { src: a, alt: o, className: "w-full h-64 @lg:h-96 object-cover" }) : /* @__PURE__ */ t(
|
|
920
|
+
a ? /* @__PURE__ */ t("img", { src: a, alt: o, className: "w-full h-64 @lg:h-96 object-cover" }) : /* @__PURE__ */ t(pe, { className: "w-full h-64 @lg:h-96" }),
|
|
911
921
|
(s || l) && /* @__PURE__ */ i("div", { className: "absolute inset-0 bg-gradient-to-t from-bg-0/80 to-transparent flex flex-col justify-end p-6 @lg:p-12", children: [
|
|
912
922
|
s && /* @__PURE__ */ t("h2", { className: "reveal-fade-up reveal-d2 text-2xl @lg:text-3xl font-display font-bold mb-2", children: s }),
|
|
913
923
|
l && /* @__PURE__ */ t("p", { className: "reveal-fade-up reveal-d3 text-text-1 text-sm @lg:text-base max-w-lg", children: l })
|
|
914
924
|
] })
|
|
915
925
|
] });
|
|
916
926
|
}
|
|
917
|
-
function
|
|
927
|
+
function an(e) {
|
|
918
928
|
return e.match(/(?:youtu\.be\/|youtube\.com\/(?:watch\?v=|embed\/|v\/))([a-zA-Z0-9_-]{11})/)?.[1] || null;
|
|
919
929
|
}
|
|
920
|
-
function
|
|
930
|
+
function on(e) {
|
|
921
931
|
return e.match(/vimeo\.com\/(\d+)/)?.[1] || null;
|
|
922
932
|
}
|
|
923
|
-
function
|
|
924
|
-
return /* @__PURE__ */ t("div", { className: "w-full aspect-video bg-gradient-to-br from-bg-3 to-bg-4 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "w-14 h-14 rounded-full bg-bg-5/50 border border-border-default flex items-center justify-center", children: /* @__PURE__ */ t(
|
|
933
|
+
function sn() {
|
|
934
|
+
return /* @__PURE__ */ t("div", { className: "w-full aspect-video bg-gradient-to-br from-bg-3 to-bg-4 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "w-14 h-14 rounded-full bg-bg-5/50 border border-border-default flex items-center justify-center", children: /* @__PURE__ */ t(Ne, { size: 24, className: "text-text-3 ml-0.5" }) }) });
|
|
925
935
|
}
|
|
926
|
-
function
|
|
936
|
+
function ln({ block: e }) {
|
|
927
937
|
const { variant: n, props: r } = e, a = r.url || "", o = r.title;
|
|
928
938
|
let s = null;
|
|
929
939
|
if (n === "vimeo") {
|
|
930
|
-
const l =
|
|
940
|
+
const l = on(a);
|
|
931
941
|
l && (s = `https://player.vimeo.com/video/${l}`);
|
|
932
942
|
} else {
|
|
933
|
-
const l =
|
|
943
|
+
const l = an(a);
|
|
934
944
|
l && (s = `https://www.youtube-nocookie.com/embed/${l}`);
|
|
935
945
|
}
|
|
936
946
|
return /* @__PURE__ */ i("div", { className: "px-6 py-12 @lg:px-16 @lg:py-16", children: [
|
|
@@ -944,34 +954,26 @@ function Yr({ block: e }) {
|
|
|
944
954
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
945
955
|
allowFullScreen: !0
|
|
946
956
|
}
|
|
947
|
-
) }) : /* @__PURE__ */ t(
|
|
957
|
+
) }) : /* @__PURE__ */ t(sn, {})
|
|
948
958
|
] });
|
|
949
959
|
}
|
|
950
|
-
|
|
951
|
-
{ alt: "Image 1" },
|
|
952
|
-
{ alt: "Image 2" },
|
|
953
|
-
{ alt: "Image 3" },
|
|
954
|
-
{ alt: "Image 4" },
|
|
955
|
-
{ alt: "Image 5" },
|
|
956
|
-
{ alt: "Image 6" }
|
|
957
|
-
];
|
|
958
|
-
function De({ image: e, tall: n }) {
|
|
960
|
+
function Le({ image: e, tall: n }) {
|
|
959
961
|
return /* @__PURE__ */ i("div", { className: `rounded-lg overflow-hidden border border-border-default group ${n ? "row-span-2" : ""}`, children: [
|
|
960
|
-
e.src ? /* @__PURE__ */ t("img", { src: e.src, alt: e.alt || "", className: "w-full h-full object-cover" }) : /* @__PURE__ */ t("div", { className: "w-full h-full min-h-[140px] bg-gradient-to-br from-bg-3 to-bg-4 flex items-center justify-center", children: /* @__PURE__ */ t(
|
|
962
|
+
e.src ? /* @__PURE__ */ t("img", { src: e.src, alt: e.alt || "", className: "w-full h-full object-cover" }) : /* @__PURE__ */ t("div", { className: "w-full h-full min-h-[140px] bg-gradient-to-br from-bg-3 to-bg-4 flex items-center justify-center", children: /* @__PURE__ */ t(se, { size: 24, className: "text-text-3" }) }),
|
|
961
963
|
e.caption && /* @__PURE__ */ t("div", { className: "px-3 py-2 bg-bg-2 text-[11px] text-text-2", children: e.caption })
|
|
962
964
|
] });
|
|
963
965
|
}
|
|
964
|
-
function
|
|
965
|
-
const { variant: n, props: r } = e, a = r.title, o = (r.images || []).length > 0 ? r.images :
|
|
966
|
+
function cn({ block: e }) {
|
|
967
|
+
const { variant: n, props: r } = e, a = r.title, o = (r.images || []).length > 0 ? r.images : mt;
|
|
966
968
|
return n === "masonry" ? /* @__PURE__ */ i("div", { className: "px-6 py-12 @lg:px-16 @lg:py-16", children: [
|
|
967
969
|
a && /* @__PURE__ */ t("h2", { className: "reveal-fade-up reveal-d1 text-2xl font-display font-semibold mb-6 text-center", children: a }),
|
|
968
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @lg:grid-cols-3 auto-rows-[160px] gap-3", children: o.map((s, l) => /* @__PURE__ */ t("div", { className: `reveal-scale reveal-d${Math.min(l + 2, 8)}`, children: /* @__PURE__ */ t(
|
|
970
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @lg:grid-cols-3 auto-rows-[160px] gap-3", children: o.map((s, l) => /* @__PURE__ */ t("div", { className: `reveal-scale reveal-d${Math.min(l + 2, 8)}`, children: /* @__PURE__ */ t(Le, { image: s, tall: l % 3 === 0 }) }, l)) })
|
|
969
971
|
] }) : /* @__PURE__ */ i("div", { className: "px-6 py-12 @lg:px-16 @lg:py-16", children: [
|
|
970
972
|
a && /* @__PURE__ */ t("h2", { className: "reveal-fade-up reveal-d1 text-2xl font-display font-semibold mb-6 text-center", children: a }),
|
|
971
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @lg:grid-cols-3 gap-3", children: o.map((s, l) => /* @__PURE__ */ t("div", { className: `reveal-scale reveal-d${Math.min(l + 2, 8)}`, children: /* @__PURE__ */ t(
|
|
973
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 @lg:grid-cols-3 gap-3", children: o.map((s, l) => /* @__PURE__ */ t("div", { className: `reveal-scale reveal-d${Math.min(l + 2, 8)}`, children: /* @__PURE__ */ t(Le, { image: s }) }, l)) })
|
|
972
974
|
] });
|
|
973
975
|
}
|
|
974
|
-
class
|
|
976
|
+
class dn extends Pt {
|
|
975
977
|
state = { hasError: !1, error: void 0 };
|
|
976
978
|
static getDerivedStateFromError(n) {
|
|
977
979
|
return { hasError: !0, error: n };
|
|
@@ -987,45 +989,45 @@ class Xr extends xt {
|
|
|
987
989
|
] }) : this.props.children;
|
|
988
990
|
}
|
|
989
991
|
}
|
|
990
|
-
function
|
|
992
|
+
function pn({ block: e }) {
|
|
991
993
|
return /* @__PURE__ */ i("div", { className: "px-9 py-7 text-center text-text-3 text-sm", children: [
|
|
992
994
|
e.type,
|
|
993
995
|
" block (coming soon)"
|
|
994
996
|
] });
|
|
995
997
|
}
|
|
996
|
-
const
|
|
997
|
-
navbar:
|
|
998
|
-
hero:
|
|
999
|
-
features:
|
|
1000
|
-
pricing:
|
|
1001
|
-
cta:
|
|
1002
|
-
footer:
|
|
1003
|
-
testimonials:
|
|
1004
|
-
stats:
|
|
1005
|
-
faq:
|
|
1006
|
-
team:
|
|
1007
|
-
contact:
|
|
1008
|
-
newsletter:
|
|
1009
|
-
logocloud:
|
|
1010
|
-
divider:
|
|
1011
|
-
banner:
|
|
1012
|
-
content:
|
|
1013
|
-
image:
|
|
1014
|
-
video:
|
|
1015
|
-
gallery:
|
|
998
|
+
const un = {
|
|
999
|
+
navbar: xr,
|
|
1000
|
+
hero: yr,
|
|
1001
|
+
features: Cr,
|
|
1002
|
+
pricing: Tr,
|
|
1003
|
+
cta: Ar,
|
|
1004
|
+
footer: Mr,
|
|
1005
|
+
testimonials: Hr,
|
|
1006
|
+
stats: Ur,
|
|
1007
|
+
faq: Jr,
|
|
1008
|
+
team: Wr,
|
|
1009
|
+
contact: Kr,
|
|
1010
|
+
newsletter: Yr,
|
|
1011
|
+
logocloud: Qr,
|
|
1012
|
+
divider: Xr,
|
|
1013
|
+
banner: en,
|
|
1014
|
+
content: rn,
|
|
1015
|
+
image: nn,
|
|
1016
|
+
video: ln,
|
|
1017
|
+
gallery: cn
|
|
1016
1018
|
};
|
|
1017
|
-
function
|
|
1018
|
-
const n =
|
|
1019
|
-
return /* @__PURE__ */ t(
|
|
1019
|
+
function mn({ block: e }) {
|
|
1020
|
+
const n = un[e.type] || pn;
|
|
1021
|
+
return /* @__PURE__ */ t(dn, { blockType: e.type, children: /* @__PURE__ */ t(n, { block: e }) });
|
|
1020
1022
|
}
|
|
1021
|
-
function
|
|
1023
|
+
function K(e) {
|
|
1022
1024
|
return e.pages && e.pages.length > 0 ? e.pages : [{ id: "page-home", name: "Home", path: "/", blocks: e.blocks }];
|
|
1023
1025
|
}
|
|
1024
|
-
function
|
|
1025
|
-
const r =
|
|
1026
|
+
function Me(e, n) {
|
|
1027
|
+
const r = K(e);
|
|
1026
1028
|
return r.find((o) => o.id === n)?.blocks ?? r[0]?.blocks ?? [];
|
|
1027
1029
|
}
|
|
1028
|
-
const
|
|
1030
|
+
const Oe = [
|
|
1029
1031
|
{
|
|
1030
1032
|
id: "block-navbar",
|
|
1031
1033
|
type: "navbar",
|
|
@@ -1083,54 +1085,54 @@ const Me = [
|
|
|
1083
1085
|
links: ["Privacy", "Terms", "Contact"]
|
|
1084
1086
|
}
|
|
1085
1087
|
}
|
|
1086
|
-
],
|
|
1088
|
+
], gn = {
|
|
1087
1089
|
name: "My Website",
|
|
1088
|
-
pages: [{ id: "page-home", name: "Home", path: "/", blocks:
|
|
1089
|
-
blocks:
|
|
1090
|
+
pages: [{ id: "page-home", name: "Home", path: "/", blocks: Oe }],
|
|
1091
|
+
blocks: Oe
|
|
1090
1092
|
};
|
|
1091
|
-
function
|
|
1093
|
+
function xe(e) {
|
|
1092
1094
|
return {
|
|
1093
1095
|
pages: e.config.pages ? JSON.parse(JSON.stringify(e.config.pages)) : void 0,
|
|
1094
1096
|
blocks: JSON.parse(JSON.stringify(e.config.blocks)),
|
|
1095
1097
|
theme: e.config.theme ? JSON.parse(JSON.stringify(e.config.theme)) : void 0
|
|
1096
1098
|
};
|
|
1097
1099
|
}
|
|
1098
|
-
function
|
|
1099
|
-
const r =
|
|
1100
|
+
function L(e, n) {
|
|
1101
|
+
const r = xe(e);
|
|
1100
1102
|
return {
|
|
1101
1103
|
undoStack: [...e.undoStack, { ...r, label: n, timestamp: Date.now() }].slice(-50),
|
|
1102
1104
|
redoStack: []
|
|
1103
1105
|
};
|
|
1104
1106
|
}
|
|
1105
|
-
function
|
|
1106
|
-
const n =
|
|
1107
|
+
function E(e) {
|
|
1108
|
+
const n = K(e);
|
|
1107
1109
|
return { ...e, pages: n };
|
|
1108
1110
|
}
|
|
1109
|
-
function
|
|
1110
|
-
const o =
|
|
1111
|
+
function ee(e, n, r) {
|
|
1112
|
+
const o = K(e).map(
|
|
1111
1113
|
(l) => l.id === n ? { ...l, blocks: r([...l.blocks]) } : l
|
|
1112
1114
|
), s = o.find((l) => l.id === n)?.blocks ?? [];
|
|
1113
1115
|
return { ...e, pages: o, blocks: s };
|
|
1114
1116
|
}
|
|
1115
|
-
const v =
|
|
1116
|
-
|
|
1117
|
+
const v = st()(
|
|
1118
|
+
rr(
|
|
1117
1119
|
(e, n) => ({
|
|
1118
|
-
config:
|
|
1120
|
+
config: gn,
|
|
1119
1121
|
activePageId: "page-home",
|
|
1120
1122
|
undoStack: [],
|
|
1121
1123
|
redoStack: [],
|
|
1122
1124
|
setConfig: (r) => {
|
|
1123
|
-
const a =
|
|
1125
|
+
const a = K(r);
|
|
1124
1126
|
e({ config: { ...r, pages: a }, activePageId: a[0]?.id ?? "page-home", undoStack: [], redoStack: [] });
|
|
1125
1127
|
},
|
|
1126
1128
|
setActivePage: (r) => e({ activePageId: r }),
|
|
1127
1129
|
getActivePageBlocks: () => {
|
|
1128
1130
|
const r = n();
|
|
1129
|
-
return
|
|
1131
|
+
return Me(r.config, r.activePageId);
|
|
1130
1132
|
},
|
|
1131
1133
|
updateBlock: (r, a) => e((o) => ({
|
|
1132
|
-
...
|
|
1133
|
-
config:
|
|
1134
|
+
...L(o, "Update block"),
|
|
1135
|
+
config: Q(E(o.config), (s) => {
|
|
1134
1136
|
const l = s.pages.find((d) => d.id === o.activePageId);
|
|
1135
1137
|
if (!l) return;
|
|
1136
1138
|
const c = l.blocks.find((d) => d.id === r);
|
|
@@ -1138,8 +1140,8 @@ const v = nt()(
|
|
|
1138
1140
|
})
|
|
1139
1141
|
})),
|
|
1140
1142
|
updateBlockProps: (r, a) => e((o) => ({
|
|
1141
|
-
...
|
|
1142
|
-
config:
|
|
1143
|
+
...L(o, "Update properties"),
|
|
1144
|
+
config: Q(E(o.config), (s) => {
|
|
1143
1145
|
const l = s.pages.find((d) => d.id === o.activePageId);
|
|
1144
1146
|
if (!l) return;
|
|
1145
1147
|
const c = l.blocks.find((d) => d.id === r);
|
|
@@ -1147,32 +1149,32 @@ const v = nt()(
|
|
|
1147
1149
|
})
|
|
1148
1150
|
})),
|
|
1149
1151
|
addBlock: (r, a) => e((o) => ({
|
|
1150
|
-
...
|
|
1151
|
-
config:
|
|
1152
|
+
...L(o, "Add block"),
|
|
1153
|
+
config: ee(E(o.config), o.activePageId, (s) => (a !== void 0 ? s.splice(a, 0, r) : s.push(r), s))
|
|
1152
1154
|
})),
|
|
1153
1155
|
removeBlock: (r) => e((a) => ({
|
|
1154
|
-
...
|
|
1155
|
-
config:
|
|
1156
|
-
|
|
1156
|
+
...L(a, "Remove block"),
|
|
1157
|
+
config: ee(
|
|
1158
|
+
E(a.config),
|
|
1157
1159
|
a.activePageId,
|
|
1158
1160
|
(o) => o.filter((s) => s.id !== r)
|
|
1159
1161
|
)
|
|
1160
1162
|
})),
|
|
1161
1163
|
duplicateBlock: (r) => e((a) => {
|
|
1162
|
-
const o =
|
|
1164
|
+
const o = Me(a.config, a.activePageId), s = o.findIndex((d) => d.id === r);
|
|
1163
1165
|
if (s === -1) return a;
|
|
1164
1166
|
const l = o[s], c = {
|
|
1165
1167
|
...JSON.parse(JSON.stringify(l)),
|
|
1166
1168
|
id: `block-${Date.now()}`
|
|
1167
1169
|
};
|
|
1168
1170
|
return {
|
|
1169
|
-
...
|
|
1170
|
-
config:
|
|
1171
|
+
...L(a, "Duplicate block"),
|
|
1172
|
+
config: ee(E(a.config), a.activePageId, (d) => (d.splice(s + 1, 0, c), d))
|
|
1171
1173
|
};
|
|
1172
1174
|
}),
|
|
1173
1175
|
moveBlock: (r, a) => e((o) => ({
|
|
1174
|
-
...
|
|
1175
|
-
config:
|
|
1176
|
+
...L(o, "Move block"),
|
|
1177
|
+
config: ee(E(o.config), o.activePageId, (s) => {
|
|
1176
1178
|
const [l] = s.splice(r, 1);
|
|
1177
1179
|
return s.splice(a, 0, l), s;
|
|
1178
1180
|
})
|
|
@@ -1180,35 +1182,35 @@ const v = nt()(
|
|
|
1180
1182
|
addPage: (r, a) => {
|
|
1181
1183
|
const o = `page-${Date.now()}`;
|
|
1182
1184
|
return e((s) => ({
|
|
1183
|
-
...
|
|
1184
|
-
config:
|
|
1185
|
+
...L(s, "Add page"),
|
|
1186
|
+
config: Q(E(s.config), (l) => {
|
|
1185
1187
|
l.pages.push({ id: o, name: r, path: a, blocks: [] });
|
|
1186
1188
|
}),
|
|
1187
1189
|
activePageId: o
|
|
1188
1190
|
})), o;
|
|
1189
1191
|
},
|
|
1190
1192
|
removePage: (r) => e((a) => {
|
|
1191
|
-
const o =
|
|
1193
|
+
const o = K(a.config);
|
|
1192
1194
|
if (o.length <= 1) return a;
|
|
1193
1195
|
const s = o.filter((c) => c.id !== r), l = a.activePageId === r ? s[0].id : a.activePageId;
|
|
1194
1196
|
return {
|
|
1195
|
-
...
|
|
1197
|
+
...L(a, "Remove page"),
|
|
1196
1198
|
config: { ...a.config, pages: s, blocks: s[0].blocks },
|
|
1197
1199
|
activePageId: l
|
|
1198
1200
|
};
|
|
1199
1201
|
}),
|
|
1200
1202
|
renamePage: (r, a) => e((o) => ({
|
|
1201
|
-
config:
|
|
1203
|
+
config: Q(E(o.config), (s) => {
|
|
1202
1204
|
const l = s.pages.find((c) => c.id === r);
|
|
1203
1205
|
l && (l.name = a);
|
|
1204
1206
|
})
|
|
1205
1207
|
})),
|
|
1206
1208
|
setTheme: (r) => e((a) => ({
|
|
1207
|
-
...
|
|
1209
|
+
...L(a, "Change theme"),
|
|
1208
1210
|
config: { ...a.config, theme: r }
|
|
1209
1211
|
})),
|
|
1210
1212
|
updateTheme: (r) => e((a) => ({
|
|
1211
|
-
...
|
|
1213
|
+
...L(a, "Update theme"),
|
|
1212
1214
|
config: { ...a.config, theme: { ...a.config.theme, ...r } }
|
|
1213
1215
|
})),
|
|
1214
1216
|
previewTheme: (r) => e((a) => ({
|
|
@@ -1216,7 +1218,7 @@ const v = nt()(
|
|
|
1216
1218
|
})),
|
|
1217
1219
|
undo: () => e((r) => {
|
|
1218
1220
|
if (r.undoStack.length === 0) return r;
|
|
1219
|
-
const a = r.undoStack[r.undoStack.length - 1], o =
|
|
1221
|
+
const a = r.undoStack[r.undoStack.length - 1], o = xe(r);
|
|
1220
1222
|
return {
|
|
1221
1223
|
undoStack: r.undoStack.slice(0, -1),
|
|
1222
1224
|
redoStack: [...r.redoStack, { ...o, label: a.label, timestamp: Date.now() }],
|
|
@@ -1225,7 +1227,7 @@ const v = nt()(
|
|
|
1225
1227
|
}),
|
|
1226
1228
|
redo: () => e((r) => {
|
|
1227
1229
|
if (r.redoStack.length === 0) return r;
|
|
1228
|
-
const a = r.redoStack[r.redoStack.length - 1], o =
|
|
1230
|
+
const a = r.redoStack[r.redoStack.length - 1], o = xe(r);
|
|
1229
1231
|
return {
|
|
1230
1232
|
redoStack: r.redoStack.slice(0, -1),
|
|
1231
1233
|
undoStack: [...r.undoStack, { ...o, label: a.label, timestamp: Date.now() }],
|
|
@@ -1249,7 +1251,7 @@ const v = nt()(
|
|
|
1249
1251
|
}
|
|
1250
1252
|
}
|
|
1251
1253
|
)
|
|
1252
|
-
), P =
|
|
1254
|
+
), P = st()((e) => ({
|
|
1253
1255
|
selectedBlockId: null,
|
|
1254
1256
|
viewport: "desktop",
|
|
1255
1257
|
jsonDrawerOpen: !1,
|
|
@@ -1271,7 +1273,7 @@ const v = nt()(
|
|
|
1271
1273
|
setGenerationError: (n) => e({ generationError: n }),
|
|
1272
1274
|
clearGeneration: () => e({ isGenerating: !1, generationPrompt: null })
|
|
1273
1275
|
}));
|
|
1274
|
-
function
|
|
1276
|
+
function xn(e = !1) {
|
|
1275
1277
|
const n = D(null), [r, a] = C(e);
|
|
1276
1278
|
return I(() => {
|
|
1277
1279
|
if (e) return;
|
|
@@ -1286,14 +1288,14 @@ function an(e = !1) {
|
|
|
1286
1288
|
return s.observe(o), () => s.disconnect();
|
|
1287
1289
|
}, [e]), { ref: n, isRevealed: e || r };
|
|
1288
1290
|
}
|
|
1289
|
-
function
|
|
1291
|
+
function bn({ block: e, isSelected: n, onSelect: r, children: a }) {
|
|
1290
1292
|
const o = v((y) => {
|
|
1291
1293
|
const $ = y.config.pages;
|
|
1292
1294
|
return !$ || $.length === 0 ? y.config.blocks : ($.find((R) => R.id === y.activePageId) ?? $[0]).blocks;
|
|
1293
|
-
}), { duplicateBlock: s, removeBlock: l, moveBlock: c } = v(), { selectedBlockId: d, selectBlock: p } = P(),
|
|
1295
|
+
}), { duplicateBlock: s, removeBlock: l, moveBlock: c } = v(), { selectedBlockId: d, selectBlock: p } = P(), u = P((y) => y.previewMode), f = D(null), { ref: x, isRevealed: h } = xn(!u), w = o.findIndex((y) => y.id === e.id), N = w === 0, b = w === o.length - 1;
|
|
1294
1296
|
return I(() => {
|
|
1295
1297
|
n && f.current && f.current.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1296
|
-
}, [n]),
|
|
1298
|
+
}, [n]), u ? /* @__PURE__ */ t(
|
|
1297
1299
|
"div",
|
|
1298
1300
|
{
|
|
1299
1301
|
ref: x,
|
|
@@ -1340,7 +1342,7 @@ function on({ block: e, isSelected: n, onSelect: r, children: a }) {
|
|
|
1340
1342
|
className: "w-6 h-6 rounded bg-bg-2/80 border border-border-default backdrop-blur-sm flex items-center justify-center text-text-3 hover:text-text-0 hover:bg-bg-3 transition-colors",
|
|
1341
1343
|
title: "Move up",
|
|
1342
1344
|
"aria-label": `Move ${e.type} block up`,
|
|
1343
|
-
children: /* @__PURE__ */ t(
|
|
1345
|
+
children: /* @__PURE__ */ t(Ht, { size: 12 })
|
|
1344
1346
|
}
|
|
1345
1347
|
),
|
|
1346
1348
|
!b && /* @__PURE__ */ t(
|
|
@@ -1352,7 +1354,7 @@ function on({ block: e, isSelected: n, onSelect: r, children: a }) {
|
|
|
1352
1354
|
className: "w-6 h-6 rounded bg-bg-2/80 border border-border-default backdrop-blur-sm flex items-center justify-center text-text-3 hover:text-text-0 hover:bg-bg-3 transition-colors",
|
|
1353
1355
|
title: "Move down",
|
|
1354
1356
|
"aria-label": `Move ${e.type} block down`,
|
|
1355
|
-
children: /* @__PURE__ */ t(
|
|
1357
|
+
children: /* @__PURE__ */ t(oe, { size: 12 })
|
|
1356
1358
|
}
|
|
1357
1359
|
),
|
|
1358
1360
|
/* @__PURE__ */ t(
|
|
@@ -1364,7 +1366,7 @@ function on({ block: e, isSelected: n, onSelect: r, children: a }) {
|
|
|
1364
1366
|
className: "w-6 h-6 rounded bg-bg-2/80 border border-border-default backdrop-blur-sm flex items-center justify-center text-text-3 hover:text-text-0 hover:bg-bg-3 transition-colors",
|
|
1365
1367
|
title: "Duplicate",
|
|
1366
1368
|
"aria-label": `Duplicate ${e.type} block`,
|
|
1367
|
-
children: /* @__PURE__ */ t(
|
|
1369
|
+
children: /* @__PURE__ */ t(Ge, { size: 12 })
|
|
1368
1370
|
}
|
|
1369
1371
|
),
|
|
1370
1372
|
/* @__PURE__ */ t(
|
|
@@ -1384,7 +1386,7 @@ function on({ block: e, isSelected: n, onSelect: r, children: a }) {
|
|
|
1384
1386
|
className: "w-6 h-6 rounded bg-bg-2/80 border border-border-default backdrop-blur-sm flex items-center justify-center text-text-3 hover:text-status-red hover:bg-status-red/10 transition-colors",
|
|
1385
1387
|
title: "Delete",
|
|
1386
1388
|
"aria-label": `Delete ${e.type} block`,
|
|
1387
|
-
children: /* @__PURE__ */ t(
|
|
1389
|
+
children: /* @__PURE__ */ t(Ue, { size: 12 })
|
|
1388
1390
|
}
|
|
1389
1391
|
)
|
|
1390
1392
|
]
|
|
@@ -1410,7 +1412,9 @@ const A = [
|
|
|
1410
1412
|
description: "Full-width hero section with headline and CTAs",
|
|
1411
1413
|
category: "Hero",
|
|
1412
1414
|
variants: ["centered", "split", "gradient", "minimal"],
|
|
1413
|
-
|
|
1415
|
+
// badge:'' gives the normalizer a string contract for badge (renders only
|
|
1416
|
+
// when truthy → byte-identical output vs the key being absent) — ISS-005 review item 1.
|
|
1417
|
+
defaultProps: { badge: "", headline: "Your Headline Here", subheadline: "A compelling subheadline that explains your value proposition.", primaryCta: "Get Started", secondaryCta: "Learn More" }
|
|
1414
1418
|
},
|
|
1415
1419
|
{
|
|
1416
1420
|
type: "features",
|
|
@@ -1426,7 +1430,7 @@ const A = [
|
|
|
1426
1430
|
description: "Pricing tiers with feature comparison",
|
|
1427
1431
|
category: "Commerce",
|
|
1428
1432
|
variants: ["simple", "comparison"],
|
|
1429
|
-
defaultProps: { title: "Pricing", subtitle: "Choose the plan that fits your needs" }
|
|
1433
|
+
defaultProps: { title: "Pricing", subtitle: "Choose the plan that fits your needs", tiers: ct }
|
|
1430
1434
|
},
|
|
1431
1435
|
{
|
|
1432
1436
|
type: "cta",
|
|
@@ -1442,7 +1446,7 @@ const A = [
|
|
|
1442
1446
|
description: "Page footer with links and copyright",
|
|
1443
1447
|
category: "Navigation",
|
|
1444
1448
|
variants: ["simple", "multi-column", "minimal"],
|
|
1445
|
-
defaultProps: { logo: "Brand", copyright: "2026 Brand. All rights reserved.", links: ["Privacy", "Terms"] }
|
|
1449
|
+
defaultProps: { logo: "Brand", copyright: "2026 Brand. All rights reserved.", links: ["Privacy", "Terms"], columns: lt }
|
|
1446
1450
|
},
|
|
1447
1451
|
{
|
|
1448
1452
|
type: "testimonials",
|
|
@@ -1450,7 +1454,7 @@ const A = [
|
|
|
1450
1454
|
description: "Customer testimonials with quotes and ratings",
|
|
1451
1455
|
category: "Social Proof",
|
|
1452
1456
|
variants: ["cards", "carousel", "spotlight"],
|
|
1453
|
-
defaultProps: { title: "What our customers say" }
|
|
1457
|
+
defaultProps: { title: "What our customers say", items: ce }
|
|
1454
1458
|
},
|
|
1455
1459
|
{
|
|
1456
1460
|
type: "stats",
|
|
@@ -1458,7 +1462,7 @@ const A = [
|
|
|
1458
1462
|
description: "Key metrics and statistics display",
|
|
1459
1463
|
category: "Social Proof",
|
|
1460
1464
|
variants: ["grid", "bar", "counter"],
|
|
1461
|
-
defaultProps: { title: "By the numbers" }
|
|
1465
|
+
defaultProps: { title: "By the numbers", items: dt }
|
|
1462
1466
|
},
|
|
1463
1467
|
{
|
|
1464
1468
|
type: "faq",
|
|
@@ -1466,7 +1470,7 @@ const A = [
|
|
|
1466
1470
|
description: "Frequently asked questions accordion",
|
|
1467
1471
|
category: "Content",
|
|
1468
1472
|
variants: ["accordion"],
|
|
1469
|
-
defaultProps: { title: "Frequently Asked Questions" }
|
|
1473
|
+
defaultProps: { title: "Frequently Asked Questions", items: pt }
|
|
1470
1474
|
},
|
|
1471
1475
|
{
|
|
1472
1476
|
type: "team",
|
|
@@ -1474,7 +1478,7 @@ const A = [
|
|
|
1474
1478
|
description: "Team member grid with photos and roles",
|
|
1475
1479
|
category: "Content",
|
|
1476
1480
|
variants: ["grid"],
|
|
1477
|
-
defaultProps: { title: "Meet the Team" }
|
|
1481
|
+
defaultProps: { title: "Meet the Team", members: ut }
|
|
1478
1482
|
},
|
|
1479
1483
|
{
|
|
1480
1484
|
type: "contact",
|
|
@@ -1498,7 +1502,7 @@ const A = [
|
|
|
1498
1502
|
description: "Company logos with hover effects",
|
|
1499
1503
|
category: "Social Proof",
|
|
1500
1504
|
variants: ["default"],
|
|
1501
|
-
defaultProps: { title: "Trusted by leading companies" }
|
|
1505
|
+
defaultProps: { title: "Trusted by leading companies", logos: it }
|
|
1502
1506
|
},
|
|
1503
1507
|
{
|
|
1504
1508
|
type: "content",
|
|
@@ -1520,7 +1524,7 @@ Write your content here. Supports **bold**, *italic*, and lists.
|
|
|
1520
1524
|
description: "Image with text overlay or side-by-side layout",
|
|
1521
1525
|
category: "Media",
|
|
1522
1526
|
variants: ["hero-image", "side-by-side", "grid"],
|
|
1523
|
-
defaultProps: { title: "Visual Storytelling", subtitle: "A picture is worth a thousand words.", imageSide: "left" }
|
|
1527
|
+
defaultProps: { title: "Visual Storytelling", subtitle: "A picture is worth a thousand words.", imageSide: "left", images: gt }
|
|
1524
1528
|
},
|
|
1525
1529
|
{
|
|
1526
1530
|
type: "video",
|
|
@@ -1536,7 +1540,7 @@ Write your content here. Supports **bold**, *italic*, and lists.
|
|
|
1536
1540
|
description: "Image gallery in grid or masonry layout",
|
|
1537
1541
|
category: "Media",
|
|
1538
1542
|
variants: ["grid", "masonry"],
|
|
1539
|
-
defaultProps: { title: "Gallery" }
|
|
1543
|
+
defaultProps: { title: "Gallery", images: mt }
|
|
1540
1544
|
},
|
|
1541
1545
|
{
|
|
1542
1546
|
type: "divider",
|
|
@@ -1552,9 +1556,9 @@ Write your content here. Supports **bold**, *italic*, and lists.
|
|
|
1552
1556
|
description: "Announcement bar or ribbon",
|
|
1553
1557
|
category: "Content",
|
|
1554
1558
|
variants: ["ribbon", "bar"],
|
|
1555
|
-
defaultProps: { text: "New: We just launched v2.0!", linkText: "Learn more" }
|
|
1559
|
+
defaultProps: { text: "New: We just launched v2.0!", linkText: "Learn more", linkUrl: "#" }
|
|
1556
1560
|
}
|
|
1557
|
-
],
|
|
1561
|
+
], ko = [...new Set(A.map((e) => e.category))], j = {
|
|
1558
1562
|
bg0: "#09090b",
|
|
1559
1563
|
bg1: "#0f0f12",
|
|
1560
1564
|
bg2: "#18181b",
|
|
@@ -1575,7 +1579,7 @@ Write your content here. Supports **bold**, *italic*, and lists.
|
|
|
1575
1579
|
fontMono: "JetBrains Mono",
|
|
1576
1580
|
radius: 8,
|
|
1577
1581
|
radiusLg: 12
|
|
1578
|
-
},
|
|
1582
|
+
}, Y = [
|
|
1579
1583
|
{
|
|
1580
1584
|
id: "default",
|
|
1581
1585
|
name: "Dark Minimal",
|
|
@@ -1814,15 +1818,15 @@ Write your content here. Supports **bold**, *italic*, and lists.
|
|
|
1814
1818
|
}
|
|
1815
1819
|
}
|
|
1816
1820
|
];
|
|
1817
|
-
function
|
|
1821
|
+
function de(e) {
|
|
1818
1822
|
return e ? { ...j, ...e } : j;
|
|
1819
1823
|
}
|
|
1820
|
-
function
|
|
1824
|
+
function bt(e) {
|
|
1821
1825
|
const n = e.replace("#", ""), r = parseInt(n.slice(0, 2), 16), a = parseInt(n.slice(2, 4), 16), o = parseInt(n.slice(4, 6), 16);
|
|
1822
1826
|
return `${r}, ${a}, ${o}`;
|
|
1823
1827
|
}
|
|
1824
|
-
function
|
|
1825
|
-
const n =
|
|
1828
|
+
function fn(e) {
|
|
1829
|
+
const n = bt(e.accent);
|
|
1826
1830
|
return {
|
|
1827
1831
|
"--color-bg-0": e.bg0,
|
|
1828
1832
|
"--color-bg-1": e.bg1,
|
|
@@ -1849,7 +1853,7 @@ function sn(e) {
|
|
|
1849
1853
|
"--radius-lg": `${e.radiusLg}px`
|
|
1850
1854
|
};
|
|
1851
1855
|
}
|
|
1852
|
-
const
|
|
1856
|
+
const hn = [
|
|
1853
1857
|
"DM Sans",
|
|
1854
1858
|
"Inter",
|
|
1855
1859
|
"Space Grotesk",
|
|
@@ -1865,14 +1869,14 @@ const ln = [
|
|
|
1865
1869
|
"JetBrains Mono",
|
|
1866
1870
|
"Fira Code",
|
|
1867
1871
|
"Source Code Pro"
|
|
1868
|
-
],
|
|
1872
|
+
], vn = [
|
|
1869
1873
|
{
|
|
1870
1874
|
id: "1",
|
|
1871
1875
|
role: "agent",
|
|
1872
1876
|
text: "Hi! I can help you build and modify your site. Try asking me to add sections, change content, or tweak styles."
|
|
1873
1877
|
}
|
|
1874
1878
|
];
|
|
1875
|
-
function
|
|
1879
|
+
function yn() {
|
|
1876
1880
|
return /* @__PURE__ */ i("div", { className: "self-start flex gap-1 px-4 py-3 bg-green-glow rounded-xl rounded-bl-sm border border-green/10", children: [
|
|
1877
1881
|
[0, 1, 2].map((e) => /* @__PURE__ */ t(
|
|
1878
1882
|
"span",
|
|
@@ -1893,10 +1897,10 @@ function dn() {
|
|
|
1893
1897
|
` })
|
|
1894
1898
|
] });
|
|
1895
1899
|
}
|
|
1896
|
-
function
|
|
1900
|
+
function wn(e, n) {
|
|
1897
1901
|
const r = e.toLowerCase(), a = n.find((d) => d.type === "hero");
|
|
1898
1902
|
if (r.includes("change") && r.includes("headline") && a) {
|
|
1899
|
-
const p = (e.match(/["'](.+?)["']/) || e.match(/to\s+(.+)/i))?.[1]?.trim() || "Your New Headline",
|
|
1903
|
+
const p = (e.match(/["'](.+?)["']/) || e.match(/to\s+(.+)/i))?.[1]?.trim() || "Your New Headline", u = String(a.props.headline || "Build websites with JSON");
|
|
1900
1904
|
return {
|
|
1901
1905
|
id: `msg-${Date.now()}`,
|
|
1902
1906
|
role: "agent",
|
|
@@ -1906,40 +1910,42 @@ function pn(e, n) {
|
|
|
1906
1910
|
blockId: a.id,
|
|
1907
1911
|
propKey: "headline",
|
|
1908
1912
|
value: p,
|
|
1909
|
-
removed: [`"${
|
|
1913
|
+
removed: [`"${u}"`],
|
|
1910
1914
|
added: [`"${p}"`]
|
|
1911
1915
|
}
|
|
1912
1916
|
};
|
|
1913
1917
|
}
|
|
1914
1918
|
const o = r.match(/add\s+(?:a\s+)?(\w+)/);
|
|
1915
1919
|
if (o) {
|
|
1916
|
-
const d = o[1].replace(/s$/, ""), p = A.find((
|
|
1920
|
+
const d = o[1].replace(/s$/, ""), p = A.find((u) => u.type === d || u.label.toLowerCase().includes(d));
|
|
1917
1921
|
if (p)
|
|
1918
1922
|
return { action: "addBlock", block: {
|
|
1919
1923
|
id: `block-${Date.now()}`,
|
|
1920
1924
|
type: p.type,
|
|
1921
1925
|
variant: p.variants[0],
|
|
1922
|
-
|
|
1926
|
+
// ISS-005 review item 3: deep copy — defaultProps now hold shared array-of-object
|
|
1927
|
+
// constants; a shallow spread would let this block's edits mutate every future insert.
|
|
1928
|
+
props: structuredClone(p.defaultProps)
|
|
1923
1929
|
}, message: `Adding a ${p.label} block.` };
|
|
1924
1930
|
}
|
|
1925
1931
|
const s = r.match(/(?:remove|delete)\s+(?:the\s+)?(\w+)/);
|
|
1926
1932
|
if (s) {
|
|
1927
|
-
const d = s[1].replace(/s$/, ""), p = n.find((
|
|
1933
|
+
const d = s[1].replace(/s$/, ""), p = n.find((u) => u.type === d || u.type.includes(d));
|
|
1928
1934
|
if (p)
|
|
1929
1935
|
return { action: "removeBlock", blockId: p.id, message: `Removing the ${p.type} block.` };
|
|
1930
1936
|
}
|
|
1931
1937
|
const l = r.match(/(?:make|change|switch)\s+(?:the\s+)?(\w+)\s+(?:to\s+|a\s+)?(\w+)/);
|
|
1932
1938
|
if (l) {
|
|
1933
|
-
const d = l[1], p = l[2],
|
|
1934
|
-
if (
|
|
1935
|
-
const x = A.find((h) => h.type ===
|
|
1939
|
+
const d = l[1], p = l[2], u = n.find((f) => f.type === d || f.type.includes(d));
|
|
1940
|
+
if (u) {
|
|
1941
|
+
const x = A.find((h) => h.type === u.type)?.variants.find((h) => h.includes(p));
|
|
1936
1942
|
if (x)
|
|
1937
|
-
return { action: "changeVariant", blockId:
|
|
1943
|
+
return { action: "changeVariant", blockId: u.id, variant: x, message: `Changing ${u.type} to ${x} variant.` };
|
|
1938
1944
|
}
|
|
1939
1945
|
}
|
|
1940
1946
|
const c = r.match(/(?:make it|switch to|use|apply)\s+(?:the\s+)?(\w+)\s*(?:theme)?/);
|
|
1941
1947
|
if (c) {
|
|
1942
|
-
const d = c[1], p =
|
|
1948
|
+
const d = c[1], p = Y.find((u) => u.id.includes(d) || u.name.toLowerCase().includes(d));
|
|
1943
1949
|
if (p)
|
|
1944
1950
|
return { action: "changeTheme", themeId: p.id, message: `Switching to the ${p.name} theme.` };
|
|
1945
1951
|
}
|
|
@@ -1954,8 +1960,8 @@ function pn(e, n) {
|
|
|
1954
1960
|
- "Switch to midnight theme"`
|
|
1955
1961
|
};
|
|
1956
1962
|
}
|
|
1957
|
-
function
|
|
1958
|
-
const [e, n] = C(
|
|
1963
|
+
function No() {
|
|
1964
|
+
const [e, n] = C(vn), [r, a] = C(""), [o, s] = C(!1), l = v((b) => b.updateBlockProps), c = v((b) => b.addBlock), d = v((b) => b.removeBlock), p = v((b) => b.updateBlock), u = v((b) => b.setTheme), f = D(null);
|
|
1959
1965
|
I(() => {
|
|
1960
1966
|
f.current?.scrollIntoView({ behavior: "smooth" });
|
|
1961
1967
|
}, [e, o]);
|
|
@@ -1978,7 +1984,7 @@ function mo() {
|
|
|
1978
1984
|
if (!b) return;
|
|
1979
1985
|
const y = { id: `msg-${Date.now()}`, role: "user", text: b };
|
|
1980
1986
|
n(($) => [...$, y]), a(""), s(!0), setTimeout(() => {
|
|
1981
|
-
const $ = v.getState(),
|
|
1987
|
+
const $ = v.getState(), M = $.config.pages, R = M && M.length > 0 ? (M.find((O) => O.id === $.activePageId) ?? M[0]).blocks : $.config.blocks, T = wn(b, R);
|
|
1982
1988
|
if (s(!1), "action" in T) {
|
|
1983
1989
|
const O = { id: `msg-${Date.now()}`, role: "agent", text: T.message };
|
|
1984
1990
|
if (n((B) => [...B, O]), T.action === "addBlock")
|
|
@@ -1988,8 +1994,8 @@ function mo() {
|
|
|
1988
1994
|
else if (T.action === "changeVariant")
|
|
1989
1995
|
p(T.blockId, { variant: T.variant }), S(`Variant changed to ${T.variant}`);
|
|
1990
1996
|
else if (T.action === "changeTheme") {
|
|
1991
|
-
const B =
|
|
1992
|
-
B && (
|
|
1997
|
+
const B = Y.find((F) => F.id === T.themeId);
|
|
1998
|
+
B && (u(B.theme), S(`Theme changed to ${B.name}`));
|
|
1993
1999
|
}
|
|
1994
2000
|
} else
|
|
1995
2001
|
n((O) => [...O, T]);
|
|
@@ -2016,7 +2022,7 @@ function mo() {
|
|
|
2016
2022
|
onClick: () => x(b),
|
|
2017
2023
|
className: "px-1.5 py-0.5 rounded text-[9px] bg-green/20 text-green hover:bg-green/30 transition-colors flex items-center gap-0.5",
|
|
2018
2024
|
children: [
|
|
2019
|
-
/* @__PURE__ */ t(
|
|
2025
|
+
/* @__PURE__ */ t(ae, { size: 9 }),
|
|
2020
2026
|
" Apply"
|
|
2021
2027
|
]
|
|
2022
2028
|
}
|
|
@@ -2027,14 +2033,14 @@ function mo() {
|
|
|
2027
2033
|
onClick: () => h(b),
|
|
2028
2034
|
className: "px-1.5 py-0.5 rounded text-[9px] bg-status-red/10 text-status-red hover:bg-status-red/20 transition-colors flex items-center gap-0.5",
|
|
2029
2035
|
children: [
|
|
2030
|
-
/* @__PURE__ */ t(
|
|
2036
|
+
/* @__PURE__ */ t(ie, { size: 9 }),
|
|
2031
2037
|
" Reject"
|
|
2032
2038
|
]
|
|
2033
2039
|
}
|
|
2034
2040
|
)
|
|
2035
2041
|
] }),
|
|
2036
2042
|
b.applied && /* @__PURE__ */ i("span", { className: "text-[9px] text-green font-medium flex items-center gap-0.5", children: [
|
|
2037
|
-
/* @__PURE__ */ t(
|
|
2043
|
+
/* @__PURE__ */ t(ae, { size: 9 }),
|
|
2038
2044
|
" Applied"
|
|
2039
2045
|
] })
|
|
2040
2046
|
] }),
|
|
@@ -2052,7 +2058,7 @@ function mo() {
|
|
|
2052
2058
|
},
|
|
2053
2059
|
b.id
|
|
2054
2060
|
)),
|
|
2055
|
-
o && /* @__PURE__ */ t(
|
|
2061
|
+
o && /* @__PURE__ */ t(yn, {}),
|
|
2056
2062
|
/* @__PURE__ */ t("div", { ref: f })
|
|
2057
2063
|
] }),
|
|
2058
2064
|
/* @__PURE__ */ i("div", { className: "p-2.5 border-t border-border-default", children: [
|
|
@@ -2076,7 +2082,7 @@ function mo() {
|
|
|
2076
2082
|
onClick: w,
|
|
2077
2083
|
className: "w-9 h-9 rounded-lg bg-green flex items-center justify-center text-black shrink-0 hover:bg-green-dim transition-colors",
|
|
2078
2084
|
"aria-label": "Send message",
|
|
2079
|
-
children: /* @__PURE__ */ t(
|
|
2085
|
+
children: /* @__PURE__ */ t(Re, { size: 14 })
|
|
2080
2086
|
}
|
|
2081
2087
|
)
|
|
2082
2088
|
] }),
|
|
@@ -2092,7 +2098,7 @@ function mo() {
|
|
|
2092
2098
|
] })
|
|
2093
2099
|
] });
|
|
2094
2100
|
}
|
|
2095
|
-
function
|
|
2101
|
+
function kn() {
|
|
2096
2102
|
const e = v((a) => a.addBlock), n = P((a) => a.selectBlock);
|
|
2097
2103
|
function r() {
|
|
2098
2104
|
const a = A.find((s) => s.type === "hero"), o = {
|
|
@@ -2112,31 +2118,31 @@ function mn() {
|
|
|
2112
2118
|
onClick: r,
|
|
2113
2119
|
className: "px-3.5 py-1.5 rounded-md bg-green text-black text-[12.5px] font-semibold border border-green hover:bg-green-dim transition-colors flex items-center gap-1.5",
|
|
2114
2120
|
children: [
|
|
2115
|
-
/* @__PURE__ */ t(
|
|
2121
|
+
/* @__PURE__ */ t(le, { size: 14 }),
|
|
2116
2122
|
"Add Hero Block"
|
|
2117
2123
|
]
|
|
2118
2124
|
}
|
|
2119
2125
|
)
|
|
2120
2126
|
] });
|
|
2121
2127
|
}
|
|
2122
|
-
const
|
|
2123
|
-
function
|
|
2128
|
+
const Nn = /* @__PURE__ */ new Set(["DM Sans", "JetBrains Mono", "Space Grotesk"]), ue = /* @__PURE__ */ new Set();
|
|
2129
|
+
function Sn(e) {
|
|
2124
2130
|
return `https://fonts.googleapis.com/css2?family=${e.replace(/ /g, "+")}:wght@300;400;500;600;700&display=swap`;
|
|
2125
2131
|
}
|
|
2126
|
-
function
|
|
2132
|
+
function Cn(e) {
|
|
2127
2133
|
const n = D([]);
|
|
2128
2134
|
I(() => {
|
|
2129
2135
|
const r = [...new Set(e)].filter(
|
|
2130
|
-
(a) => a && !
|
|
2136
|
+
(a) => a && !Nn.has(a) && !ue.has(a)
|
|
2131
2137
|
);
|
|
2132
2138
|
if (r.length !== 0) {
|
|
2133
2139
|
for (const a of r) {
|
|
2134
2140
|
if (document.querySelector(`link[data-openpage-font="${a}"]`)) {
|
|
2135
|
-
|
|
2141
|
+
ue.add(a);
|
|
2136
2142
|
continue;
|
|
2137
2143
|
}
|
|
2138
2144
|
const o = document.createElement("link");
|
|
2139
|
-
o.rel = "stylesheet", o.href =
|
|
2145
|
+
o.rel = "stylesheet", o.href = Sn(a), o.setAttribute("data-openpage-font", a), document.head.appendChild(o), ue.add(a), document.fonts.load(`16px "${a}"`).catch(() => {
|
|
2140
2146
|
});
|
|
2141
2147
|
}
|
|
2142
2148
|
return n.current = e, () => {
|
|
@@ -2144,15 +2150,15 @@ function xn(e) {
|
|
|
2144
2150
|
}
|
|
2145
2151
|
}, [e.join(",")]);
|
|
2146
2152
|
}
|
|
2147
|
-
function
|
|
2153
|
+
function $n() {
|
|
2148
2154
|
const e = v((p) => {
|
|
2149
|
-
const
|
|
2150
|
-
return !
|
|
2151
|
-
}), n = v((p) => p.config.theme), { selectedBlockId: r, selectBlock: a, viewport: o } = P(), s =
|
|
2152
|
-
|
|
2155
|
+
const u = p.config.pages;
|
|
2156
|
+
return !u || u.length === 0 ? p.config.blocks : (u.find((x) => x.id === p.activePageId) ?? u[0]).blocks;
|
|
2157
|
+
}), n = v((p) => p.config.theme), { selectedBlockId: r, selectBlock: a, viewport: o } = P(), s = W(() => de(n), [n]), l = W(() => fn(s), [s]);
|
|
2158
|
+
Cn([s.fontSans, s.fontDisplay, s.fontMono]);
|
|
2153
2159
|
const c = o === "desktop" ? "880px" : o === "tablet" ? "768px" : "375px";
|
|
2154
2160
|
if (e.length === 0)
|
|
2155
|
-
return /* @__PURE__ */ t(
|
|
2161
|
+
return /* @__PURE__ */ t(kn, {});
|
|
2156
2162
|
const d = /* @__PURE__ */ t(
|
|
2157
2163
|
"div",
|
|
2158
2164
|
{
|
|
@@ -2164,12 +2170,12 @@ function bn() {
|
|
|
2164
2170
|
role: "region",
|
|
2165
2171
|
"aria-label": `Site preview, ${e.length} blocks, ${o} viewport`,
|
|
2166
2172
|
children: e.map((p) => /* @__PURE__ */ t(
|
|
2167
|
-
|
|
2173
|
+
bn,
|
|
2168
2174
|
{
|
|
2169
2175
|
block: p,
|
|
2170
2176
|
isSelected: r === p.id,
|
|
2171
2177
|
onSelect: () => a(p.id),
|
|
2172
|
-
children: /* @__PURE__ */ t(
|
|
2178
|
+
children: /* @__PURE__ */ t(mn, { block: p })
|
|
2173
2179
|
},
|
|
2174
2180
|
p.id
|
|
2175
2181
|
))
|
|
@@ -2193,20 +2199,20 @@ function bn() {
|
|
|
2193
2199
|
] }) }) : d
|
|
2194
2200
|
] });
|
|
2195
2201
|
}
|
|
2196
|
-
function
|
|
2202
|
+
function m(e) {
|
|
2197
2203
|
return String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2198
2204
|
}
|
|
2199
2205
|
function z(e, n, r) {
|
|
2200
|
-
const a = r ? ` class="${
|
|
2201
|
-
return n && n.trim() ? `<a href="${
|
|
2206
|
+
const a = r ? ` class="${m(r)}"` : "", o = m(e);
|
|
2207
|
+
return n && n.trim() ? `<a href="${m(n)}"${a}>${o}</a>` : `<span${a}>${o}</span>`;
|
|
2202
2208
|
}
|
|
2203
|
-
function
|
|
2209
|
+
function Pn(e) {
|
|
2204
2210
|
return `https://fonts.googleapis.com/css2?${[...new Set(e.filter(Boolean))].map(
|
|
2205
2211
|
(a) => `family=${a.replace(/ /g, "+")}:wght@300;400;500;600;700`
|
|
2206
2212
|
).join("&")}&display=swap`;
|
|
2207
2213
|
}
|
|
2208
|
-
function
|
|
2209
|
-
return
|
|
2214
|
+
function ft(e) {
|
|
2215
|
+
return m(
|
|
2210
2216
|
e.split(" ").map((n) => n[0]).join("")
|
|
2211
2217
|
);
|
|
2212
2218
|
}
|
|
@@ -2214,30 +2220,30 @@ function g(e, n, r) {
|
|
|
2214
2220
|
const a = e[n];
|
|
2215
2221
|
return a ?? r;
|
|
2216
2222
|
}
|
|
2217
|
-
function
|
|
2223
|
+
function Tn(e) {
|
|
2218
2224
|
const n = (e || "").toLowerCase().trim();
|
|
2219
2225
|
return !n || n === "english" || n.startsWith("en") ? "en" : n === "german" || n.startsWith("de") ? "de" : n === "spanish" || n.startsWith("es") ? "es" : n === "french" || n.startsWith("fr") ? "fr" : "en";
|
|
2220
2226
|
}
|
|
2221
|
-
const
|
|
2222
|
-
function
|
|
2223
|
-
return `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="16" height="16" rx="4" stroke="currentColor" stroke-width="1.5"/><text x="9" y="13" text-anchor="middle" fill="currentColor" font-size="10" font-weight="600" font-family="system-ui, sans-serif">${
|
|
2227
|
+
const ht = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', In = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>', jn = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/></svg>', Te = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3-1.9 5.8a2 2 0 0 1-1.3 1.3L3 12l5.8 1.9a2 2 0 0 1 1.3 1.3L12 21l1.9-5.8a2 2 0 0 1 1.3-1.3L21 12l-5.8-1.9a2 2 0 0 1-1.3-1.3Z"/></svg>', An = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>', Dn = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>', Bn = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V21"/><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3"/></svg>', Ln = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/></svg>', Mn = '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></svg>', On = '<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>';
|
|
2228
|
+
function vt(e) {
|
|
2229
|
+
return `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="16" height="16" rx="4" stroke="currentColor" stroke-width="1.5"/><text x="9" y="13" text-anchor="middle" fill="currentColor" font-size="10" font-weight="600" font-family="system-ui, sans-serif">${m(e.charAt(0).toUpperCase())}</text></svg>`;
|
|
2224
2230
|
}
|
|
2225
|
-
function
|
|
2231
|
+
function Fn(e) {
|
|
2226
2232
|
return `<div class="flex gap-0.5">${[1, 2, 3, 4, 5].map(
|
|
2227
|
-
(r) => r <= e ? `<span class="text-yellow-400">${
|
|
2233
|
+
(r) => r <= e ? `<span class="text-yellow-400">${An}</span>` : `<span class="text-text-3">${Dn}</span>`
|
|
2228
2234
|
).join("")}</div>`;
|
|
2229
2235
|
}
|
|
2230
|
-
function
|
|
2231
|
-
return `<svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="26" height="26" rx="6" fill="none" stroke="currentColor" stroke-width="1.5"/><text x="14" y="18" text-anchor="middle" fill="currentColor" font-size="14" font-weight="700" font-family="system-ui, sans-serif">${
|
|
2236
|
+
function En(e) {
|
|
2237
|
+
return `<svg width="28" height="28" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="26" height="26" rx="6" fill="none" stroke="currentColor" stroke-width="1.5"/><text x="14" y="18" text-anchor="middle" fill="currentColor" font-size="14" font-weight="700" font-family="system-ui, sans-serif">${m(e.charAt(0).toUpperCase())}</text></svg>`;
|
|
2232
2238
|
}
|
|
2233
|
-
function
|
|
2234
|
-
const n =
|
|
2235
|
-
(c) => ` <span class="text-[13px] text-text-2 hover:text-text-0 transition-colors cursor-pointer">${
|
|
2239
|
+
function Hn(e) {
|
|
2240
|
+
const n = m(g(e.props, "logo", "Brand")), r = g(e.props, "logoImage", ""), a = g(e.props, "links", []), o = m(g(e.props, "ctaText", "Get Started")), s = a.map((c) => typeof c == "string" ? c : c?.label ?? c?.text ?? "").filter(Boolean).map(
|
|
2241
|
+
(c) => ` <span class="text-[13px] text-text-2 hover:text-text-0 transition-colors cursor-pointer">${m(c)}</span>`
|
|
2236
2242
|
).join(`
|
|
2237
2243
|
`);
|
|
2238
2244
|
return ` <nav class="px-6 md:px-10 py-4 flex items-center justify-between">
|
|
2239
2245
|
<div class="flex items-center gap-2">
|
|
2240
|
-
${r ? `<img src="${
|
|
2246
|
+
${r ? `<img src="${m(r)}" alt="${n}" class="h-8 w-auto object-contain" />` : '<div class="w-8 h-8 rounded-lg bg-green/10 flex items-center justify-center"><div class="w-4 h-4 rounded-full bg-green"></div></div>'}
|
|
2241
2247
|
<span class="font-semibold text-[15px] text-text-0 tracking-tight">${n}</span>
|
|
2242
2248
|
</div>
|
|
2243
2249
|
<div class="hidden lg:flex items-center gap-6">
|
|
@@ -2246,15 +2252,15 @@ ${s}
|
|
|
2246
2252
|
<div class="flex items-center gap-3">
|
|
2247
2253
|
<button class="px-4 py-2 rounded-lg bg-green text-black text-[13px] font-semibold hover:bg-green-dim transition-colors">${o}</button>
|
|
2248
2254
|
<button class="lg:hidden w-9 h-9 rounded-lg border border-border-default flex items-center justify-center text-text-2 hover:text-text-0 hover:bg-bg-3 transition-colors">
|
|
2249
|
-
${
|
|
2255
|
+
${jn}
|
|
2250
2256
|
</button>
|
|
2251
2257
|
</div>
|
|
2252
2258
|
</nav>`;
|
|
2253
2259
|
}
|
|
2254
|
-
function
|
|
2255
|
-
const n = g(e.props, "badge", ""), r =
|
|
2256
|
-
${
|
|
2257
|
-
${
|
|
2260
|
+
function zn(e) {
|
|
2261
|
+
const n = g(e.props, "badge", ""), r = m(g(e.props, "headline", "")), a = m(g(e.props, "subheadline", "")), o = g(e.props, "primaryCta", ""), s = g(e.props, "primaryCtaUrl", ""), l = g(e.props, "secondaryCta", ""), c = g(e.props, "secondaryCtaUrl", ""), d = n ? ` <div class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green/10 border border-green/20 text-green text-[11px] font-medium mb-6">
|
|
2262
|
+
${Te}
|
|
2263
|
+
${m(n)}
|
|
2258
2264
|
</div>` : "", p = l ? ` ${z(l, c, "px-6 py-3 rounded-lg bg-bg-3 text-text-0 text-sm font-medium border border-border-default hover:bg-bg-4 hover:border-border-hover transition-all inline-block")}` : "";
|
|
2259
2265
|
return ` <section class="px-6 md:px-10 py-20 md:py-28 text-center">
|
|
2260
2266
|
${d}
|
|
@@ -2266,11 +2272,11 @@ ${p}
|
|
|
2266
2272
|
</div>
|
|
2267
2273
|
</section>`;
|
|
2268
2274
|
}
|
|
2269
|
-
function
|
|
2270
|
-
const n = g(e.props, "badge", ""), r =
|
|
2271
|
-
${
|
|
2272
|
-
${
|
|
2273
|
-
</div>` : "",
|
|
2275
|
+
function Rn(e) {
|
|
2276
|
+
const n = g(e.props, "badge", ""), r = m(g(e.props, "headline", "")), a = m(g(e.props, "subheadline", "")), o = g(e.props, "primaryCta", ""), s = g(e.props, "primaryCtaUrl", ""), l = g(e.props, "secondaryCta", ""), c = g(e.props, "secondaryCtaUrl", ""), d = g(e.props, "heroImage", ""), p = n ? ` <div class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green/10 border border-green/20 text-green text-[11px] font-medium mb-4">
|
|
2277
|
+
${Te}
|
|
2278
|
+
${m(n)}
|
|
2279
|
+
</div>` : "", u = l ? ` ${z(l, c, "px-6 py-3 rounded-lg bg-bg-3 text-text-0 text-sm font-medium border border-border-default hover:bg-bg-4 transition-all inline-block")}` : "", f = d ? ` <img src="${m(d)}" alt="" class="absolute inset-0 w-full h-full object-cover" />` : ` <div class="absolute inset-0 bg-gradient-to-br from-green/5 to-transparent"></div>
|
|
2274
2280
|
<div class="absolute inset-6 border border-dashed border-border-default rounded-lg flex items-center justify-center text-text-3 text-sm">Preview</div>`;
|
|
2275
2281
|
return ` <section class="px-6 md:px-10 py-16 md:py-24 flex flex-col lg:flex-row items-center gap-10">
|
|
2276
2282
|
<div class="flex-1">
|
|
@@ -2279,7 +2285,7 @@ ${p}
|
|
|
2279
2285
|
<p class="text-text-2 text-base leading-relaxed mb-6 max-w-lg">${a}</p>
|
|
2280
2286
|
<div class="flex flex-wrap items-center gap-3">
|
|
2281
2287
|
${z(o, s, "px-6 py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all inline-flex items-center gap-2")}
|
|
2282
|
-
${
|
|
2288
|
+
${u}
|
|
2283
2289
|
</div>
|
|
2284
2290
|
</div>
|
|
2285
2291
|
<div class="flex-1 w-full">
|
|
@@ -2289,10 +2295,10 @@ ${f}
|
|
|
2289
2295
|
</div>
|
|
2290
2296
|
</section>`;
|
|
2291
2297
|
}
|
|
2292
|
-
function
|
|
2293
|
-
const n = g(e.props, "badge", ""), r =
|
|
2294
|
-
${
|
|
2295
|
-
${
|
|
2298
|
+
function Gn(e) {
|
|
2299
|
+
const n = g(e.props, "badge", ""), r = m(g(e.props, "headline", "")), a = m(g(e.props, "subheadline", "")), o = g(e.props, "primaryCta", ""), s = g(e.props, "primaryCtaUrl", ""), l = g(e.props, "secondaryCta", ""), c = g(e.props, "secondaryCtaUrl", ""), d = n ? ` <div class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-green/10 border border-green/20 text-green text-[11px] font-medium mb-6">
|
|
2300
|
+
${Te}
|
|
2301
|
+
${m(n)}
|
|
2296
2302
|
</div>` : "", p = l ? ` ${z(l, c, "px-6 py-3 rounded-lg bg-bg-3 text-text-0 text-sm font-medium border border-border-default hover:bg-bg-4 transition-all inline-block")}` : "";
|
|
2297
2303
|
return ` <section class="px-6 md:px-10 py-20 md:py-32 text-center relative overflow-hidden">
|
|
2298
2304
|
<div class="absolute inset-0 bg-gradient-to-b from-green/5 via-transparent to-transparent pointer-events-none"></div>
|
|
@@ -2308,28 +2314,28 @@ ${p}
|
|
|
2308
2314
|
</div>
|
|
2309
2315
|
</section>`;
|
|
2310
2316
|
}
|
|
2311
|
-
function
|
|
2317
|
+
function Un(e) {
|
|
2312
2318
|
switch (e.variant) {
|
|
2313
2319
|
case "split":
|
|
2314
|
-
return
|
|
2320
|
+
return Rn(e);
|
|
2315
2321
|
case "gradient":
|
|
2316
|
-
return
|
|
2322
|
+
return Gn(e);
|
|
2317
2323
|
default:
|
|
2318
|
-
return
|
|
2324
|
+
return zn(e);
|
|
2319
2325
|
}
|
|
2320
2326
|
}
|
|
2321
|
-
function
|
|
2322
|
-
const n = g(e.props, "label", ""), r =
|
|
2327
|
+
function qn(e) {
|
|
2328
|
+
const n = g(e.props, "label", ""), r = m(g(e.props, "title", "")), a = g(e.props, "subtitle", ""), o = g(
|
|
2323
2329
|
e.props,
|
|
2324
2330
|
"items",
|
|
2325
2331
|
[]
|
|
2326
|
-
), s = n ? ` <div class="text-[11px] font-semibold uppercase tracking-widest text-green mb-2">${
|
|
2332
|
+
), s = n ? ` <div class="text-[11px] font-semibold uppercase tracking-widest text-green mb-2">${m(n)}</div>` : "", l = a ? ` <p class="text-text-2 text-sm max-w-lg mx-auto">${m(a)}</p>` : "", c = o.map(
|
|
2327
2333
|
(d) => ` <div class="group bg-bg-2 border border-border-default rounded-xl p-5 transition-all hover:-translate-y-0.5 hover:border-border-hover hover:shadow-[0_8px_24px_rgba(0,0,0,0.2)]">
|
|
2328
2334
|
<div class="w-10 h-10 rounded-lg bg-green/10 border border-green/20 flex items-center justify-center text-green mb-3">
|
|
2329
|
-
${
|
|
2335
|
+
${vt(d.icon || "Z")}
|
|
2330
2336
|
</div>
|
|
2331
|
-
<h3 class="text-sm font-semibold mb-1">${
|
|
2332
|
-
<p class="text-[12.5px] text-text-2 leading-relaxed">${
|
|
2337
|
+
<h3 class="text-sm font-semibold mb-1">${m(d.title)}</h3>
|
|
2338
|
+
<p class="text-[12.5px] text-text-2 leading-relaxed">${m(d.description)}</p>
|
|
2333
2339
|
</div>`
|
|
2334
2340
|
).join(`
|
|
2335
2341
|
`);
|
|
@@ -2344,19 +2350,19 @@ ${c}
|
|
|
2344
2350
|
</div>
|
|
2345
2351
|
</section>`;
|
|
2346
2352
|
}
|
|
2347
|
-
function
|
|
2348
|
-
const n = g(e.props, "label", ""), r =
|
|
2353
|
+
function _n(e) {
|
|
2354
|
+
const n = g(e.props, "label", ""), r = m(g(e.props, "title", "")), a = g(e.props, "subtitle", ""), o = g(
|
|
2349
2355
|
e.props,
|
|
2350
2356
|
"items",
|
|
2351
2357
|
[]
|
|
2352
|
-
), s = n ? ` <div class="text-[11px] font-semibold uppercase tracking-widest text-green mb-2">${
|
|
2358
|
+
), s = n ? ` <div class="text-[11px] font-semibold uppercase tracking-widest text-green mb-2">${m(n)}</div>` : "", l = a ? ` <p class="text-text-2 text-sm max-w-lg mx-auto">${m(a)}</p>` : "", c = o.map(
|
|
2353
2359
|
(d) => ` <div class="flex gap-4 p-4 rounded-xl bg-bg-2 border border-border-default transition-all hover:border-border-hover">
|
|
2354
2360
|
<div class="w-10 h-10 rounded-lg bg-green/10 border border-green/20 flex items-center justify-center text-green shrink-0">
|
|
2355
|
-
${
|
|
2361
|
+
${vt(d.icon || "Z")}
|
|
2356
2362
|
</div>
|
|
2357
2363
|
<div>
|
|
2358
|
-
<h3 class="text-sm font-semibold mb-0.5">${
|
|
2359
|
-
<p class="text-[12.5px] text-text-2 leading-relaxed">${
|
|
2364
|
+
<h3 class="text-sm font-semibold mb-0.5">${m(d.title)}</h3>
|
|
2365
|
+
<p class="text-[12.5px] text-text-2 leading-relaxed">${m(d.description)}</p>
|
|
2360
2366
|
</div>
|
|
2361
2367
|
</div>`
|
|
2362
2368
|
).join(`
|
|
@@ -2372,10 +2378,10 @@ ${c}
|
|
|
2372
2378
|
</div>
|
|
2373
2379
|
</section>`;
|
|
2374
2380
|
}
|
|
2375
|
-
function
|
|
2376
|
-
return e.variant === "list" ?
|
|
2381
|
+
function Jn(e) {
|
|
2382
|
+
return e.variant === "list" ? _n(e) : qn(e);
|
|
2377
2383
|
}
|
|
2378
|
-
const
|
|
2384
|
+
const yt = [
|
|
2379
2385
|
{
|
|
2380
2386
|
name: "Starter",
|
|
2381
2387
|
price: "$0",
|
|
@@ -2415,32 +2421,32 @@ const ct = [
|
|
|
2415
2421
|
cta: "Contact Sales"
|
|
2416
2422
|
}
|
|
2417
2423
|
];
|
|
2418
|
-
function
|
|
2419
|
-
const n =
|
|
2424
|
+
function Vn(e) {
|
|
2425
|
+
const n = m(g(e.props, "title", "")), r = g(e.props, "subtitle", ""), a = g(e.props, "tiers", yt), o = r ? ` <p class="text-text-2 text-sm max-w-lg mx-auto">${m(r)}</p>` : "", s = a.map((l) => {
|
|
2420
2426
|
const c = l.featured ? "bg-bg-2 border-2 border-green" : "bg-bg-2 border border-border-default hover:border-border-hover", d = l.featured ? ` <div class="absolute -top-3 left-1/2 -translate-x-1/2 px-3 py-0.5 rounded-full bg-green text-black text-[10px] font-bold uppercase tracking-wider flex items-center gap-1">
|
|
2421
|
-
${
|
|
2427
|
+
${On}
|
|
2422
2428
|
Recommended
|
|
2423
|
-
</div>` : "", p = l.featured ? "w-full py-2.5 rounded-lg text-sm font-semibold transition-all bg-green text-black hover:bg-green-dim" : "w-full py-2.5 rounded-lg text-sm font-semibold transition-all bg-bg-3 text-text-0 border border-border-default hover:bg-bg-4 hover:border-border-hover",
|
|
2429
|
+
</div>` : "", p = l.featured ? "w-full py-2.5 rounded-lg text-sm font-semibold transition-all bg-green text-black hover:bg-green-dim" : "w-full py-2.5 rounded-lg text-sm font-semibold transition-all bg-bg-3 text-text-0 border border-border-default hover:bg-bg-4 hover:border-border-hover", u = l.features.map(
|
|
2424
2430
|
(h) => ` <li class="flex items-start gap-2 text-[12.5px] text-text-1">
|
|
2425
|
-
<span class="text-green shrink-0 mt-0.5">${
|
|
2426
|
-
${
|
|
2431
|
+
<span class="text-green shrink-0 mt-0.5">${ht}</span>
|
|
2432
|
+
${m(h)}
|
|
2427
2433
|
</li>`
|
|
2428
2434
|
).join(`
|
|
2429
|
-
`), f = l.period ? `<span class="text-text-3 text-sm">${
|
|
2435
|
+
`), f = l.period ? `<span class="text-text-3 text-sm">${m(l.period)}</span>` : "", x = l.description ? ` <p class="text-[11px] text-text-3">${m(l.description)}</p>` : "";
|
|
2430
2436
|
return ` <div class="relative rounded-xl p-6 flex flex-col transition-all ${c}">
|
|
2431
2437
|
${d}
|
|
2432
2438
|
<div class="mb-4">
|
|
2433
|
-
<h3 class="text-sm font-semibold mb-1">${
|
|
2439
|
+
<h3 class="text-sm font-semibold mb-1">${m(l.name)}</h3>
|
|
2434
2440
|
${x}
|
|
2435
2441
|
</div>
|
|
2436
2442
|
<div class="mb-4">
|
|
2437
|
-
<span class="text-3xl font-bold tracking-tight">${
|
|
2443
|
+
<span class="text-3xl font-bold tracking-tight">${m(l.price)}</span>
|
|
2438
2444
|
${f}
|
|
2439
2445
|
</div>
|
|
2440
2446
|
<ul class="space-y-2 mb-6 flex-1">
|
|
2441
|
-
${
|
|
2447
|
+
${u}
|
|
2442
2448
|
</ul>
|
|
2443
|
-
<button class="${p}">${
|
|
2449
|
+
<button class="${p}">${m(l.cta)}</button>
|
|
2444
2450
|
</div>`;
|
|
2445
2451
|
}).join(`
|
|
2446
2452
|
`);
|
|
@@ -2454,16 +2460,16 @@ ${s}
|
|
|
2454
2460
|
</div>
|
|
2455
2461
|
</section>`;
|
|
2456
2462
|
}
|
|
2457
|
-
function
|
|
2458
|
-
const n =
|
|
2459
|
-
${
|
|
2460
|
-
<div class="text-lg font-bold mt-0.5">${
|
|
2463
|
+
function Wn(e) {
|
|
2464
|
+
const n = m(g(e.props, "title", "")), r = g(e.props, "subtitle", ""), a = g(e.props, "tiers", yt), o = [...new Set(a.flatMap((d) => d.features))], s = r ? ` <p class="text-text-2 text-sm max-w-lg mx-auto">${m(r)}</p>` : "", l = a.map((d) => ` <th class="py-3 px-3 text-center font-semibold ${d.featured ? "text-green" : "text-text-0"}">
|
|
2465
|
+
${m(d.name)}
|
|
2466
|
+
<div class="text-lg font-bold mt-0.5">${m(d.price)}</div>
|
|
2461
2467
|
</th>`).join(`
|
|
2462
2468
|
`), c = o.map((d) => {
|
|
2463
|
-
const p = a.map((
|
|
2469
|
+
const p = a.map((u) => u.features.includes(d) ? ` <td class="py-2.5 px-3 text-center"><span class="text-green inline-block">${ht}</span></td>` : ' <td class="py-2.5 px-3 text-center text-text-3">-</td>').join(`
|
|
2464
2470
|
`);
|
|
2465
2471
|
return ` <tr class="border-b border-border-subtle">
|
|
2466
|
-
<td class="py-2.5 px-3 text-text-1">${
|
|
2472
|
+
<td class="py-2.5 px-3 text-text-1">${m(d)}</td>
|
|
2467
2473
|
${p}
|
|
2468
2474
|
</tr>`;
|
|
2469
2475
|
}).join(`
|
|
@@ -2488,11 +2494,11 @@ ${c}
|
|
|
2488
2494
|
</div>
|
|
2489
2495
|
</section>`;
|
|
2490
2496
|
}
|
|
2491
|
-
function
|
|
2492
|
-
return e.variant === "comparison" ?
|
|
2497
|
+
function Kn(e) {
|
|
2498
|
+
return e.variant === "comparison" ? Wn(e) : Vn(e);
|
|
2493
2499
|
}
|
|
2494
|
-
function
|
|
2495
|
-
const n =
|
|
2500
|
+
function Yn(e) {
|
|
2501
|
+
const n = m(g(e.props, "headline", "")), r = g(e.props, "subheadline", ""), a = g(e.props, "buttonText", ""), o = g(e.props, "buttonUrl", ""), s = r ? ` <p class="text-text-2 text-sm mb-6 max-w-md mx-auto">${m(r)}</p>` : "";
|
|
2496
2502
|
return ` <section class="px-6 md:px-10 py-16 md:py-20 text-center relative overflow-hidden">
|
|
2497
2503
|
<div class="absolute inset-0 bg-gradient-to-b from-green/[0.06] via-green/[0.03] to-transparent pointer-events-none"></div>
|
|
2498
2504
|
<div class="relative z-10">
|
|
@@ -2502,8 +2508,8 @@ ${s}
|
|
|
2502
2508
|
</div>
|
|
2503
2509
|
</section>`;
|
|
2504
2510
|
}
|
|
2505
|
-
function
|
|
2506
|
-
const n =
|
|
2511
|
+
function Zn(e) {
|
|
2512
|
+
const n = m(g(e.props, "headline", "")), r = g(e.props, "subheadline", ""), a = g(e.props, "buttonText", ""), o = g(e.props, "buttonUrl", ""), s = r ? ` <p class="text-text-2 text-sm">${m(r)}</p>` : "";
|
|
2507
2513
|
return ` <section class="px-6 md:px-10 py-12 md:py-16">
|
|
2508
2514
|
<div class="flex flex-col md:flex-row items-center justify-between gap-6 p-8 rounded-xl bg-bg-2 border border-border-default relative overflow-hidden">
|
|
2509
2515
|
<div class="absolute inset-0 bg-gradient-to-r from-green/5 to-transparent pointer-events-none"></div>
|
|
@@ -2515,18 +2521,18 @@ ${s}
|
|
|
2515
2521
|
</div>
|
|
2516
2522
|
</section>`;
|
|
2517
2523
|
}
|
|
2518
|
-
function
|
|
2519
|
-
return e.variant === "split" ?
|
|
2524
|
+
function Qn(e) {
|
|
2525
|
+
return e.variant === "split" ? Zn(e) : Yn(e);
|
|
2520
2526
|
}
|
|
2521
|
-
function
|
|
2522
|
-
const n =
|
|
2523
|
-
(c) => ` <span class="text-[12px] text-text-3 hover:text-text-1 transition-colors cursor-pointer">${
|
|
2527
|
+
function Xn(e) {
|
|
2528
|
+
const n = m(g(e.props, "logo", "Brand")), r = g(e.props, "logoImage", ""), a = m(g(e.props, "copyright", "")), s = g(e.props, "links", []).map(
|
|
2529
|
+
(c) => ` <span class="text-[12px] text-text-3 hover:text-text-1 transition-colors cursor-pointer">${m(c)}</span>`
|
|
2524
2530
|
).join(`
|
|
2525
2531
|
`);
|
|
2526
2532
|
return ` <footer class="px-6 md:px-10 py-8 border-t border-border-subtle">
|
|
2527
2533
|
<div class="flex flex-col md:flex-row items-center justify-between gap-4">
|
|
2528
2534
|
<div class="flex items-center gap-2">
|
|
2529
|
-
${r ? `<img src="${
|
|
2535
|
+
${r ? `<img src="${m(r)}" alt="${n}" class="h-6 w-auto object-contain" />` : '<div class="w-6 h-6 rounded-md bg-green/10 flex items-center justify-center"><div class="w-3 h-3 rounded-full bg-green"></div></div>'}
|
|
2530
2536
|
<span class="text-sm font-semibold text-text-1">${n}</span>
|
|
2531
2537
|
</div>
|
|
2532
2538
|
<div class="flex items-center gap-4">
|
|
@@ -2536,8 +2542,8 @@ ${s}
|
|
|
2536
2542
|
</div>
|
|
2537
2543
|
</footer>`;
|
|
2538
2544
|
}
|
|
2539
|
-
function
|
|
2540
|
-
const n =
|
|
2545
|
+
function ea(e) {
|
|
2546
|
+
const n = m(g(e.props, "logo", "Brand")), r = g(e.props, "logoImage", ""), a = m(g(e.props, "copyright", "")), o = g(e.props, "links", []), l = g(
|
|
2541
2547
|
e.props,
|
|
2542
2548
|
"columns",
|
|
2543
2549
|
[
|
|
@@ -2550,26 +2556,26 @@ function qn(e) {
|
|
|
2550
2556
|
{ title: "Legal", links: ["Privacy", "Terms", "Security", "Cookie Policy"] }
|
|
2551
2557
|
]
|
|
2552
2558
|
).map((p) => {
|
|
2553
|
-
const
|
|
2554
|
-
(f) => ` <li><span class="text-[12.5px] text-text-3 hover:text-text-1 transition-colors cursor-pointer">${
|
|
2559
|
+
const u = p.links.map(
|
|
2560
|
+
(f) => ` <li><span class="text-[12.5px] text-text-3 hover:text-text-1 transition-colors cursor-pointer">${m(f)}</span></li>`
|
|
2555
2561
|
).join(`
|
|
2556
2562
|
`);
|
|
2557
2563
|
return ` <div>
|
|
2558
|
-
<h4 class="text-[11px] font-semibold uppercase tracking-wider text-text-2 mb-3">${
|
|
2564
|
+
<h4 class="text-[11px] font-semibold uppercase tracking-wider text-text-2 mb-3">${m(p.title)}</h4>
|
|
2559
2565
|
<ul class="space-y-2">
|
|
2560
|
-
${
|
|
2566
|
+
${u}
|
|
2561
2567
|
</ul>
|
|
2562
2568
|
</div>`;
|
|
2563
2569
|
}).join(`
|
|
2564
2570
|
`), c = o.map(
|
|
2565
|
-
(p) => ` <span class="text-[11px] text-text-3 hover:text-text-1 transition-colors cursor-pointer">${
|
|
2571
|
+
(p) => ` <span class="text-[11px] text-text-3 hover:text-text-1 transition-colors cursor-pointer">${m(p)}</span>`
|
|
2566
2572
|
).join(`
|
|
2567
2573
|
`);
|
|
2568
2574
|
return ` <footer class="px-6 md:px-10 py-12 border-t border-border-subtle">
|
|
2569
2575
|
<div class="grid grid-cols-2 lg:grid-cols-5 gap-8 mb-10">
|
|
2570
2576
|
<div class="col-span-2 lg:col-span-1">
|
|
2571
2577
|
<div class="flex items-center gap-2 mb-3">
|
|
2572
|
-
${r ? `<img src="${
|
|
2578
|
+
${r ? `<img src="${m(r)}" alt="${n}" class="h-7 w-auto object-contain" />` : '<div class="w-7 h-7 rounded-md bg-green/10 flex items-center justify-center"><div class="w-3.5 h-3.5 rounded-full bg-green"></div></div>'}
|
|
2573
2579
|
<span class="text-sm font-semibold">${n}</span>
|
|
2574
2580
|
</div>
|
|
2575
2581
|
<p class="text-[12px] text-text-3 leading-relaxed max-w-[200px]">Build beautiful websites with structured JSON config.</p>
|
|
@@ -2584,10 +2590,10 @@ ${c}
|
|
|
2584
2590
|
</div>
|
|
2585
2591
|
</footer>`;
|
|
2586
2592
|
}
|
|
2587
|
-
function
|
|
2588
|
-
const n =
|
|
2593
|
+
function ta(e) {
|
|
2594
|
+
const n = m(g(e.props, "copyright", "")), r = g(e.props, "links", []), a = r.map((s, l) => {
|
|
2589
2595
|
const c = l < r.length - 1 ? '<span class="mx-1">|</span>' : "";
|
|
2590
|
-
return `<span class="hover:text-text-1 transition-colors cursor-pointer">${
|
|
2596
|
+
return `<span class="hover:text-text-1 transition-colors cursor-pointer">${m(s)}</span>${c}`;
|
|
2591
2597
|
}).join(""), o = r.length > 0 ? '<span class="mx-1">|</span>' : "";
|
|
2592
2598
|
return ` <footer class="px-6 md:px-10 py-6">
|
|
2593
2599
|
<div class="flex items-center justify-center gap-1.5 text-[11px] text-text-3">
|
|
@@ -2597,17 +2603,17 @@ function _n(e) {
|
|
|
2597
2603
|
</div>
|
|
2598
2604
|
</footer>`;
|
|
2599
2605
|
}
|
|
2600
|
-
function
|
|
2606
|
+
function ra(e) {
|
|
2601
2607
|
switch (e.variant) {
|
|
2602
2608
|
case "multi-column":
|
|
2603
|
-
return
|
|
2609
|
+
return ea(e);
|
|
2604
2610
|
case "minimal":
|
|
2605
|
-
return
|
|
2611
|
+
return ta(e);
|
|
2606
2612
|
default:
|
|
2607
|
-
return
|
|
2613
|
+
return Xn(e);
|
|
2608
2614
|
}
|
|
2609
2615
|
}
|
|
2610
|
-
const
|
|
2616
|
+
const na = [
|
|
2611
2617
|
{
|
|
2612
2618
|
name: "Sarah Chen",
|
|
2613
2619
|
role: "CEO at TechCorp",
|
|
@@ -2627,20 +2633,20 @@ const Vn = [
|
|
|
2627
2633
|
rating: 4
|
|
2628
2634
|
}
|
|
2629
2635
|
];
|
|
2630
|
-
function
|
|
2631
|
-
const n =
|
|
2636
|
+
function aa(e) {
|
|
2637
|
+
const n = m(
|
|
2632
2638
|
g(e.props, "title", "What people say")
|
|
2633
|
-
), r = g(e.props, "subtitle", ""), a = g(e.props, "items",
|
|
2634
|
-
const c = l.rating ? ` ${
|
|
2639
|
+
), r = g(e.props, "subtitle", ""), a = g(e.props, "items", na), o = r ? ` <p class="text-text-2 text-sm max-w-lg mx-auto">${m(r)}</p>` : "", s = a.map((l) => {
|
|
2640
|
+
const c = l.rating ? ` ${Fn(l.rating)}` : "";
|
|
2635
2641
|
return ` <div class="bg-bg-2 border border-border-default rounded-xl p-5 transition-all hover:border-border-hover">
|
|
2636
|
-
<span class="text-green/30 block mb-3">${
|
|
2637
|
-
<p class="text-[13px] text-text-1 leading-relaxed mb-4 italic">"${
|
|
2642
|
+
<span class="text-green/30 block mb-3">${Bn}</span>
|
|
2643
|
+
<p class="text-[13px] text-text-1 leading-relaxed mb-4 italic">"${m(l.quote)}"</p>
|
|
2638
2644
|
${c}
|
|
2639
2645
|
<div class="flex items-center gap-3 mt-4 pt-4 border-t border-border-subtle">
|
|
2640
|
-
${l.avatar ? `<img src="${
|
|
2646
|
+
${l.avatar ? `<img src="${m(l.avatar)}" alt="${m(l.name)}" class="w-9 h-9 rounded-full object-cover border border-border-default" />` : `<div class="w-9 h-9 rounded-full bg-bg-4 border border-border-default flex items-center justify-center text-[11px] font-semibold text-text-2">${ft(l.name)}</div>`}
|
|
2641
2647
|
<div>
|
|
2642
|
-
<div class="text-[12.5px] font-semibold">${
|
|
2643
|
-
<div class="text-[11px] text-text-3">${
|
|
2648
|
+
<div class="text-[12.5px] font-semibold">${m(l.name)}</div>
|
|
2649
|
+
<div class="text-[11px] text-text-3">${m(l.role)}</div>
|
|
2644
2650
|
</div>
|
|
2645
2651
|
</div>
|
|
2646
2652
|
</div>`;
|
|
@@ -2656,17 +2662,17 @@ ${s}
|
|
|
2656
2662
|
</div>
|
|
2657
2663
|
</section>`;
|
|
2658
2664
|
}
|
|
2659
|
-
const
|
|
2665
|
+
const wt = [
|
|
2660
2666
|
{ value: "10K+", label: "Sites built" },
|
|
2661
2667
|
{ value: "99.9%", label: "Uptime" },
|
|
2662
2668
|
{ value: "50ms", label: "Avg. response" },
|
|
2663
2669
|
{ value: "4.9/5", label: "User rating" }
|
|
2664
2670
|
];
|
|
2665
|
-
function
|
|
2666
|
-
const n = g(e.props, "title", ""), r = g(e.props, "items",
|
|
2671
|
+
function oa(e) {
|
|
2672
|
+
const n = g(e.props, "title", ""), r = g(e.props, "items", wt), a = n ? ` <h2 class="text-xl font-bold tracking-tight text-center mb-8">${m(n)}</h2>` : "", o = r.map(
|
|
2667
2673
|
(s) => ` <div class="text-center p-4 rounded-xl bg-bg-2 border border-border-default">
|
|
2668
|
-
<div class="text-3xl md:text-4xl font-bold tracking-tight text-green mb-1">${
|
|
2669
|
-
<div class="text-[12px] text-text-2 font-medium">${
|
|
2674
|
+
<div class="text-3xl md:text-4xl font-bold tracking-tight text-green mb-1">${m(s.value)}</div>
|
|
2675
|
+
<div class="text-[12px] text-text-2 font-medium">${m(s.label)}</div>
|
|
2670
2676
|
</div>`
|
|
2671
2677
|
).join(`
|
|
2672
2678
|
`);
|
|
@@ -2677,23 +2683,23 @@ ${o}
|
|
|
2677
2683
|
</div>
|
|
2678
2684
|
</section>`;
|
|
2679
2685
|
}
|
|
2680
|
-
function
|
|
2686
|
+
function sa(e) {
|
|
2681
2687
|
return ` <section class="px-6 md:px-10 py-10">
|
|
2682
2688
|
<div class="flex flex-wrap items-center justify-center gap-8 md:gap-12 py-6 px-4 rounded-xl bg-bg-2 border border-border-default">
|
|
2683
|
-
${g(e.props, "items",
|
|
2689
|
+
${g(e.props, "items", wt).map(
|
|
2684
2690
|
(a) => ` <div class="text-center">
|
|
2685
|
-
<div class="text-2xl md:text-3xl font-bold tracking-tight text-text-0 mb-0.5">${
|
|
2686
|
-
<div class="text-[11px] text-text-3 font-medium uppercase tracking-wider">${
|
|
2691
|
+
<div class="text-2xl md:text-3xl font-bold tracking-tight text-text-0 mb-0.5">${m(a.value)}</div>
|
|
2692
|
+
<div class="text-[11px] text-text-3 font-medium uppercase tracking-wider">${m(a.label)}</div>
|
|
2687
2693
|
</div>`
|
|
2688
2694
|
).join(`
|
|
2689
2695
|
`)}
|
|
2690
2696
|
</div>
|
|
2691
2697
|
</section>`;
|
|
2692
2698
|
}
|
|
2693
|
-
function
|
|
2694
|
-
return e.variant === "bar" ?
|
|
2699
|
+
function ia(e) {
|
|
2700
|
+
return e.variant === "bar" ? sa(e) : oa(e);
|
|
2695
2701
|
}
|
|
2696
|
-
const
|
|
2702
|
+
const la = [
|
|
2697
2703
|
{
|
|
2698
2704
|
question: "What is OpenPage?",
|
|
2699
2705
|
answer: "OpenPage is a visual website builder that uses structured JSON config as the source of truth. Both humans and AI agents can edit the same config to build beautiful websites."
|
|
@@ -2711,17 +2717,17 @@ const Qn = [
|
|
|
2711
2717
|
answer: "OpenPage offers a free tier for personal projects with up to 5 blocks. Pro and Team plans unlock unlimited blocks, custom domains, and priority support."
|
|
2712
2718
|
}
|
|
2713
2719
|
];
|
|
2714
|
-
function
|
|
2715
|
-
const n =
|
|
2720
|
+
function ca(e) {
|
|
2721
|
+
const n = m(
|
|
2716
2722
|
g(e.props, "title", "Frequently Asked Questions")
|
|
2717
|
-
), r = g(e.props, "subtitle", ""), a = g(e.props, "items",
|
|
2723
|
+
), r = g(e.props, "subtitle", ""), a = g(e.props, "items", la), o = r ? ` <p class="text-text-2 text-sm max-w-lg mx-auto">${m(r)}</p>` : "", s = a.map(
|
|
2718
2724
|
(l, c) => ` <div class="border-b border-border-subtle">
|
|
2719
2725
|
<button onclick="toggleFaq(this)" class="w-full flex items-center justify-between py-4 text-left group" aria-expanded="${c === 0 ? "true" : "false"}">
|
|
2720
|
-
<span class="text-[13.5px] font-medium text-text-0 group-hover:text-green transition-colors">${
|
|
2721
|
-
<span class="faq-chevron text-text-3 shrink-0 ml-4 transition-transform duration-200${c === 0 ? " rotate-180 text-green" : ""}">${
|
|
2726
|
+
<span class="text-[13.5px] font-medium text-text-0 group-hover:text-green transition-colors">${m(l.question)}</span>
|
|
2727
|
+
<span class="faq-chevron text-text-3 shrink-0 ml-4 transition-transform duration-200${c === 0 ? " rotate-180 text-green" : ""}">${In}</span>
|
|
2722
2728
|
</button>
|
|
2723
2729
|
<div class="faq-content overflow-hidden transition-all duration-200${c === 0 ? " max-h-[500px] pb-4" : " max-h-0"}">
|
|
2724
|
-
<p class="text-[12.5px] text-text-2 leading-relaxed pr-8">${
|
|
2730
|
+
<p class="text-[12.5px] text-text-2 leading-relaxed pr-8">${m(l.answer)}</p>
|
|
2725
2731
|
</div>
|
|
2726
2732
|
</div>`
|
|
2727
2733
|
).join(`
|
|
@@ -2736,18 +2742,18 @@ ${s}
|
|
|
2736
2742
|
</div>
|
|
2737
2743
|
</section>`;
|
|
2738
2744
|
}
|
|
2739
|
-
const
|
|
2745
|
+
const da = [
|
|
2740
2746
|
{ name: "Alex Rivera", role: "CEO & Founder" },
|
|
2741
2747
|
{ name: "Jordan Lee", role: "CTO" },
|
|
2742
2748
|
{ name: "Sam Patel", role: "Head of Design" },
|
|
2743
2749
|
{ name: "Casey Morgan", role: "Lead Engineer" }
|
|
2744
2750
|
];
|
|
2745
|
-
function
|
|
2746
|
-
const n =
|
|
2751
|
+
function pa(e) {
|
|
2752
|
+
const n = m(g(e.props, "title", "Meet the Team")), r = g(e.props, "subtitle", ""), a = g(e.props, "members", da), o = r ? ` <p class="text-text-2 text-sm max-w-lg mx-auto">${m(r)}</p>` : "", s = a.map(
|
|
2747
2753
|
(l) => ` <div class="text-center group">
|
|
2748
|
-
${l.avatar ? `<img src="${
|
|
2749
|
-
<h3 class="text-sm font-semibold">${
|
|
2750
|
-
<p class="text-[11px] text-text-3 mt-0.5">${
|
|
2754
|
+
${l.avatar ? `<img src="${m(l.avatar)}" alt="${m(l.name)}" class="w-20 h-20 mx-auto rounded-full object-cover border-2 border-border-default mb-3 transition-all group-hover:border-green/30" />` : `<div class="w-20 h-20 mx-auto rounded-full bg-bg-3 border-2 border-border-default flex items-center justify-center text-xl font-bold text-text-3 mb-3 transition-all group-hover:border-green/30">${ft(l.name)}</div>`}
|
|
2755
|
+
<h3 class="text-sm font-semibold">${m(l.name)}</h3>
|
|
2756
|
+
<p class="text-[11px] text-text-3 mt-0.5">${m(l.role)}</p>
|
|
2751
2757
|
</div>`
|
|
2752
2758
|
).join(`
|
|
2753
2759
|
`);
|
|
@@ -2761,8 +2767,8 @@ ${s}
|
|
|
2761
2767
|
</div>
|
|
2762
2768
|
</section>`;
|
|
2763
2769
|
}
|
|
2764
|
-
function
|
|
2765
|
-
const n =
|
|
2770
|
+
function ua(e) {
|
|
2771
|
+
const n = m(g(e.props, "title", "Get in Touch")), r = g(e.props, "subtitle", ""), a = r ? ` <p class="text-text-2 text-sm">${m(r)}</p>` : "";
|
|
2766
2772
|
return ` <section class="px-6 md:px-10 py-16 md:py-20">
|
|
2767
2773
|
<div class="max-w-lg mx-auto">
|
|
2768
2774
|
<div class="text-center mb-8">
|
|
@@ -2785,29 +2791,29 @@ ${a}
|
|
|
2785
2791
|
<textarea rows="4" placeholder="How can we help?" class="w-full px-3 py-2.5 rounded-lg border border-border-default bg-bg-2 text-text-0 text-[13px] outline-none focus:border-green placeholder:text-text-3 resize-y transition-colors"></textarea>
|
|
2786
2792
|
</div>
|
|
2787
2793
|
<button type="submit" class="w-full py-3 rounded-lg bg-green text-black text-sm font-semibold hover:bg-green-dim transition-all flex items-center justify-center gap-2">
|
|
2788
|
-
${
|
|
2794
|
+
${Ln}
|
|
2789
2795
|
Send Message
|
|
2790
2796
|
</button>
|
|
2791
2797
|
</form>
|
|
2792
2798
|
</div>
|
|
2793
2799
|
</section>`;
|
|
2794
2800
|
}
|
|
2795
|
-
function
|
|
2796
|
-
const n =
|
|
2801
|
+
function ma(e) {
|
|
2802
|
+
const n = m(
|
|
2797
2803
|
g(e.props, "title", "Stay in the loop")
|
|
2798
|
-
), r =
|
|
2804
|
+
), r = m(
|
|
2799
2805
|
g(
|
|
2800
2806
|
e.props,
|
|
2801
2807
|
"subtitle",
|
|
2802
2808
|
"Get updates on new features and releases. No spam, ever."
|
|
2803
2809
|
)
|
|
2804
|
-
), a =
|
|
2810
|
+
), a = m(
|
|
2805
2811
|
g(e.props, "buttonText", "Subscribe")
|
|
2806
|
-
), o = g(e.props, "socialProof", ""), s = o ?
|
|
2812
|
+
), o = g(e.props, "socialProof", ""), s = o ? m(o) : "Join 2,000+ developers and designers";
|
|
2807
2813
|
return ` <section class="px-6 md:px-10 py-12 md:py-16">
|
|
2808
2814
|
<div class="max-w-xl mx-auto text-center">
|
|
2809
2815
|
<div class="w-12 h-12 rounded-xl bg-green/10 border border-green/20 flex items-center justify-center text-green mx-auto mb-4">
|
|
2810
|
-
${
|
|
2816
|
+
${Mn}
|
|
2811
2817
|
</div>
|
|
2812
2818
|
<h2 class="text-xl md:text-2xl font-bold tracking-tight mb-2">${n}</h2>
|
|
2813
2819
|
<p class="text-text-2 text-sm mb-6">${r}</p>
|
|
@@ -2819,8 +2825,8 @@ function na(e) {
|
|
|
2819
2825
|
</div>
|
|
2820
2826
|
</section>`;
|
|
2821
2827
|
}
|
|
2822
|
-
function
|
|
2823
|
-
const n =
|
|
2828
|
+
function ga(e) {
|
|
2829
|
+
const n = m(
|
|
2824
2830
|
g(e.props, "title", "Trusted by teams at")
|
|
2825
2831
|
), a = g(e.props, "logos", [
|
|
2826
2832
|
"Vercel",
|
|
@@ -2832,8 +2838,8 @@ function aa(e) {
|
|
|
2832
2838
|
]).map(
|
|
2833
2839
|
(o) => ` <div class="group cursor-pointer transition-all">
|
|
2834
2840
|
<div class="flex items-center gap-2 opacity-50 group-hover:opacity-100 transition-all group-hover:scale-105">
|
|
2835
|
-
<span class="text-text-3 group-hover:text-green transition-colors">${
|
|
2836
|
-
<span class="text-sm font-semibold text-text-3 group-hover:text-text-0 tracking-tight transition-colors">${
|
|
2841
|
+
<span class="text-text-3 group-hover:text-green transition-colors">${En(o)}</span>
|
|
2842
|
+
<span class="text-sm font-semibold text-text-3 group-hover:text-text-0 tracking-tight transition-colors">${m(o)}</span>
|
|
2837
2843
|
</div>
|
|
2838
2844
|
</div>`
|
|
2839
2845
|
).join(`
|
|
@@ -2845,45 +2851,45 @@ ${a}
|
|
|
2845
2851
|
</div>
|
|
2846
2852
|
</section>`;
|
|
2847
2853
|
}
|
|
2848
|
-
function
|
|
2854
|
+
function xa(e) {
|
|
2849
2855
|
switch (e.type) {
|
|
2850
2856
|
case "navbar":
|
|
2851
|
-
return
|
|
2857
|
+
return Hn(e);
|
|
2852
2858
|
case "hero":
|
|
2853
|
-
return
|
|
2859
|
+
return Un(e);
|
|
2854
2860
|
case "features":
|
|
2855
|
-
return
|
|
2861
|
+
return Jn(e);
|
|
2856
2862
|
case "pricing":
|
|
2857
|
-
return
|
|
2863
|
+
return Kn(e);
|
|
2858
2864
|
case "cta":
|
|
2859
|
-
return
|
|
2865
|
+
return Qn(e);
|
|
2860
2866
|
case "footer":
|
|
2861
|
-
return
|
|
2867
|
+
return ra(e);
|
|
2862
2868
|
case "testimonials":
|
|
2863
|
-
return
|
|
2869
|
+
return aa(e);
|
|
2864
2870
|
case "stats":
|
|
2865
|
-
return
|
|
2871
|
+
return ia(e);
|
|
2866
2872
|
case "faq":
|
|
2867
|
-
return
|
|
2873
|
+
return ca(e);
|
|
2868
2874
|
case "team":
|
|
2869
|
-
return
|
|
2875
|
+
return pa(e);
|
|
2870
2876
|
case "contact":
|
|
2871
|
-
return
|
|
2877
|
+
return ua(e);
|
|
2872
2878
|
case "newsletter":
|
|
2873
|
-
return
|
|
2879
|
+
return ma(e);
|
|
2874
2880
|
case "logocloud":
|
|
2875
|
-
return
|
|
2881
|
+
return ga(e);
|
|
2876
2882
|
default:
|
|
2877
|
-
return ` <!-- Unknown block type: ${
|
|
2883
|
+
return ` <!-- Unknown block type: ${m(e.type)} -->`;
|
|
2878
2884
|
}
|
|
2879
2885
|
}
|
|
2880
|
-
function
|
|
2881
|
-
const r =
|
|
2886
|
+
function ba(e, n) {
|
|
2887
|
+
const r = de(e.theme), a = [r.fontSans, r.fontDisplay, r.fontMono], o = Pn(a), s = n?.settings, l = e.blocks.some((F) => F.type === "faq"), c = e.blocks.map((F) => xa(F)).join(`
|
|
2882
2888
|
|
|
2883
|
-
`), d = (s?.seoTitle || s?.siteName || e.name || "Website").trim(), p = (s?.seoDescription || s?.siteDescription || "").trim(),
|
|
2884
|
-
` : "", $ = f ? ` <meta property="og:description" content="${
|
|
2885
|
-
` : "",
|
|
2886
|
-
` : "", R = h ? ` <link rel="icon" href="${
|
|
2889
|
+
`), d = (s?.seoTitle || s?.siteName || e.name || "Website").trim(), p = (s?.seoDescription || s?.siteDescription || "").trim(), u = (s?.seoTitle || s?.siteName || d).trim(), f = (s?.seoDescription || s?.siteDescription || p).trim(), x = (s?.ogImageUrl || "").trim(), h = (s?.faviconUrl || "").trim(), w = (s?.gaId || "").trim(), N = (s?.posthogKey || "").trim(), b = Tn(s?.language), y = p ? ` <meta name="description" content="${m(p)}" />
|
|
2890
|
+
` : "", $ = f ? ` <meta property="og:description" content="${m(f)}" />
|
|
2891
|
+
` : "", M = x ? ` <meta property="og:image" content="${m(x)}" />
|
|
2892
|
+
` : "", R = h ? ` <link rel="icon" href="${m(h)}" />
|
|
2887
2893
|
` : "", T = w ? `
|
|
2888
2894
|
<script async src="https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(w)}"><\/script>
|
|
2889
2895
|
<script>
|
|
@@ -2928,13 +2934,13 @@ function sa(e, n) {
|
|
|
2928
2934
|
}
|
|
2929
2935
|
<\/script>` : "";
|
|
2930
2936
|
return `<!DOCTYPE html>
|
|
2931
|
-
<html lang="${
|
|
2937
|
+
<html lang="${m(b)}">
|
|
2932
2938
|
<head>
|
|
2933
2939
|
<meta charset="UTF-8" />
|
|
2934
2940
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
2935
|
-
<title>${
|
|
2936
|
-
${y} <meta property="og:title" content="${u
|
|
2937
|
-
${$}${
|
|
2941
|
+
<title>${m(d)}</title>
|
|
2942
|
+
${y} <meta property="og:title" content="${m(u)}" />
|
|
2943
|
+
${$}${M}${R}
|
|
2938
2944
|
|
|
2939
2945
|
<!-- Google Fonts -->
|
|
2940
2946
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
@@ -3038,25 +3044,25 @@ ${B}
|
|
|
3038
3044
|
</body>
|
|
3039
3045
|
</html>`;
|
|
3040
3046
|
}
|
|
3041
|
-
async function
|
|
3042
|
-
return
|
|
3047
|
+
async function fa(e, n) {
|
|
3048
|
+
return ba(e, n);
|
|
3043
3049
|
}
|
|
3044
|
-
function
|
|
3050
|
+
function ha(e, n) {
|
|
3045
3051
|
const r = new Blob([e], { type: "text/html" }), a = URL.createObjectURL(r), o = document.createElement("a");
|
|
3046
3052
|
o.href = a, o.download = n, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(a);
|
|
3047
3053
|
}
|
|
3048
|
-
function
|
|
3054
|
+
function So(e) {
|
|
3049
3055
|
const n = window.open("", "_blank", "noopener,noreferrer");
|
|
3050
3056
|
if (!n)
|
|
3051
3057
|
throw new Error("Preview popup was blocked");
|
|
3052
3058
|
n.document.open(), n.document.write(e), n.document.close();
|
|
3053
3059
|
}
|
|
3054
|
-
const
|
|
3055
|
-
{ value: "desktop", icon:
|
|
3056
|
-
{ value: "tablet", icon:
|
|
3057
|
-
{ value: "mobile", icon:
|
|
3060
|
+
const va = [
|
|
3061
|
+
{ value: "desktop", icon: zt, label: "Desktop" },
|
|
3062
|
+
{ value: "tablet", icon: Rt, label: "Tablet" },
|
|
3063
|
+
{ value: "mobile", icon: Gt, label: "Mobile" }
|
|
3058
3064
|
];
|
|
3059
|
-
function
|
|
3065
|
+
function ya({ onAdd: e, onClose: n }) {
|
|
3060
3066
|
const [r, a] = C(""), [o, s] = C("/"), l = D(null);
|
|
3061
3067
|
I(() => {
|
|
3062
3068
|
l.current?.focus();
|
|
@@ -3112,8 +3118,8 @@ function da({ onAdd: e, onClose: n }) {
|
|
|
3112
3118
|
)
|
|
3113
3119
|
] }) });
|
|
3114
3120
|
}
|
|
3115
|
-
function
|
|
3116
|
-
const [l, c] = C(!1), [d, p] = C(e.name), [
|
|
3121
|
+
function wa({ page: e, isActive: n, onClick: r, onRename: a, onDelete: o, canDelete: s }) {
|
|
3122
|
+
const [l, c] = C(!1), [d, p] = C(e.name), [u, f] = C(!1), x = D(null);
|
|
3117
3123
|
I(() => {
|
|
3118
3124
|
l && x.current?.focus();
|
|
3119
3125
|
}, [l]);
|
|
@@ -3150,7 +3156,7 @@ function pa({ page: e, isActive: n, onClick: r, onRename: a, onDelete: o, canDel
|
|
|
3150
3156
|
children: e.name
|
|
3151
3157
|
}
|
|
3152
3158
|
),
|
|
3153
|
-
|
|
3159
|
+
u && /* @__PURE__ */ i(J, { children: [
|
|
3154
3160
|
/* @__PURE__ */ t("div", { className: "fixed inset-0 z-10", onClick: () => f(!1) }),
|
|
3155
3161
|
/* @__PURE__ */ i("div", { className: "absolute top-full left-0 mt-1 bg-bg-2 border border-border-default rounded-lg p-1 shadow-[0_8px_24px_rgba(0,0,0,0.4)] z-20 min-w-[100px]", children: [
|
|
3156
3162
|
/* @__PURE__ */ t(
|
|
@@ -3177,17 +3183,17 @@ function pa({ page: e, isActive: n, onClick: r, onRename: a, onDelete: o, canDel
|
|
|
3177
3183
|
] })
|
|
3178
3184
|
] });
|
|
3179
3185
|
}
|
|
3180
|
-
function
|
|
3181
|
-
const { viewport: r, setViewport: a, toggleJsonDrawer: o, jsonDrawerOpen: s, toggleHistory: l, togglePreview: c, toggleShortcutsModal: d, previewMode: p } = P(), { undo:
|
|
3182
|
-
async function
|
|
3183
|
-
|
|
3186
|
+
function ka({ activeProject: e, onExit: n } = {}) {
|
|
3187
|
+
const { viewport: r, setViewport: a, toggleJsonDrawer: o, jsonDrawerOpen: s, toggleHistory: l, togglePreview: c, toggleShortcutsModal: d, previewMode: p } = P(), { undo: u, redo: f, canUndo: x, canRedo: h } = v(), w = v((k) => k.undoStack), N = v((k) => k.redoStack), b = v((k) => k.config.pages) ?? [], y = v((k) => k.activePageId), $ = v((k) => k.setActivePage), M = v((k) => k.addPage), R = v((k) => k.removePage), T = v((k) => k.renamePage), O = v((k) => k.config.name), B = v((k) => k.config), [F, Ie] = C(!1), [je, Ae] = C(!1), Ct = e?.name || O;
|
|
3188
|
+
async function $t() {
|
|
3189
|
+
Ae(!0);
|
|
3184
3190
|
try {
|
|
3185
|
-
const k = await
|
|
3186
|
-
|
|
3191
|
+
const k = await fa(B, { settings: e?.settings }), G = `${(e?.name || B.name || "site").toLowerCase().replace(/\s+/g, "-")}.html`;
|
|
3192
|
+
ha(k, G), S("HTML exported");
|
|
3187
3193
|
} catch {
|
|
3188
3194
|
S.error("Export failed");
|
|
3189
3195
|
} finally {
|
|
3190
|
-
|
|
3196
|
+
Ae(!1);
|
|
3191
3197
|
}
|
|
3192
3198
|
}
|
|
3193
3199
|
return /* @__PURE__ */ i("div", { className: "h-10 bg-bg-1 border-b border-border-default flex items-center px-3 gap-1", children: [
|
|
@@ -3201,12 +3207,12 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3201
3207
|
}
|
|
3202
3208
|
),
|
|
3203
3209
|
/* @__PURE__ */ t("span", { children: "/" }),
|
|
3204
|
-
/* @__PURE__ */ t("span", { className: "text-text-0 font-medium max-w-[120px] truncate", children:
|
|
3210
|
+
/* @__PURE__ */ t("span", { className: "text-text-0 font-medium max-w-[120px] truncate", children: Ct })
|
|
3205
3211
|
] }),
|
|
3206
3212
|
/* @__PURE__ */ t("div", { className: "w-px h-5 bg-border-default mx-1.5 shrink-0" }),
|
|
3207
3213
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-0.5 relative overflow-x-auto", children: [
|
|
3208
3214
|
b.map((k) => /* @__PURE__ */ t(
|
|
3209
|
-
|
|
3215
|
+
wa,
|
|
3210
3216
|
{
|
|
3211
3217
|
page: k,
|
|
3212
3218
|
isActive: y === k.id,
|
|
@@ -3221,28 +3227,28 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3221
3227
|
/* @__PURE__ */ t(
|
|
3222
3228
|
"button",
|
|
3223
3229
|
{
|
|
3224
|
-
onClick: () =>
|
|
3230
|
+
onClick: () => Ie(!F),
|
|
3225
3231
|
className: "w-6 h-6 rounded flex items-center justify-center text-text-3 hover:text-green hover:bg-bg-2 transition-all",
|
|
3226
3232
|
title: "Add page",
|
|
3227
3233
|
"aria-label": "Add page",
|
|
3228
|
-
children: /* @__PURE__ */ t(
|
|
3234
|
+
children: /* @__PURE__ */ t(le, { size: 12 })
|
|
3229
3235
|
}
|
|
3230
3236
|
),
|
|
3231
|
-
|
|
3232
|
-
|
|
3237
|
+
F && /* @__PURE__ */ t(
|
|
3238
|
+
ya,
|
|
3233
3239
|
{
|
|
3234
|
-
onAdd: (k, G) =>
|
|
3235
|
-
onClose: () =>
|
|
3240
|
+
onAdd: (k, G) => M(k, G),
|
|
3241
|
+
onClose: () => Ie(!1)
|
|
3236
3242
|
}
|
|
3237
3243
|
)
|
|
3238
3244
|
] })
|
|
3239
3245
|
] }),
|
|
3240
3246
|
/* @__PURE__ */ i("div", { className: "ml-auto flex items-center gap-1 shrink-0", children: [
|
|
3241
|
-
|
|
3247
|
+
va.map(({ value: k, icon: G, label: De }) => /* @__PURE__ */ t(
|
|
3242
3248
|
"button",
|
|
3243
3249
|
{
|
|
3244
|
-
title:
|
|
3245
|
-
"aria-label":
|
|
3250
|
+
title: De,
|
|
3251
|
+
"aria-label": De,
|
|
3246
3252
|
"aria-pressed": r === k,
|
|
3247
3253
|
onClick: () => a(k),
|
|
3248
3254
|
className: `w-7 h-7 rounded flex items-center justify-center text-xs transition-all ${r === k ? "bg-bg-3 text-text-0" : "text-text-3 hover:text-text-1 hover:bg-bg-3"}`,
|
|
@@ -3256,13 +3262,13 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3256
3262
|
{
|
|
3257
3263
|
onClick: () => {
|
|
3258
3264
|
const k = w[w.length - 1]?.label;
|
|
3259
|
-
|
|
3265
|
+
u(), k && S(`Undo: ${k}`, { duration: 1500 });
|
|
3260
3266
|
},
|
|
3261
3267
|
disabled: !x(),
|
|
3262
3268
|
className: "w-7 h-7 rounded flex items-center justify-center text-text-3 hover:text-text-1 hover:bg-bg-3 transition-all disabled:opacity-30 disabled:cursor-not-allowed",
|
|
3263
3269
|
title: "Undo",
|
|
3264
3270
|
"aria-label": "Undo",
|
|
3265
|
-
children: /* @__PURE__ */ t(
|
|
3271
|
+
children: /* @__PURE__ */ t(Ut, { size: 14 })
|
|
3266
3272
|
}
|
|
3267
3273
|
),
|
|
3268
3274
|
/* @__PURE__ */ t(
|
|
@@ -3276,7 +3282,7 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3276
3282
|
className: "w-7 h-7 rounded flex items-center justify-center text-text-3 hover:text-text-1 hover:bg-bg-3 transition-all disabled:opacity-30 disabled:cursor-not-allowed",
|
|
3277
3283
|
title: "Redo",
|
|
3278
3284
|
"aria-label": "Redo",
|
|
3279
|
-
children: /* @__PURE__ */ t(
|
|
3285
|
+
children: /* @__PURE__ */ t(qt, { size: 14 })
|
|
3280
3286
|
}
|
|
3281
3287
|
),
|
|
3282
3288
|
/* @__PURE__ */ t("div", { className: "w-px h-5 bg-border-default mx-1" }),
|
|
@@ -3289,7 +3295,7 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3289
3295
|
"aria-label": "Toggle preview mode",
|
|
3290
3296
|
"aria-pressed": p,
|
|
3291
3297
|
children: [
|
|
3292
|
-
/* @__PURE__ */ t(
|
|
3298
|
+
/* @__PURE__ */ t(_t, { size: 13 }),
|
|
3293
3299
|
/* @__PURE__ */ t("span", { children: "Preview" })
|
|
3294
3300
|
]
|
|
3295
3301
|
}
|
|
@@ -3303,7 +3309,7 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3303
3309
|
"aria-label": "Toggle JSON drawer",
|
|
3304
3310
|
"aria-pressed": s,
|
|
3305
3311
|
children: [
|
|
3306
|
-
/* @__PURE__ */ t(
|
|
3312
|
+
/* @__PURE__ */ t(ye, { size: 13 }),
|
|
3307
3313
|
/* @__PURE__ */ t("span", { children: "JSON" })
|
|
3308
3314
|
]
|
|
3309
3315
|
}
|
|
@@ -3316,7 +3322,7 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3316
3322
|
title: "History (H)",
|
|
3317
3323
|
"aria-label": "Toggle version history",
|
|
3318
3324
|
children: [
|
|
3319
|
-
/* @__PURE__ */ t(
|
|
3325
|
+
/* @__PURE__ */ t(qe, { size: 13 }),
|
|
3320
3326
|
/* @__PURE__ */ t("span", { children: "History" })
|
|
3321
3327
|
]
|
|
3322
3328
|
}
|
|
@@ -3328,21 +3334,21 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3328
3334
|
className: "w-7 h-7 rounded flex items-center justify-center text-text-3 hover:text-text-1 hover:bg-bg-3 transition-all",
|
|
3329
3335
|
title: "Keyboard shortcuts (?)",
|
|
3330
3336
|
"aria-label": "Show keyboard shortcuts",
|
|
3331
|
-
children: /* @__PURE__ */ t(
|
|
3337
|
+
children: /* @__PURE__ */ t(Se, { size: 14 })
|
|
3332
3338
|
}
|
|
3333
3339
|
),
|
|
3334
3340
|
/* @__PURE__ */ t("div", { className: "w-px h-5 bg-border-default mx-1" }),
|
|
3335
3341
|
/* @__PURE__ */ t(
|
|
3336
3342
|
"button",
|
|
3337
3343
|
{
|
|
3338
|
-
onClick:
|
|
3339
|
-
disabled:
|
|
3344
|
+
onClick: $t,
|
|
3345
|
+
disabled: je,
|
|
3340
3346
|
className: "h-7 px-3 rounded-lg bg-green text-bg-0 text-[11.5px] font-semibold hover:bg-green/90 transition-all disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-1.5",
|
|
3341
|
-
children:
|
|
3342
|
-
/* @__PURE__ */ t(
|
|
3347
|
+
children: je ? /* @__PURE__ */ i(J, { children: [
|
|
3348
|
+
/* @__PURE__ */ t(Jt, { size: 12, className: "animate-spin" }),
|
|
3343
3349
|
/* @__PURE__ */ t("span", { children: "Exporting..." })
|
|
3344
|
-
] }) : /* @__PURE__ */ i(
|
|
3345
|
-
/* @__PURE__ */ t(
|
|
3350
|
+
] }) : /* @__PURE__ */ i(J, { children: [
|
|
3351
|
+
/* @__PURE__ */ t(Vt, { size: 12 }),
|
|
3346
3352
|
/* @__PURE__ */ t("span", { children: "Export" })
|
|
3347
3353
|
] })
|
|
3348
3354
|
}
|
|
@@ -3350,7 +3356,7 @@ function ma({ activeProject: e, onExit: n } = {}) {
|
|
|
3350
3356
|
] })
|
|
3351
3357
|
] });
|
|
3352
3358
|
}
|
|
3353
|
-
function
|
|
3359
|
+
function Na({ value: e, onInput: n, onChange: r }) {
|
|
3354
3360
|
return /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
|
|
3355
3361
|
/* @__PURE__ */ t(
|
|
3356
3362
|
"input",
|
|
@@ -3380,8 +3386,8 @@ function ua({ value: e, onInput: n, onChange: r }) {
|
|
|
3380
3386
|
)
|
|
3381
3387
|
] });
|
|
3382
3388
|
}
|
|
3383
|
-
function
|
|
3384
|
-
const [a, o] = C(r), s = v((p) => p.config.theme), l = v((p) => p.previewTheme), c = v((p) => p.updateTheme), d =
|
|
3389
|
+
function te({ title: e, colors: n, defaultOpen: r = !1 }) {
|
|
3390
|
+
const [a, o] = C(r), s = v((p) => p.config.theme), l = v((p) => p.previewTheme), c = v((p) => p.updateTheme), d = W(() => de(s), [s]);
|
|
3385
3391
|
return /* @__PURE__ */ i("div", { className: "border border-border-default rounded-lg overflow-hidden", children: [
|
|
3386
3392
|
/* @__PURE__ */ i(
|
|
3387
3393
|
"button",
|
|
@@ -3400,26 +3406,26 @@ function ee({ title: e, colors: n, defaultOpen: r = !1 }) {
|
|
|
3400
3406
|
p.key
|
|
3401
3407
|
)) })
|
|
3402
3408
|
] }),
|
|
3403
|
-
/* @__PURE__ */ t(
|
|
3409
|
+
/* @__PURE__ */ t(oe, { size: 12, className: `text-text-3 transition-transform ${a ? "rotate-180" : ""}` })
|
|
3404
3410
|
]
|
|
3405
3411
|
}
|
|
3406
3412
|
),
|
|
3407
3413
|
a && /* @__PURE__ */ t("div", { className: "px-3 py-2.5 space-y-2.5 bg-bg-1", children: n.map((p) => /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
3408
3414
|
/* @__PURE__ */ t("span", { className: "text-[10.5px] text-text-2", children: p.label }),
|
|
3409
3415
|
/* @__PURE__ */ t(
|
|
3410
|
-
|
|
3416
|
+
Na,
|
|
3411
3417
|
{
|
|
3412
3418
|
value: d[p.key],
|
|
3413
|
-
onInput: (
|
|
3414
|
-
onChange: (
|
|
3419
|
+
onInput: (u) => l({ [p.key]: u }),
|
|
3420
|
+
onChange: (u) => c({ [p.key]: u })
|
|
3415
3421
|
}
|
|
3416
3422
|
)
|
|
3417
3423
|
] }, p.key)) })
|
|
3418
3424
|
] });
|
|
3419
3425
|
}
|
|
3420
|
-
function
|
|
3421
|
-
const e = v((s) => s.config.theme), n = v((s) => s.setTheme), r = v((s) => s.updateTheme), a =
|
|
3422
|
-
for (const s of
|
|
3426
|
+
function Sa() {
|
|
3427
|
+
const e = v((s) => s.config.theme), n = v((s) => s.setTheme), r = v((s) => s.updateTheme), a = W(() => de(e), [e]), o = W(() => {
|
|
3428
|
+
for (const s of Y)
|
|
3423
3429
|
if (Object.keys(s.theme).every(
|
|
3424
3430
|
(c) => a[c] === s.theme[c]
|
|
3425
3431
|
)) return s.id;
|
|
@@ -3428,7 +3434,7 @@ function ga() {
|
|
|
3428
3434
|
return /* @__PURE__ */ i("div", { className: "px-3.5 py-3.5", children: [
|
|
3429
3435
|
/* @__PURE__ */ i("div", { className: "mb-4", children: [
|
|
3430
3436
|
/* @__PURE__ */ t("div", { className: "text-[10px] font-semibold uppercase tracking-wider text-text-3 mb-2", children: "Presets" }),
|
|
3431
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-1.5", children:
|
|
3437
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-1.5", children: Y.map((s) => /* @__PURE__ */ i(
|
|
3432
3438
|
"button",
|
|
3433
3439
|
{
|
|
3434
3440
|
onClick: () => n(s.theme),
|
|
@@ -3448,7 +3454,7 @@ function ga() {
|
|
|
3448
3454
|
] }),
|
|
3449
3455
|
/* @__PURE__ */ i("div", { className: "space-y-2 mb-4", children: [
|
|
3450
3456
|
/* @__PURE__ */ t(
|
|
3451
|
-
|
|
3457
|
+
te,
|
|
3452
3458
|
{
|
|
3453
3459
|
title: "Backgrounds",
|
|
3454
3460
|
defaultOpen: !0,
|
|
@@ -3463,7 +3469,7 @@ function ga() {
|
|
|
3463
3469
|
}
|
|
3464
3470
|
),
|
|
3465
3471
|
/* @__PURE__ */ t(
|
|
3466
|
-
|
|
3472
|
+
te,
|
|
3467
3473
|
{
|
|
3468
3474
|
title: "Text",
|
|
3469
3475
|
colors: [
|
|
@@ -3475,7 +3481,7 @@ function ga() {
|
|
|
3475
3481
|
}
|
|
3476
3482
|
),
|
|
3477
3483
|
/* @__PURE__ */ t(
|
|
3478
|
-
|
|
3484
|
+
te,
|
|
3479
3485
|
{
|
|
3480
3486
|
title: "Accent",
|
|
3481
3487
|
defaultOpen: !0,
|
|
@@ -3486,7 +3492,7 @@ function ga() {
|
|
|
3486
3492
|
}
|
|
3487
3493
|
),
|
|
3488
3494
|
/* @__PURE__ */ t(
|
|
3489
|
-
|
|
3495
|
+
te,
|
|
3490
3496
|
{
|
|
3491
3497
|
title: "Borders",
|
|
3492
3498
|
colors: [
|
|
@@ -3512,7 +3518,7 @@ function ga() {
|
|
|
3512
3518
|
onChange: (c) => r({ [s]: c.target.value }),
|
|
3513
3519
|
className: "w-full px-2 py-1.5 rounded-lg border border-border-default bg-bg-2 text-text-0 text-[11px] outline-none focus:border-green cursor-pointer",
|
|
3514
3520
|
style: { fontFamily: `"${a[s]}", sans-serif` },
|
|
3515
|
-
children:
|
|
3521
|
+
children: hn.map((c) => /* @__PURE__ */ t("option", { value: c, children: c }, c))
|
|
3516
3522
|
}
|
|
3517
3523
|
)
|
|
3518
3524
|
] }, s)) })
|
|
@@ -3552,27 +3558,27 @@ function ga() {
|
|
|
3552
3558
|
] })
|
|
3553
3559
|
] });
|
|
3554
3560
|
}
|
|
3555
|
-
const
|
|
3556
|
-
navbar:
|
|
3557
|
-
hero:
|
|
3558
|
-
features:
|
|
3559
|
-
pricing:
|
|
3560
|
-
cta:
|
|
3561
|
-
footer:
|
|
3562
|
-
testimonials:
|
|
3563
|
-
stats:
|
|
3564
|
-
faq:
|
|
3565
|
-
team:
|
|
3566
|
-
contact:
|
|
3567
|
-
newsletter:
|
|
3568
|
-
logocloud:
|
|
3569
|
-
divider:
|
|
3570
|
-
banner:
|
|
3571
|
-
content:
|
|
3572
|
-
image:
|
|
3573
|
-
video:
|
|
3574
|
-
gallery:
|
|
3575
|
-
},
|
|
3561
|
+
const kt = {
|
|
3562
|
+
navbar: Z,
|
|
3563
|
+
hero: at,
|
|
3564
|
+
features: nt,
|
|
3565
|
+
pricing: rt,
|
|
3566
|
+
cta: tt,
|
|
3567
|
+
footer: et,
|
|
3568
|
+
testimonials: Xe,
|
|
3569
|
+
stats: Qe,
|
|
3570
|
+
faq: Se,
|
|
3571
|
+
team: Ze,
|
|
3572
|
+
contact: ke,
|
|
3573
|
+
newsletter: Ye,
|
|
3574
|
+
logocloud: Ke,
|
|
3575
|
+
divider: We,
|
|
3576
|
+
banner: Ve,
|
|
3577
|
+
content: Je,
|
|
3578
|
+
image: se,
|
|
3579
|
+
video: Ne,
|
|
3580
|
+
gallery: _e
|
|
3581
|
+
}, re = {
|
|
3576
3582
|
navbar: "Navbar",
|
|
3577
3583
|
hero: "Hero",
|
|
3578
3584
|
features: "Features",
|
|
@@ -3593,11 +3599,11 @@ const pt = {
|
|
|
3593
3599
|
video: "Video",
|
|
3594
3600
|
gallery: "Gallery"
|
|
3595
3601
|
};
|
|
3596
|
-
function
|
|
3597
|
-
const { attributes: s, listeners: l, setNodeRef: c, transform: d, transition: p, isDragging:
|
|
3598
|
-
transform:
|
|
3602
|
+
function Ca({ block: e, isSelected: n, onSelect: r, onDuplicate: a, onRemove: o }) {
|
|
3603
|
+
const { attributes: s, listeners: l, setNodeRef: c, transform: d, transition: p, isDragging: u } = pr({ id: e.id }), f = kt[e.type] || Z, x = {
|
|
3604
|
+
transform: ur.Transform.toString(d),
|
|
3599
3605
|
transition: p,
|
|
3600
|
-
opacity:
|
|
3606
|
+
opacity: u ? 0.5 : 1
|
|
3601
3607
|
};
|
|
3602
3608
|
return /* @__PURE__ */ i(
|
|
3603
3609
|
"div",
|
|
@@ -3613,12 +3619,12 @@ function xa({ block: e, isSelected: n, onSelect: r, onDuplicate: a, onRemove: o
|
|
|
3613
3619
|
...s,
|
|
3614
3620
|
...l,
|
|
3615
3621
|
className: "opacity-0 group-hover:opacity-100 transition-opacity text-text-3 cursor-grab active:cursor-grabbing",
|
|
3616
|
-
"aria-label": `Drag to reorder ${
|
|
3617
|
-
children: /* @__PURE__ */ t(
|
|
3622
|
+
"aria-label": `Drag to reorder ${re[e.type]}`,
|
|
3623
|
+
children: /* @__PURE__ */ t(Wt, { size: 12 })
|
|
3618
3624
|
}
|
|
3619
3625
|
),
|
|
3620
3626
|
/* @__PURE__ */ t("div", { className: `w-[26px] h-[26px] rounded flex items-center justify-center text-[11px] shrink-0 border ${n ? "border-green/30 bg-green-glow" : "border-border-default bg-bg-3"}`, children: /* @__PURE__ */ t(f, { size: 13 }) }),
|
|
3621
|
-
/* @__PURE__ */ t("span", { className: "font-medium flex-1", children:
|
|
3627
|
+
/* @__PURE__ */ t("span", { className: "font-medium flex-1", children: re[e.type] }),
|
|
3622
3628
|
/* @__PURE__ */ i("div", { className: "flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
3623
3629
|
/* @__PURE__ */ t(
|
|
3624
3630
|
"button",
|
|
@@ -3627,8 +3633,8 @@ function xa({ block: e, isSelected: n, onSelect: r, onDuplicate: a, onRemove: o
|
|
|
3627
3633
|
h.stopPropagation(), a();
|
|
3628
3634
|
},
|
|
3629
3635
|
className: "w-[22px] h-[22px] rounded flex items-center justify-center text-text-3 hover:bg-bg-4 hover:text-text-0 transition-all",
|
|
3630
|
-
"aria-label": `Duplicate ${
|
|
3631
|
-
children: /* @__PURE__ */ t(
|
|
3636
|
+
"aria-label": `Duplicate ${re[e.type]}`,
|
|
3637
|
+
children: /* @__PURE__ */ t(Ge, { size: 11 })
|
|
3632
3638
|
}
|
|
3633
3639
|
),
|
|
3634
3640
|
/* @__PURE__ */ t(
|
|
@@ -3638,8 +3644,8 @@ function xa({ block: e, isSelected: n, onSelect: r, onDuplicate: a, onRemove: o
|
|
|
3638
3644
|
h.stopPropagation(), o();
|
|
3639
3645
|
},
|
|
3640
3646
|
className: "w-[22px] h-[22px] rounded flex items-center justify-center text-text-3 hover:bg-status-red/10 hover:text-status-red transition-all",
|
|
3641
|
-
"aria-label": `Remove ${
|
|
3642
|
-
children: /* @__PURE__ */ t(
|
|
3647
|
+
"aria-label": `Remove ${re[e.type]}`,
|
|
3648
|
+
children: /* @__PURE__ */ t(Ue, { size: 11 })
|
|
3643
3649
|
}
|
|
3644
3650
|
)
|
|
3645
3651
|
] })
|
|
@@ -3647,7 +3653,7 @@ function xa({ block: e, isSelected: n, onSelect: r, onDuplicate: a, onRemove: o
|
|
|
3647
3653
|
}
|
|
3648
3654
|
);
|
|
3649
3655
|
}
|
|
3650
|
-
function
|
|
3656
|
+
function $a({ onAdd: e, onClose: n }) {
|
|
3651
3657
|
const [r, a] = C(""), o = A.filter(
|
|
3652
3658
|
(l) => l.label.toLowerCase().includes(r.toLowerCase()) || l.category.toLowerCase().includes(r.toLowerCase())
|
|
3653
3659
|
), s = o.reduce((l, c) => (l[c.category] || (l[c.category] = []), l[c.category].push(c), l), {});
|
|
@@ -3667,7 +3673,7 @@ function ba({ onAdd: e, onClose: n }) {
|
|
|
3667
3673
|
Object.entries(s).map(([l, c]) => /* @__PURE__ */ i("div", { children: [
|
|
3668
3674
|
/* @__PURE__ */ t("div", { className: "text-[9px] font-semibold uppercase tracking-wider text-text-3 px-1.5 pt-2 pb-1", children: l }),
|
|
3669
3675
|
c.map((d) => {
|
|
3670
|
-
const p =
|
|
3676
|
+
const p = kt[d.type] || Z;
|
|
3671
3677
|
return /* @__PURE__ */ i(
|
|
3672
3678
|
"button",
|
|
3673
3679
|
{
|
|
@@ -3689,22 +3695,22 @@ function ba({ onAdd: e, onClose: n }) {
|
|
|
3689
3695
|
})
|
|
3690
3696
|
] }, l)),
|
|
3691
3697
|
o.length === 0 && /* @__PURE__ */ i("div", { className: "px-2 py-3 text-center text-[11px] text-text-3 flex items-center justify-center gap-1.5", children: [
|
|
3692
|
-
/* @__PURE__ */ t(
|
|
3698
|
+
/* @__PURE__ */ t(ot, { size: 12 }),
|
|
3693
3699
|
'No components match "',
|
|
3694
3700
|
r,
|
|
3695
3701
|
'"'
|
|
3696
3702
|
] })
|
|
3697
3703
|
] });
|
|
3698
3704
|
}
|
|
3699
|
-
function
|
|
3705
|
+
function Pa() {
|
|
3700
3706
|
const e = v((x) => {
|
|
3701
3707
|
const h = x.config.pages;
|
|
3702
3708
|
return !h || h.length === 0 ? x.config.blocks : (h.find((N) => N.id === x.activePageId) ?? h[0]).blocks;
|
|
3703
|
-
}), { duplicateBlock: n, removeBlock: r, moveBlock: a, addBlock: o } = v(), { selectedBlockId: s, selectBlock: l } = P(), [c, d] = C(!1), p =
|
|
3704
|
-
|
|
3705
|
-
|
|
3709
|
+
}), { duplicateBlock: n, removeBlock: r, moveBlock: a, addBlock: o } = v(), { selectedBlockId: s, selectBlock: l } = P(), [c, d] = C(!1), p = nr(
|
|
3710
|
+
Be(ar, { activationConstraint: { distance: 5 } }),
|
|
3711
|
+
Be(or, { coordinateGetter: lr })
|
|
3706
3712
|
);
|
|
3707
|
-
function
|
|
3713
|
+
function u(x) {
|
|
3708
3714
|
const { active: h, over: w } = x;
|
|
3709
3715
|
if (!w || h.id === w.id) return;
|
|
3710
3716
|
const N = e.findIndex((y) => y.id === h.id), b = e.findIndex((y) => y.id === w.id);
|
|
@@ -3717,7 +3723,9 @@ function fa() {
|
|
|
3717
3723
|
id: `block-${Date.now()}`,
|
|
3718
3724
|
type: x,
|
|
3719
3725
|
variant: h.variants[0],
|
|
3720
|
-
|
|
3726
|
+
// ISS-005 review item 3: deep copy — defaultProps now hold shared array-of-object
|
|
3727
|
+
// constants; a shallow spread would let this block's edits mutate every future insert.
|
|
3728
|
+
props: structuredClone(h.defaultProps)
|
|
3721
3729
|
};
|
|
3722
3730
|
o(w), l(w.id), S(`${h.label} added`);
|
|
3723
3731
|
}
|
|
@@ -3726,8 +3734,8 @@ function fa() {
|
|
|
3726
3734
|
/* @__PURE__ */ t("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-text-3", children: "Layers" }),
|
|
3727
3735
|
/* @__PURE__ */ t("span", { className: "text-[10px] text-text-3", children: e.length })
|
|
3728
3736
|
] }),
|
|
3729
|
-
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-2 pb-2", children: /* @__PURE__ */ t(
|
|
3730
|
-
|
|
3737
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto px-2 pb-2", children: /* @__PURE__ */ t(sr, { sensors: p, collisionDetection: ir, onDragEnd: u, children: /* @__PURE__ */ t(cr, { items: e.map((x) => x.id), strategy: dr, children: e.map((x) => /* @__PURE__ */ t(
|
|
3738
|
+
Ca,
|
|
3731
3739
|
{
|
|
3732
3740
|
block: x,
|
|
3733
3741
|
isSelected: s === x.id,
|
|
@@ -3756,57 +3764,59 @@ function fa() {
|
|
|
3756
3764
|
onClick: () => d(!c),
|
|
3757
3765
|
className: "w-full py-2 rounded-md border border-dashed border-border-default text-text-2 text-xs flex items-center justify-center gap-1.5 transition-all hover:border-green hover:text-green hover:bg-green-glow2",
|
|
3758
3766
|
children: [
|
|
3759
|
-
/* @__PURE__ */ t(
|
|
3767
|
+
/* @__PURE__ */ t(le, { size: 13 }),
|
|
3760
3768
|
"Add Component"
|
|
3761
3769
|
]
|
|
3762
3770
|
}
|
|
3763
3771
|
),
|
|
3764
|
-
c && /* @__PURE__ */ t(
|
|
3772
|
+
c && /* @__PURE__ */ t($a, { onAdd: f, onClose: () => d(!1) })
|
|
3765
3773
|
] })
|
|
3766
3774
|
] });
|
|
3767
3775
|
}
|
|
3768
|
-
function
|
|
3776
|
+
function Ta() {
|
|
3769
3777
|
return `block-${Date.now()}`;
|
|
3770
3778
|
}
|
|
3771
|
-
const
|
|
3772
|
-
navbar:
|
|
3773
|
-
hero:
|
|
3774
|
-
features:
|
|
3775
|
-
pricing:
|
|
3776
|
-
cta:
|
|
3777
|
-
footer:
|
|
3778
|
-
testimonials:
|
|
3779
|
-
stats:
|
|
3780
|
-
faq:
|
|
3781
|
-
team:
|
|
3782
|
-
contact:
|
|
3783
|
-
newsletter:
|
|
3784
|
-
logocloud:
|
|
3785
|
-
divider:
|
|
3786
|
-
banner:
|
|
3787
|
-
content:
|
|
3788
|
-
image:
|
|
3789
|
-
video:
|
|
3790
|
-
gallery:
|
|
3779
|
+
const Ia = {
|
|
3780
|
+
navbar: Z,
|
|
3781
|
+
hero: at,
|
|
3782
|
+
features: nt,
|
|
3783
|
+
pricing: rt,
|
|
3784
|
+
cta: tt,
|
|
3785
|
+
footer: et,
|
|
3786
|
+
testimonials: Xe,
|
|
3787
|
+
stats: Qe,
|
|
3788
|
+
faq: Se,
|
|
3789
|
+
team: Ze,
|
|
3790
|
+
contact: ke,
|
|
3791
|
+
newsletter: Ye,
|
|
3792
|
+
logocloud: Ke,
|
|
3793
|
+
divider: We,
|
|
3794
|
+
banner: Ve,
|
|
3795
|
+
content: Je,
|
|
3796
|
+
image: se,
|
|
3797
|
+
video: Ne,
|
|
3798
|
+
gallery: _e
|
|
3791
3799
|
};
|
|
3792
|
-
function
|
|
3800
|
+
function ja() {
|
|
3793
3801
|
const [e, n] = C(""), r = v((c) => c.addBlock), a = P((c) => c.selectBlock), o = A.filter(
|
|
3794
3802
|
(c) => c.label.toLowerCase().includes(e.toLowerCase()) || c.category.toLowerCase().includes(e.toLowerCase())
|
|
3795
3803
|
), s = o.reduce((c, d) => (c[d.category] || (c[d.category] = []), c[d.category].push(d), c), {});
|
|
3796
3804
|
function l(c) {
|
|
3797
|
-
const d = A.find((
|
|
3805
|
+
const d = A.find((u) => u.type === c);
|
|
3798
3806
|
if (!d) return;
|
|
3799
3807
|
const p = {
|
|
3800
|
-
id:
|
|
3808
|
+
id: Ta(),
|
|
3801
3809
|
type: c,
|
|
3802
3810
|
variant: d.variants[0],
|
|
3803
|
-
|
|
3811
|
+
// ISS-005 review item 3: deep copy — defaultProps now hold shared array-of-object
|
|
3812
|
+
// constants; a shallow spread would let this block's edits mutate every future insert.
|
|
3813
|
+
props: structuredClone(d.defaultProps)
|
|
3804
3814
|
};
|
|
3805
3815
|
r(p), a(p.id), S(`${d.label} added`);
|
|
3806
3816
|
}
|
|
3807
3817
|
return /* @__PURE__ */ i("div", { className: "flex flex-col flex-1 overflow-hidden", children: [
|
|
3808
3818
|
/* @__PURE__ */ t("div", { className: "px-3 pt-2.5 pb-1.5", children: /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
3809
|
-
/* @__PURE__ */ t(
|
|
3819
|
+
/* @__PURE__ */ t(ot, { size: 12, className: "absolute left-2 top-1/2 -translate-y-1/2 text-text-3" }),
|
|
3810
3820
|
/* @__PURE__ */ t(
|
|
3811
3821
|
"input",
|
|
3812
3822
|
{
|
|
@@ -3823,16 +3833,16 @@ function ya() {
|
|
|
3823
3833
|
Object.entries(s).map(([c, d]) => /* @__PURE__ */ i("div", { children: [
|
|
3824
3834
|
/* @__PURE__ */ t("div", { className: "text-[9px] font-semibold uppercase tracking-wider text-text-3 px-1.5 pt-2.5 pb-1", children: c }),
|
|
3825
3835
|
d.map((p) => {
|
|
3826
|
-
const
|
|
3836
|
+
const u = Ia[p.type] || Z;
|
|
3827
3837
|
return /* @__PURE__ */ i(
|
|
3828
3838
|
"button",
|
|
3829
3839
|
{
|
|
3830
3840
|
onClick: () => l(p.type),
|
|
3831
3841
|
className: "w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md text-[12px] text-text-1 hover:bg-bg-3 hover:text-text-0 transition-colors text-left group",
|
|
3832
3842
|
children: [
|
|
3833
|
-
/* @__PURE__ */ t("div", { className: "w-[22px] h-[22px] rounded border border-border-default bg-bg-3 flex items-center justify-center text-[10px] shrink-0", children: /* @__PURE__ */ t(
|
|
3843
|
+
/* @__PURE__ */ t("div", { className: "w-[22px] h-[22px] rounded border border-border-default bg-bg-3 flex items-center justify-center text-[10px] shrink-0", children: /* @__PURE__ */ t(u, { size: 12 }) }),
|
|
3834
3844
|
/* @__PURE__ */ t("span", { className: "flex-1", children: p.label }),
|
|
3835
|
-
/* @__PURE__ */ t(
|
|
3845
|
+
/* @__PURE__ */ t(le, { size: 11, className: "text-text-3 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
3836
3846
|
]
|
|
3837
3847
|
},
|
|
3838
3848
|
p.type
|
|
@@ -3847,7 +3857,7 @@ function ya() {
|
|
|
3847
3857
|
] })
|
|
3848
3858
|
] });
|
|
3849
3859
|
}
|
|
3850
|
-
function
|
|
3860
|
+
function Aa() {
|
|
3851
3861
|
const [e, n] = C("layers");
|
|
3852
3862
|
return /* @__PURE__ */ i("div", { className: "hidden md:flex w-[280px] bg-bg-1 border-r border-border-default flex-col shrink-0", children: [
|
|
3853
3863
|
/* @__PURE__ */ i("div", { className: "flex border-b border-border-default shrink-0", children: [
|
|
@@ -3868,10 +3878,10 @@ function wa() {
|
|
|
3868
3878
|
}
|
|
3869
3879
|
)
|
|
3870
3880
|
] }),
|
|
3871
|
-
e === "layers" ? /* @__PURE__ */ t(
|
|
3881
|
+
e === "layers" ? /* @__PURE__ */ t(Pa, {}) : /* @__PURE__ */ t(ja, {})
|
|
3872
3882
|
] });
|
|
3873
3883
|
}
|
|
3874
|
-
const
|
|
3884
|
+
const Da = {
|
|
3875
3885
|
navbar: {
|
|
3876
3886
|
sections: [
|
|
3877
3887
|
{
|
|
@@ -4194,7 +4204,7 @@ const ka = {
|
|
|
4194
4204
|
]
|
|
4195
4205
|
}
|
|
4196
4206
|
};
|
|
4197
|
-
function
|
|
4207
|
+
function Ba({ field: e, block: n }) {
|
|
4198
4208
|
const r = v((l) => l.updateBlockProps), a = v((l) => l.updateBlock), o = e.key === "variant" ? n.variant : n.props[e.key], s = (l) => {
|
|
4199
4209
|
e.key === "variant" ? a(n.id, { variant: l }) : r(n.id, { [e.key]: l });
|
|
4200
4210
|
};
|
|
@@ -4249,8 +4259,8 @@ function Na({ field: e, block: n }) {
|
|
|
4249
4259
|
type: "text",
|
|
4250
4260
|
value: c,
|
|
4251
4261
|
onChange: (p) => {
|
|
4252
|
-
const
|
|
4253
|
-
|
|
4262
|
+
const u = [...l];
|
|
4263
|
+
u[d] = p.target.value, s(u);
|
|
4254
4264
|
},
|
|
4255
4265
|
className: "flex-1 px-2 py-1 rounded border border-border-default bg-bg-2 text-text-0 text-xs outline-none focus:border-green"
|
|
4256
4266
|
}
|
|
@@ -4258,7 +4268,7 @@ function Na({ field: e, block: n }) {
|
|
|
4258
4268
|
/* @__PURE__ */ t(
|
|
4259
4269
|
"button",
|
|
4260
4270
|
{
|
|
4261
|
-
onClick: () => s(l.filter((p,
|
|
4271
|
+
onClick: () => s(l.filter((p, u) => u !== d)),
|
|
4262
4272
|
className: "px-1.5 text-text-3 hover:text-status-red text-xs transition-colors",
|
|
4263
4273
|
children: "x"
|
|
4264
4274
|
}
|
|
@@ -4278,7 +4288,7 @@ function Na({ field: e, block: n }) {
|
|
|
4278
4288
|
let l = function() {
|
|
4279
4289
|
if (c.length > 0) {
|
|
4280
4290
|
const p = {};
|
|
4281
|
-
for (const
|
|
4291
|
+
for (const u of Object.keys(c[0])) p[u] = "";
|
|
4282
4292
|
return p;
|
|
4283
4293
|
}
|
|
4284
4294
|
return {
|
|
@@ -4303,14 +4313,14 @@ function Na({ field: e, block: n }) {
|
|
|
4303
4313
|
/* @__PURE__ */ t(
|
|
4304
4314
|
"button",
|
|
4305
4315
|
{
|
|
4306
|
-
onClick: () => s(c.filter((
|
|
4316
|
+
onClick: () => s(c.filter((u, f) => f !== p)),
|
|
4307
4317
|
className: "text-[10px] text-text-3 hover:text-status-red transition-colors",
|
|
4308
4318
|
children: "Remove"
|
|
4309
4319
|
}
|
|
4310
4320
|
)
|
|
4311
4321
|
] }),
|
|
4312
|
-
Object.entries(d).map(([
|
|
4313
|
-
/* @__PURE__ */ t("label", { className: "block text-[10px] text-text-3 mb-0.5", children:
|
|
4322
|
+
Object.entries(d).map(([u, f]) => /* @__PURE__ */ i("div", { className: "mb-1", children: [
|
|
4323
|
+
/* @__PURE__ */ t("label", { className: "block text-[10px] text-text-3 mb-0.5", children: u }),
|
|
4314
4324
|
/* @__PURE__ */ t(
|
|
4315
4325
|
"input",
|
|
4316
4326
|
{
|
|
@@ -4318,12 +4328,12 @@ function Na({ field: e, block: n }) {
|
|
|
4318
4328
|
value: String(f),
|
|
4319
4329
|
onChange: (x) => {
|
|
4320
4330
|
const h = [...c];
|
|
4321
|
-
h[p] = { ...h[p], [
|
|
4331
|
+
h[p] = { ...h[p], [u]: x.target.value }, s(h);
|
|
4322
4332
|
},
|
|
4323
4333
|
className: "w-full px-1.5 py-1 rounded border border-border-subtle bg-bg-3 text-text-0 text-[11px] outline-none focus:border-green"
|
|
4324
4334
|
}
|
|
4325
4335
|
)
|
|
4326
|
-
] },
|
|
4336
|
+
] }, u))
|
|
4327
4337
|
] }, p)),
|
|
4328
4338
|
/* @__PURE__ */ t(
|
|
4329
4339
|
"button",
|
|
@@ -4339,7 +4349,7 @@ function Na({ field: e, block: n }) {
|
|
|
4339
4349
|
return null;
|
|
4340
4350
|
}
|
|
4341
4351
|
}
|
|
4342
|
-
function
|
|
4352
|
+
function La({ title: e, children: n }) {
|
|
4343
4353
|
const [r, a] = C(!0);
|
|
4344
4354
|
return /* @__PURE__ */ i("div", { className: "border-b border-border-subtle", children: [
|
|
4345
4355
|
/* @__PURE__ */ i(
|
|
@@ -4348,7 +4358,7 @@ function Sa({ title: e, children: n }) {
|
|
|
4348
4358
|
onClick: () => a(!r),
|
|
4349
4359
|
className: "w-full px-3.5 py-2.5 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wider text-text-3 hover:text-text-2 transition-colors",
|
|
4350
4360
|
children: [
|
|
4351
|
-
r ? /* @__PURE__ */ t(
|
|
4361
|
+
r ? /* @__PURE__ */ t(oe, { size: 12 }) : /* @__PURE__ */ t(ze, { size: 12 }),
|
|
4352
4362
|
e
|
|
4353
4363
|
]
|
|
4354
4364
|
}
|
|
@@ -4356,14 +4366,14 @@ function Sa({ title: e, children: n }) {
|
|
|
4356
4366
|
r && /* @__PURE__ */ t("div", { className: "px-3.5 pb-3", children: n })
|
|
4357
4367
|
] });
|
|
4358
4368
|
}
|
|
4359
|
-
function
|
|
4360
|
-
const [n, r] = C(!1), a =
|
|
4361
|
-
return /* @__PURE__ */ i(
|
|
4369
|
+
function Ma({ block: e }) {
|
|
4370
|
+
const [n, r] = C(!1), a = Da[e.type];
|
|
4371
|
+
return /* @__PURE__ */ i(J, { children: [
|
|
4362
4372
|
/* @__PURE__ */ i("div", { className: "px-3.5 py-3 border-b border-border-default flex items-center justify-between", children: [
|
|
4363
4373
|
/* @__PURE__ */ t("span", { className: "text-[11px] font-semibold uppercase tracking-wider text-text-2", children: "Properties" }),
|
|
4364
4374
|
/* @__PURE__ */ t("span", { className: "text-[10px] px-2 py-0.5 rounded-full bg-green-glow text-green font-semibold", children: e.type })
|
|
4365
4375
|
] }),
|
|
4366
|
-
a?.sections.map((o) => /* @__PURE__ */ t(
|
|
4376
|
+
a?.sections.map((o) => /* @__PURE__ */ t(La, { title: o.title, children: o.fields.map((s) => /* @__PURE__ */ t(Ba, { field: s, block: e }, s.key)) }, o.title)) || /* @__PURE__ */ t("div", { className: "p-3.5 text-[11px] text-text-3", children: "No editable properties defined for this block type." }),
|
|
4367
4377
|
/* @__PURE__ */ i("div", { className: "border-t border-border-subtle", children: [
|
|
4368
4378
|
/* @__PURE__ */ i(
|
|
4369
4379
|
"button",
|
|
@@ -4371,7 +4381,7 @@ function Ca({ block: e }) {
|
|
|
4371
4381
|
onClick: () => r(!n),
|
|
4372
4382
|
className: "w-full px-3.5 py-2 flex items-center gap-1.5 text-[10px] text-text-3 hover:text-text-2 transition-colors",
|
|
4373
4383
|
children: [
|
|
4374
|
-
/* @__PURE__ */ t(
|
|
4384
|
+
/* @__PURE__ */ t(ye, { size: 11 }),
|
|
4375
4385
|
n ? "Hide" : "View",
|
|
4376
4386
|
" Block JSON"
|
|
4377
4387
|
]
|
|
@@ -4381,7 +4391,7 @@ function Ca({ block: e }) {
|
|
|
4381
4391
|
] })
|
|
4382
4392
|
] });
|
|
4383
4393
|
}
|
|
4384
|
-
function
|
|
4394
|
+
function Oa() {
|
|
4385
4395
|
const e = P((d) => d.selectedBlockId), n = v((d) => {
|
|
4386
4396
|
const p = d.config.pages;
|
|
4387
4397
|
return !p || p.length === 0 ? d.config.blocks : (p.find((f) => f.id === d.activePageId) ?? p[0]).blocks;
|
|
@@ -4406,15 +4416,15 @@ function $a() {
|
|
|
4406
4416
|
}
|
|
4407
4417
|
)
|
|
4408
4418
|
] }),
|
|
4409
|
-
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto", children: c === "design" ? /* @__PURE__ */ t(
|
|
4410
|
-
/* @__PURE__ */ t(
|
|
4419
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto", children: c === "design" ? /* @__PURE__ */ t(Sa, {}) : r ? /* @__PURE__ */ i(J, { children: [
|
|
4420
|
+
/* @__PURE__ */ t(Ma, { block: r }),
|
|
4411
4421
|
/* @__PURE__ */ i("div", { className: "mt-auto px-3.5 py-2.5 font-mono text-[10.5px] text-text-3 break-all border-t border-border-subtle", children: [
|
|
4412
4422
|
"config.blocks[",
|
|
4413
4423
|
n.indexOf(r),
|
|
4414
4424
|
"]"
|
|
4415
4425
|
] })
|
|
4416
4426
|
] }) : /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center text-center px-6 py-16 gap-3", children: [
|
|
4417
|
-
/* @__PURE__ */ t("div", { className: "w-10 h-10 rounded-lg bg-bg-3 border border-border-default flex items-center justify-center", children: /* @__PURE__ */ t(
|
|
4427
|
+
/* @__PURE__ */ t("div", { className: "w-10 h-10 rounded-lg bg-bg-3 border border-border-default flex items-center justify-center", children: /* @__PURE__ */ t(Kt, { size: 16, className: "text-text-3" }) }),
|
|
4418
4428
|
/* @__PURE__ */ i("div", { children: [
|
|
4419
4429
|
/* @__PURE__ */ t("p", { className: "text-text-1 text-[12px] font-medium", children: "Click a block to edit" }),
|
|
4420
4430
|
/* @__PURE__ */ t("p", { className: "text-text-3 text-[11px] mt-1", children: "Select any block on the canvas to see its properties here" })
|
|
@@ -4422,11 +4432,11 @@ function $a() {
|
|
|
4422
4432
|
] }) })
|
|
4423
4433
|
] });
|
|
4424
4434
|
}
|
|
4425
|
-
function
|
|
4435
|
+
function Fa(e) {
|
|
4426
4436
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
4427
4437
|
}
|
|
4428
|
-
function
|
|
4429
|
-
return
|
|
4438
|
+
function Ea(e) {
|
|
4439
|
+
return Fa(e).replace(
|
|
4430
4440
|
/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\&])*?"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,
|
|
4431
4441
|
(r) => {
|
|
4432
4442
|
let a = "text-status-yellow";
|
|
@@ -4439,10 +4449,10 @@ function Ta(e) {
|
|
|
4439
4449
|
}
|
|
4440
4450
|
);
|
|
4441
4451
|
}
|
|
4442
|
-
function
|
|
4443
|
-
const e = v((N) => N.config), n = v((N) => N.setConfig), { jsonDrawerOpen: r, toggleJsonDrawer: a } = P(), [o, s] = C(!1), [l, c] = C(""), [d, p] = C(null),
|
|
4452
|
+
function Ha() {
|
|
4453
|
+
const e = v((N) => N.config), n = v((N) => N.setConfig), { jsonDrawerOpen: r, toggleJsonDrawer: a } = P(), [o, s] = C(!1), [l, c] = C(""), [d, p] = C(null), u = JSON.stringify(e, null, 2), f = Ea(u);
|
|
4444
4454
|
function x() {
|
|
4445
|
-
c(
|
|
4455
|
+
c(u), p(null), s(!0);
|
|
4446
4456
|
}
|
|
4447
4457
|
function h() {
|
|
4448
4458
|
try {
|
|
@@ -4484,7 +4494,7 @@ function Ia() {
|
|
|
4484
4494
|
children: "Edit"
|
|
4485
4495
|
}
|
|
4486
4496
|
),
|
|
4487
|
-
o && /* @__PURE__ */ i(
|
|
4497
|
+
o && /* @__PURE__ */ i(J, { children: [
|
|
4488
4498
|
/* @__PURE__ */ t(
|
|
4489
4499
|
"button",
|
|
4490
4500
|
{
|
|
@@ -4532,14 +4542,14 @@ function Ia() {
|
|
|
4532
4542
|
}
|
|
4533
4543
|
);
|
|
4534
4544
|
}
|
|
4535
|
-
function
|
|
4545
|
+
function za(e) {
|
|
4536
4546
|
const n = Math.floor((Date.now() - e) / 1e3);
|
|
4537
4547
|
if (n < 10) return "Just now";
|
|
4538
4548
|
if (n < 60) return `${n}s ago`;
|
|
4539
4549
|
const r = Math.floor(n / 60);
|
|
4540
4550
|
return r < 60 ? `${r}m ago` : `${Math.floor(r / 60)}h ago`;
|
|
4541
4551
|
}
|
|
4542
|
-
function
|
|
4552
|
+
function Ra() {
|
|
4543
4553
|
const { historyOpen: e, toggleHistory: n } = P(), r = v((s) => s.undoStack), a = D(null), o = [...r].reverse();
|
|
4544
4554
|
return I(() => {
|
|
4545
4555
|
if (!e) return;
|
|
@@ -4564,7 +4574,7 @@ function Aa() {
|
|
|
4564
4574
|
children: [
|
|
4565
4575
|
/* @__PURE__ */ i("div", { className: "px-4 py-3.5 border-b border-border-default flex items-center justify-between", children: [
|
|
4566
4576
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
4567
|
-
/* @__PURE__ */ t(
|
|
4577
|
+
/* @__PURE__ */ t(qe, { size: 14, className: "text-text-2" }),
|
|
4568
4578
|
/* @__PURE__ */ t("h3", { className: "text-sm font-semibold", children: "Version History" }),
|
|
4569
4579
|
/* @__PURE__ */ i("span", { className: "text-[10px] text-text-3", children: [
|
|
4570
4580
|
"(",
|
|
@@ -4577,7 +4587,7 @@ function Aa() {
|
|
|
4577
4587
|
{
|
|
4578
4588
|
onClick: n,
|
|
4579
4589
|
className: "w-7 h-7 rounded flex items-center justify-center text-text-3 hover:text-text-0 hover:bg-bg-3 transition-colors",
|
|
4580
|
-
children: /* @__PURE__ */ t(
|
|
4590
|
+
children: /* @__PURE__ */ t(ie, { size: 14 })
|
|
4581
4591
|
}
|
|
4582
4592
|
)
|
|
4583
4593
|
] }),
|
|
@@ -4598,12 +4608,12 @@ function Aa() {
|
|
|
4598
4608
|
className: "p-3 rounded-lg cursor-pointer transition-colors mb-0.5 hover:bg-bg-3 group",
|
|
4599
4609
|
children: [
|
|
4600
4610
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5 text-[11px] text-text-2 mb-1", children: [
|
|
4601
|
-
/* @__PURE__ */ t("span", { children:
|
|
4611
|
+
/* @__PURE__ */ t("span", { children: za(s.timestamp) }),
|
|
4602
4612
|
/* @__PURE__ */ t("span", { className: "text-[9px] px-1.5 py-0.5 rounded-full font-semibold bg-status-blue/10 text-status-blue", children: "manual" })
|
|
4603
4613
|
] }),
|
|
4604
4614
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
4605
4615
|
/* @__PURE__ */ t("div", { className: "text-[12.5px] text-text-1", children: s.label }),
|
|
4606
|
-
/* @__PURE__ */ t(
|
|
4616
|
+
/* @__PURE__ */ t(Yt, { size: 12, className: "text-text-3 opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
4607
4617
|
] })
|
|
4608
4618
|
]
|
|
4609
4619
|
},
|
|
@@ -4615,13 +4625,13 @@ function Aa() {
|
|
|
4615
4625
|
}
|
|
4616
4626
|
);
|
|
4617
4627
|
}
|
|
4618
|
-
const
|
|
4628
|
+
const ne = [
|
|
4619
4629
|
{ label: "Analyzing prompt", duration: 3 },
|
|
4620
4630
|
{ label: "Generating layout", duration: 5 },
|
|
4621
4631
|
{ label: "Writing copy", duration: 4 },
|
|
4622
4632
|
{ label: "Applying theme", duration: 3 }
|
|
4623
4633
|
];
|
|
4624
|
-
function
|
|
4634
|
+
function Ga(e, n) {
|
|
4625
4635
|
switch (n.type) {
|
|
4626
4636
|
case "start":
|
|
4627
4637
|
return { elapsed: 0, showAfterFade: !0 };
|
|
@@ -4633,25 +4643,25 @@ function Da(e, n) {
|
|
|
4633
4643
|
return e;
|
|
4634
4644
|
}
|
|
4635
4645
|
}
|
|
4636
|
-
function
|
|
4637
|
-
const e = P((p) => p.isGenerating), n = P((p) => p.clearGeneration), [{ elapsed: r, showAfterFade: a }, o] =
|
|
4646
|
+
function Ua() {
|
|
4647
|
+
const e = P((p) => p.isGenerating), n = P((p) => p.clearGeneration), [{ elapsed: r, showAfterFade: a }, o] = Tt(Ga, {
|
|
4638
4648
|
elapsed: 0,
|
|
4639
4649
|
showAfterFade: !1
|
|
4640
4650
|
});
|
|
4641
4651
|
I(() => {
|
|
4642
4652
|
if (e) {
|
|
4643
4653
|
o({ type: "start" });
|
|
4644
|
-
const
|
|
4645
|
-
return () => clearInterval(
|
|
4654
|
+
const u = setInterval(() => o({ type: "tick" }), 1e3);
|
|
4655
|
+
return () => clearInterval(u);
|
|
4646
4656
|
}
|
|
4647
4657
|
const p = setTimeout(() => o({ type: "hide" }), 600);
|
|
4648
4658
|
return () => clearTimeout(p);
|
|
4649
4659
|
}, [e]);
|
|
4650
4660
|
const s = e || a, l = !e && a;
|
|
4651
4661
|
if (!s) return null;
|
|
4652
|
-
let c = 0, d =
|
|
4653
|
-
for (let p = 0; p <
|
|
4654
|
-
if (c +=
|
|
4662
|
+
let c = 0, d = ne.length - 1;
|
|
4663
|
+
for (let p = 0; p < ne.length; p++)
|
|
4664
|
+
if (c += ne[p].duration, r < c) {
|
|
4655
4665
|
d = p;
|
|
4656
4666
|
break;
|
|
4657
4667
|
}
|
|
@@ -4706,10 +4716,10 @@ function Ba() {
|
|
|
4706
4716
|
] })
|
|
4707
4717
|
] })
|
|
4708
4718
|
] }),
|
|
4709
|
-
/* @__PURE__ */ t("div", { className: "w-full space-y-2", children:
|
|
4710
|
-
/* @__PURE__ */ t("div", { className: `w-5 h-5 rounded-full flex items-center justify-center text-[10px] font-semibold border transition-all duration-500 ${
|
|
4711
|
-
/* @__PURE__ */ t("span", { className: `text-[12px] transition-colors duration-500 ${
|
|
4712
|
-
|
|
4719
|
+
/* @__PURE__ */ t("div", { className: "w-full space-y-2", children: ne.map((p, u) => /* @__PURE__ */ i("div", { className: "flex items-center gap-3", children: [
|
|
4720
|
+
/* @__PURE__ */ t("div", { className: `w-5 h-5 rounded-full flex items-center justify-center text-[10px] font-semibold border transition-all duration-500 ${u < d ? "bg-green/20 border-green/40 text-green" : u === d ? "border-green text-green animate-pulse" : "border-border-default text-text-3"}`, children: u < d ? /* @__PURE__ */ t("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ t("path", { d: "M2 5L4 7L8 3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ t("span", { children: u + 1 }) }),
|
|
4721
|
+
/* @__PURE__ */ t("span", { className: `text-[12px] transition-colors duration-500 ${u < d ? "text-text-2" : u === d ? "text-text-0 font-medium" : "text-text-3"}`, children: p.label }),
|
|
4722
|
+
u === d && /* @__PURE__ */ t("div", { className: "flex-1 h-1 rounded-full bg-bg-3 overflow-hidden ml-auto max-w-[80px]", children: /* @__PURE__ */ t("div", { className: "h-full bg-green/60 rounded-full gen-progress" }) })
|
|
4713
4723
|
] }, p.label)) }),
|
|
4714
4724
|
/* @__PURE__ */ i(
|
|
4715
4725
|
"button",
|
|
@@ -4717,7 +4727,7 @@ function Ba() {
|
|
|
4717
4727
|
onClick: () => n(),
|
|
4718
4728
|
className: "px-4 py-2 rounded-lg bg-bg-2 text-text-2 text-[12px] border border-border-default hover:bg-bg-3 hover:text-text-0 hover:border-border-hover transition-all inline-flex items-center gap-1.5",
|
|
4719
4729
|
children: [
|
|
4720
|
-
/* @__PURE__ */ t(
|
|
4730
|
+
/* @__PURE__ */ t(ie, { size: 12 }),
|
|
4721
4731
|
"Cancel"
|
|
4722
4732
|
]
|
|
4723
4733
|
}
|
|
@@ -4758,7 +4768,7 @@ function Ba() {
|
|
|
4758
4768
|
}
|
|
4759
4769
|
);
|
|
4760
4770
|
}
|
|
4761
|
-
const
|
|
4771
|
+
const qa = `You are a website configuration generator for OpenPage, a visual website builder.
|
|
4762
4772
|
|
|
4763
4773
|
Given a user's description, generate a complete JSON site configuration.
|
|
4764
4774
|
|
|
@@ -4787,12 +4797,12 @@ Each page has its own blocks array. Generate at least 2 pages: Home and one addi
|
|
|
4787
4797
|
|
|
4788
4798
|
## Available Block Types
|
|
4789
4799
|
|
|
4790
|
-
1. navbar (variants: default, centered) - Props: { logo, links[], ctaText }
|
|
4800
|
+
1. navbar (variants: default, centered) - Props: { logo, links: string[], ctaText }
|
|
4791
4801
|
2. hero (variants: centered, split, gradient, minimal) - Props: { badge?, headline, subheadline, primaryCta, secondaryCta? }
|
|
4792
4802
|
3. features (variants: grid, list, alternating) - Props: { label?, title, subtitle?, items: [{ icon?, title, description }] }
|
|
4793
|
-
4. pricing (variants: simple, comparison) - Props: { title, subtitle?, tiers?: [{ name, price, period?, description?, features[], cta, featured? }] }
|
|
4803
|
+
4. pricing (variants: simple, comparison) - Props: { title, subtitle?, tiers?: [{ name, price, period?, description?, features: string[], cta, featured? }] }
|
|
4794
4804
|
5. cta (variants: simple, split) - Props: { headline, subheadline?, buttonText }
|
|
4795
|
-
6. footer (variants: simple, multi-column, minimal) - Props: { logo, copyright, links[] }
|
|
4805
|
+
6. footer (variants: simple, multi-column, minimal) - Props: { logo, copyright, links: string[], columns?: [{ title, links: string[] }] }
|
|
4796
4806
|
7. testimonials (variants: cards, carousel, spotlight) - Props: { title?, items?: [{ name, role?, quote, rating? }] }
|
|
4797
4807
|
8. stats (variants: grid, bar, counter) - Props: { title?, items?: [{ value, label }] }
|
|
4798
4808
|
9. faq (variants: accordion) - Props: { title?, items?: [{ question, answer }] }
|
|
@@ -4820,18 +4830,58 @@ Fonts: DM Sans, Inter, Space Grotesk, Poppins, Manrope, Outfit, Plus Jakarta San
|
|
|
4820
4830
|
6. Do NOT use placeholder text like "Lorem ipsum"
|
|
4821
4831
|
7. Make copy compelling and specific to the described business
|
|
4822
4832
|
8. Each page needs a unique id (page-home, page-about, etc.), a name, and a path (/, /about, etc.)
|
|
4833
|
+
9. Link/label arrays (navbar links, footer links, footer columns[].links, pricing tiers[].features) are plain strings — NEVER objects like {label, href}
|
|
4823
4834
|
|
|
4824
|
-
Return ONLY valid JSON. No markdown, no code fences, no explanation
|
|
4825
|
-
function
|
|
4826
|
-
return
|
|
4835
|
+
Return ONLY valid JSON. No markdown, no code fences, no explanation.`, _a = ["label", "text", "title", "name"];
|
|
4836
|
+
function q(e) {
|
|
4837
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
4838
|
+
}
|
|
4839
|
+
function Fe(e) {
|
|
4840
|
+
if (typeof e == "string") return e;
|
|
4841
|
+
if (typeof e == "number" && Number.isFinite(e) || typeof e == "boolean") return String(e);
|
|
4842
|
+
if (q(e)) {
|
|
4843
|
+
for (const n of _a)
|
|
4844
|
+
if (typeof e[n] == "string") return e[n];
|
|
4845
|
+
}
|
|
4846
|
+
return null;
|
|
4847
|
+
}
|
|
4848
|
+
function Ja(e, n) {
|
|
4849
|
+
if (typeof n == "string")
|
|
4850
|
+
return Fe(e) ?? n;
|
|
4851
|
+
if (typeof n == "number")
|
|
4852
|
+
return typeof e == "number" && Number.isFinite(e) ? e : typeof e == "string" && e.trim() !== "" && Number.isFinite(Number(e)) ? Number(e) : n;
|
|
4853
|
+
if (typeof n == "boolean")
|
|
4854
|
+
return typeof e == "boolean" ? e : e === "true" ? !0 : e === "false" ? !1 : n;
|
|
4855
|
+
if (Array.isArray(n)) {
|
|
4856
|
+
if (!Array.isArray(e)) return n;
|
|
4857
|
+
if (n.length === 0) return e;
|
|
4858
|
+
const r = n[0], a = [];
|
|
4859
|
+
for (const o of e)
|
|
4860
|
+
if (typeof r == "string") {
|
|
4861
|
+
const s = Fe(o);
|
|
4862
|
+
s !== null && a.push(s);
|
|
4863
|
+
} else q(r) ? q(o) && a.push(be(o, r)) : typeof o == typeof r && a.push(o);
|
|
4864
|
+
return a.length === 0 ? n : a;
|
|
4865
|
+
}
|
|
4866
|
+
return q(n) ? q(e) ? be(e, n) : n : e;
|
|
4827
4867
|
}
|
|
4828
|
-
|
|
4868
|
+
function be(e, n) {
|
|
4869
|
+
if (!q(e)) return {};
|
|
4870
|
+
const r = { ...e };
|
|
4871
|
+
for (const [a, o] of Object.entries(n))
|
|
4872
|
+
a in r && (r[a] = Ja(r[a], o));
|
|
4873
|
+
return r;
|
|
4874
|
+
}
|
|
4875
|
+
function V(e) {
|
|
4876
|
+
return Y.find((n) => n.id === e)?.theme;
|
|
4877
|
+
}
|
|
4878
|
+
const _ = [
|
|
4829
4879
|
{
|
|
4830
4880
|
keywords: ["portfolio", "personal", "resume", "freelance", "designer", "developer"],
|
|
4831
4881
|
themePresetId: "slate",
|
|
4832
4882
|
build: (e) => ({
|
|
4833
4883
|
name: e,
|
|
4834
|
-
theme:
|
|
4884
|
+
theme: V("slate"),
|
|
4835
4885
|
blocks: [
|
|
4836
4886
|
{ id: "block-navbar-1", type: "navbar", variant: "default", props: { logo: e, links: ["Work", "About", "Contact"], ctaText: "Hire Me" } },
|
|
4837
4887
|
{ id: "block-hero-1", type: "hero", variant: "minimal", props: { headline: `Hi, I'm ${e}`, subheadline: "I design and build digital experiences that make a difference.", primaryCta: "View My Work" } },
|
|
@@ -4848,7 +4898,7 @@ const q = [
|
|
|
4848
4898
|
themePresetId: "amber",
|
|
4849
4899
|
build: (e) => ({
|
|
4850
4900
|
name: e,
|
|
4851
|
-
theme:
|
|
4901
|
+
theme: V("amber"),
|
|
4852
4902
|
blocks: [
|
|
4853
4903
|
{ id: "block-navbar-1", type: "navbar", variant: "centered", props: { logo: e, links: ["Menu", "About", "Reservations", "Gallery"], ctaText: "Book a Table" } },
|
|
4854
4904
|
{ id: "block-hero-1", type: "hero", variant: "gradient", props: { headline: `Welcome to ${e}`, subheadline: "Fresh ingredients, bold flavors, unforgettable dining experiences.", primaryCta: "View Menu", secondaryCta: "Make a Reservation" } },
|
|
@@ -4865,7 +4915,7 @@ const q = [
|
|
|
4865
4915
|
themePresetId: "clean",
|
|
4866
4916
|
build: (e) => ({
|
|
4867
4917
|
name: e,
|
|
4868
|
-
theme:
|
|
4918
|
+
theme: V("clean"),
|
|
4869
4919
|
blocks: [
|
|
4870
4920
|
{ id: "block-navbar-1", type: "navbar", variant: "centered", props: { logo: e, links: ["Services", "Work", "About", "Contact"], ctaText: "Get a Quote" } },
|
|
4871
4921
|
{ id: "block-hero-1", type: "hero", variant: "split", props: { badge: "Award-Winning Agency", headline: "We build brands that matter", subheadline: "Strategy, design, and technology working together to drive real results.", primaryCta: "Start a Project", secondaryCta: "Our Work" } },
|
|
@@ -4883,7 +4933,7 @@ const q = [
|
|
|
4883
4933
|
themePresetId: "ivory",
|
|
4884
4934
|
build: (e) => ({
|
|
4885
4935
|
name: e,
|
|
4886
|
-
theme:
|
|
4936
|
+
theme: V("ivory"),
|
|
4887
4937
|
blocks: [
|
|
4888
4938
|
{ id: "block-navbar-1", type: "navbar", variant: "default", props: { logo: e, links: ["Articles", "Topics", "About"], ctaText: "Subscribe" } },
|
|
4889
4939
|
{ id: "block-hero-1", type: "hero", variant: "minimal", props: { headline: e, subheadline: "Thoughtful writing on technology, design, and the future of work.", primaryCta: "Start Reading" } },
|
|
@@ -4909,7 +4959,7 @@ Exploring ideas at the intersection of technology and humanity. From AI ethics t
|
|
|
4909
4959
|
themePresetId: "default",
|
|
4910
4960
|
build: (e) => ({
|
|
4911
4961
|
name: e,
|
|
4912
|
-
theme:
|
|
4962
|
+
theme: V("default"),
|
|
4913
4963
|
blocks: [
|
|
4914
4964
|
{ id: "block-navbar-1", type: "navbar", variant: "default", props: { logo: e, links: ["Features", "Pricing", "About"], ctaText: "Get Started" } },
|
|
4915
4965
|
{ id: "block-hero-1", type: "hero", variant: "centered", props: { badge: "Now in Beta", headline: `${e} - Build Better, Ship Faster`, subheadline: "The all-in-one platform that helps teams move from idea to production in record time.", primaryCta: "Start Free Trial", secondaryCta: "Watch Demo" } },
|
|
@@ -4922,54 +4972,55 @@ Exploring ideas at the intersection of technology and humanity. From AI ethics t
|
|
|
4922
4972
|
]
|
|
4923
4973
|
})
|
|
4924
4974
|
}
|
|
4925
|
-
],
|
|
4975
|
+
], Nt = [
|
|
4926
4976
|
{ id: "portfolio", name: "Portfolio", description: "Showcase your work and skills", accent: "#06b6d4", blockCount: 7, templateIndex: 0, icon: "Briefcase" },
|
|
4927
4977
|
{ id: "restaurant", name: "Restaurant", description: "Menu, reservations, and ambiance", accent: "#e8a838", blockCount: 7, templateIndex: 1, icon: "UtensilsCrossed" },
|
|
4928
4978
|
{ id: "agency", name: "Agency", description: "Services, case studies, and team", accent: "#228be6", blockCount: 8, templateIndex: 2, icon: "Building2" },
|
|
4929
4979
|
{ id: "blog", name: "Blog", description: "Articles, topics, and subscribers", accent: "#4f46e5", blockCount: 7, templateIndex: 3, icon: "BookOpen" }
|
|
4930
4980
|
];
|
|
4931
|
-
function
|
|
4932
|
-
const r =
|
|
4933
|
-
return r ?
|
|
4981
|
+
function Va(e, n) {
|
|
4982
|
+
const r = Nt.find((a) => a.id === e);
|
|
4983
|
+
return r ? _[r.templateIndex].build(n) : _[_.length - 1].build(n);
|
|
4934
4984
|
}
|
|
4935
|
-
function
|
|
4985
|
+
function Wa(e) {
|
|
4936
4986
|
const n = e.split(/\s+/).slice(0, 4).join(" ");
|
|
4937
4987
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
4938
4988
|
}
|
|
4939
|
-
function
|
|
4940
|
-
const n = e.toLowerCase(), r =
|
|
4941
|
-
for (const a of
|
|
4989
|
+
function fe(e) {
|
|
4990
|
+
const n = e.toLowerCase(), r = Wa(e);
|
|
4991
|
+
for (const a of _)
|
|
4942
4992
|
if (a.keywords.length !== 0 && a.keywords.some((o) => n.includes(o)))
|
|
4943
4993
|
return a.build(r);
|
|
4944
|
-
return
|
|
4994
|
+
return _[_.length - 1].build(r);
|
|
4945
4995
|
}
|
|
4946
|
-
const
|
|
4947
|
-
async function
|
|
4948
|
-
const a = localStorage.getItem(
|
|
4996
|
+
const Ka = new Set(A.map((e) => e.type)), Ya = Object.fromEntries(A.map((e) => [e.type, new Set(e.variants)])), Za = Object.fromEntries(A.map((e) => [e.type, e.defaultProps])), Qa = "gemini-3-flash-preview", Xa = "openpage-gemini-key";
|
|
4997
|
+
async function eo(e, n, r) {
|
|
4998
|
+
const a = localStorage.getItem(Xa);
|
|
4949
4999
|
if (a)
|
|
4950
5000
|
try {
|
|
4951
|
-
return { config: await
|
|
5001
|
+
return { config: await to(e, a, n), source: "ai" };
|
|
4952
5002
|
} catch (o) {
|
|
4953
5003
|
if (o instanceof Error && o.name === "AbortError") throw o;
|
|
4954
5004
|
}
|
|
4955
5005
|
if (r)
|
|
4956
5006
|
try {
|
|
4957
|
-
|
|
5007
|
+
const o = await r(e, n);
|
|
5008
|
+
return { config: St(o, e), source: "ai" };
|
|
4958
5009
|
} catch (o) {
|
|
4959
5010
|
if (o instanceof Error && o.name === "AbortError") throw o;
|
|
4960
5011
|
}
|
|
4961
|
-
return { config:
|
|
5012
|
+
return { config: fe(e), source: "template" };
|
|
4962
5013
|
}
|
|
4963
|
-
async function
|
|
5014
|
+
async function to(e, n, r) {
|
|
4964
5015
|
const a = await fetch(
|
|
4965
|
-
`https://generativelanguage.googleapis.com/v1beta/models/${
|
|
5016
|
+
`https://generativelanguage.googleapis.com/v1beta/models/${Qa}:generateContent?key=${n}`,
|
|
4966
5017
|
{
|
|
4967
5018
|
method: "POST",
|
|
4968
5019
|
headers: { "Content-Type": "application/json" },
|
|
4969
5020
|
signal: r,
|
|
4970
5021
|
body: JSON.stringify({
|
|
4971
5022
|
contents: [{ role: "user", parts: [{ text: `Generate a website configuration for: ${e}` }] }],
|
|
4972
|
-
systemInstruction: { parts: [{ text:
|
|
5023
|
+
systemInstruction: { parts: [{ text: qa }] },
|
|
4973
5024
|
generationConfig: { responseMimeType: "application/json", temperature: 0.8 }
|
|
4974
5025
|
})
|
|
4975
5026
|
}
|
|
@@ -4977,12 +5028,12 @@ async function Ua(e, n, r) {
|
|
|
4977
5028
|
if (!a.ok) throw new Error(`Gemini API error: ${a.status}`);
|
|
4978
5029
|
const s = (await a.json()).candidates?.[0]?.content?.parts?.[0]?.text;
|
|
4979
5030
|
if (!s) throw new Error("Empty Gemini response");
|
|
4980
|
-
return
|
|
5031
|
+
return St(JSON.parse(s), e);
|
|
4981
5032
|
}
|
|
4982
|
-
function
|
|
5033
|
+
function ro(e) {
|
|
4983
5034
|
return typeof e == "string" && /^#[0-9a-fA-F]{6}$/.test(e);
|
|
4984
5035
|
}
|
|
4985
|
-
function
|
|
5036
|
+
function no(e) {
|
|
4986
5037
|
const n = {}, r = [
|
|
4987
5038
|
"bg0",
|
|
4988
5039
|
"bg1",
|
|
@@ -5001,18 +5052,19 @@ function _a(e) {
|
|
|
5001
5052
|
"borderHover"
|
|
5002
5053
|
], a = ["fontSans", "fontDisplay", "fontMono"];
|
|
5003
5054
|
for (const o of r)
|
|
5004
|
-
|
|
5055
|
+
ro(e[o]) && (n[o] = e[o]);
|
|
5005
5056
|
for (const o of a)
|
|
5006
5057
|
typeof e[o] == "string" && e[o].length > 0 && (n[o] = e[o]);
|
|
5007
5058
|
return typeof e.radius == "number" && e.radius >= 0 && e.radius <= 24 && (n.radius = e.radius), typeof e.radiusLg == "number" && e.radiusLg >= 0 && e.radiusLg <= 32 && (n.radiusLg = e.radiusLg), n;
|
|
5008
5059
|
}
|
|
5009
|
-
function
|
|
5060
|
+
function ao(e, n) {
|
|
5061
|
+
if (!e || typeof e != "object") return null;
|
|
5010
5062
|
const r = e.type;
|
|
5011
|
-
if (!r || !
|
|
5012
|
-
const a =
|
|
5063
|
+
if (!r || !Ka.has(r)) return null;
|
|
5064
|
+
const a = Ya[r];
|
|
5013
5065
|
let o = e.variant;
|
|
5014
5066
|
(!o || !a?.has(o)) && (o = A.find((c) => c.type === r)?.variants[0] || "default");
|
|
5015
|
-
const s =
|
|
5067
|
+
const s = Za[r] || {}, l = typeof e.props == "object" && e.props ? { ...s, ...be(e.props, s) } : s;
|
|
5016
5068
|
return {
|
|
5017
5069
|
id: typeof e.id == "string" && e.id ? e.id : `block-${r}-${n}-${Date.now()}`,
|
|
5018
5070
|
type: r,
|
|
@@ -5020,24 +5072,24 @@ function Ja(e, n) {
|
|
|
5020
5072
|
props: l
|
|
5021
5073
|
};
|
|
5022
5074
|
}
|
|
5023
|
-
function
|
|
5075
|
+
function Ee(e) {
|
|
5024
5076
|
const n = [];
|
|
5025
5077
|
for (let r = 0; r < e.length; r++) {
|
|
5026
|
-
const a =
|
|
5078
|
+
const a = ao(e[r], r);
|
|
5027
5079
|
a && n.push(a);
|
|
5028
5080
|
}
|
|
5029
5081
|
return n;
|
|
5030
5082
|
}
|
|
5031
|
-
function
|
|
5083
|
+
function St(e, n) {
|
|
5032
5084
|
if (!e || typeof e != "object")
|
|
5033
|
-
return
|
|
5034
|
-
const r = e, a = typeof r.name == "string" ? r.name :
|
|
5085
|
+
return fe(n || "");
|
|
5086
|
+
const r = e, a = typeof r.name == "string" ? r.name : oo(n);
|
|
5035
5087
|
let o;
|
|
5036
5088
|
if (Array.isArray(r.pages) && r.pages.length > 0) {
|
|
5037
5089
|
o = [];
|
|
5038
5090
|
for (const c of r.pages) {
|
|
5039
5091
|
if (!c || typeof c != "object") continue;
|
|
5040
|
-
const d = c, p = Array.isArray(d.blocks) ?
|
|
5092
|
+
const d = c, p = Array.isArray(d.blocks) ? Ee(d.blocks) : [];
|
|
5041
5093
|
p.length > 0 && o.push({
|
|
5042
5094
|
id: typeof d.id == "string" ? d.id : `page-${Date.now()}-${o.length}`,
|
|
5043
5095
|
name: typeof d.name == "string" ? d.name : `Page ${o.length + 1}`,
|
|
@@ -5048,24 +5100,24 @@ function Va(e, n) {
|
|
|
5048
5100
|
o.length === 0 && (o = void 0);
|
|
5049
5101
|
}
|
|
5050
5102
|
let s = [];
|
|
5051
|
-
if (Array.isArray(r.blocks) && (s =
|
|
5052
|
-
return
|
|
5103
|
+
if (Array.isArray(r.blocks) && (s = Ee(r.blocks)), o && o.length > 0 && s.length === 0 && (s = o[0].blocks), !o && s.length === 0)
|
|
5104
|
+
return fe(n || "");
|
|
5053
5105
|
!o && s.length > 0 && (o = [{ id: "page-home", name: "Home", path: "/", blocks: s }]);
|
|
5054
5106
|
let l;
|
|
5055
|
-
return r.theme && typeof r.theme == "object" && (l =
|
|
5107
|
+
return r.theme && typeof r.theme == "object" && (l = no(r.theme), Object.keys(l).length === 0 && (l = void 0)), { name: a, pages: o, blocks: s, theme: l };
|
|
5056
5108
|
}
|
|
5057
|
-
function
|
|
5109
|
+
function oo(e) {
|
|
5058
5110
|
if (!e) return "My Website";
|
|
5059
5111
|
const n = e.split(/\s+/).slice(0, 4).join(" ");
|
|
5060
5112
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
5061
5113
|
}
|
|
5062
|
-
const
|
|
5063
|
-
Briefcase:
|
|
5064
|
-
UtensilsCrossed:
|
|
5065
|
-
Building2:
|
|
5066
|
-
BookOpen:
|
|
5114
|
+
const so = {
|
|
5115
|
+
Briefcase: tr,
|
|
5116
|
+
UtensilsCrossed: er,
|
|
5117
|
+
Building2: Xt,
|
|
5118
|
+
BookOpen: Qt
|
|
5067
5119
|
};
|
|
5068
|
-
function
|
|
5120
|
+
function io(e) {
|
|
5069
5121
|
const n = v((o) => o.config), r = P((o) => o.activeProjectId), a = D(null);
|
|
5070
5122
|
I(() => {
|
|
5071
5123
|
a.current = JSON.stringify(n);
|
|
@@ -5073,32 +5125,32 @@ function Ya(e) {
|
|
|
5073
5125
|
!r || JSON.stringify(n) === a.current || e?.(r, n);
|
|
5074
5126
|
}, [n, r]);
|
|
5075
5127
|
}
|
|
5076
|
-
function
|
|
5077
|
-
const a = P((
|
|
5128
|
+
function lo(e, n, r) {
|
|
5129
|
+
const a = P((u) => u.isGenerating), o = P((u) => u.generationPrompt), s = P((u) => u.clearGeneration), l = P((u) => u.setGenerationError), c = P((u) => u.activeProjectId), d = v((u) => u.setConfig), p = D(null);
|
|
5078
5130
|
I(() => {
|
|
5079
5131
|
if (!a || !o) return;
|
|
5080
|
-
const
|
|
5081
|
-
p.current =
|
|
5132
|
+
const u = new AbortController();
|
|
5133
|
+
p.current = u;
|
|
5082
5134
|
const f = setTimeout(() => {
|
|
5083
|
-
|
|
5135
|
+
u.abort(), l("Generation timed out"), S.error("Generation timed out. Try again or add a Gemini API key in Settings."), s();
|
|
5084
5136
|
}, 3e4);
|
|
5085
|
-
return
|
|
5086
|
-
clearTimeout(f), !
|
|
5137
|
+
return eo(o, u.signal, r).then(({ config: x, source: h }) => {
|
|
5138
|
+
clearTimeout(f), !u.signal.aborted && (d(x), c && (e?.(c, x), x.name && n?.(c, x.name)), s(), h === "template" && S("Generated from template. Add a Gemini API key in Settings for AI generation."));
|
|
5087
5139
|
}).catch((x) => {
|
|
5088
5140
|
clearTimeout(f), !(x instanceof Error && x.name === "AbortError") && (l(x instanceof Error ? x.message : "Generation failed"), S.error(x instanceof Error ? x.message : "Generation failed"), s());
|
|
5089
5141
|
}), () => {
|
|
5090
|
-
clearTimeout(f),
|
|
5142
|
+
clearTimeout(f), u.abort(), p.current = null;
|
|
5091
5143
|
};
|
|
5092
5144
|
}, [a, o]);
|
|
5093
5145
|
}
|
|
5094
|
-
function
|
|
5146
|
+
function co({ onCreate: e, onExit: n }) {
|
|
5095
5147
|
const r = v((s) => s.setConfig), a = P((s) => s.setActiveProject);
|
|
5096
5148
|
function o(s, l) {
|
|
5097
5149
|
const c = e?.(l) ?? `local-${Date.now()}`;
|
|
5098
|
-
a(c), r(
|
|
5150
|
+
a(c), r(Va(s, l));
|
|
5099
5151
|
}
|
|
5100
5152
|
return /* @__PURE__ */ t("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center text-center px-6 max-w-md", children: [
|
|
5101
|
-
/* @__PURE__ */ t("div", { className: "w-12 h-12 rounded-xl bg-bg-3 border border-border-default flex items-center justify-center mb-4", children: /* @__PURE__ */ t(
|
|
5153
|
+
/* @__PURE__ */ t("div", { className: "w-12 h-12 rounded-xl bg-bg-3 border border-border-default flex items-center justify-center mb-4", children: /* @__PURE__ */ t(Zt, { size: 20, className: "text-text-3" }) }),
|
|
5102
5154
|
/* @__PURE__ */ t("h2", { className: "text-[16px] font-display font-semibold text-text-1 mb-1", children: "No project selected" }),
|
|
5103
5155
|
/* @__PURE__ */ t("p", { className: "text-text-2 text-[13px] mb-6", children: "Open a project from the Dashboard, or start from a template." }),
|
|
5104
5156
|
/* @__PURE__ */ t(
|
|
@@ -5109,8 +5161,8 @@ function Qa({ onCreate: e, onExit: n }) {
|
|
|
5109
5161
|
children: "Go to Dashboard"
|
|
5110
5162
|
}
|
|
5111
5163
|
),
|
|
5112
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 w-full", children:
|
|
5113
|
-
const l =
|
|
5164
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 w-full", children: Nt.map((s) => {
|
|
5165
|
+
const l = bt(s.accent), c = so[s.icon] || ge;
|
|
5114
5166
|
return /* @__PURE__ */ i(
|
|
5115
5167
|
"button",
|
|
5116
5168
|
{
|
|
@@ -5138,7 +5190,7 @@ function Qa({ onCreate: e, onExit: n }) {
|
|
|
5138
5190
|
] }),
|
|
5139
5191
|
/* @__PURE__ */ t("div", { className: "text-[10px] text-text-2 leading-snug mb-1.5", children: s.description }),
|
|
5140
5192
|
/* @__PURE__ */ i("div", { className: "text-[10px] text-text-3 flex items-center gap-1", children: [
|
|
5141
|
-
/* @__PURE__ */ t(
|
|
5193
|
+
/* @__PURE__ */ t(ge, { size: 9 }),
|
|
5142
5194
|
s.blockCount,
|
|
5143
5195
|
" blocks"
|
|
5144
5196
|
] })
|
|
@@ -5150,26 +5202,26 @@ function Qa({ onCreate: e, onExit: n }) {
|
|
|
5150
5202
|
}) })
|
|
5151
5203
|
] }) });
|
|
5152
5204
|
}
|
|
5153
|
-
function
|
|
5154
|
-
|
|
5205
|
+
function Co({ onConfigChange: e, onRename: n, onCreate: r, activeProject: a, onExit: o, onServerFallback: s } = {}) {
|
|
5206
|
+
io(e), lo(e, n, s);
|
|
5155
5207
|
const l = P((d) => d.previewMode);
|
|
5156
5208
|
return P((d) => d.activeProjectId) ? /* @__PURE__ */ i("div", { className: "h-full flex flex-col relative", children: [
|
|
5157
5209
|
/* @__PURE__ */ i("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
5158
|
-
!l && /* @__PURE__ */ t(
|
|
5210
|
+
!l && /* @__PURE__ */ t(Aa, {}),
|
|
5159
5211
|
/* @__PURE__ */ i("div", { className: "flex-1 flex flex-col min-w-0 relative", children: [
|
|
5160
|
-
/* @__PURE__ */ t(
|
|
5212
|
+
/* @__PURE__ */ t(ka, { activeProject: a, onExit: o }),
|
|
5161
5213
|
/* @__PURE__ */ i("div", { className: "flex-1 flex flex-col overflow-hidden relative", children: [
|
|
5162
|
-
/* @__PURE__ */ t(
|
|
5163
|
-
/* @__PURE__ */ t(
|
|
5164
|
-
/* @__PURE__ */ t(
|
|
5214
|
+
/* @__PURE__ */ t($n, {}),
|
|
5215
|
+
/* @__PURE__ */ t(Ha, {}),
|
|
5216
|
+
/* @__PURE__ */ t(Ua, {})
|
|
5165
5217
|
] })
|
|
5166
5218
|
] }),
|
|
5167
|
-
!l && /* @__PURE__ */ t(
|
|
5219
|
+
!l && /* @__PURE__ */ t(Oa, {})
|
|
5168
5220
|
] }),
|
|
5169
|
-
/* @__PURE__ */ t(
|
|
5170
|
-
] }) : /* @__PURE__ */ t(
|
|
5221
|
+
/* @__PURE__ */ t(Ra, {})
|
|
5222
|
+
] }) : /* @__PURE__ */ t(co, { onCreate: r, onExit: o });
|
|
5171
5223
|
}
|
|
5172
|
-
const
|
|
5224
|
+
const po = [
|
|
5173
5225
|
{
|
|
5174
5226
|
title: "Navigation",
|
|
5175
5227
|
shortcuts: [
|
|
@@ -5198,12 +5250,12 @@ const Xa = [
|
|
|
5198
5250
|
]
|
|
5199
5251
|
}
|
|
5200
5252
|
];
|
|
5201
|
-
function
|
|
5253
|
+
function $o() {
|
|
5202
5254
|
const { shortcutsModalOpen: e, toggleShortcutsModal: n } = P(), r = D(null), a = D(null);
|
|
5203
5255
|
I(() => {
|
|
5204
5256
|
e && a.current?.focus();
|
|
5205
5257
|
}, [e]);
|
|
5206
|
-
const o =
|
|
5258
|
+
const o = It((s) => {
|
|
5207
5259
|
if (s.key === "Escape") {
|
|
5208
5260
|
n();
|
|
5209
5261
|
return;
|
|
@@ -5241,11 +5293,11 @@ function xo() {
|
|
|
5241
5293
|
onClick: n,
|
|
5242
5294
|
className: "w-7 h-7 rounded flex items-center justify-center text-text-3 hover:text-text-0 hover:bg-bg-3 transition-colors",
|
|
5243
5295
|
"aria-label": "Close shortcuts",
|
|
5244
|
-
children: /* @__PURE__ */ t(
|
|
5296
|
+
children: /* @__PURE__ */ t(ie, { size: 14 })
|
|
5245
5297
|
}
|
|
5246
5298
|
)
|
|
5247
5299
|
] }),
|
|
5248
|
-
/* @__PURE__ */ t("div", { className: "p-5 space-y-5 overflow-y-auto", children:
|
|
5300
|
+
/* @__PURE__ */ t("div", { className: "p-5 space-y-5 overflow-y-auto", children: po.map((s) => /* @__PURE__ */ i("div", { children: [
|
|
5249
5301
|
/* @__PURE__ */ t("h3", { className: "text-[10px] font-semibold uppercase tracking-wider text-text-3 mb-2", children: s.title }),
|
|
5250
5302
|
/* @__PURE__ */ t("div", { className: "space-y-1.5", children: s.shortcuts.map((l) => /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
|
|
5251
5303
|
/* @__PURE__ */ t("span", { className: "text-[12.5px] text-text-1", children: l.description }),
|
|
@@ -5265,7 +5317,7 @@ function xo() {
|
|
|
5265
5317
|
}
|
|
5266
5318
|
) : null;
|
|
5267
5319
|
}
|
|
5268
|
-
function
|
|
5320
|
+
function Po() {
|
|
5269
5321
|
const [e, n] = C(() => localStorage.getItem("openpage-gemini-key") || ""), [r, a] = C(!1), [o, s] = C(!1);
|
|
5270
5322
|
function l(d) {
|
|
5271
5323
|
n(d), d ? localStorage.setItem("openpage-gemini-key", d) : localStorage.removeItem("openpage-gemini-key");
|
|
@@ -5326,64 +5378,64 @@ function bo() {
|
|
|
5326
5378
|
] });
|
|
5327
5379
|
}
|
|
5328
5380
|
export {
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5381
|
+
No as AgentPanel,
|
|
5382
|
+
en as BannerBlock,
|
|
5383
|
+
bn as BlockWrapper,
|
|
5384
|
+
$n as Canvas,
|
|
5385
|
+
kn as CanvasEmpty,
|
|
5386
|
+
ka as CanvasToolbar,
|
|
5387
|
+
Kr as ContactBlock,
|
|
5388
|
+
rn as ContentBlock,
|
|
5389
|
+
Ar as CtaBlock,
|
|
5390
|
+
Sa as DesignPanel,
|
|
5391
|
+
Xr as DividerBlock,
|
|
5392
|
+
Co as EditorLayout,
|
|
5393
|
+
Jr as FaqBlock,
|
|
5394
|
+
Cr as FeaturesBlock,
|
|
5395
|
+
Mr as FooterBlock,
|
|
5396
|
+
qa as GENERATION_PROMPT,
|
|
5397
|
+
cn as GalleryBlock,
|
|
5398
|
+
Po as GeminiKeyInputField,
|
|
5399
|
+
Ua as GenerationOverlay,
|
|
5400
|
+
yr as HeroBlock,
|
|
5401
|
+
nn as ImageBlock,
|
|
5402
|
+
Ha as JsonDrawer,
|
|
5403
|
+
Pa as LayersPanel,
|
|
5404
|
+
Aa as LeftSidebar,
|
|
5405
|
+
Qr as LogoCloudBlock,
|
|
5406
|
+
xr as NavbarBlock,
|
|
5407
|
+
Yr as NewsletterBlock,
|
|
5408
|
+
Tr as PricingBlock,
|
|
5409
|
+
Ma as PropertiesPanel,
|
|
5410
|
+
mn as RenderBlock,
|
|
5411
|
+
Oa as RightSidebar,
|
|
5412
|
+
$o as ShortcutsModal,
|
|
5413
|
+
Ur as StatsBlock,
|
|
5414
|
+
Wr as TeamBlock,
|
|
5415
|
+
Hr as TestimonialsBlock,
|
|
5416
|
+
Ra as VersionHistory,
|
|
5417
|
+
ln as VideoBlock,
|
|
5366
5418
|
A as blockMetadata,
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5419
|
+
Va as buildTemplate,
|
|
5420
|
+
ko as categories,
|
|
5421
|
+
gn as defaultConfig,
|
|
5370
5422
|
j as defaultTheme,
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5423
|
+
ha as downloadHTML,
|
|
5424
|
+
ba as exportSiteToHTML,
|
|
5425
|
+
fa as exportToHTML,
|
|
5426
|
+
eo as generateSiteConfig,
|
|
5427
|
+
fe as getTemplateForPrompt,
|
|
5428
|
+
hn as googleFontOptions,
|
|
5429
|
+
bt as hexToRgb,
|
|
5430
|
+
So as previewHTML,
|
|
5431
|
+
tn as renderMarkdown,
|
|
5432
|
+
de as resolveTheme,
|
|
5433
|
+
Nt as templateMeta,
|
|
5434
|
+
Y as themePresets,
|
|
5435
|
+
fn as themeToCSS,
|
|
5384
5436
|
v as useConfigStore,
|
|
5385
5437
|
P as useEditorStore,
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5438
|
+
Cn as useGoogleFonts,
|
|
5439
|
+
xn as useScrollReveal,
|
|
5440
|
+
St as validateSiteConfig
|
|
5389
5441
|
};
|