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
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var events = require('events');
|
|
4
4
|
var objChecker = require('../basics/objChecker.cjs');
|
|
5
|
+
var utils = require('./utils.cjs');
|
|
6
|
+
|
|
7
|
+
const checkDestroy = utils.createCheckDestroyed('TinyIframeEvents');
|
|
5
8
|
|
|
6
9
|
/** @type {WeakMap<Window, TinyIframeEvents>} */
|
|
7
10
|
const instances = new WeakMap();
|
|
@@ -51,6 +54,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
51
54
|
#targetWindow;
|
|
52
55
|
|
|
53
56
|
get targetWindow() {
|
|
57
|
+
checkDestroy(this.#isDestroyed);
|
|
54
58
|
return this.#targetWindow;
|
|
55
59
|
}
|
|
56
60
|
|
|
@@ -58,6 +62,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
58
62
|
#targetIframeElement;
|
|
59
63
|
|
|
60
64
|
get targetIframeElement() {
|
|
65
|
+
checkDestroy(this.#isDestroyed);
|
|
61
66
|
return this.#targetIframeElement;
|
|
62
67
|
}
|
|
63
68
|
|
|
@@ -65,6 +70,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
65
70
|
#targetOrigin;
|
|
66
71
|
|
|
67
72
|
get targetOrigin() {
|
|
73
|
+
checkDestroy(this.#isDestroyed);
|
|
68
74
|
return this.#targetOrigin;
|
|
69
75
|
}
|
|
70
76
|
|
|
@@ -72,6 +78,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
72
78
|
#selfType;
|
|
73
79
|
|
|
74
80
|
get selfType() {
|
|
81
|
+
checkDestroy(this.#isDestroyed);
|
|
75
82
|
return this.#selfType;
|
|
76
83
|
}
|
|
77
84
|
|
|
@@ -82,6 +89,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
82
89
|
#ready = false;
|
|
83
90
|
|
|
84
91
|
get ready() {
|
|
92
|
+
checkDestroy(this.#isDestroyed);
|
|
85
93
|
return this.#ready;
|
|
86
94
|
}
|
|
87
95
|
|
|
@@ -89,9 +97,10 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
89
97
|
* Executes the provided callback when the secure MessageChannel connection is fully established.
|
|
90
98
|
* If the connection is already ready, the callback is executed immediately.
|
|
91
99
|
*
|
|
92
|
-
* @param {
|
|
100
|
+
* @param {() => void} handler - The callback function to execute.
|
|
93
101
|
*/
|
|
94
102
|
onReady(handler) {
|
|
103
|
+
checkDestroy(this.#isDestroyed);
|
|
95
104
|
if (this.#ready) {
|
|
96
105
|
handler();
|
|
97
106
|
} else {
|
|
@@ -168,6 +177,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
168
177
|
* @returns {string}
|
|
169
178
|
*/
|
|
170
179
|
get secretEventName() {
|
|
180
|
+
checkDestroy(this.#isDestroyed);
|
|
171
181
|
return this.#secretEventName;
|
|
172
182
|
}
|
|
173
183
|
|
|
@@ -177,6 +187,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
177
187
|
* @throws {TypeError} If the value is not a string.
|
|
178
188
|
*/
|
|
179
189
|
set secretEventName(name) {
|
|
190
|
+
checkDestroy(this.#isDestroyed);
|
|
180
191
|
if (typeof name !== 'string')
|
|
181
192
|
throw new TypeError('TinyIframeEvents: secretEventName must be a string.');
|
|
182
193
|
this.#secretEventName = name;
|
|
@@ -187,6 +198,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
187
198
|
* @returns {string}
|
|
188
199
|
*/
|
|
189
200
|
get handshakeEventName() {
|
|
201
|
+
checkDestroy(this.#isDestroyed);
|
|
190
202
|
return this.#handshakeEventName;
|
|
191
203
|
}
|
|
192
204
|
|
|
@@ -196,6 +208,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
196
208
|
* @throws {TypeError} If the value is not a string.
|
|
197
209
|
*/
|
|
198
210
|
set handshakeEventName(name) {
|
|
211
|
+
checkDestroy(this.#isDestroyed);
|
|
199
212
|
if (typeof name !== 'string')
|
|
200
213
|
throw new TypeError('TinyIframeEvents: handshakeEventName must be a string.');
|
|
201
214
|
this.#handshakeEventName = name;
|
|
@@ -206,6 +219,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
206
219
|
* @returns {string}
|
|
207
220
|
*/
|
|
208
221
|
get readyEventName() {
|
|
222
|
+
checkDestroy(this.#isDestroyed);
|
|
209
223
|
return this.#readyEventName;
|
|
210
224
|
}
|
|
211
225
|
|
|
@@ -215,6 +229,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
215
229
|
* @throws {TypeError} If the value is not a string.
|
|
216
230
|
*/
|
|
217
231
|
set readyEventName(name) {
|
|
232
|
+
checkDestroy(this.#isDestroyed);
|
|
218
233
|
if (typeof name !== 'string')
|
|
219
234
|
throw new TypeError('TinyIframeEvents: readyEventName must be a string.');
|
|
220
235
|
this.#readyEventName = name;
|
|
@@ -339,6 +354,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
339
354
|
* @throws {Error} If instance has been destroyed.
|
|
340
355
|
*/
|
|
341
356
|
winEmit(eventName, payload) {
|
|
357
|
+
checkDestroy(this.#isDestroyed);
|
|
342
358
|
if (typeof eventName !== 'string') throw new TypeError('Event name must be a string.');
|
|
343
359
|
if (this.#isDestroyed) throw new Error('Cannot emit: instance has been destroyed.');
|
|
344
360
|
|
|
@@ -372,7 +388,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
372
388
|
* Call this when the instance is no longer needed to prevent memory leaks.
|
|
373
389
|
*/
|
|
374
390
|
destroy() {
|
|
375
|
-
this.#isDestroyed
|
|
391
|
+
if (this.#isDestroyed) return;
|
|
376
392
|
this.#ready = false;
|
|
377
393
|
|
|
378
394
|
window.removeEventListener('message', this._boundWindowMessage);
|
|
@@ -389,6 +405,7 @@ class TinyIframeEvents extends events.EventEmitter {
|
|
|
389
405
|
this.removeAllListeners();
|
|
390
406
|
this.#pendingQueue = [];
|
|
391
407
|
instances.delete(this.#targetWindow);
|
|
408
|
+
this.#isDestroyed = true;
|
|
392
409
|
}
|
|
393
410
|
}
|
|
394
411
|
|
|
@@ -1,41 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* A function to handle incoming event payloads.
|
|
4
|
-
*/
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
5
2
|
export type handler = (payload: any, event: MessageEvent<any>) => any;
|
|
6
|
-
/**
|
|
7
|
-
* Configuration object for initializing TinyIframeEvents.
|
|
8
|
-
*/
|
|
9
3
|
export type TinyIframeEventsConfig = {
|
|
10
4
|
/**
|
|
11
5
|
* - The target iframe element to post messages to. Required if instantiated in the parent window.
|
|
12
6
|
*/
|
|
13
|
-
targetIframe?: HTMLIFrameElement
|
|
7
|
+
targetIframe?: HTMLIFrameElement;
|
|
14
8
|
/**
|
|
15
9
|
* - The target origin to restrict messages to. Defaults to `window.location.origin`.
|
|
16
10
|
*/
|
|
17
|
-
targetOrigin?: string
|
|
11
|
+
targetOrigin?: string;
|
|
18
12
|
/**
|
|
19
13
|
* - Custom internal name used to validate standard routing messages.
|
|
20
14
|
*/
|
|
21
|
-
secretEventName?: string
|
|
15
|
+
secretEventName?: string;
|
|
22
16
|
/**
|
|
23
17
|
* - Custom internal name used for the initial MessageChannel handshake.
|
|
24
18
|
*/
|
|
25
|
-
handshakeEventName?: string
|
|
19
|
+
handshakeEventName?: string;
|
|
26
20
|
/**
|
|
27
21
|
* - Custom internal name used for the ready event trigger.
|
|
28
22
|
*/
|
|
29
|
-
readyEventName?: string
|
|
23
|
+
readyEventName?: string;
|
|
30
24
|
};
|
|
31
|
-
/**
|
|
32
|
-
* Internal message structure for routed communication.
|
|
33
|
-
*/
|
|
34
25
|
export type IframeEventBase = {
|
|
35
26
|
/**
|
|
36
27
|
* - Dynamic key based on secretEventName to validate the message.
|
|
37
28
|
*/
|
|
38
|
-
secretIndicator?: boolean
|
|
29
|
+
secretIndicator?: boolean;
|
|
39
30
|
/**
|
|
40
31
|
* - The name of the custom event route.
|
|
41
32
|
*/
|
|
@@ -47,7 +38,7 @@ export type IframeEventBase = {
|
|
|
47
38
|
/**
|
|
48
39
|
* - Indicates the sender: 'iframe' or 'parent'.
|
|
49
40
|
*/
|
|
50
|
-
direction:
|
|
41
|
+
direction: 'iframe' | 'parent';
|
|
51
42
|
};
|
|
52
43
|
/**
|
|
53
44
|
* @callback handler
|
|
@@ -86,14 +77,10 @@ export type IframeEventBase = {
|
|
|
86
77
|
* - Queue management for messages sent before the connection is established.
|
|
87
78
|
* - Auto-reconnects and resets ports if the target iframe is reloaded.
|
|
88
79
|
*/
|
|
89
|
-
declare class TinyIframeEvents extends EventEmitter
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
* @param {TinyIframeEventsConfig} config - Configuration object.
|
|
95
|
-
*/
|
|
96
|
-
constructor({ targetIframe, targetOrigin, secretEventName, handshakeEventName, readyEventName, }?: TinyIframeEventsConfig);
|
|
80
|
+
declare class TinyIframeEvents extends EventEmitter {
|
|
81
|
+
#private;
|
|
82
|
+
_boundWindowMessage: (event: MessageEvent<any>) => void;
|
|
83
|
+
_boundPortMessage: (event: MessageEvent<any>) => void;
|
|
97
84
|
get targetWindow(): Window;
|
|
98
85
|
get targetIframeElement(): HTMLIFrameElement | undefined;
|
|
99
86
|
get targetOrigin(): string;
|
|
@@ -103,44 +90,49 @@ declare class TinyIframeEvents extends EventEmitter<any> {
|
|
|
103
90
|
* Executes the provided callback when the secure MessageChannel connection is fully established.
|
|
104
91
|
* If the connection is already ready, the callback is executed immediately.
|
|
105
92
|
*
|
|
106
|
-
* @param {
|
|
93
|
+
* @param {() => void} handler - The callback function to execute.
|
|
107
94
|
*/
|
|
108
95
|
onReady(handler: () => void): void;
|
|
109
|
-
_boundWindowMessage: (event: MessageEvent<any>) => void;
|
|
110
|
-
_boundPortMessage: (event: MessageEvent<any>) => void;
|
|
111
96
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
97
|
+
* Creates a new TinyIframeEvents instance to manage secure communication.
|
|
98
|
+
* Automatically establishes a MessageChannel connection between contexts.
|
|
99
|
+
*
|
|
100
|
+
* @param {TinyIframeEventsConfig} config - Configuration object.
|
|
115
101
|
*/
|
|
116
|
-
|
|
102
|
+
constructor({ targetIframe, targetOrigin, secretEventName, handshakeEventName, readyEventName, }?: TinyIframeEventsConfig);
|
|
117
103
|
/**
|
|
118
104
|
* Gets the internal secret iframe event name used for validation.
|
|
119
105
|
* @returns {string}
|
|
120
106
|
*/
|
|
121
107
|
get secretEventName(): string;
|
|
122
108
|
/**
|
|
123
|
-
* Sets the internal
|
|
109
|
+
* Sets the internal secret iframe event name.
|
|
124
110
|
* @param {string} name
|
|
125
111
|
* @throws {TypeError} If the value is not a string.
|
|
126
112
|
*/
|
|
127
|
-
set
|
|
113
|
+
set secretEventName(name: string);
|
|
128
114
|
/**
|
|
129
115
|
* Gets the internal handshake event name used for establishing the MessageChannel.
|
|
130
116
|
* @returns {string}
|
|
131
117
|
*/
|
|
132
118
|
get handshakeEventName(): string;
|
|
133
119
|
/**
|
|
134
|
-
* Sets the internal
|
|
120
|
+
* Sets the internal handshake event name.
|
|
135
121
|
* @param {string} name
|
|
136
122
|
* @throws {TypeError} If the value is not a string.
|
|
137
123
|
*/
|
|
138
|
-
set
|
|
124
|
+
set handshakeEventName(name: string);
|
|
139
125
|
/**
|
|
140
126
|
* Gets the internal ready event name used when the connection is fully established.
|
|
141
127
|
* @returns {string}
|
|
142
128
|
*/
|
|
143
129
|
get readyEventName(): string;
|
|
130
|
+
/**
|
|
131
|
+
* Sets the internal ready event name.
|
|
132
|
+
* @param {string} name
|
|
133
|
+
* @throws {TypeError} If the value is not a string.
|
|
134
|
+
*/
|
|
135
|
+
set readyEventName(name: string);
|
|
144
136
|
/**
|
|
145
137
|
* Sends an event to the target window through the secure MessageChannel.
|
|
146
138
|
*
|
|
@@ -161,7 +153,6 @@ declare class TinyIframeEvents extends EventEmitter<any> {
|
|
|
161
153
|
* Call this when the instance is no longer needed to prevent memory leaks.
|
|
162
154
|
*/
|
|
163
155
|
destroy(): void;
|
|
164
|
-
#private;
|
|
165
156
|
}
|
|
166
|
-
|
|
157
|
+
export default TinyIframeEvents;
|
|
167
158
|
//# sourceMappingURL=TinyIframeEvents.d.mts.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import { isJsonObject } from '../basics/objChecker.mjs';
|
|
3
|
+
import { createCheckDestroyed } from './utils.mjs';
|
|
4
|
+
const checkDestroy = createCheckDestroyed('TinyIframeEvents');
|
|
3
5
|
/** @type {WeakMap<Window, TinyIframeEvents>} */
|
|
4
6
|
const instances = new WeakMap();
|
|
5
7
|
/**
|
|
@@ -43,21 +45,25 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
43
45
|
/** @type {Window} */
|
|
44
46
|
#targetWindow;
|
|
45
47
|
get targetWindow() {
|
|
48
|
+
checkDestroy(this.#isDestroyed);
|
|
46
49
|
return this.#targetWindow;
|
|
47
50
|
}
|
|
48
51
|
/** @type {HTMLIFrameElement | undefined} */
|
|
49
52
|
#targetIframeElement;
|
|
50
53
|
get targetIframeElement() {
|
|
54
|
+
checkDestroy(this.#isDestroyed);
|
|
51
55
|
return this.#targetIframeElement;
|
|
52
56
|
}
|
|
53
57
|
/** @type {string} */
|
|
54
58
|
#targetOrigin;
|
|
55
59
|
get targetOrigin() {
|
|
60
|
+
checkDestroy(this.#isDestroyed);
|
|
56
61
|
return this.#targetOrigin;
|
|
57
62
|
}
|
|
58
63
|
/** @type {'iframe' | 'parent'} */
|
|
59
64
|
#selfType;
|
|
60
65
|
get selfType() {
|
|
66
|
+
checkDestroy(this.#isDestroyed);
|
|
61
67
|
return this.#selfType;
|
|
62
68
|
}
|
|
63
69
|
/** @type {boolean} */
|
|
@@ -65,15 +71,17 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
65
71
|
/** @type {boolean} */
|
|
66
72
|
#ready = false;
|
|
67
73
|
get ready() {
|
|
74
|
+
checkDestroy(this.#isDestroyed);
|
|
68
75
|
return this.#ready;
|
|
69
76
|
}
|
|
70
77
|
/**
|
|
71
78
|
* Executes the provided callback when the secure MessageChannel connection is fully established.
|
|
72
79
|
* If the connection is already ready, the callback is executed immediately.
|
|
73
80
|
*
|
|
74
|
-
* @param {
|
|
81
|
+
* @param {() => void} handler - The callback function to execute.
|
|
75
82
|
*/
|
|
76
83
|
onReady(handler) {
|
|
84
|
+
checkDestroy(this.#isDestroyed);
|
|
77
85
|
if (this.#ready) {
|
|
78
86
|
handler();
|
|
79
87
|
}
|
|
@@ -127,6 +135,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
127
135
|
* @returns {string}
|
|
128
136
|
*/
|
|
129
137
|
get secretEventName() {
|
|
138
|
+
checkDestroy(this.#isDestroyed);
|
|
130
139
|
return this.#secretEventName;
|
|
131
140
|
}
|
|
132
141
|
/**
|
|
@@ -135,6 +144,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
135
144
|
* @throws {TypeError} If the value is not a string.
|
|
136
145
|
*/
|
|
137
146
|
set secretEventName(name) {
|
|
147
|
+
checkDestroy(this.#isDestroyed);
|
|
138
148
|
if (typeof name !== 'string')
|
|
139
149
|
throw new TypeError('TinyIframeEvents: secretEventName must be a string.');
|
|
140
150
|
this.#secretEventName = name;
|
|
@@ -144,6 +154,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
144
154
|
* @returns {string}
|
|
145
155
|
*/
|
|
146
156
|
get handshakeEventName() {
|
|
157
|
+
checkDestroy(this.#isDestroyed);
|
|
147
158
|
return this.#handshakeEventName;
|
|
148
159
|
}
|
|
149
160
|
/**
|
|
@@ -152,6 +163,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
152
163
|
* @throws {TypeError} If the value is not a string.
|
|
153
164
|
*/
|
|
154
165
|
set handshakeEventName(name) {
|
|
166
|
+
checkDestroy(this.#isDestroyed);
|
|
155
167
|
if (typeof name !== 'string')
|
|
156
168
|
throw new TypeError('TinyIframeEvents: handshakeEventName must be a string.');
|
|
157
169
|
this.#handshakeEventName = name;
|
|
@@ -161,6 +173,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
161
173
|
* @returns {string}
|
|
162
174
|
*/
|
|
163
175
|
get readyEventName() {
|
|
176
|
+
checkDestroy(this.#isDestroyed);
|
|
164
177
|
return this.#readyEventName;
|
|
165
178
|
}
|
|
166
179
|
/**
|
|
@@ -169,6 +182,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
169
182
|
* @throws {TypeError} If the value is not a string.
|
|
170
183
|
*/
|
|
171
184
|
set readyEventName(name) {
|
|
185
|
+
checkDestroy(this.#isDestroyed);
|
|
172
186
|
if (typeof name !== 'string')
|
|
173
187
|
throw new TypeError('TinyIframeEvents: readyEventName must be a string.');
|
|
174
188
|
this.#readyEventName = name;
|
|
@@ -276,6 +290,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
276
290
|
* @throws {Error} If instance has been destroyed.
|
|
277
291
|
*/
|
|
278
292
|
winEmit(eventName, payload) {
|
|
293
|
+
checkDestroy(this.#isDestroyed);
|
|
279
294
|
if (typeof eventName !== 'string')
|
|
280
295
|
throw new TypeError('Event name must be a string.');
|
|
281
296
|
if (this.#isDestroyed)
|
|
@@ -306,7 +321,8 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
306
321
|
* Call this when the instance is no longer needed to prevent memory leaks.
|
|
307
322
|
*/
|
|
308
323
|
destroy() {
|
|
309
|
-
this.#isDestroyed
|
|
324
|
+
if (this.#isDestroyed)
|
|
325
|
+
return;
|
|
310
326
|
this.#ready = false;
|
|
311
327
|
window.removeEventListener('message', this._boundWindowMessage);
|
|
312
328
|
if (this.#targetIframeElement && this.#boundSendPort) {
|
|
@@ -319,6 +335,7 @@ class TinyIframeEvents extends EventEmitter {
|
|
|
319
335
|
this.removeAllListeners();
|
|
320
336
|
this.#pendingQueue = [];
|
|
321
337
|
instances.delete(this.#targetWindow);
|
|
338
|
+
this.#isDestroyed = true;
|
|
322
339
|
}
|
|
323
340
|
}
|
|
324
341
|
export default TinyIframeEvents;
|