@fynd-design-engineering/fynd-one-v2 3.4.61 → 3.4.63

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 (81) hide show
  1. package/dist/accordians/dropdown.js +95 -1
  2. package/dist/accordians/index.js +391 -1
  3. package/dist/cms-listing/index.js +24 -1
  4. package/dist/filters/clear-search.js +32 -1
  5. package/dist/filters/konnect.js +165 -1
  6. package/dist/filters/show-count.js +66 -1
  7. package/dist/form/country-dropdown.css +160 -1
  8. package/dist/form/cs-gated-redirection.js +40 -1
  9. package/dist/form/download-file.js +70 -1
  10. package/dist/form/validation.css +1019 -1
  11. package/dist/form/validation.js +10611 -7
  12. package/dist/global/anchor-scroll.js +174 -1
  13. package/dist/global/auth.js +87 -1
  14. package/dist/global/chat.js +185 -1
  15. package/dist/global/console-links.js +89 -1
  16. package/dist/global/contact-popup.js +83 -2
  17. package/dist/global/css/in-page-embed.css +1043 -1
  18. package/dist/global/css/in-project-settings.css +173 -1
  19. package/dist/global/css/temp.css +89 -1
  20. package/dist/global/custom-bg-video.js +40 -1
  21. package/dist/global/footer-accordion.js +44 -1
  22. package/dist/global/lazy-loader.js +135 -1
  23. package/dist/global/loader.js +166 -2
  24. package/dist/global/media-card.js +166 -1
  25. package/dist/global/miscellaneous.js +136 -1
  26. package/dist/global/number-count.js +82 -1
  27. package/dist/global/popup-video.js +276 -1
  28. package/dist/global/progressive-scroll.js +222 -1
  29. package/dist/global/responsive-video.js +321 -1
  30. package/dist/global/style.css +1065 -1
  31. package/dist/global/video-card.js +50 -1
  32. package/dist/hacktimus/2025.js +177 -1
  33. package/dist/hacktimus/styles.css +91 -1
  34. package/dist/home/index.js +17 -1
  35. package/dist/marquee/index.js +3104 -1
  36. package/dist/marquee/marquee-swiper.js +36 -1
  37. package/dist/navigation/announcement/index.js +5169 -1
  38. package/dist/navigation/context-menu/index.js +31 -1
  39. package/dist/navigation/desktop/index.js +4603 -1
  40. package/dist/navigation/initialization.js +602 -1
  41. package/dist/navigation/main.js +4911 -1
  42. package/dist/navigation/mobile/index.js +286 -1
  43. package/dist/navigation/scroll/index.js +62 -1
  44. package/dist/navigation/secondary-navigation/index.js +437 -1
  45. package/dist/navigation/style.css +154 -1
  46. package/dist/navigation/temp.css +2 -0
  47. package/dist/navigation/theme.css +69 -1
  48. package/dist/navigation-v2/index.js +4990 -1
  49. package/dist/navigation-v2/styles.css +233 -1
  50. package/dist/others/feature-detail.js +75 -0
  51. package/dist/others/feature-detail.js.map +7 -0
  52. package/dist/others/geolocation.js +50 -1
  53. package/dist/others/hero-aniamtion.js +53 -1
  54. package/dist/others/hero-india-animation-2.js +70 -1
  55. package/dist/others/hero-india-animation.js +93 -1
  56. package/dist/others/home-solution-tab.js +115 -1
  57. package/dist/others/storefront-chat/index.js +487 -1
  58. package/dist/others/storefront-chat/styles.css +107 -1
  59. package/dist/playbook-2026/hero-reveal.js +47 -1
  60. package/dist/playbook-2026/index.js +536 -1
  61. package/dist/playbook-2026/styles.css +110 -1
  62. package/dist/posthog-and-ga/attributes.js +190 -1
  63. package/dist/posthog-and-ga/main.js +528 -1
  64. package/dist/progressive-scroll/index.js +147 -1
  65. package/dist/quick-fix/reload.js +22 -1
  66. package/dist/seo/schema.js +465 -1
  67. package/dist/slider/freescroll.js +34 -1
  68. package/dist/test/sample.js +15 -1
  69. package/dist/testimonials/index.js +2654 -1
  70. package/dist/timeline/index.js +160 -1
  71. package/dist/timeline/style.css +42 -1
  72. package/dist/tracking/custom-id.js +75 -1
  73. package/dist/tracking/fill-form-fields.js +238 -1
  74. package/dist/tracking/fill-form-fields.js.map +2 -2
  75. package/dist/tracking/form-tracker.js +146 -1
  76. package/dist/tracking/page-categories.js +20 -1
  77. package/dist/tracking/user-journey.js +839 -1
  78. package/dist/tracking/utm-links.js +194 -1
  79. package/dist/utils/sample.js +17 -1
  80. package/dist/validations/localhost.js +221 -1
  81. package/package.json +1 -1
