tiny-essentials 1.28.1 → 1.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/changelog/1/28/2.md +43 -0
  2. package/changelog/1/28/3.md +9 -0
  3. package/dist/_/numbers.d.mts +91 -16
  4. package/dist/v1/TinyBasicsEs.min.js +1 -1
  5. package/dist/v1/TinyEssentials.min.js +1 -1
  6. package/dist/v1/TinyMediaPlayer.min.js +1 -1
  7. package/dist/v1/TinyRadioFm.min.js +1 -1
  8. package/dist/v1/basics/array.d.mts +14 -14
  9. package/dist/v1/basics/clock.cjs +15 -15
  10. package/dist/v1/basics/clock.d.mts +21 -21
  11. package/dist/v1/basics/clock.mjs +15 -15
  12. package/dist/v1/basics/collision.d.mts +245 -104
  13. package/dist/v1/basics/deprecated/html.d.mts +33 -33
  14. package/dist/v1/basics/extendObjType/Buffer.d.mts +1 -1
  15. package/dist/v1/basics/fullScreen.d.mts +47 -7
  16. package/dist/v1/basics/html.d.mts +52 -61
  17. package/dist/v1/basics/index.cjs +2 -0
  18. package/dist/v1/basics/index.d.mts +11 -67
  19. package/dist/v1/basics/index.mjs +2 -2
  20. package/dist/v1/basics/mediaContent.cjs +65 -23
  21. package/dist/v1/basics/mediaContent.d.mts +144 -73
  22. package/dist/v1/basics/mediaContent.mjs +65 -23
  23. package/dist/v1/basics/objChecker.d.mts +2 -2
  24. package/dist/v1/basics/objFilter.cjs +50 -16
  25. package/dist/v1/basics/objFilter.d.mts +34 -13
  26. package/dist/v1/basics/objFilter.mjs +48 -16
  27. package/dist/v1/basics/simpleMath.d.mts +21 -21
  28. package/dist/v1/basics/text.d.mts +34 -46
  29. package/dist/v1/build/ColorSafeStringify.d.mts +1 -1
  30. package/dist/v1/build/TinyAdvancedRaffle.d.mts +1 -1
  31. package/dist/v1/build/TinyAfterScrollWatcher.d.mts +1 -1
  32. package/dist/v1/build/TinyAnalogClock.d.mts +1 -1
  33. package/dist/v1/build/TinyArrayComparator.d.mts +1 -1
  34. package/dist/v1/build/TinyArrayPaginator.d.mts +1 -1
  35. package/dist/v1/build/TinyClassManager.d.mts +1 -1
  36. package/dist/v1/build/TinyClipboard.d.mts +1 -1
  37. package/dist/v1/build/TinyColorConverter.d.mts +1 -1
  38. package/dist/v1/build/TinyColorValidator.d.mts +1 -1
  39. package/dist/v1/build/TinyCookieConsent.d.mts +1 -1
  40. package/dist/v1/build/TinyDayNightCycle.d.mts +1 -1
  41. package/dist/v1/build/TinyDomReadyManager.d.mts +1 -1
  42. package/dist/v1/build/TinyDragDropDetector.d.mts +1 -1
  43. package/dist/v1/build/TinyDragger.d.mts +1 -1
  44. package/dist/v1/build/TinyElementObserver.d.mts +1 -1
  45. package/dist/v1/build/TinyGamepad.d.mts +1 -1
  46. package/dist/v1/build/TinyHtml.d.mts +1 -1
  47. package/dist/v1/build/TinyI18.d.mts +1 -1
  48. package/dist/v1/build/TinyIframeEvents.d.mts +1 -1
  49. package/dist/v1/build/TinyInventory.d.mts +1 -1
  50. package/dist/v1/build/TinyInventoryTrader.d.mts +1 -1
  51. package/dist/v1/build/TinyLevelUp.d.mts +1 -1
  52. package/dist/v1/build/TinyLoadingScreen.d.mts +1 -1
  53. package/dist/v1/build/TinyLocalStorage.d.mts +1 -1
  54. package/dist/v1/build/TinyMediaPlayer.d.mts +1 -1
  55. package/dist/v1/build/TinyNeedBar.d.mts +1 -1
  56. package/dist/v1/build/TinyNewWinEvents.d.mts +1 -1
  57. package/dist/v1/build/TinyNotifications.d.mts +1 -1
  58. package/dist/v1/build/TinyNotifyCenter.d.mts +1 -1
  59. package/dist/v1/build/TinyPromiseQueue.d.mts +1 -1
  60. package/dist/v1/build/TinyRadioFm.d.mts +1 -1
  61. package/dist/v1/build/TinyRateLimiter.d.mts +1 -1
  62. package/dist/v1/build/TinySimpleDice.d.mts +1 -1
  63. package/dist/v1/build/TinySmartScroller.d.mts +1 -1
  64. package/dist/v1/build/TinyTextDiffer.d.mts +1 -1
  65. package/dist/v1/build/TinyTextRangeEditor.d.mts +1 -1
  66. package/dist/v1/build/TinyTextarea.d.mts +1 -1
  67. package/dist/v1/build/TinyTimeout.d.mts +1 -1
  68. package/dist/v1/build/TinyToastNotify.d.mts +1 -1
  69. package/dist/v1/build/TinyUploadClicker.d.mts +1 -1
  70. package/dist/v1/build/UltraRandomMsgGen.d.mts +1 -1
  71. package/dist/v1/fileManager/asyncFuncs.d.mts +13 -13
  72. package/dist/v1/fileManager/index.d.mts +3 -29
  73. package/dist/v1/fileManager/normalFuncs.d.mts +22 -22
  74. package/dist/v1/index.cjs +2 -0
  75. package/dist/v1/index.d.mts +53 -139
  76. package/dist/v1/index.mjs +2 -2
  77. package/dist/v1/libs/ColorSafeStringify.d.mts +3 -12
  78. package/dist/v1/libs/TinyAdvancedRaffle.d.mts +60 -103
  79. package/dist/v1/libs/TinyAfterScrollWatcher.d.mts +11 -18
  80. package/dist/v1/libs/TinyAnalogClock.d.mts +8 -11
  81. package/dist/v1/libs/TinyArrayComparator.d.mts +14 -20
  82. package/dist/v1/libs/TinyArrayPaginator.d.mts +22 -26
  83. package/dist/v1/libs/TinyClassManager/TinyPluginInliner.d.mts +8 -8
  84. package/dist/v1/libs/TinyClassManager.cjs +5 -7
  85. package/dist/v1/libs/TinyClassManager.d.mts +16 -16
  86. package/dist/v1/libs/TinyClassManager.mjs +5 -6
  87. package/dist/v1/libs/TinyClipboard.d.mts +8 -3
  88. package/dist/v1/libs/TinyColorConverter.d.mts +8 -31
  89. package/dist/v1/libs/TinyColorValidator.d.mts +145 -184
  90. package/dist/v1/libs/TinyCookieConsent.d.mts +17 -17
  91. package/dist/v1/libs/TinyDayNightCycle.d.mts +85 -110
  92. package/dist/v1/libs/TinyDomReadyManager.d.mts +8 -16
  93. package/dist/v1/libs/TinyDragDropDetector.d.mts +30 -30
  94. package/dist/v1/libs/TinyDragger.d.mts +82 -81
  95. package/dist/v1/libs/TinyElementObserver.d.mts +25 -28
  96. package/dist/v1/libs/TinyGamepad.cjs +0 -1
  97. package/dist/v1/libs/TinyGamepad.d.mts +50 -122
  98. package/dist/v1/libs/TinyGamepad.mjs +0 -1
  99. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.cjs +2 -25
  100. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.d.mts +19 -25
  101. package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.mjs +3 -27
  102. package/dist/v1/libs/TinyHtml/TinyHtmlButton.cjs +2 -1
  103. package/dist/v1/libs/TinyHtml/TinyHtmlButton.d.mts +55 -55
  104. package/dist/v1/libs/TinyHtml/TinyHtmlButton.mjs +2 -1
  105. package/dist/v1/libs/TinyHtml/TinyHtmlCanvas.d.mts +6 -6
  106. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.cjs +8 -4
  107. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.d.mts +19 -21
  108. package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.mjs +7 -4
  109. package/dist/v1/libs/TinyHtml/TinyHtmlEmbed.d.mts +8 -8
  110. package/dist/v1/libs/TinyHtml/TinyHtmlForm.d.mts +18 -18
  111. package/dist/v1/libs/TinyHtml/TinyHtmlIcon.d.mts +5 -6
  112. package/dist/v1/libs/TinyHtml/TinyHtmlIframe.d.mts +19 -19
  113. package/dist/v1/libs/TinyHtml/TinyHtmlImage.cjs +0 -28
  114. package/dist/v1/libs/TinyHtml/TinyHtmlImage.d.mts +22 -28
  115. package/dist/v1/libs/TinyHtml/TinyHtmlImage.mjs +1 -27
  116. package/dist/v1/libs/TinyHtml/TinyHtmlInput.d.mts +11 -11
  117. package/dist/v1/libs/TinyHtml/TinyHtmlLink.d.mts +23 -23
  118. package/dist/v1/libs/TinyHtml/TinyHtmlMedia.d.mts +26 -26
  119. package/dist/v1/libs/TinyHtml/TinyHtmlScript.cjs +4 -30
  120. package/dist/v1/libs/TinyHtml/TinyHtmlScript.d.mts +20 -26
  121. package/dist/v1/libs/TinyHtml/TinyHtmlScript.mjs +5 -32
  122. package/dist/v1/libs/TinyHtml/TinyHtmlSelect.d.mts +19 -19
  123. package/dist/v1/libs/TinyHtml/TinyHtmlStyle.d.mts +8 -8
  124. package/dist/v1/libs/TinyHtml/TinyHtmlTemplate.d.mts +26 -28
  125. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.cjs +14 -15
  126. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.d.mts +32 -32
  127. package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.mjs +15 -15
  128. package/dist/v1/libs/TinyHtml/index.d.mts +102 -45
  129. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.cjs +11 -9
  130. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.d.mts +21 -21
  131. package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.mjs +11 -9
  132. package/dist/v1/libs/TinyHtml/input/TinyHtmlFileInput.d.mts +11 -11
  133. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.cjs +4 -4
  134. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.d.mts +17 -13
  135. package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.mjs +4 -4
  136. package/dist/v1/libs/TinyHtml/input/TinyHtmlImageInput.d.mts +21 -21
  137. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.cjs +5 -4
  138. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.d.mts +14 -14
  139. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.mjs +5 -4
  140. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.cjs +4 -3
  141. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.d.mts +10 -10
  142. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.mjs +4 -3
  143. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.cjs +4 -3
  144. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.d.mts +19 -19
  145. package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.mjs +4 -3
  146. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.cjs +5 -4
  147. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.d.mts +11 -11
  148. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.mjs +5 -4
  149. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.cjs +4 -3
  150. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.d.mts +15 -11
  151. package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.mjs +4 -3
  152. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.cjs +49 -21
  153. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.d.mts +34 -20
  154. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.mjs +45 -20
  155. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.cjs +1 -1
  156. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.d.mts +14 -14
  157. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.mjs +1 -1
  158. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.cjs +1 -1
  159. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.d.mts +14 -14
  160. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.mjs +1 -1
  161. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.cjs +48 -25
  162. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.d.mts +27 -21
  163. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.mjs +40 -27
  164. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.cjs +1 -1
  165. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.d.mts +14 -14
  166. package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.mjs +1 -1
  167. package/dist/v1/libs/TinyHtml/input/number/TinyHtmlNumberInput.d.mts +14 -14
  168. package/dist/v1/libs/TinyHtml/input/number/TinyHtmlRangeInput.d.mts +14 -14
  169. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlEmailInput.d.mts +25 -21
  170. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlPasswordInput.d.mts +18 -18
  171. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlSearchInput.d.mts +33 -29
  172. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTelInput.d.mts +22 -22
  173. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTextInput.d.mts +18 -18
  174. package/dist/v1/libs/TinyHtml/input/text/TinyHtmlUrlInput.d.mts +31 -27
  175. package/dist/v1/libs/TinyHtml/media/TinyHtmlAudio.d.mts +35 -11
  176. package/dist/v1/libs/TinyHtml/media/TinyHtmlObject.d.mts +10 -10
  177. package/dist/v1/libs/TinyHtml/media/TinyHtmlSource.d.mts +12 -12
  178. package/dist/v1/libs/TinyHtml/media/TinyHtmlVideo.d.mts +35 -27
  179. package/dist/v1/libs/TinyHtml.cjs +3 -4
  180. package/dist/v1/libs/TinyHtml.d.mts +1503 -1731
  181. package/dist/v1/libs/TinyHtml.mjs +3 -4
  182. package/dist/v1/libs/TinyI18.d.mts +23 -61
  183. package/dist/v1/libs/TinyIframeEvents.cjs +1 -1
  184. package/dist/v1/libs/TinyIframeEvents.d.mts +29 -38
  185. package/dist/v1/libs/TinyIframeEvents.mjs +1 -1
  186. package/dist/v1/libs/TinyInventory.d.mts +78 -141
  187. package/dist/v1/libs/TinyInventoryTrader.d.mts +19 -22
  188. package/dist/v1/libs/TinyLevelUp.d.mts +10 -13
  189. package/dist/v1/libs/TinyLoadingScreen.d.mts +21 -31
  190. package/dist/v1/libs/TinyLocalStorage.d.mts +11 -36
  191. package/dist/v1/libs/TinyMamdaniInferenceSystem.d.mts +37 -23
  192. package/dist/v1/libs/TinyMediaPlayer.cjs +5 -3
  193. package/dist/v1/libs/TinyMediaPlayer.d.mts +102 -109
  194. package/dist/v1/libs/TinyMediaPlayer.mjs +5 -3
  195. package/dist/v1/libs/TinyNeedBar.d.mts +25 -37
  196. package/dist/v1/libs/TinyNewWinEvents.d.mts +29 -32
  197. package/dist/v1/libs/TinyNotifications.d.mts +6 -6
  198. package/dist/v1/libs/TinyNotifyCenter.d.mts +15 -21
  199. package/dist/v1/libs/TinyPromiseQueue.d.mts +11 -11
  200. package/dist/v1/libs/TinyRadioFm.cjs +32 -12
  201. package/dist/v1/libs/TinyRadioFm.d.mts +44 -80
  202. package/dist/v1/libs/TinyRadioFm.mjs +29 -12
  203. package/dist/v1/libs/TinyRateLimiter.d.mts +26 -39
  204. package/dist/v1/libs/TinySimpleDice.d.mts +17 -36
  205. package/dist/v1/libs/TinySmartScroller.d.mts +50 -60
  206. package/dist/v1/libs/TinyTextDiffer.d.mts +11 -14
  207. package/dist/v1/libs/TinyTextRangeEditor.d.mts +8 -8
  208. package/dist/v1/libs/TinyTextarea.d.mts +31 -31
  209. package/dist/v1/libs/TinyTimeout.d.mts +14 -14
  210. package/dist/v1/libs/TinyToastNotify.cjs +1 -1
  211. package/dist/v1/libs/TinyToastNotify.d.mts +15 -23
  212. package/dist/v1/libs/TinyToastNotify.mjs +1 -1
  213. package/dist/v1/libs/TinyUploadClicker.d.mts +38 -14
  214. package/dist/v1/libs/UltraRandomMsgGen.d.mts +44 -84
  215. package/dist/v1/libs/utils.d.mts +5 -1
  216. package/docs/v1/basics/deprecated/objFilter.md +14 -0
  217. package/docs/v1/basics/objFilter.md +31 -17
  218. package/package.json +2 -2
