tiny-essentials 1.28.1 → 1.28.2

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 (211) hide show
  1. package/changelog/1/28/2.md +43 -0
  2. package/dist/_/numbers.d.mts +91 -16
  3. package/dist/v1/TinyBasicsEs.min.js +1 -1
  4. package/dist/v1/TinyEssentials.min.js +1 -1
  5. package/dist/v1/TinyMediaPlayer.min.js +1 -1
  6. package/dist/v1/TinyRadioFm.min.js +1 -1
  7. package/dist/v1/basics/array.d.mts +14 -14
  8. package/dist/v1/basics/clock.cjs +15 -15
  9. package/dist/v1/basics/clock.d.mts +21 -21
  10. package/dist/v1/basics/clock.mjs +15 -15
  11. package/dist/v1/basics/collision.d.mts +245 -104
  12. package/dist/v1/basics/deprecated/html.d.mts +33 -33
  13. package/dist/v1/basics/extendObjType/Buffer.d.mts +1 -1
  14. package/dist/v1/basics/fullScreen.d.mts +47 -7
  15. package/dist/v1/basics/html.d.mts +52 -61
  16. package/dist/v1/basics/index.d.mts +11 -67
  17. package/dist/v1/basics/mediaContent.cjs +65 -23
  18. package/dist/v1/basics/mediaContent.d.mts +144 -73
  19. package/dist/v1/basics/mediaContent.mjs +65 -23
  20. package/dist/v1/basics/objChecker.d.mts +2 -2
  21. package/dist/v1/basics/objFilter.cjs +31 -7
  22. package/dist/v1/basics/objFilter.d.mts +10 -13
  23. package/dist/v1/basics/objFilter.mjs +31 -7
  24. package/dist/v1/basics/simpleMath.d.mts +21 -21
  25. package/dist/v1/basics/text.d.mts +34 -46
  26. package/dist/v1/build/ColorSafeStringify.d.mts +1 -1
  27. package/dist/v1/build/TinyAdvancedRaffle.d.mts +1 -1
  28. package/dist/v1/build/TinyAfterScrollWatcher.d.mts +1 -1
  29. package/dist/v1/build/TinyAnalogClock.d.mts +1 -1
  30. package/dist/v1/build/TinyArrayComparator.d.mts +1 -1
  31. package/dist/v1/build/TinyArrayPaginator.d.mts +1 -1
  32. package/dist/v1/build/TinyClassManager.d.mts +1 -1
  33. package/dist/v1/build/TinyClipboard.d.mts +1 -1
  34. package/dist/v1/build/TinyColorConverter.d.mts +1 -1
  35. package/dist/v1/build/TinyColorValidator.d.mts +1 -1
  36. package/dist/v1/build/TinyCookieConsent.d.mts +1 -1
  37. package/dist/v1/build/TinyDayNightCycle.d.mts +1 -1
  38. package/dist/v1/build/TinyDomReadyManager.d.mts +1 -1
  39. package/dist/v1/build/TinyDragDropDetector.d.mts +1 -1
  40. package/dist/v1/build/TinyDragger.d.mts +1 -1
  41. package/dist/v1/build/TinyElementObserver.d.mts +1 -1
  42. package/dist/v1/build/TinyGamepad.d.mts +1 -1
  43. package/dist/v1/build/TinyHtml.d.mts +1 -1
  44. package/dist/v1/build/TinyI18.d.mts +1 -1
  45. package/dist/v1/build/TinyIframeEvents.d.mts +1 -1
  46. package/dist/v1/build/TinyInventory.d.mts +1 -1
  47. package/dist/v1/build/TinyInventoryTrader.d.mts +1 -1
  48. package/dist/v1/build/TinyLevelUp.d.mts +1 -1
  49. package/dist/v1/build/TinyLoadingScreen.d.mts +1 -1
  50. package/dist/v1/build/TinyLocalStorage.d.mts +1 -1
  51. package/dist/v1/build/TinyMediaPlayer.d.mts +1 -1
  52. package/dist/v1/build/TinyNeedBar.d.mts +1 -1
  53. package/dist/v1/build/TinyNewWinEvents.d.mts +1 -1
  54. package/dist/v1/build/TinyNotifications.d.mts +1 -1
  55. package/dist/v1/build/TinyNotifyCenter.d.mts +1 -1
  56. package/dist/v1/build/TinyPromiseQueue.d.mts +1 -1
  57. package/dist/v1/build/TinyRadioFm.d.mts +1 -1
  58. package/dist/v1/build/TinyRateLimiter.d.mts +1 -1
  59. package/dist/v1/build/TinySimpleDice.d.mts +1 -1
  60. package/dist/v1/build/TinySmartScroller.d.mts +1 -1
  61. package/dist/v1/build/TinyTextDiffer.d.mts +1 -1
  62. package/dist/v1/build/TinyTextRangeEditor.d.mts +1 -1
  63. package/dist/v1/build/TinyTextarea.d.mts +1 -1
  64. package/dist/v1/build/TinyTimeout.d.mts +1 -1
  65. package/dist/v1/build/TinyToastNotify.d.mts +1 -1
  66. package/dist/v1/build/TinyUploadClicker.d.mts +1 -1
  67. package/dist/v1/build/UltraRandomMsgGen.d.mts +1 -1
  68. package/dist/v1/fileManager/asyncFuncs.d.mts +13 -13
  69. package/dist/v1/fileManager/index.d.mts +3 -29
  70. package/dist/v1/fileManager/normalFuncs.d.mts +22 -22
  71. package/dist/v1/index.d.mts +53 -139
  72. package/dist/v1/libs/ColorSafeStringify.d.mts +3 -12
  73. package/dist/v1/libs/TinyAdvancedRaffle.d.mts +60 -103
  74. package/dist/v1/libs/TinyAfterScrollWatcher.d.mts +11 -18
  75. package/dist/v1/libs/TinyAnalogClock.d.mts +8 -11
  76. package/dist/v1/libs/TinyArrayComparator.d.mts +14 -20
  77. package/dist/v1/libs/TinyArrayPaginator.d.mts +22 -26
  78. package/dist/v1/libs/TinyClassManager/TinyPluginInliner.d.mts +8 -8
  79. package/dist/v1/libs/TinyClassManager.cjs +5 -7
  80. package/dist/v1/libs/TinyClassManager.d.mts +16 -16
  81. package/dist/v1/libs/TinyClassManager.mjs +5 -6
  82. package/dist/v1/libs/TinyClipboard.d.mts +8 -3
  83. package/dist/v1/libs/TinyColorConverter.d.mts +8 -31
  84. package/dist/v1/libs/TinyColorValidator.d.mts +145 -184
  85. package/dist/v1/libs/TinyCookieConsent.d.mts +17 -17
  86. package/dist/v1/libs/TinyDayNightCycle.d.mts +85 -110
  87. package/dist/v1/libs/TinyDomReadyManager.d.mts +8 -16
  88. package/dist/v1/libs/TinyDragDropDetector.d.mts +30 -30
  89. package/dist/v1/libs/TinyDragger.d.mts +82 -81
  90. package/dist/v1/libs/TinyElementObserver.d.mts +25 -28
  91. package/dist/v1/libs/TinyGamepad.cjs +0 -1
  92. package/dist/v1/libs/TinyGamepad.d.mts +50 -122
  93. package/dist/v1/libs/TinyGamepad.mjs +0 -1
  94. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.cjs +2 -25
  95. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.d.mts +19 -25
  96. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.mjs +3 -27
  97. package/dist/v1/libs/TinyHtml/TinyHtmlButton.cjs +2 -1
  98. package/dist/v1/libs/TinyHtml/TinyHtmlButton.d.mts +55 -55
  99. package/dist/v1/libs/TinyHtml/TinyHtmlButton.mjs +2 -1
  100. package/dist/v1/libs/TinyHtml/TinyHtmlCanvas.d.mts +6 -6
  101. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.cjs +8 -4
  102. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.d.mts +19 -21
  103. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.mjs +7 -4
  104. package/dist/v1/libs/TinyHtml/TinyHtmlEmbed.d.mts +8 -8
  105. package/dist/v1/libs/TinyHtml/TinyHtmlForm.d.mts +18 -18
  106. package/dist/v1/libs/TinyHtml/TinyHtmlIcon.d.mts +5 -6
  107. package/dist/v1/libs/TinyHtml/TinyHtmlIframe.d.mts +19 -19
  108. package/dist/v1/libs/TinyHtml/TinyHtmlImage.cjs +0 -28
  109. package/dist/v1/libs/TinyHtml/TinyHtmlImage.d.mts +22 -28
  110. package/dist/v1/libs/TinyHtml/TinyHtmlImage.mjs +1 -27
  111. package/dist/v1/libs/TinyHtml/TinyHtmlInput.d.mts +11 -11
  112. package/dist/v1/libs/TinyHtml/TinyHtmlLink.d.mts +23 -23
  113. package/dist/v1/libs/TinyHtml/TinyHtmlMedia.d.mts +26 -26
  114. package/dist/v1/libs/TinyHtml/TinyHtmlScript.cjs +4 -30
  115. package/dist/v1/libs/TinyHtml/TinyHtmlScript.d.mts +20 -26
  116. package/dist/v1/libs/TinyHtml/TinyHtmlScript.mjs +5 -32
  117. package/dist/v1/libs/TinyHtml/TinyHtmlSelect.d.mts +19 -19
  118. package/dist/v1/libs/TinyHtml/TinyHtmlStyle.d.mts +8 -8
  119. package/dist/v1/libs/TinyHtml/TinyHtmlTemplate.d.mts +26 -28
  120. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.cjs +14 -15
  121. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.d.mts +32 -32
  122. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.mjs +15 -15
  123. package/dist/v1/libs/TinyHtml/index.d.mts +102 -45
  124. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.cjs +11 -9
  125. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.d.mts +21 -21
  126. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.mjs +11 -9
  127. package/dist/v1/libs/TinyHtml/input/TinyHtmlFileInput.d.mts +11 -11
  128. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.cjs +4 -4
  129. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.d.mts +17 -13
  130. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.mjs +4 -4
  131. package/dist/v1/libs/TinyHtml/input/TinyHtmlImageInput.d.mts +21 -21
  132. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.cjs +5 -4
  133. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.d.mts +14 -14
  134. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.mjs +5 -4
  135. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.cjs +4 -3
  136. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.d.mts +10 -10
  137. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.mjs +4 -3
  138. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.cjs +4 -3
  139. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.d.mts +19 -19
  140. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.mjs +4 -3
  141. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.cjs +5 -4
  142. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.d.mts +11 -11
  143. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.mjs +5 -4
  144. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.cjs +4 -3
  145. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.d.mts +15 -11
  146. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.mjs +4 -3
  147. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.cjs +49 -21
  148. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.d.mts +34 -20
  149. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.mjs +45 -20
  150. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.cjs +1 -1
  151. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.d.mts +14 -14
  152. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.mjs +1 -1
  153. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.cjs +1 -1
  154. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.d.mts +14 -14
  155. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.mjs +1 -1
  156. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.cjs +48 -25
  157. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.d.mts +27 -21
  158. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.mjs +40 -27
  159. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.cjs +1 -1
  160. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.d.mts +14 -14
  161. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.mjs +1 -1
  162. package/dist/v1/libs/TinyHtml/input/number/TinyHtmlNumberInput.d.mts +14 -14
  163. package/dist/v1/libs/TinyHtml/input/number/TinyHtmlRangeInput.d.mts +14 -14
  164. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlEmailInput.d.mts +25 -21
  165. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlPasswordInput.d.mts +18 -18
  166. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlSearchInput.d.mts +33 -29
  167. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTelInput.d.mts +22 -22
  168. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTextInput.d.mts +18 -18
  169. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlUrlInput.d.mts +31 -27
  170. package/dist/v1/libs/TinyHtml/media/TinyHtmlAudio.d.mts +35 -11
  171. package/dist/v1/libs/TinyHtml/media/TinyHtmlObject.d.mts +10 -10
  172. package/dist/v1/libs/TinyHtml/media/TinyHtmlSource.d.mts +12 -12
  173. package/dist/v1/libs/TinyHtml/media/TinyHtmlVideo.d.mts +35 -27
  174. package/dist/v1/libs/TinyHtml.cjs +3 -4
  175. package/dist/v1/libs/TinyHtml.d.mts +1503 -1731
  176. package/dist/v1/libs/TinyHtml.mjs +3 -4
  177. package/dist/v1/libs/TinyI18.d.mts +23 -61
  178. package/dist/v1/libs/TinyIframeEvents.cjs +1 -1
  179. package/dist/v1/libs/TinyIframeEvents.d.mts +29 -38
  180. package/dist/v1/libs/TinyIframeEvents.mjs +1 -1
  181. package/dist/v1/libs/TinyInventory.d.mts +78 -141
  182. package/dist/v1/libs/TinyInventoryTrader.d.mts +19 -22
  183. package/dist/v1/libs/TinyLevelUp.d.mts +10 -13
  184. package/dist/v1/libs/TinyLoadingScreen.d.mts +21 -31
  185. package/dist/v1/libs/TinyLocalStorage.d.mts +11 -36
  186. package/dist/v1/libs/TinyMamdaniInferenceSystem.d.mts +37 -23
  187. package/dist/v1/libs/TinyMediaPlayer.cjs +5 -3
  188. package/dist/v1/libs/TinyMediaPlayer.d.mts +102 -109
  189. package/dist/v1/libs/TinyMediaPlayer.mjs +5 -3
  190. package/dist/v1/libs/TinyNeedBar.d.mts +25 -37
  191. package/dist/v1/libs/TinyNewWinEvents.d.mts +29 -32
  192. package/dist/v1/libs/TinyNotifications.d.mts +6 -6
  193. package/dist/v1/libs/TinyNotifyCenter.d.mts +15 -21
  194. package/dist/v1/libs/TinyPromiseQueue.d.mts +11 -11
  195. package/dist/v1/libs/TinyRadioFm.cjs +32 -12
  196. package/dist/v1/libs/TinyRadioFm.d.mts +44 -80
  197. package/dist/v1/libs/TinyRadioFm.mjs +29 -12
  198. package/dist/v1/libs/TinyRateLimiter.d.mts +26 -39
  199. package/dist/v1/libs/TinySimpleDice.d.mts +17 -36
  200. package/dist/v1/libs/TinySmartScroller.d.mts +50 -60
  201. package/dist/v1/libs/TinyTextDiffer.d.mts +11 -14
  202. package/dist/v1/libs/TinyTextRangeEditor.d.mts +8 -8
  203. package/dist/v1/libs/TinyTextarea.d.mts +31 -31
  204. package/dist/v1/libs/TinyTimeout.d.mts +14 -14
  205. package/dist/v1/libs/TinyToastNotify.cjs +1 -1
  206. package/dist/v1/libs/TinyToastNotify.d.mts +15 -23
  207. package/dist/v1/libs/TinyToastNotify.mjs +1 -1
  208. package/dist/v1/libs/TinyUploadClicker.d.mts +38 -14
  209. package/dist/v1/libs/UltraRandomMsgGen.d.mts +44 -84
  210. package/dist/v1/libs/utils.d.mts +5 -1
  211. package/package.json +2 -2
