Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

embla-carousel-auto-height

Package Overview
Dependencies
Maintainers
0
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embla-carousel-auto-height - npm Package Compare versions

Comparing version 8.3.0 to 8.3.1

3

cjs/embla-carousel-auto-height.cjs.js

@@ -31,5 +31,8 @@ 'use strict';

const selectedIndexes = slideRegistry[emblaApi.selectedScrollSnap()];
if (!selectedIndexes) return null;
return selectedIndexes.map(index => slideHeights[index]).reduce((a, b) => Math.max(a, b), 0);
}
function setContainerHeight() {
const height = highestInView();
if (height === null) return;
emblaApi.containerNode().style.height = `${highestInView()}px`;

@@ -36,0 +39,0 @@ }

6

cjs/package.json
{
"name": "embla-carousel-auto-height",
"version": "8.3.0",
"version": "8.3.1",
"author": "David Jerleke",

@@ -46,3 +46,3 @@ "description": "An auto height plugin for Embla Carousel",

"prettier": "2.8.8",
"rollup": "^4.1.5",
"rollup": "^4.22.4",
"ts-jest": "^29.1.1",

@@ -52,3 +52,3 @@ "typescript": "^5.2.2"

"peerDependencies": {
"embla-carousel": "8.3.0"
"embla-carousel": "8.3.1"
},

@@ -55,0 +55,0 @@ "main": "embla-carousel-auto-height.cjs.js",

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).EmblaCarouselAutoHeight=t()}(this,(function(){"use strict";function e(e={}){let t,n=[];const o=["select","slideFocus"];function i(){t.containerNode().style.height=`${function(){const{slideRegistry:e}=t.internalEngine();return e[t.selectedScrollSnap()].map((e=>n[e])).reduce(((e,t)=>Math.max(e,t)),0)}()}px`}return{name:"autoHeight",options:e,init:function(e){t=e;const{options:{axis:s},slideRects:l}=t.internalEngine();"y"!==s&&(n=l.map((e=>e.height)),o.forEach((e=>t.on(e,i))),i())},destroy:function(){o.forEach((e=>t.off(e,i)));const e=t.containerNode();e.style.height="",e.getAttribute("style")||e.removeAttribute("style")}}}return e.globalOptions=void 0,e}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).EmblaCarouselAutoHeight=t()}(this,(function(){"use strict";function e(e={}){let t,n=[];const o=["select","slideFocus"];function i(){const{slideRegistry:e}=t.internalEngine(),o=e[t.selectedScrollSnap()];return o?o.map((e=>n[e])).reduce(((e,t)=>Math.max(e,t)),0):null}function s(){null!==i()&&(t.containerNode().style.height=`${i()}px`)}return{name:"autoHeight",options:e,init:function(e){t=e;const{options:{axis:i},slideRects:l}=t.internalEngine();"y"!==i&&(n=l.map((e=>e.height)),o.forEach((e=>t.on(e,s))),s())},destroy:function(){o.forEach((e=>t.off(e,s)));const e=t.containerNode();e.style.height="",e.getAttribute("style")||e.removeAttribute("style")}}}return e.globalOptions=void 0,e}));

@@ -29,5 +29,8 @@ function AutoHeight(userOptions = {}) {

const selectedIndexes = slideRegistry[emblaApi.selectedScrollSnap()];
if (!selectedIndexes) return null;
return selectedIndexes.map(index => slideHeights[index]).reduce((a, b) => Math.max(a, b), 0);
}
function setContainerHeight() {
const height = highestInView();
if (height === null) return;
emblaApi.containerNode().style.height = `${highestInView()}px`;

@@ -34,0 +37,0 @@ }

{
"name": "embla-carousel-auto-height",
"version": "8.3.0",
"version": "8.3.1",
"author": "David Jerleke",

@@ -46,3 +46,3 @@ "description": "An auto height plugin for Embla Carousel",

"prettier": "2.8.8",
"rollup": "^4.1.5",
"rollup": "^4.22.4",
"ts-jest": "^29.1.1",

@@ -52,3 +52,3 @@ "typescript": "^5.2.2"

"peerDependencies": {
"embla-carousel": "8.3.0"
"embla-carousel": "8.3.1"
},

@@ -55,0 +55,0 @@ "module": "embla-carousel-auto-height.esm.js",

{
"name": "embla-carousel-auto-height",
"version": "8.3.0",
"version": "8.3.1",
"author": "David Jerleke",

@@ -57,3 +57,3 @@ "description": "An auto height plugin for Embla Carousel",

"prettier": "2.8.8",
"rollup": "^4.1.5",
"rollup": "^4.22.4",
"ts-jest": "^29.1.1",

@@ -63,3 +63,3 @@ "typescript": "^5.2.2"

"peerDependencies": {
"embla-carousel": "8.3.0"
"embla-carousel": "8.3.1"
},

@@ -66,0 +66,0 @@ "exports": {

@@ -112,6 +112,2 @@ <br />

<img src="https://avatars2.githubusercontent.com/u/3440094?s=120&v=4" title="wopian" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/mujahidfa">
<img src="https://avatars2.githubusercontent.com/u/17759705?s=120&v=4" title="mujahidfa" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/nikrowell">
<img src="https://avatars2.githubusercontent.com/u/260039?s=120&v=4" title="nikrowell" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/horseeyephil">

@@ -131,4 +127,8 @@ <img src="https://avatars2.githubusercontent.com/u/32337092?s=120&v=4" title="horseeyephil" width="50" height="50" style="max-width: 100%" />

<img src="https://avatars2.githubusercontent.com/u/48463809?s=120&v=4" title="S-Shingler" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/Yonom">
<img src="https://avatars2.githubusercontent.com/u/1394504?s=120&v=4" title="Yonom" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/smultar">
<img src="https://avatars2.githubusercontent.com/u/6223536?s=120&v=4" title="smultar" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/dev-suraj-kumar">
<img src="https://avatars2.githubusercontent.com/u/184739775?s=120&v=4" title="dev-suraj-kumar" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/tlo-johnson">

@@ -142,2 +142,6 @@ <img src="https://avatars2.githubusercontent.com/u/8763144?s=120&v=4" title="tlo-johnson" width="50" height="50" style="max-width: 100%" />

<img src="https://avatars2.githubusercontent.com/u/9334305?s=120&v=4" title="silllli" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/nikrowell">
<img src="https://avatars2.githubusercontent.com/u/260039?s=120&v=4" title="nikrowell" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/mujahidfa">
<img src="https://avatars2.githubusercontent.com/u/17759705?s=120&v=4" title="mujahidfa" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/romellem">

@@ -151,4 +155,2 @@ <img src="https://avatars2.githubusercontent.com/u/8504000?s=120&v=4" title="romellem" width="50" height="50" style="max-width: 100%" />

<img src="https://avatars2.githubusercontent.com/u/5265324?s=120&v=4" title="LiamMartens" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/JoshuaCrewe">
<img src="https://avatars2.githubusercontent.com/u/12238901?s=120&v=4" title="JoshuaCrewe" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/S1r-Lanzelot">

@@ -155,0 +157,0 @@ <img src="https://avatars2.githubusercontent.com/u/4487160?s=120&v=4" title="S1r-Lanzelot" width="50" height="50" style="max-width: 100%" />

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc