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,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import TinyHtml from './TinyHtml.mjs';
|
|
2
|
+
import * as TinyCollision from '../basics/collision.mjs';
|
|
3
|
+
export type TouchDragEvent = (event: TouchEvent) => void;
|
|
2
4
|
export type VibrationPatterns = {
|
|
3
5
|
/**
|
|
4
6
|
* - Pattern to vibrate on start
|
|
@@ -31,55 +33,77 @@ export type VibrationPatterns = {
|
|
|
31
33
|
* @template {HTMLElement} HTMLTarget
|
|
32
34
|
*/
|
|
33
35
|
declare class TinyDragger<HTMLTarget extends HTMLElement> {
|
|
36
|
+
#private;
|
|
37
|
+
/** @private */
|
|
38
|
+
_onMouseDown;
|
|
39
|
+
/** @private */
|
|
40
|
+
_onMouseMove;
|
|
41
|
+
/** @private */
|
|
42
|
+
_onMouseUp;
|
|
43
|
+
/**
|
|
44
|
+
* @type {TouchDragEvent}
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
_onTouchStart;
|
|
48
|
+
/**
|
|
49
|
+
* @type {TouchDragEvent}
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
|
+
_onTouchMove;
|
|
53
|
+
/**
|
|
54
|
+
* @type {TouchDragEvent}
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
_onTouchEnd;
|
|
34
58
|
static Utils: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
depth: CollData;
|
|
49
|
-
dirs: CollDirs;
|
|
50
|
-
isNeg: NegCollDirs;
|
|
51
|
-
};
|
|
52
|
-
areElsCollTop: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
53
|
-
areElsCollBottom: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
54
|
-
areElsCollLeft: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
55
|
-
areElsCollRight: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
56
|
-
areElsCollPerfTop: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
57
|
-
areElsCollPerfBottom: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
58
|
-
areElsCollPerfLeft: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
59
|
-
areElsCollPerfRight: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
60
|
-
areElsColliding: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
61
|
-
areElsPerfColliding: (rect1: ObjRect, rect2: ObjRect) => boolean;
|
|
62
|
-
getElsColliding: (rect1: ObjRect, rect2: ObjRect) => string | null;
|
|
63
|
-
getElsPerfColliding: (rect1: ObjRect, rect2: ObjRect) => "top" | "bottom" | "left" | "right" | null;
|
|
64
|
-
getElsCollOverlap: (rect1: ObjRect, rect2: ObjRect) => {
|
|
59
|
+
areElsCollTop: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
60
|
+
areElsCollBottom: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
61
|
+
areElsCollLeft: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
62
|
+
areElsCollRight: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
63
|
+
areElsCollPerfTop: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
64
|
+
areElsCollPerfBottom: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
65
|
+
areElsCollPerfLeft: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
66
|
+
areElsCollPerfRight: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
67
|
+
areElsColliding: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
68
|
+
areElsPerfColliding: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => boolean;
|
|
69
|
+
getElsColliding: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => string | null;
|
|
70
|
+
getElsPerfColliding: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => 'top' | 'bottom' | 'left' | 'right' | null;
|
|
71
|
+
getElsCollOverlap: (rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect) => {
|
|
65
72
|
overlapLeft: number;
|
|
66
73
|
overlapRight: number;
|
|
67
74
|
overlapTop: number;
|
|
68
75
|
overlapBottom: number;
|
|
69
76
|
};
|
|
70
77
|
getElsCollOverlapPos: ({ overlapLeft, overlapRight, overlapTop, overlapBottom, }?: {
|
|
71
|
-
overlapLeft?: number
|
|
72
|
-
overlapRight?: number
|
|
73
|
-
overlapTop?: number
|
|
74
|
-
overlapBottom?: number
|
|
78
|
+
overlapLeft?: number;
|
|
79
|
+
overlapRight?: number;
|
|
80
|
+
overlapTop?: number;
|
|
81
|
+
overlapBottom?: number;
|
|
75
82
|
}) => {
|
|
76
|
-
dirX: Dirs;
|
|
77
|
-
dirY: Dirs;
|
|
83
|
+
dirX: TinyCollision.Dirs;
|
|
84
|
+
dirY: TinyCollision.Dirs;
|
|
78
85
|
};
|
|
79
|
-
getRectCenter: (rect: ObjRect) => {
|
|
86
|
+
getRectCenter: (rect: TinyCollision.ObjRect) => {
|
|
80
87
|
x: number;
|
|
81
88
|
y: number;
|
|
82
89
|
};
|
|
90
|
+
getElsRelativeCenterOffset(rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect): {
|
|
91
|
+
x: number;
|
|
92
|
+
y: number;
|
|
93
|
+
};
|
|
94
|
+
getElsCollDirDepth(rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect): {
|
|
95
|
+
inDir: TinyCollision.Dirs | null;
|
|
96
|
+
dirX: TinyCollision.Dirs | null;
|
|
97
|
+
dirY: TinyCollision.Dirs | null;
|
|
98
|
+
depthX: number;
|
|
99
|
+
depthY: number;
|
|
100
|
+
};
|
|
101
|
+
getElsCollDetails(rect1: TinyCollision.ObjRect, rect2: TinyCollision.ObjRect): {
|
|
102
|
+
depth: TinyCollision.CollData;
|
|
103
|
+
dirs: TinyCollision.CollDirs;
|
|
104
|
+
isNeg: TinyCollision.NegCollDirs;
|
|
105
|
+
};
|
|
106
|
+
TinyHtml: typeof TinyHtml;
|
|
83
107
|
};
|
|
84
108
|
/** @typedef {(event: TouchEvent) => void} TouchDragEvent */
|
|
85
109
|
/**
|
|
@@ -103,43 +127,22 @@ declare class TinyDragger<HTMLTarget extends HTMLElement> {
|
|
|
103
127
|
* @throws {Error} If any option has an invalid type.
|
|
104
128
|
*/
|
|
105
129
|
constructor(targetElement: HTMLTarget, options?: {
|
|
106
|
-
jail?: HTMLElement
|
|
107
|
-
mirrorElem?: boolean
|
|
108
|
-
defaultZIndex?: number
|
|
109
|
-
collisionByMouse?: boolean
|
|
110
|
-
classDragging?: string
|
|
111
|
-
classBodyDragging?: string
|
|
112
|
-
classJailDragging?: string
|
|
113
|
-
classJailDragDisabled?: string
|
|
114
|
-
classDragCollision?: string
|
|
115
|
-
lockInsideJail?: boolean
|
|
116
|
-
dropInJailOnly?: boolean
|
|
117
|
-
multiCollision?: boolean
|
|
118
|
-
vibration?:
|
|
119
|
-
revertOnDrop?: boolean
|
|
120
|
-
classHidden?: string
|
|
130
|
+
jail?: HTMLElement;
|
|
131
|
+
mirrorElem?: boolean;
|
|
132
|
+
defaultZIndex?: number;
|
|
133
|
+
collisionByMouse?: boolean;
|
|
134
|
+
classDragging?: string;
|
|
135
|
+
classBodyDragging?: string;
|
|
136
|
+
classJailDragging?: string;
|
|
137
|
+
classJailDragDisabled?: string;
|
|
138
|
+
classDragCollision?: string;
|
|
139
|
+
lockInsideJail?: boolean;
|
|
140
|
+
dropInJailOnly?: boolean;
|
|
141
|
+
multiCollision?: boolean;
|
|
142
|
+
vibration?: VibrationPatterns | false;
|
|
143
|
+
revertOnDrop?: boolean;
|
|
144
|
+
classHidden?: string;
|
|
121
145
|
});
|
|
122
|
-
/** @private */
|
|
123
|
-
private _onMouseDown;
|
|
124
|
-
/** @private */
|
|
125
|
-
private _onMouseMove;
|
|
126
|
-
/** @private */
|
|
127
|
-
private _onMouseUp;
|
|
128
|
-
/**
|
|
129
|
-
* @type {TouchDragEvent}
|
|
130
|
-
* @private
|
|
131
|
-
*/
|
|
132
|
-
private _onTouchStart;
|
|
133
|
-
/**
|
|
134
|
-
* @type {TouchDragEvent}
|
|
135
|
-
* @private
|
|
136
|
-
*/
|
|
137
|
-
private _onTouchMove;
|
|
138
|
-
/**
|
|
139
|
-
* @type {TouchDragEvent}
|
|
140
|
-
* @private
|
|
141
|
-
*/
|
|
142
|
-
private _onTouchEnd;
|
|
143
146
|
/**
|
|
144
147
|
* Enables the drag functionality.
|
|
145
148
|
*/
|
|
@@ -170,10 +173,10 @@ declare class TinyDragger<HTMLTarget extends HTMLElement> {
|
|
|
170
173
|
* @throws {Error} If any pattern is not false or an array of numbers.
|
|
171
174
|
*/
|
|
172
175
|
setVibrationPattern({ startPattern, endPattern, collidePattern, movePattern, }?: {
|
|
173
|
-
startPattern?:
|
|
174
|
-
endPattern?:
|
|
175
|
-
collidePattern?:
|
|
176
|
-
movePattern?:
|
|
176
|
+
startPattern?: number[] | false;
|
|
177
|
+
endPattern?: number[] | false;
|
|
178
|
+
collidePattern?: number[] | false;
|
|
179
|
+
movePattern?: number[] | false;
|
|
177
180
|
}): void;
|
|
178
181
|
/**
|
|
179
182
|
* Disables all vibration feedback.
|
|
@@ -386,8 +389,6 @@ declare class TinyDragger<HTMLTarget extends HTMLElement> {
|
|
|
386
389
|
* Does NOT remove the original HTML element.
|
|
387
390
|
*/
|
|
388
391
|
destroy(): void;
|
|
389
|
-
#private;
|
|
390
392
|
}
|
|
391
|
-
|
|
392
|
-
import * as TinyCollision from '../basics/collision.mjs';
|
|
393
|
+
export default TinyDragger;
|
|
393
394
|
//# sourceMappingURL=TinyDragger.d.mts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import TinyHtml from './TinyHtml.mjs';
|
|
2
2
|
import * as TinyCollision from '../basics/collision.mjs';
|
|
3
3
|
import { isJsonObject } from '../basics/objChecker.mjs';
|
|
4
|
+
import { createCheckDestroyed } from './utils.mjs';
|
|
5
|
+
const checkDestroy = createCheckDestroyed('TinyDragger');
|
|
4
6
|
/**
|
|
5
7
|
* @typedef {Object} VibrationPatterns
|
|
6
8
|
* @property {number[]|false} start - Pattern to vibrate on start
|
|
@@ -167,7 +169,7 @@ class TinyDragger {
|
|
|
167
169
|
* Enables the drag functionality.
|
|
168
170
|
*/
|
|
169
171
|
enable() {
|
|
170
|
-
this.#
|
|
172
|
+
checkDestroy(this.#destroyed);
|
|
171
173
|
if (this.#jail)
|
|
172
174
|
this.#jail.classList.add(this.#classJailDragDisabled);
|
|
173
175
|
this.#enabled = true;
|
|
@@ -176,6 +178,7 @@ class TinyDragger {
|
|
|
176
178
|
* Disables the drag functionality.
|
|
177
179
|
*/
|
|
178
180
|
disable() {
|
|
181
|
+
checkDestroy(this.#destroyed);
|
|
179
182
|
if (this.#jail)
|
|
180
183
|
this.#jail.classList.remove(this.#classJailDragDisabled);
|
|
181
184
|
this.#enabled = false;
|
|
@@ -186,7 +189,7 @@ class TinyDragger {
|
|
|
186
189
|
* @throws {Error} If the element is not a valid HTMLElement.
|
|
187
190
|
*/
|
|
188
191
|
addCollidable(element) {
|
|
189
|
-
this.#
|
|
192
|
+
checkDestroy(this.#destroyed);
|
|
190
193
|
if (!(element instanceof HTMLElement))
|
|
191
194
|
throw new Error('addCollidable expects an HTMLElement as argument.');
|
|
192
195
|
if (!this.#collidables.includes(element))
|
|
@@ -198,7 +201,7 @@ class TinyDragger {
|
|
|
198
201
|
* @throws {Error} If the element is not a valid HTMLElement.
|
|
199
202
|
*/
|
|
200
203
|
removeCollidable(element) {
|
|
201
|
-
this.#
|
|
204
|
+
checkDestroy(this.#destroyed);
|
|
202
205
|
if (!(element instanceof HTMLElement))
|
|
203
206
|
throw new Error('removeCollidable expects an HTMLElement as argument.');
|
|
204
207
|
this.#collidables = this.#collidables.filter((el) => el !== element);
|
|
@@ -213,7 +216,7 @@ class TinyDragger {
|
|
|
213
216
|
* @throws {Error} If any pattern is not false or an array of numbers.
|
|
214
217
|
*/
|
|
215
218
|
setVibrationPattern({ startPattern = false, endPattern = false, collidePattern = false, movePattern = false, } = {}) {
|
|
216
|
-
this.#
|
|
219
|
+
checkDestroy(this.#destroyed);
|
|
217
220
|
/** @param {any} value */
|
|
218
221
|
const isValidPattern = (value) => value === false || (Array.isArray(value) && value.every((n) => typeof n === 'number'));
|
|
219
222
|
if (!isValidPattern(startPattern))
|
|
@@ -235,7 +238,7 @@ class TinyDragger {
|
|
|
235
238
|
* Disables all vibration feedback.
|
|
236
239
|
*/
|
|
237
240
|
disableVibration() {
|
|
238
|
-
this.#
|
|
241
|
+
checkDestroy(this.#destroyed);
|
|
239
242
|
this.#vibration = { start: false, end: false, collide: false, move: false };
|
|
240
243
|
}
|
|
241
244
|
/**
|
|
@@ -245,7 +248,7 @@ class TinyDragger {
|
|
|
245
248
|
* @throws {Error} If event is not a MouseEvent or Touch with clientX/clientY.
|
|
246
249
|
*/
|
|
247
250
|
getOffset(event) {
|
|
248
|
-
this.#
|
|
251
|
+
checkDestroy(this.#destroyed);
|
|
249
252
|
if ((!(event instanceof MouseEvent) && !(event instanceof Touch)) ||
|
|
250
253
|
typeof event.clientX !== 'number' ||
|
|
251
254
|
typeof event.clientY !== 'number')
|
|
@@ -340,6 +343,7 @@ class TinyDragger {
|
|
|
340
343
|
* @param {MouseEvent|Touch} event - The drag event.
|
|
341
344
|
*/
|
|
342
345
|
checkDragCollision(event) {
|
|
346
|
+
checkDestroy(this.#destroyed);
|
|
343
347
|
const { collidedElements } = this.execCollision(event);
|
|
344
348
|
const first = collidedElements[0] || null;
|
|
345
349
|
// Removes old marking if necessary
|
|
@@ -400,6 +404,7 @@ class TinyDragger {
|
|
|
400
404
|
* @returns {{ inJail: boolean; collidedElements: (HTMLElement | null)[] }}
|
|
401
405
|
*/
|
|
402
406
|
execCollision(event) {
|
|
407
|
+
checkDestroy(this.#destroyed);
|
|
403
408
|
if (this.#destroyed || !this.#dragProxy)
|
|
404
409
|
return { inJail: false, collidedElements: [] };
|
|
405
410
|
let collidedElements = [];
|
|
@@ -515,7 +520,7 @@ class TinyDragger {
|
|
|
515
520
|
* @throws {Error} If the input is not a valid DOMRect with numeric bounds.
|
|
516
521
|
*/
|
|
517
522
|
getAllCollidedElementsByRect(rect) {
|
|
518
|
-
this.#
|
|
523
|
+
checkDestroy(this.#destroyed);
|
|
519
524
|
if (!(rect instanceof DOMRect) ||
|
|
520
525
|
typeof rect.left !== 'number' ||
|
|
521
526
|
typeof rect.right !== 'number' ||
|
|
@@ -531,7 +536,7 @@ class TinyDragger {
|
|
|
531
536
|
* @throws {Error} If rect is not a DOMRect with valid numeric properties.
|
|
532
537
|
*/
|
|
533
538
|
getCollidedElementByRect(rect) {
|
|
534
|
-
this.#
|
|
539
|
+
checkDestroy(this.#destroyed);
|
|
535
540
|
if (!(rect instanceof DOMRect) ||
|
|
536
541
|
typeof rect.left !== 'number' ||
|
|
537
542
|
typeof rect.right !== 'number' ||
|
|
@@ -558,7 +563,7 @@ class TinyDragger {
|
|
|
558
563
|
* @returns {HTMLElement[]} The collided element or null.
|
|
559
564
|
*/
|
|
560
565
|
getAllCollidedElements(x, y) {
|
|
561
|
-
this.#
|
|
566
|
+
checkDestroy(this.#destroyed);
|
|
562
567
|
if (typeof x !== 'number' || typeof y !== 'number')
|
|
563
568
|
throw new Error('getCollidedElement expects numeric x and y coordinates.');
|
|
564
569
|
return this.#collidables.filter((el) => this.#getCollidedElement(el, x, y));
|
|
@@ -570,7 +575,7 @@ class TinyDragger {
|
|
|
570
575
|
* @returns {HTMLElement|null} The collided element or null.
|
|
571
576
|
*/
|
|
572
577
|
getCollidedElement(x, y) {
|
|
573
|
-
this.#
|
|
578
|
+
checkDestroy(this.#destroyed);
|
|
574
579
|
if (typeof x !== 'number' || typeof y !== 'number')
|
|
575
580
|
throw new Error('getCollidedElement expects numeric x and y coordinates.');
|
|
576
581
|
return this.#collidables.find((el) => this.#getCollidedElement(el, x, y)) || null;
|
|
@@ -588,6 +593,7 @@ class TinyDragger {
|
|
|
588
593
|
* @returns {boolean}
|
|
589
594
|
*/
|
|
590
595
|
getDragging() {
|
|
596
|
+
checkDestroy(this.#destroyed);
|
|
591
597
|
return this.#dragging;
|
|
592
598
|
}
|
|
593
599
|
/**
|
|
@@ -595,6 +601,7 @@ class TinyDragger {
|
|
|
595
601
|
* @returns {boolean}
|
|
596
602
|
*/
|
|
597
603
|
getLockInsideJail() {
|
|
604
|
+
checkDestroy(this.#destroyed);
|
|
598
605
|
return this.#lockInsideJail;
|
|
599
606
|
}
|
|
600
607
|
/**
|
|
@@ -602,6 +609,7 @@ class TinyDragger {
|
|
|
602
609
|
* @param {boolean} value
|
|
603
610
|
*/
|
|
604
611
|
setLockInsideJail(value) {
|
|
612
|
+
checkDestroy(this.#destroyed);
|
|
605
613
|
if (typeof value !== 'boolean')
|
|
606
614
|
throw new Error('lockInsideJail must be a boolean.');
|
|
607
615
|
this.#lockInsideJail = value;
|
|
@@ -611,6 +619,7 @@ class TinyDragger {
|
|
|
611
619
|
* @returns {boolean}
|
|
612
620
|
*/
|
|
613
621
|
getRevertOnDrop() {
|
|
622
|
+
checkDestroy(this.#destroyed);
|
|
614
623
|
return this.#revertOnDrop;
|
|
615
624
|
}
|
|
616
625
|
/**
|
|
@@ -618,6 +627,7 @@ class TinyDragger {
|
|
|
618
627
|
* @param {boolean} value
|
|
619
628
|
*/
|
|
620
629
|
setRevertOnDrop(value) {
|
|
630
|
+
checkDestroy(this.#destroyed);
|
|
621
631
|
if (typeof value !== 'boolean')
|
|
622
632
|
throw new Error('revertOnDrop must be a boolean.');
|
|
623
633
|
this.#revertOnDrop = value;
|
|
@@ -627,6 +637,7 @@ class TinyDragger {
|
|
|
627
637
|
* @returns {boolean}
|
|
628
638
|
*/
|
|
629
639
|
getCollisionByMouse() {
|
|
640
|
+
checkDestroy(this.#destroyed);
|
|
630
641
|
return this.#collisionByMouse;
|
|
631
642
|
}
|
|
632
643
|
/**
|
|
@@ -634,6 +645,7 @@ class TinyDragger {
|
|
|
634
645
|
* @param {boolean} value
|
|
635
646
|
*/
|
|
636
647
|
setCollisionByMouse(value) {
|
|
648
|
+
checkDestroy(this.#destroyed);
|
|
637
649
|
if (typeof value !== 'boolean')
|
|
638
650
|
throw new Error('collisionByMouse must be a boolean.');
|
|
639
651
|
this.#collisionByMouse = value;
|
|
@@ -643,6 +655,7 @@ class TinyDragger {
|
|
|
643
655
|
* @returns {boolean}
|
|
644
656
|
*/
|
|
645
657
|
getDropInJailOnly() {
|
|
658
|
+
checkDestroy(this.#destroyed);
|
|
646
659
|
return this.#dropInJailOnly;
|
|
647
660
|
}
|
|
648
661
|
/**
|
|
@@ -650,6 +663,7 @@ class TinyDragger {
|
|
|
650
663
|
* @param {boolean} value
|
|
651
664
|
*/
|
|
652
665
|
setDropInJailOnly(value) {
|
|
666
|
+
checkDestroy(this.#destroyed);
|
|
653
667
|
if (typeof value !== 'boolean')
|
|
654
668
|
throw new Error('dropInJailOnly must be a boolean.');
|
|
655
669
|
this.#dropInJailOnly = value;
|
|
@@ -659,6 +673,7 @@ class TinyDragger {
|
|
|
659
673
|
* @returns {number}
|
|
660
674
|
*/
|
|
661
675
|
getDefaultZIndex() {
|
|
676
|
+
checkDestroy(this.#destroyed);
|
|
662
677
|
return this.#defaultZIndex;
|
|
663
678
|
}
|
|
664
679
|
/**
|
|
@@ -666,6 +681,7 @@ class TinyDragger {
|
|
|
666
681
|
* @param {number} newZIndex
|
|
667
682
|
*/
|
|
668
683
|
setDefaultZIndex(newZIndex) {
|
|
684
|
+
checkDestroy(this.#destroyed);
|
|
669
685
|
if (typeof newZIndex !== 'number' || !Number.isFinite(newZIndex))
|
|
670
686
|
throw new TypeError('Z-index must be a finite number.');
|
|
671
687
|
this.#defaultZIndex = newZIndex;
|
|
@@ -675,6 +691,7 @@ class TinyDragger {
|
|
|
675
691
|
* @returns {boolean}
|
|
676
692
|
*/
|
|
677
693
|
isMirrorEnabled() {
|
|
694
|
+
checkDestroy(this.#destroyed);
|
|
678
695
|
return this.#mirrorElem;
|
|
679
696
|
}
|
|
680
697
|
/**
|
|
@@ -682,6 +699,7 @@ class TinyDragger {
|
|
|
682
699
|
* @param {boolean} useMirror
|
|
683
700
|
*/
|
|
684
701
|
setMirrorEnabled(useMirror) {
|
|
702
|
+
checkDestroy(this.#destroyed);
|
|
685
703
|
if (typeof useMirror !== 'boolean')
|
|
686
704
|
throw new TypeError('Mirror setting must be a boolean.');
|
|
687
705
|
this.#mirrorElem = useMirror;
|
|
@@ -691,6 +709,7 @@ class TinyDragger {
|
|
|
691
709
|
* @returns {HTMLElement}
|
|
692
710
|
*/
|
|
693
711
|
getTarget() {
|
|
712
|
+
checkDestroy(this.#destroyed);
|
|
694
713
|
return this.#target;
|
|
695
714
|
}
|
|
696
715
|
/**
|
|
@@ -698,6 +717,7 @@ class TinyDragger {
|
|
|
698
717
|
* @returns {HTMLElement|null}
|
|
699
718
|
*/
|
|
700
719
|
getJail() {
|
|
720
|
+
checkDestroy(this.#destroyed);
|
|
701
721
|
return this.#jail;
|
|
702
722
|
}
|
|
703
723
|
/**
|
|
@@ -705,6 +725,7 @@ class TinyDragger {
|
|
|
705
725
|
* @returns {HTMLElement|null}
|
|
706
726
|
*/
|
|
707
727
|
getDragProxy() {
|
|
728
|
+
checkDestroy(this.#destroyed);
|
|
708
729
|
return this.#dragProxy;
|
|
709
730
|
}
|
|
710
731
|
/**
|
|
@@ -712,6 +733,7 @@ class TinyDragger {
|
|
|
712
733
|
* @returns {HTMLElement|null}
|
|
713
734
|
*/
|
|
714
735
|
getLastCollision() {
|
|
736
|
+
checkDestroy(this.#destroyed);
|
|
715
737
|
return this.#lastCollision;
|
|
716
738
|
}
|
|
717
739
|
/**
|
|
@@ -719,6 +741,7 @@ class TinyDragger {
|
|
|
719
741
|
* @returns {HTMLElement[]}
|
|
720
742
|
*/
|
|
721
743
|
getCollidables() {
|
|
744
|
+
checkDestroy(this.#destroyed);
|
|
722
745
|
return [...this.#collidables];
|
|
723
746
|
}
|
|
724
747
|
/**
|
|
@@ -726,6 +749,7 @@ class TinyDragger {
|
|
|
726
749
|
* @returns {string}
|
|
727
750
|
*/
|
|
728
751
|
getDragHiddenClass() {
|
|
752
|
+
checkDestroy(this.#destroyed);
|
|
729
753
|
return this.#dragHiddenClass;
|
|
730
754
|
}
|
|
731
755
|
/**
|
|
@@ -733,6 +757,7 @@ class TinyDragger {
|
|
|
733
757
|
* @returns {string}
|
|
734
758
|
*/
|
|
735
759
|
getClassDragging() {
|
|
760
|
+
checkDestroy(this.#destroyed);
|
|
736
761
|
return this.#classDragging;
|
|
737
762
|
}
|
|
738
763
|
/**
|
|
@@ -740,6 +765,7 @@ class TinyDragger {
|
|
|
740
765
|
* @returns {string}
|
|
741
766
|
*/
|
|
742
767
|
getClassBodyDragging() {
|
|
768
|
+
checkDestroy(this.#destroyed);
|
|
743
769
|
return this.#classBodyDragging;
|
|
744
770
|
}
|
|
745
771
|
/**
|
|
@@ -747,6 +773,7 @@ class TinyDragger {
|
|
|
747
773
|
* @returns {string}
|
|
748
774
|
*/
|
|
749
775
|
getClassJailDragging() {
|
|
776
|
+
checkDestroy(this.#destroyed);
|
|
750
777
|
return this.#classJailDragging;
|
|
751
778
|
}
|
|
752
779
|
/**
|
|
@@ -754,6 +781,7 @@ class TinyDragger {
|
|
|
754
781
|
* @returns {string}
|
|
755
782
|
*/
|
|
756
783
|
getClassJailDragDisabled() {
|
|
784
|
+
checkDestroy(this.#destroyed);
|
|
757
785
|
return this.#classJailDragDisabled;
|
|
758
786
|
}
|
|
759
787
|
/**
|
|
@@ -761,6 +789,7 @@ class TinyDragger {
|
|
|
761
789
|
* @returns {string}
|
|
762
790
|
*/
|
|
763
791
|
getClassDragCollision() {
|
|
792
|
+
checkDestroy(this.#destroyed);
|
|
764
793
|
return this.#classDragCollision;
|
|
765
794
|
}
|
|
766
795
|
/**
|
|
@@ -768,6 +797,7 @@ class TinyDragger {
|
|
|
768
797
|
* @returns {VibrationPatterns}
|
|
769
798
|
*/
|
|
770
799
|
getVibrations() {
|
|
800
|
+
checkDestroy(this.#destroyed);
|
|
771
801
|
return { ...this.#vibration };
|
|
772
802
|
}
|
|
773
803
|
/**
|
|
@@ -775,6 +805,7 @@ class TinyDragger {
|
|
|
775
805
|
* @returns {number[]|boolean}
|
|
776
806
|
*/
|
|
777
807
|
getStartVibration() {
|
|
808
|
+
checkDestroy(this.#destroyed);
|
|
778
809
|
return this.#vibration.start;
|
|
779
810
|
}
|
|
780
811
|
/**
|
|
@@ -782,6 +813,7 @@ class TinyDragger {
|
|
|
782
813
|
* @returns {number[]|boolean}
|
|
783
814
|
*/
|
|
784
815
|
getEndVibration() {
|
|
816
|
+
checkDestroy(this.#destroyed);
|
|
785
817
|
return this.#vibration.end;
|
|
786
818
|
}
|
|
787
819
|
/**
|
|
@@ -789,6 +821,7 @@ class TinyDragger {
|
|
|
789
821
|
* @returns {number[]|boolean}
|
|
790
822
|
*/
|
|
791
823
|
getCollideVibration() {
|
|
824
|
+
checkDestroy(this.#destroyed);
|
|
792
825
|
return this.#vibration.collide;
|
|
793
826
|
}
|
|
794
827
|
/**
|
|
@@ -796,6 +829,7 @@ class TinyDragger {
|
|
|
796
829
|
* @returns {number[]|boolean}
|
|
797
830
|
*/
|
|
798
831
|
getMoveVibration() {
|
|
832
|
+
checkDestroy(this.#destroyed);
|
|
799
833
|
return this.#vibration.move;
|
|
800
834
|
}
|
|
801
835
|
/**
|
|
@@ -803,16 +837,9 @@ class TinyDragger {
|
|
|
803
837
|
* @returns {boolean}
|
|
804
838
|
*/
|
|
805
839
|
isEnabled() {
|
|
840
|
+
checkDestroy(this.#destroyed);
|
|
806
841
|
return this.#enabled;
|
|
807
842
|
}
|
|
808
|
-
/**
|
|
809
|
-
* Internal method to verify if the instance has been destroyed.
|
|
810
|
-
* Throws an error if any operation is attempted after destruction.
|
|
811
|
-
*/
|
|
812
|
-
#checkDestroy() {
|
|
813
|
-
if (this.#destroyed)
|
|
814
|
-
throw new Error('This TinyDragger instance has been destroyed and can no longer be used.');
|
|
815
|
-
}
|
|
816
843
|
/**
|
|
817
844
|
* Completely disables drag-and-drop and cleans up all event listeners.
|
|
818
845
|
* Does NOT remove the original HTML element.
|