@@ -1 +1,536 @@
1
- "use strict";(()=>{document.addEventListener("DOMContentLoaded",()=>{let o=window.gsap;if(!o){console.error("ERROR: GSAP not loaded!");return}let g=window.ScrollTrigger;g&&o.registerPlugin(g);let P=document.querySelectorAll("[entity-error-connector]"),b=document.querySelectorAll("[entity-success-connector]"),w=document.querySelectorAll("[entity-name]");if(w.length===0){console.error("ERROR: No entities found with [entity-name] attribute");return}let u=document.querySelector("[playbook='store']"),d=document.querySelector("[playbook='store-foundation']"),p=document.querySelector("[playbook='foundation-base']"),x=document.querySelector("[playbook='spacer']"),E=document.querySelector("[playbook='title-1']"),f=document.querySelector("[playbook='title-2']"),y=document.querySelector("[playbook='title-3']"),m=document.querySelector("[playbook='counter']"),L=document.querySelector("[playbook='counter-text']"),S=document.querySelector("[playbook='grid']"),v=document.querySelector("[playbook='question']"),F=document.querySelector("[playbook='button']"),A={value:2341100};L&&(L.textContent="2341700");let C=null,G=()=>{C&&C.kill(),C=o.timeline({repeat:-1}),L&&C.to(A,{value:2341728,duration:20,ease:"power2.out",onUpdate:()=>{L.textContent=Math.floor(A.value).toLocaleString()}}).set(A,{value:2341100})},k=[];if(w.forEach(e=>{let n=e.getAttribute("entity-name");if(!n)return;let a=Array.from(b).find(s=>s.getAttribute("entity-success-connector")===n),t=Array.from(P).find(s=>s.getAttribute("entity-error-connector")===n);if(a){let s=a.querySelector("path"),I=t?.querySelector("path")||null,N=Array.from(e.querySelectorAll('[entity-state="success"]')),O=Array.from(e.querySelectorAll('[entity-state="error"]'));s&&k.push({name:e,connector:a,path:s,errorConnector:t||null,errorPath:I,successState:N[0]||null,successStates:N,errorStates:O,id:n})}}),k.length===0){console.error("ERROR: No pairs created!");return}console.log(`\u2713 Created ${k.length} animation pairs`);let c=e=>{let n=window.innerWidth,a={storeFoundation:{mobile:{scale:3.8,x:"-53px",y:"-24px"},tablet:{scale:3,x:"0px",y:"-100px"},desktop:{scale:2.8,x:"-400px",y:"-50px"}},grid:{mobile:{scale:1.5,x:"30px"},tablet:{scale:1.8,x:"45px"},desktop:{scale:2.1,x:"60px"}},counter:{mobile:{scale:1,y:"-100px"},tablet:{scale:1.1,y:"-180px"},desktop:{scale:1.2,y:"-100px"}},question:{mobile:{scale:1,y:"-100px"},tablet:{scale:1.1,y:"-180px"},desktop:{scale:1.2,y:"-100px"}},spcerSet:{mobile:{height:"20px"},tablet:{height:"100px"},desktop:{height:"240px"}},storeAndStoreFoundationInitial:{mobile:{scale:3,x:"-40px",y:"20px"},tablet:{scale:2,x:"0px",y:"0px"},desktop:{scale:1.5,x:"0px",y:"0px"}},storeAndStoreFoundationFinal:{mobile:{scale:1,x:"0px",y:"0px"},tablet:{scale:1,x:"0px",y:"0px"},desktop:{scale:1,x:"0px",y:"0px"}}},t=()=>n<480?"mobile":n<992?"tablet":"desktop";return a[e]?.[t()]||{}},l=k.sort(()=>Math.random()-.5),h=l.map(e=>e.path).filter(Boolean),T=l.map(e=>e.name).filter(Boolean),W=l.flatMap(e=>e.successStates);o.set([...P,...b],{opacity:0}),u&&d&&o.set([u,d],{...c("storeAndStoreFoundationInitial")}),p&&o.set(p,{opacity:0}),w.length>0&&o.set(w,{opacity:0,scale:.5}),x&&o.set(x,{...c("spcerSet")}),S&&o.set(S,{scale:2}),v&&o.set(v,{...c("question")}),m&&o.set(m,{...c("counter")}),E&&o.set(E,{y:0}),f&&o.set(f,{y:40,opacity:0,filter:"blur(10px)"}),y&&o.set(y,{y:40,opacity:0,filter:"blur(10px)"}),l.forEach(({path:e,errorPath:n,successStates:a,errorStates:t})=>{if(e){try{let s=e.getTotalLength();o.set(e,{strokeDasharray:s,strokeDashoffset:s})}catch{console.warn("WARNING: Could not get SVG path length")}n&&o.set(n,{opacity:0}),a.forEach(s=>{s&&o.set(s,{opacity:0})}),t.forEach(s=>{s&&o.set(s,{opacity:0})})}});let r=o.timeline({scrollTrigger:{trigger:"#scroll",start:"top top",end:"+=5000vh",scrub:2.5,pin:!0,fastScrollSensitivity:1}});u&&d&&r.to([u,d],{...c("storeAndStoreFoundationFinal")}),x&&r.to(x,{height:"0px",duration:.4,ease:"power3.out"},"<"),S&&r.to(S,{scale:1,duration:.4,ease:"power3.out"},"<"),p&&r.to(p,{opacity:1,duration:.2,ease:"power3.out"},"-=0.1"),b.length>0&&r.set(b,{opacity:1}),h.length>0&&r.to(h,{strokeDashoffset:0,duration:.8,ease:"power3.out"},"+=0.05"),T.length>0&&r.to(T,{opacity:1,scale:1,duration:.2,ease:"power3.out",delay:.2},"-=0.6"),W.length>0&&r.to(W,{opacity:1,duration:.2,ease:"power3.out"},"-=0.6"),r.add(()=>{console.log("\u2705 Step 4 Complete: All pairs set to SUCCESS state"),l.forEach(e=>{o.set(e.path,{opacity:1}),o.set(e.connector,{opacity:1}),e.successStates.forEach(n=>{o.set(n,{opacity:1})}),e.errorPath&&o.set(e.errorPath,{opacity:0}),e.errorConnector&&o.set(e.errorConnector,{opacity:0}),e.errorStates.forEach(n=>{o.set(n,{opacity:0})})})},"-=0.2"),E&&f&&r.to(E,{y:-40,opacity:0,filter:"blur(10px)",duration:.3,ease:"sine.inOut"}).to(f,{y:0,opacity:1,filter:"blur(0px)",duration:.3,ease:"sine.inOut"},"-=0.1"),r.addLabel("beforeWaves"),r.add(()=>{console.log("\u{1F3AC} Initializing all pairs to SUCCESS state"),l.forEach(e=>{o.set(e.path,{opacity:1}),e.errorPath&&o.set(e.errorPath,{opacity:0}),e.errorConnector&&o.set(e.errorConnector,{opacity:0}),e.successStates.forEach(n=>o.set(n,{opacity:1})),e.errorStates.forEach(n=>o.set(n,{opacity:0}))})},"beforeWaves"),r.addLabel("step6Start","+=0.2");let i=l.filter(e=>e.errorConnector&&e.errorPath);i.length===0?console.warn("WARNING: No pairs with error states found"):console.log(`\u2713 Found ${i.length} pairs with error states`);let q=[["content","inventory"],["products","delivery"],["returns","promises"]],H=e=>{!e||!e.path||(o.to(e.path,{opacity:0,duration:.3,ease:"power3.in"}),e.errorPath&&o.to(e.errorPath,{opacity:1,duration:.3,ease:"power3.out"}),e.errorConnector&&o.to(e.errorConnector,{opacity:1,duration:.15,ease:"power3.out"}),e.successStates&&e.successStates.length>0&&o.to(e.successStates,{opacity:0,duration:.3,ease:"power3.in"}),e.errorStates&&e.errorStates.length>0&&o.to(e.errorStates,{opacity:1,duration:.3,ease:"power3.out"}))},M=e=>{!e||!e.path||(e.errorPath&&o.to(e.errorPath,{opacity:0,duration:.3,ease:"power3.in"}),e.errorConnector&&o.to(e.errorConnector,{opacity:0,duration:.15,ease:"power3.in"}),o.to(e.path,{opacity:1,duration:.3,ease:"power3.out"}),e.errorStates&&e.errorStates.length>0&&o.to(e.errorStates,{opacity:0,duration:.3,ease:"power3.in"}),e.successStates&&e.successStates.length>0&&o.to(e.successStates,{opacity:1,duration:.3,ease:"power3.out"}))};i.length>0&&(r.addLabel("wave1Start","step6Start"),r.add(()=>{console.log("\u{1F30A} Wave 1 triggered!");let e=q[0],n=i.filter(t=>e.includes(t.id.toLowerCase())),a=i.filter(t=>!e.includes(t.id.toLowerCase()));console.log(` Failing: ${n.map(t=>t.id).join(", ")}`),console.log(` Succeeding: ${a.map(t=>t.id).join(", ")}`),n.forEach(t=>H(t)),a.forEach(t=>M(t))},"wave1Start"),r.to({},{duration:.5},"wave1Start"),r.addLabel("wave2Start","+=0.2"),r.add(()=>{console.log("\u{1F30A} Wave 2 triggered!");let e=q[1],n=i.filter(t=>e.includes(t.id.toLowerCase())),a=i.filter(t=>!e.includes(t.id.toLowerCase()));console.log(` Failing: ${n.map(t=>t.id).join(", ")}`),console.log(` Succeeding: ${a.map(t=>t.id).join(", ")}`),n.forEach(t=>H(t)),a.forEach(t=>M(t))},"wave2Start"),r.to({},{duration:.5},"wave2Start"),r.addLabel("wave3Start","+=0.2"),r.add(()=>{console.log("\u{1F30A} Wave 3 triggered!");let e=q[2],n=i.filter(t=>e.includes(t.id.toLowerCase())),a=i.filter(t=>!e.includes(t.id.toLowerCase()));console.log(` Failing: ${n.map(t=>t.id).join(", ")}`),console.log(` Succeeding: ${a.map(t=>t.id).join(", ")}`),n.forEach(t=>H(t)),a.forEach(t=>M(t))},"wave3Start"),r.to({},{duration:.5},"wave3Start"),r.addLabel("afterWaves","+=0.2"),r.add(()=>{console.log("\u2705 All waves complete! Making all pairs SUCCESS"),i.forEach(e=>{M(e)})},"afterWaves"),f&&y&&r.to(f,{y:-40,opacity:0,filter:"blur(10px)",duration:.3,ease:"sine.inOut"},"wave3Start").to(y,{y:0,opacity:1,filter:"blur(0px)",duration:.3,ease:"sine.inOut"},"wave3Start"));let R=i.flatMap(e=>e.successStates);R.length>0&&r.to(R,{opacity:0,duration:.1,ease:"power3.in"},"afterWaves+=0.2"),T.length>0&&r.to(T,{opacity:0,scale:.3,duration:.1,ease:"power3.in"},"<"),h.length>0&&r.to(h,{strokeDashoffset:e=>{if(h[e])try{return h[e].getTotalLength()}catch{return 0}return 0},duration:.3,ease:"power3.in"},"-=0.05"),u&&p&&r.to([u,p],{scale:0,x:"140px",y:"-20px",opacity:0,duration:.1,ease:"power3.in"}),y&&r.to(y,{opacity:0,filter:"blur(5px)",duration:.1,ease:"power3.in"},"<"),d&&r.to(d,{...c("storeFoundation"),opacity:1,duration:.2,ease:"power3.in"},"<"),S&&r.to(S,{...c("grid"),duration:.3,ease:"power3.out"},"<"),m&&(r.to(m,{opacity:1,filter:"blur(0px)",duration:.3,ease:"power3.out",onStart:G},"-=0.1"),r.to(m,{opacity:0,filter:"blur(10px)",scale:1,delay:.5,duration:.2,ease:"power3.in"})),v&&r.to(v,{opacity:1,filter:"blur(0px)",duration:.2,scale:1.2,ease:"power3.out"}),F&&r.to(F,{scale:1.01,duration:1,ease:"power3.out"},"-=0.2"),g.refresh(),console.log("\u2713 Animation timeline complete!"),window.addEventListener("resize",()=>{g.refresh()})});})();
1
+ "use strict";
2
+ (() => {
3
+ // bin/live-reload.js
4
+ if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
5
+ new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
6
+ "change",
7
+ () => location.reload()
8
+ );
9
+ } else {
10
+ }
11
+
12
+ // src/playbook-2026/index.ts
13
+ document.addEventListener("DOMContentLoaded", () => {
14
+ const gsap = window.gsap;
15
+ if (!gsap) {
16
+ console.error("ERROR: GSAP not loaded!");
17
+ return;
18
+ }
19
+ const ScrollTrigger = window.ScrollTrigger;
20
+ if (ScrollTrigger) {
21
+ gsap.registerPlugin(ScrollTrigger);
22
+ }
23
+ const errorConnectors = document.querySelectorAll("[entity-error-connector]");
24
+ const successConnectors = document.querySelectorAll("[entity-success-connector]");
25
+ const entityNames = document.querySelectorAll("[entity-name]");
26
+ if (entityNames.length === 0) {
27
+ console.error("ERROR: No entities found with [entity-name] attribute");
28
+ return;
29
+ }
30
+ const store = document.querySelector("[playbook='store']");
31
+ const storeFoundation = document.querySelector("[playbook='store-foundation']");
32
+ const foundationBase = document.querySelector("[playbook='foundation-base']");
33
+ const spacer = document.querySelector("[playbook='spacer']");
34
+ const title1 = document.querySelector("[playbook='title-1']");
35
+ const title2 = document.querySelector("[playbook='title-2']");
36
+ const title3 = document.querySelector("[playbook='title-3']");
37
+ const counter = document.querySelector("[playbook='counter']");
38
+ const counterText = document.querySelector("[playbook='counter-text']");
39
+ const grid = document.querySelector("[playbook='grid']");
40
+ const question = document.querySelector("[playbook='question']");
41
+ const button = document.querySelector("[playbook='button']");
42
+ const counterValue = { value: 2341100 };
43
+ if (counterText) {
44
+ counterText.textContent = "2341700";
45
+ }
46
+ let counterAnimation = null;
47
+ const startCounterAnimation = () => {
48
+ if (counterAnimation) counterAnimation.kill();
49
+ counterAnimation = gsap.timeline({ repeat: -1 });
50
+ if (counterText) {
51
+ counterAnimation.to(counterValue, {
52
+ value: 2341728,
53
+ duration: 20,
54
+ ease: "power2.out",
55
+ onUpdate: () => {
56
+ counterText.textContent = Math.floor(counterValue.value).toLocaleString();
57
+ }
58
+ }).set(counterValue, { value: 2341100 });
59
+ }
60
+ };
61
+ const pairs = [];
62
+ entityNames.forEach((nameEl) => {
63
+ const id = nameEl.getAttribute("entity-name");
64
+ if (!id) return;
65
+ const matchingSuccessConnector = Array.from(successConnectors).find(
66
+ (connector) => connector.getAttribute("entity-success-connector") === id
67
+ );
68
+ const matchingErrorConnector = Array.from(errorConnectors).find(
69
+ (connector) => connector.getAttribute("entity-error-connector") === id
70
+ );
71
+ if (matchingSuccessConnector) {
72
+ const successPath = matchingSuccessConnector.querySelector("path");
73
+ const errorPath = matchingErrorConnector?.querySelector("path") || null;
74
+ const successStates = Array.from(nameEl.querySelectorAll('[entity-state="success"]'));
75
+ const errorStates = Array.from(nameEl.querySelectorAll('[entity-state="error"]'));
76
+ if (successPath) {
77
+ pairs.push({
78
+ name: nameEl,
79
+ connector: matchingSuccessConnector,
80
+ path: successPath,
81
+ errorConnector: matchingErrorConnector || null,
82
+ errorPath,
83
+ successState: successStates[0] || null,
84
+ successStates,
85
+ errorStates,
86
+ id
87
+ });
88
+ }
89
+ }
90
+ });
91
+ if (pairs.length === 0) {
92
+ console.error("ERROR: No pairs created!");
93
+ return;
94
+ }
95
+ console.log(`\u2713 Created ${pairs.length} animation pairs`);
96
+ const getBreakpointValues = (breakpointName) => {
97
+ const width = window.innerWidth;
98
+ const breakpoints = {
99
+ storeFoundation: {
100
+ mobile: { scale: 3.8, x: "-53px", y: "-24px" },
101
+ tablet: { scale: 3, x: "0px", y: "-100px" },
102
+ desktop: { scale: 2.8, x: "-400px", y: "-50px" }
103
+ },
104
+ grid: {
105
+ mobile: { scale: 1.5, x: "30px" },
106
+ tablet: { scale: 1.8, x: "45px" },
107
+ desktop: { scale: 2.1, x: "60px" }
108
+ },
109
+ counter: {
110
+ mobile: { scale: 1, y: "-100px" },
111
+ tablet: { scale: 1.1, y: "-180px" },
112
+ desktop: { scale: 1.2, y: "-100px" }
113
+ },
114
+ question: {
115
+ mobile: { scale: 1, y: "-100px" },
116
+ tablet: { scale: 1.1, y: "-180px" },
117
+ desktop: { scale: 1.2, y: "-100px" }
118
+ },
119
+ spcerSet: {
120
+ mobile: { height: "20px" },
121
+ tablet: { height: "100px" },
122
+ desktop: { height: "240px" }
123
+ },
124
+ storeAndStoreFoundationInitial: {
125
+ mobile: { scale: 3, x: "-40px", y: "20px" },
126
+ tablet: { scale: 2, x: "0px", y: "0px" },
127
+ desktop: { scale: 1.5, x: "0px", y: "0px" }
128
+ },
129
+ storeAndStoreFoundationFinal: {
130
+ mobile: { scale: 1, x: "0px", y: "0px" },
131
+ tablet: { scale: 1, x: "0px", y: "0px" },
132
+ desktop: { scale: 1, x: "0px", y: "0px" }
133
+ }
134
+ // Add more element configs as needed
135
+ };
136
+ const getDeviceType = () => {
137
+ if (width < 480) return "mobile";
138
+ if (width < 992) return "tablet";
139
+ return "desktop";
140
+ };
141
+ return breakpoints[breakpointName]?.[getDeviceType()] || {};
142
+ };
143
+ const shuffledPairs = pairs.sort(() => Math.random() - 0.5);
144
+ const allPaths = shuffledPairs.map((p) => p.path).filter(Boolean);
145
+ const allNames = shuffledPairs.map((p) => p.name).filter(Boolean);
146
+ const allSuccessStatesStep4 = shuffledPairs.flatMap((p) => p.successStates);
147
+ gsap.set([...errorConnectors, ...successConnectors], { opacity: 0 });
148
+ if (store && storeFoundation) gsap.set([store, storeFoundation], { ...getBreakpointValues("storeAndStoreFoundationInitial") });
149
+ if (foundationBase) gsap.set(foundationBase, { opacity: 0 });
150
+ if (entityNames.length > 0) gsap.set(entityNames, { opacity: 0, scale: 0.5 });
151
+ if (spacer) gsap.set(spacer, { ...getBreakpointValues("spcerSet") });
152
+ if (grid) gsap.set(grid, { scale: 2 });
153
+ if (question) gsap.set(question, { ...getBreakpointValues("question") });
154
+ if (counter) gsap.set(counter, { ...getBreakpointValues("counter") });
155
+ if (title1) gsap.set(title1, { y: 0 });
156
+ if (title2) gsap.set(title2, { y: 40, opacity: 0, filter: "blur(10px)" });
157
+ if (title3) gsap.set(title3, { y: 40, opacity: 0, filter: "blur(10px)" });
158
+ shuffledPairs.forEach(({ path, errorPath, successStates, errorStates }) => {
159
+ if (!path) return;
160
+ try {
161
+ const length = path.getTotalLength();
162
+ gsap.set(path, {
163
+ strokeDasharray: length,
164
+ strokeDashoffset: length
165
+ });
166
+ } catch (e) {
167
+ console.warn("WARNING: Could not get SVG path length");
168
+ }
169
+ if (errorPath) gsap.set(errorPath, { opacity: 0 });
170
+ successStates.forEach((state) => {
171
+ if (state) gsap.set(state, { opacity: 0 });
172
+ });
173
+ errorStates.forEach((state) => {
174
+ if (state) gsap.set(state, { opacity: 0 });
175
+ });
176
+ });
177
+ const tl = gsap.timeline({
178
+ scrollTrigger: {
179
+ trigger: "#scroll",
180
+ start: "top top",
181
+ end: "+=5000vh",
182
+ scrub: 2.5,
183
+ pin: true,
184
+ fastScrollSensitivity: 1
185
+ }
186
+ });
187
+ if (store && storeFoundation) {
188
+ tl.to([store, storeFoundation], { ...getBreakpointValues("storeAndStoreFoundationFinal") });
189
+ }
190
+ if (spacer) {
191
+ tl.to(spacer, {
192
+ height: "0px",
193
+ duration: 0.4,
194
+ ease: "power3.out"
195
+ }, "<");
196
+ }
197
+ if (grid) {
198
+ tl.to(grid, {
199
+ scale: 1,
200
+ duration: 0.4,
201
+ ease: "power3.out"
202
+ }, "<");
203
+ }
204
+ if (foundationBase) {
205
+ tl.to(foundationBase, {
206
+ opacity: 1,
207
+ duration: 0.2,
208
+ ease: "power3.out"
209
+ }, "-=0.1");
210
+ }
211
+ if (successConnectors.length > 0) {
212
+ tl.set(successConnectors, { opacity: 1 });
213
+ }
214
+ if (allPaths.length > 0) {
215
+ tl.to(allPaths, {
216
+ strokeDashoffset: 0,
217
+ duration: 0.8,
218
+ // Increased from 0.3 to see full path
219
+ ease: "power3.out"
220
+ }, "+=0.05");
221
+ }
222
+ if (allNames.length > 0) {
223
+ tl.to(allNames, {
224
+ opacity: 1,
225
+ scale: 1,
226
+ duration: 0.2,
227
+ ease: "power3.out",
228
+ delay: 0.2
229
+ }, "-=0.6");
230
+ }
231
+ if (allSuccessStatesStep4.length > 0) {
232
+ tl.to(allSuccessStatesStep4, {
233
+ opacity: 1,
234
+ duration: 0.2,
235
+ ease: "power3.out"
236
+ }, "-=0.6");
237
+ }
238
+ tl.add(() => {
239
+ console.log("\u2705 Step 4 Complete: All pairs set to SUCCESS state");
240
+ shuffledPairs.forEach((pair) => {
241
+ gsap.set(pair.path, { opacity: 1 });
242
+ gsap.set(pair.connector, { opacity: 1 });
243
+ pair.successStates.forEach((state) => {
244
+ gsap.set(state, { opacity: 1 });
245
+ });
246
+ if (pair.errorPath) {
247
+ gsap.set(pair.errorPath, { opacity: 0 });
248
+ }
249
+ if (pair.errorConnector) {
250
+ gsap.set(pair.errorConnector, { opacity: 0 });
251
+ }
252
+ pair.errorStates.forEach((state) => {
253
+ gsap.set(state, { opacity: 0 });
254
+ });
255
+ });
256
+ }, "-=0.2");
257
+ if (title1 && title2) {
258
+ tl.to(title1, {
259
+ y: -40,
260
+ opacity: 0,
261
+ filter: "blur(10px)",
262
+ duration: 0.3,
263
+ ease: "sine.inOut"
264
+ }).to(title2, {
265
+ y: 0,
266
+ opacity: 1,
267
+ filter: "blur(0px)",
268
+ duration: 0.3,
269
+ ease: "sine.inOut"
270
+ }, "-=0.1");
271
+ }
272
+ tl.addLabel("beforeWaves");
273
+ tl.add(() => {
274
+ console.log("\u{1F3AC} Initializing all pairs to SUCCESS state");
275
+ shuffledPairs.forEach((pair) => {
276
+ gsap.set(pair.path, { opacity: 1 });
277
+ if (pair.errorPath) gsap.set(pair.errorPath, { opacity: 0 });
278
+ if (pair.errorConnector) gsap.set(pair.errorConnector, { opacity: 0 });
279
+ pair.successStates.forEach((state) => gsap.set(state, { opacity: 1 }));
280
+ pair.errorStates.forEach((state) => gsap.set(state, { opacity: 0 }));
281
+ });
282
+ }, "beforeWaves");
283
+ tl.addLabel("step6Start", "+=0.2");
284
+ const pairsWithErrors = shuffledPairs.filter((p) => p.errorConnector && p.errorPath);
285
+ if (pairsWithErrors.length === 0) {
286
+ console.warn("WARNING: No pairs with error states found");
287
+ } else {
288
+ console.log(`\u2713 Found ${pairsWithErrors.length} pairs with error states`);
289
+ }
290
+ const failurePatterns = [
291
+ ["content", "inventory"],
292
+ // Wave 1
293
+ ["products", "delivery"],
294
+ // Wave 2
295
+ ["returns", "promises"]
296
+ // Wave 3
297
+ ];
298
+ const animateFailure = (pair) => {
299
+ if (!pair || !pair.path) return;
300
+ gsap.to(pair.path, {
301
+ opacity: 0,
302
+ duration: 0.3,
303
+ ease: "power3.in"
304
+ });
305
+ if (pair.errorPath) {
306
+ gsap.to(pair.errorPath, {
307
+ opacity: 1,
308
+ duration: 0.3,
309
+ ease: "power3.out"
310
+ });
311
+ }
312
+ if (pair.errorConnector) {
313
+ gsap.to(pair.errorConnector, {
314
+ opacity: 1,
315
+ duration: 0.15,
316
+ ease: "power3.out"
317
+ });
318
+ }
319
+ if (pair.successStates && pair.successStates.length > 0) {
320
+ gsap.to(pair.successStates, {
321
+ opacity: 0,
322
+ duration: 0.3,
323
+ ease: "power3.in"
324
+ });
325
+ }
326
+ if (pair.errorStates && pair.errorStates.length > 0) {
327
+ gsap.to(pair.errorStates, {
328
+ opacity: 1,
329
+ duration: 0.3,
330
+ ease: "power3.out"
331
+ });
332
+ }
333
+ };
334
+ const animateSuccess = (pair) => {
335
+ if (!pair || !pair.path) return;
336
+ if (pair.errorPath) {
337
+ gsap.to(pair.errorPath, {
338
+ opacity: 0,
339
+ duration: 0.3,
340
+ ease: "power3.in"
341
+ });
342
+ }
343
+ if (pair.errorConnector) {
344
+ gsap.to(pair.errorConnector, {
345
+ opacity: 0,
346
+ duration: 0.15,
347
+ ease: "power3.in"
348
+ });
349
+ }
350
+ gsap.to(pair.path, {
351
+ opacity: 1,
352
+ duration: 0.3,
353
+ ease: "power3.out"
354
+ });
355
+ if (pair.errorStates && pair.errorStates.length > 0) {
356
+ gsap.to(pair.errorStates, {
357
+ opacity: 0,
358
+ duration: 0.3,
359
+ ease: "power3.in"
360
+ });
361
+ }
362
+ if (pair.successStates && pair.successStates.length > 0) {
363
+ gsap.to(pair.successStates, {
364
+ opacity: 1,
365
+ duration: 0.3,
366
+ ease: "power3.out"
367
+ });
368
+ }
369
+ };
370
+ if (pairsWithErrors.length > 0) {
371
+ tl.addLabel("wave1Start", "step6Start");
372
+ tl.add(() => {
373
+ console.log(`\u{1F30A} Wave 1 triggered!`);
374
+ const failureIds = failurePatterns[0];
375
+ const toFail = pairsWithErrors.filter((p) => failureIds.includes(p.id.toLowerCase()));
376
+ const toSucceed = pairsWithErrors.filter((p) => !failureIds.includes(p.id.toLowerCase()));
377
+ console.log(` Failing: ${toFail.map((p) => p.id).join(", ")}`);
378
+ console.log(` Succeeding: ${toSucceed.map((p) => p.id).join(", ")}`);
379
+ toFail.forEach((pair) => animateFailure(pair));
380
+ toSucceed.forEach((pair) => animateSuccess(pair));
381
+ }, "wave1Start");
382
+ tl.to({}, { duration: 0.5 }, "wave1Start");
383
+ tl.addLabel("wave2Start", "+=0.2");
384
+ tl.add(() => {
385
+ console.log(`\u{1F30A} Wave 2 triggered!`);
386
+ const failureIds = failurePatterns[1];
387
+ const toFail = pairsWithErrors.filter((p) => failureIds.includes(p.id.toLowerCase()));
388
+ const toSucceed = pairsWithErrors.filter((p) => !failureIds.includes(p.id.toLowerCase()));
389
+ console.log(` Failing: ${toFail.map((p) => p.id).join(", ")}`);
390
+ console.log(` Succeeding: ${toSucceed.map((p) => p.id).join(", ")}`);
391
+ toFail.forEach((pair) => animateFailure(pair));
392
+ toSucceed.forEach((pair) => animateSuccess(pair));
393
+ }, "wave2Start");
394
+ tl.to({}, { duration: 0.5 }, "wave2Start");
395
+ tl.addLabel("wave3Start", "+=0.2");
396
+ tl.add(() => {
397
+ console.log(`\u{1F30A} Wave 3 triggered!`);
398
+ const failureIds = failurePatterns[2];
399
+ const toFail = pairsWithErrors.filter((p) => failureIds.includes(p.id.toLowerCase()));
400
+ const toSucceed = pairsWithErrors.filter((p) => !failureIds.includes(p.id.toLowerCase()));
401
+ console.log(` Failing: ${toFail.map((p) => p.id).join(", ")}`);
402
+ console.log(` Succeeding: ${toSucceed.map((p) => p.id).join(", ")}`);
403
+ toFail.forEach((pair) => animateFailure(pair));
404
+ toSucceed.forEach((pair) => animateSuccess(pair));
405
+ }, "wave3Start");
406
+ tl.to({}, { duration: 0.5 }, "wave3Start");
407
+ tl.addLabel("afterWaves", "+=0.2");
408
+ tl.add(() => {
409
+ console.log("\u2705 All waves complete! Making all pairs SUCCESS");
410
+ pairsWithErrors.forEach((pair) => {
411
+ animateSuccess(pair);
412
+ });
413
+ }, "afterWaves");
414
+ if (title2 && title3) {
415
+ tl.to(title2, {
416
+ y: -40,
417
+ opacity: 0,
418
+ filter: "blur(10px)",
419
+ duration: 0.3,
420
+ ease: "sine.inOut"
421
+ }, "wave3Start").to(title3, {
422
+ y: 0,
423
+ opacity: 1,
424
+ filter: "blur(0px)",
425
+ duration: 0.3,
426
+ ease: "sine.inOut"
427
+ }, "wave3Start");
428
+ }
429
+ }
430
+ const allSuccessStatesStep7 = pairsWithErrors.flatMap((p) => p.successStates);
431
+ if (allSuccessStatesStep7.length > 0) {
432
+ tl.to(allSuccessStatesStep7, {
433
+ opacity: 0,
434
+ duration: 0.1,
435
+ ease: "power3.in"
436
+ }, "afterWaves+=0.2");
437
+ }
438
+ if (allNames.length > 0) {
439
+ tl.to(allNames, {
440
+ opacity: 0,
441
+ scale: 0.3,
442
+ duration: 0.1,
443
+ ease: "power3.in"
444
+ }, "<");
445
+ }
446
+ if (allPaths.length > 0) {
447
+ tl.to(allPaths, {
448
+ strokeDashoffset: (index) => {
449
+ if (allPaths[index]) {
450
+ try {
451
+ return allPaths[index].getTotalLength();
452
+ } catch (e) {
453
+ return 0;
454
+ }
455
+ }
456
+ return 0;
457
+ },
458
+ duration: 0.3,
459
+ ease: "power3.in"
460
+ }, "-=0.05");
461
+ }
462
+ if (store && foundationBase) {
463
+ tl.to([store, foundationBase], {
464
+ scale: 0,
465
+ x: "140px",
466
+ y: "-20px",
467
+ opacity: 0,
468
+ duration: 0.1,
469
+ ease: "power3.in"
470
+ });
471
+ }
472
+ if (title3) {
473
+ tl.to(title3, {
474
+ opacity: 0,
475
+ filter: "blur(5px)",
476
+ duration: 0.1,
477
+ ease: "power3.in"
478
+ }, "<");
479
+ }
480
+ if (storeFoundation) {
481
+ tl.to(storeFoundation, {
482
+ ...getBreakpointValues("storeFoundation"),
483
+ opacity: 1,
484
+ duration: 0.2,
485
+ ease: "power3.in"
486
+ }, "<");
487
+ }
488
+ if (grid) {
489
+ tl.to(grid, {
490
+ ...getBreakpointValues("grid"),
491
+ duration: 0.3,
492
+ ease: "power3.out"
493
+ }, "<");
494
+ }
495
+ if (counter) {
496
+ tl.to(counter, {
497
+ opacity: 1,
498
+ filter: "blur(0px)",
499
+ duration: 0.3,
500
+ ease: "power3.out",
501
+ onStart: startCounterAnimation
502
+ // ← Triggers independent animation
503
+ }, "-=0.1");
504
+ tl.to(counter, {
505
+ opacity: 0,
506
+ filter: "blur(10px)",
507
+ scale: 1,
508
+ delay: 0.5,
509
+ duration: 0.2,
510
+ ease: "power3.in"
511
+ });
512
+ }
513
+ if (question) {
514
+ tl.to(question, {
515
+ opacity: 1,
516
+ filter: "blur(0px)",
517
+ duration: 0.2,
518
+ scale: 1.2,
519
+ ease: "power3.out"
520
+ });
521
+ }
522
+ if (button) {
523
+ tl.to(button, {
524
+ scale: 1.01,
525
+ duration: 1,
526
+ ease: "power3.out"
527
+ }, "-=0.2");
528
+ }
529
+ ScrollTrigger.refresh();
530
+ console.log("\u2713 Animation timeline complete!");
531
+ window.addEventListener("resize", () => {
532
+ ScrollTrigger.refresh();
533
+ });
534
+ });
535
+ })();
536
+ //# sourceMappingURL=index.js.map
@@ -1 +1,110 @@
1
- [entity-state=error],[entity-state=success],[entity-error-connector]{opacity:0}[entity-success-connector]{opacity:1}[connector-wrapper]{opacity:0}#scroll{height:100dvh;width:100vw;overflow:hidden}.pin-spacer{overflow:hidden}[entity-error-connector],[entity-success-connector],[entity-name],[playbook=foundation-base]{opacity:0}[playbook=counter],[playbook=question]{opacity:0;pointer-events:none}[inner-shadow]{background-color:#3c3b3b;color:transparent;-webkit-background-clip:text;background-clip:text;text-shadow:0px 2px 3px rgba(255,255,255,.5);max-width:500px}[playbook-title]{font-size:3rem;font-family:var(--Primary);line-height:110%;letter-spacing:-.03em}@media (min-width: 992px) and (max-height: 713px){[playbook-title]{font-size:2.5rem;max-width:415px}}@media (max-width: 1199px){[playbook-main-title]{height:60px;font-size:70px}}[entity-error-connector] svg path{stroke-dasharray:4 8;animation:dashMove 1s linear infinite}@keyframes dashMove{to{stroke-dashoffset:-12}}[entity-success-connector] svg .comet-glow{animation:cometMove 2.5s linear infinite;filter:blur(4px);opacity:.7}[entity-success-connector] svg .comet{animation:cometMove 2.5s linear infinite;filter:blur(1px)}@keyframes cometMove{0%{stroke-dashoffset:0}to{stroke-dashoffset:-420}}@media (min-width: 481px) and (max-width: 768px){[inner-shadow]{max-width:450px}}@media (max-width: 480px){[inner-shadow]{max-width:244px}[playbook-title]{font-size:2.3rem}}
1
+ /* src/playbook-2026/styles.css */
2
+ [entity-state=error] {
3
+ opacity: 0;
4
+ }
5
+ [entity-state=success] {
6
+ opacity: 0;
7
+ }
8
+ [entity-error-connector] {
9
+ opacity: 0;
10
+ }
11
+ [entity-success-connector] {
12
+ opacity: 1;
13
+ }
14
+ [connector-wrapper] {
15
+ opacity: 0;
16
+ }
17
+ #scroll {
18
+ height: 100dvh;
19
+ width: 100vw;
20
+ overflow: hidden;
21
+ }
22
+ .pin-spacer {
23
+ overflow: hidden;
24
+ }
25
+ [entity-error-connector] {
26
+ opacity: 0;
27
+ }
28
+ [entity-success-connector] {
29
+ opacity: 0;
30
+ }
31
+ [entity-name] {
32
+ opacity: 0;
33
+ }
34
+ [playbook=foundation-base] {
35
+ opacity: 0;
36
+ }
37
+ [playbook=counter] {
38
+ opacity: 0;
39
+ pointer-events: none;
40
+ }
41
+ [playbook=question] {
42
+ opacity: 0;
43
+ pointer-events: none;
44
+ }
45
+ [inner-shadow] {
46
+ background-color: #3c3b3b;
47
+ color: transparent;
48
+ -webkit-background-clip: text;
49
+ background-clip: text;
50
+ text-shadow: 0px 2px 3px rgba(255, 255, 255, 0.5);
51
+ max-width: 500px;
52
+ }
53
+ [playbook-title] {
54
+ font-size: 3rem;
55
+ font-family: var(--Primary);
56
+ line-height: 110%;
57
+ letter-spacing: -0.03em;
58
+ }
59
+ @media (min-width: 992px) and (max-height: 713px) {
60
+ [playbook-title] {
61
+ font-size: 2.5rem;
62
+ max-width: 415px;
63
+ }
64
+ }
65
+ @media (max-width: 1199px) {
66
+ [playbook-main-title] {
67
+ height: 60px;
68
+ font-size: 70px;
69
+ }
70
+ }
71
+ [entity-error-connector] svg path {
72
+ stroke-dasharray: 4 8;
73
+ animation: dashMove 1s linear infinite;
74
+ }
75
+ @keyframes dashMove {
76
+ to {
77
+ stroke-dashoffset: -12;
78
+ }
79
+ }
80
+ [entity-success-connector] svg .comet-glow {
81
+ animation: cometMove 2.5s linear infinite;
82
+ filter: blur(4px);
83
+ opacity: 0.7;
84
+ }
85
+ [entity-success-connector] svg .comet {
86
+ animation: cometMove 2.5s linear infinite;
87
+ filter: blur(1px);
88
+ }
89
+ @keyframes cometMove {
90
+ from {
91
+ stroke-dashoffset: 0;
92
+ }
93
+ to {
94
+ stroke-dashoffset: -420;
95
+ }
96
+ }
97
+ @media (min-width: 481px) and (max-width: 768px) {
98
+ [inner-shadow] {
99
+ max-width: 450px;
100
+ }
101
+ }
102
+ @media (max-width: 480px) {
103
+ [inner-shadow] {
104
+ max-width: 244px;
105
+ }
106
+ [playbook-title] {
107
+ font-size: 2.3rem;
108
+ }
109
+ }
110
+ /*# sourceMappingURL=styles.css.map */