tiny-essentials 1.28.0 → 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 (323) hide show
  1. package/changelog/1/28/1.md +23 -0
  2. package/changelog/1/28/2.md +43 -0
  3. package/dist/_/numbers.d.mts +91 -16
  4. package/dist/v1/TinyAdvancedRaffle.min.js +1 -1
  5. package/dist/v1/TinyAfterScrollWatcher.min.js +1 -1
  6. package/dist/v1/TinyAnalogClock.min.js +1 -1
  7. package/dist/v1/TinyBasicsEs.min.js +1 -1
  8. package/dist/v1/TinyDayNightCycle.min.js +1 -1
  9. package/dist/v1/TinyDragDropDetector.min.js +1 -1
  10. package/dist/v1/TinyDragger.min.js +1 -1
  11. package/dist/v1/TinyElementObserver.min.js +1 -1
  12. package/dist/v1/TinyEssentials.min.js +1 -1
  13. package/dist/v1/TinyGamepad.min.js +1 -1
  14. package/dist/v1/TinyHtml.min.js +1 -1
  15. package/dist/v1/TinyI18.min.js +1 -1
  16. package/dist/v1/TinyIframeEvents.min.js +1 -1
  17. package/dist/v1/TinyLocalStorage.min.js +1 -1
  18. package/dist/v1/TinyMediaPlayer.min.js +1 -1
  19. package/dist/v1/TinyNewWinEvents.min.js +1 -1
  20. package/dist/v1/TinyNotifyCenter.min.js +1 -1
  21. package/dist/v1/TinyRadioFm.min.js +1 -1
  22. package/dist/v1/TinyRateLimiter.min.js +1 -1
  23. package/dist/v1/TinySmartScroller.min.js +1 -1
  24. package/dist/v1/TinyTextDiffer.min.js +1 -1
  25. package/dist/v1/TinyTextarea.min.js +1 -1
  26. package/dist/v1/TinyTimeout.min.js +1 -1
  27. package/dist/v1/TinyToastNotify.min.js +1 -1
  28. package/dist/v1/TinyUploadClicker.min.js +1 -1
  29. package/dist/v1/UltraRandomMsgGen.min.js +1 -1
  30. package/dist/v1/basics/array.cjs +57 -9
  31. package/dist/v1/basics/array.d.mts +28 -12
  32. package/dist/v1/basics/array.mjs +51 -9
  33. package/dist/v1/basics/clock.cjs +94 -42
  34. package/dist/v1/basics/clock.d.mts +22 -22
  35. package/dist/v1/basics/clock.mjs +91 -54
  36. package/dist/v1/basics/collision.d.mts +245 -104
  37. package/dist/v1/basics/deprecated/html.cjs +246 -0
  38. package/dist/v1/basics/deprecated/html.d.mts +63 -0
  39. package/dist/v1/basics/deprecated/html.mjs +190 -0
  40. package/dist/v1/basics/extendObjType/Buffer.d.mts +1 -1
  41. package/dist/v1/basics/fullScreen.d.mts +47 -7
  42. package/dist/v1/basics/html.cjs +149 -130
  43. package/dist/v1/basics/html.d.mts +69 -113
  44. package/dist/v1/basics/html.mjs +113 -105
  45. package/dist/v1/basics/index.cjs +2 -0
  46. package/dist/v1/basics/index.d.mts +11 -65
  47. package/dist/v1/basics/index.mjs +3 -3
  48. package/dist/v1/basics/mediaContent.cjs +116 -32
  49. package/dist/v1/basics/mediaContent.d.mts +143 -159
  50. package/dist/v1/basics/mediaContent.mjs +105 -33
  51. package/dist/v1/basics/objChecker.cjs +7 -5
  52. package/dist/v1/basics/objChecker.d.mts +5 -4
  53. package/dist/v1/basics/objChecker.mjs +6 -6
  54. package/dist/v1/basics/objFilter.cjs +71 -14
  55. package/dist/v1/basics/objFilter.d.mts +16 -19
  56. package/dist/v1/basics/objFilter.mjs +63 -14
  57. package/dist/v1/basics/simpleMath.cjs +81 -25
  58. package/dist/v1/basics/simpleMath.d.mts +22 -22
  59. package/dist/v1/basics/simpleMath.mjs +70 -27
  60. package/dist/v1/basics/text.cjs +76 -31
  61. package/dist/v1/basics/text.d.mts +64 -14
  62. package/dist/v1/basics/text.mjs +62 -31
  63. package/dist/v1/build/ColorSafeStringify.d.mts +1 -1
  64. package/dist/v1/build/TinyAdvancedRaffle.d.mts +1 -1
  65. package/dist/v1/build/TinyAfterScrollWatcher.d.mts +1 -1
  66. package/dist/v1/build/TinyAnalogClock.d.mts +1 -1
  67. package/dist/v1/build/TinyArrayComparator.d.mts +1 -1
  68. package/dist/v1/build/TinyArrayPaginator.d.mts +1 -1
  69. package/dist/v1/build/TinyClassManager.d.mts +1 -1
  70. package/dist/v1/build/TinyClipboard.d.mts +1 -1
  71. package/dist/v1/build/TinyColorConverter.d.mts +1 -1
  72. package/dist/v1/build/TinyColorValidator.d.mts +1 -1
  73. package/dist/v1/build/TinyCookieConsent.d.mts +1 -1
  74. package/dist/v1/build/TinyDayNightCycle.d.mts +1 -1
  75. package/dist/v1/build/TinyDomReadyManager.d.mts +1 -1
  76. package/dist/v1/build/TinyDragDropDetector.d.mts +1 -1
  77. package/dist/v1/build/TinyDragger.d.mts +1 -1
  78. package/dist/v1/build/TinyElementObserver.d.mts +1 -1
  79. package/dist/v1/build/TinyGamepad.d.mts +1 -1
  80. package/dist/v1/build/TinyHtml.d.mts +1 -1
  81. package/dist/v1/build/TinyI18.d.mts +1 -1
  82. package/dist/v1/build/TinyIframeEvents.d.mts +1 -1
  83. package/dist/v1/build/TinyInventory.d.mts +1 -1
  84. package/dist/v1/build/TinyInventoryTrader.d.mts +1 -1
  85. package/dist/v1/build/TinyLevelUp.d.mts +1 -1
  86. package/dist/v1/build/TinyLoadingScreen.d.mts +1 -1
  87. package/dist/v1/build/TinyLocalStorage.d.mts +1 -1
  88. package/dist/v1/build/TinyMediaPlayer.d.mts +1 -1
  89. package/dist/v1/build/TinyNeedBar.d.mts +1 -1
  90. package/dist/v1/build/TinyNewWinEvents.d.mts +1 -1
  91. package/dist/v1/build/TinyNotifications.d.mts +1 -1
  92. package/dist/v1/build/TinyNotifyCenter.d.mts +1 -1
  93. package/dist/v1/build/TinyPromiseQueue.d.mts +1 -1
  94. package/dist/v1/build/TinyRadioFm.d.mts +1 -1
  95. package/dist/v1/build/TinyRateLimiter.d.mts +1 -1
  96. package/dist/v1/build/TinySimpleDice.d.mts +1 -1
  97. package/dist/v1/build/TinySmartScroller.d.mts +1 -1
  98. package/dist/v1/build/TinyTextDiffer.d.mts +1 -1
  99. package/dist/v1/build/TinyTextRangeEditor.d.mts +1 -1
  100. package/dist/v1/build/TinyTextarea.d.mts +1 -1
  101. package/dist/v1/build/TinyTimeout.d.mts +1 -1
  102. package/dist/v1/build/TinyToastNotify.d.mts +1 -1
  103. package/dist/v1/build/TinyUploadClicker.d.mts +1 -1
  104. package/dist/v1/build/UltraRandomMsgGen.d.mts +1 -1
  105. package/dist/v1/fileManager/asyncFuncs.d.mts +13 -13
  106. package/dist/v1/fileManager/index.d.mts +3 -29
  107. package/dist/v1/fileManager/normalFuncs.d.mts +22 -22
  108. package/dist/v1/index.cjs +4 -0
  109. package/dist/v1/index.d.mts +54 -137
  110. package/dist/v1/index.mjs +4 -3
  111. package/dist/v1/libs/ColorSafeStringify.d.mts +3 -12
  112. package/dist/v1/libs/TinyAdvancedRaffle.cjs +64 -50
  113. package/dist/v1/libs/TinyAdvancedRaffle.d.mts +64 -116
  114. package/dist/v1/libs/TinyAdvancedRaffle.mjs +62 -49
  115. package/dist/v1/libs/TinyAfterScrollWatcher.cjs +17 -1
  116. package/dist/v1/libs/TinyAfterScrollWatcher.d.mts +15 -19
  117. package/dist/v1/libs/TinyAfterScrollWatcher.mjs +15 -1
  118. package/dist/v1/libs/TinyAnalogClock.cjs +60 -0
  119. package/dist/v1/libs/TinyAnalogClock.d.mts +12 -9
  120. package/dist/v1/libs/TinyAnalogClock.mjs +57 -0
  121. package/dist/v1/libs/TinyArrayComparator.d.mts +14 -20
  122. package/dist/v1/libs/TinyArrayPaginator.d.mts +22 -26
  123. package/dist/v1/libs/TinyClassManager/TinyPluginInliner.d.mts +8 -8
  124. package/dist/v1/libs/TinyClassManager.cjs +5 -7
  125. package/dist/v1/libs/TinyClassManager.d.mts +16 -16
  126. package/dist/v1/libs/TinyClassManager.mjs +5 -6
  127. package/dist/v1/libs/TinyClipboard.cjs +2 -0
  128. package/dist/v1/libs/TinyClipboard.d.mts +12 -5
  129. package/dist/v1/libs/TinyClipboard.mjs +2 -0
  130. package/dist/v1/libs/TinyColorConverter.cjs +1 -0
  131. package/dist/v1/libs/TinyColorConverter.d.mts +10 -32
  132. package/dist/v1/libs/TinyColorConverter.mjs +1 -0
  133. package/dist/v1/libs/TinyColorValidator.d.mts +145 -184
  134. package/dist/v1/libs/TinyCookieConsent.d.mts +17 -17
  135. package/dist/v1/libs/TinyDayNightCycle.cjs +67 -42
  136. package/dist/v1/libs/TinyDayNightCycle.d.mts +87 -117
  137. package/dist/v1/libs/TinyDayNightCycle.mjs +65 -41
  138. package/dist/v1/libs/TinyDomReadyManager.d.mts +8 -16
  139. package/dist/v1/libs/TinyDragDropDetector.cjs +25 -0
  140. package/dist/v1/libs/TinyDragDropDetector.d.mts +32 -26
  141. package/dist/v1/libs/TinyDragDropDetector.mjs +22 -0
  142. package/dist/v1/libs/TinyDragger.cjs +46 -19
  143. package/dist/v1/libs/TinyDragger.d.mts +82 -81
  144. package/dist/v1/libs/TinyDragger.mjs +45 -18
  145. package/dist/v1/libs/TinyElementObserver.cjs +39 -0
  146. package/dist/v1/libs/TinyElementObserver.d.mts +28 -25
  147. package/dist/v1/libs/TinyElementObserver.mjs +36 -0
  148. package/dist/v1/libs/TinyGamepad.cjs +131 -2
  149. package/dist/v1/libs/TinyGamepad.d.mts +50 -122
  150. package/dist/v1/libs/TinyGamepad.mjs +129 -2
  151. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.cjs +2 -25
  152. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.d.mts +19 -25
  153. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.mjs +3 -27
  154. package/dist/v1/libs/TinyHtml/TinyHtmlButton.cjs +2 -1
  155. package/dist/v1/libs/TinyHtml/TinyHtmlButton.d.mts +55 -55
  156. package/dist/v1/libs/TinyHtml/TinyHtmlButton.mjs +2 -1
  157. package/dist/v1/libs/TinyHtml/TinyHtmlCanvas.d.mts +6 -6
  158. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.cjs +8 -4
  159. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.d.mts +19 -21
  160. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.mjs +7 -4
  161. package/dist/v1/libs/TinyHtml/TinyHtmlEmbed.d.mts +8 -8
  162. package/dist/v1/libs/TinyHtml/TinyHtmlForm.d.mts +18 -18
  163. package/dist/v1/libs/TinyHtml/TinyHtmlIcon.d.mts +5 -6
  164. package/dist/v1/libs/TinyHtml/TinyHtmlIframe.d.mts +19 -19
  165. package/dist/v1/libs/TinyHtml/TinyHtmlImage.cjs +0 -28
  166. package/dist/v1/libs/TinyHtml/TinyHtmlImage.d.mts +22 -28
  167. package/dist/v1/libs/TinyHtml/TinyHtmlImage.mjs +1 -27
  168. package/dist/v1/libs/TinyHtml/TinyHtmlInput.d.mts +11 -11
  169. package/dist/v1/libs/TinyHtml/TinyHtmlLink.d.mts +23 -23
  170. package/dist/v1/libs/TinyHtml/TinyHtmlMedia.d.mts +26 -26
  171. package/dist/v1/libs/TinyHtml/TinyHtmlScript.cjs +4 -30
  172. package/dist/v1/libs/TinyHtml/TinyHtmlScript.d.mts +20 -26
  173. package/dist/v1/libs/TinyHtml/TinyHtmlScript.mjs +5 -32
  174. package/dist/v1/libs/TinyHtml/TinyHtmlSelect.d.mts +19 -19
  175. package/dist/v1/libs/TinyHtml/TinyHtmlStyle.d.mts +8 -8
  176. package/dist/v1/libs/TinyHtml/TinyHtmlTemplate.d.mts +26 -28
  177. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.cjs +14 -15
  178. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.d.mts +32 -32
  179. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.mjs +15 -15
  180. package/dist/v1/libs/TinyHtml/index.d.mts +102 -45
  181. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.cjs +11 -9
  182. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.d.mts +21 -21
  183. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.mjs +11 -9
  184. package/dist/v1/libs/TinyHtml/input/TinyHtmlFileInput.d.mts +11 -11
  185. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.cjs +4 -4
  186. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.d.mts +17 -13
  187. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.mjs +4 -4
  188. package/dist/v1/libs/TinyHtml/input/TinyHtmlImageInput.d.mts +21 -21
  189. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.cjs +5 -4
  190. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.d.mts +14 -14
  191. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.mjs +5 -4
  192. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.cjs +4 -3
  193. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.d.mts +10 -10
  194. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.mjs +4 -3
  195. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.cjs +4 -3
  196. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.d.mts +19 -19
  197. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.mjs +4 -3
  198. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.cjs +5 -4
  199. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.d.mts +11 -11
  200. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.mjs +5 -4
  201. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.cjs +4 -3
  202. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.d.mts +15 -11
  203. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.mjs +4 -3
  204. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.cjs +49 -21
  205. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.d.mts +34 -20
  206. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.mjs +45 -20
  207. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.cjs +1 -1
  208. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.d.mts +14 -14
  209. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.mjs +1 -1
  210. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.cjs +1 -1
  211. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.d.mts +14 -14
  212. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.mjs +1 -1
  213. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.cjs +48 -25
  214. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.d.mts +27 -21
  215. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.mjs +40 -27
  216. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.cjs +1 -1
  217. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.d.mts +14 -14
  218. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.mjs +1 -1
  219. package/dist/v1/libs/TinyHtml/input/number/TinyHtmlNumberInput.d.mts +14 -14
  220. package/dist/v1/libs/TinyHtml/input/number/TinyHtmlRangeInput.d.mts +14 -14
  221. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlEmailInput.d.mts +25 -21
  222. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlPasswordInput.d.mts +18 -18
  223. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlSearchInput.d.mts +33 -29
  224. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTelInput.d.mts +22 -22
  225. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTextInput.d.mts +18 -18
  226. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlUrlInput.d.mts +31 -27
  227. package/dist/v1/libs/TinyHtml/media/TinyHtmlAudio.d.mts +35 -11
  228. package/dist/v1/libs/TinyHtml/media/TinyHtmlObject.d.mts +10 -10
  229. package/dist/v1/libs/TinyHtml/media/TinyHtmlSource.d.mts +12 -12
  230. package/dist/v1/libs/TinyHtml/media/TinyHtmlVideo.d.mts +35 -27
  231. package/dist/v1/libs/TinyHtml.cjs +4 -5
  232. package/dist/v1/libs/TinyHtml.d.mts +1503 -1731
  233. package/dist/v1/libs/TinyHtml.mjs +5 -6
  234. package/dist/v1/libs/TinyI18.cjs +61 -0
  235. package/dist/v1/libs/TinyI18.d.mts +34 -58
  236. package/dist/v1/libs/TinyI18.mjs +55 -0
  237. package/dist/v1/libs/TinyIframeEvents.cjs +19 -2
  238. package/dist/v1/libs/TinyIframeEvents.d.mts +29 -38
  239. package/dist/v1/libs/TinyIframeEvents.mjs +19 -2
  240. package/dist/v1/libs/TinyInventory.d.mts +78 -141
  241. package/dist/v1/libs/TinyInventoryTrader.d.mts +19 -22
  242. package/dist/v1/libs/TinyLevelUp.d.mts +10 -13
  243. package/dist/v1/libs/TinyLoadingScreen.d.mts +21 -31
  244. package/dist/v1/libs/TinyLocalStorage.cjs +48 -0
  245. package/dist/v1/libs/TinyLocalStorage.d.mts +11 -30
  246. package/dist/v1/libs/TinyLocalStorage.mjs +45 -0
  247. package/dist/v1/libs/TinyMamdaniInferenceSystem.d.mts +37 -23
  248. package/dist/v1/libs/TinyMediaPlayer.cjs +77 -3
  249. package/dist/v1/libs/TinyMediaPlayer.d.mts +109 -106
  250. package/dist/v1/libs/TinyMediaPlayer.mjs +71 -3
  251. package/dist/v1/libs/TinyNeedBar.d.mts +25 -37
  252. package/dist/v1/libs/TinyNewWinEvents.cjs +29 -0
  253. package/dist/v1/libs/TinyNewWinEvents.d.mts +32 -29
  254. package/dist/v1/libs/TinyNewWinEvents.mjs +26 -0
  255. package/dist/v1/libs/TinyNotifications.d.mts +6 -6
  256. package/dist/v1/libs/TinyNotifyCenter.cjs +36 -0
  257. package/dist/v1/libs/TinyNotifyCenter.d.mts +15 -15
  258. package/dist/v1/libs/TinyNotifyCenter.mjs +32 -0
  259. package/dist/v1/libs/TinyPromiseQueue.d.mts +11 -11
  260. package/dist/v1/libs/TinyRadioFm.cjs +70 -12
  261. package/dist/v1/libs/TinyRadioFm.d.mts +45 -80
  262. package/dist/v1/libs/TinyRadioFm.mjs +64 -12
  263. package/dist/v1/libs/TinyRateLimiter.cjs +52 -0
  264. package/dist/v1/libs/TinyRateLimiter.d.mts +29 -36
  265. package/dist/v1/libs/TinyRateLimiter.mjs +48 -0
  266. package/dist/v1/libs/TinySimpleDice.d.mts +17 -36
  267. package/dist/v1/libs/TinySmartScroller.cjs +52 -3
  268. package/dist/v1/libs/TinySmartScroller.d.mts +62 -70
  269. package/dist/v1/libs/TinySmartScroller.mjs +51 -5
  270. package/dist/v1/libs/TinyTextDiffer.cjs +19 -18
  271. package/dist/v1/libs/TinyTextDiffer.d.mts +11 -13
  272. package/dist/v1/libs/TinyTextDiffer.mjs +16 -17
  273. package/dist/v1/libs/TinyTextRangeEditor.d.mts +8 -8
  274. package/dist/v1/libs/TinyTextarea.cjs +19 -0
  275. package/dist/v1/libs/TinyTextarea.d.mts +34 -28
  276. package/dist/v1/libs/TinyTextarea.mjs +17 -0
  277. package/dist/v1/libs/TinyTimeout.cjs +11 -1
  278. package/dist/v1/libs/TinyTimeout.d.mts +14 -14
  279. package/dist/v1/libs/TinyTimeout.mjs +9 -1
  280. package/dist/v1/libs/TinyToastNotify.cjs +36 -1
  281. package/dist/v1/libs/TinyToastNotify.d.mts +15 -17
  282. package/dist/v1/libs/TinyToastNotify.mjs +32 -1
  283. package/dist/v1/libs/TinyUploadClicker.cjs +19 -0
  284. package/dist/v1/libs/TinyUploadClicker.d.mts +38 -8
  285. package/dist/v1/libs/TinyUploadClicker.mjs +17 -0
  286. package/dist/v1/libs/UltraRandomMsgGen.cjs +148 -35
  287. package/dist/v1/libs/UltraRandomMsgGen.d.mts +52 -78
  288. package/dist/v1/libs/UltraRandomMsgGen.mjs +133 -34
  289. package/dist/v1/libs/utils.cjs +21 -0
  290. package/dist/v1/libs/utils.d.mts +6 -0
  291. package/dist/v1/libs/utils.mjs +16 -0
  292. package/docs/v1/README.md +1 -0
  293. package/docs/v1/basics/array.md +2 -2
  294. package/docs/v1/basics/deprecated/html.md +17 -0
  295. package/docs/v1/basics/fullScreen.md +1 -1
  296. package/docs/v1/basics/html.md +12 -26
  297. package/docs/v1/basics/mediaContent.md +1 -1
  298. package/docs/v1/basics/objChecker.md +1 -1
  299. package/docs/v1/basics/text.md +2 -2
  300. package/docs/v1/fileManager/main.md +1 -1
  301. package/docs/v1/libs/ColorSafeStringify.md +1 -1
  302. package/docs/v1/libs/TinyAfterScrollWatcher.md +1 -1
  303. package/docs/v1/libs/TinyAnalogClock.md +1 -1
  304. package/docs/v1/libs/TinyArrayComparator.md +1 -1
  305. package/docs/v1/libs/TinyArrayPaginator.md +1 -1
  306. package/docs/v1/libs/TinyClassManager/TinyPluginInliner.md +2 -2
  307. package/docs/v1/libs/TinyClassManager.md +1 -1
  308. package/docs/v1/libs/TinyClipboard.md +1 -1
  309. package/docs/v1/libs/TinyCookieConsent.md +1 -1
  310. package/docs/v1/libs/TinyDomReadyManager.md +1 -1
  311. package/docs/v1/libs/TinyDragDropDetector.md +1 -1
  312. package/docs/v1/libs/TinyDragger.md +1 -1
  313. package/docs/v1/libs/TinyElementObserver.md +1 -1
  314. package/docs/v1/libs/TinyHtml.md +1 -1
  315. package/docs/v1/libs/TinyIframeEvents.md +2 -2
  316. package/docs/v1/libs/TinyLevelUp.md +1 -1
  317. package/docs/v1/libs/TinyLoadingScreen.md +1 -1
  318. package/docs/v1/libs/TinyNewWinEvents.md +2 -2
  319. package/docs/v1/libs/TinyNotifications.md +1 -1
  320. package/docs/v1/libs/TinyPromiseQueue.md +2 -2
  321. package/docs/v1/libs/TinyTextDiffer.md +1 -1
  322. package/docs/v1/libs/TinyTextarea.md +1 -1
  323. package/package.json +11 -2
