@t7blocks/ui 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -18,6 +18,12 @@ interface DotlaunchbuttonProps {
18
18
  }
19
19
  declare function Dotlaunchbutton({ label, onClick, className, accentColor, btnColor, animationSpeed, }: DotlaunchbuttonProps): react_jsx_runtime.JSX.Element;
20
20
 
21
+ interface ScrollimagePassProps {
22
+ passDuration?: number;
23
+ fontClassName?: string;
24
+ }
25
+ declare function ScrollimagePass({ passDuration, fontClassName }: ScrollimagePassProps): react_jsx_runtime.JSX.Element;
26
+
21
27
  declare const PopHero: () => react_jsx_runtime.JSX.Element;
22
28
 
23
- export { Button1, Dotlaunchbutton, PopHero };
29
+ export { Button1, Dotlaunchbutton, PopHero, ScrollimagePass };
package/dist/index.d.ts CHANGED
@@ -18,6 +18,12 @@ interface DotlaunchbuttonProps {
18
18
  }
19
19
  declare function Dotlaunchbutton({ label, onClick, className, accentColor, btnColor, animationSpeed, }: DotlaunchbuttonProps): react_jsx_runtime.JSX.Element;
20
20
 
21
+ interface ScrollimagePassProps {
22
+ passDuration?: number;
23
+ fontClassName?: string;
24
+ }
25
+ declare function ScrollimagePass({ passDuration, fontClassName }: ScrollimagePassProps): react_jsx_runtime.JSX.Element;
26
+
21
27
  declare const PopHero: () => react_jsx_runtime.JSX.Element;
22
28
 
23
- export { Button1, Dotlaunchbutton, PopHero };
29
+ export { Button1, Dotlaunchbutton, PopHero, ScrollimagePass };
package/dist/index.js CHANGED
@@ -33,7 +33,8 @@ var index_exports = {};
33
33
  __export(index_exports, {
34
34
  Button1: () => Button1,
35
35
  Dotlaunchbutton: () => Dotlaunchbutton,
36
- PopHero: () => PopHero
36
+ PopHero: () => PopHero,
37
+ ScrollimagePass: () => ScrollimagePass
37
38
  });
38
39
  module.exports = __toCommonJS(index_exports);
39
40
 
@@ -194,9 +195,152 @@ function Dotlaunchbutton({
194
195
  );
195
196
  }
196
197
 
197
- // src/hero/PopHero/PopHero.tsx
198
+ // src/components/scroll/ScrollimagePass/ScrollimagePass.tsx
198
199
  var import_react3 = require("react");
199
200
  var import_gsap = __toESM(require("gsap"));
