react-abohook-fullpage 1.1.8 → 1.1.9
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 +2 -2
- package/dist/index.es.js +142 -131
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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:
|
|
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} />`,
|
|
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;
|
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import $, { useEffect as D, useState as V, useRef as O, memo as F } from "react";
|
|
2
2
|
var I = { exports: {} }, j = {};
|
|
3
3
|
var Q;
|
|
4
4
|
function le() {
|
|
5
5
|
if (Q) return j;
|
|
6
6
|
Q = 1;
|
|
7
|
-
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"),
|
|
7
|
+
var r = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
8
|
function i(f, a, l) {
|
|
9
|
-
var
|
|
10
|
-
if (l !== void 0 && (
|
|
9
|
+
var o = null;
|
|
10
|
+
if (l !== void 0 && (o = "" + l), a.key !== void 0 && (o = "" + a.key), "key" in a) {
|
|
11
11
|
l = {};
|
|
12
12
|
for (var d in a)
|
|
13
13
|
d !== "key" && (l[d] = a[d]);
|
|
@@ -15,12 +15,12 @@ function le() {
|
|
|
15
15
|
return a = l.ref, {
|
|
16
16
|
$$typeof: r,
|
|
17
17
|
type: f,
|
|
18
|
-
key:
|
|
18
|
+
key: o,
|
|
19
19
|
ref: a !== void 0 ? a : null,
|
|
20
20
|
props: l
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
return j.Fragment =
|
|
23
|
+
return j.Fragment = n, j.jsx = i, j.jsxs = i, j;
|
|
24
24
|
}
|
|
25
25
|
var N = {};
|
|
26
26
|
var K;
|
|
@@ -32,11 +32,11 @@ function ue() {
|
|
|
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
|
|
35
|
+
case T:
|
|
36
36
|
return "Fragment";
|
|
37
37
|
case h:
|
|
38
38
|
return "Profiler";
|
|
39
|
-
case
|
|
39
|
+
case b:
|
|
40
40
|
return "StrictMode";
|
|
41
41
|
case L:
|
|
42
42
|
return "Suspense";
|
|
@@ -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
|
|
52
|
+
case P:
|
|
53
53
|
return "Portal";
|
|
54
|
-
case
|
|
54
|
+
case k:
|
|
55
55
|
return e.displayName || "Context";
|
|
56
|
-
case
|
|
56
|
+
case m:
|
|
57
57
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
58
|
case x:
|
|
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
|
|
61
|
+
case v:
|
|
62
62
|
return t = e.displayName || null, t !== null ? t : r(e.type) || "Memo";
|
|
63
|
-
case
|
|
63
|
+
case M:
|
|
64
64
|
t = e._payload, e = e._init;
|
|
65
65
|
try {
|
|
66
66
|
return r(e(t));
|
|
@@ -69,12 +69,12 @@ function ue() {
|
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function n(e) {
|
|
73
73
|
return "" + e;
|
|
74
74
|
}
|
|
75
75
|
function i(e) {
|
|
76
76
|
try {
|
|
77
|
-
|
|
77
|
+
n(e);
|
|
78
78
|
var t = !1;
|
|
79
79
|
} catch {
|
|
80
80
|
t = !0;
|
|
@@ -86,12 +86,12 @@ function ue() {
|
|
|
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
88
|
u
|
|
89
|
-
),
|
|
89
|
+
), n(e);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
function f(e) {
|
|
93
|
-
if (e ===
|
|
94
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
93
|
+
if (e === T) return "<>";
|
|
94
|
+
if (typeof e == "object" && e !== null && e.$$typeof === M)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
97
|
var t = r(e);
|
|
@@ -101,14 +101,14 @@ function ue() {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function a() {
|
|
104
|
-
var e =
|
|
104
|
+
var e = U.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
|
-
function
|
|
111
|
-
if (
|
|
110
|
+
function o(e) {
|
|
111
|
+
if (J.call(e, "key")) {
|
|
112
112
|
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
113
113
|
if (t && t.isReactWarning) return !1;
|
|
114
114
|
}
|
|
@@ -126,23 +126,23 @@ function ue() {
|
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function _() {
|
|
130
130
|
var e = r(this.type);
|
|
131
131
|
return H[e] || (H[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,
|
|
135
|
+
function R(e, t, s, u, Y, z) {
|
|
136
136
|
var c = s.ref;
|
|
137
137
|
return e = {
|
|
138
|
-
$$typeof:
|
|
138
|
+
$$typeof: g,
|
|
139
139
|
type: e,
|
|
140
140
|
key: t,
|
|
141
141
|
props: s,
|
|
142
142
|
_owner: u
|
|
143
143
|
}, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
|
|
144
144
|
enumerable: !1,
|
|
145
|
-
get:
|
|
145
|
+
get: _
|
|
146
146
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
147
147
|
configurable: !1,
|
|
148
148
|
enumerable: !1,
|
|
@@ -162,28 +162,28 @@ function ue() {
|
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
|
-
value:
|
|
165
|
+
value: z
|
|
166
166
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function p(e, t, s, u, Y, z) {
|
|
169
169
|
var c = t.children;
|
|
170
170
|
if (c !== void 0)
|
|
171
171
|
if (u)
|
|
172
172
|
if (se(c)) {
|
|
173
173
|
for (u = 0; u < c.length; u++)
|
|
174
|
-
|
|
174
|
+
w(c[u]);
|
|
175
175
|
Object.freeze && Object.freeze(c);
|
|
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
|
|
181
|
-
if (
|
|
180
|
+
else w(c);
|
|
181
|
+
if (J.call(t, "key")) {
|
|
182
182
|
c = r(e);
|
|
183
|
-
var
|
|
183
|
+
var A = Object.keys(t).filter(function(ie) {
|
|
184
184
|
return ie !== "key";
|
|
185
185
|
});
|
|
186
|
-
u = 0 <
|
|
186
|
+
u = 0 < A.length ? "{key: someKey, " + A.join(": ..., ") + ": ...}" : "{key: someKey}", Z[c + u] || (A = 0 < A.length ? "{" + A.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} />
|
|
@@ -192,14 +192,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
192
192
|
<%s key={someKey} {...props} />`,
|
|
193
193
|
u,
|
|
194
194
|
c,
|
|
195
|
-
|
|
195
|
+
A,
|
|
196
196
|
c
|
|
197
197
|
), Z[c + u] = !0);
|
|
198
198
|
}
|
|
199
|
-
if (c = null, s !== void 0 && (i(s), c = "" + s),
|
|
199
|
+
if (c = null, s !== void 0 && (i(s), c = "" + s), o(t) && (i(t.key), c = "" + t.key), "key" in t) {
|
|
200
200
|
s = {};
|
|
201
|
-
for (var
|
|
202
|
-
|
|
201
|
+
for (var G in t)
|
|
202
|
+
G !== "key" && (s[G] = t[G]);
|
|
203
203
|
} else s = t;
|
|
204
204
|
return c && d(
|
|
205
205
|
s,
|
|
@@ -210,46 +210,46 @@ React keys must be passed directly to JSX without using spread:
|
|
|
210
210
|
s,
|
|
211
211
|
a(),
|
|
212
212
|
Y,
|
|
213
|
-
|
|
213
|
+
z
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
y(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof ===
|
|
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));
|
|
218
218
|
}
|
|
219
219
|
function y(e) {
|
|
220
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
220
|
+
return typeof e == "object" && e !== null && e.$$typeof === g;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
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() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
|
-
|
|
225
|
+
S = {
|
|
226
226
|
react_stack_bottom_frame: function(e) {
|
|
227
227
|
return e();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var q, H = {}, X =
|
|
231
|
-
|
|
230
|
+
var q, H = {}, X = S.react_stack_bottom_frame.bind(
|
|
231
|
+
S,
|
|
232
232
|
l
|
|
233
|
-
)(), B =
|
|
234
|
-
N.Fragment =
|
|
235
|
-
var u = 1e4 >
|
|
236
|
-
return
|
|
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(
|
|
237
237
|
e,
|
|
238
238
|
t,
|
|
239
239
|
s,
|
|
240
240
|
!1,
|
|
241
241
|
u ? Error("react-stack-top-frame") : X,
|
|
242
|
-
u ?
|
|
242
|
+
u ? W(f(e)) : B
|
|
243
243
|
);
|
|
244
244
|
}, N.jsxs = function(e, t, s) {
|
|
245
|
-
var u = 1e4 >
|
|
246
|
-
return
|
|
245
|
+
var u = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
246
|
+
return p(
|
|
247
247
|
e,
|
|
248
248
|
t,
|
|
249
249
|
s,
|
|
250
250
|
!0,
|
|
251
251
|
u ? Error("react-stack-top-frame") : X,
|
|
252
|
-
u ?
|
|
252
|
+
u ? W(f(e)) : B
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
255
|
})()), N;
|
|
@@ -259,60 +259,60 @@ function ce() {
|
|
|
259
259
|
return ee || (ee = 1, process.env.NODE_ENV === "production" ? I.exports = le() : I.exports = ue()), I.exports;
|
|
260
260
|
}
|
|
261
261
|
var E = ce();
|
|
262
|
-
const fe = 50, de = (r,
|
|
263
|
-
const [
|
|
264
|
-
if (
|
|
265
|
-
const x =
|
|
266
|
-
|
|
267
|
-
|
|
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
268
|
}, f);
|
|
269
269
|
};
|
|
270
|
-
return
|
|
271
|
-
i && i(
|
|
272
|
-
const
|
|
270
|
+
return D(() => {
|
|
271
|
+
i && i(o);
|
|
272
|
+
const m = (v) => {
|
|
273
273
|
if (!l) {
|
|
274
|
-
if (
|
|
275
|
-
|
|
274
|
+
if (p.current) return v.preventDefault();
|
|
275
|
+
v.deltaY > 0 ? h(o + 1, 2) : h(o - 1, 2);
|
|
276
276
|
}
|
|
277
|
-
},
|
|
278
|
-
l ||
|
|
279
|
-
}, x = (
|
|
280
|
-
l || (
|
|
281
|
-
}, L = (
|
|
282
|
-
l || (
|
|
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
283
|
}, C = () => {
|
|
284
|
-
if (l || !
|
|
285
|
-
const
|
|
286
|
-
Math.abs(
|
|
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));
|
|
287
287
|
};
|
|
288
|
-
return window.addEventListener("wheel",
|
|
289
|
-
window.removeEventListener("wheel",
|
|
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);
|
|
290
290
|
};
|
|
291
|
-
}, [
|
|
291
|
+
}, [o, r, n, i]), D(() => {
|
|
292
292
|
if (!a) return;
|
|
293
|
-
const
|
|
294
|
-
if (
|
|
295
|
-
const x =
|
|
296
|
-
|
|
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));
|
|
297
297
|
};
|
|
298
298
|
return setTimeout(() => {
|
|
299
|
-
document.addEventListener("click",
|
|
299
|
+
document.addEventListener("click", m);
|
|
300
300
|
}, 300), () => {
|
|
301
|
-
document.removeEventListener("click",
|
|
301
|
+
document.removeEventListener("click", m);
|
|
302
302
|
};
|
|
303
|
-
}, [
|
|
304
|
-
},
|
|
305
|
-
|
|
303
|
+
}, [w, _, a]), { active: o, goToSection: h, isHiddenFooter: _, footerRef: b };
|
|
304
|
+
}, me = (r = !1) => {
|
|
305
|
+
D(() => {
|
|
306
306
|
if (r) return;
|
|
307
|
-
const
|
|
308
|
-
return window.addEventListener("contextmenu",
|
|
309
|
-
window.removeEventListener("contextmenu",
|
|
307
|
+
const n = (i) => i.preventDefault();
|
|
308
|
+
return window.addEventListener("contextmenu", n), () => {
|
|
309
|
+
window.removeEventListener("contextmenu", n);
|
|
310
310
|
};
|
|
311
311
|
}, [r]);
|
|
312
312
|
};
|
|
313
|
-
function
|
|
313
|
+
function ve({
|
|
314
314
|
children: r,
|
|
315
|
-
index:
|
|
315
|
+
index: n,
|
|
316
316
|
active: i,
|
|
317
317
|
isHiddenFooter: f
|
|
318
318
|
}) {
|
|
@@ -324,16 +324,16 @@ function me({
|
|
|
324
324
|
width: "100%",
|
|
325
325
|
height: "100vh",
|
|
326
326
|
overflow: "hidden",
|
|
327
|
-
filter:
|
|
327
|
+
filter: n === i || f ? "blur(0px)" : "blur(6px)"
|
|
328
328
|
},
|
|
329
329
|
children: r
|
|
330
330
|
}
|
|
331
331
|
);
|
|
332
332
|
}
|
|
333
|
-
const Ee = F(
|
|
333
|
+
const Ee = F(ve);
|
|
334
334
|
function _e({
|
|
335
335
|
sectionsLen: r,
|
|
336
|
-
active:
|
|
336
|
+
active: n,
|
|
337
337
|
goToSection: i,
|
|
338
338
|
direction: f = "right"
|
|
339
339
|
}) {
|
|
@@ -353,12 +353,12 @@ function _e({
|
|
|
353
353
|
gap: "16px",
|
|
354
354
|
zIndex: 50
|
|
355
355
|
},
|
|
356
|
-
children: Array.from({ length: r }).map((l,
|
|
356
|
+
children: Array.from({ length: r }).map((l, o) => /* @__PURE__ */ E.jsx(
|
|
357
357
|
"button",
|
|
358
358
|
{
|
|
359
|
-
disabled:
|
|
359
|
+
disabled: o === n,
|
|
360
360
|
"aria-label": "navigation dot",
|
|
361
|
-
onClick: () => i(
|
|
361
|
+
onClick: () => i(o, 1),
|
|
362
362
|
style: {
|
|
363
363
|
width: "16px",
|
|
364
364
|
height: "16px",
|
|
@@ -378,20 +378,20 @@ function _e({
|
|
|
378
378
|
width: "10px",
|
|
379
379
|
height: "10px",
|
|
380
380
|
borderRadius: "50%",
|
|
381
|
-
backgroundColor:
|
|
382
|
-
transform:
|
|
381
|
+
backgroundColor: n === o ? "white" : "rgba(255,255,255,0.4)",
|
|
382
|
+
transform: n === o ? "scale(1.25)" : "scale(1)",
|
|
383
383
|
transition: "all 0.3s ease"
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
)
|
|
387
387
|
},
|
|
388
|
-
|
|
388
|
+
o
|
|
389
389
|
))
|
|
390
390
|
}
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
function
|
|
393
|
+
const pe = F(_e);
|
|
394
|
+
function he({ children: r }) {
|
|
395
395
|
return /* @__PURE__ */ E.jsx(
|
|
396
396
|
"div",
|
|
397
397
|
{
|
|
@@ -406,11 +406,11 @@ function pe({ children: r }) {
|
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
408
|
}
|
|
409
|
-
const te = F(
|
|
409
|
+
const te = F(he);
|
|
410
410
|
te.__FULLPAGE_SECTION__ = !0;
|
|
411
|
-
function
|
|
411
|
+
function we({
|
|
412
412
|
children: r,
|
|
413
|
-
styles:
|
|
413
|
+
styles: n,
|
|
414
414
|
height: i = "30%",
|
|
415
415
|
backgroundColor: f = "yellow",
|
|
416
416
|
footerRef: a
|
|
@@ -426,17 +426,27 @@ function be({
|
|
|
426
426
|
backgroundColor: f,
|
|
427
427
|
bottom: 0,
|
|
428
428
|
zIndex: 50,
|
|
429
|
-
...
|
|
429
|
+
...n
|
|
430
430
|
},
|
|
431
431
|
children: r
|
|
432
432
|
},
|
|
433
433
|
"fullpage-footer"
|
|
434
434
|
);
|
|
435
435
|
}
|
|
436
|
-
const re = F(
|
|
436
|
+
const re = F(we);
|
|
437
437
|
re.__FULLPAGE_FOOTER__ = !0;
|
|
438
|
-
function
|
|
439
|
-
|
|
438
|
+
function be(r) {
|
|
439
|
+
process.env.NODE_ENV !== "production" && r.forEach((n) => {
|
|
440
|
+
if ($.isValidElement(n) && !n.type.__FULLPAGE_SECTION__)
|
|
441
|
+
throw console.warn(
|
|
442
|
+
"[FullPage] You must wrap content inside <FullPage.Section />"
|
|
443
|
+
), new Error(
|
|
444
|
+
"[FullPage] You must wrap content inside <FullPage.Section />"
|
|
445
|
+
);
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
function Re({ children: r, isHiddenFooter: n }) {
|
|
449
|
+
const i = n ? 2500 : 600;
|
|
440
450
|
return /* @__PURE__ */ E.jsx(
|
|
441
451
|
"div",
|
|
442
452
|
{
|
|
@@ -447,39 +457,40 @@ function we({ children: r, isHiddenFooter: o }) {
|
|
|
447
457
|
width: "100%",
|
|
448
458
|
height: "100vh",
|
|
449
459
|
zIndex: 50,
|
|
450
|
-
transform:
|
|
460
|
+
transform: n ? "translateY(100%)" : "translateY(0)",
|
|
451
461
|
transition: `transform ${i}ms cubic-bezier(0.22,1,0.36,1)`,
|
|
452
462
|
willChange: "transform",
|
|
453
|
-
pointerEvents:
|
|
463
|
+
pointerEvents: n ? "none" : "auto"
|
|
454
464
|
},
|
|
455
465
|
children: r
|
|
456
466
|
}
|
|
457
467
|
);
|
|
458
468
|
}
|
|
459
|
-
const
|
|
469
|
+
const ge = F(Re);
|
|
460
470
|
function ne({
|
|
461
471
|
children: r,
|
|
462
|
-
onChange:
|
|
472
|
+
onChange: n,
|
|
463
473
|
directionDots: i = "right",
|
|
464
474
|
enableContextMenu: f = !0,
|
|
465
475
|
duration: a = 700,
|
|
466
476
|
closeOutside: l = !1,
|
|
467
|
-
disable:
|
|
477
|
+
disable: o = !1
|
|
468
478
|
}) {
|
|
469
|
-
const d =
|
|
470
|
-
(
|
|
479
|
+
const d = $.Children.toArray(r), _ = d.filter(
|
|
480
|
+
(b) => b.type.__FULLPAGE_SECTION__
|
|
471
481
|
), R = d.find(
|
|
472
|
-
(
|
|
482
|
+
(b) => b.type.__FULLPAGE_FOOTER__
|
|
473
483
|
);
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
484
|
+
me(f), D(() => (be(_), () => {
|
|
485
|
+
}), [_]);
|
|
486
|
+
const p = !!R, w = _.length + (p ? 1 : 0), { active: y, goToSection: S, isHiddenFooter: g, footerRef: P } = de(
|
|
487
|
+
w,
|
|
488
|
+
p,
|
|
489
|
+
n,
|
|
479
490
|
a,
|
|
480
491
|
l,
|
|
481
|
-
|
|
482
|
-
),
|
|
492
|
+
o
|
|
493
|
+
), T = R ? $.cloneElement(R, { footerRef: P }) : null;
|
|
483
494
|
return /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
|
|
484
495
|
/* @__PURE__ */ E.jsxs(
|
|
485
496
|
"div",
|
|
@@ -495,32 +506,32 @@ function ne({
|
|
|
495
506
|
"div",
|
|
496
507
|
{
|
|
497
508
|
style: {
|
|
498
|
-
height: `${
|
|
499
|
-
transform:
|
|
509
|
+
height: `${_.length * 100}vh`,
|
|
510
|
+
transform: g ? `translateY(-${y * 100}vh)` : `translateY(-${_.length - 100}vh)`,
|
|
500
511
|
transition: "transform 700ms cubic-bezier(0.22,1,0.36,1)"
|
|
501
512
|
},
|
|
502
|
-
children:
|
|
513
|
+
children: _.map((b, h) => /* @__PURE__ */ E.jsx(
|
|
503
514
|
Ee,
|
|
504
515
|
{
|
|
505
516
|
index: h,
|
|
506
517
|
active: y,
|
|
507
|
-
isHiddenFooter:
|
|
508
|
-
children:
|
|
518
|
+
isHiddenFooter: g,
|
|
519
|
+
children: b
|
|
509
520
|
},
|
|
510
521
|
h
|
|
511
522
|
))
|
|
512
523
|
}
|
|
513
524
|
),
|
|
514
|
-
R && /* @__PURE__ */ E.jsx(
|
|
525
|
+
R && /* @__PURE__ */ E.jsx(ge, { isHiddenFooter: g, children: T })
|
|
515
526
|
]
|
|
516
527
|
}
|
|
517
528
|
),
|
|
518
529
|
/* @__PURE__ */ E.jsx(
|
|
519
|
-
|
|
530
|
+
pe,
|
|
520
531
|
{
|
|
521
|
-
sectionsLen:
|
|
532
|
+
sectionsLen: w,
|
|
522
533
|
active: y,
|
|
523
|
-
goToSection:
|
|
534
|
+
goToSection: S,
|
|
524
535
|
direction: i
|
|
525
536
|
}
|
|
526
537
|
)
|