@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.
@@ -2711,9 +2711,261 @@ function getGlobalIcon(iconKey, createElement8) {
2711
2711
  return Icon2;
2712
2712
  }
2713
2713
 
2714
+ // ../lib/src/utils.ts
2715
+ import { clsx } from "clsx";
2716
+ import { twMerge } from "tailwind-merge";
2717
+ function cn(...inputs) {
2718
+ return twMerge(clsx(inputs));
2719
+ }
2720
+
2714
2721
  // src/main/gallery.tsx
2715
2722
  import { useTranslations } from "next-intl";
2716
2723
  import Image from "next/image";
2724
+ import { useState } from "react";
2725
+ import { jsx as jsx33, jsxs as jsxs10 } from "react/jsx-runtime";
2726
+ function Gallery({ sectionClassName, button }) {
2727
+ const t = useTranslations("gallery");
2728
+ const galleryItems = t.raw("prompts");
2729
+ const defaultImgUrl = t.raw("defaultImgUrl");
2730
+ const [imageErrors, setImageErrors] = useState(/* @__PURE__ */ new Set());
2731
+ const [downloadingItems, setDownloadingItems] = useState(/* @__PURE__ */ new Set());
2732
+ const cdnProxyUrl = process.env.NEXT_PUBLIC_STYLE_CDN_PROXY_URL;
2733
+ const handleDownload = (item, index) => __async(null, null, function* () {
2734
+ var _a;
2735
+ if (downloadingItems.has(index)) {
2736
+ return;
2737
+ }
2738
+ setDownloadingItems((prev) => new Set(prev).add(index));
2739
+ try {
2740
+ const originalUrl = new URL(item.url);
2741
+ const filename = originalUrl.pathname.substring(1);
2742
+ const proxyUrl = `${cdnProxyUrl}/${encodeURIComponent(filename)}`;
2743
+ const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
2744
+ let extension = ".webp";
2745
+ if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
2746
+ extension = `.${urlExtension}`;
2747
+ }
2748
+ const downloadPrefix = t("downloadPrefix");
2749
+ const response = yield fetch(proxyUrl);
2750
+ if (!response.ok) {
2751
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
2752
+ }
2753
+ const blob = yield response.blob();
2754
+ const blobUrl = URL.createObjectURL(blob);
2755
+ const a = document.createElement("a");
2756
+ a.href = blobUrl;
2757
+ a.download = `${downloadPrefix}-${index + 1}${extension}`;
2758
+ a.style.display = "none";
2759
+ document.body.appendChild(a);
2760
+ a.click();
2761
+ setTimeout(() => {
2762
+ document.body.removeChild(a);
2763
+ URL.revokeObjectURL(blobUrl);
2764
+ }, 100);
2765
+ } catch (error) {
2766
+ console.error("Download failed:", error);
2767
+ } finally {
2768
+ setDownloadingItems((prev) => {
2769
+ const newSet = new Set(prev);
2770
+ newSet.delete(index);
2771
+ return newSet;
2772
+ });
2773
+ }
2774
+ });
2775
+ const handleImageError = (index) => {
2776
+ setImageErrors((prev) => new Set(prev).add(index));
2777
+ };
2778
+ const getImageSrc = (item, index) => {
2779
+ return imageErrors.has(index) ? defaultImgUrl : item.url;
2780
+ };
2781
+ return /* @__PURE__ */ jsxs10("section", { id: "gallery", className: cn("container mx-auto px-4 py-20 scroll-mt-20", sectionClassName), children: [
2782
+ /* @__PURE__ */ jsxs10("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [
2783
+ t("titleL"),
2784
+ " ",
2785
+ /* @__PURE__ */ jsx33("span", { className: "text-purple-500", children: t("eyesOn") }),
2786
+ " ",
2787
+ t("titleR")
2788
+ ] }),
2789
+ /* @__PURE__ */ jsx33("p", { className: "text-center max-w-2xl mx-auto mb-16", children: t("description") }),
2790
+ /* @__PURE__ */ jsx33("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: galleryItems.map((item, index) => /* @__PURE__ */ jsxs10("div", { className: "group relative overflow-hidden rounded-xl", children: [
2791
+ /* @__PURE__ */ jsx33(
2792
+ Image,
2793
+ {
2794
+ src: getImageSrc(item, index),
2795
+ alt: item.altMsg,
2796
+ width: 600,
2797
+ height: 600,
2798
+ className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
2799
+ onError: () => handleImageError(index)
2800
+ }
2801
+ ),
2802
+ /* @__PURE__ */ jsx33("div", { className: "absolute inset-0 flex items-end justify-end p-4 opacity-0 group-hover:opacity-100 transition duration-300", children: /* @__PURE__ */ jsx33(
2803
+ "button",
2804
+ {
2805
+ onClick: () => handleDownload(item, index),
2806
+ disabled: downloadingItems.has(index),
2807
+ className: cn(
2808
+ "p-2 rounded-full transition-all duration-300",
2809
+ downloadingItems.has(index) ? "bg-black/30 text-white/50" : "bg-black/50 hover:bg-black/70 text-white/80 hover:text-white"
2810
+ ),
2811
+ children: downloadingItems.has(index) ? /* @__PURE__ */ jsx33(globalLucideIcons.Loader2, { className: "h-5 w-5 text-white animate-spin" }) : /* @__PURE__ */ jsx33(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
2812
+ }
2813
+ ) })
2814
+ ] }, index)) }),
2815
+ button && /* @__PURE__ */ jsx33("div", { className: "text-center mt-12", children: button })
2816
+ ] });
2817
+ }
2818
+
2819
+ // src/main/usage.tsx
2820
+ import { useTranslations as useTranslations2 } from "next-intl";
2821
+ import { jsx as jsx34, jsxs as jsxs11 } from "react/jsx-runtime";
2822
+ function Usage({ sectionClassName }) {
2823
+ const t = useTranslations2("usage");
2824
+ const steps = t.raw("steps");
2825
+ return /* @__PURE__ */ jsxs11("section", { id: "usage", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2826
+ /* @__PURE__ */ jsxs11("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
2827
+ t("title"),
2828
+ " ",
2829
+ /* @__PURE__ */ jsx34("span", { className: "text-purple-500", children: t("eyesOn") })
2830
+ ] }),
2831
+ /* @__PURE__ */ jsx34("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") }),
2832
+ /* @__PURE__ */ jsx34("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__ */ jsx34("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: steps.map((step, idx) => {
2833
+ const Icon2 = getGlobalIcon(step.iconKey);
2834
+ return /* @__PURE__ */ jsxs11("div", { className: "flex items-start", children: [
2835
+ /* @__PURE__ */ jsx34("div", { className: "flex-shrink-0 mr-4", children: /* @__PURE__ */ jsx34(Icon2, { className: "w-8 h-8 text-purple-500" }) }),
2836
+ /* @__PURE__ */ jsxs11("div", { children: [
2837
+ /* @__PURE__ */ jsx34("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: `${idx + 1}. ${step.title}` }),
2838
+ /* @__PURE__ */ jsx34("p", { className: "text-gray-700 dark:text-gray-300", children: step.description })
2839
+ ] })
2840
+ ] }, idx);
2841
+ }) }) })
2842
+ ] });
2843
+ }
2844
+
2845
+ // src/main/features.tsx
2846
+ import { useTranslations as useTranslations3 } from "next-intl";
2847
+ import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
2848
+ function Features({ sectionClassName }) {
2849
+ const t = useTranslations3("features");
2850
+ const featureItems = t.raw("items");
2851
+ return /* @__PURE__ */ jsxs12("section", { id: "features", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-18", sectionClassName), children: [
2852
+ /* @__PURE__ */ jsxs12("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
2853
+ t("title"),
2854
+ " ",
2855
+ /* @__PURE__ */ jsx35("span", { className: "text-purple-500", children: t("eyesOn") })
2856
+ ] }),
2857
+ /* @__PURE__ */ jsx35("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") }),
2858
+ /* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: featureItems.map((feature, index) => {
2859
+ const Icon2 = getGlobalIcon(feature.iconKey);
2860
+ return /* @__PURE__ */ jsxs12(
2861
+ "div",
2862
+ {
2863
+ 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",
2864
+ children: [
2865
+ /* @__PURE__ */ jsx35("div", { className: "text-4xl mb-4 flex items-center justify-start", children: /* @__PURE__ */ jsx35(Icon2, { className: "w-8 h-8" }) }),
2866
+ /* @__PURE__ */ jsx35("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
2867
+ /* @__PURE__ */ jsx35("p", { className: "text-gray-700 dark:text-gray-300", children: feature.description })
2868
+ ]
2869
+ },
2870
+ index
2871
+ );
2872
+ }) })
2873
+ ] });
2874
+ }
2875
+
2876
+ // src/main/tips.tsx
2877
+ import { useTranslations as useTranslations4 } from "next-intl";
2878
+ import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
2879
+ function Tips({ sectionClassName }) {
2880
+ const t = useTranslations4("tips");
2881
+ const sections = t.raw("sections");
2882
+ const midPoint = Math.ceil(sections.length / 2);
2883
+ const leftColumn = sections.slice(0, midPoint);
2884
+ const rightColumn = sections.slice(midPoint);
2885
+ return /* @__PURE__ */ jsxs13("section", { id: "tips", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2886
+ /* @__PURE__ */ jsxs13("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
2887
+ t("title"),
2888
+ " ",
2889
+ /* @__PURE__ */ jsx36("span", { className: "text-purple-500", children: t("eyesOn") })
2890
+ ] }),
2891
+ /* @__PURE__ */ jsx36("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__ */ jsx36("div", { className: "space-y-8", children: column.map((tip, tipIndex) => /* @__PURE__ */ jsxs13("div", { className: "space-y-4", children: [
2892
+ /* @__PURE__ */ jsx36("h3", { className: "text-2xl font-semibold", children: tip.title }),
2893
+ /* @__PURE__ */ jsx36("p", { className: "", children: tip.description })
2894
+ ] }, tipIndex)) }, colIndex)) })
2895
+ ] });
2896
+ }
2897
+
2898
+ // src/main/faq.tsx
2899
+ import { useState as useState2 } from "react";
2900
+ import { useTranslations as useTranslations5 } from "next-intl";
2901
+ import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
2902
+ function FAQ({ sectionClassName }) {
2903
+ const t = useTranslations5("faq");
2904
+ const items = t.raw("items");
2905
+ const [openArr, setOpenArr] = useState2(() => items.map(() => false));
2906
+ const handleToggle = (idx) => {
2907
+ setOpenArr((prev) => {
2908
+ const next = [...prev];
2909
+ next[idx] = !next[idx];
2910
+ return next;
2911
+ });
2912
+ };
2913
+ return /* @__PURE__ */ jsxs14("section", { id: "faq", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2914
+ /* @__PURE__ */ jsx37("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: t("title") }),
2915
+ /* @__PURE__ */ jsx37("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto", children: t("description") }),
2916
+ /* @__PURE__ */ jsx37("div", { className: "space-y-6", children: items.map((item, idx) => {
2917
+ const isOpen = openArr[idx];
2918
+ const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
2919
+ return /* @__PURE__ */ jsxs14(
2920
+ "div",
2921
+ {
2922
+ 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",
2923
+ children: [
2924
+ /* @__PURE__ */ jsxs14(
2925
+ "button",
2926
+ {
2927
+ className: "w-full flex items-center justify-between text-left focus:outline-none",
2928
+ onClick: () => handleToggle(idx),
2929
+ "aria-expanded": isOpen,
2930
+ children: [
2931
+ /* @__PURE__ */ jsx37("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
2932
+ /* @__PURE__ */ jsx37(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
2933
+ ]
2934
+ }
2935
+ ),
2936
+ isOpen && /* @__PURE__ */ jsx37("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: item.answer })
2937
+ ]
2938
+ },
2939
+ idx
2940
+ );
2941
+ }) })
2942
+ ] });
2943
+ }
2944
+
2945
+ // src/main/seo-content.tsx
2946
+ import { useTranslations as useTranslations6 } from "next-intl";
2947
+ import { jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
2948
+ function SeoContent({ sectionClassName }) {
2949
+ const t = useTranslations6("seoContent");
2950
+ return /* @__PURE__ */ jsxs15("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2951
+ /* @__PURE__ */ jsxs15("h1", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
2952
+ t("title"),
2953
+ " ",
2954
+ /* @__PURE__ */ jsx38("span", { className: "text-purple-500", children: t("eyesOn") })
2955
+ ] }),
2956
+ /* @__PURE__ */ jsx38("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
2957
+ /* @__PURE__ */ jsxs15("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: [
2958
+ /* @__PURE__ */ jsxs15("div", { className: "space-y-10", children: [
2959
+ /* @__PURE__ */ jsx38("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: t("intro") }),
2960
+ t.raw("sections").map((section, index) => /* @__PURE__ */ jsxs15("div", { children: [
2961
+ /* @__PURE__ */ jsx38("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
2962
+ /* @__PURE__ */ jsx38("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })
2963
+ ] }, index))
2964
+ ] }),
2965
+ /* @__PURE__ */ jsx38("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: t("conclusion") })
2966
+ ] })
2967
+ ] });
2968
+ }
2717
2969
 
2718
2970
  // ../base-ui/src/ui/button.tsx
2719
2971
  import * as React35 from "react";
@@ -2759,7 +3011,7 @@ function useComposedRefs(...refs) {
2759
3011
  }
2760
3012
 
2761
3013
  // ../../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
2762
- import { Fragment as Fragment2, jsx as jsx33 } from "react/jsx-runtime";
3014
+ import { Fragment as Fragment2, jsx as jsx39 } from "react/jsx-runtime";
2763
3015
  // @__NO_SIDE_EFFECTS__
2764
3016
  function createSlot(ownerName) {
2765
3017
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
@@ -2777,9 +3029,9 @@ function createSlot(ownerName) {
2777
3029
  return child;
2778
3030
  }
2779
3031
  });
2780
- return /* @__PURE__ */ jsx33(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
3032
+ return /* @__PURE__ */ jsx39(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
2781
3033
  }
2782
- return /* @__PURE__ */ jsx33(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
3034
+ return /* @__PURE__ */ jsx39(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
2783
3035
  });
2784
3036
  Slot22.displayName = `${ownerName}.Slot`;
2785
3037
  return Slot22;
@@ -2806,7 +3058,7 @@ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
2806
3058
  // @__NO_SIDE_EFFECTS__
2807
3059
  function createSlottable(ownerName) {
2808
3060
  const Slottable2 = ({ children }) => {
2809
- return /* @__PURE__ */ jsx33(Fragment2, { children });
3061
+ return /* @__PURE__ */ jsx39(Fragment2, { children });
2810
3062
  };
2811
3063
  Slottable2.displayName = `${ownerName}.Slottable`;
2812
3064
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
@@ -2856,16 +3108,7 @@ function getElementRef(element) {
2856
3108
 
2857
3109
  // ../base-ui/src/ui/button.tsx
2858
3110
  import { cva } from "class-variance-authority";
2859
-
2860
- // ../lib/src/utils.ts
2861
- import { clsx } from "clsx";
2862
- import { twMerge } from "tailwind-merge";
2863
- function cn(...inputs) {
2864
- return twMerge(clsx(inputs));
2865
- }
2866
-
2867
- // ../base-ui/src/ui/button.tsx
2868
- import { jsx as jsx34, jsxs as jsxs10 } from "react/jsx-runtime";
3111
+ import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
2869
3112
  var buttonVariants = cva(
2870
3113
  "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",
2871
3114
  {
@@ -2896,7 +3139,7 @@ var Button = React35.forwardRef(
2896
3139
  var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
2897
3140
  const Comp = asChild ? Slot : "button";
2898
3141
  if (asChild) {
2899
- return /* @__PURE__ */ jsx34(
3142
+ return /* @__PURE__ */ jsx40(
2900
3143
  Comp,
2901
3144
  __spreadProps(__spreadValues({
2902
3145
  className: cn(buttonVariants({ variant, size, className })),
@@ -2907,7 +3150,7 @@ var Button = React35.forwardRef(
2907
3150
  })
2908
3151
  );
2909
3152
  }
2910
- return /* @__PURE__ */ jsxs10(
3153
+ return /* @__PURE__ */ jsxs16(
2911
3154
  Comp,
2912
3155
  __spreadProps(__spreadValues({
2913
3156
  className: cn(buttonVariants({ variant, size, className })),
@@ -2916,7 +3159,7 @@ var Button = React35.forwardRef(
2916
3159
  }, props), {
2917
3160
  children: [
2918
3161
  children,
2919
- loading && /* @__PURE__ */ jsx34(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
3162
+ loading && /* @__PURE__ */ jsx40(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
2920
3163
  ]
2921
3164
  })
2922
3165
  );
@@ -2926,8 +3169,8 @@ Button.displayName = "Button";
2926
3169
 
2927
3170
  // src/fuma/mdx/gradient-button.tsx
2928
3171
  import Link2 from "next/link";
2929
- import React36, { useState } from "react";
2930
- import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs11 } from "react/jsx-runtime";
3172
+ import React36, { useState as useState3 } from "react";
3173
+ import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
2931
3174
  function GradientButton({
2932
3175
  title,
2933
3176
  icon,
@@ -2940,7 +3183,7 @@ function GradientButton({
2940
3183
  loadingText,
2941
3184
  preventDoubleClick = true
2942
3185
  }) {
2943
- const [isLoading, setIsLoading] = useState(false);
3186
+ const [isLoading, setIsLoading] = useState3(false);
2944
3187
  const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
2945
3188
  const getAlignmentClass = () => {
2946
3189
  switch (align) {
@@ -2975,15 +3218,15 @@ function GradientButton({
2975
3218
  });
2976
3219
  const isDisabled = disabled || isLoading;
2977
3220
  const displayTitle = isLoading ? actualLoadingText : title;
2978
- const displayIcon = isLoading ? /* @__PURE__ */ jsx35(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? React36.cloneElement(icon, {
3221
+ const displayIcon = isLoading ? /* @__PURE__ */ jsx41(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? React36.cloneElement(icon, {
2979
3222
  className: "h-4 w-4 text-white"
2980
- }) : /* @__PURE__ */ jsx35(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
2981
- const buttonContent = onClick ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
2982
- /* @__PURE__ */ jsx35("span", { children: displayIcon }),
2983
- /* @__PURE__ */ jsx35("span", { className: "ml-1", children: displayTitle })
2984
- ] }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
2985
- /* @__PURE__ */ jsx35("span", { children: displayTitle }),
2986
- /* @__PURE__ */ jsx35("span", { className: "ml-1", children: displayIcon })
3223
+ }) : /* @__PURE__ */ jsx41(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
3224
+ const buttonContent = onClick ? /* @__PURE__ */ jsxs17(Fragment3, { children: [
3225
+ /* @__PURE__ */ jsx41("span", { children: displayIcon }),
3226
+ /* @__PURE__ */ jsx41("span", { className: "ml-1", children: displayTitle })
3227
+ ] }) : /* @__PURE__ */ jsxs17(Fragment3, { children: [
3228
+ /* @__PURE__ */ jsx41("span", { children: displayTitle }),
3229
+ /* @__PURE__ */ jsx41("span", { className: "ml-1", children: displayIcon })
2987
3230
  ] });
2988
3231
  const buttonClassName = `
2989
3232
  bg-gradient-to-r
@@ -2997,9 +3240,9 @@ function GradientButton({
2997
3240
  ${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
2998
3241
  ${className}
2999
3242
  `;
3000
- return /* @__PURE__ */ jsx35("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
3243
+ return /* @__PURE__ */ jsx41("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
3001
3244
  // for click
3002
- /* @__PURE__ */ jsx35(
3245
+ /* @__PURE__ */ jsx41(
3003
3246
  Button,
3004
3247
  {
3005
3248
  size: "lg",
@@ -3011,14 +3254,14 @@ function GradientButton({
3011
3254
  )
3012
3255
  ) : (
3013
3256
  // for Link
3014
- /* @__PURE__ */ jsx35(
3257
+ /* @__PURE__ */ jsx41(
3015
3258
  Button,
3016
3259
  {
3017
3260
  asChild: true,
3018
3261
  size: "lg",
3019
3262
  className: buttonClassName,
3020
3263
  disabled: isDisabled,
3021
- children: /* @__PURE__ */ jsx35(
3264
+ children: /* @__PURE__ */ jsx41(
3022
3265
  Link2,
3023
3266
  __spreadProps(__spreadValues({
3024
3267
  href: href || "#",
@@ -3033,228 +3276,6 @@ function GradientButton({
3033
3276
  ) });
3034
3277
  }
3035
3278
 
3036
- // src/main/gallery.tsx
3037
- import { useState as useState2 } from "react";
3038
- import { jsx as jsx36, jsxs as jsxs12 } from "react/jsx-runtime";
3039
- function Gallery({ sectionClassName }) {
3040
- const t = useTranslations("gallery");
3041
- const galleryItems = t.raw("prompts");
3042
- const defaultImgUrl = t.raw("defaultImgUrl");
3043
- const [imageErrors, setImageErrors] = useState2(/* @__PURE__ */ new Set());
3044
- const handleDownload = (item, index) => __async(null, null, function* () {
3045
- try {
3046
- const response = yield fetch(item.url);
3047
- const blob = yield response.blob();
3048
- const url = window.URL.createObjectURL(blob);
3049
- const a = document.createElement("a");
3050
- a.href = url;
3051
- a.download = `reve-image-${index + 1}.webp`;
3052
- document.body.appendChild(a);
3053
- a.click();
3054
- window.URL.revokeObjectURL(url);
3055
- document.body.removeChild(a);
3056
- } catch (error) {
3057
- console.error("Download failed:", error);
3058
- }
3059
- });
3060
- const handleImageError = (index) => {
3061
- setImageErrors((prev) => new Set(prev).add(index));
3062
- };
3063
- const getImageSrc = (item, index) => {
3064
- return imageErrors.has(index) ? defaultImgUrl : item.url;
3065
- };
3066
- return /* @__PURE__ */ jsxs12("section", { id: "gallery", className: cn("container mx-auto px-4 py-20 scroll-mt-20", sectionClassName), children: [
3067
- /* @__PURE__ */ jsxs12("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [
3068
- t("titleL"),
3069
- " ",
3070
- /* @__PURE__ */ jsx36("span", { className: "text-purple-500", children: t("eyesOn") }),
3071
- " ",
3072
- t("titleR")
3073
- ] }),
3074
- /* @__PURE__ */ jsx36("p", { className: "text-center max-w-2xl mx-auto mb-16", children: t("description") }),
3075
- /* @__PURE__ */ jsx36("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: galleryItems.map((item, index) => /* @__PURE__ */ jsxs12("div", { className: "group relative overflow-hidden rounded-xl", children: [
3076
- /* @__PURE__ */ jsx36(
3077
- Image,
3078
- {
3079
- src: getImageSrc(item, index),
3080
- alt: item.altMsg,
3081
- width: 600,
3082
- height: 600,
3083
- className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
3084
- onError: () => handleImageError(index)
3085
- }
3086
- ),
3087
- /* @__PURE__ */ jsx36("div", { className: "absolute inset-0 flex items-end justify-end p-4 opacity-0 group-hover:opacity-100 transition duration-300", children: /* @__PURE__ */ jsx36(
3088
- "button",
3089
- {
3090
- onClick: () => handleDownload(item, index),
3091
- className: "bg-black/50 hover:bg-black/70 p-2 rounded-full text-white/80 hover:text-white transition-all duration-300",
3092
- children: /* @__PURE__ */ jsx36(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
3093
- }
3094
- ) })
3095
- ] }, index)) }),
3096
- /* @__PURE__ */ jsx36("div", { className: "text-center mt-12", children: /* @__PURE__ */ jsx36(
3097
- GradientButton,
3098
- {
3099
- title: t("button"),
3100
- href: "https://preview.reve.art/",
3101
- align: "center"
3102
- }
3103
- ) })
3104
- ] });
3105
- }
3106
-
3107
- // src/main/usage.tsx
3108
- import { useTranslations as useTranslations2 } from "next-intl";
3109
- import { jsx as jsx37, jsxs as jsxs13 } from "react/jsx-runtime";
3110
- function Usage({ sectionClassName }) {
3111
- const t = useTranslations2("usage");
3112
- const steps = t.raw("steps");
3113
- return /* @__PURE__ */ jsxs13("section", { id: "usage", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
3114
- /* @__PURE__ */ jsxs13("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
3115
- t("title"),
3116
- " ",
3117
- /* @__PURE__ */ jsx37("span", { className: "text-purple-500", children: t("eyesOn") })
3118
- ] }),
3119
- /* @__PURE__ */ jsx37("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") }),
3120
- /* @__PURE__ */ jsx37("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__ */ jsx37("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: steps.map((step, idx) => {
3121
- const Icon2 = getGlobalIcon(step.iconKey);
3122
- return /* @__PURE__ */ jsxs13("div", { className: "flex items-start", children: [
3123
- /* @__PURE__ */ jsx37("div", { className: "flex-shrink-0 mr-4", children: /* @__PURE__ */ jsx37(Icon2, { className: "w-8 h-8 text-purple-500" }) }),
3124
- /* @__PURE__ */ jsxs13("div", { children: [
3125
- /* @__PURE__ */ jsx37("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: `${idx + 1}. ${step.title}` }),
3126
- /* @__PURE__ */ jsx37("p", { className: "text-gray-700 dark:text-gray-300", children: step.description })
3127
- ] })
3128
- ] }, idx);
3129
- }) }) })
3130
- ] });
3131
- }
3132
-
3133
- // src/main/features.tsx
3134
- import { useTranslations as useTranslations3 } from "next-intl";
3135
- import { jsx as jsx38, jsxs as jsxs14 } from "react/jsx-runtime";
3136
- function Features({ sectionClassName }) {
3137
- const t = useTranslations3("features");
3138
- const featureItems = t.raw("items");
3139
- return /* @__PURE__ */ jsxs14("section", { id: "features", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-18", sectionClassName), children: [
3140
- /* @__PURE__ */ jsxs14("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
3141
- t("title"),
3142
- " ",
3143
- /* @__PURE__ */ jsx38("span", { className: "text-purple-500", children: t("eyesOn") })
3144
- ] }),
3145
- /* @__PURE__ */ jsx38("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") }),
3146
- /* @__PURE__ */ jsx38("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: featureItems.map((feature, index) => {
3147
- const Icon2 = getGlobalIcon(feature.iconKey);
3148
- return /* @__PURE__ */ jsxs14(
3149
- "div",
3150
- {
3151
- 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",
3152
- children: [
3153
- /* @__PURE__ */ jsx38("div", { className: "text-4xl mb-4 flex items-center justify-start", children: /* @__PURE__ */ jsx38(Icon2, { className: "w-8 h-8" }) }),
3154
- /* @__PURE__ */ jsx38("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
3155
- /* @__PURE__ */ jsx38("p", { className: "text-gray-700 dark:text-gray-300", children: feature.description })
3156
- ]
3157
- },
3158
- index
3159
- );
3160
- }) })
3161
- ] });
3162
- }
3163
-
3164
- // src/main/tips.tsx
3165
- import { useTranslations as useTranslations4 } from "next-intl";
3166
- import { jsx as jsx39, jsxs as jsxs15 } from "react/jsx-runtime";
3167
- function Tips({ sectionClassName }) {
3168
- const t = useTranslations4("tips");
3169
- const sections = t.raw("sections");
3170
- const midPoint = Math.ceil(sections.length / 2);
3171
- const leftColumn = sections.slice(0, midPoint);
3172
- const rightColumn = sections.slice(midPoint);
3173
- return /* @__PURE__ */ jsxs15("section", { id: "tips", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
3174
- /* @__PURE__ */ jsxs15("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
3175
- t("title"),
3176
- " ",
3177
- /* @__PURE__ */ jsx39("span", { className: "text-purple-500", children: t("eyesOn") })
3178
- ] }),
3179
- /* @__PURE__ */ jsx39("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__ */ jsx39("div", { className: "space-y-8", children: column.map((tip, tipIndex) => /* @__PURE__ */ jsxs15("div", { className: "space-y-4", children: [
3180
- /* @__PURE__ */ jsx39("h3", { className: "text-2xl font-semibold", children: tip.title }),
3181
- /* @__PURE__ */ jsx39("p", { className: "", children: tip.description })
3182
- ] }, tipIndex)) }, colIndex)) })
3183
- ] });
3184
- }
3185
-
3186
- // src/main/faq.tsx
3187
- import { useState as useState3 } from "react";
3188
- import { useTranslations as useTranslations5 } from "next-intl";
3189
- import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
3190
- function FAQ({ sectionClassName }) {
3191
- const t = useTranslations5("faq");
3192
- const items = t.raw("items");
3193
- const [openArr, setOpenArr] = useState3(() => items.map(() => false));
3194
- const handleToggle = (idx) => {
3195
- setOpenArr((prev) => {
3196
- const next = [...prev];
3197
- next[idx] = !next[idx];
3198
- return next;
3199
- });
3200
- };
3201
- return /* @__PURE__ */ jsxs16("section", { id: "faq", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
3202
- /* @__PURE__ */ jsx40("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: t("title") }),
3203
- /* @__PURE__ */ jsx40("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto", children: t("description") }),
3204
- /* @__PURE__ */ jsx40("div", { className: "space-y-6", children: items.map((item, idx) => {
3205
- const isOpen = openArr[idx];
3206
- const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
3207
- return /* @__PURE__ */ jsxs16(
3208
- "div",
3209
- {
3210
- 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",
3211
- children: [
3212
- /* @__PURE__ */ jsxs16(
3213
- "button",
3214
- {
3215
- className: "w-full flex items-center justify-between text-left focus:outline-none",
3216
- onClick: () => handleToggle(idx),
3217
- "aria-expanded": isOpen,
3218
- children: [
3219
- /* @__PURE__ */ jsx40("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
3220
- /* @__PURE__ */ jsx40(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
3221
- ]
3222
- }
3223
- ),
3224
- isOpen && /* @__PURE__ */ jsx40("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: item.answer })
3225
- ]
3226
- },
3227
- idx
3228
- );
3229
- }) })
3230
- ] });
3231
- }
3232
-
3233
- // src/main/seo-content.tsx
3234
- import { useTranslations as useTranslations6 } from "next-intl";
3235
- import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
3236
- function SeoContent({ sectionClassName }) {
3237
- const t = useTranslations6("seoContent");
3238
- return /* @__PURE__ */ jsxs17("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
3239
- /* @__PURE__ */ jsxs17("h1", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
3240
- t("title"),
3241
- " ",
3242
- /* @__PURE__ */ jsx41("span", { className: "text-purple-500", children: t("eyesOn") })
3243
- ] }),
3244
- /* @__PURE__ */ jsx41("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
3245
- /* @__PURE__ */ jsxs17("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: [
3246
- /* @__PURE__ */ jsxs17("div", { className: "space-y-10", children: [
3247
- /* @__PURE__ */ jsx41("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: t("intro") }),
3248
- t.raw("sections").map((section, index) => /* @__PURE__ */ jsxs17("div", { children: [
3249
- /* @__PURE__ */ jsx41("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
3250
- /* @__PURE__ */ jsx41("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })
3251
- ] }, index))
3252
- ] }),
3253
- /* @__PURE__ */ jsx41("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: t("conclusion") })
3254
- ] })
3255
- ] });
3256
- }
3257
-
3258
3279
  // src/main/cta.tsx
3259
3280
  import { useTranslations as useTranslations7 } from "next-intl";
3260
3281
  import { jsx as jsx42, jsxs as jsxs18 } from "react/jsx-runtime";