@frontlit/page-builder 0.1.0-alpha.2 → 0.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +32 -0
  2. package/dist/blocks/index.d.ts +33 -21
  3. package/dist/blocks/index.js +3 -3
  4. package/dist/builder/index.d.ts +7 -8
  5. package/dist/builder/index.js +6 -5
  6. package/dist/{button-Bzt1GDO-.d.ts → button-OLKN3wPf.d.ts} +2 -2
  7. package/dist/{chunk-H4P5MFJI.js → chunk-36QHCIPM.js} +205 -251
  8. package/dist/chunk-36QHCIPM.js.map +1 -0
  9. package/dist/chunk-BBI7UHOA.js +56 -0
  10. package/dist/chunk-BBI7UHOA.js.map +1 -0
  11. package/dist/{chunk-KQKSLI3L.js → chunk-GIKTOAQS.js} +335 -122
  12. package/dist/chunk-GIKTOAQS.js.map +1 -0
  13. package/dist/chunk-HWOVSHIW.js +4 -0
  14. package/dist/{chunk-RUYOL7JZ.js.map → chunk-HWOVSHIW.js.map} +1 -1
  15. package/dist/{chunk-HDINUNI2.js → chunk-IU4KATI2.js} +69 -96
  16. package/dist/chunk-IU4KATI2.js.map +1 -0
  17. package/dist/{chunk-SGNRWWG3.js → chunk-J7Z4UW45.js} +530 -135
  18. package/dist/chunk-J7Z4UW45.js.map +1 -0
  19. package/dist/{chunk-UO7XGBGM.js → chunk-K4WCLHMS.js} +1182 -1033
  20. package/dist/chunk-K4WCLHMS.js.map +1 -0
  21. package/dist/components/index.d.ts +33 -8
  22. package/dist/components/index.js +42 -2
  23. package/dist/components/index.js.map +1 -1
  24. package/dist/data-slots.d.ts +3 -3
  25. package/dist/fonts/archivo/archivo-latin-variable.woff2 +0 -0
  26. package/dist/fonts/hanken-grotesk/hanken-grotesk-latin-variable.woff2 +0 -0
  27. package/dist/fonts/jetbrains-mono/jetbrains-mono-latin-variable.woff2 +0 -0
  28. package/dist/fonts/spline-sans-mono/spline-sans-mono-latin-variable.woff2 +0 -0
  29. package/dist/heading-DQCxQt38.d.ts +20 -0
  30. package/dist/image-Bk8kPXwP.d.ts +52 -0
  31. package/dist/index.d.ts +17 -10
  32. package/dist/index.js +7 -6
  33. package/dist/models/index.d.ts +5 -5
  34. package/dist/models/index.js +1 -1
  35. package/dist/{page-W3hQga4w.d.ts → page-B5Gmm-Ys.d.ts} +1 -1
  36. package/dist/primitives/index.d.ts +44 -9
  37. package/dist/primitives/index.js +1 -1
  38. package/dist/renderer/index.d.ts +12 -8
  39. package/dist/renderer/index.js +5 -4
  40. package/dist/{section-background-MsdE40Rk.d.ts → section-background-6V_LCi5e.d.ts} +1 -1
  41. package/dist/server/index.d.ts +103 -0
  42. package/dist/server/index.js +2649 -0
  43. package/dist/server/index.js.map +1 -0
  44. package/dist/server/islands/code-snippet.d.ts +17 -0
  45. package/dist/server/islands/code-snippet.js +72 -0
  46. package/dist/server/islands/code-snippet.js.map +1 -0
  47. package/dist/server/islands/email-form.d.ts +50 -0
  48. package/dist/server/islands/email-form.js +406 -0
  49. package/dist/server/islands/email-form.js.map +1 -0
  50. package/dist/server/islands/header-mobile-menu.d.ts +22 -0
  51. package/dist/server/islands/header-mobile-menu.js +422 -0
  52. package/dist/server/islands/header-mobile-menu.js.map +1 -0
  53. package/dist/server/islands/inline-embed.d.ts +28 -0
  54. package/dist/server/islands/inline-embed.js +84 -0
  55. package/dist/server/islands/inline-embed.js.map +1 -0
  56. package/dist/server/islands/marquee-track.d.ts +18 -0
  57. package/dist/server/islands/marquee-track.js +67 -0
  58. package/dist/server/islands/marquee-track.js.map +1 -0
  59. package/dist/server/islands/nav-link.d.ts +37 -0
  60. package/dist/server/islands/nav-link.js +67 -0
  61. package/dist/server/islands/nav-link.js.map +1 -0
  62. package/dist/server/islands/support-form.d.ts +17 -0
  63. package/dist/server/islands/support-form.js +469 -0
  64. package/dist/server/islands/support-form.js.map +1 -0
  65. package/dist/server/islands/theme-mode-switcher.d.ts +38 -0
  66. package/dist/server/islands/theme-mode-switcher.js +169 -0
  67. package/dist/server/islands/theme-mode-switcher.js.map +1 -0
  68. package/dist/server/islands/video-with-preview.d.ts +13 -0
  69. package/dist/server/islands/video-with-preview.js +269 -0
  70. package/dist/server/islands/video-with-preview.js.map +1 -0
  71. package/dist/server/primitives.d.ts +200 -0
  72. package/dist/server/primitives.js +888 -0
  73. package/dist/server/primitives.js.map +1 -0
  74. package/dist/server/schema.d.ts +11308 -0
  75. package/dist/server/schema.js +6179 -0
  76. package/dist/server/schema.js.map +1 -0
  77. package/dist/server/theme-CF3fIKvw.d.ts +9 -0
  78. package/dist/server/theme-style-5_AGy-4V.d.ts +183 -0
  79. package/dist/server/theme-style-BPaMwk88.d.ts +183 -0
  80. package/dist/server/theme.d.ts +28 -0
  81. package/dist/server/theme.js +1671 -0
  82. package/dist/server/theme.js.map +1 -0
  83. package/dist/server/widget-YH9BrOwY.d.ts +77 -0
  84. package/dist/styles.css +121 -15
  85. package/dist/{theme-style-Cbl7NM-T.d.ts → theme-style-BVd5tOsc.d.ts} +20 -0
  86. package/dist/theme.css +12 -0
  87. package/dist/{widget-B_RoG6se.d.ts → widget-CpE2HdgU.d.ts} +17 -14
  88. package/package.json +60 -12
  89. package/schema/page.v1.json +3855 -0
  90. package/schema/site.v1.json +3811 -0
  91. package/dist/alignment-dZDzN96G.d.ts +0 -5
  92. package/dist/chunk-H4P5MFJI.js.map +0 -1
  93. package/dist/chunk-HDINUNI2.js.map +0 -1
  94. package/dist/chunk-KQKSLI3L.js.map +0 -1
  95. package/dist/chunk-RUYOL7JZ.js +0 -4
  96. package/dist/chunk-SGNRWWG3.js.map +0 -1
  97. package/dist/chunk-UO7XGBGM.js.map +0 -1
  98. package/dist/image-DAWVx1zQ.d.ts +0 -31