@@ -1,17 +1,15 @@
1
- export default TinyRadioFm;
2
- export type MediaContentBase = import("../basics/mediaContent.mjs").MediaContentBase;
3
- export type MediaContentMetadata = import("../basics/mediaContent.mjs").MediaContentMetadata;
4
- export type MediaContent = import("../basics/mediaContent.mjs").MediaContent;
5
- export type IPicture = import("../basics/mediaContent.mjs").IPicture;
6
- export type MediaNumber = import("../basics/mediaContent.mjs").MediaNumber;
7
- export type MediaLoadingError = import("../basics/mediaContent.mjs").MediaLoadingError;
8
- export type MediaLoadingErrorData = import("../basics/mediaContent.mjs").MediaLoadingErrorData;
9
- export type LoadingMediaProgress = import("../basics/mediaContent.mjs").LoadingMediaProgress;
10
- export type ParseMediaContentMetadata = import("../basics/mediaContent.mjs").ParseMediaContentMetadata;
11
- export type UnknownArtistGetter = import("../basics/mediaContent.mjs").UnknownArtistGetter;
12
- /**
13
- * Represents a content item injected at a specific point in the absolute timeline.
14
- */
1
+ import { EventEmitter } from 'events';
2
+ export type PictureDataType = import('../basics/mediaContent.mjs').PictureDataType;
3
+ export type MediaContentBase = import('../basics/mediaContent.mjs').MediaContentBase;
4
+ export type MediaContentMetadata = import('../basics/mediaContent.mjs').MediaContentMetadata<PictureDataType>;
5
+ export type MediaContent = import('../basics/mediaContent.mjs').MediaContent<PictureDataType>;
6
+ export type IPicture = import('../basics/mediaContent.mjs').IPicture;
7
+ export type MediaNumber = import('../basics/mediaContent.mjs').MediaNumber;
8
+ export type MediaLoadingError = import('../basics/mediaContent.mjs').MediaLoadingError;
9
+ export type MediaLoadingErrorData = import('../basics/mediaContent.mjs').MediaLoadingErrorData;
10
+ export type LoadingMediaProgress = import('../basics/mediaContent.mjs').LoadingMediaProgress;
11
+ export type ParseMediaContentMetadata = import('../basics/mediaContent.mjs').ParseMediaContentMetadata;
12
+ export type UnknownArtistGetter = import('../basics/mediaContent.mjs').UnknownArtistGetter;
15
13
  export type CustomPosition = {
16
14
  /**
17
15
  * - The audio/music content.
@@ -26,9 +24,6 @@ export type CustomPosition = {
26
24
  */
27
25
  originalTimestamp: number;
28
26
  };
