@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.
@@ -2711,9 +2711,268 @@ 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 handleDownload = (item, index) => __async(null, null, function* () {
2732
+ var _a;
2733
+ try {
2734
+ const response = yield fetch(item.url, {
2735
+ method: "GET",
2736
+ // CORS mode declaration
2737
+ mode: "cors"
2738
+ });
2739
+ if (!response.ok) {
2740
+ throw new Error(`HTTP error! status: ${response.status}`);
2741
+ }
2742
+ const blob = yield response.blob();
2743
+ const url = window.URL.createObjectURL(blob);
2744
+ const contentType = response.headers.get("content-type");
2745
+ let extension = ".webp";
2746
+ if (contentType) {
2747
+ switch (contentType) {
2748
+ case "image/jpeg":
2749
+ case "image/jpg":
2750
+ extension = ".jpg";
2751
+ break;
2752
+ case "image/png":
2753
+ extension = ".png";
2754
+ break;
2755
+ case "image/gif":
2756
+ extension = ".gif";
2757
+ break;
2758
+ case "image/webp":
2759
+ extension = ".webp";
2760
+ break;
2761
+ case "image/svg+xml":
2762
+ extension = ".svg";
2763
+ break;
2764
+ default:
2765
+ const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
2766
+ if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
2767
+ extension = `.${urlExtension}`;
2768
+ }
2769
+ }
2770
+ }
2771
+ const downloadPrefix = t("downloadPrefix");
2772
+ const a = document.createElement("a");
2773
+ a.href = url;
2774
+ a.download = `${downloadPrefix}-${index + 1}${extension}`;
2775
+ a.style.display = "none";
2776
+ document.body.appendChild(a);
2777
+ a.click();
2778
+ setTimeout(() => {
2779
+ window.URL.revokeObjectURL(url);
2780
+ document.body.removeChild(a);
2781
+ }, 100);
2782
+ } catch (error) {
2783
+ console.error("Download failed:", error);
2784
+ }
2785
+ });
2786
+ const handleImageError = (index) => {
2787
+ setImageErrors((prev) => new Set(prev).add(index));
2788
+ };
2789
+ const getImageSrc = (item, index) => {
2790
+ return imageErrors.has(index) ? defaultImgUrl : item.url;
2791
+ };
2792
+ return /* @__PURE__ */ jsxs10("section", { id: "gallery", className: cn("container mx-auto px-4 py-20 scroll-mt-20", sectionClassName), children: [
2793
+ /* @__PURE__ */ jsxs10("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-6", children: [
2794
+ t("titleL"),
2795
+ " ",
2796
+ /* @__PURE__ */ jsx33("span", { className: "text-purple-500", children: t("eyesOn") }),
2797
+ " ",
2798
+ t("titleR")
2799
+ ] }),
2800
+ /* @__PURE__ */ jsx33("p", { className: "text-center max-w-2xl mx-auto mb-16", children: t("description") }),
2801
+ /* @__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: [
2802
+ /* @__PURE__ */ jsx33(
2803
+ Image,
2804
+ {
2805
+ src: getImageSrc(item, index),
2806
+ alt: item.altMsg,
2807
+ width: 600,
2808
+ height: 600,
2809
+ className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
2810
+ onError: () => handleImageError(index)
2811
+ }
2812
+ ),
2813
+ /* @__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(
2814
+ "button",
2815
+ {
2816
+ onClick: () => handleDownload(item, index),
2817
+ className: "bg-black/50 hover:bg-black/70 p-2 rounded-full text-white/80 hover:text-white transition-all duration-300",
2818
+ children: /* @__PURE__ */ jsx33(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
2819
+ }
2820
+ ) })
2821
+ ] }, index)) }),
2822
+ button && /* @__PURE__ */ jsx33("div", { className: "text-center mt-12", children: button })
2823
+ ] });
2824
+ }
2825
+
2826
+ // src/main/usage.tsx
2827
+ import { useTranslations as useTranslations2 } from "next-intl";
2828
+ import { jsx as jsx34, jsxs as jsxs11 } from "react/jsx-runtime";
2829
+ function Usage({ sectionClassName }) {
2830
+ const t = useTranslations2("usage");
2831
+ const steps = t.raw("steps");
2832
+ return /* @__PURE__ */ jsxs11("section", { id: "usage", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2833
+ /* @__PURE__ */ jsxs11("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
2834
+ t("title"),
2835
+ " ",
2836
+ /* @__PURE__ */ jsx34("span", { className: "text-purple-500", children: t("eyesOn") })
2837
+ ] }),
2838
+ /* @__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") }),
2839
+ /* @__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) => {
2840
+ const Icon2 = getGlobalIcon(step.iconKey);
2841
+ return /* @__PURE__ */ jsxs11("div", { className: "flex items-start", children: [
2842
+ /* @__PURE__ */ jsx34("div", { className: "flex-shrink-0 mr-4", children: /* @__PURE__ */ jsx34(Icon2, { className: "w-8 h-8 text-purple-500" }) }),
2843
+ /* @__PURE__ */ jsxs11("div", { children: [
2844
+ /* @__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}` }),
2845
+ /* @__PURE__ */ jsx34("p", { className: "text-gray-700 dark:text-gray-300", children: step.description })
2846
+ ] })
2847
+ ] }, idx);
2848
+ }) }) })
2849
+ ] });
2850
+ }
2851
+
2852
+ // src/main/features.tsx
2853
+ import { useTranslations as useTranslations3 } from "next-intl";
2854
+ import { jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
2855
+ function Features({ sectionClassName }) {
2856
+ const t = useTranslations3("features");
2857
+ const featureItems = t.raw("items");
2858
+ return /* @__PURE__ */ jsxs12("section", { id: "features", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-18", sectionClassName), children: [
2859
+ /* @__PURE__ */ jsxs12("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: [
2860
+ t("title"),
2861
+ " ",
2862
+ /* @__PURE__ */ jsx35("span", { className: "text-purple-500", children: t("eyesOn") })
2863
+ ] }),
2864
+ /* @__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") }),
2865
+ /* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8 gap-y-12", children: featureItems.map((feature, index) => {
2866
+ const Icon2 = getGlobalIcon(feature.iconKey);
2867
+ return /* @__PURE__ */ jsxs12(
2868
+ "div",
2869
+ {
2870
+ 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",
2871
+ children: [
2872
+ /* @__PURE__ */ jsx35("div", { className: "text-4xl mb-4 flex items-center justify-start", children: /* @__PURE__ */ jsx35(Icon2, { className: "w-8 h-8" }) }),
2873
+ /* @__PURE__ */ jsx35("h3", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100", children: feature.title }),
2874
+ /* @__PURE__ */ jsx35("p", { className: "text-gray-700 dark:text-gray-300", children: feature.description })
2875
+ ]
2876
+ },
2877
+ index
2878
+ );
2879
+ }) })
2880
+ ] });
2881
+ }
2882
+
2883
+ // src/main/tips.tsx
2884
+ import { useTranslations as useTranslations4 } from "next-intl";
2885
+ import { jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
2886
+ function Tips({ sectionClassName }) {
2887
+ const t = useTranslations4("tips");
2888
+ const sections = t.raw("sections");
2889
+ const midPoint = Math.ceil(sections.length / 2);
2890
+ const leftColumn = sections.slice(0, midPoint);
2891
+ const rightColumn = sections.slice(midPoint);
2892
+ return /* @__PURE__ */ jsxs13("section", { id: "tips", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2893
+ /* @__PURE__ */ jsxs13("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
2894
+ t("title"),
2895
+ " ",
2896
+ /* @__PURE__ */ jsx36("span", { className: "text-purple-500", children: t("eyesOn") })
2897
+ ] }),
2898
+ /* @__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: [
2899
+ /* @__PURE__ */ jsx36("h3", { className: "text-2xl font-semibold", children: tip.title }),
2900
+ /* @__PURE__ */ jsx36("p", { className: "", children: tip.description })
2901
+ ] }, tipIndex)) }, colIndex)) })
2902
+ ] });
2903
+ }
2904
+
2905
+ // src/main/faq.tsx
2906
+ import { useState as useState2 } from "react";
2907
+ import { useTranslations as useTranslations5 } from "next-intl";
2908
+ import { jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
2909
+ function FAQ({ sectionClassName }) {
2910
+ const t = useTranslations5("faq");
2911
+ const items = t.raw("items");
2912
+ const [openArr, setOpenArr] = useState2(() => items.map(() => false));
2913
+ const handleToggle = (idx) => {
2914
+ setOpenArr((prev) => {
2915
+ const next = [...prev];
2916
+ next[idx] = !next[idx];
2917
+ return next;
2918
+ });
2919
+ };
2920
+ return /* @__PURE__ */ jsxs14("section", { id: "faq", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2921
+ /* @__PURE__ */ jsx37("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: t("title") }),
2922
+ /* @__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") }),
2923
+ /* @__PURE__ */ jsx37("div", { className: "space-y-6", children: items.map((item, idx) => {
2924
+ const isOpen = openArr[idx];
2925
+ const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
2926
+ return /* @__PURE__ */ jsxs14(
2927
+ "div",
2928
+ {
2929
+ 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",
2930
+ children: [
2931
+ /* @__PURE__ */ jsxs14(
2932
+ "button",
2933
+ {
2934
+ className: "w-full flex items-center justify-between text-left focus:outline-none",
2935
+ onClick: () => handleToggle(idx),
2936
+ "aria-expanded": isOpen,
2937
+ children: [
2938
+ /* @__PURE__ */ jsx37("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
2939
+ /* @__PURE__ */ jsx37(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
2940
+ ]
2941
+ }
2942
+ ),
2943
+ isOpen && /* @__PURE__ */ jsx37("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: item.answer })
2944
+ ]
2945
+ },
2946
+ idx
2947
+ );
2948
+ }) })
2949
+ ] });
2950
+ }
2951
+
2952
+ // src/main/seo-content.tsx
2953
+ import { useTranslations as useTranslations6 } from "next-intl";
2954
+ import { jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
2955
+ function SeoContent({ sectionClassName }) {
2956
+ const t = useTranslations6("seoContent");
2957
+ return /* @__PURE__ */ jsxs15("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
2958
+ /* @__PURE__ */ jsxs15("h1", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
2959
+ t("title"),
2960
+ " ",
2961
+ /* @__PURE__ */ jsx38("span", { className: "text-purple-500", children: t("eyesOn") })
2962
+ ] }),
2963
+ /* @__PURE__ */ jsx38("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
2964
+ /* @__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: [
2965
+ /* @__PURE__ */ jsxs15("div", { className: "space-y-10", children: [
2966
+ /* @__PURE__ */ jsx38("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: t("intro") }),
2967
+ t.raw("sections").map((section, index) => /* @__PURE__ */ jsxs15("div", { children: [
2968
+ /* @__PURE__ */ jsx38("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
2969
+ /* @__PURE__ */ jsx38("p", { className: "text-gray-700 dark:text-gray-300", children: section.content })
2970
+ ] }, index))
2971
+ ] }),
2972
+ /* @__PURE__ */ jsx38("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: t("conclusion") })
2973
+ ] })
2974
+ ] });
2975
+ }
2717
2976
 
2718
2977
  // ../base-ui/src/ui/button.tsx
2719
2978
  import * as React35 from "react";
@@ -2759,7 +3018,7 @@ function useComposedRefs(...refs) {
2759
3018
  }
2760
3019
 
2761
3020
  // ../../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";
3021
+ import { Fragment as Fragment2, jsx as jsx39 } from "react/jsx-runtime";
2763
3022
  // @__NO_SIDE_EFFECTS__
2764
3023
  function createSlot(ownerName) {
2765
3024
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
@@ -2777,9 +3036,9 @@ function createSlot(ownerName) {
2777
3036
  return child;
2778
3037
  }
2779
3038
  });
2780
- return /* @__PURE__ */ jsx33(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
3039
+ return /* @__PURE__ */ jsx39(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
2781
3040
  }
2782
- return /* @__PURE__ */ jsx33(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
3041
+ return /* @__PURE__ */ jsx39(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
2783
3042
  });
2784
3043
  Slot22.displayName = `${ownerName}.Slot`;
2785
3044
  return Slot22;
@@ -2806,7 +3065,7 @@ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
2806
3065
  // @__NO_SIDE_EFFECTS__
2807
3066
  function createSlottable(ownerName) {
2808
3067
  const Slottable2 = ({ children }) => {
2809
- return /* @__PURE__ */ jsx33(Fragment2, { children });
3068
+ return /* @__PURE__ */ jsx39(Fragment2, { children });
2810
3069
  };
2811
3070
  Slottable2.displayName = `${ownerName}.Slottable`;
2812
3071
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
@@ -2856,16 +3115,7 @@ function getElementRef(element) {
2856
3115
 
2857
3116
  // ../base-ui/src/ui/button.tsx
2858
3117
  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";
3118
+ import { jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
2869
3119
  var buttonVariants = cva(
2870
3120
  "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
3121
  {
@@ -2896,7 +3146,7 @@ var Button = React35.forwardRef(
2896
3146
  var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
2897
3147
  const Comp = asChild ? Slot : "button";
2898
3148
  if (asChild) {
2899
- return /* @__PURE__ */ jsx34(
3149
+ return /* @__PURE__ */ jsx40(
2900
3150
  Comp,
2901
3151
  __spreadProps(__spreadValues({
2902
3152
  className: cn(buttonVariants({ variant, size, className })),
@@ -2907,7 +3157,7 @@ var Button = React35.forwardRef(
2907
3157
  })
2908
3158
  );
2909
3159
  }
2910
- return /* @__PURE__ */ jsxs10(
3160
+ return /* @__PURE__ */ jsxs16(
2911
3161
  Comp,
2912
3162
  __spreadProps(__spreadValues({
2913
3163
  className: cn(buttonVariants({ variant, size, className })),
@@ -2916,7 +3166,7 @@ var Button = React35.forwardRef(
2916
3166
  }, props), {
2917
3167
  children: [
2918
3168
  children,
2919
- loading && /* @__PURE__ */ jsx34(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
3169
+ loading && /* @__PURE__ */ jsx40(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
2920
3170
  ]
2921
3171
  })
2922
3172
  );
@@ -2926,8 +3176,8 @@ Button.displayName = "Button";
2926
3176
 
2927
3177
  // src/fuma/mdx/gradient-button.tsx
2928
3178
  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";
3179
+ import React36, { useState as useState3 } from "react";
3180
+ import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
2931
3181
  function GradientButton({
2932
3182
  title,
2933
3183
  icon,
@@ -2940,7 +3190,7 @@ function GradientButton({
2940
3190
  loadingText,
2941
3191
  preventDoubleClick = true
2942
3192
  }) {
2943
- const [isLoading, setIsLoading] = useState(false);
3193
+ const [isLoading, setIsLoading] = useState3(false);
2944
3194
  const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
2945
3195
  const getAlignmentClass = () => {
2946
3196
  switch (align) {
@@ -2975,15 +3225,15 @@ function GradientButton({
2975
3225
  });
2976
3226
  const isDisabled = disabled || isLoading;
2977
3227
  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, {
3228
+ const displayIcon = isLoading ? /* @__PURE__ */ jsx41(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? React36.cloneElement(icon, {
2979
3229
  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 })
3230
+ }) : /* @__PURE__ */ jsx41(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
3231
+ const buttonContent = onClick ? /* @__PURE__ */ jsxs17(Fragment3, { children: [
3232
+ /* @__PURE__ */ jsx41("span", { children: displayIcon }),
3233
+ /* @__PURE__ */ jsx41("span", { className: "ml-1", children: displayTitle })
3234
+ ] }) : /* @__PURE__ */ jsxs17(Fragment3, { children: [
3235
+ /* @__PURE__ */ jsx41("span", { children: displayTitle }),
3236
+ /* @__PURE__ */ jsx41("span", { className: "ml-1", children: displayIcon })
2987
3237
  ] });
2988
3238
  const buttonClassName = `
2989
3239
  bg-gradient-to-r
@@ -2997,9 +3247,9 @@ function GradientButton({
2997
3247
  ${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
2998
3248
  ${className}
2999
3249
  `;
3000
- return /* @__PURE__ */ jsx35("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
3250
+ return /* @__PURE__ */ jsx41("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
3001
3251
  // for click
3002
- /* @__PURE__ */ jsx35(
3252
+ /* @__PURE__ */ jsx41(
3003
3253
  Button,
3004
3254
  {
3005
3255
  size: "lg",
@@ -3011,14 +3261,14 @@ function GradientButton({
3011
3261
  )
3012
3262
  ) : (
3013
3263
  // for Link
3014
- /* @__PURE__ */ jsx35(
3264
+ /* @__PURE__ */ jsx41(
3015
3265
  Button,
3016
3266
  {
3017
3267
  asChild: true,
3018
3268
  size: "lg",
3019
3269
  className: buttonClassName,
3020
3270
  disabled: isDisabled,
3021
- children: /* @__PURE__ */ jsx35(
3271
+ children: /* @__PURE__ */ jsx41(
3022
3272
  Link2,
3023
3273
  __spreadProps(__spreadValues({
3024
3274
  href: href || "#",
@@ -3033,228 +3283,6 @@ function GradientButton({
3033
3283
  ) });
3034
3284
  }
3035
3285
 
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
3286
  // src/main/cta.tsx
3259
3287
  import { useTranslations as useTranslations7 } from "next-intl";
3260
3288
  import { jsx as jsx42, jsxs as jsxs18 } from "react/jsx-runtime";