@@ -1,3 +1,5 @@
1
+ import { createCheckDestroyed } from './utils.mjs';
2
+ const checkDestroy = createCheckDestroyed('TinyRateLimiter');
1
3
  /**
2
4
  * Callback triggered when a group's stored hit history exceeds
3
5
  * the configured memory limit.
@@ -66,6 +68,19 @@
66
68
  * and safe to use in long-running Node.js processes.
67
69
  */
68
70
  class TinyRateLimiter {
71
+ /**
72
+ * Tracks whether the instance has been destroyed.
73
+ * @type {boolean}
74
+ */
75
+ #destroyed = false;
76
+ /**
77
+ * Gets the current destruction status of the instance.
78
+ *
79
+ * @returns {boolean} True if the instance is destroyed, false otherwise.
80
+ */
81
+ get destroyed() {
82
+ return this.#destroyed;
83
+ }
69
84
  /**
70
85
  * Maximum number of timestamps stored per group.
71
86
  * When exceeded, older entries are discarded.
@@ -170,6 +185,7 @@ class TinyRateLimiter {
170
185
  * @param {OnMemoryExceeded} callback
171
186
  */
172
187
  setOnMemoryExceeded(callback) {
188
+ checkDestroy(this.#destroyed);
173
189
  if (typeof callback !== 'function')
174
190
  throw new Error('onMemoryExceeded must be a function');
175
191
  this.#onMemoryExceeded = callback;
@@ -178,6 +194,7 @@ class TinyRateLimiter {
178
194
  * Removes the memory-exceeded callback.
179
195
  */
180
196
  clearOnMemoryExceeded() {
197
+ checkDestroy(this.#destroyed);
181
198
  this.#onMemoryExceeded = null;
182
199
  }
183
200
  /**
@@ -195,6 +212,7 @@ class TinyRateLimiter {
195
212
  * @param {OnGroupExpired} callback - A function that receives the expired groupId.
196
213
  */
197
214
  setOnGroupExpired(callback) {
215
+ checkDestroy(this.#destroyed);
198
216
  if (typeof callback !== 'function')
199
217
  throw new Error('onGroupExpired must be a function');
200
218
  this.#onGroupExpired = callback;
@@ -203,6 +221,7 @@ class TinyRateLimiter {
203
221
  * Removes the group-expiration callback.
204
222
  */
205
223
  clearOnGroupExpired() {
224
+ checkDestroy(this.#destroyed);
206
225
  this.#onGroupExpired = null;
207
226
  }
208
227
  /**
@@ -262,6 +281,7 @@ class TinyRateLimiter {
262
281
  * @returns {boolean}
263
282
  */
264
283
  isGroupId(id) {
284
+ checkDestroy(this.#destroyed);
265
285
  const result = this.groupFlags.get(id);
266
286
  return typeof result === 'boolean' ? result : false;
267
287
  }
@@ -271,6 +291,7 @@ class TinyRateLimiter {
271
291
  * @returns {string[]}
272
292
  */
273
293
  getUsersInGroup(groupId) {
294
+ checkDestroy(this.#destroyed);
274
295
  const users = [];
275
296
  for (const [userId, assignedGroup] of this.userToGroup.entries()) {
276
297
  if (assignedGroup === groupId) {
@@ -285,6 +306,7 @@ class TinyRateLimiter {
285
306
  * @param {number} ttl
286
307
  */
287
308
  setGroupTTL(groupId, ttl) {
309
+ checkDestroy(this.#destroyed);
288
310
  if (typeof ttl !== 'number' || !Number.isFinite(ttl) || ttl <= 0)
289
311
  throw new Error('TTL must be a positive number in milliseconds');
290
312
  this.groupTTL.set(groupId, ttl);
@@ -295,6 +317,7 @@ class TinyRateLimiter {
295
317
  * @returns {number|null}
296
318
  */
297
319
  getGroupTTL(groupId) {
320
+ checkDestroy(this.#destroyed);
298
321
  return this.groupTTL.get(groupId) ?? null;
299
322
  }
300
323
  /**
@@ -302,6 +325,7 @@ class TinyRateLimiter {
302
325
  * @param {string} groupId
303
326
  */
304
327
  deleteGroupTTL(groupId) {
328
+ checkDestroy(this.#destroyed);
305
329
  this.groupTTL.delete(groupId);
306
330
  }
307
331
  /**
@@ -315,6 +339,7 @@ class TinyRateLimiter {
315
339
  * @throws {Error} If the user belongs to another group
316
340
  */
317
341
  assignToGroup(userId, groupId) {
342
+ checkDestroy(this.#destroyed);
318
343
  const existingGroup = this.userToGroup.get(userId);
319
344
  if (existingGroup && existingGroup !== groupId)
320
345
  throw new Error(`User ${userId} is already assigned to group ${existingGroup}`);
@@ -363,6 +388,7 @@ class TinyRateLimiter {
363
388
  * @returns {string}
364
389
  */
365
390
  getGroupId(userId) {
391
+ checkDestroy(this.#destroyed);
366
392
  return this.userToGroup.get(userId) || userId; // fallback: use userId as own group
367
393
  }
368
394
  /**
@@ -388,6 +414,7 @@ class TinyRateLimiter {
388
414
  * @param {string} userId
389
415
  */
390
416
  hit(userId) {
417
+ checkDestroy(this.#destroyed);
391
418
  const groupId = this.getGroupId(userId);
392
419
  const now = Date.now();
393
420
  if (!this.groupData.has(groupId)) {
@@ -437,6 +464,7 @@ class TinyRateLimiter {
437
464
  * @returns {boolean}
438
465
  */
439
466
  isRateLimited(userId) {
467
+ checkDestroy(this.#destroyed);
440
468
  const groupId = this.getGroupId(userId);
441
469
  if (!this.groupData.has(groupId))
442
470
  return false;
@@ -468,6 +496,7 @@ class TinyRateLimiter {
468
496
  * @param {string} groupId
469
497
  */
470
498
  resetGroup(groupId) {
499
+ checkDestroy(this.#destroyed);
471
500
  this.groupFlags.delete(groupId);
472
501
  this.groupData.delete(groupId);
473
502
  this.lastSeen.delete(groupId);
@@ -478,6 +507,7 @@ class TinyRateLimiter {
478
507
  * @param {string} userId
479
508
  */
480
509
  resetUserGroup(userId) {
510
+ checkDestroy(this.#destroyed);
481
511
  this.userToGroup.delete(userId);
482
512
  }
483
513
  /**
@@ -486,6 +516,7 @@ class TinyRateLimiter {
486
516
  * @param {number[]} timestamps
487
517
  */
488
518
  setData(groupId, timestamps) {
519
+ checkDestroy(this.#destroyed);
489
520
  if (!Array.isArray(timestamps))
490
521
  throw new Error('timestamps must be an array of numbers.');
491
522
  for (const t of timestamps) {
@@ -504,6 +535,7 @@ class TinyRateLimiter {
504
535
  * @returns {boolean}
505
536
  */
506
537
  hasData(groupId) {
538
+ checkDestroy(this.#destroyed);
507
539
  return this.groupData.has(groupId);
508
540
  }
509
541
  /**
@@ -512,6 +544,7 @@ class TinyRateLimiter {
512
544
  * @returns {number[]}
513
545
  */
514
546
  getData(groupId) {
547
+ checkDestroy(this.#destroyed);
515
548
  return this.groupData.get(groupId) || [];
516
549
  }
517
550
  /**
@@ -519,6 +552,7 @@ class TinyRateLimiter {
519
552
  * @returns {number}
520
553
  */
521
554
  getMaxIdle() {
555
+ checkDestroy(this.#destroyed);
522
556
  if (typeof this.#maxIdle !== 'number' || !Number.isFinite(this.#maxIdle) || this.#maxIdle < 0) {
523
557
  throw new Error("'maxIdle' must be a non-negative finite number.");
524
558
  }
@@ -529,6 +563,7 @@ class TinyRateLimiter {
529
563
  * @param {number} ms
530
564
  */
531
565
  setMaxIdle(ms) {
566
+ checkDestroy(this.#destroyed);
532
567
  if (typeof ms !== 'number' || !Number.isFinite(ms) || ms < 0) {
533
568
  throw new Error("'maxIdle' must be a non-negative finite number.");
534
569
  }
@@ -559,6 +594,7 @@ class TinyRateLimiter {
559
594
  * @returns {string[]}
560
595
  */
561
596
  getActiveGroups() {
597
+ checkDestroy(this.#destroyed);
562
598
  return Array.from(this.groupData.keys());
563
599
  }
564
600
  /**
@@ -566,6 +602,7 @@ class TinyRateLimiter {
566
602
  * @returns {Record<string, string>}
567
603
  */
568
604
  getAllUserMappings() {
605
+ checkDestroy(this.#destroyed);
569
606
  return Object.fromEntries(this.userToGroup);
570
607
  }
571
608
  /**
@@ -577,6 +614,7 @@ class TinyRateLimiter {
577
614
  * @returns {number}
578
615
  */
579
616
  getInterval() {
617
+ checkDestroy(this.#destroyed);
580
618
  if (typeof this.#interval !== 'number' || !Number.isFinite(this.#interval)) {
581
619
  throw new Error("'interval' is not a valid finite number.");
582
620
  }
@@ -587,6 +625,7 @@ class TinyRateLimiter {
587
625
  * @returns {number}
588
626
  */
589
627
  getMaxHits() {
628
+ checkDestroy(this.#destroyed);
590
629
  if (typeof this.#maxHits !== 'number' || !Number.isFinite(this.#maxHits)) {
591
630
  throw new Error("'maxHits' is not a valid finite number.");
592
631
  }
@@ -598,6 +637,7 @@ class TinyRateLimiter {
598
637
  * @returns {number}
599
638
  */
600
639
  getTotalHits(groupId) {
640
+ checkDestroy(this.#destroyed);
601
641
  const history = this.groupData.get(groupId);
602
642
  return Array.isArray(history) ? history.length : 0;
603
643
  }
@@ -607,6 +647,7 @@ class TinyRateLimiter {
607
647
  * @returns {number|null}
608
648
  */
609
649
  getLastHit(groupId) {
650
+ checkDestroy(this.#destroyed);
610
651
  const history = this.groupData.get(groupId);
611
652
  return history?.length ? history[history.length - 1] : null;
612
653
  }
@@ -616,6 +657,7 @@ class TinyRateLimiter {
616
657
  * @returns {number|null}
617
658
  */
618
659
  getTimeSinceLastHit(groupId) {
660
+ checkDestroy(this.#destroyed);
619
661
  const last = this.getLastHit(groupId);
620
662
  return last !== null ? Date.now() - last : null;
621
663
  }
@@ -640,6 +682,7 @@ class TinyRateLimiter {
640
682
  * @returns {number|null}
641
683
  */
642
684
  getAverageHitSpacing(groupId) {
685
+ checkDestroy(this.#destroyed);
643
686
  return this._calculateAverageSpacing(this.groupData.get(groupId));
644
687
  }
645
688
  /**
@@ -653,6 +696,7 @@ class TinyRateLimiter {
653
696
  * }}
654
697
  */
655
698
  getMetrics(groupId) {
699
+ checkDestroy(this.#destroyed);
656
700
  const history = this.groupData.get(groupId);
657
701
  if (!Array.isArray(history) || history.length === 0) {
658
702
  return {
@@ -677,6 +721,8 @@ class TinyRateLimiter {
677
721
  * Destroy the rate limiter, stopping cleanup and clearing data
678
722
  */
679
723
  destroy() {
724
+ if (this.destroyed)
725
+ return;
680
726
  if (this.#cleanupTimer)
681
727
  clearInterval(this.#cleanupTimer);
682
728
  this._cleanup();
@@ -685,6 +731,8 @@ class TinyRateLimiter {
685
731
  this.userToGroup.clear();
686
732
  this.groupTTL.clear();
687
733
  this.groupFlags.clear();
734
+ // Lock the instance
735
+ this.#destroyed = true;
688
736
  }
689
737
  }
690
738
  export default TinyRateLimiter;
@@ -1,24 +1,7 @@
1
- export default TinySimpleDice;
2
- /**
3
- * Represents a list of values used in dice modifier operations.
4
- *
5
- * Each entry can be either:
6
- * - A number (representing a fixed numeric value), or
7
- * - An object describing a dice roll, containing:
8
- * - `value`: The rolled result.
9
- * - `sides`: The number of sides of the die (e.g., 6 for a d6).
10
- *
11
- * Examples of valid entries:
12
- * - `5` → a direct numeric value
13
- * - `{ value: 3, sides: 6 }` → result of rolling a d6
14
- */
15
1
  export type DiceModifiersValues = (number | {
16
2
  value: number;
17
3
  sides: number;
18
4
  })[];
19
- /**
20
- * Represents the result after applying all dice modifiers to a roll.
21
- */
22
5
  export type ApplyDiceModifiersResult = {
23
6
  /**
24
7
  * - The final computed value after all modifiers and dice results are processed.
@@ -29,9 +12,6 @@ export type ApplyDiceModifiersResult = {
29
12
  */
30
13
  steps: ApplyDiceModifiersStep[];
31
14
  };
32
- /**
33
- * Represents a single step in the dice-modification process.
34
- */
35
15
  export type ApplyDiceModifiersStep = {
36
16
  /**
37
17
  * - The parsed tokens used in this step after normalization.
@@ -106,6 +86,7 @@ export type ApplyDiceModifiersStep = {
106
86
  * values suitable for indexing arrays or Sets.
107
87
  */
108
88
  declare class TinySimpleDice {
89
+ #private;
109
90
  /**
110
91
  * Safely evaluates a mathematical expression (supports +, -, *, /, %, **, parentheses, fractions and decimals).
111
92
  * This function ensures only valid math characters are processed.
@@ -222,16 +203,10 @@ declare class TinySimpleDice {
222
203
  */
223
204
  static rollArrayIndex(arr: any[] | Set<any>): number;
224
205
  /**
225
- * Creates a new TinySimpleDice instance.
226
- * @param {Object} options - Configuration options for the dice.
227
- * @param {number} options.maxValue - Maximum value the dice can roll.
228
- * @param {boolean} [options.allowZero=true] - Whether 0 is allowed as a result.
229
- * @throws {TypeError} If maxValue is not a non-negative integer or allowZero is not boolean.
206
+ * Maximum value the dice can roll.
207
+ * @type {number}
230
208
  */
231
- constructor({ maxValue, allowZero }: {
232
- maxValue: number;
233
- allowZero?: boolean | undefined;
234
- });
209
+ get maxValue(): number;
235
210
  /**
236
211
  * Set the maximum value the dice can roll.
237
212
  * @param {number} value - New maximum value (must be a non-negative integer)
@@ -239,10 +214,10 @@ declare class TinySimpleDice {
239
214
  */
240
215
  set maxValue(value: number);
241
216
  /**
242
- * Maximum value the dice can roll.
243
- * @type {number}
217
+ * Whether 0 is allowed as a result.
218
+ * @type {boolean}
244
219
  */
245
- get maxValue(): number;
220
+ get allowZero(): boolean;
246
221
  /**
247
222
  * Set whether 0 is allowed as a result.
248
223
  * @param {boolean} value - true to allow 0, false to disallow
@@ -250,15 +225,21 @@ declare class TinySimpleDice {
250
225
  */
251
226
  set allowZero(value: boolean);
252
227
  /**
253
- * Whether 0 is allowed as a result.
254
- * @type {boolean}
228
+ * Creates a new TinySimpleDice instance.
229
+ * @param {Object} options - Configuration options for the dice.
230
+ * @param {number} options.maxValue - Maximum value the dice can roll.
231
+ * @param {boolean} [options.allowZero=true] - Whether 0 is allowed as a result.
232
+ * @throws {TypeError} If maxValue is not a non-negative integer or allowZero is not boolean.
255
233
  */
256
- get allowZero(): boolean;
234
+ constructor({ maxValue, allowZero }: {
235
+ maxValue: number;
236
+ allowZero?: boolean;
237
+ });
257
238
  /**
258
239
  * Rolls the dice according to the configuration.
259
240
  * @returns {number} - Random number according to the dice configuration.
260
241
  */
261
242
  roll(): number;
262
- #private;
263
243
  }
244
+ export default TinySimpleDice;
264
245
  //# sourceMappingURL=TinySimpleDice.d.mts.map