react-abohook-fullpage 1.1.9 → 1.2.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.
package/dist/index.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react");var Y={exports:{}},j={};var X;function oe(){if(X)return j;X=1;var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(d,a,l){var o=null;if(l!==void 0&&(o=""+l),a.key!==void 0&&(o=""+a.key),"key"in a){l={};for(var m in a)m!=="key"&&(l[m]=a[m])}else l=a;return a=l.ref,{$$typeof:r,type:d,key:o,ref:a!==void 0?a:null,props:l}}return j.Fragment=n,j.jsx=i,j.jsxs=i,j}var F={};var B;function ae(){return B||(B=1,process.env.NODE_ENV!=="production"&&(function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case w:return"Profiler";case R:return"StrictMode";case N:return"Suspense";case L:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case A:return"Portal";case k:return e.displayName||"Context";case v:return(e._context.displayName||"Context")+".Consumer";case y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:r(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return r(e(t))}catch{}}return null}function n(e){return""+e}function i(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var s=t.error,c=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",c),n(e)}}function d(e){if(e===S)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===I)return"<...>";try{var t=r(e);return t?"<"+t+">":"<...>"}catch{return"<...>"}}function a(){var e=$.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function o(e){if(z.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function m(e,t){function s(){G||(G=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function p(){var e=r(this.type);return V[e]||(V[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function g(e,t,s,c,C,M){var f=s.ref;return e={$$typeof:T,type:e,key:t,props:s,_owner:c},(f!==void 0?f:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:p}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function h(e,t,s,c,C,M){var f=t.children;if(f!==void 0)if(c)if(re(f)){for(c=0;c<f.length;c++)b(f[c]);Object.freeze&&Object.freeze(f)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(f);if(z.call(t,"key")){f=r(e);var O=Object.keys(t).filter(function(ne){return ne!=="key"});c=0<O.length?"{key: someKey, "+O.join(": ..., ")+": ...}":"{key: someKey}",H[f+c]||(O=0<O.length?"{"+O.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react");var C={exports:{}},O={};var H;function oe(){if(H)return O;H=1;var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function u(c,a,l){var o=null;if(l!==void 0&&(o=""+l),a.key!==void 0&&(o=""+a.key),"key"in a){l={};for(var w in a)w!=="key"&&(l[w]=a[w])}else l=a;return a=l.ref,{$$typeof:r,type:c,key:o,ref:a!==void 0?a:null,props:l}}return O.Fragment=n,O.jsx=u,O.jsxs=u,O}var j={};var X;function ae(){return X||(X=1,process.env.NODE_ENV!=="production"&&(function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case E:return"Profiler";case v:return"StrictMode";case N:return"Suspense";case m:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case y:return"Portal";case k:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:r(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return r(e(t))}catch{}}return null}function n(e){return""+e}function u(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var s=t.error,f=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",f),n(e)}}function c(e){if(e===T)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===Y)return"<...>";try{var t=r(e);return t?"<"+t+">":"<...>"}catch{return"<...>"}}function a(){var e=I.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function o(e){if(W.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function w(e,t){function s(){z||(z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}function h(){var e=r(this.type);return G[e]||(G[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function b(e,t,s,f,L,D){var d=s.ref;return e={$$typeof:g,type:e,key:t,props:s,_owner:f},(d!==void 0?d:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:h}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function p(e,t,s,f,L,D){var d=t.children;if(d!==void 0)if(f)if(re(d)){for(f=0;f<d.length;f++)x(d[f]);Object.freeze&&Object.freeze(d)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(d);if(W.call(t,"key")){d=r(e);var A=Object.keys(t).filter(function(ne){return ne!=="key"});f=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",J[d+f]||(A=0<A.length?"{"+A.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,c,f,O,f),H[f+c]=!0)}if(f=null,s!==void 0&&(i(s),f=""+s),o(t)&&(i(t.key),f=""+t.key),"key"in t){s={};for(var U in t)U!=="key"&&(s[U]=t[U])}else s=t;return f&&m(s,typeof e=="function"?e.displayName||e.name||"Unknown":e),g(e,f,s,a(),C,M)}function b(e){x(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===I&&(e._payload.status==="fulfilled"?x(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function x(e){return typeof e=="object"&&e!==null&&e.$$typeof===T}var P=u,T=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),k=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),$=P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=Object.prototype.hasOwnProperty,re=Array.isArray,D=console.createTask?console.createTask:function(){return null};P={react_stack_bottom_frame:function(e){return e()}};var G,V={},q=P.react_stack_bottom_frame.bind(P,l)(),J=D(d(l)),H={};F.Fragment=S,F.jsx=function(e,t,s){var c=1e4>$.recentlyCreatedOwnerStacks++;return h(e,t,s,!1,c?Error("react-stack-top-frame"):q,c?D(d(e)):J)},F.jsxs=function(e,t,s){var c=1e4>$.recentlyCreatedOwnerStacks++;return h(e,t,s,!0,c?Error("react-stack-top-frame"):q,c?D(d(e)):J)}})()),F}var Z;function se(){return Z||(Z=1,process.env.NODE_ENV==="production"?Y.exports=oe():Y.exports=ae()),Y.exports}var _=se();const ie=50,ue=(r,n,i,d=700,a,l)=>{const[o,m]=u.useState(0),[p,g]=u.useState(!0),h=u.useRef(!1),[b,x]=u.useState(0),P=n&&o+1===r,T=u.useRef(0),A=u.useRef(0),S=u.useRef(!1),R=u.useRef(null),w=(v,k)=>{if(v<0||v>=r||h.current)return;const y=k===2;h.current=!0,x(o),m(v),P?v===3||o===r-1?m(y?b:v):m(b):m(v),n&&r===v+1?g(!1):g(!0),setTimeout(()=>{h.current=!1},d)};return u.useEffect(()=>{i&&i(o);const v=E=>{if(!l){if(h.current)return E.preventDefault();E.deltaY>0?w(o+1,2):w(o-1,2)}},k=E=>{l||h.current||(E.key==="ArrowDown"&&w(o+1,2),E.key==="ArrowUp"&&w(o-1,2))},y=E=>{l||(T.current=E.touches[0].clientY,S.current=!1)},N=E=>{l||(A.current=E.touches[0].clientY,S.current=!0)},L=()=>{if(l||!S.current)return;const E=T.current-A.current;Math.abs(E)>=ie&&(E>0?w(o+1,2):w(o-1,2))};return window.addEventListener("wheel",v,{passive:!1}),window.addEventListener("keydown",k),window.addEventListener("touchstart",y,{passive:!0}),window.addEventListener("touchmove",N,{passive:!0}),window.addEventListener("touchend",L),()=>{window.removeEventListener("wheel",v),window.removeEventListener("keydown",k),window.removeEventListener("touchstart",y),window.removeEventListener("touchmove",N),window.removeEventListener("touchend",L)}},[o,r,n,i]),u.useEffect(()=>{if(!a)return;const v=k=>{if(h.current&&p)return;const y=k.target;R.current&&!R.current.contains(y)&&!p&&(m(b),g(!0))};return setTimeout(()=>{document.addEventListener("click",v)},300),()=>{document.removeEventListener("click",v)}},[b,p,a]),{active:o,goToSection:w,isHiddenFooter:p,footerRef:R}},le=(r=!1)=>{u.useEffect(()=>{if(r)return;const n=i=>i.preventDefault();return window.addEventListener("contextmenu",n),()=>{window.removeEventListener("contextmenu",n)}},[r])};function ce({children:r,index:n,active:i,isHiddenFooter:d}){return _.jsx("section",{style:{position:"relative",width:"100%",height:"100vh",overflow:"hidden",filter:n===i||d?"blur(0px)":"blur(6px)"},children:r})}const fe=u.memo(ce);function de({sectionsLen:r,active:n,goToSection:i,direction:d="right"}){const a=d==="bottom";return _.jsx("div",{style:{position:"fixed",right:d==="right"?24:d==="bottom"?"50%":void 0,left:d==="left"?24:void 0,top:a?void 0:"50%",bottom:a?"5%":void 0,transform:"translateY(-50%)",display:"flex",flexDirection:a?"row":"column",gap:"16px",zIndex:50},children:Array.from({length:r}).map((l,o)=>_.jsx("button",{disabled:o===n,"aria-label":"navigation dot",onClick:()=>i(o,1),style:{width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",background:"none",cursor:"pointer",userSelect:"none"},children:_.jsx("span",{style:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n===o?"white":"rgba(255,255,255,0.4)",transform:n===o?"scale(1.25)":"scale(1)",transition:"all 0.3s ease"}})},o))})}const me=u.memo(de);function ve({children:r}){return _.jsx("div",{style:{position:"relative",width:"100%",height:"100vh",overflow:"hidden",background:"transparent"},children:r})}const Q=u.memo(ve);Q.__FULLPAGE_SECTION__=!0;function Ee({children:r,styles:n,height:i="30%",backgroundColor:d="yellow",footerRef:a}){return _.jsx("div",{ref:a,style:{position:"absolute",width:"100%",height:i,backgroundColor:d,bottom:0,zIndex:50,...n},children:r},"fullpage-footer")}const K=u.memo(Ee);K.__FULLPAGE_FOOTER__=!0;function _e(r){process.env.NODE_ENV!=="production"&&r.forEach(n=>{if(u.isValidElement(n)&&!n.type.__FULLPAGE_SECTION__)throw console.warn("[FullPage] You must wrap content inside <FullPage.Section />"),new Error("[FullPage] You must wrap content inside <FullPage.Section />")})}function pe({children:r,isHiddenFooter:n}){const i=n?2500:600;return _.jsx("div",{style:{position:"absolute",left:0,bottom:0,width:"100%",height:"100vh",zIndex:50,transform:n?"translateY(100%)":"translateY(0)",transition:`transform ${i}ms cubic-bezier(0.22,1,0.36,1)`,willChange:"transform",pointerEvents:n?"none":"auto"},children:r})}const he=u.memo(pe);function W({children:r,onChange:n,directionDots:i="right",enableContextMenu:d=!0,duration:a=700,closeOutside:l=!1,disable:o=!1}){const m=u.Children.toArray(r),p=m.filter(R=>R.type.__FULLPAGE_SECTION__),g=m.find(R=>R.type.__FULLPAGE_FOOTER__);le(d),u.useEffect(()=>(_e(p),()=>{}),[p]);const h=!!g,b=p.length+(h?1:0),{active:x,goToSection:P,isHiddenFooter:T,footerRef:A}=ue(b,h,n,a,l,o),S=g?u.cloneElement(g,{footerRef:A}):null;return _.jsxs(_.Fragment,{children:[_.jsxs("div",{style:{position:"relative",height:"100vh",width:"100%",overflow:"hidden"},children:[_.jsx("div",{style:{height:`${p.length*100}vh`,transform:T?`translateY(-${x*100}vh)`:`translateY(-${p.length-100}vh)`,transition:"transform 700ms cubic-bezier(0.22,1,0.36,1)"},children:p.map((R,w)=>_.jsx(fe,{index:w,active:x,isHiddenFooter:T,children:R},w))}),g&&_.jsx(he,{isHiddenFooter:T,children:S})]}),_.jsx(me,{sectionsLen:b,active:x,goToSection:P,direction:i})]})}W.Section=Q;W.Footer=K;exports.FullPage=W;
6
+ <%s key={someKey} {...props} />`,f,d,A,d),J[d+f]=!0)}if(d=null,s!==void 0&&(u(s),d=""+s),o(t)&&(u(t.key),d=""+t.key),"key"in t){s={};for(var M in t)M!=="key"&&(s[M]=t[M])}else s=t;return d&&w(s,typeof e=="function"?e.displayName||e.name||"Unknown":e),b(e,d,s,a(),L,D)}function x(e){S(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===Y&&(e._payload.status==="fulfilled"?S(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function S(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}var R=i,g=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),k=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),te=Symbol.for("react.client.reference"),I=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Object.prototype.hasOwnProperty,re=Array.isArray,$=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(e){return e()}};var z,G={},V=R.react_stack_bottom_frame.bind(R,l)(),q=$(c(l)),J={};j.Fragment=T,j.jsx=function(e,t,s){var f=1e4>I.recentlyCreatedOwnerStacks++;return p(e,t,s,!1,f?Error("react-stack-top-frame"):V,f?$(c(e)):q)},j.jsxs=function(e,t,s){var f=1e4>I.recentlyCreatedOwnerStacks++;return p(e,t,s,!0,f?Error("react-stack-top-frame"):V,f?$(c(e)):q)}})()),j}var B;function se(){return B||(B=1,process.env.NODE_ENV==="production"?C.exports=oe():C.exports=ae()),C.exports}var _=se();const ie=50,ue=(r,n,u,c=700,a,l)=>{const[o,w]=i.useState(0),[h,b]=i.useState(!0),p=i.useRef(!1),[x,S]=i.useState(0),R=i.useRef(0),g=i.useRef(0),y=i.useRef(!1),T=i.useRef(null),v=(E,P)=>{E<0||E>=r||p.current||(p.current=!0,S(o),w(E),n&&E===r-1?b(!1):b(!0),setTimeout(()=>{p.current=!1},c))};return i.useEffect(()=>{u?.(o);const E=m=>{if(!l){if(p.current){m.preventDefault();return}Math.abs(m.deltaY)<2||(m.preventDefault(),m.deltaY>0?v(o+1):v(o-1))}},P=m=>{l||p.current||(m.key==="ArrowDown"&&v(o+1),m.key==="ArrowUp"&&v(o-1))},k=m=>{l||(R.current=m.touches[0].clientY,y.current=!1)},F=m=>{l||(g.current=m.touches[0].clientY,y.current=!0)},N=()=>{if(l||!y.current||p.current)return;const m=R.current-g.current;Math.abs(m)>=ie&&(m>0?v(o+1):v(o-1))};return window.addEventListener("wheel",E,{passive:!1}),window.addEventListener("keydown",P),window.addEventListener("touchstart",k,{passive:!0}),window.addEventListener("touchmove",F,{passive:!0}),window.addEventListener("touchend",N),()=>{window.removeEventListener("wheel",E),window.removeEventListener("keydown",P),window.removeEventListener("touchstart",k),window.removeEventListener("touchmove",F),window.removeEventListener("touchend",N)}},[o,r,n,u,l,c]),i.useEffect(()=>{if(!a)return;const E=P=>{if(p.current&&h)return;const k=P.target;T.current&&!T.current.contains(k)&&!h&&(w(x),b(!0))};return setTimeout(()=>{document.addEventListener("click",E)},300),()=>{document.removeEventListener("click",E)}},[x,h,a]),{active:o,goToSection:v,isHiddenFooter:h,footerRef:T}},le=(r=!1)=>{i.useEffect(()=>{if(r)return;const n=u=>u.preventDefault();return window.addEventListener("contextmenu",n),()=>{window.removeEventListener("contextmenu",n)}},[r])};function ce({children:r,index:n,active:u,isHiddenFooter:c}){return _.jsx("section",{style:{position:"relative",width:"100%",height:"100vh",overflow:"hidden",filter:n===u||c?"blur(0px)":"blur(6px)"},children:r})}const fe=i.memo(ce);function de({sectionsLen:r,active:n,goToSection:u,direction:c="right"}){const a=c==="bottom";return _.jsx("div",{style:{position:"fixed",right:c==="right"?24:c==="bottom"?"50%":void 0,left:c==="left"?24:void 0,top:a?void 0:"50%",bottom:a?"5%":void 0,transform:"translateY(-50%)",display:"flex",flexDirection:a?"row":"column",gap:"16px",zIndex:50},children:Array.from({length:r}).map((l,o)=>_.jsx("button",{disabled:o===n,"aria-label":"navigation dot",onClick:()=>u(o,1),style:{width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",background:"none",cursor:"pointer",userSelect:"none"},children:_.jsx("span",{style:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n===o?"white":"rgba(255,255,255,0.4)",transform:n===o?"scale(1.25)":"scale(1)",transition:"all 0.3s ease"}})},o))})}const me=i.memo(de);function ve({children:r}){return _.jsx("div",{style:{position:"relative",width:"100%",height:"100vh",overflow:"hidden",background:"transparent"},children:r})}const Z=i.memo(ve);Z.__FULLPAGE_SECTION__=!0;function Ee({children:r,styles:n,height:u="30%",backgroundColor:c="yellow",footerRef:a}){return _.jsx("div",{ref:a,style:{position:"absolute",width:"100%",height:u,backgroundColor:c,bottom:0,zIndex:50,...n},children:r},"fullpage-footer")}const Q=i.memo(Ee);Q.__FULLPAGE_FOOTER__=!0;function _e(r){process.env.NODE_ENV!=="production"&&r.forEach(n=>{if(i.isValidElement(n)&&!n.type.__FULLPAGE_SECTION__)throw console.warn("[FullPage] You must wrap content inside <FullPage.Section />"),new Error("[FullPage] You must wrap content inside <FullPage.Section />")})}function he({children:r,isHiddenFooter:n}){const u=n?2500:600;return _.jsx("div",{style:{position:"absolute",left:0,bottom:0,width:"100%",height:"100vh",zIndex:50,transform:n?"translateY(100%)":"translateY(0)",transition:`transform ${u}ms cubic-bezier(0.22,1,0.36,1)`,willChange:"transform",pointerEvents:n?"none":"auto"},children:r})}const pe=i.memo(he);function U({children:r,onChange:n,directionDots:u="right",enableContextMenu:c=!0,duration:a=700,closeOutside:l=!1,disable:o=!1}){const w=i.Children.toArray(r),h=w.filter(v=>v.type.__FULLPAGE_SECTION__),b=w.find(v=>v.type.__FULLPAGE_FOOTER__);le(c),i.useEffect(()=>(_e(h),()=>{}),[h]);const p=!!b,x=h.length+(p?1:0),{active:S,goToSection:R,isHiddenFooter:g,footerRef:y}=ue(x,p,n,a,l,o),T=b?i.cloneElement(b,{footerRef:y}):null;return _.jsxs(_.Fragment,{children:[_.jsxs("div",{style:{position:"relative",height:"100vh",width:"100%",overflow:"hidden"},children:[_.jsx("div",{style:{height:`${h.length*100}vh`,transform:g?`translateY(-${S*100}vh)`:`translateY(-${(h.length-1)*100}vh)`,transition:`transform ${a}ms cubic-bezier(0.22,1,0.36,1)`},children:h.map((v,E)=>_.jsx(fe,{index:E,active:S,isHiddenFooter:g,children:v},E))}),b&&_.jsx(pe,{isHiddenFooter:g,children:T})]}),_.jsx(me,{sectionsLen:x,active:S,goToSection:R,direction:u})]})}U.Section=Z;U.Footer=Q;exports.FullPage=U;
package/dist/index.es.js CHANGED
@@ -1,46 +1,46 @@
1
- import $, { useEffect as D, useState as V, useRef as O, memo as F } from "react";
2
- var I = { exports: {} }, j = {};
3
- var Q;
1
+ import I, { useEffect as $, useState as G, useRef as A, memo as N } from "react";
2
+ var Y = { exports: {} }, O = {};
3
+ var Z;
4
4
  function le() {
5
- if (Q) return j;
6
- Q = 1;
5
+ if (Z) return O;
6
+ Z = 1;
7
7
  var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
8
- function i(f, a, l) {
8
+ function i(u, a, l) {
9
9
  var o = null;
10
10
  if (l !== void 0 && (o = "" + l), a.key !== void 0 && (o = "" + a.key), "key" in a) {
11
11
  l = {};
12
- for (var d in a)
13
- d !== "key" && (l[d] = a[d]);
12
+ for (var p in a)
13
+ p !== "key" && (l[p] = a[p]);
14
14
  } else l = a;
15
15
  return a = l.ref, {
16
16
  $$typeof: r,
17
- type: f,
17
+ type: u,
18
18
  key: o,
19
19
  ref: a !== void 0 ? a : null,
20
20
  props: l
21
21
  };
22
22
  }
23
- return j.Fragment = n, j.jsx = i, j.jsxs = i, j;
23
+ return O.Fragment = n, O.jsx = i, O.jsxs = i, O;
24
24
  }
25
- var N = {};
26
- var K;
25
+ var j = {};
26
+ var Q;
27
27
  function ue() {
28
- return K || (K = 1, process.env.NODE_ENV !== "production" && (function() {
28
+ return Q || (Q = 1, process.env.NODE_ENV !== "production" && (function() {
29
29
  function r(e) {
30
30
  if (e == null) return null;
31
31
  if (typeof e == "function")
32
32
  return e.$$typeof === ae ? null : e.displayName || e.name || null;
33
33
  if (typeof e == "string") return e;
34
34
  switch (e) {
35
- case T:
35
+ case R:
36
36
  return "Fragment";
37
- case h:
37
+ case m:
38
38
  return "Profiler";
39
- case b:
39
+ case v:
40
40
  return "StrictMode";
41
41
  case L:
42
42
  return "Suspense";
43
- case C:
43
+ case d:
44
44
  return "SuspenseList";
45
45
  case oe:
46
46
  return "Activity";
@@ -49,18 +49,18 @@ function ue() {
49
49
  switch (typeof e.tag == "number" && console.error(
50
50
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
51
51
  ), e.$$typeof) {
52
- case P:
52
+ case y:
53
53
  return "Portal";
54
54
  case k:
55
55
  return e.displayName || "Context";
56
- case m:
56
+ case S:
57
57
  return (e._context.displayName || "Context") + ".Consumer";
58
- case x:
58
+ case F:
59
59
  var t = e.render;
60
60
  return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
61
- case v:
61
+ case ne:
62
62
  return t = e.displayName || null, t !== null ? t : r(e.type) || "Memo";
63
- case M:
63
+ case D:
64
64
  t = e._payload, e = e._init;
65
65
  try {
66
66
  return r(e(t));
@@ -81,17 +81,17 @@ function ue() {
81
81
  }
82
82
  if (t) {
83
83
  t = console;
84
- var s = t.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
84
+ var s = t.error, c = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
85
85
  return s.call(
86
86
  t,
87
87
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
88
- u
88
+ c
89
89
  ), n(e);
90
90
  }
91
91
  }
92
- function f(e) {
93
- if (e === T) return "<>";
94
- if (typeof e == "object" && e !== null && e.$$typeof === M)
92
+ function u(e) {
93
+ if (e === R) return "<>";
94
+ if (typeof e == "object" && e !== null && e.$$typeof === D)
95
95
  return "<...>";
96
96
  try {
97
97
  var t = r(e);
@@ -101,22 +101,22 @@ function ue() {
101
101
  }
102
102
  }
103
103
  function a() {
104
- var e = U.A;
104
+ var e = M.A;
105
105
  return e === null ? null : e.getOwner();
106
106
  }
107
107
  function l() {
108
108
  return Error("react-stack-top-frame");
109
109
  }
110
110
  function o(e) {
111
- if (J.call(e, "key")) {
111
+ if (V.call(e, "key")) {
112
112
  var t = Object.getOwnPropertyDescriptor(e, "key").get;
113
113
  if (t && t.isReactWarning) return !1;
114
114
  }
115
115
  return e.key !== void 0;
116
116
  }
117
- function d(e, t) {
117
+ function p(e, t) {
118
118
  function s() {
119
- q || (q = !0, console.error(
119
+ J || (J = !0, console.error(
120
120
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
121
121
  t
122
122
  ));
@@ -128,19 +128,19 @@ function ue() {
128
128
  }
129
129
  function _() {
130
130
  var e = r(this.type);
131
- return H[e] || (H[e] = !0, console.error(
131
+ return q[e] || (q[e] = !0, console.error(
132
132
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
133
133
  )), e = this.props.ref, e !== void 0 ? e : null;
134
134
  }
135
- function R(e, t, s, u, Y, z) {
136
- var c = s.ref;
135
+ function w(e, t, s, c, C, W) {
136
+ var f = s.ref;
137
137
  return e = {
138
138
  $$typeof: g,
139
139
  type: e,
140
140
  key: t,
141
141
  props: s,
142
- _owner: u
143
- }, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
142
+ _owner: c
143
+ }, (f !== void 0 ? f : null) !== null ? Object.defineProperty(e, "ref", {
144
144
  enumerable: !1,
145
145
  get: _
146
146
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
@@ -157,152 +157,153 @@ function ue() {
157
157
  configurable: !1,
158
158
  enumerable: !1,
159
159
  writable: !0,
160
- value: Y
160
+ value: C
161
161
  }), Object.defineProperty(e, "_debugTask", {
162
162
  configurable: !1,
163
163
  enumerable: !1,
164
164
  writable: !0,
165
- value: z
165
+ value: W
166
166
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
167
167
  }
168
- function p(e, t, s, u, Y, z) {
169
- var c = t.children;
170
- if (c !== void 0)
171
- if (u)
172
- if (se(c)) {
173
- for (u = 0; u < c.length; u++)
174
- w(c[u]);
175
- Object.freeze && Object.freeze(c);
168
+ function h(e, t, s, c, C, W) {
169
+ var f = t.children;
170
+ if (f !== void 0)
171
+ if (c)
172
+ if (se(f)) {
173
+ for (c = 0; c < f.length; c++)
174
+ T(f[c]);
175
+ Object.freeze && Object.freeze(f);
176
176
  } else
177
177
  console.error(
178
178
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
179
179
  );
180
- else w(c);
181
- if (J.call(t, "key")) {
182
- c = r(e);
183
- var A = Object.keys(t).filter(function(ie) {
180
+ else T(f);
181
+ if (V.call(t, "key")) {
182
+ f = r(e);
183
+ var P = Object.keys(t).filter(function(ie) {
184
184
  return ie !== "key";
185
185
  });
186
- u = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", Z[c + u] || (A = 0 < A.length ? "{" + A.join(": ..., ") + ": ...}" : "{}", console.error(
186
+ c = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", B[f + c] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
187
187
  `A props object containing a "key" prop is being spread into JSX:
188
188
  let props = %s;
189
189
  <%s {...props} />
190
190
  React keys must be passed directly to JSX without using spread:
191
191
  let props = %s;
192
192
  <%s key={someKey} {...props} />`,
193
- u,
194
193
  c,
195
- A,
196
- c
197
- ), Z[c + u] = !0);
194
+ f,
195
+ P,
196
+ f
197
+ ), B[f + c] = !0);
198
198
  }
199
- if (c = null, s !== void 0 && (i(s), c = "" + s), o(t) && (i(t.key), c = "" + t.key), "key" in t) {
199
+ if (f = null, s !== void 0 && (i(s), f = "" + s), o(t) && (i(t.key), f = "" + t.key), "key" in t) {
200
200
  s = {};
201
- for (var G in t)
202
- G !== "key" && (s[G] = t[G]);
201
+ for (var z in t)
202
+ z !== "key" && (s[z] = t[z]);
203
203
  } else s = t;
204
- return c && d(
204
+ return f && p(
205
205
  s,
206
206
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
207
- ), R(
207
+ ), w(
208
208
  e,
209
- c,
209
+ f,
210
210
  s,
211
211
  a(),
212
- Y,
213
- z
212
+ C,
213
+ W
214
214
  );
215
215
  }
216
- function w(e) {
217
- y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === M && (e._payload.status === "fulfilled" ? y(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
216
+ function T(e) {
217
+ x(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === D && (e._payload.status === "fulfilled" ? x(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
218
  }
219
- function y(e) {
219
+ function x(e) {
220
220
  return typeof e == "object" && e !== null && e.$$typeof === g;
221
221
  }
222
- var S = $, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), P = /* @__PURE__ */ Symbol.for("react.portal"), T = /* @__PURE__ */ Symbol.for("react.fragment"), b = /* @__PURE__ */ Symbol.for("react.strict_mode"), h = /* @__PURE__ */ Symbol.for("react.profiler"), m = /* @__PURE__ */ Symbol.for("react.consumer"), k = /* @__PURE__ */ Symbol.for("react.context"), x = /* @__PURE__ */ Symbol.for("react.forward_ref"), L = /* @__PURE__ */ Symbol.for("react.suspense"), C = /* @__PURE__ */ Symbol.for("react.suspense_list"), v = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), oe = /* @__PURE__ */ Symbol.for("react.activity"), ae = /* @__PURE__ */ Symbol.for("react.client.reference"), U = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, J = Object.prototype.hasOwnProperty, se = Array.isArray, W = console.createTask ? console.createTask : function() {
222
+ var b = I, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), R = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), m = /* @__PURE__ */ Symbol.for("react.profiler"), S = /* @__PURE__ */ Symbol.for("react.consumer"), k = /* @__PURE__ */ Symbol.for("react.context"), F = /* @__PURE__ */ Symbol.for("react.forward_ref"), L = /* @__PURE__ */ Symbol.for("react.suspense"), d = /* @__PURE__ */ Symbol.for("react.suspense_list"), ne = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), oe = /* @__PURE__ */ Symbol.for("react.activity"), ae = /* @__PURE__ */ Symbol.for("react.client.reference"), M = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, se = Array.isArray, U = console.createTask ? console.createTask : function() {
223
223
  return null;
224
224
  };
225
- S = {
225
+ b = {
226
226
  react_stack_bottom_frame: function(e) {
227
227
  return e();
228
228
  }
229
229
  };
230
- var q, H = {}, X = S.react_stack_bottom_frame.bind(
231
- S,
230
+ var J, q = {}, H = b.react_stack_bottom_frame.bind(
231
+ b,
232
232
  l
233
- )(), B = W(f(l)), Z = {};
234
- N.Fragment = T, N.jsx = function(e, t, s) {
235
- var u = 1e4 > U.recentlyCreatedOwnerStacks++;
236
- return p(
233
+ )(), X = U(u(l)), B = {};
234
+ j.Fragment = R, j.jsx = function(e, t, s) {
235
+ var c = 1e4 > M.recentlyCreatedOwnerStacks++;
236
+ return h(
237
237
  e,
238
238
  t,
239
239
  s,
240
240
  !1,
241
- u ? Error("react-stack-top-frame") : X,
242
- u ? W(f(e)) : B
241
+ c ? Error("react-stack-top-frame") : H,
242
+ c ? U(u(e)) : X
243
243
  );
244
- }, N.jsxs = function(e, t, s) {
245
- var u = 1e4 > U.recentlyCreatedOwnerStacks++;
246
- return p(
244
+ }, j.jsxs = function(e, t, s) {
245
+ var c = 1e4 > M.recentlyCreatedOwnerStacks++;
246
+ return h(
247
247
  e,
248
248
  t,
249
249
  s,
250
250
  !0,
251
- u ? Error("react-stack-top-frame") : X,
252
- u ? W(f(e)) : B
251
+ c ? Error("react-stack-top-frame") : H,
252
+ c ? U(u(e)) : X
253
253
  );
254
254
  };
255
- })()), N;
255
+ })()), j;
256
256
  }
257
- var ee;
257
+ var K;
258
258
  function ce() {
259
- return ee || (ee = 1, process.env.NODE_ENV === "production" ? I.exports = le() : I.exports = ue()), I.exports;
259
+ return K || (K = 1, process.env.NODE_ENV === "production" ? Y.exports = le() : Y.exports = ue()), Y.exports;
260
260
  }
261
261
  var E = ce();
262
- const fe = 50, de = (r, n, i, f = 700, a, l) => {
263
- const [o, d] = V(0), [_, R] = V(!0), p = O(!1), [w, y] = V(0), S = n && o + 1 === r, g = O(0), P = O(0), T = O(!1), b = O(null), h = (m, k) => {
264
- if (m < 0 || m >= r || p.current) return;
265
- const x = k === 2;
266
- p.current = !0, y(o), d(m), S ? m === 3 || o === r - 1 ? d(x ? w : m) : d(w) : d(m), n && r === m + 1 ? R(!1) : R(!0), setTimeout(() => {
267
- p.current = !1;
268
- }, f);
262
+ const fe = 50, de = (r, n, i, u = 700, a, l) => {
263
+ const [o, p] = G(0), [_, w] = G(!0), h = A(!1), [T, x] = G(0), b = A(0), g = A(0), y = A(!1), R = A(null), v = (m, S) => {
264
+ m < 0 || m >= r || h.current || (h.current = !0, x(o), p(m), n && m === r - 1 ? w(!1) : w(!0), setTimeout(() => {
265
+ h.current = !1;
266
+ }, u));
269
267
  };
270
- return D(() => {
271
- i && i(o);
272
- const m = (v) => {
268
+ return $(() => {
269
+ i?.(o);
270
+ const m = (d) => {
273
271
  if (!l) {
274
- if (p.current) return v.preventDefault();
275
- v.deltaY > 0 ? h(o + 1, 2) : h(o - 1, 2);
272
+ if (h.current) {
273
+ d.preventDefault();
274
+ return;
275
+ }
276
+ Math.abs(d.deltaY) < 2 || (d.preventDefault(), d.deltaY > 0 ? v(o + 1) : v(o - 1));
276
277
  }
277
- }, k = (v) => {
278
- l || p.current || (v.key === "ArrowDown" && h(o + 1, 2), v.key === "ArrowUp" && h(o - 1, 2));
279
- }, x = (v) => {
280
- l || (g.current = v.touches[0].clientY, T.current = !1);
281
- }, L = (v) => {
282
- l || (P.current = v.touches[0].clientY, T.current = !0);
283
- }, C = () => {
284
- if (l || !T.current) return;
285
- const v = g.current - P.current;
286
- Math.abs(v) >= fe && (v > 0 ? h(o + 1, 2) : h(o - 1, 2));
278
+ }, S = (d) => {
279
+ l || h.current || (d.key === "ArrowDown" && v(o + 1), d.key === "ArrowUp" && v(o - 1));
280
+ }, k = (d) => {
281
+ l || (b.current = d.touches[0].clientY, y.current = !1);
282
+ }, F = (d) => {
283
+ l || (g.current = d.touches[0].clientY, y.current = !0);
284
+ }, L = () => {
285
+ if (l || !y.current || h.current) return;
286
+ const d = b.current - g.current;
287
+ Math.abs(d) >= fe && (d > 0 ? v(o + 1) : v(o - 1));
287
288
  };
288
- return window.addEventListener("wheel", m, { passive: !1 }), window.addEventListener("keydown", k), window.addEventListener("touchstart", x, { passive: !0 }), window.addEventListener("touchmove", L, { passive: !0 }), window.addEventListener("touchend", C), () => {
289
- window.removeEventListener("wheel", m), window.removeEventListener("keydown", k), window.removeEventListener("touchstart", x), window.removeEventListener("touchmove", L), window.removeEventListener("touchend", C);
289
+ return window.addEventListener("wheel", m, { passive: !1 }), window.addEventListener("keydown", S), window.addEventListener("touchstart", k, { passive: !0 }), window.addEventListener("touchmove", F, { passive: !0 }), window.addEventListener("touchend", L), () => {
290
+ window.removeEventListener("wheel", m), window.removeEventListener("keydown", S), window.removeEventListener("touchstart", k), window.removeEventListener("touchmove", F), window.removeEventListener("touchend", L);
290
291
  };
291
- }, [o, r, n, i]), D(() => {
292
+ }, [o, r, n, i, l, u]), $(() => {
292
293
  if (!a) return;
293
- const m = (k) => {
294
- if (p.current && _) return;
295
- const x = k.target;
296
- b.current && !b.current.contains(x) && !_ && (d(w), R(!0));
294
+ const m = (S) => {
295
+ if (h.current && _) return;
296
+ const k = S.target;
297
+ R.current && !R.current.contains(k) && !_ && (p(T), w(!0));
297
298
  };
298
299
  return setTimeout(() => {
299
300
  document.addEventListener("click", m);
300
301
  }, 300), () => {
301
302
  document.removeEventListener("click", m);
302
303
  };
303
- }, [w, _, a]), { active: o, goToSection: h, isHiddenFooter: _, footerRef: b };
304
- }, me = (r = !1) => {
305
- D(() => {
304
+ }, [T, _, a]), { active: o, goToSection: v, isHiddenFooter: _, footerRef: R };
305
+ }, ve = (r = !1) => {
306
+ $(() => {
306
307
  if (r) return;
307
308
  const n = (i) => i.preventDefault();
308
309
  return window.addEventListener("contextmenu", n), () => {
@@ -310,11 +311,11 @@ const fe = 50, de = (r, n, i, f = 700, a, l) => {
310
311
  };
311
312
  }, [r]);
312
313
  };
313
- function ve({
314
+ function me({
314
315
  children: r,
315
316
  index: n,
316
317
  active: i,
317
- isHiddenFooter: f
318
+ isHiddenFooter: u
318
319
  }) {
319
320
  return /* @__PURE__ */ E.jsx(
320
321
  "section",
@@ -324,27 +325,27 @@ function ve({
324
325
  width: "100%",
325
326
  height: "100vh",
326
327
  overflow: "hidden",
327
- filter: n === i || f ? "blur(0px)" : "blur(6px)"
328
+ filter: n === i || u ? "blur(0px)" : "blur(6px)"
328
329
  },
329
330
  children: r
330
331
  }
331
332
  );
332
333
  }
333
- const Ee = F(ve);
334
+ const Ee = N(me);
334
335
  function _e({
335
336
  sectionsLen: r,
336
337
  active: n,
337
338
  goToSection: i,
338
- direction: f = "right"
339
+ direction: u = "right"
339
340
  }) {
340
- const a = f === "bottom";
341
+ const a = u === "bottom";
341
342
  return /* @__PURE__ */ E.jsx(
342
343
  "div",
343
344
  {
344
345
  style: {
345
346
  position: "fixed",
346
- right: f === "right" ? 24 : f === "bottom" ? "50%" : void 0,
347
- left: f === "left" ? 24 : void 0,
347
+ right: u === "right" ? 24 : u === "bottom" ? "50%" : void 0,
348
+ left: u === "left" ? 24 : void 0,
348
349
  top: a ? void 0 : "50%",
349
350
  bottom: a ? "5%" : void 0,
350
351
  transform: "translateY(-50%)",
@@ -390,8 +391,8 @@ function _e({
390
391
  }
391
392
  );
392
393
  }
393
- const pe = F(_e);
394
- function he({ children: r }) {
394
+ const he = N(_e);
395
+ function pe({ children: r }) {
395
396
  return /* @__PURE__ */ E.jsx(
396
397
  "div",
397
398
  {
@@ -406,13 +407,13 @@ function he({ children: r }) {
406
407
  }
407
408
  );
408
409
  }
409
- const te = F(he);
410
- te.__FULLPAGE_SECTION__ = !0;
410
+ const ee = N(pe);
411
+ ee.__FULLPAGE_SECTION__ = !0;
411
412
  function we({
412
413
  children: r,
413
414
  styles: n,
414
415
  height: i = "30%",
415
- backgroundColor: f = "yellow",
416
+ backgroundColor: u = "yellow",
416
417
  footerRef: a
417
418
  }) {
418
419
  return /* @__PURE__ */ E.jsx(
@@ -423,7 +424,7 @@ function we({
423
424
  position: "absolute",
424
425
  width: "100%",
425
426
  height: i,
426
- backgroundColor: f,
427
+ backgroundColor: u,
427
428
  bottom: 0,
428
429
  zIndex: 50,
429
430
  ...n
@@ -433,11 +434,11 @@ function we({
433
434
  "fullpage-footer"
434
435
  );
435
436
  }
436
- const re = F(we);
437
- re.__FULLPAGE_FOOTER__ = !0;
437
+ const te = N(we);
438
+ te.__FULLPAGE_FOOTER__ = !0;
438
439
  function be(r) {
439
440
  process.env.NODE_ENV !== "production" && r.forEach((n) => {
440
- if ($.isValidElement(n) && !n.type.__FULLPAGE_SECTION__)
441
+ if (I.isValidElement(n) && !n.type.__FULLPAGE_SECTION__)
441
442
  throw console.warn(
442
443
  "[FullPage] You must wrap content inside <FullPage.Section />"
443
444
  ), new Error(
@@ -445,7 +446,7 @@ function be(r) {
445
446
  );
446
447
  });
447
448
  }
448
- function Re({ children: r, isHiddenFooter: n }) {
449
+ function ge({ children: r, isHiddenFooter: n }) {
449
450
  const i = n ? 2500 : 600;
450
451
  return /* @__PURE__ */ E.jsx(
451
452
  "div",
@@ -466,31 +467,31 @@ function Re({ children: r, isHiddenFooter: n }) {
466
467
  }
467
468
  );
468
469
  }
469
- const ge = F(Re);
470
- function ne({
470
+ const Re = N(ge);
471
+ function re({
471
472
  children: r,
472
473
  onChange: n,
473
474
  directionDots: i = "right",
474
- enableContextMenu: f = !0,
475
+ enableContextMenu: u = !0,
475
476
  duration: a = 700,
476
477
  closeOutside: l = !1,
477
478
  disable: o = !1
478
479
  }) {
479
- const d = $.Children.toArray(r), _ = d.filter(
480
- (b) => b.type.__FULLPAGE_SECTION__
481
- ), R = d.find(
482
- (b) => b.type.__FULLPAGE_FOOTER__
480
+ const p = I.Children.toArray(r), _ = p.filter(
481
+ (v) => v.type.__FULLPAGE_SECTION__
482
+ ), w = p.find(
483
+ (v) => v.type.__FULLPAGE_FOOTER__
483
484
  );
484
- me(f), D(() => (be(_), () => {
485
+ ve(u), $(() => (be(_), () => {
485
486
  }), [_]);
486
- const p = !!R, w = _.length + (p ? 1 : 0), { active: y, goToSection: S, isHiddenFooter: g, footerRef: P } = de(
487
- w,
488
- p,
487
+ const h = !!w, T = _.length + (h ? 1 : 0), { active: x, goToSection: b, isHiddenFooter: g, footerRef: y } = de(
488
+ T,
489
+ h,
489
490
  n,
490
491
  a,
491
492
  l,
492
493
  o
493
- ), T = R ? $.cloneElement(R, { footerRef: P }) : null;
494
+ ), R = w ? I.cloneElement(w, { footerRef: y }) : null;
494
495
  return /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
495
496
  /* @__PURE__ */ E.jsxs(
496
497
  "div",
@@ -507,38 +508,38 @@ function ne({
507
508
  {
508
509
  style: {
509
510
  height: `${_.length * 100}vh`,
510
- transform: g ? `translateY(-${y * 100}vh)` : `translateY(-${_.length - 100}vh)`,
511
- transition: "transform 700ms cubic-bezier(0.22,1,0.36,1)"
511
+ transform: g ? `translateY(-${x * 100}vh)` : `translateY(-${(_.length - 1) * 100}vh)`,
512
+ transition: `transform ${a}ms cubic-bezier(0.22,1,0.36,1)`
512
513
  },
513
- children: _.map((b, h) => /* @__PURE__ */ E.jsx(
514
+ children: _.map((v, m) => /* @__PURE__ */ E.jsx(
514
515
  Ee,
515
516
  {
516
- index: h,
517
- active: y,
517
+ index: m,
518
+ active: x,
518
519
  isHiddenFooter: g,
519
- children: b
520
+ children: v
520
521
  },
521
- h
522
+ m
522
523
  ))
523
524
  }
524
525
  ),
525
- R && /* @__PURE__ */ E.jsx(ge, { isHiddenFooter: g, children: T })
526
+ w && /* @__PURE__ */ E.jsx(Re, { isHiddenFooter: g, children: R })
526
527
  ]
527
528
  }
528
529
  ),
529
530
  /* @__PURE__ */ E.jsx(
530
- pe,
531
+ he,
531
532
  {
532
- sectionsLen: w,
533
- active: y,
534
- goToSection: S,
533
+ sectionsLen: T,
534
+ active: x,
535
+ goToSection: b,
535
536
  direction: i
536
537
  }
537
538
  )
538
539
  ] });
539
540
  }
540
- ne.Section = te;
541
- ne.Footer = re;
541
+ re.Section = ee;
542
+ re.Footer = te;
542
543
  export {
543
- ne as FullPage
544
+ re as FullPage
544
545
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-abohook-fullpage",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "React FullPage scroll component with parallax and navigation dots",
5
5
  "author": "Mostafa Ahmed",
6
6
  "license": "MIT",