Skip to content

Commit

Permalink
bump xtendui
Browse files Browse the repository at this point in the history
  • Loading branch information
minimit committed Aug 2, 2021
1 parent 3081f41 commit 4feb7fc
Show file tree
Hide file tree
Showing 21 changed files with 461 additions and 231 deletions.
2 changes: 1 addition & 1 deletion encore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dependencies": {
"gsap": "^3.7.0",
"tailwindcss": "^2.2.4",
"xtendui": "^1.0.0-beta.33"
"xtendui": "^1.0.0-beta.38"
},
"devDependencies": {
"@babel/core": "^7.14.6",
Expand Down
44 changes: 12 additions & 32 deletions encore/src/scripts/_setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,6 @@ import gsap from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
gsap.registerPlugin(ScrollTrigger)

/* custom easing */

import bezierEasing from 'bezier-easing'

gsap.registerEase('in', progress => {
const easing = bezierEasing(1, 0, 1, 0.5)
return easing(progress)
})

gsap.registerEase('out', progress => {
const easing = bezierEasing(0, 1, 0.5, 1)
return easing(progress)
})

gsap.registerEase('inOut', progress => {
const easing = bezierEasing(1, 0, 0, 1)
return easing(progress)
})

/* animation */

gsap.config({ force3D: false }) // smoother pixels animations
Expand All @@ -48,18 +29,17 @@ addEventListener('wheel', stopScrolling)

/* ScrollTrigger fix Xt.mount inside pin items and no refresh on vertical resize */

Xt.ready(() => {
ScrollTrigger.config({
// removed resize we trigger it manually
autoRefreshEvents: 'visibilitychange,DOMContentLoaded,load',
})
addEventListener('resize', e => {
Xt.eventDelay({
event: e,
prefix: 'xtScrollTriggerRefresh',
func: () => {
ScrollTrigger.refresh()
},
})
ScrollTrigger.config({
// removed resize we trigger it manually
autoRefreshEvents: 'visibilitychange,DOMContentLoaded,load',
})

addEventListener('resize', e => {
Xt.eventDelay({
event: e,
ns: 'xtScrollTriggerRefresh',
func: () => {
ScrollTrigger.refresh()
},
})
})
90 changes: 77 additions & 13 deletions encore/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ clone-deep@^4.0.1:
kind-of "^6.0.2"
shallow-clone "^3.0.0"

color-convert@^1.9.0, color-convert@^1.9.1:
color-convert@^1.9.0, color-convert@^1.9.1, color-convert@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
dependencies:
Expand All @@ -1469,13 +1469,27 @@ color-string@^1.5.4:
color-name "^1.0.0"
simple-swizzle "^0.2.2"

color-string@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312"
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"

color@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e"
dependencies:
color-convert "^1.9.1"
color-string "^1.5.4"

color@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164"
dependencies:
color-convert "^1.9.3"
color-string "^1.6.0"

colord@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/colord/-/colord-2.0.1.tgz#1e7fb1f9fa1cf74f42c58cb9c20320bab8435aa0"
Expand Down Expand Up @@ -1859,6 +1873,10 @@ didyoumean@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff"

didyoumean@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037"

dir-glob@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
Expand Down Expand Up @@ -2122,6 +2140,16 @@ fast-glob@^3.1.1, fast-glob@^3.2.5:
micromatch "^4.0.2"
picomatch "^2.2.1"

fast-glob@^3.2.7:
version "3.2.7"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
Expand Down Expand Up @@ -2194,9 +2222,9 @@ find-up@^4.0.0:
locate-path "^5.0.0"
path-exists "^4.0.0"

focus-trap@^6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-6.5.1.tgz#2d2bb91198f17e8bc52070f1fb48ac36be4230b5"
focus-trap@^6.6.0:
version "6.6.0"
resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-6.6.0.tgz#7fb37679926ec1bd762d0748b056c68a64a9e8cf"
dependencies:
tabbable "^5.2.0"

Expand Down Expand Up @@ -2256,7 +2284,7 @@ get-stream@^6.0.0:
version "6.0.1"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"

glob-parent@^5.1.0, glob-parent@~5.1.2:
glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
dependencies:
Expand Down Expand Up @@ -2312,7 +2340,7 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4,
version "4.2.6"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"

gsap@^3.6.1, gsap@^3.7.0:
gsap@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/gsap/-/gsap-3.7.0.tgz#ebadf467898ddf25011030090f0399cb0e292309"

Expand Down Expand Up @@ -2891,7 +2919,7 @@ methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"

micromatch@^4.0.2:
micromatch@^4.0.2, micromatch@^4.0.4:
version "4.0.4"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
dependencies:
Expand Down Expand Up @@ -4175,6 +4203,42 @@ tailwindcss@^2.2.4:
resolve "^1.20.0"
tmp "^0.2.1"

tailwindcss@^2.2.7:
version "2.2.7"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-2.2.7.tgz#795d07a14ef46c2dc4a1610f7f906f697daaf731"
dependencies:
arg "^5.0.0"
bytes "^3.0.0"
chalk "^4.1.1"
chokidar "^3.5.2"
color "^3.2.0"
cosmiconfig "^7.0.0"
detective "^5.2.0"
didyoumean "^1.2.2"
dlv "^1.1.3"
fast-glob "^3.2.7"
fs-extra "^10.0.0"
glob-parent "^6.0.0"
html-tags "^3.1.0"
is-glob "^4.0.1"
lodash "^4.17.21"
lodash.topath "^4.5.2"
modern-normalize "^1.1.0"
node-emoji "^1.8.1"
normalize-path "^3.0.0"
object-hash "^2.2.0"
postcss-js "^3.0.3"
postcss-load-config "^3.1.0"
postcss-nested "5.0.5"
postcss-selector-parser "^6.0.6"
postcss-value-parser "^4.1.0"
pretty-hrtime "^1.0.3"
purgecss "^4.0.3"
quick-lru "^5.1.1"
reduce-css-calc "^2.1.8"
resolve "^1.20.0"
tmp "^0.2.1"

tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b"
Expand Down Expand Up @@ -4486,16 +4550,16 @@ xtend@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"

xtendui@^1.0.0-beta.33:
version "1.0.0-beta.33"
resolved "https://registry.yarnpkg.com/xtendui/-/xtendui-1.0.0-beta.33.tgz#11cd84787bbd37718513c2e7371af48d2fb9c01e"
xtendui@^1.0.0-beta.38:
version "1.0.0-beta.38"
resolved "https://registry.yarnpkg.com/xtendui/-/xtendui-1.0.0-beta.38.tgz#7e36f5527856886654aa00a60e7be5afa34331d3"
dependencies:
"@googlemaps/markerclustererplus" "^1.2.0"
"@popperjs/core" "^2.9.2"
focus-trap "^6.5.1"
gsap "^3.6.1"
focus-trap "^6.6.0"
gsap "^3.7.0"
relaxed-json "^1.0.3"
tailwindcss "^2.2.4"
tailwindcss "^2.2.7"

yallist@^4.0.0:
version "4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion gulp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"gulp-clean": "^0.4.0",
"gulp-postcss": "^9.0.0",
"tailwindcss": "^2.2.4",
"xtendui": "^1.0.0-beta.33"
"xtendui": "^1.0.0-beta.38"
},
"devDependencies": {
"@babel/core": "^7.14.6",
Expand Down
44 changes: 12 additions & 32 deletions gulp/src/scripts/_setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,6 @@ import gsap from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
gsap.registerPlugin(ScrollTrigger)

/* custom easing */

import bezierEasing from 'bezier-easing'

gsap.registerEase('in', progress => {
const easing = bezierEasing(1, 0, 1, 0.5)
return easing(progress)
})

gsap.registerEase('out', progress => {
const easing = bezierEasing(0, 1, 0.5, 1)
return easing(progress)
})

gsap.registerEase('inOut', progress => {
const easing = bezierEasing(1, 0, 0, 1)
return easing(progress)
})

/* animation */

gsap.config({ force3D: false }) // smoother pixels animations
Expand All @@ -48,18 +29,17 @@ addEventListener('wheel', stopScrolling)

/* ScrollTrigger fix Xt.mount inside pin items and no refresh on vertical resize */

Xt.ready(() => {
ScrollTrigger.config({
// removed resize we trigger it manually
autoRefreshEvents: 'visibilitychange,DOMContentLoaded,load',
})
addEventListener('resize', e => {
Xt.eventDelay({
event: e,
prefix: 'xtScrollTriggerRefresh',
func: () => {
ScrollTrigger.refresh()
},
})
ScrollTrigger.config({
// removed resize we trigger it manually
autoRefreshEvents: 'visibilitychange,DOMContentLoaded,load',
})

addEventListener('resize', e => {
Xt.eventDelay({
event: e,
ns: 'xtScrollTriggerRefresh',
func: () => {
ScrollTrigger.refresh()
},
})
})
Loading

0 comments on commit 4feb7fc

Please sign in to comment.