@mission-studio/puck 1.0.5 → 1.0.16

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 (40) hide show
  1. package/dist/ResponsiveToggleField-BihXsGIJ.d.mts +26 -0
  2. package/dist/ResponsiveToggleField-CfBKL5oY.d.ts +26 -0
  3. package/dist/chunk-A3QDUUOF.mjs +80 -0
  4. package/dist/chunk-D3L26TIT.mjs +76 -0
  5. package/dist/chunk-KV2RSRAM.mjs +114 -0
  6. package/dist/{chunk-R7TH6TWG.mjs → chunk-ML3AS3AY.mjs} +56 -84
  7. package/dist/{chunk-OZYZPWP7.mjs → chunk-SYXQQITG.mjs} +253 -287
  8. package/dist/config/server.d.mts +5 -0
  9. package/dist/config/server.d.ts +5 -0
  10. package/dist/config/server.js +2207 -0
  11. package/dist/config/server.mjs +133 -0
  12. package/dist/config-entry.js +334 -395
  13. package/dist/config-entry.mjs +5 -3
  14. package/dist/editor.d.mts +5 -2
  15. package/dist/editor.d.ts +5 -2
  16. package/dist/editor.js +271 -309
  17. package/dist/editor.mjs +10 -6
  18. package/dist/hooks/index.d.mts +3 -2
  19. package/dist/hooks/index.d.ts +3 -2
  20. package/dist/index.d.mts +7 -287
  21. package/dist/index.d.ts +7 -287
  22. package/dist/index.js +59 -92
  23. package/dist/index.mjs +20 -16
  24. package/dist/renderer.d.mts +289 -0
  25. package/dist/renderer.d.ts +289 -0
  26. package/dist/renderer.js +2162 -0
  27. package/dist/renderer.mjs +57 -0
  28. package/dist/resolve/index.d.mts +10 -0
  29. package/dist/resolve/index.d.ts +10 -0
  30. package/dist/resolve/index.js +202 -0
  31. package/dist/resolve/index.mjs +124 -0
  32. package/dist/styles.css +1 -1
  33. package/dist/types-D-CIduaE.d.mts +111 -0
  34. package/dist/types-D-CIduaE.d.ts +111 -0
  35. package/dist/typography-DwjKOx3F.d.mts +49 -0
  36. package/dist/typography-DwjKOx3F.d.ts +49 -0
  37. package/package.json +16 -1
  38. package/dist/ResponsiveToggleField-CVhKzDAT.d.mts +0 -183
  39. package/dist/ResponsiveToggleField-CVhKzDAT.d.ts +0 -183
  40. package/dist/chunk-TTKY3YGP.mjs +0 -262
@@ -0,0 +1,2207 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // config/server.tsx
21
+ var server_exports = {};
22
+ __export(server_exports, {
23
+ config: () => config
24
+ });
25
+ module.exports = __toCommonJS(server_exports);
26
+
27
+ // entries/context.tsx
28
+ var import_react = require("react");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ var EntriesContext = (0, import_react.createContext)(null);
31
+ function useEntries() {
32
+ const context = (0, import_react.useContext)(EntriesContext);
33
+ if (!context) {
34
+ return {
35
+ entries: [],
36
+ entryNames: [],
37
+ getEntry: () => void 0,
38
+ getEntryValue: () => void 0
39
+ };
40
+ }
41
+ return context;
42
+ }
43
+
44
+ // theme/context.tsx
45
+ var import_react2 = require("react");
46
+
47
+ // theme/defaults.ts
48
+ var DEFAULT_THEME = {
49
+ id: "default",
50
+ name: "Default Theme",
51
+ colors: {
52
+ primary: { color: "#3B82F6", opacity: 100 },
53
+ secondary: { color: "#8B5CF6", opacity: 100 },
54
+ accent: { color: "#10B981", opacity: 100 },
55
+ background: { color: "#FFFFFF", opacity: 100 },
56
+ foreground: { color: "#111827", opacity: 100 },
57
+ muted: { color: "#F3F4F6", opacity: 100 }
58
+ },
59
+ typography: {
60
+ fontFamily: {
61
+ heading: "system-ui, sans-serif",
62
+ body: "system-ui, sans-serif"
63
+ },
64
+ fontSize: {
65
+ base: "base",
66
+ heading: "4xl"
67
+ },
68
+ fontWeight: {
69
+ normal: 400,
70
+ heading: 700
71
+ }
72
+ },
73
+ spacing: {
74
+ xs: 8,
75
+ sm: 12,
76
+ md: 16,
77
+ lg: 24,
78
+ xl: 32
79
+ },
80
+ borders: {
81
+ radiusSmall: 4,
82
+ radiusMedium: 8,
83
+ radiusLarge: 16
84
+ },
85
+ shadows: {
86
+ small: "sm",
87
+ medium: "md",
88
+ large: "lg"
89
+ }
90
+ };
91
+
92
+ // theme/context.tsx
93
+ var import_jsx_runtime2 = require("react/jsx-runtime");
94
+ var ThemeContext = (0, import_react2.createContext)(null);
95
+ function useTheme() {
96
+ const context = (0, import_react2.useContext)(ThemeContext);
97
+ if (!context) {
98
+ return {
99
+ theme: DEFAULT_THEME,
100
+ resolveColor: (key) => DEFAULT_THEME.colors[key],
101
+ resolveSpacing: (key) => DEFAULT_THEME.spacing[key],
102
+ resolveBorderRadius: (key) => DEFAULT_THEME.borders[key],
103
+ resolveShadow: (key) => DEFAULT_THEME.shadows[key]
104
+ };
105
+ }
106
+ return context;
107
+ }
108
+
109
+ // utils/index.ts
110
+ var import_tailwind_merge = require("tailwind-merge");
111
+ var import_clsx = require("clsx");
112
+ function hexToRgba(hex, opacity) {
113
+ const sanitized = hex.replace("#", "");
114
+ const r = parseInt(sanitized.slice(0, 2), 16);
115
+ const g = parseInt(sanitized.slice(2, 4), 16);
116
+ const b = parseInt(sanitized.slice(4, 6), 16);
117
+ return `rgba(${r}, ${g}, ${b}, ${opacity / 100})`;
118
+ }
119
+ function cn(...inputs) {
120
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
121
+ }
122
+
123
+ // components/page/Heading.tsx
124
+ var import_jsx_runtime3 = require("react/jsx-runtime");
125
+ var sizeMap = {
126
+ xs: "0.875rem",
127
+ sm: "1rem",
128
+ md: "1.25rem",
129
+ lg: "1.5rem",
130
+ xl: "2rem",
131
+ "2xl": "2.5rem",
132
+ "3xl": "3rem",
133
+ "4xl": "4rem"
134
+ };
135
+ var weightMap = {
136
+ normal: 400,
137
+ medium: 500,
138
+ semibold: 600,
139
+ bold: 700,
140
+ extrabold: 800
141
+ };
142
+ var letterSpacingMap = {
143
+ tight: "-0.025em",
144
+ normal: "0",
145
+ wide: "0.05em"
146
+ };
147
+ var lineHeightMap = {
148
+ tight: "1.1",
149
+ normal: "1.4",
150
+ relaxed: "1.6"
151
+ };
152
+ function isThemeableValue(value) {
153
+ return typeof value === "object" && value !== null && "useTheme" in value;
154
+ }
155
+ function isEntryBoundValue(value) {
156
+ return typeof value === "object" && value !== null && "useEntry" in value;
157
+ }
158
+ function Heading({
159
+ text,
160
+ level = "h2",
161
+ size = "2xl",
162
+ weight = "bold",
163
+ color,
164
+ align = "left",
165
+ letterSpacing = "normal",
166
+ lineHeight = "tight",
167
+ id
168
+ }) {
169
+ const { resolveColor: resolveColor2 } = useTheme();
170
+ const { getEntryValue } = useEntries();
171
+ const resolvedText = (() => {
172
+ if (!text) return "";
173
+ if (typeof text === "string") return text;
174
+ if (isEntryBoundValue(text)) {
175
+ if (text.useEntry) {
176
+ return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
177
+ }
178
+ return text.value;
179
+ }
180
+ return "";
181
+ })();
182
+ const resolvedColor = (() => {
183
+ if (!color) return resolveColor2("foreground");
184
+ if (typeof color === "string") return { color, opacity: 100 };
185
+ if (isThemeableValue(color)) {
186
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
187
+ }
188
+ if ("color" in color) return color;
189
+ return resolveColor2("foreground");
190
+ })();
191
+ const Tag = level;
192
+ const style = {
193
+ fontSize: sizeMap[size],
194
+ fontWeight: weightMap[weight],
195
+ color: hexToRgba(resolvedColor.color, resolvedColor.opacity),
196
+ textAlign: align,
197
+ letterSpacing: letterSpacingMap[letterSpacing],
198
+ lineHeight: lineHeightMap[lineHeight],
199
+ margin: 0
200
+ };
201
+ if (!resolvedText) return null;
202
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Tag, { id, style, children: resolvedText });
203
+ }
204
+
205
+ // components/page/Paragraph.tsx
206
+ var import_jsx_runtime4 = require("react/jsx-runtime");
207
+ var sizeMap2 = {
208
+ sm: "0.875rem",
209
+ base: "1rem",
210
+ lg: "1.125rem",
211
+ xl: "1.25rem"
212
+ };
213
+ var weightMap2 = {
214
+ normal: 400,
215
+ medium: 500,
216
+ semibold: 600
217
+ };
218
+ var lineHeightMap2 = {
219
+ tight: "1.4",
220
+ normal: "1.6",
221
+ relaxed: "1.75",
222
+ loose: "2"
223
+ };
224
+ function isThemeableValue2(value) {
225
+ return typeof value === "object" && value !== null && "useTheme" in value;
226
+ }
227
+ function isEntryBoundValue2(value) {
228
+ return typeof value === "object" && value !== null && "useEntry" in value;
229
+ }
230
+ function Paragraph({
231
+ text,
232
+ size = "base",
233
+ weight = "normal",
234
+ color,
235
+ align = "left",
236
+ lineHeight = "normal",
237
+ maxWidth,
238
+ id
239
+ }) {
240
+ const { resolveColor: resolveColor2 } = useTheme();
241
+ const { getEntryValue } = useEntries();
242
+ const resolvedText = (() => {
243
+ if (!text) return "";
244
+ if (typeof text === "string") return text;
245
+ if (isEntryBoundValue2(text)) {
246
+ if (text.useEntry) {
247
+ return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
248
+ }
249
+ return text.value;
250
+ }
251
+ return "";
252
+ })();
253
+ const resolvedColor = (() => {
254
+ if (!color) return resolveColor2("foreground");
255
+ if (typeof color === "string") return { color, opacity: 100 };
256
+ if (isThemeableValue2(color)) {
257
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
258
+ }
259
+ if ("color" in color) return color;
260
+ return resolveColor2("foreground");
261
+ })();
262
+ const style = {
263
+ fontSize: sizeMap2[size],
264
+ fontWeight: weightMap2[weight],
265
+ color: hexToRgba(resolvedColor.color, resolvedColor.opacity),
266
+ textAlign: align,
267
+ lineHeight: lineHeightMap2[lineHeight],
268
+ maxWidth: maxWidth || void 0,
269
+ margin: 0
270
+ };
271
+ if (!resolvedText) return null;
272
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { id, style, children: resolvedText });
273
+ }
274
+
275
+ // hooks/useGtmEvent.ts
276
+ function useGtmEvent() {
277
+ return (eventName, data) => {
278
+ if (typeof window === "undefined") return;
279
+ if (typeof window.gtag === "function") {
280
+ window.gtag("event", eventName, data || {});
281
+ }
282
+ };
283
+ }
284
+
285
+ // hooks/useUtmParams.ts
286
+ var import_react3 = require("react");
287
+ function useUtmParams() {
288
+ const [utmParams, setUtmParams] = (0, import_react3.useState)({});
289
+ (0, import_react3.useEffect)(() => {
290
+ if (typeof window === "undefined") return;
291
+ const urlParams = new URLSearchParams(window.location.search);
292
+ const source = urlParams.get("utm_source");
293
+ const medium = urlParams.get("utm_medium");
294
+ const campaign = urlParams.get("utm_campaign");
295
+ const content = urlParams.get("utm_content");
296
+ const term = urlParams.get("utm_term");
297
+ const params = {};
298
+ if (source) {
299
+ params.source = source;
300
+ sessionStorage.setItem("utm_source", source);
301
+ } else {
302
+ const stored = sessionStorage.getItem("utm_source");
303
+ if (stored) params.source = stored;
304
+ }
305
+ if (medium) {
306
+ params.medium = medium;
307
+ sessionStorage.setItem("utm_medium", medium);
308
+ } else {
309
+ const stored = sessionStorage.getItem("utm_medium");
310
+ if (stored) params.medium = stored;
311
+ }
312
+ if (campaign) {
313
+ params.campaign = campaign;
314
+ sessionStorage.setItem("utm_campaign", campaign);
315
+ } else {
316
+ const stored = sessionStorage.getItem("utm_campaign");
317
+ if (stored) params.campaign = stored;
318
+ }
319
+ if (content) {
320
+ params.content = content;
321
+ sessionStorage.setItem("utm_content", content);
322
+ } else {
323
+ const stored = sessionStorage.getItem("utm_content");
324
+ if (stored) params.content = stored;
325
+ }
326
+ if (term) {
327
+ params.term = term;
328
+ sessionStorage.setItem("utm_term", term);
329
+ } else {
330
+ const stored = sessionStorage.getItem("utm_term");
331
+ if (stored) params.term = stored;
332
+ }
333
+ setUtmParams(params);
334
+ }, []);
335
+ return utmParams;
336
+ }
337
+
338
+ // components/page/Button.tsx
339
+ var import_jsx_runtime5 = require("react/jsx-runtime");
340
+ var sizeStyles = {
341
+ sm: { padding: "8px 16px", fontSize: "0.875rem" },
342
+ md: { padding: "12px 24px", fontSize: "1rem" },
343
+ lg: { padding: "16px 32px", fontSize: "1.125rem" },
344
+ xl: { padding: "20px 40px", fontSize: "1.25rem" }
345
+ };
346
+ var radiusMap = {
347
+ none: "0",
348
+ sm: "4px",
349
+ md: "8px",
350
+ lg: "16px",
351
+ full: "9999px"
352
+ };
353
+ function isThemeableValue3(value) {
354
+ return typeof value === "object" && value !== null && "useTheme" in value;
355
+ }
356
+ function isEntryBoundValue3(value) {
357
+ return typeof value === "object" && value !== null && "useEntry" in value;
358
+ }
359
+ function Button({
360
+ text,
361
+ href,
362
+ target = "_self",
363
+ variant = "solid",
364
+ size = "md",
365
+ color,
366
+ textColor,
367
+ borderRadius = "md",
368
+ fullWidth = false,
369
+ align = "center",
370
+ id
371
+ }) {
372
+ const { resolveColor: resolveColor2 } = useTheme();
373
+ const { getEntryValue } = useEntries();
374
+ const utm = useUtmParams();
375
+ const sendEvent = useGtmEvent();
376
+ const resolvedText = (() => {
377
+ if (!text) return "Button";
378
+ if (typeof text === "string") return text;
379
+ if (isEntryBoundValue3(text)) {
380
+ if (text.useEntry) {
381
+ return String(getEntryValue(text.entryName, text.fieldKey) ?? "Button");
382
+ }
383
+ return text.value;
384
+ }
385
+ return "Button";
386
+ })();
387
+ const handleClick = () => {
388
+ const sessionId = typeof window !== "undefined" ? sessionStorage.getItem("session_id") : null;
389
+ sendEvent("button_click", {
390
+ text: resolvedText,
391
+ href: href || void 0,
392
+ variant,
393
+ session_id: sessionId,
394
+ ...utm
395
+ });
396
+ };
397
+ const resolvedColor = (() => {
398
+ if (!color) return resolveColor2("primary");
399
+ if (typeof color === "string") return { color, opacity: 100 };
400
+ if (isThemeableValue3(color)) {
401
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
402
+ }
403
+ if ("color" in color) return color;
404
+ return resolveColor2("primary");
405
+ })();
406
+ const resolvedTextColor = (() => {
407
+ if (!textColor) {
408
+ if (variant === "solid") return { color: "#FFFFFF", opacity: 100 };
409
+ return resolvedColor;
410
+ }
411
+ if (typeof textColor === "string")
412
+ return { color: textColor, opacity: 100 };
413
+ if (isThemeableValue3(textColor)) {
414
+ return textColor.useTheme ? resolveColor2(textColor.themeKey) : textColor.value;
415
+ }
416
+ if ("color" in textColor) return textColor;
417
+ return { color: "#FFFFFF", opacity: 100 };
418
+ })();
419
+ const bgColor = hexToRgba(resolvedColor.color, resolvedColor.opacity);
420
+ const fgColor = hexToRgba(resolvedTextColor.color, resolvedTextColor.opacity);
421
+ const baseStyle = {
422
+ ...sizeStyles[size],
423
+ borderRadius: radiusMap[borderRadius],
424
+ fontWeight: 600,
425
+ cursor: "pointer",
426
+ display: "inline-flex",
427
+ alignItems: "center",
428
+ justifyContent: "center",
429
+ textDecoration: "none",
430
+ transition: "opacity 0.2s, transform 0.2s",
431
+ width: fullWidth ? "100%" : "auto",
432
+ border: "none"
433
+ };
434
+ const variantStyles = {
435
+ solid: {
436
+ backgroundColor: bgColor,
437
+ color: fgColor
438
+ },
439
+ outline: {
440
+ backgroundColor: "transparent",
441
+ color: bgColor,
442
+ border: `2px solid ${bgColor}`
443
+ },
444
+ ghost: {
445
+ backgroundColor: "transparent",
446
+ color: bgColor
447
+ },
448
+ link: {
449
+ backgroundColor: "transparent",
450
+ color: bgColor,
451
+ padding: "0",
452
+ textDecoration: "underline"
453
+ }
454
+ };
455
+ const style = { ...baseStyle, ...variantStyles[variant] };
456
+ const wrapperStyle = {
457
+ display: "flex",
458
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
459
+ };
460
+ const content = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style, children: resolvedText });
461
+ if (href) {
462
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
463
+ "a",
464
+ {
465
+ id,
466
+ href,
467
+ target,
468
+ style,
469
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
470
+ onClick: handleClick,
471
+ children: resolvedText
472
+ }
473
+ ) });
474
+ }
475
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { id, type: "button", style, onClick: handleClick, children: resolvedText }) });
476
+ }
477
+
478
+ // components/page/Image.tsx
479
+ var import_jsx_runtime6 = require("react/jsx-runtime");
480
+ var widthMap = {
481
+ auto: "auto",
482
+ full: "100%",
483
+ sm: "300px",
484
+ md: "500px",
485
+ lg: "700px",
486
+ xl: "900px"
487
+ };
488
+ var aspectRatioMap = {
489
+ auto: void 0,
490
+ "1:1": "1 / 1",
491
+ "4:3": "4 / 3",
492
+ "16:9": "16 / 9",
493
+ "21:9": "21 / 9"
494
+ };
495
+ var radiusMap2 = {
496
+ none: "0",
497
+ sm: "4px",
498
+ md: "8px",
499
+ lg: "16px",
500
+ xl: "24px",
501
+ full: "9999px"
502
+ };
503
+ var shadowMap = {
504
+ none: "none",
505
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
506
+ md: "0 4px 6px rgba(0,0,0,0.1)",
507
+ lg: "0 10px 15px rgba(0,0,0,0.1)",
508
+ xl: "0 20px 25px rgba(0,0,0,0.15)"
509
+ };
510
+ function isThemeableValue4(value) {
511
+ return typeof value === "object" && value !== null && "useTheme" in value;
512
+ }
513
+ function isEntryBoundValue4(value) {
514
+ return typeof value === "object" && value !== null && "useEntry" in value;
515
+ }
516
+ function Image({
517
+ src,
518
+ alt = "",
519
+ width = "full",
520
+ aspectRatio = "auto",
521
+ objectFit = "cover",
522
+ borderRadius = "none",
523
+ shadow = "none",
524
+ align = "center",
525
+ caption,
526
+ captionColor,
527
+ id
528
+ }) {
529
+ const { resolveColor: resolveColor2 } = useTheme();
530
+ const { getEntryValue } = useEntries();
531
+ const resolvedSrc = (() => {
532
+ if (!src) return "";
533
+ if (typeof src === "string") return src;
534
+ if (isEntryBoundValue4(src)) {
535
+ if (src.useEntry) {
536
+ return String(getEntryValue(src.entryName, src.fieldKey) ?? "");
537
+ }
538
+ return src.value;
539
+ }
540
+ return "";
541
+ })();
542
+ const resolvedCaption = (() => {
543
+ if (!caption) return "";
544
+ if (typeof caption === "string") return caption;
545
+ if (isEntryBoundValue4(caption)) {
546
+ if (caption.useEntry) {
547
+ return String(getEntryValue(caption.entryName, caption.fieldKey) ?? "");
548
+ }
549
+ return caption.value;
550
+ }
551
+ return "";
552
+ })();
553
+ const resolvedCaptionColor = (() => {
554
+ if (!captionColor) return resolveColor2("muted");
555
+ if (typeof captionColor === "string")
556
+ return { color: captionColor, opacity: 100 };
557
+ if (isThemeableValue4(captionColor)) {
558
+ return captionColor.useTheme ? resolveColor2(captionColor.themeKey) : captionColor.value;
559
+ }
560
+ if ("color" in captionColor) return captionColor;
561
+ return resolveColor2("muted");
562
+ })();
563
+ const wrapperStyle = {
564
+ display: "flex",
565
+ flexDirection: "column",
566
+ alignItems: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
567
+ gap: "8px"
568
+ };
569
+ const imageStyle = {
570
+ width: widthMap[width],
571
+ maxWidth: "100%",
572
+ aspectRatio: aspectRatioMap[aspectRatio],
573
+ objectFit,
574
+ borderRadius: radiusMap2[borderRadius],
575
+ boxShadow: shadowMap[shadow],
576
+ display: "block"
577
+ };
578
+ const captionStyle = {
579
+ fontSize: "0.875rem",
580
+ color: hexToRgba(resolvedCaptionColor.color, resolvedCaptionColor.opacity),
581
+ textAlign: align,
582
+ maxWidth: widthMap[width]
583
+ };
584
+ if (!resolvedSrc) {
585
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
586
+ "div",
587
+ {
588
+ style: {
589
+ ...imageStyle,
590
+ backgroundColor: "#e5e7eb",
591
+ display: "flex",
592
+ alignItems: "center",
593
+ justifyContent: "center",
594
+ minHeight: "200px",
595
+ color: "#9ca3af"
596
+ },
597
+ children: "No image"
598
+ }
599
+ ) });
600
+ }
601
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("figure", { id, style: { ...wrapperStyle, margin: 0 }, children: [
602
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: resolvedSrc, alt, style: imageStyle, loading: "lazy" }),
603
+ resolvedCaption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("figcaption", { style: captionStyle, children: resolvedCaption })
604
+ ] });
605
+ }
606
+
607
+ // components/page/ImageCarousel.tsx
608
+ var import_react4 = require("react");
609
+ var import_jsx_runtime7 = require("react/jsx-runtime");
610
+ var aspectRatioMap2 = {
611
+ "16:9": "16 / 9",
612
+ "4:3": "4 / 3",
613
+ "1:1": "1 / 1",
614
+ "21:9": "21 / 9"
615
+ };
616
+ var radiusMap3 = {
617
+ none: "0",
618
+ sm: "4px",
619
+ md: "8px",
620
+ lg: "16px"
621
+ };
622
+ function isThemeableValue5(value) {
623
+ return typeof value === "object" && value !== null && "useTheme" in value;
624
+ }
625
+ function ImageCarousel({
626
+ images = [],
627
+ aspectRatio = "16:9",
628
+ borderRadius = "none",
629
+ showDots = true,
630
+ showArrows = true,
631
+ arrowColor,
632
+ dotColor,
633
+ id
634
+ }) {
635
+ const [currentIndex, setCurrentIndex] = (0, import_react4.useState)(0);
636
+ const { resolveColor: resolveColor2 } = useTheme();
637
+ const utm = useUtmParams();
638
+ const sendEvent = useGtmEvent();
639
+ const resolvedArrowColor = (() => {
640
+ if (!arrowColor) return { color: "#FFFFFF", opacity: 100 };
641
+ if (typeof arrowColor === "string")
642
+ return { color: arrowColor, opacity: 100 };
643
+ if (isThemeableValue5(arrowColor)) {
644
+ return arrowColor.useTheme ? resolveColor2(arrowColor.themeKey) : arrowColor.value;
645
+ }
646
+ if ("color" in arrowColor) return arrowColor;
647
+ return { color: "#FFFFFF", opacity: 100 };
648
+ })();
649
+ const resolvedDotColor = (() => {
650
+ if (!dotColor) return resolveColor2("primary");
651
+ if (typeof dotColor === "string") return { color: dotColor, opacity: 100 };
652
+ if (isThemeableValue5(dotColor)) {
653
+ return dotColor.useTheme ? resolveColor2(dotColor.themeKey) : dotColor.value;
654
+ }
655
+ if ("color" in dotColor) return dotColor;
656
+ return resolveColor2("primary");
657
+ })();
658
+ const goToPrevious = () => {
659
+ const newIndex = currentIndex === 0 ? images.length - 1 : currentIndex - 1;
660
+ setCurrentIndex(newIndex);
661
+ sendEvent("carousel_navigate", {
662
+ direction: "previous",
663
+ slideIndex: newIndex,
664
+ totalSlides: images.length,
665
+ ...utm
666
+ });
667
+ };
668
+ const goToNext = () => {
669
+ const newIndex = currentIndex === images.length - 1 ? 0 : currentIndex + 1;
670
+ setCurrentIndex(newIndex);
671
+ sendEvent("carousel_navigate", {
672
+ direction: "next",
673
+ slideIndex: newIndex,
674
+ totalSlides: images.length,
675
+ ...utm
676
+ });
677
+ };
678
+ const goToSlide = (index) => {
679
+ setCurrentIndex(index);
680
+ sendEvent("carousel_navigate", {
681
+ direction: "direct",
682
+ slideIndex: index,
683
+ totalSlides: images.length,
684
+ ...utm
685
+ });
686
+ };
687
+ if (images.length === 0) {
688
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
689
+ "div",
690
+ {
691
+ style: {
692
+ aspectRatio: aspectRatioMap2[aspectRatio],
693
+ backgroundColor: "#e5e7eb",
694
+ borderRadius: radiusMap3[borderRadius],
695
+ display: "flex",
696
+ alignItems: "center",
697
+ justifyContent: "center",
698
+ color: "#9ca3af"
699
+ },
700
+ children: "No images"
701
+ }
702
+ );
703
+ }
704
+ const containerStyle = {
705
+ position: "relative",
706
+ aspectRatio: aspectRatioMap2[aspectRatio],
707
+ borderRadius: radiusMap3[borderRadius],
708
+ overflow: "hidden"
709
+ };
710
+ const slideContainerStyle = {
711
+ display: "flex",
712
+ transition: "transform 0.3s ease-in-out",
713
+ transform: `translateX(-${currentIndex * 100}%)`,
714
+ height: "100%"
715
+ };
716
+ const slideStyle = {
717
+ minWidth: "100%",
718
+ height: "100%"
719
+ };
720
+ const imageStyle = {
721
+ width: "100%",
722
+ height: "100%",
723
+ objectFit: "cover"
724
+ };
725
+ const arrowStyle = {
726
+ position: "absolute",
727
+ top: "50%",
728
+ transform: "translateY(-50%)",
729
+ backgroundColor: "rgba(0,0,0,0.5)",
730
+ color: hexToRgba(resolvedArrowColor.color, resolvedArrowColor.opacity),
731
+ border: "none",
732
+ borderRadius: "50%",
733
+ width: "40px",
734
+ height: "40px",
735
+ cursor: "pointer",
736
+ display: "flex",
737
+ alignItems: "center",
738
+ justifyContent: "center",
739
+ fontSize: "20px",
740
+ zIndex: 1
741
+ };
742
+ const dotsContainerStyle = {
743
+ position: "absolute",
744
+ bottom: "16px",
745
+ left: "50%",
746
+ transform: "translateX(-50%)",
747
+ display: "flex",
748
+ gap: "8px",
749
+ zIndex: 1
750
+ };
751
+ const dotStyle = (isActive) => ({
752
+ width: "10px",
753
+ height: "10px",
754
+ borderRadius: "50%",
755
+ border: "none",
756
+ cursor: "pointer",
757
+ backgroundColor: isActive ? hexToRgba(resolvedDotColor.color, resolvedDotColor.opacity) : "rgba(255,255,255,0.5)"
758
+ });
759
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id, style: containerStyle, children: [
760
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: slideContainerStyle, children: images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: slideStyle, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
761
+ "img",
762
+ {
763
+ src: image.src,
764
+ alt: image.alt || "",
765
+ style: imageStyle,
766
+ loading: "lazy"
767
+ }
768
+ ) }, index)) }),
769
+ showArrows && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
770
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
771
+ "button",
772
+ {
773
+ type: "button",
774
+ onClick: goToPrevious,
775
+ style: { ...arrowStyle, left: "16px" },
776
+ "aria-label": "Previous slide",
777
+ children: "\u2039"
778
+ }
779
+ ),
780
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
781
+ "button",
782
+ {
783
+ type: "button",
784
+ onClick: goToNext,
785
+ style: { ...arrowStyle, right: "16px" },
786
+ "aria-label": "Next slide",
787
+ children: "\u203A"
788
+ }
789
+ )
790
+ ] }),
791
+ showDots && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: dotsContainerStyle, children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
792
+ "button",
793
+ {
794
+ type: "button",
795
+ onClick: () => goToSlide(index),
796
+ style: dotStyle(index === currentIndex),
797
+ "aria-label": `Go to slide ${index + 1}`
798
+ },
799
+ index
800
+ )) })
801
+ ] });
802
+ }
803
+
804
+ // components/page/VideoEmbed.tsx
805
+ var import_jsx_runtime8 = require("react/jsx-runtime");
806
+ var aspectRatioMap3 = {
807
+ "16:9": "56.25%",
808
+ // 9/16 * 100
809
+ "4:3": "75%",
810
+ "1:1": "100%",
811
+ "21:9": "42.86%"
812
+ };
813
+ var radiusMap4 = {
814
+ none: "0",
815
+ sm: "4px",
816
+ md: "8px",
817
+ lg: "16px"
818
+ };
819
+ var maxWidthMap = {
820
+ sm: "400px",
821
+ md: "600px",
822
+ lg: "800px",
823
+ xl: "1000px",
824
+ full: "100%"
825
+ };
826
+ function isEntryBoundValue5(value) {
827
+ return typeof value === "object" && value !== null && "useEntry" in value;
828
+ }
829
+ function parseVideoUrl(url) {
830
+ const ytMatch = url.match(
831
+ /(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
832
+ );
833
+ if (ytMatch) {
834
+ return {
835
+ type: "youtube",
836
+ embedUrl: `https://www.youtube.com/embed/${ytMatch[1]}`
837
+ };
838
+ }
839
+ const vimeoMatch = url.match(/(?:vimeo\.com\/)(\d+)/);
840
+ if (vimeoMatch) {
841
+ return {
842
+ type: "vimeo",
843
+ embedUrl: `https://player.vimeo.com/video/${vimeoMatch[1]}`
844
+ };
845
+ }
846
+ return { type: "unknown", embedUrl: url };
847
+ }
848
+ function VideoEmbed({
849
+ url,
850
+ aspectRatio = "16:9",
851
+ borderRadius = "none",
852
+ autoplay = false,
853
+ muted = false,
854
+ loop = false,
855
+ align = "center",
856
+ maxWidth = "full",
857
+ id
858
+ }) {
859
+ const { getEntryValue } = useEntries();
860
+ const resolvedUrl = (() => {
861
+ if (!url) return "";
862
+ if (typeof url === "string") return url;
863
+ if (isEntryBoundValue5(url)) {
864
+ if (url.useEntry) {
865
+ return String(getEntryValue(url.entryName, url.fieldKey) ?? "");
866
+ }
867
+ return url.value;
868
+ }
869
+ return "";
870
+ })();
871
+ if (!resolvedUrl) {
872
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
873
+ "div",
874
+ {
875
+ style: {
876
+ backgroundColor: "#1f2937",
877
+ borderRadius: radiusMap4[borderRadius],
878
+ aspectRatio: aspectRatio.replace(":", " / "),
879
+ display: "flex",
880
+ alignItems: "center",
881
+ justifyContent: "center",
882
+ color: "#9ca3af",
883
+ maxWidth: maxWidthMap[maxWidth],
884
+ marginLeft: align === "center" ? "auto" : align === "right" ? "auto" : void 0,
885
+ marginRight: align === "center" ? "auto" : align === "left" ? "auto" : void 0
886
+ },
887
+ children: "No video URL"
888
+ }
889
+ );
890
+ }
891
+ const { embedUrl } = parseVideoUrl(resolvedUrl);
892
+ const params = new URLSearchParams();
893
+ if (autoplay) params.set("autoplay", "1");
894
+ if (muted) params.set("mute", "1");
895
+ if (loop) params.set("loop", "1");
896
+ const finalUrl = params.toString() ? `${embedUrl}?${params.toString()}` : embedUrl;
897
+ const wrapperStyle = {
898
+ display: "flex",
899
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
900
+ };
901
+ const containerStyle = {
902
+ position: "relative",
903
+ width: "100%",
904
+ maxWidth: maxWidthMap[maxWidth],
905
+ paddingBottom: aspectRatioMap3[aspectRatio],
906
+ borderRadius: radiusMap4[borderRadius],
907
+ overflow: "hidden"
908
+ };
909
+ const iframeStyle = {
910
+ position: "absolute",
911
+ top: 0,
912
+ left: 0,
913
+ width: "100%",
914
+ height: "100%",
915
+ border: "none"
916
+ };
917
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
918
+ "iframe",
919
+ {
920
+ src: finalUrl,
921
+ style: iframeStyle,
922
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
923
+ allowFullScreen: true,
924
+ loading: "lazy"
925
+ }
926
+ ) }) });
927
+ }
928
+
929
+ // components/page/Icon.tsx
930
+ var import_jsx_runtime9 = require("react/jsx-runtime");
931
+ var sizeMap3 = {
932
+ sm: { size: "16px", strokeWidth: 2 },
933
+ md: { size: "24px", strokeWidth: 2 },
934
+ lg: { size: "32px", strokeWidth: 1.5 },
935
+ xl: { size: "48px", strokeWidth: 1.5 },
936
+ "2xl": { size: "64px", strokeWidth: 1.5 }
937
+ };
938
+ var icons = {
939
+ check: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
940
+ "svg",
941
+ {
942
+ width: size,
943
+ height: size,
944
+ viewBox: "0 0 24 24",
945
+ fill: "none",
946
+ stroke: color,
947
+ strokeWidth,
948
+ strokeLinecap: "round",
949
+ strokeLinejoin: "round",
950
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "20 6 9 17 4 12" })
951
+ }
952
+ ),
953
+ x: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
954
+ "svg",
955
+ {
956
+ width: size,
957
+ height: size,
958
+ viewBox: "0 0 24 24",
959
+ fill: "none",
960
+ stroke: color,
961
+ strokeWidth,
962
+ strokeLinecap: "round",
963
+ strokeLinejoin: "round",
964
+ children: [
965
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
966
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
967
+ ]
968
+ }
969
+ ),
970
+ star: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
971
+ "svg",
972
+ {
973
+ width: size,
974
+ height: size,
975
+ viewBox: "0 0 24 24",
976
+ fill: color,
977
+ stroke: color,
978
+ strokeWidth,
979
+ strokeLinecap: "round",
980
+ strokeLinejoin: "round",
981
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("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" })
982
+ }
983
+ ),
984
+ heart: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
985
+ "svg",
986
+ {
987
+ width: size,
988
+ height: size,
989
+ viewBox: "0 0 24 24",
990
+ fill: "none",
991
+ stroke: color,
992
+ strokeWidth,
993
+ strokeLinecap: "round",
994
+ strokeLinejoin: "round",
995
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
996
+ }
997
+ ),
998
+ arrowRight: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
999
+ "svg",
1000
+ {
1001
+ width: size,
1002
+ height: size,
1003
+ viewBox: "0 0 24 24",
1004
+ fill: "none",
1005
+ stroke: color,
1006
+ strokeWidth,
1007
+ strokeLinecap: "round",
1008
+ strokeLinejoin: "round",
1009
+ children: [
1010
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1011
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 5 19 12 12 19" })
1012
+ ]
1013
+ }
1014
+ ),
1015
+ arrowLeft: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1016
+ "svg",
1017
+ {
1018
+ width: size,
1019
+ height: size,
1020
+ viewBox: "0 0 24 24",
1021
+ fill: "none",
1022
+ stroke: color,
1023
+ strokeWidth,
1024
+ strokeLinecap: "round",
1025
+ strokeLinejoin: "round",
1026
+ children: [
1027
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "19", y1: "12", x2: "5", y2: "12" }),
1028
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 19 5 12 12 5" })
1029
+ ]
1030
+ }
1031
+ ),
1032
+ mail: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1033
+ "svg",
1034
+ {
1035
+ width: size,
1036
+ height: size,
1037
+ viewBox: "0 0 24 24",
1038
+ fill: "none",
1039
+ stroke: color,
1040
+ strokeWidth,
1041
+ strokeLinecap: "round",
1042
+ strokeLinejoin: "round",
1043
+ children: [
1044
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
1045
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "22,6 12,13 2,6" })
1046
+ ]
1047
+ }
1048
+ ),
1049
+ phone: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1050
+ "svg",
1051
+ {
1052
+ width: size,
1053
+ height: size,
1054
+ viewBox: "0 0 24 24",
1055
+ fill: "none",
1056
+ stroke: color,
1057
+ strokeWidth,
1058
+ strokeLinecap: "round",
1059
+ strokeLinejoin: "round",
1060
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" })
1061
+ }
1062
+ ),
1063
+ mapPin: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1064
+ "svg",
1065
+ {
1066
+ width: size,
1067
+ height: size,
1068
+ viewBox: "0 0 24 24",
1069
+ fill: "none",
1070
+ stroke: color,
1071
+ strokeWidth,
1072
+ strokeLinecap: "round",
1073
+ strokeLinejoin: "round",
1074
+ children: [
1075
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
1076
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "12", cy: "10", r: "3" })
1077
+ ]
1078
+ }
1079
+ ),
1080
+ zap: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1081
+ "svg",
1082
+ {
1083
+ width: size,
1084
+ height: size,
1085
+ viewBox: "0 0 24 24",
1086
+ fill: "none",
1087
+ stroke: color,
1088
+ strokeWidth,
1089
+ strokeLinecap: "round",
1090
+ strokeLinejoin: "round",
1091
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" })
1092
+ }
1093
+ ),
1094
+ shield: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1095
+ "svg",
1096
+ {
1097
+ width: size,
1098
+ height: size,
1099
+ viewBox: "0 0 24 24",
1100
+ fill: "none",
1101
+ stroke: color,
1102
+ strokeWidth,
1103
+ strokeLinecap: "round",
1104
+ strokeLinejoin: "round",
1105
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
1106
+ }
1107
+ ),
1108
+ users: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1109
+ "svg",
1110
+ {
1111
+ width: size,
1112
+ height: size,
1113
+ viewBox: "0 0 24 24",
1114
+ fill: "none",
1115
+ stroke: color,
1116
+ strokeWidth,
1117
+ strokeLinecap: "round",
1118
+ strokeLinejoin: "round",
1119
+ children: [
1120
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1121
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
1122
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
1123
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
1124
+ ]
1125
+ }
1126
+ )
1127
+ };
1128
+ function isThemeableValue6(value) {
1129
+ return typeof value === "object" && value !== null && "useTheme" in value;
1130
+ }
1131
+ function Icon({
1132
+ name = "check",
1133
+ size = "md",
1134
+ color,
1135
+ align = "center",
1136
+ id
1137
+ }) {
1138
+ const { resolveColor: resolveColor2 } = useTheme();
1139
+ const resolvedColor = (() => {
1140
+ if (!color) return resolveColor2("primary");
1141
+ if (typeof color === "string") return { color, opacity: 100 };
1142
+ if (isThemeableValue6(color)) {
1143
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1144
+ }
1145
+ if ("color" in color) return color;
1146
+ return resolveColor2("primary");
1147
+ })();
1148
+ const IconComponent = icons[name.toLowerCase()] || icons.check;
1149
+ const { size: iconSize, strokeWidth } = sizeMap3[size];
1150
+ const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
1151
+ const wrapperStyle = {
1152
+ display: "flex",
1153
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
1154
+ };
1155
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1156
+ IconComponent,
1157
+ {
1158
+ size: iconSize,
1159
+ color: colorValue,
1160
+ strokeWidth
1161
+ }
1162
+ ) });
1163
+ }
1164
+ var availableIcons = Object.keys(icons);
1165
+
1166
+ // design-system/shadows.ts
1167
+ var shadowPresets = [
1168
+ { label: "None", value: "none", css: "none" },
1169
+ { label: "XS", value: "xs", css: "0 1px 2px 0 rgb(0 0 0 / 0.05)" },
1170
+ {
1171
+ label: "SM",
1172
+ value: "sm",
1173
+ css: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"
1174
+ },
1175
+ {
1176
+ label: "MD",
1177
+ value: "md",
1178
+ css: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
1179
+ },
1180
+ {
1181
+ label: "LG",
1182
+ value: "lg",
1183
+ css: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
1184
+ },
1185
+ {
1186
+ label: "XL",
1187
+ value: "xl",
1188
+ css: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
1189
+ },
1190
+ { label: "2XL", value: "2xl", css: "0 25px 50px -12px rgb(0 0 0 / 0.25)" },
1191
+ {
1192
+ label: "Inner",
1193
+ value: "inner",
1194
+ css: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"
1195
+ }
1196
+ ];
1197
+ var getShadowCSS = (value) => {
1198
+ const preset = shadowPresets.find((p) => p.value === value);
1199
+ return preset?.css ?? "none";
1200
+ };
1201
+
1202
+ // components/page/Section.tsx
1203
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1204
+ function isThemeableValue7(value) {
1205
+ return typeof value === "object" && value !== null && "useTheme" in value;
1206
+ }
1207
+ function resolveBackgroundColor(bg, resolveColor2) {
1208
+ if (!bg) return void 0;
1209
+ if (typeof bg === "string") return bg;
1210
+ if (isThemeableValue7(bg)) {
1211
+ if (bg.useTheme) {
1212
+ const themeColor = resolveColor2(bg.themeKey);
1213
+ return hexToRgba(themeColor.color, themeColor.opacity);
1214
+ }
1215
+ return hexToRgba(bg.value.color, bg.value.opacity);
1216
+ }
1217
+ if ("color" in bg && "opacity" in bg) {
1218
+ return hexToRgba(bg.color, bg.opacity);
1219
+ }
1220
+ return void 0;
1221
+ }
1222
+ function getVisibilityClasses(visibility) {
1223
+ if (!visibility) return "";
1224
+ if (!visibility.mobile && !visibility.desktop) {
1225
+ return "hidden";
1226
+ }
1227
+ if (!visibility.mobile && visibility.desktop) {
1228
+ return "hidden md:block";
1229
+ }
1230
+ if (visibility.mobile && !visibility.desktop) {
1231
+ return "md:hidden";
1232
+ }
1233
+ return "";
1234
+ }
1235
+ function Section({
1236
+ children: _children,
1237
+ verticalPadding = 48,
1238
+ horizontalPadding = 32,
1239
+ gap = 24,
1240
+ backgroundColor,
1241
+ backgroundImage,
1242
+ shadow = "none",
1243
+ borderRadius = 0,
1244
+ contentMaxWidth = "1400px",
1245
+ anchorLink,
1246
+ visibility,
1247
+ puck
1248
+ }) {
1249
+ const { resolveColor: resolveColor2 } = useTheme();
1250
+ const DropZone = puck?.renderDropZone;
1251
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1252
+ "section",
1253
+ {
1254
+ id: anchorLink,
1255
+ className: cn("flex w-full flex-col", getVisibilityClasses(visibility)),
1256
+ style: {
1257
+ padding: `${verticalPadding}px ${horizontalPadding}px`,
1258
+ gap: `${gap}px`,
1259
+ backgroundColor: resolveBackgroundColor(backgroundColor, resolveColor2),
1260
+ backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
1261
+ backgroundSize: "cover",
1262
+ backgroundPosition: "center",
1263
+ boxShadow: getShadowCSS(shadow),
1264
+ borderRadius: `${borderRadius}px`
1265
+ },
1266
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mx-auto w-full", style: { maxWidth: contentMaxWidth }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropZone, { zone: "content" }) })
1267
+ }
1268
+ );
1269
+ }
1270
+
1271
+ // components/page/Container.tsx
1272
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1273
+ var maxWidthMap2 = {
1274
+ sm: "640px",
1275
+ md: "768px",
1276
+ lg: "1024px",
1277
+ xl: "1280px",
1278
+ "2xl": "1536px",
1279
+ full: "100%"
1280
+ };
1281
+ var paddingMap = {
1282
+ none: "0",
1283
+ sm: "16px",
1284
+ md: "24px",
1285
+ lg: "32px",
1286
+ xl: "48px"
1287
+ };
1288
+ function isThemeableValue8(value) {
1289
+ return typeof value === "object" && value !== null && "useTheme" in value;
1290
+ }
1291
+ function Container({
1292
+ maxWidth = "lg",
1293
+ padding,
1294
+ paddingX = "md",
1295
+ paddingY = "none",
1296
+ backgroundColor,
1297
+ centered = true,
1298
+ id,
1299
+ puck
1300
+ }) {
1301
+ const { resolveColor: resolveColor2 } = useTheme();
1302
+ const DropZone = puck?.renderDropZone;
1303
+ const resolvedBgColor = (() => {
1304
+ if (!backgroundColor) return null;
1305
+ if (typeof backgroundColor === "string")
1306
+ return { color: backgroundColor, opacity: 100 };
1307
+ if (isThemeableValue8(backgroundColor)) {
1308
+ return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1309
+ }
1310
+ if ("color" in backgroundColor) return backgroundColor;
1311
+ return null;
1312
+ })();
1313
+ const effectivePaddingX = padding || paddingX;
1314
+ const effectivePaddingY = padding || paddingY;
1315
+ const style = {
1316
+ maxWidth: maxWidthMap2[maxWidth],
1317
+ marginLeft: centered ? "auto" : void 0,
1318
+ marginRight: centered ? "auto" : void 0,
1319
+ paddingLeft: paddingMap[effectivePaddingX],
1320
+ paddingRight: paddingMap[effectivePaddingX],
1321
+ paddingTop: paddingMap[effectivePaddingY],
1322
+ paddingBottom: paddingMap[effectivePaddingY],
1323
+ backgroundColor: resolvedBgColor ? hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity) : void 0,
1324
+ width: "100%"
1325
+ };
1326
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropZone, { zone: "container-content" }) });
1327
+ }
1328
+
1329
+ // components/page/Columns.tsx
1330
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1331
+ var gapMap = {
1332
+ none: "0",
1333
+ sm: "16px",
1334
+ md: "24px",
1335
+ lg: "32px",
1336
+ xl: "48px"
1337
+ };
1338
+ var alignMap = {
1339
+ top: "flex-start",
1340
+ center: "center",
1341
+ bottom: "flex-end",
1342
+ stretch: "stretch"
1343
+ };
1344
+ function Columns({
1345
+ columns = 2,
1346
+ gap = "md",
1347
+ verticalAlign = "top",
1348
+ stackOnMobile = true,
1349
+ id,
1350
+ puck
1351
+ }) {
1352
+ const DropZone = puck?.renderDropZone;
1353
+ const containerStyle = {
1354
+ display: "grid",
1355
+ gridTemplateColumns: `repeat(${columns}, 1fr)`,
1356
+ gap: gapMap[gap],
1357
+ alignItems: alignMap[verticalAlign]
1358
+ };
1359
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { id, style: containerStyle, children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { minWidth: 0 }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropZone, { zone: `column-${index}` }) }, index)) });
1360
+ }
1361
+
1362
+ // components/page/Card.tsx
1363
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1364
+ var borderWidthMap = {
1365
+ none: "0",
1366
+ thin: "1px",
1367
+ medium: "2px",
1368
+ thick: "4px"
1369
+ };
1370
+ var radiusMap5 = {
1371
+ none: "0",
1372
+ sm: "4px",
1373
+ md: "8px",
1374
+ lg: "16px",
1375
+ xl: "24px"
1376
+ };
1377
+ var shadowMap2 = {
1378
+ none: "none",
1379
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
1380
+ md: "0 4px 6px rgba(0,0,0,0.1)",
1381
+ lg: "0 10px 15px rgba(0,0,0,0.1)",
1382
+ xl: "0 20px 25px rgba(0,0,0,0.15)"
1383
+ };
1384
+ var paddingMap2 = {
1385
+ none: "0",
1386
+ sm: "16px",
1387
+ md: "24px",
1388
+ lg: "32px",
1389
+ xl: "48px"
1390
+ };
1391
+ function isThemeableValue9(value) {
1392
+ return typeof value === "object" && value !== null && "useTheme" in value;
1393
+ }
1394
+ function Card({
1395
+ backgroundColor,
1396
+ borderColor,
1397
+ borderWidth = "thin",
1398
+ borderRadius = "md",
1399
+ shadow = "sm",
1400
+ padding = "md",
1401
+ id,
1402
+ puck
1403
+ }) {
1404
+ const { resolveColor: resolveColor2 } = useTheme();
1405
+ const DropZone = puck?.renderDropZone;
1406
+ const resolvedBgColor = (() => {
1407
+ if (!backgroundColor) return resolveColor2("background");
1408
+ if (typeof backgroundColor === "string")
1409
+ return { color: backgroundColor, opacity: 100 };
1410
+ if (isThemeableValue9(backgroundColor)) {
1411
+ return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1412
+ }
1413
+ if ("color" in backgroundColor) return backgroundColor;
1414
+ return resolveColor2("background");
1415
+ })();
1416
+ const resolvedBorderColor = (() => {
1417
+ if (!borderColor) return resolveColor2("muted");
1418
+ if (typeof borderColor === "string")
1419
+ return { color: borderColor, opacity: 100 };
1420
+ if (isThemeableValue9(borderColor)) {
1421
+ return borderColor.useTheme ? resolveColor2(borderColor.themeKey) : borderColor.value;
1422
+ }
1423
+ if ("color" in borderColor) return borderColor;
1424
+ return resolveColor2("muted");
1425
+ })();
1426
+ const style = {
1427
+ backgroundColor: hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity),
1428
+ border: borderWidth !== "none" ? `${borderWidthMap[borderWidth]} solid ${hexToRgba(resolvedBorderColor.color, resolvedBorderColor.opacity)}` : "none",
1429
+ borderRadius: radiusMap5[borderRadius],
1430
+ boxShadow: shadowMap2[shadow],
1431
+ padding: paddingMap2[padding]
1432
+ };
1433
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropZone, { zone: "card-content" }) });
1434
+ }
1435
+
1436
+ // components/page/Divider.tsx
1437
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1438
+ var thicknessMap = {
1439
+ thin: "1px",
1440
+ medium: "2px",
1441
+ thick: "4px"
1442
+ };
1443
+ var widthMap2 = {
1444
+ full: "100%",
1445
+ "3/4": "75%",
1446
+ "1/2": "50%",
1447
+ "1/4": "25%"
1448
+ };
1449
+ var spacingMap = {
1450
+ sm: "16px",
1451
+ md: "24px",
1452
+ lg: "32px",
1453
+ xl: "48px"
1454
+ };
1455
+ function isThemeableValue10(value) {
1456
+ return typeof value === "object" && value !== null && "useTheme" in value;
1457
+ }
1458
+ function Divider({
1459
+ style: lineStyle = "solid",
1460
+ thickness = "thin",
1461
+ color,
1462
+ width = "full",
1463
+ align = "center",
1464
+ spacing = "md",
1465
+ id
1466
+ }) {
1467
+ const { resolveColor: resolveColor2 } = useTheme();
1468
+ const resolvedColor = (() => {
1469
+ if (!color) return resolveColor2("muted");
1470
+ if (typeof color === "string") return { color, opacity: 100 };
1471
+ if (isThemeableValue10(color)) {
1472
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1473
+ }
1474
+ if ("color" in color) return color;
1475
+ return resolveColor2("muted");
1476
+ })();
1477
+ const wrapperStyle = {
1478
+ display: "flex",
1479
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
1480
+ padding: `${spacingMap[spacing]} 0`
1481
+ };
1482
+ const hrStyle = {
1483
+ width: widthMap2[width],
1484
+ border: "none",
1485
+ borderTop: `${thicknessMap[thickness]} ${lineStyle} ${hexToRgba(resolvedColor.color, resolvedColor.opacity)}`,
1486
+ margin: 0
1487
+ };
1488
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { style: hrStyle }) });
1489
+ }
1490
+
1491
+ // components/page/Spacer.tsx
1492
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1493
+ var sizeMap4 = {
1494
+ xs: "8px",
1495
+ sm: "16px",
1496
+ md: "24px",
1497
+ lg: "32px",
1498
+ xl: "48px",
1499
+ "2xl": "64px",
1500
+ "3xl": "96px"
1501
+ };
1502
+ function Spacer({ size = "md", id }) {
1503
+ const style = {
1504
+ height: sizeMap4[size],
1505
+ width: "100%"
1506
+ };
1507
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style, "aria-hidden": "true" });
1508
+ }
1509
+
1510
+ // components/page/TextBlock.tsx
1511
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1512
+ var alignmentMap = {
1513
+ left: "text-left",
1514
+ center: "text-center",
1515
+ right: "text-right"
1516
+ };
1517
+ var sizeMap5 = {
1518
+ small: "text-2xl",
1519
+ "medium-small": "text-3xl",
1520
+ medium: "text-4xl",
1521
+ large: "text-5xl",
1522
+ xlarge: "text-6xl"
1523
+ };
1524
+ function isThemeableValue11(value) {
1525
+ return typeof value === "object" && value !== null && "useTheme" in value;
1526
+ }
1527
+ function isEntryBoundValue6(value) {
1528
+ return typeof value === "object" && value !== null && "useEntry" in value;
1529
+ }
1530
+ function resolveColor(color, resolveThemeColor) {
1531
+ if (!color) return "#000000";
1532
+ if (typeof color === "string") return color;
1533
+ if (isThemeableValue11(color)) {
1534
+ if (color.useTheme) {
1535
+ const themeColor = resolveThemeColor(color.themeKey);
1536
+ return hexToRgba(themeColor.color, themeColor.opacity);
1537
+ }
1538
+ return hexToRgba(color.value.color, color.value.opacity);
1539
+ }
1540
+ if ("color" in color && "opacity" in color) {
1541
+ return hexToRgba(color.color, color.opacity);
1542
+ }
1543
+ return "#000000";
1544
+ }
1545
+ function resolveColorHex(color, resolveThemeColor) {
1546
+ if (!color) return "#000000";
1547
+ if (typeof color === "string") return color;
1548
+ if (isThemeableValue11(color)) {
1549
+ if (color.useTheme) {
1550
+ return resolveThemeColor(color.themeKey).color;
1551
+ }
1552
+ return color.value.color;
1553
+ }
1554
+ if ("color" in color) {
1555
+ return color.color;
1556
+ }
1557
+ return "#000000";
1558
+ }
1559
+ function TextBlock({
1560
+ title,
1561
+ subtitle,
1562
+ body,
1563
+ alignment = "left",
1564
+ textSize = "medium",
1565
+ textColor,
1566
+ subtitleBodyColor,
1567
+ useGradientText = false,
1568
+ gradientColor1,
1569
+ gradientColor2,
1570
+ anchorLink
1571
+ }) {
1572
+ const { resolveColor: resolveThemeColor } = useTheme();
1573
+ const { getEntryValue } = useEntries();
1574
+ const resolveText = (value) => {
1575
+ if (!value) return void 0;
1576
+ if (typeof value === "string") return value;
1577
+ if (isEntryBoundValue6(value)) {
1578
+ if (value.useEntry) {
1579
+ const entryVal = getEntryValue(value.entryName, value.fieldKey);
1580
+ return entryVal != null ? String(entryVal) : void 0;
1581
+ }
1582
+ return value.value;
1583
+ }
1584
+ return void 0;
1585
+ };
1586
+ const resolvedTitle = resolveText(title);
1587
+ const resolvedSubtitle = resolveText(subtitle);
1588
+ const resolvedBody = resolveText(body);
1589
+ const titleColorValue = resolveColor(textColor, resolveThemeColor);
1590
+ const subtitleColorValue = resolveColor(subtitleBodyColor, resolveThemeColor);
1591
+ const gradientStyle = useGradientText ? {
1592
+ backgroundImage: `linear-gradient(90deg, ${resolveColorHex(gradientColor1, resolveThemeColor)}, ${resolveColorHex(gradientColor2, resolveThemeColor)})`,
1593
+ WebkitBackgroundClip: "text",
1594
+ WebkitTextFillColor: "transparent",
1595
+ backgroundClip: "text"
1596
+ } : { color: titleColorValue };
1597
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1598
+ "div",
1599
+ {
1600
+ id: anchorLink,
1601
+ className: cn("flex flex-col gap-4", alignmentMap[alignment]),
1602
+ children: [
1603
+ resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1604
+ "h2",
1605
+ {
1606
+ className: cn("font-bold", sizeMap5[textSize]),
1607
+ style: gradientStyle,
1608
+ children: resolvedTitle
1609
+ }
1610
+ ),
1611
+ resolvedSubtitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xl", style: { color: subtitleColorValue }, children: resolvedSubtitle }),
1612
+ resolvedBody && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1613
+ "div",
1614
+ {
1615
+ className: "prose max-w-none",
1616
+ style: { color: subtitleColorValue },
1617
+ dangerouslySetInnerHTML: { __html: resolvedBody }
1618
+ }
1619
+ )
1620
+ ]
1621
+ }
1622
+ );
1623
+ }
1624
+
1625
+ // components/page/CustomImage.tsx
1626
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1627
+ var alignmentMap2 = {
1628
+ left: "mr-auto",
1629
+ center: "mx-auto",
1630
+ right: "ml-auto"
1631
+ };
1632
+ function CustomImage({
1633
+ image,
1634
+ alt = "",
1635
+ maxWidth,
1636
+ alignment = "center",
1637
+ fitContent = false
1638
+ }) {
1639
+ if (!image) {
1640
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex h-48 w-full items-center justify-center bg-gray-200 text-gray-400", children: "No image" });
1641
+ }
1642
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1643
+ "img",
1644
+ {
1645
+ src: image,
1646
+ alt,
1647
+ className: cn(
1648
+ "block",
1649
+ alignmentMap2[alignment],
1650
+ fitContent && "h-full w-full object-cover"
1651
+ ),
1652
+ style: { maxWidth: maxWidth ? `${maxWidth}px` : void 0 }
1653
+ }
1654
+ );
1655
+ }
1656
+
1657
+ // components/page/FeaturesList.tsx
1658
+ var import_lucide_react = require("lucide-react");
1659
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1660
+ var sizeMap6 = {
1661
+ small: { icon: 24, title: "text-base", desc: "text-sm" },
1662
+ medium: { icon: 32, title: "text-lg", desc: "text-base" },
1663
+ large: { icon: 48, title: "text-xl", desc: "text-lg" }
1664
+ };
1665
+ function FeaturesList({
1666
+ features = [],
1667
+ align = "left",
1668
+ size = "medium",
1669
+ iconColor = "#000000",
1670
+ anchorLink
1671
+ }) {
1672
+ const sizeConfig = sizeMap6[size];
1673
+ const getIcon = (iconName) => {
1674
+ const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
1675
+ return import_lucide_react.icons[formatted] || null;
1676
+ };
1677
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1678
+ "div",
1679
+ {
1680
+ id: anchorLink,
1681
+ className: cn(
1682
+ "flex flex-col gap-6",
1683
+ align === "center" && "items-center text-center",
1684
+ align === "right" && "items-end text-right"
1685
+ ),
1686
+ children: features.map((feature, index) => {
1687
+ const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1688
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1689
+ "div",
1690
+ {
1691
+ className: cn(
1692
+ "flex gap-4",
1693
+ align === "center" && "flex-col items-center",
1694
+ align === "right" && "flex-row-reverse"
1695
+ ),
1696
+ children: [
1697
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1698
+ "img",
1699
+ {
1700
+ src: feature.image,
1701
+ alt: feature.title || "",
1702
+ className: "object-contain",
1703
+ style: { width: sizeConfig.icon, height: sizeConfig.icon }
1704
+ }
1705
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1706
+ IconComponent,
1707
+ {
1708
+ size: sizeConfig.icon,
1709
+ style: { color: iconColor },
1710
+ className: "flex-shrink-0"
1711
+ }
1712
+ ) : null,
1713
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1", children: [
1714
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: cn("font-semibold", sizeConfig.title), children: feature.title }),
1715
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1716
+ ] })
1717
+ ]
1718
+ },
1719
+ index
1720
+ );
1721
+ })
1722
+ }
1723
+ );
1724
+ }
1725
+
1726
+ // components/page/FeatureGrid.tsx
1727
+ var import_lucide_react2 = require("lucide-react");
1728
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1729
+ var sizeMap7 = {
1730
+ small: { icon: 24, title: "text-base", desc: "text-sm" },
1731
+ medium: { icon: 32, title: "text-lg", desc: "text-base" },
1732
+ large: { icon: 48, title: "text-xl", desc: "text-lg" }
1733
+ };
1734
+ function FeatureGrid({
1735
+ heading,
1736
+ description,
1737
+ features = [],
1738
+ columns = 3,
1739
+ align = "left",
1740
+ size = "medium",
1741
+ iconColor = "#3B82F6",
1742
+ textColor = "#000000",
1743
+ anchorLink
1744
+ }) {
1745
+ const sizeConfig = sizeMap7[size];
1746
+ const getIcon = (iconName) => {
1747
+ const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
1748
+ return import_lucide_react2.icons[formatted] || null;
1749
+ };
1750
+ const columnClass = {
1751
+ 2: "grid-cols-1 md:grid-cols-2",
1752
+ 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
1753
+ 4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
1754
+ };
1755
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { id: anchorLink, className: "flex flex-col gap-8", children: [
1756
+ (heading || description) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1757
+ "div",
1758
+ {
1759
+ className: cn(
1760
+ "flex flex-col gap-2",
1761
+ align === "center" && "text-center",
1762
+ align === "right" && "text-right"
1763
+ ),
1764
+ children: [
1765
+ heading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "text-3xl font-bold", style: { color: textColor }, children: heading }),
1766
+ description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-gray-600", children: description })
1767
+ ]
1768
+ }
1769
+ ),
1770
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("grid gap-6", columnClass[columns]), children: features.map((feature, index) => {
1771
+ const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1772
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1773
+ "div",
1774
+ {
1775
+ className: cn(
1776
+ "flex flex-col gap-3 rounded-lg bg-gray-50 p-6",
1777
+ align === "center" && "items-center text-center"
1778
+ ),
1779
+ children: [
1780
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1781
+ "img",
1782
+ {
1783
+ src: feature.image,
1784
+ alt: feature.title || "",
1785
+ className: "object-contain",
1786
+ style: { width: sizeConfig.icon, height: sizeConfig.icon }
1787
+ }
1788
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1789
+ IconComponent,
1790
+ {
1791
+ size: sizeConfig.icon,
1792
+ style: { color: iconColor }
1793
+ }
1794
+ ) : null,
1795
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1796
+ "h3",
1797
+ {
1798
+ className: cn("font-semibold", sizeConfig.title),
1799
+ style: { color: textColor },
1800
+ children: feature.title
1801
+ }
1802
+ ),
1803
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1804
+ ]
1805
+ },
1806
+ index
1807
+ );
1808
+ }) })
1809
+ ] });
1810
+ }
1811
+
1812
+ // components/page/Footer.tsx
1813
+ var import_lucide_react3 = require("lucide-react");
1814
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1815
+ function Footer({
1816
+ logo,
1817
+ copyright = "\xA9 2024 Company. All rights reserved.",
1818
+ backgroundColor = "#111827",
1819
+ textColor = "#ffffff",
1820
+ facebookUrl,
1821
+ instagramUrl,
1822
+ twitterUrl,
1823
+ puck
1824
+ }) {
1825
+ const DropZone = puck?.renderDropZone;
1826
+ const utm = useUtmParams();
1827
+ const sendEvent = useGtmEvent();
1828
+ const getSocialPlatform = (url) => {
1829
+ if (url.includes("facebook")) return "facebook";
1830
+ if (url.includes("instagram")) return "instagram";
1831
+ if (url.includes("twitter")) return "twitter";
1832
+ return "social";
1833
+ };
1834
+ const handleSocialClick = (url) => {
1835
+ const platform = getSocialPlatform(url);
1836
+ sendEvent("social_click", {
1837
+ platform,
1838
+ url,
1839
+ ...utm
1840
+ });
1841
+ };
1842
+ const socialLinks = [
1843
+ { url: facebookUrl, Icon: import_lucide_react3.Facebook },
1844
+ { url: instagramUrl, Icon: import_lucide_react3.Instagram },
1845
+ { url: twitterUrl, Icon: import_lucide_react3.Twitter }
1846
+ ].filter(
1847
+ (link) => !!link.url
1848
+ );
1849
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1850
+ "footer",
1851
+ {
1852
+ className: "w-full px-6 py-8",
1853
+ style: { backgroundColor, color: textColor },
1854
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mx-auto flex max-w-7xl flex-col items-center justify-between gap-6 md:flex-row", children: [
1855
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center gap-4", children: logo && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) }),
1856
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropZone, { zone: "footer-content" }),
1857
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center gap-4", children: socialLinks.map(({ url, Icon: Icon3 }, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1858
+ "a",
1859
+ {
1860
+ href: url,
1861
+ target: "_blank",
1862
+ rel: "noopener noreferrer",
1863
+ className: "transition-opacity hover:opacity-80",
1864
+ onClick: () => handleSocialClick(url),
1865
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon3, { size: 24, style: { color: textColor } })
1866
+ },
1867
+ index
1868
+ )) }),
1869
+ copyright && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm opacity-80", children: copyright })
1870
+ ] })
1871
+ }
1872
+ );
1873
+ }
1874
+
1875
+ // components/page/Topbar.tsx
1876
+ var import_react5 = require("react");
1877
+ var import_lucide_react4 = require("lucide-react");
1878
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1879
+ function Topbar({
1880
+ logo,
1881
+ logoUrl = "/",
1882
+ navItems = [],
1883
+ backgroundColor = "#ffffff",
1884
+ textColor = "#000000",
1885
+ maxWidth = "1400px",
1886
+ puck
1887
+ }) {
1888
+ const DropZone = puck?.renderDropZone;
1889
+ const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react5.useState)(false);
1890
+ const utm = useUtmParams();
1891
+ const sendEvent = useGtmEvent();
1892
+ const handleNavClick = (item) => {
1893
+ sendEvent("nav_click", {
1894
+ name: item.name,
1895
+ url: item.url,
1896
+ linkType: item.linkType || "internal",
1897
+ ...utm
1898
+ });
1899
+ };
1900
+ const handleMobileMenuToggle = () => {
1901
+ const newState = !mobileMenuOpen;
1902
+ setMobileMenuOpen(newState);
1903
+ sendEvent("mobile_menu_toggle", {
1904
+ open: newState,
1905
+ ...utm
1906
+ });
1907
+ };
1908
+ const renderLink = (item, index) => {
1909
+ const className = "hover:opacity-80 transition-opacity";
1910
+ if (item.linkType === "external") {
1911
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1912
+ "a",
1913
+ {
1914
+ href: item.url,
1915
+ target: "_blank",
1916
+ rel: "noopener noreferrer",
1917
+ className,
1918
+ onClick: () => handleNavClick(item),
1919
+ children: item.name
1920
+ },
1921
+ index
1922
+ );
1923
+ }
1924
+ if (item.linkType === "scrollTo") {
1925
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1926
+ "a",
1927
+ {
1928
+ href: item.url,
1929
+ className,
1930
+ onClick: () => handleNavClick(item),
1931
+ children: item.name
1932
+ },
1933
+ index
1934
+ );
1935
+ }
1936
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1937
+ "a",
1938
+ {
1939
+ href: item.url,
1940
+ className,
1941
+ onClick: () => handleNavClick(item),
1942
+ children: item.name
1943
+ },
1944
+ index
1945
+ );
1946
+ };
1947
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1948
+ "nav",
1949
+ {
1950
+ className: "sticky top-0 z-50 w-full px-6 py-4",
1951
+ style: { backgroundColor, color: textColor },
1952
+ children: [
1953
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1954
+ "div",
1955
+ {
1956
+ className: "mx-auto flex items-center justify-between",
1957
+ style: { maxWidth },
1958
+ children: [
1959
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1960
+ "a",
1961
+ {
1962
+ href: logoUrl,
1963
+ className: "flex-shrink-0",
1964
+ onClick: () => sendEvent("nav_click", {
1965
+ name: "logo",
1966
+ url: logoUrl,
1967
+ linkType: "internal",
1968
+ ...utm
1969
+ }),
1970
+ children: logo ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl font-bold", children: "Logo" })
1971
+ }
1972
+ ),
1973
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "hidden items-center gap-8 md:flex", children: [
1974
+ navItems.map(renderLink),
1975
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
1976
+ ] }),
1977
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { className: "md:hidden", onClick: handleMobileMenuToggle, children: mobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.X, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.Menu, { size: 24 }) })
1978
+ ]
1979
+ }
1980
+ ),
1981
+ mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1982
+ "div",
1983
+ {
1984
+ className: "absolute top-full right-0 left-0 flex flex-col gap-4 px-6 py-4 md:hidden",
1985
+ style: { backgroundColor },
1986
+ children: [
1987
+ navItems.map(renderLink),
1988
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
1989
+ ]
1990
+ }
1991
+ )
1992
+ ]
1993
+ }
1994
+ );
1995
+ }
1996
+
1997
+ // components/page/Popup.tsx
1998
+ var import_react6 = require("react");
1999
+ var import_lucide_react5 = require("lucide-react");
2000
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2001
+ function Icon2({ name, ...props }) {
2002
+ const formatted = name.charAt(0).toUpperCase() + name.slice(1);
2003
+ const IconComponent = import_lucide_react5.icons[formatted];
2004
+ if (!IconComponent) return null;
2005
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconComponent, { ...props });
2006
+ }
2007
+ var widthMap3 = {
2008
+ small: "max-w-sm",
2009
+ medium: "max-w-lg",
2010
+ large: "max-w-2xl"
2011
+ };
2012
+ var sizeMap8 = {
2013
+ small: "px-3 py-1.5 text-sm",
2014
+ medium: "px-4 py-2 text-base",
2015
+ large: "px-6 py-3 text-lg"
2016
+ };
2017
+ function Popup({
2018
+ ctaText = "Open",
2019
+ buttonColor = "#3B82F6",
2020
+ textColor = "#ffffff",
2021
+ icon,
2022
+ iconPosition = "left",
2023
+ size = "medium",
2024
+ width = "medium",
2025
+ textLink = false,
2026
+ puck
2027
+ }) {
2028
+ const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
2029
+ const utm = useUtmParams();
2030
+ const sendEvent = useGtmEvent();
2031
+ const handleOpen = () => {
2032
+ setIsOpen(true);
2033
+ sendEvent("popup_open", {
2034
+ ctaText,
2035
+ type: textLink ? "link" : "button",
2036
+ ...utm
2037
+ });
2038
+ };
2039
+ const handleClose = () => {
2040
+ setIsOpen(false);
2041
+ sendEvent("popup_close", { ctaText, ...utm });
2042
+ };
2043
+ const trigger = textLink ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2044
+ "button",
2045
+ {
2046
+ onClick: handleOpen,
2047
+ className: "underline hover:opacity-80",
2048
+ style: { color: buttonColor },
2049
+ children: ctaText
2050
+ }
2051
+ ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2052
+ "button",
2053
+ {
2054
+ onClick: handleOpen,
2055
+ className: cn(
2056
+ "flex items-center gap-2 rounded-full font-medium",
2057
+ sizeMap8[size]
2058
+ ),
2059
+ style: { backgroundColor: buttonColor, color: textColor },
2060
+ children: [
2061
+ icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 }),
2062
+ ctaText,
2063
+ icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 })
2064
+ ]
2065
+ }
2066
+ );
2067
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
2068
+ trigger,
2069
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2070
+ "div",
2071
+ {
2072
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
2073
+ onClick: handleClose,
2074
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2075
+ "div",
2076
+ {
2077
+ className: cn(
2078
+ "relative w-full rounded-lg bg-white p-6",
2079
+ widthMap3[width]
2080
+ ),
2081
+ onClick: (e) => e.stopPropagation(),
2082
+ children: [
2083
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2084
+ "button",
2085
+ {
2086
+ onClick: handleClose,
2087
+ className: "absolute top-4 right-4 text-gray-500 hover:text-gray-700",
2088
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.X, { size: 24 })
2089
+ }
2090
+ ),
2091
+ puck && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(puck.renderDropZone, { zone: "popup-content" })
2092
+ ]
2093
+ }
2094
+ )
2095
+ }
2096
+ )
2097
+ ] });
2098
+ }
2099
+
2100
+ // config/server.tsx
2101
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2102
+ var config = {
2103
+ categories: {
2104
+ typography: {
2105
+ title: "Typography",
2106
+ components: ["Heading", "Paragraph"]
2107
+ },
2108
+ actions: {
2109
+ title: "Actions",
2110
+ components: ["Button"]
2111
+ },
2112
+ media: {
2113
+ title: "Media",
2114
+ components: ["Image", "ImageCarousel", "VideoEmbed", "Icon"]
2115
+ },
2116
+ layout: {
2117
+ title: "Layout",
2118
+ components: [
2119
+ "Section",
2120
+ "Container",
2121
+ "Columns",
2122
+ "Card",
2123
+ "Divider",
2124
+ "Spacer"
2125
+ ]
2126
+ },
2127
+ legacy: {
2128
+ title: "Legacy",
2129
+ components: [
2130
+ "TextBlock",
2131
+ "CustomImage",
2132
+ "FeaturesList",
2133
+ "FeatureGrid",
2134
+ "Footer",
2135
+ "Topbar",
2136
+ "Popup"
2137
+ ],
2138
+ defaultExpanded: false
2139
+ }
2140
+ },
2141
+ components: {
2142
+ Heading: {
2143
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Heading, { ...props })
2144
+ },
2145
+ Paragraph: {
2146
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Paragraph, { ...props })
2147
+ },
2148
+ Button: {
2149
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { ...props })
2150
+ },
2151
+ Image: {
2152
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Image, { ...props })
2153
+ },
2154
+ ImageCarousel: {
2155
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ImageCarousel, { ...props })
2156
+ },
2157
+ VideoEmbed: {
2158
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(VideoEmbed, { ...props })
2159
+ },
2160
+ Icon: {
2161
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon, { ...props })
2162
+ },
2163
+ Section: {
2164
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Section, { ...props })
2165
+ },
2166
+ Container: {
2167
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Container, { ...props })
2168
+ },
2169
+ Columns: {
2170
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Columns, { ...props })
2171
+ },
2172
+ Card: {
2173
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Card, { ...props })
2174
+ },
2175
+ Divider: {
2176
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Divider, { ...props })
2177
+ },
2178
+ Spacer: {
2179
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Spacer, { ...props })
2180
+ },
2181
+ TextBlock: {
2182
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TextBlock, { ...props })
2183
+ },
2184
+ CustomImage: {
2185
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CustomImage, { ...props })
2186
+ },
2187
+ FeaturesList: {
2188
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeaturesList, { ...props })
2189
+ },
2190
+ FeatureGrid: {
2191
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureGrid, { ...props })
2192
+ },
2193
+ Footer: {
2194
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Footer, { ...props })
2195
+ },
2196
+ Topbar: {
2197
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Topbar, { ...props })
2198
+ },
2199
+ Popup: {
2200
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Popup, { ...props })
2201
+ }
2202
+ }
2203
+ };
2204
+ // Annotate the CommonJS export names for ESM import in node:
2205
+ 0 && (module.exports = {
2206
+ config
2207
+ });