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.
- package/changelog/1/28/1.md +23 -0
- package/changelog/1/28/2.md +43 -0
- package/dist/_/numbers.d.mts +91 -16
- package/dist/v1/TinyAdvancedRaffle.min.js +1 -1
- package/dist/v1/TinyAfterScrollWatcher.min.js +1 -1
- package/dist/v1/TinyAnalogClock.min.js +1 -1
- package/dist/v1/TinyBasicsEs.min.js +1 -1
- package/dist/v1/TinyDayNightCycle.min.js +1 -1
- package/dist/v1/TinyDragDropDetector.min.js +1 -1
- package/dist/v1/TinyDragger.min.js +1 -1
- package/dist/v1/TinyElementObserver.min.js +1 -1
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyGamepad.min.js +1 -1
- package/dist/v1/TinyHtml.min.js +1 -1
- package/dist/v1/TinyI18.min.js +1 -1
- package/dist/v1/TinyIframeEvents.min.js +1 -1
- package/dist/v1/TinyLocalStorage.min.js +1 -1
- package/dist/v1/TinyMediaPlayer.min.js +1 -1
- package/dist/v1/TinyNewWinEvents.min.js +1 -1
- package/dist/v1/TinyNotifyCenter.min.js +1 -1
- package/dist/v1/TinyRadioFm.min.js +1 -1
- package/dist/v1/TinyRateLimiter.min.js +1 -1
- package/dist/v1/TinySmartScroller.min.js +1 -1
- package/dist/v1/TinyTextDiffer.min.js +1 -1
- package/dist/v1/TinyTextarea.min.js +1 -1
- package/dist/v1/TinyTimeout.min.js +1 -1
- package/dist/v1/TinyToastNotify.min.js +1 -1
- package/dist/v1/TinyUploadClicker.min.js +1 -1
- package/dist/v1/UltraRandomMsgGen.min.js +1 -1
- package/dist/v1/basics/array.cjs +57 -9
- package/dist/v1/basics/array.d.mts +28 -12
- package/dist/v1/basics/array.mjs +51 -9
- package/dist/v1/basics/clock.cjs +94 -42
- package/dist/v1/basics/clock.d.mts +22 -22
- package/dist/v1/basics/clock.mjs +91 -54
- package/dist/v1/basics/collision.d.mts +245 -104
- package/dist/v1/basics/deprecated/html.cjs +246 -0
- package/dist/v1/basics/deprecated/html.d.mts +63 -0
- package/dist/v1/basics/deprecated/html.mjs +190 -0
- package/dist/v1/basics/extendObjType/Buffer.d.mts +1 -1
- package/dist/v1/basics/fullScreen.d.mts +47 -7
- package/dist/v1/basics/html.cjs +149 -130
- package/dist/v1/basics/html.d.mts +69 -113
- package/dist/v1/basics/html.mjs +113 -105
- package/dist/v1/basics/index.cjs +2 -0
- package/dist/v1/basics/index.d.mts +11 -65
- package/dist/v1/basics/index.mjs +3 -3
- package/dist/v1/basics/mediaContent.cjs +116 -32
- package/dist/v1/basics/mediaContent.d.mts +143 -159
- package/dist/v1/basics/mediaContent.mjs +105 -33
- package/dist/v1/basics/objChecker.cjs +7 -5
- package/dist/v1/basics/objChecker.d.mts +5 -4
- package/dist/v1/basics/objChecker.mjs +6 -6
- package/dist/v1/basics/objFilter.cjs +71 -14
- package/dist/v1/basics/objFilter.d.mts +16 -19
- package/dist/v1/basics/objFilter.mjs +63 -14
- package/dist/v1/basics/simpleMath.cjs +81 -25
- package/dist/v1/basics/simpleMath.d.mts +22 -22
- package/dist/v1/basics/simpleMath.mjs +70 -27
- package/dist/v1/basics/text.cjs +76 -31
- package/dist/v1/basics/text.d.mts +64 -14
- package/dist/v1/basics/text.mjs +62 -31
- package/dist/v1/build/ColorSafeStringify.d.mts +1 -1
- package/dist/v1/build/TinyAdvancedRaffle.d.mts +1 -1
- package/dist/v1/build/TinyAfterScrollWatcher.d.mts +1 -1
- package/dist/v1/build/TinyAnalogClock.d.mts +1 -1
- package/dist/v1/build/TinyArrayComparator.d.mts +1 -1
- package/dist/v1/build/TinyArrayPaginator.d.mts +1 -1
- package/dist/v1/build/TinyClassManager.d.mts +1 -1
- package/dist/v1/build/TinyClipboard.d.mts +1 -1
- package/dist/v1/build/TinyColorConverter.d.mts +1 -1
- package/dist/v1/build/TinyColorValidator.d.mts +1 -1
- package/dist/v1/build/TinyCookieConsent.d.mts +1 -1
- package/dist/v1/build/TinyDayNightCycle.d.mts +1 -1
- package/dist/v1/build/TinyDomReadyManager.d.mts +1 -1
- package/dist/v1/build/TinyDragDropDetector.d.mts +1 -1
- package/dist/v1/build/TinyDragger.d.mts +1 -1
- package/dist/v1/build/TinyElementObserver.d.mts +1 -1
- package/dist/v1/build/TinyGamepad.d.mts +1 -1
- package/dist/v1/build/TinyHtml.d.mts +1 -1
- package/dist/v1/build/TinyI18.d.mts +1 -1
- package/dist/v1/build/TinyIframeEvents.d.mts +1 -1
- package/dist/v1/build/TinyInventory.d.mts +1 -1
- package/dist/v1/build/TinyInventoryTrader.d.mts +1 -1
- package/dist/v1/build/TinyLevelUp.d.mts +1 -1
- package/dist/v1/build/TinyLoadingScreen.d.mts +1 -1
- package/dist/v1/build/TinyLocalStorage.d.mts +1 -1
- package/dist/v1/build/TinyMediaPlayer.d.mts +1 -1
- package/dist/v1/build/TinyNeedBar.d.mts +1 -1
- package/dist/v1/build/TinyNewWinEvents.d.mts +1 -1
- package/dist/v1/build/TinyNotifications.d.mts +1 -1
- package/dist/v1/build/TinyNotifyCenter.d.mts +1 -1
- package/dist/v1/build/TinyPromiseQueue.d.mts +1 -1
- package/dist/v1/build/TinyRadioFm.d.mts +1 -1
- package/dist/v1/build/TinyRateLimiter.d.mts +1 -1
- package/dist/v1/build/TinySimpleDice.d.mts +1 -1
- package/dist/v1/build/TinySmartScroller.d.mts +1 -1
- package/dist/v1/build/TinyTextDiffer.d.mts +1 -1
- package/dist/v1/build/TinyTextRangeEditor.d.mts +1 -1
- package/dist/v1/build/TinyTextarea.d.mts +1 -1
- package/dist/v1/build/TinyTimeout.d.mts +1 -1
- package/dist/v1/build/TinyToastNotify.d.mts +1 -1
- package/dist/v1/build/TinyUploadClicker.d.mts +1 -1
- package/dist/v1/build/UltraRandomMsgGen.d.mts +1 -1
- package/dist/v1/fileManager/asyncFuncs.d.mts +13 -13
- package/dist/v1/fileManager/index.d.mts +3 -29
- package/dist/v1/fileManager/normalFuncs.d.mts +22 -22
- package/dist/v1/index.cjs +4 -0
- package/dist/v1/index.d.mts +54 -137
- package/dist/v1/index.mjs +4 -3
- package/dist/v1/libs/ColorSafeStringify.d.mts +3 -12
- package/dist/v1/libs/TinyAdvancedRaffle.cjs +64 -50
- package/dist/v1/libs/TinyAdvancedRaffle.d.mts +64 -116
- package/dist/v1/libs/TinyAdvancedRaffle.mjs +62 -49
- package/dist/v1/libs/TinyAfterScrollWatcher.cjs +17 -1
- package/dist/v1/libs/TinyAfterScrollWatcher.d.mts +15 -19
- package/dist/v1/libs/TinyAfterScrollWatcher.mjs +15 -1
- package/dist/v1/libs/TinyAnalogClock.cjs +60 -0
- package/dist/v1/libs/TinyAnalogClock.d.mts +12 -9
- package/dist/v1/libs/TinyAnalogClock.mjs +57 -0
- package/dist/v1/libs/TinyArrayComparator.d.mts +14 -20
- package/dist/v1/libs/TinyArrayPaginator.d.mts +22 -26
- package/dist/v1/libs/TinyClassManager/TinyPluginInliner.d.mts +8 -8
- package/dist/v1/libs/TinyClassManager.cjs +5 -7
- package/dist/v1/libs/TinyClassManager.d.mts +16 -16
- package/dist/v1/libs/TinyClassManager.mjs +5 -6
- package/dist/v1/libs/TinyClipboard.cjs +2 -0
- package/dist/v1/libs/TinyClipboard.d.mts +12 -5
- package/dist/v1/libs/TinyClipboard.mjs +2 -0
- package/dist/v1/libs/TinyColorConverter.cjs +1 -0
- package/dist/v1/libs/TinyColorConverter.d.mts +10 -32
- package/dist/v1/libs/TinyColorConverter.mjs +1 -0
- package/dist/v1/libs/TinyColorValidator.d.mts +145 -184
- package/dist/v1/libs/TinyCookieConsent.d.mts +17 -17
- package/dist/v1/libs/TinyDayNightCycle.cjs +67 -42
- package/dist/v1/libs/TinyDayNightCycle.d.mts +87 -117
- package/dist/v1/libs/TinyDayNightCycle.mjs +65 -41
- package/dist/v1/libs/TinyDomReadyManager.d.mts +8 -16
- package/dist/v1/libs/TinyDragDropDetector.cjs +25 -0
- package/dist/v1/libs/TinyDragDropDetector.d.mts +32 -26
- package/dist/v1/libs/TinyDragDropDetector.mjs +22 -0
- package/dist/v1/libs/TinyDragger.cjs +46 -19
- package/dist/v1/libs/TinyDragger.d.mts +82 -81
- package/dist/v1/libs/TinyDragger.mjs +45 -18
- package/dist/v1/libs/TinyElementObserver.cjs +39 -0
- package/dist/v1/libs/TinyElementObserver.d.mts +28 -25
- package/dist/v1/libs/TinyElementObserver.mjs +36 -0
- package/dist/v1/libs/TinyGamepad.cjs +131 -2
- package/dist/v1/libs/TinyGamepad.d.mts +50 -122
- package/dist/v1/libs/TinyGamepad.mjs +129 -2
- package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.cjs +2 -25
- package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.d.mts +19 -25
- package/dist/v1/libs/TinyHtml/TinyHtmlAnchor.mjs +3 -27
- package/dist/v1/libs/TinyHtml/TinyHtmlButton.cjs +2 -1
- package/dist/v1/libs/TinyHtml/TinyHtmlButton.d.mts +55 -55
- package/dist/v1/libs/TinyHtml/TinyHtmlButton.mjs +2 -1
- package/dist/v1/libs/TinyHtml/TinyHtmlCanvas.d.mts +6 -6
- package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.cjs +8 -4
- package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.d.mts +19 -21
- package/dist/v1/libs/TinyHtml/TinyHtmlDatalist.mjs +7 -4
- package/dist/v1/libs/TinyHtml/TinyHtmlEmbed.d.mts +8 -8
- package/dist/v1/libs/TinyHtml/TinyHtmlForm.d.mts +18 -18
- package/dist/v1/libs/TinyHtml/TinyHtmlIcon.d.mts +5 -6
- package/dist/v1/libs/TinyHtml/TinyHtmlIframe.d.mts +19 -19
- package/dist/v1/libs/TinyHtml/TinyHtmlImage.cjs +0 -28
- package/dist/v1/libs/TinyHtml/TinyHtmlImage.d.mts +22 -28
- package/dist/v1/libs/TinyHtml/TinyHtmlImage.mjs +1 -27
- package/dist/v1/libs/TinyHtml/TinyHtmlInput.d.mts +11 -11
- package/dist/v1/libs/TinyHtml/TinyHtmlLink.d.mts +23 -23
- package/dist/v1/libs/TinyHtml/TinyHtmlMedia.d.mts +26 -26
- package/dist/v1/libs/TinyHtml/TinyHtmlScript.cjs +4 -30
- package/dist/v1/libs/TinyHtml/TinyHtmlScript.d.mts +20 -26
- package/dist/v1/libs/TinyHtml/TinyHtmlScript.mjs +5 -32
- package/dist/v1/libs/TinyHtml/TinyHtmlSelect.d.mts +19 -19
- package/dist/v1/libs/TinyHtml/TinyHtmlStyle.d.mts +8 -8
- package/dist/v1/libs/TinyHtml/TinyHtmlTemplate.d.mts +26 -28
- package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.cjs +14 -15
- package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.d.mts +32 -32
- package/dist/v1/libs/TinyHtml/TinyHtmlTextarea.mjs +15 -15
- package/dist/v1/libs/TinyHtml/index.d.mts +102 -45
- package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.cjs +11 -9
- package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.d.mts +21 -21
- package/dist/v1/libs/TinyHtml/input/TinyHtmlColorInput.mjs +11 -9
- package/dist/v1/libs/TinyHtml/input/TinyHtmlFileInput.d.mts +11 -11
- package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.cjs +4 -4
- package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.d.mts +17 -13
- package/dist/v1/libs/TinyHtml/input/TinyHtmlHiddenInput.mjs +4 -4
- package/dist/v1/libs/TinyHtml/input/TinyHtmlImageInput.d.mts +21 -21
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.cjs +5 -4
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlButtonInput.mjs +5 -4
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.cjs +4 -3
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.d.mts +10 -10
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlResetInput.mjs +4 -3
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.cjs +4 -3
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.d.mts +19 -19
- package/dist/v1/libs/TinyHtml/input/button/TinyHtmlSubmitInput.mjs +4 -3
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.cjs +5 -4
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.d.mts +11 -11
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlCheckboxInput.mjs +5 -4
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.cjs +4 -3
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.d.mts +15 -11
- package/dist/v1/libs/TinyHtml/input/check/TinyHtmlRadioInput.mjs +4 -3
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.cjs +49 -21
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.d.mts +34 -20
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateInput.mjs +45 -20
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.cjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlDateTimeInput.mjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.cjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlMonthInput.mjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.cjs +48 -25
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.d.mts +27 -21
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlTimeInput.mjs +40 -27
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.cjs +1 -1
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/date/TinyHtmlWeekInput.mjs +1 -1
- package/dist/v1/libs/TinyHtml/input/number/TinyHtmlNumberInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/number/TinyHtmlRangeInput.d.mts +14 -14
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlEmailInput.d.mts +25 -21
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlPasswordInput.d.mts +18 -18
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlSearchInput.d.mts +33 -29
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTelInput.d.mts +22 -22
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlTextInput.d.mts +18 -18
- package/dist/v1/libs/TinyHtml/input/text/TinyHtmlUrlInput.d.mts +31 -27
- package/dist/v1/libs/TinyHtml/media/TinyHtmlAudio.d.mts +35 -11
- package/dist/v1/libs/TinyHtml/media/TinyHtmlObject.d.mts +10 -10
- package/dist/v1/libs/TinyHtml/media/TinyHtmlSource.d.mts +12 -12
- package/dist/v1/libs/TinyHtml/media/TinyHtmlVideo.d.mts +35 -27
- package/dist/v1/libs/TinyHtml.cjs +4 -5
- package/dist/v1/libs/TinyHtml.d.mts +1503 -1731
- package/dist/v1/libs/TinyHtml.mjs +5 -6
- package/dist/v1/libs/TinyI18.cjs +61 -0
- package/dist/v1/libs/TinyI18.d.mts +34 -58
- package/dist/v1/libs/TinyI18.mjs +55 -0
- package/dist/v1/libs/TinyIframeEvents.cjs +19 -2
- package/dist/v1/libs/TinyIframeEvents.d.mts +29 -38
- package/dist/v1/libs/TinyIframeEvents.mjs +19 -2
- package/dist/v1/libs/TinyInventory.d.mts +78 -141
- package/dist/v1/libs/TinyInventoryTrader.d.mts +19 -22
- package/dist/v1/libs/TinyLevelUp.d.mts +10 -13
- package/dist/v1/libs/TinyLoadingScreen.d.mts +21 -31
- package/dist/v1/libs/TinyLocalStorage.cjs +48 -0
- package/dist/v1/libs/TinyLocalStorage.d.mts +11 -30
- package/dist/v1/libs/TinyLocalStorage.mjs +45 -0
- package/dist/v1/libs/TinyMamdaniInferenceSystem.d.mts +37 -23
- package/dist/v1/libs/TinyMediaPlayer.cjs +77 -3
- package/dist/v1/libs/TinyMediaPlayer.d.mts +109 -106
- package/dist/v1/libs/TinyMediaPlayer.mjs +71 -3
- package/dist/v1/libs/TinyNeedBar.d.mts +25 -37
- package/dist/v1/libs/TinyNewWinEvents.cjs +29 -0
- package/dist/v1/libs/TinyNewWinEvents.d.mts +32 -29
- package/dist/v1/libs/TinyNewWinEvents.mjs +26 -0
- package/dist/v1/libs/TinyNotifications.d.mts +6 -6
- package/dist/v1/libs/TinyNotifyCenter.cjs +36 -0
- package/dist/v1/libs/TinyNotifyCenter.d.mts +15 -15
- package/dist/v1/libs/TinyNotifyCenter.mjs +32 -0
- package/dist/v1/libs/TinyPromiseQueue.d.mts +11 -11
- package/dist/v1/libs/TinyRadioFm.cjs +70 -12
- package/dist/v1/libs/TinyRadioFm.d.mts +45 -80
- package/dist/v1/libs/TinyRadioFm.mjs +64 -12
- package/dist/v1/libs/TinyRateLimiter.cjs +52 -0
- package/dist/v1/libs/TinyRateLimiter.d.mts +29 -36
- package/dist/v1/libs/TinyRateLimiter.mjs +48 -0
- package/dist/v1/libs/TinySimpleDice.d.mts +17 -36
- package/dist/v1/libs/TinySmartScroller.cjs +52 -3
- package/dist/v1/libs/TinySmartScroller.d.mts +62 -70
- package/dist/v1/libs/TinySmartScroller.mjs +51 -5
- package/dist/v1/libs/TinyTextDiffer.cjs +19 -18
- package/dist/v1/libs/TinyTextDiffer.d.mts +11 -13
- package/dist/v1/libs/TinyTextDiffer.mjs +16 -17
- package/dist/v1/libs/TinyTextRangeEditor.d.mts +8 -8
- package/dist/v1/libs/TinyTextarea.cjs +19 -0
- package/dist/v1/libs/TinyTextarea.d.mts +34 -28
- package/dist/v1/libs/TinyTextarea.mjs +17 -0
- package/dist/v1/libs/TinyTimeout.cjs +11 -1
- package/dist/v1/libs/TinyTimeout.d.mts +14 -14
- package/dist/v1/libs/TinyTimeout.mjs +9 -1
- package/dist/v1/libs/TinyToastNotify.cjs +36 -1
- package/dist/v1/libs/TinyToastNotify.d.mts +15 -17
- package/dist/v1/libs/TinyToastNotify.mjs +32 -1
- package/dist/v1/libs/TinyUploadClicker.cjs +19 -0
- package/dist/v1/libs/TinyUploadClicker.d.mts +38 -8
- package/dist/v1/libs/TinyUploadClicker.mjs +17 -0
- package/dist/v1/libs/UltraRandomMsgGen.cjs +148 -35
- package/dist/v1/libs/UltraRandomMsgGen.d.mts +52 -78
- package/dist/v1/libs/UltraRandomMsgGen.mjs +133 -34
- package/dist/v1/libs/utils.cjs +21 -0
- package/dist/v1/libs/utils.d.mts +6 -0
- package/dist/v1/libs/utils.mjs +16 -0
- package/docs/v1/README.md +1 -0
- package/docs/v1/basics/array.md +2 -2
- package/docs/v1/basics/deprecated/html.md +17 -0
- package/docs/v1/basics/fullScreen.md +1 -1
- package/docs/v1/basics/html.md +12 -26
- package/docs/v1/basics/mediaContent.md +1 -1
- package/docs/v1/basics/objChecker.md +1 -1
- package/docs/v1/basics/text.md +2 -2
- package/docs/v1/fileManager/main.md +1 -1
- package/docs/v1/libs/ColorSafeStringify.md +1 -1
- package/docs/v1/libs/TinyAfterScrollWatcher.md +1 -1
- package/docs/v1/libs/TinyAnalogClock.md +1 -1
- package/docs/v1/libs/TinyArrayComparator.md +1 -1
- package/docs/v1/libs/TinyArrayPaginator.md +1 -1
- package/docs/v1/libs/TinyClassManager/TinyPluginInliner.md +2 -2
- package/docs/v1/libs/TinyClassManager.md +1 -1
- package/docs/v1/libs/TinyClipboard.md +1 -1
- package/docs/v1/libs/TinyCookieConsent.md +1 -1
- package/docs/v1/libs/TinyDomReadyManager.md +1 -1
- package/docs/v1/libs/TinyDragDropDetector.md +1 -1
- package/docs/v1/libs/TinyDragger.md +1 -1
- package/docs/v1/libs/TinyElementObserver.md +1 -1
- package/docs/v1/libs/TinyHtml.md +1 -1
- package/docs/v1/libs/TinyIframeEvents.md +2 -2
- package/docs/v1/libs/TinyLevelUp.md +1 -1
- package/docs/v1/libs/TinyLoadingScreen.md +1 -1
- package/docs/v1/libs/TinyNewWinEvents.md +2 -2
- package/docs/v1/libs/TinyNotifications.md +1 -1
- package/docs/v1/libs/TinyPromiseQueue.md +2 -2
- package/docs/v1/libs/TinyTextDiffer.md +1 -1
- package/docs/v1/libs/TinyTextarea.md +1 -1
- 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
|
-
*
|
|
226
|
-
* @
|
|
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
|
-
|
|
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
|
-
*
|
|
243
|
-
* @type {
|
|
217
|
+
* Whether 0 is allowed as a result.
|
|
218
|
+
* @type {boolean}
|
|
244
219
|
*/
|
|
245
|
-
get
|
|
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
|
-
*
|
|
254
|
-
* @
|
|
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
|
-
|
|
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
|