@@ -1,29 +1,3 @@
1
- export default TinyColorValidator;
2
- /**
3
- * Represents the allowed angle unit types for CSS color functions.
4
- *
5
- * - `deg` → Degrees (0–360).
6
- * - `grad` → Gradians (0–400).
7
- * - `rad` → Radians (0–2π).
8
- * - `turn` → Turns (0–1).
9
- */
10
- export type AngleUnit = "deg" | "grad" | "rad" | "turn";
11
- /**
12
- * Represents the type of a CSS color.
13
- *
14
- * - `'hex'` → HEX color (`#RGB` / `#RRGGBB`)
15
- * - `'hexa'` → HEX with alpha (`#RRGGBBAA`)
16
- * - `'rgb'` → RGB color (`rgb(r, g, b)`)
17
- * - `'rgba'` → RGB with alpha (`rgba(r, g, b, a)`)
18
- * - `'hsl'` → HSL color (`hsl(h, s%, l%)`)
19
- * - `'hsla'` → HSL with alpha (`hsla(h, s%, l%, a)`)
20
- * - `'hwb'` → HWB color (`hwb(hue, whiteness%, blackness%)`)
21
- * - `'lab'` → CIELAB color (`lab(L a b)`)
22
- * - `'lch'` → LCH color (`lch(L C H)`)
23
- * - `'name'` → Standard HTML color name (e.g., `red`, `blue`)
24
- * - `'specialName'` → CSS special keywords (`transparent`, `currentColor`)
25
- */
26
- export type ColorTypes = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hwb" | "lab" | "lch" | "name" | "specialName";
27
1
  /**
28
2
  * Represents the allowed angle unit types for CSS color functions.
29
3
  *
@@ -34,6 +8,8 @@ export type ColorTypes = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hwb
34
8
  *
35
9
  * @typedef {'deg' | 'grad' | 'rad' | 'turn'} AngleUnit
36
10
  */
