From a3515ace7f05a7d0191ac6a08d5014e1ffa637aa Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:02:25 +0200 Subject: [PATCH 01/16] Delete old dist files --- dist/SwupProgressPlugin.js | 466 --------------------------------- dist/SwupProgressPlugin.min.js | 1 - 2 files changed, 467 deletions(-) delete mode 100644 dist/SwupProgressPlugin.js delete mode 100644 dist/SwupProgressPlugin.min.js diff --git a/dist/SwupProgressPlugin.js b/dist/SwupProgressPlugin.js deleted file mode 100644 index 7698ee0..0000000 --- a/dist/SwupProgressPlugin.js +++ /dev/null @@ -1,466 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["SwupProgressPlugin"] = factory(); - else - root["SwupProgressPlugin"] = factory(); -})(window, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _index = __webpack_require__(1); - -var _index2 = _interopRequireDefault(_index); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -module.exports = _index2.default; // this is here for webpack to expose SwupPlugin as window.SwupPlugin - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _plugin = __webpack_require__(2); - -var _plugin2 = _interopRequireDefault(_plugin); - -var _ProgressBar = __webpack_require__(3); - -var _ProgressBar2 = _interopRequireDefault(_ProgressBar); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var SwupProgressPlugin = function (_Plugin) { - _inherits(SwupProgressPlugin, _Plugin); - - function SwupProgressPlugin() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, SwupProgressPlugin); - - var _this = _possibleConstructorReturn(this, (SwupProgressPlugin.__proto__ || Object.getPrototypeOf(SwupProgressPlugin)).call(this)); - - _this.name = 'SwupProgressPlugin'; - - _this.startShowingProgress = function () { - _this.progressBar.setValue(0); - _this.showProgressBarAfterDelay(); - }; - - _this.stopShowingProgress = function () { - _this.progressBar.setValue(1); - if (_this.options.hideImmediately) { - _this.hideProgressBar(); - } else { - _this.finishAnimationAndHideProgressBar(); - } - }; - - _this.showProgressBar = function () { - _this.cancelHideProgressBarTimeout(); - _this.progressBar.show(); - }; - - _this.showProgressBarAfterDelay = function () { - _this.cancelShowProgressBarTimeout(); - _this.cancelHideProgressBarTimeout(); - _this.showProgressBarTimeout = window.setTimeout(_this.showProgressBar, _this.options.delay); - }; - - _this.hideProgressBar = function () { - _this.cancelShowProgressBarTimeout(); - _this.progressBar.hide(); - }; - - _this.finishAnimationAndHideProgressBar = function () { - _this.cancelShowProgressBarTimeout(); - _this.hideProgressBarTimeout = window.setTimeout(_this.hideProgressBar, _this.options.transition); - }; - - _this.cancelShowProgressBarTimeout = function () { - window.clearTimeout(_this.showProgressBarTimeout); - delete _this.showProgressBarTimeout; - }; - - _this.cancelHideProgressBarTimeout = function () { - window.clearTimeout(_this.hideProgressBarTimeout); - delete _this.hideProgressBarTimeout; - }; - - var defaultOptions = { - className: 'swup-progress-bar', - delay: 300, - transition: undefined, - minValue: undefined, - initialValue: undefined, - hideImmediately: true - }; - - _this.options = _extends({}, defaultOptions, options); - - _this.showProgressBarTimeout = null; - _this.hideProgressBarTimeout = null; - - _this.progressBar = new _ProgressBar2.default({ - className: _this.options.className, - animationDuration: _this.options.transition, - minValue: _this.options.minValue, - initialValue: _this.options.initialValue - }); - return _this; - } - - _createClass(SwupProgressPlugin, [{ - key: 'mount', - value: function mount() { - this.swup.on('transitionStart', this.startShowingProgress); - this.swup.on('contentReplaced', this.stopShowingProgress); - } - }, { - key: 'unmount', - value: function unmount() { - this.swup.off('transitionStart', this.startShowingProgress); - this.swup.off('contentReplaced', this.stopShowingProgress); - } - }]); - - return SwupProgressPlugin; -}(_plugin2.default); - -exports.default = SwupProgressPlugin; - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var Plugin = function () { - function Plugin() { - _classCallCheck(this, Plugin); - - this.isSwupPlugin = true; - } - - _createClass(Plugin, [{ - key: "mount", - value: function mount() { - // this is mount method rewritten by class extending - // and is executed when swup is enabled with plugin - } - }, { - key: "unmount", - value: function unmount() { - // this is unmount method rewritten by class extending - // and is executed when swup with plugin is disabled - } - }, { - key: "_beforeMount", - value: function _beforeMount() { - // here for any future hidden auto init - } - }, { - key: "_afterUnmount", - value: function _afterUnmount() {} - // here for any future hidden auto-cleanup - - - // this is here so we can tell if plugin was created by extending this class - - }]); - - return Plugin; -}(); - -exports.default = Plugin; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var ProgressBar = function () { - function ProgressBar() { - var _this = this; - - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$className = _ref.className, - className = _ref$className === undefined ? 'progress-bar' : _ref$className, - _ref$styleAttr = _ref.styleAttr, - styleAttr = _ref$styleAttr === undefined ? 'data-progressbar-styles' : _ref$styleAttr, - _ref$animationDuratio = _ref.animationDuration, - animationDuration = _ref$animationDuratio === undefined ? 300 : _ref$animationDuratio, - _ref$minValue = _ref.minValue, - minValue = _ref$minValue === undefined ? 0.1 : _ref$minValue, - _ref$initialValue = _ref.initialValue, - initialValue = _ref$initialValue === undefined ? 0.25 : _ref$initialValue, - _ref$trickleValue = _ref.trickleValue, - trickleValue = _ref$trickleValue === undefined ? 0.03 : _ref$trickleValue; - - _classCallCheck(this, ProgressBar); - - this.styleElement = null; - this.progressElement = null; - this.value = 0; - this.visible = false; - this.hiding = false; - this.trickleInterval = null; - - this.trickle = function () { - var advance = Math.random() * _this.trickleValue; - _this.setValue(_this.value + advance); - }; - - this.className = className; - this.styleAttr = styleAttr; - this.animationDuration = animationDuration; - this.minValue = minValue; - this.initialValue = initialValue; - this.trickleValue = trickleValue; - - this.styleElement = this.createStyleElement(); - this.progressElement = this.createProgressElement(); - } - - _createClass(ProgressBar, [{ - key: 'show', - value: function show() { - if (!this.visible) { - this.visible = true; - this.installStyleElement(); - this.installProgressElement(); - this.startTrickling(); - } - } - }, { - key: 'hide', - value: function hide() { - var _this2 = this; - - if (this.visible && !this.hiding) { - this.hiding = true; - this.fadeProgressElement(function () { - _this2.uninstallProgressElement(); - _this2.stopTrickling(); - _this2.visible = false; - _this2.hiding = false; - }); - } - } - }, { - key: 'setValue', - value: function setValue(value) { - this.value = Math.min(1, Math.max(this.minValue, value)); - this.refresh(); - } - - // Private - - }, { - key: 'installStyleElement', - value: function installStyleElement() { - document.head.insertBefore(this.styleElement, document.head.firstChild); - } - }, { - key: 'installProgressElement', - value: function installProgressElement() { - this.progressElement.style.width = '0%'; - this.progressElement.style.opacity = '1'; - document.documentElement.insertBefore(this.progressElement, document.body); - this.progressElement.scrollTop = 0; // Force reflow to ensure initial style takes effect - this.setValue(Math.random() * this.initialValue); - } - }, { - key: 'fadeProgressElement', - value: function fadeProgressElement(callback) { - this.progressElement.style.opacity = '0'; - setTimeout(callback, this.animationDuration * 1.5); - } - }, { - key: 'uninstallProgressElement', - value: function uninstallProgressElement() { - if (this.progressElement.parentNode) { - document.documentElement.removeChild(this.progressElement); - } - } - }, { - key: 'startTrickling', - value: function startTrickling() { - if (!this.trickleInterval) { - this.trickleInterval = window.setInterval(this.trickle, this.animationDuration); - } - } - }, { - key: 'stopTrickling', - value: function stopTrickling() { - window.clearInterval(this.trickleInterval); - delete this.trickleInterval; - } - }, { - key: 'refresh', - value: function refresh() { - var _this3 = this; - - requestAnimationFrame(function () { - _this3.progressElement.style.width = _this3.value * 100 + '%'; - }); - } - }, { - key: 'createStyleElement', - value: function createStyleElement() { - var element = document.createElement('style'); - element.setAttribute(this.styleAttr, ''); - element.textContent = this.defaultStyles; - return element; - } - }, { - key: 'createProgressElement', - value: function createProgressElement() { - var element = document.createElement('div'); - element.className = this.className; - return element; - } - }, { - key: 'defaultStyles', - get: function get() { - return '\n\t\t.' + this.className + ' {\n\t\t\t\tposition: fixed;\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\tbackground-color: black;\n\t\t\t\tz-index: 9999;\n\t\t\t\ttransition:\n\t\t\t\t\twidth ' + this.animationDuration + 'ms ease-out,\n\t\t\t\t\topacity ' + this.animationDuration / 2 + 'ms ' + this.animationDuration / 2 + 'ms ease-in;\n\t\t\t\ttransform: translate3d(0, 0, 0);\n\t\t\t}\n\t\t'; - } - }]); - - return ProgressBar; -}(); - -exports.default = ProgressBar; - -/***/ }) -/******/ ]); -}); \ No newline at end of file diff --git a/dist/SwupProgressPlugin.min.js b/dist/SwupProgressPlugin.min.js deleted file mode 100644 index fd58aaf..0000000 --- a/dist/SwupProgressPlugin.min.js +++ /dev/null @@ -1 +0,0 @@ -(function e(t,n){if(typeof exports==="object"&&typeof module==="object")module.exports=n();else if(typeof define==="function"&&define.amd)define([],n);else if(typeof exports==="object")exports["SwupProgressPlugin"]=n();else t["SwupProgressPlugin"]=n()})(window,function(){return function(e){var t={};function n(r){if(t[r]){return t[r].exports}var i=t[r]={i:r,l:false,exports:{}};e[r].call(i.exports,i,i.exports,n);i.l=true;return i.exports}n.m=e;n.c=t;n.d=function(e,t,r){if(!n.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:r})}};n.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};n.t=function(e,t){if(t&1)e=n(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var r=Object.create(null);n.r(r);Object.defineProperty(r,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r};n.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="";return n(n.s=0)}([function(e,t,n){"use strict";var r=n(1);var i=o(r);function o(e){return e&&e.__esModule?e:{default:e}}e.exports=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=Object.assign||function(e){for(var t=1;t0&&arguments[0]!==undefined?arguments[0]:{};f(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.name="SwupProgressPlugin";n.startShowingProgress=function(){n.progressBar.setValue(0);n.showProgressBarAfterDelay()};n.stopShowingProgress=function(){n.progressBar.setValue(1);if(n.options.hideImmediately){n.hideProgressBar()}else{n.finishAnimationAndHideProgressBar()}};n.showProgressBar=function(){n.cancelHideProgressBarTimeout();n.progressBar.show()};n.showProgressBarAfterDelay=function(){n.cancelShowProgressBarTimeout();n.cancelHideProgressBarTimeout();n.showProgressBarTimeout=window.setTimeout(n.showProgressBar,n.options.delay)};n.hideProgressBar=function(){n.cancelShowProgressBarTimeout();n.progressBar.hide()};n.finishAnimationAndHideProgressBar=function(){n.cancelShowProgressBarTimeout();n.hideProgressBarTimeout=window.setTimeout(n.hideProgressBar,n.options.transition)};n.cancelShowProgressBarTimeout=function(){window.clearTimeout(n.showProgressBarTimeout);delete n.showProgressBarTimeout};n.cancelHideProgressBarTimeout=function(){window.clearTimeout(n.hideProgressBarTimeout);delete n.hideProgressBarTimeout};var i={className:"swup-progress-bar",delay:300,transition:undefined,minValue:undefined,initialValue:undefined,hideImmediately:true};n.options=r({},i,e);n.showProgressBarTimeout=null;n.hideProgressBarTimeout=null;n.progressBar=new u.default({className:n.options.className,animationDuration:n.options.transition,minValue:n.options.minValue,initialValue:n.options.initialValue});return n}i(t,[{key:"mount",value:function e(){this.swup.on("transitionStart",this.startShowingProgress);this.swup.on("contentReplaced",this.stopShowingProgress)}},{key:"unmount",value:function e(){this.swup.off("transitionStart",this.startShowingProgress);this.swup.off("contentReplaced",this.stopShowingProgress)}}]);return t}(s.default);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=function(){function e(e,t){for(var n=0;n0&&arguments[0]!==undefined?arguments[0]:{},r=n.className,o=r===undefined?"progress-bar":r,s=n.styleAttr,a=s===undefined?"data-progressbar-styles":s,u=n.animationDuration,l=u===undefined?300:u,f=n.minValue,c=f===undefined?.1:f,h=n.initialValue,d=h===undefined?.25:h,m=n.trickleValue,p=m===undefined?.03:m;i(this,e);this.styleElement=null;this.progressElement=null;this.value=0;this.visible=false;this.hiding=false;this.trickleInterval=null;this.trickle=function(){var e=Math.random()*t.trickleValue;t.setValue(t.value+e)};this.className=o;this.styleAttr=a;this.animationDuration=l;this.minValue=c;this.initialValue=d;this.trickleValue=p;this.styleElement=this.createStyleElement();this.progressElement=this.createProgressElement()}r(e,[{key:"show",value:function e(){if(!this.visible){this.visible=true;this.installStyleElement();this.installProgressElement();this.startTrickling()}}},{key:"hide",value:function e(){var t=this;if(this.visible&&!this.hiding){this.hiding=true;this.fadeProgressElement(function(){t.uninstallProgressElement();t.stopTrickling();t.visible=false;t.hiding=false})}}},{key:"setValue",value:function e(t){this.value=Math.min(1,Math.max(this.minValue,t));this.refresh()}},{key:"installStyleElement",value:function e(){document.head.insertBefore(this.styleElement,document.head.firstChild)}},{key:"installProgressElement",value:function e(){this.progressElement.style.width="0%";this.progressElement.style.opacity="1";document.documentElement.insertBefore(this.progressElement,document.body);this.progressElement.scrollTop=0;this.setValue(Math.random()*this.initialValue)}},{key:"fadeProgressElement",value:function e(t){this.progressElement.style.opacity="0";setTimeout(t,this.animationDuration*1.5)}},{key:"uninstallProgressElement",value:function e(){if(this.progressElement.parentNode){document.documentElement.removeChild(this.progressElement)}}},{key:"startTrickling",value:function e(){if(!this.trickleInterval){this.trickleInterval=window.setInterval(this.trickle,this.animationDuration)}}},{key:"stopTrickling",value:function e(){window.clearInterval(this.trickleInterval);delete this.trickleInterval}},{key:"refresh",value:function e(){var t=this;requestAnimationFrame(function(){t.progressElement.style.width=t.value*100+"%"})}},{key:"createStyleElement",value:function e(){var t=document.createElement("style");t.setAttribute(this.styleAttr,"");t.textContent=this.defaultStyles;return t}},{key:"createProgressElement",value:function e(){var t=document.createElement("div");t.className=this.className;return t}},{key:"defaultStyles",get:function e(){return"\n\t\t."+this.className+" {\n\t\t\t\tposition: fixed;\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\tbackground-color: black;\n\t\t\t\tz-index: 9999;\n\t\t\t\ttransition:\n\t\t\t\t\twidth "+this.animationDuration+"ms ease-out,\n\t\t\t\t\topacity "+this.animationDuration/2+"ms "+this.animationDuration/2+"ms ease-in;\n\t\t\t\ttransform: translate3d(0, 0, 0);\n\t\t\t}\n\t\t"}}]);return e}();t.default=o}])}); \ No newline at end of file From db44e2d8e752cb1b301c720a3ace7bb6e8f23a92 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:02:39 +0200 Subject: [PATCH 02/16] Rename readme --- readme.md => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename readme.md => README.md (100%) diff --git a/readme.md b/README.md similarity index 100% rename from readme.md rename to README.md From 22c7ef65be89c3d23d0f60f259b0b30c9e2949ee Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:09:27 +0200 Subject: [PATCH 03/16] Switch to hooks --- src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 56ae43e..402fee4 100755 --- a/src/index.js +++ b/src/index.js @@ -32,13 +32,13 @@ export default class SwupProgressPlugin extends Plugin { } mount() { - this.swup.on('transitionStart', this.startShowingProgress); - this.swup.on('contentReplaced', this.stopShowingProgress); + this.swup.hooks.on('transitionStart', this.startShowingProgress); + this.swup.hooks.on('replaceContent', this.stopShowingProgress); } unmount() { - this.swup.off('transitionStart', this.startShowingProgress); - this.swup.off('contentReplaced', this.stopShowingProgress); + this.swup.hooks.off('transitionStart', this.startShowingProgress); + this.swup.hooks.off('replaceContent', this.stopShowingProgress); } startShowingProgress = () => { From 7701255e593a9fdfc88832d864f2f9882e7aecae Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:09:33 +0200 Subject: [PATCH 04/16] Refactor init --- src/index.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/index.js b/src/index.js index 402fee4..236e4f7 100755 --- a/src/index.js +++ b/src/index.js @@ -4,21 +4,19 @@ import ProgressBar from './ProgressBar'; export default class SwupProgressPlugin extends Plugin { name = 'SwupProgressPlugin'; + defaults = { + className: 'swup-progress-bar', + delay: 300, + transition: undefined, + minValue: undefined, + initialValue: undefined, + hideImmediately: true + }; + constructor(options = {}) { super(); - const defaultOptions = { - className: 'swup-progress-bar', - delay: 300, - transition: undefined, - minValue: undefined, - initialValue: undefined, - hideImmediately: true - }; - - this.options = { - ...defaultOptions, - ...options - }; + + this.options = { ...this.defaults, ...options }; this.showProgressBarTimeout = null; this.hideProgressBarTimeout = null; From 0af75c7ece2e3799319e206da4dee6b539c4b234 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:09:49 +0200 Subject: [PATCH 05/16] Update readme --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1bbc7d7..7512941 100755 --- a/README.md +++ b/README.md @@ -1,26 +1,26 @@ # Swup Progress Bar Plugin -This [swup](https://github.com/swup/swup) plugin will display a progress bar for -all requests taking longer than ~300ms. +A [swup](https://swup.js.org) plugin for displaying a progress bar. + +Shows a loading indicator for requests taking longer than ~300ms. + ## Installation -This plugin can be installed with npm +Install the plugin from npm and import it into your bundle. ```bash npm install @swup/progress-plugin ``` -and included with import - -```shell +```js import SwupProgressPlugin from '@swup/progress-plugin'; ``` -or included from the dist folder +Or include the minified production file from a CDN: ```html - + ``` ## Usage @@ -62,7 +62,7 @@ Class name to use for the container div. ### transition -Length of CSS transition between loading states, in milliseconds. +Length of the CSS transition between loading states, in milliseconds. ### delay From 474f962e2ace387cbd77864d5bb41420613163a3 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:10:17 +0200 Subject: [PATCH 06/16] Update description --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ce827d..c7eb2da 100755 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@swup/progress-plugin", "amdName": "SwupProgressPlugin", "version": "2.0.0", - "description": "Swup plugin for displaying a loading indicator", + "description": "A swup plugin for displaying a progress bar", "type": "module", "source": "src/index.js", "main": "./dist/index.cjs", From 782fcc8b093644687b03b65e56aadc8573317aa7 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:10:24 +0200 Subject: [PATCH 07/16] Bump version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 11de289..10bffad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@swup/progress-plugin", - "version": "1.2.1", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@swup/progress-plugin", - "version": "1.2.1", + "version": "3.0.0", "license": "MIT", "dependencies": { "@swup/plugin": "^2.0.0" diff --git a/package.json b/package.json index c7eb2da..54691b4 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@swup/progress-plugin", "amdName": "SwupProgressPlugin", - "version": "2.0.0", + "version": "3.0.0", "description": "A swup plugin for displaying a progress bar", "type": "module", "source": "src/index.js", From 4e0269089a35b5721422fdc75cb79e6376ebdb01 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:13:46 +0200 Subject: [PATCH 08/16] Create changelog --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4f5b439 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +# Changelog + + + +## [3.0.0] - 2023-07 + +- Update for swup 4 compatibility + +## [2.0.0] - 2023-03-10 + +- Switch to microbundle +- Export native ESM module + +## [1.2.0] - 2022-08-01 + +- Ensure width never exceeds 100% +- Initialise with random value to improve appearance +- Improve initial transition by forcing reflow + +## [1.1.0] - 2022-03-08 + +- Finish the animation before hiding the progress bar + +## [1.0.0] - 2020-08-10 + +- Initial release + +[Unreleased]: https://github.com/swup/progress-plugin/compare/3.0.0...HEAD + +[3.0.0]: https://github.com/swup/progress-plugin/releases/tag/3.0.0 +[2.0.0]: https://github.com/swup/progress-plugin/releases/tag/2.0.0 +[1.2.0]: https://github.com/swup/progress-plugin/releases/tag/1.2.0 +[1.1.0]: https://github.com/swup/progress-plugin/releases/tag/1.1.0 +[1.0.0]: https://github.com/swup/progress-plugin/releases/tag/1.0.0 From 139475e3253e391155608ca28b64bcfa4a579226 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Sat, 1 Jul 2023 12:15:20 +0200 Subject: [PATCH 09/16] Bump peer dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54691b4..221e253 100755 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@swup/plugin": "^2.0.0" }, "peerDependencies": { - "swup": "^3.0.0" + "swup": "^4.0.0" }, "browserslist": [ "extends @swup/browserslist-config" From 431cd825033f5c3caf46a01f926f6d0f84fc503f Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Wed, 12 Jul 2023 19:24:27 +0200 Subject: [PATCH 10/16] Update hook names --- src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 236e4f7..8f56ff1 100755 --- a/src/index.js +++ b/src/index.js @@ -30,13 +30,13 @@ export default class SwupProgressPlugin extends Plugin { } mount() { - this.swup.hooks.on('transitionStart', this.startShowingProgress); - this.swup.hooks.on('replaceContent', this.stopShowingProgress); + this.swup.hooks.on('visit:start', this.startShowingProgress); + this.swup.hooks.on('content:replace', this.stopShowingProgress); } unmount() { - this.swup.hooks.off('transitionStart', this.startShowingProgress); - this.swup.hooks.off('replaceContent', this.stopShowingProgress); + this.swup.hooks.off('visit:start', this.startShowingProgress); + this.swup.hooks.off('content:replace', this.stopShowingProgress); } startShowingProgress = () => { From daad00dd53ae98fc5a2e952666114202fedab27f Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Fri, 21 Jul 2023 02:06:48 +0200 Subject: [PATCH 11/16] Update for recent changes --- package.json | 4 ++-- src/index.js | 55 ++++++++++++++++++++++------------------------------ 2 files changed, 25 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 221e253..b98ad23 100755 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "dev": "swup-plugin dev", "lint": "swup-plugin lint", "format": "swup-plugin format", - "prepublish": "npm run build" + "prepublishOnly": "npm run build" }, "author": { "name": "Philipp Daun", @@ -42,7 +42,7 @@ "url": "https://github.com/swup/progress-plugin.git" }, "dependencies": { - "@swup/plugin": "^2.0.0" + "@swup/plugin": "^3.0.0" }, "peerDependencies": { "swup": "^4.0.0" diff --git a/src/index.js b/src/index.js index 8f56ff1..2008fe3 100755 --- a/src/index.js +++ b/src/index.js @@ -13,74 +13,65 @@ export default class SwupProgressPlugin extends Plugin { hideImmediately: true }; + showProgressBarTimeout = null; + hideProgressBarTimeout = null; + constructor(options = {}) { super(); this.options = { ...this.defaults, ...options }; - this.showProgressBarTimeout = null; - this.hideProgressBarTimeout = null; - - this.progressBar = new ProgressBar({ - className: this.options.className, - animationDuration: this.options.transition, - minValue: this.options.minValue, - initialValue: this.options.initialValue - }); + const { className, minValue, initialValue, transition: animationDuration } = this.options; + this.progressBar = new ProgressBar({ className, minValue, initialValue, animationDuration }); } mount() { - this.swup.hooks.on('visit:start', this.startShowingProgress); - this.swup.hooks.on('content:replace', this.stopShowingProgress); + this.on('visit:start', this.startShowingProgress); + this.on('page:view', this.stopShowingProgress); } - unmount() { - this.swup.hooks.off('visit:start', this.startShowingProgress); - this.swup.hooks.off('content:replace', this.stopShowingProgress); - } - - startShowingProgress = () => { + startShowingProgress() { this.progressBar.setValue(0); this.showProgressBarAfterDelay(); - }; + } - stopShowingProgress = () => { + stopShowingProgress() { this.progressBar.setValue(1); if (this.options.hideImmediately) { this.hideProgressBar(); } else { this.finishAnimationAndHideProgressBar(); } - }; + } - showProgressBar = () => { + showProgressBar() { this.cancelHideProgressBarTimeout(); this.progressBar.show(); - }; + } - showProgressBarAfterDelay = () => { + showProgressBarAfterDelay() { this.cancelShowProgressBarTimeout(); this.cancelHideProgressBarTimeout(); this.showProgressBarTimeout = window.setTimeout(this.showProgressBar, this.options.delay); - }; + } - hideProgressBar = () => { + hideProgressBar() { this.cancelShowProgressBarTimeout(); this.progressBar.hide(); - }; + } - finishAnimationAndHideProgressBar = () => { + finishAnimationAndHideProgressBar() { this.cancelShowProgressBarTimeout(); this.hideProgressBarTimeout = window.setTimeout(this.hideProgressBar, this.options.transition); - }; + } - cancelShowProgressBarTimeout = () => { + cancelShowProgressBarTimeout() { window.clearTimeout(this.showProgressBarTimeout); delete this.showProgressBarTimeout; - }; + } - cancelHideProgressBarTimeout = () => { + cancelHideProgressBarTimeout() { window.clearTimeout(this.hideProgressBarTimeout); delete this.hideProgressBarTimeout; - }; + } } From 5058ad923aa05bf74d1ba79cc450f57dd2d6de31 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Wed, 26 Jul 2023 00:35:54 +0200 Subject: [PATCH 12/16] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f5b439..45b2668 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ -## [3.0.0] - 2023-07 +## [3.0.0] - 2023-07-26 - Update for swup 4 compatibility From 7e529dc0574cca08670c0339c802091c49358c2c Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Wed, 26 Jul 2023 00:38:41 +0200 Subject: [PATCH 13/16] Finish animation by default --- CHANGELOG.md | 1 + README.md | 8 +++----- src/index.js | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45b2668..02d83ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## [3.0.0] - 2023-07-26 +- Finish animation by default - Update for swup 4 compatibility ## [2.0.0] - 2023-03-10 diff --git a/README.md b/README.md index 7512941..714b5a3 100755 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The progress bar has a class name of `swup-progress-bar` you can use for styling transition: 300, delay: 300, initialValue: 0.25, - hideImmediately: true + finishAnimation: true } ``` @@ -76,8 +76,6 @@ To create a slightly more "realistic" appearance, the progress bar will start out at a random position beteen 0 and the value of this option. Set to `0` to always start from the left. -### hideImmediately +### finishAnimation -Whether the progress bar is hidden instantly after a page visit. - -Set to `false` to always complete the transition to `width: 100%` before hiding it. +Whether the progress bar will complete the transition to 100% before hiding. diff --git a/src/index.js b/src/index.js index 2008fe3..a026889 100755 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,7 @@ export default class SwupProgressPlugin extends Plugin { transition: undefined, minValue: undefined, initialValue: undefined, - hideImmediately: true + finishAnimation: true }; showProgressBarTimeout = null; @@ -37,10 +37,10 @@ export default class SwupProgressPlugin extends Plugin { stopShowingProgress() { this.progressBar.setValue(1); - if (this.options.hideImmediately) { - this.hideProgressBar(); - } else { + if (this.options.finishAnimation) { this.finishAnimationAndHideProgressBar(); + } else { + this.hideProgressBar(); } } From 1eb70a7f89cd32791a9ce6beb5fc0bac35ab0574 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Wed, 26 Jul 2023 00:49:37 +0200 Subject: [PATCH 14/16] Make sure head plugin keeps styles --- src/ProgressBar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProgressBar.js b/src/ProgressBar.js index 4d691c3..47bdc4b 100755 --- a/src/ProgressBar.js +++ b/src/ProgressBar.js @@ -9,7 +9,7 @@ export default class ProgressBar { constructor({ className = 'progress-bar', - styleAttr = 'data-progressbar-styles', + styleAttr = 'data-progressbar-styles data-swup-theme', animationDuration = 300, minValue = 0.1, initialValue = 0.25, @@ -119,7 +119,7 @@ export default class ProgressBar { createStyleElement() { const element = document.createElement('style'); - element.setAttribute(this.styleAttr, ''); + this.styleAttr.split(' ').forEach((attr) => element.setAttribute(attr, '')); element.textContent = this.defaultStyles; return element; } From 9ce67395f5c0833b34a6c05a755a342ff17a587d Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Wed, 26 Jul 2023 00:49:45 +0200 Subject: [PATCH 15/16] Fix method binding --- src/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index a026889..150bbd8 100755 --- a/src/index.js +++ b/src/index.js @@ -18,9 +18,7 @@ export default class SwupProgressPlugin extends Plugin { constructor(options = {}) { super(); - this.options = { ...this.defaults, ...options }; - const { className, minValue, initialValue, transition: animationDuration } = this.options; this.progressBar = new ProgressBar({ className, minValue, initialValue, animationDuration }); } @@ -52,7 +50,7 @@ export default class SwupProgressPlugin extends Plugin { showProgressBarAfterDelay() { this.cancelShowProgressBarTimeout(); this.cancelHideProgressBarTimeout(); - this.showProgressBarTimeout = window.setTimeout(this.showProgressBar, this.options.delay); + this.showProgressBarTimeout = window.setTimeout(this.showProgressBar.bind(this), this.options.delay); } hideProgressBar() { @@ -62,7 +60,7 @@ export default class SwupProgressPlugin extends Plugin { finishAnimationAndHideProgressBar() { this.cancelShowProgressBarTimeout(); - this.hideProgressBarTimeout = window.setTimeout(this.hideProgressBar, this.options.transition); + this.hideProgressBarTimeout = window.setTimeout(this.hideProgressBar.bind(this), this.options.transition); } cancelShowProgressBarTimeout() { From 86fb9de7715221e6ff99423c7d7c41e9dfb4ce62 Mon Sep 17 00:00:00 2001 From: Philipp Daun Date: Wed, 26 Jul 2023 11:40:52 +0200 Subject: [PATCH 16/16] Pin versions --- package-lock.json | 83 ++++++++++++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 10bffad..429253c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,10 @@ "version": "3.0.0", "license": "MIT", "dependencies": { - "@swup/plugin": "^2.0.0" + "@swup/plugin": "^3.0.0" }, "peerDependencies": { - "swup": "^3.0.0" + "swup": "^4.0.0" } }, "node_modules/@ampproject/remapping": { @@ -2129,9 +2129,9 @@ "integrity": "sha512-/3nBqG7LqmK1uqaCSTA6s2NwQBDQXNyLAFBzlX6uaxqjIQcAZyq6K+sgcQ40oj02Vn/2mLSkeL9DOfP7BPOwVA==" }, "node_modules/@swup/plugin": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@swup/plugin/-/plugin-2.0.2.tgz", - "integrity": "sha512-pde/zKIgXpbI+qy8rhuy8De8KniZRuwAoxuOoGTvhErolrW2khlYKtVXgPACRmmPJvGI5ZTfBzBN5txKfIGefQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@swup/plugin/-/plugin-3.0.0.tgz", + "integrity": "sha512-dCFhmFmucMY4ae4qo01fGocU74YrLwffTTtxCUO21OyDgFdywjO4RLP0pgjsiXueBbpcXkexbj4q+O19dWQRoA==", "dependencies": { "@swup/browserslist-config": "^1.0.0", "@swup/prettier-config": "^1.0.0", @@ -2140,7 +2140,7 @@ "prettier": "^2.7.1", "shelljs": "^0.8.5", "shelljs-live": "^0.0.5", - "swup": "^3.0.0" + "swup": "^4.0.0" }, "bin": { "swup-plugin": "bin/swup-plugin.js" @@ -2717,11 +2717,14 @@ } }, "node_modules/delegate-it": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/delegate-it/-/delegate-it-3.0.1.tgz", - "integrity": "sha512-XU8H4pjDGBW74hFIbjdLPnvtU3HF3P9bbZvoFBSBLb5JgNaTkRb/2lvC1V+9kmZsxVR0kad4bU3rYhQ/4Ij+Gw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/delegate-it/-/delegate-it-6.0.1.tgz", + "integrity": "sha512-ZS2hRm/SaoPzaeWcWyYjzVVF4/PgALZqma9FXsunFt4XQGVAtQ79Vx7v57vNQNaI75Rl12C+x6TkLqHS5PNKLg==", "dependencies": { - "typed-query-selector": "^2.6.1" + "typed-query-selector": "^2.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/fregante" } }, "node_modules/dom-serializer": { @@ -4168,6 +4171,11 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-to-regexp": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -5634,13 +5642,14 @@ } }, "node_modules/swup": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/swup/-/swup-3.0.5.tgz", - "integrity": "sha512-MD2oVgyvKbUgWeGKjOzDQUfYLtqlQktREcR27QnzqKBSAjApLrbMTWToYrkI2ZnCXG6ApPMjsrRLArSwiJUBmw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/swup/-/swup-4.0.0.tgz", + "integrity": "sha512-GQX9WKFJBe4mZaryKkb8QZHsVP9u0GbMauD/B/msthNFB7rbUOqO1eSvaZB9d4TypHCjbviZ6kKac0v9vChOOA==", "hasInstallScript": true, "dependencies": { - "delegate-it": "^3.0.1", - "opencollective-postinstall": "^2.0.2" + "delegate-it": "^6.0.0", + "opencollective-postinstall": "^2.0.2", + "path-to-regexp": "^6.2.1" } }, "node_modules/tiny-glob": { @@ -5666,9 +5675,9 @@ } }, "node_modules/typed-query-selector": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.9.2.tgz", - "integrity": "sha512-mOnelGQ0JBbYvboX6v/3vijUkIW9L557DHVRUFQTKG352EWvW/uDN6ORlPvTPRivefqb3QbbyZgLtPmxQaxmug==" + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.11.0.tgz", + "integrity": "sha512-qBs4sfmnLlPOyo2oSdvHbIFHe2CPgU54/1UGfSNceb7LARpIEVxUaeRX0Doje6oKpuySS2stqy90R3YrynR8Kg==" }, "node_modules/typescript": { "version": "4.9.5", @@ -7279,9 +7288,9 @@ "integrity": "sha512-/3nBqG7LqmK1uqaCSTA6s2NwQBDQXNyLAFBzlX6uaxqjIQcAZyq6K+sgcQ40oj02Vn/2mLSkeL9DOfP7BPOwVA==" }, "@swup/plugin": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@swup/plugin/-/plugin-2.0.2.tgz", - "integrity": "sha512-pde/zKIgXpbI+qy8rhuy8De8KniZRuwAoxuOoGTvhErolrW2khlYKtVXgPACRmmPJvGI5ZTfBzBN5txKfIGefQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@swup/plugin/-/plugin-3.0.0.tgz", + "integrity": "sha512-dCFhmFmucMY4ae4qo01fGocU74YrLwffTTtxCUO21OyDgFdywjO4RLP0pgjsiXueBbpcXkexbj4q+O19dWQRoA==", "requires": { "@swup/browserslist-config": "^1.0.0", "@swup/prettier-config": "^1.0.0", @@ -7290,7 +7299,7 @@ "prettier": "^2.7.1", "shelljs": "^0.8.5", "shelljs-live": "^0.0.5", - "swup": "^3.0.0" + "swup": "^4.0.0" }, "dependencies": { "chalk": { @@ -7699,11 +7708,11 @@ } }, "delegate-it": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/delegate-it/-/delegate-it-3.0.1.tgz", - "integrity": "sha512-XU8H4pjDGBW74hFIbjdLPnvtU3HF3P9bbZvoFBSBLb5JgNaTkRb/2lvC1V+9kmZsxVR0kad4bU3rYhQ/4Ij+Gw==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/delegate-it/-/delegate-it-6.0.1.tgz", + "integrity": "sha512-ZS2hRm/SaoPzaeWcWyYjzVVF4/PgALZqma9FXsunFt4XQGVAtQ79Vx7v57vNQNaI75Rl12C+x6TkLqHS5PNKLg==", "requires": { - "typed-query-selector": "^2.6.1" + "typed-query-selector": "^2.10.0" } }, "dom-serializer": { @@ -8754,6 +8763,11 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "path-to-regexp": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -9729,12 +9743,13 @@ } }, "swup": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/swup/-/swup-3.0.5.tgz", - "integrity": "sha512-MD2oVgyvKbUgWeGKjOzDQUfYLtqlQktREcR27QnzqKBSAjApLrbMTWToYrkI2ZnCXG6ApPMjsrRLArSwiJUBmw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/swup/-/swup-4.0.0.tgz", + "integrity": "sha512-GQX9WKFJBe4mZaryKkb8QZHsVP9u0GbMauD/B/msthNFB7rbUOqO1eSvaZB9d4TypHCjbviZ6kKac0v9vChOOA==", "requires": { - "delegate-it": "^3.0.1", - "opencollective-postinstall": "^2.0.2" + "delegate-it": "^6.0.0", + "opencollective-postinstall": "^2.0.2", + "path-to-regexp": "^6.2.1" } }, "tiny-glob": { @@ -9757,9 +9772,9 @@ } }, "typed-query-selector": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.9.2.tgz", - "integrity": "sha512-mOnelGQ0JBbYvboX6v/3vijUkIW9L557DHVRUFQTKG352EWvW/uDN6ORlPvTPRivefqb3QbbyZgLtPmxQaxmug==" + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.11.0.tgz", + "integrity": "sha512-qBs4sfmnLlPOyo2oSdvHbIFHe2CPgU54/1UGfSNceb7LARpIEVxUaeRX0Doje6oKpuySS2stqy90R3YrynR8Kg==" }, "typescript": { "version": "4.9.5",