201
+ var import_ScrollTrigger = require("gsap/dist/ScrollTrigger");
202
+ var import_jsx_runtime3 = require("react/jsx-runtime");
203
+ import_gsap.default.registerPlugin(import_ScrollTrigger.ScrollTrigger);
204
+ var IMAGES = [
205
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/ferrari.png", x: "0%", y: "10%", size: "360px" },
206
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/art2.png", x: "35%", y: "25%", size: "360px" },
207
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/side_model.png", x: "-32%", y: "105%", size: "360px" },
208
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/model5.png", x: "18%", y: "-40%", size: "360px" },
209
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/model6.png", x: "-20%", y: "45%", size: "360px" },
210
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/wallart.png", x: "21%", y: "-15%", size: "360px" }
211
+ ];
212
+ var STAGGER_TIME = 0.6;
213
+ function ScrollimagePass({
214
+ passDuration = 2.5,
215
+ fontClassName = ""
216
+ }) {
217
+ const sectionRef = (0, import_react3.useRef)(null);
218
+ const titleRef = (0, import_react3.useRef)(null);
219
+ const contentWrapperRef = (0, import_react3.useRef)(null);
220
+ const imageRefs = (0, import_react3.useRef)([]);
221
+ (0, import_react3.useEffect)(() => {
222
+ if (!sectionRef.current || !titleRef.current || !contentWrapperRef.current) return;
223
+ const tl = import_gsap.default.timeline({
224
+ scrollTrigger: {
225
+ trigger: sectionRef.current,
226
+ start: "top top",
227
+ end: "+=2500",
228
+ pin: true,
229
+ scrub: 1.2
230
+ }
231
+ });
232
+ import_gsap.default.set(titleRef.current, { opacity: 1, scale: 1, y: 0 });
233
+ imageRefs.current.forEach((img, index) => {
234
+ if (!img || index === IMAGES.length - 1) return;
235
+ tl.fromTo(
236
+ img,
237
+ { y: "120vh" },
238
+ { y: "-120vh", duration: passDuration, ease: "none" },
239
+ index * STAGGER_TIME
240
+ );
241
+ });
242
+ const lastIndex = IMAGES.length - 1;
243
+ const lastImg = imageRefs.current[lastIndex];
244
+ const lastStart = lastIndex * STAGGER_TIME;
245
+ if (lastImg) {
246
+ tl.fromTo(
247
+ lastImg,
248
+ { y: "120vh" },
249
+ { y: "0vh", duration: passDuration / 2, ease: "none" },
250
+ lastStart
251
+ );
252
+ tl.to(
253
+ contentWrapperRef.current,
254
+ { y: "-120vh", duration: passDuration / 2, ease: "none" },
255
+ "+=0"
256
+ );
257
+ }
258
+ tl.to(
259
+ titleRef.current,
260
+ { scale: 8 / 14, duration: tl.duration(), ease: "none" },
261
+ 0
262
+ );
263
+ return () => {
264
+ import_ScrollTrigger.ScrollTrigger.getAll().forEach((t) => t.kill());
265
+ };
266
+ }, [passDuration]);
267
+ const handleMouseMove = (e, index) => {
268
+ const el = imageRefs.current[index];
269
+ if (!el) return;
270
+ const { left, top, width, height } = el.getBoundingClientRect();
271
+ const x = (e.clientX - left - width / 2) * 0.1;
272
+ const y = (e.clientY - top - height / 2) * 0.1;
273
+ import_gsap.default.to(el.querySelector("img"), { x, y, duration: 0.6, ease: "power2.out" });
274
+ };
275
+ const handleMouseLeave = (index) => {
276
+ const el = imageRefs.current[index];
277
+ if (!el) return;
278
+ import_gsap.default.to(el.querySelector("img"), { x: 0, y: 0, duration: 0.6, ease: "power2.out" });
279
+ };
280
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative bg-white selection:bg-black selection:text-white", children: [
281
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-screen w-full flex flex-col items-center justify-center relative z-[60] bg-white overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
282
+ "h1",
283
+ {
284
+ className: `text-[8vw] font-normal tracking-tighter text-black select-none leading-none text-center px-10 ${fontClassName}`,
285
+ children: "Scroll \u2022 Explore"
286
+ }
287
+ ) }),
288
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: sectionRef, className: "relative h-screen w-full overflow-hidden bg-white", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref: contentWrapperRef, className: "absolute inset-0 w-full h-full", children: [
289
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative w-full h-full flex items-center justify-center", children: [
290
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
291
+ "h2",
292
+ {
293
+ ref: titleRef,
294
+ className: `text-[14vw] font-normal tracking-tighter text-black select-none z-10 leading-none ${fontClassName}`,
295
+ children: "Works"
296
+ }
297
+ ),
298
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute inset-0 z-20 pointer-events-none w-full h-full", children: IMAGES.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
299
+ "div",
300
+ {
301
+ ref: (el) => {
302
+ imageRefs.current[i] = el;
303
+ },
304
+ onMouseMove: (e) => handleMouseMove(e, i),
305
+ onMouseLeave: () => handleMouseLeave(i),
306
+ className: "absolute pointer-events-auto group cursor-pointer overflow-hidden rounded-sm z-30 transition-shadow duration-500 hover:shadow-2xl",
307
+ style: {
308
+ left: `calc(50% + ${item.x})`,
309
+ top: "0",
310
+ width: item.size,
311
+ height: "auto",
312
+ aspectRatio: "3/4",
313
+ transform: "translate(-50%, 0)"
314
+ },
315
+ children: [
316
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
317
+ "img",
318
+ {
319
+ src: item.url,
320
+ alt: `Work ${i + 1}`,
321
+ className: "w-full h-full object-cover scale-[1.1]"
322
+ }
323
+ ),
324
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute inset-0 bg-black/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-white text-[9px] uppercase tracking-[0.4em] font-medium transform translate-y-2 group-hover:translate-y-0 transition-transform duration-500", children: "View" }) })
325
+ ]
326
+ },
327
+ i
328
+ )) })
329
+ ] }),
330
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute top-full left-0 w-full h-full flex flex-col items-center justify-center bg-white", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
331
+ "p",
332
+ {
333
+ className: `text-[8vw] font-normal tracking-tighter text-black/90 select-none leading-none text-center px-10 ${fontClassName}`,
334
+ children: "Animation End"
335
+ }
336
+ ) })
337
+ ] }) })
338
+ ] });
339
+ }
340
+
341
+ // src/hero/PopHero/PopHero.tsx
342
+ var import_react4 = require("react");
343
+ var import_gsap2 = __toESM(require("gsap"));
200
344
 
