From 6c9828af6053dc9105a2d04af7f8dac8ab32d3a6 Mon Sep 17 00:00:00 2001 From: Amphiluke Date: Mon, 6 Aug 2018 22:33:51 +0700 Subject: [PATCH 1/5] Update dev dependencies. Minor improvement in README --- README.md | 6 +- package-lock.json | 607 +++++++++++++++++++++++++++------------------- package.json | 8 +- 3 files changed, 365 insertions(+), 256 deletions(-) diff --git a/README.md b/README.md index 0ffe67f..488aa17 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Moreover, the plugin displays such an additional floating scroll bar only in cas There is the only public method used to instantiate and control a floating scroll — `.floatingScroll()`. The plugin method `.floatingScroll()` should be called in context of a scrollable container. It takes an optional argument `method`. The currently supported methods are -* `init` (default value) — used to initialize a floating scroll widget; -* `update` — used to force update of the floating scroll bar parameters (size and position); -* `destroy` — removes a scroll bar and all related event handlers. +* [`init`](#initialisation) (default value) — used to initialize a floating scroll widget; +* [`update`](#updating-scroll-bar) — used to force update of the floating scroll bar parameters (size and position); +* [`destroy`](#destroying-floating-scroll-bar) — removes a scroll bar and all related event handlers. You may also [trigger](https://api.jquery.com/trigger/) events `update.fscroll` and `destroy.fscroll` on containers with attached floating scroll bar: this does the same as invoking the corresponding methods. diff --git a/package-lock.json b/package-lock.json index a67f845..d3328aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,18 +5,18 @@ "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.51.tgz", - "integrity": "sha1-vXHZsZKvl435FYKdOdQJRFZDmgw=", + "version": "7.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.56.tgz", + "integrity": "sha512-OBeGs8UXWpKl0oK2T5nUXNl2yu8RKxqL/7aUnMtKDXCU6VUrNP3npdrPivBA11HPB15TVI49nWf2lntTzoUuAg==", "dev": true, "requires": { - "@babel/highlight": "7.0.0-beta.51" + "@babel/highlight": "7.0.0-beta.56" } }, "@babel/highlight": { - "version": "7.0.0-beta.51", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.51.tgz", - "integrity": "sha1-6IRK4loVlcz9QriWI7Q3bKBtIl0=", + "version": "7.0.0-beta.56", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.56.tgz", + "integrity": "sha512-q4TfI+jJISul6vVpZJktzH4tupwRiVk6KXRhB8PHqJ7erl966I6ePDXl9mAbE8jMM7YswhnnB0j1SYP7LBVyhg==", "dev": true, "requires": { "chalk": "2.4.1", @@ -62,9 +62,9 @@ "dev": true }, "@types/node": { - "version": "10.3.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.3.3.tgz", - "integrity": "sha512-/gwCgiI2e9RzzZTKbl+am3vgNqOt7a9fJ/uxv4SqYKxenoEDNVU3KZEadlpusWhQI0A0dOrZ0T68JYKVjzmgdQ==", + "version": "10.5.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.6.tgz", + "integrity": "sha512-c5Z1j1ysgo4878ptz6gxLcgMfJ6Wf908R3l5KAGabr0XJ72ZFmOCgsaodPpNYTfp4iOrSwgTDvR/BxbFfB4zPQ==", "dev": true }, "acorn": { @@ -74,38 +74,30 @@ "dev": true }, "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-4.1.1.tgz", + "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } + "acorn": "5.7.1" } }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", "dev": true, "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", + "fast-deep-equal": "2.0.1", "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" } }, "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, "amdefine": { @@ -170,11 +162,14 @@ "optional": true }, "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, - "optional": true + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } }, "assert-plus": { "version": "1.0.0", @@ -197,9 +192,9 @@ "optional": true }, "aws4": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", - "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true, "optional": true }, @@ -823,9 +818,9 @@ "dev": true }, "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "optional": true, "requires": { @@ -848,14 +843,14 @@ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", "dev": true, "requires": { - "caniuse-lite": "1.0.30000856", - "electron-to-chromium": "1.3.48" + "caniuse-lite": "1.0.30000874", + "electron-to-chromium": "1.3.55" } }, "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "caller-path": { @@ -874,9 +869,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000856", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000856.tgz", - "integrity": "sha512-x3mYcApHMQemyaHuH/RyqtKCGIYTgEA63fdi+VBvDz8xUSmRiVWTLeyKcoGQCGG6UPR9/+4qG4OKrTa6aSQRKg==", + "version": "1.0.30000874", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000874.tgz", + "integrity": "sha512-29nr1EPiHwrJTAHHsEmTt2h+55L8j2GNFdAcYPlRy2NX6iFz7ZZiepVI7kP/QqlnHLq3KvfWpbmGa0d063U09w==", "dev": true }, "caseless": { @@ -951,7 +946,8 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true + "dev": true, + "optional": true }, "color-convert": { "version": "1.9.2", @@ -992,18 +988,6 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "1.1.0", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" - } - }, "convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", @@ -1020,15 +1004,18 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "dev": true, + "optional": true }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "lru-cache": "4.1.3", + "nice-try": "1.0.4", + "path-key": "2.0.1", + "semver": "5.5.0", "shebang-command": "1.2.0", "which": "1.3.1" } @@ -1058,6 +1045,16 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true, + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.12" + } + }, "del": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", @@ -1098,19 +1095,20 @@ } }, "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, "optional": true, "requires": { - "jsbn": "0.1.1" + "jsbn": "0.1.1", + "safer-buffer": "2.1.2" } }, "electron-to-chromium": { - "version": "1.3.48", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.48.tgz", - "integrity": "sha1-07DYWTgUBE4JLs4hCPw6ya6kuQA=", + "version": "1.3.55", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.55.tgz", + "integrity": "sha1-8VDhCyC3fZ1Br8yjEu/gw7Gn/c4=", "dev": true }, "errno": { @@ -1123,6 +1121,30 @@ "prr": "1.0.1" } }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.3", + "is-callable": "1.1.4", + "is-regex": "1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true, + "requires": { + "is-callable": "1.1.4", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1130,30 +1152,30 @@ "dev": true }, "eslint": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", - "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", + "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", "dev": true, "requires": { - "ajv": "5.5.2", + "ajv": "6.5.2", "babel-code-frame": "6.26.0", "chalk": "2.4.1", - "concat-stream": "1.6.2", - "cross-spawn": "5.1.0", + "cross-spawn": "6.0.5", "debug": "3.1.0", "doctrine": "2.1.0", - "eslint-scope": "3.7.1", + "eslint-scope": "4.0.0", + "eslint-utils": "1.3.1", "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", + "espree": "4.0.0", "esquery": "1.0.1", "esutils": "2.0.2", "file-entry-cache": "2.0.0", "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "11.5.0", - "ignore": "3.3.8", + "globals": "11.7.0", + "ignore": "4.0.3", "imurmurhash": "0.1.4", - "inquirer": "3.3.0", + "inquirer": "5.2.0", "is-resolvable": "1.1.0", "js-yaml": "3.12.0", "json-stable-stringify-without-jsonify": "1.0.1", @@ -1166,12 +1188,13 @@ "path-is-inside": "1.0.2", "pluralize": "7.0.0", "progress": "2.0.0", - "regexpp": "1.1.0", + "regexpp": "2.0.0", "require-uncached": "1.0.3", "semver": "5.5.0", + "string.prototype.matchall": "2.0.0", "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", - "table": "4.0.2", + "table": "4.0.3", "text-table": "0.2.0" }, "dependencies": { @@ -1211,9 +1234,9 @@ } }, "globals": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.5.0.tgz", - "integrity": "sha512-hYyf+kI8dm3nORsiiXUQigOU62hDLfJ9G01uyGMxhc6BKsircrUhC4uJPQPUSuq2GrTmiiEt7ewxlMdBewfmKQ==", + "version": "11.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", + "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "dev": true }, "strip-ansi": { @@ -1237,15 +1260,21 @@ } }, "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", "dev": true, "requires": { "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, + "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", @@ -1253,19 +1282,19 @@ "dev": true }, "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.0.0.tgz", + "integrity": "sha512-kapdTCt1bjmspxStVKX6huolXVV5ZfyZguY1lcfhVVZstce3bqxH9mcLzNn3/mlgW6wQ732+0fuG9v7h0ZQoKg==", "dev": true, "requires": { "acorn": "5.7.1", - "acorn-jsx": "3.0.1" + "acorn-jsx": "4.1.1" } }, "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 }, "esquery": { @@ -1305,9 +1334,9 @@ "dev": true }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true, "optional": true }, @@ -1329,9 +1358,9 @@ "dev": true }, "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, "fast-json-stable-stringify": { @@ -1377,6 +1406,12 @@ "write": "0.2.1" } }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1393,7 +1428,7 @@ "requires": { "asynckit": "0.4.0", "combined-stream": "1.0.6", - "mime-types": "2.1.18" + "mime-types": "2.1.19" } }, "fs.realpath": { @@ -1402,6 +1437,12 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -1480,6 +1521,44 @@ "requires": { "ajv": "5.5.2", "har-schema": "2.0.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "dev": true, + "optional": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true, + "optional": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "1.1.1" } }, "has-ansi": { @@ -1497,6 +1576,12 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -1529,9 +1614,9 @@ } }, "ignore": { - "version": "3.3.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", - "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", + "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", "dev": true }, "image-size": { @@ -1564,9 +1649,9 @@ "dev": true }, "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { "ansi-escapes": "3.1.0", @@ -1578,8 +1663,7 @@ "lodash": "4.17.10", "mute-stream": "0.0.7", "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", + "rxjs": "5.5.11", "string-width": "2.1.1", "strip-ansi": "4.0.0", "through": "2.3.8" @@ -1637,9 +1721,21 @@ "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "dev": true, "requires": { - "loose-envify": "1.3.1" + "loose-envify": "1.4.0" } }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, "is-finite": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", @@ -1685,12 +1781,27 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "1.0.3" + } + }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1698,12 +1809,6 @@ "dev": true, "optional": true }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1735,7 +1840,7 @@ "dev": true, "requires": { "argparse": "1.0.10", - "esprima": "4.0.0" + "esprima": "4.0.1" } }, "jsbn": { @@ -1759,9 +1864,9 @@ "optional": true }, "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify-without-jsonify": { @@ -1797,9 +1902,9 @@ } }, "less": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/less/-/less-3.0.4.tgz", - "integrity": "sha512-q3SyEnPKbk9zh4l36PGeW2fgynKu+FpbhiUNx/yaiBUQ3V0CbACCgb9FzYWcRgI2DJlP6eI4jc8XPrCTi55YcQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/less/-/less-3.8.0.tgz", + "integrity": "sha512-746DPDyL+Wsjo7h/Z3t+A3Mg/mpDTaxW4puZyLhCQJjWJJvHggN735orjuCLIYgo7jKqv1zWLiQrxkuUOg5oGA==", "dev": true, "requires": { "errno": "0.1.7", @@ -1847,24 +1952,14 @@ "dev": true }, "loose-envify": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "requires": { "js-tokens": "3.0.2" } }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -1873,18 +1968,18 @@ "optional": true }, "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==", + "version": "1.35.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", "dev": true }, "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "version": "2.1.19", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", "dev": true, "requires": { - "mime-db": "1.33.0" + "mime-db": "1.35.0" } }, "mimic-fn": { @@ -1935,6 +2030,12 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "nice-try": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", + "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "dev": true + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -1954,6 +2055,12 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2010,6 +2117,12 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -2056,12 +2169,6 @@ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, "progress": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", @@ -2085,18 +2192,11 @@ "dev": true, "optional": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true, - "optional": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "qs": { "version": "6.5.2", @@ -2105,21 +2205,6 @@ "dev": true, "optional": true }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" - } - }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -2143,10 +2228,19 @@ "private": "0.1.8" } }, + "regexp.prototype.flags": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", + "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "dev": true, + "requires": { + "define-properties": "1.1.2" + } + }, "regexpp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", - "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", + "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", "dev": true }, "regexpu-core": { @@ -2200,10 +2294,10 @@ "optional": true, "requires": { "aws-sign2": "0.7.0", - "aws4": "1.7.0", + "aws4": "1.8.0", "caseless": "0.12.0", "combined-stream": "1.0.6", - "extend": "3.0.1", + "extend": "3.0.2", "forever-agent": "0.6.1", "form-data": "2.3.2", "har-validator": "5.0.3", @@ -2211,14 +2305,14 @@ "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", + "mime-types": "2.1.19", "oauth-sign": "0.8.2", "performance-now": "2.1.0", "qs": "6.5.2", "safe-buffer": "5.1.2", "tough-cookie": "2.3.4", "tunnel-agent": "0.6.0", - "uuid": "3.2.1" + "uuid": "3.3.2" } }, "require-uncached": { @@ -2257,19 +2351,19 @@ } }, "rollup": { - "version": "0.60.7", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.60.7.tgz", - "integrity": "sha512-Uj5I1A2PnDgA79P+v1dsNs1IHVydNgeJdKWRfoEJJdNMmyx07TRYqUtPUINaZ/gDusncFy1SZsT3lJnBBI8CGw==", + "version": "0.63.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.63.5.tgz", + "integrity": "sha512-dFf8LpUNzIj3oE0vCvobX6rqOzHzLBoblyFp+3znPbjiSmSvOoK2kMKx+Fv9jYduG1rvcCfCveSgEaQHjWRF6g==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "10.3.3" + "@types/node": "10.5.6" } }, "rollup-plugin-babel": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-3.0.4.tgz", - "integrity": "sha512-TGhQbliTZnRoUhd2214K3r4KJUBu9J1DPzcrAnkluVXOVrveU9OvAaYQ16KyOmujAoq+LMC1+x6YF2xBrU7t+g==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-3.0.7.tgz", + "integrity": "sha512-bVe2y0z/V5Ax1qU8NX/0idmzIwJPdUGu8Xx3vXH73h0yGjxfv2gkFI82MBVg49SlsFlLTBadBHb67zy4TWM3hA==", "dev": true, "requires": { "rollup-pluginutils": "1.5.2" @@ -2281,8 +2375,8 @@ "integrity": "sha512-VC6chT7QnrV6JzdgkPE0hP/atRBxaa3CPbVXfZJ8nJLjcidSdWftOst098RasYRUTKxJWAgdaJN1+uiZM6iffA==", "dev": true, "requires": { - "@babel/code-frame": "7.0.0-beta.51", - "terser": "3.7.6" + "@babel/code-frame": "7.0.0-beta.56", + "terser": "3.8.1" } }, "rollup-pluginutils": { @@ -2304,19 +2398,13 @@ "is-promise": "2.1.0" } }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "rxjs": { + "version": "5.5.11", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", + "integrity": "sha512-3bjO7UwWfA2CV7lmwYMBzj4fQ6Cq+ftHc2MvUe+WMS7wcdJ1LosDWmdjPQanYp2dBRj572p7PeU81JUxHKOcBA==", "dev": true, "requires": { - "rx-lite": "4.0.8" + "symbol-observable": "1.0.1" } }, "safe-buffer": { @@ -2401,11 +2489,11 @@ "dev": true, "optional": true, "requires": { - "asn1": "0.2.3", + "asn1": "0.2.4", "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", + "bcrypt-pbkdf": "1.0.2", "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", + "ecc-jsbn": "0.1.2", "getpass": "0.1.7", "jsbn": "0.1.1", "safer-buffer": "2.1.2", @@ -2439,13 +2527,17 @@ } } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "string.prototype.matchall": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", + "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", "dev": true, "requires": { - "safe-buffer": "5.1.2" + "define-properties": "1.1.2", + "es-abstract": "1.12.0", + "function-bind": "1.1.1", + "has-symbols": "1.0.0", + "regexp.prototype.flags": "1.2.0" } }, "strip-ansi": { @@ -2469,14 +2561,20 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", + "ajv": "6.5.2", + "ajv-keywords": "3.2.0", "chalk": "2.4.1", "lodash": "4.17.10", "slice-ansi": "1.0.0", @@ -2515,19 +2613,20 @@ } }, "terser": { - "version": "3.7.6", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.7.6.tgz", - "integrity": "sha512-HbknfLRteizRcQWXTnpVK5rMleOEZh5g5y8sKzTm/W3pf4xrrdvajMSLMg2/45t0U8Hbk2+bcJ1IPXjO77kWtw==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.8.1.tgz", + "integrity": "sha512-FRin3gKQ0vm0xPPLuxw1FqpVgv1b2pBpYCaFb5qe6A7sD749Fnq1VbDiX3CEFM0BV0fqDzFtBfgmxhxCdzKQIg==", "dev": true, "requires": { - "commander": "2.14.1", - "source-map": "0.6.1" + "commander": "2.16.0", + "source-map": "0.6.1", + "source-map-support": "0.5.6" }, "dependencies": { "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.16.0.tgz", + "integrity": "sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==", "dev": true }, "source-map": { @@ -2535,6 +2634,16 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "source-map-support": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "dev": true, + "requires": { + "buffer-from": "1.1.1", + "source-map": "0.6.1" + } } } }, @@ -2573,6 +2682,15 @@ "optional": true, "requires": { "punycode": "1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true, + "optional": true + } } }, "trim-right": { @@ -2607,22 +2725,19 @@ "prelude-ls": "1.1.2" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "2.1.1" + } }, "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true, "optional": true }, @@ -2667,12 +2782,6 @@ "requires": { "mkdirp": "0.5.1" } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true } } } diff --git a/package.json b/package.json index 03bf10a..b3abb42 100644 --- a/package.json +++ b/package.json @@ -31,11 +31,11 @@ "devDependencies": { "babel-core": "^6.26.3", "babel-preset-env": "^1.7.0", - "eslint": "^4.19.1", - "less": "^3.0.4", + "eslint": "^5.3.0", + "less": "^3.8.0", "less-plugin-clean-css": "^1.5.1", - "rollup": "^0.60.7", - "rollup-plugin-babel": "^3.0.4", + "rollup": "^0.63.5", + "rollup-plugin-babel": "^3.0.7", "rollup-plugin-terser": "^1.0.1" } } From b0c964b40b4ecd7839b7a056a4f72dfd92911d79 Mon Sep 17 00:00:00 2001 From: Amphiluke Date: Wed, 22 Aug 2018 21:19:32 +0700 Subject: [PATCH 2/5] Fix eventual bug with widget re-rendering in Chrome --- src/jquery.floatingscroll.less | 37 +++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/jquery.floatingscroll.less b/src/jquery.floatingscroll.less index 0dcc660..285e704 100644 --- a/src/jquery.floatingscroll.less +++ b/src/jquery.floatingscroll.less @@ -1,30 +1,35 @@ .fl-scrolls { - &, & div { - font-size:1px; - line-height:0; - margin:0; - padding:0; - } - & { - bottom:0; - height:35px; - overflow:auto; - position:fixed; - } - & div { + bottom:0; + height:35px; + overflow:auto; + position:fixed; + + div { height:1px; overflow:hidden; pointer-events:none; + &:before { + content:"\A0"; // fixes #6 + } } - & div:before { - content:"\A0"; /* fixes #6 */ + + &, + & div { + font-size:1px; + line-height:0; + margin:0; + padding:0; } + &-hidden { bottom:9999px; + div:before { + content:"\A0\A0"; // changing content fixes eventual bug with widget re-rendering in Chrome + } } &-viewport { - /* It can be any type of positioning except static. Redefine in your CSS as needed */ + // It can be any type of positioning except static. Redefine in your CSS as needed position:relative; } &-body { From 97b794033c0c1ab22448560419ff413aca2c16a1 Mon Sep 17 00:00:00 2001 From: Amphiluke Date: Wed, 22 Aug 2018 22:22:26 +0700 Subject: [PATCH 3/5] Refactoring --- src/jquery.floatingscroll.js | 152 ++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 74 deletions(-) diff --git a/src/jquery.floatingscroll.js b/src/jquery.floatingscroll.js index 0e6adcd..4da6570 100644 --- a/src/jquery.floatingscroll.js +++ b/src/jquery.floatingscroll.js @@ -1,140 +1,144 @@ import $ from "jquery"; -class FScroll { - constructor(cont) { - let inst = this; - inst.cont = cont[0]; - let scrollBody = cont.closest(".fl-scrolls-body"); +let floatingScrollProto = { + init(container) { + let instance = this; + let scrollBody = container.closest(".fl-scrolls-body"); if (scrollBody.length) { - inst.scrollBody = scrollBody; + instance.scrollBody = scrollBody; } - inst.sbar = inst.initScroll(); - inst.visible = true; - inst.updateAPI(); // recalculate floating scrolls and hide those of them whose containers are out of sight - inst.syncSbar(inst.cont); - inst.addEventHandlers(); - } + instance.container = container[0]; + instance.visible = true; + instance.initWidget(); + instance.updateAPI(); // recalculate scrollbar parameters and set its visibility + instance.syncWidget(instance.container); + instance.addEventHandlers(); + }, - initScroll() { - let flscroll = $("
"); - let {cont} = this; - $("
").appendTo(flscroll).css({width: `${cont.scrollWidth}px`}); - return flscroll.appendTo(cont); - } + initWidget() { + let instance = this; + let widget = instance.widget = $("
"); + $("
").appendTo(widget).css({width: `${instance.container.scrollWidth}px`}); + widget.appendTo(instance.container); + }, addEventHandlers() { - let inst = this; - let eventHandlers = inst.eventHandlers = [ + let instance = this; + let eventHandlers = instance.eventHandlers = [ { - $el: inst.scrollBody || $(window), + $el: instance.scrollBody || $(window), handlers: { // Don't use `$.proxy()` since it makes impossible event unbinding individually per instance // (see the warning at http://api.jquery.com/unbind/) scroll() { - inst.checkVisibility(); + instance.checkVisibility(); }, resize() { - inst.updateAPI(); + instance.updateAPI(); } } }, { - $el: inst.sbar, + $el: instance.widget, handlers: { - scroll({target}) { - inst.visible && inst.syncCont(target, true); + scroll() { + if (instance.visible) { + instance.syncContainer(true); + } } } }, { - $el: $(inst.cont), + $el: $(instance.container), handlers: { - scroll({target}) { - inst.syncSbar(target, true); + scroll() { + instance.syncWidget(true); }, focusin() { - setTimeout(inst.syncSbar.bind(inst, inst.cont), 0); + setTimeout(() => instance.syncWidget(), 0); }, "update.fscroll"({namespace}) { // Check event namespace to ensure that this is not an extraneous event in a bubbling phase if (namespace === "fscroll") { - inst.updateAPI(); + instance.updateAPI(); } }, "destroy.fscroll"({namespace}) { if (namespace === "fscroll") { - inst.destroyAPI(); + instance.destroyAPI(); } } } } ]; eventHandlers.forEach(({$el, handlers}) => $el.bind(handlers)); - } + }, checkVisibility() { - let inst = this; - let mustHide = (inst.sbar[0].scrollWidth <= inst.sbar[0].offsetWidth); + let instance = this; + let {widget, container, scrollBody} = instance; + let mustHide = (widget[0].scrollWidth <= widget[0].offsetWidth); if (!mustHide) { - let contRect = inst.cont.getBoundingClientRect(); - let maxVisibleY = inst.scrollBody ? - inst.scrollBody[0].getBoundingClientRect().bottom : + let containerRect = container.getBoundingClientRect(); + let maxVisibleY = scrollBody ? + scrollBody[0].getBoundingClientRect().bottom : window.innerHeight || document.documentElement.clientHeight; - mustHide = ((contRect.bottom <= maxVisibleY) || (contRect.top > maxVisibleY)); + mustHide = ((containerRect.bottom <= maxVisibleY) || (containerRect.top > maxVisibleY)); } - if (inst.visible === mustHide) { - inst.visible = !mustHide; - // we cannot simply hide a floating scroll bar since its scrollLeft property will not update in that case - inst.sbar.toggleClass("fl-scrolls-hidden"); + if (instance.visible === mustHide) { + instance.visible = !mustHide; + // We cannot simply hide the scrollbar since its scrollLeft property will not update in that case + widget.toggleClass("fl-scrolls-hidden"); } - } + }, - syncCont(sender, preventSyncSbar) { - let inst = this; - // Prevents next syncSbar function from changing scroll position - if (inst.preventSyncCont === true) { - inst.preventSyncCont = false; + syncContainer(skipSyncWidget = false) { + let instance = this; + // Prevents next syncWidget function from changing scroll position + if (instance.skipSyncContainer === true) { + instance.skipSyncContainer = false; return; } - inst.preventSyncSbar = !!preventSyncSbar; - inst.cont.scrollLeft = sender.scrollLeft; - } + instance.skipSyncWidget = skipSyncWidget; + instance.container.scrollLeft = instance.widget[0].scrollLeft; + }, - syncSbar(sender, preventSyncCont) { - let inst = this; - // Prevents next syncCont function from changing scroll position - if (inst.preventSyncSbar === true) { - inst.preventSyncSbar = false; + syncWidget(skipSyncContainer = false) { + let instance = this; + // Prevents next syncContainer function from changing scroll position + if (instance.skipSyncWidget === true) { + instance.skipSyncWidget = false; return; } - inst.preventSyncCont = !!preventSyncCont; - inst.sbar[0].scrollLeft = sender.scrollLeft; - } + instance.skipSyncContainer = skipSyncContainer; + instance.widget[0].scrollLeft = instance.container.scrollLeft; + }, // Recalculate scroll width and container boundaries updateAPI() { - let inst = this; - let {cont} = inst; - inst.sbar.width($(cont).outerWidth()); - if (!inst.scrollBody) { - inst.sbar.css("left", `${cont.getBoundingClientRect().left}px`); + let instance = this; + let {widget, container, scrollBody} = instance; + widget.width($(container).outerWidth()); + if (!scrollBody) { + widget.css("left", `${container.getBoundingClientRect().left}px`); } - $("div", inst.sbar).width(cont.scrollWidth); - inst.checkVisibility(); // fixes issue #2 - } + $("div", widget).width(container.scrollWidth); + instance.checkVisibility(); // fixes issue #2 + }, // Remove a scrollbar and all related event handlers destroyAPI() { - this.eventHandlers.forEach(({$el, handlers}) => $el.unbind(handlers)); - this.eventHandlers = null; - this.sbar.remove(); + let instance = this; + instance.eventHandlers.forEach(({$el, handlers}) => $el.unbind(handlers)); + instance.widget.remove(); + instance.eventHandlers = instance.widget = instance.container = instance.scrollBody = null; } -} +}; $.fn.floatingScroll = function (method = "init") { if (method === "init") { - this.each((index, el) => new FScroll($(el))); - } else if (FScroll.prototype.hasOwnProperty(`${method}API`)) { + this.each((index, el) => Object.create(floatingScrollProto).init($(el))); + } else if (floatingScrollProto.hasOwnProperty(`${method}API`)) { this.trigger(`${method}.fscroll`); } return this; From e5dd589950dba5e04b8690dd94f8f6f3182127c9 Mon Sep 17 00:00:00 2001 From: Amphiluke Date: Wed, 22 Aug 2018 22:32:34 +0700 Subject: [PATCH 4/5] Update README. Update dependencies. Rebuild --- README.md | 14 +- bower.json | 6 +- dist/jquery.floatingscroll.css | 2 +- dist/jquery.floatingscroll.es6.min.js | 4 +- dist/jquery.floatingscroll.min.js | 4 +- floating-scroll.jquery.json | 4 +- package-lock.json | 593 ++++++++++++++++++-------- package.json | 16 +- 8 files changed, 452 insertions(+), 191 deletions(-) diff --git a/README.md b/README.md index 488aa17..c0701ba 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ The general purpose of the plugin is to provide some lengthy containers on the page with a separate horizontal scroll bar, which does not vanish from sight when the entire page is scrolled. So, the user will always be able to scroll the container even if its own scroll bar is outside the viewport. -Moreover, the plugin displays such an additional floating scroll bar only in case of actual need, i.e. floatingScroll does not result in unnecessary scroll bar duplication. So, one uses the floating scroll bar only if the “native” one is out of sight. +:bulb: **Tip:** floating-scroll is a jQuery plugin. If you are rather looking for a standalone dependency-free module with the same functionality, please check out the sister project [handy-scroll](https://github.com/Amphiluke/handy-scroll) instead. ## Details & API -There is the only public method used to instantiate and control a floating scroll — `.floatingScroll()`. The plugin method `.floatingScroll()` should be called in context of a scrollable container. It takes an optional argument `method`. The currently supported methods are +There is the only public method used to instantiate and control a floating scroll bar — `.floatingScroll()`. The plugin method `.floatingScroll()` should be called in context of a scrollable container. It takes an optional argument `method`. The currently supported methods are -* [`init`](#initialisation) (default value) — used to initialize a floating scroll widget; +* [`init`](#initialisation) (default value) — used to initialize a floating scroll bar widget; * [`update`](#updating-scroll-bar) — used to force update of the floating scroll bar parameters (size and position); * [`destroy`](#destroying-floating-scroll-bar) — removes a scroll bar and all related event handlers. @@ -48,7 +48,7 @@ _The auto-initialisation feature is available starting with v3.0.0._ ### Updating scroll bar -If you attach a floating scroll bar to a container whose size and/or content may dynamically change, then you need a way to update the scroll bar each time the container changes. This can be done by invoking the method `update` as in example below. +If you attach a floating scroll bar to a container whose size and/or content may dynamically change, then you need a way to update the scroll bar each time the container’s sizes change. This can be done by invoking the method `update` as in the example below. ```javascript $(".spacious-container").floatingScroll("init"); @@ -88,10 +88,10 @@ $(".spacious-container").floatingScroll(); The plugin’s CSS file provides some basic styles for elements with classes `.fl-scrolls-viewport` and `.fl-scrolls-body`. Feel free to adjust their styles in your stylesheets as needed. -### Tips +### “Unobtrusive” mode -You can also make a floating scroll bar more “unobtrusive” so that it will appear only when the mouse pointer hovers over the scrollable container. To do so just apply the class `fl-scrolls-hoverable` to the desired scrollable container owning the floating scroll bar. +You can make a floating scroll bar more “unobtrusive” so that it will appear only when the mouse pointer hovers over the scrollable container. To do so just apply the class `fl-scrolls-hoverable` to the desired scrollable container owning the floating scroll bar. ## Live demos -Check out some usage demos [here](https://amphiluke.github.io/floating-scroll/). \ No newline at end of file +Check out some usage demos [here](https://amphiluke.github.io/floating-scroll/). diff --git a/bower.json b/bower.json index 4f51783..bb3498a 100644 --- a/bower.json +++ b/bower.json @@ -2,8 +2,8 @@ "name": "floating-scroll", "description": "A lightweight jQuery plugin providing floating scrollbar functionality", "main": [ - "src/jquery.floatingscroll.js", - "src/jquery.floatingscroll.css" + "dist/jquery.floatingscroll.min.js", + "dist/jquery.floatingscroll.css" ], "moduleType": [ "amd", @@ -16,6 +16,8 @@ "license": "MIT", "keywords": [ "scrollbar", + "widget", + "user-interface", "jquery-plugin", "ecosystem:jquery" ], diff --git a/dist/jquery.floatingscroll.css b/dist/jquery.floatingscroll.css index 8817398..a6ddd32 100644 --- a/dist/jquery.floatingscroll.css +++ b/dist/jquery.floatingscroll.css @@ -1 +1 @@ -.fl-scrolls{bottom:0;height:35px;overflow:auto;position:fixed}.fl-scrolls,.fl-scrolls div{font-size:1px;line-height:0;margin:0;padding:0}.fl-scrolls div{height:1px;overflow:hidden;pointer-events:none}.fl-scrolls div:before{content:"\A0"}.fl-scrolls-hidden{bottom:9999px}.fl-scrolls-viewport{position:relative}.fl-scrolls-body{overflow:auto}.fl-scrolls-viewport .fl-scrolls{left:0;position:absolute}.fl-scrolls-hoverable .fl-scrolls{opacity:0;transition:opacity .5s ease .3s}.fl-scrolls-hoverable:hover .fl-scrolls{opacity:1} \ No newline at end of file +.fl-scrolls{bottom:0;height:35px;overflow:auto;position:fixed}.fl-scrolls div{height:1px;overflow:hidden;pointer-events:none}.fl-scrolls div:before{content:"\A0"}.fl-scrolls,.fl-scrolls div{font-size:1px;line-height:0;margin:0;padding:0}.fl-scrolls-hidden{bottom:9999px}.fl-scrolls-hidden div:before{content:"\A0\A0"}.fl-scrolls-viewport{position:relative}.fl-scrolls-body{overflow:auto}.fl-scrolls-viewport .fl-scrolls{left:0;position:absolute}.fl-scrolls-hoverable .fl-scrolls{opacity:0;transition:opacity .5s ease .3s}.fl-scrolls-hoverable:hover .fl-scrolls{opacity:1} \ No newline at end of file diff --git a/dist/jquery.floatingscroll.es6.min.js b/dist/jquery.floatingscroll.es6.min.js index 1692328..43b8179 100644 --- a/dist/jquery.floatingscroll.es6.min.js +++ b/dist/jquery.floatingscroll.es6.min.js @@ -1,6 +1,6 @@ /*! -floating-scroll v3.0.2 +floating-scroll v3.0.3 https://amphiluke.github.io/floating-scroll/ (c) 2018 Amphiluke */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,function(e){"use strict";class t{constructor(e){let t=this;t.cont=e[0];let l=e.closest(".fl-scrolls-body");l.length&&(t.scrollBody=l),t.sbar=t.initScroll(),t.visible=!0,t.updateAPI(),t.syncSbar(t.cont),t.addEventHandlers()}initScroll(){let t=e("
"),{cont:l}=this;return e("
").appendTo(t).css({width:`${l.scrollWidth}px`}),t.appendTo(l)}addEventHandlers(){let t=this;(t.eventHandlers=[{$el:t.scrollBody||e(window),handlers:{scroll(){t.checkVisibility()},resize(){t.updateAPI()}}},{$el:t.sbar,handlers:{scroll({target:e}){t.visible&&t.syncCont(e,!0)}}},{$el:e(t.cont),handlers:{scroll({target:e}){t.syncSbar(e,!0)},focusin(){setTimeout(t.syncSbar.bind(t,t.cont),0)},"update.fscroll"({namespace:e}){"fscroll"===e&&t.updateAPI()},"destroy.fscroll"({namespace:e}){"fscroll"===e&&t.destroyAPI()}}}]).forEach(({$el:e,handlers:t})=>e.bind(t))}checkVisibility(){let e=this,t=e.sbar[0].scrollWidth<=e.sbar[0].offsetWidth;if(!t){let l=e.cont.getBoundingClientRect(),n=e.scrollBody?e.scrollBody[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;t=l.bottom<=n||l.top>n}e.visible===t&&(e.visible=!t,e.sbar.toggleClass("fl-scrolls-hidden"))}syncCont(e,t){let l=this;!0!==l.preventSyncCont?(l.preventSyncSbar=!!t,l.cont.scrollLeft=e.scrollLeft):l.preventSyncCont=!1}syncSbar(e,t){let l=this;!0!==l.preventSyncSbar?(l.preventSyncCont=!!t,l.sbar[0].scrollLeft=e.scrollLeft):l.preventSyncSbar=!1}updateAPI(){let t=this,{cont:l}=t;t.sbar.width(e(l).outerWidth()),t.scrollBody||t.sbar.css("left",`${l.getBoundingClientRect().left}px`),e("div",t.sbar).width(l.scrollWidth),t.checkVisibility()}destroyAPI(){this.eventHandlers.forEach(({$el:e,handlers:t})=>e.unbind(t)),this.eventHandlers=null,this.sbar.remove()}}e.fn.floatingScroll=function(l="init"){return"init"===l?this.each((l,n)=>new t(e(n))):t.prototype.hasOwnProperty(`${l}API`)&&this.trigger(`${l}.fscroll`),this},e(document).ready(()=>{e("body [data-fl-scrolls]").floatingScroll()})}); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,function(e){"use strict";let t={init(e){let t=this,i=e.closest(".fl-scrolls-body");i.length&&(t.scrollBody=i),t.container=e[0],t.visible=!0,t.initWidget(),t.updateAPI(),t.syncWidget(t.container),t.addEventHandlers()},initWidget(){let t=this.widget=e("
");e("
").appendTo(t).css({width:`${this.container.scrollWidth}px`}),t.appendTo(this.container)},addEventHandlers(){let t=this;(t.eventHandlers=[{$el:t.scrollBody||e(window),handlers:{scroll(){t.checkVisibility()},resize(){t.updateAPI()}}},{$el:t.widget,handlers:{scroll(){t.visible&&t.syncContainer(!0)}}},{$el:e(t.container),handlers:{scroll(){t.syncWidget(!0)},focusin(){setTimeout(()=>t.syncWidget(),0)},"update.fscroll"({namespace:e}){"fscroll"===e&&t.updateAPI()},"destroy.fscroll"({namespace:e}){"fscroll"===e&&t.destroyAPI()}}}]).forEach(({$el:e,handlers:t})=>e.bind(t))},checkVisibility(){let e=this,{widget:t,container:i,scrollBody:n}=e,l=t[0].scrollWidth<=t[0].offsetWidth;if(!l){let e=i.getBoundingClientRect(),t=n?n[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;l=e.bottom<=t||e.top>t}e.visible===l&&(e.visible=!l,t.toggleClass("fl-scrolls-hidden"))},syncContainer(e=!1){let t=this;!0!==t.skipSyncContainer?(t.skipSyncWidget=e,t.container.scrollLeft=t.widget[0].scrollLeft):t.skipSyncContainer=!1},syncWidget(e=!1){let t=this;!0!==t.skipSyncWidget?(t.skipSyncContainer=e,t.widget[0].scrollLeft=t.container.scrollLeft):t.skipSyncWidget=!1},updateAPI(){let{widget:t,container:i,scrollBody:n}=this;t.width(e(i).outerWidth()),n||t.css("left",`${i.getBoundingClientRect().left}px`),e("div",t).width(i.scrollWidth),this.checkVisibility()},destroyAPI(){this.eventHandlers.forEach(({$el:e,handlers:t})=>e.unbind(t)),this.widget.remove(),this.eventHandlers=this.widget=this.container=this.scrollBody=null}};e.fn.floatingScroll=function(i="init"){return"init"===i?this.each((i,n)=>Object.create(t).init(e(n))):t.hasOwnProperty(`${i}API`)&&this.trigger(`${i}.fscroll`),this},e(document).ready(()=>{e("body [data-fl-scrolls]").floatingScroll()})}); diff --git a/dist/jquery.floatingscroll.min.js b/dist/jquery.floatingscroll.min.js index 1c8ca17..bdc3e7c 100644 --- a/dist/jquery.floatingscroll.min.js +++ b/dist/jquery.floatingscroll.min.js @@ -1,6 +1,6 @@ /*! -floating-scroll v3.0.2 +floating-scroll v3.0.3 https://amphiluke.github.io/floating-scroll/ (c) 2018 Amphiluke */ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n(t.jQuery)}(this,function(t){"use strict";var n=function(){function n(t){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);this.cont=t[0];var i=t.closest(".fl-scrolls-body");i.length&&(this.scrollBody=i),this.sbar=this.initScroll(),this.visible=!0,this.updateAPI(),this.syncSbar(this.cont),this.addEventHandlers()}return n.prototype.initScroll=function(){var n=t("
"),i=this.cont;return t("
").appendTo(n).css({width:i.scrollWidth+"px"}),n.appendTo(i)},n.prototype.addEventHandlers=function(){var n=this;(n.eventHandlers=[{$el:n.scrollBody||t(window),handlers:{scroll:function(){n.checkVisibility()},resize:function(){n.updateAPI()}}},{$el:n.sbar,handlers:{scroll:function(t){var i=t.target;n.visible&&n.syncCont(i,!0)}}},{$el:t(n.cont),handlers:{scroll:function(t){var i=t.target;n.syncSbar(i,!0)},focusin:function(){setTimeout(n.syncSbar.bind(n,n.cont),0)},"update.fscroll":function(t){"fscroll"===t.namespace&&n.updateAPI()},"destroy.fscroll":function(t){"fscroll"===t.namespace&&n.destroyAPI()}}}]).forEach(function(t){var n=t.$el,i=t.handlers;return n.bind(i)})},n.prototype.checkVisibility=function(){var t=this.sbar[0].scrollWidth<=this.sbar[0].offsetWidth;if(!t){var n=this.cont.getBoundingClientRect(),i=this.scrollBody?this.scrollBody[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;t=n.bottom<=i||n.top>i}this.visible===t&&(this.visible=!t,this.sbar.toggleClass("fl-scrolls-hidden"))},n.prototype.syncCont=function(t,n){!0!==this.preventSyncCont?(this.preventSyncSbar=!!n,this.cont.scrollLeft=t.scrollLeft):this.preventSyncCont=!1},n.prototype.syncSbar=function(t,n){!0!==this.preventSyncSbar?(this.preventSyncCont=!!n,this.sbar[0].scrollLeft=t.scrollLeft):this.preventSyncSbar=!1},n.prototype.updateAPI=function(){var n=this.cont;this.sbar.width(t(n).outerWidth()),this.scrollBody||this.sbar.css("left",n.getBoundingClientRect().left+"px"),t("div",this.sbar).width(n.scrollWidth),this.checkVisibility()},n.prototype.destroyAPI=function(){this.eventHandlers.forEach(function(t){var n=t.$el,i=t.handlers;return n.unbind(i)}),this.eventHandlers=null,this.sbar.remove()},n}();t.fn.floatingScroll=function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"init";return"init"===i?this.each(function(i,e){return new n(t(e))}):n.prototype.hasOwnProperty(i+"API")&&this.trigger(i+".fscroll"),this},t(document).ready(function(){t("body [data-fl-scrolls]").floatingScroll()})}); +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],i):i(t.jQuery)}(this,function(t){"use strict";var i={init:function(t){var i=t.closest(".fl-scrolls-body");i.length&&(this.scrollBody=i),this.container=t[0],this.visible=!0,this.initWidget(),this.updateAPI(),this.syncWidget(this.container),this.addEventHandlers()},initWidget:function(){var i=this.widget=t("
");t("
").appendTo(i).css({width:this.container.scrollWidth+"px"}),i.appendTo(this.container)},addEventHandlers:function(){var i=this;(i.eventHandlers=[{$el:i.scrollBody||t(window),handlers:{scroll:function(){i.checkVisibility()},resize:function(){i.updateAPI()}}},{$el:i.widget,handlers:{scroll:function(){i.visible&&i.syncContainer(!0)}}},{$el:t(i.container),handlers:{scroll:function(){i.syncWidget(!0)},focusin:function(){setTimeout(function(){return i.syncWidget()},0)},"update.fscroll":function(t){"fscroll"===t.namespace&&i.updateAPI()},"destroy.fscroll":function(t){"fscroll"===t.namespace&&i.destroyAPI()}}}]).forEach(function(t){var i=t.$el,n=t.handlers;return i.bind(n)})},checkVisibility:function(){var t=this.widget,i=this.container,n=this.scrollBody,e=t[0].scrollWidth<=t[0].offsetWidth;if(!e){var s=i.getBoundingClientRect(),o=n?n[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;e=s.bottom<=o||s.top>o}this.visible===e&&(this.visible=!e,t.toggleClass("fl-scrolls-hidden"))},syncContainer:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==this.skipSyncContainer?(this.skipSyncWidget=t,this.container.scrollLeft=this.widget[0].scrollLeft):this.skipSyncContainer=!1},syncWidget:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==this.skipSyncWidget?(this.skipSyncContainer=t,this.widget[0].scrollLeft=this.container.scrollLeft):this.skipSyncWidget=!1},updateAPI:function(){var i=this.widget,n=this.container,e=this.scrollBody;i.width(t(n).outerWidth()),e||i.css("left",n.getBoundingClientRect().left+"px"),t("div",i).width(n.scrollWidth),this.checkVisibility()},destroyAPI:function(){this.eventHandlers.forEach(function(t){var i=t.$el,n=t.handlers;return i.unbind(n)}),this.widget.remove(),this.eventHandlers=this.widget=this.container=this.scrollBody=null}};t.fn.floatingScroll=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"init";return"init"===n?this.each(function(n,e){return Object.create(i).init(t(e))}):i.hasOwnProperty(n+"API")&&this.trigger(n+".fscroll"),this},t(document).ready(function(){t("body [data-fl-scrolls]").floatingScroll()})}); diff --git a/floating-scroll.jquery.json b/floating-scroll.jquery.json index d6457ca..0417566 100644 --- a/floating-scroll.jquery.json +++ b/floating-scroll.jquery.json @@ -1,10 +1,12 @@ { "name": "floating-scroll", "title": "floatingScroll", - "version": "3.0.2", + "version": "3.0.3", "description": "A lightweight jQuery plugin providing floating scrollbar functionality", "keywords": [ "scrollbar", + "widget", + "user-interface", "jquery-plugin", "ecosystem:jquery" ], diff --git a/package-lock.json b/package-lock.json index d3328aa..e8122ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { "name": "floating-scroll", - "version": "3.0.2", + "version": "3.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/code-frame": { - "version": "7.0.0-beta.56", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.56.tgz", - "integrity": "sha512-OBeGs8UXWpKl0oK2T5nUXNl2yu8RKxqL/7aUnMtKDXCU6VUrNP3npdrPivBA11HPB15TVI49nWf2lntTzoUuAg==", + "version": "7.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-rc.1.tgz", + "integrity": "sha512-qhQo3GqwqMUv03SxxjcEkWtlkEDvFYrBKbJUn4Dtd9amC2cLkJ3me4iYUVSBbVXWbfbVRalEeVBHzX4aQYKnBg==", "dev": true, "requires": { - "@babel/highlight": "7.0.0-beta.56" + "@babel/highlight": "7.0.0-rc.1" } }, "@babel/highlight": { - "version": "7.0.0-beta.56", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.56.tgz", - "integrity": "sha512-q4TfI+jJISul6vVpZJktzH4tupwRiVk6KXRhB8PHqJ7erl966I6ePDXl9mAbE8jMM7YswhnnB0j1SYP7LBVyhg==", + "version": "7.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-rc.1.tgz", + "integrity": "sha512-5PgPDV6F5s69XNznTcP0za3qH7qgBkr9DVQTXfZtpF+3iEyuIZB1Mjxu52F5CFxgzQUQJoBYHVxtH4Itdb5MgA==", "dev": true, "requires": { "chalk": "2.4.1", @@ -62,9 +62,9 @@ "dev": true }, "@types/node": { - "version": "10.5.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.6.tgz", - "integrity": "sha512-c5Z1j1ysgo4878ptz6gxLcgMfJ6Wf908R3l5KAGabr0XJ72ZFmOCgsaodPpNYTfp4iOrSwgTDvR/BxbFfB4zPQ==", + "version": "10.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.7.1.tgz", + "integrity": "sha512-EGoI4ylB/lPOaqXqtzAyL8HcgOuCtH2hkEaLmkueOYufsTFWBn4VCvlCDC2HW8Q+9iF+QVC3sxjDKQYjHQeZ9w==", "dev": true }, "acorn": { @@ -83,9 +83,9 @@ } }, "ajv": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", - "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", + "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", "dev": true, "requires": { "fast-deep-equal": "2.0.1", @@ -735,7 +735,7 @@ "babel-plugin-transform-regenerator": "6.26.0", "browserslist": "3.2.8", "invariant": "2.2.4", - "semver": "5.5.0" + "semver": "5.5.1" } }, "babel-register": { @@ -843,8 +843,8 @@ "integrity": "sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==", "dev": true, "requires": { - "caniuse-lite": "1.0.30000874", - "electron-to-chromium": "1.3.55" + "caniuse-lite": "1.0.30000877", + "electron-to-chromium": "1.3.58" } }, "buffer-from": { @@ -853,6 +853,12 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, "caller-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", @@ -869,9 +875,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000874", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000874.tgz", - "integrity": "sha512-29nr1EPiHwrJTAHHsEmTt2h+55L8j2GNFdAcYPlRy2NX6iFz7ZZiepVI7kP/QqlnHLq3KvfWpbmGa0d063U09w==", + "version": "1.0.30000877", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000877.tgz", + "integrity": "sha512-h04kV/lcuhItU1CZTJOxUEk/9R+1XeJqgc67E+XC8J9TjPM8kzVgOn27ZtRdDUo8O5F8U4QRCzDWJrVym3w3Cg==", "dev": true }, "caseless": { @@ -900,6 +906,12 @@ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, + "ci-info": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.3.1.tgz", + "integrity": "sha512-l4wK/SFEN8VVTQ9RO1I5yzIL2vw1w6My29qA6Gwaec80QeHxfXbruuUWqn1knyMoJn/X5kav3zVY1TlRHSKeIA==", + "dev": true + }, "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", @@ -942,6 +954,12 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1007,6 +1025,17 @@ "dev": true, "optional": true }, + "cosmiconfig": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.0.6.tgz", + "integrity": "sha512-6DWfizHriCrFWURP1/qyhsiFvYdlJzbCzmtFWh744+KyWsJo5+kPzUZZaMRSSItoYc0pxFX7gEO7ZC1/gN/7AQ==", + "dev": true, + "requires": { + "is-directory": "0.3.1", + "js-yaml": "3.12.0", + "parse-json": "4.0.0" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -1015,7 +1044,7 @@ "requires": { "nice-try": "1.0.4", "path-key": "2.0.1", - "semver": "5.5.0", + "semver": "5.5.1", "shebang-command": "1.2.0", "which": "1.3.1" } @@ -1045,16 +1074,6 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "define-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", - "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", - "dev": true, - "requires": { - "foreach": "2.0.5", - "object-keys": "1.0.12" - } - }, "del": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", @@ -1106,9 +1125,9 @@ } }, "electron-to-chromium": { - "version": "1.3.55", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.55.tgz", - "integrity": "sha1-8VDhCyC3fZ1Br8yjEu/gw7Gn/c4=", + "version": "1.3.58", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.58.tgz", + "integrity": "sha512-AGJxlBEn2wOohxqWZkISVsOjZueKTQljfEODTDSEiMqSpH0S+xzV+/5oEM9AGaqhu7DzrpKOgU7ocQRjj0nJmg==", "dev": true }, "errno": { @@ -1121,28 +1140,13 @@ "prr": "1.0.1" } }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "es-to-primitive": "1.1.1", - "function-bind": "1.1.1", - "has": "1.0.3", - "is-callable": "1.1.4", - "is-regex": "1.0.4" - } - }, - "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true, - "requires": { - "is-callable": "1.1.4", - "is-date-object": "1.0.1", - "is-symbol": "1.0.1" + "is-arrayish": "0.2.1" } }, "escape-string-regexp": { @@ -1152,12 +1156,12 @@ "dev": true }, "eslint": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.3.0.tgz", - "integrity": "sha512-N/tCqlMKkyNvAvLu+zI9AqDasnSLt00K+Hu8kdsERliC9jYEc8ck12XtjvOXrBKu8fK6RrBcN9bat6Xk++9jAg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", + "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", "dev": true, "requires": { - "ajv": "6.5.2", + "ajv": "6.5.3", "babel-code-frame": "6.26.0", "chalk": "2.4.1", "cross-spawn": "6.0.5", @@ -1173,7 +1177,7 @@ "functional-red-black-tree": "1.0.1", "glob": "7.1.2", "globals": "11.7.0", - "ignore": "4.0.3", + "ignore": "4.0.6", "imurmurhash": "0.1.4", "inquirer": "5.2.0", "is-resolvable": "1.1.0", @@ -1190,8 +1194,7 @@ "progress": "2.0.0", "regexpp": "2.0.0", "require-uncached": "1.0.3", - "semver": "5.5.0", - "string.prototype.matchall": "2.0.0", + "semver": "5.5.1", "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", "table": "4.0.3", @@ -1333,6 +1336,34 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "execa": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz", + "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==", + "dev": true, + "requires": { + "cross-spawn": "5.1.0", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "4.1.3", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -1394,6 +1425,15 @@ "object-assign": "4.1.1" } }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "3.0.0" + } + }, "flat-cache": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", @@ -1406,12 +1446,6 @@ "write": "0.2.1" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1437,18 +1471,24 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1513,9 +1553,9 @@ "optional": true }, "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", "dev": true, "optional": true, "requires": { @@ -1552,15 +1592,6 @@ } } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "1.1.1" - } - }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -1576,12 +1607,6 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -1592,6 +1617,12 @@ "os-tmpdir": "1.0.2" } }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -1604,6 +1635,32 @@ "sshpk": "1.14.2" } }, + "husky": { + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/husky/-/husky-1.0.0-rc.13.tgz", + "integrity": "sha512-ZNNoaBgfOHRA05UHS/etBoWFDu65mjPoohPYQwOqb5155KOovBp8LMkMoNK0kn3VYdsm+HWdtuHbD4XjfzlfpQ==", + "dev": true, + "requires": { + "cosmiconfig": "5.0.6", + "execa": "0.9.0", + "find-up": "3.0.0", + "get-stdin": "6.0.0", + "is-ci": "1.2.0", + "pkg-dir": "3.0.0", + "please-upgrade-node": "3.1.1", + "read-pkg": "4.0.1", + "run-node": "1.0.0", + "slash": "2.0.0" + }, + "dependencies": { + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + } + } + }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", @@ -1614,9 +1671,9 @@ } }, "ignore": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.3.tgz", - "integrity": "sha512-Z/vAH2GGIEATQnBVXMclE2IGV6i0GyVngKThcGZ5kHgHMxLo9Ow2+XHRq1aEKEej5vOF1TPJNbvX6J/anT0M7A==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, "image-size": { @@ -1724,16 +1781,34 @@ "loose-envify": "1.4.0" } }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-ci": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.0.tgz", + "integrity": "sha512-plgvKjQtalH2P3Gytb7L61Lmz95g2DlpzFiQyRSFew8WoJKxtKRzrZMeyRN2supblm3Psc8OQGy7Xjb6XG11jw==", + "dev": true, + "requires": { + "ci-info": "1.3.1" + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", "dev": true }, "is-finite": { @@ -1781,25 +1856,16 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "1.0.3" - } - }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, - "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "is-typedarray": { @@ -1856,6 +1922,12 @@ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -1902,18 +1974,19 @@ } }, "less": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/less/-/less-3.8.0.tgz", - "integrity": "sha512-746DPDyL+Wsjo7h/Z3t+A3Mg/mpDTaxW4puZyLhCQJjWJJvHggN735orjuCLIYgo7jKqv1zWLiQrxkuUOg5oGA==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/less/-/less-3.8.1.tgz", + "integrity": "sha512-8HFGuWmL3FhQR0aH89escFNBQH/nEiYPP2ltDFdQw2chE28Yx2E3lhAIq9Y2saYwLSwa699s4dBVEfCY8Drf7Q==", "dev": true, "requires": { + "clone": "2.1.2", "errno": "0.1.7", "graceful-fs": "4.1.11", "image-size": "0.5.5", "mime": "1.6.0", "mkdirp": "0.5.1", "promise": "7.3.1", - "request": "2.87.0", + "request": "2.88.0", "source-map": "0.6.1" }, "dependencies": { @@ -1945,6 +2018,16 @@ "type-check": "0.3.2" } }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "3.0.0", + "path-exists": "3.0.0" + } + }, "lodash": { "version": "4.17.10", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", @@ -1960,6 +2043,16 @@ "js-tokens": "3.0.2" } }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -2036,6 +2129,27 @@ "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.7.1", + "is-builtin-module": "1.0.0", + "semver": "5.5.1", + "validate-npm-package-license": "3.0.4" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "2.0.1" + } + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -2043,9 +2157,9 @@ "dev": true }, "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true, "optional": true }, @@ -2055,12 +2169,6 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2105,6 +2213,52 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "1.3.2", + "json-parse-better-errors": "1.0.2" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -2151,6 +2305,24 @@ "pinkie": "2.0.4" } }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "3.0.0" + } + }, + "please-upgrade-node": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz", + "integrity": "sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ==", + "dev": true, + "requires": { + "semver-compare": "1.0.0" + } + }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", @@ -2192,6 +2364,19 @@ "dev": true, "optional": true }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", + "dev": true, + "optional": true + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -2205,6 +2390,25 @@ "dev": true, "optional": true }, + "read-pkg": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", + "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", + "dev": true, + "requires": { + "normalize-package-data": "2.4.0", + "parse-json": "4.0.0", + "pify": "3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", @@ -2228,15 +2432,6 @@ "private": "0.1.8" } }, - "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", - "dev": true, - "requires": { - "define-properties": "1.1.2" - } - }, "regexpp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", @@ -2287,9 +2482,9 @@ } }, "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "optional": true, "requires": { @@ -2300,17 +2495,17 @@ "extend": "3.0.2", "forever-agent": "0.6.1", "form-data": "2.3.2", - "har-validator": "5.0.3", + "har-validator": "5.1.0", "http-signature": "1.2.0", "is-typedarray": "1.0.0", "isstream": "0.1.2", "json-stringify-safe": "5.0.1", "mime-types": "2.1.19", - "oauth-sign": "0.8.2", + "oauth-sign": "0.9.0", "performance-now": "2.1.0", "qs": "6.5.2", "safe-buffer": "5.1.2", - "tough-cookie": "2.3.4", + "tough-cookie": "2.4.3", "tunnel-agent": "0.6.0", "uuid": "3.3.2" } @@ -2351,13 +2546,13 @@ } }, "rollup": { - "version": "0.63.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.63.5.tgz", - "integrity": "sha512-dFf8LpUNzIj3oE0vCvobX6rqOzHzLBoblyFp+3znPbjiSmSvOoK2kMKx+Fv9jYduG1rvcCfCveSgEaQHjWRF6g==", + "version": "0.64.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.64.1.tgz", + "integrity": "sha512-+ThdVXrvonJdOTzyybMBipP0uz605Z8AnzWVY3rf+cSGnLO7uNkJBlN+9jXqWOomkvumXfm/esmBpA5d53qm7g==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "10.5.6" + "@types/node": "10.7.1" } }, "rollup-plugin-babel": { @@ -2375,7 +2570,7 @@ "integrity": "sha512-VC6chT7QnrV6JzdgkPE0hP/atRBxaa3CPbVXfZJ8nJLjcidSdWftOst098RasYRUTKxJWAgdaJN1+uiZM6iffA==", "dev": true, "requires": { - "@babel/code-frame": "7.0.0-beta.56", + "@babel/code-frame": "7.0.0-rc.1", "terser": "3.8.1" } }, @@ -2398,6 +2593,12 @@ "is-promise": "2.1.0" } }, + "run-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", + "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", + "dev": true + }, "rxjs": { "version": "5.5.11", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz", @@ -2420,9 +2621,15 @@ "dev": true }, "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, "shebang-command": { @@ -2476,6 +2683,38 @@ "source-map": "0.5.7" } }, + "spdx-correct": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "dev": true, + "requires": { + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -2527,19 +2766,6 @@ } } }, - "string.prototype.matchall": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz", - "integrity": "sha512-WoZ+B2ypng1dp4iFLF2kmZlwwlE19gmjgKuhL1FJfDgCREWb3ye3SDVHSzLH6bxfnvYmkCxbzkmWcQZHA4P//Q==", - "dev": true, - "requires": { - "define-properties": "1.1.2", - "es-abstract": "1.12.0", - "function-bind": "1.1.1", - "has-symbols": "1.0.0", - "regexp.prototype.flags": "1.2.0" - } - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -2549,6 +2775,12 @@ "ansi-regex": "2.1.1" } }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -2573,7 +2805,7 @@ "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "dev": true, "requires": { - "ajv": "6.5.2", + "ajv": "6.5.3", "ajv-keywords": "3.2.0", "chalk": "2.4.1", "lodash": "4.17.10", @@ -2620,7 +2852,7 @@ "requires": { "commander": "2.16.0", "source-map": "0.6.1", - "source-map-support": "0.5.6" + "source-map-support": "0.5.8" }, "dependencies": { "commander": { @@ -2636,9 +2868,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.8.tgz", + "integrity": "sha512-WqAEWPdb78u25RfKzOF0swBpY0dKrNdjc4GvLwm7ScX/o9bj8Eh/YL8mcMhBHYDGl87UkkSXDOFnW4G7GhWhGg==", "dev": true, "requires": { "buffer-from": "1.1.1", @@ -2675,12 +2907,13 @@ "dev": true }, "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "optional": true, "requires": { + "psl": "1.1.29", "punycode": "1.4.1" }, "dependencies": { @@ -2741,6 +2974,16 @@ "dev": true, "optional": true }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" + } + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -2782,6 +3025,12 @@ "requires": { "mkdirp": "0.5.1" } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } } diff --git a/package.json b/package.json index b3abb42..92c84a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "floating-scroll", - "version": "3.0.2", + "version": "3.0.3", "description": "A lightweight jQuery plugin providing floating scrollbar functionality", "main": "dist/jquery.floatingscroll.min.js", "module": "src/jquery.floatingscroll.js", @@ -16,6 +16,8 @@ }, "keywords": [ "scrollbar", + "widget", + "user-interface", "jquery-plugin", "ecosystem:jquery" ], @@ -31,11 +33,17 @@ "devDependencies": { "babel-core": "^6.26.3", "babel-preset-env": "^1.7.0", - "eslint": "^5.3.0", - "less": "^3.8.0", + "eslint": "^5.4.0", + "husky": "^1.0.0-rc.13", + "less": "^3.8.1", "less-plugin-clean-css": "^1.5.1", - "rollup": "^0.63.5", + "rollup": "^0.64.1", "rollup-plugin-babel": "^3.0.7", "rollup-plugin-terser": "^1.0.1" + }, + "husky": { + "hooks": { + "pre-commit": "npm run lint" + } } } From bb61aa317ccf4b7ea03672ba43c34b0de35f8cda Mon Sep 17 00:00:00 2001 From: Amphiluke Date: Fri, 24 Aug 2018 22:47:00 +0700 Subject: [PATCH 5/5] Sync widget scroll position on update invocations --- dist/jquery.floatingscroll.es6.min.js | 2 +- dist/jquery.floatingscroll.min.js | 2 +- src/jquery.floatingscroll.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/jquery.floatingscroll.es6.min.js b/dist/jquery.floatingscroll.es6.min.js index 43b8179..bb66806 100644 --- a/dist/jquery.floatingscroll.es6.min.js +++ b/dist/jquery.floatingscroll.es6.min.js @@ -3,4 +3,4 @@ floating-scroll v3.0.3 https://amphiluke.github.io/floating-scroll/ (c) 2018 Amphiluke */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,function(e){"use strict";let t={init(e){let t=this,i=e.closest(".fl-scrolls-body");i.length&&(t.scrollBody=i),t.container=e[0],t.visible=!0,t.initWidget(),t.updateAPI(),t.syncWidget(t.container),t.addEventHandlers()},initWidget(){let t=this.widget=e("
");e("
").appendTo(t).css({width:`${this.container.scrollWidth}px`}),t.appendTo(this.container)},addEventHandlers(){let t=this;(t.eventHandlers=[{$el:t.scrollBody||e(window),handlers:{scroll(){t.checkVisibility()},resize(){t.updateAPI()}}},{$el:t.widget,handlers:{scroll(){t.visible&&t.syncContainer(!0)}}},{$el:e(t.container),handlers:{scroll(){t.syncWidget(!0)},focusin(){setTimeout(()=>t.syncWidget(),0)},"update.fscroll"({namespace:e}){"fscroll"===e&&t.updateAPI()},"destroy.fscroll"({namespace:e}){"fscroll"===e&&t.destroyAPI()}}}]).forEach(({$el:e,handlers:t})=>e.bind(t))},checkVisibility(){let e=this,{widget:t,container:i,scrollBody:n}=e,l=t[0].scrollWidth<=t[0].offsetWidth;if(!l){let e=i.getBoundingClientRect(),t=n?n[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;l=e.bottom<=t||e.top>t}e.visible===l&&(e.visible=!l,t.toggleClass("fl-scrolls-hidden"))},syncContainer(e=!1){let t=this;!0!==t.skipSyncContainer?(t.skipSyncWidget=e,t.container.scrollLeft=t.widget[0].scrollLeft):t.skipSyncContainer=!1},syncWidget(e=!1){let t=this;!0!==t.skipSyncWidget?(t.skipSyncContainer=e,t.widget[0].scrollLeft=t.container.scrollLeft):t.skipSyncWidget=!1},updateAPI(){let{widget:t,container:i,scrollBody:n}=this;t.width(e(i).outerWidth()),n||t.css("left",`${i.getBoundingClientRect().left}px`),e("div",t).width(i.scrollWidth),this.checkVisibility()},destroyAPI(){this.eventHandlers.forEach(({$el:e,handlers:t})=>e.unbind(t)),this.widget.remove(),this.eventHandlers=this.widget=this.container=this.scrollBody=null}};e.fn.floatingScroll=function(i="init"){return"init"===i?this.each((i,n)=>Object.create(t).init(e(n))):t.hasOwnProperty(`${i}API`)&&this.trigger(`${i}.fscroll`),this},e(document).ready(()=>{e("body [data-fl-scrolls]").floatingScroll()})}); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,function(e){"use strict";let t={init(e){let t=this,i=e.closest(".fl-scrolls-body");i.length&&(t.scrollBody=i),t.container=e[0],t.visible=!0,t.initWidget(),t.updateAPI(),t.syncWidget(t.container),t.addEventHandlers()},initWidget(){let t=this.widget=e("
");e("
").appendTo(t).css({width:`${this.container.scrollWidth}px`}),t.appendTo(this.container)},addEventHandlers(){let t=this;(t.eventHandlers=[{$el:t.scrollBody||e(window),handlers:{scroll(){t.checkVisibility()},resize(){t.updateAPI()}}},{$el:t.widget,handlers:{scroll(){t.visible&&t.syncContainer(!0)}}},{$el:e(t.container),handlers:{scroll(){t.syncWidget(!0)},focusin(){setTimeout(()=>t.syncWidget(),0)},"update.fscroll"({namespace:e}){"fscroll"===e&&t.updateAPI()},"destroy.fscroll"({namespace:e}){"fscroll"===e&&t.destroyAPI()}}}]).forEach(({$el:e,handlers:t})=>e.bind(t))},checkVisibility(){let e=this,{widget:t,container:i,scrollBody:n}=e,l=t[0].scrollWidth<=t[0].offsetWidth;if(!l){let e=i.getBoundingClientRect(),t=n?n[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;l=e.bottom<=t||e.top>t}e.visible===l&&(e.visible=!l,t.toggleClass("fl-scrolls-hidden"))},syncContainer(e=!1){let t=this;!0!==t.skipSyncContainer?(t.skipSyncWidget=e,t.container.scrollLeft=t.widget[0].scrollLeft):t.skipSyncContainer=!1},syncWidget(e=!1){let t=this;!0!==t.skipSyncWidget?(t.skipSyncContainer=e,t.widget[0].scrollLeft=t.container.scrollLeft):t.skipSyncWidget=!1},updateAPI(){let{widget:t,container:i,scrollBody:n}=this;t.width(e(i).outerWidth()),n||t.css("left",`${i.getBoundingClientRect().left}px`),e("div",t).width(i.scrollWidth),this.syncWidget(),this.checkVisibility()},destroyAPI(){this.eventHandlers.forEach(({$el:e,handlers:t})=>e.unbind(t)),this.widget.remove(),this.eventHandlers=this.widget=this.container=this.scrollBody=null}};e.fn.floatingScroll=function(i="init"){return"init"===i?this.each((i,n)=>Object.create(t).init(e(n))):t.hasOwnProperty(`${i}API`)&&this.trigger(`${i}.fscroll`),this},e(document).ready(()=>{e("body [data-fl-scrolls]").floatingScroll()})}); diff --git a/dist/jquery.floatingscroll.min.js b/dist/jquery.floatingscroll.min.js index bdc3e7c..f98daba 100644 --- a/dist/jquery.floatingscroll.min.js +++ b/dist/jquery.floatingscroll.min.js @@ -3,4 +3,4 @@ floating-scroll v3.0.3 https://amphiluke.github.io/floating-scroll/ (c) 2018 Amphiluke */ -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],i):i(t.jQuery)}(this,function(t){"use strict";var i={init:function(t){var i=t.closest(".fl-scrolls-body");i.length&&(this.scrollBody=i),this.container=t[0],this.visible=!0,this.initWidget(),this.updateAPI(),this.syncWidget(this.container),this.addEventHandlers()},initWidget:function(){var i=this.widget=t("
");t("
").appendTo(i).css({width:this.container.scrollWidth+"px"}),i.appendTo(this.container)},addEventHandlers:function(){var i=this;(i.eventHandlers=[{$el:i.scrollBody||t(window),handlers:{scroll:function(){i.checkVisibility()},resize:function(){i.updateAPI()}}},{$el:i.widget,handlers:{scroll:function(){i.visible&&i.syncContainer(!0)}}},{$el:t(i.container),handlers:{scroll:function(){i.syncWidget(!0)},focusin:function(){setTimeout(function(){return i.syncWidget()},0)},"update.fscroll":function(t){"fscroll"===t.namespace&&i.updateAPI()},"destroy.fscroll":function(t){"fscroll"===t.namespace&&i.destroyAPI()}}}]).forEach(function(t){var i=t.$el,n=t.handlers;return i.bind(n)})},checkVisibility:function(){var t=this.widget,i=this.container,n=this.scrollBody,e=t[0].scrollWidth<=t[0].offsetWidth;if(!e){var s=i.getBoundingClientRect(),o=n?n[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;e=s.bottom<=o||s.top>o}this.visible===e&&(this.visible=!e,t.toggleClass("fl-scrolls-hidden"))},syncContainer:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==this.skipSyncContainer?(this.skipSyncWidget=t,this.container.scrollLeft=this.widget[0].scrollLeft):this.skipSyncContainer=!1},syncWidget:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==this.skipSyncWidget?(this.skipSyncContainer=t,this.widget[0].scrollLeft=this.container.scrollLeft):this.skipSyncWidget=!1},updateAPI:function(){var i=this.widget,n=this.container,e=this.scrollBody;i.width(t(n).outerWidth()),e||i.css("left",n.getBoundingClientRect().left+"px"),t("div",i).width(n.scrollWidth),this.checkVisibility()},destroyAPI:function(){this.eventHandlers.forEach(function(t){var i=t.$el,n=t.handlers;return i.unbind(n)}),this.widget.remove(),this.eventHandlers=this.widget=this.container=this.scrollBody=null}};t.fn.floatingScroll=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"init";return"init"===n?this.each(function(n,e){return Object.create(i).init(t(e))}):i.hasOwnProperty(n+"API")&&this.trigger(n+".fscroll"),this},t(document).ready(function(){t("body [data-fl-scrolls]").floatingScroll()})}); +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],i):i(t.jQuery)}(this,function(t){"use strict";var i={init:function(t){var i=t.closest(".fl-scrolls-body");i.length&&(this.scrollBody=i),this.container=t[0],this.visible=!0,this.initWidget(),this.updateAPI(),this.syncWidget(this.container),this.addEventHandlers()},initWidget:function(){var i=this.widget=t("
");t("
").appendTo(i).css({width:this.container.scrollWidth+"px"}),i.appendTo(this.container)},addEventHandlers:function(){var i=this;(i.eventHandlers=[{$el:i.scrollBody||t(window),handlers:{scroll:function(){i.checkVisibility()},resize:function(){i.updateAPI()}}},{$el:i.widget,handlers:{scroll:function(){i.visible&&i.syncContainer(!0)}}},{$el:t(i.container),handlers:{scroll:function(){i.syncWidget(!0)},focusin:function(){setTimeout(function(){return i.syncWidget()},0)},"update.fscroll":function(t){"fscroll"===t.namespace&&i.updateAPI()},"destroy.fscroll":function(t){"fscroll"===t.namespace&&i.destroyAPI()}}}]).forEach(function(t){var i=t.$el,n=t.handlers;return i.bind(n)})},checkVisibility:function(){var t=this.widget,i=this.container,n=this.scrollBody,e=t[0].scrollWidth<=t[0].offsetWidth;if(!e){var s=i.getBoundingClientRect(),o=n?n[0].getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight;e=s.bottom<=o||s.top>o}this.visible===e&&(this.visible=!e,t.toggleClass("fl-scrolls-hidden"))},syncContainer:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==this.skipSyncContainer?(this.skipSyncWidget=t,this.container.scrollLeft=this.widget[0].scrollLeft):this.skipSyncContainer=!1},syncWidget:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==this.skipSyncWidget?(this.skipSyncContainer=t,this.widget[0].scrollLeft=this.container.scrollLeft):this.skipSyncWidget=!1},updateAPI:function(){var i=this.widget,n=this.container,e=this.scrollBody;i.width(t(n).outerWidth()),e||i.css("left",n.getBoundingClientRect().left+"px"),t("div",i).width(n.scrollWidth),this.syncWidget(),this.checkVisibility()},destroyAPI:function(){this.eventHandlers.forEach(function(t){var i=t.$el,n=t.handlers;return i.unbind(n)}),this.widget.remove(),this.eventHandlers=this.widget=this.container=this.scrollBody=null}};t.fn.floatingScroll=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"init";return"init"===n?this.each(function(n,e){return Object.create(i).init(t(e))}):i.hasOwnProperty(n+"API")&&this.trigger(n+".fscroll"),this},t(document).ready(function(){t("body [data-fl-scrolls]").floatingScroll()})}); diff --git a/src/jquery.floatingscroll.js b/src/jquery.floatingscroll.js index 4da6570..61dec82 100644 --- a/src/jquery.floatingscroll.js +++ b/src/jquery.floatingscroll.js @@ -123,6 +123,7 @@ let floatingScrollProto = { widget.css("left", `${container.getBoundingClientRect().left}px`); } $("div", widget).width(container.scrollWidth); + instance.syncWidget(); instance.checkVisibility(); // fixes issue #2 },