New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@deckdeckgo/slide-big-img

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deckdeckgo/slide-big-img - npm Package Compare versions

Comparing version 1.1.2 to 2.0.0

dist/cjs/index-13ec3223.js

6

CHANGELOG.md

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

# 2.0.0 (2020-09-03)
### Breaking Changes
- E11, Edge 16-18 and Safari 10 not supported
# 1.1.2 (2020-07-12)

@@ -2,0 +8,0 @@

17

dist/cjs/deckdeckgo-slide-big-img.cjs.js
'use strict';
const index = require('./index-1a8687fa.js');
const patch = require('./patch-36c81db1.js');
const index = require('./index-13ec3223.js');
patch.patchBrowser().then(options => {
/*
Stencil Client Patch Browser v2.0.2 | MIT Licensed | https://stenciljs.com
*/
const patchBrowser = () => {
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('deckdeckgo-slide-big-img.cjs.js', document.baseURI).href));
const opts = {};
if ( importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;
}
return index.promiseResolve(opts);
};
patchBrowser().then(options => {
return index.bootstrapLazy([["deckgo-slide-big-img.cjs",[[1,"deckgo-slide-big-img",{"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"imgDivisions":[1,"img-divisions"],"axis":[1],"reverse":[4],"beforeSwipe":[64],"afterSwipe":[64],"lazyLoadContent":[64],"revealContent":[64],"hideContent":[64]}]]]], options);
});

230

dist/cjs/deckgo-slide-big-img.cjs.entry.js

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

const index = require('./index-1a8687fa.js');
const index = require('./index-13ec3223.js');

@@ -147,124 +147,124 @@ function lazyLoadComponentContent(el, tag) {

const deckdeckgoSlideBigImgCss = ":host{position:relative;background:var(--background);color:var(--color);height:100%;z-index:var(--zIndex, 1);--slide-padding-top-default:64px;--slide-padding-end-default:64px;--slide-padding-bottom-default:64px;--slide-padding-start-default:64px}@media screen and (max-width: 1024px){:host{--slide-padding-top-default:32px;--slide-padding-end-default:32px;--slide-padding-bottom-default:32px;--slide-padding-start-default:32px}}div.deckgo-slide{display:-ms-flexbox;display:flex;padding:var(--slide-padding-top, var(--slide-padding-top-default)) var(--slide-padding-end, var(--slide-padding-end-default)) var(--slide-padding-bottom, var(--slide-padding-bottom-default)) var(--slide-padding-start, var(--slide-padding-start-default));width:calc(var(--slide-width) - var(--slide-padding-start, var(--slide-padding-start-default)) - var(--slide-padding-end, var(--slide-padding-end-default)));height:calc( var(--slide-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );-webkit-touch-callout:var(--slide-user-select, none);-webkit-user-select:var(--slide-user-select, none);-moz-user-select:var(--slide-user-select, none);-ms-user-select:var(--slide-user-select, none);user-select:var(--slide-user-select, none);user-drag:none;-webkit-user-drag:none}@media print{div.deckgo-slide{padding:0;page-break-after:always;height:100vh}::slotted([slot=actions]){display:none}::slotted([slot=background]){display:var(--slide-background-print-display, none)}}::slotted(ul),::slotted(ol){-webkit-padding-start:var(--slide-padding-start, var(--slide-padding-start-default));padding-inline-start:var(--slide-padding-start, var(--slide-padding-start-default))}::slotted([slot=notes]){display:none}::slotted([slot=actions]){position:absolute;top:var(--slide-actions-top, 16px);right:var(--slide-actions-end, 32px);left:var(--slide-actions-start);display:var(--slide-actions-display);z-index:var(--slide-actions-z-index)}::slotted([slot=background]){position:var(--slide-background-position, absolute);top:var(--slide-background-top, 0);right:var(--slide-background-end);left:var(--slide-background-start, 0);width:var(--slide-background-width);height:var(--slide-background-height);z-index:-2;pointer-events:none}::slotted([slot=header]),::slotted([slot=footer]){position:absolute;left:0;width:var(--slide-width);height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;z-index:var(--slide-header-footer-z-index, -1)}::slotted([slot=header]){top:0;width:calc(var(--slide-width) - var(--slide-header-margin-start, 32px) - var(--slide-header-margin-end, 32px));max-height:var(--slide-header-max-height, 48px);-ms-flex-pack:var(--slide-header-justify-content, flex-start);justify-content:var(--slide-header-justify-content, flex-start);margin:var(--slide-header-margin-top, 16px) var(--slide-header-margin-end, 32px) var(--slide-header-margin-bottom, 16px) var(--slide-header-margin-start, 32px)}@media screen and (max-width: 1024px){::slotted([slot=header]){max-height:var(--slide-header-max-height, 16px)}}::slotted([slot=footer]){bottom:0;width:calc(var(--slide-width) - var(--slide-footer-margin-start, 16px) - var(--slide-footer-margin-end, 16px));max-height:var(--slide-footer-max-height, 32px);-ms-flex-pack:var(--slide-footer-justify-content, center);justify-content:var(--slide-footer-justify-content, center);margin:var(--slide-footer-margin-top, 16px) var(--slide-footer-margin-end, 16px) var(--slide-footer-margin-bottom, 16px) var(--slide-footer-margin-start, 16px)}div.deckgo-slide{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin:0 0}div.deckgo-slide .deckgo-big-img-container{overflow:hidden;text-align:center}div.deckgo-slide .deckgo-big-img-container img{max-width:var(--slide-img-max-width)}div.deckgo-slide .deckgo-big-img-container img:not(.cropped){max-width:100%;max-height:100%}::slotted([slot=title]){display:none}";
const deckdeckgoSlideBigImgCss = ":host{position:relative;background:var(--background);color:var(--color);height:100%;z-index:var(--zIndex, 1);--slide-padding-top-default:64px;--slide-padding-end-default:64px;--slide-padding-bottom-default:64px;--slide-padding-start-default:64px}@media screen and (max-width: 1024px){:host{--slide-padding-top-default:32px;--slide-padding-end-default:32px;--slide-padding-bottom-default:32px;--slide-padding-start-default:32px}}div.deckgo-slide{display:flex;padding:var(--slide-padding-top, var(--slide-padding-top-default)) var(--slide-padding-end, var(--slide-padding-end-default)) var(--slide-padding-bottom, var(--slide-padding-bottom-default)) var(--slide-padding-start, var(--slide-padding-start-default));width:calc(var(--slide-width) - var(--slide-padding-start, var(--slide-padding-start-default)) - var(--slide-padding-end, var(--slide-padding-end-default)));height:calc( var(--slide-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );-webkit-touch-callout:var(--slide-user-select, none);-webkit-user-select:var(--slide-user-select, none);-moz-user-select:var(--slide-user-select, none);-ms-user-select:var(--slide-user-select, none);user-select:var(--slide-user-select, none);user-drag:none;-webkit-user-drag:none}@media print{div.deckgo-slide{padding:0;page-break-after:always;height:100vh}::slotted([slot=actions]){display:none}::slotted([slot=background]){display:var(--slide-background-print-display, none)}}::slotted(ul),::slotted(ol){-webkit-padding-start:var(--slide-padding-start, var(--slide-padding-start-default));padding-inline-start:var(--slide-padding-start, var(--slide-padding-start-default))}::slotted([slot=notes]){display:none}::slotted([slot=actions]){position:absolute;top:var(--slide-actions-top, 16px);right:var(--slide-actions-end, 32px);left:var(--slide-actions-start);display:var(--slide-actions-display);z-index:var(--slide-actions-z-index)}::slotted([slot=background]){position:var(--slide-background-position, absolute);top:var(--slide-background-top, 0);right:var(--slide-background-end);left:var(--slide-background-start, 0);width:var(--slide-background-width);height:var(--slide-background-height);z-index:-2;pointer-events:none}::slotted([slot=header]),::slotted([slot=footer]){position:absolute;left:0;width:var(--slide-width);height:100%;display:flex;align-items:center;z-index:var(--slide-header-footer-z-index, -1)}::slotted([slot=header]){top:0;width:calc(var(--slide-width) - var(--slide-header-margin-start, 32px) - var(--slide-header-margin-end, 32px));max-height:var(--slide-header-max-height, 48px);justify-content:var(--slide-header-justify-content, flex-start);margin:var(--slide-header-margin-top, 16px) var(--slide-header-margin-end, 32px) var(--slide-header-margin-bottom, 16px) var(--slide-header-margin-start, 32px)}@media screen and (max-width: 1024px){::slotted([slot=header]){max-height:var(--slide-header-max-height, 16px)}}::slotted([slot=footer]){bottom:0;width:calc(var(--slide-width) - var(--slide-footer-margin-start, 16px) - var(--slide-footer-margin-end, 16px));max-height:var(--slide-footer-max-height, 32px);justify-content:var(--slide-footer-justify-content, center);margin:var(--slide-footer-margin-top, 16px) var(--slide-footer-margin-end, 16px) var(--slide-footer-margin-bottom, 16px) var(--slide-footer-margin-start, 16px)}div.deckgo-slide{flex-direction:column;justify-content:center;align-items:center;margin:0 0}div.deckgo-slide .deckgo-big-img-container{overflow:hidden;text-align:center}div.deckgo-slide .deckgo-big-img-container img{max-width:var(--slide-img-max-width)}div.deckgo-slide .deckgo-big-img-container img:not(.cropped){max-width:100%;max-height:100%}::slotted([slot=title]){display:none}";
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
const DeckdeckgoSlideBigImg = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.slideDidLoad = index.createEvent(this, "slideDidLoad", 7);
this.imgSrc = '';
this.imgDivisions = '';
this.axis = 'x';
this.reverse = false;
this.currentStep = -1;
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.slideDidLoad = index.createEvent(this, "slideDidLoad", 7);
this.imgSrc = '';
this.imgDivisions = '';
this.axis = 'x';
this.reverse = false;
this.currentStep = -1;
}
get divisions() {
return this.imgDivisions.split(';').map((str) => {
const num = parseInt(str);
if (isNaN(num)) {
return 0;
}
return num;
});
}
async componentDidLoad() {
await hideLazyLoadImages(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');
this.bigImg = this.el.shadowRoot.querySelector('img');
this.slideDidLoad.emit();
}
next() {
return new Promise((resolve) => {
this.prevNext(true);
resolve();
});
}
prev() {
return new Promise((resolve) => {
this.prevNext(false);
resolve();
});
}
prevNext(next) {
const axisDimension = this.axis === 'x' ? 'width' : 'height';
const perpendicularAxisDimension = this.axis === 'y' ? 'width' : 'height';
const axisMarginStart = `margin${this.axis === 'x' ? 'Left' : 'Top'}`;
if (this.currentStep === -1 && next) {
this.currentStep = this.reverse ? this.divisions.length : 0;
}
get divisions() {
return this.imgDivisions.split(';').map((str) => {
const num = parseInt(str);
if (isNaN(num)) {
return 0;
}
return num;
});
else if (this.currentStep === this.divisions.length && !next && this.reverse) {
this.currentStep = -1;
}
async componentDidLoad() {
await hideLazyLoadImages(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');
this.bigImg = this.el.shadowRoot.querySelector('img');
this.slideDidLoad.emit();
else {
this.currentStep = this.currentStep + (this.reverse ? -1 : 1) * (next ? 1 : -1);
}
next() {
return new Promise((resolve) => {
this.prevNext(true);
resolve();
});
if (this.currentStep === -1) {
this.bigImg.classList.remove('cropped');
this.bigImg.style[axisMarginStart] = '';
this.bigImg.style[perpendicularAxisDimension] = '';
this.crop.style[axisDimension] = '';
this.crop.style[perpendicularAxisDimension] = '';
}
prev() {
return new Promise((resolve) => {
this.prevNext(false);
resolve();
});
else {
this.crop.style[perpendicularAxisDimension] = '100%';
this.bigImg.style[perpendicularAxisDimension] = '100%';
this.bigImg.classList.add('cropped');
const previousNaturalDivision = this.currentStep === 0 ? 0 : this.divisions[this.currentStep - 1];
const calcCrop = () => {
const imgClientLength = this.bigImg[`client${capitalize(axisDimension)}`];
const imgNaturalLength = this.bigImg[`natural${capitalize(axisDimension)}`];
const lengthFactor = imgClientLength / imgNaturalLength;
const currentNaturalDivision = this.currentStep === this.divisions.length ? imgNaturalLength : this.divisions[this.currentStep];
return {
length: (currentNaturalDivision - previousNaturalDivision) * lengthFactor,
shift: -(previousNaturalDivision * lengthFactor),
};
};
let crop = calcCrop();
if (crop.length > this.el.shadowRoot.querySelector('.deckgo-big-img-container').clientHeight) {
this.crop.style[perpendicularAxisDimension] = '';
crop = calcCrop();
}
this.crop.style[axisDimension] = crop.length + 'px';
this.bigImg.style[axisMarginStart] = crop.shift + 'px';
}
prevNext(next) {
const axisDimension = this.axis === 'x' ? 'width' : 'height';
const perpendicularAxisDimension = this.axis === 'y' ? 'width' : 'height';
const axisMarginStart = `margin${this.axis === 'x' ? 'Left' : 'Top'}`;
if (this.currentStep === -1 && next) {
this.currentStep = this.reverse ? this.divisions.length : 0;
}
else if (this.currentStep === this.divisions.length && !next && this.reverse) {
this.currentStep = -1;
}
else {
this.currentStep = this.currentStep + (this.reverse ? -1 : 1) * (next ? 1 : -1);
}
if (this.currentStep === -1) {
this.bigImg.classList.remove('cropped');
this.bigImg.style[axisMarginStart] = '';
this.bigImg.style[perpendicularAxisDimension] = '';
this.crop.style[axisDimension] = '';
this.crop.style[perpendicularAxisDimension] = '';
}
else {
this.crop.style[perpendicularAxisDimension] = '100%';
this.bigImg.style[perpendicularAxisDimension] = '100%';
this.bigImg.classList.add('cropped');
const previousNaturalDivision = this.currentStep === 0 ? 0 : this.divisions[this.currentStep - 1];
const calcCrop = () => {
const imgClientLength = this.bigImg[`client${capitalize(axisDimension)}`];
const imgNaturalLength = this.bigImg[`natural${capitalize(axisDimension)}`];
const lengthFactor = imgClientLength / imgNaturalLength;
const currentNaturalDivision = this.currentStep === this.divisions.length ? imgNaturalLength : this.divisions[this.currentStep];
return {
length: (currentNaturalDivision - previousNaturalDivision) * lengthFactor,
shift: -(previousNaturalDivision * lengthFactor),
};
};
let crop = calcCrop();
if (crop.length > this.el.shadowRoot.querySelector('.deckgo-big-img-container').clientHeight) {
this.crop.style[perpendicularAxisDimension] = '';
crop = calcCrop();
}
this.crop.style[axisDimension] = crop.length + 'px';
this.bigImg.style[axisMarginStart] = crop.shift + 'px';
}
}
isEnd() {
return this.reverse ? this.currentStep === 0 : this.currentStep === this.divisions.length;
}
isBeginning() {
return this.currentStep === -1;
}
beforeSwipe(enter) {
return new Promise(async (resolve) => {
const couldSwipe = !this.divisions[0] || (enter ? this.isEnd() : this.isBeginning());
if (couldSwipe) {
resolve(true);
return;
}
if (enter) {
await this.next();
}
else {
await this.prev();
}
resolve(false);
});
}
afterSwipe() {
return afterSwipe();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
}
render() {
return (index.h(index.Host, { class: { 'deckgo-slide-container': true } }, index.h("div", { class: "deckgo-slide" }, index.h("slot", { name: "title" }), index.h("div", { class: "deckgo-big-img-container" }, index.h("img", { "data-src": this.imgSrc, alt: this.imgAlt }), index.h("slot", { name: "notes" }), index.h("slot", { name: "actions" }), index.h("slot", { name: "background" }), index.h("slot", { name: "header" }), index.h("slot", { name: "footer" })))));
}
get el() { return index.getElement(this); }
}
isEnd() {
return this.reverse ? this.currentStep === 0 : this.currentStep === this.divisions.length;
}
isBeginning() {
return this.currentStep === -1;
}
beforeSwipe(enter) {
return new Promise(async (resolve) => {
const couldSwipe = !this.divisions[0] || (enter ? this.isEnd() : this.isBeginning());
if (couldSwipe) {
resolve(true);
return;
}
if (enter) {
await this.next();
}
else {
await this.prev();
}
resolve(false);
});
}
afterSwipe() {
return afterSwipe();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
}
render() {
return (index.h(index.Host, { class: { 'deckgo-slide-container': true } }, index.h("div", { class: "deckgo-slide" }, index.h("slot", { name: "title" }), index.h("div", { class: "deckgo-big-img-container" }, index.h("img", { "data-src": this.imgSrc, alt: this.imgAlt }), index.h("slot", { name: "notes" }), index.h("slot", { name: "actions" }), index.h("slot", { name: "background" }), index.h("slot", { name: "header" }), index.h("slot", { name: "footer" })))));
}
get el() { return index.getElement(this); }
};

@@ -271,0 +271,0 @@ DeckdeckgoSlideBigImg.style = deckdeckgoSlideBigImgCss;

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

const index = require('./index-1a8687fa.js');
const patch = require('./patch-36c81db1.js');
const index = require('./index-13ec3223.js');
/*
Stencil Client Patch Esm v2.0.2 | MIT Licensed | https://stenciljs.com
*/
const patchEsm = () => {
return index.promiseResolve();
};
const defineCustomElements = (win, options) => {
if (typeof window === 'undefined') return Promise.resolve();
return patch.patchEsm().then(() => {
return patchEsm().then(() => {
return index.bootstrapLazy([["deckgo-slide-big-img.cjs",[[1,"deckgo-slide-big-img",{"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"imgDivisions":[1,"img-divisions"],"axis":[1],"reverse":[4],"beforeSwipe":[64],"afterSwipe":[64],"lazyLoadContent":[64],"revealContent":[64],"hideContent":[64]}]]]], options);

@@ -13,0 +19,0 @@ });

@@ -7,4 +7,4 @@ {

"name": "@stencil/core",
"version": "1.16.2",
"typescriptVersion": "3.9.6"
"version": "2.0.2",
"typescriptVersion": "4.0.2"
},

@@ -11,0 +11,0 @@ "collections": [],

@@ -5,327 +5,327 @@ import { Component, Element, Event, Method, Prop, h, Host } from '@stencil/core';

export class DeckdeckgoSlideBigImg {
constructor() {
this.imgSrc = '';
this.imgDivisions = '';
this.axis = 'x';
this.reverse = false;
this.currentStep = -1;
constructor() {
this.imgSrc = '';
this.imgDivisions = '';
this.axis = 'x';
this.reverse = false;
this.currentStep = -1;
}
get divisions() {
return this.imgDivisions.split(';').map((str) => {
const num = parseInt(str);
if (isNaN(num)) {
return 0;
}
return num;
});
}
async componentDidLoad() {
await hideLazyLoadImages(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');
this.bigImg = this.el.shadowRoot.querySelector('img');
this.slideDidLoad.emit();
}
next() {
return new Promise((resolve) => {
this.prevNext(true);
resolve();
});
}
prev() {
return new Promise((resolve) => {
this.prevNext(false);
resolve();
});
}
prevNext(next) {
const axisDimension = this.axis === 'x' ? 'width' : 'height';
const perpendicularAxisDimension = this.axis === 'y' ? 'width' : 'height';
const axisMarginStart = `margin${this.axis === 'x' ? 'Left' : 'Top'}`;
if (this.currentStep === -1 && next) {
this.currentStep = this.reverse ? this.divisions.length : 0;
}
get divisions() {
return this.imgDivisions.split(';').map((str) => {
const num = parseInt(str);
if (isNaN(num)) {
return 0;
}
return num;
});
else if (this.currentStep === this.divisions.length && !next && this.reverse) {
this.currentStep = -1;
}
async componentDidLoad() {
await hideLazyLoadImages(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');
this.bigImg = this.el.shadowRoot.querySelector('img');
this.slideDidLoad.emit();
else {
this.currentStep = this.currentStep + (this.reverse ? -1 : 1) * (next ? 1 : -1);
}
next() {
return new Promise((resolve) => {
this.prevNext(true);
resolve();
});
if (this.currentStep === -1) {
this.bigImg.classList.remove('cropped');
this.bigImg.style[axisMarginStart] = '';
this.bigImg.style[perpendicularAxisDimension] = '';
this.crop.style[axisDimension] = '';
this.crop.style[perpendicularAxisDimension] = '';
}
prev() {
return new Promise((resolve) => {
this.prevNext(false);
resolve();
});
else {
this.crop.style[perpendicularAxisDimension] = '100%';
this.bigImg.style[perpendicularAxisDimension] = '100%';
this.bigImg.classList.add('cropped');
const previousNaturalDivision = this.currentStep === 0 ? 0 : this.divisions[this.currentStep - 1];
const calcCrop = () => {
const imgClientLength = this.bigImg[`client${capitalize(axisDimension)}`];
const imgNaturalLength = this.bigImg[`natural${capitalize(axisDimension)}`];
const lengthFactor = imgClientLength / imgNaturalLength;
const currentNaturalDivision = this.currentStep === this.divisions.length ? imgNaturalLength : this.divisions[this.currentStep];
return {
length: (currentNaturalDivision - previousNaturalDivision) * lengthFactor,
shift: -(previousNaturalDivision * lengthFactor),
};
};
let crop = calcCrop();
if (crop.length > this.el.shadowRoot.querySelector('.deckgo-big-img-container').clientHeight) {
this.crop.style[perpendicularAxisDimension] = '';
crop = calcCrop();
}
this.crop.style[axisDimension] = crop.length + 'px';
this.bigImg.style[axisMarginStart] = crop.shift + 'px';
}
prevNext(next) {
const axisDimension = this.axis === 'x' ? 'width' : 'height';
const perpendicularAxisDimension = this.axis === 'y' ? 'width' : 'height';
const axisMarginStart = `margin${this.axis === 'x' ? 'Left' : 'Top'}`;
if (this.currentStep === -1 && next) {
this.currentStep = this.reverse ? this.divisions.length : 0;
}
else if (this.currentStep === this.divisions.length && !next && this.reverse) {
this.currentStep = -1;
}
else {
this.currentStep = this.currentStep + (this.reverse ? -1 : 1) * (next ? 1 : -1);
}
if (this.currentStep === -1) {
this.bigImg.classList.remove('cropped');
this.bigImg.style[axisMarginStart] = '';
this.bigImg.style[perpendicularAxisDimension] = '';
this.crop.style[axisDimension] = '';
this.crop.style[perpendicularAxisDimension] = '';
}
else {
this.crop.style[perpendicularAxisDimension] = '100%';
this.bigImg.style[perpendicularAxisDimension] = '100%';
this.bigImg.classList.add('cropped');
const previousNaturalDivision = this.currentStep === 0 ? 0 : this.divisions[this.currentStep - 1];
const calcCrop = () => {
const imgClientLength = this.bigImg[`client${capitalize(axisDimension)}`];
const imgNaturalLength = this.bigImg[`natural${capitalize(axisDimension)}`];
const lengthFactor = imgClientLength / imgNaturalLength;
const currentNaturalDivision = this.currentStep === this.divisions.length ? imgNaturalLength : this.divisions[this.currentStep];
return {
length: (currentNaturalDivision - previousNaturalDivision) * lengthFactor,
shift: -(previousNaturalDivision * lengthFactor),
};
};
let crop = calcCrop();
if (crop.length > this.el.shadowRoot.querySelector('.deckgo-big-img-container').clientHeight) {
this.crop.style[perpendicularAxisDimension] = '';
crop = calcCrop();
}
this.crop.style[axisDimension] = crop.length + 'px';
this.bigImg.style[axisMarginStart] = crop.shift + 'px';
}
}
isEnd() {
return this.reverse ? this.currentStep === 0 : this.currentStep === this.divisions.length;
}
isBeginning() {
return this.currentStep === -1;
}
beforeSwipe(enter) {
return new Promise(async (resolve) => {
const couldSwipe = !this.divisions[0] || (enter ? this.isEnd() : this.isBeginning());
if (couldSwipe) {
resolve(true);
return;
}
if (enter) {
await this.next();
}
else {
await this.prev();
}
resolve(false);
});
}
afterSwipe() {
return afterSwipe();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
}
render() {
return (h(Host, { class: { 'deckgo-slide-container': true } },
h("div", { class: "deckgo-slide" },
h("slot", { name: "title" }),
h("div", { class: "deckgo-big-img-container" },
h("img", { "data-src": this.imgSrc, alt: this.imgAlt }),
h("slot", { name: "notes" }),
h("slot", { name: "actions" }),
h("slot", { name: "background" }),
h("slot", { name: "header" }),
h("slot", { name: "footer" })))));
}
static get is() { return "deckgo-slide-big-img"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() { return {
"$": ["deckdeckgo-slide-big-img.scss"]
}; }
static get styleUrls() { return {
"$": ["deckdeckgo-slide-big-img.css"]
}; }
static get properties() { return {
"imgSrc": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "img-src",
"reflect": false,
"defaultValue": "''"
},
"imgAlt": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "img-alt",
"reflect": false
},
"imgDivisions": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "img-divisions",
"reflect": false,
"defaultValue": "''"
},
"axis": {
"type": "string",
"mutable": false,
"complexType": {
"original": "'x' | 'y'",
"resolved": "\"x\" | \"y\"",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "axis",
"reflect": false,
"defaultValue": "'x'"
},
"reverse": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "reverse",
"reflect": false,
"defaultValue": "false"
}
isEnd() {
return this.reverse ? this.currentStep === 0 : this.currentStep === this.divisions.length;
}
isBeginning() {
return this.currentStep === -1;
}
beforeSwipe(enter) {
return new Promise(async (resolve) => {
const couldSwipe = !this.divisions[0] || (enter ? this.isEnd() : this.isBeginning());
if (couldSwipe) {
resolve(true);
return;
}
if (enter) {
await this.next();
}
else {
await this.prev();
}
resolve(false);
});
}
afterSwipe() {
return afterSwipe();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
}
render() {
return (h(Host, { class: { 'deckgo-slide-container': true } },
h("div", { class: "deckgo-slide" },
h("slot", { name: "title" }),
h("div", { class: "deckgo-big-img-container" },
h("img", { "data-src": this.imgSrc, alt: this.imgAlt }),
h("slot", { name: "notes" }),
h("slot", { name: "actions" }),
h("slot", { name: "background" }),
h("slot", { name: "header" }),
h("slot", { name: "footer" })))));
}
static get is() { return "deckgo-slide-big-img"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() { return {
"$": ["deckdeckgo-slide-big-img.scss"]
}; }
static get styleUrls() { return {
"$": ["deckdeckgo-slide-big-img.css"]
}; }
static get properties() { return {
"imgSrc": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "img-src",
"reflect": false,
"defaultValue": "''"
}; }
static get events() { return [{
"method": "slideDidLoad",
"name": "slideDidLoad",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "void",
"resolved": "void",
"references": {}
}
}]; }
static get methods() { return {
"beforeSwipe": {
"complexType": {
"signature": "(enter: boolean) => Promise<boolean>",
"parameters": [{
"tags": [],
"text": ""
}],
"references": {
"Promise": {
"location": "global"
}
},
"imgAlt": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "img-alt",
"reflect": false
"return": "Promise<boolean>"
},
"docs": {
"text": "",
"tags": []
}
},
"afterSwipe": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"imgDivisions": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "img-divisions",
"reflect": false,
"defaultValue": "''"
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"lazyLoadContent": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"axis": {
"type": "string",
"mutable": false,
"complexType": {
"original": "'x' | 'y'",
"resolved": "\"x\" | \"y\"",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "axis",
"reflect": false,
"defaultValue": "'x'"
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"revealContent": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"reverse": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "reverse",
"reflect": false,
"defaultValue": "false"
}
}; }
static get events() { return [{
"method": "slideDidLoad",
"name": "slideDidLoad",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "void",
"resolved": "void",
"references": {}
}
}]; }
static get methods() { return {
"beforeSwipe": {
"complexType": {
"signature": "(enter: boolean) => Promise<boolean>",
"parameters": [{
"tags": [],
"text": ""
}],
"references": {
"Promise": {
"location": "global"
}
},
"return": "Promise<boolean>"
},
"docs": {
"text": "",
"tags": []
}
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"hideContent": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"afterSwipe": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"lazyLoadContent": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"revealContent": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
},
"hideContent": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
}
}; }
static get elementRef() { return "el"; }
"return": "Promise<void>"
},
"docs": {
"text": "",
"tags": []
}
}
}; }
static get elementRef() { return "el"; }
}

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

import{b as i}from"./p-8b013563.js";import{p as e}from"./p-b5596911.js";e().then(e=>i([["p-4d8e16df",[[1,"deckgo-slide-big-img",{imgSrc:[1,"img-src"],imgAlt:[1,"img-alt"],imgDivisions:[1,"img-divisions"],axis:[1],reverse:[4],beforeSwipe:[64],afterSwipe:[64],lazyLoadContent:[64],revealContent:[64],hideContent:[64]}]]]],e));
import{p as e,b as i}from"./p-c6257116.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),e(t)})().then(e=>i([["p-4be28ee9",[[1,"deckgo-slide-big-img",{imgSrc:[1,"img-src"],imgAlt:[1,"img-alt"],imgDivisions:[1,"img-divisions"],axis:[1],reverse:[4],beforeSwipe:[64],afterSwipe:[64],lazyLoadContent:[64],revealContent:[64],hideContent:[64]}]]]],e));

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

import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-64f9ff08.js';
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-3552aa55.js';

@@ -142,124 +142,124 @@ function lazyLoadComponentContent(el, tag) {

const deckdeckgoSlideBigImgCss = ":host{position:relative;background:var(--background);color:var(--color);height:100%;z-index:var(--zIndex, 1);--slide-padding-top-default:64px;--slide-padding-end-default:64px;--slide-padding-bottom-default:64px;--slide-padding-start-default:64px}@media screen and (max-width: 1024px){:host{--slide-padding-top-default:32px;--slide-padding-end-default:32px;--slide-padding-bottom-default:32px;--slide-padding-start-default:32px}}div.deckgo-slide{display:-ms-flexbox;display:flex;padding:var(--slide-padding-top, var(--slide-padding-top-default)) var(--slide-padding-end, var(--slide-padding-end-default)) var(--slide-padding-bottom, var(--slide-padding-bottom-default)) var(--slide-padding-start, var(--slide-padding-start-default));width:calc(var(--slide-width) - var(--slide-padding-start, var(--slide-padding-start-default)) - var(--slide-padding-end, var(--slide-padding-end-default)));height:calc( var(--slide-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );-webkit-touch-callout:var(--slide-user-select, none);-webkit-user-select:var(--slide-user-select, none);-moz-user-select:var(--slide-user-select, none);-ms-user-select:var(--slide-user-select, none);user-select:var(--slide-user-select, none);user-drag:none;-webkit-user-drag:none}@media print{div.deckgo-slide{padding:0;page-break-after:always;height:100vh}::slotted([slot=actions]){display:none}::slotted([slot=background]){display:var(--slide-background-print-display, none)}}::slotted(ul),::slotted(ol){-webkit-padding-start:var(--slide-padding-start, var(--slide-padding-start-default));padding-inline-start:var(--slide-padding-start, var(--slide-padding-start-default))}::slotted([slot=notes]){display:none}::slotted([slot=actions]){position:absolute;top:var(--slide-actions-top, 16px);right:var(--slide-actions-end, 32px);left:var(--slide-actions-start);display:var(--slide-actions-display);z-index:var(--slide-actions-z-index)}::slotted([slot=background]){position:var(--slide-background-position, absolute);top:var(--slide-background-top, 0);right:var(--slide-background-end);left:var(--slide-background-start, 0);width:var(--slide-background-width);height:var(--slide-background-height);z-index:-2;pointer-events:none}::slotted([slot=header]),::slotted([slot=footer]){position:absolute;left:0;width:var(--slide-width);height:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;z-index:var(--slide-header-footer-z-index, -1)}::slotted([slot=header]){top:0;width:calc(var(--slide-width) - var(--slide-header-margin-start, 32px) - var(--slide-header-margin-end, 32px));max-height:var(--slide-header-max-height, 48px);-ms-flex-pack:var(--slide-header-justify-content, flex-start);justify-content:var(--slide-header-justify-content, flex-start);margin:var(--slide-header-margin-top, 16px) var(--slide-header-margin-end, 32px) var(--slide-header-margin-bottom, 16px) var(--slide-header-margin-start, 32px)}@media screen and (max-width: 1024px){::slotted([slot=header]){max-height:var(--slide-header-max-height, 16px)}}::slotted([slot=footer]){bottom:0;width:calc(var(--slide-width) - var(--slide-footer-margin-start, 16px) - var(--slide-footer-margin-end, 16px));max-height:var(--slide-footer-max-height, 32px);-ms-flex-pack:var(--slide-footer-justify-content, center);justify-content:var(--slide-footer-justify-content, center);margin:var(--slide-footer-margin-top, 16px) var(--slide-footer-margin-end, 16px) var(--slide-footer-margin-bottom, 16px) var(--slide-footer-margin-start, 16px)}div.deckgo-slide{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin:0 0}div.deckgo-slide .deckgo-big-img-container{overflow:hidden;text-align:center}div.deckgo-slide .deckgo-big-img-container img{max-width:var(--slide-img-max-width)}div.deckgo-slide .deckgo-big-img-container img:not(.cropped){max-width:100%;max-height:100%}::slotted([slot=title]){display:none}";
const deckdeckgoSlideBigImgCss = ":host{position:relative;background:var(--background);color:var(--color);height:100%;z-index:var(--zIndex, 1);--slide-padding-top-default:64px;--slide-padding-end-default:64px;--slide-padding-bottom-default:64px;--slide-padding-start-default:64px}@media screen and (max-width: 1024px){:host{--slide-padding-top-default:32px;--slide-padding-end-default:32px;--slide-padding-bottom-default:32px;--slide-padding-start-default:32px}}div.deckgo-slide{display:flex;padding:var(--slide-padding-top, var(--slide-padding-top-default)) var(--slide-padding-end, var(--slide-padding-end-default)) var(--slide-padding-bottom, var(--slide-padding-bottom-default)) var(--slide-padding-start, var(--slide-padding-start-default));width:calc(var(--slide-width) - var(--slide-padding-start, var(--slide-padding-start-default)) - var(--slide-padding-end, var(--slide-padding-end-default)));height:calc( var(--slide-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );-webkit-touch-callout:var(--slide-user-select, none);-webkit-user-select:var(--slide-user-select, none);-moz-user-select:var(--slide-user-select, none);-ms-user-select:var(--slide-user-select, none);user-select:var(--slide-user-select, none);user-drag:none;-webkit-user-drag:none}@media print{div.deckgo-slide{padding:0;page-break-after:always;height:100vh}::slotted([slot=actions]){display:none}::slotted([slot=background]){display:var(--slide-background-print-display, none)}}::slotted(ul),::slotted(ol){-webkit-padding-start:var(--slide-padding-start, var(--slide-padding-start-default));padding-inline-start:var(--slide-padding-start, var(--slide-padding-start-default))}::slotted([slot=notes]){display:none}::slotted([slot=actions]){position:absolute;top:var(--slide-actions-top, 16px);right:var(--slide-actions-end, 32px);left:var(--slide-actions-start);display:var(--slide-actions-display);z-index:var(--slide-actions-z-index)}::slotted([slot=background]){position:var(--slide-background-position, absolute);top:var(--slide-background-top, 0);right:var(--slide-background-end);left:var(--slide-background-start, 0);width:var(--slide-background-width);height:var(--slide-background-height);z-index:-2;pointer-events:none}::slotted([slot=header]),::slotted([slot=footer]){position:absolute;left:0;width:var(--slide-width);height:100%;display:flex;align-items:center;z-index:var(--slide-header-footer-z-index, -1)}::slotted([slot=header]){top:0;width:calc(var(--slide-width) - var(--slide-header-margin-start, 32px) - var(--slide-header-margin-end, 32px));max-height:var(--slide-header-max-height, 48px);justify-content:var(--slide-header-justify-content, flex-start);margin:var(--slide-header-margin-top, 16px) var(--slide-header-margin-end, 32px) var(--slide-header-margin-bottom, 16px) var(--slide-header-margin-start, 32px)}@media screen and (max-width: 1024px){::slotted([slot=header]){max-height:var(--slide-header-max-height, 16px)}}::slotted([slot=footer]){bottom:0;width:calc(var(--slide-width) - var(--slide-footer-margin-start, 16px) - var(--slide-footer-margin-end, 16px));max-height:var(--slide-footer-max-height, 32px);justify-content:var(--slide-footer-justify-content, center);margin:var(--slide-footer-margin-top, 16px) var(--slide-footer-margin-end, 16px) var(--slide-footer-margin-bottom, 16px) var(--slide-footer-margin-start, 16px)}div.deckgo-slide{flex-direction:column;justify-content:center;align-items:center;margin:0 0}div.deckgo-slide .deckgo-big-img-container{overflow:hidden;text-align:center}div.deckgo-slide .deckgo-big-img-container img{max-width:var(--slide-img-max-width)}div.deckgo-slide .deckgo-big-img-container img:not(.cropped){max-width:100%;max-height:100%}::slotted([slot=title]){display:none}";
const capitalize = (str) => str.charAt(0).toUpperCase() + str.slice(1);
const DeckdeckgoSlideBigImg = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.slideDidLoad = createEvent(this, "slideDidLoad", 7);
this.imgSrc = '';
this.imgDivisions = '';
this.axis = 'x';
this.reverse = false;
this.currentStep = -1;
constructor(hostRef) {
registerInstance(this, hostRef);
this.slideDidLoad = createEvent(this, "slideDidLoad", 7);
this.imgSrc = '';
this.imgDivisions = '';
this.axis = 'x';
this.reverse = false;
this.currentStep = -1;
}
get divisions() {
return this.imgDivisions.split(';').map((str) => {
const num = parseInt(str);
if (isNaN(num)) {
return 0;
}
return num;
});
}
async componentDidLoad() {
await hideLazyLoadImages(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');
this.bigImg = this.el.shadowRoot.querySelector('img');
this.slideDidLoad.emit();
}
next() {
return new Promise((resolve) => {
this.prevNext(true);
resolve();
});
}
prev() {
return new Promise((resolve) => {
this.prevNext(false);
resolve();
});
}
prevNext(next) {
const axisDimension = this.axis === 'x' ? 'width' : 'height';
const perpendicularAxisDimension = this.axis === 'y' ? 'width' : 'height';
const axisMarginStart = `margin${this.axis === 'x' ? 'Left' : 'Top'}`;
if (this.currentStep === -1 && next) {
this.currentStep = this.reverse ? this.divisions.length : 0;
}
get divisions() {
return this.imgDivisions.split(';').map((str) => {
const num = parseInt(str);
if (isNaN(num)) {
return 0;
}
return num;
});
else if (this.currentStep === this.divisions.length && !next && this.reverse) {
this.currentStep = -1;
}
async componentDidLoad() {
await hideLazyLoadImages(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');
this.bigImg = this.el.shadowRoot.querySelector('img');
this.slideDidLoad.emit();
else {
this.currentStep = this.currentStep + (this.reverse ? -1 : 1) * (next ? 1 : -1);
}
next() {
return new Promise((resolve) => {
this.prevNext(true);
resolve();
});
if (this.currentStep === -1) {
this.bigImg.classList.remove('cropped');
this.bigImg.style[axisMarginStart] = '';
this.bigImg.style[perpendicularAxisDimension] = '';
this.crop.style[axisDimension] = '';
this.crop.style[perpendicularAxisDimension] = '';
}
prev() {
return new Promise((resolve) => {
this.prevNext(false);
resolve();
});
else {
this.crop.style[perpendicularAxisDimension] = '100%';
this.bigImg.style[perpendicularAxisDimension] = '100%';
this.bigImg.classList.add('cropped');
const previousNaturalDivision = this.currentStep === 0 ? 0 : this.divisions[this.currentStep - 1];
const calcCrop = () => {
const imgClientLength = this.bigImg[`client${capitalize(axisDimension)}`];
const imgNaturalLength = this.bigImg[`natural${capitalize(axisDimension)}`];
const lengthFactor = imgClientLength / imgNaturalLength;
const currentNaturalDivision = this.currentStep === this.divisions.length ? imgNaturalLength : this.divisions[this.currentStep];
return {
length: (currentNaturalDivision - previousNaturalDivision) * lengthFactor,
shift: -(previousNaturalDivision * lengthFactor),
};
};
let crop = calcCrop();
if (crop.length > this.el.shadowRoot.querySelector('.deckgo-big-img-container').clientHeight) {
this.crop.style[perpendicularAxisDimension] = '';
crop = calcCrop();
}
this.crop.style[axisDimension] = crop.length + 'px';
this.bigImg.style[axisMarginStart] = crop.shift + 'px';
}
prevNext(next) {
const axisDimension = this.axis === 'x' ? 'width' : 'height';
const perpendicularAxisDimension = this.axis === 'y' ? 'width' : 'height';
const axisMarginStart = `margin${this.axis === 'x' ? 'Left' : 'Top'}`;
if (this.currentStep === -1 && next) {
this.currentStep = this.reverse ? this.divisions.length : 0;
}
else if (this.currentStep === this.divisions.length && !next && this.reverse) {
this.currentStep = -1;
}
else {
this.currentStep = this.currentStep + (this.reverse ? -1 : 1) * (next ? 1 : -1);
}
if (this.currentStep === -1) {
this.bigImg.classList.remove('cropped');
this.bigImg.style[axisMarginStart] = '';
this.bigImg.style[perpendicularAxisDimension] = '';
this.crop.style[axisDimension] = '';
this.crop.style[perpendicularAxisDimension] = '';
}
else {
this.crop.style[perpendicularAxisDimension] = '100%';
this.bigImg.style[perpendicularAxisDimension] = '100%';
this.bigImg.classList.add('cropped');
const previousNaturalDivision = this.currentStep === 0 ? 0 : this.divisions[this.currentStep - 1];
const calcCrop = () => {
const imgClientLength = this.bigImg[`client${capitalize(axisDimension)}`];
const imgNaturalLength = this.bigImg[`natural${capitalize(axisDimension)}`];
const lengthFactor = imgClientLength / imgNaturalLength;
const currentNaturalDivision = this.currentStep === this.divisions.length ? imgNaturalLength : this.divisions[this.currentStep];
return {
length: (currentNaturalDivision - previousNaturalDivision) * lengthFactor,
shift: -(previousNaturalDivision * lengthFactor),
};
};
let crop = calcCrop();
if (crop.length > this.el.shadowRoot.querySelector('.deckgo-big-img-container').clientHeight) {
this.crop.style[perpendicularAxisDimension] = '';
crop = calcCrop();
}
this.crop.style[axisDimension] = crop.length + 'px';
this.bigImg.style[axisMarginStart] = crop.shift + 'px';
}
}
isEnd() {
return this.reverse ? this.currentStep === 0 : this.currentStep === this.divisions.length;
}
isBeginning() {
return this.currentStep === -1;
}
beforeSwipe(enter) {
return new Promise(async (resolve) => {
const couldSwipe = !this.divisions[0] || (enter ? this.isEnd() : this.isBeginning());
if (couldSwipe) {
resolve(true);
return;
}
if (enter) {
await this.next();
}
else {
await this.prev();
}
resolve(false);
});
}
afterSwipe() {
return afterSwipe();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
}
render() {
return (h(Host, { class: { 'deckgo-slide-container': true } }, h("div", { class: "deckgo-slide" }, h("slot", { name: "title" }), h("div", { class: "deckgo-big-img-container" }, h("img", { "data-src": this.imgSrc, alt: this.imgAlt }), h("slot", { name: "notes" }), h("slot", { name: "actions" }), h("slot", { name: "background" }), h("slot", { name: "header" }), h("slot", { name: "footer" })))));
}
get el() { return getElement(this); }
}
isEnd() {
return this.reverse ? this.currentStep === 0 : this.currentStep === this.divisions.length;
}
isBeginning() {
return this.currentStep === -1;
}
beforeSwipe(enter) {
return new Promise(async (resolve) => {
const couldSwipe = !this.divisions[0] || (enter ? this.isEnd() : this.isBeginning());
if (couldSwipe) {
resolve(true);
return;
}
if (enter) {
await this.next();
}
else {
await this.prev();
}
resolve(false);
});
}
afterSwipe() {
return afterSwipe();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
}
render() {
return (h(Host, { class: { 'deckgo-slide-container': true } }, h("div", { class: "deckgo-slide" }, h("slot", { name: "title" }), h("div", { class: "deckgo-big-img-container" }, h("img", { "data-src": this.imgSrc, alt: this.imgAlt }), h("slot", { name: "notes" }), h("slot", { name: "actions" }), h("slot", { name: "background" }), h("slot", { name: "header" }), h("slot", { name: "footer" })))));
}
get el() { return getElement(this); }
};

@@ -266,0 +266,0 @@ DeckdeckgoSlideBigImg.style = deckdeckgoSlideBigImgCss;

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

var StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return Object.assign(Object.assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return Object.assign(Object.assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);

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

module.exports = require('./cjs/index.cjs.js');
export * from './esm/index.js';
{
"name": "deckdeckgo-slide-big-img-loader",
"typings": "./index.d.ts",
"module": "./index.mjs",
"module": "./index.js",
"main": "./index.cjs.js",
"node:main": "./node-main.js",
"jsnext:main": "./index.es2017.mjs",
"es2015": "./index.es2017.mjs",
"es2017": "./index.es2017.mjs",
"jsnext:main": "./index.es2017.js",
"es2015": "./index.es2017.js",
"es2017": "./index.es2017.js",
"unpkg": "./cdn.js"
}
import { EventEmitter } from '../../stencil-public-runtime';
import { DeckdeckgoSlide } from '@deckdeckgo/slide-utils';
export declare class DeckdeckgoSlideBigImg implements DeckdeckgoSlide {
el: HTMLElement;
slideDidLoad: EventEmitter<void>;
imgSrc: string;
imgAlt: string;
imgDivisions: string;
axis: 'x' | 'y';
reverse: boolean;
private crop;
private bigImg;
private currentStep;
private get divisions();
componentDidLoad(): Promise<void>;
private next;
private prev;
private prevNext;
private isEnd;
private isBeginning;
beforeSwipe(enter: boolean): Promise<boolean>;
afterSwipe(): Promise<void>;
lazyLoadContent(): Promise<void>;
revealContent(): Promise<void>;
hideContent(): Promise<void>;
render(): any;
el: HTMLElement;
slideDidLoad: EventEmitter<void>;
imgSrc: string;
imgAlt: string;
imgDivisions: string;
axis: 'x' | 'y';
reverse: boolean;
private crop;
private bigImg;
private currentStep;
private get divisions();
componentDidLoad(): Promise<void>;
private next;
private prev;
private prevNext;
private isEnd;
private isBeginning;
beforeSwipe(enter: boolean): Promise<boolean>;
afterSwipe(): Promise<void>;
lazyLoadContent(): Promise<void>;
revealContent(): Promise<void>;
hideContent(): Promise<void>;
render(): any;
}

@@ -46,6 +46,2 @@ declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;

assetsDirs?: string[];
/**
* @deprecated Use `assetsDirs` instead
*/
assetsDir?: string;
}

@@ -85,10 +81,2 @@ export interface ShadowRootOptions {

reflect?: boolean;
/** @deprecated: "attr" has been deprecated, please use "attribute" instead. */
attr?: string;
/** @deprecated "context" has been deprecated. */
context?: string;
/** @deprecated "connect" has been deprecated, please use ES modules and/or dynamic imports instead. */
connect?: string;
/** @deprecated "reflectToAttr" has been deprecated, please use "reflect" instead. */
reflectToAttr?: boolean;
}

@@ -150,3 +138,3 @@ export interface MethodDecorator {

}
export declare type ListenTargetOptions = 'parent' | 'body' | 'document' | 'window';
export declare type ListenTargetOptions = 'body' | 'document' | 'window';
export interface StateDecorator {

@@ -236,6 +224,21 @@ (): PropertyDecorator;

/**
* getAssetPath
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
* if the path needs to be customized.
*/
export declare function getAssetPath(path: string): string;
/**
* Used to manually set the base path where assets can be found. For lazy-loaded
* builds the asset path is automatically set and assets copied to the correct
* build directory. However, for custom elements builds, the `setAssetPath(path)` could
* be used to customize the asset path depending on how the script file is consumed.
* If the script is used as "module", it's recommended to use "import.meta.url", such
* as `setAssetPath(import.meta.url)`. Other options include
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
* But do note that this configuration depends on how your script is bundled, or lack of
* bunding, and where your assets can be loaded from. Additionally custom bundling
* will have to ensure the static assets are copied to its build directory.
*/
export declare function setAssetPath(path: string): string;
/**
* getElement

@@ -256,4 +259,2 @@ */

componentOnReady(): Promise<this>;
/** @deprecated */
forceUpdate(): void;
}

@@ -324,9 +325,2 @@ /**

}
export interface ComponentDidUnload {
/**
* The component did unload and the element
* will be destroyed.
*/
componentDidUnload(): void;
}
export interface ComponentInterface {

@@ -436,2 +430,6 @@ connectedCallback?(): void;

/**
* Fragment
*/
export declare const Fragment: FunctionalComponent<{}>;
/**
* The "h" namespace is used to import JSX types for elements and attributes.

@@ -1066,2 +1064,3 @@ * It is imported in order to avoid conflicting global JSX issues.

interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
abbr?: string;
colSpan?: number;

@@ -1534,1 +1533,12 @@ headers?: string;

}
export interface CustomElementsDefineOptions {
exclude?: string[];
resourcesUrl?: string;
syncQueue?: boolean;
transformTagName?: (tagName: string) => string;
jmp?: (c: Function) => any;
raf?: (c: FrameRequestCallback) => number;
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
ce?: (eventName: string, opts?: any) => CustomEvent;
}
{
"name": "@deckdeckgo/slide-big-img",
"version": "1.1.2",
"version": "2.0.0",
"description": "Display in your presentation an image fullscreen and highlight specific part of it using the Big Image slide",
"main": "dist/index.js",
"module": "dist/index.mjs",
"es2015": "dist/esm/index.mjs",
"es2017": "dist/esm/index.mjs",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"es2015": "dist/esm/index.js",
"es2017": "dist/esm/index.js",
"jsnext:main": "dist/esm/index.js",
"types": "dist/types/index.d.ts",

@@ -28,10 +29,10 @@ "collection": "dist/collection/collection-manifest.json",

"devDependencies": {
"@stencil/core": "^1.16.2",
"@stencil/core": "^2.0.2",
"@stencil/postcss": "^1.0.1",
"@stencil/sass": "^1.3.2",
"@stencil/utils": "0.0.5",
"autoprefixer": "^9.8.5",
"autoprefixer": "^9.8.6",
"husky": "^4.2.5",
"prettier": "2.0.5",
"pretty-quick": "^2.0.1"
"prettier": "2.1.1",
"pretty-quick": "^3.0.0"
},

@@ -38,0 +39,0 @@ "repository": {

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