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

img-comparison-slider

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-comparison-slider - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

dist/cjs/chunk-05d3cc2d.js

11

dist/cjs/img-comparison-slider.cjs.entry.js

@@ -5,3 +5,3 @@ 'use strict';

const __chunk_1 = require('./chunk-2fa2c66e.js');
const __chunk_1 = require('./chunk-05d3cc2d.js');

@@ -27,2 +27,9 @@ const inBetween = (actual, min, max) => {

}
componentWillLoad() {
this.el.querySelectorAll('img').forEach(img => {
img.addEventListener('dragstart', (e) => {
e.preventDefault();
});
});
}
componentDidRender() {

@@ -105,5 +112,5 @@ this.slide(0);

get el() { return __chunk_1.getElement(this); }
static get style() { return ":host{--divider-color:#dedede;--divider-color-focus:#fbfbfb;--divider-width:1px;--hint-size:40px;--hint-bg-color:#d7d7d7;--hint-border:1px solid #d7d7d7;--hint-opacity:0.5;--hint-opacity-hover:0;position:relative;display:inline-block;font-size:0;overflow:hidden;outline:none}:host(:focus) .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}:host(:hover) .hint{opacity:0}::slotted(img){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none}.component:hover .hint{opacity:var(--hint-opacity-hover)}.hint{position:absolute;width:var(--hint-size);height:var(--hint-size);background-color:var(--hint-bg-color);top:50%;margin-top:calc(var(--hint-size) / (-2));margin-left:calc(var(--hint-size) / (-2));-webkit-transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,transform 1s;transition:opacity 1s,transform 1s,-webkit-transform 1s;border:var(--hint-border);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 15px 0 rgba(0,0,0,.75);box-shadow:0 0 15px 0 rgba(0,0,0,.75);pointer-events:none;opacity:var(--hint-opacity);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.focused .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}.after{position:absolute;left:0;top:0;bottom:0;overflow:hidden;border-right:var(--hint-border)}"; }
static get style() { return ":host{--divider-color:#dedede;--divider-color-focus:#fbfbfb;--divider-width:1px;--hint-size:40px;--hint-bg-color:#d7d7d7;--hint-border:1px solid #d7d7d7;--hint-opacity:0.5;--hint-opacity-hover:0;position:relative;display:inline-block;font-size:0;overflow:hidden}:host(:hover) .hint{opacity:0}::slotted(img){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.component:hover .hint{opacity:var(--hint-opacity-hover)}.hint{position:absolute;width:var(--hint-size);height:var(--hint-size);background-color:var(--hint-bg-color);top:50%;margin-top:calc(var(--hint-size) / (-2));margin-left:calc(var(--hint-size) / (-2));-webkit-transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,transform 1s;transition:opacity 1s,transform 1s,-webkit-transform 1s;border:var(--hint-border);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 15px 0 rgba(0,0,0,.75);box-shadow:0 0 15px 0 rgba(0,0,0,.75);pointer-events:none;opacity:var(--hint-opacity);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.focused .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}.after{position:absolute;left:0;top:0;bottom:0;overflow:hidden;border-right:var(--hint-border)}"; }
}
exports.img_comparison_slider = ImgComparisonSlider;

2

dist/cjs/img-comparison-slider.cjs.js
'use strict';
const __chunk_1 = require('./chunk-2fa2c66e.js');
const __chunk_1 = require('./chunk-05d3cc2d.js');

