@fynd-design-engineering/fynd-one-v2 3.3.4 → 3.3.6

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.
@@ -1 +1 @@
1
- "use strict";(()=>{var e=window.matchMedia("(prefers-reduced-motion: reduce)").matches,s=window.Swiper,a=new s("[swiper-slider='brands-marquee']",{slidesPerView:"auto",spaceBetween:120,loop:!0,speed:4e3,allowTouchMove:!1,autoplay:e?!1:{delay:1,disableOnInteraction:!1}});})();
1
+ "use strict";(()=>{var s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,t=window.Swiper,o=new t("[swiper-slider='brands-marquee']",{slidesPerView:"auto",spaceBetween:0,loop:!0,speed:4e4,allowTouchMove:!1,autoplay:s?!1:{delay:1,disableOnInteraction:!1}}),a=document.querySelector("[swiper-slider='brands-marquee']");if(a&&!s){let e=null;a.addEventListener("mouseenter",()=>{e=window.setTimeout(()=>{o.autoplay.stop()},250)}),a.addEventListener("mouseleave",()=>{e&&(clearTimeout(e),e=null),o.autoplay.start()})}})();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../bin/live-reload.js", "../../src/marquee/marquee-swiper.ts"],
4
- "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// Check if user prefers reduced motion\nconst prefersReducedMotion: boolean = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n// Access Swiper from the global window object\nconst SwiperClass = (window as any).Swiper;\n\n// Initialize Swiper with autoplay conditionally based on prefers-reduced-motion\nconst swiper = new SwiperClass(\"[swiper-slider='brands-marquee']\", {\n slidesPerView: 'auto',\n spaceBetween: 120,\n loop: true,\n speed: 4000,\n allowTouchMove: false,\n autoplay: prefersReducedMotion\n ? false\n : {\n delay: 1,\n disableOnInteraction: false,\n },\n});"],
4
+ "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// Check if user prefers reduced motion\nconst prefersReducedMotion: boolean = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n// Access Swiper from the global window object\nconst SwiperClass = (window as any).Swiper;\n\n// Initialize Swiper with autoplay conditionally based on prefers-reduced-motion\nconst swiper = new SwiperClass(\"[swiper-slider='brands-marquee']\", {\n slidesPerView: 'auto',\n spaceBetween: 0,\n loop: true,\n speed: 40000,\n allowTouchMove: false,\n autoplay: prefersReducedMotion\n ? false\n : {\n delay: 1,\n disableOnInteraction: false,\n },\n});"],
5
5
  "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AACL,YAAQ,IAAI,gDAAgD;AAAA,EAC9D;;;ACTA,MAAM,uBAAgC,OAAO,WAAW,kCAAkC,EAAE;AAG5F,MAAM,cAAe,OAAe;AAGpC,MAAM,SAAS,IAAI,YAAY,oCAAoC;AAAA,IAC/D,eAAe;AAAA,IACf,cAAc;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA,IACP,gBAAgB;AAAA,IAChB,UAAU,uBACJ,QACA;AAAA,MACE,OAAO;AAAA,MACP,sBAAsB;AAAA,IAC1B;AAAA,EACR,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- "use strict";(()=>{})();
1
+ "use strict";(()=>{var r=window.gsap,u=["selling online","self-checkout in store","product photoshoot","multi-channel catalog","hyperlocal delivery","agentic support"];function c(){let e=document.getElementById("chroma");e&&(e.setAttribute("data-animate","false"),e.offsetWidth,e.setAttribute("data-animate","true"))}function m(e){let t=document.createElement("h1");return t.id="chroma",t.className="chroma-text",t.setAttribute("data-animate","false"),t.textContent=e,t.style.opacity="0",t}function p(e=u,{fadeDuration:t=.35,holdDuration:d=2}={}){let i=document.querySelector("[chroma-slot]");if(!i||!r)return null;let l=a=>{let n=m(a),o=r.timeline({defaults:{ease:"power1.out"}});return o.add(()=>{i.appendChild(n)}),o.to(n,{duration:t,autoAlpha:1,onStart:()=>c()}),o.to(n,{duration:d,autoAlpha:1}),o.to(n,{duration:t,autoAlpha:0}),o.add(()=>{n.remove()}),o},s=r.timeline({repeat:-1});return e.forEach(a=>s.add(l(a))),s}document.addEventListener("DOMContentLoaded",()=>{p()});})();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../bin/live-reload.js"],
4
- "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n"],
5
- "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AACL,YAAQ,IAAI,gDAAgD;AAAA,EAC9D;",
3
+ "sources": ["../../bin/live-reload.js", "../../src/others/hero-india-animation-2.ts"],
4
+ "sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// assumes gsap is available globally\nconst gsap = (window as any).gsap as any;\n\nexport const heroAnimatedText: string[] = [\n \"selling online\",\n \"self-checkout in store\",\n \"product photoshoot\",\n \"multi-channel catalog\",\n \"hyperlocal delivery\",\n \"agentic support\",\n];\n\nexport function playChroma(): void {\n const el = document.getElementById(\"chroma\");\n if (!el) return;\n el.setAttribute(\"data-animate\", \"false\");\n void el.offsetWidth; // reflow\n el.setAttribute(\"data-animate\", \"true\");\n}\n\nfunction makeChromaHeading(text: string): HTMLHeadingElement {\n const h1 = document.createElement(\"h1\");\n h1.id = \"chroma\";\n h1.className = \"chroma-text\";\n h1.setAttribute(\"data-animate\", \"false\");\n h1.textContent = text;\n h1.style.opacity = \"0\"; // start hidden\n return h1;\n}\n\ntype LoopOptions = { fadeDuration?: number; holdDuration?: number };\n\nexport function startChromaLoop(\n texts: string[] = heroAnimatedText,\n { fadeDuration = 0.35, holdDuration = 2.0 }: LoopOptions = {}\n) {\n const slot = document.querySelector<HTMLElement>(\"[chroma-slot]\");\n if (!slot || !gsap) return null;\n\n // Build one slide (child timeline) per string\n const slide = (text: string) => {\n const el = makeChromaHeading(text);\n const t = gsap.timeline({ defaults: { ease: \"power1.out\" } });\n\n t.add(() => {\n // Append right when this slide starts\n slot.appendChild(el);\n });\n\n t.to(el, {\n duration: fadeDuration,\n autoAlpha: 1, // opacity + visibility\n onStart: () => playChroma(),\n });\n\n t.to(el, { duration: holdDuration, autoAlpha: 1 });\n\n t.to(el, { duration: fadeDuration, autoAlpha: 0 });\n\n t.add(() => {\n el.remove();\n });\n\n return t;\n };\n\n // Master loop\n const master = gsap.timeline({ repeat: -1 });\n texts.forEach((txt) => master.add(slide(txt)));\n\n return master;\n}\n\n// kick it off\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n startChromaLoop();\n});"],
5
+ "mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AAC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AAW,EAAE,CAAC;AAEjD,QAAE,IAAI,MAAM;AACV,WAAG,OAAO;AAAA,MACZ,CAAC;AAED,aAAO;AAAA,IACT;AAGA,UAAM,SAAS,KAAK,SAAS,EAAE,QAAQ,GAAG,CAAC;AAC3C,UAAM,QAAQ,CAAC,QAAQ,OAAO,IAAI,MAAM,GAAG,CAAC,CAAC;AAE7C,WAAO;AAAA,EACT;AAGA,WAAS,iBAAiB,oBAAoB,MAAM;AAClD,oBAAgB;AAAA,EAClB,CAAC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fynd-design-engineering/fynd-one-v2",
3
- "version": "3.3.4",
3
+ "version": "3.3.6",
4
4
  "description": "Updated CDN for fynd.com",
5
5
  "homepage": "https://github.com/Fynd-Design-Engineering/Fynd-Utils/blob/main/README.md",
6
6
  "license": "ISC",