201
345
  // #style-inject:#style-inject
202
346
  function styleInject(css, { insertAt } = {}) {
@@ -224,21 +368,21 @@ function styleInject(css, { insertAt } = {}) {
224
368
  styleInject(':root {\n --font-display: "Instrument Serif", serif;\n}\n::-webkit-scrollbar {\n display: none;\n}\nhtml {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n.pop-hero-main {\n font-family: var(--font-display), serif;\n}\n');
225
369
 
226
370
  // src/hero/PopHero/PopHero.tsx
227
- var import_jsx_runtime3 = require("react/jsx-runtime");
371
+ var import_jsx_runtime4 = require("react/jsx-runtime");
228
372
  var PopHero = () => {
229
- const containerRef = (0, import_react3.useRef)(null);
230
- const imageWrapperRef = (0, import_react3.useRef)(null);
231
- const navbarRef = (0, import_react3.useRef)(null);
232
- const centerTextRef = (0, import_react3.useRef)(null);
233
- (0, import_react3.useEffect)(() => {
373
+ const containerRef = (0, import_react4.useRef)(null);
374
+ const imageWrapperRef = (0, import_react4.useRef)(null);
375
+ const navbarRef = (0, import_react4.useRef)(null);
376
+ const centerTextRef = (0, import_react4.useRef)(null);
377
+ (0, import_react4.useEffect)(() => {
234
378
  if (!imageWrapperRef.current || !navbarRef.current || !centerTextRef.current) return;
235
- const mm = import_gsap.default.matchMedia();
379
+ const mm = import_gsap2.default.matchMedia();
236
380
  mm.add({
237
381
  isMobile: "(max-width: 768px)",
238
382
  isDesktop: "(min-width: 769px)"
239
383
  }, (context) => {
240
384
  const { isMobile } = context.conditions;
241
- import_gsap.default.set(imageWrapperRef.current, {
385
+ import_gsap2.default.set(imageWrapperRef.current, {
242
386
  y: "100vh",
243
387
  rotation: isMobile ? 8 : 15,
244
388
  scale: isMobile ? 0.7 : 0.5,
@@ -248,16 +392,16 @@ var PopHero = () => {
248
392
  borderRadius: isMobile ? "1.5rem" : "2rem",
249
393
  transformOrigin: "center center"
250
394
  });
251
- import_gsap.default.set(centerTextRef.current, {
395
+ import_gsap2.default.set(centerTextRef.current, {
252
396
  opacity: 0,
253
397
  y: 20
254
398
  });
255
- import_gsap.default.fromTo(
399
+ import_gsap2.default.fromTo(
256
400
  navbarRef.current,
257
401
  { opacity: 0, y: -20 },
258
402
  { opacity: 1, y: 0, duration: 1, delay: 0.5, ease: "power2.out" }
259
403
  );
260
- const tl = import_gsap.default.timeline({
404
+ const tl = import_gsap2.default.timeline({
261
405
  defaults: { ease: "power2.out" }
262
406
  });
263
407
  tl.to(imageWrapperRef.current, {
@@ -282,34 +426,34 @@ var PopHero = () => {
282
426
  });
283
427
  return () => mm.revert();
284
428
  }, []);
285
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
429
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
286
430
  "main",
287
431
  {
288
432
  ref: containerRef,
289
433
  className: "pop-hero-main relative min-h-screen bg-black text-white overflow-hidden selection:bg-[#EBDCCB] selection:text-black",
290
434
  children: [
291
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
435
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
292
436
  "nav",
293
437
  {
294
438
  ref: navbarRef,
295
439
  className: "fixed top-0 left-0 w-full z-50 px-6 py-8 md:p-10 flex justify-between items-center pointer-events-auto",
296
440
  children: [
297
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-base md:text-2xl font-normal tracking-tighter uppercase opacity-90 drop-shadow-sm", children: "Waves.studios" }),
298
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex gap-4 md:gap-16 text-[10px] md:text-[11px] uppercase tracking-widest md:tracking-[0.4em] font-normal opacity-70", children: [
299
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Work" }),
300
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "About" }),
301
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Contact" })
441
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-base md:text-2xl font-normal tracking-tighter uppercase opacity-90 drop-shadow-sm", children: "Waves.studios" }),
442
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-4 md:gap-16 text-[10px] md:text-[11px] uppercase tracking-widest md:tracking-[0.4em] font-normal opacity-70", children: [
443
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Work" }),
444
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "About" }),
445
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Contact" })
302
446
  ] })
303
447
  ]
304
448
  }
305
449
  ),
306
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "relative h-screen w-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
450
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "relative h-screen w-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
307
451
  "div",
308
452
  {
309
453
  ref: imageWrapperRef,
310
454
  className: "relative overflow-hidden shadow-2xl z-10 will-change-transform",
311
455
  children: [
312
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
456
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
313
457
  "video",
314
458
  {
315
459
  src: "https://d8j0ntlcm91z4.cloudfront.net/user_38xzZboKViGWJOttwIXH07lWA1P/hf_20260228_065522_522e2295-ba22-457e-8fdb-fbcd68109c73.mp4",
@@ -320,21 +464,21 @@ var PopHero = () => {
320
464
  className: "absolute inset-0 w-full h-full object-cover transition-all duration-1000"
321
465
  }
322
466
  ),
323
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
467
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
324
468
  "div",
325
469
  {
326
470
  ref: centerTextRef,
327
471
  className: "absolute inset-0 flex flex-col items-center justify-center z-20 pointer-events-none px-6 -translate-y-6 md:-translate-y-12",
328
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("h1", { className: "text-4xl md:text-[9rem] tracking-tight text-[#fdfcfb] drop-shadow-[0_10px_30px_rgba(0,0,0,0.5)] leading-[1.1] md:leading-[0.9] text-center", children: [
472
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("h1", { className: "text-4xl md:text-[9rem] tracking-tight text-[#fdfcfb] drop-shadow-[0_10px_30px_rgba(0,0,0,0.5)] leading-[1.1] md:leading-[0.9] text-center", children: [
329
473
  "Nature's ",
330
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "italic block mt-0 md:mt-[-0.1em] opacity-90", children: "Quiet Pulse" })
474
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "italic block mt-0 md:mt-[-0.1em] opacity-90", children: "Quiet Pulse" })
331
475
  ] })
332
476
  }
333
477
  )
334
478
  ]
335
479
  }
336
480
  ) }),
337
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute inset-0 pointer-events-none -z-10 text-white/5 flex items-center justify-center text-[20vw] font-bold opacity-10 blur-3xl", children: "WAVES" })
481
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "absolute inset-0 pointer-events-none -z-10 text-white/5 flex items-center justify-center text-[20vw] font-bold opacity-10 blur-3xl", children: "WAVES" })
338
482
  ]
339
483
  }
340
484
  );
