@windrun-huaiin/third-ui 5.11.5 → 5.12.0
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/main/index.d.mts +7 -5
- package/dist/main/index.d.ts +7 -5
- package/dist/main/index.js +282 -254
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +282 -254
- package/dist/main/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/main/gallery.tsx +64 -15
package/dist/main/index.js
CHANGED
|
@@ -2754,9 +2754,268 @@ function getGlobalIcon(iconKey, createElement8) {
|
|
|
2754
2754
|
return Icon2;
|
|
2755
2755
|
}
|
|
2756
2756
|
|
|
2757
|
+
// ../lib/src/utils.ts
|
|
2758
|
+
var import_clsx = require("clsx");
|
|
2759
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
2760
|
+
function cn(...inputs) {
|
|
2761
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2757
2764
|
// src/main/gallery.tsx
|
|
2758
2765
|
var import_next_intl = require("next-intl");
|
|
2759
2766
|
var import_image = __toESM(require("next/image"));
|
|
2767
|
+
var import_react35 = require("react");
|
|
2768
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2769
|
+
function Gallery({ sectionClassName, button }) {
|
|
2770
|
+
const t = (0, import_next_intl.useTranslations)("gallery");
|
|
2771
|
+
const galleryItems = t.raw("prompts");
|
|
2772
|
+
const defaultImgUrl = t.raw("defaultImgUrl");
|
|
2773
|
+
const [imageErrors, setImageErrors] = (0, import_react35.useState)(/* @__PURE__ */ new Set());
|
|
2774
|
+
const handleDownload = (item, index) => __async(null, null, function* () {
|
|
2775
|
+
var _a;
|
|
2776
|
+
try {
|
|
2777
|
+
const response = yield fetch(item.url, {
|
|
2778
|
+
method: "GET",
|
|
2779
|
+
// CORS mode declaration
|
|
2780
|
+
mode: "cors"
|
|
2781
|
+
});
|
|
2782
|
+
if (!response.ok) {
|
|
2783
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
2784
|
+
}
|
|
2785
|
+
const blob = yield response.blob();
|
|
2786
|
+
const url = window.URL.createObjectURL(blob);
|
|
2787
|
+
const contentType = response.headers.get("content-type");
|
|
2788
|
+
let extension = ".webp";
|
|
2789
|
+
if (contentType) {
|
|
2790
|
+
switch (contentType) {
|
|
2791
|
+
case "image/jpeg":
|
|
2792
|
+
case "image/jpg":
|
|
2793
|
+
extension = ".jpg";
|
|
2794
|
+
break;
|
|
2795
|
+
case "image/png":
|
|
2796
|
+
extension = ".png";
|
|
2797
|
+
break;
|
|
2798
|
+
case "image/gif":
|
|
2799
|
+
extension = ".gif";
|
|
2800
|
+
break;
|
|
2801
|
+
case "image/webp":
|
|
2802
|
+
extension = ".webp";
|
|
2803
|
+
break;
|
|
2804
|
+
case "image/svg+xml":
|
|
2805
|
+
extension = ".svg";
|
|
2806
|
+
break;
|
|
2807
|
+
default:
|
|
2808
|
+
const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
|
2809
|
+
if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
|
|
2810
|
+
extension = `.${urlExtension}`;
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
const downloadPrefix = t("downloadPrefix");
|
|
2815
|
+
const a = document.createElement("a");
|
|
2816
|
+
a.href = url;
|
|
2817
|
+
a.download = `${downloadPrefix}-${index + 1}${extension}`;
|
|
2818
|
+
a.style.display = "none";
|
|
2819
|
+
document.body.appendChild(a);
|
|
2820
|
+
a.click();
|
|
2821
|
+
setTimeout(() => {
|
|
2822
|
+
window.URL.revokeObjectURL(url);
|
|
2823
|
+
document.body.removeChild(a);
|
|
2824
|
+
}, 100);
|
|
2825
|
+
} catch (error) {
|
|
2826
|
+
console.error("Download failed:", error);
|
|
2827
|
+
}
|
|
2828
|
+
});
|
|
2829
|
+
const handleImageError = (index) => {
|
|
2830
|
+
setImageErrors((prev) => new Set(prev).add(index));
|
|
2831
|
+
};
|
|
2832
|
+
const getImageSrc = (item, index) => {
|
|
2833
|
+
return imageErrors.has(index) ? defaultImgUrl : item.url;
|
|
2834
|
+
};
|
|
2835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { id: "gallery", className: cn("container mx-auto px-4 py-20 scroll-mt-20", sectionClassName), children: [
|
|
2836
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [
|
|
2837
|
+
t("titleL"),
|
|
2838
|
+
" ",
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-purple-500", children: t("eyesOn") }),
|
|
2840
|
+
" ",
|
|
2841
|
+
t("titleR")
|
|
2842
|
+
] }),
|
|
2843
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-center max-w-2xl mx-auto mb-16", children: t("description") }),
|
|
2844
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: galleryItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "group relative overflow-hidden rounded-xl", children: [
|
|
2845
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2846
|
+
import_image.default,
|
|
2847
|
+
{
|
|
2848
|
+
src: getImageSrc(item, index),
|
|
2849
|
+
alt: item.altMsg,
|
|
2850
|
+
width: 600,
|
|
2851
|
+
height: 600,
|
|
2852
|
+
className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
|
|
2853
|
+
onError: () => handleImageError(index)
|
|
2854
|
+
}
|
|
2855
|
+
),
|
|
2856
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0 flex items-end justify-end p-4 opacity-0 group-hover:opacity-100 transition duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2857
|
+
"button",
|
|
2858
|
+
{
|
|
2859
|
+
onClick: () => handleDownload(item, index),
|
|
2860
|
+
className: "bg-black/50 hover:bg-black/70 p-2 rounded-full text-white/80 hover:text-white transition-all duration-300",
|
|
2861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
|
|
2862
|
+
}
|
|
2863
|
+
) })
|
|
2864
|
+
] }, index)) }),
|
|
2865
|
+
button && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-center mt-12", children: button })
|
|
2866
|
+
] });
|
|
2867
|
+
}
|
|
2868
|
+
|
|
2869
|
+
// src/main/usage.tsx
|
|
2870
|
+
var import_next_intl2 = require("next-intl");
|
|
2871
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2872
|
+
function Usage({ sectionClassName }) {
|
|
2873
|
+
const t = (0, import_next_intl2.useTranslations)("usage");
|
|
2874
|
+
const steps = t.raw("steps");
|
|
2875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("section", { id: "usage", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
2876
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
2877
|
+
t("title"),
|
|
2878
|
+
" ",
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2880
|
+
] }),
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: t("description") }),
|
|
2882
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: steps.map((step, idx) => {
|
|
2883
|
+
const Icon2 = getGlobalIcon(step.iconKey);
|
|
2884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start", children: [
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0 mr-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon2, { className: "w-8 h-8 text-purple-500" }) }),
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
|
|
2887
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: `${idx + 1}. ${step.title}` }),
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: step.description })
|
|
2889
|
+
] })
|
|
2890
|
+
] }, idx);
|
|
2891
|
+
}) }) })
|
|
2892
|
+
] });
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
// src/main/features.tsx
|
|
2896
|
+
var import_next_intl3 = require("next-intl");
|
|
2897
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2898
|
+
function Features({ sectionClassName }) {
|
|
2899
|
+
const t = (0, import_next_intl3.useTranslations)("features");
|
|
2900
|
+
const featureItems = t.raw("items");
|
|
2901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("section", { id: "features", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-18", sectionClassName), children: [
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
2903
|
+
t("title"),
|
|
2904
|
+
" ",
|
|
2905
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2906
|
+
] }),
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: t("description") }),
|
|
2908
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: featureItems.map((feature, index) => {
|
|
2909
|
+
const Icon2 = getGlobalIcon(feature.iconKey);
|
|
2910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2911
|
+
"div",
|
|
2912
|
+
{
|
|
2913
|
+
className: "bg-white dark:bg-gray-800/60 p-8 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
2914
|
+
children: [
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-4xl mb-4 flex items-center justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { className: "w-8 h-8" }) }),
|
|
2916
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: feature.description })
|
|
2918
|
+
]
|
|
2919
|
+
},
|
|
2920
|
+
index
|
|
2921
|
+
);
|
|
2922
|
+
}) })
|
|
2923
|
+
] });
|
|
2924
|
+
}
|
|
2925
|
+
|
|
2926
|
+
// src/main/tips.tsx
|
|
2927
|
+
var import_next_intl4 = require("next-intl");
|
|
2928
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2929
|
+
function Tips({ sectionClassName }) {
|
|
2930
|
+
const t = (0, import_next_intl4.useTranslations)("tips");
|
|
2931
|
+
const sections = t.raw("sections");
|
|
2932
|
+
const midPoint = Math.ceil(sections.length / 2);
|
|
2933
|
+
const leftColumn = sections.slice(0, midPoint);
|
|
2934
|
+
const rightColumn = sections.slice(midPoint);
|
|
2935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("section", { id: "tips", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
2936
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
|
|
2937
|
+
t("title"),
|
|
2938
|
+
" ",
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2940
|
+
] }),
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-12 bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [leftColumn, rightColumn].map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "space-y-8", children: column.map((tip, tipIndex) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-4", children: [
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h3", { className: "text-2xl font-semibold", children: tip.title }),
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "", children: tip.description })
|
|
2944
|
+
] }, tipIndex)) }, colIndex)) })
|
|
2945
|
+
] });
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
// src/main/faq.tsx
|
|
2949
|
+
var import_react36 = require("react");
|
|
2950
|
+
var import_next_intl5 = require("next-intl");
|
|
2951
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2952
|
+
function FAQ({ sectionClassName }) {
|
|
2953
|
+
const t = (0, import_next_intl5.useTranslations)("faq");
|
|
2954
|
+
const items = t.raw("items");
|
|
2955
|
+
const [openArr, setOpenArr] = (0, import_react36.useState)(() => items.map(() => false));
|
|
2956
|
+
const handleToggle = (idx) => {
|
|
2957
|
+
setOpenArr((prev) => {
|
|
2958
|
+
const next = [...prev];
|
|
2959
|
+
next[idx] = !next[idx];
|
|
2960
|
+
return next;
|
|
2961
|
+
});
|
|
2962
|
+
};
|
|
2963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("section", { id: "faq", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
2964
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: t("title") }),
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto", children: t("description") }),
|
|
2966
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-6", children: items.map((item, idx) => {
|
|
2967
|
+
const isOpen = openArr[idx];
|
|
2968
|
+
const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
|
|
2969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2970
|
+
"div",
|
|
2971
|
+
{
|
|
2972
|
+
className: "bg-white dark:bg-gray-800/60 p-6 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
2973
|
+
children: [
|
|
2974
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2975
|
+
"button",
|
|
2976
|
+
{
|
|
2977
|
+
className: "w-full flex items-center justify-between text-left focus:outline-none",
|
|
2978
|
+
onClick: () => handleToggle(idx),
|
|
2979
|
+
"aria-expanded": isOpen,
|
|
2980
|
+
children: [
|
|
2981
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
|
|
2983
|
+
]
|
|
2984
|
+
}
|
|
2985
|
+
),
|
|
2986
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: item.answer })
|
|
2987
|
+
]
|
|
2988
|
+
},
|
|
2989
|
+
idx
|
|
2990
|
+
);
|
|
2991
|
+
}) })
|
|
2992
|
+
] });
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
// src/main/seo-content.tsx
|
|
2996
|
+
var import_next_intl6 = require("next-intl");
|
|
2997
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2998
|
+
function SeoContent({ sectionClassName }) {
|
|
2999
|
+
const t = (0, import_next_intl6.useTranslations)("seoContent");
|
|
3000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("h1", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
|
|
3002
|
+
t("title"),
|
|
3003
|
+
" ",
|
|
3004
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
3005
|
+
] }),
|
|
3006
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
|
|
3007
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [
|
|
3008
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-10", children: [
|
|
3009
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: t("intro") }),
|
|
3010
|
+
t.raw("sections").map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
|
|
3011
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
|
|
3012
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })
|
|
3013
|
+
] }, index))
|
|
3014
|
+
] }),
|
|
3015
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: t("conclusion") })
|
|
3016
|
+
] })
|
|
3017
|
+
] });
|
|
3018
|
+
}
|
|
2760
3019
|
|
|
2761
3020
|
// ../base-ui/src/ui/button.tsx
|
|
2762
3021
|
var React35 = __toESM(require("react"), 1);
|
|
@@ -2802,7 +3061,7 @@ function useComposedRefs(...refs) {
|
|
|
2802
3061
|
}
|
|
2803
3062
|
|
|
2804
3063
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
2805
|
-
var
|
|
3064
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2806
3065
|
// @__NO_SIDE_EFFECTS__
|
|
2807
3066
|
function createSlot(ownerName) {
|
|
2808
3067
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -2820,9 +3079,9 @@ function createSlot(ownerName) {
|
|
|
2820
3079
|
return child;
|
|
2821
3080
|
}
|
|
2822
3081
|
});
|
|
2823
|
-
return /* @__PURE__ */ (0,
|
|
3082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
|
|
2824
3083
|
}
|
|
2825
|
-
return /* @__PURE__ */ (0,
|
|
3084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
2826
3085
|
});
|
|
2827
3086
|
Slot22.displayName = `${ownerName}.Slot`;
|
|
2828
3087
|
return Slot22;
|
|
@@ -2849,7 +3108,7 @@ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
|
2849
3108
|
// @__NO_SIDE_EFFECTS__
|
|
2850
3109
|
function createSlottable(ownerName) {
|
|
2851
3110
|
const Slottable2 = ({ children }) => {
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
3111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children });
|
|
2853
3112
|
};
|
|
2854
3113
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
2855
3114
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -2899,16 +3158,7 @@ function getElementRef(element) {
|
|
|
2899
3158
|
|
|
2900
3159
|
// ../base-ui/src/ui/button.tsx
|
|
2901
3160
|
var import_class_variance_authority = require("class-variance-authority");
|
|
2902
|
-
|
|
2903
|
-
// ../lib/src/utils.ts
|
|
2904
|
-
var import_clsx = require("clsx");
|
|
2905
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
2906
|
-
function cn(...inputs) {
|
|
2907
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
2908
|
-
}
|
|
2909
|
-
|
|
2910
|
-
// ../base-ui/src/ui/button.tsx
|
|
2911
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3161
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2912
3162
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
2913
3163
|
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
2914
3164
|
{
|
|
@@ -2939,7 +3189,7 @@ var Button = React35.forwardRef(
|
|
|
2939
3189
|
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
2940
3190
|
const Comp = asChild ? Slot : "button";
|
|
2941
3191
|
if (asChild) {
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
3192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2943
3193
|
Comp,
|
|
2944
3194
|
__spreadProps(__spreadValues({
|
|
2945
3195
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -2950,7 +3200,7 @@ var Button = React35.forwardRef(
|
|
|
2950
3200
|
})
|
|
2951
3201
|
);
|
|
2952
3202
|
}
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
3203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2954
3204
|
Comp,
|
|
2955
3205
|
__spreadProps(__spreadValues({
|
|
2956
3206
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -2959,7 +3209,7 @@ var Button = React35.forwardRef(
|
|
|
2959
3209
|
}, props), {
|
|
2960
3210
|
children: [
|
|
2961
3211
|
children,
|
|
2962
|
-
loading && /* @__PURE__ */ (0,
|
|
3212
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
2963
3213
|
]
|
|
2964
3214
|
})
|
|
2965
3215
|
);
|
|
@@ -2969,8 +3219,8 @@ Button.displayName = "Button";
|
|
|
2969
3219
|
|
|
2970
3220
|
// src/fuma/mdx/gradient-button.tsx
|
|
2971
3221
|
var import_link2 = __toESM(require("next/link"));
|
|
2972
|
-
var
|
|
2973
|
-
var
|
|
3222
|
+
var import_react37 = __toESM(require("react"));
|
|
3223
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2974
3224
|
function GradientButton({
|
|
2975
3225
|
title,
|
|
2976
3226
|
icon,
|
|
@@ -2983,7 +3233,7 @@ function GradientButton({
|
|
|
2983
3233
|
loadingText,
|
|
2984
3234
|
preventDoubleClick = true
|
|
2985
3235
|
}) {
|
|
2986
|
-
const [isLoading, setIsLoading] = (0,
|
|
3236
|
+
const [isLoading, setIsLoading] = (0, import_react37.useState)(false);
|
|
2987
3237
|
const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
|
|
2988
3238
|
const getAlignmentClass = () => {
|
|
2989
3239
|
switch (align) {
|
|
@@ -3018,15 +3268,15 @@ function GradientButton({
|
|
|
3018
3268
|
});
|
|
3019
3269
|
const isDisabled = disabled || isLoading;
|
|
3020
3270
|
const displayTitle = isLoading ? actualLoadingText : title;
|
|
3021
|
-
const displayIcon = isLoading ? /* @__PURE__ */ (0,
|
|
3271
|
+
const displayIcon = isLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? import_react37.default.cloneElement(icon, {
|
|
3022
3272
|
className: "h-4 w-4 text-white"
|
|
3023
|
-
}) : /* @__PURE__ */ (0,
|
|
3024
|
-
const buttonContent = onClick ? /* @__PURE__ */ (0,
|
|
3025
|
-
/* @__PURE__ */ (0,
|
|
3026
|
-
/* @__PURE__ */ (0,
|
|
3027
|
-
] }) : /* @__PURE__ */ (0,
|
|
3028
|
-
/* @__PURE__ */ (0,
|
|
3029
|
-
/* @__PURE__ */ (0,
|
|
3273
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
|
|
3274
|
+
const buttonContent = onClick ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
3275
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: displayIcon }),
|
|
3276
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ml-1", children: displayTitle })
|
|
3277
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
3278
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: displayTitle }),
|
|
3279
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ml-1", children: displayIcon })
|
|
3030
3280
|
] });
|
|
3031
3281
|
const buttonClassName = `
|
|
3032
3282
|
bg-gradient-to-r
|
|
@@ -3040,9 +3290,9 @@ function GradientButton({
|
|
|
3040
3290
|
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
3041
3291
|
${className}
|
|
3042
3292
|
`;
|
|
3043
|
-
return /* @__PURE__ */ (0,
|
|
3293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
|
|
3044
3294
|
// for click
|
|
3045
|
-
/* @__PURE__ */ (0,
|
|
3295
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3046
3296
|
Button,
|
|
3047
3297
|
{
|
|
3048
3298
|
size: "lg",
|
|
@@ -3054,14 +3304,14 @@ function GradientButton({
|
|
|
3054
3304
|
)
|
|
3055
3305
|
) : (
|
|
3056
3306
|
// for Link
|
|
3057
|
-
/* @__PURE__ */ (0,
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3058
3308
|
Button,
|
|
3059
3309
|
{
|
|
3060
3310
|
asChild: true,
|
|
3061
3311
|
size: "lg",
|
|
3062
3312
|
className: buttonClassName,
|
|
3063
3313
|
disabled: isDisabled,
|
|
3064
|
-
children: /* @__PURE__ */ (0,
|
|
3314
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3065
3315
|
import_link2.default,
|
|
3066
3316
|
__spreadProps(__spreadValues({
|
|
3067
3317
|
href: href || "#",
|
|
@@ -3076,228 +3326,6 @@ function GradientButton({
|
|
|
3076
3326
|
) });
|
|
3077
3327
|
}
|
|
3078
3328
|
|
|
3079
|
-
// src/main/gallery.tsx
|
|
3080
|
-
var import_react36 = require("react");
|
|
3081
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3082
|
-
function Gallery({ sectionClassName }) {
|
|
3083
|
-
const t = (0, import_next_intl.useTranslations)("gallery");
|
|
3084
|
-
const galleryItems = t.raw("prompts");
|
|
3085
|
-
const defaultImgUrl = t.raw("defaultImgUrl");
|
|
3086
|
-
const [imageErrors, setImageErrors] = (0, import_react36.useState)(/* @__PURE__ */ new Set());
|
|
3087
|
-
const handleDownload = (item, index) => __async(null, null, function* () {
|
|
3088
|
-
try {
|
|
3089
|
-
const response = yield fetch(item.url);
|
|
3090
|
-
const blob = yield response.blob();
|
|
3091
|
-
const url = window.URL.createObjectURL(blob);
|
|
3092
|
-
const a = document.createElement("a");
|
|
3093
|
-
a.href = url;
|
|
3094
|
-
a.download = `reve-image-${index + 1}.webp`;
|
|
3095
|
-
document.body.appendChild(a);
|
|
3096
|
-
a.click();
|
|
3097
|
-
window.URL.revokeObjectURL(url);
|
|
3098
|
-
document.body.removeChild(a);
|
|
3099
|
-
} catch (error) {
|
|
3100
|
-
console.error("Download failed:", error);
|
|
3101
|
-
}
|
|
3102
|
-
});
|
|
3103
|
-
const handleImageError = (index) => {
|
|
3104
|
-
setImageErrors((prev) => new Set(prev).add(index));
|
|
3105
|
-
};
|
|
3106
|
-
const getImageSrc = (item, index) => {
|
|
3107
|
-
return imageErrors.has(index) ? defaultImgUrl : item.url;
|
|
3108
|
-
};
|
|
3109
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("section", { id: "gallery", className: cn("container mx-auto px-4 py-20 scroll-mt-20", sectionClassName), children: [
|
|
3110
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [
|
|
3111
|
-
t("titleL"),
|
|
3112
|
-
" ",
|
|
3113
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-purple-500", children: t("eyesOn") }),
|
|
3114
|
-
" ",
|
|
3115
|
-
t("titleR")
|
|
3116
|
-
] }),
|
|
3117
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-center max-w-2xl mx-auto mb-16", children: t("description") }),
|
|
3118
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: galleryItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "group relative overflow-hidden rounded-xl", children: [
|
|
3119
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3120
|
-
import_image.default,
|
|
3121
|
-
{
|
|
3122
|
-
src: getImageSrc(item, index),
|
|
3123
|
-
alt: item.altMsg,
|
|
3124
|
-
width: 600,
|
|
3125
|
-
height: 600,
|
|
3126
|
-
className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
|
|
3127
|
-
onError: () => handleImageError(index)
|
|
3128
|
-
}
|
|
3129
|
-
),
|
|
3130
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "absolute inset-0 flex items-end justify-end p-4 opacity-0 group-hover:opacity-100 transition duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3131
|
-
"button",
|
|
3132
|
-
{
|
|
3133
|
-
onClick: () => handleDownload(item, index),
|
|
3134
|
-
className: "bg-black/50 hover:bg-black/70 p-2 rounded-full text-white/80 hover:text-white transition-all duration-300",
|
|
3135
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
|
|
3136
|
-
}
|
|
3137
|
-
) })
|
|
3138
|
-
] }, index)) }),
|
|
3139
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "text-center mt-12", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3140
|
-
GradientButton,
|
|
3141
|
-
{
|
|
3142
|
-
title: t("button"),
|
|
3143
|
-
href: "https://preview.reve.art/",
|
|
3144
|
-
align: "center"
|
|
3145
|
-
}
|
|
3146
|
-
) })
|
|
3147
|
-
] });
|
|
3148
|
-
}
|
|
3149
|
-
|
|
3150
|
-
// src/main/usage.tsx
|
|
3151
|
-
var import_next_intl2 = require("next-intl");
|
|
3152
|
-
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3153
|
-
function Usage({ sectionClassName }) {
|
|
3154
|
-
const t = (0, import_next_intl2.useTranslations)("usage");
|
|
3155
|
-
const steps = t.raw("steps");
|
|
3156
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("section", { id: "usage", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3157
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
3158
|
-
t("title"),
|
|
3159
|
-
" ",
|
|
3160
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
3161
|
-
] }),
|
|
3162
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: t("description") }),
|
|
3163
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: steps.map((step, idx) => {
|
|
3164
|
-
const Icon2 = getGlobalIcon(step.iconKey);
|
|
3165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-start", children: [
|
|
3166
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex-shrink-0 mr-4", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon2, { className: "w-8 h-8 text-purple-500" }) }),
|
|
3167
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
3168
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: `${idx + 1}. ${step.title}` }),
|
|
3169
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: step.description })
|
|
3170
|
-
] })
|
|
3171
|
-
] }, idx);
|
|
3172
|
-
}) }) })
|
|
3173
|
-
] });
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
// src/main/features.tsx
|
|
3177
|
-
var import_next_intl3 = require("next-intl");
|
|
3178
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3179
|
-
function Features({ sectionClassName }) {
|
|
3180
|
-
const t = (0, import_next_intl3.useTranslations)("features");
|
|
3181
|
-
const featureItems = t.raw("items");
|
|
3182
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("section", { id: "features", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-18", sectionClassName), children: [
|
|
3183
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
3184
|
-
t("title"),
|
|
3185
|
-
" ",
|
|
3186
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
3187
|
-
] }),
|
|
3188
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto whitespace-nowrap", children: t("description") }),
|
|
3189
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: featureItems.map((feature, index) => {
|
|
3190
|
-
const Icon2 = getGlobalIcon(feature.iconKey);
|
|
3191
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3192
|
-
"div",
|
|
3193
|
-
{
|
|
3194
|
-
className: "bg-white dark:bg-gray-800/60 p-8 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
3195
|
-
children: [
|
|
3196
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "text-4xl mb-4 flex items-center justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon2, { className: "w-8 h-8" }) }),
|
|
3197
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
|
|
3198
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: feature.description })
|
|
3199
|
-
]
|
|
3200
|
-
},
|
|
3201
|
-
index
|
|
3202
|
-
);
|
|
3203
|
-
}) })
|
|
3204
|
-
] });
|
|
3205
|
-
}
|
|
3206
|
-
|
|
3207
|
-
// src/main/tips.tsx
|
|
3208
|
-
var import_next_intl4 = require("next-intl");
|
|
3209
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3210
|
-
function Tips({ sectionClassName }) {
|
|
3211
|
-
const t = (0, import_next_intl4.useTranslations)("tips");
|
|
3212
|
-
const sections = t.raw("sections");
|
|
3213
|
-
const midPoint = Math.ceil(sections.length / 2);
|
|
3214
|
-
const leftColumn = sections.slice(0, midPoint);
|
|
3215
|
-
const rightColumn = sections.slice(midPoint);
|
|
3216
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { id: "tips", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3217
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
|
|
3218
|
-
t("title"),
|
|
3219
|
-
" ",
|
|
3220
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
3221
|
-
] }),
|
|
3222
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-12 bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [leftColumn, rightColumn].map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-8", children: column.map((tip, tipIndex) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-4", children: [
|
|
3223
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "text-2xl font-semibold", children: tip.title }),
|
|
3224
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "", children: tip.description })
|
|
3225
|
-
] }, tipIndex)) }, colIndex)) })
|
|
3226
|
-
] });
|
|
3227
|
-
}
|
|
3228
|
-
|
|
3229
|
-
// src/main/faq.tsx
|
|
3230
|
-
var import_react37 = require("react");
|
|
3231
|
-
var import_next_intl5 = require("next-intl");
|
|
3232
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3233
|
-
function FAQ({ sectionClassName }) {
|
|
3234
|
-
const t = (0, import_next_intl5.useTranslations)("faq");
|
|
3235
|
-
const items = t.raw("items");
|
|
3236
|
-
const [openArr, setOpenArr] = (0, import_react37.useState)(() => items.map(() => false));
|
|
3237
|
-
const handleToggle = (idx) => {
|
|
3238
|
-
setOpenArr((prev) => {
|
|
3239
|
-
const next = [...prev];
|
|
3240
|
-
next[idx] = !next[idx];
|
|
3241
|
-
return next;
|
|
3242
|
-
});
|
|
3243
|
-
};
|
|
3244
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("section", { id: "faq", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3245
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: t("title") }),
|
|
3246
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto", children: t("description") }),
|
|
3247
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "space-y-6", children: items.map((item, idx) => {
|
|
3248
|
-
const isOpen = openArr[idx];
|
|
3249
|
-
const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
|
|
3250
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3251
|
-
"div",
|
|
3252
|
-
{
|
|
3253
|
-
className: "bg-white dark:bg-gray-800/60 p-6 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
3254
|
-
children: [
|
|
3255
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3256
|
-
"button",
|
|
3257
|
-
{
|
|
3258
|
-
className: "w-full flex items-center justify-between text-left focus:outline-none",
|
|
3259
|
-
onClick: () => handleToggle(idx),
|
|
3260
|
-
"aria-expanded": isOpen,
|
|
3261
|
-
children: [
|
|
3262
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
|
|
3263
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
|
|
3264
|
-
]
|
|
3265
|
-
}
|
|
3266
|
-
),
|
|
3267
|
-
isOpen && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: item.answer })
|
|
3268
|
-
]
|
|
3269
|
-
},
|
|
3270
|
-
idx
|
|
3271
|
-
);
|
|
3272
|
-
}) })
|
|
3273
|
-
] });
|
|
3274
|
-
}
|
|
3275
|
-
|
|
3276
|
-
// src/main/seo-content.tsx
|
|
3277
|
-
var import_next_intl6 = require("next-intl");
|
|
3278
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3279
|
-
function SeoContent({ sectionClassName }) {
|
|
3280
|
-
const t = (0, import_next_intl6.useTranslations)("seoContent");
|
|
3281
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3282
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("h1", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
|
|
3283
|
-
t("title"),
|
|
3284
|
-
" ",
|
|
3285
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
3286
|
-
] }),
|
|
3287
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
|
|
3288
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [
|
|
3289
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "space-y-10", children: [
|
|
3290
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: t("intro") }),
|
|
3291
|
-
t.raw("sections").map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
|
|
3292
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
|
|
3293
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })
|
|
3294
|
-
] }, index))
|
|
3295
|
-
] }),
|
|
3296
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: t("conclusion") })
|
|
3297
|
-
] })
|
|
3298
|
-
] });
|
|
3299
|
-
}
|
|
3300
|
-
|
|
3301
3329
|
// src/main/cta.tsx
|
|
3302
3330
|
var import_next_intl7 = require("next-intl");
|
|
3303
3331
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|