magic-utils-yonava 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clone.d.ts +9 -0
- package/dist/clone.js +15 -0
- package/dist/clone.test.d.ts +1 -0
- package/dist/clone.test.js +42 -0
- package/dist/colors.d.ts +522 -0
- package/{src/colors.ts → dist/colors.js} +224 -274
- package/dist/ctx/index.d.ts +10 -0
- package/dist/ctx/index.js +19 -0
- package/dist/debounce.d.ts +9 -0
- package/{src/debounce.ts → dist/debounce.js} +6 -6
- package/dist/debugging.d.ts +2 -0
- package/dist/debugging.js +21 -0
- package/dist/deepDelta/delta.test.d.ts +1 -0
- package/dist/deepDelta/delta.test.js +114 -0
- package/dist/deepDelta/index.d.ts +8 -0
- package/dist/deepDelta/index.js +40 -0
- package/dist/deepMerge.d.ts +16 -0
- package/dist/deepMerge.js +32 -0
- package/dist/deepMerge.test.d.ts +1 -0
- package/dist/deepMerge.test.js +68 -0
- package/dist/fps.d.ts +6 -0
- package/dist/fps.js +51 -0
- package/dist/fracDecConverter/index.d.ts +9 -0
- package/dist/fracDecConverter/index.js +34 -0
- package/dist/hashing.d.ts +2 -0
- package/dist/hashing.js +7 -0
- package/dist/id.d.ts +5 -0
- package/dist/localStorage.d.ts +37 -0
- package/dist/localStorage.js +22 -0
- package/dist/math.d.ts +60 -0
- package/{src/math.ts → dist/math.js} +28 -32
- package/dist/math.test.d.ts +1 -0
- package/dist/math.test.js +42 -0
- package/{src/maybeGetter/index.ts → dist/maybeGetter/index.d.ts} +3 -18
- package/dist/maybeGetter/index.js +15 -0
- package/dist/mouse.d.ts +8 -0
- package/{src/mouse.ts → dist/mouse.js} +4 -4
- package/dist/random.d.ts +19 -0
- package/dist/random.js +21 -0
- package/dist/sets.d.ts +8 -0
- package/{src/sets.ts → dist/sets.js} +2 -2
- package/dist/string.d.ts +21 -0
- package/{src/string.ts → dist/string.js} +11 -11
- package/dist/string.test.d.ts +1 -0
- package/dist/string.test.js +14 -0
- package/{src/types.ts → dist/types.d.ts} +13 -38
- package/dist/types.js +1 -0
- package/package.json +5 -2
- package/src/clone.test.ts +0 -47
- package/src/clone.ts +0 -15
- package/src/ctx/index.ts +0 -20
- package/src/debugging.ts +0 -23
- package/src/deepDelta/delta.test.ts +0 -129
- package/src/deepDelta/index.ts +0 -48
- package/src/deepMerge.test.ts +0 -89
- package/src/deepMerge.ts +0 -37
- package/src/fps.ts +0 -64
- package/src/fracDecConverter/index.ts +0 -36
- package/src/hashing.ts +0 -9
- package/src/localStorage.ts +0 -49
- package/src/math.test.ts +0 -57
- package/src/random.ts +0 -27
- package/src/string.test.ts +0 -17
- package/tsconfig.json +0 -19
- /package/{src/id.ts → dist/id.js} +0 -0
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* alias used for all types that represent a color value
|
|
3
|
-
*/
|
|
4
|
-
export type Color = string;
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* all tailwind gray colors
|
|
8
3
|
*/
|
|
@@ -16,7 +11,6 @@ export const GRAY_600 = '#4b5563';
|
|
|
16
11
|
export const GRAY_700 = '#374151';
|
|
17
12
|
export const GRAY_800 = '#1f2937';
|
|
18
13
|
export const GRAY_900 = '#111827';
|
|
19
|
-
|
|
20
14
|
/**
|
|
21
15
|
* all tailwind red colors
|
|
22
16
|
*/
|
|
@@ -30,7 +24,6 @@ export const RED_600 = '#dc2626';
|
|
|
30
24
|
export const RED_700 = '#b91c1c';
|
|
31
25
|
export const RED_800 = '#991b1b';
|
|
32
26
|
export const RED_900 = '#7f1d1d';
|
|
33
|
-
|
|
34
27
|
/**
|
|
35
28
|
* all tailwind orange colors
|
|
36
29
|
*/
|
|
@@ -44,7 +37,6 @@ export const ORANGE_600 = '#ea580c';
|
|
|
44
37
|
export const ORANGE_700 = '#c2410c';
|
|
45
38
|
export const ORANGE_800 = '#9a3412';
|
|
46
39
|
export const ORANGE_900 = '#7c2d12';
|
|
47
|
-
|
|
48
40
|
/**
|
|
49
41
|
* all tailwind amber colors
|
|
50
42
|
*/
|
|
@@ -58,7 +50,6 @@ export const AMBER_600 = '#d97706';
|
|
|
58
50
|
export const AMBER_700 = '#b45309';
|
|
59
51
|
export const AMBER_800 = '#92400e';
|
|
60
52
|
export const AMBER_900 = '#78350f';
|
|
61
|
-
|
|
62
53
|
/**
|
|
63
54
|
* all tailwind yellow colors
|
|
64
55
|
*/
|
|
@@ -72,7 +63,6 @@ export const YELLOW_600 = '#ca8a04';
|
|
|
72
63
|
export const YELLOW_700 = '#a16207';
|
|
73
64
|
export const YELLOW_800 = '#854d0e';
|
|
74
65
|
export const YELLOW_900 = '#713f12';
|
|
75
|
-
|
|
76
66
|
/**
|
|
77
67
|
* all tailwind lime colors
|
|
78
68
|
*/
|
|
@@ -86,7 +76,6 @@ export const LIME_600 = '#65a30d';
|
|
|
86
76
|
export const LIME_700 = '#4d7c0f';
|
|
87
77
|
export const LIME_800 = '#3f6212';
|
|
88
78
|
export const LIME_900 = '#365314';
|
|
89
|
-
|
|
90
79
|
/**
|
|
91
80
|
* all tailwind green colors
|
|
92
81
|
*/
|
|
@@ -100,7 +89,6 @@ export const GREEN_600 = '#16a34a';
|
|
|
100
89
|
export const GREEN_700 = '#15803d';
|
|
101
90
|
export const GREEN_800 = '#166534';
|
|
102
91
|
export const GREEN_900 = '#14532d';
|
|
103
|
-
|
|
104
92
|
/**
|
|
105
93
|
* all tailwind emerald colors
|
|
106
94
|
*/
|
|
@@ -114,7 +102,6 @@ export const EMERALD_600 = '#059669';
|
|
|
114
102
|
export const EMERALD_700 = '#047857';
|
|
115
103
|
export const EMERALD_800 = '#065f46';
|
|
116
104
|
export const EMERALD_900 = '#064e3b';
|
|
117
|
-
|
|
118
105
|
/**
|
|
119
106
|
* all tailwind teal colors
|
|
120
107
|
*/
|
|
@@ -128,7 +115,6 @@ export const TEAL_600 = '#0d9488';
|
|
|
128
115
|
export const TEAL_700 = '#0f766e';
|
|
129
116
|
export const TEAL_800 = '#115e59';
|
|
130
117
|
export const TEAL_900 = '#134e4a';
|
|
131
|
-
|
|
132
118
|
/**
|
|
133
119
|
* all tailwind cyan colors
|
|
134
120
|
*/
|
|
@@ -142,7 +128,6 @@ export const CYAN_600 = '#0891b2';
|
|
|
142
128
|
export const CYAN_700 = '#0e7490';
|
|
143
129
|
export const CYAN_800 = '#155e75';
|
|
144
130
|
export const CYAN_900 = '#164e63';
|
|
145
|
-
|
|
146
131
|
/**
|
|
147
132
|
* all tailwind sky colors
|
|
148
133
|
*/
|
|
@@ -156,7 +141,6 @@ export const SKY_600 = '#0284c7';
|
|
|
156
141
|
export const SKY_700 = '#0369a1';
|
|
157
142
|
export const SKY_800 = '#075985';
|
|
158
143
|
export const SKY_900 = '#0c4a6e';
|
|
159
|
-
|
|
160
144
|
/**
|
|
161
145
|
* all tailwind blue colors
|
|
162
146
|
*/
|
|
@@ -170,7 +154,6 @@ export const BLUE_600 = '#2563eb';
|
|
|
170
154
|
export const BLUE_700 = '#1d4ed8';
|
|
171
155
|
export const BLUE_800 = '#1e40af';
|
|
172
156
|
export const BLUE_900 = '#1e3a8a';
|
|
173
|
-
|
|
174
157
|
/**
|
|
175
158
|
* all tailwind indigo colors
|
|
176
159
|
*/
|
|
@@ -184,7 +167,6 @@ export const INDIGO_600 = '#4f46e5';
|
|
|
184
167
|
export const INDIGO_700 = '#4338ca';
|
|
185
168
|
export const INDIGO_800 = '#3730a3';
|
|
186
169
|
export const INDIGO_900 = '#312e81';
|
|
187
|
-
|
|
188
170
|
/**
|
|
189
171
|
* all tailwind violet colors,
|
|
190
172
|
*/
|
|
@@ -198,7 +180,6 @@ export const VIOLET_600 = '#7c3aed';
|
|
|
198
180
|
export const VIOLET_700 = '#6d28d9';
|
|
199
181
|
export const VIOLET_800 = '#5b21b6';
|
|
200
182
|
export const VIOLET_900 = '#4c1d95';
|
|
201
|
-
|
|
202
183
|
/**
|
|
203
184
|
* all tailwind purple colors
|
|
204
185
|
*/
|
|
@@ -212,7 +193,6 @@ export const PURPLE_600 = '#9333ea';
|
|
|
212
193
|
export const PURPLE_700 = '#7e22ce';
|
|
213
194
|
export const PURPLE_800 = '#6b21a8';
|
|
214
195
|
export const PURPLE_900 = '#581c87';
|
|
215
|
-
|
|
216
196
|
/**
|
|
217
197
|
* all tailwind fuchsia colors
|
|
218
198
|
*/
|
|
@@ -226,7 +206,6 @@ export const FUCHSIA_600 = '#c026d3';
|
|
|
226
206
|
export const FUCHSIA_700 = '#a21caf';
|
|
227
207
|
export const FUCHSIA_800 = '#86198f';
|
|
228
208
|
export const FUCHSIA_900 = '#701a75';
|
|
229
|
-
|
|
230
209
|
/**
|
|
231
210
|
* all tailwind pink colors
|
|
232
211
|
*/
|
|
@@ -240,7 +219,6 @@ export const PINK_600 = '#db2777';
|
|
|
240
219
|
export const PINK_700 = '#be185d';
|
|
241
220
|
export const PINK_800 = '#9d174d';
|
|
242
221
|
export const PINK_900 = '#831843';
|
|
243
|
-
|
|
244
222
|
/**
|
|
245
223
|
* all tailwind rose colors
|
|
246
224
|
*/
|
|
@@ -254,7 +232,6 @@ export const ROSE_600 = '#e11d48';
|
|
|
254
232
|
export const ROSE_700 = '#be123c';
|
|
255
233
|
export const ROSE_800 = '#9f1239';
|
|
256
234
|
export const ROSE_900 = '#881337';
|
|
257
|
-
|
|
258
235
|
/**
|
|
259
236
|
* all tailwind stone colors
|
|
260
237
|
*/
|
|
@@ -268,7 +245,6 @@ export const STONE_600 = '#374151';
|
|
|
268
245
|
export const STONE_700 = '#252f3f';
|
|
269
246
|
export const STONE_800 = '#161e2e';
|
|
270
247
|
export const STONE_900 = '#0d131e';
|
|
271
|
-
|
|
272
248
|
/**
|
|
273
249
|
* all tailwind neutral colors
|
|
274
250
|
*/
|
|
@@ -282,7 +258,6 @@ export const NEUTRAL_600 = '#4b5563';
|
|
|
282
258
|
export const NEUTRAL_700 = '#374151';
|
|
283
259
|
export const NEUTRAL_800 = '#252f3f';
|
|
284
260
|
export const NEUTRAL_900 = '#161e2e';
|
|
285
|
-
|
|
286
261
|
/**
|
|
287
262
|
* all tailwind zinc colors
|
|
288
263
|
*/
|
|
@@ -296,7 +271,6 @@ export const ZINC_600 = '#4b5563';
|
|
|
296
271
|
export const ZINC_700 = '#374151';
|
|
297
272
|
export const ZINC_800 = '#252f3f';
|
|
298
273
|
export const ZINC_900 = '#161e2e';
|
|
299
|
-
|
|
300
274
|
/**
|
|
301
275
|
* all tailwind slate colors
|
|
302
276
|
*/
|
|
@@ -310,258 +284,234 @@ export const SLATE_600 = '#374151';
|
|
|
310
284
|
export const SLATE_700 = '#252f3f';
|
|
311
285
|
export const SLATE_800 = '#161e2e';
|
|
312
286
|
export const SLATE_900 = '#0d131e';
|
|
313
|
-
|
|
314
287
|
export const WHITE = '#ffffff';
|
|
315
288
|
export const BLACK = '#000000';
|
|
316
289
|
export const TRANSPARENT = '#00000000';
|
|
317
|
-
|
|
318
290
|
/**
|
|
319
291
|
* every color in one enum
|
|
320
292
|
*/
|
|
321
293
|
export default {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
ZINC_50,
|
|
547
|
-
ZINC_100,
|
|
548
|
-
ZINC_200,
|
|
549
|
-
ZINC_300,
|
|
550
|
-
ZINC_400,
|
|
551
|
-
ZINC_500,
|
|
552
|
-
ZINC_600,
|
|
553
|
-
ZINC_700,
|
|
554
|
-
ZINC_800,
|
|
555
|
-
ZINC_900,
|
|
556
|
-
|
|
557
|
-
SLATE_50,
|
|
558
|
-
SLATE_100,
|
|
559
|
-
SLATE_200,
|
|
560
|
-
SLATE_300,
|
|
561
|
-
SLATE_400,
|
|
562
|
-
SLATE_500,
|
|
563
|
-
SLATE_600,
|
|
564
|
-
SLATE_700,
|
|
565
|
-
SLATE_800,
|
|
566
|
-
SLATE_900,
|
|
567
|
-
} as const;
|
|
294
|
+
WHITE,
|
|
295
|
+
BLACK,
|
|
296
|
+
TRANSPARENT,
|
|
297
|
+
GRAY_50,
|
|
298
|
+
GRAY_100,
|
|
299
|
+
GRAY_200,
|
|
300
|
+
GRAY_300,
|
|
301
|
+
GRAY_400,
|
|
302
|
+
GRAY_500,
|
|
303
|
+
GRAY_600,
|
|
304
|
+
GRAY_700,
|
|
305
|
+
GRAY_800,
|
|
306
|
+
GRAY_900,
|
|
307
|
+
RED_50,
|
|
308
|
+
RED_100,
|
|
309
|
+
RED_200,
|
|
310
|
+
RED_300,
|
|
311
|
+
RED_400,
|
|
312
|
+
RED_500,
|
|
313
|
+
RED_600,
|
|
314
|
+
RED_700,
|
|
315
|
+
RED_800,
|
|
316
|
+
RED_900,
|
|
317
|
+
ORANGE_50,
|
|
318
|
+
ORANGE_100,
|
|
319
|
+
ORANGE_200,
|
|
320
|
+
ORANGE_300,
|
|
321
|
+
ORANGE_400,
|
|
322
|
+
ORANGE_500,
|
|
323
|
+
ORANGE_600,
|
|
324
|
+
ORANGE_700,
|
|
325
|
+
ORANGE_800,
|
|
326
|
+
ORANGE_900,
|
|
327
|
+
AMBER_50,
|
|
328
|
+
AMBER_100,
|
|
329
|
+
AMBER_200,
|
|
330
|
+
AMBER_300,
|
|
331
|
+
AMBER_400,
|
|
332
|
+
AMBER_500,
|
|
333
|
+
AMBER_600,
|
|
334
|
+
AMBER_700,
|
|
335
|
+
AMBER_800,
|
|
336
|
+
AMBER_900,
|
|
337
|
+
YELLOW_50,
|
|
338
|
+
YELLOW_100,
|
|
339
|
+
YELLOW_200,
|
|
340
|
+
YELLOW_300,
|
|
341
|
+
YELLOW_400,
|
|
342
|
+
YELLOW_500,
|
|
343
|
+
YELLOW_600,
|
|
344
|
+
YELLOW_700,
|
|
345
|
+
YELLOW_800,
|
|
346
|
+
YELLOW_900,
|
|
347
|
+
LIME_50,
|
|
348
|
+
LIME_100,
|
|
349
|
+
LIME_200,
|
|
350
|
+
LIME_300,
|
|
351
|
+
LIME_400,
|
|
352
|
+
LIME_500,
|
|
353
|
+
LIME_600,
|
|
354
|
+
LIME_700,
|
|
355
|
+
LIME_800,
|
|
356
|
+
LIME_900,
|
|
357
|
+
GREEN_50,
|
|
358
|
+
GREEN_100,
|
|
359
|
+
GREEN_200,
|
|
360
|
+
GREEN_300,
|
|
361
|
+
GREEN_400,
|
|
362
|
+
GREEN_500,
|
|
363
|
+
GREEN_600,
|
|
364
|
+
GREEN_700,
|
|
365
|
+
GREEN_800,
|
|
366
|
+
GREEN_900,
|
|
367
|
+
EMERALD_50,
|
|
368
|
+
EMERALD_100,
|
|
369
|
+
EMERALD_200,
|
|
370
|
+
EMERALD_300,
|
|
371
|
+
EMERALD_400,
|
|
372
|
+
EMERALD_500,
|
|
373
|
+
EMERALD_600,
|
|
374
|
+
EMERALD_700,
|
|
375
|
+
EMERALD_800,
|
|
376
|
+
EMERALD_900,
|
|
377
|
+
TEAL_50,
|
|
378
|
+
TEAL_100,
|
|
379
|
+
TEAL_200,
|
|
380
|
+
TEAL_300,
|
|
381
|
+
TEAL_400,
|
|
382
|
+
TEAL_500,
|
|
383
|
+
TEAL_600,
|
|
384
|
+
TEAL_700,
|
|
385
|
+
TEAL_800,
|
|
386
|
+
TEAL_900,
|
|
387
|
+
CYAN_50,
|
|
388
|
+
CYAN_100,
|
|
389
|
+
CYAN_200,
|
|
390
|
+
CYAN_300,
|
|
391
|
+
CYAN_400,
|
|
392
|
+
CYAN_500,
|
|
393
|
+
CYAN_600,
|
|
394
|
+
CYAN_700,
|
|
395
|
+
CYAN_800,
|
|
396
|
+
CYAN_900,
|
|
397
|
+
SKY_50,
|
|
398
|
+
SKY_100,
|
|
399
|
+
SKY_200,
|
|
400
|
+
SKY_300,
|
|
401
|
+
SKY_400,
|
|
402
|
+
SKY_500,
|
|
403
|
+
SKY_600,
|
|
404
|
+
SKY_700,
|
|
405
|
+
SKY_800,
|
|
406
|
+
SKY_900,
|
|
407
|
+
BLUE_50,
|
|
408
|
+
BLUE_100,
|
|
409
|
+
BLUE_200,
|
|
410
|
+
BLUE_300,
|
|
411
|
+
BLUE_400,
|
|
412
|
+
BLUE_500,
|
|
413
|
+
BLUE_600,
|
|
414
|
+
BLUE_700,
|
|
415
|
+
BLUE_800,
|
|
416
|
+
BLUE_900,
|
|
417
|
+
INDIGO_50,
|
|
418
|
+
INDIGO_100,
|
|
419
|
+
INDIGO_200,
|
|
420
|
+
INDIGO_300,
|
|
421
|
+
INDIGO_400,
|
|
422
|
+
INDIGO_500,
|
|
423
|
+
INDIGO_600,
|
|
424
|
+
INDIGO_700,
|
|
425
|
+
INDIGO_800,
|
|
426
|
+
INDIGO_900,
|
|
427
|
+
VIOLET_50,
|
|
428
|
+
VIOLET_100,
|
|
429
|
+
VIOLET_200,
|
|
430
|
+
VIOLET_300,
|
|
431
|
+
VIOLET_400,
|
|
432
|
+
VIOLET_500,
|
|
433
|
+
VIOLET_600,
|
|
434
|
+
VIOLET_700,
|
|
435
|
+
VIOLET_800,
|
|
436
|
+
VIOLET_900,
|
|
437
|
+
PURPLE_50,
|
|
438
|
+
PURPLE_100,
|
|
439
|
+
PURPLE_200,
|
|
440
|
+
PURPLE_300,
|
|
441
|
+
PURPLE_400,
|
|
442
|
+
PURPLE_500,
|
|
443
|
+
PURPLE_600,
|
|
444
|
+
PURPLE_700,
|
|
445
|
+
PURPLE_800,
|
|
446
|
+
PURPLE_900,
|
|
447
|
+
FUCHSIA_50,
|
|
448
|
+
FUCHSIA_100,
|
|
449
|
+
FUCHSIA_200,
|
|
450
|
+
FUCHSIA_300,
|
|
451
|
+
FUCHSIA_400,
|
|
452
|
+
FUCHSIA_500,
|
|
453
|
+
FUCHSIA_600,
|
|
454
|
+
FUCHSIA_700,
|
|
455
|
+
FUCHSIA_800,
|
|
456
|
+
FUCHSIA_900,
|
|
457
|
+
PINK_50,
|
|
458
|
+
PINK_100,
|
|
459
|
+
PINK_200,
|
|
460
|
+
PINK_300,
|
|
461
|
+
PINK_400,
|
|
462
|
+
PINK_500,
|
|
463
|
+
PINK_600,
|
|
464
|
+
PINK_700,
|
|
465
|
+
PINK_800,
|
|
466
|
+
PINK_900,
|
|
467
|
+
ROSE_50,
|
|
468
|
+
ROSE_100,
|
|
469
|
+
ROSE_200,
|
|
470
|
+
ROSE_300,
|
|
471
|
+
ROSE_400,
|
|
472
|
+
ROSE_500,
|
|
473
|
+
ROSE_600,
|
|
474
|
+
ROSE_700,
|
|
475
|
+
ROSE_800,
|
|
476
|
+
ROSE_900,
|
|
477
|
+
STONE_50,
|
|
478
|
+
STONE_100,
|
|
479
|
+
STONE_200,
|
|
480
|
+
STONE_300,
|
|
481
|
+
STONE_400,
|
|
482
|
+
STONE_500,
|
|
483
|
+
STONE_600,
|
|
484
|
+
STONE_700,
|
|
485
|
+
STONE_800,
|
|
486
|
+
STONE_900,
|
|
487
|
+
NEUTRAL_50,
|
|
488
|
+
NEUTRAL_100,
|
|
489
|
+
NEUTRAL_200,
|
|
490
|
+
NEUTRAL_300,
|
|
491
|
+
NEUTRAL_400,
|
|
492
|
+
NEUTRAL_500,
|
|
493
|
+
NEUTRAL_600,
|
|
494
|
+
NEUTRAL_700,
|
|
495
|
+
NEUTRAL_800,
|
|
496
|
+
NEUTRAL_900,
|
|
497
|
+
ZINC_50,
|
|
498
|
+
ZINC_100,
|
|
499
|
+
ZINC_200,
|
|
500
|
+
ZINC_300,
|
|
501
|
+
ZINC_400,
|
|
502
|
+
ZINC_500,
|
|
503
|
+
ZINC_600,
|
|
504
|
+
ZINC_700,
|
|
505
|
+
ZINC_800,
|
|
506
|
+
ZINC_900,
|
|
507
|
+
SLATE_50,
|
|
508
|
+
SLATE_100,
|
|
509
|
+
SLATE_200,
|
|
510
|
+
SLATE_300,
|
|
511
|
+
SLATE_400,
|
|
512
|
+
SLATE_500,
|
|
513
|
+
SLATE_600,
|
|
514
|
+
SLATE_700,
|
|
515
|
+
SLATE_800,
|
|
516
|
+
SLATE_900,
|
|
517
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MaybeRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* pulls ctx from a canvas or canvas ref (vue.js), throws if not found
|
|
4
|
+
*
|
|
5
|
+
* @returns {CanvasRenderingContext2D}
|
|
6
|
+
* @example const ctx = getCtx(canvasRef);
|
|
7
|
+
* // ctx is defined and ready to use
|
|
8
|
+
* @throws {Error} if canvas or 2d context not found
|
|
9
|
+
*/
|
|
10
|
+
export declare const getCtx: (canvasInput: MaybeRef<HTMLCanvasElement | null | undefined>) => CanvasRenderingContext2D;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pulls ctx from a canvas or canvas ref (vue.js), throws if not found
|
|
3
|
+
*
|
|
4
|
+
* @returns {CanvasRenderingContext2D}
|
|
5
|
+
* @example const ctx = getCtx(canvasRef);
|
|
6
|
+
* // ctx is defined and ready to use
|
|
7
|
+
* @throws {Error} if canvas or 2d context not found
|
|
8
|
+
*/
|
|
9
|
+
export const getCtx = (canvasInput) => {
|
|
10
|
+
if (!canvasInput)
|
|
11
|
+
throw new Error('canvas not found');
|
|
12
|
+
const canvas = 'value' in canvasInput ? canvasInput.value : canvasInput;
|
|
13
|
+
if (!canvas)
|
|
14
|
+
throw new Error('canvas not found');
|
|
15
|
+
const ctx = canvas.getContext('2d');
|
|
16
|
+
if (!ctx)
|
|
17
|
+
throw new Error('2d context not found');
|
|
18
|
+
return ctx;
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* a function that will only be called after a certain amount
|
|
3
|
+
* of time has passed since the last time it was called
|
|
4
|
+
*
|
|
5
|
+
* @param fn target function
|
|
6
|
+
* @param ms time in milliseconds
|
|
7
|
+
* @returns a debounced function
|
|
8
|
+
*/
|
|
9
|
+
export declare const debounce: <T extends () => void>(fn: T, ms: number) => () => void;
|