@travel-match/ui 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/components/HowItWorksSteps/HowItWorksSteps.cjs +1 -1
  2. package/dist/components/HowItWorksSteps/HowItWorksSteps.cjs.map +1 -1
  3. package/dist/components/HowItWorksSteps/HowItWorksSteps.js +1 -1
  4. package/dist/components/HowItWorksSteps/HowItWorksSteps.js.map +1 -1
  5. package/dist/components/LogoAnimation/LogoAnimation.cjs +2 -0
  6. package/dist/components/LogoAnimation/LogoAnimation.cjs.map +1 -0
  7. package/dist/components/LogoAnimation/LogoAnimation.js +202 -0
  8. package/dist/components/LogoAnimation/LogoAnimation.js.map +1 -0
  9. package/dist/components/LogoAnimation/LogoAnimationArtwork.cjs +2 -0
  10. package/dist/components/LogoAnimation/LogoAnimationArtwork.cjs.map +1 -0
  11. package/dist/components/LogoAnimation/LogoAnimationArtwork.js +57 -0
  12. package/dist/components/LogoAnimation/LogoAnimationArtwork.js.map +1 -0
  13. package/dist/components/LogoAnimation/motion.cjs +2 -0
  14. package/dist/components/LogoAnimation/motion.cjs.map +1 -0
  15. package/dist/components/LogoAnimation/motion.js +180 -0
  16. package/dist/components/LogoAnimation/motion.js.map +1 -0
  17. package/dist/components/PackageAnimation/PackageAnimation.cjs +1 -1
  18. package/dist/components/PackageAnimation/PackageAnimation.cjs.map +1 -1
  19. package/dist/components/PackageAnimation/PackageAnimation.js +1 -1
  20. package/dist/components/PackageAnimation/PackageAnimation.js.map +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.cts +31 -2
  23. package/dist/index.d.ts +31 -2
  24. package/dist/index.js +100 -99
  25. package/dist/styles.css +1 -1
  26. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoAnimationArtwork.js","names":["PLANE_D","PIN_D","ROUTE","LEG","ANCHOR","DOT","LEG_POLY","LEG_POLY2","catmullRom","d","p","i","a","b","c","e","ROUTE_D","ROUTE_X","LEG_D"],"sources":["../../../src/components/LogoAnimation/LogoAnimationArtwork.ts"],"sourcesContent":["/* Shapes of the logo animation, from the approved animation demo (TravelMatch logo animation, \"TMLogo\").\n Everything is drawn in the 40×52 box of the mark (LogoArtwork.tsx); the landed pose is the mark itself (`LogoMark`).\n Path data is verbatim — do not edit by hand. */\n\ntype Point = readonly [number, number];\n\n/** The paper plane alone: the part of the mark that flies. */\nexport const PLANE_D =\n 'M22.3252 24.4694C22.3252 24.4694 22.4142 25.3934 22.5202 26.2554C22.7902 28.4354 22.7862 28.5414 22.4152 29.0094C22.0352 29.4884 21.8652 29.6294 21.7782 29.5384C21.7092 29.4664 21.3502 28.6554 20.3172 26.2344C19.8222 25.0744 19.1002 23.7904 18.9422 23.7894C18.9162 23.7894 18.0692 24.4494 17.0592 25.2574L15.2222 26.7264L15.2482 27.9014L15.2632 28.5794C15.2702 28.8964 15.1462 29.2024 14.9172 29.4224C14.8712 29.4664 14.7752 29.5504 14.7202 29.5714C14.6482 29.5994 14.4742 29.5544 14.4402 29.4644C14.1612 28.7424 14.1312 28.6764 14.0762 28.6144L11.3482 25.7904L11.1282 25.6494C10.9222 25.5174 10.9202 25.2174 11.1242 25.0824C11.4022 24.8984 11.7392 24.8284 12.0672 24.8854L12.4872 24.9594C12.9992 25.0494 13.5182 25.1434 13.6412 25.1684C13.8472 25.2104 13.9902 25.0884 15.5052 23.5834C16.4072 22.6864 17.1442 21.9164 17.1412 21.8724C17.1302 21.6784 16.1102 20.9604 14.9312 20.3174C12.5572 19.0234 11.5742 18.4554 11.5742 18.3794C11.5742 18.2594 12.4242 17.7504 12.6982 17.7064C12.8502 17.6824 13.7132 17.8384 14.8982 18.1044L16.8482 18.5424L18.5762 18.8914C19.5452 19.1144 19.7972 19.1654 19.9332 19.1654C20.0192 19.1654 20.5312 18.7914 21.0712 18.3334C23.1202 16.5934 23.6702 16.2134 24.5132 15.9544C25.2132 15.7384 25.5812 15.7514 25.8312 16.0004C26.0562 16.2524 26.0242 16.5594 25.6252 17.3874C25.3842 17.8874 25.2062 18.1124 24.2982 19.0174C23.7112 19.6024 22.9422 20.3424 22.5892 20.6624L21.9472 21.2434L22.0292 21.9484L22.3292 24.4704L22.3252 24.4694Z';\n\n/** The pin alone (the mark without the plane): revealed by the line the plane draws. */\nexport const PIN_D =\n 'M14.0762 28.6144C14.0412 28.5754 13.8212 28.7204 13.5792 28.9404C12.6222 29.8134 11.2312 30.5604 10.0332 30.8454C8.65123 31.1744 7.01323 31.0224 5.79123 30.4514C2.92923 29.1144 0.804227 25.4994 0.103227 20.7734C-0.0497729 19.7414 -0.0287729 16.9264 0.140227 15.8364C0.960227 10.5364 3.82723 6.02138 8.21723 3.11138C10.3782 1.67938 12.5172 0.824384 15.2052 0.320384C15.2052 0.320384 17.1452 0.0133843 18.4022 0.000384324C19.6582 -0.0116157 21.6212 0.261384 21.6212 0.261384C23.6042 0.611384 24.9552 1.04838 26.6802 1.89538C32.2512 4.63138 35.9422 9.66838 36.8982 15.8374C37.0982 17.1274 37.0782 19.3074 36.8562 20.5774C36.2052 24.2874 34.6432 27.5644 31.6092 31.5814C29.9942 33.7194 28.6262 35.2914 25.7492 38.3174C25.0122 39.0924 24.1402 40.0094 23.8132 40.3534C21.8852 42.3834 21.0552 43.3834 20.7252 44.0734C20.4982 44.5484 20.4822 44.6404 20.4842 45.4444C20.4862 46.1554 20.5182 46.3844 20.6662 46.7564C20.9162 47.3824 21.5052 48.0024 22.1492 48.3184C22.6002 48.5404 22.7632 48.5764 23.4212 48.6024C24.0692 48.6284 24.2542 48.6054 24.7302 48.4404C25.8402 48.0544 26.7512 47.2604 28.5242 45.1304C29.6172 43.8174 31.2162 42.1474 31.9532 41.5504L32.4382 41.1564L32.3932 40.6214C32.3042 39.5574 32.6222 38.6544 33.3602 37.8824C34.7502 36.4284 36.9732 36.4274 38.3632 37.8824C38.8442 38.3854 39.0682 38.7824 39.2372 39.4274C39.7142 41.2564 38.5902 43.1914 36.7662 43.6814C36.2222 43.8274 35.3712 43.7944 34.8082 43.6054C34.3372 43.4464 34.3062 43.4454 34.1082 43.5754C33.6692 43.8624 31.7202 45.8964 30.6282 47.2064C28.9112 49.2664 27.8682 50.1944 26.5232 50.8554C25.1112 51.5494 23.6002 51.7284 22.1502 51.3724C20.9452 51.0774 19.5702 50.2404 18.7512 49.3034C18.5802 49.1084 17.9402 48.4164 17.3302 47.7654C15.0412 45.3284 12.1172 41.8154 9.95323 38.9044C8.73323 37.2624 7.24823 35.1324 7.12923 34.8544C6.90323 34.3224 7.06323 33.6224 7.50523 33.2124C8.10823 32.6534 9.24323 32.7894 9.72823 33.4794C9.84223 33.6414 10.3312 34.3384 10.8152 35.0284C12.4422 37.3464 14.2312 39.6604 16.1142 41.8814C17.2302 43.1974 17.6012 43.6044 17.6862 43.6044C17.7222 43.6044 17.8142 43.4374 17.8902 43.2324C18.3712 41.9324 18.8812 41.3094 23.4552 36.4394C26.8352 32.8404 27.4492 32.1484 28.7692 30.4444C31.9322 26.3644 33.5292 23.0424 33.9762 19.6154C34.1262 18.4634 34.1272 17.9024 33.9812 16.6584C33.7422 14.6194 33.2932 13.1444 32.3572 11.3224C30.2832 7.28338 26.1822 4.16338 21.7752 3.27138C19.3992 2.79038 16.9572 2.84638 14.6542 3.43338C8.66023 4.96138 4.18023 9.84338 3.12523 15.9964C2.92023 17.1944 2.93523 19.6144 3.15723 20.8944C3.80423 24.6334 5.39323 27.2594 7.42223 27.9434C8.38123 28.2664 9.69823 28.0674 10.7622 27.4364C11.2872 27.1254 12.2002 26.3044 12.0832 26.2494C12.0402 26.2294 11.7092 26.0224 11.3482 25.7904Z';\n\n/** Centreline of the line the plane draws: dot → bottom → right side → top → left side → turn right → landing. */\nexport const ROUTE: readonly Point[] = [\n [35.85, 40.1], [33.2, 42.4], [31.2, 44.4], [29, 46.8], [26.6, 49], [24.2, 50.1], [22, 49.8], [20.3, 48.4], [19.4, 46.2],\n [19.6, 43.9], [21.6, 41.2], [24.6, 37.4], [28, 33.6], [30.6, 30], [33.2, 25.6], [34.9, 21.2], [35.4, 17.6], [34.6, 13],\n [32.4, 8.8], [28.8, 5.2], [24, 2.4], [18.4, 1.5], [13.2, 2.2], [8.6, 4.6], [4.8, 8.4], [2.4, 13], [1.5, 18], [1.9, 22.8],\n [3.4, 26.6], [5.8, 29], [8.8, 29.6], [11.2, 28.6], [12.8, 27.6],\n];\n\n/** Lower-left branch: root at the bottom junction → free end. */\nexport const LEG: readonly Point[] = [[20.0, 49.0], [18.6, 47.4], [16.2, 44.6], [13.4, 41.2], [10.6, 37.6], [8.3, 34.2], [6.4, 31.4]];\n\n/** Tail anchor of the plane and its heading (degrees) in the logo. */\nexport const ANCHOR: Point = [12.8, 27.6];\nexport const HEAD0 = -41;\n\n/** Centre of the dot the plane takes off from. */\nexport const DOT: Point = [35.85, 40.1];\n\n/** Area of the lower-left branch: cut out of the main line (`LEG_POLY`) and given to the branch (`LEG_POLY2`). */\nexport const LEG_POLY = 'M18.05 42.95 C17.4 44.6 17.55 47.7 19.65 50.2 L-6 50.3 L-6 31.8 L14 31.8 Z';\nexport const LEG_POLY2 = 'M18.3 42.95 C17.65 44.6 17.8 47.7 19.9 50.2 L-6 50.3 L-6 31.8 L14 31.8 Z';\n\n/** Smooth path through the points (Catmull-Rom as cubic Béziers). */\nfunction catmullRom(p: readonly Point[]): string {\n let d = `M${p[0][0]} ${p[0][1]}`;\n for (let i = 0; i < p.length - 1; i++) {\n const a = p[i - 1] || p[i];\n const b = p[i];\n const c = p[i + 1];\n const e = p[i + 2] || c;\n d += `C${(b[0] + (c[0] - a[0]) / 6).toFixed(3)} ${(b[1] + (c[1] - a[1]) / 6).toFixed(3)} ${(c[0] - (e[0] - b[0]) / 6).toFixed(3)} ${(c[1] - (e[1] - b[1]) / 6).toFixed(3)} ${c[0]} ${c[1]}`;\n }\n return d;\n}\n\n/** The route the plane follows (measured, never painted). */\nexport const ROUTE_D = /* @__PURE__ */ catmullRom(ROUTE);\n/** The route plus a short run-out under the plane's tail: the stroke of the mask that reveals the line. */\nexport const ROUTE_X = /* @__PURE__ */ catmullRom(ROUTE.concat([[14.5, 26.55]]));\n/** The branch centreline: the stroke of the mask that reveals the branch. */\nexport const LEG_D = /* @__PURE__ */ catmullRom(LEG);\n"],"mappings":";;AAOA,IAAaA,IACX,q7CAGWC,IACX,8pFAGWC,IAA0B;CACrC,CAAC,OAAO,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,IAAI,IAAI;CAAG,CAAC,MAAM,EAAE;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,IAAI,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CACtH,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,IAAI,IAAI;CAAG,CAAC,MAAM,EAAE;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,EAAE;CACrH,CAAC,MAAM,GAAG;CAAG,CAAC,MAAM,GAAG;CAAG,CAAC,IAAI,GAAG;CAAG,CAAC,MAAM,GAAG;CAAG,CAAC,MAAM,GAAG;CAAG,CAAC,KAAK,GAAG;CAAG,CAAC,KAAK,GAAG;CAAG,CAAC,KAAK,EAAE;CAAG,CAAC,KAAK,EAAE;CAAG,CAAC,KAAK,IAAI;CACvH,CAAC,KAAK,IAAI;CAAG,CAAC,KAAK,EAAE;CAAG,CAAC,KAAK,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;AAChE,GAGaC,IAAwB;CAAC,CAAC,IAAM,EAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,MAAM,IAAI;CAAG,CAAC,KAAK,IAAI;CAAG,CAAC,KAAK,IAAI;AA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==`function`;function g(e,n,i){let a=t(i/n)*c,o=Math.min(399,Math.floor(a));return r(e[o],e[o+1],a-o)}function _(e){let{route:n,routeMask:r,leg:i}=e;if(!h(n)||!h(r)||!h(i))return null;if(m)return m;let a=n.getTotalLength(),s=r.getTotalLength(),u=i.getTotalLength();if(!(a>0)||!(u>0))return null;let d=0;{let e=1e9;for(let t=a*.7;t<a;t+=.2){let r=n.getPointAtLength(t),i=Math.hypot(r.x-5.8,r.y-29);i<e&&(e=i,d=t)}}let f=e=>{let t=n.getPointAtLength(Math.max(0,e-.35)),r=n.getPointAtLength(Math.min(a,e+.35));return Math.atan2(r.y-t.y,r.x-t.x)*180/Math.PI},p=[];{let e=null;for(let t=0;t<=c;t++){let n=f(a*t/c);if(e!==null){for(;n-e>180;)n-=360;for(;n-e<-180;)n+=360}p.push(n),e=n}}{let e=Math.round(2.2/(a/c)),t=p.slice();for(let n=0;n<=c;n++){let r=0,i=0;for(let a=-e;a<=e;a++){let e=Math.min(c,Math.max(0,n+a));r+=t[e],i++}p[n]=r/i}}let _=e=>g(p,a,e),v=_(a),y=-41;for(;y-v>180;)y-=360;for(;y-v<-180;)y+=360;let b=(e,t)=>{let r=1e9,i=0;for(let o=0;o<a;o+=.2){let a=n.getPointAtLength(o),s=Math.hypot(a.x-e,a.y-t);s<r&&(r=s,i=o)}return i},x=e=>{let t=Math.max(0,e-1),n=Math.min(a,e+1);return Math.abs(_(n)-_(t))/(n-t)},S=e=>(.22+.78*o(t(e/16)))/(1+x(e)/20)*Math.max(.05,Math.sqrt(t((a-e)/15))),C=b(18.9,46.6),w=[0];for(let e=1;e<=l;e++){let t=a*(e-1)/l,n=a*e/l;w.push(w[e-1]+(n-t)/S((t+n)/2))}let T=b(30,6.2),E=(e,t)=>{let n=1e9,r=0;for(let a=0;a<u;a+=.1){let o=i.getPointAtLength(a),s=Math.hypot(o.x-e,o.y-t);s<n&&(n=s,r=a)}return r},D=E(18.6,47.2),O=E(7.4,33)+.4;return m={RL:a,RX:s,LL:u,turnL:d,H:p,finalTheta:y,TT:w,jL:C,topL:T,l0:D,l1:O},m}function v(e){e.final.style.display=``,e.parts.style.display=`none`,e.plane.style.display=`none`,e.trail.forEach(e=>e.style.opacity=`0`)}function y(c,m,h){let v=_(c);if(!v)return null;let{RL:y,RX:b,LL:x,turnL:S,H:C,finalTheta:w,TT:T,jL:E,topL:D,l0:O,l1:k}=v,{route:A,routeMask:j,leg:M,dot:N,plane:P,parts:F,final:I,trail:L,routeCap:R,legCap:z}=c,B=e.ANCHOR,V=m===`loop`?.3:.4,H=e=>g(C,y,e),U=e=>{e=t(e)*T[l];let n=0,r=l;for(;r-n>1;){let t=n+r>>1;T[t]<e?n=t:r=t}let i=(e-T[n])/(T[r]-T[n]||1);return(n+i)/l};function W(e,t){let i=A.getPointAtLength(e),a=o(n(e,S-7,y)),s=r(H(e),w,a)- -41,c=r(.42,1,e/y)*t;a>=1&&t>=1?P.removeAttribute(`transform`):P.setAttribute(`transform`,`translate(${i.x.toFixed(3)} ${i.y.toFixed(3)}) rotate(${s.toFixed(2)}) scale(${c.toFixed(4)}) translate(${-B[0]} ${-B[1]})`),P.style.opacity=t>0?`1`:`0`}function G(e){I.style.display=e?``:`none`,F.style.display=e?`none`:``,P.style.display=e?`none`:``}function K(e,t,n,r){if(!r){e.setAttribute(`r`,`0`);return}let i=t.getPointAtLength(n);e.setAttribute(`cx`,i.x.toFixed(3)),e.setAttribute(`cy`,i.y.toFixed(3)),e.setAttribute(`r`,`1.75`)}function q(e){let t=e+(b-y)*o(n(e,y-1.5,y));j.style.strokeDasharray=`${Math.max(t,.001)} ${b+10}`,j.style.opacity=e>.05?`1`:`0`,K(R,j,t,e>.05)}function J(e){M.style.strokeDasharray=`${Math.max(e,.001)} ${x+10}`,M.style.opacity=e>.05?`1`:`0`,K(z,M,e,e>.05)}let Y=(e=>V+s*T[Math.round(t(e/y)*l)]/T[l])(D),X=V+s-.06,Z=e=>e<=0?0:e>=1?x:r(O,k,e),Q=e=>{let t=n(e,Y,X);return Z(t<=0?0:t>=1?1:(t<.5?2*t*t:1-(-2*t+2)**2/2)*.999+.001)},ee=V+s+u+f+.05+p,$=e=>{let t=.18*e+.82*e*e*e,n=62*t,r=(-41-7*t)*Math.PI/180;return[B[0]+Math.cos(r)*n,B[1]+Math.sin(r)*n,t]};function te(e){e-=h;let r;if(m===`once`){let t=n(e,0,.32);r=3.7*(t<1?1+.18*Math.sin(Math.PI*t):1)*a(t)}else r=3.7,e=e<0?0:e%ee;N.setAttribute(`r`,Math.max(0,r+(r>0?.6:0)).toFixed(3));let c=n(e,V,V+s),l=y*U(c),p=a(n(e,V-.1,V+.22));if(m===`once`||e<V+s+u){q(l),J(Q(e)),W(l,e<V-.1?0:p),G(c>=1),L.forEach(e=>e.style.opacity=`0`);return}G(!1);let g=V+s+u,_=n(e,g,g+d),v=n(e,g+.05,g+.05+f);if(_<1){let[e,t,r]=$(_),i=1+.4*r,a=-7*r;P.style.display=``,P.style.opacity=(1-o(n(_,.72,1))).toFixed(3),P.setAttribute(`transform`,`translate(${e.toFixed(3)} ${t.toFixed(3)}) rotate(${a.toFixed(2)}) scale(${i.toFixed(4)}) translate(${-B[0]} ${-B[1]})`)}else P.style.opacity=`0`;L.forEach((e,t)=>{let r=[.14,.28,.42][t];if(_<r||_>=1){e.style.opacity=`0`;return}let[i,a]=$(r),s=n(_,r,r+.45);e.setAttribute(`cx`,i.toFixed(2)),e.setAttribute(`cy`,a.toFixed(2)),e.setAttribute(`r`,(.7+.7*s).toFixed(2)),e.style.opacity=(.5*(1-o(s))).toFixed(3)});let b=y*(1-i(v));q(b),J(Z(t((b-E)/(y-E))))}return{render:te,end:m===`loop`?1/0:h+V+s+.1}}exports.createLogoMotion=y,exports.showFinal=v;
