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('UltraRandomMsgGen');
1
3
  const defaultWords = [
2
4
  'lorem',
3
5
  'ipsum',
@@ -51,6 +53,33 @@ const defaultEmojis = [
51
53
  '🎮',
52
54
  '🥓',
53
55
  '🍮',
56
+ '🍬',
57
+ '🍓',
58
+ '🍒',
59
+ '🥝',
60
+ '🥑',
61
+ '🍄',
62
+ '🌊',
63
+ '☁️',
64
+ '🌟',
65
+ '🌙',
66
+ '🧚',
67
+ '🐾',
68
+ '🐥',
69
+ '🐼',
70
+ '🐨',
71
+ '🐳',
72
+ '✨',
73
+ '🧁',
74
+ '🌸',
75
+ '🍃',
76
+ '💎',
77
+ '🎐',
78
+ '🎀',
79
+ '🫧',
80
+ '☄️',
81
+ '🛸',
82
+ '🔮',
54
83
  ];
55
84
  const defaultNouns = [
56
85
  'pudding',
@@ -234,6 +263,14 @@ const defaultTemplates = [
234
263
  'Do {noun}s have feelings? Asking for a {adj} friend.',
235
264
  'I trusted the {noun} and all I got was a glitter-covered sock.',
236
265
  'Plot twist: the {adj} {noun} was inside us all along.',
266
+ // ✨ Magical/Dreamy (New Category)
267
+ 'In the glow of the {adj} moon, the {noun} began to {verb}.',
268
+ 'A sprinkle of {adj} dust made the {noun} {verb} through the air.',
269
+ 'The {noun} whispered a {adj} secret that made everyone {verb}.',
270
+ 'Everything felt {adj} and {adj}, especially when the {noun} {verb}ed.',
271
+ // 🌀 Chaos/Glitch (New Category)
272
+ 'The {noun} is {verb}ing! The {noun} is {verb}ing! AAAAA!',
273
+ 'Glitch in the {noun}: the {adj} {noun} just {verb}ed out of existence.',
237
274
  // Mini cute explosions and chaos
238
275
  'The {adj} {noun} {verb} and {verb} all over the {adj} {noun}!',
239
276
  'Oops! {noun}s {verb}ed into the {adj} {noun} while {verb}ing crazily.',
@@ -429,8 +466,21 @@ class UltraRandomMsgGen {
429
466
  this.#validateArray(value, 'defaultTemplates');
430
467
  this.#defaultTemplates = [...value];
431
468
  }
469
+ /**
470
+ * Tracks whether the instance has been destroyed.
471
+ * @type {boolean}
472
+ */
473
+ #destroyed = false;
474
+ /**
475
+ * Gets the current destruction status of the instance.
476
+ *
477
+ * @returns {boolean} True if the instance is destroyed, false otherwise.
478
+ */
479
+ get destroyed() {
480
+ return this.#destroyed;
481
+ }
432
482
  /** @type {MsgGenConfig} */
433
- config = {
483
+ #config = {
434
484
  minLength: 10,
435
485
  maxLength: 300,
436
486
  readable: true,
@@ -455,6 +505,15 @@ class UltraRandomMsgGen {
455
505
  emojiChance: 0.3, // 30% chance per line
456
506
  },
457
507
  };
508
+ get config() {
509
+ checkDestroy(this.#destroyed);
510
+ return structuredClone(this.#config);
511
+ }
512
+ #symbols = '!@#$%^&*()-_=+[]{}|;:,.<>?/\\~'.split('');
513
+ get symbols() {
514
+ checkDestroy(this.#destroyed);
515
+ return structuredClone(this.#symbols);
516
+ }
458
517
  /**
459
518
  * Creates an instance of UltraRandomMsgGen.
460
519
  *
@@ -485,7 +544,6 @@ class UltraRandomMsgGen {
485
544
  * @param {number} [config.line.emojiChance=0.3] - Probability (0–1) of placing emoji per line.
486
545
  */
487
546
  constructor(config = {}) {
488
- this.symbols = '!@#$%^&*()-_=+[]{}|;:,.<>?/\\~'.split('');
489
547
  const { minLength, maxLength, readable, useEmojis, includeNumbers, includeSymbols, allowWeirdSpacing, emojiSet, wordSet, mode, grammar, repeatWords, emojiPlacement, paragraphs, line, } = config;
490
548
  // Validations
491
549
  if (minLength !== undefined && (!Number.isInteger(minLength) || minLength < 1)) {
@@ -579,13 +637,13 @@ class UltraRandomMsgGen {
579
637
  throw new RangeError('config.line.emojiChance must be a number between 0 and 1');
580
638
  }
581
639
  }
582
- this.config.emojiSet = [...UltraRandomMsgGen.#defaultEmojis];
583
- this.config.wordSet = [...UltraRandomMsgGen.#defaultWords];
584
- this.config.grammar.templates = [...UltraRandomMsgGen.#defaultTemplates];
585
- this.config.grammar.nouns = [...UltraRandomMsgGen.#defaultNouns];
586
- this.config.grammar.verbs = [...UltraRandomMsgGen.#defaultVerbs];
587
- this.config.grammar.adjectives = [...UltraRandomMsgGen.#defaultAdjectives];
588
- Object.assign(this.config, config);
640
+ this.#config.emojiSet = [...UltraRandomMsgGen.#defaultEmojis];
641
+ this.#config.wordSet = [...UltraRandomMsgGen.#defaultWords];
642
+ this.#config.grammar.templates = [...UltraRandomMsgGen.#defaultTemplates];
643
+ this.#config.grammar.nouns = [...UltraRandomMsgGen.#defaultNouns];
644
+ this.#config.grammar.verbs = [...UltraRandomMsgGen.#defaultVerbs];
645
+ this.#config.grammar.adjectives = [...UltraRandomMsgGen.#defaultAdjectives];
646
+ Object.assign(this.#config, config);
589
647
  }
590
648
  /**
591
649
  * Merges new configuration values into the current instance.
@@ -593,7 +651,8 @@ class UltraRandomMsgGen {
593
651
  * @returns {this} - The instance for chaining.
594
652
  */
595
653
  configure(newConfig = {}) {
596
- Object.assign(this.config, newConfig);
654
+ checkDestroy(this.#destroyed);
655
+ Object.assign(this.#config, newConfig);
597
656
  return this;
598
657
  }
599
658
  /**
@@ -602,7 +661,8 @@ class UltraRandomMsgGen {
602
661
  * @returns {this} - The instance for chaining.
603
662
  */
604
663
  setGrammarTemplates(...templates) {
605
- this.config.grammar.templates = templates.flat();
664
+ checkDestroy(this.#destroyed);
665
+ this.#config.grammar.templates = templates.flat();
606
666
  return this;
607
667
  }
608
668
  /**
@@ -611,7 +671,8 @@ class UltraRandomMsgGen {
611
671
  * @returns {this} - The instance for chaining.
612
672
  */
613
673
  addGrammarTemplates(...templates) {
614
- this.config.grammar.templates.push(...templates.flat());
674
+ checkDestroy(this.#destroyed);
675
+ this.#config.grammar.templates.push(...templates.flat());
615
676
  return this;
616
677
  }
617
678
  /**
@@ -620,7 +681,8 @@ class UltraRandomMsgGen {
620
681
  * @returns {this} - The instance for chaining.
621
682
  */
622
683
  setGrammarNouns(...nouns) {
623
- this.config.grammar.nouns = nouns.flat();
684
+ checkDestroy(this.#destroyed);
685
+ this.#config.grammar.nouns = nouns.flat();
624
686
  return this;
625
687
  }
626
688
  /**
@@ -629,7 +691,8 @@ class UltraRandomMsgGen {
629
691
  * @returns {this} - The instance for chaining.
630
692
  */
631
693
  addGrammarNouns(...nouns) {
632
- this.config.grammar.nouns.push(...nouns.flat());
694
+ checkDestroy(this.#destroyed);
695
+ this.#config.grammar.nouns.push(...nouns.flat());
633
696
  return this;
634
697
  }
635
698
  /**
@@ -638,7 +701,8 @@ class UltraRandomMsgGen {
638
701
  * @returns {this} - The instance for chaining.
639
702
  */
640
703
  setGrammarVerbs(...verbs) {
641
- this.config.grammar.verbs = verbs.flat();
704
+ checkDestroy(this.#destroyed);
705
+ this.#config.grammar.verbs = verbs.flat();
642
706
  return this;
643
707
  }
644
708
  /**
@@ -647,7 +711,8 @@ class UltraRandomMsgGen {
647
711
  * @returns {this} - The instance for chaining.
648
712
  */
649
713
  addGrammarVerbs(...verbs) {
650
- this.config.grammar.verbs.push(...verbs.flat());
714
+ checkDestroy(this.#destroyed);
715
+ this.#config.grammar.verbs.push(...verbs.flat());
651
716
  return this;
652
717
  }
653
718
  /**
@@ -656,7 +721,8 @@ class UltraRandomMsgGen {
656
721
  * @returns {this} - The instance for chaining.
657
722
  */
658
723
  setGrammarAdjectives(...adjectives) {
659
- this.config.grammar.adjectives = adjectives.flat();
724
+ checkDestroy(this.#destroyed);
725
+ this.#config.grammar.adjectives = adjectives.flat();
660
726
  return this;
661
727
  }
662
728
  /**
@@ -665,7 +731,8 @@ class UltraRandomMsgGen {
665
731
  * @returns {this} - The instance for chaining.
666
732
  */
667
733
  addGrammarAdjectives(...adjectives) {
668
- this.config.grammar.adjectives.push(...adjectives.flat());
734
+ checkDestroy(this.#destroyed);
735
+ this.#config.grammar.adjectives.push(...adjectives.flat());
669
736
  return this;
670
737
  }
671
738
  /**
@@ -674,8 +741,9 @@ class UltraRandomMsgGen {
674
741
  * @returns {this} - The instance for chaining.
675
742
  */
676
743
  removeGrammarTemplates(...templates) {
744
+ checkDestroy(this.#destroyed);
677
745
  const removeSet = new Set(templates.flat());
678
- this.config.grammar.templates = this.config.grammar.templates.filter((t) => !removeSet.has(t));
746
+ this.#config.grammar.templates = this.#config.grammar.templates.filter((t) => !removeSet.has(t));
679
747
  return this;
680
748
  }
681
749
  /**
@@ -684,8 +752,9 @@ class UltraRandomMsgGen {
684
752
  * @returns {this} - The instance for chaining.
685
753
  */
686
754
  removeGrammarNouns(...nouns) {
755
+ checkDestroy(this.#destroyed);
687
756
  const removeSet = new Set(nouns.flat());
688
- this.config.grammar.nouns = this.config.grammar.nouns.filter((n) => !removeSet.has(n));
757
+ this.#config.grammar.nouns = this.#config.grammar.nouns.filter((n) => !removeSet.has(n));
689
758
  return this;
690
759
  }
691
760
  /**
@@ -694,8 +763,9 @@ class UltraRandomMsgGen {
694
763
  * @returns {this} - The instance for chaining.
695
764
  */
696
765
  removeGrammarVerbs(...verbs) {
766
+ checkDestroy(this.#destroyed);
697
767
  const removeSet = new Set(verbs.flat());
698
- this.config.grammar.verbs = this.config.grammar.verbs.filter((v) => !removeSet.has(v));
768
+ this.#config.grammar.verbs = this.#config.grammar.verbs.filter((v) => !removeSet.has(v));
699
769
  return this;
700
770
  }
701
771
  /**
@@ -704,8 +774,9 @@ class UltraRandomMsgGen {
704
774
  * @returns {this} - The instance for chaining.
705
775
  */
706
776
  removeGrammarAdjectives(...adjectives) {
777
+ checkDestroy(this.#destroyed);
707
778
  const removeSet = new Set(adjectives.flat());
708
- this.config.grammar.adjectives = this.config.grammar.adjectives.filter((a) => !removeSet.has(a));
779
+ this.#config.grammar.adjectives = this.#config.grammar.adjectives.filter((a) => !removeSet.has(a));
709
780
  return this;
710
781
  }
711
782
  /**
@@ -714,7 +785,8 @@ class UltraRandomMsgGen {
714
785
  * @returns {this} - The instance for chaining.
715
786
  */
716
787
  setWords(...words) {
717
- this.config.wordSet = words.flat();
788
+ checkDestroy(this.#destroyed);
789
+ this.#config.wordSet = words.flat();
718
790
  return this;
719
791
  }
720
792
  /**
@@ -723,7 +795,8 @@ class UltraRandomMsgGen {
723
795
  * @returns {this} - The instance for chaining.
724
796
  */
725
797
  addWords(...words) {
726
- this.config.wordSet.push(...words.flat());
798
+ checkDestroy(this.#destroyed);
799
+ this.#config.wordSet.push(...words.flat());
727
800
  return this;
728
801
  }
729
802
  /**
@@ -732,8 +805,9 @@ class UltraRandomMsgGen {
732
805
  * @returns {this} - The instance for chaining.
733
806
  */
734
807
  removeWords(...words) {
808
+ checkDestroy(this.#destroyed);
735
809
  const removeSet = new Set(words.flat());
736
- this.config.wordSet = this.config.wordSet.filter((word) => !removeSet.has(word));
810
+ this.#config.wordSet = this.#config.wordSet.filter((word) => !removeSet.has(word));
737
811
  return this;
738
812
  }
739
813
  /**
@@ -742,7 +816,8 @@ class UltraRandomMsgGen {
742
816
  * @returns {this} - The instance for chaining.
743
817
  */
744
818
  setEmojis(...emojis) {
745
- this.config.emojiSet = emojis.flat();
819
+ checkDestroy(this.#destroyed);
820
+ this.#config.emojiSet = emojis.flat();
746
821
  return this;
747
822
  }
748
823
  /**
@@ -751,7 +826,8 @@ class UltraRandomMsgGen {
751
826
  * @returns {this} - The instance for chaining.
752
827
  */
753
828
  addEmojis(...emojis) {
754
- this.config.emojiSet.push(...emojis.flat());
829
+ checkDestroy(this.#destroyed);
830
+ this.#config.emojiSet.push(...emojis.flat());
755
831
  return this;
756
832
  }
757
833
  /**
@@ -760,8 +836,9 @@ class UltraRandomMsgGen {
760
836
  * @returns {this} - The instance for chaining.
761
837
  */
762
838
  removeEmojis(...emojis) {
839
+ checkDestroy(this.#destroyed);
763
840
  const removeSet = new Set(emojis.flat());
764
- this.config.emojiSet = this.config.emojiSet.filter((emoji) => !removeSet.has(emoji));
841
+ this.#config.emojiSet = this.#config.emojiSet.filter((emoji) => !removeSet.has(emoji));
765
842
  return this;
766
843
  }
767
844
  /**
@@ -779,7 +856,7 @@ class UltraRandomMsgGen {
779
856
  * @returns {string} - A chunk (word, emoji, symbol, number, etc.).
780
857
  */
781
858
  _generateChunk() {
782
- const { wordSet, emojiSet, includeNumbers, includeSymbols, useEmojis, readable, mode, emojiPlacement, } = this.config;
859
+ const { wordSet, emojiSet, includeNumbers, includeSymbols, useEmojis, readable, mode, emojiPlacement, } = this.#config;
783
860
  if (mode === 'natural') {
784
861
  return this._generateNaturalSentence();
785
862
  }
@@ -794,7 +871,7 @@ class UltraRandomMsgGen {
794
871
  pools.push(Math.floor(Math.random() * 99999).toString());
795
872
  }
796
873
  if (includeSymbols) {
797
- pools.push(this._getRandomItem(this.symbols));
874
+ pools.push(this._getRandomItem(this.#symbols));
798
875
  }
799
876
  if (emojiPlacement === 'inline' && useEmojis && emojiSet.length) {
800
877
  pools.push(this._getRandomItem(emojiSet));
@@ -807,7 +884,7 @@ class UltraRandomMsgGen {
807
884
  * @returns {string} - A generated sentence.
808
885
  */
809
886
  _generateNaturalSentence() {
810
- const { templates, nouns, verbs, adjectives } = this.config.grammar;
887
+ const { templates, nouns, verbs, adjectives } = this.#config.grammar;
811
888
  let template = this._getRandomItem(templates);
812
889
  return template
813
890
  .replace(/{noun}/g, () => this._getRandomItem(nouns))
@@ -822,7 +899,7 @@ class UltraRandomMsgGen {
822
899
  * @returns {string} - A generated line.
823
900
  */
824
901
  _generateLine(targetLength, seenWords) {
825
- const { allowWeirdSpacing, repeatWords, readable, emojiSet, useEmojis, emojiPlacement, line } = this.config;
902
+ const { allowWeirdSpacing, repeatWords, readable, emojiSet, useEmojis, emojiPlacement, line } = this.#config;
826
903
  const parts = [];
827
904
  seenWords ??= new Set();
828
905
  while (parts.join(' ').length < targetLength) {
@@ -856,7 +933,7 @@ class UltraRandomMsgGen {
856
933
  * @returns {string[]} - Array of lines that form the paragraph.
857
934
  */
858
935
  _generateParagraphLines(totalLength) {
859
- const { line } = this.config;
936
+ const { line } = this.#config;
860
937
  const lines = [];
861
938
  const seenWords = new Set();
862
939
  let currentTotal = 0;
@@ -874,7 +951,8 @@ class UltraRandomMsgGen {
874
951
  * @returns {string} - A full generated message.
875
952
  */
876
953
  generate() {
877
- const { minLength, maxLength, paragraphs } = this.config;
954
+ checkDestroy(this.#destroyed);
955
+ const { minLength, maxLength, paragraphs } = this.#config;
878
956
  const totalLength = Math.floor(Math.random() * (maxLength - minLength + 1)) + minLength;
879
957
  if (paragraphs && typeof paragraphs === 'object') {
880
958
  const paraCount = Math.floor(Math.random() * (paragraphs.max - paragraphs.min + 1)) + paragraphs.min;
@@ -888,5 +966,26 @@ class UltraRandomMsgGen {
888
966
  }
889
967
  return this._generateParagraphLines(totalLength).join('\n');
890
968
  }
969
+ /**
970
+ * Safely destroys the instance by clearing references to aid garbage collection.
971
+ * Once destroyed, the instance cannot be used to generate new messages.
972
+ *
973
+ * @throws {Error} If the instance has already been destroyed.
974
+ * @returns {void}
975
+ */
976
+ destroy() {
977
+ if (this.destroyed)
978
+ return;
979
+ // Clear primary memory references
980
+ this.#symbols = [];
981
+ this.#config.emojiSet = [];
982
+ this.#config.wordSet = [];
983
+ this.#config.grammar.templates = [];
984
+ this.#config.grammar.nouns = [];
985
+ this.#config.grammar.verbs = [];
986
+ this.#config.grammar.adjectives = [];
987
+ // Lock the instance
988
+ this.#destroyed = true;
989
+ }
891
990
  }
892
991
  export default UltraRandomMsgGen;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Creates a internal method to verify if the instance was been destroyed.
5
+ * @param {string} name
6
+ */
7
+ const createCheckDestroyed =
8
+ (name) =>
9
+ /**
10
+ * Internal method to verify if the instance has been destroyed.
11
+ * Throws an error if any operation is attempted after destruction.
12
+ * @param {boolean} isDestroyed
13
+ * @throws {Error}
14
+ * @returns {void}
15
+ */
16
+ (isDestroyed) => {
17
+ if (isDestroyed)
18
+ throw new Error(`This ${name} instance has been destroyed and can no longer be used.`);
19
+ };
20
+
21
+ exports.createCheckDestroyed = createCheckDestroyed;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Creates a internal method to verify if the instance was been destroyed.
3
+ * @param {string} name
4
+ */
5
+ export declare const createCheckDestroyed: (name: string) => (isDestroyed: boolean) => void;
6
+ //# sourceMappingURL=utils.d.mts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Creates a internal method to verify if the instance was been destroyed.
3
+ * @param {string} name
4
+ */
5
+ export const createCheckDestroyed = (name) =>
6
+ /**
7
+ * Internal method to verify if the instance has been destroyed.
8
+ * Throws an error if any operation is attempted after destruction.
9
+ * @param {boolean} isDestroyed
10
+ * @throws {Error}
11
+ * @returns {void}
12
+ */
13
+ (isDestroyed) => {
14
+ if (isDestroyed)
15
+ throw new Error(`This ${name} instance has been destroyed and can no longer be used.`);
16
+ };
package/docs/v1/README.md CHANGED
@@ -62,6 +62,7 @@ Here, you can navigate through different sections of the project. Below are the
62
62
  * 🕒 **[TinyAnalogClock](./libs/TinyAnalogClock.md)** — A lightweight analog clock engine for managing time-based rotations, supporting custom offsets, smooth transitions, and easy binding to CSS variables rendering.
63
63
  * 🔍 **[TinyArrayComparator](./libs/TinyArrayComparator.md)** — A lightweight, highly optimized JavaScript utility class designed to compare two arrays and efficiently detect which items were **added** or **deleted**.
64
64
  * 🧠 **[TinyMamdaniInferenceSystem](./libs/TinyMamdaniInferenceSystem.md)** — A implementation of a Mamdani Inference System, allowing you to model logic using trapezoidal membership functions.
65
+ * 📻 **[TinyRadioFm](./libs/TinyRadioFm.md)** — It is designed to handle complex playback sequences, including music and voice playlists, scheduled timeline mutations, and custom content injections, all while maintaining absolute reproducibility through a mathematical seed.
65
66
  * ⏯️ **[TinyMediaPlayer](./libs/TinyMediaPlayer.md)** — A universal media player architecture utilizing an adapter pattern to orchestrate multiple platform APIs, featuring robust playlist management, playback controls, and weighted random selection.
66
67
 
67
68
  ### 2.1. **`libs/TinyClassManager`**
@@ -15,7 +15,7 @@ A minimal and handy module offering a couple of focused utilities for working wi
15
15
  ### 🚀 Usage
16
16
 
17
17
  ```js
18
- import { shuffleArray } from './array.mjs';
18
+ import { shuffleArray } from 'tiny-essentials/basics/array';
19
19
 
20
20
  const fruits = ['apple', 'banana', 'cherry', 'date'];
21
21
  shuffleArray(fruits);
@@ -37,7 +37,7 @@ You can find the original discussion here:
37
37
  ### 📌 Function Signature
38
38
 
39
39
  ```js
40
- arraySortPositions(item: string, isReverse?: boolean): (a: Object<string|number, *>, b: Object<string|number, *>) => number
40
+ arraySortPositions(item?: string, isReverse?: boolean): (a: Object<string|number, *>, b: Object<string|number, *>) => number
41
41
  ```
42
42
 
43
43
  ### 🧠 Parameters
@@ -0,0 +1,17 @@
1
+ ### 🌐 `fetchTemplate(...)`
2
+
3
+ Loads data from a remote URL using the Fetch API, with support for custom HTTP methods, retries, timeouts, headers, and even external abort controllers.
4
+
5
+ #### 📥 Parameters
6
+
7
+ * `url` *(string)*: The full URL to fetch from (must start with `http://`, `https://`, `/`, `./`, or `../`).
8
+ * `options` *(object)* *(optional)*:
9
+
10
+ * `signal` *(`AbortSignal` | `null`)*: Custom abort signal.
11
+ * `method` *(string)*: The HTTP method to use (e.g., `GET`, `POST`, `PUT`, `DELETE`, etc.).
12
+ * `timeout` *(number)*: Request timeout in milliseconds. Default is `0` (no timeout).
13
+ * `retries` *(number)*: Number of retry attempts if the request fails. Default is `0`.
14
+ * `headers` *(object)*: Additional headers to include in the request.
15
+ * `body` *(object)*: Request body. If the value is a plain object, it will be automatically stringified as JSON.
16
+ * `onProgress` *((loaded: number, total: number) => void)*: Track the load progress.
17
+ * `returnResponse` *((res: Response) => ResponseInit)* *(optional)*: The callback function to return the ResponseInit to ReadableStream.
@@ -167,7 +167,7 @@ import {
167
167
  isFullScreenMode,
168
168
  onFullScreenChange,
169
169
  offFullScreenChange,
170
- } from './fullScreen';
170
+ } from 'tiny-essentials/basics/fullScreen';
171
171
 
172
172
  async function toggleFullscreen() {
173
173
  if (isFullScreenMode()) {
@@ -140,24 +140,7 @@ const data = { name: 'Yasmin', type: 'dev' };
140
140
  saveJsonFile('yasmin.json', data);
141
141
  ```
142
142
 
143
- ### 🌐 `fetchTemplate(...)`
144
-
145
- Loads data from a remote URL using the Fetch API, with support for custom HTTP methods, retries, timeouts, headers, and even external abort controllers.
146
-
147
- #### 📥 Parameters
148
-
149
- * `url` *(string)*: The full URL to fetch from (must start with `http://`, `https://`, `/`, `./`, or `../`).
150
- * `options` *(object)* *(optional)*:
151
-
152
- * `signal` *(`AbortSignal` | `null`)*: Custom abort signal.
153
- * `method` *(string)*: The HTTP method to use (e.g., `GET`, `POST`, `PUT`, `DELETE`, etc.).
154
- * `timeout` *(number)*: Request timeout in milliseconds. Default is `0` (no timeout).
155
- * `retries` *(number)*: Number of retry attempts if the request fails. Default is `0`.
156
- * `headers` *(object)*: Additional headers to include in the request.
157
- * `body` *(object)*: Request body. If the value is a plain object, it will be automatically stringified as JSON.
158
- * `onProgress` *((loaded: number, total: number) => void)*: Track the load progress.
159
-
160
- #### `trackFetchProgress(response, onProgress)`
143
+ #### `trackFetchProgress(response, onProgress, returnResponse?)`
161
144
 
162
145
  Intercepts a standard Fetch API Response to track the download progress of its body stream.
163
146
 
@@ -171,14 +154,15 @@ Intercepts a standard Fetch API Response to track the download progress of its b
171
154
 
172
155
  ---
173
156
 
174
- #### `fetchJson(url, options?)`
157
+ #### `fetchJson(url, options?, onProgress?)`
175
158
 
176
159
  Loads and parses a remote JSON file.
177
160
 
178
161
  * **Parameters**:
179
162
 
180
163
  * `url` *(string)*: URL to fetch the JSON from.
181
- * `options` *(object)* *(optional)*: Same structure as `fetchTemplate`.
164
+ * `options` *(object)* *(optional)*: Same structure as `fetch`.
165
+ * `onProgress` *(callback)* *(optional)*: Same structure as `FetchOnProgressResult`.
182
166
 
183
167
  * **Returns**:
184
168
  `Promise<any[] | Record<string | number | symbol, unknown>>` — The parsed JSON data.
@@ -190,7 +174,7 @@ Loads and parses a remote JSON file.
190
174
 
191
175
  ---
192
176
 
193
- #### `fetchBlob(url, allowedMimeTypes?, options?)`
177
+ #### `fetchBlob(url, allowedMimeTypes?, options?, onProgress?)`
194
178
 
195
179
  Loads a remote file as a Blob object.
196
180
 
@@ -198,7 +182,8 @@ Loads a remote file as a Blob object.
198
182
 
199
183
  * `url` *(string)*: URL of the remote file.
200
184
  * `allowedMimeTypes` *(string\[])* *(optional)*: List of accepted MIME types.
201
- * `options` *(object)* *(optional)*: Same structure as `fetchTemplate`.
185
+ * `options` *(object)* *(optional)*: Same structure as `fetch`.
186
+ * `onProgress` *(callback)* *(optional)*: Same structure as `FetchOnProgressResult`.
202
187
 
203
188
  * **Returns**:
204
189
  `Promise<Blob>`
@@ -210,7 +195,7 @@ Loads a remote file as a Blob object.
210
195
 
211
196
  ---
212
197
 
213
- #### `fetchText(url, allowedMimeTypes?, options?)`
198
+ #### `fetchText(url, allowedMimeTypes?, options?, onProgress?)`
214
199
 
215
200
  Loads a remote file as **plain text** using the Fetch API.
216
201
 
@@ -218,7 +203,8 @@ Loads a remote file as **plain text** using the Fetch API.
218
203
 
219
204
  * `url` *(string)*: Full URL of the file to fetch.
220
205
  * `allowedMimeTypes` *(string\[])* *(optional)*: List of accepted MIME types (e.g., `['text/plain']`).
221
- * `options` *(object)* *(optional)*: Same structure as `fetchTemplate`.
206
+ * `options` *(object)* *(optional)*: Same structure as `fetch`.
207
+ * `onProgress` *(callback)* *(optional)*: Same structure as `FetchOnProgressResult`.
222
208
 
223
209
  * **Returns**:
224
210
  `Promise<string>` — The content of the file as a text string.
@@ -317,7 +303,7 @@ Perfect for UI states like dimming, pausing animations, or showing "away" status
317
303
  #### 🧪 Usage
318
304
 
319
305
  ```js
320
- import { installWindowHiddenScript } from 'tiny-essentials';
306
+ import { installWindowHiddenScript } from 'tiny-essentials/basics/html';
321
307
 
322
308
  const uninstall = installWindowHiddenScript({
323
309
  element: document.getElementById('app'),
@@ -425,7 +411,7 @@ The promise resolves to an object containing:
425
411
  #### 🧪 Example
426
412
 
427
413
  ```javascript
428
- import { loadImage } from './html.mjs';
414
+ import { loadImage } from 'tiny-essentials/basics/html';
429
415
 
430
416
  const handleLoading = (event, startTime) => {
431
417
  console.log('Started loading at:', startTime);
@@ -100,7 +100,7 @@ Downloads an audio file and uses a provided parser to extract its internal metad
100
100
 
101
101
  **1. Using a simple URL with manual overrides:**
102
102
  ```javascript
103
- import { parseMediaMetadata } from './mediaContent.mjs';
103
+ import { parseMediaMetadata } from 'tiny-essentials/basics/mediaContent';
104
104
  import { parseBlob } from 'music-metadata';
105
105
 
106
106
  // Note: We pass empty objects for default/manual if we want to jump straight to the parser
@@ -15,7 +15,7 @@ Returns the number of elements in an array or the number of keys in an object.
15
15
  ```js
16
16
  countObj([1, 2, 3]); // 3
17
17
  countObj({ a: 1, b: 2 }); // 2
18
- countObj('hi'); // 0
18
+ countObj('hi'); // Throws TypeError
19
19
  ```
20
20
 
21
21
  ---
@@ -162,7 +162,7 @@ console.log(safeTextTrim(longText, 30));
162
162
 
163
163
  ---
164
164
 
165
- ## 🔎 `diffStrings(oldStrings, newStrings)`
165
+ ## 🔎 `diffObjList(oldStrings, newStrings)`
166
166
 
167
167
  Compares two **style objects** and identifies which properties were **added**, **removed**, or **modified**.
168
168
 
@@ -177,7 +177,7 @@ Compares two **style objects** and identifies which properties were **added**, *
177
177
  **Example:**
178
178
 
179
179
  ```js
180
- diffStrings(
180
+ diffObjList(
181
181
  { color: 'red', display: 'block' },
182
182
  { color: 'blue', visibility: 'hidden' }
183
183
  );
@@ -221,7 +221,7 @@ renameFilePadNumbers('./screenshots', 4, ['.jpg']);
221
221
  ## 📦 More Example Use
222
222
 
223
223
  ```js
224
- import { readJsonFile, writeJsonFile, listFiles, backupFile } from './utils/files.js';
224
+ import { readJsonFile, writeJsonFile, listFiles, backupFile } from 'tiny-essentials/fileManager';
225
225
 
226
226
  const data = readJsonFile('./config/settings.json');
227
227
  data.debug = false;
@@ -26,7 +26,7 @@ Then import both the stable stringifier and `ColorSafeStringify`:
26
26
 
27
27
  ```js
28
28
  import stringify from 'safe-stable-stringify';
29
- import { ColorSafeStringify } from 'tiny-essentials';
29
+ import ColorSafeStringify from 'tiny-essentials/libs/ColorSafeStringify';
30
30
  ```
31
31
 
32
32
  ---
@@ -19,7 +19,7 @@ Perfect for optimizing logic that should only run **after** the user has finishe
19
19
  ## 📦 Import
20
20
 
21
21
  ```js
22
- import TinyAfterScrollWatcher from './TinyAfterScrollWatcher.mjs';
22
+ import TinyAfterScrollWatcher from 'tiny-essentials/libs/TinyAfterScrollWatcher';
23
23
  ```
24
24
 
25
25
  ---
@@ -19,7 +19,7 @@
19
19
  Import the class into your JavaScript module.
20
20
 
21
21
  ```javascript
22
- import TinyAnalogClock from './TinyAnalogClock.js';
22
+ import TinyAnalogClock from 'tiny-essentials/libs/TinyAnalogClock';
23
23
  ```
24
24
 
25
25
  ### 2. Basic Usage