tiny-essentials 1.28.19 → 1.29.0
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/README.md +1 -1
- package/changelog/1/28/19.md +24 -0
- package/changelog/1/29/0.md +58 -0
- package/dist/v1/ColorSafeStringify.min.js +1 -1
- 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/TinyArrayComparator.min.js +1 -1
- package/dist/v1/TinyArrayPaginator.min.js +1 -1
- package/dist/v1/TinyBasicsEs.min.js +1 -1
- package/dist/v1/TinyBrowserMonitor.min.js +1 -0
- package/dist/v1/TinyClassManager.min.js +1 -1
- package/dist/v1/TinyClipboard.min.js +1 -1
- package/dist/v1/TinyCloner.min.js +1 -0
- package/dist/v1/TinyColorConverter.min.js +1 -1
- package/dist/v1/TinyColorValidator.min.js +1 -1
- package/dist/v1/TinyCookieConsent.min.js +1 -1
- package/dist/v1/TinyDayNightCycle.min.js +1 -1
- package/dist/v1/TinyDebugger.min.js +1 -1
- package/dist/v1/TinyDomReadyManager.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/TinyHtmlTagRegexBuilder.min.js +1 -0
- package/dist/v1/TinyHttpResponseRegistry.min.js +1 -0
- package/dist/v1/TinyI18.min.js +1 -1
- package/dist/v1/TinyIframeEvents.min.js +1 -1
- package/dist/v1/TinyInventory.min.js +1 -1
- package/dist/v1/TinyInventoryTrader.min.js +1 -1
- package/dist/v1/TinyLevelUp.min.js +1 -1
- package/dist/v1/TinyLoadingScreen.min.js +1 -1
- package/dist/v1/TinyLocalStorage.min.js +1 -1
- package/dist/v1/TinyMaInSys.min.js +1 -1
- package/dist/v1/TinyMapCache.min.js +1 -0
- package/dist/v1/TinyMediaPlayer.min.js +1 -1
- package/dist/v1/TinyNeedBar.min.js +1 -1
- package/dist/v1/TinyNewWinEvents.min.js +1 -1
- package/dist/v1/TinyNotificationAdapter.min.js +1 -0
- package/dist/v1/TinyNotifications.min.js +1 -1
- package/dist/v1/TinyNotifyCenter.min.js +1 -1
- package/dist/v1/TinyOPFSFileSystem.min.js +1 -0
- package/dist/v1/TinyPasswordValidator.min.js +1 -0
- package/dist/v1/TinyPluginPackage.min.js +1 -0
- package/dist/v1/TinyPromiseQueue.min.js +1 -1
- package/dist/v1/TinyPushManager.min.js +1 -0
- package/dist/v1/TinyPushPayload.min.js +1 -0
- package/dist/v1/TinyPushRouter.min.js +1 -0
- package/dist/v1/TinyRadioFm.min.js +1 -1
- package/dist/v1/TinyRateLimiter.min.js +1 -1
- package/dist/v1/TinyRegexEs.min.js +1 -0
- package/dist/v1/TinyRouter.min.js +1 -0
- package/dist/v1/TinyServiceWorker.min.js +1 -0
- package/dist/v1/TinyServiceWorkerEngine.min.js +1 -0
- package/dist/v1/TinySetMapPackage.min.js +1 -0
- package/dist/v1/TinySimpleDice.min.js +1 -1
- package/dist/v1/TinySmartScroller.min.js +1 -1
- package/dist/v1/TinyStorageBucketFileSystem.min.js +1 -0
- package/dist/v1/TinyTextDiffer.min.js +1 -1
- package/dist/v1/TinyTextRangeEditor.min.js +1 -1
- package/dist/v1/TinyTextarea.min.js +1 -1
- package/dist/v1/TinyThrottledApi.min.js +1 -0
- 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/TinyUriParser.min.js +1 -0
- package/dist/v1/TinyVersion.min.js +1 -0
- package/dist/v1/TinyWebWorker.min.js +1 -0
- package/dist/v1/TinyWebWorkerEngine.min.js +1 -0
- package/dist/v1/UltraRandomMsgGen.min.js +1 -1
- package/dist/v1/basics/array.cjs +2 -2
- package/dist/v1/basics/array.d.mts +2 -0
- package/dist/v1/basics/array.d.mts.map +1 -1
- package/dist/v1/basics/array.mjs +2 -1
- package/dist/v1/basics/browserDetector.cjs +37 -12
- package/dist/v1/basics/browserDetector.d.mts +8 -0
- package/dist/v1/basics/browserDetector.d.mts.map +1 -1
- package/dist/v1/basics/browserDetector.mjs +32 -13
- package/dist/v1/basics/crypto.cjs +23 -0
- package/dist/v1/basics/crypto.d.mts +10 -0
- package/dist/v1/basics/crypto.d.mts.map +1 -0
- package/dist/v1/basics/crypto.mjs +18 -0
- package/dist/v1/basics/html.cjs +0 -3
- package/dist/v1/basics/html.d.mts.map +1 -1
- package/dist/v1/basics/html.mjs +0 -2
- package/dist/v1/basics/index.cjs +8 -1
- package/dist/v1/basics/index.d.mts +6 -5
- package/dist/v1/basics/index.d.mts.map +1 -1
- package/dist/v1/basics/index.mjs +6 -5
- package/dist/v1/basics/objChecker.cjs +88 -0
- package/dist/v1/basics/objChecker.d.mts +26 -0
- package/dist/v1/basics/objChecker.d.mts.map +1 -1
- package/dist/v1/basics/objChecker.mjs +74 -0
- package/dist/v1/basics/objFilter.cjs +234 -93
- package/dist/v1/basics/objFilter.d.mts +96 -22
- package/dist/v1/basics/objFilter.d.mts.map +1 -1
- package/dist/v1/basics/objFilter.mjs +216 -92
- package/dist/v1/basics/promiseUtils.cjs +48 -12
- package/dist/v1/basics/promiseUtils.d.mts +45 -12
- package/dist/v1/basics/promiseUtils.d.mts.map +1 -1
- package/dist/v1/basics/promiseUtils.mjs +47 -12
- package/dist/v1/basics/text.cjs +0 -12
- package/dist/v1/basics/text.d.mts +0 -10
- package/dist/v1/basics/text.d.mts.map +1 -1
- package/dist/v1/basics/text.mjs +0 -10
- package/dist/v1/index.cjs +88 -3
- package/dist/v1/index.d.mts +31 -6
- package/dist/v1/index.d.mts.map +1 -1
- package/dist/v1/index.mjs +32 -7
- package/dist/v1/jsdoc/EventEmitter.cjs +4 -0
- package/dist/v1/jsdoc/EventEmitter.d.mts +33 -0
- package/dist/v1/jsdoc/EventEmitter.d.mts.map +1 -0
- package/dist/v1/jsdoc/EventEmitter.mjs +18 -0
- package/dist/v1/libs/array/TinyArrayComparator.cjs +240 -25
- package/dist/v1/libs/array/TinyArrayComparator.d.mts +130 -22
- package/dist/v1/libs/array/TinyArrayComparator.d.mts.map +1 -1
- package/dist/v1/libs/array/TinyArrayComparator.mjs +210 -24
- package/dist/v1/libs/fs/constants.cjs +74 -0
- package/dist/v1/libs/fs/constants.d.mts +22 -0
- package/dist/v1/libs/fs/constants.d.mts.map +1 -0
- package/dist/v1/libs/fs/constants.mjs +53 -0
- package/dist/v1/libs/fs/encoding.cjs +118 -0
- package/dist/v1/libs/fs/encoding.d.mts +50 -0
- package/dist/v1/libs/fs/encoding.d.mts.map +1 -0
- package/dist/v1/libs/fs/encoding.mjs +102 -0
- package/dist/v1/libs/fs/error.cjs +188 -0
- package/dist/v1/libs/fs/error.d.mts +105 -0
- package/dist/v1/libs/fs/error.d.mts.map +1 -0
- package/dist/v1/libs/fs/error.mjs +158 -0
- package/dist/v1/libs/fs/handle.cjs +121 -0
- package/dist/v1/libs/fs/handle.d.mts +56 -0
- package/dist/v1/libs/fs/handle.d.mts.map +1 -0
- package/dist/v1/libs/fs/handle.mjs +100 -0
- package/dist/v1/libs/fs/index.cjs +700 -0
- package/dist/v1/libs/fs/index.d.mts +377 -0
- package/dist/v1/libs/fs/index.d.mts.map +1 -0
- package/dist/v1/libs/fs/index.mjs +630 -0
- package/dist/v1/libs/fs/path.cjs +234 -0
- package/dist/v1/libs/fs/path.d.mts +176 -0
- package/dist/v1/libs/fs/path.d.mts.map +1 -0
- package/dist/v1/libs/fs/path.mjs +197 -0
- package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.cjs +202 -0
- package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts +121 -0
- package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts.map +1 -0
- package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.mjs +172 -0
- package/dist/v1/libs/fs/plugins/OPFS/index.cjs +334 -0
- package/dist/v1/libs/fs/plugins/OPFS/index.d.mts +98 -0
- package/dist/v1/libs/fs/plugins/OPFS/index.d.mts.map +1 -0
- package/dist/v1/libs/fs/plugins/OPFS/index.mjs +300 -0
- package/dist/v1/libs/fs/stats.cjs +245 -0
- package/dist/v1/libs/fs/stats.d.mts +226 -0
- package/dist/v1/libs/fs/stats.d.mts.map +1 -0
- package/dist/v1/libs/fs/stats.mjs +197 -0
- package/dist/v1/libs/html/events/TinyIframeEvents.cjs +10 -1
- package/dist/v1/libs/html/events/TinyIframeEvents.d.mts +9 -2
- package/dist/v1/libs/html/events/TinyIframeEvents.d.mts.map +1 -1
- package/dist/v1/libs/html/events/TinyIframeEvents.mjs +8 -1
- package/dist/v1/libs/html/events/TinyNewWinEvents.cjs +14 -3
- package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts +21 -5
- package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts.map +1 -1
- package/dist/v1/libs/html/events/TinyNewWinEvents.mjs +12 -3
- package/dist/v1/libs/html/scroll/TinySmartScroller.cjs +13 -1
- package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts +29 -2
- package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts.map +1 -1
- package/dist/v1/libs/html/scroll/TinySmartScroller.mjs +11 -1
- package/dist/v1/libs/math/TinyAdvancedRaffle.cjs +13 -1
- package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts +32 -2
- package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts.map +1 -1
- package/dist/v1/libs/math/TinyAdvancedRaffle.mjs +11 -1
- package/dist/v1/libs/math/TinyTimeout.cjs +0 -14
- package/dist/v1/libs/math/TinyTimeout.d.mts +0 -11
- package/dist/v1/libs/math/TinyTimeout.d.mts.map +1 -1
- package/dist/v1/libs/math/TinyTimeout.mjs +0 -13
- package/dist/v1/libs/media/TinyMediaPlayer/index.cjs +25 -1
- package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts +35 -2
- package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts.map +1 -1
- package/dist/v1/libs/media/TinyMediaPlayer/index.mjs +23 -1
- package/dist/v1/libs/media/TinyMediaPlayer.cjs +2 -2
- package/dist/v1/libs/media/TinyMediaPlayer.d.mts +2 -2
- package/dist/v1/libs/media/TinyMediaPlayer.d.mts.map +1 -1
- package/dist/v1/libs/media/TinyMediaPlayer.mjs +2 -2
- package/dist/v1/libs/media/TinyRadioFm.cjs +19 -1
- package/dist/v1/libs/media/TinyRadioFm.d.mts +78 -2
- package/dist/v1/libs/media/TinyRadioFm.d.mts.map +1 -1
- package/dist/v1/libs/media/TinyRadioFm.mjs +17 -1
- package/dist/v1/libs/plugin/TinyPlugin.cjs +1630 -0
- package/dist/v1/libs/plugin/TinyPlugin.d.mts +753 -0
- package/dist/v1/libs/plugin/TinyPlugin.d.mts.map +1 -0
- package/dist/v1/libs/plugin/TinyPlugin.mjs +1376 -0
- package/dist/v1/libs/plugin/TinyVersion.cjs +204 -0
- package/dist/v1/libs/plugin/TinyVersion.d.mts +70 -0
- package/dist/v1/libs/plugin/TinyVersion.d.mts.map +1 -0
- package/dist/v1/libs/plugin/TinyVersion.mjs +179 -0
- package/dist/v1/libs/router/TinyRouter.cjs +661 -0
- package/dist/v1/libs/router/TinyRouter.d.mts +320 -0
- package/dist/v1/libs/router/TinyRouter.d.mts.map +1 -0
- package/dist/v1/libs/router/TinyRouter.mjs +572 -0
- package/dist/v1/libs/storage/TinyLocalStorage.cjs +20 -1
- package/dist/v1/libs/storage/TinyLocalStorage.d.mts +64 -2
- package/dist/v1/libs/storage/TinyLocalStorage.d.mts.map +1 -1
- package/dist/v1/libs/storage/TinyLocalStorage.mjs +18 -1
- package/dist/v1/libs/storage/TinyMapCache.cjs +373 -0
- package/dist/v1/libs/storage/TinyMapCache.d.mts +274 -0
- package/dist/v1/libs/storage/TinyMapCache.d.mts.map +1 -0
- package/dist/v1/libs/storage/TinyMapCache.mjs +333 -0
- package/dist/v1/libs/storage/TinySetMapDatabase.cjs +1167 -0
- package/dist/v1/libs/storage/TinySetMapDatabase.d.mts +603 -0
- package/dist/v1/libs/storage/TinySetMapDatabase.d.mts.map +1 -0
- package/dist/v1/libs/storage/TinySetMapDatabase.mjs +1059 -0
- package/dist/v1/libs/sw/browser/TinyNotificationAdapter.cjs +126 -0
- package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts +132 -0
- package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts.map +1 -0
- package/dist/v1/libs/sw/browser/TinyNotificationAdapter.mjs +109 -0
- package/dist/v1/libs/sw/browser/TinyPushManager.cjs +310 -0
- package/dist/v1/libs/sw/browser/TinyPushManager.d.mts +168 -0
- package/dist/v1/libs/sw/browser/TinyPushManager.d.mts.map +1 -0
- package/dist/v1/libs/sw/browser/TinyPushManager.mjs +264 -0
- package/dist/v1/libs/sw/browser/TinyServiceWorker.cjs +1060 -0
- package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts +348 -0
- package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts.map +1 -0
- package/dist/v1/libs/sw/browser/TinyServiceWorker.mjs +933 -0
- package/dist/v1/libs/sw/browser/plugins/TabManager.cjs +315 -0
- package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts +178 -0
- package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts.map +1 -0
- package/dist/v1/libs/sw/browser/plugins/TabManager.mjs +274 -0
- package/dist/v1/libs/sw/browser/utils.cjs +28 -0
- package/dist/v1/libs/sw/browser/utils.d.mts +8 -0
- package/dist/v1/libs/sw/browser/utils.d.mts.map +1 -0
- package/dist/v1/libs/sw/browser/utils.mjs +21 -0
- package/dist/v1/libs/sw/service/TinyPushRouter.cjs +222 -0
- package/dist/v1/libs/sw/service/TinyPushRouter.d.mts +138 -0
- package/dist/v1/libs/sw/service/TinyPushRouter.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/TinyPushRouter.mjs +201 -0
- package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.cjs +3016 -0
- package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts +993 -0
- package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.mjs +2558 -0
- package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.cjs +88 -0
- package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts +32 -0
- package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.mjs +69 -0
- package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.cjs +112 -0
- package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts +31 -0
- package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.mjs +91 -0
- package/dist/v1/libs/sw/service/plugins/Ping.cjs +32 -0
- package/dist/v1/libs/sw/service/plugins/Ping.d.mts +9 -0
- package/dist/v1/libs/sw/service/plugins/Ping.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/plugins/Ping.mjs +25 -0
- package/dist/v1/libs/sw/service/plugins/TabManager.cjs +457 -0
- package/dist/v1/libs/sw/service/plugins/TabManager.d.mts +91 -0
- package/dist/v1/libs/sw/service/plugins/TabManager.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/plugins/TabManager.mjs +372 -0
- package/dist/v1/libs/sw/service/plugins/ViteFileDetector.cjs +180 -0
- package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts +28 -0
- package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/plugins/ViteFileDetector.mjs +148 -0
- package/dist/v1/libs/sw/service/shared/TinyPushPayload.cjs +199 -0
- package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts +80 -0
- package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts.map +1 -0
- package/dist/v1/libs/sw/service/shared/TinyPushPayload.mjs +174 -0
- package/dist/v1/libs/sw/utils.cjs +57 -0
- package/dist/v1/libs/sw/utils.d.mts +173 -0
- package/dist/v1/libs/sw/utils.d.mts.map +1 -0
- package/dist/v1/libs/sw/utils.mjs +50 -0
- package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.cjs +57 -0
- package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts +39 -0
- package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts.map +1 -0
- package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.mjs +48 -0
- package/dist/v1/libs/text/TinyI18/Browser.cjs +64 -0
- package/dist/v1/libs/text/TinyI18/Browser.d.mts +47 -0
- package/dist/v1/libs/text/TinyI18/Browser.d.mts.map +1 -0
- package/dist/v1/libs/text/TinyI18/Browser.mjs +57 -0
- package/dist/v1/libs/text/TinyI18/Node.cjs +49 -0
- package/dist/v1/libs/text/TinyI18/Node.d.mts +38 -0
- package/dist/v1/libs/text/TinyI18/Node.d.mts.map +1 -0
- package/dist/v1/libs/text/TinyI18/Node.mjs +43 -0
- package/dist/v1/libs/text/TinyI18/browser-utils.cjs +17 -0
- package/dist/v1/libs/text/TinyI18/browser-utils.d.mts +8 -0
- package/dist/v1/libs/text/TinyI18/browser-utils.d.mts.map +1 -0
- package/dist/v1/libs/text/TinyI18/browser-utils.mjs +13 -0
- package/dist/v1/libs/text/{TinyI18.cjs → TinyI18/index.cjs} +205 -104
- package/dist/v1/libs/text/{TinyI18.d.mts → TinyI18/index.d.mts} +141 -92
- package/dist/v1/libs/text/TinyI18/index.d.mts.map +1 -0
- package/dist/v1/libs/text/{TinyI18.mjs → TinyI18/index.mjs} +195 -101
- package/dist/v1/libs/tools/TinyBrowserMonitor.cjs +1088 -0
- package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts +621 -0
- package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyBrowserMonitor.mjs +940 -0
- package/dist/v1/libs/tools/TinyDebugger.cjs +180 -19
- package/dist/v1/libs/tools/TinyDebugger.d.mts +220 -24
- package/dist/v1/libs/tools/TinyDebugger.d.mts.map +1 -1
- package/dist/v1/libs/tools/TinyDebugger.mjs +161 -19
- package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.cjs +256 -0
- package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts +125 -0
- package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.mjs +223 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.cjs +23 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts +17 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.mjs +19 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.cjs +23 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts +17 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.mjs +19 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.cjs +390 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts +9 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.mjs +387 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.cjs +2 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts +27 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.mjs +12 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/LICENSE +53 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.cjs +405 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts +34 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.mjs +342 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.cjs +23 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts +17 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.mjs +19 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.cjs +327 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts +9 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.mjs +324 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.cjs +268 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts +107 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.mjs +238 -0
- package/dist/v1/libs/tools/TinyPasswordValidator.cjs +491 -0
- package/dist/v1/libs/tools/TinyPasswordValidator.d.mts +246 -0
- package/dist/v1/libs/tools/TinyPasswordValidator.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyPasswordValidator.mjs +434 -0
- package/dist/v1/libs/tools/TinyPkgExportValidator.cjs +48 -0
- package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts +14 -0
- package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts.map +1 -1
- package/dist/v1/libs/tools/TinyPkgExportValidator.mjs +44 -0
- package/dist/v1/libs/tools/TinySiteMap.cjs +1029 -0
- package/dist/v1/libs/tools/TinySiteMap.d.mts +429 -0
- package/dist/v1/libs/tools/TinySiteMap.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinySiteMap.mjs +910 -0
- package/dist/v1/libs/tools/TinySiteMapStream.cjs +121 -0
- package/dist/v1/libs/tools/TinySiteMapStream.d.mts +51 -0
- package/dist/v1/libs/tools/TinySiteMapStream.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinySiteMapStream.mjs +85 -0
- package/dist/v1/libs/tools/TinyURLSecurityVerifier.cjs +444 -0
- package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts +217 -0
- package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyURLSecurityVerifier.mjs +394 -0
- package/dist/v1/libs/tools/TinyUriParser/BlueSky.cjs +613 -0
- package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts +152 -0
- package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyUriParser/BlueSky.mjs +527 -0
- package/dist/v1/libs/tools/TinyUriParser/Discord.cjs +1119 -0
- package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts +306 -0
- package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyUriParser/Discord.mjs +968 -0
- package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.cjs +469 -0
- package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts +80 -0
- package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.mjs +379 -0
- package/dist/v1/libs/tools/TinyUriParser.cjs +217 -0
- package/dist/v1/libs/tools/TinyUriParser.d.mts +109 -0
- package/dist/v1/libs/tools/TinyUriParser.d.mts.map +1 -0
- package/dist/v1/libs/tools/TinyUriParser.mjs +183 -0
- package/dist/v1/libs/utils/TinyCloner.cjs +466 -0
- package/dist/v1/libs/utils/TinyCloner.d.mts +221 -0
- package/dist/v1/libs/utils/TinyCloner.d.mts.map +1 -0
- package/dist/v1/libs/utils/TinyCloner.mjs +416 -0
- package/dist/v1/libs/utils/TinyPromiseQueue.cjs +1 -1
- package/dist/v1/libs/utils/TinyPromiseQueue.d.mts +2 -2
- package/dist/v1/libs/utils/TinyPromiseQueue.d.mts.map +1 -1
- package/dist/v1/libs/utils/TinyPromiseQueue.mjs +1 -1
- package/dist/v1/libs/utils/TinyThrottledApi.cjs +333 -0
- package/dist/v1/libs/utils/TinyThrottledApi.d.mts +163 -0
- package/dist/v1/libs/utils/TinyThrottledApi.d.mts.map +1 -0
- package/dist/v1/libs/utils/TinyThrottledApi.mjs +294 -0
- package/dist/v1/libs/worker/browser/TinyWebWorker.cjs +342 -0
- package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts +97 -0
- package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts.map +1 -0
- package/dist/v1/libs/worker/browser/TinyWebWorker.mjs +305 -0
- package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.cjs +346 -0
- package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts +127 -0
- package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts.map +1 -0
- package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.mjs +304 -0
- package/dist/v1/regexp/Email.cjs +185 -0
- package/dist/v1/regexp/Email.d.mts +73 -0
- package/dist/v1/regexp/Email.d.mts.map +1 -0
- package/dist/v1/regexp/Email.mjs +153 -0
- package/dist/v1/regexp/Glob.cjs +293 -0
- package/dist/v1/regexp/Glob.d.mts +45 -0
- package/dist/v1/regexp/Glob.d.mts.map +1 -0
- package/dist/v1/regexp/Glob.mjs +260 -0
- package/dist/v1/regexp/Ipv4.cjs +57 -0
- package/dist/v1/regexp/Ipv4.d.mts +29 -0
- package/dist/v1/regexp/Ipv4.d.mts.map +1 -0
- package/dist/v1/regexp/Ipv4.mjs +45 -0
- package/dist/v1/regexp/Ipv6.cjs +67 -0
- package/dist/v1/regexp/Ipv6.d.mts +29 -0
- package/dist/v1/regexp/Ipv6.d.mts.map +1 -0
- package/dist/v1/regexp/Ipv6.mjs +54 -0
- package/dist/v1/regexp/SegmentExtractor.cjs +145 -0
- package/dist/v1/regexp/SegmentExtractor.d.mts +91 -0
- package/dist/v1/regexp/SegmentExtractor.d.mts.map +1 -0
- package/dist/v1/regexp/SegmentExtractor.mjs +116 -0
- package/dist/v1/regexp/UrlDetector.cjs +125 -0
- package/dist/v1/regexp/UrlDetector.d.mts +67 -0
- package/dist/v1/regexp/UrlDetector.d.mts.map +1 -0
- package/dist/v1/regexp/UrlDetector.mjs +102 -0
- package/dist/v1/regexp/Username/index.cjs +233 -0
- package/dist/v1/regexp/Username/index.d.mts +77 -0
- package/dist/v1/regexp/Username/index.d.mts.map +1 -0
- package/dist/v1/regexp/Username/index.mjs +199 -0
- package/dist/v1/regexp/Username/jsDoc.cjs +2 -0
- package/dist/v1/regexp/Username/jsDoc.d.mts +57 -0
- package/dist/v1/regexp/Username/jsDoc.d.mts.map +1 -0
- package/dist/v1/regexp/Username/jsDoc.mjs +18 -0
- package/dist/v1/regexp/Username/templates/BlueSky.cjs +56 -0
- package/dist/v1/regexp/Username/templates/BlueSky.d.mts +35 -0
- package/dist/v1/regexp/Username/templates/BlueSky.d.mts.map +1 -0
- package/dist/v1/regexp/Username/templates/BlueSky.mjs +52 -0
- package/dist/v1/regexp/Username/templates/Discord.cjs +505 -0
- package/dist/v1/regexp/Username/templates/Discord.d.mts +209 -0
- package/dist/v1/regexp/Username/templates/Discord.d.mts.map +1 -0
- package/dist/v1/regexp/Username/templates/Discord.mjs +458 -0
- package/dist/v1/regexp/Username/templates/MatrixProtocol.cjs +143 -0
- package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts +70 -0
- package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts.map +1 -0
- package/dist/v1/regexp/Username/templates/MatrixProtocol.mjs +128 -0
- package/dist/v1/regexp/Username/templates/deprecated/Discord.cjs +24 -0
- package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts +17 -0
- package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts.map +1 -0
- package/dist/v1/regexp/Username/templates/deprecated/Discord.mjs +20 -0
- package/dist/v1/regexp/Username/templates/index.cjs +11 -0
- package/dist/v1/regexp/Username/templates/index.d.mts +5 -0
- package/dist/v1/regexp/Username/templates/index.d.mts.map +1 -0
- package/dist/v1/regexp/Username/templates/index.mjs +4 -0
- package/dist/v1/regexp/index.cjs +41 -0
- package/dist/v1/regexp/index.d.mts +9 -0
- package/dist/v1/regexp/index.d.mts.map +1 -0
- package/dist/v1/regexp/index.mjs +8 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.cjs +64 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts +11 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts.map +1 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.mjs +51 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.cjs +66 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts +11 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts.map +1 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.mjs +51 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.cjs +39 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts +11 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts.map +1 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.mjs +28 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.cjs +494 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts +142 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts.map +1 -0
- package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.mjs +445 -0
- package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.cjs +30 -4
- package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts +5 -2
- package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts.map +1 -1
- package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.mjs +29 -5
- package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.cjs +135 -0
- package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts +83 -0
- package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts.map +1 -0
- package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.mjs +120 -0
- package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.cjs +127 -0
- package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts +95 -0
- package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts.map +1 -0
- package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.mjs +109 -0
- package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.cjs +83 -0
- package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts +46 -0
- package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts.map +1 -0
- package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.mjs +71 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.cjs +493 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts +67 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts.map +1 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.mjs +399 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.cjs +35 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts +6 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts.map +1 -0
- package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.mjs +29 -0
- package/docs/info/RegExp.md +74 -0
- package/docs/v1/Exports.md +101 -0
- package/docs/v1/README.md +113 -15
- package/docs/v1/basics/asyncReplace.md +2 -0
- package/docs/v1/basics/browserDetector.md +28 -11
- package/docs/v1/basics/crypto.md +85 -0
- package/docs/v1/basics/deprecated/html.md +2 -0
- package/docs/v1/basics/deprecated/objFilter.md +2 -0
- package/docs/v1/basics/html.md +2 -0
- package/docs/v1/basics/objChecker.md +55 -0
- package/docs/v1/basics/objFilter.md +57 -86
- package/docs/v1/basics/promiseUtils.md +12 -3
- package/docs/v1/basics/text.md +0 -1
- package/docs/v1/libs/array/TinyArrayComparator.md +50 -39
- package/docs/v1/libs/fs/TinyFS.md +752 -0
- package/docs/v1/libs/fs/TinyOPFSFileSystem.md +495 -0
- package/docs/v1/libs/fs/TinyStorageBucketFileSystem.md +407 -0
- package/docs/v1/libs/plugin/TinyPlugin.md +441 -0
- package/docs/v1/libs/plugin/TinyVersion.md +145 -0
- package/docs/v1/libs/router/TinyRouter.md +216 -0
- package/docs/v1/libs/storage/TinyMapCache.md +219 -0
- package/docs/v1/libs/storage/TinySetMapDatabase.md +478 -0
- package/docs/v1/libs/sw/browser/TinyNotificationAdapter.md +280 -0
- package/docs/v1/libs/sw/browser/TinyPushManager.md +782 -0
- package/docs/v1/libs/sw/browser/TinyServiceWorker.md +365 -0
- package/docs/v1/libs/sw/browser/plugins/TabManager.md +133 -0
- package/docs/v1/libs/sw/service/TinyPushRouter.md +314 -0
- package/docs/v1/libs/sw/service/TinyServiceWorkerEngine.md +748 -0
- package/docs/v1/libs/sw/service/plugins/GlobBypassPlugin.md +229 -0
- package/docs/v1/libs/sw/service/plugins/GlobCachePlugin.md +91 -0
- package/docs/v1/libs/sw/service/plugins/Ping.md +36 -0
- package/docs/v1/libs/sw/service/plugins/TabManager.md +64 -0
- package/docs/v1/libs/sw/service/plugins/ViteFileDetector.md +92 -0
- package/docs/v1/libs/sw/service/shared/TinyPushPayload.md +316 -0
- package/docs/v1/libs/text/TinyI18.md +80 -56
- package/docs/v1/libs/tools/TinyBrowserMonitor.md +170 -0
- package/docs/v1/libs/tools/TinyDebugger.md +117 -1
- package/docs/v1/libs/tools/TinyHtmlTagRegexBuilder.md +141 -0
- package/docs/v1/libs/tools/TinyHttpResponseRegistry.md +129 -0
- package/docs/v1/libs/tools/TinyPasswordValidator.md +153 -0
- package/docs/v1/libs/tools/TinyPkgExportValidator.md +45 -1
- package/docs/v1/libs/tools/TinySiteMap.md +134 -0
- package/docs/v1/libs/tools/TinySiteMapStream.md +97 -0
- package/docs/v1/libs/tools/TinyURLSecurityVerifier.md +146 -0
- package/docs/v1/libs/tools/TinyUriParser/Discord.md +374 -0
- package/docs/v1/libs/tools/TinyUriParser/MatrixProtocol.md +54 -0
- package/docs/v1/libs/tools/TinyUriParser.md +128 -0
- package/docs/v1/libs/utils/TinyCloner.md +126 -0
- package/docs/v1/libs/utils/TinyPromiseQueue.md +1 -1
- package/docs/v1/libs/utils/TinyThrottledApi.md +219 -0
- package/docs/v1/libs/worker/browser/TinyWebWorker.md +331 -0
- package/docs/v1/libs/worker/engine/TinyWebWorkerEngine.md +137 -0
- package/docs/v1/regexp/Email.md +127 -0
- package/docs/v1/regexp/Glob.md +155 -0
- package/docs/v1/regexp/IPv4.md +103 -0
- package/docs/v1/regexp/IPv6.md +122 -0
- package/docs/v1/regexp/SegmentExtractor.md +120 -0
- package/docs/v1/regexp/UrlDetector.md +117 -0
- package/docs/v1/regexp/Username/Base.md +131 -0
- package/docs/v1/regexp/Username/Discord.md +267 -0
- package/docs/v1/regexp/Username/MatrixProtocol.md +131 -0
- package/docs/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters.md +569 -0
- package/docs/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.md +19 -7
- package/docs/v1/webTemplates/media/MediaValidator/v1/Browser.md +123 -0
- package/docs/v1/webTemplates/media/MediaValidator/v1/Node.md +136 -0
- package/docs/v1/webTemplates/multiformats/14.0/IPFSHasher.md +310 -0
- package/docs/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.md +131 -0
- package/docs/v1/webTemplates/vite/7.3/plugins/githubUtils.md +50 -0
- package/package.json +303 -13
- package/types/EventEmitter.d.ts +48 -0
- package/dist/v1/libs/text/TinyI18.d.mts.map +0 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Immutable metadata snapshots returned by {@link TinyFSCore#stat}.
|
|
3
|
+
*/
|
|
4
|
+
export type FSEntryKind = 'file' | 'directory' | 'symbolic-link';
|
|
5
|
+
export type FSStatDescriptor = {
|
|
6
|
+
/**
|
|
7
|
+
* Base name of the entry.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* Entry kind.
|
|
12
|
+
*/
|
|
13
|
+
kind: FSEntryKind;
|
|
14
|
+
/**
|
|
15
|
+
* Size in bytes. Ignored for directories.
|
|
16
|
+
*/
|
|
17
|
+
size: number;
|
|
18
|
+
/**
|
|
19
|
+
* Last modification time in milliseconds since the epoch.
|
|
20
|
+
*/
|
|
21
|
+
mtimeMs: number;
|
|
22
|
+
};
|
|
23
|
+
export type FSDirectoryEntry = {
|
|
24
|
+
/**
|
|
25
|
+
* Base name of the entry.
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
* Entry kind.
|
|
30
|
+
*/
|
|
31
|
+
kind: FSEntryKind;
|
|
32
|
+
};
|
|
33
|
+
export type FSMetadata = {
|
|
34
|
+
/**
|
|
35
|
+
* POSIX permission bits, or `null` when unset.
|
|
36
|
+
*/
|
|
37
|
+
mode: number | null;
|
|
38
|
+
/**
|
|
39
|
+
* Owner user id.
|
|
40
|
+
*/
|
|
41
|
+
uid: number | null;
|
|
42
|
+
/**
|
|
43
|
+
* Owner group id.
|
|
44
|
+
*/
|
|
45
|
+
gid: number | null;
|
|
46
|
+
/**
|
|
47
|
+
* Last access time in milliseconds since the epoch.
|
|
48
|
+
*/
|
|
49
|
+
atimeMs: number | null;
|
|
50
|
+
/**
|
|
51
|
+
* Last modification time in milliseconds since the epoch.
|
|
52
|
+
*/
|
|
53
|
+
mtimeMs: number | null;
|
|
54
|
+
/**
|
|
55
|
+
* Creation time in milliseconds since the epoch.
|
|
56
|
+
*/
|
|
57
|
+
birthtimeMs: number | null;
|
|
58
|
+
};
|
|
59
|
+
export type StatsOptions = {
|
|
60
|
+
/**
|
|
61
|
+
* Absolute path of the entry.
|
|
62
|
+
*/
|
|
63
|
+
path: string;
|
|
64
|
+
/**
|
|
65
|
+
* Base name of the entry.
|
|
66
|
+
*/
|
|
67
|
+
name: string;
|
|
68
|
+
/**
|
|
69
|
+
* Entry kind.
|
|
70
|
+
*/
|
|
71
|
+
kind: FSEntryKind;
|
|
72
|
+
/**
|
|
73
|
+
* Size in bytes.
|
|
74
|
+
*/
|
|
75
|
+
size: number;
|
|
76
|
+
/**
|
|
77
|
+
* POSIX permission bits.
|
|
78
|
+
*/
|
|
79
|
+
mode: number;
|
|
80
|
+
/**
|
|
81
|
+
* Owner user id.
|
|
82
|
+
*/
|
|
83
|
+
uid: number;
|
|
84
|
+
/**
|
|
85
|
+
* Owner group id.
|
|
86
|
+
*/
|
|
87
|
+
gid: number;
|
|
88
|
+
/**
|
|
89
|
+
* Last access time in milliseconds since the epoch.
|
|
90
|
+
*/
|
|
91
|
+
atimeMs: number;
|
|
92
|
+
/**
|
|
93
|
+
* Last modification time in milliseconds since the epoch.
|
|
94
|
+
*/
|
|
95
|
+
mtimeMs: number;
|
|
96
|
+
/**
|
|
97
|
+
* Creation time in milliseconds since the epoch.
|
|
98
|
+
*/
|
|
99
|
+
birthtimeMs: number;
|
|
100
|
+
/**
|
|
101
|
+
* Inode number. `0` when the backend has no inodes.
|
|
102
|
+
*/
|
|
103
|
+
ino: number;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* @typedef {'file' | 'directory' | 'symbolic-link'} FSEntryKind
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* @typedef {Object} FSStatDescriptor
|
|
110
|
+
* @property {string} name Base name of the entry.
|
|
111
|
+
* @property {FSEntryKind} kind Entry kind.
|
|
112
|
+
* @property {number} size Size in bytes. Ignored for directories.
|
|
113
|
+
* @property {number} mtimeMs Last modification time in milliseconds since the epoch.
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* @typedef {Object} FSDirectoryEntry
|
|
117
|
+
* @property {string} name Base name of the entry.
|
|
118
|
+
* @property {FSEntryKind} kind Entry kind.
|
|
119
|
+
*/
|
|
120
|
+
/**
|
|
121
|
+
* @typedef {Object} FSMetadata
|
|
122
|
+
* @property {number | null} mode POSIX permission bits, or `null` when unset.
|
|
123
|
+
* @property {number | null} uid Owner user id.
|
|
124
|
+
* @property {number | null} gid Owner group id.
|
|
125
|
+
* @property {number | null} atimeMs Last access time in milliseconds since the epoch.
|
|
126
|
+
* @property {number | null} mtimeMs Last modification time in milliseconds since the epoch.
|
|
127
|
+
* @property {number | null} birthtimeMs Creation time in milliseconds since the epoch.
|
|
128
|
+
*/
|
|
129
|
+
/**
|
|
130
|
+
* @typedef {Object} StatsOptions
|
|
131
|
+
* @property {string} path Absolute path of the entry.
|
|
132
|
+
* @property {string} name Base name of the entry.
|
|
133
|
+
* @property {FSEntryKind} kind Entry kind.
|
|
134
|
+
* @property {number} size Size in bytes.
|
|
135
|
+
* @property {number} mode POSIX permission bits.
|
|
136
|
+
* @property {number} uid Owner user id.
|
|
137
|
+
* @property {number} gid Owner group id.
|
|
138
|
+
* @property {number} atimeMs Last access time in milliseconds since the epoch.
|
|
139
|
+
* @property {number} mtimeMs Last modification time in milliseconds since the epoch.
|
|
140
|
+
* @property {number} birthtimeMs Creation time in milliseconds since the epoch.
|
|
141
|
+
* @property {number} ino Inode number. `0` when the backend has no inodes.
|
|
142
|
+
*/
|
|
143
|
+
/**
|
|
144
|
+
* Immutable snapshot of a file system entry, shaped like `node:fs.Stats`.
|
|
145
|
+
*/
|
|
146
|
+
export declare class Stats {
|
|
147
|
+
#private;
|
|
148
|
+
/**
|
|
149
|
+
* @param {StatsOptions} options Snapshot values.
|
|
150
|
+
*/
|
|
151
|
+
constructor(options: StatsOptions);
|
|
152
|
+
/** @returns {string} Absolute path of the entry. */
|
|
153
|
+
get path(): string;
|
|
154
|
+
/** @returns {string} Base name of the entry. */
|
|
155
|
+
get name(): string;
|
|
156
|
+
/** @returns {number} Size in bytes, or `0` for directories. */
|
|
157
|
+
get size(): number;
|
|
158
|
+
/** @returns {number} POSIX permission bits. */
|
|
159
|
+
get mode(): number;
|
|
160
|
+
/** @returns {number} Owner user id. */
|
|
161
|
+
get uid(): number;
|
|
162
|
+
/** @returns {number} Owner group id. */
|
|
163
|
+
get gid(): number;
|
|
164
|
+
/** @returns {number} Inode number, or `0` when unsupported. */
|
|
165
|
+
get ino(): number;
|
|
166
|
+
/** @returns {number} Number of hard links. Always `1`. */
|
|
167
|
+
get nlink(): number;
|
|
168
|
+
/** @returns {number} Last access time in milliseconds since the epoch. */
|
|
169
|
+
get atimeMs(): number;
|
|
170
|
+
/** @returns {number} Last modification time in milliseconds since the epoch. */
|
|
171
|
+
get mtimeMs(): number;
|
|
172
|
+
/** @returns {number} Creation time in milliseconds since the epoch. */
|
|
173
|
+
get birthtimeMs(): number;
|
|
174
|
+
/** @returns {Date} Last access time. */
|
|
175
|
+
get atime(): Date;
|
|
176
|
+
/** @returns {Date} Last modification time. */
|
|
177
|
+
get mtime(): Date;
|
|
178
|
+
/** @returns {Date} Change time. Alias of `mtime`. */
|
|
179
|
+
get ctime(): Date;
|
|
180
|
+
/** @returns {Date} Creation time. */
|
|
181
|
+
get birthtime(): Date;
|
|
182
|
+
/** @returns {boolean} `true` when the entry is a regular file. */
|
|
183
|
+
isFile(): boolean;
|
|
184
|
+
/** @returns {boolean} `true` when the entry is a directory. */
|
|
185
|
+
isDirectory(): boolean;
|
|
186
|
+
/** @returns {boolean} `true` when the entry is a symbolic link. */
|
|
187
|
+
isSymbolicLink(): boolean;
|
|
188
|
+
/** @returns {boolean} Always `false`. */
|
|
189
|
+
isBlockDevice(): boolean;
|
|
190
|
+
/** @returns {boolean} Always `false`. */
|
|
191
|
+
isCharacterDevice(): boolean;
|
|
192
|
+
/** @returns {boolean} Always `false`. */
|
|
193
|
+
isFIFO(): boolean;
|
|
194
|
+
/** @returns {boolean} Always `false`. */
|
|
195
|
+
isSocket(): boolean;
|
|
196
|
+
/** @returns {number} The `st_mode` field, including the file type bits. */
|
|
197
|
+
get modeWithType(): number;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Directory entry returned by `readdir` when `withFileTypes` is `true`.
|
|
201
|
+
*/
|
|
202
|
+
export declare class Dirent {
|
|
203
|
+
#private;
|
|
204
|
+
/**
|
|
205
|
+
* @param {string} name Base name of the entry.
|
|
206
|
+
* @param {FSEntryKind} kind Entry kind.
|
|
207
|
+
*/
|
|
208
|
+
constructor(name: string, kind: FSEntryKind);
|
|
209
|
+
/** @returns {string} Base name of the entry. */
|
|
210
|
+
get name(): string;
|
|
211
|
+
/** @returns {boolean} `true` when the entry is a regular file. */
|
|
212
|
+
isFile(): boolean;
|
|
213
|
+
/** @returns {boolean} `true` when the entry is a directory. */
|
|
214
|
+
isDirectory(): boolean;
|
|
215
|
+
/** @returns {boolean} `true` when the entry is a symbolic link. */
|
|
216
|
+
isSymbolicLink(): boolean;
|
|
217
|
+
/** @returns {boolean} Always `false`. */
|
|
218
|
+
isBlockDevice(): boolean;
|
|
219
|
+
/** @returns {boolean} Always `false`. */
|
|
220
|
+
isCharacterDevice(): boolean;
|
|
221
|
+
/** @returns {boolean} Always `false`. */
|
|
222
|
+
isFIFO(): boolean;
|
|
223
|
+
/** @returns {boolean} Always `false`. */
|
|
224
|
+
isSocket(): boolean;
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=stats.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.mts","sourceRoot":"","sources":["../../../../src/v1/libs/fs/stats.mjs"],"names":[],"mappings":"AAAA;;GAEG;AAKA,YAAkD,WAAW,GAAnD,MAAM,GAAG,WAAW,GAAG,eAAe,CAAa;AAI7D,YAAkB,gBAAgB,GAClC;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;IAAwB,IAAI,EAAjB,WAAW,CACtB;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;IAAmB,OAAO,EAAf,MAAM,CACnB;CAAA,CAAA;AAGE,YAAkB,gBAAgB,GAClC;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;IAAwB,IAAI,EAAjB,WAAW,CACxB;CAAA,CAAA;AAGE,YAAkB,UAAU,GAC5B;;;;IAA0B,IAAI,EAAnB,MAAM,GAAG,IAAI,CACxB;;;;IAA0B,GAAG,EAAlB,MAAM,GAAG,IAAI,CACxB;;;;IAA0B,GAAG,EAAlB,MAAM,GAAG,IAAI,CACxB;;;;IAA0B,OAAO,EAAtB,MAAM,GAAG,IAAI,CACxB;;;;IAA0B,OAAO,EAAtB,MAAM,GAAG,IAAI,CACxB;;;;IAA0B,WAAW,EAA1B,MAAM,GAAG,IAAI,CAC1B;CAAA,CAAA;AAGE,YAAkB,YAAY,GAC9B;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;IAAwB,IAAI,EAAjB,WAAW,CACtB;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;IAAmB,GAAG,EAAX,MAAM,CACjB;;;;IAAmB,GAAG,EAAX,MAAM,CACjB;;;;IAAmB,OAAO,EAAf,MAAM,CACjB;;;;IAAmB,OAAO,EAAf,MAAM,CACjB;;;;IAAmB,WAAW,EAAnB,MAAM,CACjB;;;;IAAmB,GAAG,EAAX,MAAM,CACnB;CAAA,CAAA;AAzCD;;GAEG;AAEH;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;GAaG;AAEH;;GAEG;AACH,qBAAa,KAAK;;IAIhB;;OAEG;IACH,YAAY,OAAO,EAFR,YAEQ,EAElB;IAED,oDAAoD;IACpD,IAAI,IAAI,IADM,MAAM,CAGnB;IAED,gDAAgD;IAChD,IAAI,IAAI,IADM,MAAM,CAGnB;IAED,+DAA+D;IAC/D,IAAI,IAAI,IADM,MAAM,CAGnB;IAED,+CAA+C;IAC/C,IAAI,IAAI,IADM,MAAM,CAGnB;IAED,uCAAuC;IACvC,IAAI,GAAG,IADO,MAAM,CAGnB;IAED,wCAAwC;IACxC,IAAI,GAAG,IADO,MAAM,CAGnB;IAED,+DAA+D;IAC/D,IAAI,GAAG,IADO,MAAM,CAGnB;IAED,0DAA0D;IAC1D,IAAI,KAAK,IADK,MAAM,CAGnB;IAED,0EAA0E;IAC1E,IAAI,OAAO,IADG,MAAM,CAGnB;IAED,gFAAgF;IAChF,IAAI,OAAO,IADG,MAAM,CAGnB;IAED,uEAAuE;IACvE,IAAI,WAAW,IADD,MAAM,CAGnB;IAED,wCAAwC;IACxC,IAAI,KAAK,IADK,IAAI,CAGjB;IAED,8CAA8C;IAC9C,IAAI,KAAK,IADK,IAAI,CAGjB;IAED,qDAAqD;IACrD,IAAI,KAAK,IADK,IAAI,CAGjB;IAED,qCAAqC;IACrC,IAAI,SAAS,IADC,IAAI,CAGjB;IAED,kEAAkE;IAClE,MAAM,IADQ,OAAO,CAGpB;IAED,+DAA+D;IAC/D,WAAW,IADG,OAAO,CAGpB;IAED,mEAAmE;IACnE,cAAc,IADA,OAAO,CAGpB;IAED,yCAAyC;IACzC,aAAa,IADC,OAAO,CAGpB;IAED,yCAAyC;IACzC,iBAAiB,IADH,OAAO,CAGpB;IAED,yCAAyC;IACzC,MAAM,IADQ,OAAO,CAGpB;IAED,yCAAyC;IACzC,QAAQ,IADM,OAAO,CAGpB;IAED,2EAA2E;IAC3E,IAAI,YAAY,IADF,MAAM,CAInB;CACF;AAED;;GAEG;AACH,qBAAa,MAAM;;IAOjB;;;OAGG;IACH,YAAY,IAAI,EAHL,MAGK,EAAE,IAAI,EAFX,WAEW,EAGrB;IAED,gDAAgD;IAChD,IAAI,IAAI,IADM,MAAM,CAGnB;IAED,kEAAkE;IAClE,MAAM,IADQ,OAAO,CAGpB;IAED,+DAA+D;IAC/D,WAAW,IADG,OAAO,CAGpB;IAED,mEAAmE;IACnE,cAAc,IADA,OAAO,CAGpB;IAED,yCAAyC;IACzC,aAAa,IADC,OAAO,CAGpB;IAED,yCAAyC;IACzC,iBAAiB,IADH,OAAO,CAGpB;IAED,yCAAyC;IACzC,MAAM,IADQ,OAAO,CAGpB;IAED,yCAAyC;IACzC,QAAQ,IADM,OAAO,CAGpB;CACF"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Immutable metadata snapshots returned by {@link TinyFSCore#stat}.
|
|
3
|
+
*/
|
|
4
|
+
import { FILE_TYPE } from './constants.mjs';
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {'file' | 'directory' | 'symbolic-link'} FSEntryKind
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} FSStatDescriptor
|
|
10
|
+
* @property {string} name Base name of the entry.
|
|
11
|
+
* @property {FSEntryKind} kind Entry kind.
|
|
12
|
+
* @property {number} size Size in bytes. Ignored for directories.
|
|
13
|
+
* @property {number} mtimeMs Last modification time in milliseconds since the epoch.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* @typedef {Object} FSDirectoryEntry
|
|
17
|
+
* @property {string} name Base name of the entry.
|
|
18
|
+
* @property {FSEntryKind} kind Entry kind.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {Object} FSMetadata
|
|
22
|
+
* @property {number | null} mode POSIX permission bits, or `null` when unset.
|
|
23
|
+
* @property {number | null} uid Owner user id.
|
|
24
|
+
* @property {number | null} gid Owner group id.
|
|
25
|
+
* @property {number | null} atimeMs Last access time in milliseconds since the epoch.
|
|
26
|
+
* @property {number | null} mtimeMs Last modification time in milliseconds since the epoch.
|
|
27
|
+
* @property {number | null} birthtimeMs Creation time in milliseconds since the epoch.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* @typedef {Object} StatsOptions
|
|
31
|
+
* @property {string} path Absolute path of the entry.
|
|
32
|
+
* @property {string} name Base name of the entry.
|
|
33
|
+
* @property {FSEntryKind} kind Entry kind.
|
|
34
|
+
* @property {number} size Size in bytes.
|
|
35
|
+
* @property {number} mode POSIX permission bits.
|
|
36
|
+
* @property {number} uid Owner user id.
|
|
37
|
+
* @property {number} gid Owner group id.
|
|
38
|
+
* @property {number} atimeMs Last access time in milliseconds since the epoch.
|
|
39
|
+
* @property {number} mtimeMs Last modification time in milliseconds since the epoch.
|
|
40
|
+
* @property {number} birthtimeMs Creation time in milliseconds since the epoch.
|
|
41
|
+
* @property {number} ino Inode number. `0` when the backend has no inodes.
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* Immutable snapshot of a file system entry, shaped like `node:fs.Stats`.
|
|
45
|
+
*/
|
|
46
|
+
export class Stats {
|
|
47
|
+
/** @type {StatsOptions} */
|
|
48
|
+
#options;
|
|
49
|
+
/**
|
|
50
|
+
* @param {StatsOptions} options Snapshot values.
|
|
51
|
+
*/
|
|
52
|
+
constructor(options) {
|
|
53
|
+
this.#options = Object.freeze({ ...options });
|
|
54
|
+
}
|
|
55
|
+
/** @returns {string} Absolute path of the entry. */
|
|
56
|
+
get path() {
|
|
57
|
+
return this.#options.path;
|
|
58
|
+
}
|
|
59
|
+
/** @returns {string} Base name of the entry. */
|
|
60
|
+
get name() {
|
|
61
|
+
return this.#options.name;
|
|
62
|
+
}
|
|
63
|
+
/** @returns {number} Size in bytes, or `0` for directories. */
|
|
64
|
+
get size() {
|
|
65
|
+
return this.#options.kind === 'directory' ? 0 : this.#options.size;
|
|
66
|
+
}
|
|
67
|
+
/** @returns {number} POSIX permission bits. */
|
|
68
|
+
get mode() {
|
|
69
|
+
return this.#options.mode;
|
|
70
|
+
}
|
|
71
|
+
/** @returns {number} Owner user id. */
|
|
72
|
+
get uid() {
|
|
73
|
+
return this.#options.uid;
|
|
74
|
+
}
|
|
75
|
+
/** @returns {number} Owner group id. */
|
|
76
|
+
get gid() {
|
|
77
|
+
return this.#options.gid;
|
|
78
|
+
}
|
|
79
|
+
/** @returns {number} Inode number, or `0` when unsupported. */
|
|
80
|
+
get ino() {
|
|
81
|
+
return this.#options.ino;
|
|
82
|
+
}
|
|
83
|
+
/** @returns {number} Number of hard links. Always `1`. */
|
|
84
|
+
get nlink() {
|
|
85
|
+
return 1;
|
|
86
|
+
}
|
|
87
|
+
/** @returns {number} Last access time in milliseconds since the epoch. */
|
|
88
|
+
get atimeMs() {
|
|
89
|
+
return this.#options.atimeMs;
|
|
90
|
+
}
|
|
91
|
+
/** @returns {number} Last modification time in milliseconds since the epoch. */
|
|
92
|
+
get mtimeMs() {
|
|
93
|
+
return this.#options.mtimeMs;
|
|
94
|
+
}
|
|
95
|
+
/** @returns {number} Creation time in milliseconds since the epoch. */
|
|
96
|
+
get birthtimeMs() {
|
|
97
|
+
return this.#options.birthtimeMs;
|
|
98
|
+
}
|
|
99
|
+
/** @returns {Date} Last access time. */
|
|
100
|
+
get atime() {
|
|
101
|
+
return new Date(this.#options.atimeMs);
|
|
102
|
+
}
|
|
103
|
+
/** @returns {Date} Last modification time. */
|
|
104
|
+
get mtime() {
|
|
105
|
+
return new Date(this.#options.mtimeMs);
|
|
106
|
+
}
|
|
107
|
+
/** @returns {Date} Change time. Alias of `mtime`. */
|
|
108
|
+
get ctime() {
|
|
109
|
+
return new Date(this.#options.mtimeMs);
|
|
110
|
+
}
|
|
111
|
+
/** @returns {Date} Creation time. */
|
|
112
|
+
get birthtime() {
|
|
113
|
+
return new Date(this.#options.birthtimeMs);
|
|
114
|
+
}
|
|
115
|
+
/** @returns {boolean} `true` when the entry is a regular file. */
|
|
116
|
+
isFile() {
|
|
117
|
+
return this.#options.kind === 'file';
|
|
118
|
+
}
|
|
119
|
+
/** @returns {boolean} `true` when the entry is a directory. */
|
|
120
|
+
isDirectory() {
|
|
121
|
+
return this.#options.kind === 'directory';
|
|
122
|
+
}
|
|
123
|
+
/** @returns {boolean} `true` when the entry is a symbolic link. */
|
|
124
|
+
isSymbolicLink() {
|
|
125
|
+
return this.#options.kind === 'symbolic-link';
|
|
126
|
+
}
|
|
127
|
+
/** @returns {boolean} Always `false`. */
|
|
128
|
+
isBlockDevice() {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
/** @returns {boolean} Always `false`. */
|
|
132
|
+
isCharacterDevice() {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
/** @returns {boolean} Always `false`. */
|
|
136
|
+
isFIFO() {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
/** @returns {boolean} Always `false`. */
|
|
140
|
+
isSocket() {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
/** @returns {number} The `st_mode` field, including the file type bits. */
|
|
144
|
+
get modeWithType() {
|
|
145
|
+
const type = this.isDirectory() ? FILE_TYPE.DIRECTORY : FILE_TYPE.FILE;
|
|
146
|
+
return type | this.#options.mode;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Directory entry returned by `readdir` when `withFileTypes` is `true`.
|
|
151
|
+
*/
|
|
152
|
+
export class Dirent {
|
|
153
|
+
/** @type {string} */
|
|
154
|
+
#name;
|
|
155
|
+
/** @type {FSEntryKind} */
|
|
156
|
+
#kind;
|
|
157
|
+
/**
|
|
158
|
+
* @param {string} name Base name of the entry.
|
|
159
|
+
* @param {FSEntryKind} kind Entry kind.
|
|
160
|
+
*/
|
|
161
|
+
constructor(name, kind) {
|
|
162
|
+
this.#name = name;
|
|
163
|
+
this.#kind = kind;
|
|
164
|
+
}
|
|
165
|
+
/** @returns {string} Base name of the entry. */
|
|
166
|
+
get name() {
|
|
167
|
+
return this.#name;
|
|
168
|
+
}
|
|
169
|
+
/** @returns {boolean} `true` when the entry is a regular file. */
|
|
170
|
+
isFile() {
|
|
171
|
+
return this.#kind === 'file';
|
|
172
|
+
}
|
|
173
|
+
/** @returns {boolean} `true` when the entry is a directory. */
|
|
174
|
+
isDirectory() {
|
|
175
|
+
return this.#kind === 'directory';
|
|
176
|
+
}
|
|
177
|
+
/** @returns {boolean} `true` when the entry is a symbolic link. */
|
|
178
|
+
isSymbolicLink() {
|
|
179
|
+
return this.#kind === 'symbolic-link';
|
|
180
|
+
}
|
|
181
|
+
/** @returns {boolean} Always `false`. */
|
|
182
|
+
isBlockDevice() {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
/** @returns {boolean} Always `false`. */
|
|
186
|
+
isCharacterDevice() {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
/** @returns {boolean} Always `false`. */
|
|
190
|
+
isFIFO() {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
/** @returns {boolean} Always `false`. */
|
|
194
|
+
isSocket() {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -35,6 +35,15 @@ const instances = new WeakMap();
|
|
|
35
35
|
* @property {'iframe' | 'parent'} direction - Indicates the sender: 'iframe' or 'parent'.
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Event map for {@link TinyIframeEvents}.
|
|
40
|
+
* All routed events are prefixed with `win:` followed by the event name.
|
|
41
|
+
* @typedef {Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & Record<string, (...args: any[]) => void>} TinyIframeEventsMap
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
/** @type {new (config?: TinyIframeEventsConfig) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyIframeEventsMap>} */
|
|
45
|
+
const TypedEventEmitter = /** @type {any} */ (events.EventEmitter);
|
|
46
|
+
|
|
38
47
|
/**
|
|
39
48
|
* A highly secure and flexible event routing system for structured communication
|
|
40
49
|
* between a parent window and its iframe using `MessageChannel`.
|
|
@@ -49,7 +58,7 @@ const instances = new WeakMap();
|
|
|
49
58
|
* - Queue management for messages sent before the connection is established.
|
|
50
59
|
* - Auto-reconnects and resets ports if the target iframe is reloaded.
|
|
51
60
|
*/
|
|
52
|
-
class TinyIframeEvents extends
|
|
61
|
+
class TinyIframeEvents extends TypedEventEmitter {
|
|
53
62
|
/** @type {Window} */
|
|
54
63
|
#targetWindow;
|
|
55
64
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
1
|
export type handler = (payload: any, event: MessageEvent<any>) => any;
|
|
3
2
|
export type TinyIframeEventsConfig = {
|
|
4
3
|
/**
|
|
@@ -40,6 +39,7 @@ export type IframeEventBase = {
|
|
|
40
39
|
*/
|
|
41
40
|
direction: 'iframe' | 'parent';
|
|
42
41
|
};
|
|
42
|
+
export type TinyIframeEventsMap = Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & Record<string, (...args: any[]) => void>;
|
|
43
43
|
/**
|
|
44
44
|
* @callback handler
|
|
45
45
|
* A function to handle incoming event payloads.
|
|
@@ -63,6 +63,13 @@ export type IframeEventBase = {
|
|
|
63
63
|
* @property {any} payload - The data being sent (can be any type).
|
|
64
64
|
* @property {'iframe' | 'parent'} direction - Indicates the sender: 'iframe' or 'parent'.
|
|
65
65
|
*/
|
|
66
|
+
/**
|
|
67
|
+
* Event map for {@link TinyIframeEvents}.
|
|
68
|
+
* All routed events are prefixed with `win:` followed by the event name.
|
|
69
|
+
* @typedef {Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & Record<string, (...args: any[]) => void>} TinyIframeEventsMap
|
|
70
|
+
*/
|
|
71
|
+
/** @type {new (config?: TinyIframeEventsConfig) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyIframeEventsMap>} */
|
|
72
|
+
declare const TypedEventEmitter: new (config?: TinyIframeEventsConfig) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyIframeEventsMap>;
|
|
66
73
|
/**
|
|
67
74
|
* A highly secure and flexible event routing system for structured communication
|
|
68
75
|
* between a parent window and its iframe using `MessageChannel`.
|
|
@@ -77,7 +84,7 @@ export type IframeEventBase = {
|
|
|
77
84
|
* - Queue management for messages sent before the connection is established.
|
|
78
85
|
* - Auto-reconnects and resets ports if the target iframe is reloaded.
|
|
79
86
|
*/
|
|
80
|
-
declare class TinyIframeEvents extends
|
|
87
|
+
declare class TinyIframeEvents extends TypedEventEmitter {
|
|
81
88
|
#private;
|
|
82
89
|
_boundWindowMessage: (event: MessageEvent<any>) => void;
|
|
83
90
|
_boundPortMessage: (event: MessageEvent<any>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TinyIframeEvents.d.mts","sourceRoot":"","sources":["../../../../../src/v1/libs/html/events/TinyIframeEvents.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TinyIframeEvents.d.mts","sourceRoot":"","sources":["../../../../../src/v1/libs/html/events/TinyIframeEvents.mjs"],"names":[],"mappings":"AAUG,YAAU,OAAO,GAEjB,CAAa,OAAO,EAAZ,GACR,EAA2B,KAAK,EAAxB,YAAY,CAAC,GAAG,CAC1B,QAAA,CAAA;AAGE,YAAkB,sBAAsB,GAExC;;;;IAA+B,YAAY,AAA3C,CACA,EADW,iBAAiB,CAC5B;;;;IAAoB,YAAY,AAAhC,CACA,EADW,MAAM,CACjB;;;;IAAoB,eAAe,AAAnC,CACA,EADW,MAAM,CACjB;;;;IAAoB,kBAAkB,AAAtC,CACA,EADW,MAAM,CACjB;;;;IAAoB,cAAc,AAAlC,CACF,EADa,MAAM,CACnB;CAAA,CAAA;AAGE,YAAkB,eAAe,GAEjC;;;;IAAqB,eAAe,AAApC,CACA,EADW,OAAO,CAClB;;;;IAAmB,SAAS,EAAjB,MAAM,CACjB;;;;IAAgB,OAAO,EAAZ,GAAG,CACd;;;;IAAgC,SAAS,EAA9B,QAAQ,GAAG,QAAQ,CAChC;CAAA,CAAA;AAKE,YAA2H,mBAAmB,GAApI,MAAM,CAAC,OAAO,MAAM,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,CAAqB;AA7BjJ;;;;;GAKG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AAEH;;;;GAIG;AAEH,0IAA0I;AAC1I,QAAA,MAAM,iBAAiB,EADZ,KAAK,MAAM,CAAC,EAAE,sBAAsB,KAAK,OAAO,iCAAiC,EAAE,mBAAmB,CAAC,mBAAmB,CAC1E,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,cAAM,gBAAiB,SAAQ,iBAAiB;;IAoHvC,mBAAmB,UA4Gf,YAAY,CAAC,GAAG,CAAC;IA3GrB,iBAAiB,UA8Hb,YAAY,CAAC,GAAG,CAAC;IA/O5B,IAAI,YAAY,WAGf;IAKD,IAAI,mBAAmB,kCAGtB;IAKD,IAAI,YAAY,WAGf;IAKD,IAAI,QAAQ,wBAGX;IAQD,IAAI,KAAK,YAGR;IAED;;;;;OAKG;IACH,OAAO,CAAC,OAAO,EAFJ,MAAM,IAEF,QAOd;IAoBD;;;;;OAKG;IACH,YAAY,EACV,YAAY,EACZ,YAAqC,EACrC,eAAuC,EACvC,kBAA8C,EAC9C,cAAsC,GACvC,GARU,sBAQL,EAgCL;IAED;;;OAGG;IACH,IAAI,eAAe,IAFN,MAAM,CAKlB;IAED;;;;OAIG;IACH,IAAI,eAAe,CAAC,IAAI,EAHb,MAGa,EAKvB;IAED;;;OAGG;IACH,IAAI,kBAAkB,IAFT,MAAM,CAKlB;IAED;;;;OAIG;IACH,IAAI,kBAAkB,CAAC,IAAI,EAHhB,MAGgB,EAK1B;IAED;;;OAGG;IACH,IAAI,cAAc,IAFL,MAAM,CAKlB;IAED;;;;OAIG;IACH,IAAI,cAAc,CAAC,IAAI,EAHZ,MAGY,EAKtB;IAgHD;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS,EALN,MAKM,EAAE,OAAO,EAJf,GAIe,QAmBzB;IAED;;;;OAIG;IACH,WAAW,IAFE,OAAO,CAInB;IAED;;;OAGG;IACH,OAAO,SAmBN;CACF;eAEc,gBAAgB"}
|
|
@@ -27,6 +27,13 @@ const instances = new WeakMap();
|
|
|
27
27
|
* @property {any} payload - The data being sent (can be any type).
|
|
28
28
|
* @property {'iframe' | 'parent'} direction - Indicates the sender: 'iframe' or 'parent'.
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* Event map for {@link TinyIframeEvents}.
|
|
32
|
+
* All routed events are prefixed with `win:` followed by the event name.
|
|
33
|
+
* @typedef {Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & Record<string, (...args: any[]) => void>} TinyIframeEventsMap
|
|
34
|
+
*/
|
|
35
|
+
/** @type {new (config?: TinyIframeEventsConfig) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyIframeEventsMap>} */
|
|
36
|
+
const TypedEventEmitter = /** @type {any} */ (EventEmitter);
|
|
30
37
|
/**
|
|
31
38
|
* A highly secure and flexible event routing system for structured communication
|
|
32
39
|
* between a parent window and its iframe using `MessageChannel`.
|
|
@@ -41,7 +48,7 @@ const instances = new WeakMap();
|
|
|
41
48
|
* - Queue management for messages sent before the connection is established.
|
|
42
49
|
* - Auto-reconnects and resets ports if the target iframe is reloaded.
|
|
43
50
|
*/
|
|
44
|
-
class TinyIframeEvents extends
|
|
51
|
+
class TinyIframeEvents extends TypedEventEmitter {
|
|
45
52
|
/** @type {Window} */
|
|
46
53
|
#targetWindow;
|
|
47
54
|
get targetWindow() {
|
|
@@ -16,10 +16,21 @@ const pollClosedInterval = new WeakMap();
|
|
|
16
16
|
/**
|
|
17
17
|
* @callback handler
|
|
18
18
|
* A function to handle incoming event payloads.
|
|
19
|
-
* @param {any} payload - The data sent by the emitter.
|
|
20
|
-
* @param {MessageEvent<any>} event - Metadata about the message.
|
|
19
|
+
* @param {any} [payload] - The data sent by the emitter.
|
|
20
|
+
* @param {MessageEvent<any>} [event] - Metadata about the message.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Event map for {@link TinyNewWinEvents}.
|
|
25
|
+
* Routed events are prefixed with `win:` followed by the route name.
|
|
26
|
+
* @typedef {Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & {
|
|
27
|
+
* WINDOW_REF_CLOSED: () => void,
|
|
28
|
+
* }} TinyNewWinEventsMap
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/** @type {new (settings?: { targetOrigin?: string, url?: string, name?: string, features?: string }) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyNewWinEventsMap>} */
|
|
32
|
+
const TypedEventEmitter = /** @type {any} */ (events.EventEmitter);
|
|
33
|
+
|
|
23
34
|
/**
|
|
24
35
|
* TinyNewWinEvents provides structured communication between a main window
|
|
25
36
|
* and a child window (created using window.open) using postMessage.
|
|
@@ -29,7 +40,7 @@ const pollClosedInterval = new WeakMap();
|
|
|
29
40
|
*
|
|
30
41
|
* @class
|
|
31
42
|
*/
|
|
32
|
-
class TinyNewWinEvents extends
|
|
43
|
+
class TinyNewWinEvents extends TypedEventEmitter {
|
|
33
44
|
/** @type {Window|null} Reference to the opened or parent window */
|
|
34
45
|
#windowRef;
|
|
35
46
|
|
|
@@ -1,11 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
1
|
+
export type handler = (payload?: any, event?: MessageEvent<any>) => any;
|
|
2
|
+
export type TinyNewWinEventsMap = Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & {
|
|
3
|
+
WINDOW_REF_CLOSED: () => void;
|
|
4
|
+
};
|
|
3
5
|
/**
|
|
4
6
|
* @callback handler
|
|
5
7
|
* A function to handle incoming event payloads.
|
|
6
|
-
* @param {any} payload - The data sent by the emitter.
|
|
7
|
-
* @param {MessageEvent<any>} event - Metadata about the message.
|
|
8
|
+
* @param {any} [payload] - The data sent by the emitter.
|
|
9
|
+
* @param {MessageEvent<any>} [event] - Metadata about the message.
|
|
8
10
|
*/
|
|
11
|
+
/**
|
|
12
|
+
* Event map for {@link TinyNewWinEvents}.
|
|
13
|
+
* Routed events are prefixed with `win:` followed by the route name.
|
|
14
|
+
* @typedef {Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & {
|
|
15
|
+
* WINDOW_REF_CLOSED: () => void,
|
|
16
|
+
* }} TinyNewWinEventsMap
|
|
17
|
+
*/
|
|
18
|
+
/** @type {new (settings?: { targetOrigin?: string, url?: string, name?: string, features?: string }) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyNewWinEventsMap>} */
|
|
19
|
+
declare const TypedEventEmitter: new (settings?: {
|
|
20
|
+
targetOrigin?: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
features?: string;
|
|
24
|
+
}) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyNewWinEventsMap>;
|
|
9
25
|
/**
|
|
10
26
|
* TinyNewWinEvents provides structured communication between a main window
|
|
11
27
|
* and a child window (created using window.open) using postMessage.
|
|
@@ -15,7 +31,7 @@ export type handler = (payload: any, event: MessageEvent<any>) => any;
|
|
|
15
31
|
*
|
|
16
32
|
* @class
|
|
17
33
|
*/
|
|
18
|
-
declare class TinyNewWinEvents extends
|
|
34
|
+
declare class TinyNewWinEvents extends TypedEventEmitter {
|
|
19
35
|
#private;
|
|
20
36
|
_handleMessage: (event: MessageEvent) => void;
|
|
21
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TinyNewWinEvents.d.mts","sourceRoot":"","sources":["../../../../../src/v1/libs/html/events/TinyNewWinEvents.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TinyNewWinEvents.d.mts","sourceRoot":"","sources":["../../../../../src/v1/libs/html/events/TinyNewWinEvents.mjs"],"names":[],"mappings":"AAcG,YAAU,OAAO,GAEjB,CAAc,OAAO,AAArB,CACA,EADQ,GACR,EAA4B,KAAK,AAAjC,CACF,EADU,YAAY,CAAC,GAAG,CAC1B,QAAA,CAAA;AAKE,YAEG,mBAAmB,GAFZ,MAAM,CAAC,OAAO,MAAM,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG;IAC/E,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAqB;AAZzB;;;;;GAKG;AAEH;;;;;;GAMG;AAEH,+LAA+L;AAC/L,QAAA,MAAM,iBAAiB,EADZ,KAAK,QAAQ,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,OAAO,iCAAiC,EAAE,mBAAmB,CAAC,mBAAmB,CAC/H,CAAC;AAE5D;;;;;;;;GAQG;AACH,cAAM,gBAAiB,SAAQ,iBAAiB;;IAuHvC,cAAc,UAuBV,YAAY,KACV,IAAI;IAhHjB;;;;OAIG;IACH,IAAI,SAAS,IAFA,OAAO,CAInB;IAED;;;OAGG;IACH,IAAI,cAAc,IAFL,MAAM,CAKlB;IAED;;;;OAIG;IACH,IAAI,cAAc,CAAC,IAAI,EAHZ,MAGY,EAKtB;IAED;;;OAGG;IACH,IAAI,cAAc,IAFL,MAAM,CAKlB;IAED;;;;OAIG;IACH,IAAI,cAAc,CAAC,IAAI,EAHZ,MAGY,EAKtB;IAED;;;;;;;;;;;;OAYG;IACH,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,AAV9C,CAMA,EALA;QAA0B,YAAY,AAAtC,CACA,EADQ,MAAM,CACd;QAA0B,GAAG,AAA7B,CACA,EADQ,MAAM,CACd;QAA0B,IAAI,AAA9B,CACA,EADQ,MAAM,CACd;QAA0B,QAAQ,AAAlC,CAEA,EAFQ,MAAM,CAEd;KAImD,EAgCrD;IAED;;;;OAIG;IACH,MAAM,IAFO,MAAM,GAAC,IAAI,CAKvB;IAmDD;;;;OAIG;IACH,KAAK,IAFQ,IAAI,CAMhB;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,KAAK,EALF,MAKE,EAAE,OAAO,EAJX,GAIW,GAFT,IAAI,CAWhB;IAED;;;;OAIG;IACH,WAAW,IAFE,OAAO,CAKnB;IAkBD;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,EAHL,OAGK,GAFH,IAAI,CAKhB;IAED;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAHN,OAGM,GAFJ,IAAI,CAKhB;IAED;;;;OAIG;IACH,WAAW,IAFE,OAAO,CAInB;IAED;;;;OAIG;IACH,OAAO,IAFM,IAAI,CAehB;CACF;eAEc,gBAAgB"}
|
|
@@ -11,9 +11,18 @@ const pollClosedInterval = new WeakMap();
|
|
|
11
11
|
/**
|
|
12
12
|
* @callback handler
|
|
13
13
|
* A function to handle incoming event payloads.
|
|
14
|
-
* @param {any} payload - The data sent by the emitter.
|
|
15
|
-
* @param {MessageEvent<any>} event - Metadata about the message.
|
|
14
|
+
* @param {any} [payload] - The data sent by the emitter.
|
|
15
|
+
* @param {MessageEvent<any>} [event] - Metadata about the message.
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* Event map for {@link TinyNewWinEvents}.
|
|
19
|
+
* Routed events are prefixed with `win:` followed by the route name.
|
|
20
|
+
* @typedef {Record<`win:${string}`, (payload: any, event: MessageEvent) => void> & {
|
|
21
|
+
* WINDOW_REF_CLOSED: () => void,
|
|
22
|
+
* }} TinyNewWinEventsMap
|
|
23
|
+
*/
|
|
24
|
+
/** @type {new (settings?: { targetOrigin?: string, url?: string, name?: string, features?: string }) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinyNewWinEventsMap>} */
|
|
25
|
+
const TypedEventEmitter = /** @type {any} */ (EventEmitter);
|
|
17
26
|
/**
|
|
18
27
|
* TinyNewWinEvents provides structured communication between a main window
|
|
19
28
|
* and a child window (created using window.open) using postMessage.
|
|
@@ -23,7 +32,7 @@ const pollClosedInterval = new WeakMap();
|
|
|
23
32
|
*
|
|
24
33
|
* @class
|
|
25
34
|
*/
|
|
26
|
-
class TinyNewWinEvents extends
|
|
35
|
+
class TinyNewWinEvents extends TypedEventEmitter {
|
|
27
36
|
/** @type {Window|null} Reference to the opened or parent window */
|
|
28
37
|
#windowRef;
|
|
29
38
|
/** @type {string} Expected origin for postMessage communication */
|
|
@@ -33,6 +33,18 @@ const checkDestroy = tools.createCheckDestroyed('TinySmartScroller');
|
|
|
33
33
|
* @returns {void}
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Event map for {@link TinySmartScroller}.
|
|
38
|
+
* @typedef {Object} TinySmartScrollerEvents
|
|
39
|
+
* @property {(data: any) => void} onScrollBoundary - Emitted when the scroll boundary state changes.
|
|
40
|
+
* @property {(data: any) => void} onExtraScrollBoundary - Emitted when the custom scroll boundary state changes.
|
|
41
|
+
* @property {(data: any) => void} onAutoScroll - Emitted when an auto-scroll occurs.
|
|
42
|
+
* @property {(data: any) => void} onScrollPause - Emitted when auto-scroll is paused.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/** @type {new (...args: any[]) => import('../../../jsdoc/EventEmitter.mjs').ICustomEventEmitter<TinySmartScrollerEvents>} */
|
|
46
|
+
const TypedEventEmitter = /** @type {any} */ (events.EventEmitter);
|
|
47
|
+
|
|
36
48
|
/**
|
|
37
49
|
* TinySmartScroller is a utility class designed to enhance and manage scroll behaviors within containers or the window.
|
|
38
50
|
*
|
|
@@ -51,7 +63,7 @@ const checkDestroy = tools.createCheckDestroyed('TinySmartScroller');
|
|
|
51
63
|
* This class is **not framework-dependent** and works with vanilla DOM elements and the window object.
|
|
52
64
|
* @template {Element|Window} HTMLTarget
|
|
53
65
|
*/
|
|
54
|
-
class TinySmartScroller extends
|
|
66
|
+
class TinySmartScroller extends TypedEventEmitter {
|
|
55
67
|
static Utils = { ...collision, TinyHtml };
|
|
56
68
|
|
|
57
69
|
/** @type {WeakMap<Element, NodeSizes>} */
|