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 2.2.2 to 2.3.0

dist/cjs/index-feaabf7b.js

6

CHANGELOG.md

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

# 2.3.0 (2021-05-26)
### Build
- update dependencies including `slide-utils`
# 2.2.2 (2020-11-14)

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

8

dist/cjs/deckdeckgo-slide-big-img.cjs.js
'use strict';
const index = require('./index-13ec3223.js');
const index = require('./index-feaabf7b.js');
/*
Stencil Client Patch Browser v2.0.3 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v2.5.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 !== '') {
const opts = {};
if (importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;

@@ -13,0 +13,0 @@ }

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

const index = require('./index-13ec3223.js');
const index = require('./index-feaabf7b.js');
function getAllElements(el, tag) {
const allSlottedElements = el.querySelectorAll(tag);
const allShadowsElements = el.shadowRoot ? el.shadowRoot.querySelectorAll(tag) : [];
return Array.from(allSlottedElements).concat(Array.from(allShadowsElements));
}
function r(o,e){let t=o.querySelectorAll(e),n=o.shadowRoot?o.shadowRoot.querySelectorAll(e):[];return Array.from(t).concat(Array.from(n))}function i(o,e){return new Promise(async t=>{let n=[],a=r(o,e);a&&a.length>0&&(a.forEach(m=>{n.push(m.lazyLoadContent());}),await Promise.all(n),t()),t();})}function l(o){return new Promise(e=>{if(!o){e();return}o.forEach(t=>{t.hasAttribute("data-src")&&(t.setAttribute("src",`${t.getAttribute("data-src")}`),t.removeAttribute("data-src"),t.classList.contains("deckgo-reveal")||t.style.setProperty("visibility","inherit")),t.style.setProperty("pointer-events","none");}),e();})}function d(o){return new Promise(e=>{if(!o){e();return}o.forEach(async t=>{await t.lazyLoad();}),e();})}function c(o){return new Promise(async e=>{let t=[];t.push(u(o)),t.push(f(o)),await Promise.all(t),e();})}function u(o){return new Promise(async e=>{let t=r(o,"img");await l(t),e();})}function f(o){return new Promise(async e=>{let t=r(o,"deckgo-lazy-img");await d(t),e();})}function P(o){return new Promise(e=>{let t=r(o,"img");t&&(t=t.filter(n=>n.getAttribute("data-src")),t.forEach(n=>{n.style.setProperty("visibility","hidden");})),e();})}var s="deckgo-reveal, deckgo-reveal-list, deckgo-highlight-code";async function M(o){let e=o.querySelectorAll(s);if(!e||e.length<=0)return;let t=Array.from(e).map(n=>n.revealAll());await Promise.all(t);}async function x(o){let e=o.querySelectorAll(s);if(!e||e.length<=0)return;let t=Array.from(e).map(n=>n.hideAll());await Promise.all(t);}function A(){return Promise.resolve()}async function C(o){let e=[];e.push(c(o)),e.push(i(o,"deckgo-gif")),e.push(i(o,"deckgo-youtube")),e.push(i(o,"deckgo-demo")),e.push(i(o,"deckgo-word-cloud")),e.push(i(o,"deckgo-markdown")),await Promise.all(e);}
function lazyLoadComponentContent(el, tag) {
return new Promise(async (resolve) => {
const promises = [];
const elements = getAllElements(el, tag);
if (elements && elements.length > 0) {
elements.forEach((element) => {
promises.push(element.lazyLoadContent());
});
await Promise.all(promises);
resolve();
}
resolve();
});
}
const deckdeckgoSlideBigImgCss = ":host{display:block;position:relative;-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);background:var(--background);color:var(--color);height:inherit;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;overflow:var(--overflow, hidden);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)) );min-height:calc( var(--slide-min-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );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}";
function lazyLoadSelectedImages(images) {
return new Promise((resolve) => {
if (!images) {
resolve();
return;
}
images.forEach((image) => {
if (image.hasAttribute('data-src')) {
image.setAttribute('src', `${image.getAttribute('data-src')}`);
image.removeAttribute('data-src');
if (!image.classList.contains('deckgo-reveal')) {
image.style.setProperty('visibility', 'inherit');
}
}
image.style.setProperty('pointer-events', 'none');
});
resolve();
});
}
function lazyLoadSelectedLazyImagesComponent(components) {
return new Promise((resolve) => {
if (!components) {
resolve();
return;
}
components.forEach(async (component) => {
await component.lazyLoad();
});
resolve();
});
}
function lazyLoadImages(el) {
return new Promise(async (resolve) => {
const promises = [];
promises.push(lazyLoadLazyImgTags(el));
promises.push(lazyLoadLazyImgComponents(el));
await Promise.all(promises);
resolve();
});
}
function lazyLoadLazyImgTags(el) {
return new Promise(async (resolve) => {
const images = getAllElements(el, 'img');
await lazyLoadSelectedImages(images);
resolve();
});
}
function lazyLoadLazyImgComponents(el) {
return new Promise(async (resolve) => {
const images = getAllElements(el, 'deckgo-lazy-img');
await lazyLoadSelectedLazyImagesComponent(images);
resolve();
});
}
function hideLazyLoadImages(el) {
return new Promise((resolve) => {
let images = getAllElements(el, 'img');
if (!images) {
resolve();
}
else {
images = images.filter((image) => image.getAttribute('data-src'));
images.forEach((image) => {
image.style.setProperty('visibility', 'hidden');
});
resolve();
}
});
}
function showAllRevealElements(el) {
return new Promise(async (resolve) => {
const elements = el.querySelectorAll('deckgo-reveal, deckgo-reveal-list');
if (elements && elements.length > 0) {
const promises = [];
for (const element of Array.from(elements)) {
promises.push(element.revealAll());
}
await Promise.all(promises);
}
resolve();
});
}
function hideAllRevealElements(el) {
return new Promise(async (resolve) => {
const elements = el.querySelectorAll('deckgo-reveal, deckgo-reveal-list');
if (elements && elements.length > 0) {
const promises = [];
for (const element of Array.from(elements)) {
promises.push(element.hideAll());
}
await Promise.all(promises);
}
resolve();
});
}
function afterSwipe() {
return new Promise((resolve) => {
resolve();
});
}
function lazyLoadContent(el) {
return new Promise(async (resolve) => {
const promises = [];
promises.push(lazyLoadImages(el));
promises.push(lazyLoadComponentContent(el, 'deckgo-gif'));
promises.push(lazyLoadComponentContent(el, 'deckgo-youtube'));
promises.push(lazyLoadComponentContent(el, 'deckgo-demo'));
promises.push(lazyLoadComponentContent(el, 'deckgo-word-cloud'));
promises.push(lazyLoadComponentContent(el, 'deckgo-markdown'));
await Promise.all(promises);
resolve();
});
}
const deckdeckgoSlideBigImgCss = ":host{display:block;position:relative;-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);background:var(--background);color:var(--color);height:inherit;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;overflow:var(--overflow, hidden);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)) );min-height:calc( var(--slide-min-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );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);

@@ -168,3 +33,3 @@ const DeckdeckgoSlideBigImg = class {

async componentDidLoad() {
await hideLazyLoadImages(this.el);
await P(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');

@@ -253,12 +118,12 @@ this.bigImg = this.el.shadowRoot.querySelector('img');

afterSwipe() {
return afterSwipe();
return A();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
return C(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
return M(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
return x(this.el);
}

@@ -265,0 +130,0 @@ render() {

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

const index = require('./index-13ec3223.js');
const index = require('./index-feaabf7b.js');
/*
Stencil Client Patch Esm v2.0.3 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Esm v2.5.2 | MIT Licensed | https://stenciljs.com
*/