2
+ //# sourceMappingURL=motion.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.cjs","names":["ANCHOR","require_LogoAnimationArtwork","cl","b","a","v","seg","t","lerp","io","out","sstep","DRAW","N","M","HOLD","OFF","BACK","REST","cached","canMeasure","el","headAt","f","s","RL","i","H","measure","r","rm","l","els","RX","LL","turnL","best","q","dd","ang","prev","W","S","c","j","k","head","endAng","finalTheta","near","P","x","y","kap","vel","jL","TT","topL","nearL","l0","l1","showFinal","createLogoMotion","g","d","p","fin","rh","lh","A","T0","mode","fly","lo","hi","m","planeAt","pt","th","sc","vis","landed","on","cap","path","len","setRoute","setLeg","tLs","L","tLe","legLen","legT","LOOP_T","fpos","dist","render","delay","dotR","ft","emerge","trail","t1","back","rot","D","rs"],"sources":["../../../src/components/LogoAnimation/motion.ts"],"sourcesContent":["import { ANCHOR, HEAD0 } from './LogoAnimationArtwork';\n\n/*\n * Frame engine of LogoAnimation — a line-for-line port of the approved animation demo (\"TMLogo\"). Internal, not\n * exported from the package. It writes SVG attributes and inline styles directly (one call per animation frame), so\n * React renders the markup once and never re-renders while the plane flies.\n */\n\n/** 'once' draws the logo and holds it (intro); 'loop' flies out, rewinds and starts again (loader). */\nexport type LogoMotionMode = 'once' | 'loop';\n\n/** Parts of the rendered SVG the engine moves. */\nexport interface LogoMotionElements {\n /** Unpainted route centreline: position and heading of the plane. */\n route: SVGGeometryElement;\n /** Mask stroke that reveals the main line. */\n routeMask: SVGGeometryElement;\n /** Mask stroke that reveals the lower-left branch. */\n leg: SVGGeometryElement;\n /** Round cap on the moving tip of the main line. */\n routeCap: SVGCircleElement;\n /** Round cap on the moving tip of the branch. */\n legCap: SVGCircleElement;\n /** The dot the plane takes off from. */\n dot: SVGCircleElement;\n /** Pin parts revealed by the masks (shown while drawing). */\n parts: SVGGElement;\n /** The exact logo (shown once landed). */\n final: SVGGElement;\n /** Puffs left behind when the loop flies out. */\n trail: SVGCircleElement[];\n /** The plane. */\n plane: SVGGElement;\n}\n\nexport interface LogoMotion {\n /** Draws the frame at `t` seconds since mount (the `delay` is applied inside). */\n render: (t: number) => void;\n /** `once`: time after which the logo holds still, so frames can stop. `loop`: never ends (Infinity). */\n end: number;\n}\n\nconst cl = (v: number, a = 0, b = 1) => Math.min(b, Math.max(a, v));\nconst seg = (t: number, a: number, b: number) => cl((t - a) / (b - a));\nconst lerp = (a: number, b: number, t: number) => a + (b - a) * t;\nconst io = (t: number) => (t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2);\nconst out = (t: number) => 1 - Math.pow(1 - t, 3);\nconst sstep = (t: number) => t * t * (3 - 2 * t);\n\n/** Length of the draw, from lift-off to landing (s). */\nconst DRAW = 2.8;\n/** Samples of the heading table and of the time-along-route table. */\nconst N = 400;\nconst M = 600;\n/** Loop tail: hold on the logo, fly out, rewind, rest (s). */\nconst HOLD = 0.45;\nconst OFF = 1.05;\nconst BACK = 1.1;\nconst REST = 0.1;\n\n/** Mode-independent measurements of the route and branch. The paths are constants, so every instance shares them. */\ninterface Geometry {\n RL: number;\n RX: number;\n LL: number;\n turnL: number;\n H: number[];\n finalTheta: number;\n TT: number[];\n jL: number;\n topL: number;\n l0: number;\n l1: number;\n}\n\nlet cached: Geometry | null = null;\n\nconst canMeasure = (el: SVGElement) =>\n typeof (el as SVGGeometryElement).getTotalLength === 'function' && typeof (el as SVGGeometryElement).getPointAtLength === 'function';\n\nfunction headAt(H: number[], RL: number, s: number): number {\n const f = cl(s / RL) * N;\n const i = Math.min(N - 1, Math.floor(f));\n return lerp(H[i], H[i + 1], f - i);\n}\n\nfunction measure(els: LogoMotionElements): Geometry | null {\n const { route: r, routeMask: rm, leg: l } = els;\n if (!canMeasure(r) || !canMeasure(rm) || !canMeasure(l)) return null;\n if (cached) return cached;\n const RL = r.getTotalLength();\n const RX = rm.getTotalLength();\n const LL = l.getTotalLength();\n if (!(RL > 0) || !(LL > 0)) return null;\n\n // route length where the plane starts its right turn (≈ lowest point of the left side)\n let turnL = 0;\n {\n let best = 1e9;\n for (let s = RL * 0.7; s < RL; s += 0.2) {\n const q = r.getPointAtLength(s);\n const dd = Math.hypot(q.x - 5.8, q.y - 29);\n if (dd < best) {\n best = dd;\n turnL = s;\n }\n }\n }\n const ang = (s: number) => {\n const a = r.getPointAtLength(Math.max(0, s - 0.35));\n const b = r.getPointAtLength(Math.min(RL, s + 0.35));\n return (Math.atan2(b.y - a.y, b.x - a.x) * 180) / Math.PI;\n };\n // unwrapped heading table so rotation never jumps\n const H: number[] = [];\n {\n let prev: number | null = null;\n for (let i = 0; i <= N; i++) {\n let a = ang((RL * i) / N);\n if (prev !== null) {\n while (a - prev > 180) a -= 360;\n while (a - prev < -180) a += 360;\n }\n H.push(a);\n prev = a;\n }\n }\n // smooth heading through tight curves\n {\n const W = Math.round(2.2 / (RL / N));\n const S = H.slice();\n for (let i = 0; i <= N; i++) {\n let a = 0;\n let c = 0;\n for (let j = -W; j <= W; j++) {\n const k = Math.min(N, Math.max(0, i + j));\n a += S[k];\n c++;\n }\n H[i] = a / c;\n }\n }\n const head = (s: number) => headAt(H, RL, s);\n const endAng = head(RL);\n let finalTheta = HEAD0;\n while (finalTheta - endAng > 180) finalTheta -= 360;\n while (finalTheta - endAng < -180) finalTheta += 360;\n\n // speed profile along the route: lift-off from the dot, ease through the tight bottom curve, glide down, soft landing\n const near = (x: number, y: number) => {\n let best = 1e9;\n let b = 0;\n for (let q = 0; q < RL; q += 0.2) {\n const P = r.getPointAtLength(q);\n const dd = Math.hypot(P.x - x, P.y - y);\n if (dd < best) {\n best = dd;\n b = q;\n }\n }\n return b;\n };\n // turn rate, deg per unit\n const kap = (q: number) => {\n const a = Math.max(0, q - 1);\n const b = Math.min(RL, q + 1);\n return Math.abs(head(b) - head(a)) / (b - a);\n };\n const vel = (q: number) => ((0.22 + 0.78 * sstep(cl(q / 16))) / (1 + kap(q) / 20)) * Math.max(0.05, Math.sqrt(cl((RL - q) / 15)));\n const jL = near(18.9, 46.6); // where the branch joins the line\n const TT = [0];\n for (let i = 1; i <= M; i++) {\n const a = (RL * (i - 1)) / M;\n const b = (RL * i) / M;\n TT.push(TT[i - 1] + (b - a) / vel((a + b) / 2));\n }\n const topL = near(30, 6.2); // the branch starts growing as the plane crosses the top\n const nearL = (x: number, y: number) => {\n let best = 1e9;\n let b = 0;\n for (let q = 0; q < LL; q += 0.1) {\n const P = l.getPointAtLength(q);\n const dd = Math.hypot(P.x - x, P.y - y);\n if (dd < best) {\n best = dd;\n b = q;\n }\n }\n return b;\n };\n // visible part of the branch: junction → rounded tip\n const l0 = nearL(18.6, 47.2);\n const l1 = nearL(7.4, 33.0) + 0.4;\n\n cached = { RL, RX, LL, turnL, H, finalTheta, TT, jL, topL, l0, l1 };\n return cached;\n}\n\n/** Shows the exact logo and hides everything that moves (reduced motion, or no SVG geometry API). */\nexport function showFinal(els: Pick<LogoMotionElements, 'final' | 'parts' | 'plane' | 'trail'>): void {\n els.final.style.display = '';\n els.parts.style.display = 'none';\n els.plane.style.display = 'none';\n els.trail.forEach((c) => (c.style.opacity = '0'));\n}\n\n/** Builds the frame renderer, or returns `null` when the browser cannot measure SVG paths. Call from an effect only. */\nexport function createLogoMotion(els: LogoMotionElements, mode: LogoMotionMode, delay: number): LogoMotion | null {\n const g = measure(els);\n if (!g) return null;\n const { RL, RX, LL, turnL, H, finalTheta, TT, jL, topL, l0, l1 } = g;\n const { route: r, routeMask: rm, leg: l, dot: d, plane: p, parts, final: fin, trail, routeCap: rh, legCap: lh } = els;\n const A = ANCHOR;\n const T0 = mode === 'loop' ? 0.3 : 0.4; // start offset (dot appears first)\n const head = (s: number) => headAt(H, RL, s);\n\n // flight progress → route length fraction, through the time-along-route table\n const fly = (x: number) => {\n x = cl(x) * TT[M];\n let lo = 0;\n let hi = M;\n while (hi - lo > 1) {\n const m = (lo + hi) >> 1;\n if (TT[m] < x) lo = m;\n else hi = m;\n }\n const f = (x - TT[lo]) / (TT[hi] - TT[lo] || 1);\n return (lo + f) / M;\n };\n\n // s = route length drawn; vis = plane scale factor 0..1 (emerge / vanish)\n function planeAt(s: number, vis: number) {\n const pt = r.getPointAtLength(s);\n const k = sstep(seg(s, turnL - 7, RL));\n const th = lerp(head(s), finalTheta, k) - HEAD0;\n const sc = lerp(0.42, 1, s / RL) * vis; // grows steadily along the whole flight\n if (k >= 1 && vis >= 1) p.removeAttribute('transform');\n else p.setAttribute('transform', `translate(${pt.x.toFixed(3)} ${pt.y.toFixed(3)}) rotate(${th.toFixed(2)}) scale(${sc.toFixed(4)}) translate(${-A[0]} ${-A[1]})`);\n p.style.opacity = vis > 0 ? '1' : '0';\n }\n function landed(on: boolean) {\n fin.style.display = on ? '' : 'none';\n parts.style.display = on ? 'none' : '';\n p.style.display = on ? 'none' : '';\n }\n // round end on the moving tip of each line (the mask only reveals the logo shape, so the cap follows its real edges)\n function cap(c: SVGCircleElement, path: SVGGeometryElement, len: number, on: boolean) {\n if (!on) {\n c.setAttribute('r', '0');\n return;\n }\n const P = path.getPointAtLength(len);\n c.setAttribute('cx', P.x.toFixed(3));\n c.setAttribute('cy', P.y.toFixed(3));\n c.setAttribute('r', '1.75');\n }\n function setRoute(s: number) {\n const m = s + (RX - RL) * sstep(seg(s, RL - 1.5, RL));\n rm.style.strokeDasharray = `${Math.max(m, 0.001)} ${RX + 10}`;\n rm.style.opacity = s > 0.05 ? '1' : '0';\n cap(rh, rm, m, s > 0.05);\n }\n function setLeg(s: number) {\n l.style.strokeDasharray = `${Math.max(s, 0.001)} ${LL + 10}`;\n l.style.opacity = s > 0.05 ? '1' : '0';\n cap(lh, l, s, s > 0.05);\n }\n\n // branch grows on its own clock: starts as the plane crosses the top, ends just before the plane turns right\n const tAt = (L: number) => T0 + (DRAW * TT[Math.round(cl(L / RL) * M)]) / TT[M];\n const tLs = tAt(topL);\n const tLe = T0 + DRAW - 0.06;\n const legLen = (x: number) => (x <= 0 ? 0 : x >= 1 ? LL : lerp(l0, l1, x));\n const legT = (t: number) => {\n const x = seg(t, tLs, tLe);\n return legLen(x <= 0 ? 0 : x >= 1 ? 1 : (x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2) * 0.999 + 0.001);\n };\n const LOOP_T = T0 + DRAW + HOLD + BACK + 0.05 + REST;\n // flight path out of the logo: accelerate along the heading, climbing slightly, growing as it comes closer\n const fpos = (f: number): [number, number, number] => {\n const q = 0.18 * f + 0.82 * f * f * f;\n const dist = 62 * q;\n const a = ((HEAD0 - 7 * q) * Math.PI) / 180;\n return [A[0] + Math.cos(a) * dist, A[1] + Math.sin(a) * dist, q];\n };\n\n function render(t: number) {\n t -= delay;\n // dot\n let dotR: number;\n if (mode === 'once') {\n const q = seg(t, 0, 0.32);\n dotR = 3.7 * (q < 1 ? 1 + 0.18 * Math.sin(Math.PI * q) : 1) * out(q);\n } else {\n dotR = 3.7;\n // The demo wraps a negative time (inside `delay`) into the rewind tail; holding the first frame reads better.\n t = t < 0 ? 0 : t % LOOP_T;\n }\n d.setAttribute('r', Math.max(0, dotR + (dotR > 0 ? 0.6 : 0)).toFixed(3));\n const ft = seg(t, T0, T0 + DRAW);\n const s = RL * fly(ft);\n const emerge = out(seg(t, T0 - 0.1, T0 + 0.22));\n if (mode === 'once' || t < T0 + DRAW + HOLD) {\n setRoute(s);\n setLeg(legT(t));\n planeAt(s, t < T0 - 0.1 ? 0 : emerge);\n landed(ft >= 1);\n trail.forEach((c) => (c.style.opacity = '0'));\n return;\n }\n // loop tail: the plane takes off and flies away while the line and branch rewind together into the dot\n landed(false);\n const t1 = T0 + DRAW + HOLD;\n const f = seg(t, t1, t1 + OFF);\n const back = seg(t, t1 + 0.05, t1 + 0.05 + BACK);\n if (f < 1) {\n const [x, y, q] = fpos(f);\n const sc = 1 + 0.4 * q;\n const rot = -7 * q;\n p.style.display = '';\n p.style.opacity = (1 - sstep(seg(f, 0.72, 1))).toFixed(3);\n p.setAttribute('transform', `translate(${x.toFixed(3)} ${y.toFixed(3)}) rotate(${rot.toFixed(2)}) scale(${sc.toFixed(4)}) translate(${-A[0]} ${-A[1]})`);\n } else p.style.opacity = '0';\n // small puffs left behind the tail\n trail.forEach((c, i) => {\n const D = [0.14, 0.28, 0.42][i];\n if (f < D || f >= 1) {\n c.style.opacity = '0';\n return;\n }\n const [x, y] = fpos(D);\n const k = seg(f, D, D + 0.45);\n c.setAttribute('cx', x.toFixed(2));\n c.setAttribute('cy', y.toFixed(2));\n c.setAttribute('r', (0.7 + 0.7 * k).toFixed(2));\n c.style.opacity = (0.5 * (1 - sstep(k))).toFixed(3);\n });\n const rs = RL * (1 - io(back));\n setRoute(rs);\n setLeg(legLen(cl((rs - jL) / (RL - jL))));\n }\n\n return { render, end: mode === 'loop' ? Infinity : delay + T0 + DRAW + 0.1 };\n}\n\n/** Test hook: forgets the shared measurements (they are cached for the page's lifetime). */\nexport function resetLogoMotionCache(): void {\n cached = null;\n}\n"],"mappings":"A,2DA0CA,IAAME,GAAM,EAAW,EAAI,EAAG,EAAI,IAAM,KAAK,IAAIC,EAAG,KAAK,IAAIC,EAAGC,CAAC,CAAC,EAC5DC,GAAO,EAAW,EAAW,IAAcJ,GAAIK,EAAIH,IAAMD,EAAIC,EAAE,EAC/DI,GAAQ,EAAW,EAAW,IAAcJ,GAAKD,EAAIC,GAAKG,EAC1DE,EAAM,GAAeF,EAAI,GAAM,EAAIA,EAAIA,EAAIA,EAAI,GAAa,GAAKA,EAAI,IAAG,EAAK,EAC7EG,EAAO,GAAc,GAAa,EAAIH,IAAG,EACzCI,EAAS,GAAcJ,EAAIA,GAAK,EAAI,EAAIA,GAGxCK,EAAO,IAEPC,EAAI,IACJC,EAAI,IAEJC,EAAO,IACPC,EAAM,KACNC,EAAO,IACPC,EAAO,GAiBTC,EAA0B,KAExBC,EAAc,GAClB,OAAQC,EAA0B,gBAAmB,YAAc,OAAQA,EAA0B,kBAAqB,WAE5H,SAASC,EAAO,EAAa,EAAY,EAAmB,CAC1D,IAAMC,EAAIrB,EAAGsB,EAAIC,CAAE,EAAIZ,EACjBa,EAAI,KAAK,IAAI,IAAO,KAAK,MAAMH,CAAC,CAAC,EACvC,OAAOf,EAAKmB,EAAED,GAAIC,EAAED,EAAI,GAAIH,EAAIG,CAAC,CACnC,CAEA,SAASE,EAAQ,EAA0C,CACz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AAI,GAC5BjB,EAASoB,CAAE,EACXnB,EAAOI,EAAOzF,GAAIwG,EAAKnD,IAAO9B,EAAK8B,EAAG,CAAC,CAAC,CAC1C,CAEA,MAAO,CAAE,UAAQ,IAAKgB,IAAS,OAAS,IAAW0B,EAAQ3B,EAAK1D,EAAO,EAAI,CAC7E,C"}
@@ -0,0 +1,180 @@
1
+ "use client";
2
+ import { ANCHOR as e } from "./LogoAnimationArtwork.js";
3
+ // src/components/LogoAnimation/motion.ts
4
+ var t = (e, t = 0, n = 1) => Math.min(n, Math.max(t, e)), n = (e, n, r) => t((e - n) / (r - n)), r = (e, t, n) => e + (t - e) * n, i = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, a = (e) => 1 - (1 - e) ** 3, o = (e) => e * e * (3 - 2 * e), s = 2.8, c = 400, l = 600, u = .45, d = 1.05, f = 1.1, p = .1, m = null, h = (e) => typeof e.getTotalLength == "function" && typeof e.getPointAtLength == "function";
5
+ function g(e, n, i) {
6
+ let a = t(i / n) * c, o = Math.min(399, Math.floor(a));
7
+ return r(e[o], e[o + 1], a - o);
8
+ }
9
+ function _(e) {
10
+ let { route: n, routeMask: r, leg: i } = e;
11
+ if (!h(n) || !h(r) || !h(i)) return null;
12
+ if (m) return m;
13
+ let a = n.getTotalLength(), s = r.getTotalLength(), u = i.getTotalLength();
14
+ if (!(a > 0) || !(u > 0)) return null;
15
+ let d = 0;
16
+ {
17
+ let e = 1e9;
18
+ for (let t = a * .7; t < a; t += .2) {
19
+ let r = n.getPointAtLength(t), i = Math.hypot(r.x - 5.8, r.y - 29);
20
+ i < e && (e = i, d = t);
21
+ }
22
+ }
23
+ let f = (e) => {
24
+ let t = n.getPointAtLength(Math.max(0, e - .35)), r = n.getPointAtLength(Math.min(a, e + .35));
25
+ return Math.atan2(r.y - t.y, r.x - t.x) * 180 / Math.PI;
26
+ }, p = [];
27
+ {
28
+ let e = null;
29
+ for (let t = 0; t <= c; t++) {
30
+ let n = f(a * t / c);
31
+ if (e !== null) {
32
+ for (; n - e > 180;) n -= 360;
33
+ for (; n - e < -180;) n += 360;
34
+ }
35
+ p.push(n), e = n;
36
+ }
37
+ }
38
+ {
39
+ let e = Math.round(2.2 / (a / c)), t = p.slice();
40
+ for (let n = 0; n <= c; n++) {
41
+ let r = 0, i = 0;
42
+ for (let a = -e; a <= e; a++) {
43
+ let e = Math.min(c, Math.max(0, n + a));
44
+ r += t[e], i++;
45
+ }
46
+ p[n] = r / i;
47
+ }
48
+ }
49
+ let _ = (e) => g(p, a, e), v = _(a), y = -41;
50
+ for (; y - v > 180;) y -= 360;
51
+ for (; y - v < -180;) y += 360;
52
+ let b = (e, t) => {
53
+ let r = 1e9, i = 0;
54
+ for (let o = 0; o < a; o += .2) {
55
+ let a = n.getPointAtLength(o), s = Math.hypot(a.x - e, a.y - t);
56
+ s < r && (r = s, i = o);
57
+ }
58
+ return i;
59
+ }, x = (e) => {
60
+ let t = Math.max(0, e - 1), n = Math.min(a, e + 1);
61
+ return Math.abs(_(n) - _(t)) / (n - t);
62
+ }, S = (e) => (.22 + .78 * o(t(e / 16))) / (1 + x(e) / 20) * Math.max(.05, Math.sqrt(t((a - e) / 15))), C = b(18.9, 46.6), w = [0];
63
+ for (let e = 1; e <= l; e++) {
64
+ let t = a * (e - 1) / l, n = a * e / l;
65
+ w.push(w[e - 1] + (n - t) / S((t + n) / 2));
66
+ }
67
+ let T = b(30, 6.2), E = (e, t) => {
68
+ let n = 1e9, r = 0;
69
+ for (let a = 0; a < u; a += .1) {
70
+ let o = i.getPointAtLength(a), s = Math.hypot(o.x - e, o.y - t);
71
+ s < n && (n = s, r = a);
72
+ }
73
+ return r;
74
+ }, D = E(18.6, 47.2), O = E(7.4, 33) + .4;
75
+ return m = {
76
+ RL: a,
77
+ RX: s,
78
+ LL: u,
79
+ turnL: d,
80
+ H: p,
81
+ finalTheta: y,
82
+ TT: w,
83
+ jL: C,
84
+ topL: T,
85
+ l0: D,
86
+ l1: O
87
+ }, m;
88
+ }
89
+ function v(e) {
90
+ e.final.style.display = "", e.parts.style.display = "none", e.plane.style.display = "none", e.trail.forEach((e) => e.style.opacity = "0");
91
+ }
92
+ function y(c, m, h) {
93
+ let v = _(c);
94
+ if (!v) return null;
95
+ let { RL: y, RX: b, LL: x, turnL: S, H: C, finalTheta: w, TT: T, jL: E, topL: D, l0: O, l1: k } = v, { route: A, routeMask: j, leg: M, dot: N, plane: P, parts: F, final: I, trail: L, routeCap: R, legCap: z } = c, B = e, V = m === "loop" ? .3 : .4, H = (e) => g(C, y, e), U = (e) => {
96
+ e = t(e) * T[l];
97
+ let n = 0, r = l;
98
+ for (; r - n > 1;) {
99
+ let t = n + r >> 1;
100
+ T[t] < e ? n = t : r = t;
101
+ }
102
+ let i = (e - T[n]) / (T[r] - T[n] || 1);
103
+ return (n + i) / l;
104
+ };
105
+ function W(e, t) {
106
+ let i = A.getPointAtLength(e), a = o(n(e, S - 7, y)), s = r(H(e), w, a) - -41, c = r(.42, 1, e / y) * t;
107
+ a >= 1 && t >= 1 ? P.removeAttribute("transform") : P.setAttribute("transform", `translate(${i.x.toFixed(3)} ${i.y.toFixed(3)}) rotate(${s.toFixed(2)}) scale(${c.toFixed(4)}) translate(${-B[0]} ${-B[1]})`), P.style.opacity = t > 0 ? "1" : "0";
108
+ }
109
+ function G(e) {
110
+ I.style.display = e ? "" : "none", F.style.display = e ? "none" : "", P.style.display = e ? "none" : "";
111
+ }
112
+ function K(e, t, n, r) {
113
+ if (!r) {
114
+ e.setAttribute("r", "0");
115
+ return;
116
+ }
117
+ let i = t.getPointAtLength(n);
118
+ e.setAttribute("cx", i.x.toFixed(3)), e.setAttribute("cy", i.y.toFixed(3)), e.setAttribute("r", "1.75");
119
+ }
120
+ function q(e) {
121
+ let t = e + (b - y) * o(n(e, y - 1.5, y));
122
+ j.style.strokeDasharray = `${Math.max(t, .001)} ${b + 10}`, j.style.opacity = e > .05 ? "1" : "0", K(R, j, t, e > .05);
123
+ }
124
+ function J(e) {
125
+ M.style.strokeDasharray = `${Math.max(e, .001)} ${x + 10}`, M.style.opacity = e > .05 ? "1" : "0", K(z, M, e, e > .05);
126
+ }
127
+ let Y = ((e) => V + s * T[Math.round(t(e / y) * l)] / T[l])(D), X = V + s - .06, Z = (e) => e <= 0 ? 0 : e >= 1 ? x : r(O, k, e), Q = (e) => {
128
+ let t = n(e, Y, X);
129
+ return Z(t <= 0 ? 0 : t >= 1 ? 1 : (t < .5 ? 2 * t * t : 1 - (-2 * t + 2) ** 2 / 2) * .999 + .001);
130
+ }, ee = V + s + u + f + .05 + p, $ = (e) => {
131
+ let t = .18 * e + .82 * e * e * e, n = 62 * t, r = (-41 - 7 * t) * Math.PI / 180;
132
+ return [
133
+ B[0] + Math.cos(r) * n,
134
+ B[1] + Math.sin(r) * n,
135
+ t
136
+ ];
137
+ };
138
+ function te(e) {
139
+ e -= h;
140
+ let r;
141
+ if (m === "once") {
142
+ let t = n(e, 0, .32);
143
+ r = 3.7 * (t < 1 ? 1 + .18 * Math.sin(Math.PI * t) : 1) * a(t);
144
+ } else r = 3.7, e = e < 0 ? 0 : e % ee;
145
+ N.setAttribute("r", Math.max(0, r + (r > 0 ? .6 : 0)).toFixed(3));
146
+ let c = n(e, V, V + s), l = y * U(c), p = a(n(e, V - .1, V + .22));
147
+ if (m === "once" || e < V + s + u) {
148
+ q(l), J(Q(e)), W(l, e < V - .1 ? 0 : p), G(c >= 1), L.forEach((e) => e.style.opacity = "0");
149
+ return;
150
+ }
151
+ G(!1);
152
+ let g = V + s + u, _ = n(e, g, g + d), v = n(e, g + .05, g + .05 + f);
153
+ if (_ < 1) {
154
+ let [e, t, r] = $(_), i = 1 + .4 * r, a = -7 * r;
155
+ P.style.display = "", P.style.opacity = (1 - o(n(_, .72, 1))).toFixed(3), P.setAttribute("transform", `translate(${e.toFixed(3)} ${t.toFixed(3)}) rotate(${a.toFixed(2)}) scale(${i.toFixed(4)}) translate(${-B[0]} ${-B[1]})`);
156
+ } else P.style.opacity = "0";
157
+ L.forEach((e, t) => {
158
+ let r = [
159
+ .14,
160
+ .28,
161
+ .42
162
+ ][t];
163
+ if (_ < r || _ >= 1) {
164
+ e.style.opacity = "0";
165
+ return;
166
+ }
167
+ let [i, a] = $(r), s = n(_, r, r + .45);
168
+ e.setAttribute("cx", i.toFixed(2)), e.setAttribute("cy", a.toFixed(2)), e.setAttribute("r", (.7 + .7 * s).toFixed(2)), e.style.opacity = (.5 * (1 - o(s))).toFixed(3);
169
+ });
170
+ let b = y * (1 - i(v));
171
+ q(b), J(Z(t((b - E) / (y - E))));
172
+ }
173
+ return {
174
+ render: te,
175
+ end: m === "loop" ? Infinity : h + V + s + .1
176
+ };
177
+ }
178
+ export { y as createLogoMotion, v as showFinal };
179
+
180
+ //# sourceMappingURL=motion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.js","names":["cl","b","a","v","seg","t","lerp","io","out","sstep","DRAW","N","M","HOLD","OFF","BACK","REST","cached","canMeasure","el","headAt","f","s","RL","i","H","measure","r","rm","l","els","RX","LL","turnL","best","q","dd","ang","prev","W","S","c","j","k","head","endAng","finalTheta","near","P","x","y","kap","vel","jL","TT","topL","nearL","l0","l1","showFinal","createLogoMotion","g","d","p","fin","rh","lh","A","ANCHOR","T0","mode","fly","lo","hi","m","planeAt","pt","th","sc","vis","landed","on","cap","path","len","setRoute","setLeg","tLs","L","tLe","legLen","legT","LOOP_T","fpos","dist","render","delay","dotR","ft","emerge","trail","t1","back","rot","D","rs"],"sources":["../../../src/components/LogoAnimation/motion.ts"],"sourcesContent":["import { ANCHOR, HEAD0 } from './LogoAnimationArtwork';\n\n/*\n * Frame engine of LogoAnimation — a line-for-line port of the approved animation demo (\"TMLogo\"). Internal, not\n * exported from the package. It writes SVG attributes and inline styles directly (one call per animation frame), so\n * React renders the markup once and never re-renders while the plane flies.\n */\n\n/** 'once' draws the logo and holds it (intro); 'loop' flies out, rewinds and starts again (loader). */\nexport type LogoMotionMode = 'once' | 'loop';\n\n/** Parts of the rendered SVG the engine moves. */\nexport interface LogoMotionElements {\n /** Unpainted route centreline: position and heading of the plane. */\n route: SVGGeometryElement;\n /** Mask stroke that reveals the main line. */\n routeMask: SVGGeometryElement;\n /** Mask stroke that reveals the lower-left branch. */\n leg: SVGGeometryElement;\n /** Round cap on the moving tip of the main line. */\n routeCap: SVGCircleElement;\n /** Round cap on the moving tip of the branch. */\n legCap: SVGCircleElement;\n /** The dot the plane takes off from. */\n dot: SVGCircleElement;\n /** Pin parts revealed by the masks (shown while drawing). */\n parts: SVGGElement;\n /** The exact logo (shown once landed). */\n final: SVGGElement;\n /** Puffs left behind when the loop flies out. */\n trail: SVGCircleElement[];\n /** The plane. */\n plane: SVGGElement;\n}\n\nexport interface LogoMotion {\n /** Draws the frame at `t` seconds since mount (the `delay` is applied inside). */\n render: (t: number) => void;\n /** `once`: time after which the logo holds still, so frames can stop. `loop`: never ends (Infinity). */\n end: number;\n}\n\nconst cl = (v: number, a = 0, b = 1) => Math.min(b, Math.max(a, v));\nconst seg = (t: number, a: number, b: number) => cl((t - a) / (b - a));\nconst lerp = (a: number, b: number, t: number) => a + (b - a) * t;\nconst io = (t: number) => (t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2);\nconst out = (t: number) => 1 - Math.pow(1 - t, 3);\nconst sstep = (t: number) => t * t * (3 - 2 * t);\n\n/** Length of the draw, from lift-off to landing (s). */\nconst DRAW = 2.8;\n/** Samples of the heading table and of the time-along-route table. */\nconst N = 400;\nconst M = 600;\n/** Loop tail: hold on the logo, fly out, rewind, rest (s). */\nconst HOLD = 0.45;\nconst OFF = 1.05;\nconst BACK = 1.1;\nconst REST = 0.1;\n\n/** Mode-independent measurements of the route and branch. The paths are constants, so every instance shares them. */\ninterface Geometry {\n RL: number;\n RX: number;\n LL: number;\n turnL: number;\n H: number[];\n finalTheta: number;\n TT: number[];\n jL: number;\n topL: number;\n l0: number;\n l1: number;\n}\n\nlet cached: Geometry | null = null;\n\nconst canMeasure = (el: SVGElement) =>\n typeof (el as SVGGeometryElement).getTotalLength === 'function' && typeof (el as SVGGeometryElement).getPointAtLength === 'function';\n\nfunction headAt(H: number[], RL: number, s: number): number {\n const f = cl(s / RL) * N;\n const i = Math.min(N - 1, Math.floor(f));\n return lerp(H[i], H[i + 1], f - i);\n}\n\nfunction measure(els: LogoMotionElements): Geometry | null {\n const { route: r, routeMask: rm, leg: l } = els;\n if (!canMeasure(r) || !canMeasure(rm) || !canMeasure(l)) return null;\n if (cached) return cached;\n const RL = r.getTotalLength();\n const RX = rm.getTotalLength();\n const LL = l.getTotalLength();\n if (!(RL > 0) || !(LL > 0)) return null;\n\n // route length where the plane starts its right turn (≈ lowest point of the left side)\n let turnL = 0;\n {\n let best = 1e9;\n for (let s = RL * 0.7; s < RL; s += 0.2) {\n const q = r.getPointAtLength(s);\n const dd = Math.hypot(q.x - 5.8, q.y - 29);\n if (dd < best) {\n best = dd;\n turnL = s;\n }\n }\n }\n const ang = (s: number) => {\n const a = r.getPointAtLength(Math.max(0, s - 0.35));\n const b = r.getPointAtLength(Math.min(RL, s + 0.35));\n return (Math.atan2(b.y - a.y, b.x - a.x) * 180) / Math.PI;\n };\n // unwrapped heading table so rotation never jumps\n const H: number[] = [];\n {\n let prev: number | null = null;\n for (let i = 0; i <= N; i++) {\n let a = ang((RL * i) / N);\n if (prev !== null) {\n while (a - prev > 180) a -= 360;\n while (a - prev < -180) a += 360;\n }\n H.push(a);\n prev = a;\n }\n }\n // smooth heading through tight curves\n {\n const W = Math.round(2.2 / (RL / N));\n const S = H.slice();\n for (let i = 0; i <= N; i++) {\n let a = 0;\n let c = 0;\n for (let j = -W; j <= W; j++) {\n const k = Math.min(N, Math.max(0, i + j));\n a += S[k];\n c++;\n }\n H[i] = a / c;\n }\n }\n const head = (s: number) => headAt(H, RL, s);\n const endAng = head(RL);\n let finalTheta = HEAD0;\n while (finalTheta - endAng > 180) finalTheta -= 360;\n while (finalTheta - endAng < -180) finalTheta += 360;\n\n // speed profile along the route: lift-off from the dot, ease through the tight bottom curve, glide down, soft landing\n const near = (x: number, y: number) => {\n let best = 1e9;\n let b = 0;\n for (let q = 0; q < RL; q += 0.2) {\n const P = r.getPointAtLength(q);\n const dd = Math.hypot(P.x - x, P.y - y);\n if (dd < best) {\n best = dd;\n b = q;\n }\n }\n return b;\n };\n // turn rate, deg per unit\n const kap = (q: number) => {\n const a = Math.max(0, q - 1);\n const b = Math.min(RL, q + 1);\n return Math.abs(head(b) - head(a)) / (b - a);\n };\n const vel = (q: number) => ((0.22 + 0.78 * sstep(cl(q / 16))) / (1 + kap(q) / 20)) * Math.max(0.05, Math.sqrt(cl((RL - q) / 15)));\n const jL = near(18.9, 46.6); // where the branch joins the line\n const TT = [0];\n for (let i = 1; i <= M; i++) {\n const a = (RL * (i - 1)) / M;\n const b = (RL * i) / M;\n TT.push(TT[i - 1] + (b - a) / vel((a + b) / 2));\n }\n const topL = near(30, 6.2); // the branch starts growing as the plane crosses the top\n const nearL = (x: number, y: number) => {\n let best = 1e9;\n let b = 0;\n for (let q = 0; q < LL; q += 0.1) {\n const P = l.getPointAtLength(q);\n const dd = Math.hypot(P.x - x, P.y - y);\n if (dd < best) {\n best = dd;\n b = q;\n }\n }\n return b;\n };\n // visible part of the branch: junction → rounded tip\n const l0 = nearL(18.6, 47.2);\n const l1 = nearL(7.4, 33.0) + 0.4;\n\n cached = { RL, RX, LL, turnL, H, finalTheta, TT, jL, topL, l0, l1 };\n return cached;\n}\n\n/** Shows the exact logo and hides everything that moves (reduced motion, or no SVG geometry API). */\nexport function showFinal(els: Pick<LogoMotionElements, 'final' | 'parts' | 'plane' | 'trail'>): void {\n els.final.style.display = '';\n els.parts.style.display = 'none';\n els.plane.style.display = 'none';\n els.trail.forEach((c) => (c.style.opacity = '0'));\n}\n\n/** Builds the frame renderer, or returns `null` when the browser cannot measure SVG paths. Call from an effect only. */\nexport function createLogoMotion(els: LogoMotionElements, mode: LogoMotionMode, delay: number): LogoMotion | null {\n const g = measure(els);\n if (!g) return null;\n const { RL, RX, LL, turnL, H, finalTheta, TT, jL, topL, l0, l1 } = g;\n const { route: r, routeMask: rm, leg: l, dot: d, plane: p, parts, final: fin, trail, routeCap: rh, legCap: lh } = els;\n const A = ANCHOR;\n const T0 = mode === 'loop' ? 0.3 : 0.4; // start offset (dot appears first)\n const head = (s: number) => headAt(H, RL, s);\n\n // flight progress → route length fraction, through the time-along-route table\n const fly = (x: number) => {\n x = cl(x) * TT[M];\n let lo = 0;\n let hi = M;\n while (hi - lo > 1) {\n const m = (lo + hi) >> 1;\n if (TT[m] < x) lo = m;\n else hi = m;\n }\n const f = (x - TT[lo]) / (TT[hi] - TT[lo] || 1);\n return (lo + f) / M;\n };\n\n // s = route length drawn; vis = plane scale factor 0..1 (emerge / vanish)\n function planeAt(s: number, vis: number) {\n const pt = r.getPointAtLength(s);\n const k = sstep(seg(s, turnL - 7, RL));\n const th = lerp(head(s), finalTheta, k) - HEAD0;\n const sc = lerp(0.42, 1, s / RL) * vis; // grows steadily along the whole flight\n if (k >= 1 && vis >= 1) p.removeAttribute('transform');\n else p.setAttribute('transform', `translate(${pt.x.toFixed(3)} ${pt.y.toFixed(3)}) rotate(${th.toFixed(2)}) scale(${sc.toFixed(4)}) translate(${-A[0]} ${-A[1]})`);\n p.style.opacity = vis > 0 ? '1' : '0';\n }\n function landed(on: boolean) {\n fin.style.display = on ? '' : 'none';\n parts.style.display = on ? 'none' : '';\n p.style.display = on ? 'none' : '';\n }\n // round end on the moving tip of each line (the mask only reveals the logo shape, so the cap follows its real edges)\n function cap(c: SVGCircleElement, path: SVGGeometryElement, len: number, on: boolean) {\n if (!on) {\n c.setAttribute('r', '0');\n return;\n }\n const P = path.getPointAtLength(len);\n c.setAttribute('cx', P.x.toFixed(3));\n c.setAttribute('cy', P.y.toFixed(3));\n c.setAttribute('r', '1.75');\n }\n function setRoute(s: number) {\n const m = s + (RX - RL) * sstep(seg(s, RL - 1.5, RL));\n rm.style.strokeDasharray = `${Math.max(m, 0.001)} ${RX + 10}`;\n rm.style.opacity = s > 0.05 ? '1' : '0';\n cap(rh, rm, m, s > 0.05);\n }\n function setLeg(s: number) {\n l.style.strokeDasharray = `${Math.max(s, 0.001)} ${LL + 10}`;\n l.style.opacity = s > 0.05 ? '1' : '0';\n cap(lh, l, s, s > 0.05);\n }\n\n // branch grows on its own clock: starts as the plane crosses the top, ends just before the plane turns right\n const tAt = (L: number) => T0 + (DRAW * TT[Math.round(cl(L / RL) * M)]) / TT[M];\n const tLs = tAt(topL);\n const tLe = T0 + DRAW - 0.06;\n const legLen = (x: number) => (x <= 0 ? 0 : x >= 1 ? LL : lerp(l0, l1, x));\n const legT = (t: number) => {\n const x = seg(t, tLs, tLe);\n return legLen(x <= 0 ? 0 : x >= 1 ? 1 : (x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2) * 0.999 + 0.001);\n };\n const LOOP_T = T0 + DRAW + HOLD + BACK + 0.05 + REST;\n // flight path out of the logo: accelerate along the heading, climbing slightly, growing as it comes closer\n const fpos = (f: number): [number, number, number] => {\n const q = 0.18 * f + 0.82 * f * f * f;\n const dist = 62 * q;\n const a = ((HEAD0 - 7 * q) * Math.PI) / 180;\n return [A[0] + Math.cos(a) * dist, A[1] + Math.sin(a) * dist, q];\n };\n\n function render(t: number) {\n t -= delay;\n // dot\n let dotR: number;\n if (mode === 'once') {\n const q = seg(t, 0, 0.32);\n dotR = 3.7 * (q < 1 ? 1 + 0.18 * Math.sin(Math.PI * q) : 1) * out(q);\n } else {\n dotR = 3.7;\n // The demo wraps a negative time (inside `delay`) into the rewind tail; holding the first frame reads better.\n t = t < 0 ? 0 : t % LOOP_T;\n }\n d.setAttribute('r', Math.max(0, dotR + (dotR > 0 ? 0.6 : 0)).toFixed(3));\n const ft = seg(t, T0, T0 + DRAW);\n const s = RL * fly(ft);\n const emerge = out(seg(t, T0 - 0.1, T0 + 0.22));\n if (mode === 'once' || t < T0 + DRAW + HOLD) {\n setRoute(s);\n setLeg(legT(t));\n planeAt(s, t < T0 - 0.1 ? 0 : emerge);\n landed(ft >= 1);\n trail.forEach((c) => (c.style.opacity = '0'));\n return;\n }\n // loop tail: the plane takes off and flies away while the line and branch rewind together into the dot\n landed(false);\n const t1 = T0 + DRAW + HOLD;\n const f = seg(t, t1, t1 + OFF);\n const back = seg(t, t1 + 0.05, t1 + 0.05 + BACK);\n if (f < 1) {\n const [x, y, q] = fpos(f);\n const sc = 1 + 0.4 * q;\n const rot = -7 * q;\n p.style.display = '';\n p.style.opacity = (1 - sstep(seg(f, 0.72, 1))).toFixed(3);\n p.setAttribute('transform', `translate(${x.toFixed(3)} ${y.toFixed(3)}) rotate(${rot.toFixed(2)}) scale(${sc.toFixed(4)}) translate(${-A[0]} ${-A[1]})`);\n } else p.style.opacity = '0';\n // small puffs left behind the tail\n trail.forEach((c, i) => {\n const D = [0.14, 0.28, 0.42][i];\n if (f < D || f >= 1) {\n c.style.opacity = '0';\n return;\n }\n const [x, y] = fpos(D);\n const k = seg(f, D, D + 0.45);\n c.setAttribute('cx', x.toFixed(2));\n c.setAttribute('cy', y.toFixed(2));\n c.setAttribute('r', (0.7 + 0.7 * k).toFixed(2));\n c.style.opacity = (0.5 * (1 - sstep(k))).toFixed(3);\n });\n const rs = RL * (1 - io(back));\n setRoute(rs);\n setLeg(legLen(cl((rs - jL) / (RL - jL))));\n }\n\n return { render, end: mode === 'loop' ? Infinity : delay + T0 + DRAW + 0.1 };\n}\n\n/** Test hook: forgets the shared measurements (they are cached for the page's lifetime). */\nexport function resetLogoMotionCache(): void {\n cached = null;\n}\n"],"mappings":";;;AA0CA,IAAMA,KAAM,GAAW,IAAI,GAAG,IAAI,MAAM,KAAK,IAAIC,GAAG,KAAK,IAAIC,GAAGC,CAAC,CAAC,GAC5DC,KAAO,GAAW,GAAW,MAAcJ,GAAIK,IAAIH,MAAMD,IAAIC,EAAE,GAC/DI,KAAQ,GAAW,GAAW,MAAcJ,KAAKD,IAAIC,KAAKG,GAC1DE,KAAM,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cAAc,CAACX,EAAE,GAAG,GAAG,CAACA,EAAE,GAAG,EAAE;EACzJ,OAAO,EAAE,MAAM,UAAU;EAEzB,EAAM,SAAS,GAAG,MAAM;GACtB,IAAMqC,IAAI;IAAC;IAAM;IAAM;GAAI,CAAC,CAAChF;GAC7B,IAAIH,IAAImF,KAAKnF,KAAK,GAAG;IACnB,EAAE,MAAM,UAAU;IAClB;GACF;GACA,IAAM,CAAC4B,GAAGC,KAAK2C,EAAKW,CAAC,GACf7D,IAAIvC,EAAIiB,GAAGmF,GAAGA,IAAI,GAAI;GAI5B,AAHA/D,EAAE,aAAa,MAAMQ,EAAE,QAAQ,CAAC,CAAC,GACjCR,EAAE,aAAa,MAAMS,EAAE,QAAQ,CAAC,CAAC,GACjCT,EAAE,aAAa,MAAM,KAAM,KAAME,EAAA,CAAG,QAAQ,CAAC,CAAC,GAC9C,EAAE,MAAM,WAAW,MAAO,IAAIlC,EAAMkC,CAAC,GAAA,CAAI,QAAQ,CAAC;EACpD,CAAC;EACD,IAAM8D,IAAKlF,KAAM,IAAIhB,EAAG+F,CAAI;EAE5B,AADAjB,EAASoB,CAAE,GACXnB,EAAOI,EAAO1F,GAAIyG,IAAKpD,MAAO9B,IAAK8B,EAAG,CAAC,CAAC;CAC1C;CAEA,OAAO;EAAE;EAAQ,KAAKiB,MAAS,SAAS,WAAW0B,IAAQ3B,IAAK3D,IAAO;CAAI;AAC7E"}
@@ -1,2 +1,2 @@
1
- "use client";const e=require("../../utils/cn.cjs"),t=require("../PartnerCarousel/autoplay.cjs");;/* empty css */let n=require("react"),r=require("react/jsx-runtime");var i=300,a=(0,n.forwardRef)(function({children:a,value:o,defaultValue:s=0,onValueChange:c,autoPlay:l=!1,interval:u=4e3,paused:d=!1,className:f,...p},m){let h=n.Children.toArray(a),g=h.length,_=(0,n.useRef)(null),[v,y]=t.useIndexState(o,s,c,g),{running:b,interactionProps:x}=t.useAutoplay({enabled:l&&g>1,paused:d,delay:u+i,onTick:()=>y((v+1)%g),rootRef:_,resetKey:v}),{onPointerEnter:S,onPointerLeave:C,onFocus:w,onBlur:T}=x,E=e=>{e!==v&&y(e)},D=e=>t=>{let n=!0;try{n=t.target.matches(`:focus-visible`)}catch{}n&&E(e)};return(0,r.jsx)(`div`,{ref:e=>{_.current=e,typeof m==`function`?m(e):m&&(m.current=e)},className:e.cn(`tm-package-animation`,f),"data-autoplay":b?`running`:l?`paused`:void 0,...p,onPointerEnter:e=>{p.onPointerEnter?.(e),S(e)},onPointerLeave:e=>{p.onPointerLeave?.(e),C()},onFocus:e=>{p.onFocus?.(e),w(e)},onBlur:e=>{p.onBlur?.(e),T(e)},children:(0,r.jsx)(`div`,{className:`tm-package-animation__stage`,children:h.map((e,t)=>(0,r.jsx)(`div`,{className:`tm-package-animation__card`,"data-position":t===v?`front`:`back`,onClick:()=>E(t),onFocus:D(t),children:e},t))})})});exports.PackageAnimation=a;
1
+ "use client";const e=require("../../utils/cn.cjs"),t=require("../PartnerCarousel/autoplay.cjs");;/* empty css */let n=require("react"),r=require("react/jsx-runtime");var i=300,a=(0,n.forwardRef)(function({children:a,value:o,defaultValue:s=0,onValueChange:c,autoPlay:l=!0,interval:u=4e3,paused:d=!1,className:f,...p},m){let h=n.Children.toArray(a),g=h.length,_=(0,n.useRef)(null),[v,y]=t.useIndexState(o,s,c,g),{running:b,interactionProps:x}=t.useAutoplay({enabled:l&&g>1,paused:d,delay:u+i,onTick:()=>y((v+1)%g),rootRef:_,resetKey:v}),{onPointerEnter:S,onPointerLeave:C,onFocus:w,onBlur:T}=x,E=e=>{e!==v&&y(e)},D=e=>t=>{let n=!0;try{n=t.target.matches(`:focus-visible`)}catch{}n&&E(e)};return(0,r.jsx)(`div`,{ref:e=>{_.current=e,typeof m==`function`?m(e):m&&(m.current=e)},className:e.cn(`tm-package-animation`,f),"data-autoplay":b?`running`:l?`paused`:void 0,...p,onPointerEnter:e=>{p.onPointerEnter?.(e),S(e)},onPointerLeave:e=>{p.onPointerLeave?.(e),C()},onFocus:e=>{p.onFocus?.(e),w(e)},onBlur:e=>{p.onBlur?.(e),T(e)},children:(0,r.jsx)(`div`,{className:`tm-package-animation__stage`,children:h.map((e,t)=>(0,r.jsx)(`div`,{className:`tm-package-animation__card`,"data-position":t===v?`front`:`back`,onClick:()=>E(t),onFocus:D(t),children:e},t))})})});exports.PackageAnimation=a;
2
2
  //# sourceMappingURL=PackageAnimation.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"PackageAnimation.cjs","names":["Children","useRef","useIndexState","useAutoplay","cn","require_cn","require_autoplay","react","react_jsx_runtime","SWAP_DURATION","PackageAnimation","props","cards","children","count","rootRef","index","setIndex","value","defaultValue","onValueChange","autoPlay","interval","interactionProps","bringToFront","i","handleFocus","keyboard","event","node","ref","className","running","onPointerEnter","onPointerLeave","onFocus","onBlur","card"],"sources":["../../../src/components/PackageAnimation/PackageAnimation.tsx"],"sourcesContent":["import { Children, forwardRef, useRef, type FocusEvent, type HTMLAttributes, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useAutoplay, useIndexState } from '../PartnerCarousel/autoplay';\nimport './PackageAnimation.css';\n\n/** Figma prototype: Smart animate, ease out, 300ms. Keep in sync with `--_duration` in the stylesheet. */\nconst SWAP_DURATION = 300;\n\nexport interface PackageAnimationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {\n /** The cards of the stack — two `PackageCard`s in Figma. The one at `value` lies in front, the others behind it. */\n children?: ReactNode;\n /** Index (0-based) of the card in front — Figma \"Property 1\": Default is the first swap state, Variant2 the other. Makes the component controlled. */\n value?: number;\n /** Card in front at first when uncontrolled. */\n defaultValue?: number;\n /** Called with the index of the card that comes to the front (click, keyboard focus or autoplay). */\n onValueChange?: (value: number) => void;\n /** Swaps the cards by itself, in an endless loop (the Figma prototype swaps on click only). Holds for hover, keyboard focus, a hidden tab, an off-screen stack and reduced motion. */\n autoPlay?: boolean;\n /** Time a card stays in front before the next swap, in ms. */\n interval?: number;\n /** Holds the autoplay from outside; it carries on once this is `false` again. */\n paused?: boolean;\n}\n\n/**\n * Two overlapping, tilted package cards that swap places (Figma component set \"Package animation\").\n * Clicking the card behind — or moving keyboard focus into it — brings it to the front. Both cards stay in the page for\n * assistive technology. Below 661px of container width the cards are upright and stacked, like \"Mobile / Package animation\".\n */\nexport const PackageAnimation = /* @__PURE__ */ forwardRef<HTMLDivElement, PackageAnimationProps>(function PackageAnimation(\n {\n children,\n value,\n defaultValue = 0,\n onValueChange,\n autoPlay = false,\n interval = 4000,\n paused = false,\n className,\n ...props\n },\n ref,\n) {\n const cards = Children.toArray(children);\n const count = cards.length;\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [index, setIndex] = useIndexState(value, defaultValue, onValueChange, count);\n\n const { running, interactionProps } = useAutoplay({\n enabled: autoPlay && count > 1,\n paused,\n delay: interval + SWAP_DURATION,\n onTick: () => setIndex((index + 1) % count),\n rootRef,\n resetKey: index,\n });\n const { onPointerEnter, onPointerLeave, onFocus, onBlur } = interactionProps;\n\n const bringToFront = (i: number) => {\n if (i !== index) setIndex(i);\n };\n // Keyboard focus must not land on a covered control (WCAG 2.4.11). A pointer press is left alone here: moving the card\n // under the pointer would lose the click; the click handler brings the card forward afterwards.\n const handleFocus = (i: number) => (event: FocusEvent<HTMLDivElement>) => {\n let keyboard = true;\n try {\n keyboard = event.target.matches(':focus-visible');\n } catch {\n /* :focus-visible unsupported — treat every focus as keyboard focus */\n }\n if (keyboard) bringToFront(i);\n };\n\n return (\n <div\n ref={(node) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cn('tm-package-animation', className)}\n data-autoplay={running ? 'running' : autoPlay ? 'paused' : undefined}\n {...props}\n onPointerEnter={(event) => {\n props.onPointerEnter?.(event);\n onPointerEnter(event);\n }}\n onPointerLeave={(event) => {\n props.onPointerLeave?.(event);\n onPointerLeave();\n }}\n onFocus={(event) => {\n props.onFocus?.(event);\n onFocus(event);\n }}\n onBlur={(event) => {\n props.onBlur?.(event);\n onBlur(event);\n }}\n >\n <div className=\"tm-package-animation__stage\">\n {cards.map((card, i) => (\n <div key={i} className=\"tm-package-animation__card\" data-position={i === index ? 'front' : 'back'} onClick={() => bringToFront(i)} onFocus={handleFocus(i)}>\n {card}\n </div>\n ))}\n </div>\n </div>\n );\n});\n"],"mappings":"A,4LAMA,IAAMS,EAAgB,IAwBTC,GAAmC,EAAAH,EAAA,WAAA,CAAkD,SAChG,CACE,WACA,QACA,eAAe,EACf,gBACA,WAAW,GACX,WAAW,IACX,SAAS,GACT,YACA,GAAGI,GAEL,EACA,CACA,IAAMC,EAAQZ,EAAAA,SAAS,QAAQa,CAAQ,EACjCC,EAAQF,EAAM,OACdG,GAAA,EAAUd,EAAAA,OAAAA,CAA8B,IAAI,EAC5C,CAACe,EAAOC,GAAYf,EAAAA,cAAcgB,EAAOC,EAAcC,EAAeN,CAAK,EAE3E,CAAE,UAAS,oBAAqBX,EAAAA,YAAY,CAChD,QAASkB,GAAYP,EAAQ,EAC7B,SACA,MAAOQ,EAAWb,EAClB,WAAcQ,GAAUD,EAAQ,GAAKF,CAAK,EAC1C,UACA,SAAUE,CACZ,CAAC,EACK,CAAE,iBAAgB,iBAAgB,UAAS,UAAWO,EAEtDC,EAAgB,GAAc,CAC9BC,IAAMT,GAAOC,EAASQ,CAAC,CAC7B,EAGMC,EAAe,GAAe,GAAsC,CACxE,IAAIC,EAAW,GACf,GAAI,CACF,EAAWC,EAAM,OAAO,QAAQ,gBAAgB,CAClD,MAAQ,CAER,CACID,GAAUH,EAAaC,CAAC,CAC9B,EAEA,OACE,EAAAjB,EAAA,IAAA,CAAC,MAAD,CACE,IAAM,GAAS,CACb,EAAQ,QAAUqB,EACd,OAAOC,GAAQ,WAAYA,EAAID,CAAI,EAC9BC,IAAK,EAAI,QAAUD,EAC9B,EACA,UAAWzB,EAAAA,GAAG,uBAAwB2B,CAAS,EAC/C,gBAAeC,EAAU,UAAYX,EAAW,SAAW,IAAA,GAC3D,GAAIV,EACJ,eAAiB,GAAU,CACzBA,EAAM,iBAAiBiB,CAAK,EAC5BK,EAAeL,CAAK,CACtB,EACA,eAAiB,GAAU,CACzBjB,EAAM,iBAAiBiB,CAAK,EAC5BM,EAAe,CACjB,EACA,QAAU,GAAU,CAClBvB,EAAM,UAAUiB,CAAK,EACrBO,EAAQP,CAAK,CACf,EACA,OAAS,GAAU,CACjBjB,EAAM,SAASiB,CAAK,EACpBQ,EAAOR,CAAK,CACd,EAEA,UAAA,EAAApB,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,8BACZ,SAAAI,EAAM,KAAK,EAAM,KAChB,EAAAJ,EAAA,IAAA,CAAC,MAAD,CAAa,UAAU,6BAA6B,gBAAeiB,IAAMT,EAAQ,QAAU,OAAQ,YAAeQ,EAAaC,CAAC,EAAG,QAASC,EAAYD,CAAC,EACtJ,SAAAY,CACE,EAFKZ,CAEL,CACN,CACE,CAAA,CACF,CAAA,CAET,CAAC,E"}