@@ -343,6 +487,7 @@ var PopHero = () => {
343
487
  0 && (module.exports = {
344
488
  Button1,
345
489
  Dotlaunchbutton,
346
- PopHero
490
+ PopHero,
491
+ ScrollimagePass
347
492
  });
348
493
  //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -157,9 +157,152 @@ function Dotlaunchbutton({
157
157
  );
158
158
  }
159
159
 
160
- // src/hero/PopHero/PopHero.tsx
160
+ // src/components/scroll/ScrollimagePass/ScrollimagePass.tsx
161
161
  import { useEffect as useEffect2, useRef as useRef3 } from "react";
162
162
  import gsap from "gsap";
163
+ import { ScrollTrigger } from "gsap/dist/ScrollTrigger";
164
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
165
+ gsap.registerPlugin(ScrollTrigger);
166
+ var IMAGES = [
167
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/ferrari.png", x: "0%", y: "10%", size: "360px" },
168
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/art2.png", x: "35%", y: "25%", size: "360px" },
169
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/side_model.png", x: "-32%", y: "105%", size: "360px" },
170
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/model5.png", x: "18%", y: "-40%", size: "360px" },
171
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/model6.png", x: "-20%", y: "45%", size: "360px" },
172
+ { url: "https://pub-30f77b34698b4af9acb780d4dfe7ee4d.r2.dev/good_one/good_assets/wallart.png", x: "21%", y: "-15%", size: "360px" }
173
+ ];
174
+ var STAGGER_TIME = 0.6;
175
+ function ScrollimagePass({
176
+ passDuration = 2.5,
177
+ fontClassName = ""
178
+ }) {
179
+ const sectionRef = useRef3(null);
180
+ const titleRef = useRef3(null);
181
+ const contentWrapperRef = useRef3(null);
182
+ const imageRefs = useRef3([]);
183
+ useEffect2(() => {
184
+ if (!sectionRef.current || !titleRef.current || !contentWrapperRef.current) return;
185
+ const tl = gsap.timeline({
186
+ scrollTrigger: {
187
+ trigger: sectionRef.current,
188
+ start: "top top",
189
+ end: "+=2500",
190
+ pin: true,
191
+ scrub: 1.2
192
+ }
193
+ });
194
+ gsap.set(titleRef.current, { opacity: 1, scale: 1, y: 0 });
195
+ imageRefs.current.forEach((img, index) => {
196
+ if (!img || index === IMAGES.length - 1) return;
197
+ tl.fromTo(
198
+ img,
199
+ { y: "120vh" },
200
+ { y: "-120vh", duration: passDuration, ease: "none" },
201
+ index * STAGGER_TIME
202
+ );
203
+ });
204
+ const lastIndex = IMAGES.length - 1;
205
+ const lastImg = imageRefs.current[lastIndex];
206
+ const lastStart = lastIndex * STAGGER_TIME;
207
+ if (lastImg) {
208
+ tl.fromTo(
209
+ lastImg,
210
+ { y: "120vh" },
211
+ { y: "0vh", duration: passDuration / 2, ease: "none" },
212
+ lastStart
213
+ );
214
+ tl.to(
215
+ contentWrapperRef.current,
216
+ { y: "-120vh", duration: passDuration / 2, ease: "none" },
217
+ "+=0"
218
+ );
219
+ }
220
+ tl.to(
221
+ titleRef.current,
222
+ { scale: 8 / 14, duration: tl.duration(), ease: "none" },
223
+ 0
224
+ );
225
+ return () => {
226
+ ScrollTrigger.getAll().forEach((t) => t.kill());
227
+ };
228
+ }, [passDuration]);
229
+ const handleMouseMove = (e, index) => {
230
+ const el = imageRefs.current[index];
231
+ if (!el) return;
232
+ const { left, top, width, height } = el.getBoundingClientRect();
233
+ const x = (e.clientX - left - width / 2) * 0.1;
234
+ const y = (e.clientY - top - height / 2) * 0.1;
235
+ gsap.to(el.querySelector("img"), { x, y, duration: 0.6, ease: "power2.out" });
236
+ };
237
+ const handleMouseLeave = (index) => {
238
+ const el = imageRefs.current[index];
239
+ if (!el) return;
240
+ gsap.to(el.querySelector("img"), { x: 0, y: 0, duration: 0.6, ease: "power2.out" });
241
+ };
242
+ return /* @__PURE__ */ jsxs2("div", { className: "relative bg-white selection:bg-black selection:text-white", children: [
243
+ /* @__PURE__ */ jsx3("div", { className: "h-screen w-full flex flex-col items-center justify-center relative z-[60] bg-white overflow-hidden", children: /* @__PURE__ */ jsx3(
244
+ "h1",
245
+ {
246
+ className: `text-[8vw] font-normal tracking-tighter text-black select-none leading-none text-center px-10 ${fontClassName}`,
247
+ children: "Scroll \u2022 Explore"
248
+ }
249
+ ) }),
250
+ /* @__PURE__ */ jsx3("div", { ref: sectionRef, className: "relative h-screen w-full overflow-hidden bg-white", children: /* @__PURE__ */ jsxs2("div", { ref: contentWrapperRef, className: "absolute inset-0 w-full h-full", children: [
251
+ /* @__PURE__ */ jsxs2("div", { className: "relative w-full h-full flex items-center justify-center", children: [
252
+ /* @__PURE__ */ jsx3(
253
+ "h2",
254
+ {
255
+ ref: titleRef,
256
+ className: `text-[14vw] font-normal tracking-tighter text-black select-none z-10 leading-none ${fontClassName}`,
257
+ children: "Works"
258
+ }
259
+ ),
260
+ /* @__PURE__ */ jsx3("div", { className: "absolute inset-0 z-20 pointer-events-none w-full h-full", children: IMAGES.map((item, i) => /* @__PURE__ */ jsxs2(
261
+ "div",
262
+ {
263
+ ref: (el) => {
264
+ imageRefs.current[i] = el;
265
+ },
266
+ onMouseMove: (e) => handleMouseMove(e, i),
267
+ onMouseLeave: () => handleMouseLeave(i),
268
+ className: "absolute pointer-events-auto group cursor-pointer overflow-hidden rounded-sm z-30 transition-shadow duration-500 hover:shadow-2xl",
269
+ style: {
270
+ left: `calc(50% + ${item.x})`,
271
+ top: "0",
272
+ width: item.size,
273
+ height: "auto",
274
+ aspectRatio: "3/4",
275
+ transform: "translate(-50%, 0)"
276
+ },
277
+ children: [
278
+ /* @__PURE__ */ jsx3(
279
+ "img",
280
+ {
281
+ src: item.url,
282
+ alt: `Work ${i + 1}`,
283
+ className: "w-full h-full object-cover scale-[1.1]"
284
+ }
285
+ ),
286
+ /* @__PURE__ */ jsx3("div", { className: "absolute inset-0 bg-black/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500 flex items-center justify-center", children: /* @__PURE__ */ jsx3("span", { className: "text-white text-[9px] uppercase tracking-[0.4em] font-medium transform translate-y-2 group-hover:translate-y-0 transition-transform duration-500", children: "View" }) })
287
+ ]
288
+ },
289
+ i
290
+ )) })
291
+ ] }),
292
+ /* @__PURE__ */ jsx3("div", { className: "absolute top-full left-0 w-full h-full flex flex-col items-center justify-center bg-white", children: /* @__PURE__ */ jsx3(
293
+ "p",
294
+ {
295
+ className: `text-[8vw] font-normal tracking-tighter text-black/90 select-none leading-none text-center px-10 ${fontClassName}`,
296
+ children: "Animation End"
297
+ }
298
+ ) })
299
+ ] }) })
300
+ ] });
301
+ }
302
+
303
+ // src/hero/PopHero/PopHero.tsx
304
+ import { useEffect as useEffect3, useRef as useRef4 } from "react";
305
+ import gsap2 from "gsap";
163
306
 