29
- /**
30
- * Data required to relocate an existing item within a playlist.
31
- */
32
27
  export type ScheduledMovePayload = {
33
28
  /**
34
29
  * - Content ID to move.
@@ -39,13 +34,7 @@ export type ScheduledMovePayload = {
39
34
  */
40
35
  newIndex: number;
41
36
  };
42
- /**
43
- * A union type representing the various data formats a scheduled task payload can take.
44
- */
45
37
  export type ScheduledTaskPayload = MediaContent | string | ScheduledMovePayload;
46
- /**
47
- * A scheduled instruction to modify the radio state at a specific point in time.
48
- */
49
38
  export type ScheduledTask = {
50
39
  /**
51
40
  * - The absolute time to execute the action.
@@ -54,19 +43,16 @@ export type ScheduledTask = {
54
43
  /**
55
44
  * - The type of modification.
56
45
  */
57
- action: "add" | "remove" | "move";
46
+ action: 'add' | 'remove' | 'move';
58
47
  /**
59
48
  * - Target playlist.
60
49
  */
61
- type: "music" | "voice";
50
+ type: 'music' | 'voice';
62
51
  /**
63
52
  * - Data relative to the action.
64
53
  */
65
54
  payload: ScheduledTaskPayload;
66
55
  };
67
- /**
68
- * A standardized representation of an active or upcoming event in the radio timeline.
69
- */
70
56
  export type RadioEvent = {
71
57
  /**
72
58
  * - Content ID.
@@ -113,13 +99,7 @@ export type RadioEvent = {
113
99
  */
114
100
  isCustom: boolean;
115
101
  };