@@ -11,0 +11,0 @@ const patchEsm = () => {

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

"name": "@stencil/core",
"version": "2.0.3",
"typescriptVersion": "4.0.2"
"version": "2.5.2",
"typescriptVersion": "4.2.3"
},

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

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

import{p as i,b as e}from"./p-c6257116.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),i(t)})().then(i=>e([["p-5637115a",[[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]}]]]],i));
import{p as i,b as e}from"./p-630bf7bb.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),i(t)})().then((i=>e([["p-ebf2a342",[[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]}]]]],i)));

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

import { p as promiseResolve, b as bootstrapLazy } from './index-3552aa55.js';
import { p as promiseResolve, b as bootstrapLazy } from './index-f48cd1d5.js';
/*
Stencil Client Patch Browser v2.0.3 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v2.5.2 | MIT Licensed | https://stenciljs.com
*/
const patchBrowser = () => {
const importMeta = import.meta.url;
const opts = {};
if ( importMeta !== '') {
const opts = {};
if (importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;

@@ -11,0 +11,0 @@ }

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

import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-3552aa55.js';
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-f48cd1d5.js';
function getAllElements(el, tag) {
const allSlottedElements = el.querySelectorAll(tag);
const allShadowsElements = el.shadowRoot ? el.shadowRoot.querySelectorAll(tag) : [];
return Array.from(allSlottedElements).concat(Array.from(allShadowsElements));
}
function r(o,e){let t=o.querySelectorAll(e),n=o.shadowRoot?o.shadowRoot.querySelectorAll(e):[];return Array.from(t).concat(Array.from(n))}function i(o,e){return new Promise(async t=>{let n=[],a=r(o,e);a&&a.length>0&&(a.forEach(m=>{n.push(m.lazyLoadContent());}),await Promise.all(n),t()),t();})}function l(o){return new Promise(e=>{if(!o){e();return}o.forEach(t=>{t.hasAttribute("data-src")&&(t.setAttribute("src",`${t.getAttribute("data-src")}`),t.removeAttribute("data-src"),t.classList.contains("deckgo-reveal")||t.style.setProperty("visibility","inherit")),t.style.setProperty("pointer-events","none");}),e();})}function d(o){return new Promise(e=>{if(!o){e();return}o.forEach(async t=>{await t.lazyLoad();}),e();})}function c(o){return new Promise(async e=>{let t=[];t.push(u(o)),t.push(f(o)),await Promise.all(t),e();})}function u(o){return new Promise(async e=>{let t=r(o,"img");await l(t),e();})}function f(o){return new Promise(async e=>{let t=r(o,"deckgo-lazy-img");await d(t),e();})}function P(o){return new Promise(e=>{let t=r(o,"img");t&&(t=t.filter(n=>n.getAttribute("data-src")),t.forEach(n=>{n.style.setProperty("visibility","hidden");})),e();})}var s="deckgo-reveal, deckgo-reveal-list, deckgo-highlight-code";async function M(o){let e=o.querySelectorAll(s);if(!e||e.length<=0)return;let t=Array.from(e).map(n=>n.revealAll());await Promise.all(t);}async function x(o){let e=o.querySelectorAll(s);if(!e||e.length<=0)return;let t=Array.from(e).map(n=>n.hideAll());await Promise.all(t);}function A(){return Promise.resolve()}async function C(o){let e=[];e.push(c(o)),e.push(i(o,"deckgo-gif")),e.push(i(o,"deckgo-youtube")),e.push(i(o,"deckgo-demo")),e.push(i(o,"deckgo-word-cloud")),e.push(i(o,"deckgo-markdown")),await Promise.all(e);}
function lazyLoadComponentContent(el, tag) {
return new Promise(async (resolve) => {
const promises = [];
const elements = getAllElements(el, tag);
if (elements && elements.length > 0) {
elements.forEach((element) => {
promises.push(element.lazyLoadContent());
});
await Promise.all(promises);
resolve();
}
resolve();
});
}
const deckdeckgoSlideBigImgCss = ":host{display:block;position:relative;-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);background:var(--background);color:var(--color);height:inherit;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;overflow:var(--overflow, hidden);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)) );min-height:calc( var(--slide-min-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );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}";
function lazyLoadSelectedImages(images) {
return new Promise((resolve) => {
if (!images) {
resolve();
return;
}
images.forEach((image) => {
if (image.hasAttribute('data-src')) {
image.setAttribute('src', `${image.getAttribute('data-src')}`);
image.removeAttribute('data-src');
if (!image.classList.contains('deckgo-reveal')) {
image.style.setProperty('visibility', 'inherit');
}
}
image.style.setProperty('pointer-events', 'none');
});
resolve();
});
}
function lazyLoadSelectedLazyImagesComponent(components) {
return new Promise((resolve) => {
if (!components) {
resolve();
return;
}
components.forEach(async (component) => {
await component.lazyLoad();
});
resolve();
});
}
function lazyLoadImages(el) {
return new Promise(async (resolve) => {
const promises = [];
promises.push(lazyLoadLazyImgTags(el));
promises.push(lazyLoadLazyImgComponents(el));
await Promise.all(promises);
resolve();
});
}
function lazyLoadLazyImgTags(el) {
return new Promise(async (resolve) => {
const images = getAllElements(el, 'img');
await lazyLoadSelectedImages(images);
resolve();
});
}
function lazyLoadLazyImgComponents(el) {
return new Promise(async (resolve) => {
const images = getAllElements(el, 'deckgo-lazy-img');
await lazyLoadSelectedLazyImagesComponent(images);
resolve();
});
}
function hideLazyLoadImages(el) {
return new Promise((resolve) => {
let images = getAllElements(el, 'img');
if (!images) {
resolve();
}
else {
images = images.filter((image) => image.getAttribute('data-src'));
images.forEach((image) => {
image.style.setProperty('visibility', 'hidden');
});
resolve();
}
});
}
function showAllRevealElements(el) {
return new Promise(async (resolve) => {
const elements = el.querySelectorAll('deckgo-reveal, deckgo-reveal-list');
if (elements && elements.length > 0) {
const promises = [];
for (const element of Array.from(elements)) {
promises.push(element.revealAll());
}
await Promise.all(promises);
}
resolve();
});
}
function hideAllRevealElements(el) {
return new Promise(async (resolve) => {
const elements = el.querySelectorAll('deckgo-reveal, deckgo-reveal-list');
if (elements && elements.length > 0) {
const promises = [];
for (const element of Array.from(elements)) {
promises.push(element.hideAll());
}
await Promise.all(promises);
}
resolve();
});
}
function afterSwipe() {
return new Promise((resolve) => {
resolve();
});
}
function lazyLoadContent(el) {
return new Promise(async (resolve) => {
const promises = [];
promises.push(lazyLoadImages(el));
promises.push(lazyLoadComponentContent(el, 'deckgo-gif'));
promises.push(lazyLoadComponentContent(el, 'deckgo-youtube'));
promises.push(lazyLoadComponentContent(el, 'deckgo-demo'));
promises.push(lazyLoadComponentContent(el, 'deckgo-word-cloud'));
promises.push(lazyLoadComponentContent(el, 'deckgo-markdown'));
await Promise.all(promises);
resolve();
});
}
const deckdeckgoSlideBigImgCss = ":host{display:block;position:relative;-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);background:var(--background);color:var(--color);height:inherit;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;overflow:var(--overflow, hidden);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)) );min-height:calc( var(--slide-min-height) - var(--slide-padding-top, var(--slide-padding-top-default)) - var(--slide-padding-bottom, var(--slide-padding-bottom-default)) );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);

@@ -163,3 +28,3 @@ const DeckdeckgoSlideBigImg = class {

async componentDidLoad() {
await hideLazyLoadImages(this.el);
await P(this.el);
this.crop = this.el.shadowRoot.querySelector('.deckgo-big-img-container');

@@ -248,12 +113,12 @@ this.bigImg = this.el.shadowRoot.querySelector('img');

afterSwipe() {
return afterSwipe();
return A();
}
lazyLoadContent() {
return lazyLoadContent(this.el);
return C(this.el);
}
revealContent() {
return showAllRevealElements(this.el);
return M(this.el);
}
hideContent() {
return hideAllRevealElements(this.el);
return x(this.el);
}

@@ -260,0 +125,0 @@ render() {

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

import { p as promiseResolve, b as bootstrapLazy } from './index-3552aa55.js';
import { p as promiseResolve, b as bootstrapLazy } from './index-f48cd1d5.js';
/*
Stencil Client Patch Esm v2.0.3 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Esm v2.5.2 | MIT Licensed | https://stenciljs.com
*/

@@ -6,0 +6,0 @@ const patchEsm = () => {

@@ -11,3 +11,3 @@ export function applyPolyfills() {

function checkIfURLIsSupported() {
var checkIfURLIsSupported = function() {
try {

@@ -20,3 +20,3 @@ var u = new URL('b', 'http://a');

}
}
};

@@ -23,0 +23,0 @@ if (

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

/**
* The `Env` object provides access to the "env" object declared in the project's `stencil.config.ts`.
*/
export declare const Env: {
[prop: string]: string | undefined;
};
/**
* The `@Component()` decorator is used to provide metadata about the component class.

@@ -213,2 +219,3 @@ * https://stenciljs.com/docs/component

export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
/**

@@ -273,2 +280,7 @@ * `setMode()` is used for libraries which provide multiple "modes" for styles.

/**
* `setErrorHandler()` can be used to inject a custom global error handler.
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
*/
export declare const setErrorHandler: (handler: ErrorHandler) => void;
/**
* This file gets copied to all distributions of stencil component collections.

@@ -436,9 +448,9 @@ * - no imports

function h(sel: any): VNode;
function h(sel: Node, data: VNodeData): VNode;
function h(sel: any, data: VNodeData): VNode;
function h(sel: Node, data: VNodeData | null): VNode;
function h(sel: any, data: VNodeData | null): VNode;
function h(sel: any, text: string): VNode;
function h(sel: any, children: Array<VNode | undefined | null>): VNode;
function h(sel: any, data: VNodeData, text: string): VNode;
function h(sel: any, data: VNodeData, children: Array<VNode | undefined | null>): VNode;
function h(sel: any, data: VNodeData, children: VNode): VNode;
function h(sel: any, data: VNodeData | null, text: string): VNode;
function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
function h(sel: any, data: VNodeData | null, children: VNode): VNode;
namespace JSX {

@@ -450,2 +462,10 @@ interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {

}
export declare function h(sel: any): VNode;
export declare function h(sel: Node, data: VNodeData | null): VNode;
export declare function h(sel: any, data: VNodeData | null): VNode;
export declare function h(sel: any, text: string): VNode;
export declare function h(sel: any, children: Array<VNode | undefined | null>): VNode;
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
export interface VNode {

@@ -1427,6 +1447,6 @@ $flags$: number;

onFocusCapture?: (event: FocusEvent) => void;
onFocusIn?: (event: FocusEvent) => void;
onFocusInCapture?: (event: FocusEvent) => void;
onFocusOut?: (event: FocusEvent) => void;
onFocusOutCapture?: (event: FocusEvent) => void;
onFocusin?: (event: FocusEvent) => void;
onFocusinCapture?: (event: FocusEvent) => void;
onFocusout?: (event: FocusEvent) => void;
onFocusoutCapture?: (event: FocusEvent) => void;
onBlur?: (event: FocusEvent) => void;

@@ -1433,0 +1453,0 @@ onBlurCapture?: (event: FocusEvent) => void;

{
"name": "@deckdeckgo/slide-big-img",
"version": "2.2.2",
"version": "2.3.0",
"description": "Display in your presentation an image fullscreen and highlight specific part of it using the Big Image slide",

@@ -26,12 +26,12 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@deckdeckgo/slide-utils": "^2.6.1"
"@deckdeckgo/slide-utils": "^4.0.0"
},
"devDependencies": {
"@stencil/core": "^2.0.3",
"@stencil/postcss": "^1.0.1",
"@stencil/sass": "^1.3.2",
"@stencil/core": "^2.5.2",
"@stencil/postcss": "^2.0.0",
"@stencil/sass": "^1.4.1",
"@stencil/utils": "0.0.5",
"autoprefixer": "^9.8.6",
"husky": "^4.3.0",
"prettier": "2.1.2",
"autoprefixer": "^10.2.5",
"husky": "^6.0.0",
"prettier": "2.3.0",
"pretty-quick": "^3.1.0"

@@ -41,8 +41,11 @@ },

"type": "git",
"url": "git+https://github.com/deckgo/deckdeckgo.git"
"url": "git+https://github.com/deckgo-community/big-img.git"
},
"author": "Noël Macé",
"author": {
"name": "Noël Macé",
"url": "https://noelmace.com/"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/deckgo/deckdeckgo"
"url": "https://github.com/deckgo-community/big-img"
},

@@ -49,0 +52,0 @@ "homepage": "https://deckdeckgo.com",

@@ -7,22 +7,111 @@ [![npm][npm-badge]][npm-badge-url]

[npm-license]: https://img.shields.io/npm/l/@deckdeckgo/slide-big-img
[npm-license-url]: https://github.com/deckgo/deckdeckgo/blob/master/webcomponents/slides/big-img/LICENSE
[npm-license-url]: https://github.com/deckgo-community/big-img/blob/master/LICENSE
# DeckDeckGo - Slide "Big Image"
This component is the slide/template "Big Image" of [DeckDeckGo].
If you would like to display a fullscreen image in your presentation and select specific part of it, in order to to zoom in/highlight them, the "Big Image" slide is the one you are looking for.
It is developed with [Stencil](https://stenciljs.com).
## Table of contents
- [Getting Started](#getting-started)
- [Installation](#installation)
- [From a CDN](#from-a-cdn)
- [From NPM](#from-npm)
- [Framework integration](#framework-integration)
- [Usage](#usage)
- [Slots](#slots)
- [Attributes](#attributes)
- [Theming](#theming)
- [Development](#development)
- [License](#license)
## Getting Started
## Installation
This template could be added to your presentation using the following methods.
### From a CDN
It's recommended to use [unpkg](https://unpkg.com/) if you want to use this template from a CDN. To do so, add the following include script in the main HTML file of your project:
```
<script type="module" src="https://unpkg.com/@deckdeckgo/slide-big-img@latest/dist/deckdeckgo-slide-big-img/deckdeckgo-slide-big-img.esm.js"></script>
```
### From NPM
To install this template in your project from [npm](https://www.npmjs.com/package/@deckdeckgo/slide-big-img) run the following command:
```bash
npm install @deckdeckgo/slide-big-img
```
### Framework integration
The [Stencil documentation](https://stenciljs.com/docs/overview) provide examples of framework integration for [Angular](https://stenciljs.com/docs/angular), [React](https://stenciljs.com/docs/react), [Vue](https://stenciljs.com/docs/vue) and [Ember](https://stenciljs.com/docs/ember).
That being said, commonly, you might either `import` or `load` it:
#### Import
```
import '@deckdeckgo/slide-big-img';
```
#### Loader
```
import { defineCustomElements as deckDeckGoSlideElement } from '@deckdeckgo/slide-big-img/dist/loader';
deckDeckGoSlideElement();
```
## Usage
The "Big Image" slide's Web Component could be integrated using the tag `<deckgo-slide-big-img/>`.
```
<deckgo-slide-big-img
img-src="https://raw.githubusercontent.com/noelmace/deckdeckgo/big-img/webcomponents/slides/big-img/showcase/big-deckdeckgo.jpg"
img-divisions="500;1100;1700"
axis="y">
</deckgo-slide-big-img>
```
### Slots
The slots `title` is optional (it is not displayed but could be use for the navigation). Otherwise no particular slots are currently available in order to display additional information on this template.
## Attributes
This component offers the following options which could be set using attributes:
| Attribute | Type | Default | Description |
| -------------- | ---------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| img-src | string | | An image URI which should be first displayed full screen before being divided in separate parts presented on the next slides. |
| img-alt | string | | An optional accessibility alt for the image. |
| img-divisions | string | | A list of anchors for the divisions of the image (in pixels). |
| axis | 'x' or 'y' | | The axis which should be used to apply the division. |
| reverse | boolean | false | In which order should the specific part be highlighted. |
| custom-actions | boolean | false | If you would provide actions for the all deck and a specific one for this slide, set this option to `true` |
## Theming
The following theming options will affect this component if set on its host or parent.
| CSS4 variable | Default | Note |
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| --background | | |
| --color | | |
| --slide-padding-top | 16px | Padding top of the all slide |
| --slide-padding-end | 32px | Padding right of the all slide |
| --slide-padding-bottom | 16px | Padding bottom of the all slide |
| --slide-padding-start | 32px | Padding left of the all slide |
| --zIndex | 1 | The z-index of the slide |
| --slide-img-max-width | | A maximal width value for the image. Useful in case you would like to display your deck in a container respectively not full window/screen. |
## Development
To develop and run this Web Component locally, proceed as following:
```
git clone https://github.com/deckgo/deckdeckgo
cd deckdeckgo/webcomponents/slides/big-img
git clone https://github.com/deckgo-community/big-img
cd big-img
npm install

@@ -34,4 +123,4 @@ npm run start

MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com) and [Nicolas Mattia](mailto:nicolas@nmattia.com)
MIT © [David Dal Busco](mailto:david.dalbusco@outlook.com), [Nicolas Mattia](mailto:nicolas@nmattia.com) & [Noël Macé](mailto:contact@noelmace.com)
[deckdeckgo]: https://deckdeckgo.com

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