164
307
  // #style-inject:#style-inject
165
308
  function styleInject(css, { insertAt } = {}) {
@@ -187,21 +330,21 @@ function styleInject(css, { insertAt } = {}) {
187
330
  styleInject(':root {\n --font-display: "Instrument Serif", serif;\n}\n::-webkit-scrollbar {\n display: none;\n}\nhtml {\n scrollbar-width: none;\n -ms-overflow-style: none;\n}\n.pop-hero-main {\n font-family: var(--font-display), serif;\n}\n');
188
331
 
189
332
  // src/hero/PopHero/PopHero.tsx
190
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
333
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
191
334
  var PopHero = () => {
192
- const containerRef = useRef3(null);
193
- const imageWrapperRef = useRef3(null);
194
- const navbarRef = useRef3(null);
195
- const centerTextRef = useRef3(null);
196
- useEffect2(() => {
335
+ const containerRef = useRef4(null);
336
+ const imageWrapperRef = useRef4(null);
337
+ const navbarRef = useRef4(null);
338
+ const centerTextRef = useRef4(null);
339
+ useEffect3(() => {
197
340
  if (!imageWrapperRef.current || !navbarRef.current || !centerTextRef.current) return;
198
- const mm = gsap.matchMedia();
341
+ const mm = gsap2.matchMedia();
199
342
  mm.add({
200
343
  isMobile: "(max-width: 768px)",
201
344
  isDesktop: "(min-width: 769px)"
202
345
  }, (context) => {
203
346
  const { isMobile } = context.conditions;
204
- gsap.set(imageWrapperRef.current, {
347
+ gsap2.set(imageWrapperRef.current, {
205
348
  y: "100vh",
206
349
  rotation: isMobile ? 8 : 15,
207
350
  scale: isMobile ? 0.7 : 0.5,
@@ -211,16 +354,16 @@ var PopHero = () => {
211
354
  borderRadius: isMobile ? "1.5rem" : "2rem",
212
355
  transformOrigin: "center center"
213
356
  });
214
- gsap.set(centerTextRef.current, {
357
+ gsap2.set(centerTextRef.current, {
215
358
  opacity: 0,
216
359
  y: 20
217
360
  });
218
- gsap.fromTo(
361
+ gsap2.fromTo(
219
362
  navbarRef.current,
220
363
  { opacity: 0, y: -20 },
221
364
  { opacity: 1, y: 0, duration: 1, delay: 0.5, ease: "power2.out" }
222
365
  );
223
- const tl = gsap.timeline({
366
+ const tl = gsap2.timeline({
224
367
  defaults: { ease: "power2.out" }
225
368
  });
226
369
  tl.to(imageWrapperRef.current, {
@@ -245,34 +388,34 @@ var PopHero = () => {
245
388
  });
246
389
  return () => mm.revert();
247
390
  }, []);
248
- return /* @__PURE__ */ jsxs2(
391
+ return /* @__PURE__ */ jsxs3(
249
392
  "main",
250
393
  {
251
394
  ref: containerRef,
252
395
  className: "pop-hero-main relative min-h-screen bg-black text-white overflow-hidden selection:bg-[#EBDCCB] selection:text-black",
253
396
  children: [
254
- /* @__PURE__ */ jsxs2(
397
+ /* @__PURE__ */ jsxs3(
255
398
  "nav",
256
399
  {
257
400
  ref: navbarRef,
258
401
  className: "fixed top-0 left-0 w-full z-50 px-6 py-8 md:p-10 flex justify-between items-center pointer-events-auto",
259
402
  children: [
260
- /* @__PURE__ */ jsx3("div", { className: "text-base md:text-2xl font-normal tracking-tighter uppercase opacity-90 drop-shadow-sm", children: "Waves.studios" }),
261
- /* @__PURE__ */ jsxs2("div", { className: "flex gap-4 md:gap-16 text-[10px] md:text-[11px] uppercase tracking-widest md:tracking-[0.4em] font-normal opacity-70", children: [
262
- /* @__PURE__ */ jsx3("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Work" }),
263
- /* @__PURE__ */ jsx3("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "About" }),
264
- /* @__PURE__ */ jsx3("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Contact" })
403
+ /* @__PURE__ */ jsx4("div", { className: "text-base md:text-2xl font-normal tracking-tighter uppercase opacity-90 drop-shadow-sm", children: "Waves.studios" }),
404
+ /* @__PURE__ */ jsxs3("div", { className: "flex gap-4 md:gap-16 text-[10px] md:text-[11px] uppercase tracking-widest md:tracking-[0.4em] font-normal opacity-70", children: [
405
+ /* @__PURE__ */ jsx4("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Work" }),
406
+ /* @__PURE__ */ jsx4("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "About" }),
407
+ /* @__PURE__ */ jsx4("a", { href: "#", className: "hover:opacity-100 transition-opacity", children: "Contact" })
265
408
  ] })
266
409
  ]
267
410
  }
268
411
  ),
269
- /* @__PURE__ */ jsx3("div", { className: "relative h-screen w-full flex items-center justify-center", children: /* @__PURE__ */ jsxs2(
412
+ /* @__PURE__ */ jsx4("div", { className: "relative h-screen w-full flex items-center justify-center", children: /* @__PURE__ */ jsxs3(
270
413
  "div",
271
414
  {
272
415
  ref: imageWrapperRef,
273
416
  className: "relative overflow-hidden shadow-2xl z-10 will-change-transform",
274
417
  children: [
275
- /* @__PURE__ */ jsx3(
418
+ /* @__PURE__ */ jsx4(
276
419
  "video",
277
420
  {
278
421
  src: "https://d8j0ntlcm91z4.cloudfront.net/user_38xzZboKViGWJOttwIXH07lWA1P/hf_20260228_065522_522e2295-ba22-457e-8fdb-fbcd68109c73.mp4",
@@ -283,21 +426,21 @@ var PopHero = () => {
283
426
  className: "absolute inset-0 w-full h-full object-cover transition-all duration-1000"
284
427
  }
285
428
  ),
286
- /* @__PURE__ */ jsx3(
429
+ /* @__PURE__ */ jsx4(
287
430
  "div",
288
431
  {
289
432
  ref: centerTextRef,
290
433
  className: "absolute inset-0 flex flex-col items-center justify-center z-20 pointer-events-none px-6 -translate-y-6 md:-translate-y-12",
291
- children: /* @__PURE__ */ jsxs2("h1", { className: "text-4xl md:text-[9rem] tracking-tight text-[#fdfcfb] drop-shadow-[0_10px_30px_rgba(0,0,0,0.5)] leading-[1.1] md:leading-[0.9] text-center", children: [
434
+ children: /* @__PURE__ */ jsxs3("h1", { className: "text-4xl md:text-[9rem] tracking-tight text-[#fdfcfb] drop-shadow-[0_10px_30px_rgba(0,0,0,0.5)] leading-[1.1] md:leading-[0.9] text-center", children: [
292
435
  "Nature's ",
293
- /* @__PURE__ */ jsx3("span", { className: "italic block mt-0 md:mt-[-0.1em] opacity-90", children: "Quiet Pulse" })
436
+ /* @__PURE__ */ jsx4("span", { className: "italic block mt-0 md:mt-[-0.1em] opacity-90", children: "Quiet Pulse" })
294
437
  ] })
295
438
  }
296
439
  )
297
440
  ]
298
441
  }
299
442
  ) }),
300
- /* @__PURE__ */ jsx3("div", { className: "absolute inset-0 pointer-events-none -z-10 text-white/5 flex items-center justify-center text-[20vw] font-bold opacity-10 blur-3xl", children: "WAVES" })
443
+ /* @__PURE__ */ jsx4("div", { className: "absolute inset-0 pointer-events-none -z-10 text-white/5 flex items-center justify-center text-[20vw] font-bold opacity-10 blur-3xl", children: "WAVES" })
301
444
  ]
302
445
  }
303
446
  );
@@ -305,6 +448,7 @@ var PopHero = () => {
305
448
  export {
306
449
  Button1,
307
450
  Dotlaunchbutton,
308
- PopHero
451
+ PopHero,
452
+ ScrollimagePass
309
453
  };
310
454
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t7blocks/ui",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -14,7 +14,8 @@
14
14
  },
15
15
  "peerDependencies": {
16
16
  "framer-motion": "^11.0.0 || ^12.0.0",
17
- "react": "^18.0.0 || ^19.0.0"
17
+ "react": "^18.0.0 || ^19.0.0",
18
+ "gsap": "^3.14.2"
18
19
  },
19
20
  "devDependencies": {
20
21
  "@tailwindcss/postcss": "^4.2.2",
@@ -24,6 +25,7 @@
24
25
  "gsap": "^3.14.2",
25
26
  "postcss": "^8.5.9",
26
27
  "tailwindcss": "^4.2.2",
28
+ "next": "16.2.2",
27
29
  "tsup": "^8.0.0",
28
30
  "typescript": "^5.0.0",
29
31
  "@t7blocks/typescript-config": "0.0.1"