1
+ {"version":3,"file":"PackageAnimation.cjs","names":["Children","useRef","useIndexState","useAutoplay","cn","require_cn","require_autoplay","react","react_jsx_runtime","SWAP_DURATION","PackageAnimation","props","cards","children","count","rootRef","index","setIndex","value","defaultValue","onValueChange","autoPlay","interval","interactionProps","bringToFront","i","handleFocus","keyboard","event","node","ref","className","running","onPointerEnter","onPointerLeave","onFocus","onBlur","card"],"sources":["../../../src/components/PackageAnimation/PackageAnimation.tsx"],"sourcesContent":["import { Children, forwardRef, useRef, type FocusEvent, type HTMLAttributes, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useAutoplay, useIndexState } from '../PartnerCarousel/autoplay';\nimport './PackageAnimation.css';\n\n/** Figma prototype: Smart animate, ease out, 300ms. Keep in sync with `--_duration` in the stylesheet. */\nconst SWAP_DURATION = 300;\n\nexport interface PackageAnimationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {\n /** The cards of the stack — two `PackageCard`s in Figma. The one at `value` lies in front, the others behind it. */\n children?: ReactNode;\n /** Index (0-based) of the card in front — Figma \"Property 1\": Default is the first swap state, Variant2 the other. Makes the component controlled. */\n value?: number;\n /** Card in front at first when uncontrolled. */\n defaultValue?: number;\n /** Called with the index of the card that comes to the front (click, keyboard focus or autoplay). */\n onValueChange?: (value: number) => void;\n /** Swaps the cards by itself, in an endless loop (on by default; the Figma prototype swaps on click only). Holds for hover, keyboard focus, a hidden tab, an off-screen stack and reduced motion. */\n autoPlay?: boolean;\n /** Time a card stays in front before the next swap, in ms. */\n interval?: number;\n /** Holds the autoplay from outside; it carries on once this is `false` again. */\n paused?: boolean;\n}\n\n/**\n * Two overlapping, tilted package cards that swap places (Figma component set \"Package animation\").\n * Clicking the card behind — or moving keyboard focus into it — brings it to the front. Both cards stay in the page for\n * assistive technology. Below 661px of container width the cards are upright and stacked, like \"Mobile / Package animation\".\n */\nexport const PackageAnimation = /* @__PURE__ */ forwardRef<HTMLDivElement, PackageAnimationProps>(function PackageAnimation(\n {\n children,\n value,\n defaultValue = 0,\n onValueChange,\n autoPlay = true,\n interval = 4000,\n paused = false,\n className,\n ...props\n },\n ref,\n) {\n const cards = Children.toArray(children);\n const count = cards.length;\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [index, setIndex] = useIndexState(value, defaultValue, onValueChange, count);\n\n const { running, interactionProps } = useAutoplay({\n enabled: autoPlay && count > 1,\n paused,\n delay: interval + SWAP_DURATION,\n onTick: () => setIndex((index + 1) % count),\n rootRef,\n resetKey: index,\n });\n const { onPointerEnter, onPointerLeave, onFocus, onBlur } = interactionProps;\n\n const bringToFront = (i: number) => {\n if (i !== index) setIndex(i);\n };\n // Keyboard focus must not land on a covered control (WCAG 2.4.11). A pointer press is left alone here: moving the card\n // under the pointer would lose the click; the click handler brings the card forward afterwards.\n const handleFocus = (i: number) => (event: FocusEvent<HTMLDivElement>) => {\n let keyboard = true;\n try {\n keyboard = event.target.matches(':focus-visible');\n } catch {\n /* :focus-visible unsupported — treat every focus as keyboard focus */\n }\n if (keyboard) bringToFront(i);\n };\n\n return (\n <div\n ref={(node) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cn('tm-package-animation', className)}\n data-autoplay={running ? 'running' : autoPlay ? 'paused' : undefined}\n {...props}\n onPointerEnter={(event) => {\n props.onPointerEnter?.(event);\n onPointerEnter(event);\n }}\n onPointerLeave={(event) => {\n props.onPointerLeave?.(event);\n onPointerLeave();\n }}\n onFocus={(event) => {\n props.onFocus?.(event);\n onFocus(event);\n }}\n onBlur={(event) => {\n props.onBlur?.(event);\n onBlur(event);\n }}\n >\n <div className=\"tm-package-animation__stage\">\n {cards.map((card, i) => (\n <div key={i} className=\"tm-package-animation__card\" data-position={i === index ? 'front' : 'back'} onClick={() => bringToFront(i)} onFocus={handleFocus(i)}>\n {card}\n </div>\n ))}\n </div>\n </div>\n );\n});\n"],"mappings":"A,4LAMA,IAAMS,EAAgB,IAwBTC,GAAmC,EAAAH,EAAA,WAAA,CAAkD,SAChG,CACE,WACA,QACA,eAAe,EACf,gBACA,WAAW,GACX,WAAW,IACX,SAAS,GACT,YACA,GAAGI,GAEL,EACA,CACA,IAAMC,EAAQZ,EAAAA,SAAS,QAAQa,CAAQ,EACjCC,EAAQF,EAAM,OACdG,GAAA,EAAUd,EAAAA,OAAAA,CAA8B,IAAI,EAC5C,CAACe,EAAOC,GAAYf,EAAAA,cAAcgB,EAAOC,EAAcC,EAAeN,CAAK,EAE3E,CAAE,UAAS,oBAAqBX,EAAAA,YAAY,CAChD,QAASkB,GAAYP,EAAQ,EAC7B,SACA,MAAOQ,EAAWb,EAClB,WAAcQ,GAAUD,EAAQ,GAAKF,CAAK,EAC1C,UACA,SAAUE,CACZ,CAAC,EACK,CAAE,iBAAgB,iBAAgB,UAAS,UAAWO,EAEtDC,EAAgB,GAAc,CAC9BC,IAAMT,GAAOC,EAASQ,CAAC,CAC7B,EAGMC,EAAe,GAAe,GAAsC,CACxE,IAAIC,EAAW,GACf,GAAI,CACF,EAAWC,EAAM,OAAO,QAAQ,gBAAgB,CAClD,MAAQ,CAER,CACID,GAAUH,EAAaC,CAAC,CAC9B,EAEA,OACE,EAAAjB,EAAA,IAAA,CAAC,MAAD,CACE,IAAM,GAAS,CACb,EAAQ,QAAUqB,EACd,OAAOC,GAAQ,WAAYA,EAAID,CAAI,EAC9BC,IAAK,EAAI,QAAUD,EAC9B,EACA,UAAWzB,EAAAA,GAAG,uBAAwB2B,CAAS,EAC/C,gBAAeC,EAAU,UAAYX,EAAW,SAAW,IAAA,GAC3D,GAAIV,EACJ,eAAiB,GAAU,CACzBA,EAAM,iBAAiBiB,CAAK,EAC5BK,EAAeL,CAAK,CACtB,EACA,eAAiB,GAAU,CACzBjB,EAAM,iBAAiBiB,CAAK,EAC5BM,EAAe,CACjB,EACA,QAAU,GAAU,CAClBvB,EAAM,UAAUiB,CAAK,EACrBO,EAAQP,CAAK,CACf,EACA,OAAS,GAAU,CACjBjB,EAAM,SAASiB,CAAK,EACpBQ,EAAOR,CAAK,CACd,EAEA,UAAA,EAAApB,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,8BACZ,SAAAI,EAAM,KAAK,EAAM,KAChB,EAAAJ,EAAA,IAAA,CAAC,MAAD,CAAa,UAAU,6BAA6B,gBAAeiB,IAAMT,EAAQ,QAAU,OAAQ,YAAeQ,EAAaC,CAAC,EAAG,QAASC,EAAYD,CAAC,EACtJ,SAAAY,CACE,EAFKZ,CAEL,CACN,CACE,CAAA,CACF,CAAA,CAET,CAAC,E"}
@@ -5,7 +5,7 @@ import { useAutoplay as t, useIndexState as n } from "../PartnerCarousel/autopla
5
5
  import { Children as r, forwardRef as i, useRef as a } from "react";
