marquee-content 2.1.0 → 2.1.2
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/README.md +4 -10
- package/dist/index.js.map +1 -1
- package/dist/index.module.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,29 +2,23 @@
|
|
|
2
2
|
<br>
|
|
3
3
|
|
|
4
4
|
<h1>marquee-content</h1>
|
|
5
|
-
<p><sup>Infinite marquee animation with <a href="https://www.npmjs.com/package/gsap">GSAP</a></sup></p>
|
|
6
|
-
|
|
7
5
|
|
|
8
6
|
[](https://www.npmjs.com/package/marquee-content)
|
|
9
7
|
[](https://github.com/ux-ui-pro/marquee-content)
|
|
10
8
|
[](https://www.npmjs.org/package/marquee-content)
|
|
11
9
|
|
|
12
|
-
<
|
|
10
|
+
<p>A simple library for creating the running content effect, also known as marquee or ticker.<br>The library uses GSAP and Resize Observer to achieve the best performance results.</p>
|
|
11
|
+
<p><sup>1.2kB gzipped</sup></p>
|
|
13
12
|
<h3><a href="https://codepen.io/ux-ui/full/dygzqYm">Demo</a></h3>
|
|
14
13
|
|
|
15
14
|
</div>
|
|
16
15
|
<br>
|
|
17
16
|
|
|
18
17
|
### Installation
|
|
19
|
-
```
|
|
18
|
+
```
|
|
20
19
|
$ yarn add gsap
|
|
21
20
|
$ yarn add marquee-content
|
|
22
21
|
```
|
|
23
|
-
<sup>or</sup>
|
|
24
|
-
```javascript
|
|
25
|
-
$ npm i gsap
|
|
26
|
-
$ npm i marquee-content
|
|
27
|
-
```
|
|
28
22
|
|
|
29
23
|
<br>
|
|
30
24
|
|
|
@@ -62,4 +56,4 @@ new MarqueeContent()
|
|
|
62
56
|
<br>
|
|
63
57
|
|
|
64
58
|
### License
|
|
65
|
-
|
|
59
|
+
Marquee-content is released under MIT license.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAe,uDAA6B;IACxC,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,CAAC,KAAK,GAAG,OAAO;oBAChB,WAAW;oBACX,WAAW;gBACf;YACJ;YAEA,MAAM,gBAAgB;gBAClB,IAAI,gBAAgB,GAChB,kBAAkB;gBAEtB,MAAM,eAAe;oBACjB,IAAI,cAAc,AAAC,OAAO,cAAc,gBAAiB,IAAI;oBAE7D,IAAI,gBAAgB,iBAAiB;wBACjC,IAAI,CAAC,KAAK,GAAG,OAAO;4BAChB,WAAW;4BACX,WAAW;wBACf;wBAEA,kBAAkB;oBACtB;oBAEA,gBAAgB,OAAO;gBAC3B;gBAEA,iBAAiB,UAAU;oBACvB;gBACJ,GAAG;oBAAE,SAAS;oBAAM,SAAS;gBAAK;YACtC;YAEA,IAAI,CAAC,QAAQ,gBAAgB,QAAQ,iBACjC,IAAI,CAAC,QAAQ,gBAAgB,UAAS;YAG1C,OAAO;gBACH,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU;oBAAE,YAAY;gBAAK;YACpD;QACJ;IACJ;IAEA,SAAS;QACL,qBAAqB,IAAI,CAAC;QAE1B,IAAI,IAAI,CAAC,mBACL,IAAI,CAAC,KAAK,sBAAsB;YAC5B,IAAI,CAAC;YACL,IAAI,CAAC;QACT;IAER;IAEA,oBAAoB;QAChB,IAAI,CAAC;QACL,IAAI,CAAC;QACL,IAAI,CAAC;QACL,IAAI,CAAC;IACT;IAEA,uBAAuB;QACnB,qBAAqB,IAAI,CAAC;IAC9B;AACJ;AAEA,eAAe,IAAI,sBAAsB,eAAe,OAAO,mBAAmB","sources":["src/index.js"],"sourcesContent":["export default class MarqueeContent extends HTMLElement {\n constructor() {\n super()\n\n this.gsap = MarqueeContent.gsap || window.gsap\n this.MM = this.gsap.matchMedia()\n this.breakpoint = this.dataset.mcMax\n ? `(max-width: ${this.dataset.mcMax - 0.02}px)`\n : this.dataset.mcMin\n ? `(min-width: ${this.dataset.mcMin}px)`\n : ''\n\n this.update = this.update.bind(this)\n this.resizeObserver = new ResizeObserver(this.debounce(this.update.bind(this), 150))\n this.resizeObserver.observe(this)\n }\n\n static registerGSAP(gsap) {\n MarqueeContent.gsap = gsap\n }\n\n debounce(fn, delay) {\n let timer\n\n return (...args) => {\n if (timer) clearTimeout(timer)\n timer = setTimeout(() => fn(...args), delay)\n }\n }\n\n templates() {\n const wrapper = document.createElement('div')\n wrapper.classList.add('marquee-wrapper')\n\n const inner = document.createElement('div')\n inner.classList.add('marquee-inner')\n inner.style.display = 'inline-block'\n inner.style.whiteSpace = 'nowrap'\n\n while (this.firstChild) {\n inner.appendChild(this.firstChild)\n }\n\n wrapper.appendChild(inner)\n this.appendChild(wrapper)\n }\n\n cloning() {\n const removingClones = () => {\n while (this.childElementCount > 1) {\n this.removeChild(this.lastChild)\n }\n }\n\n removingClones()\n\n this.MM.add(this.breakpoint, () => {\n let requiredQuantity = Math.ceil(this.scrollWidth / this.firstElementChild.clientWidth + 2)\n\n if (this.childElementCount < requiredQuantity) {\n for (let i = 1; i < requiredQuantity; i++) {\n let cloned = this.firstElementChild\n let clone = cloned.cloneNode(true)\n cloned.parentNode.append(clone)\n }\n }\n\n return () => {\n removingClones()\n }\n })\n }\n\n skewed() {\n if (!this.dataset.mcSkew) return\n\n const abs = Math.abs(parseInt(this.dataset.mcSkew))\n const style = this.style\n\n this.MM.add(this.breakpoint, () => {\n style.transformOrigin = 'center center'\n style.transform = `skew(0deg, ${this.dataset.mcSkew}deg)`\n style.minHeight = `calc(${abs * 1.25}vh + ${abs * 1.25}vw)`\n\n return () => {\n style.cssText = 'transform-origin: unset; transform: unset; min-height: unset;'\n }\n })\n }\n\n animation() {\n let timeLine = this.gsap.timeline()\n\n timeLine.kill()\n timeLine = null\n\n this.gsap.set(this.children, { clearProps: true })\n\n this.MM.add(this.breakpoint, () => {\n this.gsap.set(this.children, { 'will-change': 'transform' })\n\n const tween = this.gsap.to(this.children, {\n duration: this.dataset.mcDuration || 20,\n x: '-100%',\n ease: 'none',\n repeat: -1,\n scrollTrigger: {\n trigger: this,\n start: '-=50% bottom',\n end: 'bottom top',\n toggleActions: 'resume pause resume pause'\n },\n }).totalProgress(0.5)\n\n const ltrDirection = () => {\n this.gsap.to(tween, {\n timeScale: -1,\n overwrite: true\n })\n }\n\n const autoDirection = () => {\n let currentScroll = 0,\n scrollDirection = 1\n\n const handleScroll = () => {\n let orientation = (window.pageYOffset > currentScroll) ? 1 : -1\n\n if (orientation !== scrollDirection) {\n this.gsap.to(tween, {\n timeScale: orientation,\n overwrite: true\n })\n\n scrollDirection = orientation\n }\n\n currentScroll = window.pageYOffset\n }\n\n addEventListener('scroll', () => {\n handleScroll()\n }, { capture: true, passive: true })\n }\n\n this.dataset.mcDirection === 'ltr' ? ltrDirection() :\n this.dataset.mcDirection === 'auto' ? autoDirection() :\n null\n\n return () => {\n this.gsap.set(this.children, { clearProps: true })\n }\n })\n }\n\n update() {\n cancelAnimationFrame(this.af)\n\n if (this.firstElementChild) {\n this.af = requestAnimationFrame(() => {\n this.cloning()\n this.animation()\n })\n }\n }\n\n connectedCallback() {\n this.templates()\n this.skewed()\n this.cloning()\n this.animation()\n }\n\n disconnectedCallback() {\n cancelAnimationFrame(this.af)\n }\n}\n\ncustomElements.get('marquee-content') || customElements.define('marquee-content', MarqueeContent)"],"names":[],"version":3,"file":"index.js.map"}
|
package/dist/index.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAAe,uDAA6B;IACxC,aAAc;QACV,KAAK;QAEL,IAAI,CAAC,
|
|
1
|
+
{"mappings":"AAAe,uDAA6B;IACxC,aAAc;QACV,KAAK;QAEL,IAAI,CAAC,OAAO,yCAAe,QAAQ,OAAO;QAC1C,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK;QACpB,IAAI,CAAC,aAAa,IAAI,CAAC,QAAQ,QACzB,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,QAAQ,KAAK,GAAG,CAAC,GAC7C,IAAI,CAAC,QAAQ,QACb,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,MAAM,GA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AAG;oBAAE,SAAS;oBAAM,SAAS;gBAAK;YACtC;YAEA,IAAI,CAAC,QAAQ,gBAAgB,QAAQ,iBACjC,IAAI,CAAC,QAAQ,gBAAgB,UAAS;YAG1C,OAAO;gBACH,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU;oBAAE,YAAY;gBAAK;YACpD;QACJ;IACJ;IAEA,SAAS;QACL,qBAAqB,IAAI,CAAC;QAE1B,IAAI,IAAI,CAAC,mBACL,IAAI,CAAC,KAAK,sBAAsB;YAC5B,IAAI,CAAC;YACL,IAAI,CAAC;QACT;IAER;IAEA,oBAAoB;QAChB,IAAI,CAAC;QACL,IAAI,CAAC;QACL,IAAI,CAAC;QACL,IAAI,CAAC;IACT;IAEA,uBAAuB;QACnB,qBAAqB,IAAI,CAAC;IAC9B;AACJ;AAEA,eAAe,IAAI,sBAAsB,eAAe,OAAO,mBAAmB","sources":["src/index.js"],"sourcesContent":["export default class MarqueeContent extends HTMLElement {\n constructor() {\n super()\n\n this.gsap = MarqueeContent.gsap || window.gsap\n this.MM = this.gsap.matchMedia()\n this.breakpoint = this.dataset.mcMax\n ? `(max-width: ${this.dataset.mcMax - 0.02}px)`\n : this.dataset.mcMin\n ? `(min-width: ${this.dataset.mcMin}px)`\n : ''\n\n this.update = this.update.bind(this)\n this.resizeObserver = new ResizeObserver(this.debounce(this.update.bind(this), 150))\n this.resizeObserver.observe(this)\n }\n\n static registerGSAP(gsap) {\n MarqueeContent.gsap = gsap\n }\n\n debounce(fn, delay) {\n let timer\n\n return (...args) => {\n if (timer) clearTimeout(timer)\n timer = setTimeout(() => fn(...args), delay)\n }\n }\n\n templates() {\n const wrapper = document.createElement('div')\n wrapper.classList.add('marquee-wrapper')\n\n const inner = document.createElement('div')\n inner.classList.add('marquee-inner')\n inner.style.display = 'inline-block'\n inner.style.whiteSpace = 'nowrap'\n\n while (this.firstChild) {\n inner.appendChild(this.firstChild)\n }\n\n wrapper.appendChild(inner)\n this.appendChild(wrapper)\n }\n\n cloning() {\n const removingClones = () => {\n while (this.childElementCount > 1) {\n this.removeChild(this.lastChild)\n }\n }\n\n removingClones()\n\n this.MM.add(this.breakpoint, () => {\n let requiredQuantity = Math.ceil(this.scrollWidth / this.firstElementChild.clientWidth + 2)\n\n if (this.childElementCount < requiredQuantity) {\n for (let i = 1; i < requiredQuantity; i++) {\n let cloned = this.firstElementChild\n let clone = cloned.cloneNode(true)\n cloned.parentNode.append(clone)\n }\n }\n\n return () => {\n removingClones()\n }\n })\n }\n\n skewed() {\n if (!this.dataset.mcSkew) return\n\n const abs = Math.abs(parseInt(this.dataset.mcSkew))\n const style = this.style\n\n this.MM.add(this.breakpoint, () => {\n style.transformOrigin = 'center center'\n style.transform = `skew(0deg, ${this.dataset.mcSkew}deg)`\n style.minHeight = `calc(${abs * 1.25}vh + ${abs * 1.25}vw)`\n\n return () => {\n style.cssText = 'transform-origin: unset; transform: unset; min-height: unset;'\n }\n })\n }\n\n animation() {\n let timeLine = this.gsap.timeline()\n\n timeLine.kill()\n timeLine = null\n\n this.gsap.set(this.children, { clearProps: true })\n\n this.MM.add(this.breakpoint, () => {\n this.gsap.set(this.children, { 'will-change': 'transform' })\n\n const tween = this.gsap.to(this.children, {\n duration: this.dataset.mcDuration || 20,\n x: '-100%',\n ease: 'none',\n repeat: -1,\n scrollTrigger: {\n trigger: this,\n start: '-=50% bottom',\n end: 'bottom top',\n toggleActions: 'resume pause resume pause'\n },\n }).totalProgress(0.5)\n\n const ltrDirection = () => {\n this.gsap.to(tween, {\n timeScale: -1,\n overwrite: true\n })\n }\n\n const autoDirection = () => {\n let currentScroll = 0,\n scrollDirection = 1\n\n const handleScroll = () => {\n let orientation = (window.pageYOffset > currentScroll) ? 1 : -1\n\n if (orientation !== scrollDirection) {\n this.gsap.to(tween, {\n timeScale: orientation,\n overwrite: true\n })\n\n scrollDirection = orientation\n }\n\n currentScroll = window.pageYOffset\n }\n\n addEventListener('scroll', () => {\n handleScroll()\n }, { capture: true, passive: true })\n }\n\n this.dataset.mcDirection === 'ltr' ? ltrDirection() :\n this.dataset.mcDirection === 'auto' ? autoDirection() :\n null\n\n return () => {\n this.gsap.set(this.children, { clearProps: true })\n }\n })\n }\n\n update() {\n cancelAnimationFrame(this.af)\n\n if (this.firstElementChild) {\n this.af = requestAnimationFrame(() => {\n this.cloning()\n this.animation()\n })\n }\n }\n\n connectedCallback() {\n this.templates()\n this.skewed()\n this.cloning()\n this.animation()\n }\n\n disconnectedCallback() {\n cancelAnimationFrame(this.af)\n }\n}\n\ncustomElements.get('marquee-content') || customElements.define('marquee-content', MarqueeContent)"],"names":[],"version":3,"file":"index.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marquee-content",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Infinite marquee animation with GSAP",
|
|
5
5
|
"author": "ux-ui.pro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"clean": "rm -rf dist .parcel-cache"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"parcel": "
|
|
23
|
+
"parcel": "~2.9.2"
|
|
24
24
|
},
|
|
25
25
|
"keywords": [
|
|
26
26
|
"marquee",
|