@windrun-huaiin/third-ui 5.11.5 → 5.12.1
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 +275 -254
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +275 -254
- package/dist/main/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/main/gallery.tsx +79 -20
package/dist/main/index.js
CHANGED
|
@@ -2754,9 +2754,261 @@ 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 [downloadingItems, setDownloadingItems] = (0, import_react35.useState)(/* @__PURE__ */ new Set());
|
|
2775
|
+
const cdnProxyUrl = process.env.NEXT_PUBLIC_STYLE_CDN_PROXY_URL;
|
|
2776
|
+
const handleDownload = (item, index) => __async(null, null, function* () {
|
|
2777
|
+
var _a;
|
|
2778
|
+
if (downloadingItems.has(index)) {
|
|
2779
|
+
return;
|
|
2780
|
+
}
|
|
2781
|
+
setDownloadingItems((prev) => new Set(prev).add(index));
|
|
2782
|
+
try {
|
|
2783
|
+
const originalUrl = new URL(item.url);
|
|
2784
|
+
const filename = originalUrl.pathname.substring(1);
|
|
2785
|
+
const proxyUrl = `${cdnProxyUrl}/${encodeURIComponent(filename)}`;
|
|
2786
|
+
const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
|
2787
|
+
let extension = ".webp";
|
|
2788
|
+
if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
|
|
2789
|
+
extension = `.${urlExtension}`;
|
|
2790
|
+
}
|
|
2791
|
+
const downloadPrefix = t("downloadPrefix");
|
|
2792
|
+
const response = yield fetch(proxyUrl);
|
|
2793
|
+
if (!response.ok) {
|
|
2794
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
2795
|
+
}
|
|
2796
|
+
const blob = yield response.blob();
|
|
2797
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
2798
|
+
const a = document.createElement("a");
|
|
2799
|
+
a.href = blobUrl;
|
|
2800
|
+
a.download = `${downloadPrefix}-${index + 1}${extension}`;
|
|
2801
|
+
a.style.display = "none";
|
|
2802
|
+
document.body.appendChild(a);
|
|
2803
|
+
a.click();
|
|
2804
|
+
setTimeout(() => {
|
|
2805
|
+
document.body.removeChild(a);
|
|
2806
|
+
URL.revokeObjectURL(blobUrl);
|
|
2807
|
+
}, 100);
|
|
2808
|
+
} catch (error) {
|
|
2809
|
+
console.error("Download failed:", error);
|
|
2810
|
+
} finally {
|
|
2811
|
+
setDownloadingItems((prev) => {
|
|
2812
|
+
const newSet = new Set(prev);
|
|
2813
|
+
newSet.delete(index);
|
|
2814
|
+
return newSet;
|
|
2815
|
+
});
|
|
2816
|
+
}
|
|
2817
|
+
});
|
|
2818
|
+
const handleImageError = (index) => {
|
|
2819
|
+
setImageErrors((prev) => new Set(prev).add(index));
|
|
2820
|
+
};
|
|
2821
|
+
const getImageSrc = (item, index) => {
|
|
2822
|
+
return imageErrors.has(index) ? defaultImgUrl : item.url;
|
|
2823
|
+
};
|
|
2824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { id: "gallery", className: cn("container mx-auto px-4 py-20 scroll-mt-20", sectionClassName), children: [
|
|
2825
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [
|
|
2826
|
+
t("titleL"),
|
|
2827
|
+
" ",
|
|
2828
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-purple-500", children: t("eyesOn") }),
|
|
2829
|
+
" ",
|
|
2830
|
+
t("titleR")
|
|
2831
|
+
] }),
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-center max-w-2xl mx-auto mb-16", children: t("description") }),
|
|
2833
|
+
/* @__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: [
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2835
|
+
import_image.default,
|
|
2836
|
+
{
|
|
2837
|
+
src: getImageSrc(item, index),
|
|
2838
|
+
alt: item.altMsg,
|
|
2839
|
+
width: 600,
|
|
2840
|
+
height: 600,
|
|
2841
|
+
className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
|
|
2842
|
+
onError: () => handleImageError(index)
|
|
2843
|
+
}
|
|
2844
|
+
),
|
|
2845
|
+
/* @__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)(
|
|
2846
|
+
"button",
|
|
2847
|
+
{
|
|
2848
|
+
onClick: () => handleDownload(item, index),
|
|
2849
|
+
disabled: downloadingItems.has(index),
|
|
2850
|
+
className: cn(
|
|
2851
|
+
"p-2 rounded-full transition-all duration-300",
|
|
2852
|
+
downloadingItems.has(index) ? "bg-black/30 text-white/50" : "bg-black/50 hover:bg-black/70 text-white/80 hover:text-white"
|
|
2853
|
+
),
|
|
2854
|
+
children: downloadingItems.has(index) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.Loader2, { className: "h-5 w-5 text-white animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
|
|
2855
|
+
}
|
|
2856
|
+
) })
|
|
2857
|
+
] }, index)) }),
|
|
2858
|
+
button && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-center mt-12", children: button })
|
|
2859
|
+
] });
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
// src/main/usage.tsx
|
|
2863
|
+
var import_next_intl2 = require("next-intl");
|
|
2864
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2865
|
+
function Usage({ sectionClassName }) {
|
|
2866
|
+
const t = (0, import_next_intl2.useTranslations)("usage");
|
|
2867
|
+
const steps = t.raw("steps");
|
|
2868
|
+
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: [
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
2870
|
+
t("title"),
|
|
2871
|
+
" ",
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2873
|
+
] }),
|
|
2874
|
+
/* @__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") }),
|
|
2875
|
+
/* @__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) => {
|
|
2876
|
+
const Icon2 = getGlobalIcon(step.iconKey);
|
|
2877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start", children: [
|
|
2878
|
+
/* @__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" }) }),
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
|
|
2880
|
+
/* @__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}` }),
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: step.description })
|
|
2882
|
+
] })
|
|
2883
|
+
] }, idx);
|
|
2884
|
+
}) }) })
|
|
2885
|
+
] });
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
// src/main/features.tsx
|
|
2889
|
+
var import_next_intl3 = require("next-intl");
|
|
2890
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2891
|
+
function Features({ sectionClassName }) {
|
|
2892
|
+
const t = (0, import_next_intl3.useTranslations)("features");
|
|
2893
|
+
const featureItems = t.raw("items");
|
|
2894
|
+
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: [
|
|
2895
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
|
|
2896
|
+
t("title"),
|
|
2897
|
+
" ",
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2899
|
+
] }),
|
|
2900
|
+
/* @__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") }),
|
|
2901
|
+
/* @__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) => {
|
|
2902
|
+
const Icon2 = getGlobalIcon(feature.iconKey);
|
|
2903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2904
|
+
"div",
|
|
2905
|
+
{
|
|
2906
|
+
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",
|
|
2907
|
+
children: [
|
|
2908
|
+
/* @__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" }) }),
|
|
2909
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: feature.description })
|
|
2911
|
+
]
|
|
2912
|
+
},
|
|
2913
|
+
index
|
|
2914
|
+
);
|
|
2915
|
+
}) })
|
|
2916
|
+
] });
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
// src/main/tips.tsx
|
|
2920
|
+
var import_next_intl4 = require("next-intl");
|
|
2921
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2922
|
+
function Tips({ sectionClassName }) {
|
|
2923
|
+
const t = (0, import_next_intl4.useTranslations)("tips");
|
|
2924
|
+
const sections = t.raw("sections");
|
|
2925
|
+
const midPoint = Math.ceil(sections.length / 2);
|
|
2926
|
+
const leftColumn = sections.slice(0, midPoint);
|
|
2927
|
+
const rightColumn = sections.slice(midPoint);
|
|
2928
|
+
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: [
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
|
|
2930
|
+
t("title"),
|
|
2931
|
+
" ",
|
|
2932
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2933
|
+
] }),
|
|
2934
|
+
/* @__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: [
|
|
2935
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h3", { className: "text-2xl font-semibold", children: tip.title }),
|
|
2936
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "", children: tip.description })
|
|
2937
|
+
] }, tipIndex)) }, colIndex)) })
|
|
2938
|
+
] });
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
// src/main/faq.tsx
|
|
2942
|
+
var import_react36 = require("react");
|
|
2943
|
+
var import_next_intl5 = require("next-intl");
|
|
2944
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2945
|
+
function FAQ({ sectionClassName }) {
|
|
2946
|
+
const t = (0, import_next_intl5.useTranslations)("faq");
|
|
2947
|
+
const items = t.raw("items");
|
|
2948
|
+
const [openArr, setOpenArr] = (0, import_react36.useState)(() => items.map(() => false));
|
|
2949
|
+
const handleToggle = (idx) => {
|
|
2950
|
+
setOpenArr((prev) => {
|
|
2951
|
+
const next = [...prev];
|
|
2952
|
+
next[idx] = !next[idx];
|
|
2953
|
+
return next;
|
|
2954
|
+
});
|
|
2955
|
+
};
|
|
2956
|
+
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: [
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: t("title") }),
|
|
2958
|
+
/* @__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") }),
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-6", children: items.map((item, idx) => {
|
|
2960
|
+
const isOpen = openArr[idx];
|
|
2961
|
+
const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
|
|
2962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2963
|
+
"div",
|
|
2964
|
+
{
|
|
2965
|
+
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",
|
|
2966
|
+
children: [
|
|
2967
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2968
|
+
"button",
|
|
2969
|
+
{
|
|
2970
|
+
className: "w-full flex items-center justify-between text-left focus:outline-none",
|
|
2971
|
+
onClick: () => handleToggle(idx),
|
|
2972
|
+
"aria-expanded": isOpen,
|
|
2973
|
+
children: [
|
|
2974
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
|
|
2975
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
|
|
2976
|
+
]
|
|
2977
|
+
}
|
|
2978
|
+
),
|
|
2979
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: item.answer })
|
|
2980
|
+
]
|
|
2981
|
+
},
|
|
2982
|
+
idx
|
|
2983
|
+
);
|
|
2984
|
+
}) })
|
|
2985
|
+
] });
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
// src/main/seo-content.tsx
|
|
2989
|
+
var import_next_intl6 = require("next-intl");
|
|
2990
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2991
|
+
function SeoContent({ sectionClassName }) {
|
|
2992
|
+
const t = (0, import_next_intl6.useTranslations)("seoContent");
|
|
2993
|
+
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: [
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("h1", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
|
|
2995
|
+
t("title"),
|
|
2996
|
+
" ",
|
|
2997
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2998
|
+
] }),
|
|
2999
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
|
|
3000
|
+
/* @__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: [
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-10", children: [
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: t("intro") }),
|
|
3003
|
+
t.raw("sections").map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
|
|
3004
|
+
/* @__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 }),
|
|
3005
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })
|
|
3006
|
+
] }, index))
|
|
3007
|
+
] }),
|
|
3008
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: t("conclusion") })
|
|
3009
|
+
] })
|
|
3010
|
+
] });
|
|
3011
|
+
}
|
|
2760
3012
|
|
|
2761
3013
|
// ../base-ui/src/ui/button.tsx
|
|
2762
3014
|
var React35 = __toESM(require("react"), 1);
|
|
@@ -2802,7 +3054,7 @@ function useComposedRefs(...refs) {
|
|
|
2802
3054
|
}
|
|
2803
3055
|
|
|
2804
3056
|
// ../../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
|
|
3057
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2806
3058
|
// @__NO_SIDE_EFFECTS__
|
|
2807
3059
|
function createSlot(ownerName) {
|
|
2808
3060
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -2820,9 +3072,9 @@ function createSlot(ownerName) {
|
|
|
2820
3072
|
return child;
|
|
2821
3073
|
}
|
|
2822
3074
|
});
|
|
2823
|
-
return /* @__PURE__ */ (0,
|
|
3075
|
+
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
3076
|
}
|
|
2825
|
-
return /* @__PURE__ */ (0,
|
|
3077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
2826
3078
|
});
|
|
2827
3079
|
Slot22.displayName = `${ownerName}.Slot`;
|
|
2828
3080
|
return Slot22;
|
|
@@ -2849,7 +3101,7 @@ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
|
2849
3101
|
// @__NO_SIDE_EFFECTS__
|
|
2850
3102
|
function createSlottable(ownerName) {
|
|
2851
3103
|
const Slottable2 = ({ children }) => {
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
3104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children });
|
|
2853
3105
|
};
|
|
2854
3106
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
2855
3107
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -2899,16 +3151,7 @@ function getElementRef(element) {
|
|
|
2899
3151
|
|
|
2900
3152
|
// ../base-ui/src/ui/button.tsx
|
|
2901
3153
|
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");
|
|
3154
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2912
3155
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
2913
3156
|
"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
3157
|
{
|
|
@@ -2939,7 +3182,7 @@ var Button = React35.forwardRef(
|
|
|
2939
3182
|
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
2940
3183
|
const Comp = asChild ? Slot : "button";
|
|
2941
3184
|
if (asChild) {
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
3185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2943
3186
|
Comp,
|
|
2944
3187
|
__spreadProps(__spreadValues({
|
|
2945
3188
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -2950,7 +3193,7 @@ var Button = React35.forwardRef(
|
|
|
2950
3193
|
})
|
|
2951
3194
|
);
|
|
2952
3195
|
}
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
3196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2954
3197
|
Comp,
|
|
2955
3198
|
__spreadProps(__spreadValues({
|
|
2956
3199
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -2959,7 +3202,7 @@ var Button = React35.forwardRef(
|
|
|
2959
3202
|
}, props), {
|
|
2960
3203
|
children: [
|
|
2961
3204
|
children,
|
|
2962
|
-
loading && /* @__PURE__ */ (0,
|
|
3205
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
2963
3206
|
]
|
|
2964
3207
|
})
|
|
2965
3208
|
);
|
|
@@ -2969,8 +3212,8 @@ Button.displayName = "Button";
|
|
|
2969
3212
|
|
|
2970
3213
|
// src/fuma/mdx/gradient-button.tsx
|
|
2971
3214
|
var import_link2 = __toESM(require("next/link"));
|
|
2972
|
-
var
|
|
2973
|
-
var
|
|
3215
|
+
var import_react37 = __toESM(require("react"));
|
|
3216
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2974
3217
|
function GradientButton({
|
|
2975
3218
|
title,
|
|
2976
3219
|
icon,
|
|
@@ -2983,7 +3226,7 @@ function GradientButton({
|
|
|
2983
3226
|
loadingText,
|
|
2984
3227
|
preventDoubleClick = true
|
|
2985
3228
|
}) {
|
|
2986
|
-
const [isLoading, setIsLoading] = (0,
|
|
3229
|
+
const [isLoading, setIsLoading] = (0, import_react37.useState)(false);
|
|
2987
3230
|
const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
|
|
2988
3231
|
const getAlignmentClass = () => {
|
|
2989
3232
|
switch (align) {
|
|
@@ -3018,15 +3261,15 @@ function GradientButton({
|
|
|
3018
3261
|
});
|
|
3019
3262
|
const isDisabled = disabled || isLoading;
|
|
3020
3263
|
const displayTitle = isLoading ? actualLoadingText : title;
|
|
3021
|
-
const displayIcon = isLoading ? /* @__PURE__ */ (0,
|
|
3264
|
+
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
3265
|
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,
|
|
3266
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
|
|
3267
|
+
const buttonContent = onClick ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
3268
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: displayIcon }),
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ml-1", children: displayTitle })
|
|
3270
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
3271
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: displayTitle }),
|
|
3272
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ml-1", children: displayIcon })
|
|
3030
3273
|
] });
|
|
3031
3274
|
const buttonClassName = `
|
|
3032
3275
|
bg-gradient-to-r
|
|
@@ -3040,9 +3283,9 @@ function GradientButton({
|
|
|
3040
3283
|
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
3041
3284
|
${className}
|
|
3042
3285
|
`;
|
|
3043
|
-
return /* @__PURE__ */ (0,
|
|
3286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
|
|
3044
3287
|
// for click
|
|
3045
|
-
/* @__PURE__ */ (0,
|
|
3288
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3046
3289
|
Button,
|
|
3047
3290
|
{
|
|
3048
3291
|
size: "lg",
|
|
@@ -3054,14 +3297,14 @@ function GradientButton({
|
|
|
3054
3297
|
)
|
|
3055
3298
|
) : (
|
|
3056
3299
|
// for Link
|
|
3057
|
-
/* @__PURE__ */ (0,
|
|
3300
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3058
3301
|
Button,
|
|
3059
3302
|
{
|
|
3060
3303
|
asChild: true,
|
|
3061
3304
|
size: "lg",
|
|
3062
3305
|
className: buttonClassName,
|
|
3063
3306
|
disabled: isDisabled,
|
|
3064
|
-
children: /* @__PURE__ */ (0,
|
|
3307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3065
3308
|
import_link2.default,
|
|
3066
3309
|
__spreadProps(__spreadValues({
|
|
3067
3310
|
href: href || "#",
|
|
@@ -3076,228 +3319,6 @@ function GradientButton({
|
|
|
3076
3319
|
) });
|
|
3077
3320
|
}
|
|
3078
3321
|
|
|
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
3322
|
// src/main/cta.tsx
|
|
3302
3323
|
var import_next_intl7 = require("next-intl");
|
|
3303
3324
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|