@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
package/dist/index.js
CHANGED
|
@@ -443,8 +443,7 @@ function useUtmParams() {
|
|
|
443
443
|
return utmParams;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
-
// components/page/Button.
|
|
447
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
446
|
+
// components/page/primitives/Button.ts
|
|
448
447
|
var sizeStyles = {
|
|
449
448
|
sm: { padding: "8px 16px", fontSize: "0.875rem" },
|
|
450
449
|
md: { padding: "12px 24px", fontSize: "1rem" },
|
|
@@ -464,6 +463,54 @@ function isThemeableValue3(value) {
|
|
|
464
463
|
function isEntryBoundValue3(value) {
|
|
465
464
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
466
465
|
}
|
|
466
|
+
function getBaseStyle(size, borderRadius, fullWidth) {
|
|
467
|
+
return {
|
|
468
|
+
...sizeStyles[size],
|
|
469
|
+
borderRadius: radiusMap[borderRadius],
|
|
470
|
+
fontWeight: 600,
|
|
471
|
+
cursor: "pointer",
|
|
472
|
+
display: "inline-flex",
|
|
473
|
+
alignItems: "center",
|
|
474
|
+
justifyContent: "center",
|
|
475
|
+
textDecoration: "none",
|
|
476
|
+
transition: "opacity 0.2s, transform 0.2s",
|
|
477
|
+
width: fullWidth ? "100%" : "auto",
|
|
478
|
+
border: "none"
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
function getVariantStyles(variant, bgColor, fgColor) {
|
|
482
|
+
const variantStyles = {
|
|
483
|
+
solid: {
|
|
484
|
+
backgroundColor: bgColor,
|
|
485
|
+
color: fgColor
|
|
486
|
+
},
|
|
487
|
+
outline: {
|
|
488
|
+
backgroundColor: "transparent",
|
|
489
|
+
color: bgColor,
|
|
490
|
+
border: `2px solid ${bgColor}`
|
|
491
|
+
},
|
|
492
|
+
ghost: {
|
|
493
|
+
backgroundColor: "transparent",
|
|
494
|
+
color: bgColor
|
|
495
|
+
},
|
|
496
|
+
link: {
|
|
497
|
+
backgroundColor: "transparent",
|
|
498
|
+
color: bgColor,
|
|
499
|
+
padding: "0",
|
|
500
|
+
textDecoration: "underline"
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
return variantStyles[variant] || variantStyles.solid;
|
|
504
|
+
}
|
|
505
|
+
function getWrapperStyle(align) {
|
|
506
|
+
return {
|
|
507
|
+
display: "flex",
|
|
508
|
+
justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
// components/page/next/Button.tsx
|
|
513
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
467
514
|
function Button({
|
|
468
515
|
text,
|
|
469
516
|
href,
|
|
@@ -526,46 +573,10 @@ function Button({
|
|
|
526
573
|
})();
|
|
527
574
|
const bgColor = hexToRgba(resolvedColor.color, resolvedColor.opacity);
|
|
528
575
|
const fgColor = hexToRgba(resolvedTextColor.color, resolvedTextColor.opacity);
|
|
529
|
-
const baseStyle =
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
cursor: "pointer",
|
|
534
|
-
display: "inline-flex",
|
|
535
|
-
alignItems: "center",
|
|
536
|
-
justifyContent: "center",
|
|
537
|
-
textDecoration: "none",
|
|
538
|
-
transition: "opacity 0.2s, transform 0.2s",
|
|
539
|
-
width: fullWidth ? "100%" : "auto",
|
|
540
|
-
border: "none"
|
|
541
|
-
};
|
|
542
|
-
const variantStyles = {
|
|
543
|
-
solid: {
|
|
544
|
-
backgroundColor: bgColor,
|
|
545
|
-
color: fgColor
|
|
546
|
-
},
|
|
547
|
-
outline: {
|
|
548
|
-
backgroundColor: "transparent",
|
|
549
|
-
color: bgColor,
|
|
550
|
-
border: `2px solid ${bgColor}`
|
|
551
|
-
},
|
|
552
|
-
ghost: {
|
|
553
|
-
backgroundColor: "transparent",
|
|
554
|
-
color: bgColor
|
|
555
|
-
},
|
|
556
|
-
link: {
|
|
557
|
-
backgroundColor: "transparent",
|
|
558
|
-
color: bgColor,
|
|
559
|
-
padding: "0",
|
|
560
|
-
textDecoration: "underline"
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
const style = { ...baseStyle, ...variantStyles[variant] };
|
|
564
|
-
const wrapperStyle = {
|
|
565
|
-
display: "flex",
|
|
566
|
-
justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
|
|
567
|
-
};
|
|
568
|
-
const content = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style, children: resolvedText });
|
|
576
|
+
const baseStyle = getBaseStyle(size, borderRadius, fullWidth);
|
|
577
|
+
const variantStyle = getVariantStyles(variant, bgColor, fgColor);
|
|
578
|
+
const style = { ...baseStyle, ...variantStyle };
|
|
579
|
+
const wrapperStyle = getWrapperStyle(align);
|
|
569
580
|
if (href) {
|
|
570
581
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
571
582
|
"a",
|
|
@@ -583,8 +594,7 @@ function Button({
|
|
|
583
594
|
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 }) });
|
|
584
595
|
}
|
|
585
596
|
|
|
586
|
-
// components/page/Image.
|
|
587
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
597
|
+
// components/page/primitives/Image.ts
|
|
588
598
|
var widthMap = {
|
|
589
599
|
auto: "auto",
|
|
590
600
|
full: "100%",
|
|
@@ -621,6 +631,36 @@ function isThemeableValue4(value) {
|
|
|
621
631
|
function isEntryBoundValue4(value) {
|
|
622
632
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
623
633
|
}
|
|
634
|
+
function getWrapperStyle2(align) {
|
|
635
|
+
return {
|
|
636
|
+
display: "flex",
|
|
637
|
+
flexDirection: "column",
|
|
638
|
+
alignItems: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
|
|
639
|
+
gap: "8px"
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
function getImageStyle(width, aspectRatio, objectFit, borderRadius, shadow) {
|
|
643
|
+
return {
|
|
644
|
+
width: widthMap[width],
|
|
645
|
+
maxWidth: "100%",
|
|
646
|
+
aspectRatio: aspectRatioMap[aspectRatio],
|
|
647
|
+
objectFit,
|
|
648
|
+
borderRadius: radiusMap2[borderRadius],
|
|
649
|
+
boxShadow: shadowMap[shadow],
|
|
650
|
+
display: "block"
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
function getCaptionStyle(align, width, captionColor) {
|
|
654
|
+
return {
|
|
655
|
+
fontSize: "0.875rem",
|
|
656
|
+
color: captionColor,
|
|
657
|
+
textAlign: align,
|
|
658
|
+
maxWidth: widthMap[width]
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
// components/page/next/Image.tsx
|
|
663
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
624
664
|
function Image({
|
|
625
665
|
src,
|
|
626
666
|
alt = "",
|
|
@@ -668,33 +708,25 @@ function Image({
|
|
|
668
708
|
if ("color" in captionColor) return captionColor;
|
|
669
709
|
return resolveColor2("muted");
|
|
670
710
|
})();
|
|
671
|
-
const wrapperStyle =
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
gap: "8px"
|
|
676
|
-
};
|
|
677
|
-
const imageStyle = {
|
|
678
|
-
width: widthMap[width],
|
|
679
|
-
maxWidth: "100%",
|
|
680
|
-
aspectRatio: aspectRatioMap[aspectRatio],
|
|
711
|
+
const wrapperStyle = getWrapperStyle2(align);
|
|
712
|
+
const imageStyle2 = getImageStyle(
|
|
713
|
+
width,
|
|
714
|
+
aspectRatio,
|
|
681
715
|
objectFit,
|
|
682
|
-
borderRadius
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
maxWidth: widthMap[width]
|
|
691
|
-
};
|
|
716
|
+
borderRadius,
|
|
717
|
+
shadow
|
|
718
|
+
);
|
|
719
|
+
const captionStyle = getCaptionStyle(
|
|
720
|
+
align,
|
|
721
|
+
width,
|
|
722
|
+
hexToRgba(resolvedCaptionColor.color, resolvedCaptionColor.opacity)
|
|
723
|
+
);
|
|
692
724
|
if (!resolvedSrc) {
|
|
693
725
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
694
726
|
"div",
|
|
695
727
|
{
|
|
696
728
|
style: {
|
|
697
|
-
...
|
|
729
|
+
...imageStyle2,
|
|
698
730
|
backgroundColor: "#e5e7eb",
|
|
699
731
|
display: "flex",
|
|
700
732
|
alignItems: "center",
|
|
@@ -707,14 +739,15 @@ function Image({
|
|
|
707
739
|
) });
|
|
708
740
|
}
|
|
709
741
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("figure", { id, style: { ...wrapperStyle, margin: 0 }, children: [
|
|
710
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: resolvedSrc, alt, style:
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: resolvedSrc, alt, style: imageStyle2, loading: "lazy" }),
|
|
711
743
|
resolvedCaption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("figcaption", { style: captionStyle, children: resolvedCaption })
|
|
712
744
|
] });
|
|
713
745
|
}
|
|
714
746
|
|
|
715
|
-
// components/page/ImageCarousel.tsx
|
|
747
|
+
// components/page/next/ImageCarousel.tsx
|
|
716
748
|
var import_react4 = require("react");
|
|
717
|
-
|
|
749
|
+
|
|
750
|
+
// components/page/primitives/ImageCarousel.ts
|
|
718
751
|
var aspectRatioMap2 = {
|
|
719
752
|
"16:9": "16 / 9",
|
|
720
753
|
"4:3": "4 / 3",
|
|
@@ -730,6 +763,83 @@ var radiusMap3 = {
|
|
|
730
763
|
function isThemeableValue5(value) {
|
|
731
764
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
732
765
|
}
|
|
766
|
+
function getContainerStyle(aspectRatio, borderRadius) {
|
|
767
|
+
return {
|
|
768
|
+
position: "relative",
|
|
769
|
+
aspectRatio: aspectRatioMap2[aspectRatio],
|
|
770
|
+
borderRadius: radiusMap3[borderRadius],
|
|
771
|
+
overflow: "hidden"
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
function getSlideContainerStyle(currentIndex) {
|
|
775
|
+
return {
|
|
776
|
+
display: "flex",
|
|
777
|
+
transition: "transform 0.3s ease-in-out",
|
|
778
|
+
transform: `translateX(-${currentIndex * 100}%)`,
|
|
779
|
+
height: "100%"
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
var slideStyle = {
|
|
783
|
+
minWidth: "100%",
|
|
784
|
+
height: "100%"
|
|
785
|
+
};
|
|
786
|
+
var imageStyle = {
|
|
787
|
+
width: "100%",
|
|
788
|
+
height: "100%",
|
|
789
|
+
objectFit: "cover"
|
|
790
|
+
};
|
|
791
|
+
function getArrowStyle(arrowColor) {
|
|
792
|
+
return {
|
|
793
|
+
position: "absolute",
|
|
794
|
+
top: "50%",
|
|
795
|
+
transform: "translateY(-50%)",
|
|
796
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
797
|
+
color: arrowColor,
|
|
798
|
+
border: "none",
|
|
799
|
+
borderRadius: "50%",
|
|
800
|
+
width: "40px",
|
|
801
|
+
height: "40px",
|
|
802
|
+
cursor: "pointer",
|
|
803
|
+
display: "flex",
|
|
804
|
+
alignItems: "center",
|
|
805
|
+
justifyContent: "center",
|
|
806
|
+
fontSize: "20px",
|
|
807
|
+
zIndex: 1
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
var dotsContainerStyle = {
|
|
811
|
+
position: "absolute",
|
|
812
|
+
bottom: "16px",
|
|
813
|
+
left: "50%",
|
|
814
|
+
transform: "translateX(-50%)",
|
|
815
|
+
display: "flex",
|
|
816
|
+
gap: "8px",
|
|
817
|
+
zIndex: 1
|
|
818
|
+
};
|
|
819
|
+
function getDotStyle(isActive, dotColor) {
|
|
820
|
+
return {
|
|
821
|
+
width: "10px",
|
|
822
|
+
height: "10px",
|
|
823
|
+
borderRadius: "50%",
|
|
824
|
+
border: "none",
|
|
825
|
+
cursor: "pointer",
|
|
826
|
+
backgroundColor: isActive ? dotColor : "rgba(255,255,255,0.5)"
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
function getEmptyState(aspectRatio, borderRadius) {
|
|
830
|
+
return {
|
|
831
|
+
aspectRatio: aspectRatioMap2[aspectRatio],
|
|
832
|
+
backgroundColor: "#e5e7eb",
|
|
833
|
+
borderRadius: radiusMap3[borderRadius],
|
|
834
|
+
display: "flex",
|
|
835
|
+
alignItems: "center",
|
|
836
|
+
justifyContent: "center",
|
|
837
|
+
color: "#9ca3af"
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
// components/page/next/ImageCarousel.tsx
|
|
842
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
733
843
|
function ImageCarousel({
|
|
734
844
|
images = [],
|
|
735
845
|
aspectRatio = "16:9",
|
|
@@ -793,79 +903,18 @@ function ImageCarousel({
|
|
|
793
903
|
});
|
|
794
904
|
};
|
|
795
905
|
if (images.length === 0) {
|
|
796
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
797
|
-
"div",
|
|
798
|
-
{
|
|
799
|
-
style: {
|
|
800
|
-
aspectRatio: aspectRatioMap2[aspectRatio],
|
|
801
|
-
backgroundColor: "#e5e7eb",
|
|
802
|
-
borderRadius: radiusMap3[borderRadius],
|
|
803
|
-
display: "flex",
|
|
804
|
-
alignItems: "center",
|
|
805
|
-
justifyContent: "center",
|
|
806
|
-
color: "#9ca3af"
|
|
807
|
-
},
|
|
808
|
-
children: "No images"
|
|
809
|
-
}
|
|
810
|
-
);
|
|
906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: getEmptyState(aspectRatio, borderRadius), children: "No images" });
|
|
811
907
|
}
|
|
812
|
-
const
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
height: "100%"
|
|
823
|
-
};
|
|
824
|
-
const slideStyle = {
|
|
825
|
-
minWidth: "100%",
|
|
826
|
-
height: "100%"
|
|
827
|
-
};
|
|
828
|
-
const imageStyle = {
|
|
829
|
-
width: "100%",
|
|
830
|
-
height: "100%",
|
|
831
|
-
objectFit: "cover"
|
|
832
|
-
};
|
|
833
|
-
const arrowStyle = {
|
|
834
|
-
position: "absolute",
|
|
835
|
-
top: "50%",
|
|
836
|
-
transform: "translateY(-50%)",
|
|
837
|
-
backgroundColor: "rgba(0,0,0,0.5)",
|
|
838
|
-
color: hexToRgba(resolvedArrowColor.color, resolvedArrowColor.opacity),
|
|
839
|
-
border: "none",
|
|
840
|
-
borderRadius: "50%",
|
|
841
|
-
width: "40px",
|
|
842
|
-
height: "40px",
|
|
843
|
-
cursor: "pointer",
|
|
844
|
-
display: "flex",
|
|
845
|
-
alignItems: "center",
|
|
846
|
-
justifyContent: "center",
|
|
847
|
-
fontSize: "20px",
|
|
848
|
-
zIndex: 1
|
|
849
|
-
};
|
|
850
|
-
const dotsContainerStyle = {
|
|
851
|
-
position: "absolute",
|
|
852
|
-
bottom: "16px",
|
|
853
|
-
left: "50%",
|
|
854
|
-
transform: "translateX(-50%)",
|
|
855
|
-
display: "flex",
|
|
856
|
-
gap: "8px",
|
|
857
|
-
zIndex: 1
|
|
858
|
-
};
|
|
859
|
-
const dotStyle = (isActive) => ({
|
|
860
|
-
width: "10px",
|
|
861
|
-
height: "10px",
|
|
862
|
-
borderRadius: "50%",
|
|
863
|
-
border: "none",
|
|
864
|
-
cursor: "pointer",
|
|
865
|
-
backgroundColor: isActive ? hexToRgba(resolvedDotColor.color, resolvedDotColor.opacity) : "rgba(255,255,255,0.5)"
|
|
866
|
-
});
|
|
867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id, style: containerStyle, children: [
|
|
868
|
-
/* @__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)(
|
|
908
|
+
const arrowColorStr = hexToRgba(
|
|
909
|
+
resolvedArrowColor.color,
|
|
910
|
+
resolvedArrowColor.opacity
|
|
911
|
+
);
|
|
912
|
+
const dotColorStr = hexToRgba(
|
|
913
|
+
resolvedDotColor.color,
|
|
914
|
+
resolvedDotColor.opacity
|
|
915
|
+
);
|
|
916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id, style: getContainerStyle(aspectRatio, borderRadius), children: [
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: getSlideContainerStyle(currentIndex), children: images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: slideStyle, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
869
918
|
"img",
|
|
870
919
|
{
|
|
871
920
|
src: image.src,
|
|
@@ -880,7 +929,7 @@ function ImageCarousel({
|
|
|
880
929
|
{
|
|
881
930
|
type: "button",
|
|
882
931
|
onClick: goToPrevious,
|
|
883
|
-
style: { ...
|
|
932
|
+
style: { ...getArrowStyle(arrowColorStr), left: "16px" },
|
|
884
933
|
"aria-label": "Previous slide",
|
|
885
934
|
children: "\u2039"
|
|
886
935
|
}
|
|
@@ -890,7 +939,7 @@ function ImageCarousel({
|
|
|
890
939
|
{
|
|
891
940
|
type: "button",
|
|
892
941
|
onClick: goToNext,
|
|
893
|
-
style: { ...
|
|
942
|
+
style: { ...getArrowStyle(arrowColorStr), right: "16px" },
|
|
894
943
|
"aria-label": "Next slide",
|
|
895
944
|
children: "\u203A"
|
|
896
945
|
}
|
|
@@ -901,7 +950,7 @@ function ImageCarousel({
|
|
|
901
950
|
{
|
|
902
951
|
type: "button",
|
|
903
952
|
onClick: () => goToSlide(index),
|
|
904
|
-
style:
|
|
953
|
+
style: getDotStyle(index === currentIndex, dotColorStr),
|
|
905
954
|
"aria-label": `Go to slide ${index + 1}`
|
|
906
955
|
},
|
|
907
956
|
index
|
|
@@ -1034,7 +1083,7 @@ function VideoEmbed({
|
|
|
1034
1083
|
) }) });
|
|
1035
1084
|
}
|
|
1036
1085
|
|
|
1037
|
-
// components/page/Icon.tsx
|
|
1086
|
+
// components/page/primitives/Icon.tsx
|
|
1038
1087
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1039
1088
|
var sizeMap = {
|
|
1040
1089
|
sm: { size: "16px", strokeWidth: 2 },
|
|
@@ -1236,6 +1285,16 @@ var icons = {
|
|
|
1236
1285
|
function isThemeableValue6(value) {
|
|
1237
1286
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1238
1287
|
}
|
|
1288
|
+
function getWrapperStyle3(align) {
|
|
1289
|
+
return {
|
|
1290
|
+
display: "flex",
|
|
1291
|
+
justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
var availableIcons = Object.keys(icons);
|
|
1295
|
+
|
|
1296
|
+
// components/page/next/Icon.tsx
|
|
1297
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1239
1298
|
function Icon({
|
|
1240
1299
|
name = "check",
|
|
1241
1300
|
size = "md",
|
|
@@ -1256,11 +1315,8 @@ function Icon({
|
|
|
1256
1315
|
const IconComponent = icons[name.toLowerCase()] || icons.check;
|
|
1257
1316
|
const { size: iconSize, strokeWidth } = sizeMap[size];
|
|
1258
1317
|
const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
|
|
1259
|
-
const wrapperStyle =
|
|
1260
|
-
|
|
1261
|
-
justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
|
|
1262
|
-
};
|
|
1263
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1318
|
+
const wrapperStyle = getWrapperStyle3(align);
|
|
1319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1264
1320
|
IconComponent,
|
|
1265
1321
|
{
|
|
1266
1322
|
size: iconSize,
|
|
@@ -1269,7 +1325,6 @@ function Icon({
|
|
|
1269
1325
|
}
|
|
1270
1326
|
) });
|
|
1271
1327
|
}
|
|
1272
|
-
var availableIcons = Object.keys(icons);
|
|
1273
1328
|
|
|
1274
1329
|
// design-system/shadows.ts
|
|
1275
1330
|
var shadowPresets = [
|
|
@@ -1307,8 +1362,7 @@ var getShadowCSS = (value) => {
|
|
|
1307
1362
|
return preset?.css ?? "none";
|
|
1308
1363
|
};
|
|
1309
1364
|
|
|
1310
|
-
// components/page/Section.
|
|
1311
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1365
|
+
// components/page/primitives/Section.ts
|
|
1312
1366
|
function isThemeableValue7(value) {
|
|
1313
1367
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1314
1368
|
}
|
|
@@ -1340,6 +1394,20 @@ function getVisibilityClasses(visibility) {
|
|
|
1340
1394
|
}
|
|
1341
1395
|
return "";
|
|
1342
1396
|
}
|
|
1397
|
+
function getSectionStyle(verticalPadding, horizontalPadding, gap, backgroundColor, backgroundImage, shadow, borderRadius) {
|
|
1398
|
+
return {
|
|
1399
|
+
padding: `${verticalPadding}px ${horizontalPadding}px`,
|
|
1400
|
+
gap: `${gap}px`,
|
|
1401
|
+
backgroundColor,
|
|
1402
|
+
backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
|
|
1403
|
+
backgroundSize: "cover",
|
|
1404
|
+
backgroundPosition: "center",
|
|
1405
|
+
borderRadius: `${borderRadius}px`
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
// components/page/next/Section.tsx
|
|
1410
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1343
1411
|
function Section({
|
|
1344
1412
|
children: _children,
|
|
1345
1413
|
verticalPadding = 48,
|
|
@@ -1356,28 +1424,30 @@ function Section({
|
|
|
1356
1424
|
}) {
|
|
1357
1425
|
const { resolveColor: resolveColor2 } = useTheme();
|
|
1358
1426
|
const DropZone = puck?.renderDropZone;
|
|
1359
|
-
|
|
1427
|
+
const style = {
|
|
1428
|
+
...getSectionStyle(
|
|
1429
|
+
verticalPadding,
|
|
1430
|
+
horizontalPadding,
|
|
1431
|
+
gap,
|
|
1432
|
+
resolveBackgroundColor(backgroundColor, resolveColor2),
|
|
1433
|
+
backgroundImage,
|
|
1434
|
+
shadow,
|
|
1435
|
+
borderRadius
|
|
1436
|
+
),
|
|
1437
|
+
boxShadow: getShadowCSS(shadow)
|
|
1438
|
+
};
|
|
1439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1360
1440
|
"section",
|
|
1361
1441
|
{
|
|
1362
1442
|
id: anchorLink,
|
|
1363
1443
|
className: cn("flex w-full flex-col", getVisibilityClasses(visibility)),
|
|
1364
|
-
style
|
|
1365
|
-
|
|
1366
|
-
gap: `${gap}px`,
|
|
1367
|
-
backgroundColor: resolveBackgroundColor(backgroundColor, resolveColor2),
|
|
1368
|
-
backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
|
|
1369
|
-
backgroundSize: "cover",
|
|
1370
|
-
backgroundPosition: "center",
|
|
1371
|
-
boxShadow: getShadowCSS(shadow),
|
|
1372
|
-
borderRadius: `${borderRadius}px`
|
|
1373
|
-
},
|
|
1374
|
-
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" }) })
|
|
1444
|
+
style,
|
|
1445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mx-auto w-full", style: { maxWidth: contentMaxWidth }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropZone, { zone: "content" }) })
|
|
1375
1446
|
}
|
|
1376
1447
|
);
|
|
1377
1448
|
}
|
|
1378
1449
|
|
|
1379
|
-
// components/page/Container.
|
|
1380
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1450
|
+
// components/page/primitives/Container.ts
|
|
1381
1451
|
var maxWidthMap2 = {
|
|
1382
1452
|
sm: "640px",
|
|
1383
1453
|
md: "768px",
|
|
@@ -1396,6 +1466,22 @@ var paddingMap = {
|
|
|
1396
1466
|
function isThemeableValue8(value) {
|
|
1397
1467
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1398
1468
|
}
|
|
1469
|
+
function getContainerStyle2(maxWidth, paddingX, paddingY, centered, backgroundColor) {
|
|
1470
|
+
return {
|
|
1471
|
+
maxWidth: maxWidthMap2[maxWidth],
|
|
1472
|
+
marginLeft: centered ? "auto" : void 0,
|
|
1473
|
+
marginRight: centered ? "auto" : void 0,
|
|
1474
|
+
paddingLeft: paddingMap[paddingX],
|
|
1475
|
+
paddingRight: paddingMap[paddingX],
|
|
1476
|
+
paddingTop: paddingMap[paddingY],
|
|
1477
|
+
paddingBottom: paddingMap[paddingY],
|
|
1478
|
+
backgroundColor,
|
|
1479
|
+
width: "100%"
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
// components/page/next/Container.tsx
|
|
1484
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1399
1485
|
function Container({
|
|
1400
1486
|
maxWidth = "lg",
|
|
1401
1487
|
padding,
|
|
@@ -1420,22 +1506,17 @@ function Container({
|
|
|
1420
1506
|
})();
|
|
1421
1507
|
const effectivePaddingX = padding || paddingX;
|
|
1422
1508
|
const effectivePaddingY = padding || paddingY;
|
|
1423
|
-
const style =
|
|
1424
|
-
maxWidth
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
backgroundColor: resolvedBgColor ? hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity) : void 0,
|
|
1432
|
-
width: "100%"
|
|
1433
|
-
};
|
|
1434
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropZone, { zone: "container-content" }) });
|
|
1509
|
+
const style = getContainerStyle2(
|
|
1510
|
+
maxWidth,
|
|
1511
|
+
effectivePaddingX,
|
|
1512
|
+
effectivePaddingY,
|
|
1513
|
+
centered,
|
|
1514
|
+
resolvedBgColor ? hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity) : void 0
|
|
1515
|
+
);
|
|
1516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropZone, { zone: "container-content" }) });
|
|
1435
1517
|
}
|
|
1436
1518
|
|
|
1437
|
-
// components/page/Columns.
|
|
1438
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1519
|
+
// components/page/primitives/Columns.ts
|
|
1439
1520
|
var gapMap = {
|
|
1440
1521
|
none: "0",
|
|
1441
1522
|
sm: "16px",
|
|
@@ -1449,6 +1530,17 @@ var alignMap = {
|
|
|
1449
1530
|
bottom: "flex-end",
|
|
1450
1531
|
stretch: "stretch"
|
|
1451
1532
|
};
|
|
1533
|
+
function getContainerStyle3(columns, gap, verticalAlign) {
|
|
1534
|
+
return {
|
|
1535
|
+
display: "grid",
|
|
1536
|
+
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
1537
|
+
gap: gapMap[gap],
|
|
1538
|
+
alignItems: alignMap[verticalAlign]
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
// components/page/next/Columns.tsx
|
|
1543
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1452
1544
|
function Columns({
|
|
1453
1545
|
columns = 2,
|
|
1454
1546
|
gap = "md",
|
|
@@ -1458,17 +1550,11 @@ function Columns({
|
|
|
1458
1550
|
puck
|
|
1459
1551
|
}) {
|
|
1460
1552
|
const DropZone = puck?.renderDropZone;
|
|
1461
|
-
const containerStyle =
|
|
1462
|
-
|
|
1463
|
-
gridTemplateColumns: `repeat(${columns}, 1fr)`,
|
|
1464
|
-
gap: gapMap[gap],
|
|
1465
|
-
alignItems: alignMap[verticalAlign]
|
|
1466
|
-
};
|
|
1467
|
-
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)) });
|
|
1553
|
+
const containerStyle = getContainerStyle3(columns, gap, verticalAlign);
|
|
1554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id, style: containerStyle, children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { minWidth: 0 }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropZone, { zone: `column-${index}` }) }, index)) });
|
|
1468
1555
|
}
|
|
1469
1556
|
|
|
1470
|
-
// components/page/Card.
|
|
1471
|
-
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1557
|
+
// components/page/primitives/Card.ts
|
|
1472
1558
|
var borderWidthMap = {
|
|
1473
1559
|
none: "0",
|
|
1474
1560
|
thin: "1px",
|
|
@@ -1499,6 +1585,18 @@ var paddingMap2 = {
|
|
|
1499
1585
|
function isThemeableValue9(value) {
|
|
1500
1586
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1501
1587
|
}
|
|
1588
|
+
function getCardStyle(backgroundColor, borderColor, borderWidth, borderRadius, shadow, padding) {
|
|
1589
|
+
return {
|
|
1590
|
+
backgroundColor,
|
|
1591
|
+
border: borderWidth !== "none" ? `${borderWidthMap[borderWidth]} solid ${borderColor}` : "none",
|
|
1592
|
+
borderRadius: radiusMap5[borderRadius],
|
|
1593
|
+
boxShadow: shadowMap2[shadow],
|
|
1594
|
+
padding: paddingMap2[padding]
|
|
1595
|
+
};
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
// components/page/next/Card.tsx
|
|
1599
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1502
1600
|
function Card({
|
|
1503
1601
|
backgroundColor,
|
|
1504
1602
|
borderColor,
|
|
@@ -1531,18 +1629,18 @@ function Card({
|
|
|
1531
1629
|
if ("color" in borderColor) return borderColor;
|
|
1532
1630
|
return resolveColor2("muted");
|
|
1533
1631
|
})();
|
|
1534
|
-
const style =
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1632
|
+
const style = getCardStyle(
|
|
1633
|
+
hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity),
|
|
1634
|
+
hexToRgba(resolvedBorderColor.color, resolvedBorderColor.opacity),
|
|
1635
|
+
borderWidth,
|
|
1636
|
+
borderRadius,
|
|
1637
|
+
shadow,
|
|
1638
|
+
padding
|
|
1639
|
+
);
|
|
1640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropZone, { zone: "card-content" }) });
|
|
1542
1641
|
}
|
|
1543
1642
|
|
|
1544
|
-
// components/page/Divider.
|
|
1545
|
-
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1643
|
+
// components/page/primitives/Divider.ts
|
|
1546
1644
|
var thicknessMap = {
|
|
1547
1645
|
thin: "1px",
|
|
1548
1646
|
medium: "2px",
|
|
@@ -1563,6 +1661,24 @@ var spacingMap = {
|
|
|
1563
1661
|
function isThemeableValue10(value) {
|
|
1564
1662
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1565
1663
|
}
|
|
1664
|
+
function getWrapperStyle4(align, spacing) {
|
|
1665
|
+
return {
|
|
1666
|
+
display: "flex",
|
|
1667
|
+
justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
|
|
1668
|
+
padding: `${spacingMap[spacing]} 0`
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
function getHrStyle(width, thickness, lineStyle, color) {
|
|
1672
|
+
return {
|
|
1673
|
+
width: widthMap2[width],
|
|
1674
|
+
border: "none",
|
|
1675
|
+
borderTop: `${thicknessMap[thickness]} ${lineStyle} ${color}`,
|
|
1676
|
+
margin: 0
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
// components/page/next/Divider.tsx
|
|
1681
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1566
1682
|
function Divider({
|
|
1567
1683
|
style: lineStyle = "solid",
|
|
1568
1684
|
thickness = "thin",
|
|
@@ -1582,22 +1698,17 @@ function Divider({
|
|
|
1582
1698
|
if ("color" in color) return color;
|
|
1583
1699
|
return resolveColor2("muted");
|
|
1584
1700
|
})();
|
|
1585
|
-
const wrapperStyle =
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
borderTop: `${thicknessMap[thickness]} ${lineStyle} ${hexToRgba(resolvedColor.color, resolvedColor.opacity)}`,
|
|
1594
|
-
margin: 0
|
|
1595
|
-
};
|
|
1596
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { style: hrStyle }) });
|
|
1701
|
+
const wrapperStyle = getWrapperStyle4(align, spacing);
|
|
1702
|
+
const hrStyle = getHrStyle(
|
|
1703
|
+
width,
|
|
1704
|
+
thickness,
|
|
1705
|
+
lineStyle,
|
|
1706
|
+
hexToRgba(resolvedColor.color, resolvedColor.opacity)
|
|
1707
|
+
);
|
|
1708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("hr", { style: hrStyle }) });
|
|
1597
1709
|
}
|
|
1598
1710
|
|
|
1599
|
-
// components/page/Spacer.
|
|
1600
|
-
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1711
|
+
// components/page/primitives/Spacer.ts
|
|
1601
1712
|
var sizeMap2 = {
|
|
1602
1713
|
xs: "8px",
|
|
1603
1714
|
sm: "16px",
|
|
@@ -1607,16 +1718,19 @@ var sizeMap2 = {
|
|
|
1607
1718
|
"2xl": "64px",
|
|
1608
1719
|
"3xl": "96px"
|
|
1609
1720
|
};
|
|
1721
|
+
|
|
1722
|
+
// components/page/next/Spacer.tsx
|
|
1723
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1610
1724
|
function Spacer({ size = "md", id }) {
|
|
1611
1725
|
const style = {
|
|
1612
1726
|
height: sizeMap2[size],
|
|
1613
1727
|
width: "100%"
|
|
1614
1728
|
};
|
|
1615
|
-
return /* @__PURE__ */ (0,
|
|
1729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id, style, "aria-hidden": "true" });
|
|
1616
1730
|
}
|
|
1617
1731
|
|
|
1618
1732
|
// components/page/TextBlock.tsx
|
|
1619
|
-
var
|
|
1733
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1620
1734
|
var alignmentMap = {
|
|
1621
1735
|
left: "text-left",
|
|
1622
1736
|
center: "text-center",
|
|
@@ -1702,13 +1816,13 @@ function TextBlock({
|
|
|
1702
1816
|
WebkitTextFillColor: "transparent",
|
|
1703
1817
|
backgroundClip: "text"
|
|
1704
1818
|
} : { color: titleColorValue };
|
|
1705
|
-
return /* @__PURE__ */ (0,
|
|
1819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1706
1820
|
"div",
|
|
1707
1821
|
{
|
|
1708
1822
|
id: anchorLink,
|
|
1709
1823
|
className: cn("flex flex-col gap-4", alignmentMap[alignment]),
|
|
1710
1824
|
children: [
|
|
1711
|
-
resolvedTitle && /* @__PURE__ */ (0,
|
|
1825
|
+
resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1712
1826
|
"h2",
|
|
1713
1827
|
{
|
|
1714
1828
|
className: cn("font-bold", sizeMap3[textSize]),
|
|
@@ -1716,8 +1830,8 @@ function TextBlock({
|
|
|
1716
1830
|
children: resolvedTitle
|
|
1717
1831
|
}
|
|
1718
1832
|
),
|
|
1719
|
-
resolvedSubtitle && /* @__PURE__ */ (0,
|
|
1720
|
-
resolvedBody && /* @__PURE__ */ (0,
|
|
1833
|
+
resolvedSubtitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-xl", style: { color: subtitleColorValue }, children: resolvedSubtitle }),
|
|
1834
|
+
resolvedBody && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1721
1835
|
"div",
|
|
1722
1836
|
{
|
|
1723
1837
|
className: "prose max-w-none",
|
|
@@ -1731,7 +1845,7 @@ function TextBlock({
|
|
|
1731
1845
|
}
|
|
1732
1846
|
|
|
1733
1847
|
// components/page/CustomImage.tsx
|
|
1734
|
-
var
|
|
1848
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1735
1849
|
var alignmentMap2 = {
|
|
1736
1850
|
left: "mr-auto",
|
|
1737
1851
|
center: "mx-auto",
|
|
@@ -1745,9 +1859,9 @@ function CustomImage({
|
|
|
1745
1859
|
fitContent = false
|
|
1746
1860
|
}) {
|
|
1747
1861
|
if (!image) {
|
|
1748
|
-
return /* @__PURE__ */ (0,
|
|
1862
|
+
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" });
|
|
1749
1863
|
}
|
|
1750
|
-
return /* @__PURE__ */ (0,
|
|
1864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1751
1865
|
"img",
|
|
1752
1866
|
{
|
|
1753
1867
|
src: image,
|
|
@@ -1764,7 +1878,7 @@ function CustomImage({
|
|
|
1764
1878
|
|
|
1765
1879
|
// components/page/FeaturesList.tsx
|
|
1766
1880
|
var import_lucide_react = require("lucide-react");
|
|
1767
|
-
var
|
|
1881
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1768
1882
|
var sizeMap4 = {
|
|
1769
1883
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1770
1884
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
@@ -1782,7 +1896,7 @@ function FeaturesList({
|
|
|
1782
1896
|
const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
|
|
1783
1897
|
return import_lucide_react.icons[formatted] || null;
|
|
1784
1898
|
};
|
|
1785
|
-
return /* @__PURE__ */ (0,
|
|
1899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1786
1900
|
"div",
|
|
1787
1901
|
{
|
|
1788
1902
|
id: anchorLink,
|
|
@@ -1793,7 +1907,7 @@ function FeaturesList({
|
|
|
1793
1907
|
),
|
|
1794
1908
|
children: features.map((feature, index) => {
|
|
1795
1909
|
const IconComponent = feature.icon ? getIcon(feature.icon) : null;
|
|
1796
|
-
return /* @__PURE__ */ (0,
|
|
1910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1797
1911
|
"div",
|
|
1798
1912
|
{
|
|
1799
1913
|
className: cn(
|
|
@@ -1802,7 +1916,7 @@ function FeaturesList({
|
|
|
1802
1916
|
align === "right" && "flex-row-reverse"
|
|
1803
1917
|
),
|
|
1804
1918
|
children: [
|
|
1805
|
-
feature.image ? /* @__PURE__ */ (0,
|
|
1919
|
+
feature.image ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1806
1920
|
"img",
|
|
1807
1921
|
{
|
|
1808
1922
|
src: feature.image,
|
|
@@ -1810,7 +1924,7 @@ function FeaturesList({
|
|
|
1810
1924
|
className: "object-contain",
|
|
1811
1925
|
style: { width: sizeConfig.icon, height: sizeConfig.icon }
|
|
1812
1926
|
}
|
|
1813
|
-
) : IconComponent ? /* @__PURE__ */ (0,
|
|
1927
|
+
) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1814
1928
|
IconComponent,
|
|
1815
1929
|
{
|
|
1816
1930
|
size: sizeConfig.icon,
|
|
@@ -1818,9 +1932,9 @@ function FeaturesList({
|
|
|
1818
1932
|
className: "flex-shrink-0"
|
|
1819
1933
|
}
|
|
1820
1934
|
) : null,
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
1822
|
-
feature.title && /* @__PURE__ */ (0,
|
|
1823
|
-
feature.description && /* @__PURE__ */ (0,
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1936
|
+
feature.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: cn("font-semibold", sizeConfig.title), children: feature.title }),
|
|
1937
|
+
feature.description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
|
|
1824
1938
|
] })
|
|
1825
1939
|
]
|
|
1826
1940
|
},
|
|
@@ -1833,7 +1947,7 @@ function FeaturesList({
|
|
|
1833
1947
|
|
|
1834
1948
|
// components/page/FeatureGrid.tsx
|
|
1835
1949
|
var import_lucide_react2 = require("lucide-react");
|
|
1836
|
-
var
|
|
1950
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1837
1951
|
var sizeMap5 = {
|
|
1838
1952
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1839
1953
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
@@ -1860,8 +1974,8 @@ function FeatureGrid({
|
|
|
1860
1974
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
1861
1975
|
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
|
|
1862
1976
|
};
|
|
1863
|
-
return /* @__PURE__ */ (0,
|
|
1864
|
-
(heading || description) && /* @__PURE__ */ (0,
|
|
1977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { id: anchorLink, className: "flex flex-col gap-8", children: [
|
|
1978
|
+
(heading || description) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1865
1979
|
"div",
|
|
1866
1980
|
{
|
|
1867
1981
|
className: cn(
|
|
@@ -1870,14 +1984,14 @@ function FeatureGrid({
|
|
|
1870
1984
|
align === "right" && "text-right"
|
|
1871
1985
|
),
|
|
1872
1986
|
children: [
|
|
1873
|
-
heading && /* @__PURE__ */ (0,
|
|
1874
|
-
description && /* @__PURE__ */ (0,
|
|
1987
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { className: "text-3xl font-bold", style: { color: textColor }, children: heading }),
|
|
1988
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-gray-600", children: description })
|
|
1875
1989
|
]
|
|
1876
1990
|
}
|
|
1877
1991
|
),
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("grid gap-6", columnClass[columns]), children: features.map((feature, index) => {
|
|
1879
1993
|
const IconComponent = feature.icon ? getIcon(feature.icon) : null;
|
|
1880
|
-
return /* @__PURE__ */ (0,
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1881
1995
|
"div",
|
|
1882
1996
|
{
|
|
1883
1997
|
className: cn(
|
|
@@ -1885,7 +1999,7 @@ function FeatureGrid({
|
|
|
1885
1999
|
align === "center" && "items-center text-center"
|
|
1886
2000
|
),
|
|
1887
2001
|
children: [
|
|
1888
|
-
feature.image ? /* @__PURE__ */ (0,
|
|
2002
|
+
feature.image ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1889
2003
|
"img",
|
|
1890
2004
|
{
|
|
1891
2005
|
src: feature.image,
|
|
@@ -1893,14 +2007,14 @@ function FeatureGrid({
|
|
|
1893
2007
|
className: "object-contain",
|
|
1894
2008
|
style: { width: sizeConfig.icon, height: sizeConfig.icon }
|
|
1895
2009
|
}
|
|
1896
|
-
) : IconComponent ? /* @__PURE__ */ (0,
|
|
2010
|
+
) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1897
2011
|
IconComponent,
|
|
1898
2012
|
{
|
|
1899
2013
|
size: sizeConfig.icon,
|
|
1900
2014
|
style: { color: iconColor }
|
|
1901
2015
|
}
|
|
1902
2016
|
) : null,
|
|
1903
|
-
feature.title && /* @__PURE__ */ (0,
|
|
2017
|
+
feature.title && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1904
2018
|
"h3",
|
|
1905
2019
|
{
|
|
1906
2020
|
className: cn("font-semibold", sizeConfig.title),
|
|
@@ -1908,7 +2022,7 @@ function FeatureGrid({
|
|
|
1908
2022
|
children: feature.title
|
|
1909
2023
|
}
|
|
1910
2024
|
),
|
|
1911
|
-
feature.description && /* @__PURE__ */ (0,
|
|
2025
|
+
feature.description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
|
|
1912
2026
|
]
|
|
1913
2027
|
},
|
|
1914
2028
|
index
|
|
@@ -1919,7 +2033,7 @@ function FeatureGrid({
|
|
|
1919
2033
|
|
|
1920
2034
|
// components/page/Footer.tsx
|
|
1921
2035
|
var import_lucide_react3 = require("lucide-react");
|
|
1922
|
-
var
|
|
2036
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1923
2037
|
function Footer({
|
|
1924
2038
|
logo,
|
|
1925
2039
|
copyright = "\xA9 2024 Company. All rights reserved.",
|
|
@@ -1954,15 +2068,15 @@ function Footer({
|
|
|
1954
2068
|
].filter(
|
|
1955
2069
|
(link) => !!link.url
|
|
1956
2070
|
);
|
|
1957
|
-
return /* @__PURE__ */ (0,
|
|
2071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1958
2072
|
"footer",
|
|
1959
2073
|
{
|
|
1960
2074
|
className: "w-full px-6 py-8",
|
|
1961
2075
|
style: { backgroundColor, color: textColor },
|
|
1962
|
-
children: /* @__PURE__ */ (0,
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
1964
|
-
DropZone && /* @__PURE__ */ (0,
|
|
1965
|
-
/* @__PURE__ */ (0,
|
|
2076
|
+
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: [
|
|
2077
|
+
/* @__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" }) }),
|
|
2078
|
+
DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "footer-content" }),
|
|
2079
|
+
/* @__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)(
|
|
1966
2080
|
"a",
|
|
1967
2081
|
{
|
|
1968
2082
|
href: url,
|
|
@@ -1970,11 +2084,11 @@ function Footer({
|
|
|
1970
2084
|
rel: "noopener noreferrer",
|
|
1971
2085
|
className: "transition-opacity hover:opacity-80",
|
|
1972
2086
|
onClick: () => handleSocialClick(url),
|
|
1973
|
-
children: /* @__PURE__ */ (0,
|
|
2087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon3, { size: 24, style: { color: textColor } })
|
|
1974
2088
|
},
|
|
1975
2089
|
index
|
|
1976
2090
|
)) }),
|
|
1977
|
-
copyright && /* @__PURE__ */ (0,
|
|
2091
|
+
copyright && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-sm opacity-80", children: copyright })
|
|
1978
2092
|
] })
|
|
1979
2093
|
}
|
|
1980
2094
|
);
|
|
@@ -1983,7 +2097,7 @@ function Footer({
|
|
|
1983
2097
|
// components/page/Topbar.tsx
|
|
1984
2098
|
var import_react5 = require("react");
|
|
1985
2099
|
var import_lucide_react4 = require("lucide-react");
|
|
1986
|
-
var
|
|
2100
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1987
2101
|
function Topbar({
|
|
1988
2102
|
logo,
|
|
1989
2103
|
logoUrl = "/",
|
|
@@ -2016,7 +2130,7 @@ function Topbar({
|
|
|
2016
2130
|
const renderLink = (item, index) => {
|
|
2017
2131
|
const className = "hover:opacity-80 transition-opacity";
|
|
2018
2132
|
if (item.linkType === "external") {
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2020
2134
|
"a",
|
|
2021
2135
|
{
|
|
2022
2136
|
href: item.url,
|
|
@@ -2030,7 +2144,7 @@ function Topbar({
|
|
|
2030
2144
|
);
|
|
2031
2145
|
}
|
|
2032
2146
|
if (item.linkType === "scrollTo") {
|
|
2033
|
-
return /* @__PURE__ */ (0,
|
|
2147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2034
2148
|
"a",
|
|
2035
2149
|
{
|
|
2036
2150
|
href: item.url,
|
|
@@ -2041,7 +2155,7 @@ function Topbar({
|
|
|
2041
2155
|
index
|
|
2042
2156
|
);
|
|
2043
2157
|
}
|
|
2044
|
-
return /* @__PURE__ */ (0,
|
|
2158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2045
2159
|
"a",
|
|
2046
2160
|
{
|
|
2047
2161
|
href: item.url,
|
|
@@ -2052,19 +2166,19 @@ function Topbar({
|
|
|
2052
2166
|
index
|
|
2053
2167
|
);
|
|
2054
2168
|
};
|
|
2055
|
-
return /* @__PURE__ */ (0,
|
|
2169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2056
2170
|
"nav",
|
|
2057
2171
|
{
|
|
2058
2172
|
className: "sticky top-0 z-50 w-full px-6 py-4",
|
|
2059
2173
|
style: { backgroundColor, color: textColor },
|
|
2060
2174
|
children: [
|
|
2061
|
-
/* @__PURE__ */ (0,
|
|
2175
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2062
2176
|
"div",
|
|
2063
2177
|
{
|
|
2064
2178
|
className: "mx-auto flex items-center justify-between",
|
|
2065
2179
|
style: { maxWidth },
|
|
2066
2180
|
children: [
|
|
2067
|
-
/* @__PURE__ */ (0,
|
|
2181
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2068
2182
|
"a",
|
|
2069
2183
|
{
|
|
2070
2184
|
href: logoUrl,
|
|
@@ -2075,25 +2189,25 @@ function Topbar({
|
|
|
2075
2189
|
linkType: "internal",
|
|
2076
2190
|
...utm
|
|
2077
2191
|
}),
|
|
2078
|
-
children: logo ? /* @__PURE__ */ (0,
|
|
2192
|
+
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" })
|
|
2079
2193
|
}
|
|
2080
2194
|
),
|
|
2081
|
-
/* @__PURE__ */ (0,
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "hidden items-center gap-8 md:flex", children: [
|
|
2082
2196
|
navItems.map(renderLink),
|
|
2083
|
-
DropZone && /* @__PURE__ */ (0,
|
|
2197
|
+
DropZone && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZone, { zone: "cta" })
|
|
2084
2198
|
] }),
|
|
2085
|
-
/* @__PURE__ */ (0,
|
|
2199
|
+
/* @__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 }) })
|
|
2086
2200
|
]
|
|
2087
2201
|
}
|
|
2088
2202
|
),
|
|
2089
|
-
mobileMenuOpen && /* @__PURE__ */ (0,
|
|
2203
|
+
mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2090
2204
|
"div",
|
|
2091
2205
|
{
|
|
2092
2206
|
className: "absolute top-full right-0 left-0 flex flex-col gap-4 px-6 py-4 md:hidden",
|
|
2093
2207
|
style: { backgroundColor },
|
|
2094
2208
|
children: [
|
|
2095
2209
|
navItems.map(renderLink),
|
|
2096
|
-
DropZone && /* @__PURE__ */ (0,
|
|
2210
|
+
DropZone && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropZone, { zone: "cta" })
|
|
2097
2211
|
]
|
|
2098
2212
|
}
|
|
2099
2213
|
)
|
|
@@ -2105,12 +2219,12 @@ function Topbar({
|
|
|
2105
2219
|
// components/page/Popup.tsx
|
|
2106
2220
|
var import_react6 = require("react");
|
|
2107
2221
|
var import_lucide_react5 = require("lucide-react");
|
|
2108
|
-
var
|
|
2222
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2109
2223
|
function Icon2({ name, ...props }) {
|
|
2110
2224
|
const formatted = name.charAt(0).toUpperCase() + name.slice(1);
|
|
2111
2225
|
const IconComponent = import_lucide_react5.icons[formatted];
|
|
2112
2226
|
if (!IconComponent) return null;
|
|
2113
|
-
return /* @__PURE__ */ (0,
|
|
2227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconComponent, { ...props });
|
|
2114
2228
|
}
|
|
2115
2229
|
var widthMap3 = {
|
|
2116
2230
|
small: "max-w-sm",
|
|
@@ -2148,7 +2262,7 @@ function Popup({
|
|
|
2148
2262
|
setIsOpen(false);
|
|
2149
2263
|
sendEvent("popup_close", { ctaText, ...utm });
|
|
2150
2264
|
};
|
|
2151
|
-
const trigger = textLink ? /* @__PURE__ */ (0,
|
|
2265
|
+
const trigger = textLink ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2152
2266
|
"button",
|
|
2153
2267
|
{
|
|
2154
2268
|
onClick: handleOpen,
|
|
@@ -2156,7 +2270,7 @@ function Popup({
|
|
|
2156
2270
|
style: { color: buttonColor },
|
|
2157
2271
|
children: ctaText
|
|
2158
2272
|
}
|
|
2159
|
-
) : /* @__PURE__ */ (0,
|
|
2273
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2160
2274
|
"button",
|
|
2161
2275
|
{
|
|
2162
2276
|
onClick: handleOpen,
|
|
@@ -2166,20 +2280,20 @@ function Popup({
|
|
|
2166
2280
|
),
|
|
2167
2281
|
style: { backgroundColor: buttonColor, color: textColor },
|
|
2168
2282
|
children: [
|
|
2169
|
-
icon && iconPosition === "left" && /* @__PURE__ */ (0,
|
|
2283
|
+
icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { name: icon, size: 18 }),
|
|
2170
2284
|
ctaText,
|
|
2171
|
-
icon && iconPosition === "right" && /* @__PURE__ */ (0,
|
|
2285
|
+
icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { name: icon, size: 18 })
|
|
2172
2286
|
]
|
|
2173
2287
|
}
|
|
2174
2288
|
);
|
|
2175
|
-
return /* @__PURE__ */ (0,
|
|
2289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
2176
2290
|
trigger,
|
|
2177
|
-
isOpen && /* @__PURE__ */ (0,
|
|
2291
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2178
2292
|
"div",
|
|
2179
2293
|
{
|
|
2180
2294
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
2181
2295
|
onClick: handleClose,
|
|
2182
|
-
children: /* @__PURE__ */ (0,
|
|
2296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2183
2297
|
"div",
|
|
2184
2298
|
{
|
|
2185
2299
|
className: cn(
|
|
@@ -2188,15 +2302,15 @@ function Popup({
|
|
|
2188
2302
|
),
|
|
2189
2303
|
onClick: (e) => e.stopPropagation(),
|
|
2190
2304
|
children: [
|
|
2191
|
-
/* @__PURE__ */ (0,
|
|
2305
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2192
2306
|
"button",
|
|
2193
2307
|
{
|
|
2194
2308
|
onClick: handleClose,
|
|
2195
2309
|
className: "absolute top-4 right-4 text-gray-500 hover:text-gray-700",
|
|
2196
|
-
children: /* @__PURE__ */ (0,
|
|
2310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react5.X, { size: 24 })
|
|
2197
2311
|
}
|
|
2198
2312
|
),
|
|
2199
|
-
puck && /* @__PURE__ */ (0,
|
|
2313
|
+
puck && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(puck.renderDropZone, { zone: "popup-content" })
|
|
2200
2314
|
]
|
|
2201
2315
|
}
|
|
2202
2316
|
)
|