6
6
  import { jsx as o } from "react/jsx-runtime";
7
7
  // src/components/PackageAnimation/PackageAnimation.tsx
8
- var s = 300, c = /* @__PURE__ */ i(function({ children: i, value: c, defaultValue: l = 0, onValueChange: u, autoPlay: d = !1, interval: f = 4e3, paused: p = !1, className: m, ...h }, g) {
8
+ var s = 300, c = /* @__PURE__ */ i(function({ children: i, value: c, defaultValue: l = 0, onValueChange: u, autoPlay: d = !0, interval: f = 4e3, paused: p = !1, className: m, ...h }, g) {
9
9
  let _ = r.toArray(i), v = _.length, y = a(null), [b, x] = n(c, l, u, v), { running: S, interactionProps: C } = t({
10
10
  enabled: d && v > 1,
11
11
  paused: p,
@@ -1 +1 @@
1
- {"version":3,"file":"PackageAnimation.js","names":["SWAP_DURATION","PackageAnimation","props","cards","Children","children","count","rootRef","useRef","index","setIndex","useIndexState","value","defaultValue","onValueChange","useAutoplay","autoPlay","interval","interactionProps","bringToFront","i","handleFocus","keyboard","event","node","ref","cn","className","running","onPointerEnter","onPointerLeave","onFocus","onBlur","card"],"sources":["../../../src/components/PackageAnimation/PackageAnimation.tsx"],"sourcesContent":["import { Children, forwardRef, useRef, type FocusEvent, type HTMLAttributes, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useAutoplay, useIndexState } from '../PartnerCarousel/autoplay';\nimport './PackageAnimation.css';\n\n/** Figma prototype: Smart animate, ease out, 300ms. Keep in sync with `--_duration` in the stylesheet. */\nconst SWAP_DURATION = 300;\n\nexport interface PackageAnimationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {\n /** The cards of the stack — two `PackageCard`s in Figma. The one at `value` lies in front, the others behind it. */\n children?: ReactNode;\n /** Index (0-based) of the card in front — Figma \"Property 1\": Default is the first swap state, Variant2 the other. Makes the component controlled. */\n value?: number;\n /** Card in front at first when uncontrolled. */\n defaultValue?: number;\n /** Called with the index of the card that comes to the front (click, keyboard focus or autoplay). */\n onValueChange?: (value: number) => void;\n /** Swaps the cards by itself, in an endless loop (the Figma prototype swaps on click only). Holds for hover, keyboard focus, a hidden tab, an off-screen stack and reduced motion. */\n autoPlay?: boolean;\n /** Time a card stays in front before the next swap, in ms. */\n interval?: number;\n /** Holds the autoplay from outside; it carries on once this is `false` again. */\n paused?: boolean;\n}\n\n/**\n * Two overlapping, tilted package cards that swap places (Figma component set \"Package animation\").\n * Clicking the card behind — or moving keyboard focus into it — brings it to the front. Both cards stay in the page for\n * assistive technology. Below 661px of container width the cards are upright and stacked, like \"Mobile / Package animation\".\n */\nexport const PackageAnimation = /* @__PURE__ */ forwardRef<HTMLDivElement, PackageAnimationProps>(function PackageAnimation(\n {\n children,\n value,\n defaultValue = 0,\n onValueChange,\n autoPlay = false,\n interval = 4000,\n paused = false,\n className,\n ...props\n },\n ref,\n) {\n const cards = Children.toArray(children);\n const count = cards.length;\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [index, setIndex] = useIndexState(value, defaultValue, onValueChange, count);\n\n const { running, interactionProps } = useAutoplay({\n enabled: autoPlay && count > 1,\n paused,\n delay: interval + SWAP_DURATION,\n onTick: () => setIndex((index + 1) % count),\n rootRef,\n resetKey: index,\n });\n const { onPointerEnter, onPointerLeave, onFocus, onBlur } = interactionProps;\n\n const bringToFront = (i: number) => {\n if (i !== index) setIndex(i);\n };\n // Keyboard focus must not land on a covered control (WCAG 2.4.11). A pointer press is left alone here: moving the card\n // under the pointer would lose the click; the click handler brings the card forward afterwards.\n const handleFocus = (i: number) => (event: FocusEvent<HTMLDivElement>) => {\n let keyboard = true;\n try {\n keyboard = event.target.matches(':focus-visible');\n } catch {\n /* :focus-visible unsupported — treat every focus as keyboard focus */\n }\n if (keyboard) bringToFront(i);\n };\n\n return (\n <div\n ref={(node) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cn('tm-package-animation', className)}\n data-autoplay={running ? 'running' : autoPlay ? 'paused' : undefined}\n {...props}\n onPointerEnter={(event) => {\n props.onPointerEnter?.(event);\n onPointerEnter(event);\n }}\n onPointerLeave={(event) => {\n props.onPointerLeave?.(event);\n onPointerLeave();\n }}\n onFocus={(event) => {\n props.onFocus?.(event);\n onFocus(event);\n }}\n onBlur={(event) => {\n props.onBlur?.(event);\n onBlur(event);\n }}\n >\n <div className=\"tm-package-animation__stage\">\n {cards.map((card, i) => (\n <div key={i} className=\"tm-package-animation__card\" data-position={i === index ? 'front' : 'back'} onClick={() => bringToFront(i)} onFocus={handleFocus(i)}>\n {card}\n </div>\n ))}\n </div>\n </div>\n );\n});\n"],"mappings":";;;;;;;AAMA,IAAMA,IAAgB,KAwBTC,IAAmC,kBAAkD,SAChG,EACE,aACA,UACA,kBAAe,GACf,kBACA,cAAW,IACX,cAAW,KACX,YAAS,IACT,cACA,GAAGC,KAEL,GACA;CACA,IAAMC,IAAQC,EAAS,QAAQC,CAAQ,GACjCC,IAAQH,EAAM,QACdI,IAAUC,EAA8B,IAAI,GAC5C,CAACC,GAAOC,KAAYC,EAAcC,GAAOC,GAAcC,GAAeR,CAAK,GAE3E,EAAE,YAAS,wBAAqBS,EAAY;EAChD,SAASC,KAAYV,IAAQ;EAC7B;EACA,OAAOW,IAAWjB;EAClB,cAAcU,GAAUD,IAAQ,KAAKH,CAAK;EAC1C;EACA,UAAUG;CACZ,CAAC,GACK,EAAE,mBAAgB,mBAAgB,YAAS,cAAWS,GAEtDC,KAAgB,MAAc;EAClC,AAAIC,MAAMX,KAAOC,EAASU,CAAC;CAC7B,GAGMC,KAAe,OAAe,MAAsC;EACxE,IAAIC,IAAW;EACf,IAAI;GACF,IAAWC,EAAM,OAAO,QAAQ,gBAAgB;EAClD,QAAQ,CAER;EACA,AAAID,KAAUH,EAAaC,CAAC;CAC9B;CAEA,OACE,kBAAC,OAAD;EACE,MAAM,MAAS;GAEb,AADA,EAAQ,UAAUI,GACd,OAAOC,KAAQ,aAAYA,EAAID,CAAI,IAC9BC,MAAK,EAAI,UAAUD;EAC9B;EACA,WAAWE,EAAG,wBAAwBC,CAAS;EAC/C,iBAAeC,IAAU,YAAYZ,IAAW,WAAW,KAAA;EAC3D,GAAId;EACJ,iBAAiB,MAAU;GAEzB,AADAA,EAAM,iBAAiBqB,CAAK,GAC5BM,EAAeN,CAAK;EACtB;EACA,iBAAiB,MAAU;GAEzB,AADArB,EAAM,iBAAiBqB,CAAK,GAC5BO,EAAe;EACjB;EACA,UAAU,MAAU;GAElB,AADA5B,EAAM,UAAUqB,CAAK,GACrBQ,EAAQR,CAAK;EACf;EACA,SAAS,MAAU;GAEjB,AADArB,EAAM,SAASqB,CAAK,GACpBS,EAAOT,CAAK;EACd;EAEA,UAAA,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAApB,EAAM,KAAK,GAAM,MAChB,kBAAC,OAAD;IAAa,WAAU;IAA6B,iBAAeiB,MAAMX,IAAQ,UAAU;IAAQ,eAAeU,EAAaC,CAAC;IAAG,SAASC,EAAYD,CAAC;IACtJ,UAAAa;GACE,GAFKb,CAEL,CACN;EACE,CAAA;CACF,CAAA;AAET,CAAC"}
1
+ {"version":3,"file":"PackageAnimation.js","names":["SWAP_DURATION","PackageAnimation","props","cards","Children","children","count","rootRef","useRef","index","setIndex","useIndexState","value","defaultValue","onValueChange","useAutoplay","autoPlay","interval","interactionProps","bringToFront","i","handleFocus","keyboard","event","node","ref","cn","className","running","onPointerEnter","onPointerLeave","onFocus","onBlur","card"],"sources":["../../../src/components/PackageAnimation/PackageAnimation.tsx"],"sourcesContent":["import { Children, forwardRef, useRef, type FocusEvent, type HTMLAttributes, type ReactNode } from 'react';\nimport { cn } from '../../utils/cn';\nimport { useAutoplay, useIndexState } from '../PartnerCarousel/autoplay';\nimport './PackageAnimation.css';\n\n/** Figma prototype: Smart animate, ease out, 300ms. Keep in sync with `--_duration` in the stylesheet. */\nconst SWAP_DURATION = 300;\n\nexport interface PackageAnimationProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {\n /** The cards of the stack — two `PackageCard`s in Figma. The one at `value` lies in front, the others behind it. */\n children?: ReactNode;\n /** Index (0-based) of the card in front — Figma \"Property 1\": Default is the first swap state, Variant2 the other. Makes the component controlled. */\n value?: number;\n /** Card in front at first when uncontrolled. */\n defaultValue?: number;\n /** Called with the index of the card that comes to the front (click, keyboard focus or autoplay). */\n onValueChange?: (value: number) => void;\n /** Swaps the cards by itself, in an endless loop (on by default; the Figma prototype swaps on click only). Holds for hover, keyboard focus, a hidden tab, an off-screen stack and reduced motion. */\n autoPlay?: boolean;\n /** Time a card stays in front before the next swap, in ms. */\n interval?: number;\n /** Holds the autoplay from outside; it carries on once this is `false` again. */\n paused?: boolean;\n}\n\n/**\n * Two overlapping, tilted package cards that swap places (Figma component set \"Package animation\").\n * Clicking the card behind — or moving keyboard focus into it — brings it to the front. Both cards stay in the page for\n * assistive technology. Below 661px of container width the cards are upright and stacked, like \"Mobile / Package animation\".\n */\nexport const PackageAnimation = /* @__PURE__ */ forwardRef<HTMLDivElement, PackageAnimationProps>(function PackageAnimation(\n {\n children,\n value,\n defaultValue = 0,\n onValueChange,\n autoPlay = true,\n interval = 4000,\n paused = false,\n className,\n ...props\n },\n ref,\n) {\n const cards = Children.toArray(children);\n const count = cards.length;\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [index, setIndex] = useIndexState(value, defaultValue, onValueChange, count);\n\n const { running, interactionProps } = useAutoplay({\n enabled: autoPlay && count > 1,\n paused,\n delay: interval + SWAP_DURATION,\n onTick: () => setIndex((index + 1) % count),\n rootRef,\n resetKey: index,\n });\n const { onPointerEnter, onPointerLeave, onFocus, onBlur } = interactionProps;\n\n const bringToFront = (i: number) => {\n if (i !== index) setIndex(i);\n };\n // Keyboard focus must not land on a covered control (WCAG 2.4.11). A pointer press is left alone here: moving the card\n // under the pointer would lose the click; the click handler brings the card forward afterwards.\n const handleFocus = (i: number) => (event: FocusEvent<HTMLDivElement>) => {\n let keyboard = true;\n try {\n keyboard = event.target.matches(':focus-visible');\n } catch {\n /* :focus-visible unsupported — treat every focus as keyboard focus */\n }\n if (keyboard) bringToFront(i);\n };\n\n return (\n <div\n ref={(node) => {\n rootRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) ref.current = node;\n }}\n className={cn('tm-package-animation', className)}\n data-autoplay={running ? 'running' : autoPlay ? 'paused' : undefined}\n {...props}\n onPointerEnter={(event) => {\n props.onPointerEnter?.(event);\n onPointerEnter(event);\n }}\n onPointerLeave={(event) => {\n props.onPointerLeave?.(event);\n onPointerLeave();\n }}\n onFocus={(event) => {\n props.onFocus?.(event);\n onFocus(event);\n }}\n onBlur={(event) => {\n props.onBlur?.(event);\n onBlur(event);\n }}\n >\n <div className=\"tm-package-animation__stage\">\n {cards.map((card, i) => (\n <div key={i} className=\"tm-package-animation__card\" data-position={i === index ? 'front' : 'back'} onClick={() => bringToFront(i)} onFocus={handleFocus(i)}>\n {card}\n </div>\n ))}\n </div>\n </div>\n );\n});\n"],"mappings":";;;;;;;AAMA,IAAMA,IAAgB,KAwBTC,IAAmC,kBAAkD,SAChG,EACE,aACA,UACA,kBAAe,GACf,kBACA,cAAW,IACX,cAAW,KACX,YAAS,IACT,cACA,GAAGC,KAEL,GACA;CACA,IAAMC,IAAQC,EAAS,QAAQC,CAAQ,GACjCC,IAAQH,EAAM,QACdI,IAAUC,EAA8B,IAAI,GAC5C,CAACC,GAAOC,KAAYC,EAAcC,GAAOC,GAAcC,GAAeR,CAAK,GAE3E,EAAE,YAAS,wBAAqBS,EAAY;EAChD,SAASC,KAAYV,IAAQ;EAC7B;EACA,OAAOW,IAAWjB;EAClB,cAAcU,GAAUD,IAAQ,KAAKH,CAAK;EAC1C;EACA,UAAUG;CACZ,CAAC,GACK,EAAE,mBAAgB,mBAAgB,YAAS,cAAWS,GAEtDC,KAAgB,MAAc;EAClC,AAAIC,MAAMX,KAAOC,EAASU,CAAC;CAC7B,GAGMC,KAAe,OAAe,MAAsC;EACxE,IAAIC,IAAW;EACf,IAAI;GACF,IAAWC,EAAM,OAAO,QAAQ,gBAAgB;EAClD,QAAQ,CAER;EACA,AAAID,KAAUH,EAAaC,CAAC;CAC9B;CAEA,OACE,kBAAC,OAAD;EACE,MAAM,MAAS;GAEb,AADA,EAAQ,UAAUI,GACd,OAAOC,KAAQ,aAAYA,EAAID,CAAI,IAC9BC,MAAK,EAAI,UAAUD;EAC9B;EACA,WAAWE,EAAG,wBAAwBC,CAAS;EAC/C,iBAAeC,IAAU,YAAYZ,IAAW,WAAW,KAAA;EAC3D,GAAId;EACJ,iBAAiB,MAAU;GAEzB,AADAA,EAAM,iBAAiBqB,CAAK,GAC5BM,EAAeN,CAAK;EACtB;EACA,iBAAiB,MAAU;GAEzB,AADArB,EAAM,iBAAiBqB,CAAK,GAC5BO,EAAe;EACjB;EACA,UAAU,MAAU;GAElB,AADA5B,EAAM,UAAUqB,CAAK,GACrBQ,EAAQR,CAAK;EACf;EACA,SAAS,MAAU;GAEjB,AADArB,EAAM,SAASqB,CAAK,GACpBS,EAAOT,CAAK;EACd;EAEA,UAAA,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAApB,EAAM,KAAK,GAAM,MAChB,kBAAC,OAAD;IAAa,WAAU;IAA6B,iBAAeiB,MAAMX,IAAQ,UAAU;IAAQ,eAAeU,EAAaC,CAAC;IAAG,SAASC,EAAYD,CAAC;IACtJ,UAAAa;GACE,GAFKb,CAEL,CACN;EACE,CAAA;CACF,CAAA;AAET,CAAC"}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});/* empty css */const ee=require("./utils/cn.cjs"),te=require("./icons/createIcon.cjs"),ne=require("./icons/generated/AirplaneSeatIcon.cjs"),re=require("./icons/generated/BackArrowIcon.cjs"),ie=require("./icons/generated/BaggageIcon.cjs"),ae=require("./icons/generated/BedIcon.cjs"),oe=require("./icons/generated/BookmarkIcon.cjs"),se=require("./icons/generated/BriefcaseIcon.cjs"),ce=require("./icons/generated/CalendarIcon.cjs"),le=require("./icons/generated/CarIcon.cjs"),ue=require("./icons/generated/CheckmarkIcon.cjs"),de=require("./icons/generated/CompareIcon.cjs"),fe=require("./icons/generated/DownArrowIcon.cjs"),pe=require("./icons/generated/EmailIcon.cjs"),me=require("./icons/generated/ErrorCircleIcon.cjs"),he=require("./icons/generated/EyeOpenIcon.cjs"),ge=require("./icons/generated/EyeSlashedIcon.cjs"),_e=require("./icons/generated/FlagIcon.cjs"),ve=require("./icons/generated/FlagFranceIcon.cjs"),ye=require("./icons/generated/FlagGermanyIcon.cjs"),be=require("./icons/generated/FlagItalyIcon.cjs"),xe=require("./icons/generated/FlagNetherlandsIcon.cjs"),Se=require("./icons/generated/FlagRoundIcon.cjs"),Ce=require("./icons/generated/FlagRussiaIcon.cjs"),we=require("./icons/generated/FlagUaeIcon.cjs"),Te=require("./icons/generated/ForkKnifeIcon.cjs"),e=require("./icons/generated/LanguageIcon.cjs"),t=require("./icons/generated/LockIcon.cjs"),n=require("./icons/generated/MapPinIcon.cjs"),r=require("./icons/generated/MenuIcon.cjs"),i=require("./icons/generated/MinusIcon.cjs"),a=require("./icons/generated/MountainIcon.cjs"),o=require("./icons/generated/NextArrowIcon.cjs"),s=require("./icons/generated/NotificationIcon.cjs"),c=require("./icons/generated/OtherIcon.cjs"),l=require("./icons/generated/PaperIcon.cjs"),u=require("./icons/generated/PassportIcon.cjs"),d=require("./icons/generated/PeopleIcon.cjs"),f=require("./icons/generated/PlaneIcon.cjs"),p=require("./icons/generated/PlaneLandingIcon.cjs"),m=require("./icons/generated/PlaneTakeoffIcon.cjs"),h=require("./icons/generated/PlusIcon.cjs"),g=require("./icons/generated/PreferencesIcon.cjs"),_=require("./icons/generated/ResizeFieldIcon.cjs"),v=require("./icons/generated/ReverseArrowIcon.cjs"),y=require("./icons/generated/RoadmapIcon.cjs"),b=require("./icons/generated/SaveTimeIcon.cjs"),x=require("./icons/generated/SearchIcon.cjs"),S=require("./icons/generated/ShieldIcon.cjs"),C=require("./icons/generated/StarIcon.cjs"),w=require("./icons/generated/StopsIcon.cjs"),T=require("./icons/generated/TicketIcon.cjs"),E=require("./icons/generated/TrashBinIcon.cjs"),D=require("./icons/generated/UpArrowIcon.cjs"),O=require("./icons/generated/UpDownArrowIcon.cjs"),Ee=require("./icons/generated/UserIcon.cjs"),De=require("./icons/generated/WalletIcon.cjs"),Oe=require("./icons/generated/XMarkIcon.cjs"),k=require("./icons/generated/index.cjs"),ke=require("./icons/Icon.cjs"),Ae=require("./components/Logo/Logo.cjs"),A=require("./components/AgencyLogo/AgencyLogo.cjs"),je=require("./components/Button/Button.cjs"),j=require("./components/Field/Field.cjs"),Me=require("./components/Text/Text.cjs"),Ne=require("./components/Tag/Tag.cjs"),Pe=require("./components/StatusTag/StatusTag.cjs"),Fe=require("./components/RequestStatus/RequestStatus.cjs"),Ie=require("./components/VerificationBadge/VerificationBadge.cjs"),Le=require("./components/Rating/Rating.cjs"),M=require("./components/ChoiceChip/ChoiceChip.cjs"),Re=require("./components/InclusionIndicator/InclusionIndicator.cjs"),ze=require("./components/TextInput/TextInput.cjs"),Be=require("./components/TextInput/PasswordInput.cjs"),Ve=require("./components/Textarea/Textarea.cjs"),N=require("./components/OptionList/OptionList.cjs"),He=require("./components/Select/SelectedItem.cjs"),Ue=require("./components/Select/Select.cjs"),We=require("./components/LanguageSelect/LanguageSelect.cjs"),Ge=require("./components/CurrencySelect/CurrencySelect.cjs"),Ke=require("./components/PhoneInput/PhoneInput.cjs"),P=require("./components/SearchInput/SearchInput.cjs"),qe=require("./components/DateField/DateField.cjs"),Je=require("./components/RouteField/RouteField.cjs"),F=require("./components/Checkbox/Checkbox.cjs"),I=require("./components/Radio/Radio.cjs"),Ye=require("./components/Toggle/Toggle.cjs"),Xe=require("./components/IconButton/IconButton.cjs"),Ze=require("./components/QuantityStepper/QuantityStepper.cjs"),Qe=require("./components/BudgetField/BudgetField.cjs"),L=require("./components/TravelerSelector/TravelerSelector.cjs"),$e=require("./components/CalendarDay/CalendarDay.cjs"),et=require("./components/HeaderItem/HeaderItem.cjs"),R=require("./components/Breadcrumb/Breadcrumb.cjs"),tt=require("./components/Pagination/Pagination.cjs"),nt=require("./components/FormProgress/FormProgress.cjs"),rt=require("./components/InlineAlert/InlineAlert.cjs"),it=require("./components/Calendar/Calendar.cjs"),z=require("./components/DatePicker/DatePicker.cjs"),B=require("./components/DateRangePicker/DateRangePicker.cjs"),V=require("./components/PortalHeader/PortalHeader.cjs"),at=require("./components/NotificationsButton/NotificationsButton.cjs"),ot=require("./components/NotificationsDropdown/NotificationsDropdown.cjs"),st=require("./components/NotificationsDropdown/NotificationsMenu.cjs"),H=require("./components/AccountMenu/AccountMenu.cjs"),ct=require("./components/SiteHeader/SiteHeader.cjs"),lt=require("./components/SiteFooter/SiteFooter.cjs"),ut=require("./components/PortalFooter/PortalFooter.cjs"),dt=require("./components/NotificationItem/NotificationItem.cjs"),ft=require("./components/RequestCard/RequestCard.cjs"),U=require("./components/RequestSummary/RequestSummary.cjs"),pt=require("./components/HelpQuestionCard/HelpQuestionCard.cjs"),mt=require("./components/AgencyCard/AgencyCard.cjs"),ht=require("./components/AgencyOfferCard/AgencyOfferCard.cjs"),W=require("./components/OfferComparison/OfferComparison.cjs"),gt=require("./components/PackageCard/PackageCardElement.cjs"),_t=require("./components/PackageCard/PackageCard.cjs"),vt=require("./components/PartnerCard/PartnerCard.cjs"),yt=require("./components/ReviewItem/ReviewItem.cjs"),bt=require("./components/ReviewsSummary/ReviewsSummary.cjs"),xt=require("./components/ReviewsEmptyState/ReviewsEmptyState.cjs"),G=require("./components/FaqItem/FaqItem.cjs"),St=require("./components/PopularQuestions/PopularQuestions.cjs"),Ct=require("./components/AgenciesFilter/AgenciesFilter.cjs"),K=require("./components/PlansPicker/PlansPicker.cjs"),q=require("./components/StepCard/StepCard.cjs"),wt=require("./components/PhotoAccordion/PhotoAccordion.cjs"),Tt=require("./components/DestinationAccordion/DestinationAccordion.cjs"),Et=require("./components/Destinations/Destinations.cjs"),Dt=require("./components/TripTypes/TripTypes.cjs"),J=require("./components/Dialog/Dialog.cjs"),Ot=require("./components/ConfirmationDialog/ConfirmationDialog.cjs"),Y=require("./components/NewRequestOverlay/NewRequestOverlay.cjs"),kt=require("./components/EmptyState/EmptyState.cjs"),At=require("./components/ErrorState/ErrorState.cjs"),jt=require("./components/RequestStatusTimeline/RequestStatusTimeline.cjs"),Mt=require("./components/HeroColumns/HeroColumns.cjs"),Nt=require("./components/HeroSwitcher/HeroSwitcher.cjs"),X=require("./components/HeroOrbit/HeroOrbit.cjs"),Pt=require("./components/HeroMap/HeroMap.cjs"),Z=require("./components/HowItWorksSteps/HowItWorksSteps.cjs"),Ft=require("./components/ExampleRequests/ExampleRequests.cjs"),Q=require("./components/WhyTravelMatch/WhyTravelMatch.cjs"),It=require("./components/PackageAnimation/PackageAnimation.cjs"),Lt=require("./components/PartnerCarousel/PartnerCarousel.cjs"),Rt=require("./components/CtaRequestFlow/CtaRequestFlow.cjs"),zt=require("./components/CtaSentence/CtaSentence.cjs"),Bt=require("./components/Sheet/Sheet.cjs"),Vt=require("./components/SelectSheet/SelectSheet.cjs"),Ht=require("./components/AccountSheet/AccountSheet.cjs"),Ut=require("./components/NotificationsPanel/NotificationsPanel.cjs"),$=require("./components/DatePickerSheet/DatePickerSheet.cjs"),Wt=require("./components/BackLink/BackLink.cjs"),Gt=require("./components/FilterChips/FilterChips.cjs"),Kt=require("./components/IconTile/IconTile.cjs"),qt=require("./components/SocialButton/SocialButton.cjs"),Jt=require("./components/Divider/Divider.cjs"),Yt=require("./components/SegmentedControl/SegmentedControl.cjs"),Xt=require("./components/PasswordStrength/PasswordStrength.cjs");exports.AccountMenu=H.AccountMenu,exports.AccountMenuItem=H.AccountMenuItem,exports.AccountMenuSeparator=H.AccountMenuSeparator,exports.AccountSheet=Ht.AccountSheet,exports.AgenciesFilter=Ct.AgenciesFilter,exports.AgencyCard=mt.AgencyCard,exports.AgencyLogo=A.AgencyLogo,exports.AgencyOfferCard=ht.AgencyOfferCard,exports.AirplaneSeatIcon=ne.AirplaneSeatIcon,exports.BackArrowIcon=re.BackArrowIcon,exports.BackLink=Wt.BackLink,exports.BaggageIcon=ie.BaggageIcon,exports.BedIcon=ae.BedIcon,exports.BookmarkIcon=oe.BookmarkIcon,exports.Breadcrumb=R.Breadcrumb,exports.BreadcrumbItem=R.BreadcrumbItem,exports.BriefcaseIcon=se.BriefcaseIcon,exports.BudgetField=Qe.BudgetField,exports.Button=je.Button,exports.Calendar=it.Calendar,exports.CalendarDay=$e.CalendarDay,exports.CalendarIcon=ce.CalendarIcon,exports.CarIcon=le.CarIcon,exports.Checkbox=F.Checkbox,exports.CheckmarkIcon=ue.CheckmarkIcon,exports.ChoiceChip=M.ChoiceChip,exports.ChoiceChipGroup=M.ChoiceChipGroup,exports.CompareIcon=de.CompareIcon,exports.ConfirmationDialog=Ot.ConfirmationDialog,exports.CtaRequestFlow=Rt.CtaRequestFlow,exports.CtaSentence=zt.CtaSentence,exports.CurrencySelect=Ge.CurrencySelect,exports.DateField=qe.DateField,exports.DatePicker=z.DatePicker,exports.DatePickerPanel=z.DatePickerPanel,exports.DatePickerSheet=$.DatePickerSheet,exports.DateRangePicker=B.DateRangePicker,exports.DateRangePickerPanel=B.DateRangePickerPanel,exports.DateRangePickerSheet=$.DateRangePickerSheet,exports.DestinationAccordion=Tt.DestinationAccordion,exports.Destinations=Et.Destinations,exports.Dialog=J.Dialog,exports.DialogClose=J.DialogClose,exports.Divider=Jt.Divider,exports.DownArrowIcon=fe.DownArrowIcon,exports.EmailIcon=pe.EmailIcon,exports.EmptyState=kt.EmptyState,exports.ErrorCircleIcon=me.ErrorCircleIcon,exports.ErrorState=At.ErrorState,exports.ExampleRequests=Ft.ExampleRequests,exports.EyeOpenIcon=he.EyeOpenIcon,exports.EyeSlashedIcon=ge.EyeSlashedIcon,exports.FaqItem=G.FaqItem,exports.FaqList=G.FaqList,exports.FieldMessage=j.FieldMessage,exports.FilterChips=Gt.FilterChips,exports.FlagFranceIcon=ve.FlagFranceIcon,exports.FlagGermanyIcon=ye.FlagGermanyIcon,exports.FlagIcon=_e.FlagIcon,exports.FlagItalyIcon=be.FlagItalyIcon,exports.FlagNetherlandsIcon=xe.FlagNetherlandsIcon,exports.FlagRoundIcon=Se.FlagRoundIcon,exports.FlagRussiaIcon=Ce.FlagRussiaIcon,exports.FlagUaeIcon=we.FlagUaeIcon,exports.ForkKnifeIcon=Te.ForkKnifeIcon,exports.FormField=j.FormField,exports.FormProgress=nt.FormProgress,exports.HeaderItem=et.HeaderItem,exports.HelpQuestionCard=pt.HelpQuestionCard,exports.HeroColumns=Mt.HeroColumns,exports.HeroMap=Pt.HeroMap,exports.HeroOrbit=X.HeroOrbit,exports.HeroOrbitCard=X.HeroOrbitCard,exports.HeroSwitcher=Nt.HeroSwitcher,exports.HowItWorksStepTag=Z.HowItWorksStepTag,exports.HowItWorksSteps=Z.HowItWorksSteps,exports.Icon=ke.Icon,exports.IconButton=Xe.IconButton,exports.IconTile=Kt.IconTile,exports.InclusionIndicator=Re.InclusionIndicator,exports.InlineAlert=rt.InlineAlert,exports.Label=j.Label,exports.LanguageIcon=e.LanguageIcon,exports.LanguageSelect=We.LanguageSelect,exports.LockIcon=t.LockIcon,exports.Logo=Ae.Logo,exports.MapPinIcon=n.MapPinIcon,exports.MenuIcon=r.MenuIcon,exports.MinusIcon=i.MinusIcon,exports.MountainIcon=a.MountainIcon,exports.NewRequestOptionCard=Y.NewRequestOptionCard,exports.NewRequestOverlay=Y.NewRequestOverlay,exports.NextArrowIcon=o.NextArrowIcon,exports.NotificationIcon=s.NotificationIcon,exports.NotificationItem=dt.NotificationItem,exports.NotificationsButton=at.NotificationsButton,exports.NotificationsDropdown=ot.NotificationsDropdown,exports.NotificationsMenu=st.NotificationsMenu,exports.NotificationsPanel=Ut.NotificationsPanel,exports.OfferComparison=W.OfferComparison,exports.OfferComparisonRow=W.OfferComparisonRow,exports.Option=N.Option,exports.OptionList=N.OptionList,exports.OtherIcon=c.OtherIcon,exports.PackageAnimation=It.PackageAnimation,exports.PackageCard=_t.PackageCard,exports.PackageCardElement=gt.PackageCardElement,exports.Pagination=tt.Pagination,exports.PaperIcon=l.PaperIcon,exports.PartnerCard=vt.PartnerCard,exports.PartnerCarousel=Lt.PartnerCarousel,exports.PassportIcon=u.PassportIcon,exports.PasswordInput=Be.PasswordInput,exports.PasswordStrength=Xt.PasswordStrength,exports.PeopleIcon=d.PeopleIcon,exports.PhoneInput=Ke.PhoneInput,exports.PhotoAccordion=wt.PhotoAccordion,exports.PlanCard=K.PlanCard,exports.PlaneIcon=f.PlaneIcon,exports.PlaneLandingIcon=p.PlaneLandingIcon,exports.PlaneTakeoffIcon=m.PlaneTakeoffIcon,exports.PlansPicker=K.PlansPicker,exports.PlusIcon=h.PlusIcon,exports.PopularQuestions=St.PopularQuestions,exports.PortalFooter=ut.PortalFooter,exports.PortalHeader=V.PortalHeader,exports.PortalHeaderMenuGroup=V.PortalHeaderMenuGroup,exports.PortalHeaderMenuItem=V.PortalHeaderMenuItem,exports.PortalHeaderShow=V.PortalHeaderShow,exports.PreferencesIcon=g.PreferencesIcon,exports.QuantityStepper=Ze.QuantityStepper,exports.Radio=I.Radio,exports.RadioGroup=I.RadioGroup,exports.Rating=Le.Rating,exports.RequestCard=ft.RequestCard,exports.RequestStatus=Fe.RequestStatus,exports.RequestStatusTimeline=jt.RequestStatusTimeline,exports.RequestSummary=U.RequestSummary,exports.RequestSummaryEditLink=U.RequestSummaryEditLink,exports.RequestSummaryRow=U.RequestSummaryRow,exports.RequestSummarySection=U.RequestSummarySection,exports.ResizeFieldIcon=_.ResizeFieldIcon,exports.ReverseArrowIcon=v.ReverseArrowIcon,exports.ReviewItem=yt.ReviewItem,exports.ReviewsEmptyState=xt.ReviewsEmptyState,exports.ReviewsSummary=bt.ReviewsSummary,exports.RoadmapIcon=y.RoadmapIcon,exports.RouteField=Je.RouteField,exports.SaveTimeIcon=b.SaveTimeIcon,exports.SearchIcon=x.SearchIcon,exports.SearchInput=P.SearchInput,exports.SearchResult=P.SearchResult,exports.SearchResultGroup=P.SearchResultGroup,exports.SegmentedControl=Yt.SegmentedControl,exports.Select=Ue.Select,exports.SelectSheet=Vt.SelectSheet,exports.SelectedItem=He.SelectedItem,exports.Sheet=Bt.Sheet,exports.ShieldIcon=S.ShieldIcon,exports.SiteFooter=lt.SiteFooter,exports.SiteHeader=ct.SiteHeader,exports.SocialButton=qt.SocialButton,exports.StarIcon=C.StarIcon,exports.StatusTag=Pe.StatusTag,exports.StepCard=q.StepCard,exports.Steps=q.Steps,exports.StopsIcon=w.StopsIcon,exports.Tag=Ne.Tag,exports.Text=Me.Text,exports.TextInput=ze.TextInput,exports.Textarea=Ve.Textarea,exports.TicketIcon=T.TicketIcon,exports.Toggle=Ye.Toggle,exports.TrashBinIcon=E.TrashBinIcon,exports.TravelerSelector=L.TravelerSelector,exports.TravelerSelectorNote=L.TravelerSelectorNote,exports.TravelerSelectorSection=L.TravelerSelectorSection,exports.TripTypes=Dt.TripTypes,exports.UpArrowIcon=D.UpArrowIcon,exports.UpDownArrowIcon=O.UpDownArrowIcon,exports.UserIcon=Ee.UserIcon,exports.VerificationBadge=Ie.VerificationBadge,exports.WalletIcon=De.WalletIcon,exports.WhyTravelMatch=Q.WhyTravelMatch,exports.WhyTravelMatchOffers=Q.WhyTravelMatchOffers,exports.XMarkIcon=Oe.XMarkIcon,exports.cn=ee.cn,exports.createIcon=te.createIcon,exports.getAgencyInitials=A.getAgencyInitials,exports.iconNames=k.iconNames,exports.icons=k.icons,exports.useDialogPlacement=J.useDialogPlacement,exports.useFieldIds=j.useFieldIds;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});/* empty css */const ee=require("./utils/cn.cjs"),te=require("./icons/createIcon.cjs"),ne=require("./icons/generated/AirplaneSeatIcon.cjs"),re=require("./icons/generated/BackArrowIcon.cjs"),ie=require("./icons/generated/BaggageIcon.cjs"),ae=require("./icons/generated/BedIcon.cjs"),oe=require("./icons/generated/BookmarkIcon.cjs"),se=require("./icons/generated/BriefcaseIcon.cjs"),ce=require("./icons/generated/CalendarIcon.cjs"),le=require("./icons/generated/CarIcon.cjs"),ue=require("./icons/generated/CheckmarkIcon.cjs"),de=require("./icons/generated/CompareIcon.cjs"),fe=require("./icons/generated/DownArrowIcon.cjs"),pe=require("./icons/generated/EmailIcon.cjs"),me=require("./icons/generated/ErrorCircleIcon.cjs"),he=require("./icons/generated/EyeOpenIcon.cjs"),ge=require("./icons/generated/EyeSlashedIcon.cjs"),_e=require("./icons/generated/FlagIcon.cjs"),ve=require("./icons/generated/FlagFranceIcon.cjs"),ye=require("./icons/generated/FlagGermanyIcon.cjs"),be=require("./icons/generated/FlagItalyIcon.cjs"),xe=require("./icons/generated/FlagNetherlandsIcon.cjs"),Se=require("./icons/generated/FlagRoundIcon.cjs"),Ce=require("./icons/generated/FlagRussiaIcon.cjs"),we=require("./icons/generated/FlagUaeIcon.cjs"),Te=require("./icons/generated/ForkKnifeIcon.cjs"),e=require("./icons/generated/LanguageIcon.cjs"),t=require("./icons/generated/LockIcon.cjs"),n=require("./icons/generated/MapPinIcon.cjs"),r=require("./icons/generated/MenuIcon.cjs"),i=require("./icons/generated/MinusIcon.cjs"),a=require("./icons/generated/MountainIcon.cjs"),o=require("./icons/generated/NextArrowIcon.cjs"),s=require("./icons/generated/NotificationIcon.cjs"),c=require("./icons/generated/OtherIcon.cjs"),l=require("./icons/generated/PaperIcon.cjs"),u=require("./icons/generated/PassportIcon.cjs"),d=require("./icons/generated/PeopleIcon.cjs"),f=require("./icons/generated/PlaneIcon.cjs"),p=require("./icons/generated/PlaneLandingIcon.cjs"),m=require("./icons/generated/PlaneTakeoffIcon.cjs"),h=require("./icons/generated/PlusIcon.cjs"),g=require("./icons/generated/PreferencesIcon.cjs"),_=require("./icons/generated/ResizeFieldIcon.cjs"),v=require("./icons/generated/ReverseArrowIcon.cjs"),y=require("./icons/generated/RoadmapIcon.cjs"),b=require("./icons/generated/SaveTimeIcon.cjs"),x=require("./icons/generated/SearchIcon.cjs"),S=require("./icons/generated/ShieldIcon.cjs"),C=require("./icons/generated/StarIcon.cjs"),w=require("./icons/generated/StopsIcon.cjs"),T=require("./icons/generated/TicketIcon.cjs"),E=require("./icons/generated/TrashBinIcon.cjs"),D=require("./icons/generated/UpArrowIcon.cjs"),O=require("./icons/generated/UpDownArrowIcon.cjs"),Ee=require("./icons/generated/UserIcon.cjs"),De=require("./icons/generated/WalletIcon.cjs"),Oe=require("./icons/generated/XMarkIcon.cjs"),k=require("./icons/generated/index.cjs"),ke=require("./icons/Icon.cjs"),Ae=require("./components/Logo/Logo.cjs"),je=require("./components/LogoAnimation/LogoAnimation.cjs"),A=require("./components/AgencyLogo/AgencyLogo.cjs"),Me=require("./components/Button/Button.cjs"),j=require("./components/Field/Field.cjs"),Ne=require("./components/Text/Text.cjs"),Pe=require("./components/Tag/Tag.cjs"),Fe=require("./components/StatusTag/StatusTag.cjs"),Ie=require("./components/RequestStatus/RequestStatus.cjs"),Le=require("./components/VerificationBadge/VerificationBadge.cjs"),Re=require("./components/Rating/Rating.cjs"),M=require("./components/ChoiceChip/ChoiceChip.cjs"),ze=require("./components/InclusionIndicator/InclusionIndicator.cjs"),Be=require("./components/TextInput/TextInput.cjs"),Ve=require("./components/TextInput/PasswordInput.cjs"),He=require("./components/Textarea/Textarea.cjs"),N=require("./components/OptionList/OptionList.cjs"),Ue=require("./components/Select/SelectedItem.cjs"),We=require("./components/Select/Select.cjs"),Ge=require("./components/LanguageSelect/LanguageSelect.cjs"),Ke=require("./components/CurrencySelect/CurrencySelect.cjs"),qe=require("./components/PhoneInput/PhoneInput.cjs"),P=require("./components/SearchInput/SearchInput.cjs"),Je=require("./components/DateField/DateField.cjs"),Ye=require("./components/RouteField/RouteField.cjs"),Xe=require("./components/Checkbox/Checkbox.cjs"),F=require("./components/Radio/Radio.cjs"),Ze=require("./components/Toggle/Toggle.cjs"),I=require("./components/IconButton/IconButton.cjs"),Qe=require("./components/QuantityStepper/QuantityStepper.cjs"),$e=require("./components/BudgetField/BudgetField.cjs"),L=require("./components/TravelerSelector/TravelerSelector.cjs"),et=require("./components/CalendarDay/CalendarDay.cjs"),tt=require("./components/HeaderItem/HeaderItem.cjs"),R=require("./components/Breadcrumb/Breadcrumb.cjs"),nt=require("./components/Pagination/Pagination.cjs"),rt=require("./components/FormProgress/FormProgress.cjs"),it=require("./components/InlineAlert/InlineAlert.cjs"),at=require("./components/Calendar/Calendar.cjs"),z=require("./components/DatePicker/DatePicker.cjs"),B=require("./components/DateRangePicker/DateRangePicker.cjs"),V=require("./components/PortalHeader/PortalHeader.cjs"),ot=require("./components/NotificationsButton/NotificationsButton.cjs"),st=require("./components/NotificationsDropdown/NotificationsDropdown.cjs"),ct=require("./components/NotificationsDropdown/NotificationsMenu.cjs"),H=require("./components/AccountMenu/AccountMenu.cjs"),lt=require("./components/SiteHeader/SiteHeader.cjs"),ut=require("./components/SiteFooter/SiteFooter.cjs"),dt=require("./components/PortalFooter/PortalFooter.cjs"),ft=require("./components/NotificationItem/NotificationItem.cjs"),pt=require("./components/RequestCard/RequestCard.cjs"),U=require("./components/RequestSummary/RequestSummary.cjs"),mt=require("./components/HelpQuestionCard/HelpQuestionCard.cjs"),ht=require("./components/AgencyCard/AgencyCard.cjs"),gt=require("./components/AgencyOfferCard/AgencyOfferCard.cjs"),W=require("./components/OfferComparison/OfferComparison.cjs"),_t=require("./components/PackageCard/PackageCardElement.cjs"),vt=require("./components/PackageCard/PackageCard.cjs"),yt=require("./components/PartnerCard/PartnerCard.cjs"),bt=require("./components/ReviewItem/ReviewItem.cjs"),xt=require("./components/ReviewsSummary/ReviewsSummary.cjs"),St=require("./components/ReviewsEmptyState/ReviewsEmptyState.cjs"),G=require("./components/FaqItem/FaqItem.cjs"),Ct=require("./components/PopularQuestions/PopularQuestions.cjs"),wt=require("./components/AgenciesFilter/AgenciesFilter.cjs"),K=require("./components/PlansPicker/PlansPicker.cjs"),q=require("./components/StepCard/StepCard.cjs"),Tt=require("./components/PhotoAccordion/PhotoAccordion.cjs"),Et=require("./components/DestinationAccordion/DestinationAccordion.cjs"),Dt=require("./components/Destinations/Destinations.cjs"),Ot=require("./components/TripTypes/TripTypes.cjs"),J=require("./components/Dialog/Dialog.cjs"),kt=require("./components/ConfirmationDialog/ConfirmationDialog.cjs"),Y=require("./components/NewRequestOverlay/NewRequestOverlay.cjs"),At=require("./components/EmptyState/EmptyState.cjs"),jt=require("./components/ErrorState/ErrorState.cjs"),Mt=require("./components/RequestStatusTimeline/RequestStatusTimeline.cjs"),Nt=require("./components/HeroColumns/HeroColumns.cjs"),Pt=require("./components/HeroSwitcher/HeroSwitcher.cjs"),X=require("./components/HeroOrbit/HeroOrbit.cjs"),Ft=require("./components/HeroMap/HeroMap.cjs"),Z=require("./components/HowItWorksSteps/HowItWorksSteps.cjs"),It=require("./components/ExampleRequests/ExampleRequests.cjs"),Q=require("./components/WhyTravelMatch/WhyTravelMatch.cjs"),Lt=require("./components/PackageAnimation/PackageAnimation.cjs"),Rt=require("./components/PartnerCarousel/PartnerCarousel.cjs"),zt=require("./components/CtaRequestFlow/CtaRequestFlow.cjs"),Bt=require("./components/CtaSentence/CtaSentence.cjs"),Vt=require("./components/Sheet/Sheet.cjs"),Ht=require("./components/SelectSheet/SelectSheet.cjs"),Ut=require("./components/AccountSheet/AccountSheet.cjs"),Wt=require("./components/NotificationsPanel/NotificationsPanel.cjs"),$=require("./components/DatePickerSheet/DatePickerSheet.cjs"),Gt=require("./components/BackLink/BackLink.cjs"),Kt=require("./components/FilterChips/FilterChips.cjs"),qt=require("./components/IconTile/IconTile.cjs"),Jt=require("./components/SocialButton/SocialButton.cjs"),Yt=require("./components/Divider/Divider.cjs"),Xt=require("./components/SegmentedControl/SegmentedControl.cjs"),Zt=require("./components/PasswordStrength/PasswordStrength.cjs");exports.AccountMenu=H.AccountMenu,exports.AccountMenuItem=H.AccountMenuItem,exports.AccountMenuSeparator=H.AccountMenuSeparator,exports.AccountSheet=Ut.AccountSheet,exports.AgenciesFilter=wt.AgenciesFilter,exports.AgencyCard=ht.AgencyCard,exports.AgencyLogo=A.AgencyLogo,exports.AgencyOfferCard=gt.AgencyOfferCard,exports.AirplaneSeatIcon=ne.AirplaneSeatIcon,exports.BackArrowIcon=re.BackArrowIcon,exports.BackLink=Gt.BackLink,exports.BaggageIcon=ie.BaggageIcon,exports.BedIcon=ae.BedIcon,exports.BookmarkIcon=oe.BookmarkIcon,exports.Breadcrumb=R.Breadcrumb,exports.BreadcrumbItem=R.BreadcrumbItem,exports.BriefcaseIcon=se.BriefcaseIcon,exports.BudgetField=$e.BudgetField,exports.Button=Me.Button,exports.Calendar=at.Calendar,exports.CalendarDay=et.CalendarDay,exports.CalendarIcon=ce.CalendarIcon,exports.CarIcon=le.CarIcon,exports.Checkbox=Xe.Checkbox,exports.CheckmarkIcon=ue.CheckmarkIcon,exports.ChoiceChip=M.ChoiceChip,exports.ChoiceChipGroup=M.ChoiceChipGroup,exports.CompareIcon=de.CompareIcon,exports.ConfirmationDialog=kt.ConfirmationDialog,exports.CtaRequestFlow=zt.CtaRequestFlow,exports.CtaSentence=Bt.CtaSentence,exports.CurrencySelect=Ke.CurrencySelect,exports.DateField=Je.DateField,exports.DatePicker=z.DatePicker,exports.DatePickerPanel=z.DatePickerPanel,exports.DatePickerSheet=$.DatePickerSheet,exports.DateRangePicker=B.DateRangePicker,exports.DateRangePickerPanel=B.DateRangePickerPanel,exports.DateRangePickerSheet=$.DateRangePickerSheet,exports.DestinationAccordion=Et.DestinationAccordion,exports.Destinations=Dt.Destinations,exports.Dialog=J.Dialog,exports.DialogClose=J.DialogClose,exports.Divider=Yt.Divider,exports.DownArrowIcon=fe.DownArrowIcon,exports.EmailIcon=pe.EmailIcon,exports.EmptyState=At.EmptyState,exports.ErrorCircleIcon=me.ErrorCircleIcon,exports.ErrorState=jt.ErrorState,exports.ExampleRequests=It.ExampleRequests,exports.EyeOpenIcon=he.EyeOpenIcon,exports.EyeSlashedIcon=ge.EyeSlashedIcon,exports.FaqItem=G.FaqItem,exports.FaqList=G.FaqList,exports.FieldMessage=j.FieldMessage,exports.FilterChips=Kt.FilterChips,exports.FlagFranceIcon=ve.FlagFranceIcon,exports.FlagGermanyIcon=ye.FlagGermanyIcon,exports.FlagIcon=_e.FlagIcon,exports.FlagItalyIcon=be.FlagItalyIcon,exports.FlagNetherlandsIcon=xe.FlagNetherlandsIcon,exports.FlagRoundIcon=Se.FlagRoundIcon,exports.FlagRussiaIcon=Ce.FlagRussiaIcon,exports.FlagUaeIcon=we.FlagUaeIcon,exports.ForkKnifeIcon=Te.ForkKnifeIcon,exports.FormField=j.FormField,exports.FormProgress=rt.FormProgress,exports.HeaderItem=tt.HeaderItem,exports.HelpQuestionCard=mt.HelpQuestionCard,exports.HeroColumns=Nt.HeroColumns,exports.HeroMap=Ft.HeroMap,exports.HeroOrbit=X.HeroOrbit,exports.HeroOrbitCard=X.HeroOrbitCard,exports.HeroSwitcher=Pt.HeroSwitcher,exports.HowItWorksStepTag=Z.HowItWorksStepTag,exports.HowItWorksSteps=Z.HowItWorksSteps,exports.Icon=ke.Icon,exports.IconButton=I.IconButton,exports.IconTile=qt.IconTile,exports.InclusionIndicator=ze.InclusionIndicator,exports.InlineAlert=it.InlineAlert,exports.Label=j.Label,exports.LanguageIcon=e.LanguageIcon,exports.LanguageSelect=Ge.LanguageSelect,exports.LockIcon=t.LockIcon,exports.Logo=Ae.Logo,exports.LogoAnimation=je.LogoAnimation,exports.MapPinIcon=n.MapPinIcon,exports.MenuIcon=r.MenuIcon,exports.MinusIcon=i.MinusIcon,exports.MountainIcon=a.MountainIcon,exports.NewRequestOptionCard=Y.NewRequestOptionCard,exports.NewRequestOverlay=Y.NewRequestOverlay,exports.NextArrowIcon=o.NextArrowIcon,exports.NotificationIcon=s.NotificationIcon,exports.NotificationItem=ft.NotificationItem,exports.NotificationsButton=ot.NotificationsButton,exports.NotificationsDropdown=st.NotificationsDropdown,exports.NotificationsMenu=ct.NotificationsMenu,exports.NotificationsPanel=Wt.NotificationsPanel,exports.OfferComparison=W.OfferComparison,exports.OfferComparisonRow=W.OfferComparisonRow,exports.Option=N.Option,exports.OptionList=N.OptionList,exports.OtherIcon=c.OtherIcon,exports.PackageAnimation=Lt.PackageAnimation,exports.PackageCard=vt.PackageCard,exports.PackageCardElement=_t.PackageCardElement,exports.Pagination=nt.Pagination,exports.PaperIcon=l.PaperIcon,exports.PartnerCard=yt.PartnerCard,exports.PartnerCarousel=Rt.PartnerCarousel,exports.PassportIcon=u.PassportIcon,exports.PasswordInput=Ve.PasswordInput,exports.PasswordStrength=Zt.PasswordStrength,exports.PeopleIcon=d.PeopleIcon,exports.PhoneInput=qe.PhoneInput,exports.PhotoAccordion=Tt.PhotoAccordion,exports.PlanCard=K.PlanCard,exports.PlaneIcon=f.PlaneIcon,exports.PlaneLandingIcon=p.PlaneLandingIcon,exports.PlaneTakeoffIcon=m.PlaneTakeoffIcon,exports.PlansPicker=K.PlansPicker,exports.PlusIcon=h.PlusIcon,exports.PopularQuestions=Ct.PopularQuestions,exports.PortalFooter=dt.PortalFooter,exports.PortalHeader=V.PortalHeader,exports.PortalHeaderMenuGroup=V.PortalHeaderMenuGroup,exports.PortalHeaderMenuItem=V.PortalHeaderMenuItem,exports.PortalHeaderShow=V.PortalHeaderShow,exports.PreferencesIcon=g.PreferencesIcon,exports.QuantityStepper=Qe.QuantityStepper,exports.Radio=F.Radio,exports.RadioGroup=F.RadioGroup,exports.Rating=Re.Rating,exports.RequestCard=pt.RequestCard,exports.RequestStatus=Ie.RequestStatus,exports.RequestStatusTimeline=Mt.RequestStatusTimeline,exports.RequestSummary=U.RequestSummary,exports.RequestSummaryEditLink=U.RequestSummaryEditLink,exports.RequestSummaryRow=U.RequestSummaryRow,exports.RequestSummarySection=U.RequestSummarySection,exports.ResizeFieldIcon=_.ResizeFieldIcon,exports.ReverseArrowIcon=v.ReverseArrowIcon,exports.ReviewItem=bt.ReviewItem,exports.ReviewsEmptyState=St.ReviewsEmptyState,exports.ReviewsSummary=xt.ReviewsSummary,exports.RoadmapIcon=y.RoadmapIcon,exports.RouteField=Ye.RouteField,exports.SaveTimeIcon=b.SaveTimeIcon,exports.SearchIcon=x.SearchIcon,exports.SearchInput=P.SearchInput,exports.SearchResult=P.SearchResult,exports.SearchResultGroup=P.SearchResultGroup,exports.SegmentedControl=Xt.SegmentedControl,exports.Select=We.Select,exports.SelectSheet=Ht.SelectSheet,exports.SelectedItem=Ue.SelectedItem,exports.Sheet=Vt.Sheet,exports.ShieldIcon=S.ShieldIcon,exports.SiteFooter=ut.SiteFooter,exports.SiteHeader=lt.SiteHeader,exports.SocialButton=Jt.SocialButton,exports.StarIcon=C.StarIcon,exports.StatusTag=Fe.StatusTag,exports.StepCard=q.StepCard,exports.Steps=q.Steps,exports.StopsIcon=w.StopsIcon,exports.Tag=Pe.Tag,exports.Text=Ne.Text,exports.TextInput=Be.TextInput,exports.Textarea=He.Textarea,exports.TicketIcon=T.TicketIcon,exports.Toggle=Ze.Toggle,exports.TrashBinIcon=E.TrashBinIcon,exports.TravelerSelector=L.TravelerSelector,exports.TravelerSelectorNote=L.TravelerSelectorNote,exports.TravelerSelectorSection=L.TravelerSelectorSection,exports.TripTypes=Ot.TripTypes,exports.UpArrowIcon=D.UpArrowIcon,exports.UpDownArrowIcon=O.UpDownArrowIcon,exports.UserIcon=Ee.UserIcon,exports.VerificationBadge=Le.VerificationBadge,exports.WalletIcon=De.WalletIcon,exports.WhyTravelMatch=Q.WhyTravelMatch,exports.WhyTravelMatchOffers=Q.WhyTravelMatchOffers,exports.XMarkIcon=Oe.XMarkIcon,exports.cn=ee.cn,exports.createIcon=te.createIcon,exports.getAgencyInitials=A.getAgencyInitials,exports.iconNames=k.iconNames,exports.icons=k.icons,exports.useDialogPlacement=J.useDialogPlacement,exports.useFieldIds=j.useFieldIds;
package/dist/index.d.cts CHANGED
@@ -223,6 +223,35 @@ export interface LogoProps extends Omit<SVGProps<SVGSVGElement>, "ref" | "childr
223
223
  title?: string;
224
224
  }
225
225
  export declare const Logo: import("react").ForwardRefExoticComponent<LogoProps & import("react").RefAttributes<SVGSVGElement>>;
226
+ type LogoMotionMode = "once" | "loop";
227
+ /** `once`: the intro — the plane draws the logo, lands and the logo stays. `loop`: the loader — it flies out, the line rewinds and it starts again. */
228
+ export type LogoAnimationMode = LogoMotionMode;
229
+ export interface LogoAnimationProps extends Omit<SVGProps<SVGSVGElement>, "ref" | "children" | "width" | "height" | "viewBox" | "mode"> {
230
+ /** `once` (intro, holds the final logo) or `loop` (loader, repeats forever). Both play by themselves. */
231
+ mode?: LogoAnimationMode;
232
+ /** Width in px. The height follows the 40 × 52 mark: `size × 1.3`. */
233
+ size?: number;
234
+ /** Seconds to wait before the dot appears. */
235
+ delay?: number;
236
+ /**
237
+ * Accessible name. Defaults to "TravelMatch" for `once` and "Loading" for `loop`; pass a translated string, or an
238
+ * empty string when the animation is decorative (it is then hidden from assistive technology).
239
+ */
240
+ title?: string;
241
+ }
242
+ /**
243
+ * The TravelMatch mark drawn by its paper plane: the dot appears, the plane takes off from it, draws the pin and grows
244
+ * the lower-left branch, then lands in the exact logo pose (the `Logo` mark artwork). `once` holds the logo; `loop`
245
+ * flies the plane out with a few puffs while the line rewinds into the dot, and starts again.
246
+ *
247
+ * - Plays by itself — there is no play or pause control. Frames stop while the tab is hidden or the logo is
248
+ * off-screen and pick up where they were, so an intro below the fold plays when it is scrolled into view.
249
+ * - `prefers-reduced-motion`: both modes show the still logo straight away (CSS does this from the first paint, before
250
+ * hydration). The loader keeps its "Loading" name for assistive technology.
251
+ * - Server rendering: the markup is the first frame (an empty, size-reserving box for `once`; the dot for `loop`), so
252
+ * hydration continues from it without a flash. Paths are measured and frames run in effects only.
253
+ */
254
+ export declare const LogoAnimation: import("react").ForwardRefExoticComponent<LogoAnimationProps & import("react").RefAttributes<SVGSVGElement>>;
226
255
  export interface AgencyLogoProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
227
256
  /** Logo image URL. Without it, or when it fails to load, the agency's initials are shown instead. */
228
257
  src?: string | null;
@@ -2975,7 +3004,7 @@ export interface HowItWorksStepsProps extends Omit<HTMLAttributes<HTMLDivElement
2975
3004
  defaultValue?: string;
2976
3005
  /** Called with the `value` of the step that became current, by a click or by auto-play. */
2977
3006
  onValueChange?: (value: string) => void;
2978
- /** Advances to the next step on a timer, in an endless loop; after the user picks a step it carries on from that step. */
3007
+ /** Advances to the next step on a timer, in an endless loop (on by default); after the user picks a step it carries on from that step. */
2979
3008
  autoPlay?: boolean;
2980
3009
  /** Time a step rests once its 500ms transition has finished, in ms (Figma: 2200 — a new step every 2.7s). */
2981
3010
  interval?: number;
@@ -3134,7 +3163,7 @@ export interface PackageAnimationProps extends Omit<HTMLAttributes<HTMLDivElemen
3134
3163
  defaultValue?: number;
3135
3164
  /** Called with the index of the card that comes to the front (click, keyboard focus or autoplay). */
3136
3165
  onValueChange?: (value: number) => void;
3137
- /** Swaps the cards by itself, in an endless loop (the Figma prototype swaps on click only). Holds for hover, keyboard focus, a hidden tab, an off-screen stack and reduced motion. */
3166
+ /** Swaps the cards by itself, in an endless loop (on by default; the Figma prototype swaps on click only). Holds for hover, keyboard focus, a hidden tab, an off-screen stack and reduced motion. */
3138
3167
  autoPlay?: boolean;
3139
3168
  /** Time a card stays in front before the next swap, in ms. */
3140
3169
  interval?: number;