aura-ui-library 1.0.13 → 1.0.15

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.
Files changed (3) hide show
  1. package/dist/index.js +319 -112
  2. package/dist/index.mjs +318 -112
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  Button: () => Button,
33
+ Canvas: () => Canvas,
33
34
  Carousel: () => Carousel,
34
35
  Footer: () => Footer,
35
36
  Grid: () => Grid,
@@ -3125,24 +3126,26 @@ var import_fi13 = require("react-icons/fi");
3125
3126
  import_gsap14.gsap.registerPlugin(import_ScrollTrigger.ScrollTrigger);
3126
3127
  var ImageEffectScrolling = ({
3127
3128
  images = [
3128
- { id: 1, src: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&q=80&w=800", title: "Aether Flow" },
3129
- { id: 2, src: "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?auto=format&fit=crop&q=80&w=800", title: "Neural Nexus" },
3130
- { id: 3, src: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?auto=format&fit=crop&q=80&w=800", title: "Neon Gradients" },
3131
- { id: 4, src: "https://images.unsplash.com/photo-1550684848-fac1c5b4e853?auto=format&fit=crop&q=80&w=800", title: "Geometry Labs" },
3132
- { id: 5, src: "https://images.unsplash.com/photo-1614850523296-d8c1af93d400?auto=format&fit=crop&q=80&w=800", title: "Liquid Void" },
3133
- { id: 6, src: "https://images.unsplash.com/photo-1634017839464-5c339ebe3cb4?auto=format&fit=crop&q=80&w=800", title: "Digital Ether" }
3129
+ { id: 1, src: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&q=80&w=800", title: "Aether Flow", width: "45vh" },
3130
+ { id: 2, src: "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?auto=format&fit=crop&q=80&w=800", title: "Neural Nexus", width: "35vh" },
3131
+ { id: 3, src: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?auto=format&fit=crop&q=80&w=800", title: "Neon Gradients", width: "55vh" },
3132
+ { id: 4, src: "https://images.unsplash.com/photo-1550684848-fac1c5b4e853?auto=format&fit=crop&q=80&w=800", title: "Geometry Labs", width: "40vh" },
3133
+ { id: 5, src: "https://images.unsplash.com/photo-1614850523296-d8c1af93d400?auto=format&fit=crop&q=80&w=800", title: "Liquid Void", width: "50vh" }
3134
3134
  ],
3135
+ variant = "wave",
3136
+ // "wave", "gooey", "zoom"
3137
+ intensity = 1,
3135
3138
  accentColor = "#6366f1",
3136
3139
  textColor = "#ffffff",
3137
- waveIntensity = 15,
3138
- scrollSpeed = 1,
3139
- animationDuration = 1.5,
3140
+ itemWidth = "45vh",
3141
+ itemHeight = "60vh",
3142
+ animationDuration = 1.4,
3140
3143
  easing = "power4.out"
3141
3144
  }) => {
3142
3145
  const sectionRef = (0, import_react14.useRef)(null);
3143
3146
  const containerRef = (0, import_react14.useRef)(null);
3144
3147
  const imageRefs = (0, import_react14.useRef)([]);
3145
- const contentRef = (0, import_react14.useRef)(null);
3148
+ const [activeVariant, setActiveVariant] = (0, import_react14.useState)(variant);
3146
3149
  const inRouter = (0, import_react_router_dom12.useInRouterContext)();
3147
3150
  const navigate = inRouter ? (0, import_react_router_dom12.useNavigate)() : null;
3148
3151
  const handleNavigate = (path) => {
@@ -3155,7 +3158,7 @@ var ImageEffectScrolling = ({
3155
3158
  const ctx = import_gsap14.gsap.context(() => {
3156
3159
  const sections = imageRefs.current;
3157
3160
  const totalWidth = containerRef.current.scrollWidth;
3158
- import_gsap14.gsap.to(containerRef.current, {
3161
+ const masterScroll = import_gsap14.gsap.to(containerRef.current, {
3159
3162
  x: () => -(totalWidth - window.innerWidth),
3160
3163
  ease: "none",
3161
3164
  scrollTrigger: {
@@ -3164,158 +3167,190 @@ var ImageEffectScrolling = ({
3164
3167
  scrub: 1,
3165
3168
  start: "top top",
3166
3169
  end: () => `+=${totalWidth}`,
3167
- anticipatePin: 1,
3170
+ invalidateOnRefresh: true,
3168
3171
  onUpdate: (self) => {
3169
- const velocity = self.getVelocity();
3170
- const skew = velocity / 500 * waveIntensity;
3171
- sections.forEach((img) => {
3172
- import_gsap14.gsap.to(img, {
3173
- skewX: skew,
3174
- duration: 0.5,
3175
- ease: "power2.out",
3176
- overwrite: "auto"
3172
+ if (activeVariant === "wave") {
3173
+ const velocity = self.getVelocity();
3174
+ const skew = velocity / 500 * 15 * intensity;
3175
+ sections.forEach((img) => {
3176
+ import_gsap14.gsap.to(img, { skewX: skew, duration: 0.6, ease: "power2.out", overwrite: "auto" });
3177
3177
  });
3178
- });
3178
+ }
3179
3179
  }
3180
3180
  }
3181
3181
  });
3182
- import_gsap14.gsap.fromTo(
3183
- imageRefs.current,
3184
- { opacity: 0, y: 100, scale: 0.8 },
3185
- {
3186
- opacity: 1,
3187
- y: 0,
3188
- scale: 1,
3189
- stagger: 0.1,
3190
- duration: animationDuration,
3191
- ease: easing
3192
- }
3193
- );
3194
- sections.forEach((img) => {
3195
- const innerImg = img.querySelector("img");
3196
- import_gsap14.gsap.to(innerImg, {
3197
- x: -100,
3182
+ if (activeVariant === "zoom") {
3183
+ sections.forEach((img) => {
3184
+ import_gsap14.gsap.fromTo(
3185
+ img,
3186
+ { scale: 0.8, filter: "brightness(0.4) grayscale(1)" },
3187
+ {
3188
+ scale: 1.1,
3189
+ filter: "brightness(1) grayscale(0)",
3190
+ scrollTrigger: {
3191
+ trigger: img,
3192
+ containerAnimation: masterScroll,
3193
+ start: "left center",
3194
+ end: "center center",
3195
+ scrub: true
3196
+ }
3197
+ }
3198
+ );
3199
+ import_gsap14.gsap.to(img, {
3200
+ scale: 0.8,
3201
+ filter: "brightness(0.4) grayscale(1)",
3202
+ scrollTrigger: {
3203
+ trigger: img,
3204
+ containerAnimation: masterScroll,
3205
+ start: "center center",
3206
+ end: "right center",
3207
+ scrub: true
3208
+ }
3209
+ });
3210
+ });
3211
+ }
3212
+ if (activeVariant === "gooey") {
3213
+ import_gsap14.gsap.to(sections, {
3214
+ xPercent: (i) => i % 2 === 0 ? 10 : -10,
3198
3215
  ease: "none",
3199
3216
  scrollTrigger: {
3200
- trigger: img,
3201
- containerAnimation: import_gsap14.gsap.getProperty(containerRef.current, "gsap"),
3202
- // This is tricky for scrub
3203
- scrub: true,
3204
- horizontal: true
3217
+ trigger: sectionRef.current,
3218
+ start: "top top",
3219
+ end: "bottom top",
3220
+ scrub: 1
3205
3221
  }
3206
3222
  });
3223
+ }
3224
+ import_gsap14.gsap.fromTo(
3225
+ sections,
3226
+ { opacity: 0, y: 100, scale: 0.9 },
3227
+ { opacity: 1, y: 0, scale: 1, stagger: 0.1, duration: animationDuration, ease: easing }
3228
+ );
3229
+ sections.forEach((item) => {
3230
+ const innerImg = item.querySelector(".parallax-img");
3231
+ if (innerImg) {
3232
+ import_gsap14.gsap.to(innerImg, {
3233
+ xPercent: 20,
3234
+ ease: "none",
3235
+ scrollTrigger: {
3236
+ trigger: item,
3237
+ containerAnimation: masterScroll,
3238
+ scrub: true
3239
+ }
3240
+ });
3241
+ }
3207
3242
  });
3208
3243
  }, sectionRef);
3209
3244
  return () => ctx.revert();
3210
- }, [images, waveIntensity, animationDuration, easing]);
3211
- const handleMouseEnter = (e) => {
3212
- import_gsap14.gsap.to(e.currentTarget, {
3213
- scale: 1.05,
3214
- zIndex: 10,
3215
- duration: 0.6,
3216
- ease: "expo.out"
3217
- });
3218
- const overlay = e.currentTarget.querySelector(".overlay");
3219
- import_gsap14.gsap.to(overlay, { opacity: 1, duration: 0.4 });
3220
- };
3221
- const handleMouseLeave = (e) => {
3222
- import_gsap14.gsap.to(e.currentTarget, {
3223
- scale: 1,
3224
- zIndex: 1,
3225
- duration: 0.6,
3226
- ease: "expo.out"
3227
- });
3228
- const overlay = e.currentTarget.querySelector(".overlay");
3229
- import_gsap14.gsap.to(overlay, { opacity: 0, duration: 0.4 });
3230
- };
3245
+ }, [images, activeVariant, intensity, animationDuration, easing]);
3231
3246
  const styles = {
3232
3247
  section: {
3233
3248
  position: "relative",
3234
3249
  width: "100%",
3235
3250
  height: "100vh",
3236
3251
  overflow: "hidden",
3237
- backgroundColor: "#050505",
3238
- display: "flex",
3239
- alignItems: "center"
3252
+ backgroundColor: "#050505"
3253
+ },
3254
+ gooeyOverlay: {
3255
+ position: "absolute",
3256
+ width: 0,
3257
+ height: 0
3240
3258
  },
3241
3259
  container: {
3242
3260
  display: "flex",
3243
- paddingLeft: "10vw",
3244
- paddingRight: "10vw",
3245
- gap: "50px",
3261
+ height: "100%",
3246
3262
  alignItems: "center",
3247
- willChange: "transform"
3263
+ paddingLeft: "15vw",
3264
+ paddingRight: "15vw",
3265
+ gap: activeVariant === "gooey" ? "-20px" : "60px",
3266
+ willChange: "transform",
3267
+ filter: activeVariant === "gooey" ? "url(#gooey-effect)" : "none"
3248
3268
  },
3249
- imageItem: {
3269
+ imageItem: (customWidth) => ({
3250
3270
  position: "relative",
3251
- flex: "0 0 45vh",
3252
- height: "60vh",
3253
- borderRadius: "24px",
3271
+ flex: `0 0 ${customWidth || itemWidth}`,
3272
+ height: itemHeight,
3273
+ borderRadius: activeVariant === "gooey" ? "100px" : "32px",
3254
3274
  overflow: "hidden",
3255
3275
  cursor: "pointer",
3256
3276
  backgroundColor: "#111",
3257
- willChange: "transform, skewX",
3258
- transformStyle: "preserve-3d"
3259
- },
3277
+ willChange: "transform, skewX, filter",
3278
+ transition: "border-radius 0.6s ease"
3279
+ }),
3260
3280
  image: {
3261
- width: "120%",
3262
- // Wider for parallax gap
3281
+ width: "140%",
3263
3282
  height: "100%",
3264
3283
  objectFit: "cover",
3265
- pointerEvents: "none",
3266
- transform: "translateX(0)"
3284
+ transform: "translateX(-15%)"
3267
3285
  },
3268
3286
  overlay: {
3269
3287
  position: "absolute",
3270
3288
  inset: 0,
3271
- background: "linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%)",
3289
+ background: "linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 70%)",
3272
3290
  opacity: 0,
3273
3291
  display: "flex",
3274
3292
  flexDirection: "column",
3275
3293
  justifyContent: "flex-end",
3276
- padding: "30px",
3294
+ padding: "40px",
3277
3295
  color: "#fff",
3278
3296
  zIndex: 2,
3279
- pointerEvents: "none"
3280
- },
3281
- title: {
3282
- fontSize: "24px",
3283
- fontWeight: "800",
3284
- marginBottom: "8px",
3285
- fontFamily: '"Inter", sans-serif',
3286
- textTransform: "uppercase",
3287
- letterSpacing: "2px"
3288
- },
3289
- subtitle: {
3290
- fontSize: "12px",
3291
- opacity: 0.6,
3292
- textTransform: "uppercase",
3293
- letterSpacing: "4px"
3297
+ pointerEvents: "none",
3298
+ transition: "opacity 0.4s ease"
3294
3299
  },
3295
- navIndicator: {
3300
+ controls: {
3296
3301
  position: "absolute",
3297
3302
  bottom: "10vh",
3298
3303
  left: "50%",
3299
3304
  transform: "translateX(-50%)",
3300
- color: "rgba(255,255,255,0.2)",
3301
- fontSize: "12px",
3305
+ display: "flex",
3306
+ gap: "12px",
3307
+ zIndex: 100,
3308
+ backgroundColor: "rgba(255,255,255,0.05)",
3309
+ padding: "6px",
3310
+ borderRadius: "100px",
3311
+ backdropFilter: "blur(10px)",
3312
+ border: "1px solid rgba(255,255,255,0.1)"
3313
+ },
3314
+ controlBtn: (active) => ({
3315
+ padding: "8px 20px",
3316
+ borderRadius: "100px",
3317
+ fontSize: "11px",
3318
+ fontWeight: "700",
3302
3319
  textTransform: "uppercase",
3303
- letterSpacing: "5px",
3304
- zIndex: 10
3305
- }
3320
+ letterSpacing: "1px",
3321
+ cursor: "pointer",
3322
+ border: "none",
3323
+ backgroundColor: active ? accentColor : "transparent",
3324
+ color: active ? "#fff" : "rgba(255,255,255,0.4)",
3325
+ transition: "all 0.3s ease"
3326
+ })
3306
3327
  };
3307
- return /* @__PURE__ */ import_react14.default.createElement("div", { ref: sectionRef, style: styles.section }, /* @__PURE__ */ import_react14.default.createElement("div", { style: styles.navIndicator }, "Scroll To Explore"), /* @__PURE__ */ import_react14.default.createElement("div", { ref: containerRef, style: styles.container }, images.map((img, i) => /* @__PURE__ */ import_react14.default.createElement(
3328
+ return /* @__PURE__ */ import_react14.default.createElement("div", { ref: sectionRef, style: styles.section }, /* @__PURE__ */ import_react14.default.createElement("svg", { style: styles.gooeyOverlay }, /* @__PURE__ */ import_react14.default.createElement("defs", null, /* @__PURE__ */ import_react14.default.createElement("filter", { id: "gooey-effect" }, /* @__PURE__ */ import_react14.default.createElement("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "15", result: "blur" }), /* @__PURE__ */ import_react14.default.createElement("feColorMatrix", { in: "blur", mode: "matrix", values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 30 -15", result: "goo" }), /* @__PURE__ */ import_react14.default.createElement("feComposite", { in: "SourceGraphic", in2: "goo", operator: "atop" })))), /* @__PURE__ */ import_react14.default.createElement("div", { style: styles.controls }, ["wave", "gooey", "zoom"].map((v) => /* @__PURE__ */ import_react14.default.createElement(
3329
+ "button",
3330
+ {
3331
+ key: v,
3332
+ style: styles.controlBtn(activeVariant === v),
3333
+ onClick: () => setActiveVariant(v)
3334
+ },
3335
+ v
3336
+ ))), /* @__PURE__ */ import_react14.default.createElement("div", { ref: containerRef, style: styles.container }, images.map((img, i) => /* @__PURE__ */ import_react14.default.createElement(
3308
3337
  "div",
3309
3338
  {
3310
3339
  key: img.id,
3311
3340
  ref: (el) => imageRefs.current[i] = el,
3312
- style: styles.imageItem,
3313
- onMouseEnter: handleMouseEnter,
3314
- onMouseLeave: handleMouseLeave,
3341
+ style: styles.imageItem(img.width),
3342
+ onMouseEnter: (e) => {
3343
+ import_gsap14.gsap.to(e.currentTarget, { scale: 1.05, duration: 0.6, ease: "expo.out" });
3344
+ e.currentTarget.querySelector(".overlay-ui").style.opacity = 1;
3345
+ },
3346
+ onMouseLeave: (e) => {
3347
+ import_gsap14.gsap.to(e.currentTarget, { scale: 1, duration: 0.6, ease: "expo.out" });
3348
+ e.currentTarget.querySelector(".overlay-ui").style.opacity = 0;
3349
+ },
3315
3350
  onClick: () => handleNavigate(img.path)
3316
3351
  },
3317
- /* @__PURE__ */ import_react14.default.createElement("div", { className: "overlay", style: styles.overlay }, /* @__PURE__ */ import_react14.default.createElement("span", { style: styles.subtitle }, "Gallery Item 0", i + 1), /* @__PURE__ */ import_react14.default.createElement("h3", { style: styles.title }, img.title), /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", color: accentColor } }, "View Project ", /* @__PURE__ */ import_react14.default.createElement(import_fi13.FiArrowRight, null))),
3318
- /* @__PURE__ */ import_react14.default.createElement("img", { src: img.src, alt: img.title, style: styles.image })
3352
+ /* @__PURE__ */ import_react14.default.createElement("div", { className: "overlay-ui", style: styles.overlay }, /* @__PURE__ */ import_react14.default.createElement("h3", { style: { fontSize: "24px", fontWeight: "900", margin: "0 0 8px 0" } }, img.title), /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", color: accentColor, fontWeight: "700" } }, "Discover ", /* @__PURE__ */ import_react14.default.createElement(import_fi13.FiArrowRight, null))),
3353
+ /* @__PURE__ */ import_react14.default.createElement("img", { src: img.src, alt: img.title, className: "parallax-img", style: styles.image })
3319
3354
  ))));
3320
3355
  };
3321
3356
 
@@ -3323,7 +3358,6 @@ var ImageEffectScrolling = ({
3323
3358
  var import_react15 = __toESM(require("react"));
3324
3359
  var import_gsap15 = require("gsap");
3325
3360
  var import_fi14 = require("react-icons/fi");
3326
- var import_hi = require("react-icons/hi");
3327
3361
  var Testimonials = ({
3328
3362
  items = [
3329
3363
  {
@@ -3524,7 +3558,21 @@ var Testimonials = ({
3524
3558
  onMouseEnter: (e) => handleCardHover(e, i),
3525
3559
  onMouseLeave: () => handleCardLeave(i)
3526
3560
  },
3527
- /* @__PURE__ */ import_react15.default.createElement("div", { className: "quote-icon", style: styles.quoteIcon }, /* @__PURE__ */ import_react15.default.createElement(import_hi.HiQuoteLeft, null)),
3561
+ /* @__PURE__ */ import_react15.default.createElement("div", { className: "quote-icon", style: styles.quoteIcon }, /* @__PURE__ */ import_react15.default.createElement(
3562
+ "svg",
3563
+ {
3564
+ width: "32",
3565
+ height: "32",
3566
+ viewBox: "0 0 24 24",
3567
+ fill: "none",
3568
+ stroke: "currentColor",
3569
+ strokeWidth: "2",
3570
+ strokeLinecap: "round",
3571
+ strokeLinejoin: "round"
3572
+ },
3573
+ /* @__PURE__ */ import_react15.default.createElement("path", { d: "M3 21c3 0 7-1 7-8V5c0-1.25-.75-2-2-2H4c-1.25 0-2 .75-2 2v3c0 1.25.75 2 2 2h3c0 4-4 6-4 6z" }),
3574
+ /* @__PURE__ */ import_react15.default.createElement("path", { d: "M15 21c3 0 7-1 7-8V5c0-1.25-.75-2-2-2h-4c-1.25 0-2 .75-2 2v3c0 1.25.75 2 2 2h3c0 4-4 6-4 6z" })
3575
+ )),
3528
3576
  /* @__PURE__ */ import_react15.default.createElement("div", { style: styles.stars }, [...Array(item.rating)].map((_, i2) => /* @__PURE__ */ import_react15.default.createElement(import_fi14.FiStar, { key: i2 }))),
3529
3577
  /* @__PURE__ */ import_react15.default.createElement("p", { style: styles.content }, '"', item.content, '"'),
3530
3578
  /* @__PURE__ */ import_react15.default.createElement("div", { style: styles.footer }, /* @__PURE__ */ import_react15.default.createElement("img", { src: item.avatar, alt: item.name, style: styles.avatar }), /* @__PURE__ */ import_react15.default.createElement("div", { style: styles.info }, /* @__PURE__ */ import_react15.default.createElement("span", { style: styles.name }, item.name), /* @__PURE__ */ import_react15.default.createElement("span", { style: styles.role }, item.role, " @ ", item.company)))
@@ -3763,9 +3811,168 @@ var Footer = ({
3763
3811
  link.label
3764
3812
  ))), /* @__PURE__ */ import_react16.default.createElement("div", { ref: (el) => columnRefs.current[2] = el }, /* @__PURE__ */ import_react16.default.createElement("div", { style: styles.colTitle }, "Support"), /* @__PURE__ */ import_react16.default.createElement("a", { href: "mailto:hello@aura-ui.com", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Help Center"), /* @__PURE__ */ import_react16.default.createElement("a", { href: "#", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Changelog"), /* @__PURE__ */ import_react16.default.createElement("a", { href: "#", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Terms"), /* @__PURE__ */ import_react16.default.createElement("a", { href: "#", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Privacy")), /* @__PURE__ */ import_react16.default.createElement("div", { ref: (el) => columnRefs.current[3] = el }, /* @__PURE__ */ import_react16.default.createElement("div", { style: styles.colTitle }, "Contact"), /* @__PURE__ */ import_react16.default.createElement("div", { style: { ...styles.link, display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ import_react16.default.createElement(import_fi15.FiMail, null), " hello@aura-ui.com"), /* @__PURE__ */ import_react16.default.createElement("div", { style: { ...styles.link, display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ import_react16.default.createElement(import_fi15.FiMapPin, null), " San Francisco, CA"))), /* @__PURE__ */ import_react16.default.createElement("div", { style: styles.bottom }, /* @__PURE__ */ import_react16.default.createElement("div", null, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", brandName, " UI Library. All rights reserved."), /* @__PURE__ */ import_react16.default.createElement("div", { style: { display: "flex", gap: "20px" } }, /* @__PURE__ */ import_react16.default.createElement("span", null, "Version 1.2.0"), /* @__PURE__ */ import_react16.default.createElement("span", null, "Open Source"))));
3765
3813
  };
3814
+
3815
+ // src/components/Canvas/Canvas.jsx
3816
+ var import_react17 = __toESM(require("react"));
3817
+ var import_gsap17 = require("gsap");
3818
+ var Canvas = ({
3819
+ particleCount = 120,
3820
+ lineColor = "rgba(99, 102, 241, 0.2)",
3821
+ particleColor = "rgba(99, 102, 241, 0.8)",
3822
+ speed = 0.5,
3823
+ interactive = true,
3824
+ parallaxIntensity = 0.05,
3825
+ connectionDistance = 150,
3826
+ animationDuration = 2,
3827
+ easing = "power4.out"
3828
+ }) => {
3829
+ const canvasRef = (0, import_react17.useRef)(null);
3830
+ const containerRef = (0, import_react17.useRef)(null);
3831
+ const mouseRef = (0, import_react17.useRef)({ x: 0, y: 0, active: false });
3832
+ (0, import_react17.useEffect)(() => {
3833
+ const canvas = canvasRef.current;
3834
+ const ctx = canvas.getContext("2d");
3835
+ let animationFrameId;
3836
+ let particles = [];
3837
+ const resize = () => {
3838
+ canvas.width = window.innerWidth;
3839
+ canvas.height = window.innerHeight;
3840
+ };
3841
+ class Particle {
3842
+ constructor() {
3843
+ this.reset();
3844
+ }
3845
+ reset() {
3846
+ this.x = (Math.random() - 0.5) * canvas.width * 2;
3847
+ this.y = (Math.random() - 0.5) * canvas.height * 2;
3848
+ this.z = Math.random() * canvas.width;
3849
+ this.vx = (Math.random() - 0.5) * speed;
3850
+ this.vy = (Math.random() - 0.5) * speed;
3851
+ this.vz = (Math.random() - 0.5) * speed;
3852
+ this.size = 1.5;
3853
+ }
3854
+ update() {
3855
+ this.x += this.vx;
3856
+ this.y += this.vy;
3857
+ this.z += this.vz;
3858
+ if (mouseRef.current.active) {
3859
+ const dx = mouseRef.current.x - canvas.width / 2 - this.x;
3860
+ const dy = mouseRef.current.y - canvas.height / 2 - this.y;
3861
+ const dist = Math.sqrt(dx * dx + dy * dy);
3862
+ if (dist < 300) {
3863
+ this.x += dx * 0.01;
3864
+ this.y += dy * 0.01;
3865
+ }
3866
+ }
3867
+ if (this.z <= 0) this.z = canvas.width;
3868
+ if (this.z > canvas.width) this.z = 0;
3869
+ this.focalLength = canvas.width * 0.8;
3870
+ this.scale = this.focalLength / (this.focalLength + this.z);
3871
+ this.px = this.x * this.scale + canvas.width / 2;
3872
+ this.py = this.y * this.scale + canvas.height / 2;
3873
+ }
3874
+ draw() {
3875
+ ctx.beginPath();
3876
+ ctx.arc(this.px, this.py, this.size * this.scale, 0, Math.PI * 2);
3877
+ ctx.fillStyle = particleColor;
3878
+ ctx.fill();
3879
+ }
3880
+ }
3881
+ const init = () => {
3882
+ particles = Array.from({ length: particleCount }, () => new Particle());
3883
+ };
3884
+ const drawLines = () => {
3885
+ ctx.lineWidth = 0.5;
3886
+ ctx.strokeStyle = lineColor;
3887
+ for (let i = 0; i < particles.length; i++) {
3888
+ for (let j = i + 1; j < particles.length; j++) {
3889
+ const dx = particles[i].px - particles[j].px;
3890
+ const dy = particles[i].py - particles[j].py;
3891
+ const dist = Math.sqrt(dx * dx + dy * dy);
3892
+ if (dist < connectionDistance) {
3893
+ ctx.beginPath();
3894
+ ctx.moveTo(particles[i].px, particles[i].py);
3895
+ ctx.lineTo(particles[j].px, particles[j].py);
3896
+ ctx.stroke();
3897
+ }
3898
+ }
3899
+ }
3900
+ };
3901
+ const render = () => {
3902
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
3903
+ if (interactive) {
3904
+ const mx = (mouseRef.current.x - window.innerWidth / 2) * parallaxIntensity;
3905
+ const my = (mouseRef.current.y - window.innerHeight / 2) * parallaxIntensity;
3906
+ import_gsap17.gsap.to(canvas, { x: mx, y: my, duration: 1, ease: "power2.out" });
3907
+ }
3908
+ particles.forEach((p) => {
3909
+ p.update();
3910
+ p.draw();
3911
+ });
3912
+ drawLines();
3913
+ animationFrameId = requestAnimationFrame(render);
3914
+ };
3915
+ resize();
3916
+ init();
3917
+ render();
3918
+ window.addEventListener("resize", resize);
3919
+ import_gsap17.gsap.fromTo(
3920
+ containerRef.current,
3921
+ { opacity: 0, scale: 1.1 },
3922
+ { opacity: 1, scale: 1, duration: animationDuration, ease: easing }
3923
+ );
3924
+ return () => {
3925
+ cancelAnimationFrame(animationFrameId);
3926
+ window.removeEventListener("resize", resize);
3927
+ };
3928
+ }, [particleCount, speed, particleColor, lineColor, connectionDistance, interactive, parallaxIntensity, animationDuration, easing]);
3929
+ const handleMouseMove = (e) => {
3930
+ mouseRef.current = { x: e.clientX, y: e.clientY, active: true };
3931
+ };
3932
+ const handleMouseLeave = () => {
3933
+ mouseRef.current.active = false;
3934
+ };
3935
+ const styles = {
3936
+ container: {
3937
+ position: "fixed",
3938
+ top: 0,
3939
+ left: 0,
3940
+ width: "100%",
3941
+ height: "100%",
3942
+ zIndex: -1,
3943
+ backgroundColor: "#050505",
3944
+ overflow: "hidden",
3945
+ pointerEvents: "none",
3946
+ willChange: "transform, opacity"
3947
+ },
3948
+ canvas: {
3949
+ display: "block",
3950
+ width: "100%",
3951
+ height: "100%"
3952
+ },
3953
+ overlay: {
3954
+ position: "absolute",
3955
+ inset: 0,
3956
+ background: "radial-gradient(circle at center, transparent 0%, rgba(5,5,5,0.4) 100%)",
3957
+ pointerEvents: "none"
3958
+ }
3959
+ };
3960
+ return /* @__PURE__ */ import_react17.default.createElement(
3961
+ "div",
3962
+ {
3963
+ ref: containerRef,
3964
+ style: styles.container,
3965
+ onMouseMove: handleMouseMove,
3966
+ onMouseLeave: handleMouseLeave
3967
+ },
3968
+ /* @__PURE__ */ import_react17.default.createElement("canvas", { ref: canvasRef, style: styles.canvas }),
3969
+ /* @__PURE__ */ import_react17.default.createElement("div", { style: styles.overlay })
3970
+ );
3971
+ };
3766
3972
  // Annotate the CommonJS export names for ESM import in node:
3767
3973
  0 && (module.exports = {
3768
3974
  Button,
3975
+ Canvas,
3769
3976
  Carousel,
3770
3977
  Footer,
3771
3978
  Grid,
package/dist/index.mjs CHANGED
@@ -3107,24 +3107,26 @@ import { FiArrowRight as FiArrowRight5, FiMaximize2 as FiMaximize22, FiImage, Fi
3107
3107
  gsap14.registerPlugin(ScrollTrigger);
3108
3108
  var ImageEffectScrolling = ({
3109
3109
  images = [
3110
- { id: 1, src: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&q=80&w=800", title: "Aether Flow" },
3111
- { id: 2, src: "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?auto=format&fit=crop&q=80&w=800", title: "Neural Nexus" },
3112
- { id: 3, src: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?auto=format&fit=crop&q=80&w=800", title: "Neon Gradients" },
3113
- { id: 4, src: "https://images.unsplash.com/photo-1550684848-fac1c5b4e853?auto=format&fit=crop&q=80&w=800", title: "Geometry Labs" },
3114
- { id: 5, src: "https://images.unsplash.com/photo-1614850523296-d8c1af93d400?auto=format&fit=crop&q=80&w=800", title: "Liquid Void" },
3115
- { id: 6, src: "https://images.unsplash.com/photo-1634017839464-5c339ebe3cb4?auto=format&fit=crop&q=80&w=800", title: "Digital Ether" }
3110
+ { id: 1, src: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?auto=format&fit=crop&q=80&w=800", title: "Aether Flow", width: "45vh" },
3111
+ { id: 2, src: "https://images.unsplash.com/photo-1635070041078-e363dbe005cb?auto=format&fit=crop&q=80&w=800", title: "Neural Nexus", width: "35vh" },
3112
+ { id: 3, src: "https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?auto=format&fit=crop&q=80&w=800", title: "Neon Gradients", width: "55vh" },
3113
+ { id: 4, src: "https://images.unsplash.com/photo-1550684848-fac1c5b4e853?auto=format&fit=crop&q=80&w=800", title: "Geometry Labs", width: "40vh" },
3114
+ { id: 5, src: "https://images.unsplash.com/photo-1614850523296-d8c1af93d400?auto=format&fit=crop&q=80&w=800", title: "Liquid Void", width: "50vh" }
3116
3115
  ],
3116
+ variant = "wave",
3117
+ // "wave", "gooey", "zoom"
3118
+ intensity = 1,
3117
3119
  accentColor = "#6366f1",
3118
3120
  textColor = "#ffffff",
3119
- waveIntensity = 15,
3120
- scrollSpeed = 1,
3121
- animationDuration = 1.5,
3121
+ itemWidth = "45vh",
3122
+ itemHeight = "60vh",
3123
+ animationDuration = 1.4,
3122
3124
  easing = "power4.out"
3123
3125
  }) => {
3124
3126
  const sectionRef = useRef14(null);
3125
3127
  const containerRef = useRef14(null);
3126
3128
  const imageRefs = useRef14([]);
3127
- const contentRef = useRef14(null);
3129
+ const [activeVariant, setActiveVariant] = useState9(variant);
3128
3130
  const inRouter = useInRouterContext12();
3129
3131
  const navigate = inRouter ? useNavigate12() : null;
3130
3132
  const handleNavigate = (path) => {
@@ -3137,7 +3139,7 @@ var ImageEffectScrolling = ({
3137
3139
  const ctx = gsap14.context(() => {
3138
3140
  const sections = imageRefs.current;
3139
3141
  const totalWidth = containerRef.current.scrollWidth;
3140
- gsap14.to(containerRef.current, {
3142
+ const masterScroll = gsap14.to(containerRef.current, {
3141
3143
  x: () => -(totalWidth - window.innerWidth),
3142
3144
  ease: "none",
3143
3145
  scrollTrigger: {
@@ -3146,158 +3148,190 @@ var ImageEffectScrolling = ({
3146
3148
  scrub: 1,
3147
3149
  start: "top top",
3148
3150
  end: () => `+=${totalWidth}`,
3149
- anticipatePin: 1,
3151
+ invalidateOnRefresh: true,
3150
3152
  onUpdate: (self) => {
3151
- const velocity = self.getVelocity();
3152
- const skew = velocity / 500 * waveIntensity;
3153
- sections.forEach((img) => {
3154
- gsap14.to(img, {
3155
- skewX: skew,
3156
- duration: 0.5,
3157
- ease: "power2.out",
3158
- overwrite: "auto"
3153
+ if (activeVariant === "wave") {
3154
+ const velocity = self.getVelocity();
3155
+ const skew = velocity / 500 * 15 * intensity;
3156
+ sections.forEach((img) => {
3157
+ gsap14.to(img, { skewX: skew, duration: 0.6, ease: "power2.out", overwrite: "auto" });
3159
3158
  });
3160
- });
3159
+ }
3161
3160
  }
3162
3161
  }
3163
3162
  });
3164
- gsap14.fromTo(
3165
- imageRefs.current,
3166
- { opacity: 0, y: 100, scale: 0.8 },
3167
- {
3168
- opacity: 1,
3169
- y: 0,
3170
- scale: 1,
3171
- stagger: 0.1,
3172
- duration: animationDuration,
3173
- ease: easing
3174
- }
3175
- );
3176
- sections.forEach((img) => {
3177
- const innerImg = img.querySelector("img");
3178
- gsap14.to(innerImg, {
3179
- x: -100,
3163
+ if (activeVariant === "zoom") {
3164
+ sections.forEach((img) => {
3165
+ gsap14.fromTo(
3166
+ img,
3167
+ { scale: 0.8, filter: "brightness(0.4) grayscale(1)" },
3168
+ {
3169
+ scale: 1.1,
3170
+ filter: "brightness(1) grayscale(0)",
3171
+ scrollTrigger: {
3172
+ trigger: img,
3173
+ containerAnimation: masterScroll,
3174
+ start: "left center",
3175
+ end: "center center",
3176
+ scrub: true
3177
+ }
3178
+ }
3179
+ );
3180
+ gsap14.to(img, {
3181
+ scale: 0.8,
3182
+ filter: "brightness(0.4) grayscale(1)",
3183
+ scrollTrigger: {
3184
+ trigger: img,
3185
+ containerAnimation: masterScroll,
3186
+ start: "center center",
3187
+ end: "right center",
3188
+ scrub: true
3189
+ }
3190
+ });
3191
+ });
3192
+ }
3193
+ if (activeVariant === "gooey") {
3194
+ gsap14.to(sections, {
3195
+ xPercent: (i) => i % 2 === 0 ? 10 : -10,
3180
3196
  ease: "none",
3181
3197
  scrollTrigger: {
3182
- trigger: img,
3183
- containerAnimation: gsap14.getProperty(containerRef.current, "gsap"),
3184
- // This is tricky for scrub
3185
- scrub: true,
3186
- horizontal: true
3198
+ trigger: sectionRef.current,
3199
+ start: "top top",
3200
+ end: "bottom top",
3201
+ scrub: 1
3187
3202
  }
3188
3203
  });
3204
+ }
3205
+ gsap14.fromTo(
3206
+ sections,
3207
+ { opacity: 0, y: 100, scale: 0.9 },
3208
+ { opacity: 1, y: 0, scale: 1, stagger: 0.1, duration: animationDuration, ease: easing }
3209
+ );
3210
+ sections.forEach((item) => {
3211
+ const innerImg = item.querySelector(".parallax-img");
3212
+ if (innerImg) {
3213
+ gsap14.to(innerImg, {
3214
+ xPercent: 20,
3215
+ ease: "none",
3216
+ scrollTrigger: {
3217
+ trigger: item,
3218
+ containerAnimation: masterScroll,
3219
+ scrub: true
3220
+ }
3221
+ });
3222
+ }
3189
3223
  });
3190
3224
  }, sectionRef);
3191
3225
  return () => ctx.revert();
3192
- }, [images, waveIntensity, animationDuration, easing]);
3193
- const handleMouseEnter = (e) => {
3194
- gsap14.to(e.currentTarget, {
3195
- scale: 1.05,
3196
- zIndex: 10,
3197
- duration: 0.6,
3198
- ease: "expo.out"
3199
- });
3200
- const overlay = e.currentTarget.querySelector(".overlay");
3201
- gsap14.to(overlay, { opacity: 1, duration: 0.4 });
3202
- };
3203
- const handleMouseLeave = (e) => {
3204
- gsap14.to(e.currentTarget, {
3205
- scale: 1,
3206
- zIndex: 1,
3207
- duration: 0.6,
3208
- ease: "expo.out"
3209
- });
3210
- const overlay = e.currentTarget.querySelector(".overlay");
3211
- gsap14.to(overlay, { opacity: 0, duration: 0.4 });
3212
- };
3226
+ }, [images, activeVariant, intensity, animationDuration, easing]);
3213
3227
  const styles = {
3214
3228
  section: {
3215
3229
  position: "relative",
3216
3230
  width: "100%",
3217
3231
  height: "100vh",
3218
3232
  overflow: "hidden",
3219
- backgroundColor: "#050505",
3220
- display: "flex",
3221
- alignItems: "center"
3233
+ backgroundColor: "#050505"
3234
+ },
3235
+ gooeyOverlay: {
3236
+ position: "absolute",
3237
+ width: 0,
3238
+ height: 0
3222
3239
  },
3223
3240
  container: {
3224
3241
  display: "flex",
3225
- paddingLeft: "10vw",
3226
- paddingRight: "10vw",
3227
- gap: "50px",
3242
+ height: "100%",
3228
3243
  alignItems: "center",
3229
- willChange: "transform"
3244
+ paddingLeft: "15vw",
3245
+ paddingRight: "15vw",
3246
+ gap: activeVariant === "gooey" ? "-20px" : "60px",
3247
+ willChange: "transform",
3248
+ filter: activeVariant === "gooey" ? "url(#gooey-effect)" : "none"
3230
3249
  },
3231
- imageItem: {
3250
+ imageItem: (customWidth) => ({
3232
3251
  position: "relative",
3233
- flex: "0 0 45vh",
3234
- height: "60vh",
3235
- borderRadius: "24px",
3252
+ flex: `0 0 ${customWidth || itemWidth}`,
3253
+ height: itemHeight,
3254
+ borderRadius: activeVariant === "gooey" ? "100px" : "32px",
3236
3255
  overflow: "hidden",
3237
3256
  cursor: "pointer",
3238
3257
  backgroundColor: "#111",
3239
- willChange: "transform, skewX",
3240
- transformStyle: "preserve-3d"
3241
- },
3258
+ willChange: "transform, skewX, filter",
3259
+ transition: "border-radius 0.6s ease"
3260
+ }),
3242
3261
  image: {
3243
- width: "120%",
3244
- // Wider for parallax gap
3262
+ width: "140%",
3245
3263
  height: "100%",
3246
3264
  objectFit: "cover",
3247
- pointerEvents: "none",
3248
- transform: "translateX(0)"
3265
+ transform: "translateX(-15%)"
3249
3266
  },
3250
3267
  overlay: {
3251
3268
  position: "absolute",
3252
3269
  inset: 0,
3253
- background: "linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%)",
3270
+ background: "linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 70%)",
3254
3271
  opacity: 0,
3255
3272
  display: "flex",
3256
3273
  flexDirection: "column",
3257
3274
  justifyContent: "flex-end",
3258
- padding: "30px",
3275
+ padding: "40px",
3259
3276
  color: "#fff",
3260
3277
  zIndex: 2,
3261
- pointerEvents: "none"
3262
- },
3263
- title: {
3264
- fontSize: "24px",
3265
- fontWeight: "800",
3266
- marginBottom: "8px",
3267
- fontFamily: '"Inter", sans-serif',
3268
- textTransform: "uppercase",
3269
- letterSpacing: "2px"
3270
- },
3271
- subtitle: {
3272
- fontSize: "12px",
3273
- opacity: 0.6,
3274
- textTransform: "uppercase",
3275
- letterSpacing: "4px"
3278
+ pointerEvents: "none",
3279
+ transition: "opacity 0.4s ease"
3276
3280
  },
3277
- navIndicator: {
3281
+ controls: {
3278
3282
  position: "absolute",
3279
3283
  bottom: "10vh",
3280
3284
  left: "50%",
3281
3285
  transform: "translateX(-50%)",
3282
- color: "rgba(255,255,255,0.2)",
3283
- fontSize: "12px",
3286
+ display: "flex",
3287
+ gap: "12px",
3288
+ zIndex: 100,
3289
+ backgroundColor: "rgba(255,255,255,0.05)",
3290
+ padding: "6px",
3291
+ borderRadius: "100px",
3292
+ backdropFilter: "blur(10px)",
3293
+ border: "1px solid rgba(255,255,255,0.1)"
3294
+ },
3295
+ controlBtn: (active) => ({
3296
+ padding: "8px 20px",
3297
+ borderRadius: "100px",
3298
+ fontSize: "11px",
3299
+ fontWeight: "700",
3284
3300
  textTransform: "uppercase",
3285
- letterSpacing: "5px",
3286
- zIndex: 10
3287
- }
3301
+ letterSpacing: "1px",
3302
+ cursor: "pointer",
3303
+ border: "none",
3304
+ backgroundColor: active ? accentColor : "transparent",
3305
+ color: active ? "#fff" : "rgba(255,255,255,0.4)",
3306
+ transition: "all 0.3s ease"
3307
+ })
3288
3308
  };
3289
- return /* @__PURE__ */ React14.createElement("div", { ref: sectionRef, style: styles.section }, /* @__PURE__ */ React14.createElement("div", { style: styles.navIndicator }, "Scroll To Explore"), /* @__PURE__ */ React14.createElement("div", { ref: containerRef, style: styles.container }, images.map((img, i) => /* @__PURE__ */ React14.createElement(
3309
+ return /* @__PURE__ */ React14.createElement("div", { ref: sectionRef, style: styles.section }, /* @__PURE__ */ React14.createElement("svg", { style: styles.gooeyOverlay }, /* @__PURE__ */ React14.createElement("defs", null, /* @__PURE__ */ React14.createElement("filter", { id: "gooey-effect" }, /* @__PURE__ */ React14.createElement("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "15", result: "blur" }), /* @__PURE__ */ React14.createElement("feColorMatrix", { in: "blur", mode: "matrix", values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 30 -15", result: "goo" }), /* @__PURE__ */ React14.createElement("feComposite", { in: "SourceGraphic", in2: "goo", operator: "atop" })))), /* @__PURE__ */ React14.createElement("div", { style: styles.controls }, ["wave", "gooey", "zoom"].map((v) => /* @__PURE__ */ React14.createElement(
3310
+ "button",
3311
+ {
3312
+ key: v,
3313
+ style: styles.controlBtn(activeVariant === v),
3314
+ onClick: () => setActiveVariant(v)
3315
+ },
3316
+ v
3317
+ ))), /* @__PURE__ */ React14.createElement("div", { ref: containerRef, style: styles.container }, images.map((img, i) => /* @__PURE__ */ React14.createElement(
3290
3318
  "div",
3291
3319
  {
3292
3320
  key: img.id,
3293
3321
  ref: (el) => imageRefs.current[i] = el,
3294
- style: styles.imageItem,
3295
- onMouseEnter: handleMouseEnter,
3296
- onMouseLeave: handleMouseLeave,
3322
+ style: styles.imageItem(img.width),
3323
+ onMouseEnter: (e) => {
3324
+ gsap14.to(e.currentTarget, { scale: 1.05, duration: 0.6, ease: "expo.out" });
3325
+ e.currentTarget.querySelector(".overlay-ui").style.opacity = 1;
3326
+ },
3327
+ onMouseLeave: (e) => {
3328
+ gsap14.to(e.currentTarget, { scale: 1, duration: 0.6, ease: "expo.out" });
3329
+ e.currentTarget.querySelector(".overlay-ui").style.opacity = 0;
3330
+ },
3297
3331
  onClick: () => handleNavigate(img.path)
3298
3332
  },
3299
- /* @__PURE__ */ React14.createElement("div", { className: "overlay", style: styles.overlay }, /* @__PURE__ */ React14.createElement("span", { style: styles.subtitle }, "Gallery Item 0", i + 1), /* @__PURE__ */ React14.createElement("h3", { style: styles.title }, img.title), /* @__PURE__ */ React14.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", color: accentColor } }, "View Project ", /* @__PURE__ */ React14.createElement(FiArrowRight5, null))),
3300
- /* @__PURE__ */ React14.createElement("img", { src: img.src, alt: img.title, style: styles.image })
3333
+ /* @__PURE__ */ React14.createElement("div", { className: "overlay-ui", style: styles.overlay }, /* @__PURE__ */ React14.createElement("h3", { style: { fontSize: "24px", fontWeight: "900", margin: "0 0 8px 0" } }, img.title), /* @__PURE__ */ React14.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", color: accentColor, fontWeight: "700" } }, "Discover ", /* @__PURE__ */ React14.createElement(FiArrowRight5, null))),
3334
+ /* @__PURE__ */ React14.createElement("img", { src: img.src, alt: img.title, className: "parallax-img", style: styles.image })
3301
3335
  ))));
3302
3336
  };
3303
3337
 
@@ -3305,7 +3339,6 @@ var ImageEffectScrolling = ({
3305
3339
  import React15, { useRef as useRef15, useEffect as useEffect15 } from "react";
3306
3340
  import { gsap as gsap15 } from "gsap";
3307
3341
  import { FiStar as FiStar2, FiArrowRight as FiArrowRight6, FiCheck } from "react-icons/fi";
3308
- import { HiQuoteLeft } from "react-icons/hi";
3309
3342
  var Testimonials = ({
3310
3343
  items = [
3311
3344
  {
@@ -3506,7 +3539,21 @@ var Testimonials = ({
3506
3539
  onMouseEnter: (e) => handleCardHover(e, i),
3507
3540
  onMouseLeave: () => handleCardLeave(i)
3508
3541
  },
3509
- /* @__PURE__ */ React15.createElement("div", { className: "quote-icon", style: styles.quoteIcon }, /* @__PURE__ */ React15.createElement(HiQuoteLeft, null)),
3542
+ /* @__PURE__ */ React15.createElement("div", { className: "quote-icon", style: styles.quoteIcon }, /* @__PURE__ */ React15.createElement(
3543
+ "svg",
3544
+ {
3545
+ width: "32",
3546
+ height: "32",
3547
+ viewBox: "0 0 24 24",
3548
+ fill: "none",
3549
+ stroke: "currentColor",
3550
+ strokeWidth: "2",
3551
+ strokeLinecap: "round",
3552
+ strokeLinejoin: "round"
3553
+ },
3554
+ /* @__PURE__ */ React15.createElement("path", { d: "M3 21c3 0 7-1 7-8V5c0-1.25-.75-2-2-2H4c-1.25 0-2 .75-2 2v3c0 1.25.75 2 2 2h3c0 4-4 6-4 6z" }),
3555
+ /* @__PURE__ */ React15.createElement("path", { d: "M15 21c3 0 7-1 7-8V5c0-1.25-.75-2-2-2h-4c-1.25 0-2 .75-2 2v3c0 1.25.75 2 2 2h3c0 4-4 6-4 6z" })
3556
+ )),
3510
3557
  /* @__PURE__ */ React15.createElement("div", { style: styles.stars }, [...Array(item.rating)].map((_, i2) => /* @__PURE__ */ React15.createElement(FiStar2, { key: i2 }))),
3511
3558
  /* @__PURE__ */ React15.createElement("p", { style: styles.content }, '"', item.content, '"'),
3512
3559
  /* @__PURE__ */ React15.createElement("div", { style: styles.footer }, /* @__PURE__ */ React15.createElement("img", { src: item.avatar, alt: item.name, style: styles.avatar }), /* @__PURE__ */ React15.createElement("div", { style: styles.info }, /* @__PURE__ */ React15.createElement("span", { style: styles.name }, item.name), /* @__PURE__ */ React15.createElement("span", { style: styles.role }, item.role, " @ ", item.company)))
@@ -3753,8 +3800,167 @@ var Footer = ({
3753
3800
  link.label
3754
3801
  ))), /* @__PURE__ */ React16.createElement("div", { ref: (el) => columnRefs.current[2] = el }, /* @__PURE__ */ React16.createElement("div", { style: styles.colTitle }, "Support"), /* @__PURE__ */ React16.createElement("a", { href: "mailto:hello@aura-ui.com", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Help Center"), /* @__PURE__ */ React16.createElement("a", { href: "#", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Changelog"), /* @__PURE__ */ React16.createElement("a", { href: "#", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Terms"), /* @__PURE__ */ React16.createElement("a", { href: "#", style: styles.link, onMouseEnter: (e) => e.currentTarget.style.opacity = 1, onMouseLeave: (e) => e.currentTarget.style.opacity = 0.5 }, "Privacy")), /* @__PURE__ */ React16.createElement("div", { ref: (el) => columnRefs.current[3] = el }, /* @__PURE__ */ React16.createElement("div", { style: styles.colTitle }, "Contact"), /* @__PURE__ */ React16.createElement("div", { style: { ...styles.link, display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ React16.createElement(FiMail, null), " hello@aura-ui.com"), /* @__PURE__ */ React16.createElement("div", { style: { ...styles.link, display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ React16.createElement(FiMapPin, null), " San Francisco, CA"))), /* @__PURE__ */ React16.createElement("div", { style: styles.bottom }, /* @__PURE__ */ React16.createElement("div", null, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", brandName, " UI Library. All rights reserved."), /* @__PURE__ */ React16.createElement("div", { style: { display: "flex", gap: "20px" } }, /* @__PURE__ */ React16.createElement("span", null, "Version 1.2.0"), /* @__PURE__ */ React16.createElement("span", null, "Open Source"))));
3755
3802
  };
3803
+
3804
+ // src/components/Canvas/Canvas.jsx
3805
+ import React17, { useRef as useRef17, useEffect as useEffect17, useMemo as useMemo2 } from "react";
3806
+ import { gsap as gsap17 } from "gsap";
3807
+ var Canvas = ({
3808
+ particleCount = 120,
3809
+ lineColor = "rgba(99, 102, 241, 0.2)",
3810
+ particleColor = "rgba(99, 102, 241, 0.8)",
3811
+ speed = 0.5,
3812
+ interactive = true,
3813
+ parallaxIntensity = 0.05,
3814
+ connectionDistance = 150,
3815
+ animationDuration = 2,
3816
+ easing = "power4.out"
3817
+ }) => {
3818
+ const canvasRef = useRef17(null);
3819
+ const containerRef = useRef17(null);
3820
+ const mouseRef = useRef17({ x: 0, y: 0, active: false });
3821
+ useEffect17(() => {
3822
+ const canvas = canvasRef.current;
3823
+ const ctx = canvas.getContext("2d");
3824
+ let animationFrameId;
3825
+ let particles = [];
3826
+ const resize = () => {
3827
+ canvas.width = window.innerWidth;
3828
+ canvas.height = window.innerHeight;
3829
+ };
3830
+ class Particle {
3831
+ constructor() {
3832
+ this.reset();
3833
+ }
3834
+ reset() {
3835
+ this.x = (Math.random() - 0.5) * canvas.width * 2;
3836
+ this.y = (Math.random() - 0.5) * canvas.height * 2;
3837
+ this.z = Math.random() * canvas.width;
3838
+ this.vx = (Math.random() - 0.5) * speed;
3839
+ this.vy = (Math.random() - 0.5) * speed;
3840
+ this.vz = (Math.random() - 0.5) * speed;
3841
+ this.size = 1.5;
3842
+ }
3843
+ update() {
3844
+ this.x += this.vx;
3845
+ this.y += this.vy;
3846
+ this.z += this.vz;
3847
+ if (mouseRef.current.active) {
3848
+ const dx = mouseRef.current.x - canvas.width / 2 - this.x;
3849
+ const dy = mouseRef.current.y - canvas.height / 2 - this.y;
3850
+ const dist = Math.sqrt(dx * dx + dy * dy);
3851
+ if (dist < 300) {
3852
+ this.x += dx * 0.01;
3853
+ this.y += dy * 0.01;
3854
+ }
3855
+ }
3856
+ if (this.z <= 0) this.z = canvas.width;
3857
+ if (this.z > canvas.width) this.z = 0;
3858
+ this.focalLength = canvas.width * 0.8;
3859
+ this.scale = this.focalLength / (this.focalLength + this.z);
3860
+ this.px = this.x * this.scale + canvas.width / 2;
3861
+ this.py = this.y * this.scale + canvas.height / 2;
3862
+ }
3863
+ draw() {
3864
+ ctx.beginPath();
3865
+ ctx.arc(this.px, this.py, this.size * this.scale, 0, Math.PI * 2);
3866
+ ctx.fillStyle = particleColor;
3867
+ ctx.fill();
3868
+ }
3869
+ }
3870
+ const init = () => {
3871
+ particles = Array.from({ length: particleCount }, () => new Particle());
3872
+ };
3873
+ const drawLines = () => {
3874
+ ctx.lineWidth = 0.5;
3875
+ ctx.strokeStyle = lineColor;
3876
+ for (let i = 0; i < particles.length; i++) {
3877
+ for (let j = i + 1; j < particles.length; j++) {
3878
+ const dx = particles[i].px - particles[j].px;
3879
+ const dy = particles[i].py - particles[j].py;
3880
+ const dist = Math.sqrt(dx * dx + dy * dy);
3881
+ if (dist < connectionDistance) {
3882
+ ctx.beginPath();
3883
+ ctx.moveTo(particles[i].px, particles[i].py);
3884
+ ctx.lineTo(particles[j].px, particles[j].py);
3885
+ ctx.stroke();
3886
+ }
3887
+ }
3888
+ }
3889
+ };
3890
+ const render = () => {
3891
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
3892
+ if (interactive) {
3893
+ const mx = (mouseRef.current.x - window.innerWidth / 2) * parallaxIntensity;
3894
+ const my = (mouseRef.current.y - window.innerHeight / 2) * parallaxIntensity;
3895
+ gsap17.to(canvas, { x: mx, y: my, duration: 1, ease: "power2.out" });
3896
+ }
3897
+ particles.forEach((p) => {
3898
+ p.update();
3899
+ p.draw();
3900
+ });
3901
+ drawLines();
3902
+ animationFrameId = requestAnimationFrame(render);
3903
+ };
3904
+ resize();
3905
+ init();
3906
+ render();
3907
+ window.addEventListener("resize", resize);
3908
+ gsap17.fromTo(
3909
+ containerRef.current,
3910
+ { opacity: 0, scale: 1.1 },
3911
+ { opacity: 1, scale: 1, duration: animationDuration, ease: easing }
3912
+ );
3913
+ return () => {
3914
+ cancelAnimationFrame(animationFrameId);
3915
+ window.removeEventListener("resize", resize);
3916
+ };
3917
+ }, [particleCount, speed, particleColor, lineColor, connectionDistance, interactive, parallaxIntensity, animationDuration, easing]);
3918
+ const handleMouseMove = (e) => {
3919
+ mouseRef.current = { x: e.clientX, y: e.clientY, active: true };
3920
+ };
3921
+ const handleMouseLeave = () => {
3922
+ mouseRef.current.active = false;
3923
+ };
3924
+ const styles = {
3925
+ container: {
3926
+ position: "fixed",
3927
+ top: 0,
3928
+ left: 0,
3929
+ width: "100%",
3930
+ height: "100%",
3931
+ zIndex: -1,
3932
+ backgroundColor: "#050505",
3933
+ overflow: "hidden",
3934
+ pointerEvents: "none",
3935
+ willChange: "transform, opacity"
3936
+ },
3937
+ canvas: {
3938
+ display: "block",
3939
+ width: "100%",
3940
+ height: "100%"
3941
+ },
3942
+ overlay: {
3943
+ position: "absolute",
3944
+ inset: 0,
3945
+ background: "radial-gradient(circle at center, transparent 0%, rgba(5,5,5,0.4) 100%)",
3946
+ pointerEvents: "none"
3947
+ }
3948
+ };
3949
+ return /* @__PURE__ */ React17.createElement(
3950
+ "div",
3951
+ {
3952
+ ref: containerRef,
3953
+ style: styles.container,
3954
+ onMouseMove: handleMouseMove,
3955
+ onMouseLeave: handleMouseLeave
3956
+ },
3957
+ /* @__PURE__ */ React17.createElement("canvas", { ref: canvasRef, style: styles.canvas }),
3958
+ /* @__PURE__ */ React17.createElement("div", { style: styles.overlay })
3959
+ );
3960
+ };
3756
3961
  export {
3757
3962
  Button,
3963
+ Canvas,
3758
3964
  Carousel,
3759
3965
  Footer,
3760
3966
  Grid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aura-ui-library",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "A modern and customizable UI library for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",