11
+ export type AngleUnit = 'deg' | 'grad' | 'rad' | 'turn';
12
+ export type ColorTypes = 'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hwb' | 'lab' | 'lch' | 'name' | 'specialName';
37
13
  /**
38
14
  * Represents the type of a CSS color.
39
15
  *
@@ -80,22 +56,7 @@ export type ColorTypes = "hex" | "hexa" | "rgb" | "rgba" | "hsl" | "hsla" | "hwb
80
56
  * @template {string} TinyColorValidatorT
81
57
  */
82
58
  declare class TinyColorValidator<TinyColorValidatorT extends string> {
83
- static #HEX_REGEX: RegExp;
84
- static #HEXA_REGEX: RegExp;
85
- static #ALPHA: string;
86
- static #NUM_0_255: string;
87
- static #NUM_0_360: string;
88
- static #NUM_0_100: string;
89
- static #RGB_REGEX: RegExp;
90
- static #RGBA_REGEX: RegExp;
91
- static #HSL_REGEX: RegExp;
92
- static #HSLA_REGEX: RegExp;
93
- static #HWB_REGEX: RegExp;
94
- static #LAB_AB: string;
95
- static #LAB_REGEX: RegExp;
96
- static #LCH_REGEX: RegExp;
97
- static #HTML_COLOR_NAMES: Set<string>;
98
- static #SPECIAL_COLOR_NAMES: Set<string>;
59
+ #private;
99
60
  /**
100
61
  * Returns all HTML color names as an array.
101
62
  * @returns {string[]}
@@ -142,6 +103,21 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
142
103
  * @returns {boolean}
143
104
  */
144
105
  static hasSpecialName(name: string): boolean;
106
+ /**
107
+ * Gets the current code.
108
+ * @returns {string} The stored code.
109
+ */
110
+ get code(): string;
111
+ /**
112
+ * Gets the current code.
113
+ * @returns {ColorTypes|null} The stored code type.
114
+ */
115
+ get type(): ColorTypes | null;
116
+ /**
117
+ * Creates a new instance of Example.
118
+ * @param {TinyColorValidatorT} code - The code to be stored.
119
+ */
120
+ constructor(code: TinyColorValidatorT);
145
121
  /**
146
122
  * Validates if a string is a valid HEX color (#RGB, #RRGGBB).
147
123
  * @param {string} input - The input string to validate.
@@ -149,6 +125,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
149
125
  * @throws {TypeError} If input is not a string.
150
126
  */
151
127
  static isHex(input: string): boolean;
128
+ /**
129
+ * Validates if a string is a valid HEX color (#RGB, #RRGGBB).
130
+ * @returns {boolean} True if the input is a valid HEX color.
131
+ * @throws {TypeError} If input is not a string.
132
+ */
133
+ isHex(): boolean;
152
134
  /**
153
135
  * Validates if a string is a valid HEX color (#RRGGBBAA).
154
136
  * @param {string} input - The input string to validate.
@@ -156,6 +138,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
156
138
  * @throws {TypeError} If input is not a string.
157
139
  */
158
140
  static isHexa(input: string): boolean;
141
+ /**
142
+ * Validates if a string is a valid HEX color (#RRGGBBAA).
143
+ * @returns {boolean} True if the input is a valid HEXA color.
144
+ * @throws {TypeError} If input is not a string.
145
+ */
146
+ isHexa(): boolean;
159
147
  /**
160
148
  * Validates if a string is a valid RGB color.
161
149
  * @param {string} input - The input string to validate.
@@ -163,6 +151,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
163
151
  * @throws {TypeError} If input is not a string.
164
152
  */
165
153
  static isRgb(input: string): boolean;
154
+ /**
155
+ * Validates if a string is a valid RGB color.
156
+ * @returns {boolean} True if the input is a valid RGB color.
157
+ * @throws {TypeError} If input is not a string.
158
+ */
159
+ isRgb(): boolean;
166
160
  /**
167
161
  * Validates if a string is a valid RGBA color.
168
162
  * @param {string} input - The input string to validate.
@@ -170,6 +164,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
170
164
  * @throws {TypeError} If input is not a string.
171
165
  */
172
166
  static isRgba(input: string): boolean;
167
+ /**
168
+ * Validates if a string is a valid RGBA color.
169
+ * @returns {boolean} True if the input is a valid RGBA color.
170
+ * @throws {TypeError} If input is not a string.
171
+ */
172
+ isRgba(): boolean;
173
173
  /**
174
174
  * Validates if a string is a valid HSL color.
175
175
  * @param {string} input - The input string to validate.
@@ -177,6 +177,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
177
177
  * @throws {TypeError} If input is not a string.
178
178
  */
179
179
  static isHsl(input: string): boolean;
180
+ /**
181
+ * Validates if a string is a valid HSL color.
182
+ * @returns {boolean} True if the input is a valid HSL color.
183
+ * @throws {TypeError} If input is not a string.
184
+ */
185
+ isHsl(): boolean;
180
186
  /**
181
187
  * Validates if a string is a valid HSLA color.
182
188
  * @param {string} input - The input string to validate.
@@ -184,6 +190,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
184
190
  * @throws {TypeError} If input is not a string.
185
191
  */
186
192
  static isHsla(input: string): boolean;
193
+ /**
194
+ * Validates if a string is a valid HSLA color.
195
+ * @returns {boolean} True if the input is a valid HSLA color.
196
+ * @throws {TypeError} If input is not a string.
197
+ */
198
+ isHsla(): boolean;
187
199
  /**
188
200
  * Validates if a string is a valid HWB color.
189
201
  * @param {string} input - The input string to validate.
@@ -191,6 +203,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
191
203
  * @throws {TypeError} If input is not a string.
192
204
  */
193
205
  static isHwb(input: string): boolean;
206
+ /**
207
+ * Validates if a string is a valid HWB color.
208
+ * @returns {boolean} True if the input is a valid HWB color.
209
+ * @throws {TypeError} If input is not a string.
210
+ */
211
+ isHwb(): boolean;
194
212
  /**
195
213
  * Validates if a string is a valid CIELAB color.
196
214
  * @param {string} input - The input string to validate.
@@ -198,6 +216,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
198
216
  * @throws {TypeError} If input is not a string.
199
217
  */
200
218
  static isLab(input: string): boolean;
219
+ /**
220
+ * Validates if a string is a valid CIELAB color.
221
+ * @returns {boolean} True if the input is a valid Lab color.
222
+ * @throws {TypeError} If input is not a string.
223
+ */
224
+ isLab(): boolean;
201
225
  /**
202
226
  * Validates if a string is a valid LCH color.
203
227
  * @param {string} input - The input string to validate.
@@ -205,6 +229,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
205
229
  * @throws {TypeError} If input is not a string.
206
230
  */
207
231
  static isLch(input: string): boolean;
232
+ /**
233
+ * Validates if a string is a valid LCH color.
234
+ * @returns {boolean} True if the input is a valid LCH color.
235
+ * @throws {TypeError} If input is not a string.
236
+ */
237
+ isLch(): boolean;
208
238
  /**
209
239
  * Validates if a string matches a standard HTML color name.
210
240
  * @param {string} input - The input string to validate.
@@ -212,6 +242,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
212
242
  * @throws {TypeError} If input is not a string.
213
243
  */
214
244
  static isName(input: string): boolean;
245
+ /**
246
+ * Validates if a string matches a standard HTML color name.
247
+ * @returns {boolean} True if the input is a valid HTML color name.
248
+ * @throws {TypeError} If input is not a string.
249
+ */
250
+ isName(): boolean;
215
251
  /**
216
252
  * Validates if a string matches a special CSS color keyword.
217
253
  * @param {string} input - The input string to validate.
@@ -219,6 +255,12 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
219
255
  * @throws {TypeError} If input is not a string.
220
256
  */
221
257
  static isSpecialName(input: string): boolean;
258
+ /**
259
+ * Validates if a string matches a special CSS color keyword.
260
+ * @returns {boolean} True if the input is a special color keyword.
261
+ * @throws {TypeError} If input is not a string.
262
+ */
263
+ isSpecialName(): boolean;
222
264
  /**
223
265
  * Validates if a string is any valid CSS color (HEX, RGB, HSL, HWB, Lab, LCH, name, or special name).
224
266
  * @param {string} input - The input string to validate.
@@ -226,6 +268,11 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
226
268
  * @throws {TypeError} If input is not a string.
227
269
  */
228
270
  static isColor(input: string): ColorTypes | null;
271
+ /**
272
+ * Automatically parses the stored code based on its detected type.
273
+ * @returns {any[]|string|null} Parsed color components according to type, or null if invalid.
274
+ */
275
+ parse(): any[] | string | null;
229
276
  /**
230
277
  * Parses a HEX color string (#RGB or #RRGGBB).
231
278
  * Returns the regex match array with captured groups or null if invalid.
@@ -234,6 +281,13 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
234
281
  * @throws {TypeError} If input is not a string.
235
282
  */
236
283
  static parseHex(input: string): string | null;
284
+ /**
285
+ * Parses a HEX color string (#RGB or #RRGGBB).
286
+ * Returns the regex match array with captured groups or null if invalid.
287
+ * @returns {string|null} Regex match result with captured groups, or null if not valid.
288
+ * @throws {TypeError} If input is not a string.
289
+ */
290
+ parseHex(): string | null;
237
291
  /**
238
292
  * Parses a HEXA color string (#RRGGBBAA).
239
293
  * Returns the regex match array with captured groups or null if invalid.
@@ -242,6 +296,13 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
242
296
  * @throws {TypeError} If input is not a string.
243
297
  */
244
298
  static parseHexa(input: string): string | null;
299
+ /**
300
+ * Parses a HEXA color string (#RRGGBBAA).
301
+ * Returns the regex match array with captured groups or null if invalid.
302
+ * @returns {string|null} Regex match result with captured groups, or null if not valid.
303
+ * @throws {TypeError} If input is not a string.
304
+ */
305
+ parseHexa(): string | null;
245
306
  /**
246
307
  * Parses an RGB color string (rgb(r, g, b)).
247
308
  * Returns the regex match array with captured groups for r, g, and b or null if invalid.
@@ -250,6 +311,13 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
250
311
  * @throws {TypeError} If input is not a string.
251
312
  */
252
313
  static parseRgb(input: string): [number, number, number] | null;
314
+ /**
315
+ * Parses an RGB color string (rgb(r, g, b)).
316
+ * Returns the regex match array with captured groups for r, g, and b or null if invalid.
317
+ * @returns {[number, number, number]|null} Regex match result with groups [r, g, b], or null if not valid.
318
+ * @throws {TypeError} If input is not a string.
319
+ */
320
+ parseRgb(): [number, number, number] | null;
253
321
  /**
254
322
  * Parses an RGBA color string (rgba(r, g, b, a)).
255
323
  * Returns the regex match array with captured groups for r, g, b, and a or null if invalid.
@@ -258,6 +326,13 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
258
326
  * @throws {TypeError} If input is not a string.
259
327
  */
260
328
  static parseRgba(input: string): [number, number, number, number] | null;
329
+ /**
330
+ * Parses an RGBA color string (rgba(r, g, b, a)).
331
+ * Returns the regex match array with captured groups for r, g, b, and a or null if invalid.
332
+ * @returns {[number, number, number, number]|null} Regex match result with groups [r, g, b, a], or null if not valid.
333
+ * @throws {TypeError} If input is not a string.
334
+ */
335
+ parseRgba(): [number, number, number, number] | null;
261
336
  /**
262
337
  * Parses an HSL color string (hsl(h, s%, l%)).
263
338
  * Returns the regex match array with captured groups for h, s, and l or null if invalid.
@@ -266,6 +341,13 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
266
341
  * @throws {TypeError} If input is not a string.
267
342
  */
268
343
  static parseHsl(input: string): [number, number, number] | null;
344
+ /**
345
+ * Parses an HSL color string (hsl(h, s%, l%)).
346
+ * Returns the regex match array with captured groups for h, s, and l or null if invalid.
347
+ * @returns {[number, number, number]|null} Regex match result with groups [h, s, l], or null if not valid.
348
+ * @throws {TypeError} If input is not a string.
349
+ */
350
+ parseHsl(): [number, number, number] | null;
269
351
  /**
270
352
  * Parses an HSLA color string (hsla(h, s%, l%, a)).
271
353
  * Returns the regex match array with captured groups for h, s, l, and a or null if invalid.
@@ -274,6 +356,13 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
274
356
  * @throws {TypeError} If input is not a string.
275
357
  */
276
358
  static parseHsla(input: string): [number, number, number, number] | null;
359
+ /**
360
+ * Parses an HSLA color string (hsla(h, s%, l%, a)).
361
+ * Returns the regex match array with captured groups for h, s, l, and a or null if invalid.
362
+ * @returns {[number, number, number, number]|null} Regex match result with groups [h, s, l, a], or null if not valid.
363
+ * @throws {TypeError} If input is not a string.
364
+ */
365
+ parseHsla(): [number, number, number, number] | null;
277
366
  /**
278
367
  * Parses an HWB color string (hwb(hue, whiteness%, blackness%[, alpha])).
279
368
  * Returns the regex match array with captured groups or null if invalid.
@@ -283,163 +372,35 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
283
372
  */
284
373
  static parseHwb(input: string): [number, AngleUnit | null, number, number] | null;
285
374
  /**
286
- * Parses a CIELAB color string (lab(L a b[/alpha])).
375
+ * Parses an HWB color string (hwb(hue, whiteness%, blackness%[, alpha])).
287
376
  * Returns the regex match array with captured groups or null if invalid.
288
- * @param {string} input - The input string to parse.
289
- * @returns {[number, number, number]|null} Regex match result with captured groups, or null if not valid.
377
+ * @returns {[number, AngleUnit|null, number, number]|null} Regex match result with captured groups, or null if not valid.
290
378
  * @throws {TypeError} If input is not a string.
291
379
  */
292
- static parseLab(input: string): [number, number, number] | null;
380
+ parseHwb(): [number, AngleUnit | null, number, number] | null;
293
381
  /**
294
- * Parses an LCH color string (lch(L C H[/alpha])).
382
+ * Parses a CIELAB color string (lab(L a b[/alpha])).
295
383
  * Returns the regex match array with captured groups or null if invalid.
296
384
  * @param {string} input - The input string to parse.
297
- * @returns {[number, number, number, AngleUnit|null]|null} Regex match result with captured groups, or null if not valid.
298
- * @throws {TypeError} If input is not a string.
299
- */
300
- static parseLch(input: string): [number, number, number, AngleUnit | null] | null;
301
- /**
302
- * Creates a new instance of Example.
303
- * @param {TinyColorValidatorT} code - The code to be stored.
304
- */
305
- constructor(code: TinyColorValidatorT);
306
- /**
307
- * Gets the current code.
308
- * @returns {string} The stored code.
309
- */
310
- get code(): string;
311
- /**
312
- * Gets the current code.
313
- * @returns {ColorTypes|null} The stored code type.
314
- */
315
- get type(): ColorTypes | null;
316
- /**
317
- * Validates if a string is a valid HEX color (#RGB, #RRGGBB).
318
- * @returns {boolean} True if the input is a valid HEX color.
319
- * @throws {TypeError} If input is not a string.
320
- */
321
- isHex(): boolean;
322
- /**
323
- * Validates if a string is a valid HEX color (#RRGGBBAA).
324
- * @returns {boolean} True if the input is a valid HEXA color.
325
- * @throws {TypeError} If input is not a string.
326
- */
327
- isHexa(): boolean;
328
- /**
329
- * Validates if a string is a valid RGB color.
330
- * @returns {boolean} True if the input is a valid RGB color.
331
- * @throws {TypeError} If input is not a string.
332
- */
333
- isRgb(): boolean;
334
- /**
335
- * Validates if a string is a valid RGBA color.
336
- * @returns {boolean} True if the input is a valid RGBA color.
337
- * @throws {TypeError} If input is not a string.
338
- */
339
- isRgba(): boolean;
340
- /**
341
- * Validates if a string is a valid HSL color.
342
- * @returns {boolean} True if the input is a valid HSL color.
343
- * @throws {TypeError} If input is not a string.
344
- */
345
- isHsl(): boolean;
346
- /**
347
- * Validates if a string is a valid HSLA color.
348
- * @returns {boolean} True if the input is a valid HSLA color.
349
- * @throws {TypeError} If input is not a string.
350
- */
351
- isHsla(): boolean;
352
- /**
353
- * Validates if a string is a valid HWB color.
354
- * @returns {boolean} True if the input is a valid HWB color.
355
- * @throws {TypeError} If input is not a string.
356
- */
357
- isHwb(): boolean;
358
- /**
359
- * Validates if a string is a valid CIELAB color.
360
- * @returns {boolean} True if the input is a valid Lab color.
361
- * @throws {TypeError} If input is not a string.
362
- */
363
- isLab(): boolean;
364
- /**
365
- * Validates if a string is a valid LCH color.
366
- * @returns {boolean} True if the input is a valid LCH color.
367
- * @throws {TypeError} If input is not a string.
368
- */
369
- isLch(): boolean;
370
- /**
371
- * Validates if a string matches a standard HTML color name.
372
- * @returns {boolean} True if the input is a valid HTML color name.
373
- * @throws {TypeError} If input is not a string.
374
- */
375
- isName(): boolean;
376
- /**
377
- * Validates if a string matches a special CSS color keyword.
378
- * @returns {boolean} True if the input is a special color keyword.
379
- * @throws {TypeError} If input is not a string.
380
- */
381
- isSpecialName(): boolean;
382
- /**
383
- * Automatically parses the stored code based on its detected type.
384
- * @returns {any[]|string|null} Parsed color components according to type, or null if invalid.
385
- */
386
- parse(): any[] | string | null;
387
- /**
388
- * Parses a HEX color string (#RGB or #RRGGBB).
389
- * Returns the regex match array with captured groups or null if invalid.
390
- * @returns {string|null} Regex match result with captured groups, or null if not valid.
391
- * @throws {TypeError} If input is not a string.
392
- */
393
- parseHex(): string | null;
394
- /**
395
- * Parses a HEXA color string (#RRGGBBAA).
396
- * Returns the regex match array with captured groups or null if invalid.
397
- * @returns {string|null} Regex match result with captured groups, or null if not valid.
398
- * @throws {TypeError} If input is not a string.
399
- */
400
- parseHexa(): string | null;
401
- /**
402
- * Parses an RGB color string (rgb(r, g, b)).
403
- * Returns the regex match array with captured groups for r, g, and b or null if invalid.
404
- * @returns {[number, number, number]|null} Regex match result with groups [r, g, b], or null if not valid.
405
- * @throws {TypeError} If input is not a string.
406
- */
407
- parseRgb(): [number, number, number] | null;
408
- /**
409
- * Parses an RGBA color string (rgba(r, g, b, a)).
410
- * Returns the regex match array with captured groups for r, g, b, and a or null if invalid.
411
- * @returns {[number, number, number, number]|null} Regex match result with groups [r, g, b, a], or null if not valid.
412
- * @throws {TypeError} If input is not a string.
413
- */
414
- parseRgba(): [number, number, number, number] | null;
415
- /**
416
- * Parses an HSL color string (hsl(h, s%, l%)).
417
- * Returns the regex match array with captured groups for h, s, and l or null if invalid.
418
- * @returns {[number, number, number]|null} Regex match result with groups [h, s, l], or null if not valid.
419
- * @throws {TypeError} If input is not a string.
420
- */
421
- parseHsl(): [number, number, number] | null;
422
- /**
423
- * Parses an HSLA color string (hsla(h, s%, l%, a)).
424
- * Returns the regex match array with captured groups for h, s, l, and a or null if invalid.
425
- * @returns {[number, number, number, number]|null} Regex match result with groups [h, s, l, a], or null if not valid.
385
+ * @returns {[number, number, number]|null} Regex match result with captured groups, or null if not valid.
426
386
  * @throws {TypeError} If input is not a string.
427
387
  */
428
- parseHsla(): [number, number, number, number] | null;
388
+ static parseLab(input: string): [number, number, number] | null;
429
389
  /**
430
- * Parses an HWB color string (hwb(hue, whiteness%, blackness%[, alpha])).
390
+ * Parses a CIELAB color string (lab(L a b[/alpha])).
431
391
  * Returns the regex match array with captured groups or null if invalid.
432
- * @returns {[number, AngleUnit|null, number, number]|null} Regex match result with captured groups, or null if not valid.
392
+ * @returns {[number, number, number]|null} Regex match result with captured groups, or null if not valid.
433
393
  * @throws {TypeError} If input is not a string.
434
394
  */
435
- parseHwb(): [number, AngleUnit | null, number, number] | null;
395
+ parseLab(): [number, number, number] | null;
436
396
  /**
437
- * Parses a CIELAB color string (lab(L a b[/alpha])).
397
+ * Parses an LCH color string (lch(L C H[/alpha])).
438
398
  * Returns the regex match array with captured groups or null if invalid.
439
- * @returns {[number, number, number]|null} Regex match result with captured groups, or null if not valid.
399
+ * @param {string} input - The input string to parse.
400
+ * @returns {[number, number, number, AngleUnit|null]|null} Regex match result with captured groups, or null if not valid.
440
401
  * @throws {TypeError} If input is not a string.
441
402
  */
442
- parseLab(): [number, number, number] | null;
403
+ static parseLch(input: string): [number, number, number, AngleUnit | null] | null;
443
404
  /**
444
405
  * Parses an LCH color string (lch(L C H[/alpha])).
445
406
  * Returns the regex match array with captured groups or null if invalid.
@@ -447,6 +408,6 @@ declare class TinyColorValidator<TinyColorValidatorT extends string> {
447
408
  * @throws {TypeError} If input is not a string.
448
409
  */
449
410
  parseLch(): [number, number, number, AngleUnit | null] | null;
450
- #private;
451
411
  }
