├── .babelrc
├── .eslintrc.json
├── .github
└── FUNDING.yml
├── .gitignore
├── LICENSE
├── README.md
├── build
├── PatternLock.js
├── example-helpers
│ ├── CodeExample.js
│ ├── CopyBtn.js
│ ├── Options.js
│ ├── PatternLockCanvas.js
│ ├── bdom.js
│ ├── component.js
│ └── utils.js
├── example.js
├── utils
│ ├── EventBus.js
│ ├── Matcher.js
│ ├── dom.js
│ ├── events.js
│ ├── libs.js
│ ├── nanoevents.js
│ ├── themes.js
│ └── word-map.js
└── vanilla.example.js
├── esbuild.config.js
├── index.html
├── index.js
├── package.json
├── src
├── PatternLock.js
├── example-helpers
│ ├── CodeExample.js
│ ├── CopyBtn.js
│ ├── Options.js
│ ├── PatternLockCanvas.js
│ ├── component.js
│ └── utils.js
├── utils
│ ├── EventBus.js
│ ├── Matcher.js
│ ├── dom.js
│ ├── libs.js
│ └── themes.js
└── vanilla.example.js
├── webpack.config.js
└── yarn.lock
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-react",
4 | [
5 | "@babel/preset-env",
6 | {
7 | "targets": {
8 | "browsers": [
9 | "last 5 versions"
10 | ]
11 | }
12 | }
13 | ]
14 | ],
15 | "plugins": [
16 | "@babel/plugin-proposal-class-properties"
17 | ]
18 | }
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "commonjs": true,
5 | "es6": true,
6 | "node": true,
7 | "jest": true
8 | },
9 | "parser": "babel-eslint",
10 | "extends": [
11 | "eslint:recommended",
12 | "react-app"
13 | ],
14 | "parserOptions": {
15 | "ecmaVersion": 2018,
16 | "sourceType": "module"
17 | },
18 | "rules": {
19 | "jsx-a11y/href-no-hash": [ 0 ],
20 | "indent": [
21 | "error",
22 | "tab"
23 | ],
24 | "linebreak-style": [
25 | "error",
26 | "unix"
27 | ],
28 | "quotes": [
29 | "error",
30 | "single"
31 | ],
32 | "semi": [
33 | "error",
34 | "always"
35 | ]
36 | }
37 | }
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | custom: ["https://www.paypal.me/phenax", "https://www.buymeacoffee.com/phenax"]
4 | liberapay: phenax
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.log
3 | *.map
4 |
5 | .vscode
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PatternLockJS
2 | A pattern lock library for the web. [Demo](https://phenax.github.io/pattern-lock-js/)
3 |
4 |
5 | 
6 | 
7 | 
8 |
9 |
10 |
11 |
12 |
13 | ### Installation
14 |
15 | Install the library with
16 | ```bash
17 | yarn add @phenax/pattern-lock-js
18 | ```
19 |
20 | Import the library with
21 | ```js
22 | import PatternLock from '@phenax/pattern-lock-js';
23 | ```
24 |
25 | ### Get started
26 | ```javascript
27 | const lock = PatternLock({
28 | $canvas: document.querySelector('#patternLock'),
29 | width: 300,
30 | height: 430,
31 | grid: [ 3, 3 ],
32 | });
33 | ```
34 |
35 | ### Customize the theme
36 | ```javascript
37 | lock.setTheme('dark');
38 | lock.setTheme('light');
39 |
40 | // Or pass a custom theme
41 |
42 | lock.setTheme({
43 | default: {
44 | colors: {
45 | accent: '#1abc9c', // Accent color for node
46 | primary: '#ffffff', // Primary node and line color
47 | bg: '#2c3e50', // Canvas background color
48 | },
49 | dimens: {
50 | node_radius: 20, // Radius of the outer ring of a node
51 | line_width: 6, // Thickness of the line joining nodes
52 | node_core: 8, // Radius of the inner circle of a node
53 | node_ring: 1, // Outer ring thickness
54 | }
55 | },
56 | success: {
57 | colors: {
58 | accent: '#51e980', // Green accent on successful match
59 | }
60 | },
61 | failure: {
62 | colors: {
63 | accent: '#e74c3c', // Red accent on an unsuccessful match
64 | }
65 | },
66 | customState: { // Your custom state
67 | dimens: {
68 | node_radius: 25, // Increases the node radius
69 | }
70 | },
71 | });
72 | ```
73 |
74 | ### Manually change the state
75 | ```javascript
76 | lock.setThemeState('success'); // Switch state to successful
77 | lock.setThemeState('customState'); // Switch to your custom state
78 | ```
79 |
80 | ### You can even change the grid size dynamically
81 | ```javascript
82 | lock.setGrid(4, 4); // 4x4 grid instead of the default 3x3
83 | ```
84 |
85 |
86 | ### Callback for when the pattern is complete
87 | ```javascript
88 | lock.onComplete(({ hash }) => (myRealHash === hash) ? success() : failure());
89 | ```
90 |
91 | ### Or you can use the matchHash helper to check if the hash matches your set of correct passwords
92 | ```javascript
93 | // If the pattern drawn is a Right L or a Diagonal L,
94 | // then turn the pattern green
95 | // else turn it red
96 | lock.matchHash([ 'LTU2MTIyNjM0Ng==', 'MTk1OTMwNzY2NQ==' ])
97 | .onSuccess(() => lock.setThemeState('success'))
98 | .onFailure(() => lock.setThemeState('failure'));
99 | ```
100 |
101 | ### Destroy to enable scrolling on touch
102 |
103 | ```
104 | lock.destroy();
105 | ```
106 |
107 |
108 |
--------------------------------------------------------------------------------
/build/PatternLock.js:
--------------------------------------------------------------------------------
1 | var __defProp = Object.defineProperty;
2 | var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3 | var __getOwnPropNames = Object.getOwnPropertyNames;
4 | var __hasOwnProp = Object.prototype.hasOwnProperty;
5 | var __export = (target, all) => {
6 | for (var name in all)
7 | __defProp(target, name, { get: all[name], enumerable: true });
8 | };
9 | var __copyProps = (to, from, except, desc) => {
10 | if (from && typeof from === "object" || typeof from === "function") {
11 | for (let key of __getOwnPropNames(from))
12 | if (!__hasOwnProp.call(to, key) && key !== except)
13 | __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14 | }
15 | return to;
16 | };
17 | var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18 |
19 | // src/PatternLock.js
20 | var PatternLock_exports = {};
21 | __export(PatternLock_exports, {
22 | PatternLock: () => PatternLock,
23 | default: () => PatternLock_default
24 | });
25 | module.exports = __toCommonJS(PatternLock_exports);
26 |
27 | // src/utils/EventBus.js
28 | var EventBus = () => {
29 | const eventMap = {};
30 | const off = (eventName, cb) => {
31 | const fns = eventMap[eventName] = eventMap[eventName] || [];
32 | return fns.splice(fns.indexOf(cb) >>> 0, 1);
33 | };
34 | const on = (eventName, cb) => {
35 | const fns = eventMap[eventName] = eventMap[eventName] || [];
36 | fns.push(cb);
37 | return off.bind(null, fns, cb);
38 | };
39 | const emit = (event, ...args) => {
40 | const fns = eventMap[event];
41 | if (!fns || !fns.length)
42 | return [];
43 | return fns.map((fn) => fn(...args));
44 | };
45 | return { on, off, emit };
46 | };
47 | var EventBus_default = EventBus;
48 |
49 | // src/utils/Matcher.js
50 | var MATCH_SUCCESS = "MATCH_SUCCESS";
51 | var MATCH_FAILURE = "MATCH_FAILURE";
52 | var isAMatch = (samples, value) => samples.indexOf(value) !== -1;
53 | var Matcher_default = (values, eventBus) => {
54 | const events2 = eventBus || EventBus_default();
55 | const emitSuccess = () => events2.emit(MATCH_SUCCESS);
56 | const emitFailure = () => events2.emit(MATCH_FAILURE);
57 | const matcher = {
58 | check: (val) => isAMatch(values, val) ? emitSuccess(val) : emitFailure(val),
59 | onSuccess: (fn) => {
60 | events2.on(MATCH_SUCCESS, fn);
61 | return matcher;
62 | },
63 | onFailure: (fn) => {
64 | events2.on(MATCH_FAILURE, fn);
65 | return matcher;
66 | }
67 | };
68 | return matcher;
69 | };
70 |
71 | // src/utils/libs.js
72 | var patternToWords = (nodes) => JSON.stringify(nodes);
73 | var hashCode = (str) => {
74 | if (!str.length)
75 | return "";
76 | const hash = str.split("").reduce((a = 0, b) => {
77 | a = (a << 5) - a + b.charCodeAt(0);
78 | return a & a;
79 | });
80 | return btoa(hash + "");
81 | };
82 | var gcd = (x, y) => {
83 | while (y !== 0) {
84 | let tmp = x;
85 | x = y;
86 | y = tmp % y;
87 | }
88 | return x;
89 | };
90 | var prop = (path, obj) => path.split(".").reduce((acc, key) => acc ? acc[key] : void 0, obj);
91 |
92 | // src/utils/dom.js
93 | var unregisterEvent = (target, event, fn) => event.split(" ").forEach((ev) => target.removeEventListener(ev, fn, { passive: false }));
94 | var registerEvent = (target, event, fn) => {
95 | event.split(" ").forEach((ev) => target.addEventListener(ev, fn, { passive: false }));
96 | return () => unregisterEvent(target, event, fn);
97 | };
98 | var raf = requestAnimationFrame || ((fn) => setTimeout(fn, 16));
99 | var getPixelRatio = (ctx) => {
100 | const devicePixelRatio = window.devicePixelRatio || 1;
101 | const backingStorePixelRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
102 | return devicePixelRatio / backingStorePixelRatio;
103 | };
104 |
105 | // src/utils/themes.js
106 | var themes = {};
107 | var DEFAULT_DIMENS = {
108 | line_width: 6,
109 | node_radius: 20,
110 | node_core: 8,
111 | node_ring: 1
112 | };
113 | themes.dark = {
114 | default: {
115 | colors: {
116 | accent: "#ae64cd",
117 | primary: "#ffffff",
118 | bg: "#2c3e50"
119 | },
120 | dimens: DEFAULT_DIMENS
121 | },
122 | success: {
123 | colors: {
124 | accent: "#51e980"
125 | }
126 | },
127 | failure: {
128 | colors: {
129 | accent: "#e74c3c"
130 | }
131 | }
132 | };
133 | themes.light = {
134 | default: {
135 | colors: {
136 | accent: "#ae64cd",
137 | primary: "#34495e",
138 | bg: "#ecf0f1"
139 | },
140 | dimens: DEFAULT_DIMENS
141 | },
142 | success: {
143 | colors: {
144 | accent: "#27ae60"
145 | }
146 | },
147 | failure: {
148 | colors: {
149 | accent: "#e74c3c"
150 | }
151 | }
152 | };
153 | var themes_default = themes;
154 |
155 | // src/PatternLock.js
156 | var createInvalidOptionError = (option) => new Error(`Invalid or empty ${option} passed`);
157 | var DEFAULT_THEME_NAME = "dark";
158 | var events = {
159 | PATTERN_COMPLETE: "complete",
160 | PATTERN_START: "start"
161 | };
162 | var defaultConfig = {
163 | theme: DEFAULT_THEME_NAME,
164 | grid: [3, 3],
165 | width: 300,
166 | height: 430
167 | };
168 | var PatternLock = class {
169 | constructor(config) {
170 | if (!config.$canvas)
171 | throw createInvalidOptionError("$canvas");
172 | if (!config.width)
173 | throw createInvalidOptionError("width");
174 | if (!config.height)
175 | throw createInvalidOptionError("height");
176 | config = { ...defaultConfig, ...config };
177 | this.$canvas = config.$canvas;
178 | this.ctx = this.$canvas.getContext("2d");
179 | this.setDimensions({ width: config.width, height: config.height });
180 | this.initialize(config);
181 | }
182 | setDimensions(dimens) {
183 | this.dimens = dimens;
184 | const ratio = getPixelRatio(this.ctx);
185 | this.$canvas.width = this.dimens.width * ratio;
186 | this.$canvas.height = this.dimens.height * ratio;
187 | this.$canvas.style.width = this.dimens.width + "px";
188 | this.$canvas.style.height = this.dimens.height + "px";
189 | this.ctx.setTransform(ratio, 0, 0, ratio, 0, 0);
190 | }
191 | initialize({ theme, grid: [rows, cols] }) {
192 | this._subscriptions = [];
193 | this.eventBus = EventBus_default();
194 | this.setTheme(theme, false);
195 | this.setGrid(rows, cols);
196 | this.renderGrid();
197 | this.attachEventHandlers();
198 | }
199 | setInitialState() {
200 | this.coordinates = null;
201 | this.selectedNodes = [];
202 | this.lastSelectedNode = null;
203 | }
204 | forceRender = () => raf(() => {
205 | const previousDragState = this._isDragging;
206 | this._isDragging = true;
207 | this.calculationLoop(false);
208 | raf(() => {
209 | this.renderLoop(false);
210 | this._isDragging = previousDragState;
211 | });
212 | });
213 | // setGrid :: (Number, Number) -> PatternLock
214 | setGrid(rows, cols, rerender = true) {
215 | if (this.rows === rows && this.cols === cols)
216 | return this;
217 | this.rows = rows;
218 | this.cols = cols;
219 | this.setInitialState();
220 | this._onResize();
221 | rerender && this.forceRender();
222 | return this;
223 | }
224 | // setTheme :: (Theme, ?Boolean) -> PatternLock
225 | setTheme(theme, rerender = true) {
226 | if (theme === themes_default[this.theme] || theme === this.theme)
227 | return this;
228 | if (typeof theme === "string")
229 | theme = themes_default[theme];
230 | if (!theme)
231 | throw createInvalidOptionError("theme");
232 | this.theme = theme;
233 | this.setThemeState("default", false);
234 | rerender && this.forceRender();
235 | return this;
236 | }
237 | // setThemeState :: (State, ?Boolean) -> PatternLock
238 | setThemeState(themeState, rerender = true) {
239 | if (!this.theme)
240 | throw createInvalidOptionError("theme");
241 | this.themeState = this.theme[themeState || "default"] || {};
242 | this.themeState.colors = { ...this.theme.default.colors, ...this.themeState.colors };
243 | this.themeState.dimens = { ...this.theme.default.dimens, ...this.themeState.dimens };
244 | rerender && this.forceRender();
245 | return this;
246 | }
247 | // Attach event listeners and start frame loops
248 | attachEventHandlers() {
249 | const register = (t, ev, fn) => this._subscriptions.push(registerEvent(t, ev, fn));
250 | register(this.$canvas, "mousedown touchstart", this._onTouchStart);
251 | register(this.$canvas, "mouseup touchend", this._onTouchStop);
252 | register(window, "mousemove touchmove", this._onTouchMove);
253 | register(window, "resize", this._onResize);
254 | raf(this.renderLoop);
255 | raf(this.calculationLoop);
256 | }
257 | // Event handler stuff start
258 | destroy = () => this._subscriptions.map((fn) => fn());
259 | on(event, fn) {
260 | const subscription = this.eventBus.on(event, fn);
261 | this._subscriptions.push(subscription);
262 | return subscription;
263 | }
264 | emit = (...args) => this.eventBus.emit(...args);
265 | onStart = (fn) => this.on(events.PATTERN_START, fn);
266 | onComplete = (fn) => this.on(events.PATTERN_COMPLETE, fn);
267 | _emitPatternStart = () => this.emit(events.PATTERN_START, {});
268 | _emitPatternComplete() {
269 | const nodes = this.selectedNodes;
270 | let hash = "";
271 | let password = "";
272 | if (nodes.length) {
273 | password = patternToWords(nodes);
274 | hash = hashCode(password);
275 | }
276 | this.emit(events.PATTERN_COMPLETE, { nodes, password, hash });
277 | }
278 | // Event handler stuff end
279 | // recalculateBounds :: () -> Point
280 | recalculateBounds = () => {
281 | let bodyRect = document.body.getBoundingClientRect(), elemRect = this.$canvas.getBoundingClientRect(), offset = elemRect.top - bodyRect.top;
282 | this.bounds = { x: elemRect.left, y: offset };
283 | };
284 | _onResize = () => raf(this.recalculateBounds);
285 | _onTouchStart = (e) => {
286 | if (e)
287 | e.preventDefault();
288 | raf(this.recalculateBounds);
289 | this.setInitialState();
290 | this.forceRender();
291 | this._emitPatternStart();
292 | this._isDragging = true;
293 | };
294 | _onTouchStop = (e) => {
295 | if (e)
296 | e.preventDefault();
297 | this.coordinates = null;
298 | this.renderLoop(false);
299 | this._emitPatternComplete();
300 | this._isDragging = false;
301 | };
302 | _onTouchMove = (e) => {
303 | if (e)
304 | e.preventDefault();
305 | if (this._isDragging) {
306 | let mousePoint = {
307 | x: prop("pageX", e) || prop("touches.0.pageX", e) || 0,
308 | y: prop("pageY", e) || prop("touches.0.pageY", e) || 0
309 | };
310 | mousePoint = {
311 | x: mousePoint.x - this.bounds.x,
312 | y: mousePoint.y - this.bounds.y
313 | };
314 | if (this.isPointInCanvas(mousePoint)) {
315 | this.coordinates = mousePoint;
316 | } else {
317 | this._onTouchStop();
318 | }
319 | }
320 | };
321 | // Checks if given point is within the boundaries of the canvas
322 | // isPointInCanvas :: Point -> Boolean
323 | isPointInCanvas = ({ x, y }) => x <= this.dimens.width && x > 0 && y <= this.dimens.height && y > 0;
324 | // Check if the given node is already selected
325 | // isSelected :: Node -> Boolean
326 | isSelected = (targetNode) => !!this.selectedNodes.filter((node) => node.row === targetNode.row && node.col === targetNode.col).length;
327 | // Adds intermediary nodes between lastSelectedNode and the target
328 | // addIntermediaryNodes :: Node -> ()
329 | addIntermediaryNodes(target) {
330 | const stepNode = this.getIntermediaryStepDirection(this.lastSelectedNode, target);
331 | if (stepNode.row !== 0 || stepNode.col !== 0) {
332 | let current = {
333 | row: this.lastSelectedNode.row + stepNode.row,
334 | col: this.lastSelectedNode.col + stepNode.col
335 | };
336 | const max = Math.max(this.rows, this.cols);
337 | let i = 0;
338 | while (i++ < max && (current.row !== target.row || current.col !== target.col)) {
339 | if (!this.isSelected(current)) {
340 | this.selectedNodes.push(current);
341 | }
342 | current = {
343 | row: current.row + stepNode.row,
344 | col: current.col + stepNode.col
345 | };
346 | }
347 | }
348 | this.lastSelectedNode = target;
349 | }
350 | // Returns the step direction to select intermediary nodes
351 | // INFO: Can be moved out of the class as it is independent of `this`
352 | // getIntermediaryStepDirection :: (Node, Node) -> Node
353 | getIntermediaryStepDirection(prev, next) {
354 | let finalStep = { row: 0, col: 0 };
355 | if (!prev) {
356 | return finalStep;
357 | }
358 | const dRow = Math.abs(prev.row - next.row);
359 | const dCol = Math.abs(prev.col - next.col);
360 | if (dRow === 1 || dCol === 1) {
361 | return finalStep;
362 | }
363 | let dRsign = prev.row - next.row < 0 ? 1 : -1;
364 | let dCsign = prev.col - next.col < 0 ? 1 : -1;
365 | if (dRow === 0) {
366 | if (dCol !== 0) {
367 | finalStep.col = dCsign;
368 | }
369 | } else if (dCol === 0) {
370 | finalStep.row = dRsign;
371 | } else {
372 | const max = Math.max(dRow, dCol);
373 | const min = Math.min(dRow, dCol);
374 | const gcdValue = gcd(max, min);
375 | if (max % min === 0) {
376 | finalStep.col = dCol / gcdValue * dCsign;
377 | finalStep.row = dRow / gcdValue * dRsign;
378 | }
379 | }
380 | return finalStep;
381 | }
382 | // Calculate the state of the lock for the next frame
383 | calculationLoop = (runLoop = true) => {
384 | if (this._isDragging && this.coordinates) {
385 | this.forEachNode((x, y) => {
386 | const dist = Math.sqrt(
387 | Math.pow(this.coordinates.x - x, 2) + Math.pow(this.coordinates.y - y, 2)
388 | );
389 | if (dist < this.themeState.dimens.node_radius + 1) {
390 | const row = x / this.interval.x;
391 | const col = y / this.interval.y;
392 | const currentNode = { row, col };
393 | if (!this.isSelected(currentNode)) {
394 | this.addIntermediaryNodes(currentNode);
395 | this.selectedNodes.push(currentNode);
396 | return false;
397 | }
398 | }
399 | });
400 | }
401 | if (runLoop) {
402 | raf(this.calculationLoop);
403 | }
404 | };
405 | // Render the state of the lock
406 | renderLoop = (runLoop = true) => {
407 | if (this._isDragging) {
408 | const {
409 | colors: { accent, primary },
410 | dimens: { node_ring: ringWidth }
411 | } = this.themeState;
412 | this.ctx.clearRect(0, 0, this.dimens.width, this.dimens.height);
413 | this.renderGrid();
414 | const lastNode = this.selectedNodes.reduce((prevNode, node) => {
415 | if (prevNode) {
416 | const p1 = { x: node.row * this.interval.x, y: node.col * this.interval.y };
417 | const p2 = { x: prevNode.row * this.interval.x, y: prevNode.col * this.interval.y };
418 | this.drawNode(p1.x, p1.y, accent, primary, ringWidth + 3);
419 | this.drawNode(p2.x, p2.y, accent, primary, ringWidth + 3);
420 | this.joinNodes(prevNode.row, prevNode.col, node.row, node.col);
421 | }
422 | return node;
423 | }, null);
424 | if (lastNode && this.coordinates) {
425 | const prevPoint = { x: lastNode.row * this.interval.x, y: lastNode.col * this.interval.y };
426 | this.drawNode(prevPoint.x, prevPoint.y, accent, primary, ringWidth + 6);
427 | this.joinNodes(prevPoint.x, prevPoint.y, this.coordinates.x, this.coordinates.y, true);
428 | }
429 | }
430 | if (runLoop) {
431 | raf(this.renderLoop);
432 | }
433 | };
434 | // Render the grid to the canvas
435 | renderGrid() {
436 | this.ctx.fillStyle = this.themeState.colors.bg;
437 | this.ctx.fillRect(0, 0, this.dimens.width, this.dimens.height);
438 | this.interval = {
439 | x: this.dimens.width / (this.rows + 1),
440 | y: this.dimens.height / (this.cols + 1)
441 | };
442 | this.forEachNode(this.drawNode.bind(this));
443 | }
444 | // forEachNode :: ((x, y) -> Boolean) -> ()
445 | forEachNode(callback) {
446 | const xGrid = Array(this.rows + 1).fill(this.interval.x);
447 | const yGrid = Array(this.cols + 1).fill(this.interval.y);
448 | const breakException = new Error("Break Exception");
449 | try {
450 | yGrid.reduce((y, dy) => {
451 | xGrid.reduce((x, dx) => {
452 | if (callback(x, y) === false)
453 | throw breakException;
454 | return x + dx;
455 | });
456 | return y + dy;
457 | });
458 | } catch (e) {
459 | if (e !== breakException)
460 | throw e;
461 | }
462 | }
463 | drawNode(x, y, centerColor, borderColor, size) {
464 | const {
465 | dimens: { node_ring: ringWidth, node_radius: ringRadius, node_core: coreRadius },
466 | colors: { primary }
467 | } = this.themeState;
468 | this.ctx.lineWidth = size || ringWidth;
469 | this.ctx.fillStyle = centerColor || primary;
470 | this.ctx.strokeStyle = borderColor || primary;
471 | this.ctx.beginPath();
472 | this.ctx.arc(x, y, coreRadius, 0, Math.PI * 2);
473 | this.ctx.fill();
474 | this.ctx.beginPath();
475 | this.ctx.arc(x, y, ringRadius, 0, Math.PI * 2);
476 | this.ctx.stroke();
477 | }
478 | joinNodes(row1, col1, row2, col2, isCoordinates = false) {
479 | let factor = this.interval;
480 | if (isCoordinates) {
481 | factor = { x: 1, y: 1 };
482 | }
483 | const point1 = { x: factor.x * row1, y: factor.y * col1 };
484 | const point2 = { x: factor.x * row2, y: factor.y * col2 };
485 | this.ctx.lineWidth = this.themeState.dimens.line_width;
486 | this.ctx.strokeStyle = this.themeState.colors.accent;
487 | this.ctx.lineCap = "round";
488 | this.ctx.beginPath();
489 | this.ctx.moveTo(point1.x, point1.y);
490 | this.ctx.lineTo(point2.x, point2.y);
491 | this.ctx.stroke();
492 | }
493 | // Will check if the drawn pattern matches produces a hash from the passed list
494 | // matchHash :: Array -> Matcher
495 | matchHash = (values) => {
496 | const matcher = Matcher_default(values, this.eventBus);
497 | this.onComplete((data) => matcher.check(data.hash));
498 | return matcher;
499 | };
500 | };
501 | var PatternLock_default = (...args) => new PatternLock(...args);
502 |
--------------------------------------------------------------------------------
/build/example-helpers/CodeExample.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = void 0;
7 |
8 | var _hyperapp = require("hyperapp");
9 |
10 | var _utils = require("./utils");
11 |
12 | var _CopyBtn = _interopRequireDefault(require("./CopyBtn"));
13 |
14 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15 |
16 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
17 |
18 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19 |
20 | var withColoredText = function withColoredText(color) {
21 | var predicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (props, children) {
22 | return children;
23 | };
24 | return function (props, children) {
25 | return (0, _hyperapp.h)('span', {
26 | style: {
27 | color: color
28 | }
29 | }, predicate(props, children));
30 | };
31 | };
32 |
33 | var CodeKey = withColoredText('#DB696F');
34 | var FunctionCall = withColoredText('#1abcdc');
35 | var CodeValue = withColoredText('#88CA5F', function (_ref) {
36 | var value = _ref.value;
37 | return JSON.stringify(value);
38 | });
39 |
40 | var IndentedBlock = function IndentedBlock(_ref2, children) {
41 | var _ref2$level = _ref2.level,
42 | level = _ref2$level === void 0 ? 4 : _ref2$level;
43 | return (0, _hyperapp.h)('div', {
44 | style: {
45 | paddingLeft: "".concat(level * 7, "px")
46 | }
47 | }, children);
48 | };
49 |
50 | var CodeExample = function CodeExample(_ref3) {
51 | var _ref3$tabSize = _ref3.tabSize,
52 | tabSize = _ref3$tabSize === void 0 ? 4 : _ref3$tabSize,
53 | config = _ref3.config;
54 | return (0, _hyperapp.h)('div', {
55 | style: {
56 | position: 'relative',
57 | fontSize: '.9em',
58 | textAlign: 'left',
59 | padding: '2em',
60 | backgroundColor: '#2c3e50',
61 | color: '#eee',
62 | fontFamily: '"Courier New", Courier, monospace',
63 | fontWeight: 'bold'
64 | }
65 | }, (0, _hyperapp.h)('div', {}, (0, _hyperapp.h)('span', {
66 | style: {
67 | color: '#cb89e6'
68 | }
69 | }, 'const'), ' lock = ', (0, _hyperapp.h)(FunctionCall, {}, 'PatternLock'), '({', (0, _hyperapp.h)(IndentedBlock, {}, [(0, _hyperapp.h)(CodeKey, {}, '$canvas'), ': ', (0, _hyperapp.h)('span', {}, ['document.', (0, _hyperapp.h)(FunctionCall, {}, 'getElementById'), '(', (0, _hyperapp.h)(CodeValue, {
70 | value: 'myCanvas'
71 | }), ')']), ',']), Object.keys(config).map(function (key) {
72 | return (0, _hyperapp.h)(IndentedBlock, {}, [(0, _hyperapp.h)(CodeKey, {}, key), ': ', (0, _hyperapp.h)(CodeValue, {
73 | value: config[key]
74 | }), ',']);
75 | }), '});'), (0, _hyperapp.h)(_CopyBtn.default, {
76 | text: "const lock = PatternLock(".concat((0, _utils.prettyPrint)(_objectSpread({
77 | $canvas: _utils.prettyPrint.expresssion('document.getElementById("myCanvas")')
78 | }, config)), ");")
79 | }));
80 | };
81 |
82 | var _default = CodeExample;
83 | exports.default = _default;
--------------------------------------------------------------------------------
/build/example-helpers/CopyBtn.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = void 0;
7 |
8 | var _hyperapp = require("hyperapp");
9 |
10 | var _clipboard = _interopRequireDefault(require("clipboard"));
11 |
12 | var _libs = require("../utils/libs");
13 |
14 | var _component = require("./component");
15 |
16 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17 |
18 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
19 |
20 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21 |
22 | function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23 |
24 | function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25 |
26 | var copyBtnStyles = {
27 | position: 'absolute',
28 | right: '0',
29 | top: '0',
30 | border: '1px solid #011',
31 | background: '#0c1e30',
32 | color: '#fff',
33 | borderRadius: '0 0 0 10px',
34 | fontSize: '.8em',
35 | padding: '.3em 1em'
36 | };
37 | var CopyBtn = (0, _component.component)({
38 | clipboard: (0, _libs.Maybe)(null),
39 | defaultProps: {
40 | text: ''
41 | },
42 | onCreate: function onCreate(self, _ref) {
43 | var text = _ref.text;
44 | return function ($btn) {
45 | return self.clipboard = (0, _libs.Maybe)(new _clipboard.default($btn));
46 | };
47 | },
48 | onDestroy: function onDestroy(self) {
49 | return function () {
50 | return self.clipboard.map(function (clipboard) {
51 | return clipboard.destroy();
52 | });
53 | };
54 | },
55 | render: function render(_ref2) {
56 | var text = _ref2.text,
57 | rootProps = _ref2.rootProps,
58 | style = _ref2.style,
59 | props = _objectWithoutProperties(_ref2, ["text", "rootProps", "style"]);
60 |
61 | return (0, _hyperapp.h)('button', _objectSpread({}, rootProps, {
62 | 'data-clipboard-text': text,
63 | style: _objectSpread({}, copyBtnStyles, style),
64 | class: 'copybtn'
65 | }, props), 'Copy Code');
66 | }
67 | });
68 | var _default = CopyBtn;
69 | exports.default = _default;
--------------------------------------------------------------------------------
/build/example-helpers/Options.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.OptionsGroup = exports.OptionItem = void 0;
7 |
8 | var _hyperapp = require("hyperapp");
9 |
10 | var OptionItem = function OptionItem(_ref) {
11 | var name = _ref.name,
12 | value = _ref.value,
13 | checked = _ref.checked,
14 | onCheck = _ref.onCheck;
15 | return (0, _hyperapp.h)('label', {
16 | style: 'padding: .3em .5em;'
17 | }, [(0, _hyperapp.h)('input', {
18 | name: name,
19 | checked: checked,
20 | type: 'radio',
21 | onchange: onCheck
22 | }), value.toString()]);
23 | };
24 |
25 | exports.OptionItem = OptionItem;
26 |
27 | var OptionsGroup = function OptionsGroup(_ref2) {
28 | var list = _ref2.list,
29 | onItemSelect = _ref2.onItemSelect,
30 | name = _ref2.name,
31 | selected = _ref2.selected;
32 | return (0, _hyperapp.h)('div', {
33 | style: 'padding: 1em 0;'
34 | }, [(0, _hyperapp.h)('div', {
35 | style: 'font-size: 1.3em;'
36 | }, (0, _hyperapp.h)('strong', {}, name)), (0, _hyperapp.h)('div', {}, list.map(function (value, index) {
37 | return (0, _hyperapp.h)(OptionItem, {
38 | name: name,
39 | value: value,
40 | key: value,
41 | checked: index === selected,
42 | onCheck: onItemSelect(index)
43 | });
44 | }))]);
45 | };
46 |
47 | exports.OptionsGroup = OptionsGroup;
--------------------------------------------------------------------------------
/build/example-helpers/PatternLockCanvas.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = void 0;
7 |
8 | var _hyperapp = require("hyperapp");
9 |
10 | var _libs = require("../utils/libs");
11 |
12 | var _PatternLock = _interopRequireDefault(require("../PatternLock"));
13 |
14 | var _component = require("./component");
15 |
16 | var _utils = require("./utils");
17 |
18 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19 |
20 | function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
21 |
22 | function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
23 |
24 | function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
25 |
26 | function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
27 |
28 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
29 |
30 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31 |
32 | function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
33 |
34 | function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
35 |
36 | var PatternLockCanvas = (0, _component.component)({
37 | locker: (0, _libs.Maybe)(null),
38 | defaultProps: {
39 | onComplete: function onComplete() {}
40 | },
41 | onCreate: function onCreate(self, _ref) {
42 | var onComplete = _ref.onComplete,
43 | props = _objectWithoutProperties(_ref, ["onComplete"]);
44 |
45 | return function ($canvas) {
46 | var lock = (0, _PatternLock.default)(_objectSpread({
47 | $canvas: $canvas
48 | }, props));
49 | lock.onComplete(onComplete);
50 | self.locker = (0, _libs.Maybe)(lock);
51 | };
52 | },
53 | onDestroy: function onDestroy(self) {
54 | return function () {
55 | return self.locker.map(function (lock) {
56 | return lock.destroy();
57 | });
58 | };
59 | },
60 | onReceiveProps: function onReceiveProps(self, props, prevProps) {
61 | if ((0, _utils.isEqual)(props, prevProps)) return;
62 | self.locker.map(function (lock) {
63 | return lock.setGrid.apply(lock, _toConsumableArray(props.grid).concat([false])).setTheme(props.theme, false).setThemeState(props.themeState, false).forceRender();
64 | });
65 | },
66 | render: function render(_ref2) {
67 | var rootProps = _ref2.rootProps;
68 | return (0, _hyperapp.h)('canvas', rootProps);
69 | }
70 | });
71 | var _default = PatternLockCanvas;
72 | exports.default = _default;
--------------------------------------------------------------------------------
/build/example-helpers/bdom.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.render = exports.onChange = exports.onClick = exports.onEvent = exports.button = exports.input = exports.div = exports.text = exports.h = void 0;
7 |
8 | var h = function h(tagName) {
9 | return function () {
10 | var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11 | var children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
12 | var $el = document.createElement(tagName);
13 | Object.keys(props).forEach(function (key) {
14 | return $el.setAttribute(key, props[key]);
15 | });
16 | children.forEach(function (child) {
17 | return $el.appendChild(child);
18 | });
19 | return $el;
20 | };
21 | };
22 |
23 | exports.h = h;
24 |
25 | var text = function text(str) {
26 | return document.createTextNode(str);
27 | };
28 |
29 | exports.text = text;
30 | var div = h('div');
31 | exports.div = div;
32 | var input = h('input');
33 | exports.input = input;
34 | var button = h('button');
35 | exports.button = button;
36 |
37 | var onEvent = function onEvent(ev) {
38 | return function (fn, $el) {
39 | $el.addEventListener(ev, fn);
40 | return $el;
41 | };
42 | };
43 |
44 | exports.onEvent = onEvent;
45 | var onClick = onEvent('click');
46 | exports.onClick = onClick;
47 | var onChange = onEvent('change');
48 | exports.onChange = onChange;
49 |
50 | var render = function render($child, $parent) {
51 | while ($parent.firstChild) {
52 | $parent.removeChild($parent.firstChild);
53 | }
54 |
55 | $parent.appendChild($child);
56 | };
57 |
58 | exports.render = render;
--------------------------------------------------------------------------------
/build/example-helpers/component.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.component = void 0;
7 |
8 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
9 |
10 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11 |
12 | var component = function component(instance) {
13 | if (typeof instance === 'function') return instance;
14 |
15 | var noop = function noop() {};
16 |
17 | var render = instance.render,
18 | defaultProps = instance.defaultProps,
19 | _instance$onReceivePr = instance.onReceiveProps,
20 | onReceiveProps = _instance$onReceivePr === void 0 ? noop : _instance$onReceivePr,
21 | _instance$onCreate = instance.onCreate,
22 | onCreate = _instance$onCreate === void 0 ? noop : _instance$onCreate,
23 | _instance$onDestroy = instance.onDestroy,
24 | onDestroy = _instance$onDestroy === void 0 ? noop : _instance$onDestroy;
25 |
26 | var prevProps = _objectSpread({}, defaultProps);
27 |
28 | var Comp = function Comp(passedProps) {
29 | var props = _objectSpread({}, defaultProps, passedProps);
30 |
31 | onReceiveProps(instance, props, prevProps);
32 | prevProps = props;
33 | return render(_objectSpread({}, props, {
34 | rootProps: {
35 | oncreate: onCreate(instance, props),
36 | ondestroy: onDestroy(instance, props)
37 | }
38 | }), instance);
39 | };
40 |
41 | Comp.instance = instance;
42 | return Comp;
43 | };
44 |
45 | exports.component = component;
--------------------------------------------------------------------------------
/build/example-helpers/utils.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.isEqual = exports.prettyPrint = void 0;
7 |
8 | var prettyPrint = function prettyPrint(config) {
9 | var tabSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
10 | var tab = Array(tabSize).fill(' ').join('');
11 |
12 | var predicate = function predicate(value) {
13 | return value.expresssion ? value.expresssion : JSON.stringify(value);
14 | };
15 |
16 | var code = Object.keys(config).map(function (key) {
17 | return "".concat(key, ": ").concat(predicate(config[key]), ",");
18 | }).map(function (code) {
19 | return "".concat(tab).concat(code);
20 | }).join('\n');
21 | return "{\n".concat(code, "\n}");
22 | };
23 |
24 | exports.prettyPrint = prettyPrint;
25 |
26 | prettyPrint.expresssion = function (expresssion) {
27 | return {
28 | expresssion: expresssion
29 | };
30 | };
31 |
32 | var isEqual = function isEqual(obj1, obj2) {
33 | if (obj1 === obj2) return true;
34 | if (Object.keys(obj1).length !== Object.keys(obj2).length) return false;
35 |
36 | for (var key in obj1) {
37 | if (obj1[key] !== obj2[key]) return false;
38 | }
39 |
40 | return true;
41 | };
42 |
43 | exports.isEqual = isEqual;
--------------------------------------------------------------------------------
/build/example.js:
--------------------------------------------------------------------------------
1 | !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";function r(e,t){for(var n=[],r=[],o=arguments.length;o-- >2;)n.push(arguments[o]);for(;n.length;){var i=n.pop();if(i&&i.pop)for(o=i.length;o--;)n.push(i[o]);else null!=i&&!0!==i&&!1!==i&&r.push(i)}return"function"==typeof e?e(t||{},r):{nodeName:e,attributes:t||{},children:r,key:t&&t.key}}function o(e,t,n,r){var o,i=[].map,a=r&&r.children[0]||null,u=a&&function e(t){return{nodeName:t.nodeName.toLowerCase(),attributes:{},children:i.call(t.childNodes,function(t){return 3===t.nodeType?t.nodeValue:e(t)})}}(a),c=[],s=!0,l=v(e),f=function e(t,n,r){for(var o in r)"function"==typeof r[o]?function(e,o){r[e]=function(e){var i=o(e);return"function"==typeof i&&(i=i(m(t,l),r)),i&&i!==(n=m(t,l))&&!i.then&&p(l=y(t,v(n,i),l)),i}}(o,r[o]):e(t.concat(o),n[o]=v(n[o]),r[o]=v(r[o]));return r}([],l,v(t));return p(),f;function d(e){return"function"==typeof e?d(e(l,f)):null!=e?e:""}function h(){o=!o;var e=d(n);for(r&&!o&&(a=function e(t,n,r,o,i){if(o===r);else if(null==r||r.nodeName!==o.nodeName){var a=function e(t,n){var r="string"==typeof t||"number"==typeof t?document.createTextNode(t):(n=n||"svg"===t.nodeName)?document.createElementNS("http://www.w3.org/2000/svg",t.nodeName):document.createElement(t.nodeName);var o=t.attributes;if(o){o.oncreate&&c.push(function(){o.oncreate(r)});for(var i=0;i1?y(e.slice(1),t,n[e[0]]):t,v(n,r)):t}function m(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0;return(e=(e<<5)-e+(arguments.length>1?arguments[1]:void 0).charCodeAt(0))&e});return btoa(t+"")};t.gcd=function(e,t){for(;0!==t;){var n=e;e=t,t=n%t}return e};t.Maybe=function e(t){return{value:t,map:function(n){return e(t?n(t):t)}}};t.prop=function(e,t){return e.split(".").reduce(function(e,t){return e?e[t]:void 0},t)}},function(e,t,n){"use strict";function r(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:4,n=Array(t).fill(" ").join(""),r=Object.keys(e).map(function(t){return"".concat(t,": ").concat(function(e){return e.expresssion?e.expresssion:JSON.stringify(e)}(e[t]),",")}).map(function(e){return"".concat(n).concat(e)}).join("\n");return"{\n".concat(r,"\n}")};t.prettyPrint=r,r.expresssion=function(e){return{expresssion:e}};t.isEqual=function(e,t){if(e===t)return!0;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){var e={},t=function(t,n){var r=e[t]=e[t]||[];return r.splice(r.indexOf(n)>>>0,1)};return{on:function(n,r){var o=e[n]=e[n]||[];return o.push(r),t.bind(null,o,r)},off:t,emit:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:function(e,t){return t};return function(n,o){return(0,r.h)("span",{style:{color:e}},t(n,o))}},c=u("#DB696F"),s=u("#1abcdc"),l=u("#88CA5F",function(e){var t=e.value;return JSON.stringify(t)}),f=function(e,t){var n=e.level,o=void 0===n?4:n;return(0,r.h)("div",{style:{paddingLeft:"".concat(7*o,"px")}},t)},d=function(e){e.tabSize;var t=e.config;return(0,r.h)("div",{style:{position:"relative",fontSize:".9em",textAlign:"left",padding:"2em",backgroundColor:"#2c3e50",color:"#eee",fontFamily:'"Courier New", Courier, monospace',fontWeight:"bold"}},(0,r.h)("div",{},(0,r.h)("span",{style:{color:"#cb89e6"}},"const")," lock = ",(0,r.h)(s,{},"PatternLock"),"({",(0,r.h)(f,{},[(0,r.h)(c,{},"$canvas"),": ",(0,r.h)("span",{},["document.",(0,r.h)(s,{},"getElementById"),"(",(0,r.h)(l,{value:"myCanvas"}),")"]),","]),Object.keys(t).map(function(e){return(0,r.h)(f,{},[(0,r.h)(c,{},e),": ",(0,r.h)(l,{value:t[e]}),","])}),"});"),(0,r.h)(i.default,{text:"const lock = PatternLock(".concat((0,o.prettyPrint)(function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s={position:"absolute",right:"0",top:"0",border:"1px solid #011",background:"#0c1e30",color:"#fff",borderRadius:"0 0 0 10px",fontSize:".8em",padding:".3em 1em"},l=(0,n(2).component)({clipboard:(0,i.Maybe)(null),defaultProps:{text:""},onCreate:function(e,t){t.text;return function(t){return e.clipboard=(0,i.Maybe)(new o.default(t))}},onDestroy:function(e){return function(){return e.clipboard.map(function(e){return e.destroy()})}},render:function(e){var t=e.text,n=e.rootProps,o=e.style,i=c(e,["text","rootProps","style"]);return(0,r.h)("button",a({},n,{"data-clipboard-text":t,style:a({},s,o),class:"copybtn"},i),"Copy Code")}});t.default=l},function(e,t,n){
2 | /*!
3 | * clipboard.js v2.0.1
4 | * https://zenorocha.github.io/clipboard.js
5 | *
6 | * Licensed MIT © Zeno Rocha
7 | */
8 | !function(t,n){e.exports=n()}(0,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r,o,i;o=[e,n(7)],void 0===(i="function"==typeof(r=function(e,t){"use strict";var n=function(e){return e&&e.__esModule?e:{default:e}}(t),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=r+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,n.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,n.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=i})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){var r=n(6),o=n(5);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===c(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,a.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new o.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return f("action",e)}},{key:"defaultTarget",value:function(e){var t=f("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return f("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}(i.default);function f(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}e.exports=l})?r.apply(t,o):r)||(e.exports=i)},function(e,t){var n=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}e.exports=function(e,t){for(;e&&e.nodeType!==n;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){var r=n(4);function o(e,t,n,o,i){var a=function(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return o(e,t,n,r,i)}))}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}}])})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(0),o=n(1),i=function(e){return e&&e.__esModule?e:{default:e}}(n(11)),a=n(2),u=n(3);function c(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f=(0,a.component)({locker:(0,o.Maybe)(null),defaultProps:{onComplete:function(){}},onCreate:function(e,t){var n=t.onComplete,r=l(t,["onComplete"]);return function(t){var a=(0,i.default)(function(e){for(var t=1;t0&&r<=n.dimens.height&&r>0}),p(this,"isSelected",function(e){return!!n.selectedNodes.filter(function(t){return t.row===e.row&&t.col===e.col}).length}),p(this,"calculationLoop",function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n._isDragging&&n.coordinates&&n.forEachNode(function(e,t){if(Math.sqrt(Math.pow(n.coordinates.x-e,2)+Math.pow(n.coordinates.y-t,2))0&&void 0!==arguments[0])||arguments[0];if(n._isDragging){var t=n.themeState,r=t.colors,o=r.accent,i=r.primary,u=t.dimens.node_ring;n.ctx.clearRect(0,0,n.dimens.width,n.dimens.height),n.renderGrid();var c=n.selectedNodes.reduce(function(e,t){if(e){var r={x:t.row*n.interval.x,y:t.col*n.interval.y},a={x:e.row*n.interval.x,y:e.col*n.interval.y};n.drawNode(r.x,r.y,o,i,u+3),n.drawNode(a.x,a.y,o,i,u+3),n.joinNodes(e.row,e.col,t.row,t.col)}return t},null);if(c&&n.coordinates){var s={x:c.row*n.interval.x,y:c.col*n.interval.y};n.drawNode(s.x,s.y,o,i,u+6),n.joinNodes(s.x,s.y,n.coordinates.x,n.coordinates.y,!0)}}e&&(0,a.raf)(n.renderLoop)}),p(this,"matchHash",function(e){var t=(0,o.default)(e,n.eventBus);return n.onComplete(function(e){return t.check(e.hash)}),t}),!t.$canvas)throw v("$canvas");if(!t.width)throw v("width");if(!t.height)throw v("height");t=d({},m,t),this.$canvas=t.$canvas,this.ctx=this.$canvas.getContext("2d"),this.setDimensions({width:t.width,height:t.height}),this.initialize(t)}return function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(e,[{key:"setDimensions",value:function(e){this.dimens=e;var t=(0,a.getPixelRatio)(this.ctx);this.$canvas.width=this.dimens.width*t,this.$canvas.height=this.dimens.height*t,this.$canvas.style.width=this.dimens.width+"px",this.$canvas.style.height=this.dimens.height+"px",this.ctx.setTransform(t,0,0,t,0,0)}},{key:"initialize",value:function(e){var t=e.theme,n=f(e.grid,2),o=n[0],i=n[1];this._subscriptions=[],this.eventBus=(0,r.default)(),this.setTheme(t,!1),this.setGrid(o,i),this.renderGrid(),this.attachEventHandlers()}},{key:"setInitialState",value:function(){this.coordinates=null,this.selectedNodes=[],this.lastSelectedNode=null}},{key:"setGrid",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.rows===e&&this.cols===t?this:(this.rows=e,this.cols=t,this.setInitialState(),this._onResize(),n&&this.forceRender(),this)}},{key:"setTheme",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e===u.default[this.theme]||e===this.theme)return this;if("string"==typeof e&&(e=u.default[e]),!e)throw v("theme");return this.theme=e,this.setThemeState("default",!1),t&&this.forceRender(),this}},{key:"setThemeState",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.theme)throw v("theme");return this.themeState=this.theme[e||"default"]||{},this.themeState.colors=d({},this.theme.default.colors,this.themeState.colors),this.themeState.dimens=d({},this.theme.default.dimens,this.themeState.dimens),t&&this.forceRender(),this}},{key:"attachEventHandlers",value:function(){var e=this,t=function(t,n,r){return e._subscriptions.push((0,a.registerEvent)(t,n,r))};t(this.$canvas,"mousedown touchstart",this._onTouchStart),t(this.$canvas,"mouseup touchend",this._onTouchStop),t(window,"mousemove touchmove",this._onTouchMove),t(window,"resize",this._onResize),(0,a.raf)(this.renderLoop),(0,a.raf)(this.calculationLoop)}},{key:"on",value:function(e,t){var n=this.eventBus.on(e,t);return this._subscriptions.push(n),n}},{key:"_emitPatternComplete",value:function(){var e=this.selectedNodes,t="",n="";e.length&&(n=(0,i.patternToWords)(e),t=(0,i.hashCode)(n)),this.emit(y.PATTERN_COMPLETE,{nodes:e,password:n,hash:t})}},{key:"addIntermediaryNodes",value:function(e){var t=this.getIntermediaryStepDirection(this.lastSelectedNode,e);if(0!==t.row||0!==t.col)for(var n={row:this.lastSelectedNode.row+t.row,col:this.lastSelectedNode.col+t.col},r=Math.max(this.rows,this.cols),o=0;o++4&&void 0!==arguments[4]&&arguments[4],i=this.interval;o&&(i={x:1,y:1});var a={x:i.x*e,y:i.y*t},u={x:i.x*n,y:i.y*r};this.ctx.lineWidth=this.themeState.dimens.line_width,this.ctx.strokeStyle=this.themeState.colors.accent,this.ctx.lineCap="round",this.ctx.beginPath(),this.ctx.moveTo(a.x,a.y),this.ctx.lineTo(u.x,u.y),this.ctx.stroke()}}]),e}();t.PatternLock=g;t.default=function(){for(var e=arguments.length,t=new Array(e),n=0;n>> 0, 1);
14 | };
15 |
16 | var on = function on(eventName, cb) {
17 | var fns = eventMap[eventName] = eventMap[eventName] || [];
18 | fns.push(cb);
19 | return off.bind(null, fns, cb);
20 | };
21 |
22 | var emit = function emit(event) {
23 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
24 | args[_key - 1] = arguments[_key];
25 | }
26 |
27 | var fns = eventMap[event];
28 | if (!fns || !fns.length) return [];
29 | return fns.map(function (fn) {
30 | return fn.apply(void 0, args);
31 | });
32 | };
33 |
34 | return {
35 | on: on,
36 | off: off,
37 | emit: emit
38 | };
39 | };
40 |
41 | var _default = EventBus;
42 | exports.default = _default;
--------------------------------------------------------------------------------
/build/utils/Matcher.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = exports.MATCH_FAILURE = exports.MATCH_SUCCESS = void 0;
7 |
8 | var _EventBus = _interopRequireDefault(require("./EventBus"));
9 |
10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11 |
12 | var MATCH_SUCCESS = 'MATCH_SUCCESS';
13 | exports.MATCH_SUCCESS = MATCH_SUCCESS;
14 | var MATCH_FAILURE = 'MATCH_FAILURE'; // isAMatch :: (Array, any) -> Boolean
15 |
16 | exports.MATCH_FAILURE = MATCH_FAILURE;
17 |
18 | var isAMatch = function isAMatch(samples, value) {
19 | return samples.indexOf(value) !== -1;
20 | }; // Matcher :: Array -> Matcher
21 |
22 |
23 | var _default = function _default(values, eventBus) {
24 | var events = eventBus || (0, _EventBus.default)();
25 |
26 | var emitSuccess = function emitSuccess() {
27 | return events.emit(MATCH_SUCCESS);
28 | };
29 |
30 | var emitFailure = function emitFailure() {
31 | return events.emit(MATCH_FAILURE);
32 | };
33 |
34 | var matcher = {
35 | check: function check(val) {
36 | return isAMatch(values, val) ? emitSuccess(val) : emitFailure(val);
37 | },
38 | onSuccess: function onSuccess(fn) {
39 | events.on(MATCH_SUCCESS, fn);
40 | return matcher;
41 | },
42 | onFailure: function onFailure(fn) {
43 | events.on(MATCH_FAILURE, fn);
44 | return matcher;
45 | }
46 | };
47 | return matcher;
48 | };
49 |
50 | exports.default = _default;
--------------------------------------------------------------------------------
/build/utils/dom.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.getPixelRatio = exports.raf = exports.registerEvent = exports.unregisterEvent = void 0;
7 |
8 | var unregisterEvent = function unregisterEvent(target, event, fn) {
9 | return event.split(' ').forEach(function (ev) {
10 | return target.removeEventListener(ev, fn, {
11 | passive: false
12 | });
13 | });
14 | };
15 |
16 | exports.unregisterEvent = unregisterEvent;
17 |
18 | var registerEvent = function registerEvent(target, event, fn) {
19 | event.split(' ').forEach(function (ev) {
20 | return target.addEventListener(ev, fn, {
21 | passive: false
22 | });
23 | });
24 | return function () {
25 | return unregisterEvent(target, event, fn);
26 | };
27 | };
28 |
29 | exports.registerEvent = registerEvent;
30 |
31 | var raf = requestAnimationFrame || function (fn) {
32 | return setTimeout(fn, 16);
33 | };
34 |
35 | exports.raf = raf;
36 |
37 | var getPixelRatio = function getPixelRatio(ctx) {
38 | var devicePixelRatio = window.devicePixelRatio || 1;
39 | var backingStorePixelRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
40 | return devicePixelRatio / backingStorePixelRatio;
41 | };
42 |
43 | exports.getPixelRatio = getPixelRatio;
--------------------------------------------------------------------------------
/build/utils/events.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = void 0;
7 |
8 | var EventBus = function EventBus() {
9 | var eventMap = {};
10 |
11 | var off = function off(eventName, cb) {
12 | var fns = eventMap[eventName] = eventMap[eventName] || [];
13 | return fns.splice(fns.indexOf(cb) >>> 0, 1);
14 | };
15 |
16 | var on = function on(eventName, cb) {
17 | var fns = eventMap[eventName] = eventMap[eventName] || [];
18 | fns.push(cb);
19 | return off.bind(null, fns, cb);
20 | };
21 |
22 | var emit = function emit(event) {
23 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
24 | args[_key - 1] = arguments[_key];
25 | }
26 |
27 | var fns = eventMap[event];
28 | if (!fns || !fns.length) return [];
29 | return fns.map(function (fn) {
30 | return fn.apply(void 0, args);
31 | });
32 | };
33 |
34 | return {
35 | on: on,
36 | off: off,
37 | emit: emit
38 | };
39 | };
40 |
41 | var _default = EventBus;
42 | exports.default = _default;
--------------------------------------------------------------------------------
/build/utils/libs.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.prop = exports.Maybe = exports.gcd = exports.hashCode = exports.patternToWords = void 0;
7 |
8 | // patternToWords :: Array -> String
9 | var patternToWords = function patternToWords(nodes) {
10 | return JSON.stringify(nodes);
11 | }; // nodes.reduce((string = '', node) => wordMap[node.row - 1][node.col - 1] + string);
12 | // hashCode :: String -> String
13 |
14 |
15 | exports.patternToWords = patternToWords;
16 |
17 | var hashCode = function hashCode(str) {
18 | if (!str.length) return '';
19 | var hash = str.split('').reduce(function () {
20 | var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
21 | var b = arguments.length > 1 ? arguments[1] : undefined;
22 | a = (a << 5) - a + b.charCodeAt(0);
23 | return a & a;
24 | });
25 | return btoa(hash + '');
26 | }; // gcd :: (Number, Number) -> Number
27 |
28 |
29 | exports.hashCode = hashCode;
30 |
31 | var gcd = function gcd(x, y) {
32 | while (y !== 0) {
33 | var tmp = x;
34 | x = y;
35 | y = tmp % y;
36 | }
37 |
38 | return x;
39 | };
40 |
41 | exports.gcd = gcd;
42 |
43 | var Maybe = function Maybe(value) {
44 | return {
45 | value: value,
46 | map: function map(fn) {
47 | return Maybe(value ? fn(value) : value);
48 | }
49 | };
50 | };
51 |
52 | exports.Maybe = Maybe;
53 |
54 | var prop = function prop(path, obj) {
55 | return path.split('.').reduce(function (acc, key) {
56 | return acc ? acc[key] : undefined;
57 | }, obj);
58 | };
59 |
60 | exports.prop = prop;
--------------------------------------------------------------------------------
/build/utils/nanoevents.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = void 0;
7 |
8 | var NanoEvents = function NanoEvents() {
9 | this.events = {};
10 | };
11 |
12 | exports.default = NanoEvents;
13 | NanoEvents.prototype = {
14 | on: function on(event, cb) {
15 | var _this = this;
16 |
17 | event = this.events[event] = this.events[event] || [];
18 | event.push(cb);
19 | return function () {
20 | return _this.off(event, cb);
21 | };
22 | },
23 | off: function off(event, cb) {
24 | event = this.events[event] = this.events[event] || [];
25 | event.splice(event.indexOf(cb) >>> 0, 1);
26 | },
27 | emit: function emit(event) {
28 | var _this2 = this;
29 |
30 | var list = this.events[event];
31 | if (!list || !list[0]) return;
32 | var args = list.slice.call(arguments, 1);
33 | list.slice().map(function (i) {
34 | return i.apply(_this2, args);
35 | });
36 | }
37 | };
--------------------------------------------------------------------------------
/build/utils/themes.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = void 0;
7 | var themes = {};
8 | var DEFAULT_DIMENS = {
9 | line_width: 6,
10 | node_radius: 20,
11 | node_core: 8,
12 | node_ring: 1
13 | };
14 | themes.dark = {
15 | default: {
16 | colors: {
17 | accent: '#ae64cd',
18 | primary: '#ffffff',
19 | bg: '#2c3e50'
20 | },
21 | dimens: DEFAULT_DIMENS
22 | },
23 | success: {
24 | colors: {
25 | accent: '#51e980'
26 | }
27 | },
28 | failure: {
29 | colors: {
30 | accent: '#e74c3c'
31 | }
32 | }
33 | };
34 | themes.light = {
35 | default: {
36 | colors: {
37 | accent: '#ae64cd',
38 | primary: '#34495e',
39 | bg: '#ecf0f1'
40 | },
41 | dimens: DEFAULT_DIMENS
42 | },
43 | success: {
44 | colors: {
45 | accent: '#27ae60'
46 | }
47 | },
48 | failure: {
49 | colors: {
50 | accent: '#e74c3c'
51 | }
52 | }
53 | };
54 | var _default = themes;
55 | exports.default = _default;
--------------------------------------------------------------------------------
/build/utils/word-map.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 |
3 | Object.defineProperty(exports, "__esModule", {
4 | value: true
5 | });
6 | exports.default = void 0;
7 | var _default = [['lorem', 'ipsum', 'dolor', 'sit', 'amet'], ['fo^$*@!#x', 'jum[.,]ps', 'ov#$^er', 'bri;24dge', 'dea=-=th'], ['fancy', 'planes', 'foolish', 'man', 'juice'], ['nunc', 'vehicula', 'lectus', 'fermentum', 'suscipit'], ['adipiscing', 'erat', 'porta', 'lobortis', 'ullamcorper'], ['lorem', 'ipsum', 'dolor', 'sit', 'amet'], ['fo^$*@!#x', 'jum[.,]ps', 'ov#$^er', 'bri;24dge', 'dea=-=th'], ['fancy', 'planes', 'foolish', 'man', 'juice'], ['nunc', 'vehicula', 'lectus', 'fermentum', 'suscipit'], ['adipiscing', 'erat', 'porta', 'lobortis', 'ullamcorper']];
8 | exports.default = _default;
--------------------------------------------------------------------------------
/esbuild.config.js:
--------------------------------------------------------------------------------
1 | const esbuild = require('esbuild')
2 | const path = require('path')
3 |
4 | // const watch = process.argv.includes('--watch') ? 'forever' : false
5 | const isProd = process.env.NODE_ENV === 'production'
6 |
7 | const [sourceFile, format = 'cjs'] = process.argv.slice(2)
8 |
9 | const SOURCE_DIR = path.resolve(__dirname, './src')
10 | const BUILD_DIR = path.resolve(__dirname, './build')
11 |
12 | const _src = p => path.join(SOURCE_DIR, p)
13 |
14 | esbuild.build({
15 | entryPoints: [_src(sourceFile)],
16 | sourcemap: 'external',
17 | bundle: true,
18 | outdir: BUILD_DIR,
19 | minify: isProd,
20 | format,
21 | }).catch(_e => process.exit(1))
22 |
23 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Pattern lock for the web
5 |
6 |
7 |
70 |
71 |
72 |
73 |
74 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 |
2 | module.exports = require('./build/PatternLock');
3 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@phenax/pattern-lock-js",
3 | "version": "0.1.2",
4 | "description": "A pattern lock library for the web.",
5 | "main": "index.js",
6 | "repository": "https://github.com/phenax/pattern-lock-js.git",
7 | "homepage": "https://phenax.github.io/pattern-lock-js",
8 | "author": "Akshay Nair ",
9 | "scripts": {
10 | "build": "concurrently 'npm run build:package' 'npm run build:example'",
11 | "watch": "concurrently 'npm run watch:package' 'npm run watch:example'",
12 | "build:package": "node esbuild.config.js PatternLock.js",
13 | "watch:package": "nodemon --exec 'yarn build:package' -w ./src",
14 | "build:example": "node esbuild.config.js vanilla.example.js",
15 | "watch:example": "nodemon --exec 'yarn build:example' -w ./src"
16 | },
17 | "license": "Apache 2.0",
18 | "devDependencies": {
19 | "clipboard": "^2.0.1",
20 | "concurrently": "^3.6.1",
21 | "esbuild": "^0.18.13",
22 | "eslint": "^5.4.0",
23 | "eslint-config-react-app": "^2.1.0",
24 | "eslint-plugin-flowtype": "^2.50.0",
25 | "eslint-plugin-import": "^2.14.0",
26 | "eslint-plugin-jsx-a11y": "^6.1.1",
27 | "eslint-plugin-react": "^7.11.1",
28 | "hyperapp": "^1.2.9",
29 | "nodemon": "^3.0.1"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/PatternLock.js:
--------------------------------------------------------------------------------
1 | import EventBus from './utils/EventBus';
2 | import Matcher from './utils/Matcher';
3 |
4 | import { patternToWords, hashCode, gcd, prop } from './utils/libs';
5 | import { registerEvent, getPixelRatio, raf } from './utils/dom';
6 |
7 | import THEMES from './utils/themes';
8 |
9 |
10 | /*
11 | type Hash = String
12 | type Pixels = Number
13 | type String = String
14 | type Grid = [ Number, Number ]
15 | type Theme = String | Object
16 |
17 | type Node = { row :: Number, col :: Number }
18 | type Point = { x :: Number, y :: Number }
19 |
20 | type State = 'default' | 'success' | 'failure'
21 |
22 | type Colors = {
23 | bg :: String
24 | accent :: String
25 | primary :: String
26 | }
27 |
28 | type Dimens = {
29 | line_width :: Pixels
30 | node_radius :: Pixels
31 | node_core :: Pixels
32 | node_ring :: Pixels
33 | }
34 |
35 | type Styles = {
36 | colors :: Colors
37 | dimens :: Dimens
38 | }
39 |
40 | type Options = {
41 | $canvas :: HTMLCanvasElement
42 | theme :: ?Theme
43 | grid :: ?Grid
44 | width :: ?Pixels
45 | height :: ?Pixels
46 | }
47 |
48 | */
49 |
50 | const createInvalidOptionError = option => new Error(`Invalid or empty ${option} passed`);
51 |
52 | const DEFAULT_THEME_NAME = 'dark';
53 |
54 | const events = {
55 | PATTERN_COMPLETE: 'complete',
56 | PATTERN_START: 'start',
57 | };
58 |
59 | const defaultConfig = {
60 | theme: DEFAULT_THEME_NAME,
61 | grid: [ 3, 3 ],
62 | width: 300,
63 | height: 430,
64 | };
65 |
66 | export class PatternLock {
67 |
68 | constructor(config) {
69 | if(!config.$canvas) throw createInvalidOptionError('$canvas');
70 | if(!config.width) throw createInvalidOptionError('width');
71 | if(!config.height) throw createInvalidOptionError('height');
72 |
73 | config = { ...defaultConfig, ...config };
74 |
75 | this.$canvas = config.$canvas;
76 | this.ctx = this.$canvas.getContext('2d');
77 |
78 | this.setDimensions({ width: config.width, height: config.height });
79 | this.initialize(config);
80 | }
81 |
82 | setDimensions(dimens) {
83 | this.dimens = dimens;
84 | const ratio = getPixelRatio(this.ctx);
85 |
86 | this.$canvas.width = this.dimens.width * ratio;
87 | this.$canvas.height = this.dimens.height * ratio;
88 | this.$canvas.style.width = this.dimens.width + 'px';
89 | this.$canvas.style.height = this.dimens.height + 'px';
90 | this.ctx.setTransform(ratio, 0, 0, ratio, 0, 0);
91 | }
92 |
93 | initialize({ theme, grid: [ rows, cols ] }) {
94 | this._subscriptions = [];
95 | this.eventBus = EventBus();
96 |
97 | this.setTheme(theme, false);
98 | this.setGrid(rows, cols);
99 | this.renderGrid();
100 | this.attachEventHandlers();
101 | }
102 |
103 | setInitialState() {
104 | this.coordinates = null;
105 | this.selectedNodes = [];
106 | this.lastSelectedNode = null;
107 | }
108 |
109 | forceRender = () => raf(() => {
110 | const previousDragState = this._isDragging;
111 | this._isDragging = true;
112 | this.calculationLoop(false);
113 |
114 | raf(() => {
115 | this.renderLoop(false);
116 | this._isDragging = previousDragState;
117 | });
118 | });
119 |
120 | // setGrid :: (Number, Number) -> PatternLock
121 | setGrid(rows, cols, rerender = true) {
122 | if (this.rows === rows && this.cols === cols)
123 | return this;
124 |
125 | this.rows = rows;
126 | this.cols = cols;
127 |
128 | this.setInitialState();
129 | this._onResize();
130 | rerender && this.forceRender();
131 | return this;
132 | }
133 |
134 | // setTheme :: (Theme, ?Boolean) -> PatternLock
135 | setTheme(theme, rerender = true) {
136 | if (theme === THEMES[this.theme] || theme === this.theme)
137 | return this;
138 |
139 | if(typeof theme === 'string')
140 | theme = THEMES[theme];
141 |
142 | if(!theme) throw createInvalidOptionError('theme');
143 |
144 | this.theme = theme;
145 |
146 | this.setThemeState('default', false);
147 |
148 | rerender && this.forceRender();
149 | return this;
150 | }
151 |
152 | // setThemeState :: (State, ?Boolean) -> PatternLock
153 | setThemeState(themeState, rerender = true) {
154 | if (!this.theme) throw createInvalidOptionError('theme');
155 |
156 | this.themeState = this.theme[themeState || 'default'] || {};
157 | this.themeState.colors = { ...this.theme.default.colors, ...this.themeState.colors };
158 | this.themeState.dimens = { ...this.theme.default.dimens, ...this.themeState.dimens };
159 |
160 | rerender && this.forceRender();
161 | return this;
162 | }
163 |
164 | // Attach event listeners and start frame loops
165 | attachEventHandlers() {
166 | const register = (t, ev, fn) => this._subscriptions.push(registerEvent(t, ev, fn));
167 |
168 | register(this.$canvas, 'mousedown touchstart', this._onTouchStart);
169 | register(this.$canvas, 'mouseup touchend', this._onTouchStop);
170 | register(window, 'mousemove touchmove', this._onTouchMove);
171 | register(window, 'resize', this._onResize);
172 |
173 | // Start frame loops
174 | raf(this.renderLoop);
175 | raf(this.calculationLoop);
176 | }
177 |
178 |
179 |
180 | // Event handler stuff start
181 | destroy = () => this._subscriptions.map(fn => fn());
182 |
183 | on(event, fn) {
184 | const subscription = this.eventBus.on(event, fn);
185 | this._subscriptions.push(subscription);
186 | return subscription;
187 | }
188 | emit = (...args) => this.eventBus.emit(...args);
189 | onStart = fn => this.on(events.PATTERN_START, fn);
190 | onComplete = fn => this.on(events.PATTERN_COMPLETE, fn);
191 |
192 | _emitPatternStart = () => this.emit(events.PATTERN_START, {});
193 | _emitPatternComplete() {
194 | const nodes = this.selectedNodes;
195 | let hash = '';
196 | let password = '';
197 |
198 | if(nodes.length) {
199 | password = patternToWords(nodes);
200 | hash = hashCode(password);
201 | }
202 |
203 | this.emit(events.PATTERN_COMPLETE, { nodes, password, hash });
204 | }
205 | // Event handler stuff end
206 |
207 |
208 | // recalculateBounds :: () -> Point
209 | recalculateBounds = () => {
210 | let bodyRect = document.body.getBoundingClientRect(),
211 | elemRect = this.$canvas.getBoundingClientRect(),
212 | offset = elemRect.top - bodyRect.top;
213 | this.bounds = { x: elemRect.left, y: offset }
214 | };
215 |
216 | _onResize = () => raf(this.recalculateBounds);
217 |
218 | _onTouchStart = e => {
219 | if (e) e.preventDefault();
220 |
221 | raf(this.recalculateBounds);
222 |
223 | this.setInitialState();
224 | this.forceRender();
225 |
226 | this._emitPatternStart();
227 | this._isDragging = true;
228 | }
229 |
230 | _onTouchStop = e => {
231 | if (e) e.preventDefault();
232 |
233 | this.coordinates = null;
234 | this.renderLoop(false);
235 |
236 | this._emitPatternComplete();
237 | this._isDragging = false;
238 | }
239 |
240 | _onTouchMove = e => {
241 | if (e) e.preventDefault();
242 |
243 | if (this._isDragging) {
244 |
245 | let mousePoint = {
246 | x: prop('pageX', e) || prop('touches.0.pageX', e) || 0,
247 | y: prop('pageY', e) || prop('touches.0.pageY', e) || 0,
248 | };
249 |
250 | mousePoint = {
251 | x: mousePoint.x - this.bounds.x,
252 | y: mousePoint.y - this.bounds.y,
253 | };
254 |
255 | if (this.isPointInCanvas(mousePoint)) {
256 | this.coordinates = mousePoint;
257 | } else {
258 | this._onTouchStop();
259 | }
260 | }
261 | }
262 |
263 | // Checks if given point is within the boundaries of the canvas
264 | // isPointInCanvas :: Point -> Boolean
265 | isPointInCanvas = ({ x, y }) => (
266 | x <= this.dimens.width && x > 0 &&
267 | y <= this.dimens.height && y > 0
268 | );
269 |
270 |
271 | // Check if the given node is already selected
272 | // isSelected :: Node -> Boolean
273 | isSelected = targetNode => !!this.selectedNodes.filter(node => (
274 | node.row === targetNode.row &&
275 | node.col === targetNode.col
276 | )).length;
277 |
278 | // Adds intermediary nodes between lastSelectedNode and the target
279 | // addIntermediaryNodes :: Node -> ()
280 | addIntermediaryNodes(target) {
281 | const stepNode = this.getIntermediaryStepDirection(this.lastSelectedNode, target);
282 |
283 | if (stepNode.row !== 0 || stepNode.col !== 0) {
284 | let current = {
285 | row: this.lastSelectedNode.row + stepNode.row,
286 | col: this.lastSelectedNode.col + stepNode.col
287 | };
288 |
289 | const max = Math.max(this.rows, this.cols);
290 |
291 | let i = 0;
292 | while (i++ < max && (current.row !== target.row || current.col !== target.col)) {
293 | if (!this.isSelected(current)) {
294 | this.selectedNodes.push(current);
295 | }
296 |
297 | current = {
298 | row: current.row + stepNode.row,
299 | col: current.col + stepNode.col,
300 | };
301 | }
302 | }
303 |
304 | this.lastSelectedNode = target;
305 | }
306 |
307 | // Returns the step direction to select intermediary nodes
308 | // INFO: Can be moved out of the class as it is independent of `this`
309 | // getIntermediaryStepDirection :: (Node, Node) -> Node
310 | getIntermediaryStepDirection(prev, next) {
311 | let finalStep = { row: 0, col: 0 };
312 | if (!prev) {
313 | return finalStep;
314 | }
315 |
316 | const dRow = Math.abs(prev.row - next.row);
317 | const dCol = Math.abs(prev.col - next.col);
318 |
319 | if (dRow === 1 || dCol === 1) {
320 | return finalStep;
321 | }
322 |
323 | let dRsign = (prev.row - next.row) < 0 ? 1 : -1;
324 | let dCsign = (prev.col - next.col) < 0 ? 1 : -1;
325 |
326 | if (dRow === 0) {
327 | if (dCol !== 0) {
328 | finalStep.col = dCsign;
329 | }
330 | } else if (dCol === 0) {
331 | finalStep.row = dRsign;
332 | } else {
333 | const max = Math.max(dRow, dCol);
334 | const min = Math.min(dRow, dCol);
335 | const gcdValue = gcd(max, min);
336 | if (max % min === 0) {
337 | finalStep.col = (dCol / gcdValue) * dCsign;
338 | finalStep.row = (dRow / gcdValue) * dRsign;
339 | }
340 | }
341 |
342 | return finalStep;
343 | }
344 |
345 |
346 | // Calculate the state of the lock for the next frame
347 | calculationLoop = (runLoop = true) => {
348 |
349 | if (this._isDragging && this.coordinates) {
350 |
351 | this.forEachNode((x, y) => {
352 |
353 | const dist = Math.sqrt(
354 | Math.pow(this.coordinates.x - x, 2) +
355 | Math.pow(this.coordinates.y - y, 2)
356 | );
357 |
358 | if (dist < this.themeState.dimens.node_radius + 1) {
359 |
360 | const row = x / this.interval.x;
361 | const col = y / this.interval.y;
362 |
363 | const currentNode = { row, col };
364 |
365 | if (!this.isSelected(currentNode)) {
366 | this.addIntermediaryNodes(currentNode);
367 | this.selectedNodes.push(currentNode);
368 | return false;
369 | }
370 | }
371 | });
372 | }
373 |
374 | if (runLoop) {
375 | raf(this.calculationLoop);
376 | }
377 | }
378 |
379 | // Render the state of the lock
380 | renderLoop = (runLoop = true) => {
381 | if (this._isDragging) {
382 | const {
383 | colors: { accent, primary },
384 | dimens: { node_ring: ringWidth }
385 | } = this.themeState;
386 |
387 | // Clear the canvas(Redundant)
388 | this.ctx.clearRect(0, 0, this.dimens.width, this.dimens.height);
389 |
390 | // Paint the grid
391 | this.renderGrid();
392 |
393 | // Plot all the selected nodes
394 | const lastNode = this.selectedNodes.reduce((prevNode, node) => {
395 | if (prevNode) {
396 | const p1 = { x: node.row * this.interval.x, y: node.col * this.interval.y };
397 | const p2 = { x: prevNode.row * this.interval.x, y: prevNode.col * this.interval.y };
398 |
399 | // Make the two selected nodes bigger
400 | this.drawNode(p1.x, p1.y, accent, primary, ringWidth + 3);
401 | this.drawNode(p2.x, p2.y, accent, primary, ringWidth + 3);
402 |
403 | // Join the nodes
404 | this.joinNodes(prevNode.row, prevNode.col, node.row, node.col);
405 | }
406 |
407 | return node;
408 | }, null);
409 |
410 | if (lastNode && this.coordinates) {
411 | const prevPoint = { x: lastNode.row * this.interval.x, y: lastNode.col * this.interval.y };
412 |
413 | // Draw the last node
414 | this.drawNode(prevPoint.x, prevPoint.y, accent, primary, ringWidth + 6);
415 |
416 | // Draw a line between last node to the current drag position
417 | this.joinNodes(prevPoint.x, prevPoint.y, this.coordinates.x, this.coordinates.y, true);
418 | }
419 | }
420 |
421 | if (runLoop) {
422 | raf(this.renderLoop);
423 | }
424 | }
425 |
426 |
427 | // Render the grid to the canvas
428 | renderGrid() {
429 | this.ctx.fillStyle = this.themeState.colors.bg;
430 | this.ctx.fillRect(0, 0, this.dimens.width, this.dimens.height);
431 |
432 | this.interval = {
433 | x: this.dimens.width / (this.rows + 1),
434 | y: this.dimens.height / (this.cols + 1),
435 | };
436 |
437 | // Draw all the nodes
438 | this.forEachNode(this.drawNode.bind(this));
439 | }
440 |
441 |
442 | // forEachNode :: ((x, y) -> Boolean) -> ()
443 | forEachNode(callback) {
444 | const xGrid = Array(this.rows + 1).fill(this.interval.x);
445 | const yGrid = Array(this.cols + 1).fill(this.interval.y);
446 |
447 | const breakException = new Error('Break Exception');
448 |
449 | try {
450 | yGrid.reduce((y, dy) => {
451 | xGrid.reduce((x, dx) => {
452 | if (callback(x, y) === false)
453 | throw breakException;
454 | return x + dx;
455 | });
456 | return y + dy;
457 | });
458 | } catch (e) {
459 | if (e !== breakException) throw e;
460 | }
461 | }
462 |
463 | drawNode(x, y, centerColor, borderColor, size) {
464 | const {
465 | dimens: { node_ring: ringWidth, node_radius: ringRadius, node_core: coreRadius },
466 | colors: { primary }
467 | } = this.themeState;
468 |
469 | // Config
470 | this.ctx.lineWidth = size || ringWidth;
471 | this.ctx.fillStyle = centerColor || primary;
472 | this.ctx.strokeStyle = borderColor || primary;
473 |
474 | // Draw inner circle
475 | this.ctx.beginPath();
476 | this.ctx.arc(x, y, coreRadius, 0, Math.PI * 2);
477 | this.ctx.fill();
478 |
479 | // Draw outer ring
480 | this.ctx.beginPath();
481 | this.ctx.arc(x, y, ringRadius, 0, Math.PI * 2);
482 | this.ctx.stroke();
483 | }
484 |
485 | joinNodes(row1, col1, row2, col2, isCoordinates = false) {
486 |
487 | let factor = this.interval;
488 |
489 | if (isCoordinates) {
490 | factor = { x: 1, y: 1 };
491 | }
492 |
493 | const point1 = { x: factor.x * row1, y: factor.y * col1 };
494 | const point2 = { x: factor.x * row2, y: factor.y * col2 };
495 |
496 | // Config
497 | this.ctx.lineWidth = this.themeState.dimens.line_width;
498 | this.ctx.strokeStyle = this.themeState.colors.accent;
499 | this.ctx.lineCap = 'round';
500 |
501 | // Draw line
502 | this.ctx.beginPath();
503 | this.ctx.moveTo(point1.x, point1.y);
504 | this.ctx.lineTo(point2.x, point2.y);
505 | this.ctx.stroke();
506 | }
507 |
508 | // Will check if the drawn pattern matches produces a hash from the passed list
509 | // matchHash :: Array -> Matcher
510 | matchHash = values => {
511 | const matcher = Matcher(values, this.eventBus);
512 | this.onComplete(data => matcher.check(data.hash));
513 | return matcher;
514 | };
515 | }
516 |
517 | export default (...args) => new PatternLock(...args);
518 |
--------------------------------------------------------------------------------
/src/example-helpers/CodeExample.js:
--------------------------------------------------------------------------------
1 | import { h } from 'hyperapp';
2 |
3 | import { prettyPrint } from './utils';
4 |
5 | import CopyBtn from './CopyBtn';
6 |
7 |
8 | const withColoredText = (color, predicate = ((props, children) => children)) => (props, children) =>
9 | h('span', { style: { color } }, predicate(props, children));
10 |
11 | const CodeKey = withColoredText('#DB696F');
12 | const FunctionCall = withColoredText('#1abcdc');
13 | const CodeValue = withColoredText('#88CA5F', ({ value }) => JSON.stringify(value));
14 |
15 | const IndentedBlock = ({ level = 4 }, children) => h('div',
16 | { style: { paddingLeft: `${level * 7}px` } },
17 | children
18 | );
19 |
20 | const CodeExample = ({ tabSize = 4, config }) => (
21 | h('div',
22 | {
23 | style: {
24 | position: 'relative',
25 | fontSize: '.9em',
26 | textAlign: 'left',
27 | padding: '2em',
28 | backgroundColor: '#2c3e50',
29 | color: '#eee',
30 | fontFamily: '"Courier New", Courier, monospace',
31 | fontWeight: 'bold',
32 | }
33 | },
34 | h('div', {},
35 | h('span', { style: { color: '#cb89e6' } }, 'const'),
36 | ' lock = ',
37 | h(FunctionCall, {}, 'PatternLock'),
38 | '({',
39 | h(IndentedBlock, {}, [
40 | h(CodeKey, {}, '$canvas'),
41 | ': ',
42 | h('span', {}, [
43 | 'document.',
44 | h(FunctionCall, {}, 'getElementById'),
45 | '(',
46 | h(CodeValue, { value: 'myCanvas' }),
47 | ')',
48 | ]),
49 | ',',
50 | ]),
51 | Object.keys(config).map(key => h(IndentedBlock, {}, [
52 | h(CodeKey, {}, key),
53 | ': ',
54 | h(CodeValue, { value: config[key] }),
55 | ',',
56 | ])),
57 | '});'
58 | ),
59 | h(CopyBtn, {
60 | text: `const lock = PatternLock(${prettyPrint({
61 | $canvas: prettyPrint.expresssion('document.getElementById("myCanvas")'),
62 | ...config,
63 | })});`,
64 | }),
65 | )
66 | );
67 |
68 | export default CodeExample;
69 |
--------------------------------------------------------------------------------
/src/example-helpers/CopyBtn.js:
--------------------------------------------------------------------------------
1 | import { h } from 'hyperapp';
2 | import Clipboard from 'clipboard';
3 |
4 | import { Maybe } from '../utils/libs';
5 |
6 | import { component } from './component';
7 |
8 | const copyBtnStyles = {
9 | position: 'absolute',
10 | right: '0',
11 | top: '0',
12 | border: '1px solid #011',
13 | background: '#0c1e30',
14 | color: '#fff',
15 | borderRadius: '0 0 0 10px',
16 | fontSize: '.8em',
17 | padding: '.3em 1em',
18 | };
19 |
20 | const CopyBtn = component({
21 | clipboard: Maybe(null),
22 | defaultProps: { text: '' },
23 |
24 | onCreate: (self, { text }) => $btn =>
25 | self.clipboard = Maybe(new Clipboard($btn)),
26 | onDestroy: self => () =>
27 | self.clipboard.map(clipboard => clipboard.destroy()),
28 |
29 | render: ({ text, rootProps, style, ...props }) => h(
30 | 'button',
31 | {
32 | ...rootProps,
33 | 'data-clipboard-text': text,
34 | style: { ...copyBtnStyles, ...style, },
35 | class: 'copybtn',
36 | ...props,
37 | },
38 | 'Copy Code'
39 | ),
40 | });
41 |
42 | export default CopyBtn;
43 |
--------------------------------------------------------------------------------
/src/example-helpers/Options.js:
--------------------------------------------------------------------------------
1 | import { h } from 'hyperapp';
2 |
3 | export const OptionItem = ({ name, value, checked, onCheck }) => (
4 | h('label', { style: 'padding: .3em .5em;' }, [
5 | h('input', {
6 | name,
7 | checked,
8 | type: 'radio',
9 | onchange: onCheck,
10 | }),
11 | value.toString(),
12 | ])
13 | );
14 |
15 | export const OptionsGroup = ({ list, onItemSelect, name, selected }) => (
16 | h('div', { style: 'padding: 1em 0;' }, [
17 | h('div', { style: 'font-size: 1.3em;' }, h('strong', {}, name)),
18 | h('div', {},
19 | list.map((value, index) => h(OptionItem, {
20 | name,
21 | value,
22 | key: value,
23 | checked: index === selected,
24 | onCheck: onItemSelect(index),
25 | })),
26 | ),
27 | ])
28 | );
29 |
--------------------------------------------------------------------------------
/src/example-helpers/PatternLockCanvas.js:
--------------------------------------------------------------------------------
1 | import { h } from 'hyperapp';
2 |
3 | import { Maybe } from '../utils/libs';
4 | import PatternLockJs from '../PatternLock';
5 |
6 | import { component } from './component';
7 | import { isEqual } from './utils';
8 |
9 | const PatternLockCanvas = component({
10 | locker: Maybe(null),
11 | defaultProps: { onComplete: () => {} },
12 |
13 | onCreate: (self, { onComplete, ...props }) => $canvas => {
14 | const lock = PatternLockJs({ $canvas, ...props });
15 | lock.onComplete(onComplete);
16 | self.locker = Maybe(lock);
17 | },
18 |
19 | onDestroy: self => () =>
20 | self.locker.map(lock => lock.destroy()),
21 |
22 | onReceiveProps: (self, props, prevProps) => {
23 | if (isEqual(props, prevProps)) return;
24 |
25 | self.locker.map(lock => {
26 | return lock
27 | .setGrid(...props.grid, false)
28 | .setTheme(props.theme, false)
29 | .setThemeState(props.themeState, false)
30 | .forceRender();
31 | });
32 | },
33 |
34 | render: ({ rootProps }) => h('canvas', rootProps),
35 | });
36 |
37 | export default PatternLockCanvas;
38 |
--------------------------------------------------------------------------------
/src/example-helpers/component.js:
--------------------------------------------------------------------------------
1 | export const component = instance => {
2 | if (typeof instance === 'function') return instance;
3 |
4 | const noop = () => {};
5 | const {
6 | render,
7 | defaultProps,
8 | onReceiveProps = noop,
9 | onCreate = noop,
10 | onDestroy = noop,
11 | } = instance;
12 | let prevProps = { ...defaultProps };
13 |
14 | const Comp = passedProps => {
15 | const props = { ...defaultProps, ...passedProps };
16 | onReceiveProps(instance, props, prevProps);
17 | prevProps = props;
18 | return render({
19 | ...props,
20 | rootProps: {
21 | oncreate: onCreate(instance, props),
22 | ondestroy: onDestroy(instance, props),
23 | },
24 | }, instance);
25 | };
26 | Comp.instance = instance;
27 | return Comp;
28 | };
29 |
30 |
--------------------------------------------------------------------------------
/src/example-helpers/utils.js:
--------------------------------------------------------------------------------
1 |
2 | export const prettyPrint = (config, tabSize = 4) => {
3 | const tab = Array(tabSize).fill(' ').join('');
4 |
5 | const predicate = value =>
6 | value.expresssion ? value.expresssion : JSON.stringify(value);
7 |
8 | const code = Object.keys(config)
9 | .map(key => `${key}: ${predicate(config[key])},`)
10 | .map(code => `${tab}${code}`)
11 | .join('\n');
12 |
13 | return `{\n${code}\n}`;
14 | };
15 |
16 | prettyPrint.expresssion = expresssion => ({ expresssion });
17 |
18 |
19 | export const isEqual = (obj1, obj2) => {
20 | if (obj1 === obj2) return true;
21 | if (Object.keys(obj1).length !== Object.keys(obj2).length) return false;
22 | for (let key in obj1) {
23 | if (obj1[key] !== obj2[key]) return false;
24 | }
25 | return true;
26 | };
27 |
--------------------------------------------------------------------------------
/src/utils/EventBus.js:
--------------------------------------------------------------------------------
1 |
2 | const EventBus = () => {
3 | const eventMap = {};
4 |
5 | const off = (eventName, cb) => {
6 | const fns = eventMap[eventName] = eventMap[eventName] || [];
7 | return fns.splice(fns.indexOf(cb) >>> 0, 1);
8 | };
9 |
10 | const on = (eventName, cb) => {
11 | const fns = eventMap[eventName] = eventMap[eventName] || [];
12 | fns.push(cb);
13 | return off.bind(null, fns, cb);
14 | };
15 |
16 | const emit = (event, ...args) => {
17 | const fns = eventMap[event];
18 | if (!fns || !fns.length) return [];
19 | return fns.map(fn => fn(...args));
20 | };
21 |
22 | return { on, off, emit };
23 | };
24 |
25 | export default EventBus;
26 |
--------------------------------------------------------------------------------
/src/utils/Matcher.js:
--------------------------------------------------------------------------------
1 |
2 | import EventBus from './EventBus';
3 |
4 | export const MATCH_SUCCESS = 'MATCH_SUCCESS';
5 | export const MATCH_FAILURE = 'MATCH_FAILURE';
6 |
7 | // isAMatch :: (Array, any) -> Boolean
8 | const isAMatch = (samples, value) => samples.indexOf(value) !== -1;
9 |
10 | // Matcher :: Array -> Matcher
11 | export default (values, eventBus) => {
12 | const events = eventBus || EventBus();
13 |
14 | const emitSuccess = () => events.emit(MATCH_SUCCESS);
15 | const emitFailure = () => events.emit(MATCH_FAILURE);
16 |
17 | const matcher = {
18 | check: val => isAMatch(values, val) ? emitSuccess(val) : emitFailure(val),
19 | onSuccess: fn => { events.on(MATCH_SUCCESS, fn); return matcher; },
20 | onFailure: fn => { events.on(MATCH_FAILURE, fn); return matcher; },
21 | };
22 |
23 | return matcher;
24 | };
25 |
--------------------------------------------------------------------------------
/src/utils/dom.js:
--------------------------------------------------------------------------------
1 |
2 | export const unregisterEvent = (target, event, fn) =>
3 | event.split(' ').forEach(ev => target.removeEventListener(ev, fn, { passive: false }));
4 |
5 | export const registerEvent = (target, event, fn) => {
6 | event.split(' ').forEach(ev => target.addEventListener(ev, fn, { passive: false }));
7 | return () => unregisterEvent(target, event, fn);
8 | };
9 |
10 | export const raf = requestAnimationFrame || (fn => setTimeout(fn, 16));
11 |
12 | export const getPixelRatio = ctx => {
13 | const devicePixelRatio = window.devicePixelRatio || 1;
14 | const backingStorePixelRatio =
15 | ctx.webkitBackingStorePixelRatio ||
16 | ctx.mozBackingStorePixelRatio ||
17 | ctx.msBackingStorePixelRatio ||
18 | ctx.oBackingStorePixelRatio ||
19 | ctx.backingStorePixelRatio || 1;
20 |
21 | return devicePixelRatio / backingStorePixelRatio;
22 | };
23 |
--------------------------------------------------------------------------------
/src/utils/libs.js:
--------------------------------------------------------------------------------
1 |
2 | // patternToWords :: Array -> String
3 | export const patternToWords = nodes => JSON.stringify(nodes);
4 | // nodes.reduce((string = '', node) => wordMap[node.row - 1][node.col - 1] + string);
5 |
6 | // hashCode :: String -> String
7 | export const hashCode = str => {
8 | if(!str.length) return '';
9 |
10 | const hash = str.split('').reduce((a = 0, b) => {
11 | a = ( (a << 5) - a ) + b.charCodeAt(0);
12 | return a & a;
13 | });
14 |
15 | return btoa(hash + '');
16 | };
17 |
18 | // gcd :: (Number, Number) -> Number
19 | export const gcd = (x, y) => {
20 | while (y !== 0) {
21 | let tmp = x;
22 | x = y;
23 | y = tmp % y;
24 | }
25 | return x;
26 | };
27 |
28 |
29 | export const Maybe = value => ({
30 | value,
31 | map: fn => Maybe(value? fn(value): value),
32 | });
33 |
34 | export const prop = (path, obj) =>
35 | path
36 | .split('.')
37 | .reduce((acc, key) => acc ? acc[key] : undefined, obj);
38 |
--------------------------------------------------------------------------------
/src/utils/themes.js:
--------------------------------------------------------------------------------
1 |
2 | const themes = {};
3 |
4 | const DEFAULT_DIMENS = {
5 | line_width: 6,
6 | node_radius: 20,
7 | node_core: 8,
8 | node_ring: 1,
9 | };
10 |
11 | themes.dark = {
12 | default: {
13 | colors: {
14 | accent: '#ae64cd',
15 | primary: '#ffffff',
16 | bg: '#2c3e50',
17 | },
18 | dimens: DEFAULT_DIMENS,
19 | },
20 | success: {
21 | colors: {
22 | accent: '#51e980',
23 | }
24 | },
25 | failure: {
26 | colors: {
27 | accent: '#e74c3c',
28 | }
29 | },
30 | };
31 |
32 | themes.light = {
33 | default: {
34 | colors: {
35 | accent: '#ae64cd',
36 | primary: '#34495e',
37 | bg: '#ecf0f1',
38 | },
39 | dimens: DEFAULT_DIMENS,
40 | },
41 | success: {
42 | colors: {
43 | accent: '#27ae60',
44 | }
45 | },
46 | failure: {
47 | colors: {
48 | accent: '#e74c3c',
49 | }
50 | },
51 | };
52 |
53 | export default themes;
54 |
--------------------------------------------------------------------------------
/src/vanilla.example.js:
--------------------------------------------------------------------------------
1 | import { h, app } from 'hyperapp';
2 |
3 | import { OptionsGroup } from './example-helpers/Options';
4 | import CodeExample from './example-helpers/CodeExample';
5 | import PatternLockCanvas from './example-helpers/PatternLockCanvas';
6 |
7 | import { component } from './example-helpers/component';
8 |
9 | const App = component({
10 | state: {
11 | gridIndex: 1,
12 | themeIndex: 0,
13 | themeStateIndex: 0,
14 | password: '',
15 | showControls: true,
16 | width: 300,
17 | height: 430,
18 | },
19 | actions: {
20 | setGrid: gridIndex => () => ({ gridIndex }),
21 | setTheme: themeIndex => () => ({ themeIndex }),
22 | setThemeState: themeStateIndex => () => ({ themeStateIndex }),
23 | setPassword: password => () => ({ password }),
24 | setDimensions: dimens => () => {
25 | return dimens;
26 | },
27 | toggleControls: () => ({ showControls }) => ({ showControls: !showControls }),
28 | },
29 | render: ({ grids, themes, themeStates }) => (state, actions) => h('div', {}, [
30 | h('div', { class: 'title' }, 'PatternLockJS'),
31 | h('div', { class: 'subtitle' }, 'Draw unlock pattern to generate a hash'),
32 | h('div', { class: 'canvas-wrapper' },
33 | h(PatternLockCanvas, {
34 | width: state.width,
35 | height: state.height,
36 | onComplete: ({ hash }) => actions.setPassword(hash),
37 | grid: grids[state.gridIndex],
38 | theme: themes[state.themeIndex],
39 | themeState: themeStates[state.themeStateIndex],
40 | }),
41 | ),
42 | h('div', { class: 'password' }, [
43 | 'Generated hash: ',
44 | h('input', { value: state.password })
45 | ]),
46 | h('button', {
47 | onclick: actions.toggleControls,
48 | class: 'button-primary'
49 | }, `${state.showControls ? 'Hide': 'Show'} Controls`),
50 | !state.showControls ? null : h('div', { class: 'controls-wrapper' }, [
51 | h(CodeExample, {
52 | config: {
53 | width: state.width,
54 | height: state.height,
55 | grid: grids[state.gridIndex],
56 | theme: themes[state.themeIndex],
57 | },
58 | }),
59 | h('div', { style: { padding: '1em .3em' } }, [
60 | h(OptionsGroup, {
61 | name: 'Grid',
62 | list: grids,
63 | selected: state.gridIndex,
64 | onItemSelect: index => () => actions.setGrid(index),
65 | }),
66 | h(OptionsGroup, {
67 | name: 'Theme',
68 | list: themes,
69 | selected: state.themeIndex,
70 | onItemSelect: index => () => actions.setTheme(index),
71 | }),
72 | h(OptionsGroup, {
73 | name: 'Theme State',
74 | list: themeStates,
75 | selected: state.themeStateIndex,
76 | onItemSelect: index => () => actions.setThemeState(index),
77 | }),
78 | ]),
79 | ]),
80 | h('div', { style: { padding: '5em' } }),
81 | ]),
82 | });
83 |
84 | document.addEventListener('DOMContentLoaded', () => {
85 | const { state, actions } = App.instance;
86 | const view = h(App, {
87 | grids: [ [2,2], [3,3], [3, 4], [4,4], [4,5] ],
88 | themes: [ 'dark', 'light' ],
89 | themeStates: [ 'default', 'success', 'failure' ],
90 | });
91 |
92 | app(state, actions, view, document.getElementById('root'));
93 | });
94 |
95 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 |
2 | const path = require('path');
3 |
4 | const SOURCE_DIR = path.resolve(__dirname, './src');
5 | const BUILD_DIR = path.resolve(__dirname, './build');
6 |
7 | const _src = p => path.join(SOURCE_DIR, p);
8 | const _example = name => _src(`${name}.example.js`);
9 |
10 | module.exports = {
11 | mode: 'production',
12 | entry: {
13 | example: _example('vanilla'),
14 | },
15 | output: {
16 | filename: 'example.js',
17 | path: BUILD_DIR,
18 | },
19 | module: {
20 | rules: [
21 | {
22 | test: /\.js$/,
23 | exclude: /(node_modules|bower_components)/,
24 | use: { loader: 'babel-loader' }
25 | }
26 | ],
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@esbuild/android-arm64@0.18.13":
6 | version "0.18.13"
7 | resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.13.tgz#70ef455455654c7800c31ae55ae295d81712238c"
8 | integrity sha512-j7NhycJUoUAG5kAzGf4fPWfd17N6SM3o1X6MlXVqfHvs2buFraCJzos9vbeWjLxOyBKHyPOnuCuipbhvbYtTAg==
9 |
10 | "@esbuild/android-arm@0.18.13":
11 | version "0.18.13"
12 | resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.13.tgz#15db83099855fc4193658a40687893ee5c95d7a9"
13 | integrity sha512-KwqFhxRFMKZINHzCqf8eKxE0XqWlAVPRxwy6rc7CbVFxzUWB2sA/s3hbMZeemPdhN3fKBkqOaFhTbS8xJXYIWQ==
14 |
15 | "@esbuild/android-x64@0.18.13":
16 | version "0.18.13"
17 | resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.13.tgz#473d589219e1c06e305cf61ca77b8f69d9b6ffab"
18 | integrity sha512-M2eZkRxR6WnWfVELHmv6MUoHbOqnzoTVSIxgtsyhm/NsgmL+uTmag/VVzdXvmahak1I6sOb1K/2movco5ikDJg==
19 |
20 | "@esbuild/darwin-arm64@0.18.13":
21 | version "0.18.13"
22 | resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.13.tgz#0f525b2c1821a0591a06963582e5dc749ba51d45"
23 | integrity sha512-f5goG30YgR1GU+fxtaBRdSW3SBG9pZW834Mmhxa6terzcboz7P2R0k4lDxlkP7NYRIIdBbWp+VgwQbmMH4yV7w==
24 |
25 | "@esbuild/darwin-x64@0.18.13":
26 | version "0.18.13"
27 | resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.13.tgz#81965b690bae86bf1289b2ce0732506fd41fb545"
28 | integrity sha512-RIrxoKH5Eo+yE5BtaAIMZaiKutPhZjw+j0OCh8WdvKEKJQteacq0myZvBDLU+hOzQOZWJeDnuQ2xgSScKf1Ovw==
29 |
30 | "@esbuild/freebsd-arm64@0.18.13":
31 | version "0.18.13"
32 | resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.13.tgz#895bb37fdea886db09549119158e044f146861f0"
33 | integrity sha512-AfRPhHWmj9jGyLgW/2FkYERKmYR+IjYxf2rtSLmhOrPGFh0KCETFzSjx/JX/HJnvIqHt/DRQD/KAaVsUKoI3Xg==
34 |
35 | "@esbuild/freebsd-x64@0.18.13":
36 | version "0.18.13"
37 | resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.13.tgz#0b1dfde3ff1b18f03f71e460f91dc463e6a23903"
38 | integrity sha512-pGzWWZJBInhIgdEwzn8VHUBang8UvFKsvjDkeJ2oyY5gZtAM6BaxK0QLCuZY+qoj/nx/lIaItH425rm/hloETA==
39 |
40 | "@esbuild/linux-arm64@0.18.13":
41 | version "0.18.13"
42 | resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.13.tgz#350febed5d32d8ec1a424a4c4d7c9ba885604960"
43 | integrity sha512-hCzZbVJEHV7QM77fHPv2qgBcWxgglGFGCxk6KfQx6PsVIdi1u09X7IvgE9QKqm38OpkzaAkPnnPqwRsltvLkIQ==
44 |
45 | "@esbuild/linux-arm@0.18.13":
46 | version "0.18.13"
47 | resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.13.tgz#47639d73d894026350eaccf7c174f1d26b747d6a"
48 | integrity sha512-4iMxLRMCxGyk7lEvkkvrxw4aJeC93YIIrfbBlUJ062kilUUnAiMb81eEkVvCVoh3ON283ans7+OQkuy1uHW+Hw==
49 |
50 | "@esbuild/linux-ia32@0.18.13":
51 | version "0.18.13"
52 | resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.13.tgz#a901a16349c58bf6f873bced36bdf46a5f4dac5d"
53 | integrity sha512-I3OKGbynl3AAIO6onXNrup/ttToE6Rv2XYfFgLK/wnr2J+1g+7k4asLrE+n7VMhaqX+BUnyWkCu27rl+62Adug==
54 |
55 | "@esbuild/linux-loong64@0.18.13":
56 | version "0.18.13"
57 | resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.13.tgz#faa08db402c18e351234719e00aba98867aa34ce"
58 | integrity sha512-8pcKDApAsKc6WW51ZEVidSGwGbebYw2qKnO1VyD8xd6JN0RN6EUXfhXmDk9Vc4/U3Y4AoFTexQewQDJGsBXBpg==
59 |
60 | "@esbuild/linux-mips64el@0.18.13":
61 | version "0.18.13"
62 | resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.13.tgz#2123a54b49ddc1a1dff057bba8a9a5e9f26e5009"
63 | integrity sha512-6GU+J1PLiVqWx8yoCK4Z0GnfKyCGIH5L2KQipxOtbNPBs+qNDcMJr9euxnyJ6FkRPyMwaSkjejzPSISD9hb+gg==
64 |
65 | "@esbuild/linux-ppc64@0.18.13":
66 | version "0.18.13"
67 | resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.13.tgz#9a9befd275a6a3f5baeed89aaafb746df7ba735d"
68 | integrity sha512-pfn/OGZ8tyR8YCV7MlLl5hAit2cmS+j/ZZg9DdH0uxdCoJpV7+5DbuXrR+es4ayRVKIcfS9TTMCs60vqQDmh+w==
69 |
70 | "@esbuild/linux-riscv64@0.18.13":
71 | version "0.18.13"
72 | resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.13.tgz#6644a5b5840fa0c3ffade6f87d943413ece520a8"
73 | integrity sha512-aIbhU3LPg0lOSCfVeGHbmGYIqOtW6+yzO+Nfv57YblEK01oj0mFMtvDJlOaeAZ6z0FZ9D13oahi5aIl9JFphGg==
74 |
75 | "@esbuild/linux-s390x@0.18.13":
76 | version "0.18.13"
77 | resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.13.tgz#c1367a0a02b37f6b0382e71d9c9d97352ca23013"
78 | integrity sha512-Pct1QwF2sp+5LVi4Iu5Y+6JsGaV2Z2vm4O9Dd7XZ5tKYxEHjFtb140fiMcl5HM1iuv6xXO8O1Vrb1iJxHlv8UA==
79 |
80 | "@esbuild/linux-x64@0.18.13":
81 | version "0.18.13"
82 | resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.13.tgz#892674f0918ee3f5e523270cf49a69a557fb64c0"
83 | integrity sha512-zTrIP0KzYP7O0+3ZnmzvUKgGtUvf4+piY8PIO3V8/GfmVd3ZyHJGz7Ht0np3P1wz+I8qJ4rjwJKqqEAbIEPngA==
84 |
85 | "@esbuild/netbsd-x64@0.18.13":
86 | version "0.18.13"
87 | resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.13.tgz#67954292195ecbdae33ab09a9ae6a7f566e49d04"
88 | integrity sha512-I6zs10TZeaHDYoGxENuksxE1sxqZpCp+agYeW039yqFwh3MgVvdmXL5NMveImOC6AtpLvE4xG5ujVic4NWFIDQ==
89 |
90 | "@esbuild/openbsd-x64@0.18.13":
91 | version "0.18.13"
92 | resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.13.tgz#b3eef873dfab547fbe7bcdb3573e1c59dea676b7"
93 | integrity sha512-W5C5nczhrt1y1xPG5bV+0M12p2vetOGlvs43LH8SopQ3z2AseIROu09VgRqydx5qFN7y9qCbpgHLx0kb0TcW7g==
94 |
95 | "@esbuild/sunos-x64@0.18.13":
96 | version "0.18.13"
97 | resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.13.tgz#b368080f42dbb5ae926d0567c02bcd68a34c5efd"
98 | integrity sha512-X/xzuw4Hzpo/yq3YsfBbIsipNgmsm8mE/QeWbdGdTTeZ77fjxI2K0KP3AlhZ6gU3zKTw1bKoZTuKLnqcJ537qw==
99 |
100 | "@esbuild/win32-arm64@0.18.13":
101 | version "0.18.13"
102 | resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.13.tgz#11dedda0e8cfb5f781411ea362b2040304be0fc3"
103 | integrity sha512-4CGYdRQT/ILd+yLLE5i4VApMPfGE0RPc/wFQhlluDQCK09+b4JDbxzzjpgQqTPrdnP7r5KUtGVGZYclYiPuHrw==
104 |
105 | "@esbuild/win32-ia32@0.18.13":
106 | version "0.18.13"
107 | resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.13.tgz#6b8aa95515c05827b7c24c9db9581943566e0dcb"
108 | integrity sha512-D+wKZaRhQI+MUGMH+DbEr4owC2D7XnF+uyGiZk38QbgzLcofFqIOwFs7ELmIeU45CQgfHNy9Q+LKW3cE8g37Kg==
109 |
110 | "@esbuild/win32-x64@0.18.13":
111 | version "0.18.13"
112 | resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.13.tgz#031f69b1f4cf62a18c38d502458c0b8b02625461"
113 | integrity sha512-iVl6lehAfJS+VmpF3exKpNQ8b0eucf5VWfzR8S7xFve64NBNz2jPUgx1X93/kfnkfgP737O+i1k54SVQS7uVZA==
114 |
115 | abbrev@1:
116 | version "1.1.1"
117 | resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
118 |
119 | acorn-jsx@^4.1.1:
120 | version "4.1.1"
121 | resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e"
122 | dependencies:
123 | acorn "^5.0.3"
124 |
125 | acorn@^5.0.3, acorn@^5.6.0:
126 | version "5.7.1"
127 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
128 |
129 | ajv-keywords@^3.0.0:
130 | version "3.2.0"
131 | resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a"
132 |
133 | ajv@^6.0.1, ajv@^6.5.0:
134 | version "6.5.3"
135 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9"
136 | dependencies:
137 | fast-deep-equal "^2.0.1"
138 | fast-json-stable-stringify "^2.0.0"
139 | json-schema-traverse "^0.4.1"
140 | uri-js "^4.2.2"
141 |
142 | ansi-escapes@^3.0.0:
143 | version "3.1.0"
144 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30"
145 |
146 | ansi-regex@^2.0.0:
147 | version "2.1.1"
148 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
149 |
150 | ansi-regex@^3.0.0:
151 | version "3.0.0"
152 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
153 |
154 | ansi-styles@^2.2.1:
155 | version "2.2.1"
156 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
157 |
158 | ansi-styles@^3.2.1:
159 | version "3.2.1"
160 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
161 | dependencies:
162 | color-convert "^1.9.0"
163 |
164 | anymatch@~3.1.2:
165 | version "3.1.3"
166 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
167 | integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
168 | dependencies:
169 | normalize-path "^3.0.0"
170 | picomatch "^2.0.4"
171 |
172 | argparse@^1.0.7:
173 | version "1.0.10"
174 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
175 | dependencies:
176 | sprintf-js "~1.0.2"
177 |
178 | aria-query@^3.0.0:
179 | version "3.0.0"
180 | resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc"
181 | dependencies:
182 | ast-types-flow "0.0.7"
183 | commander "^2.11.0"
184 |
185 | array-includes@^3.0.3:
186 | version "3.0.3"
187 | resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d"
188 | dependencies:
189 | define-properties "^1.1.2"
190 | es-abstract "^1.7.0"
191 |
192 | array-union@^1.0.1:
193 | version "1.0.2"
194 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
195 | dependencies:
196 | array-uniq "^1.0.1"
197 |
198 | array-uniq@^1.0.1:
199 | version "1.0.3"
200 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
201 |
202 | arrify@^1.0.0:
203 | version "1.0.1"
204 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
205 |
206 | ast-types-flow@0.0.7, ast-types-flow@^0.0.7:
207 | version "0.0.7"
208 | resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad"
209 |
210 | axobject-query@^2.0.1:
211 | version "2.0.1"
212 | resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.1.tgz#05dfa705ada8ad9db993fa6896f22d395b0b0a07"
213 | dependencies:
214 | ast-types-flow "0.0.7"
215 |
216 | babel-code-frame@^6.26.0:
217 | version "6.26.0"
218 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
219 | dependencies:
220 | chalk "^1.1.3"
221 | esutils "^2.0.2"
222 | js-tokens "^3.0.2"
223 |
224 | balanced-match@^1.0.0:
225 | version "1.0.0"
226 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
227 |
228 | binary-extensions@^2.0.0:
229 | version "2.2.0"
230 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
231 | integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
232 |
233 | brace-expansion@^1.1.7:
234 | version "1.1.11"
235 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
236 | dependencies:
237 | balanced-match "^1.0.0"
238 | concat-map "0.0.1"
239 |
240 | braces@~3.0.2:
241 | version "3.0.2"
242 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
243 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
244 | dependencies:
245 | fill-range "^7.0.1"
246 |
247 | builtin-modules@^1.0.0:
248 | version "1.1.1"
249 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
250 |
251 | caller-path@^0.1.0:
252 | version "0.1.0"
253 | resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
254 | dependencies:
255 | callsites "^0.2.0"
256 |
257 | callsites@^0.2.0:
258 | version "0.2.0"
259 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
260 |
261 | chalk@^1.1.3:
262 | version "1.1.3"
263 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
264 | dependencies:
265 | ansi-styles "^2.2.1"
266 | escape-string-regexp "^1.0.2"
267 | has-ansi "^2.0.0"
268 | strip-ansi "^3.0.0"
269 | supports-color "^2.0.0"
270 |
271 | chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1:
272 | version "2.4.1"
273 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
274 | dependencies:
275 | ansi-styles "^3.2.1"
276 | escape-string-regexp "^1.0.5"
277 | supports-color "^5.3.0"
278 |
279 | chardet@^0.4.0:
280 | version "0.4.2"
281 | resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
282 |
283 | chokidar@^3.5.2:
284 | version "3.5.3"
285 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
286 | integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
287 | dependencies:
288 | anymatch "~3.1.2"
289 | braces "~3.0.2"
290 | glob-parent "~5.1.2"
291 | is-binary-path "~2.1.0"
292 | is-glob "~4.0.1"
293 | normalize-path "~3.0.0"
294 | readdirp "~3.6.0"
295 | optionalDependencies:
296 | fsevents "~2.3.2"
297 |
298 | circular-json@^0.3.1:
299 | version "0.3.3"
300 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
301 |
302 | cli-cursor@^2.1.0:
303 | version "2.1.0"
304 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
305 | dependencies:
306 | restore-cursor "^2.0.0"
307 |
308 | cli-width@^2.0.0:
309 | version "2.2.0"
310 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
311 |
312 | clipboard@^2.0.1:
313 | version "2.0.1"
314 | resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.1.tgz#a12481e1c13d8a50f5f036b0560fe5d16d74e46a"
315 | dependencies:
316 | good-listener "^1.2.2"
317 | select "^1.1.2"
318 | tiny-emitter "^2.0.0"
319 |
320 | color-convert@^1.9.0:
321 | version "1.9.2"
322 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147"
323 | dependencies:
324 | color-name "1.1.1"
325 |
326 | color-name@1.1.1:
327 | version "1.1.1"
328 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689"
329 |
330 | commander@2.6.0:
331 | version "2.6.0"
332 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d"
333 |
334 | commander@^2.11.0:
335 | version "2.17.1"
336 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
337 |
338 | concat-map@0.0.1:
339 | version "0.0.1"
340 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
341 |
342 | concurrently@^3.6.1:
343 | version "3.6.1"
344 | resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-3.6.1.tgz#2f95baec5c4051294dfbb55b57a3b98a3e2b45ec"
345 | dependencies:
346 | chalk "^2.4.1"
347 | commander "2.6.0"
348 | date-fns "^1.23.0"
349 | lodash "^4.5.1"
350 | read-pkg "^3.0.0"
351 | rx "2.3.24"
352 | spawn-command "^0.0.2-1"
353 | supports-color "^3.2.3"
354 | tree-kill "^1.1.0"
355 |
356 | contains-path@^0.1.0:
357 | version "0.1.0"
358 | resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"
359 |
360 | cross-spawn@^6.0.5:
361 | version "6.0.5"
362 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
363 | dependencies:
364 | nice-try "^1.0.4"
365 | path-key "^2.0.1"
366 | semver "^5.5.0"
367 | shebang-command "^1.2.0"
368 | which "^1.2.9"
369 |
370 | damerau-levenshtein@^1.0.4:
371 | version "1.0.4"
372 | resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514"
373 |
374 | date-fns@^1.23.0:
375 | version "1.29.0"
376 | resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6"
377 |
378 | debug@^2.6.8, debug@^2.6.9:
379 | version "2.6.9"
380 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
381 | dependencies:
382 | ms "2.0.0"
383 |
384 | debug@^3.1.0:
385 | version "3.1.0"
386 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
387 | dependencies:
388 | ms "2.0.0"
389 |
390 | debug@^3.2.7:
391 | version "3.2.7"
392 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
393 | integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
394 | dependencies:
395 | ms "^2.1.1"
396 |
397 | deep-is@~0.1.3:
398 | version "0.1.3"
399 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
400 |
401 | define-properties@^1.1.2:
402 | version "1.1.3"
403 | resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
404 | dependencies:
405 | object-keys "^1.0.12"
406 |
407 | del@^2.0.2:
408 | version "2.2.2"
409 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
410 | dependencies:
411 | globby "^5.0.0"
412 | is-path-cwd "^1.0.0"
413 | is-path-in-cwd "^1.0.0"
414 | object-assign "^4.0.1"
415 | pify "^2.0.0"
416 | pinkie-promise "^2.0.0"
417 | rimraf "^2.2.8"
418 |
419 | delegate@^3.1.2:
420 | version "3.2.0"
421 | resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166"
422 |
423 | doctrine@1.5.0:
424 | version "1.5.0"
425 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
426 | dependencies:
427 | esutils "^2.0.2"
428 | isarray "^1.0.0"
429 |
430 | doctrine@^2.1.0:
431 | version "2.1.0"
432 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
433 | dependencies:
434 | esutils "^2.0.2"
435 |
436 | emoji-regex@^6.5.1:
437 | version "6.5.1"
438 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2"
439 |
440 | error-ex@^1.2.0, error-ex@^1.3.1:
441 | version "1.3.2"
442 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf"
443 | dependencies:
444 | is-arrayish "^0.2.1"
445 |
446 | es-abstract@^1.7.0:
447 | version "1.12.0"
448 | resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165"
449 | dependencies:
450 | es-to-primitive "^1.1.1"
451 | function-bind "^1.1.1"
452 | has "^1.0.1"
453 | is-callable "^1.1.3"
454 | is-regex "^1.0.4"
455 |
456 | es-to-primitive@^1.1.1:
457 | version "1.1.1"
458 | resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
459 | dependencies:
460 | is-callable "^1.1.1"
461 | is-date-object "^1.0.1"
462 | is-symbol "^1.0.1"
463 |
464 | esbuild@^0.18.13:
465 | version "0.18.13"
466 | resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.13.tgz#59160add6c3420947fe008238140ed3480baf817"
467 | integrity sha512-vhg/WR/Oiu4oUIkVhmfcc23G6/zWuEQKFS+yiosSHe4aN6+DQRXIfeloYGibIfVhkr4wyfuVsGNLr+sQU1rWWw==
468 | optionalDependencies:
469 | "@esbuild/android-arm" "0.18.13"
470 | "@esbuild/android-arm64" "0.18.13"
471 | "@esbuild/android-x64" "0.18.13"
472 | "@esbuild/darwin-arm64" "0.18.13"
473 | "@esbuild/darwin-x64" "0.18.13"
474 | "@esbuild/freebsd-arm64" "0.18.13"
475 | "@esbuild/freebsd-x64" "0.18.13"
476 | "@esbuild/linux-arm" "0.18.13"
477 | "@esbuild/linux-arm64" "0.18.13"
478 | "@esbuild/linux-ia32" "0.18.13"
479 | "@esbuild/linux-loong64" "0.18.13"
480 | "@esbuild/linux-mips64el" "0.18.13"
481 | "@esbuild/linux-ppc64" "0.18.13"
482 | "@esbuild/linux-riscv64" "0.18.13"
483 | "@esbuild/linux-s390x" "0.18.13"
484 | "@esbuild/linux-x64" "0.18.13"
485 | "@esbuild/netbsd-x64" "0.18.13"
486 | "@esbuild/openbsd-x64" "0.18.13"
487 | "@esbuild/sunos-x64" "0.18.13"
488 | "@esbuild/win32-arm64" "0.18.13"
489 | "@esbuild/win32-ia32" "0.18.13"
490 | "@esbuild/win32-x64" "0.18.13"
491 |
492 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
493 | version "1.0.5"
494 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
495 |
496 | eslint-config-react-app@^2.1.0:
497 | version "2.1.0"
498 | resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-2.1.0.tgz#23c909f71cbaff76b945b831d2d814b8bde169eb"
499 |
500 | eslint-import-resolver-node@^0.3.1:
501 | version "0.3.2"
502 | resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"
503 | dependencies:
504 | debug "^2.6.9"
505 | resolve "^1.5.0"
506 |
507 | eslint-module-utils@^2.2.0:
508 | version "2.2.0"
509 | resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746"
510 | dependencies:
511 | debug "^2.6.8"
512 | pkg-dir "^1.0.0"
513 |
514 | eslint-plugin-flowtype@^2.50.0:
515 | version "2.50.0"
516 | resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.0.tgz#953e262fa9b5d0fa76e178604892cf60dfb916da"
517 | dependencies:
518 | lodash "^4.17.10"
519 |
520 | eslint-plugin-import@^2.14.0:
521 | version "2.14.0"
522 | resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz#6b17626d2e3e6ad52cfce8807a845d15e22111a8"
523 | dependencies:
524 | contains-path "^0.1.0"
525 | debug "^2.6.8"
526 | doctrine "1.5.0"
527 | eslint-import-resolver-node "^0.3.1"
528 | eslint-module-utils "^2.2.0"
529 | has "^1.0.1"
530 | lodash "^4.17.4"
531 | minimatch "^3.0.3"
532 | read-pkg-up "^2.0.0"
533 | resolve "^1.6.0"
534 |
535 | eslint-plugin-jsx-a11y@^6.1.1:
536 | version "6.1.1"
537 | resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.1.1.tgz#7bf56dbe7d47d811d14dbb3ddff644aa656ce8e1"
538 | dependencies:
539 | aria-query "^3.0.0"
540 | array-includes "^3.0.3"
541 | ast-types-flow "^0.0.7"
542 | axobject-query "^2.0.1"
543 | damerau-levenshtein "^1.0.4"
544 | emoji-regex "^6.5.1"
545 | has "^1.0.3"
546 | jsx-ast-utils "^2.0.1"
547 |
548 | eslint-plugin-react@^7.11.1:
549 | version "7.11.1"
550 | resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c"
551 | dependencies:
552 | array-includes "^3.0.3"
553 | doctrine "^2.1.0"
554 | has "^1.0.3"
555 | jsx-ast-utils "^2.0.1"
556 | prop-types "^15.6.2"
557 |
558 | eslint-scope@^4.0.0:
559 | version "4.0.0"
560 | resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172"
561 | dependencies:
562 | esrecurse "^4.1.0"
563 | estraverse "^4.1.1"
564 |
565 | eslint-utils@^1.3.1:
566 | version "1.3.1"
567 | resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512"
568 |
569 | eslint-visitor-keys@^1.0.0:
570 | version "1.0.0"
571 | resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
572 |
573 | eslint@^5.4.0:
574 | version "5.4.0"
575 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.4.0.tgz#d068ec03006bb9e06b429dc85f7e46c1b69fac62"
576 | dependencies:
577 | ajv "^6.5.0"
578 | babel-code-frame "^6.26.0"
579 | chalk "^2.1.0"
580 | cross-spawn "^6.0.5"
581 | debug "^3.1.0"
582 | doctrine "^2.1.0"
583 | eslint-scope "^4.0.0"
584 | eslint-utils "^1.3.1"
585 | eslint-visitor-keys "^1.0.0"
586 | espree "^4.0.0"
587 | esquery "^1.0.1"
588 | esutils "^2.0.2"
589 | file-entry-cache "^2.0.0"
590 | functional-red-black-tree "^1.0.1"
591 | glob "^7.1.2"
592 | globals "^11.7.0"
593 | ignore "^4.0.2"
594 | imurmurhash "^0.1.4"
595 | inquirer "^5.2.0"
596 | is-resolvable "^1.1.0"
597 | js-yaml "^3.11.0"
598 | json-stable-stringify-without-jsonify "^1.0.1"
599 | levn "^0.3.0"
600 | lodash "^4.17.5"
601 | minimatch "^3.0.4"
602 | mkdirp "^0.5.1"
603 | natural-compare "^1.4.0"
604 | optionator "^0.8.2"
605 | path-is-inside "^1.0.2"
606 | pluralize "^7.0.0"
607 | progress "^2.0.0"
608 | regexpp "^2.0.0"
609 | require-uncached "^1.0.3"
610 | semver "^5.5.0"
611 | strip-ansi "^4.0.0"
612 | strip-json-comments "^2.0.1"
613 | table "^4.0.3"
614 | text-table "^0.2.0"
615 |
616 | espree@^4.0.0:
617 | version "4.0.0"
618 | resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634"
619 | dependencies:
620 | acorn "^5.6.0"
621 | acorn-jsx "^4.1.1"
622 |
623 | esprima@^4.0.0:
624 | version "4.0.1"
625 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
626 |
627 | esquery@^1.0.1:
628 | version "1.0.1"
629 | resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
630 | dependencies:
631 | estraverse "^4.0.0"
632 |
633 | esrecurse@^4.1.0:
634 | version "4.2.1"
635 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
636 | dependencies:
637 | estraverse "^4.1.0"
638 |
639 | estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
640 | version "4.2.0"
641 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
642 |
643 | esutils@^2.0.2:
644 | version "2.0.2"
645 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
646 |
647 | external-editor@^2.1.0:
648 | version "2.2.0"
649 | resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5"
650 | dependencies:
651 | chardet "^0.4.0"
652 | iconv-lite "^0.4.17"
653 | tmp "^0.0.33"
654 |
655 | fast-deep-equal@^2.0.1:
656 | version "2.0.1"
657 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
658 |
659 | fast-json-stable-stringify@^2.0.0:
660 | version "2.0.0"
661 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
662 |
663 | fast-levenshtein@~2.0.4:
664 | version "2.0.6"
665 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
666 |
667 | figures@^2.0.0:
668 | version "2.0.0"
669 | resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
670 | dependencies:
671 | escape-string-regexp "^1.0.5"
672 |
673 | file-entry-cache@^2.0.0:
674 | version "2.0.0"
675 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361"
676 | dependencies:
677 | flat-cache "^1.2.1"
678 | object-assign "^4.0.1"
679 |
680 | fill-range@^7.0.1:
681 | version "7.0.1"
682 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
683 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
684 | dependencies:
685 | to-regex-range "^5.0.1"
686 |
687 | find-up@^1.0.0:
688 | version "1.1.2"
689 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
690 | dependencies:
691 | path-exists "^2.0.0"
692 | pinkie-promise "^2.0.0"
693 |
694 | find-up@^2.0.0:
695 | version "2.1.0"
696 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
697 | dependencies:
698 | locate-path "^2.0.0"
699 |
700 | flat-cache@^1.2.1:
701 | version "1.3.0"
702 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481"
703 | dependencies:
704 | circular-json "^0.3.1"
705 | del "^2.0.2"
706 | graceful-fs "^4.1.2"
707 | write "^0.2.1"
708 |
709 | fs.realpath@^1.0.0:
710 | version "1.0.0"
711 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
712 |
713 | fsevents@~2.3.2:
714 | version "2.3.2"
715 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
716 | integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
717 |
718 | function-bind@^1.1.1:
719 | version "1.1.1"
720 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
721 |
722 | functional-red-black-tree@^1.0.1:
723 | version "1.0.1"
724 | resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
725 |
726 | glob-parent@~5.1.2:
727 | version "5.1.2"
728 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
729 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
730 | dependencies:
731 | is-glob "^4.0.1"
732 |
733 | glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
734 | version "7.1.2"
735 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
736 | dependencies:
737 | fs.realpath "^1.0.0"
738 | inflight "^1.0.4"
739 | inherits "2"
740 | minimatch "^3.0.4"
741 | once "^1.3.0"
742 | path-is-absolute "^1.0.0"
743 |
744 | globals@^11.7.0:
745 | version "11.7.0"
746 | resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673"
747 |
748 | globby@^5.0.0:
749 | version "5.0.0"
750 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
751 | dependencies:
752 | array-union "^1.0.1"
753 | arrify "^1.0.0"
754 | glob "^7.0.3"
755 | object-assign "^4.0.1"
756 | pify "^2.0.0"
757 | pinkie-promise "^2.0.0"
758 |
759 | good-listener@^1.2.2:
760 | version "1.2.2"
761 | resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
762 | dependencies:
763 | delegate "^3.1.2"
764 |
765 | graceful-fs@^4.1.2:
766 | version "4.1.11"
767 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
768 |
769 | has-ansi@^2.0.0:
770 | version "2.0.0"
771 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
772 | dependencies:
773 | ansi-regex "^2.0.0"
774 |
775 | has-flag@^1.0.0:
776 | version "1.0.0"
777 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
778 |
779 | has-flag@^3.0.0:
780 | version "3.0.0"
781 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
782 |
783 | has@^1.0.1, has@^1.0.3:
784 | version "1.0.3"
785 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
786 | dependencies:
787 | function-bind "^1.1.1"
788 |
789 | hosted-git-info@^2.1.4:
790 | version "2.7.1"
791 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
792 |
793 | hyperapp@^1.2.9:
794 | version "1.2.9"
795 | resolved "https://registry.yarnpkg.com/hyperapp/-/hyperapp-1.2.9.tgz#a17ec09634968a5fa5f6b7d649e7a03d9680fcf2"
796 |
797 | iconv-lite@^0.4.17:
798 | version "0.4.23"
799 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
800 | dependencies:
801 | safer-buffer ">= 2.1.2 < 3"
802 |
803 | ignore-by-default@^1.0.1:
804 | version "1.0.1"
805 | resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
806 | integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==
807 |
808 | ignore@^4.0.2:
809 | version "4.0.6"
810 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
811 |
812 | imurmurhash@^0.1.4:
813 | version "0.1.4"
814 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
815 |
816 | inflight@^1.0.4:
817 | version "1.0.6"
818 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
819 | dependencies:
820 | once "^1.3.0"
821 | wrappy "1"
822 |
823 | inherits@2:
824 | version "2.0.3"
825 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
826 |
827 | inquirer@^5.2.0:
828 | version "5.2.0"
829 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726"
830 | dependencies:
831 | ansi-escapes "^3.0.0"
832 | chalk "^2.0.0"
833 | cli-cursor "^2.1.0"
834 | cli-width "^2.0.0"
835 | external-editor "^2.1.0"
836 | figures "^2.0.0"
837 | lodash "^4.3.0"
838 | mute-stream "0.0.7"
839 | run-async "^2.2.0"
840 | rxjs "^5.5.2"
841 | string-width "^2.1.0"
842 | strip-ansi "^4.0.0"
843 | through "^2.3.6"
844 |
845 | is-arrayish@^0.2.1:
846 | version "0.2.1"
847 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
848 |
849 | is-binary-path@~2.1.0:
850 | version "2.1.0"
851 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
852 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
853 | dependencies:
854 | binary-extensions "^2.0.0"
855 |
856 | is-builtin-module@^1.0.0:
857 | version "1.0.0"
858 | resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
859 | dependencies:
860 | builtin-modules "^1.0.0"
861 |
862 | is-callable@^1.1.1, is-callable@^1.1.3:
863 | version "1.1.4"
864 | resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
865 |
866 | is-date-object@^1.0.1:
867 | version "1.0.1"
868 | resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
869 |
870 | is-extglob@^2.1.1:
871 | version "2.1.1"
872 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
873 |
874 | is-fullwidth-code-point@^2.0.0:
875 | version "2.0.0"
876 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
877 |
878 | is-glob@^4.0.1, is-glob@~4.0.1:
879 | version "4.0.3"
880 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
881 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
882 | dependencies:
883 | is-extglob "^2.1.1"
884 |
885 | is-number@^7.0.0:
886 | version "7.0.0"
887 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
888 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
889 |
890 | is-path-cwd@^1.0.0:
891 | version "1.0.0"
892 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
893 |
894 | is-path-in-cwd@^1.0.0:
895 | version "1.0.1"
896 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
897 | dependencies:
898 | is-path-inside "^1.0.0"
899 |
900 | is-path-inside@^1.0.0:
901 | version "1.0.1"
902 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
903 | dependencies:
904 | path-is-inside "^1.0.1"
905 |
906 | is-promise@^2.1.0:
907 | version "2.1.0"
908 | resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
909 |
910 | is-regex@^1.0.4:
911 | version "1.0.4"
912 | resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
913 | dependencies:
914 | has "^1.0.1"
915 |
916 | is-resolvable@^1.1.0:
917 | version "1.1.0"
918 | resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
919 |
920 | is-symbol@^1.0.1:
921 | version "1.0.1"
922 | resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
923 |
924 | isarray@^1.0.0:
925 | version "1.0.0"
926 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
927 |
928 | isexe@^2.0.0:
929 | version "2.0.0"
930 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
931 |
932 | "js-tokens@^3.0.0 || ^4.0.0":
933 | version "4.0.0"
934 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
935 |
936 | js-tokens@^3.0.2:
937 | version "3.0.2"
938 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
939 |
940 | js-yaml@^3.11.0:
941 | version "3.12.0"
942 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
943 | dependencies:
944 | argparse "^1.0.7"
945 | esprima "^4.0.0"
946 |
947 | json-parse-better-errors@^1.0.1:
948 | version "1.0.2"
949 | resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
950 |
951 | json-schema-traverse@^0.4.1:
952 | version "0.4.1"
953 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
954 |
955 | json-stable-stringify-without-jsonify@^1.0.1:
956 | version "1.0.1"
957 | resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
958 |
959 | jsx-ast-utils@^2.0.1:
960 | version "2.0.1"
961 | resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f"
962 | dependencies:
963 | array-includes "^3.0.3"
964 |
965 | levn@^0.3.0, levn@~0.3.0:
966 | version "0.3.0"
967 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
968 | dependencies:
969 | prelude-ls "~1.1.2"
970 | type-check "~0.3.2"
971 |
972 | load-json-file@^2.0.0:
973 | version "2.0.0"
974 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
975 | dependencies:
976 | graceful-fs "^4.1.2"
977 | parse-json "^2.2.0"
978 | pify "^2.0.0"
979 | strip-bom "^3.0.0"
980 |
981 | load-json-file@^4.0.0:
982 | version "4.0.0"
983 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
984 | dependencies:
985 | graceful-fs "^4.1.2"
986 | parse-json "^4.0.0"
987 | pify "^3.0.0"
988 | strip-bom "^3.0.0"
989 |
990 | locate-path@^2.0.0:
991 | version "2.0.0"
992 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
993 | dependencies:
994 | p-locate "^2.0.0"
995 | path-exists "^3.0.0"
996 |
997 | lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.1:
998 | version "4.17.10"
999 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
1000 |
1001 | loose-envify@^1.3.1:
1002 | version "1.4.0"
1003 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
1004 | dependencies:
1005 | js-tokens "^3.0.0 || ^4.0.0"
1006 |
1007 | lru-cache@^6.0.0:
1008 | version "6.0.0"
1009 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
1010 | integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
1011 | dependencies:
1012 | yallist "^4.0.0"
1013 |
1014 | mimic-fn@^1.0.0:
1015 | version "1.2.0"
1016 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
1017 |
1018 | minimatch@^3.0.3, minimatch@^3.0.4:
1019 | version "3.0.4"
1020 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
1021 | dependencies:
1022 | brace-expansion "^1.1.7"
1023 |
1024 | minimatch@^3.1.2:
1025 | version "3.1.2"
1026 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
1027 | integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
1028 | dependencies:
1029 | brace-expansion "^1.1.7"
1030 |
1031 | minimist@0.0.8:
1032 | version "0.0.8"
1033 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
1034 |
1035 | mkdirp@^0.5.1:
1036 | version "0.5.1"
1037 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
1038 | dependencies:
1039 | minimist "0.0.8"
1040 |
1041 | ms@2.0.0:
1042 | version "2.0.0"
1043 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
1044 |
1045 | ms@^2.1.1:
1046 | version "2.1.3"
1047 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
1048 | integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
1049 |
1050 | mute-stream@0.0.7:
1051 | version "0.0.7"
1052 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
1053 |
1054 | natural-compare@^1.4.0:
1055 | version "1.4.0"
1056 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
1057 |
1058 | nice-try@^1.0.4:
1059 | version "1.0.4"
1060 | resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
1061 |
1062 | nodemon@^3.0.1:
1063 | version "3.0.1"
1064 | resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.1.tgz#affe822a2c5f21354466b2fc8ae83277d27dadc7"
1065 | integrity sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==
1066 | dependencies:
1067 | chokidar "^3.5.2"
1068 | debug "^3.2.7"
1069 | ignore-by-default "^1.0.1"
1070 | minimatch "^3.1.2"
1071 | pstree.remy "^1.1.8"
1072 | semver "^7.5.3"
1073 | simple-update-notifier "^2.0.0"
1074 | supports-color "^5.5.0"
1075 | touch "^3.1.0"
1076 | undefsafe "^2.0.5"
1077 |
1078 | nopt@~1.0.10:
1079 | version "1.0.10"
1080 | resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
1081 | integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==
1082 | dependencies:
1083 | abbrev "1"
1084 |
1085 | normalize-package-data@^2.3.2:
1086 | version "2.4.0"
1087 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
1088 | dependencies:
1089 | hosted-git-info "^2.1.4"
1090 | is-builtin-module "^1.0.0"
1091 | semver "2 || 3 || 4 || 5"
1092 | validate-npm-package-license "^3.0.1"
1093 |
1094 | normalize-path@^3.0.0, normalize-path@~3.0.0:
1095 | version "3.0.0"
1096 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
1097 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
1098 |
1099 | object-assign@^4.0.1, object-assign@^4.1.1:
1100 | version "4.1.1"
1101 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
1102 |
1103 | object-keys@^1.0.12:
1104 | version "1.0.12"
1105 | resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2"
1106 |
1107 | once@^1.3.0:
1108 | version "1.4.0"
1109 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
1110 | dependencies:
1111 | wrappy "1"
1112 |
1113 | onetime@^2.0.0:
1114 | version "2.0.1"
1115 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
1116 | dependencies:
1117 | mimic-fn "^1.0.0"
1118 |
1119 | optionator@^0.8.2:
1120 | version "0.8.2"
1121 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
1122 | dependencies:
1123 | deep-is "~0.1.3"
1124 | fast-levenshtein "~2.0.4"
1125 | levn "~0.3.0"
1126 | prelude-ls "~1.1.2"
1127 | type-check "~0.3.2"
1128 | wordwrap "~1.0.0"
1129 |
1130 | os-tmpdir@~1.0.2:
1131 | version "1.0.2"
1132 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
1133 |
1134 | p-limit@^1.1.0:
1135 | version "1.3.0"
1136 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
1137 | dependencies:
1138 | p-try "^1.0.0"
1139 |
1140 | p-locate@^2.0.0:
1141 | version "2.0.0"
1142 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
1143 | dependencies:
1144 | p-limit "^1.1.0"
1145 |
1146 | p-try@^1.0.0:
1147 | version "1.0.0"
1148 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
1149 |
1150 | parse-json@^2.2.0:
1151 | version "2.2.0"
1152 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
1153 | dependencies:
1154 | error-ex "^1.2.0"
1155 |
1156 | parse-json@^4.0.0:
1157 | version "4.0.0"
1158 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0"
1159 | dependencies:
1160 | error-ex "^1.3.1"
1161 | json-parse-better-errors "^1.0.1"
1162 |
1163 | path-exists@^2.0.0:
1164 | version "2.1.0"
1165 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
1166 | dependencies:
1167 | pinkie-promise "^2.0.0"
1168 |
1169 | path-exists@^3.0.0:
1170 | version "3.0.0"
1171 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
1172 |
1173 | path-is-absolute@^1.0.0:
1174 | version "1.0.1"
1175 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
1176 |
1177 | path-is-inside@^1.0.1, path-is-inside@^1.0.2:
1178 | version "1.0.2"
1179 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
1180 |
1181 | path-key@^2.0.1:
1182 | version "2.0.1"
1183 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
1184 |
1185 | path-parse@^1.0.5:
1186 | version "1.0.6"
1187 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
1188 |
1189 | path-type@^2.0.0:
1190 | version "2.0.0"
1191 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
1192 | dependencies:
1193 | pify "^2.0.0"
1194 |
1195 | path-type@^3.0.0:
1196 | version "3.0.0"
1197 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
1198 | dependencies:
1199 | pify "^3.0.0"
1200 |
1201 | picomatch@^2.0.4, picomatch@^2.2.1:
1202 | version "2.3.1"
1203 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
1204 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
1205 |
1206 | pify@^2.0.0:
1207 | version "2.3.0"
1208 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
1209 |
1210 | pify@^3.0.0:
1211 | version "3.0.0"
1212 | resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
1213 |
1214 | pinkie-promise@^2.0.0:
1215 | version "2.0.1"
1216 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
1217 | dependencies:
1218 | pinkie "^2.0.0"
1219 |
1220 | pinkie@^2.0.0:
1221 | version "2.0.4"
1222 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
1223 |
1224 | pkg-dir@^1.0.0:
1225 | version "1.0.0"
1226 | resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
1227 | dependencies:
1228 | find-up "^1.0.0"
1229 |
1230 | pluralize@^7.0.0:
1231 | version "7.0.0"
1232 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
1233 |
1234 | prelude-ls@~1.1.2:
1235 | version "1.1.2"
1236 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
1237 |
1238 | progress@^2.0.0:
1239 | version "2.0.0"
1240 | resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
1241 |
1242 | prop-types@^15.6.2:
1243 | version "15.6.2"
1244 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
1245 | dependencies:
1246 | loose-envify "^1.3.1"
1247 | object-assign "^4.1.1"
1248 |
1249 | pstree.remy@^1.1.8:
1250 | version "1.1.8"
1251 | resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a"
1252 | integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==
1253 |
1254 | punycode@^2.1.0:
1255 | version "2.1.1"
1256 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
1257 |
1258 | read-pkg-up@^2.0.0:
1259 | version "2.0.0"
1260 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be"
1261 | dependencies:
1262 | find-up "^2.0.0"
1263 | read-pkg "^2.0.0"
1264 |
1265 | read-pkg@^2.0.0:
1266 | version "2.0.0"
1267 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8"
1268 | dependencies:
1269 | load-json-file "^2.0.0"
1270 | normalize-package-data "^2.3.2"
1271 | path-type "^2.0.0"
1272 |
1273 | read-pkg@^3.0.0:
1274 | version "3.0.0"
1275 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389"
1276 | dependencies:
1277 | load-json-file "^4.0.0"
1278 | normalize-package-data "^2.3.2"
1279 | path-type "^3.0.0"
1280 |
1281 | readdirp@~3.6.0:
1282 | version "3.6.0"
1283 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
1284 | integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
1285 | dependencies:
1286 | picomatch "^2.2.1"
1287 |
1288 | regexpp@^2.0.0:
1289 | version "2.0.0"
1290 | resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365"
1291 |
1292 | require-uncached@^1.0.3:
1293 | version "1.0.3"
1294 | resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
1295 | dependencies:
1296 | caller-path "^0.1.0"
1297 | resolve-from "^1.0.0"
1298 |
1299 | resolve-from@^1.0.0:
1300 | version "1.0.1"
1301 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
1302 |
1303 | resolve@^1.5.0, resolve@^1.6.0:
1304 | version "1.8.1"
1305 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26"
1306 | dependencies:
1307 | path-parse "^1.0.5"
1308 |
1309 | restore-cursor@^2.0.0:
1310 | version "2.0.0"
1311 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
1312 | dependencies:
1313 | onetime "^2.0.0"
1314 | signal-exit "^3.0.2"
1315 |
1316 | rimraf@^2.2.8:
1317 | version "2.6.2"
1318 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
1319 | dependencies:
1320 | glob "^7.0.5"
1321 |
1322 | run-async@^2.2.0:
1323 | version "2.3.0"
1324 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
1325 | dependencies:
1326 | is-promise "^2.1.0"
1327 |
1328 | rx@2.3.24:
1329 | version "2.3.24"
1330 | resolved "https://registry.yarnpkg.com/rx/-/rx-2.3.24.tgz#14f950a4217d7e35daa71bbcbe58eff68ea4b2b7"
1331 |
1332 | rxjs@^5.5.2:
1333 | version "5.5.11"
1334 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87"
1335 | dependencies:
1336 | symbol-observable "1.0.1"
1337 |
1338 | "safer-buffer@>= 2.1.2 < 3":
1339 | version "2.1.2"
1340 | resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
1341 |
1342 | select@^1.1.2:
1343 | version "1.1.2"
1344 | resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
1345 |
1346 | "semver@2 || 3 || 4 || 5", semver@^5.5.0:
1347 | version "5.5.1"
1348 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
1349 |
1350 | semver@^7.5.3:
1351 | version "7.5.4"
1352 | resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
1353 | integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
1354 | dependencies:
1355 | lru-cache "^6.0.0"
1356 |
1357 | shebang-command@^1.2.0:
1358 | version "1.2.0"
1359 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
1360 | dependencies:
1361 | shebang-regex "^1.0.0"
1362 |
1363 | shebang-regex@^1.0.0:
1364 | version "1.0.0"
1365 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
1366 |
1367 | signal-exit@^3.0.2:
1368 | version "3.0.2"
1369 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
1370 |
1371 | simple-update-notifier@^2.0.0:
1372 | version "2.0.0"
1373 | resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz#d70b92bdab7d6d90dfd73931195a30b6e3d7cebb"
1374 | integrity sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==
1375 | dependencies:
1376 | semver "^7.5.3"
1377 |
1378 | slice-ansi@1.0.0:
1379 | version "1.0.0"
1380 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d"
1381 | dependencies:
1382 | is-fullwidth-code-point "^2.0.0"
1383 |
1384 | spawn-command@^0.0.2-1:
1385 | version "0.0.2-1"
1386 | resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0"
1387 |
1388 | spdx-correct@^3.0.0:
1389 | version "3.0.0"
1390 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"
1391 | dependencies:
1392 | spdx-expression-parse "^3.0.0"
1393 | spdx-license-ids "^3.0.0"
1394 |
1395 | spdx-exceptions@^2.1.0:
1396 | version "2.1.0"
1397 | resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9"
1398 |
1399 | spdx-expression-parse@^3.0.0:
1400 | version "3.0.0"
1401 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0"
1402 | dependencies:
1403 | spdx-exceptions "^2.1.0"
1404 | spdx-license-ids "^3.0.0"
1405 |
1406 | spdx-license-ids@^3.0.0:
1407 | version "3.0.0"
1408 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87"
1409 |
1410 | sprintf-js@~1.0.2:
1411 | version "1.0.3"
1412 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
1413 |
1414 | string-width@^2.1.0, string-width@^2.1.1:
1415 | version "2.1.1"
1416 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
1417 | dependencies:
1418 | is-fullwidth-code-point "^2.0.0"
1419 | strip-ansi "^4.0.0"
1420 |
1421 | strip-ansi@^3.0.0:
1422 | version "3.0.1"
1423 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
1424 | dependencies:
1425 | ansi-regex "^2.0.0"
1426 |
1427 | strip-ansi@^4.0.0:
1428 | version "4.0.0"
1429 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
1430 | dependencies:
1431 | ansi-regex "^3.0.0"
1432 |
1433 | strip-bom@^3.0.0:
1434 | version "3.0.0"
1435 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
1436 |
1437 | strip-json-comments@^2.0.1:
1438 | version "2.0.1"
1439 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
1440 |
1441 | supports-color@^2.0.0:
1442 | version "2.0.0"
1443 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
1444 |
1445 | supports-color@^3.2.3:
1446 | version "3.2.3"
1447 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
1448 | dependencies:
1449 | has-flag "^1.0.0"
1450 |
1451 | supports-color@^5.3.0:
1452 | version "5.4.0"
1453 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
1454 | dependencies:
1455 | has-flag "^3.0.0"
1456 |
1457 | supports-color@^5.5.0:
1458 | version "5.5.0"
1459 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
1460 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
1461 | dependencies:
1462 | has-flag "^3.0.0"
1463 |
1464 | symbol-observable@1.0.1:
1465 | version "1.0.1"
1466 | resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
1467 |
1468 | table@^4.0.3:
1469 | version "4.0.3"
1470 | resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc"
1471 | dependencies:
1472 | ajv "^6.0.1"
1473 | ajv-keywords "^3.0.0"
1474 | chalk "^2.1.0"
1475 | lodash "^4.17.4"
1476 | slice-ansi "1.0.0"
1477 | string-width "^2.1.1"
1478 |
1479 | text-table@^0.2.0:
1480 | version "0.2.0"
1481 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
1482 |
1483 | through@^2.3.6:
1484 | version "2.3.8"
1485 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
1486 |
1487 | tiny-emitter@^2.0.0:
1488 | version "2.0.2"
1489 | resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c"
1490 |
1491 | tmp@^0.0.33:
1492 | version "0.0.33"
1493 | resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
1494 | dependencies:
1495 | os-tmpdir "~1.0.2"
1496 |
1497 | to-regex-range@^5.0.1:
1498 | version "5.0.1"
1499 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
1500 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
1501 | dependencies:
1502 | is-number "^7.0.0"
1503 |
1504 | touch@^3.1.0:
1505 | version "3.1.0"
1506 | resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b"
1507 | integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==
1508 | dependencies:
1509 | nopt "~1.0.10"
1510 |
1511 | tree-kill@^1.1.0:
1512 | version "1.2.0"
1513 | resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36"
1514 |
1515 | type-check@~0.3.2:
1516 | version "0.3.2"
1517 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
1518 | dependencies:
1519 | prelude-ls "~1.1.2"
1520 |
1521 | undefsafe@^2.0.5:
1522 | version "2.0.5"
1523 | resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c"
1524 | integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==
1525 |
1526 | uri-js@^4.2.2:
1527 | version "4.2.2"
1528 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
1529 | dependencies:
1530 | punycode "^2.1.0"
1531 |
1532 | validate-npm-package-license@^3.0.1:
1533 | version "3.0.4"
1534 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
1535 | dependencies:
1536 | spdx-correct "^3.0.0"
1537 | spdx-expression-parse "^3.0.0"
1538 |
1539 | which@^1.2.9:
1540 | version "1.3.1"
1541 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
1542 | dependencies:
1543 | isexe "^2.0.0"
1544 |
1545 | wordwrap@~1.0.0:
1546 | version "1.0.0"
1547 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
1548 |
1549 | wrappy@1:
1550 | version "1.0.2"
1551 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
1552 |
1553 | write@^0.2.1:
1554 | version "0.2.1"
1555 | resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
1556 | dependencies:
1557 | mkdirp "^0.5.1"
1558 |
1559 | yallist@^4.0.0:
1560 | version "4.0.0"
1561 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
1562 | integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
1563 |
--------------------------------------------------------------------------------