116
- /**
117
- * The available sequence logic modes for playlist playback.
118
- */
119
- export type RadioModes = "playlist" | "random";
120
- /**
121
- * Global configuration settings for the radio engine behavior.
122
- */
102
+ export type RadioModes = 'playlist' | 'random';
123
103
  export type RadioConfig = {
124
104
  /**
125
105
  * - Sequence mode for music.
@@ -158,16 +138,10 @@ export type RadioConfig = {
158
138
  */
159
139
  voiceMaxConsecutive: number;
160
140
  };
161
- /**
162
- * An extension of MediaContent that includes temporal boundaries within a generated cycle.
163
- */
164
141
  export type CycleBlockData = MediaContent & {
165
142
  cycleStart: number;
166
143
  cycleEnd: number;
167
144
  };
168
- /**
169
- * A structural block representing a single full iteration of the radio sequence.
170
- */
171
145
  export type CycleBlock = {
172
146
  /**
173
147
  * - Items belonging to this cycle.
@@ -178,9 +152,6 @@ export type CycleBlock = {
178
152
  */
179
153
  duration: number;
180
154
  };
181
- /**
182
- * Information about the location of a specific cycle within the absolute timeline.
183
- */
184
155
  export type CycleLocation = {
185
156
  /**
186
157
  * - The located cycle block.
@@ -195,9 +166,6 @@ export type CycleLocation = {
195
166
  */
196
167
  loopIndex: number;
197
168
  };