412
+ export default TinyColorValidator;
452
413
  //# sourceMappingURL=TinyColorValidator.d.mts.map
@@ -1,4 +1,9 @@
1
- export default TinyCookieConsent;
1
+ /**
2
+ * @typedef {Object} Category
3
+ * @property {string} label - Category label displayed to the user
4
+ * @property {boolean} required - If true, cannot be disabled
5
+ * @property {boolean} default - Default state (true = enabled, false = disabled)
6
+ */
2
7
  export type Category = {
3
8
  /**
4
9
  * - Category label displayed to the user
@@ -45,22 +50,16 @@ export type Config = {
45
50
  /**
46
51
  * - Animation duration in ms
47
52
  */
48
- animationDuration?: number | undefined;
53
+ animationDuration?: number;
49
54
  /**
50
55
  * - Optional custom HTML renderer for consent bar
51
56
  */
52
- renderBar?: ((config: Config) => string) | null | undefined;
57
+ renderBar?: ((config: Config) => string) | null;
53
58
  /**
54
59
  * - Optional custom HTML renderer for modal
55
60
  */
56
- renderModal?: ((config: Config) => string) | null | undefined;
61
+ renderModal?: ((config: Config) => string) | null;
57
62
  };
58
- /**
59
- * @typedef {Object} Category
60
- * @property {string} label - Category label displayed to the user
61
- * @property {boolean} required - If true, cannot be disabled
62
- * @property {boolean} default - Default state (true = enabled, false = disabled)
63
- */
64
63
  /**
65
64
  * @typedef {Object} Config
66
65
  * @property {string} message - Consent message
@@ -86,16 +85,17 @@ export type Config = {
86
85
  * - Fully customizable via configuration.
87
86
  */
88
87
  declare class TinyCookieConsent {
89
- /**
90
- * @param {Config} config
91
- */
92
- constructor(config: Config);
88
+ #private;
93
89
  /** @type {Record<string, boolean>} */
94
90
  get preferences(): Record<string, boolean>;
95
- /** @param {Config} value */
96
- set config(value: Config);
97
91
  /** @type {Config} */
98
92
  get config(): Config;
93
+ /** @param {Config} value */
94
+ set config(value: Config);
95
+ /**
96
+ * @param {Config} config
97
+ */
98
+ constructor(config: Config);
99
99
  /**
100
100
  * Validates config object against jsDoc typedefs
101
101
  * @param {Partial<Config>} config
@@ -137,6 +137,6 @@ declare class TinyCookieConsent {
137
137
  * @returns {boolean}
138
138
  */
139
139
  isAllowed(category: string): boolean;
140
- #private;
141
140
  }
141
+ export default TinyCookieConsent;
142
142
  //# sourceMappingURL=TinyCookieConsent.d.mts.map