@@ -0,0 +1,50 @@
1
+ import React__default, { ReactNode } from 'react';
2
+ import { T as ThemeStyle } from '../theme-style-5_AGy-4V.js';
3
+ import { W as WidgetDefaultSettings, P as PageData } from '../widget-YH9BrOwY.js';
4
+ import { TextEditorContent } from '@frontlit/text-editor';
5
+
6
+ type HorizontalAlignment = "center" | "left" | "right";
7
+ type VerticalAlignment = "top" | "bottom";
8
+ type Alignment = HorizontalAlignment | VerticalAlignment;
9
+
10
+ /** Heading element a block renders its title as. */
11
+ type HeadingLevel = "h1" | "h2" | "h3";
12
+ /** Per-breakpoint text size in px; unset breakpoints keep the theme size. */
13
+ interface ResponsiveTextSize {
14
+ mobile?: number;
15
+ tablet?: number;
16
+ desktop?: number;
17
+ }
18
+ /** Title options shared by every block with a title. */
19
+ interface TitleSettings {
20
+ /** Defaults to H1 for the Hero and H2 everywhere else. */
21
+ titleLevel?: HeadingLevel;
22
+ titleSize?: ResponsiveTextSize;
23
+ }
24
+
25
+ interface EmailFormSettings extends WidgetDefaultSettings, TitleSettings {
26
+ title?: string;
27
+ description?: TextEditorContent;
28
+ buttonCaption?: string;
29
+ successMessage?: string;
30
+ alignment?: Alignment;
31
+ layout?: "stacked" | "split" | "inline";
32
+ }
33
+
34
+ /**
35
+ * The interactive part of the email-form block: the `<form>` with its fields
36
+ * and success message. The block's heading is rendered on the server and
37
+ * passed in as `heading`.
38
+ */
39
+ declare function EmailForm({ theme: overriddenTheme, layout, alignment, buttonCaption, successMessage, pageData, editing, heading, }: {
40
+ theme: ThemeStyle;
41
+ layout: NonNullable<EmailFormSettings["layout"]>;
42
+ alignment: NonNullable<EmailFormSettings["alignment"]>;
43
+ buttonCaption: string;
44
+ successMessage: string;
45
+ pageData: PageData;
46
+ editing?: boolean;
47
+ heading: ReactNode;
48
+ }): React__default.JSX.Element;
49
+
50
+ export { EmailForm };
@@ -0,0 +1,406 @@
1
+ "use client";
2
+ "use client";
3
+
4
+ // src/blocks/email-form/form.tsx
5
+ import { useState } from "react";
6
+ import clsx2 from "clsx";
7
+
8
+ // src/primitives/lib/utils.ts
9
+ import { clsx } from "clsx";
10
+ import { twMerge } from "tailwind-merge";
11
+ function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+
15
+ // src/primitives/components/ui/button.tsx
16
+ import { Slot } from "@radix-ui/react-slot";
17
+ import { cva } from "class-variance-authority";
18
+ import * as React from "react";
19
+ import { jsx } from "react/jsx-runtime";
20
+ var buttonVariants = cva(
21
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
22
+ {
23
+ variants: {
24
+ variant: {
25
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
26
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
27
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
28
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
29
+ ghost: "hover:bg-accent hover:text-accent-foreground",
30
+ link: "text-primary underline-offset-4 hover:underline"
31
+ },
32
+ size: {
33
+ default: "h-10 px-4 py-2",
34
+ sm: "h-9 rounded-md px-3",
35
+ lg: "h-11 rounded-md px-8",
36
+ icon: "h-10 w-10"
37
+ }
38
+ },
39
+ defaultVariants: {
40
+ variant: "default",
41
+ size: "default"
42
+ }
43
+ }
44
+ );
45
+ var Button = React.forwardRef(
46
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
47
+ const Comp = asChild ? Slot : "button";
48
+ return /* @__PURE__ */ jsx(
49
+ Comp,
50
+ {
51
+ className: cn(buttonVariants({ variant, size, className })),
52
+ ref,
53
+ ...props
54
+ }
55
+ );
56
+ }
57
+ );
58
+ Button.displayName = "Button";
59
+
60
+ // src/primitives/button.tsx
61
+ import { jsx as jsx2 } from "react/jsx-runtime";
62
+ var Button2 = ({
63
+ variant = "default",
64
+ size = "default",
65
+ disabled = false,
66
+ children,
67
+ className = "",
68
+ theme,
69
+ ...props
70
+ }) => {
71
+ const buttonStyles = theme?.interactives?.button;
72
+ const typographyStyles = theme?.typography?.button;
73
+ const isIcon = size === "icon";
74
+ const classes = cn(
75
+ // Base styles
76
+ "",
77
+ // Theme typography
78
+ typographyStyles?.fontFamily,
79
+ typographyStyles?.fontSize,
80
+ typographyStyles?.fontWeight,
81
+ typographyStyles?.lineHeight,
82
+ typographyStyles?.letterSpacing,
83
+ typographyStyles?.textTransform,
84
+ typographyStyles?.textDecoration,
85
+ typographyStyles?.textOverflow,
86
+ // Theme interactivity. Icon buttons stay square — CTA padding
87
+ // would stretch them off the size="icon" box.
88
+ !isIcon && buttonStyles?.padding?.x,
89
+ !isIcon && buttonStyles?.padding?.y,
90
+ buttonStyles?.border?.width,
91
+ buttonStyles?.border?.radius,
92
+ buttonStyles?.border?.style,
93
+ // buttonStyles?.border?.color,
94
+ buttonStyles?.shadow,
95
+ // Theme disabled states
96
+ disabled && buttonStyles?.disabled?.opacity,
97
+ disabled && buttonStyles?.disabled?.cursor,
98
+ disabled && buttonStyles?.disabled?.color,
99
+ disabled && buttonStyles?.disabled?.background,
100
+ disabled && buttonStyles?.disabled?.border,
101
+ // User overrides
102
+ buttonStyles?.custom,
103
+ className
104
+ );
105
+ return /* @__PURE__ */ jsx2(
106
+ Button,
107
+ {
108
+ variant,
109
+ size,
110
+ disabled,
111
+ className: classes,
112
+ ...props,
113
+ children
114
+ }
115
+ );
116
+ };
117
+
118
+ // src/primitives/input.tsx
119
+ import React3 from "react";
120
+
121
+ // src/primitives/components/ui/input.tsx
122
+ import * as React2 from "react";
123
+ import { jsx as jsx3 } from "react/jsx-runtime";
124
+ var Input = React2.forwardRef(
125
+ ({ className, type, ...props }, ref) => {
126
+ return /* @__PURE__ */ jsx3(
127
+ "input",
128
+ {
129
+ type,
130
+ className: cn(
131
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
132
+ className
133
+ ),
134
+ ref,
135
+ ...props
136
+ }
137
+ );
138
+ }
139
+ );
140
+ Input.displayName = "Input";
141
+
142
+ // src/primitives/input.tsx
143
+ import { jsx as jsx4 } from "react/jsx-runtime";
144
+ var Input2 = React3.forwardRef(
145
+ ({
146
+ className = "",
147
+ theme,
148
+ error = false,
149
+ /*style = {},*/
150
+ ...props
151
+ }, ref) => {
152
+ const inputStyles = theme?.interactives?.input;
153
+ const typographyStyles = theme?.typography?.input;
154
+ const classes = cn(
155
+ // Base styles
156
+ // "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
157
+ // Theme typography
158
+ typographyStyles?.fontFamily,
159
+ typographyStyles?.fontSize,
160
+ typographyStyles?.fontWeight,
161
+ typographyStyles?.lineHeight,
162
+ typographyStyles?.letterSpacing,
163
+ typographyStyles?.textTransform,
164
+ typographyStyles?.textDecoration,
165
+ typographyStyles?.textOverflow,
166
+ // Theme interactivity
167
+ inputStyles?.padding?.x,
168
+ inputStyles?.padding?.y,
169
+ inputStyles?.border?.width,
170
+ inputStyles?.border?.style,
171
+ inputStyles?.border?.radius,
172
+ // inputStyles?.border?.color,
173
+ inputStyles?.shadow,
174
+ // Theme disabled states
175
+ props.disabled && inputStyles?.disabled?.opacity,
176
+ props.disabled && inputStyles?.disabled?.cursor,
177
+ props.disabled && inputStyles?.disabled?.color,
178
+ props.disabled && inputStyles?.disabled?.background,
179
+ props.disabled && inputStyles?.disabled?.border,
180
+ // Error state
181
+ error && "border-red-300 focus:border-red-500 focus:ring-red-500",
182
+ // User overrides
183
+ inputStyles?.custom,
184
+ className
185
+ );
186
+ return /* @__PURE__ */ jsx4(Input, { ref, className: classes, ...props });
187
+ }
188
+ );
189
+ Input2.displayName = "Input";
190
+
191
+ // src/primitives/label.tsx
192
+ import React5 from "react";
193
+
194
+ // src/primitives/components/ui/label.tsx
195
+ import * as LabelPrimitive from "@radix-ui/react-label";
196
+ import { cva as cva2 } from "class-variance-authority";
197
+ import * as React4 from "react";
198
+ import { jsx as jsx5 } from "react/jsx-runtime";
199
+ var labelVariants = cva2(
200
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
201
+ );
202
+ var Label = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
203
+ LabelPrimitive.Root,
204
+ {
205
+ ref,
206
+ className: cn(labelVariants(), className),
207
+ ...props
208
+ }
209
+ ));
210
+ Label.displayName = LabelPrimitive.Root.displayName;
211
+
212
+ // src/primitives/label.tsx
213
+ import { jsx as jsx6 } from "react/jsx-runtime";
214
+ var Label2 = React5.forwardRef(
215
+ ({ className = "", theme, error = false, ...props }, ref) => {
216
+ const typographyStyles = theme?.typography?.text2;
217
+ const classes = cn(
218
+ // Theme typography
219
+ typographyStyles?.fontFamily,
220
+ typographyStyles?.fontSize,
221
+ typographyStyles?.fontWeight,
222
+ typographyStyles?.lineHeight,
223
+ typographyStyles?.letterSpacing,
224
+ typographyStyles?.textTransform,
225
+ typographyStyles?.textDecoration,
226
+ typographyStyles?.textOverflow,
227
+ // Error state
228
+ error && "text-red-500",
229
+ className
230
+ );
231
+ return /* @__PURE__ */ jsx6(Label, { ref, className: classes, ...props });
232
+ }
233
+ );
234
+ Label2.displayName = "Label";
235
+
236
+ // src/primitives/text2.tsx
237
+ import { jsx as jsx7 } from "react/jsx-runtime";
238
+ var Text2 = ({
239
+ children,
240
+ className = "",
241
+ theme,
242
+ component = "p",
243
+ ...props
244
+ }) => {
245
+ const typographyStyles = theme?.typography?.text2;
246
+ const classes = cn(
247
+ // Base styles
248
+ "text-sm",
249
+ // Theme overrides
250
+ typographyStyles?.fontFamily,
251
+ typographyStyles?.fontSize,
252
+ typographyStyles?.fontWeight,
253
+ typographyStyles?.lineHeight,
254
+ typographyStyles?.letterSpacing,
255
+ typographyStyles?.textTransform,
256
+ typographyStyles?.textDecoration,
257
+ typographyStyles?.textOverflow,
258
+ className
259
+ );
260
+ return component === "p" ? /* @__PURE__ */ jsx7("p", { className: classes, ...props, children }) : /* @__PURE__ */ jsx7("span", { className: classes, ...props, children });
261
+ };
262
+
263
+ // src/blocks/email-form/form.tsx
264
+ import { jsx as jsx8, jsxs } from "react/jsx-runtime";
265
+ async function subscribeEmail(email, pageData) {
266
+ if (!pageData.teamId || !pageData.publicApiBaseUrl) {
267
+ await new Promise((resolve) => setTimeout(resolve, 600));
268
+ return { success: Boolean(email) };
269
+ }
270
+ try {
271
+ const res = await fetch(
272
+ `${pageData.publicApiBaseUrl}/public/${pageData.teamId}/leads`,
273
+ {
274
+ method: "POST",
275
+ headers: { "content-type": "application/json" },
276
+ body: JSON.stringify({
277
+ email,
278
+ sourcePath: pageData.pageSlug ? `/${pageData.pageSlug}` : void 0
279
+ })
280
+ }
281
+ );
282
+ if (!res.ok) return { success: false };
283
+ const body = await res.json();
284
+ return { success: body.accepted };
285
+ } catch {
286
+ return { success: false };
287
+ }
288
+ }
289
+ function EmailForm({
290
+ theme: overriddenTheme,
291
+ layout,
292
+ alignment,
293
+ buttonCaption,
294
+ successMessage,
295
+ pageData,
296
+ editing,
297
+ heading
298
+ }) {
299
+ const [email, setEmail] = useState("");
300
+ const [isSubmitting, setIsSubmitting] = useState(false);
301
+ const [success, setSuccess] = useState(false);
302
+ const isCentered = alignment === "center";
303
+ const onSubmit = async (e) => {
304
+ e.preventDefault();
305
+ if (editing) return;
306
+ setIsSubmitting(true);
307
+ try {
308
+ const result = await subscribeEmail(email, pageData);
309
+ if (result.success) {
310
+ setSuccess(true);
311
+ setEmail("");
312
+ }
313
+ } finally {
314
+ setIsSubmitting(false);
315
+ }
316
+ };
317
+ if (layout === "inline") {
318
+ return /* @__PURE__ */ jsxs(
319
+ "form",
320
+ {
321
+ onSubmit,
322
+ className: "flex flex-col items-start gap-4 md:!flex-row md:items-center md:justify-between",
323
+ children: [
324
+ heading,
325
+ success ? /* @__PURE__ */ jsx8(Text2, { theme: overriddenTheme, children: successMessage }) : /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-2 sm:!flex-row md:w-auto md:shrink-0", children: [
326
+ /* @__PURE__ */ jsx8(
327
+ Input2,
328
+ {
329
+ theme: overriddenTheme,
330
+ id: "email",
331
+ value: email,
332
+ onChange: (e) => setEmail(e.target.value),
333
+ placeholder: "Enter your email",
334
+ type: "email",
335
+ required: true,
336
+ className: "md:w-64"
337
+ }
338
+ ),
339
+ /* @__PURE__ */ jsx8(
340
+ Button2,
341
+ {
342
+ theme: overriddenTheme,
343
+ type: "submit",
344
+ disabled: !editing && (isSubmitting || !email),
345
+ children: buttonCaption
346
+ }
347
+ )
348
+ ] })
349
+ ]
350
+ }
351
+ );
352
+ }
353
+ return /* @__PURE__ */ jsxs(
354
+ "form",
355
+ {
356
+ onSubmit,
357
+ className: clsx2(
358
+ "flex gap-4",
359
+ layout === "split" ? "flex-col md:!flex-row md:items-center md:justify-between md:gap-10" : clsx2("flex-col", isCentered ? "items-center text-center" : "items-start")
360
+ ),
361
+ children: [
362
+ heading,
363
+ success ? /* @__PURE__ */ jsx8(Text2, { theme: overriddenTheme, children: successMessage }) : /* @__PURE__ */ jsxs(
364
+ "div",
365
+ {
366
+ className: clsx2(
367
+ "flex flex-col md:!flex-row md:!items-end gap-2",
368
+ layout === "split" ? "md:shrink-0" : "w-full",
369
+ layout !== "split" && isCentered ? "md:!justify-center" : ""
370
+ ),
371
+ children: [
372
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 items-start", children: [
373
+ /* @__PURE__ */ jsx8(Label2, { theme: overriddenTheme, htmlFor: "email", children: "Email" }),
374
+ /* @__PURE__ */ jsx8(
375
+ Input2,
376
+ {
377
+ theme: overriddenTheme,
378
+ id: "email",
379
+ value: email,
380
+ onChange: (e) => setEmail(e.target.value),
381
+ placeholder: "Enter your email",
382
+ type: "email",
383
+ required: true
384
+ }
385
+ )
386
+ ] }),
387
+ /* @__PURE__ */ jsx8(
388
+ Button2,
389
+ {
390
+ theme: overriddenTheme,
391
+ type: "submit",
392
+ disabled: !editing && (isSubmitting || !email),
393
+ children: buttonCaption
394
+ }
395
+ )
396
+ ]
397
+ }
398
+ )
399
+ ]
400
+ }
401
+ );
402
+ }
403
+ export {
404
+ EmailForm
405
+ };
406
+ //# sourceMappingURL=email-form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/blocks/email-form/form.tsx","../../../src/primitives/lib/utils.ts","../../../src/primitives/components/ui/button.tsx","../../../src/primitives/button.tsx","../../../src/primitives/input.tsx","../../../src/primitives/components/ui/input.tsx","../../../src/primitives/label.tsx","../../../src/primitives/components/ui/label.tsx","../../../src/primitives/text2.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useState, type ReactNode } from \"react\";\nimport clsx from \"clsx\";\nimport type { PageData, ThemeStyle } from \"../../models\";\nimport type { EmailFormSettings } from \"./settings\";\nimport { Button, Input, Label, Text2 } from \"../../primitives\";\n\n/**\n * Captures a lead via FrontLit's public, unauthenticated lead-capture\n * endpoint (architecture.md §10.2), which enqueues a SendLit contact-sync\n * job and returns immediately — capture never depends on SendLit being\n * reachable. Falls back to a local-only success (no network call) when the\n * page isn't wired to a live team/API, e.g. an isolated component preview.\n */\nasync function subscribeEmail(\n email: string,\n pageData: PageData,\n): Promise<{ success: boolean }> {\n if (!pageData.teamId || !pageData.publicApiBaseUrl) {\n await new Promise((resolve) => setTimeout(resolve, 600));\n return { success: Boolean(email) };\n }\n\n try {\n const res = await fetch(\n `${pageData.publicApiBaseUrl}/public/${pageData.teamId}/leads`,\n {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({\n email,\n sourcePath: pageData.pageSlug ? `/${pageData.pageSlug}` : undefined,\n }),\n },\n );\n if (!res.ok) return { success: false };\n const body = (await res.json()) as { accepted: boolean };\n return { success: body.accepted };\n } catch {\n return { success: false };\n }\n}\n\n/**\n * The interactive part of the email-form block: the `<form>` with its fields\n * and success message. The block's heading is rendered on the server and\n * passed in as `heading`.\n */\nexport function EmailForm({\n theme: overriddenTheme,\n layout,\n alignment,\n buttonCaption,\n successMessage,\n pageData,\n editing,\n heading,\n}: {\n theme: ThemeStyle;\n layout: NonNullable<EmailFormSettings[\"layout\"]>;\n alignment: NonNullable<EmailFormSettings[\"alignment\"]>;\n buttonCaption: string;\n successMessage: string;\n pageData: PageData;\n editing?: boolean;\n heading: ReactNode;\n}) {\n const [email, setEmail] = useState(\"\");\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [success, setSuccess] = useState(false);\n\n const isCentered = alignment === \"center\";\n\n const onSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n if (editing) return;\n\n setIsSubmitting(true);\n try {\n const result = await subscribeEmail(email, pageData);\n if (result.success) {\n setSuccess(true);\n setEmail(\"\");\n }\n } finally {\n setIsSubmitting(false);\n }\n };\n\n if (layout === \"inline\") {\n // Single-row minimal prompt — title/description beside a bare\n // input+button, no label. Common for a compact in-page nudge\n // rather than a dedicated email section.\n return (\n <form\n onSubmit={onSubmit}\n className=\"flex flex-col items-start gap-4 md:!flex-row md:items-center md:justify-between\"\n >\n {heading}\n {success ? (\n <Text2 theme={overriddenTheme}>{successMessage}</Text2>\n ) : (\n <div className=\"flex w-full flex-col gap-2 sm:!flex-row md:w-auto md:shrink-0\">\n <Input\n theme={overriddenTheme}\n id=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n placeholder=\"Enter your email\"\n type=\"email\"\n required\n className=\"md:w-64\"\n />\n <Button\n theme={overriddenTheme}\n type=\"submit\"\n disabled={!editing && (isSubmitting || !email)}\n >\n {buttonCaption}\n </Button>\n </div>\n )}\n </form>\n );\n }\n\n return (\n <form\n onSubmit={onSubmit}\n className={clsx(\n \"flex gap-4\",\n layout === \"split\"\n ? \"flex-col md:!flex-row md:items-center md:justify-between md:gap-10\"\n : clsx(\"flex-col\", isCentered ? \"items-center text-center\" : \"items-start\"),\n )}\n >\n {heading}\n {success ? (\n <Text2 theme={overriddenTheme}>{successMessage}</Text2>\n ) : (\n <div\n className={clsx(\n \"flex flex-col md:!flex-row md:!items-end gap-2\",\n layout === \"split\" ? \"md:shrink-0\" : \"w-full\",\n layout !== \"split\" && isCentered ? \"md:!justify-center\" : \"\",\n )}\n >\n <div className=\"flex flex-col gap-1 items-start\">\n <Label theme={overriddenTheme} htmlFor=\"email\">\n Email\n </Label>\n <Input\n theme={overriddenTheme}\n id=\"email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n placeholder=\"Enter your email\"\n type=\"email\"\n required\n />\n </div>\n <Button\n theme={overriddenTheme}\n type=\"submit\"\n disabled={!editing && (isSubmitting || !email)}\n >\n {buttonCaption}\n </Button>\n </div>\n )}\n </form>\n );\n}\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import type React from \"react\";\nimport type { ThemeStyle } from \"../models\";\nimport {\n Button as ShadcnButton,\n type ButtonProps as ShadcnButtonProps,\n} from \"./components/ui/button\";\nimport { cn } from \"./lib/utils\";\n\nexport interface ButtonProps extends ShadcnButtonProps {\n theme?: ThemeStyle;\n}\n\nexport const Button: React.FC<ButtonProps> = ({\n variant = \"default\",\n size = \"default\",\n disabled = false,\n children,\n className = \"\",\n theme,\n ...props\n}) => {\n const buttonStyles = theme?.interactives?.button;\n const typographyStyles = theme?.typography?.button;\n const isIcon = size === \"icon\";\n\n const classes = cn(\n // Base styles\n \"\",\n // Theme typography\n typographyStyles?.fontFamily,\n typographyStyles?.fontSize,\n typographyStyles?.fontWeight,\n typographyStyles?.lineHeight,\n typographyStyles?.letterSpacing,\n typographyStyles?.textTransform,\n typographyStyles?.textDecoration,\n typographyStyles?.textOverflow,\n // Theme interactivity. Icon buttons stay square — CTA padding\n // would stretch them off the size=\"icon\" box.\n !isIcon && buttonStyles?.padding?.x,\n !isIcon && buttonStyles?.padding?.y,\n buttonStyles?.border?.width,\n buttonStyles?.border?.radius,\n buttonStyles?.border?.style,\n // buttonStyles?.border?.color,\n buttonStyles?.shadow,\n // Theme disabled states\n disabled && buttonStyles?.disabled?.opacity,\n disabled && buttonStyles?.disabled?.cursor,\n disabled && buttonStyles?.disabled?.color,\n disabled && buttonStyles?.disabled?.background,\n disabled && buttonStyles?.disabled?.border,\n // User overrides\n buttonStyles?.custom,\n className,\n );\n\n return (\n <ShadcnButton\n variant={variant}\n size={size}\n disabled={disabled}\n className={classes}\n {...props}\n >\n {children}\n </ShadcnButton>\n );\n};\n","import React from \"react\";\nimport type { ThemeStyle } from \"../models\";\nimport { Input as ShadcnInput } from \"./components/ui/input\";\nimport { cn } from \"./lib/utils\";\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n theme?: ThemeStyle;\n error?: boolean;\n // style?: React.CSSProperties;\n}\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className = \"\", theme, error = false, /*style = {},*/ ...props }, ref) => {\n const inputStyles = theme?.interactives?.input;\n const typographyStyles = theme?.typography?.input;\n\n const classes = cn(\n // Base styles\n // \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n // Theme typography\n typographyStyles?.fontFamily,\n typographyStyles?.fontSize,\n typographyStyles?.fontWeight,\n typographyStyles?.lineHeight,\n typographyStyles?.letterSpacing,\n typographyStyles?.textTransform,\n typographyStyles?.textDecoration,\n typographyStyles?.textOverflow,\n // Theme interactivity\n inputStyles?.padding?.x,\n inputStyles?.padding?.y,\n inputStyles?.border?.width,\n inputStyles?.border?.style,\n inputStyles?.border?.radius,\n // inputStyles?.border?.color,\n inputStyles?.shadow,\n // Theme disabled states\n props.disabled && inputStyles?.disabled?.opacity,\n props.disabled && inputStyles?.disabled?.cursor,\n props.disabled && inputStyles?.disabled?.color,\n props.disabled && inputStyles?.disabled?.background,\n props.disabled && inputStyles?.disabled?.border,\n // Error state\n error && \"border-red-300 focus:border-red-500 focus:ring-red-500\",\n // User overrides\n inputStyles?.custom,\n className,\n );\n\n return <ShadcnInput ref={ref} className={classes} {...props} />;\n },\n);\n\nInput.displayName = \"Input\";\n","import * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","import React from \"react\";\nimport type { ThemeStyle } from \"../models\";\nimport { Label as ShadcnLabel } from \"./components/ui/label\";\nimport { cn } from \"./lib/utils\";\n\nexport interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {\n theme?: ThemeStyle;\n error?: boolean;\n}\n\nexport const Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ className = \"\", theme, error = false, ...props }, ref) => {\n const typographyStyles = theme?.typography?.text2;\n\n const classes = cn(\n // Theme typography\n typographyStyles?.fontFamily,\n typographyStyles?.fontSize,\n typographyStyles?.fontWeight,\n typographyStyles?.lineHeight,\n typographyStyles?.letterSpacing,\n typographyStyles?.textTransform,\n typographyStyles?.textDecoration,\n typographyStyles?.textOverflow,\n // Error state\n error && \"text-red-500\",\n className,\n );\n\n return <ShadcnLabel ref={ref} className={classes} {...props} />;\n },\n);\n\nLabel.displayName = \"Label\";\n","import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import type React from \"react\";\nimport { cn } from \"./lib/utils\";\nimport type { TypographyProps } from \"./typography\";\n\nexport const Text2: React.FC<TypographyProps & { component?: \"p\" | \"span\" }> = ({\n children,\n className = \"\",\n theme,\n component = \"p\",\n ...props\n}) => {\n const typographyStyles = theme?.typography?.text2;\n const classes = cn(\n // Base styles\n \"text-sm\",\n // Theme overrides\n typographyStyles?.fontFamily,\n typographyStyles?.fontSize,\n typographyStyles?.fontWeight,\n typographyStyles?.lineHeight,\n typographyStyles?.letterSpacing,\n typographyStyles?.textTransform,\n typographyStyles?.textDecoration,\n typographyStyles?.textOverflow,\n className,\n );\n\n return component === \"p\" ? (\n <p className={classes} {...props}>\n {children}\n </p>\n ) : (\n <span className={classes} {...props}>\n {children}\n </span>\n );\n};\n"],"mappings":";;;;AAEA,SAAgB,gBAAgC;AAChD,OAAOA,WAAU;;;ACHjB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,SAAS,YAAY;AACrB,SAAS,WAA8B;AACvC,YAAY,WAAW;AA0CjB;AAtCN,IAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SACE;AAAA,QACF,WAAW;AAAA,QACX,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;A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AK,YAAY,aAAa,6BAA6B,aAAa;AAAA,MAC9E;AAAA,MAEC;AAAA;AAAA,QACA,UACC,gBAAAH,KAAC,SAAM,OAAO,iBAAkB,0BAAe,IAE/C;AAAA,UAAC;AAAA;AAAA,YACC,WAAWG;AAAA,cACT;AAAA,cACA,WAAW,UAAU,gBAAgB;AAAA,cACrC,WAAW,WAAW,aAAa,uBAAuB;AAAA,YAC5D;AAAA,YAEA;AAAA,mCAAC,SAAI,WAAU,mCACb;AAAA,gCAAAH,KAACI,QAAA,EAAM,OAAO,iBAAiB,SAAQ,SAAQ,mBAE/C;AAAA,gBACA,gBAAAJ;AAAA,kBAACC;AAAA,kBAAA;AAAA,oBACC,OAAO;AAAA,oBACP,IAAG;AAAA,oBACH,OAAO;AAAA,oBACP,UAAU,CAAC,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,oBACxC,aAAY;AAAA,oBACZ,MAAK;AAAA,oBACL,UAAQ;AAAA;AAAA,gBACV;AAAA,iBACF;AAAA,cACA,gBAAAD;AAAA,gBAACE;AAAA,gBAAA;AAAA,kBACC,OAAO;AAAA,kBACP,MAAK;AAAA,kBACL,UAAU,CAAC,YAAY,gBAAgB,CAAC;AAAA,kBAEvC;AAAA;AAAA,cACH;AAAA;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["clsx","jsx","Button","React","React","jsx","jsx","Input","React","React","cva","React","jsx","cva","jsx","Label","React","jsx","jsx","Input","Button","clsx","Label"]}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { T as ThemeStyle } from '../theme-style-5_AGy-4V.js';
3
+
4
+ interface HeaderNavLink {
5
+ id: string;
6
+ label: string;
7
+ href: string;
8
+ isButton?: boolean;
9
+ }
10
+
11
+ /**
12
+ * The header's mobile drawer. It is the only interactive part of the header,
13
+ * so it is the only part sent to the browser on server-rendered pages.
14
+ */
15
+ declare function HeaderMobileMenu({ links, ctaLabel, ctaHref, theme, }: {
16
+ links: HeaderNavLink[];
17
+ ctaLabel?: string;
18
+ ctaHref?: string;
19
+ theme: ThemeStyle;
20
+ }): React.JSX.Element;
21
+
22
+ export { HeaderMobileMenu };