@@ -5,0 +5,0 @@ __chunk_1.patchBrowser().then(resourcesUrl => {

@@ -5,3 +5,3 @@ 'use strict';

const __chunk_1 = require('./chunk-2fa2c66e.js');
const __chunk_1 = require('./chunk-05d3cc2d.js');

@@ -8,0 +8,0 @@ const defineCustomElements = (win, options) => {

@@ -20,2 +20,9 @@ import { h } from '@stencil/core';

}
componentWillLoad() {
this.el.querySelectorAll('img').forEach(img => {
img.addEventListener('dragstart', (e) => {
e.preventDefault();
});
});
}
componentDidRender() {

@@ -22,0 +29,0 @@ this.slide(0);

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

import { r as registerInstance, h, g as getElement } from './chunk-a29885d4.js';
import { r as registerInstance, h, g as getElement } from './chunk-c80858ad.js';

@@ -22,2 +22,9 @@ const inBetween = (actual, min, max) => {

}
componentWillLoad() {
this.el.querySelectorAll('img').forEach(img => {
img.addEventListener('dragstart', (e) => {
e.preventDefault();
});
});
}
componentDidRender() {

@@ -100,5 +107,5 @@ this.slide(0);

get el() { return getElement(this); }
static get style() { return ":host{--divider-color:#dedede;--divider-color-focus:#fbfbfb;--divider-width:1px;--hint-size:40px;--hint-bg-color:#d7d7d7;--hint-border:1px solid #d7d7d7;--hint-opacity:0.5;--hint-opacity-hover:0;position:relative;display:inline-block;font-size:0;overflow:hidden;outline:none}:host(:focus) .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}:host(:hover) .hint{opacity:0}::slotted(img){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none}.component:hover .hint{opacity:var(--hint-opacity-hover)}.hint{position:absolute;width:var(--hint-size);height:var(--hint-size);background-color:var(--hint-bg-color);top:50%;margin-top:calc(var(--hint-size) / (-2));margin-left:calc(var(--hint-size) / (-2));-webkit-transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,transform 1s;transition:opacity 1s,transform 1s,-webkit-transform 1s;border:var(--hint-border);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 15px 0 rgba(0,0,0,.75);box-shadow:0 0 15px 0 rgba(0,0,0,.75);pointer-events:none;opacity:var(--hint-opacity);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.focused .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}.after{position:absolute;left:0;top:0;bottom:0;overflow:hidden;border-right:var(--hint-border)}"; }
static get style() { return ":host{--divider-color:#dedede;--divider-color-focus:#fbfbfb;--divider-width:1px;--hint-size:40px;--hint-bg-color:#d7d7d7;--hint-border:1px solid #d7d7d7;--hint-opacity:0.5;--hint-opacity-hover:0;position:relative;display:inline-block;font-size:0;overflow:hidden}:host(:hover) .hint{opacity:0}::slotted(img){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.component:hover .hint{opacity:var(--hint-opacity-hover)}.hint{position:absolute;width:var(--hint-size);height:var(--hint-size);background-color:var(--hint-bg-color);top:50%;margin-top:calc(var(--hint-size) / (-2));margin-left:calc(var(--hint-size) / (-2));-webkit-transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,transform 1s;transition:opacity 1s,transform 1s,-webkit-transform 1s;border:var(--hint-border);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 15px 0 rgba(0,0,0,.75);box-shadow:0 0 15px 0 rgba(0,0,0,.75);pointer-events:none;opacity:var(--hint-opacity);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.focused .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}.after{position:absolute;left:0;top:0;bottom:0;overflow:hidden;border-right:var(--hint-border)}"; }
}
export { ImgComparisonSlider as img_comparison_slider };

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

import { r as registerInstance, h, g as getElement } from './chunk-a29885d4.js';
import { r as registerInstance, h, g as getElement } from './chunk-c80858ad.js';
var inBetween = function (actual, min, max) {

@@ -21,2 +21,9 @@ if (actual < min) {

}
ImgComparisonSlider.prototype.componentWillLoad = function () {
this.el.querySelectorAll('img').forEach(function (img) {
img.addEventListener('dragstart', function (e) {
e.preventDefault();
});
});
};
ImgComparisonSlider.prototype.componentDidRender = function () {

@@ -107,3 +114,3 @@ this.slide(0);

Object.defineProperty(ImgComparisonSlider, "style", {
get: function () { return ":host{--divider-color:#dedede;--divider-color-focus:#fbfbfb;--divider-width:1px;--hint-size:40px;--hint-bg-color:#d7d7d7;--hint-border:1px solid #d7d7d7;--hint-opacity:0.5;--hint-opacity-hover:0;position:relative;display:inline-block;font-size:0;overflow:hidden;outline:none}:host(:focus) .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}:host(:hover) .hint{opacity:0}::slotted(img){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none}.component:hover .hint{opacity:var(--hint-opacity-hover)}.hint{position:absolute;width:var(--hint-size);height:var(--hint-size);background-color:var(--hint-bg-color);top:50%;margin-top:calc(var(--hint-size) / (-2));margin-left:calc(var(--hint-size) / (-2));-webkit-transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,transform 1s;transition:opacity 1s,transform 1s,-webkit-transform 1s;border:var(--hint-border);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 15px 0 rgba(0,0,0,.75);box-shadow:0 0 15px 0 rgba(0,0,0,.75);pointer-events:none;opacity:var(--hint-opacity);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.focused .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}.after{position:absolute;left:0;top:0;bottom:0;overflow:hidden;border-right:var(--hint-border)}"; },
get: function () { return ":host{--divider-color:#dedede;--divider-color-focus:#fbfbfb;--divider-width:1px;--hint-size:40px;--hint-bg-color:#d7d7d7;--hint-border:1px solid #d7d7d7;--hint-opacity:0.5;--hint-opacity-hover:0;position:relative;display:inline-block;font-size:0;overflow:hidden}:host(:hover) .hint{opacity:0}::slotted(img){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.component:hover .hint{opacity:var(--hint-opacity-hover)}.hint{position:absolute;width:var(--hint-size);height:var(--hint-size);background-color:var(--hint-bg-color);top:50%;margin-top:calc(var(--hint-size) / (-2));margin-left:calc(var(--hint-size) / (-2));-webkit-transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,-webkit-transform 1s;transition:opacity 1s,transform 1s;transition:opacity 1s,transform 1s,-webkit-transform 1s;border:var(--hint-border);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 15px 0 rgba(0,0,0,.75);box-shadow:0 0 15px 0 rgba(0,0,0,.75);pointer-events:none;opacity:var(--hint-opacity);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.focused .hint{-webkit-transform:rotate(45deg) scale(1.5);transform:rotate(45deg) scale(1.5)}.after{position:absolute;left:0;top:0;bottom:0;overflow:hidden;border-right:var(--hint-border)}"; },
enumerable: true,

@@ -110,0 +117,0 @@ configurable: true

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

import{p as o,b as e}from"./p-13b0f39b.js";o().then(o=>e([["p-pnvlrzcn",[[1,"img-comparison-slider",null,[[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"],[1,"touchstart","onMouseDown"],[1,"mousedown","onMouseDown"],[1,"touchend","onMouseUp"],[9,"mouseup","onMouseUp"],[1,"mousemove","onMouseMove"],[1,"touchmove","onMouseMove"],[0,"blur","onBlur"],[9,"resize","updateAfterWidth"]]]]]],{resourcesUrl:o}));
import{p as o,b as e}from"./p-93780b43.js";o().then(o=>e([["p-nwvybykt",[[1,"img-comparison-slider",null,[[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"],[1,"touchstart","onMouseDown"],[1,"mousedown","onMouseDown"],[1,"touchend","onMouseUp"],[9,"mouseup","onMouseUp"],[1,"mousemove","onMouseMove"],[1,"touchmove","onMouseMove"],[0,"blur","onBlur"],[9,"resize","updateAfterWidth"]]]]]],{resourcesUrl:o}));

@@ -12,2 +12,3 @@ export declare class ImgComparisonSlider {

private animationRequestId;
componentWillLoad(): void;
componentDidRender(): void;

@@ -14,0 +15,0 @@ slide(increment?: number): void;

{
"name": "img-comparison-slider",
"version": "1.1.0",
"version": "1.1.1",
"description": "Stencil Component Starter",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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