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