198
- /**
199
- * The complete state object used for exporting and importing the radio system.
200
- */
201
169
  export type TinyRadioFmImport = {
202
170
  /**
203
171
  * - The music playlist.
@@ -229,9 +197,10 @@ export type TinyRadioFmImport = {
229
197
  config: RadioConfig;
230
198
  };
231
199
  /**
200
+ * @typedef {import('../basics/mediaContent.mjs').PictureDataType} PictureDataType
232
201
  * @typedef {import('../basics/mediaContent.mjs').MediaContentBase} MediaContentBase
233
- * @typedef {import('../basics/mediaContent.mjs').MediaContentMetadata} MediaContentMetadata
234
- * @typedef {import('../basics/mediaContent.mjs').MediaContent} MediaContent
202
+ * @typedef {import('../basics/mediaContent.mjs').MediaContentMetadata<PictureDataType>} MediaContentMetadata
203
+ * @typedef {import('../basics/mediaContent.mjs').MediaContent<PictureDataType>} MediaContent
235
204
  * @typedef {import('../basics/mediaContent.mjs').IPicture} IPicture
236
205
  * @typedef {import('../basics/mediaContent.mjs').MediaNumber} MediaNumber
237
206
  * @typedef {import('../basics/mediaContent.mjs').MediaLoadingError} MediaLoadingError
@@ -329,7 +298,8 @@ export type TinyRadioFmImport = {
329
298
  * A deterministic, seed-based radio management system with scheduled adaptations and weighted random generation.
330
299
  * @beta
331
300
  */
332
- declare class TinyRadioFm extends EventEmitter<any> {
301
+ declare class TinyRadioFm extends EventEmitter {
302
+ #private;
333
303
  /**
334
304
  * A Static Factory Method that prepares a MediaContent object by
335
305
  * extracting metadata from an audio source.
@@ -351,32 +321,20 @@ declare class TinyRadioFm extends EventEmitter<any> {
351
321
  id?: string;
352
322
  weight?: number;
353
323
  }, parseFile?: ParseMediaContentMetadata, callbacks?: {
354
- onProgress?: ((progress: LoadingMediaProgress) => void) | undefined;
355
- onError?: ((error: MediaLoadingErrorData) => void) | undefined;
324
+ onProgress?: (progress: LoadingMediaProgress) => void;
325
+ onError?: (error: MediaLoadingErrorData) => void;
356
326
  }): Promise<MediaContent>;
357
327
  /**
358
- * @type {UnknownArtistGetter}
359
- * The default identifier or function used when an artist cannot be determined.
328
+ * Gets the current value used to represent unknown artists.
329
+ * @returns {UnknownArtistGetter}
360
330
  */
361
- static #unknownArtist: UnknownArtistGetter;
331
+ static get unknownArtist(): UnknownArtistGetter;
362
332
  /**
363
333
  * Sets the value used to represent unknown artists.
364
334
  * @param {UnknownArtistGetter} value - A string or a function that returns a string.
365
335
  * @throws {TypeError} If the value is neither a string nor a function.
366
336
  */
367
337
  static set unknownArtist(value: UnknownArtistGetter);
368
- /**
369
- * Gets the current value used to represent unknown artists.
370
- * @returns {UnknownArtistGetter}
371
- */
372
- static get unknownArtist(): UnknownArtistGetter;
373
- /**
374
- * Initializes the radio system.
375
- * @param {TinyRadioFmImport|null} [initialData=null] - JSON object to hydrate the radio state.
376
- * @param {number} [seed=0] - Initial seed for deterministic randomness.
377
- * @throws {TypeError} If initialData is not an object or null, or if seed is not a number.
378
- */
379
- constructor(initialData?: TinyRadioFmImport | null, seed?: number);
380
338
  get destroyed(): boolean;
381
339
  /**
382
340
  * Gets the total count of all content items (music and voice) in the system.
@@ -433,21 +391,26 @@ declare class TinyRadioFm extends EventEmitter<any> {
433
391
  * @returns {MediaContent[]} A cloned object of the cache.
434
392
  */
435
393
  get allList(): MediaContent[];
436
- /**
437
- * Sets the core randomness seed and clears the current cycle cache.
438
- * @param {number} seed - The new seed.
439
- */
440
- set seed(seed: number);
441
394
  /**
442
395
  * Gets the current randomness seed.
443
396
  * @returns {number}
444
397
  */
445
398
  get seed(): number;
399
+ /**
400
+ * Sets the core randomness seed and clears the current cycle cache.
401
+ * @param {number} seed - The new seed.
402
+ */
403
+ set seed(seed: number);
446
404
  /**
447
405
  * Gets the absolute timestamp used as the timeline anchor.
448
406
  * @returns {number}
449
407
  */
450
408
  get anchorDate(): number;
409
+ /**
410
+ * Gets a deep clone of the current radio configuration.
411
+ * @returns {RadioConfig}
412
+ */
413
+ get config(): RadioConfig;
451
414
  /**
452
415
  * Performs a complete replacement of the configuration.
453
416
  * @param {RadioConfig} config - The new full configuration object.
@@ -455,10 +418,12 @@ declare class TinyRadioFm extends EventEmitter<any> {
455
418
  */
456
419
  set config(config: RadioConfig);
457
420
  /**
458
- * Gets a deep clone of the current radio configuration.
459
- * @returns {RadioConfig}
421
+ * Initializes the radio system.
422
+ * @param {TinyRadioFmImport|null} [initialData=null] - JSON object to hydrate the radio state.
423
+ * @param {number} [seed=0] - Initial seed for deterministic randomness.
424
+ * @throws {TypeError} If initialData is not an object or null, or if seed is not a number.
460
425
  */
461
- get config(): RadioConfig;
426
+ constructor(initialData?: TinyRadioFmImport | null, seed?: number);
462
427
  /**
463
428
  * Adds new content instantly to the radio sequence.
464
429
  * @param {'music'|'voice'|'custom'} type - The category of the content.
@@ -466,7 +431,7 @@ declare class TinyRadioFm extends EventEmitter<any> {
466
431
  * @param {boolean} [smartQueue=true] - If true, delays insertion until the end of the content playing at that timestamp (only affects 'custom').
467
432
  * @throws {TypeError} If the type is invalid or the data lacks a valid ID and numerical duration.
468
433
  */
469
- add(type: "music" | "voice" | "custom", data: MediaContent & {
434
+ add(type: 'music' | 'voice' | 'custom', data: MediaContent & {
470
435
  timestamp?: number;
471
436
  }, smartQueue?: boolean): void;
472
437
  /**
@@ -478,7 +443,7 @@ declare class TinyRadioFm extends EventEmitter<any> {
478
443
  * @param {boolean} [smartQueue=true] - If true, delays the task execution until the end of the content playing at that timestamp.
479
444
  * @throws {TypeError} If arguments do not match the required types or action/type constraints.
480
445
  */
481
- scheduleTask(timestamp: number, action: "add" | "remove" | "move", type: "music" | "voice", payload: ScheduledTaskPayload, smartQueue?: boolean): void;
446
+ scheduleTask(timestamp: number, action: 'add' | 'remove' | 'move', type: 'music' | 'voice', payload: ScheduledTaskPayload, smartQueue?: boolean): void;
482
447
  /**
483
448
  * Removes content instantly by ID across all active lists, positions, and future tasks.
484
449
  * @param {string} id - The unique identifier of the content.
@@ -538,7 +503,7 @@ declare class TinyRadioFm extends EventEmitter<any> {
538
503
  /**
539
504
  * Mulberry32 Pseudo-Random Number Generator.
540
505
  * @param {number} seed - The initialization seed.
541
- * @returns {function(): number} PRNG function returning a float between 0 and 1.
506
+ * @returns {() => number} PRNG function returning a float between 0 and 1.
542
507
  * @private
543
508
  */
544
509
  private _prng;
@@ -548,7 +513,6 @@ declare class TinyRadioFm extends EventEmitter<any> {
548
513
  * @param {boolean} [destroyThumbs=true]
549
514
  */
550
515
  destroy(destroyThumbs?: boolean): void;
551
- #private;
552
516
  }
553
- import { EventEmitter } from 'events';
517
+ export default TinyRadioFm;
554
518
  //# sourceMappingURL=TinyRadioFm.d.mts.map
@@ -3,9 +3,10 @@ import { blobUrlToBase64, convertToBlobUrl, parseMediaMetadata, revokeContentUrl
3
3
  import { createCheckDestroyed } from './utils.mjs';
4
4
  const checkDestroy = createCheckDestroyed('TinyRadioFm');
5
5
  /**
6
+ * @typedef {import('../basics/mediaContent.mjs').PictureDataType} PictureDataType
6
7
  * @typedef {import('../basics/mediaContent.mjs').MediaContentBase} MediaContentBase
7
- * @typedef {import('../basics/mediaContent.mjs').MediaContentMetadata} MediaContentMetadata
8
- * @typedef {import('../basics/mediaContent.mjs').MediaContent} MediaContent
8
+ * @typedef {import('../basics/mediaContent.mjs').MediaContentMetadata<PictureDataType>} MediaContentMetadata
9
+ * @typedef {import('../basics/mediaContent.mjs').MediaContent<PictureDataType>} MediaContent
9
10
  * @typedef {import('../basics/mediaContent.mjs').IPicture} IPicture
10
11
  * @typedef {import('../basics/mediaContent.mjs').MediaNumber} MediaNumber
11
12
  * @typedef {import('../basics/mediaContent.mjs').MediaLoadingError} MediaLoadingError
@@ -503,7 +504,7 @@ class TinyRadioFm extends EventEmitter {
503
504
  .forEach((cp) => revokeContentUrls(cp.content));
504
505
  /**
505
506
  * Filter function to match items against the provided ID.
506
- * @type {function(any): boolean}
507
+ * @type {(item: any) => boolean}
507
508
  */
508
509
  const filterFn = (item) => item.id !== id && item.content?.id !== id;
509
510
  this.#musicList = this.#musicList.filter(filterFn);
@@ -608,10 +609,17 @@ class TinyRadioFm extends EventEmitter {
608
609
  return Promise.all(list.map(async (item) => {
609
610
  const newItem = structuredClone(item);
610
611
  if (newItem.picture && Array.isArray(newItem.picture)) {
611
- newItem.picture = await Promise.all(newItem.picture.map(async (pic) => ({
612
- ...pic,
613
- data: await blobUrlToBase64(pic.data),
614
- })));
612
+ newItem.picture = await Promise.all(newItem.picture.map(async (pic) => {
613
+ // Only performs the asynchronous conversion if it really is a Blob URL
614
+ if (typeof pic.data === 'string' && pic.data.startsWith('blob:')) {
615
+ return {
616
+ ...pic,
617
+ data: await blobUrlToBase64(pic.data),
618
+ };
619
+ }
620
+ // If it is a normal URL, skip the process and keep it as it is
621
+ return pic;
622
+ }));
615
623
  }
616
624
  return newItem;
617
625
  }));
@@ -695,7 +703,7 @@ class TinyRadioFm extends EventEmitter {
695
703
  /**
696
704
  * Mulberry32 Pseudo-Random Number Generator.
697
705
  * @param {number} seed - The initialization seed.
698
- * @returns {function(): number} PRNG function returning a float between 0 and 1.
706
+ * @returns {() => number} PRNG function returning a float between 0 and 1.
699
707
  * @private
700
708
  */
701
709
  _prng(seed) {
@@ -1107,10 +1115,19 @@ class TinyRadioFm extends EventEmitter {
1107
1115
  return list.map((item) => {
1108
1116
  const newItem = { ...item };
1109
1117
  if (newItem.picture && Array.isArray(newItem.picture)) {
1110
- newItem.picture = newItem.picture.map((pic) => ({
1111
- ...pic,
1112
- data: convertToBlobUrl(pic.data, pic.format),
1113
- }));
1118
+ newItem.picture = newItem.picture.map((pic) => {
1119
+ // Check whether the data is compatible with the Blob structure (Base64 or Binary)
1120
+ const isBase64 = typeof pic.data === 'string' && pic.data.startsWith('data:');
1121
+ const isUint8Array = pic.data instanceof Uint8Array;
1122
+ if (isBase64 || isUint8Array) {
1123
+ return {
1124
+ ...pic,
1125
+ data: convertToBlobUrl(pic.data, pic.format),
1126
+ };
1127
+ }
1128
+ // If it is a default web URL or local file, use the URL directly
1129
+ return pic;
1130
+ });
1114
1131
  }
1115
1132
  return newItem;
1116
1133
  });
@@ -1,18 +1,4 @@
1
- export default TinyRateLimiter;
2
- /**
3
- * Callback triggered when a group's stored hit history exceeds
4
- * the configured memory limit.
5
- *
6
- * This callback is purely informational and does not block execution.
7
- */
8
1
  export type OnMemoryExceeded = (groupId: string) => void;
9
- /**
10
- * Callback triggered when a group is considered expired and removed
11
- * during the cleanup process.
12
- *
13
- * This usually happens when the group remains inactive longer than
14
- * its configured TTL or the global maxIdle value.
15
- */
16
2
  export type OnGroupExpired = (groupId: string) => void;
17
3
  /**
18
4
  * Callback triggered when a group's stored hit history exceeds
@@ -82,30 +68,7 @@ export type OnGroupExpired = (groupId: string) => void;
82
68
  * and safe to use in long-running Node.js processes.
83
69
  */
84
70
  declare class TinyRateLimiter {
85
- /**
86
- * Creates a new TinyRateLimiter instance.
87
- *
88
- * At least one of `maxHits` or `interval` must be provided.
89
- *
90
- * @param {Object} options
91
- * @param {number|null} [options.maxMemory=100000]
92
- * Maximum timestamps stored per group (memory cap).
93
- * @param {number} [options.maxHits]
94
- * Maximum number of allowed hits.
95
- * @param {number} [options.interval]
96
- * Sliding time window in milliseconds.
97
- * @param {number} [options.cleanupInterval]
98
- * Interval (ms) for automatic cleanup execution.
99
- * @param {number} [options.maxIdle=300000]
100
- * Maximum inactivity time (ms) before a group expires.
101
- */
102
- constructor({ maxHits, interval, cleanupInterval, maxIdle, maxMemory }: {
103
- maxMemory?: number | null | undefined;
104
- maxHits?: number | undefined;
105
- interval?: number | undefined;
106
- cleanupInterval?: number | undefined;
107
- maxIdle?: number | undefined;
108
- });
71
+ #private;
109
72
  /**
110
73
  * Gets the current destruction status of the instance.
111
74
  *
@@ -176,6 +139,30 @@ declare class TinyRateLimiter {
176
139
  * Removes the group-expiration callback.
177
140
  */
178
141
  clearOnGroupExpired(): void;
142
+ /**
143
+ * Creates a new TinyRateLimiter instance.
144
+ *
145
+ * At least one of `maxHits` or `interval` must be provided.
146
+ *
147
+ * @param {Object} options
148
+ * @param {number|null} [options.maxMemory=100000]
149
+ * Maximum timestamps stored per group (memory cap).
150
+ * @param {number} [options.maxHits]
151
+ * Maximum number of allowed hits.
152
+ * @param {number} [options.interval]
153
+ * Sliding time window in milliseconds.
154
+ * @param {number} [options.cleanupInterval]
155
+ * Interval (ms) for automatic cleanup execution.
156
+ * @param {number} [options.maxIdle=300000]
157
+ * Maximum inactivity time (ms) before a group expires.
158
+ */
159
+ constructor({ maxHits, interval, cleanupInterval, maxIdle, maxMemory }: {
160
+ maxMemory?: number | null;
161
+ maxHits?: number;
162
+ interval?: number;
163
+ cleanupInterval?: number;
164
+ maxIdle?: number;
165
+ });
179
166
  /**
180
167
  * Check if a given ID is a groupId (not a userId)
181
168
  * @param {string} id
@@ -388,6 +375,6 @@ declare class TinyRateLimiter {
388
375
  * Destroy the rate limiter, stopping cleanup and clearing data
389
376
  */
390
377
  destroy(): void;
391
- #private;
392
378
  }
379
+ export default TinyRateLimiter;
393
380
  //# sourceMappingURL=TinyRateLimiter.d.mts.map
@@ -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