tiny-essentials 1.19.3 → 1.20.1

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.
Files changed (57) hide show
  1. package/dist/v1/TinyBasicsEs.min.js +1 -1
  2. package/dist/v1/TinyDragger.min.js +1 -1
  3. package/dist/v1/TinyEssentials.min.js +1 -1
  4. package/dist/v1/TinyHtml.min.js +1 -1
  5. package/dist/v1/TinyIframeEvents.min.js +1 -0
  6. package/dist/v1/TinyNewWinEvents.min.js +1 -0
  7. package/dist/v1/TinySmartScroller.min.js +1 -1
  8. package/dist/v1/TinyUploadClicker.min.js +1 -1
  9. package/dist/v1/build/TinyIframeEvents.cjs +7 -0
  10. package/dist/v1/build/TinyIframeEvents.d.mts +3 -0
  11. package/dist/v1/build/TinyIframeEvents.mjs +2 -0
  12. package/dist/v1/build/TinyNewWinEvents.cjs +7 -0
  13. package/dist/v1/build/TinyNewWinEvents.d.mts +3 -0
  14. package/dist/v1/build/TinyNewWinEvents.mjs +2 -0
  15. package/dist/v1/index.cjs +4 -0
  16. package/dist/v1/index.d.mts +3 -1
  17. package/dist/v1/index.mjs +3 -1
  18. package/dist/v1/libs/TinyDragger.cjs +1 -1
  19. package/dist/v1/libs/TinyDragger.mjs +1 -1
  20. package/dist/v1/libs/TinyHtml.cjs +292 -103
  21. package/dist/v1/libs/TinyHtml.d.mts +142 -39
  22. package/dist/v1/libs/TinyHtml.mjs +266 -94
  23. package/dist/v1/libs/TinyIframeEvents.cjs +410 -0
  24. package/dist/v1/libs/TinyIframeEvents.d.mts +193 -0
  25. package/dist/v1/libs/TinyIframeEvents.mjs +348 -0
  26. package/dist/v1/libs/TinyNewWinEvents.cjs +488 -0
  27. package/dist/v1/libs/TinyNewWinEvents.d.mts +241 -0
  28. package/dist/v1/libs/TinyNewWinEvents.mjs +437 -0
  29. package/docs/v1/README.md +2 -0
  30. package/docs/v1/libs/TinyHtml.md +128 -6
  31. package/docs/v1/libs/TinyIframeEvents.md +149 -0
  32. package/docs/v1/libs/TinyNewWinEvents.md +186 -0
  33. package/docs/v1/libs/TinyNotifyCenter.md +1 -1
  34. package/package.json +1 -1
  35. package/dist/v1/ColorSafeStringify.js +0 -235
  36. package/dist/v1/TinyAfterScrollWatcher.js +0 -219
  37. package/dist/v1/TinyBasicsEs.js +0 -9334
  38. package/dist/v1/TinyClipboard.js +0 -459
  39. package/dist/v1/TinyColorConverter.js +0 -617
  40. package/dist/v1/TinyDomReadyManager.js +0 -213
  41. package/dist/v1/TinyDragDropDetector.js +0 -307
  42. package/dist/v1/TinyDragger.js +0 -6569
  43. package/dist/v1/TinyEssentials.js +0 -19893
  44. package/dist/v1/TinyEvents.js +0 -402
  45. package/dist/v1/TinyHtml.js +0 -5545
  46. package/dist/v1/TinyLevelUp.js +0 -291
  47. package/dist/v1/TinyLocalStorage.js +0 -1440
  48. package/dist/v1/TinyNotifications.js +0 -408
  49. package/dist/v1/TinyNotifyCenter.js +0 -493
  50. package/dist/v1/TinyPromiseQueue.js +0 -299
  51. package/dist/v1/TinyRateLimiter.js +0 -611
  52. package/dist/v1/TinySmartScroller.js +0 -7039
  53. package/dist/v1/TinyTextRangeEditor.js +0 -497
  54. package/dist/v1/TinyTimeout.js +0 -233
  55. package/dist/v1/TinyToastNotify.js +0 -441
  56. package/dist/v1/TinyUploadClicker.js +0 -13456
  57. package/dist/v1/UltraRandomMsgGen.js +0 -995
