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 +2 -2
- package/dist/index.es.js +162 -161
- 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 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} />`,
|
|
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
|
|
2
|
-
var
|
|
3
|
-
var
|
|
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 (
|
|
6
|
-
|
|
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(
|
|
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
|
|
13
|
-
|
|
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:
|
|
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
|
|
23
|
+
return O.Fragment = n, O.jsx = i, O.jsxs = i, O;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
26
|
-
var
|
|
25
|
+
var j = {};
|
|
26
|
+
var Q;
|
|
27
27
|
function ue() {
|
|
28
|
-
return
|
|
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
|
|
35
|
+
case R:
|
|
36
36
|
return "Fragment";
|
|
37
|
-
case
|
|
37
|
+
case m:
|
|
38
38
|
return "Profiler";
|
|
39
|
-
case
|
|
39
|
+
case v:
|
|
40
40
|
return "StrictMode";
|
|
41
41
|
case L:
|
|
42
42
|
return "Suspense";
|
|
43
|
-
case
|
|
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
|
|
52
|
+
case y:
|
|
53
53
|
return "Portal";
|
|
54
54
|
case k:
|
|
55
55
|
return e.displayName || "Context";
|
|
56
|
-
case
|
|
56
|
+
case S:
|
|
57
57
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
|
-
case
|
|
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
|
|
61
|
+
case ne:
|
|
62
62
|
return t = e.displayName || null, t !== null ? t : r(e.type) || "Memo";
|
|
63
|
-
case
|
|
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,
|
|
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
|
-
|
|
88
|
+
c
|
|
89
89
|
), n(e);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
if (e ===
|
|
94
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
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 =
|
|
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 (
|
|
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
|
|
117
|
+
function p(e, t) {
|
|
118
118
|
function s() {
|
|
119
|
-
|
|
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
|
|
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
|
|
136
|
-
var
|
|
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:
|
|
143
|
-
}, (
|
|
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:
|
|
160
|
+
value: C
|
|
161
161
|
}), Object.defineProperty(e, "_debugTask", {
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
|
-
value:
|
|
165
|
+
value: W
|
|
166
166
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
var
|
|
170
|
-
if (
|
|
171
|
-
if (
|
|
172
|
-
if (se(
|
|
173
|
-
for (
|
|
174
|
-
|
|
175
|
-
Object.freeze && Object.freeze(
|
|
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
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
var
|
|
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
|
-
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
f,
|
|
195
|
+
P,
|
|
196
|
+
f
|
|
197
|
+
), B[f + c] = !0);
|
|
198
198
|
}
|
|
199
|
-
if (
|
|
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
|
|
202
|
-
|
|
201
|
+
for (var z in t)
|
|
202
|
+
z !== "key" && (s[z] = t[z]);
|
|
203
203
|
} else s = t;
|
|
204
|
-
return
|
|
204
|
+
return f && p(
|
|
205
205
|
s,
|
|
206
206
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
207
|
-
),
|
|
207
|
+
), w(
|
|
208
208
|
e,
|
|
209
|
-
|
|
209
|
+
f,
|
|
210
210
|
s,
|
|
211
211
|
a(),
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
C,
|
|
213
|
+
W
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
217
|
-
|
|
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
|
|
219
|
+
function x(e) {
|
|
220
220
|
return typeof e == "object" && e !== null && e.$$typeof === g;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
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
|
-
|
|
225
|
+
b = {
|
|
226
226
|
react_stack_bottom_frame: function(e) {
|
|
227
227
|
return e();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var
|
|
231
|
-
|
|
230
|
+
var J, q = {}, H = b.react_stack_bottom_frame.bind(
|
|
231
|
+
b,
|
|
232
232
|
l
|
|
233
|
-
)(),
|
|
234
|
-
|
|
235
|
-
var
|
|
236
|
-
return
|
|
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
|
-
|
|
242
|
-
|
|
241
|
+
c ? Error("react-stack-top-frame") : H,
|
|
242
|
+
c ? U(u(e)) : X
|
|
243
243
|
);
|
|
244
|
-
},
|
|
245
|
-
var
|
|
246
|
-
return
|
|
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
|
-
|
|
252
|
-
|
|
251
|
+
c ? Error("react-stack-top-frame") : H,
|
|
252
|
+
c ? U(u(e)) : X
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
|
-
})()),
|
|
255
|
+
})()), j;
|
|
256
256
|
}
|
|
257
|
-
var
|
|
257
|
+
var K;
|
|
258
258
|
function ce() {
|
|
259
|
-
return
|
|
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,
|
|
263
|
-
const [o,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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
|
|
271
|
-
i
|
|
272
|
-
const m = (
|
|
268
|
+
return $(() => {
|
|
269
|
+
i?.(o);
|
|
270
|
+
const m = (d) => {
|
|
273
271
|
if (!l) {
|
|
274
|
-
if (
|
|
275
|
-
|
|
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
|
-
},
|
|
278
|
-
l ||
|
|
279
|
-
},
|
|
280
|
-
l || (
|
|
281
|
-
},
|
|
282
|
-
l || (
|
|
283
|
-
},
|
|
284
|
-
if (l || !
|
|
285
|
-
const
|
|
286
|
-
Math.abs(
|
|
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",
|
|
289
|
-
window.removeEventListener("wheel", m), window.removeEventListener("keydown",
|
|
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]),
|
|
292
|
+
}, [o, r, n, i, l, u]), $(() => {
|
|
292
293
|
if (!a) return;
|
|
293
|
-
const m = (
|
|
294
|
-
if (
|
|
295
|
-
const
|
|
296
|
-
|
|
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
|
-
}, [
|
|
304
|
-
},
|
|
305
|
-
|
|
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
|
|
314
|
+
function me({
|
|
314
315
|
children: r,
|
|
315
316
|
index: n,
|
|
316
317
|
active: i,
|
|
317
|
-
isHiddenFooter:
|
|
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 ||
|
|
328
|
+
filter: n === i || u ? "blur(0px)" : "blur(6px)"
|
|
328
329
|
},
|
|
329
330
|
children: r
|
|
330
331
|
}
|
|
331
332
|
);
|
|
332
333
|
}
|
|
333
|
-
const Ee =
|
|
334
|
+
const Ee = N(me);
|
|
334
335
|
function _e({
|
|
335
336
|
sectionsLen: r,
|
|
336
337
|
active: n,
|
|
337
338
|
goToSection: i,
|
|
338
|
-
direction:
|
|
339
|
+
direction: u = "right"
|
|
339
340
|
}) {
|
|
340
|
-
const a =
|
|
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:
|
|
347
|
-
left:
|
|
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
|
|
394
|
-
function
|
|
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
|
|
410
|
-
|
|
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:
|
|
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:
|
|
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
|
|
437
|
-
|
|
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 (
|
|
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
|
|
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
|
|
470
|
-
function
|
|
470
|
+
const Re = N(ge);
|
|
471
|
+
function re({
|
|
471
472
|
children: r,
|
|
472
473
|
onChange: n,
|
|
473
474
|
directionDots: i = "right",
|
|
474
|
-
enableContextMenu:
|
|
475
|
+
enableContextMenu: u = !0,
|
|
475
476
|
duration: a = 700,
|
|
476
477
|
closeOutside: l = !1,
|
|
477
478
|
disable: o = !1
|
|
478
479
|
}) {
|
|
479
|
-
const
|
|
480
|
-
(
|
|
481
|
-
),
|
|
482
|
-
(
|
|
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
|
-
|
|
485
|
+
ve(u), $(() => (be(_), () => {
|
|
485
486
|
}), [_]);
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
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
|
-
),
|
|
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(-${
|
|
511
|
-
transition:
|
|
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((
|
|
514
|
+
children: _.map((v, m) => /* @__PURE__ */ E.jsx(
|
|
514
515
|
Ee,
|
|
515
516
|
{
|
|
516
|
-
index:
|
|
517
|
-
active:
|
|
517
|
+
index: m,
|
|
518
|
+
active: x,
|
|
518
519
|
isHiddenFooter: g,
|
|
519
|
-
children:
|
|
520
|
+
children: v
|
|
520
521
|
},
|
|
521
|
-
|
|
522
|
+
m
|
|
522
523
|
))
|
|
523
524
|
}
|
|
524
525
|
),
|
|
525
|
-
|
|
526
|
+
w && /* @__PURE__ */ E.jsx(Re, { isHiddenFooter: g, children: R })
|
|
526
527
|
]
|
|
527
528
|
}
|
|
528
529
|
),
|
|
529
530
|
/* @__PURE__ */ E.jsx(
|
|
530
|
-
|
|
531
|
+
he,
|
|
531
532
|
{
|
|
532
|
-
sectionsLen:
|
|
533
|
-
active:
|
|
534
|
-
goToSection:
|
|
533
|
+
sectionsLen: T,
|
|
534
|
+
active: x,
|
|
535
|
+
goToSection: b,
|
|
535
536
|
direction: i
|
|
536
537
|
}
|
|
537
538
|
)
|
|
538
539
|
] });
|
|
539
540
|
}
|
|
540
|
-
|
|
541
|
-
|
|
541
|
+
re.Section = ee;
|
|
542
|
+
re.Footer = te;
|
|
542
543
|
export {
|
|
543
|
-
|
|
544
|
+
re as FullPage
|
|
544
545
|
};
|