From e9b09a833f752fc937014f22dba6ffbaa00659e5 Mon Sep 17 00:00:00 2001 From: Chen Fengyuan Date: Sun, 15 Jul 2018 18:28:09 +0800 Subject: [PATCH] build: release 1.2.0 --- CHANGELOG.md | 2 +- README.md | 2 +- dist/viewer.common.js | 220 +++++-- dist/viewer.css | 24 +- dist/viewer.esm.js | 220 +++++-- dist/viewer.js | 220 +++++-- dist/viewer.min.css | 6 +- dist/viewer.min.js | 6 +- docs/css/viewer.css | 24 +- docs/index.html | 6 +- docs/js/main.js | 31 +- docs/js/viewer.js | 220 +++++-- package-lock.json | 1303 ++++++++++++++++++++++------------------- package.json | 12 +- 14 files changed, 1406 insertions(+), 890 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a634bec6..41452673 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## next +## 1.2.0 (Jul 15, 2018) - Add 2 new options: `toggleOnDblclick` (#173) and `initialViewIndex` (#183). - Enhance the `title` option to support to customize title content (#54, #185). diff --git a/README.md b/README.md index 1eb09817..e797f324 100644 --- a/README.md +++ b/README.md @@ -890,7 +890,7 @@ Please read through our [contributing guidelines](.github/CONTRIBUTING.md). ## Versioning -Maintained under the [Semantic Versioning guidelines](http://semver.org/). +Maintained under the [Semantic Versioning guidelines](https://semver.org/). ## License diff --git a/dist/viewer.common.js b/dist/viewer.common.js index df455449..c42a3484 100644 --- a/dist/viewer.common.js +++ b/dist/viewer.common.js @@ -1,101 +1,196 @@ /*! - * Viewer.js v1.1.0 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-27T07:33:19.361Z + * Date: 2018-07-15T10:10:54.376Z */ 'use strict'; var DEFAULTS = { - // Enable inline mode + /** + * Define the initial index of image for viewing. + * @type {number} + */ + initialViewIndex: 0, + + /** + * Enable inline mode. + * @type {boolean} + */ inline: false, - // Show the button on the top-right of the viewer + /** + * Show the button on the top-right of the viewer. + * @type {boolean} + */ button: true, - // Show the navbar + /** + * Show the navbar. + * @type {boolean | number} + */ navbar: true, - // Show the title + /** + * Specify the visibility and the content of the title. + * @type {boolean | number | Function | Array} + */ title: true, - // Show the toolbar + /** + * Show the toolbar. + * @type {boolean | number | Object} + */ toolbar: true, - // Show the tooltip with image ratio (percentage) when zoom in or zoom out + /** + * Show the tooltip with image ratio (percentage) when zoom in or zoom out. + * @type {boolean} + */ tooltip: true, - // Enable to move the image + /** + * Enable to move the image. + * @type {boolean} + */ movable: true, - // Enable to zoom the image + /** + * Enable to zoom the image. + * @type {boolean} + */ zoomable: true, - // Enable to rotate the image + /** + * Enable to rotate the image. + * @type {boolean} + */ rotatable: true, - // Enable to scale the image + /** + * Enable to scale the image. + * @type {boolean} + */ scalable: true, - // Enable CSS3 Transition for some special elements + /** + * Enable CSS3 Transition for some special elements. + * @type {boolean} + */ transition: true, - // Enable to request fullscreen when play + /** + * Enable to request fullscreen when play. + * @type {boolean} + */ fullscreen: true, - // The amount of time to delay between automatically cycling an image when playing. + /** + * The amount of time to delay between automatically cycling an image when playing. + * @type {number} + */ interval: 5000, - // Enable keyboard support + /** + * Enable keyboard support. + * @type {boolean} + */ keyboard: true, - // Enable a modal backdrop, specify `static` for a backdrop which doesn't close the modal on click + /** + * Enable a modal backdrop, specify `static` for a backdrop + * which doesn't close the modal on click. + * @type {boolean} + */ backdrop: true, - // Indicate if show a loading spinner when load image or not. + /** + * Indicate if show a loading spinner when load image or not. + * @type {boolean} + */ loading: true, - // Indicate if enable loop viewing or not. + /** + * Indicate if enable loop viewing or not. + * @type {boolean} + */ loop: true, - // Min width of the viewer in inline mode + /** + * Min width of the viewer in inline mode. + * @type {number} + */ minWidth: 200, - // Min height of the viewer in inline mode + /** + * Min height of the viewer in inline mode. + * @type {number} + */ minHeight: 100, - // Define the ratio when zoom the image by wheeling mouse + /** + * Define the ratio when zoom the image by wheeling mouse. + * @type {number} + */ zoomRatio: 0.1, - // Define the min ratio of the image when zoom out + /** + * Define the min ratio of the image when zoom out. + * @type {number} + */ minZoomRatio: 0.01, - // Define the max ratio of the image when zoom in + /** + * Define the max ratio of the image when zoom in. + * @type {number} + */ maxZoomRatio: 100, - // Define the CSS `z-index` value of viewer in modal mode. + /** + * Define the CSS `z-index` value of viewer in modal mode. + * @type {number} + */ zIndex: 2015, - // Define the CSS `z-index` value of viewer in inline mode. + /** + * Define the CSS `z-index` value of viewer in inline mode. + * @type {number} + */ zIndexInline: 0, - // Define where to get the original image URL for viewing - // Type: String (an image attribute) or Function (should return an image URL) + /** + * Define where to get the original image URL for viewing. + * @type {string | Function} + */ url: 'src', - // Define where to put the viewer in modal mode. - // Type: String | Element + /** + * Define where to put the viewer in modal mode. + * @type {string | Element} + */ container: 'body', - // Filter the images for viewing. - // Type: Function (return true if the image is viewable) + /** + * Filter the images for viewing. Return true if the image is viewable. + * @type {Function} + */ filter: null, - // Event shortcuts + /** + * Indicate if toggle the image size between its natural size + * and initial size when double click on the image or not. + * @type {boolean} + */ + toggleOnDblclick: true, + + /** + * Event shortcuts. + * @type {Function} + */ ready: null, show: null, shown: null, @@ -138,25 +233,26 @@ var CLASS_SHOW = NAMESPACE + '-show'; var CLASS_TRANSITION = NAMESPACE + '-transition'; // Events -var EVENT_READY = 'ready'; -var EVENT_SHOW = 'show'; -var EVENT_SHOWN = 'shown'; -var EVENT_HIDE = 'hide'; -var EVENT_HIDDEN = 'hidden'; -var EVENT_VIEW = 'view'; -var EVENT_VIEWED = 'viewed'; -var EVENT_ZOOM = 'zoom'; -var EVENT_ZOOMED = 'zoomed'; var EVENT_CLICK = 'click'; +var EVENT_DBLCLICK = 'dblclick'; var EVENT_DRAG_START = 'dragstart'; +var EVENT_HIDDEN = 'hidden'; +var EVENT_HIDE = 'hide'; var EVENT_KEY_DOWN = 'keydown'; var EVENT_LOAD = 'load'; var EVENT_POINTER_DOWN = WINDOW.PointerEvent ? 'pointerdown' : 'touchstart mousedown'; var EVENT_POINTER_MOVE = WINDOW.PointerEvent ? 'pointermove' : 'touchmove mousemove'; var EVENT_POINTER_UP = WINDOW.PointerEvent ? 'pointerup pointercancel' : 'touchend touchcancel mouseup'; +var EVENT_READY = 'ready'; var EVENT_RESIZE = 'resize'; +var EVENT_SHOW = 'show'; +var EVENT_SHOWN = 'shown'; var EVENT_TRANSITION_END = 'transitionend'; +var EVENT_VIEW = 'view'; +var EVENT_VIEWED = 'viewed'; var EVENT_WHEEL = 'wheel mousewheel DOMMouseScroll'; +var EVENT_ZOOM = 'zoom'; +var EVENT_ZOOMED = 'zoomed'; // Data keys var DATA_ACTION = NAMESPACE + 'Action'; @@ -452,7 +548,9 @@ function hyphenate(value) { function getData(element, name) { if (isObject(element[name])) { return element[name]; - } else if (element.dataset) { + } + + if (element.dataset) { return element.dataset[name]; } @@ -1083,28 +1181,40 @@ var render = { var events = { bind: function bind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this)); addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this)); addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this)); - addListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); + + if (this.options.toggleOnDblclick) { + addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this)); + } + + addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this)); addListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this)); addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this)); }, unbind: function unbind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; removeListener(viewer, EVENT_CLICK, this.onClick); removeListener(viewer, EVENT_WHEEL, this.onWheel); removeListener(viewer, EVENT_DRAG_START, this.onDragStart); - removeListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown); + + if (this.options.toggleOnDblclick) { + removeListener(canvas, EVENT_DBLCLICK, this.onDblclick); + } + + removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown); removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove); removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp); removeListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown); @@ -1194,6 +1304,11 @@ var handlers = { } } }, + dblclick: function dblclick(event) { + if (event.target.parentElement === this.canvas) { + this.toggle(); + } + }, load: function load() { var _this = this; @@ -1659,7 +1774,7 @@ var methods = { view: function view() { var _this = this; - var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.initialViewIndex; index = Number(index) || 0; @@ -1729,8 +1844,9 @@ var methods = { var onViewed = function onViewed() { var imageData = _this.imageData; + var render = Array.isArray(options.title) ? options.title[1] : options.title; - title.textContent = alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; + title.innerHTML = isFunction(render) ? render.call(_this, image, imageData) : alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; }; var onLoad = void 0; @@ -2701,7 +2817,7 @@ var Viewer = function () { this.fulled = false; this.hiding = false; this.imageData = {}; - this.index = 0; + this.index = this.options.initialViewIndex; this.isImg = false; this.isShown = false; this.length = 0; @@ -2854,7 +2970,7 @@ var Viewer = function () { this.player = viewer.querySelector('.' + NAMESPACE + '-player'); this.list = viewer.querySelector('.' + NAMESPACE + '-list'); - addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(options.title)); + addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title)); addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar)); toggleClass(button, CLASS_HIDE, !options.button); @@ -2985,7 +3101,7 @@ var Viewer = function () { } if (this.ready && options.inline) { - this.view(); + this.view(this.index); } } diff --git a/dist/viewer.css b/dist/viewer.css index fa8d8eff..2da0e5f2 100644 --- a/dist/viewer.css +++ b/dist/viewer.css @@ -1,11 +1,11 @@ /*! - * Viewer.js v1.1.0 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-27T07:33:11.301Z + * Date: 2018-07-15T10:09:17.532Z */ .viewer-zoom-in::before, @@ -237,14 +237,14 @@ top: 0; } -.viewer-toolbar ul { +.viewer-toolbar > ul { display: inline-block; margin: 0 auto 5px; overflow: hidden; padding: 3px 0; } -.viewer-toolbar li { +.viewer-toolbar > ul > li { background-color: rgba(0, 0, 0, .5); border-radius: 50%; cursor: pointer; @@ -256,42 +256,42 @@ width: 24px; } -.viewer-toolbar li:hover { +.viewer-toolbar > ul > li:hover { background-color: rgba(0, 0, 0, .8); } -.viewer-toolbar li::before { +.viewer-toolbar > ul > li::before { margin: 2px; } -.viewer-toolbar li + li { +.viewer-toolbar > ul > li + li { margin-left: 1px; } -.viewer-toolbar .viewer-small { +.viewer-toolbar > ul > .viewer-small { height: 18px; margin-bottom: 3px; margin-top: 3px; width: 18px; } -.viewer-toolbar .viewer-small::before { +.viewer-toolbar > ul > .viewer-small::before { margin: -1px; } -.viewer-toolbar .viewer-large { +.viewer-toolbar > ul > .viewer-large { height: 30px; margin-bottom: -3px; margin-top: -3px; width: 30px; } -.viewer-toolbar .viewer-large::before { +.viewer-toolbar > ul > .viewer-large::before { margin: 5px; } .viewer-tooltip { - background-color: rgba(0, 0, 0, .8); + background-color: rgba(0, 0, 0, 0.8); border-radius: 10px; color: #fff; display: none; diff --git a/dist/viewer.esm.js b/dist/viewer.esm.js index 8abb4199..4311cc4c 100644 --- a/dist/viewer.esm.js +++ b/dist/viewer.esm.js @@ -1,99 +1,194 @@ /*! - * Viewer.js v1.1.0 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-27T07:33:19.361Z + * Date: 2018-07-15T10:10:54.376Z */ var DEFAULTS = { - // Enable inline mode + /** + * Define the initial index of image for viewing. + * @type {number} + */ + initialViewIndex: 0, + + /** + * Enable inline mode. + * @type {boolean} + */ inline: false, - // Show the button on the top-right of the viewer + /** + * Show the button on the top-right of the viewer. + * @type {boolean} + */ button: true, - // Show the navbar + /** + * Show the navbar. + * @type {boolean | number} + */ navbar: true, - // Show the title + /** + * Specify the visibility and the content of the title. + * @type {boolean | number | Function | Array} + */ title: true, - // Show the toolbar + /** + * Show the toolbar. + * @type {boolean | number | Object} + */ toolbar: true, - // Show the tooltip with image ratio (percentage) when zoom in or zoom out + /** + * Show the tooltip with image ratio (percentage) when zoom in or zoom out. + * @type {boolean} + */ tooltip: true, - // Enable to move the image + /** + * Enable to move the image. + * @type {boolean} + */ movable: true, - // Enable to zoom the image + /** + * Enable to zoom the image. + * @type {boolean} + */ zoomable: true, - // Enable to rotate the image + /** + * Enable to rotate the image. + * @type {boolean} + */ rotatable: true, - // Enable to scale the image + /** + * Enable to scale the image. + * @type {boolean} + */ scalable: true, - // Enable CSS3 Transition for some special elements + /** + * Enable CSS3 Transition for some special elements. + * @type {boolean} + */ transition: true, - // Enable to request fullscreen when play + /** + * Enable to request fullscreen when play. + * @type {boolean} + */ fullscreen: true, - // The amount of time to delay between automatically cycling an image when playing. + /** + * The amount of time to delay between automatically cycling an image when playing. + * @type {number} + */ interval: 5000, - // Enable keyboard support + /** + * Enable keyboard support. + * @type {boolean} + */ keyboard: true, - // Enable a modal backdrop, specify `static` for a backdrop which doesn't close the modal on click + /** + * Enable a modal backdrop, specify `static` for a backdrop + * which doesn't close the modal on click. + * @type {boolean} + */ backdrop: true, - // Indicate if show a loading spinner when load image or not. + /** + * Indicate if show a loading spinner when load image or not. + * @type {boolean} + */ loading: true, - // Indicate if enable loop viewing or not. + /** + * Indicate if enable loop viewing or not. + * @type {boolean} + */ loop: true, - // Min width of the viewer in inline mode + /** + * Min width of the viewer in inline mode. + * @type {number} + */ minWidth: 200, - // Min height of the viewer in inline mode + /** + * Min height of the viewer in inline mode. + * @type {number} + */ minHeight: 100, - // Define the ratio when zoom the image by wheeling mouse + /** + * Define the ratio when zoom the image by wheeling mouse. + * @type {number} + */ zoomRatio: 0.1, - // Define the min ratio of the image when zoom out + /** + * Define the min ratio of the image when zoom out. + * @type {number} + */ minZoomRatio: 0.01, - // Define the max ratio of the image when zoom in + /** + * Define the max ratio of the image when zoom in. + * @type {number} + */ maxZoomRatio: 100, - // Define the CSS `z-index` value of viewer in modal mode. + /** + * Define the CSS `z-index` value of viewer in modal mode. + * @type {number} + */ zIndex: 2015, - // Define the CSS `z-index` value of viewer in inline mode. + /** + * Define the CSS `z-index` value of viewer in inline mode. + * @type {number} + */ zIndexInline: 0, - // Define where to get the original image URL for viewing - // Type: String (an image attribute) or Function (should return an image URL) + /** + * Define where to get the original image URL for viewing. + * @type {string | Function} + */ url: 'src', - // Define where to put the viewer in modal mode. - // Type: String | Element + /** + * Define where to put the viewer in modal mode. + * @type {string | Element} + */ container: 'body', - // Filter the images for viewing. - // Type: Function (return true if the image is viewable) + /** + * Filter the images for viewing. Return true if the image is viewable. + * @type {Function} + */ filter: null, - // Event shortcuts + /** + * Indicate if toggle the image size between its natural size + * and initial size when double click on the image or not. + * @type {boolean} + */ + toggleOnDblclick: true, + + /** + * Event shortcuts. + * @type {Function} + */ ready: null, show: null, shown: null, @@ -136,25 +231,26 @@ var CLASS_SHOW = NAMESPACE + '-show'; var CLASS_TRANSITION = NAMESPACE + '-transition'; // Events -var EVENT_READY = 'ready'; -var EVENT_SHOW = 'show'; -var EVENT_SHOWN = 'shown'; -var EVENT_HIDE = 'hide'; -var EVENT_HIDDEN = 'hidden'; -var EVENT_VIEW = 'view'; -var EVENT_VIEWED = 'viewed'; -var EVENT_ZOOM = 'zoom'; -var EVENT_ZOOMED = 'zoomed'; var EVENT_CLICK = 'click'; +var EVENT_DBLCLICK = 'dblclick'; var EVENT_DRAG_START = 'dragstart'; +var EVENT_HIDDEN = 'hidden'; +var EVENT_HIDE = 'hide'; var EVENT_KEY_DOWN = 'keydown'; var EVENT_LOAD = 'load'; var EVENT_POINTER_DOWN = WINDOW.PointerEvent ? 'pointerdown' : 'touchstart mousedown'; var EVENT_POINTER_MOVE = WINDOW.PointerEvent ? 'pointermove' : 'touchmove mousemove'; var EVENT_POINTER_UP = WINDOW.PointerEvent ? 'pointerup pointercancel' : 'touchend touchcancel mouseup'; +var EVENT_READY = 'ready'; var EVENT_RESIZE = 'resize'; +var EVENT_SHOW = 'show'; +var EVENT_SHOWN = 'shown'; var EVENT_TRANSITION_END = 'transitionend'; +var EVENT_VIEW = 'view'; +var EVENT_VIEWED = 'viewed'; var EVENT_WHEEL = 'wheel mousewheel DOMMouseScroll'; +var EVENT_ZOOM = 'zoom'; +var EVENT_ZOOMED = 'zoomed'; // Data keys var DATA_ACTION = NAMESPACE + 'Action'; @@ -450,7 +546,9 @@ function hyphenate(value) { function getData(element, name) { if (isObject(element[name])) { return element[name]; - } else if (element.dataset) { + } + + if (element.dataset) { return element.dataset[name]; } @@ -1081,28 +1179,40 @@ var render = { var events = { bind: function bind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this)); addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this)); addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this)); - addListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); + + if (this.options.toggleOnDblclick) { + addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this)); + } + + addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this)); addListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this)); addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this)); }, unbind: function unbind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; removeListener(viewer, EVENT_CLICK, this.onClick); removeListener(viewer, EVENT_WHEEL, this.onWheel); removeListener(viewer, EVENT_DRAG_START, this.onDragStart); - removeListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown); + + if (this.options.toggleOnDblclick) { + removeListener(canvas, EVENT_DBLCLICK, this.onDblclick); + } + + removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown); removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove); removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp); removeListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown); @@ -1192,6 +1302,11 @@ var handlers = { } } }, + dblclick: function dblclick(event) { + if (event.target.parentElement === this.canvas) { + this.toggle(); + } + }, load: function load() { var _this = this; @@ -1657,7 +1772,7 @@ var methods = { view: function view() { var _this = this; - var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.initialViewIndex; index = Number(index) || 0; @@ -1727,8 +1842,9 @@ var methods = { var onViewed = function onViewed() { var imageData = _this.imageData; + var render = Array.isArray(options.title) ? options.title[1] : options.title; - title.textContent = alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; + title.innerHTML = isFunction(render) ? render.call(_this, image, imageData) : alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; }; var onLoad = void 0; @@ -2699,7 +2815,7 @@ var Viewer = function () { this.fulled = false; this.hiding = false; this.imageData = {}; - this.index = 0; + this.index = this.options.initialViewIndex; this.isImg = false; this.isShown = false; this.length = 0; @@ -2852,7 +2968,7 @@ var Viewer = function () { this.player = viewer.querySelector('.' + NAMESPACE + '-player'); this.list = viewer.querySelector('.' + NAMESPACE + '-list'); - addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(options.title)); + addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title)); addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar)); toggleClass(button, CLASS_HIDE, !options.button); @@ -2983,7 +3099,7 @@ var Viewer = function () { } if (this.ready && options.inline) { - this.view(); + this.view(this.index); } } diff --git a/dist/viewer.js b/dist/viewer.js index ec11a2f0..3e86b501 100644 --- a/dist/viewer.js +++ b/dist/viewer.js @@ -1,11 +1,11 @@ /*! - * Viewer.js v1.1.0 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-27T07:33:19.361Z + * Date: 2018-07-15T10:10:54.376Z */ (function (global, factory) { @@ -15,91 +15,186 @@ }(this, (function () { 'use strict'; var DEFAULTS = { - // Enable inline mode + /** + * Define the initial index of image for viewing. + * @type {number} + */ + initialViewIndex: 0, + + /** + * Enable inline mode. + * @type {boolean} + */ inline: false, - // Show the button on the top-right of the viewer + /** + * Show the button on the top-right of the viewer. + * @type {boolean} + */ button: true, - // Show the navbar + /** + * Show the navbar. + * @type {boolean | number} + */ navbar: true, - // Show the title + /** + * Specify the visibility and the content of the title. + * @type {boolean | number | Function | Array} + */ title: true, - // Show the toolbar + /** + * Show the toolbar. + * @type {boolean | number | Object} + */ toolbar: true, - // Show the tooltip with image ratio (percentage) when zoom in or zoom out + /** + * Show the tooltip with image ratio (percentage) when zoom in or zoom out. + * @type {boolean} + */ tooltip: true, - // Enable to move the image + /** + * Enable to move the image. + * @type {boolean} + */ movable: true, - // Enable to zoom the image + /** + * Enable to zoom the image. + * @type {boolean} + */ zoomable: true, - // Enable to rotate the image + /** + * Enable to rotate the image. + * @type {boolean} + */ rotatable: true, - // Enable to scale the image + /** + * Enable to scale the image. + * @type {boolean} + */ scalable: true, - // Enable CSS3 Transition for some special elements + /** + * Enable CSS3 Transition for some special elements. + * @type {boolean} + */ transition: true, - // Enable to request fullscreen when play + /** + * Enable to request fullscreen when play. + * @type {boolean} + */ fullscreen: true, - // The amount of time to delay between automatically cycling an image when playing. + /** + * The amount of time to delay between automatically cycling an image when playing. + * @type {number} + */ interval: 5000, - // Enable keyboard support + /** + * Enable keyboard support. + * @type {boolean} + */ keyboard: true, - // Enable a modal backdrop, specify `static` for a backdrop which doesn't close the modal on click + /** + * Enable a modal backdrop, specify `static` for a backdrop + * which doesn't close the modal on click. + * @type {boolean} + */ backdrop: true, - // Indicate if show a loading spinner when load image or not. + /** + * Indicate if show a loading spinner when load image or not. + * @type {boolean} + */ loading: true, - // Indicate if enable loop viewing or not. + /** + * Indicate if enable loop viewing or not. + * @type {boolean} + */ loop: true, - // Min width of the viewer in inline mode + /** + * Min width of the viewer in inline mode. + * @type {number} + */ minWidth: 200, - // Min height of the viewer in inline mode + /** + * Min height of the viewer in inline mode. + * @type {number} + */ minHeight: 100, - // Define the ratio when zoom the image by wheeling mouse + /** + * Define the ratio when zoom the image by wheeling mouse. + * @type {number} + */ zoomRatio: 0.1, - // Define the min ratio of the image when zoom out + /** + * Define the min ratio of the image when zoom out. + * @type {number} + */ minZoomRatio: 0.01, - // Define the max ratio of the image when zoom in + /** + * Define the max ratio of the image when zoom in. + * @type {number} + */ maxZoomRatio: 100, - // Define the CSS `z-index` value of viewer in modal mode. + /** + * Define the CSS `z-index` value of viewer in modal mode. + * @type {number} + */ zIndex: 2015, - // Define the CSS `z-index` value of viewer in inline mode. + /** + * Define the CSS `z-index` value of viewer in inline mode. + * @type {number} + */ zIndexInline: 0, - // Define where to get the original image URL for viewing - // Type: String (an image attribute) or Function (should return an image URL) + /** + * Define where to get the original image URL for viewing. + * @type {string | Function} + */ url: 'src', - // Define where to put the viewer in modal mode. - // Type: String | Element + /** + * Define where to put the viewer in modal mode. + * @type {string | Element} + */ container: 'body', - // Filter the images for viewing. - // Type: Function (return true if the image is viewable) + /** + * Filter the images for viewing. Return true if the image is viewable. + * @type {Function} + */ filter: null, - // Event shortcuts + /** + * Indicate if toggle the image size between its natural size + * and initial size when double click on the image or not. + * @type {boolean} + */ + toggleOnDblclick: true, + + /** + * Event shortcuts. + * @type {Function} + */ ready: null, show: null, shown: null, @@ -142,25 +237,26 @@ var CLASS_TRANSITION = NAMESPACE + '-transition'; // Events - var EVENT_READY = 'ready'; - var EVENT_SHOW = 'show'; - var EVENT_SHOWN = 'shown'; - var EVENT_HIDE = 'hide'; - var EVENT_HIDDEN = 'hidden'; - var EVENT_VIEW = 'view'; - var EVENT_VIEWED = 'viewed'; - var EVENT_ZOOM = 'zoom'; - var EVENT_ZOOMED = 'zoomed'; var EVENT_CLICK = 'click'; + var EVENT_DBLCLICK = 'dblclick'; var EVENT_DRAG_START = 'dragstart'; + var EVENT_HIDDEN = 'hidden'; + var EVENT_HIDE = 'hide'; var EVENT_KEY_DOWN = 'keydown'; var EVENT_LOAD = 'load'; var EVENT_POINTER_DOWN = WINDOW.PointerEvent ? 'pointerdown' : 'touchstart mousedown'; var EVENT_POINTER_MOVE = WINDOW.PointerEvent ? 'pointermove' : 'touchmove mousemove'; var EVENT_POINTER_UP = WINDOW.PointerEvent ? 'pointerup pointercancel' : 'touchend touchcancel mouseup'; + var EVENT_READY = 'ready'; var EVENT_RESIZE = 'resize'; + var EVENT_SHOW = 'show'; + var EVENT_SHOWN = 'shown'; var EVENT_TRANSITION_END = 'transitionend'; + var EVENT_VIEW = 'view'; + var EVENT_VIEWED = 'viewed'; var EVENT_WHEEL = 'wheel mousewheel DOMMouseScroll'; + var EVENT_ZOOM = 'zoom'; + var EVENT_ZOOMED = 'zoomed'; // Data keys var DATA_ACTION = NAMESPACE + 'Action'; @@ -456,7 +552,9 @@ function getData(element, name) { if (isObject(element[name])) { return element[name]; - } else if (element.dataset) { + } + + if (element.dataset) { return element.dataset[name]; } @@ -1087,28 +1185,40 @@ var events = { bind: function bind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this)); addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this)); addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this)); - addListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); + + if (this.options.toggleOnDblclick) { + addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this)); + } + + addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this)); addListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this)); addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this)); }, unbind: function unbind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; removeListener(viewer, EVENT_CLICK, this.onClick); removeListener(viewer, EVENT_WHEEL, this.onWheel); removeListener(viewer, EVENT_DRAG_START, this.onDragStart); - removeListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown); + + if (this.options.toggleOnDblclick) { + removeListener(canvas, EVENT_DBLCLICK, this.onDblclick); + } + + removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown); removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove); removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp); removeListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown); @@ -1198,6 +1308,11 @@ } } }, + dblclick: function dblclick(event) { + if (event.target.parentElement === this.canvas) { + this.toggle(); + } + }, load: function load() { var _this = this; @@ -1663,7 +1778,7 @@ view: function view() { var _this = this; - var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.initialViewIndex; index = Number(index) || 0; @@ -1733,8 +1848,9 @@ var onViewed = function onViewed() { var imageData = _this.imageData; + var render = Array.isArray(options.title) ? options.title[1] : options.title; - title.textContent = alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; + title.innerHTML = isFunction(render) ? render.call(_this, image, imageData) : alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; }; var onLoad = void 0; @@ -2705,7 +2821,7 @@ this.fulled = false; this.hiding = false; this.imageData = {}; - this.index = 0; + this.index = this.options.initialViewIndex; this.isImg = false; this.isShown = false; this.length = 0; @@ -2858,7 +2974,7 @@ this.player = viewer.querySelector('.' + NAMESPACE + '-player'); this.list = viewer.querySelector('.' + NAMESPACE + '-list'); - addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(options.title)); + addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title)); addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar)); toggleClass(button, CLASS_HIDE, !options.button); @@ -2989,7 +3105,7 @@ } if (this.ready && options.inline) { - this.view(); + this.view(this.index); } } diff --git a/dist/viewer.min.css b/dist/viewer.min.css index 23e5bb56..d3ad5c25 100644 --- a/dist/viewer.min.css +++ b/dist/viewer.min.css @@ -1,9 +1,9 @@ /*! - * Viewer.js v1.0.1 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-20T09:43:35.368Z - */.viewer-close:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen-exit:before,.viewer-fullscreen:before,.viewer-next:before,.viewer-one-to-one:before,.viewer-play:before,.viewer-prev:before,.viewer-reset:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-zoom-in:before,.viewer-zoom-out:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC");background-repeat:no-repeat;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;-webkit-touch-callout:none;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container ::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container ::selection{background-color:transparent}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:rgba(0,0,0,.5);overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:hover{opacity:.75}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;right:0}.viewer-player,.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:3px 0}.viewer-toolbar li{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar li:hover{background-color:rgba(0,0,0,.8)}.viewer-toolbar li:before{margin:2px}.viewer-toolbar li+li{margin-left:1px}.viewer-toolbar .viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar .viewer-small:before{margin:-1px}.viewer-toolbar .viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar .viewer-large:before{margin:5px}.viewer-tooltip{background-color:rgba(0,0,0,.8);border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1;margin:0 5% 5px;max-width:90%;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:rgba(0,0,0,.8)}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:rgba(0,0,0,.5)}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:-webkit-grab;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.viewer-loading:after{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;border:4px solid hsla(0,0%,100%,.1);border-left-color:hsla(0,0%,100%,.5);border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width:767px){.viewer-hide-xs-down{display:none}}@media (max-width:991px){.viewer-hide-sm-down{display:none}}@media (max-width:1199px){.viewer-hide-md-down{display:none}} \ No newline at end of file + * Date: 2018-07-15T10:09:17.532Z + */.viewer-close:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen-exit:before,.viewer-fullscreen:before,.viewer-next:before,.viewer-one-to-one:before,.viewer-play:before,.viewer-prev:before,.viewer-reset:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-zoom-in:before,.viewer-zoom-out:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC");background-repeat:no-repeat;color:rgba(0,0,0,0);display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{-moz-user-select:none;-ms-touch-action:none;-ms-user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;top:0;touch-action:none;user-select:none}.viewer-container::-moz-selection,.viewer-container ::-moz-selection{background-color:rgba(0,0,0,0)}.viewer-container::selection,.viewer-container ::selection{background-color:rgba(0,0,0,0)}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:rgba(0,0,0,.5);overflow:hidden}.viewer-list{-webkit-box-sizing:content-box;box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{-webkit-transition:opacity .15s;color:rgba(0,0,0,0);cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:hover{opacity:.75}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;right:0}.viewer-player,.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:3px 0}.viewer-toolbar>ul>li{-webkit-transition:background-color .15s;background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:hover{background-color:rgba(0,0,0,.8)}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:rgba(0,0,0,.8);border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{-webkit-transition:opacity .15s;color:#ccc;display:inline-block;font-size:12px;line-height:1;margin:0 5% 5px;max-width:90%;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-transition:background-color .15s;background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:rgba(0,0,0,.8)}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:rgba(0,0,0,.5)}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:-webkit-grab;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{-webkit-transition:all .3s;transition:all .3s}@-webkit-keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.viewer-loading:after{-webkit-animation:viewer-spinner 1s linear infinite;animation:viewer-spinner 1s linear infinite;border:4px solid hsla(0,0%,100%,.1);border-left:4px solid hsla(0,0%,100%,.5);border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width:767px){.viewer-hide-xs-down{display:none}}@media (max-width:991px){.viewer-hide-sm-down{display:none}}@media (max-width:1199px){.viewer-hide-md-down{display:none}} \ No newline at end of file diff --git a/dist/viewer.min.js b/dist/viewer.min.js index 43d94163..02034915 100644 --- a/dist/viewer.min.js +++ b/dist/viewer.min.js @@ -1,10 +1,10 @@ /*! - * Viewer.js v1.0.1 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-20T09:43:46.347Z + * Date: 2018-07-15T10:10:54.376Z */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.Viewer=i()}(this,function(){"use strict";var n={inline:!1,button:!0,navbar:!0,title:!0,toolbar:!0,tooltip:!0,movable:!0,zoomable:!0,rotatable:!0,scalable:!0,transition:!0,fullscreen:!0,interval:5e3,keyboard:!0,backdrop:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,zIndex:2015,zIndexInline:0,url:"src",container:"body",filter:null,ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null},s="undefined"!=typeof window,o=s?window:{},p="viewer",d="move",c="switch",u="zoom",m=p+"-active",w=p+"-fade",b=p+"-fixed",a=p+"-fullscreen-exit",y=p+"-hide",f=p+"-in",x=p+"-invisible",v=p+"-loading",i=p+"-open",g=p+"-show",D=p+"-transition",z="ready",r="show",e="shown",h="hide",l="hidden",k="view",E="viewed",S="click",I="dragstart",T="keydown",L="load",C=o.PointerEvent?"pointerdown":"touchstart mousedown",M=o.PointerEvent?"pointermove":"touchmove mousemove",N=o.PointerEvent?"pointerup pointercancel":"touchend touchcancel mouseup",Y="resize",X="transitionend",R="wheel mousewheel DOMMouseScroll",q=p+"Action",F=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"],O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t=function(){function n(t,i){for(var e=0;e'+s+'')}),i.innerHTML=h.join(""),this.items=i.getElementsByTagName("li"),U(this.items,function(i){var t=i.firstElementChild;st(t,"filled",!0),r.loading&&J(i,v),ht(t,L,function(t){r.loading&&Q(i,v),a.loadImage(t)},{once:!0})}),r.transition&&ht(t,E,function(){J(i,D)},{once:!0})},renderList:function(t){var i=t||this.index,e=this.items[i].offsetWidth||30,n=e+1;_(this.list,Z({width:n*this.length},dt({translateX:(this.viewerData.width-e)/2-n*i})))},resetList:function(){var t=this.list;t.innerHTML="",Q(t,D),_(t,dt({translateX:0}))},initImage:function(r){var h=this,l=this.options,t=this.image,i=this.viewerData,e=this.footer.offsetHeight,d=i.width,c=Math.max(i.height-e,e),u=this.imageData||{},n=void 0;this.imageInitializing={abort:function(){n.onload=null}},n=ut(t,function(t,i){var e=t/i,n=d,s=c;h.imageInitializing=!1,d=this.length||this.viewed&&t===this.index)return this;this.viewing&&this.viewing.abort();var e=this.element,n=this.options,s=this.title,o=this.canvas,a=this.items[t],r=a.querySelector("img"),h=nt(r,"originalUrl"),l=r.getAttribute("alt"),d=document.createElement("img");if(d.src=h,d.alt=l,K(n.view)&&ht(e,k,n.view,{once:!0}),!1===lt(e,k,{originalImage:this.images[t],index:t,image:d})||!this.isShown||this.hiding||this.played)return this;this.image=d,Q(this.items[this.index],m),J(a,m),this.viewed=!1,this.index=t,this.imageData={},J(d,x),n.loading&&J(o,v),o.innerHTML="",o.appendChild(d),this.renderList(),s.innerHTML="";var c=function(){var t=i.imageData;s.textContent=l+" ("+t.naturalWidth+" × "+t.naturalHeight+")"},u=void 0;return ht(e,E,c,{once:!0}),this.viewing={abort:function(){rt(e,E,c),d.complete?this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort():(rt(d,L,u),this.timeout&&clearTimeout(this.timeout))}},d.complete?this.load():(ht(d,L,u=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){Q(d,x),i.timeout=!1},1e3)),this},prev:function(){var t=0Math.abs(r)&&(this.pointers={},1
';var n=e.querySelector("."+p+"-container"),s=n.querySelector("."+p+"-title"),o=n.querySelector("."+p+"-toolbar"),a=n.querySelector("."+p+"-navbar"),r=n.querySelector("."+p+"-button"),l=n.querySelector("."+p+"-canvas");if(this.parent=i,this.viewer=n,this.title=s,this.toolbar=o,this.navbar=a,this.button=r,this.canvas=l,this.footer=n.querySelector("."+p+"-footer"),this.tooltipBox=n.querySelector("."+p+"-tooltip"),this.player=n.querySelector("."+p+"-player"),this.list=n.querySelector("."+p+"-list"),J(s,h.title?mt(h.title):y),J(a,h.navbar?mt(h.navbar):y),tt(r,y,!h.button),h.backdrop&&(J(n,p+"-backdrop"),h.inline||!0!==h.backdrop||st(l,q,"hide")),h.toolbar){var d=document.createElement("ul"),c=V(h.toolbar),u=F.slice(0,3),m=F.slice(7,9),f=F.slice(9);c||J(o,mt(h.toolbar)),U(c?h.toolbar:F,function(t,i){var e=c&&V(t),n=c?et(i):t,s=e&&!H(t.show)?t.show:t;if(s&&(h.zoomable||-1===u.indexOf(n))&&(h.rotatable||-1===m.indexOf(n))&&(h.scalable||-1===f.indexOf(n))){var o=e&&!H(t.size)?t.size:t,a=e&&!H(t.click)?t.click:t,r=document.createElement("li");r.setAttribute("role","button"),J(r,p+"-"+n),K(a)||st(r,q,n),A(s)&&J(r,mt(s)),-1!==["small","large"].indexOf(o)?J(r,p+"-"+o):"play"===n&&J(r,p+"-large"),K(a)&&ht(r,S,a),d.appendChild(r)}}),o.appendChild(d)}else J(o,y);if(!h.rotatable){var v=o.querySelectorAll('li[class*="rotate"]');J(v,x),U(v,function(t){o.appendChild(t)})}if(h.inline)J(r,"viewer-fullscreen"),_(n,{zIndex:h.zIndexInline}),"static"===window.getComputedStyle(i).position&&_(i,{position:"relative"}),i.insertBefore(n,t.nextSibling);else{J(r,"viewer-close"),J(n,b),J(n,w),J(n,y),_(n,{zIndex:h.zIndex});var g=h.container;W(g)&&(g=t.ownerDocument.querySelector(g)),g||(g=this.body),g.appendChild(n)}h.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,K(h.ready)&&ht(t,z,h.ready,{once:!0}),!1!==lt(t,z)?this.ready&&h.inline&&this.view():this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=yt,e}},{key:"setDefaults",value:function(t){Z(n,V(t)&&t)}}]),e}();return Z(xt.prototype,vt,gt,pt,wt,bt),xt}); \ No newline at end of file +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.Viewer=i()}(this,function(){"use strict";var n={initialViewIndex:0,inline:!1,button:!0,navbar:!0,title:!0,toolbar:!0,tooltip:!0,movable:!0,zoomable:!0,rotatable:!0,scalable:!0,transition:!0,fullscreen:!0,interval:5e3,keyboard:!0,backdrop:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,zIndex:2015,zIndexInline:0,url:"src",container:"body",filter:null,toggleOnDblclick:!0,ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,zoom:null,zoomed:null},s="undefined"!=typeof window,o=s?window:{},p="viewer",d="move",c="switch",u="zoom",m=p+"-active",w=p+"-fade",b=p+"-fixed",a=p+"-fullscreen-exit",y=p+"-hide",f=p+"-in",x=p+"-invisible",g=p+"-loading",i=p+"-open",v=p+"-show",z=p+"-transition",D="click",r="dblclick",h="dragstart",e="hidden",l="hide",k="keydown",E="load",I=o.PointerEvent?"pointerdown":"touchstart mousedown",S=o.PointerEvent?"pointermove":"touchmove mousemove",T=o.PointerEvent?"pointerup pointercancel":"touchend touchcancel mouseup",L="ready",M="resize",C="show",N="shown",R="transitionend",Y="view",X="viewed",q="wheel mousewheel DOMMouseScroll",O="zoom",F="zoomed",W=p+"Action",A=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"],P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t=function(){function n(t,i){for(var e=0;e'+s+'')}),i.innerHTML=h.join(""),this.items=i.getElementsByTagName("li"),_(this.items,function(i){var t=i.firstElementChild;at(t,"filled",!0),r.loading&&tt(i,g),dt(t,E,function(t){r.loading&&it(i,g),a.loadImage(t)},{once:!0})}),r.transition&&dt(t,X,function(){tt(i,z)},{once:!0})},renderList:function(t){var i=t||this.index,e=this.items[i].offsetWidth||30,n=e+1;Q(this.list,G({width:n*this.length},ut({translateX:(this.viewerData.width-e)/2-n*i})))},resetList:function(){var t=this.list;t.innerHTML="",it(t,z),Q(t,ut({translateX:0}))},initImage:function(r){var h=this,l=this.options,t=this.image,i=this.viewerData,e=this.footer.offsetHeight,d=i.width,c=Math.max(i.height-e,e),u=this.imageData||{},n=void 0;this.imageInitializing={abort:function(){n.onload=null}},n=ft(t,function(t,i){var e=t/i,n=d,s=c;h.imageInitializing=!1,d=this.length||this.viewed&&t===this.index)return this;this.viewing&&this.viewing.abort();var i=this.element,n=this.options,s=this.title,o=this.canvas,a=this.items[t],r=a.querySelector("img"),h=ot(r,"originalUrl"),l=r.getAttribute("alt"),d=document.createElement("img");if(d.src=h,d.alt=l,$(n.view)&&dt(i,Y,n.view,{once:!0}),!1===ct(i,Y,{originalImage:this.images[t],index:t,image:d})||!this.isShown||this.hiding||this.played)return this;this.image=d,it(this.items[this.index],m),tt(a,m),this.viewed=!1,this.index=t,this.imageData={},tt(d,x),n.loading&&tt(o,g),o.innerHTML="",o.appendChild(d),this.renderList(),s.innerHTML="";var c=function(){var t=e.imageData,i=Array.isArray(n.title)?n.title[1]:n.title;s.innerHTML=$(i)?i.call(e,d,t):l+" ("+t.naturalWidth+" × "+t.naturalHeight+")"},u=void 0;return dt(i,X,c,{once:!0}),this.viewing={abort:function(){lt(i,X,c),d.complete?this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort():(lt(d,E,u),this.timeout&&clearTimeout(this.timeout))}},d.complete?this.load():(dt(d,E,u=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){it(d,x),e.timeout=!1},1e3)),this},prev:function(){var t=0Math.abs(r)&&(this.pointers={},1
';var n=e.querySelector("."+p+"-container"),s=n.querySelector("."+p+"-title"),o=n.querySelector("."+p+"-toolbar"),a=n.querySelector("."+p+"-navbar"),r=n.querySelector("."+p+"-button"),l=n.querySelector("."+p+"-canvas");if(this.parent=i,this.viewer=n,this.title=s,this.toolbar=o,this.navbar=a,this.button=r,this.canvas=l,this.footer=n.querySelector("."+p+"-footer"),this.tooltipBox=n.querySelector("."+p+"-tooltip"),this.player=n.querySelector("."+p+"-player"),this.list=n.querySelector("."+p+"-list"),tt(s,h.title?gt(Array.isArray(h.title)?h.title[0]:h.title):y),tt(a,h.navbar?gt(h.navbar):y),et(r,y,!h.button),h.backdrop&&(tt(n,p+"-backdrop"),h.inline||!0!==h.backdrop||at(l,W,"hide")),h.toolbar){var d=document.createElement("ul"),c=Z(h.toolbar),u=A.slice(0,3),m=A.slice(7,9),f=A.slice(9);c||tt(o,gt(h.toolbar)),_(c?h.toolbar:A,function(t,i){var e=c&&Z(t),n=c?st(i):t,s=e&&!B(t.show)?t.show:t;if(s&&(h.zoomable||-1===u.indexOf(n))&&(h.rotatable||-1===m.indexOf(n))&&(h.scalable||-1===f.indexOf(n))){var o=e&&!B(t.size)?t.size:t,a=e&&!B(t.click)?t.click:t,r=document.createElement("li");r.setAttribute("role","button"),tt(r,p+"-"+n),$(a)||at(r,W,n),V(s)&&tt(r,gt(s)),-1!==["small","large"].indexOf(o)?tt(r,p+"-"+o):"play"===n&&tt(r,p+"-large"),$(a)&&dt(r,D,a),d.appendChild(r)}}),o.appendChild(d)}else tt(o,y);if(!h.rotatable){var g=o.querySelectorAll('li[class*="rotate"]');tt(g,x),_(g,function(t){o.appendChild(t)})}if(h.inline)tt(r,"viewer-fullscreen"),Q(n,{zIndex:h.zIndexInline}),"static"===window.getComputedStyle(i).position&&Q(i,{position:"relative"}),i.insertBefore(n,t.nextSibling);else{tt(r,"viewer-close"),tt(n,b),tt(n,w),tt(n,y),Q(n,{zIndex:h.zIndex});var v=h.container;H(v)&&(v=t.ownerDocument.querySelector(v)),v||(v=this.body),v.appendChild(n)}h.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,$(h.ready)&&dt(t,L,h.ready,{once:!0}),!1!==ct(t,L)?this.ready&&h.inline&&this.view(this.index):this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=zt,e}},{key:"setDefaults",value:function(t){G(n,Z(t)&&t)}}]),e}();return G(Dt.prototype,pt,wt,bt,yt,xt),Dt}); \ No newline at end of file diff --git a/docs/css/viewer.css b/docs/css/viewer.css index 0fe861e7..2da0e5f2 100644 --- a/docs/css/viewer.css +++ b/docs/css/viewer.css @@ -1,11 +1,11 @@ /*! - * Viewer.js v1.0.1 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-27T06:53:21.211Z + * Date: 2018-07-15T10:09:17.532Z */ .viewer-zoom-in::before, @@ -237,14 +237,14 @@ top: 0; } -.viewer-toolbar ul { +.viewer-toolbar > ul { display: inline-block; margin: 0 auto 5px; overflow: hidden; padding: 3px 0; } -.viewer-toolbar li { +.viewer-toolbar > ul > li { background-color: rgba(0, 0, 0, .5); border-radius: 50%; cursor: pointer; @@ -256,42 +256,42 @@ width: 24px; } -.viewer-toolbar li:hover { +.viewer-toolbar > ul > li:hover { background-color: rgba(0, 0, 0, .8); } -.viewer-toolbar li::before { +.viewer-toolbar > ul > li::before { margin: 2px; } -.viewer-toolbar li + li { +.viewer-toolbar > ul > li + li { margin-left: 1px; } -.viewer-toolbar .viewer-small { +.viewer-toolbar > ul > .viewer-small { height: 18px; margin-bottom: 3px; margin-top: 3px; width: 18px; } -.viewer-toolbar .viewer-small::before { +.viewer-toolbar > ul > .viewer-small::before { margin: -1px; } -.viewer-toolbar .viewer-large { +.viewer-toolbar > ul > .viewer-large { height: 30px; margin-bottom: -3px; margin-top: -3px; width: 30px; } -.viewer-toolbar .viewer-large::before { +.viewer-toolbar > ul > .viewer-large::before { margin: 5px; } .viewer-tooltip { - background-color: rgba(0, 0, 0, .8); + background-color: rgba(0, 0, 0, 0.8); border-radius: 10px; color: #fff; display: none; diff --git a/docs/index.html b/docs/index.html index 3e4eb884..eef02121 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,7 +7,7 @@ Viewer.js - + @@ -44,7 +44,7 @@
-

Viewer.js v1.1.0

+

Viewer.js v1.2.0

JavaScript image viewer.

@@ -277,7 +277,7 @@

Methods

- + diff --git a/docs/js/main.js b/docs/js/main.js index 61a82685..f53a022e 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -38,7 +38,7 @@ window.onload = function () { console.log(e.type); } }; - var viewer; + var viewer = new Viewer(pictures, options); function toggleButtons(mode) { var targets; @@ -68,35 +68,6 @@ window.onload = function () { } } - addEventListener(pictures, 'ready', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'show', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'shown', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'hide', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'hidden', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'view', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'viewed', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'zoom', function (e) { - console.log(e.type); - }); - addEventListener(pictures, 'zoomed', function (e) { - console.log(e.type); - }); - viewer = new Viewer(pictures, options); - toggleButtons(options.inline ? 'inline' : 'modal'); toggles.onchange = function (event) { diff --git a/docs/js/viewer.js b/docs/js/viewer.js index ec11a2f0..3e86b501 100644 --- a/docs/js/viewer.js +++ b/docs/js/viewer.js @@ -1,11 +1,11 @@ /*! - * Viewer.js v1.1.0 + * Viewer.js v1.2.0 * https://fengyuanchen.github.io/viewerjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2018-05-27T07:33:19.361Z + * Date: 2018-07-15T10:10:54.376Z */ (function (global, factory) { @@ -15,91 +15,186 @@ }(this, (function () { 'use strict'; var DEFAULTS = { - // Enable inline mode + /** + * Define the initial index of image for viewing. + * @type {number} + */ + initialViewIndex: 0, + + /** + * Enable inline mode. + * @type {boolean} + */ inline: false, - // Show the button on the top-right of the viewer + /** + * Show the button on the top-right of the viewer. + * @type {boolean} + */ button: true, - // Show the navbar + /** + * Show the navbar. + * @type {boolean | number} + */ navbar: true, - // Show the title + /** + * Specify the visibility and the content of the title. + * @type {boolean | number | Function | Array} + */ title: true, - // Show the toolbar + /** + * Show the toolbar. + * @type {boolean | number | Object} + */ toolbar: true, - // Show the tooltip with image ratio (percentage) when zoom in or zoom out + /** + * Show the tooltip with image ratio (percentage) when zoom in or zoom out. + * @type {boolean} + */ tooltip: true, - // Enable to move the image + /** + * Enable to move the image. + * @type {boolean} + */ movable: true, - // Enable to zoom the image + /** + * Enable to zoom the image. + * @type {boolean} + */ zoomable: true, - // Enable to rotate the image + /** + * Enable to rotate the image. + * @type {boolean} + */ rotatable: true, - // Enable to scale the image + /** + * Enable to scale the image. + * @type {boolean} + */ scalable: true, - // Enable CSS3 Transition for some special elements + /** + * Enable CSS3 Transition for some special elements. + * @type {boolean} + */ transition: true, - // Enable to request fullscreen when play + /** + * Enable to request fullscreen when play. + * @type {boolean} + */ fullscreen: true, - // The amount of time to delay between automatically cycling an image when playing. + /** + * The amount of time to delay between automatically cycling an image when playing. + * @type {number} + */ interval: 5000, - // Enable keyboard support + /** + * Enable keyboard support. + * @type {boolean} + */ keyboard: true, - // Enable a modal backdrop, specify `static` for a backdrop which doesn't close the modal on click + /** + * Enable a modal backdrop, specify `static` for a backdrop + * which doesn't close the modal on click. + * @type {boolean} + */ backdrop: true, - // Indicate if show a loading spinner when load image or not. + /** + * Indicate if show a loading spinner when load image or not. + * @type {boolean} + */ loading: true, - // Indicate if enable loop viewing or not. + /** + * Indicate if enable loop viewing or not. + * @type {boolean} + */ loop: true, - // Min width of the viewer in inline mode + /** + * Min width of the viewer in inline mode. + * @type {number} + */ minWidth: 200, - // Min height of the viewer in inline mode + /** + * Min height of the viewer in inline mode. + * @type {number} + */ minHeight: 100, - // Define the ratio when zoom the image by wheeling mouse + /** + * Define the ratio when zoom the image by wheeling mouse. + * @type {number} + */ zoomRatio: 0.1, - // Define the min ratio of the image when zoom out + /** + * Define the min ratio of the image when zoom out. + * @type {number} + */ minZoomRatio: 0.01, - // Define the max ratio of the image when zoom in + /** + * Define the max ratio of the image when zoom in. + * @type {number} + */ maxZoomRatio: 100, - // Define the CSS `z-index` value of viewer in modal mode. + /** + * Define the CSS `z-index` value of viewer in modal mode. + * @type {number} + */ zIndex: 2015, - // Define the CSS `z-index` value of viewer in inline mode. + /** + * Define the CSS `z-index` value of viewer in inline mode. + * @type {number} + */ zIndexInline: 0, - // Define where to get the original image URL for viewing - // Type: String (an image attribute) or Function (should return an image URL) + /** + * Define where to get the original image URL for viewing. + * @type {string | Function} + */ url: 'src', - // Define where to put the viewer in modal mode. - // Type: String | Element + /** + * Define where to put the viewer in modal mode. + * @type {string | Element} + */ container: 'body', - // Filter the images for viewing. - // Type: Function (return true if the image is viewable) + /** + * Filter the images for viewing. Return true if the image is viewable. + * @type {Function} + */ filter: null, - // Event shortcuts + /** + * Indicate if toggle the image size between its natural size + * and initial size when double click on the image or not. + * @type {boolean} + */ + toggleOnDblclick: true, + + /** + * Event shortcuts. + * @type {Function} + */ ready: null, show: null, shown: null, @@ -142,25 +237,26 @@ var CLASS_TRANSITION = NAMESPACE + '-transition'; // Events - var EVENT_READY = 'ready'; - var EVENT_SHOW = 'show'; - var EVENT_SHOWN = 'shown'; - var EVENT_HIDE = 'hide'; - var EVENT_HIDDEN = 'hidden'; - var EVENT_VIEW = 'view'; - var EVENT_VIEWED = 'viewed'; - var EVENT_ZOOM = 'zoom'; - var EVENT_ZOOMED = 'zoomed'; var EVENT_CLICK = 'click'; + var EVENT_DBLCLICK = 'dblclick'; var EVENT_DRAG_START = 'dragstart'; + var EVENT_HIDDEN = 'hidden'; + var EVENT_HIDE = 'hide'; var EVENT_KEY_DOWN = 'keydown'; var EVENT_LOAD = 'load'; var EVENT_POINTER_DOWN = WINDOW.PointerEvent ? 'pointerdown' : 'touchstart mousedown'; var EVENT_POINTER_MOVE = WINDOW.PointerEvent ? 'pointermove' : 'touchmove mousemove'; var EVENT_POINTER_UP = WINDOW.PointerEvent ? 'pointerup pointercancel' : 'touchend touchcancel mouseup'; + var EVENT_READY = 'ready'; var EVENT_RESIZE = 'resize'; + var EVENT_SHOW = 'show'; + var EVENT_SHOWN = 'shown'; var EVENT_TRANSITION_END = 'transitionend'; + var EVENT_VIEW = 'view'; + var EVENT_VIEWED = 'viewed'; var EVENT_WHEEL = 'wheel mousewheel DOMMouseScroll'; + var EVENT_ZOOM = 'zoom'; + var EVENT_ZOOMED = 'zoomed'; // Data keys var DATA_ACTION = NAMESPACE + 'Action'; @@ -456,7 +552,9 @@ function getData(element, name) { if (isObject(element[name])) { return element[name]; - } else if (element.dataset) { + } + + if (element.dataset) { return element.dataset[name]; } @@ -1087,28 +1185,40 @@ var events = { bind: function bind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; addListener(viewer, EVENT_CLICK, this.onClick = this.click.bind(this)); addListener(viewer, EVENT_WHEEL, this.onWheel = this.wheel.bind(this)); addListener(viewer, EVENT_DRAG_START, this.onDragStart = this.dragstart.bind(this)); - addListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); + + if (this.options.toggleOnDblclick) { + addListener(canvas, EVENT_DBLCLICK, this.onDblclick = this.dblclick.bind(this)); + } + + addListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown = this.pointerdown.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove = this.pointermove.bind(this)); addListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp = this.pointerup.bind(this)); addListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown = this.keydown.bind(this)); addListener(window, EVENT_RESIZE, this.onResize = this.resize.bind(this)); }, unbind: function unbind() { - var element = this.element, + var canvas = this.canvas, + element = this.element, viewer = this.viewer; removeListener(viewer, EVENT_CLICK, this.onClick); removeListener(viewer, EVENT_WHEEL, this.onWheel); removeListener(viewer, EVENT_DRAG_START, this.onDragStart); - removeListener(this.canvas, EVENT_POINTER_DOWN, this.onPointerDown); + + if (this.options.toggleOnDblclick) { + removeListener(canvas, EVENT_DBLCLICK, this.onDblclick); + } + + removeListener(canvas, EVENT_POINTER_DOWN, this.onPointerDown); removeListener(element.ownerDocument, EVENT_POINTER_MOVE, this.onPointerMove); removeListener(element.ownerDocument, EVENT_POINTER_UP, this.onPointerUp); removeListener(element.ownerDocument, EVENT_KEY_DOWN, this.onKeyDown); @@ -1198,6 +1308,11 @@ } } }, + dblclick: function dblclick(event) { + if (event.target.parentElement === this.canvas) { + this.toggle(); + } + }, load: function load() { var _this = this; @@ -1663,7 +1778,7 @@ view: function view() { var _this = this; - var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.initialViewIndex; index = Number(index) || 0; @@ -1733,8 +1848,9 @@ var onViewed = function onViewed() { var imageData = _this.imageData; + var render = Array.isArray(options.title) ? options.title[1] : options.title; - title.textContent = alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; + title.innerHTML = isFunction(render) ? render.call(_this, image, imageData) : alt + ' (' + imageData.naturalWidth + ' \xD7 ' + imageData.naturalHeight + ')'; }; var onLoad = void 0; @@ -2705,7 +2821,7 @@ this.fulled = false; this.hiding = false; this.imageData = {}; - this.index = 0; + this.index = this.options.initialViewIndex; this.isImg = false; this.isShown = false; this.length = 0; @@ -2858,7 +2974,7 @@ this.player = viewer.querySelector('.' + NAMESPACE + '-player'); this.list = viewer.querySelector('.' + NAMESPACE + '-list'); - addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(options.title)); + addClass(title, !options.title ? CLASS_HIDE : getResponsiveClass(Array.isArray(options.title) ? options.title[0] : options.title)); addClass(navbar, !options.navbar ? CLASS_HIDE : getResponsiveClass(options.navbar)); toggleClass(button, CLASS_HIDE, !options.button); @@ -2989,7 +3105,7 @@ } if (this.ready && options.inline) { - this.view(); + this.view(this.index); } } diff --git a/package-lock.json b/package-lock.json index d67cd163..61ed817d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "viewerjs", - "version": "1.1.0", + "version": "1.2.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1731,13 +1731,22 @@ "dev": true }, "browserslist": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.4.0.tgz", - "integrity": "sha512-aM2Gt4x9bVlCUteADBS6JP0F+2tMWKM1jQzUulVROtdFWFIcIVvY76AJbr7GDqy0eDhn+PcnpzzivGxY4qiaKQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.1.tgz", + "integrity": "sha512-QqiiIWchEIkney3wY53/huI7ZErouNAdvOkjorUALAwRcu3tEwOV3Sh6He0DnP38mz1JjBpCBb50jQBmaYuHPw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000718", - "electron-to-chromium": "^1.3.18" + "caniuse-lite": "^1.0.30000865", + "electron-to-chromium": "^1.3.52", + "node-releases": "^1.0.0-alpha.10" + }, + "dependencies": { + "electron-to-chromium": { + "version": "1.3.52", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.52.tgz", + "integrity": "sha1-0tnxJwuko7lnuDHEDvcftNmrXOA=", + "dev": true + } } }, "buffer-from": { @@ -1867,12 +1876,12 @@ } }, "caniuse-api": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-2.0.0.tgz", - "integrity": "sha1-sd21pZZrFvSNxJmERNS7xsfZ2DQ=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", "dev": true, "requires": { - "browserslist": "^2.0.0", + "browserslist": "^4.0.0", "caniuse-lite": "^1.0.0", "lodash.memoize": "^4.1.2", "lodash.uniq": "^4.5.0" @@ -1885,9 +1894,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000736", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000736.tgz", - "integrity": "sha1-3zad+37U13qKASRCUsbi99ucxok=", + "version": "1.0.30000865", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000865.tgz", + "integrity": "sha512-vs79o1mOSKRGv/1pSkp4EXgl4ZviWeYReXw60XfacPU64uQWZwJT6vZNmxRF9O+6zu71sJwMxLK5JXxbzuVrLw==", "dev": true }, "capture-stack-trace": { @@ -2178,6 +2187,33 @@ "object-visit": "^1.0.0" } }, + "color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + }, + "dependencies": { + "color-convert": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", + "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", + "dev": true, + "requires": { + "color-name": "1.1.1" + } + }, + "color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", + "dev": true + } + } + }, "color-convert": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", @@ -2199,6 +2235,16 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "color-string": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.2.tgz", + "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "colorguard": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/colorguard/-/colorguard-1.2.0.tgz", @@ -2936,9 +2982,9 @@ "dev": true }, "cssnano": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.0.0.tgz", - "integrity": "sha1-4aQWHxfYLf9fuhepCnv9l63Xmhs=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.0.2.tgz", + "integrity": "sha1-Dnmhgpr7ZYN0S6cF/WJRb7/U/ac=", "dev": true, "requires": { "cosmiconfig": "^5.0.0", @@ -2979,9 +3025,9 @@ } }, "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "has-flag": { @@ -3954,9 +4000,9 @@ } }, "eslint": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.0.1.tgz", - "integrity": "sha512-D5nG2rErquLUstgUaxJlWB5+gu+U/3VDY0fk/Iuq8y9CUFy/7Y6oF4N2cR1tV8knzQvciIbfqfohd359xTLIKQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.1.0.tgz", + "integrity": "sha512-DyH6JsoA1KzA5+OSWFjg56DFJT+sDLO0yokaPZ9qY0UEmYrPA1gEX/G1MnVkmRDsksG4H1foIVz2ZXXM3hHYvw==", "dev": true, "requires": { "ajv": "^6.5.0", @@ -3966,6 +4012,7 @@ "debug": "^3.1.0", "doctrine": "^2.1.0", "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", "espree": "^4.0.0", "esquery": "^1.0.1", @@ -3973,7 +4020,7 @@ "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", - "globals": "^11.5.0", + "globals": "^11.7.0", "ignore": "^3.3.3", "imurmurhash": "^0.1.4", "inquirer": "^5.2.0", @@ -4066,9 +4113,9 @@ } }, "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "fast-deep-equal": { @@ -4291,6 +4338,12 @@ "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", @@ -9059,9 +9112,9 @@ "dev": true }, "normalize-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.1.0.tgz", - "integrity": "sha512-y7nyoGsYRm0hUhAxKFabfkVIoD89c6K5q8GoVALjPEOWfWfnz+ZUUmaQaKUKaEed1Fr+AOXaoEO8Q9jpum719A==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.2.0.tgz", + "integrity": "sha512-WvF3Myk0NhXkG8S9bygFM4IC1KOvnVJGq0QoGeoqOYOBeinBZp5ybW3QuYbTc89lkWBMM9ZBO4QGRoc0353kKA==", "dev": true }, "npm-run-all": { @@ -9783,6 +9836,81 @@ } } }, + "postcss-attribute-case-insensitive": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-3.0.1.tgz", + "integrity": "sha512-X/viSS9YrAoDnRa2R4sElsAmW+scOWeVW11FjWQN8m+FW1YY0jdIA9fuBSSF1pKsJTYXJXGJ1oAjFHl8cqcmKw==", + "dev": true, + "requires": { + "postcss": "^6.0.23", + "postcss-selector-parser": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "postcss-selector-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-4.0.0.tgz", + "integrity": "sha512-5h+MvEjnzu1qy6MabjuoPatsGAjjDV9B24e7Cktjl+ClNtjVjmvAXjOFQr1u7RlWULKNGYaYVE4s+DIIQ4bOGA==", + "dev": true, + "requires": { + "cssesc": "^1.0.1", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "postcss-calc": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-6.0.1.tgz", @@ -9832,16 +9960,6 @@ "supports-color": "^5.4.0" } }, - "reduce-css-calc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.4.tgz", - "integrity": "sha512-i/vWQbyd3aJRmip9OVSN9V6nIjLf/gg/ctxb0CpvHWtcRysFl/ngDBQD+rqavxdw/doScA3GMBXhzkHQ4GCzFQ==", - "dev": true, - "requires": { - "css-unit-converter": "^1.1.1", - "postcss-value-parser": "^3.3.0" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -10304,12 +10422,12 @@ } }, "postcss-color-functional-notation": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-1.0.1.tgz", - "integrity": "sha512-8ECwUd75SwcjLMzFdRVRBqjVoHwGeWpLQKCNIQo9T+QeCrUNKI1NJ6rgpni5vo7iZ7MZy21qKqUieMM3D0wHYQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-1.0.2.tgz", + "integrity": "sha512-FxkEr+s/KCrcrTxUhHcDMKGZmnLjUKK7pl2gDjnEoAJaVcbThdDWLhuASu02qdA3Ys7np/BwJgwc72JrURTvJQ==", "dev": true, "requires": { - "postcss": "^6.0.22", + "postcss": "^6.0.23", "postcss-values-parser": "^1.5.0" }, "dependencies": { @@ -10379,34 +10497,23 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "color": { @@ -10419,31 +10526,21 @@ "color-string": "^1.4.0" } }, - "color-string": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.2.tgz", - "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -10453,12 +10550,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -10528,17 +10625,14 @@ } } }, - "postcss-colormin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.0.tgz", - "integrity": "sha1-iiHxCzhDWQ0YHu3ypqEJYXtlU+w=", + "postcss-color-rebeccapurple": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-3.1.0.tgz", + "integrity": "sha512-212hJUk9uSsbwO5ECqVjmh/iLsmiVL1xy9ce9TVf+X3cK/ZlUIlaMdoxje/YpsL9cmUH3I7io+/G2LyWx5rg1g==", "dev": true, "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^6.0.0", - "postcss-value-parser": "^3.0.0" + "postcss": "^6.0.22", + "postcss-values-parser": "^1.5.0" }, "dependencies": { "ansi-styles": { @@ -10550,23 +10644,6 @@ "color-convert": "^1.9.0" } }, - "browserslist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.0.tgz", - "integrity": "sha512-fJq4izbUYHHNdQd/5Mco31HeL8U8dg5sSaj5boaDP17+aAe41CrxSZbQifIjaWw27iIilmy48z9PrVtelNJhbw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000859", - "electron-to-chromium": "^1.3.50", - "node-releases": "^1.0.0-alpha.10" - } - }, - "caniuse-lite": { - "version": "1.0.30000864", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000864.tgz", - "integrity": "sha512-8fuGh8n3MIQ7oBkO/ck7J4LXhV5Sz5aLyFmfpChWpK+rJhqYrOsGDdbBVDdyKIRBWamZpy6iM4OmLCFVudOOhg==", - "dev": true - }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -10578,47 +10655,6 @@ "supports-color": "^5.3.0" } }, - "color": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", - "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", - "dev": true, - "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.2" - } - }, - "color-convert": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz", - "integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==", - "dev": true, - "requires": { - "color-name": "1.1.1" - } - }, - "color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=", - "dev": true - }, - "color-string": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.2.tgz", - "integrity": "sha1-JuRYFLw8mny9Z1FkikFDRRSnc6k=", - "dev": true, - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "electron-to-chromium": { - "version": "1.3.51", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.51.tgz", - "integrity": "sha1-akK0nar38ipbN7mR2vlJ8029ubU=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -10653,12 +10689,15 @@ } } }, - "postcss-convert-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.0.tgz", - "integrity": "sha1-d9d9mu0dxOaVbmUcw0nVMwWHb2I=", + "postcss-colormin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.1.tgz", + "integrity": "sha1-bxwYoBVbxpYT8v8ThD4uSuj/C74=", "dev": true, "requires": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", "postcss": "^6.0.0", "postcss-value-parser": "^3.0.0" }, @@ -10717,61 +10756,51 @@ } } }, - "postcss-custom-media": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-6.0.0.tgz", - "integrity": "sha1-vlMnhBEOyylQRPtTlaGABushpzc=", + "postcss-convert-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.0.tgz", + "integrity": "sha1-d9d9mu0dxOaVbmUcw0nVMwWHb2I=", "dev": true, "requires": { - "postcss": "^6.0.1" + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.1.0", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -10781,12 +10810,139 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-custom-media": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-6.0.0.tgz", + "integrity": "sha1-vlMnhBEOyylQRPtTlaGABushpzc=", + "dev": true, + "requires": { + "postcss": "^6.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-custom-properties": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-7.0.0.tgz", + "integrity": "sha512-dl/CNaM6z2RBa0vZZqsV6Hunj4HD6Spu7FcAkiVp5B2tgm6xReKKYzI7x7QNx3wTMBNj5v+ylfVcQGMW4xdkHw==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "postcss": "^6.0.18" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" } } } @@ -10802,51 +10958,40 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -10856,12 +11001,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -11393,51 +11538,40 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -11447,12 +11581,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -11467,51 +11601,40 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -11521,12 +11644,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -11799,51 +11922,40 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -11853,12 +11965,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -12042,51 +12154,40 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -12096,12 +12197,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -12113,9 +12214,9 @@ "dev": true }, "postcss-merge-longhand": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.0.tgz", - "integrity": "sha1-pFQbZooKasJaoh2TAUL9ArQacXw=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.1.tgz", + "integrity": "sha1-mM3r2nzButpK4Dx27RxEyXpXQBk=", "dev": true, "requires": { "postcss": "^6.0.0", @@ -12132,23 +12233,6 @@ "color-convert": "^1.9.0" } }, - "browserslist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.0.tgz", - "integrity": "sha512-fJq4izbUYHHNdQd/5Mco31HeL8U8dg5sSaj5boaDP17+aAe41CrxSZbQifIjaWw27iIilmy48z9PrVtelNJhbw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000859", - "electron-to-chromium": "^1.3.50", - "node-releases": "^1.0.0-alpha.10" - } - }, - "caniuse-lite": { - "version": "1.0.30000864", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000864.tgz", - "integrity": "sha512-8fuGh8n3MIQ7oBkO/ck7J4LXhV5Sz5aLyFmfpChWpK+rJhqYrOsGDdbBVDdyKIRBWamZpy6iM4OmLCFVudOOhg==", - "dev": true - }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -12160,12 +12244,6 @@ "supports-color": "^5.3.0" } }, - "electron-to-chromium": { - "version": "1.3.51", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.51.tgz", - "integrity": "sha1-akK0nar38ipbN7mR2vlJ8029ubU=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -12223,13 +12301,13 @@ } }, "postcss-merge-rules": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.0.tgz", - "integrity": "sha1-q0Z4Msv/SyLPk1D+2SU2Z36tTs8=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.1.tgz", + "integrity": "sha1-Qw/Vmz8u0uivzQsxJ47aOYVKuxA=", "dev": true, "requires": { "browserslist": "^4.0.0", - "caniuse-api": "^2.0.0", + "caniuse-api": "^3.0.0", "cssnano-util-same-parent": "^4.0.0", "postcss": "^6.0.0", "postcss-selector-parser": "^3.0.0", @@ -12245,23 +12323,6 @@ "color-convert": "^1.9.0" } }, - "browserslist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.0.tgz", - "integrity": "sha512-fJq4izbUYHHNdQd/5Mco31HeL8U8dg5sSaj5boaDP17+aAe41CrxSZbQifIjaWw27iIilmy48z9PrVtelNJhbw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000859", - "electron-to-chromium": "^1.3.50", - "node-releases": "^1.0.0-alpha.10" - } - }, - "caniuse-lite": { - "version": "1.0.30000864", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000864.tgz", - "integrity": "sha512-8fuGh8n3MIQ7oBkO/ck7J4LXhV5Sz5aLyFmfpChWpK+rJhqYrOsGDdbBVDdyKIRBWamZpy6iM4OmLCFVudOOhg==", - "dev": true - }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -12273,12 +12334,6 @@ "supports-color": "^5.3.0" } }, - "electron-to-chromium": { - "version": "1.3.51", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.51.tgz", - "integrity": "sha1-akK0nar38ipbN7mR2vlJ8029ubU=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -12401,9 +12456,76 @@ "dev": true, "requires": { "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^6.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-minify-params": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.0.tgz", + "integrity": "sha1-BekWbuSMBa9lGYnOhNOcG015BnQ=", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "cssnano-util-get-arguments": "^4.0.0", "postcss": "^6.0.0", - "postcss-value-parser": "^3.0.0" + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" }, "dependencies": { "ansi-styles": { @@ -12460,17 +12582,16 @@ } } }, - "postcss-minify-params": { + "postcss-minify-selectors": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.0.tgz", - "integrity": "sha1-BekWbuSMBa9lGYnOhNOcG015BnQ=", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.0.tgz", + "integrity": "sha1-sen2xGNBbT/Nyybnt4XZX2FXiq0=", "dev": true, "requires": { "alphanum-sort": "^1.0.0", - "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", "postcss": "^6.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" + "postcss-selector-parser": "^3.0.0" }, "dependencies": { "ansi-styles": { @@ -12510,6 +12631,17 @@ "supports-color": "^5.4.0" } }, + "postcss-selector-parser": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", + "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "dev": true, + "requires": { + "dot-prop": "^4.1.1", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12527,16 +12659,13 @@ } } }, - "postcss-minify-selectors": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.0.tgz", - "integrity": "sha1-sen2xGNBbT/Nyybnt4XZX2FXiq0=", + "postcss-nesting": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-6.0.0.tgz", + "integrity": "sha512-Yoglsy6eZbDCbRIXoYSmnIt9ao4xyg07iFwVBd7WyIkDzMSeRxIqUk8xEAdkeJQ7eGfWo6RufrTU7FSUjZ22fg==", "dev": true, "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^6.0.0", - "postcss-selector-parser": "^3.0.0" + "postcss": "^6.0.22" }, "dependencies": { "ansi-styles": { @@ -12576,17 +12705,6 @@ "supports-color": "^5.4.0" } }, - "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", - "dev": true, - "requires": { - "dot-prop": "^4.1.1", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -13444,18 +13562,18 @@ } }, "postcss-preset-env": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-5.2.1.tgz", - "integrity": "sha512-zsGFBKtTyCY5YxOq6Q/WR4oa9/LOKawEWMxJ7UpMtfj1t50OWeGZadRQp/i7DSSWjKus+eJKLIHDxLaobwhidQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-5.2.2.tgz", + "integrity": "sha512-ehhyyssfRLv6N5zysA09lTgL1KgGOt9RMuXEOrB8CV+aH6Ky1fz1OMmEv9YK+JQ6okRIeQTktOZ+STfTZj2ckw==", "dev": true, "requires": { - "autoprefixer": "^8.6.3", + "autoprefixer": "^8.6.5", "browserslist": "^3.2.8", - "caniuse-lite": "^1.0.30000859", + "caniuse-lite": "^1.0.30000865", "cssdb": "^3.1.0", "postcss": "^6.0.23", "postcss-attribute-case-insensitive": "^3.0.1", - "postcss-color-functional-notation": "^1.0.1", + "postcss-color-functional-notation": "^1.0.2", "postcss-color-hex-alpha": "^3.0.0", "postcss-color-mod-function": "^2.4.2", "postcss-color-rebeccapurple": "^3.1.0", @@ -13517,12 +13635,6 @@ "electron-to-chromium": "^1.3.47" } }, - "caniuse-lite": { - "version": "1.0.30000864", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000864.tgz", - "integrity": "sha512-8fuGh8n3MIQ7oBkO/ck7J4LXhV5Sz5aLyFmfpChWpK+rJhqYrOsGDdbBVDdyKIRBWamZpy6iM4OmLCFVudOOhg==", - "dev": true - }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -13535,9 +13647,9 @@ } }, "electron-to-chromium": { - "version": "1.3.51", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.51.tgz", - "integrity": "sha1-akK0nar38ipbN7mR2vlJ8029ubU=", + "version": "1.3.52", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.52.tgz", + "integrity": "sha1-0tnxJwuko7lnuDHEDvcftNmrXOA=", "dev": true }, "has-flag": { @@ -13557,53 +13669,68 @@ "supports-color": "^5.4.0" } }, - "postcss-attribute-case-insensitive": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-3.0.1.tgz", - "integrity": "sha512-X/viSS9YrAoDnRa2R4sElsAmW+scOWeVW11FjWQN8m+FW1YY0jdIA9fuBSSF1pKsJTYXJXGJ1oAjFHl8cqcmKw==", - "dev": true, - "requires": { - "postcss": "^6.0.23", - "postcss-selector-parser": "^4.0.0" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, - "postcss-color-rebeccapurple": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-3.1.0.tgz", - "integrity": "sha512-212hJUk9uSsbwO5ECqVjmh/iLsmiVL1xy9ce9TVf+X3cK/ZlUIlaMdoxje/YpsL9cmUH3I7io+/G2LyWx5rg1g==", + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "postcss": "^6.0.22", - "postcss-values-parser": "^1.5.0" + "has-flag": "^3.0.0" } - }, - "postcss-custom-properties": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-7.0.0.tgz", - "integrity": "sha512-dl/CNaM6z2RBa0vZZqsV6Hunj4HD6Spu7FcAkiVp5B2tgm6xReKKYzI7x7QNx3wTMBNj5v+ylfVcQGMW4xdkHw==", + } + } + }, + "postcss-pseudo-class-any-link": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-5.0.0.tgz", + "integrity": "sha512-rA5grdRhLLMMI654eOZVuKGr4fUBQNGSH0K+7j5839CiBA/IvNt/Ewt7aIrkGZPySKI3nqzs34HefO8U0Fxahg==", + "dev": true, + "requires": { + "postcss": "^6.0.22", + "postcss-selector-parser": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "postcss": "^6.0.18" + "color-convert": "^1.9.0" } }, - "postcss-nesting": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-6.0.0.tgz", - "integrity": "sha512-Yoglsy6eZbDCbRIXoYSmnIt9ao4xyg07iFwVBd7WyIkDzMSeRxIqUk8xEAdkeJQ7eGfWo6RufrTU7FSUjZ22fg==", + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "postcss": "^6.0.22" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "postcss-pseudo-class-any-link": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-5.0.0.tgz", - "integrity": "sha512-rA5grdRhLLMMI654eOZVuKGr4fUBQNGSH0K+7j5839CiBA/IvNt/Ewt7aIrkGZPySKI3nqzs34HefO8U0Fxahg==", + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "postcss": "^6.0.22", - "postcss-selector-parser": "^4.0.0" + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" } }, "postcss-selector-parser": { @@ -13635,13 +13762,13 @@ } }, "postcss-reduce-initial": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.0.tgz", - "integrity": "sha1-CvvbDnOZlgqdBstFtGnYEhEItFs=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.1.tgz", + "integrity": "sha1-8tWPUM6isMXcEnjW6l7Q/1gpwpM=", "dev": true, "requires": { "browserslist": "^4.0.0", - "caniuse-api": "^2.0.0", + "caniuse-api": "^3.0.0", "has": "^1.0.0", "postcss": "^6.0.0" }, @@ -13655,23 +13782,6 @@ "color-convert": "^1.9.0" } }, - "browserslist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.0.0.tgz", - "integrity": "sha512-fJq4izbUYHHNdQd/5Mco31HeL8U8dg5sSaj5boaDP17+aAe41CrxSZbQifIjaWw27iIilmy48z9PrVtelNJhbw==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30000859", - "electron-to-chromium": "^1.3.50", - "node-releases": "^1.0.0-alpha.10" - } - }, - "caniuse-lite": { - "version": "1.0.30000864", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000864.tgz", - "integrity": "sha512-8fuGh8n3MIQ7oBkO/ck7J4LXhV5Sz5aLyFmfpChWpK+rJhqYrOsGDdbBVDdyKIRBWamZpy6iM4OmLCFVudOOhg==", - "dev": true - }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -13683,12 +13793,6 @@ "supports-color": "^5.3.0" } }, - "electron-to-chromium": { - "version": "1.3.51", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.51.tgz", - "integrity": "sha1-akK0nar38ipbN7mR2vlJ8029ubU=", - "dev": true - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -13799,51 +13903,40 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -13853,12 +13946,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -14012,9 +14105,9 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -14027,42 +14120,31 @@ "dev": true }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -14072,12 +14154,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -14093,9 +14175,9 @@ }, "dependencies": { "ansi-styles": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" @@ -14108,42 +14190,31 @@ "dev": true }, "chalk": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "^3.1.0", + "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", - "supports-color": "^4.0.0" - }, - "dependencies": { - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } + "supports-color": "^5.3.0" } }, "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "postcss": { - "version": "6.0.16", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.16.tgz", - "integrity": "sha512-m758RWPmSjFH/2MyyG3UOW1fgYbR9rtdzz5UNJnlm7OLtu4B2h9C6gi+bE4qFKghsBRFfZT8NzoQBs6JhLotoA==", + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", "dev": true, "requires": { - "chalk": "^2.3.0", + "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.1.0" + "supports-color": "^5.4.0" } }, "source-map": { @@ -14153,12 +14224,12 @@ "dev": true }, "supports-color": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "^2.0.0" + "has-flag": "^3.0.0" } } } @@ -14520,9 +14591,9 @@ "optional": true }, "puppeteer": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.5.0.tgz", - "integrity": "sha512-eELwFtFxL+uhmg4jPZOZXzSrPEYy4CaYQNbcchBbfxY+KjMpnv6XGf/aYWaQG49OTpfi2/DMziXtDM8XuJgoUA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.6.0.tgz", + "integrity": "sha512-88epdIp3lw0LxI+sIHgdgZdq/u5zRnzgU2vJGvcyuGqHQrtRUeICTexTyT1KoKhTGG0mAKFRV9c7IJ179agm7A==", "dev": true, "requires": { "debug": "^3.1.0", @@ -14551,9 +14622,9 @@ "dev": true }, "ws": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.1.tgz", - "integrity": "sha512-2NkHdPKjDBj3CHdnAGNpmlliryKqF+n9MYXX7/wsVC4yqYocKreKNjydPDvT3wShAZnndlM0RytEfTALCDvz7A==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", "dev": true, "requires": { "async-limiter": "~1.0.0" @@ -14761,6 +14832,16 @@ "dev": true, "optional": true }, + "reduce-css-calc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.4.tgz", + "integrity": "sha512-i/vWQbyd3aJRmip9OVSN9V6nIjLf/gg/ctxb0CpvHWtcRysFl/ngDBQD+rqavxdw/doScA3GMBXhzkHQ4GCzFQ==", + "dev": true, + "requires": { + "css-unit-converter": "^1.1.1", + "postcss-value-parser": "^3.3.0" + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -15261,9 +15342,9 @@ }, "dependencies": { "is-arrayish": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.1.tgz", - "integrity": "sha1-wt/DhquqDD4zxI2z/ocFnmkGXv0=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", "dev": true } } @@ -16255,9 +16336,9 @@ }, "dependencies": { "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "js-yaml": { @@ -16624,9 +16705,9 @@ "dev": true }, "uglify-js": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.3.tgz", - "integrity": "sha512-RbOgGjF04sFUNSi8xGOTB9AmtVmMmVVAL5a7lxIgJ8urejJen+priq0ooRIHHa8AXI/dSvNF9yYMz9OP4PhybQ==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.4.tgz", + "integrity": "sha512-RiB1kNcC9RMyqwRrjXC+EjgLoXULoDnCaOnEDzUCHkBN0bHwmtF5rzDMiDWU29gu0kXCRRWwtcTAVFWRECmU2Q==", "dev": true, "requires": { "commander": "~2.16.0", diff --git a/package.json b/package.json index 6beb4794..1a376f53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "viewerjs", "description": "JavaScript image viewer.", - "version": "1.1.0", + "version": "1.2.0", "main": "dist/viewer.common.js", "module": "dist/viewer.esm.js", "unpkg": "dist/viewer.js", @@ -57,9 +57,9 @@ "change-case": "^3.0.2", "cpy-cli": "^2.0.0", "create-banner": "^1.0.0", - "cssnano": "^4.0.0", + "cssnano": "^4.0.2", "del-cli": "^1.1.0", - "eslint": "^5.0.1", + "eslint": "^5.1.0", "eslint-config-airbnb-base": "^13.0.0", "eslint-plugin-import": "^2.13.0", "husky": "^0.14.3", @@ -74,13 +74,13 @@ "postcss-cli": "^5.0.1", "postcss-header": "^1.0.0", "postcss-import": "^11.1.0", - "postcss-preset-env": "^5.2.1", + "postcss-preset-env": "^5.2.2", "postcss-url": "^7.3.2", - "puppeteer": "^1.5.0", + "puppeteer": "^1.6.0", "rollup": "^0.62.0", "rollup-plugin-babel": "^3.0.7", "rollup-watch": "^4.3.1", "stylefmt": "^6.0.0", - "uglify-js": "^3.4.3" + "uglify-js": "^3.4.4" } }