@@ -1,617 +0,0 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/define property getters */
8
- /******/ (() => {
9
- /******/ // define getter functions for harmony exports
10
- /******/ __webpack_require__.d = (exports, definition) => {
11
- /******/ for(var key in definition) {
12
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
14
- /******/ }
15
- /******/ }
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
20
- /******/ (() => {
21
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
22
- /******/ })();
23
- /******/
24
- /************************************************************************/
25
- var __webpack_exports__ = {};
26
-
27
- // EXPORTS
28
- __webpack_require__.d(__webpack_exports__, {
29
- TinyColorConverter: () => (/* reexport */ libs_TinyColorConverter)
30
- });
31
-
32
- ;// ./src/v1/libs/TinyColorConverter.mjs
33
- /**
34
- * Represents a color in RGBA format.
35
- * Each element must be a number between 0 and 255.
36
- * The fourth value represents the alpha (transparency) channel.
37
- *
38
- * @typedef {number[]} RgbaColor
39
- * @property {number} 0 - Red component (0–255)
40
- * @property {number} 1 - Green component (0–255)
41
- * @property {number} 2 - Blue component (0–255)
42
- * @property {number} 3 - Alpha component (0–255)
43
- */
44
-
45
- /**
46
- * Represents a color in RGB format.
47
- * Each element must be a number between 0 and 255.
48
- *
49
- * @typedef {number[]} RgbColor
50
- * @property {number} 0 - Red component (0–255)
51
- * @property {number} 1 - Green component (0–255)
52
- * @property {number} 2 - Blue component (0–255)
53
- */
54
-
55
- /**
56
- * Represents a color in HSLA format.
57
- * The fourth value represents the alpha (transparency) channel.
58
- *
59
- * @typedef {number[]} HslaColor
60
- * @property {number} 0 - Hue (0–360)
61
- * @property {number} 1 - Saturation (0–100)
62
- * @property {number} 2 - Lightness (0–100)
63
- * @property {number} 3 - Alpha component (0–255)
64
- */
65
-
66
- /**
67
- * Represents a color in HSL format.
68
- *
69
- * @typedef {number[]} HslColor
70
- * @property {number} 0 - Hue (0–360)
71
- * @property {number} 1 - Saturation (0–100)
72
- * @property {number} 2 - Lightness (0–100)
73
- */
74
-
75
- /**
76
- * Represents a hex color.
77
- *
78
- * @typedef {string} HexColor
79
- */
80
-
81
- /**
82
- * A union type representing various accepted color formats.
83
- * Can be a hex color string, a numeric value, or an array-based RGB/RGBA representation.
84
- *
85
- * @typedef {HexColor | number | RgbColor | RgbaColor} ColorTypes
86
- */
87
-
88
- /**
89
- * @typedef {Object} RgbaResult
90
- * @property {number} r - Red component (0–255)
91
- * @property {number} g - Green component (0–255)
92
- * @property {number} b - Blue component (0–255)
93
- * @property {number} a - Alpha component (0–255)
94
- */
95
-
96
- /**
97
- * @typedef {Object} RgbResult
98
- * @property {number} r - Red component (0–255)
99
- * @property {number} g - Green component (0–255)
100
- * @property {number} b - Blue component (0–255)
101
- */
102
-
103
- /**
104
- * @typedef {Object} HexResult
105
- * @property {string} hex - Hex color
106
- */
107
-
108
- /**
109
- * @typedef {Object} HslResult
110
- * @property {number} h - Hue (0–360)
111
- * @property {number} s - Saturation (0–100)
112
- * @property {number} l - Lightness (0–100)
113
- */
114
-
115
- /**
116
- * A class that allows converting colors between all common formats.
117
- */
118
- class TinyColorConverter {
119
- /**
120
- * Generates a smooth gradient of colors based on sine wave patterns.
121
- *
122
- * @see {@link https://www.npmjs.com/package/rainbow-colors-array} Code Reference
123
- * @param {number} [len=24] - The number of colors to generate.
124
- * @param {'rgb'|'hex'|'hsl'} [type='rgb'] - The format of the colors returned: `'rgb'`, `'hex'`, or `'hsl'`.
125
- * @param {boolean} [pastel=false] - If true, generates pastel tones by adjusting the intensity and offset.
126
- * @returns {Array<RgbResult|HexResult|HslResult>} An array of color values in the selected format:
127
- */
128
- static _rca(len, type, pastel) {
129
- let eq1 = 127;
130
- let eq2 = 128;
131
- if (len === undefined) {
132
- len = 24;
133
- }
134
- if (type === undefined) {
135
- type = 'rgb';
136
- }
137
- if (pastel === true) {
138
- eq1 = 55;
139
- eq2 = 200;
140
- }
141
- const frequency = (Math.PI * 2) / len;
142
-
143
- const cvparr = [];
144
- for (let i = 0; i < len; ++i) {
145
- const red = Math.sin(frequency * i + 2) * eq1 + eq2;
146
- const green = Math.sin(frequency * i + 0) * eq1 + eq2;
147
- const blue = Math.sin(frequency * i + 4) * eq1 + eq2;
148
-
149
- switch (type) {
150
- case 'hex':
151
- cvparr.push({ hex: this.rgbToHex(Math.round(red), Math.round(green), Math.round(blue)) });
152
- break;
153
- case 'rgb':
154
- cvparr.push({ r: red, g: green, b: blue });
155
- break;
156
- case 'hsl':
157
- const [h, s, l] = this.rgbaToHsl(Math.round(red), Math.round(green), Math.round(blue));
158
- cvparr.push({ h, s, l });
159
- break;
160
- }
161
- }
162
-
163
- return cvparr;
164
- }
165
-
166
- /**
167
- * Generates a smooth gradient of colors based on sine wave patterns.
168
- *
169
- * @param {number} [len=24] - The number of colors to generate.
170
- * @param {boolean} [pastel=false] - If true, generates pastel tones by adjusting the intensity and offset.
171
- * @returns {RgbResult[]} An array of rgb color values.
172
- */
173
- static rcaRgb(len, pastel) {
174
- return /** @type {RgbResult[]} */ (TinyColorConverter._rca(len, 'rgb', pastel));
175
- }
176
-
177
- /**
178
- * Generates a smooth gradient of colors based on sine wave patterns.
179
- *
180
- * @param {number} [len=24] - The number of colors to generate.
181
- * @param {boolean} [pastel=false] - If true, generates pastel tones by adjusting the intensity and offset.
182
- * @returns {HslResult[]} An array of hsl color values.
183
- */
184
- static rcaHsl(len, pastel) {
185
- return /** @type {HslResult[]} */ (TinyColorConverter._rca(len, 'hsl', pastel));
186
- }
187
-
188
- /**
189
- * Generates a smooth gradient of colors based on sine wave patterns.
190
- *
191
- * @param {number} [len=24] - The number of colors to generate.
192
- * @param {boolean} [pastel=false] - If true, generates pastel tones by adjusting the intensity and offset.
193
- * @returns {HexResult[]} An array of hex color values.
194
- */
195
- static rcaHex(len, pastel) {
196
- return /** @type {HexResult[]} */ (TinyColorConverter._rca(len, 'hex', pastel));
197
- }
198
-
199
- /**
200
- * Generates a random color in hexadecimal format.
201
- *
202
- * @returns {HexColor} A hex color string (e.g. `#a3e5f2`).
203
- */
204
- static randomColor() {
205
- const hex = Math.floor(Math.random() * 0x1000000).toString(16);
206
- return `#${hex.padStart(6, '0')}`;
207
- }
208
-
209
- /**
210
- * Parses input into RGBA array.
211
- * @param {ColorTypes} input
212
- * @param {boolean} isHsl
213
- * @returns {RgbaColor}
214
- */
215
- static parseInput(input, isHsl) {
216
- if (typeof input === 'string') {
217
- input = input.trim().toLowerCase();
218
- if (input.startsWith('#')) return this.hexToRgba(input);
219
- if (input.startsWith('rgb')) return this.rgbStringToRgbaArray(input);
220
- if (input.startsWith('hsl')) return this.hslStringToRgbaArray(input);
221
- }
222
- if (typeof input === 'number') return this.intToRgba(input);
223
- if (
224
- Array.isArray(input) &&
225
- (input.length === 3 || input.length === 4) &&
226
- input.every((item) => typeof item === 'number')
227
- ) {
228
- if (isHsl) {
229
- const [h, s, l, a2] = input;
230
- if (h <= 360 && s <= 100 && l <= 100) return this.hslToRgba(h, s, l, a2);
231
- }
232
- return [...input, 1].slice(0, 4);
233
- }
234
-
235
- throw new Error('Unsupported color format.');
236
- }
237
-
238
- // HSL Color
239
-
240
- /**
241
- * Converts hsl to integer.
242
- * @param {number} h - Hue (0–360)
243
- * @param {number} s - Saturation (0–100)
244
- * @param {number} l - Lightness (0–100)
245
- * @returns {number}
246
- */
247
- static hslToInt(h, s, l) {
248
- const [r, g, b] = TinyColorConverter.hslToRgba(h, s, l);
249
- return TinyColorConverter.rgbToInt(r, g, b);
250
- }
251
-
252
- /**
253
- * Converts hsl to hex.
254
- * @param {number} h - Hue (0–360)
255
- * @param {number} s - Saturation (0–100)
256
- * @param {number} l - Lightness (0–100)
257
- * @returns {HexColor}
258
- */
259
- static hslToHex(h, s, l) {
260
- const [r, g, b] = TinyColorConverter.hslToRgba(h, s, l);
261
- return TinyColorConverter.rgbToHex(r, g, b);
262
- }
263
-
264
- /**
265
- * Converts hsl(a) string to RGBA array.
266
- * @param {string} hsl
267
- * @returns {RgbaColor}
268
- */
269
- static hslStringToRgbaArray(hsl) {
270
- const match = hsl.match(/[\d.]+/g)?.map(Number);
271
- if (!match || match.length < 3) return [0, 0, 0, 1];
272
- const [h, s, l, a = 1] = match;
273
- return this.hslToRgba(h, s, l, a);
274
- }
275
-
276
- /**
277
- * Converts HSL or HSLA to RGBA.
278
- * @param {number} h - Hue (0–360)
279
- * @param {number} s - Saturation (0–100)
280
- * @param {number} l - Lightness (0–100)
281
- * @param {number} [a=1] - Alpha (0–1)
282
- * @returns {RgbaColor}
283
- */
284
- static hslToRgba(h, s, l, a = 1) {
285
- s /= 100;
286
- l /= 100;
287
- /** @type {(n: number) => number} */
288
- const k = (n) => (n + h / 30) % 12;
289
- const a_ = s * Math.min(l, 1 - l);
290
- /** @type {(n: number) => number} */
291
- const f = (n) => l - a_ * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
292
- return [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255), a];
293
- }
294
-
295
- /**
296
- * Converts HSL or HSLA to RGB.
297
- * @param {number} h - Hue (0–360)
298
- * @param {number} s - Saturation (0–100)
299
- * @param {number} l - Lightness (0–100)
300
- * @param {number} [a=1] - Alpha (0–1)
301
- * @returns {RgbColor}
302
- */
303
- static hslToRgb(h, s, l, a = 1) {
304
- return TinyColorConverter.hslToRgba(h, s, l, a).slice(0, 3);
305
- }
306
-
307
- // Hex Color
308
-
309
- /**
310
- * Converts hex to integer.
311
- * @param {HexColor} hex
312
- * @returns {number}
313
- */
314
- static hexToInt(hex) {
315
- return parseInt(hex.replace(/^#/, ''), 16);
316
- }
317
-
318
- /**
319
- * Converts hex string to HSL array.
320
- * @param {HexColor} hex
321
- * @returns {HslColor}
322
- */
323
- static hexToHsl(hex) {
324
- const [r, g, b, a] = TinyColorConverter.hexToRgba(hex);
325
- return TinyColorConverter.rgbaToHsl(r, g, b, a);
326
- }
327
-
328
- /**
329
- * Converts hex string to HSL array.
330
- * @param {HexColor} hex
331
- * @returns {HslaColor}
332
- */
333
- static hexToHsla(hex) {
334
- const [r, g, b, a] = TinyColorConverter.hexToRgba(hex);
335
- return TinyColorConverter.rgbaToHsla(r, g, b, a);
336
- }
337
-
338
- /**
339
- * Converts hex string to RGBA array.
340
- * @param {HexColor} hex
341
- * @returns {RgbaColor}
342
- */
343
- static hexToRgba(hex) {
344
- hex = hex.replace(/^#/, '');
345
- if (hex.length === 3)
346
- hex = hex
347
- .split('')
348
- .map((c) => c + c)
349
- .join('');
350
- const intVal = parseInt(hex, 16);
351
- const r = (intVal >> 16) & 255;
352
- const g = (intVal >> 8) & 255;
353
- const b = intVal & 255;
354
- return [r, g, b, 1];
355
- }
356
-
357
- /**
358
- * Converts HEX to RGB.
359
- * @param {HexColor} hex
360
- * @returns {RgbColor}
361
- */
362
- static hexToRgb(hex) {
363
- return this.hexToRgba(hex).slice(0, 3);
364
- }
365
-
366
- // RGBA Color
367
-
368
- /**
369
- * Converts RGB to HEX.
370
- * @param {number} r
371
- * @param {number} g
372
- * @param {number} b
373
- * @returns {HexColor}
374
- */
375
- static rgbToHex(r, g, b) {
376
- return '#' + [r, g, b].map((v) => v.toString(16).padStart(2, '0')).join('');
377
- }
378
-
379
- /**
380
- * Converts RGB to integer.
381
- * @param {number} r
382
- * @param {number} g
383
- * @param {number} b
384
- * @returns {number}
385
- */
386
- static rgbToInt(r, g, b) {
387
- return (r << 16) | (g << 8) | b;
388
- }
389
-
390
- /**
391
- * Converts RGBA to HSLA.
392
- * @param {number} r
393
- * @param {number} g
394
- * @param {number} b
395
- * @param {number} [a=1]
396
- * @returns {HslaColor}
397
- */
398
- static rgbaToHsla(r, g, b, a = 1) {
399
- r /= 255;
400
- g /= 255;
401
- b /= 255;
402
- const max = Math.max(r, g, b);
403
- const min = Math.min(r, g, b);
404
- let h = 0,
405
- s = 0,
406
- l = (max + min) / 2;
407
- const d = max - min;
408
-
409
- if (d !== 0) {
410
- s = d / (1 - Math.abs(2 * l - 1));
411
- switch (max) {
412
- case r:
413
- h = (g - b) / d + (g < b ? 6 : 0);
414
- break;
415
- case g:
416
- h = (b - r) / d + 2;
417
- break;
418
- case b:
419
- h = (r - g) / d + 4;
420
- break;
421
- }
422
- h *= 60;
423
- }
424
-
425
- return [Math.round(h), Math.round(s * 100), Math.round(l * 100), a];
426
- }
427
-
428
- /**
429
- * Converts RGBA to HSL.
430
- * @param {number} r
431
- * @param {number} g
432
- * @param {number} b
433
- * @param {number} [a=1]
434
- * @returns {HslColor}
435
- */
436
- static rgbaToHsl(r, g, b, a) {
437
- return this.rgbaToHsla(r, g, b, a).slice(0, 3);
438
- }
439
-
440
- /**
441
- * Converts rgb(a) string to RGBA array.
442
- * @param {string} rgb
443
- * @returns {RgbaColor}
444
- */
445
- static rgbStringToRgbaArray(rgb) {
446
- const match = rgb.match(/[\d.]+/g)?.map(Number);
447
- if (!match) return [];
448
- return [...match, 1].slice(0, 4);
449
- }
450
-
451
- // Integer Color
452
-
453
- /**
454
- * Converts integer color to HSL.
455
- * @param {number} int
456
- * @returns {HslColor}
457
- */
458
- static intToHsl(int) {
459
- const [r, g, b, a] = TinyColorConverter.intToRgba(int);
460
- return TinyColorConverter.rgbaToHsl(r, g, b, a);
461
- }
462
-
463
- /**
464
- * Converts integer color to HSL.
465
- * @param {number} int
466
- * @returns {HslaColor}
467
- */
468
- static intToHsla(int) {
469
- const [r, g, b, a] = TinyColorConverter.intToRgba(int);
470
- return TinyColorConverter.rgbaToHsla(r, g, b, a);
471
- }
472
-
473
- /**
474
- * Converts integer color to hex.
475
- * @param {number} int
476
- * @returns {HexColor}
477
- */
478
- static intToHex(int) {
479
- return '#' + int.toString(16).padStart(6, '0');
480
- }
481
-
482
- /**
483
- * Converts an integer (0xRRGGBB) to RGBA.
484
- * @param {number} value
485
- * @returns {RgbaColor}
486
- */
487
- static intToRgba(value) {
488
- const r = (value >> 16) & 255;
489
- const g = (value >> 8) & 255;
490
- const b = value & 255;
491
- return [r, g, b, 1];
492
- }
493
-
494
- // Class Script
495
-
496
- /** @type {ColorTypes} */
497
- #original = '#000000';
498
- /** @type {RgbaColor} */
499
- #rgba = [0, 0, 0, 0];
500
-
501
- #checkIsHsl;
502
-
503
- /**
504
- * @param {ColorTypes|null} [input=null] - Any valid color (hex, rgb string, rgba string, hsl(a), css name, array or int).
505
- * @param {boolean} [checkIsHsl=false]
506
- */
507
- constructor(input = null, checkIsHsl = false) {
508
- this.#checkIsHsl = checkIsHsl;
509
- if (typeof input !== 'undefined' && input !== null) this.setColor(input);
510
- }
511
-
512
- /**
513
- * @param {ColorTypes} input - Any valid color (hex, rgb string, rgba string, hsl(a), css name, array or int).
514
- */
515
- setColor(input) {
516
- this.#original = input;
517
- const isHsl =
518
- this.#checkIsHsl &&
519
- Array.isArray(input) &&
520
- input[0] <= 360 &&
521
- input[1] <= 100 &&
522
- input[2] <= 100;
523
- this.#rgba = TinyColorConverter.parseInput(input, isHsl);
524
- }
525
-
526
- /**
527
- * Returns HSLA array.
528
- * @returns {HslaColor}
529
- */
530
- toHslaArray() {
531
- const [r, g, b, a] = this.#rgba;
532
- return TinyColorConverter.rgbaToHsla(r, g, b, a);
533
- }
534
-
535
- /**
536
- * Returns RGB string.
537
- * @returns {string}
538
- */
539
- toHslString() {
540
- const [r, g, b] = this.#rgba;
541
- const [h, s, l] = TinyColorConverter.rgbaToHsl(r, g, b);
542
- return `hsl(${h}, ${s}%, ${l}%)`;
543
- }
544
-
545
- /**
546
- * Returns RGBA string.
547
- * @returns {string}
548
- */
549
- toHslaString() {
550
- const [r, g, b, a] = this.#rgba;
551
- const [h, s, l, a2] = TinyColorConverter.rgbaToHsla(r, g, b, a);
552
- return `hsla(${h}, ${s}%, ${l}%, ${a2 ?? 1})`;
553
- }
554
-
555
- /**
556
- * Returns RGBA array.
557
- * @returns {RgbaColor}
558
- */
559
- toRgbaArray() {
560
- return [...this.#rgba];
561
- }
562
-
563
- /**
564
- * Returns RGB string.
565
- * @returns {string}
566
- */
567
- toRgbString() {
568
- const [r, g, b] = this.#rgba;
569
- return `rgb(${r}, ${g}, ${b})`;
570
- }
571
-
572
- /**
573
- * Returns RGBA string.
574
- * @returns {string}
575
- */
576
- toRgbaString() {
577
- const [r, g, b, a] = this.#rgba;
578
- return `rgba(${r}, ${g}, ${b}, ${a ?? 1})`;
579
- }
580
-
581
- /**
582
- * Returns hex color.
583
- * @returns {HexColor}
584
- */
585
- toHex() {
586
- const [r, g, b] = this.#rgba;
587
- return TinyColorConverter.rgbToHex(r, g, b);
588
- }
589
-
590
- /**
591
- * Returns color as integer.
592
- * @returns {number}
593
- */
594
- toInt() {
595
- const [r, g, b] = this.#rgba;
596
- return TinyColorConverter.rgbToInt(r, g, b);
597
- }
598
-
599
- /**
600
- * Returns the original input.
601
- * @returns {ColorTypes}
602
- */
603
- getOriginal() {
604
- return this.#original;
605
- }
606
- }
607
-
608
- /* harmony default export */ const libs_TinyColorConverter = (TinyColorConverter);
609
-
610
- ;// ./src/v1/build/TinyColorConverter.mjs
611
-
612
-
613
-
614
-
615
- window.TinyColorConverter = __webpack_exports__.TinyColorConverter;
616
- /******/ })()
617
- ;