tiny-essentials 1.28.19 โ†’ 1.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. package/README.md +1 -1
  2. package/changelog/1/28/19.md +24 -0
  3. package/changelog/1/29/0.md +58 -0
  4. package/changelog/1/29/1.md +11 -0
  5. package/dist/v1/ColorSafeStringify.min.js +1 -1
  6. package/dist/v1/TinyAdvancedRaffle.min.js +1 -1
  7. package/dist/v1/TinyAfterScrollWatcher.min.js +1 -1
  8. package/dist/v1/TinyAnalogClock.min.js +1 -1
  9. package/dist/v1/TinyArrayComparator.min.js +1 -1
  10. package/dist/v1/TinyArrayPaginator.min.js +1 -1
  11. package/dist/v1/TinyBasicsEs.min.js +1 -1
  12. package/dist/v1/TinyBrowserMonitor.min.js +1 -0
  13. package/dist/v1/TinyClassManager.min.js +1 -1
  14. package/dist/v1/TinyClipboard.min.js +1 -1
  15. package/dist/v1/TinyCloner.min.js +1 -0
  16. package/dist/v1/TinyColorConverter.min.js +1 -1
  17. package/dist/v1/TinyColorValidator.min.js +1 -1
  18. package/dist/v1/TinyCookieConsent.min.js +1 -1
  19. package/dist/v1/TinyDayNightCycle.min.js +1 -1
  20. package/dist/v1/TinyDebugger.min.js +1 -1
  21. package/dist/v1/TinyDomReadyManager.min.js +1 -1
  22. package/dist/v1/TinyDragDropDetector.min.js +1 -1
  23. package/dist/v1/TinyDragger.min.js +1 -1
  24. package/dist/v1/TinyElementObserver.min.js +1 -1
  25. package/dist/v1/TinyEssentials.min.js +1 -1
  26. package/dist/v1/TinyGamepad.min.js +1 -1
  27. package/dist/v1/TinyHtml.min.js +1 -1
  28. package/dist/v1/TinyHtmlTagRegexBuilder.min.js +1 -0
  29. package/dist/v1/TinyHttpResponseRegistry.min.js +1 -0
  30. package/dist/v1/TinyI18.min.js +1 -1
  31. package/dist/v1/TinyIframeEvents.min.js +1 -1
  32. package/dist/v1/TinyInventory.min.js +1 -1
  33. package/dist/v1/TinyInventoryTrader.min.js +1 -1
  34. package/dist/v1/TinyLevelUp.min.js +1 -1
  35. package/dist/v1/TinyLoadingScreen.min.js +1 -1
  36. package/dist/v1/TinyLocalStorage.min.js +1 -1
  37. package/dist/v1/TinyMaInSys.min.js +1 -1
  38. package/dist/v1/TinyMapCache.min.js +1 -0
  39. package/dist/v1/TinyMediaPlayer.min.js +1 -1
  40. package/dist/v1/TinyNeedBar.min.js +1 -1
  41. package/dist/v1/TinyNewWinEvents.min.js +1 -1
  42. package/dist/v1/TinyNotificationAdapter.min.js +1 -0
  43. package/dist/v1/TinyNotifications.min.js +1 -1
  44. package/dist/v1/TinyNotifyCenter.min.js +1 -1
  45. package/dist/v1/TinyOPFSFileSystem.min.js +1 -0
  46. package/dist/v1/TinyPasswordValidator.min.js +1 -0
  47. package/dist/v1/TinyPluginPackage.min.js +1 -0
  48. package/dist/v1/TinyPromiseQueue.min.js +1 -1
  49. package/dist/v1/TinyPushManager.min.js +1 -0
  50. package/dist/v1/TinyPushPayload.min.js +1 -0
  51. package/dist/v1/TinyPushRouter.min.js +1 -0
  52. package/dist/v1/TinyRadioFm.min.js +1 -1
  53. package/dist/v1/TinyRateLimiter.min.js +1 -1
  54. package/dist/v1/TinyRegexEs.min.js +1 -0
  55. package/dist/v1/TinyRouter.min.js +1 -0
  56. package/dist/v1/TinyServiceWorker.min.js +1 -0
  57. package/dist/v1/TinyServiceWorkerEngine.min.js +1 -0
  58. package/dist/v1/TinySetMapPackage.min.js +1 -0
  59. package/dist/v1/TinySimpleDice.min.js +1 -1
  60. package/dist/v1/TinySmartScroller.min.js +1 -1
  61. package/dist/v1/TinyStorageBucketFileSystem.min.js +1 -0
  62. package/dist/v1/TinyTextDiffer.min.js +1 -1
  63. package/dist/v1/TinyTextRangeEditor.min.js +1 -1
  64. package/dist/v1/TinyTextarea.min.js +1 -1
  65. package/dist/v1/TinyThrottledApi.min.js +1 -0
  66. package/dist/v1/TinyTimeout.min.js +1 -1
  67. package/dist/v1/TinyToastNotify.min.js +1 -1
  68. package/dist/v1/TinyUploadClicker.min.js +1 -1
  69. package/dist/v1/TinyUriParser.min.js +1 -0
  70. package/dist/v1/TinyVersion.min.js +1 -0
  71. package/dist/v1/TinyWebWorker.min.js +1 -0
  72. package/dist/v1/TinyWebWorkerEngine.min.js +1 -0
  73. package/dist/v1/UltraRandomMsgGen.min.js +1 -1
  74. package/dist/v1/basics/array.cjs +2 -2
  75. package/dist/v1/basics/array.d.mts +2 -0
  76. package/dist/v1/basics/array.d.mts.map +1 -1
  77. package/dist/v1/basics/array.mjs +2 -1
  78. package/dist/v1/basics/browserDetector.cjs +37 -12
  79. package/dist/v1/basics/browserDetector.d.mts +8 -0
  80. package/dist/v1/basics/browserDetector.d.mts.map +1 -1
  81. package/dist/v1/basics/browserDetector.mjs +32 -13
  82. package/dist/v1/basics/crypto.cjs +23 -0
  83. package/dist/v1/basics/crypto.d.mts +10 -0
  84. package/dist/v1/basics/crypto.d.mts.map +1 -0
  85. package/dist/v1/basics/crypto.mjs +18 -0
  86. package/dist/v1/basics/html.cjs +0 -3
  87. package/dist/v1/basics/html.d.mts.map +1 -1
  88. package/dist/v1/basics/html.mjs +0 -2
  89. package/dist/v1/basics/index.cjs +8 -1
  90. package/dist/v1/basics/index.d.mts +6 -5
  91. package/dist/v1/basics/index.d.mts.map +1 -1
  92. package/dist/v1/basics/index.mjs +6 -5
  93. package/dist/v1/basics/objChecker.cjs +88 -0
  94. package/dist/v1/basics/objChecker.d.mts +26 -0
  95. package/dist/v1/basics/objChecker.d.mts.map +1 -1
  96. package/dist/v1/basics/objChecker.mjs +74 -0
  97. package/dist/v1/basics/objFilter.cjs +234 -93
  98. package/dist/v1/basics/objFilter.d.mts +96 -22
  99. package/dist/v1/basics/objFilter.d.mts.map +1 -1
  100. package/dist/v1/basics/objFilter.mjs +216 -92
  101. package/dist/v1/basics/promiseUtils.cjs +48 -12
  102. package/dist/v1/basics/promiseUtils.d.mts +45 -12
  103. package/dist/v1/basics/promiseUtils.d.mts.map +1 -1
  104. package/dist/v1/basics/promiseUtils.mjs +47 -12
  105. package/dist/v1/basics/text.cjs +0 -12
  106. package/dist/v1/basics/text.d.mts +0 -10
  107. package/dist/v1/basics/text.d.mts.map +1 -1
  108. package/dist/v1/basics/text.mjs +0 -10
  109. package/dist/v1/index.cjs +88 -3
  110. package/dist/v1/index.d.mts +31 -6
  111. package/dist/v1/index.d.mts.map +1 -1
  112. package/dist/v1/index.mjs +32 -7
  113. package/dist/v1/jsdoc/EventEmitter.cjs +4 -0
  114. package/dist/v1/jsdoc/EventEmitter.d.mts +33 -0
  115. package/dist/v1/jsdoc/EventEmitter.d.mts.map +1 -0
  116. package/dist/v1/jsdoc/EventEmitter.mjs +18 -0
  117. package/dist/v1/libs/array/TinyArrayComparator.cjs +240 -25
  118. package/dist/v1/libs/array/TinyArrayComparator.d.mts +130 -22
  119. package/dist/v1/libs/array/TinyArrayComparator.d.mts.map +1 -1
  120. package/dist/v1/libs/array/TinyArrayComparator.mjs +210 -24
  121. package/dist/v1/libs/fs/constants.cjs +74 -0
  122. package/dist/v1/libs/fs/constants.d.mts +22 -0
  123. package/dist/v1/libs/fs/constants.d.mts.map +1 -0
  124. package/dist/v1/libs/fs/constants.mjs +53 -0
  125. package/dist/v1/libs/fs/encoding.cjs +118 -0
  126. package/dist/v1/libs/fs/encoding.d.mts +50 -0
  127. package/dist/v1/libs/fs/encoding.d.mts.map +1 -0
  128. package/dist/v1/libs/fs/encoding.mjs +102 -0
  129. package/dist/v1/libs/fs/error.cjs +188 -0
  130. package/dist/v1/libs/fs/error.d.mts +105 -0
  131. package/dist/v1/libs/fs/error.d.mts.map +1 -0
  132. package/dist/v1/libs/fs/error.mjs +158 -0
  133. package/dist/v1/libs/fs/handle.cjs +121 -0
  134. package/dist/v1/libs/fs/handle.d.mts +56 -0
  135. package/dist/v1/libs/fs/handle.d.mts.map +1 -0
  136. package/dist/v1/libs/fs/handle.mjs +100 -0
  137. package/dist/v1/libs/fs/index.cjs +700 -0
  138. package/dist/v1/libs/fs/index.d.mts +377 -0
  139. package/dist/v1/libs/fs/index.d.mts.map +1 -0
  140. package/dist/v1/libs/fs/index.mjs +630 -0
  141. package/dist/v1/libs/fs/path.cjs +234 -0
  142. package/dist/v1/libs/fs/path.d.mts +176 -0
  143. package/dist/v1/libs/fs/path.d.mts.map +1 -0
  144. package/dist/v1/libs/fs/path.mjs +197 -0
  145. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.cjs +202 -0
  146. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts +121 -0
  147. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.d.mts.map +1 -0
  148. package/dist/v1/libs/fs/plugins/OPFS/StorageBucket.mjs +172 -0
  149. package/dist/v1/libs/fs/plugins/OPFS/index.cjs +334 -0
  150. package/dist/v1/libs/fs/plugins/OPFS/index.d.mts +98 -0
  151. package/dist/v1/libs/fs/plugins/OPFS/index.d.mts.map +1 -0
  152. package/dist/v1/libs/fs/plugins/OPFS/index.mjs +300 -0
  153. package/dist/v1/libs/fs/stats.cjs +245 -0
  154. package/dist/v1/libs/fs/stats.d.mts +226 -0
  155. package/dist/v1/libs/fs/stats.d.mts.map +1 -0
  156. package/dist/v1/libs/fs/stats.mjs +197 -0
  157. package/dist/v1/libs/html/events/TinyIframeEvents.cjs +10 -1
  158. package/dist/v1/libs/html/events/TinyIframeEvents.d.mts +9 -2
  159. package/dist/v1/libs/html/events/TinyIframeEvents.d.mts.map +1 -1
  160. package/dist/v1/libs/html/events/TinyIframeEvents.mjs +8 -1
  161. package/dist/v1/libs/html/events/TinyNewWinEvents.cjs +14 -3
  162. package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts +21 -5
  163. package/dist/v1/libs/html/events/TinyNewWinEvents.d.mts.map +1 -1
  164. package/dist/v1/libs/html/events/TinyNewWinEvents.mjs +12 -3
  165. package/dist/v1/libs/html/scroll/TinySmartScroller.cjs +13 -1
  166. package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts +29 -2
  167. package/dist/v1/libs/html/scroll/TinySmartScroller.d.mts.map +1 -1
  168. package/dist/v1/libs/html/scroll/TinySmartScroller.mjs +11 -1
  169. package/dist/v1/libs/math/TinyAdvancedRaffle.cjs +13 -1
  170. package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts +32 -2
  171. package/dist/v1/libs/math/TinyAdvancedRaffle.d.mts.map +1 -1
  172. package/dist/v1/libs/math/TinyAdvancedRaffle.mjs +11 -1
  173. package/dist/v1/libs/math/TinyTimeout.cjs +0 -14
  174. package/dist/v1/libs/math/TinyTimeout.d.mts +0 -11
  175. package/dist/v1/libs/math/TinyTimeout.d.mts.map +1 -1
  176. package/dist/v1/libs/math/TinyTimeout.mjs +0 -13
  177. package/dist/v1/libs/media/TinyMediaPlayer/index.cjs +25 -1
  178. package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts +35 -2
  179. package/dist/v1/libs/media/TinyMediaPlayer/index.d.mts.map +1 -1
  180. package/dist/v1/libs/media/TinyMediaPlayer/index.mjs +23 -1
  181. package/dist/v1/libs/media/TinyMediaPlayer.cjs +2 -2
  182. package/dist/v1/libs/media/TinyMediaPlayer.d.mts +2 -2
  183. package/dist/v1/libs/media/TinyMediaPlayer.d.mts.map +1 -1
  184. package/dist/v1/libs/media/TinyMediaPlayer.mjs +2 -2
  185. package/dist/v1/libs/media/TinyRadioFm.cjs +19 -1
  186. package/dist/v1/libs/media/TinyRadioFm.d.mts +78 -2
  187. package/dist/v1/libs/media/TinyRadioFm.d.mts.map +1 -1
  188. package/dist/v1/libs/media/TinyRadioFm.mjs +17 -1
  189. package/dist/v1/libs/plugin/TinyPlugin.cjs +1630 -0
  190. package/dist/v1/libs/plugin/TinyPlugin.d.mts +753 -0
  191. package/dist/v1/libs/plugin/TinyPlugin.d.mts.map +1 -0
  192. package/dist/v1/libs/plugin/TinyPlugin.mjs +1376 -0
  193. package/dist/v1/libs/plugin/TinyVersion.cjs +204 -0
  194. package/dist/v1/libs/plugin/TinyVersion.d.mts +70 -0
  195. package/dist/v1/libs/plugin/TinyVersion.d.mts.map +1 -0
  196. package/dist/v1/libs/plugin/TinyVersion.mjs +179 -0
  197. package/dist/v1/libs/router/TinyRouter.cjs +661 -0
  198. package/dist/v1/libs/router/TinyRouter.d.mts +320 -0
  199. package/dist/v1/libs/router/TinyRouter.d.mts.map +1 -0
  200. package/dist/v1/libs/router/TinyRouter.mjs +572 -0
  201. package/dist/v1/libs/storage/TinyLocalStorage.cjs +20 -1
  202. package/dist/v1/libs/storage/TinyLocalStorage.d.mts +64 -2
  203. package/dist/v1/libs/storage/TinyLocalStorage.d.mts.map +1 -1
  204. package/dist/v1/libs/storage/TinyLocalStorage.mjs +18 -1
  205. package/dist/v1/libs/storage/TinyMapCache.cjs +373 -0
  206. package/dist/v1/libs/storage/TinyMapCache.d.mts +274 -0
  207. package/dist/v1/libs/storage/TinyMapCache.d.mts.map +1 -0
  208. package/dist/v1/libs/storage/TinyMapCache.mjs +333 -0
  209. package/dist/v1/libs/storage/TinySetMapDatabase.cjs +1167 -0
  210. package/dist/v1/libs/storage/TinySetMapDatabase.d.mts +603 -0
  211. package/dist/v1/libs/storage/TinySetMapDatabase.d.mts.map +1 -0
  212. package/dist/v1/libs/storage/TinySetMapDatabase.mjs +1059 -0
  213. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.cjs +126 -0
  214. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts +132 -0
  215. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.d.mts.map +1 -0
  216. package/dist/v1/libs/sw/browser/TinyNotificationAdapter.mjs +109 -0
  217. package/dist/v1/libs/sw/browser/TinyPushManager.cjs +310 -0
  218. package/dist/v1/libs/sw/browser/TinyPushManager.d.mts +168 -0
  219. package/dist/v1/libs/sw/browser/TinyPushManager.d.mts.map +1 -0
  220. package/dist/v1/libs/sw/browser/TinyPushManager.mjs +264 -0
  221. package/dist/v1/libs/sw/browser/TinyServiceWorker.cjs +1060 -0
  222. package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts +348 -0
  223. package/dist/v1/libs/sw/browser/TinyServiceWorker.d.mts.map +1 -0
  224. package/dist/v1/libs/sw/browser/TinyServiceWorker.mjs +933 -0
  225. package/dist/v1/libs/sw/browser/plugins/TabManager.cjs +315 -0
  226. package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts +178 -0
  227. package/dist/v1/libs/sw/browser/plugins/TabManager.d.mts.map +1 -0
  228. package/dist/v1/libs/sw/browser/plugins/TabManager.mjs +274 -0
  229. package/dist/v1/libs/sw/browser/utils.cjs +28 -0
  230. package/dist/v1/libs/sw/browser/utils.d.mts +8 -0
  231. package/dist/v1/libs/sw/browser/utils.d.mts.map +1 -0
  232. package/dist/v1/libs/sw/browser/utils.mjs +21 -0
  233. package/dist/v1/libs/sw/service/TinyPushRouter.cjs +222 -0
  234. package/dist/v1/libs/sw/service/TinyPushRouter.d.mts +138 -0
  235. package/dist/v1/libs/sw/service/TinyPushRouter.d.mts.map +1 -0
  236. package/dist/v1/libs/sw/service/TinyPushRouter.mjs +201 -0
  237. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.cjs +3016 -0
  238. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts +993 -0
  239. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.d.mts.map +1 -0
  240. package/dist/v1/libs/sw/service/TinyServiceWorkerEngine.mjs +2558 -0
  241. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.cjs +88 -0
  242. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts +32 -0
  243. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.d.mts.map +1 -0
  244. package/dist/v1/libs/sw/service/plugins/GlobBypassPlugin.mjs +69 -0
  245. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.cjs +112 -0
  246. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts +31 -0
  247. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.d.mts.map +1 -0
  248. package/dist/v1/libs/sw/service/plugins/GlobCachePlugin.mjs +91 -0
  249. package/dist/v1/libs/sw/service/plugins/Ping.cjs +32 -0
  250. package/dist/v1/libs/sw/service/plugins/Ping.d.mts +9 -0
  251. package/dist/v1/libs/sw/service/plugins/Ping.d.mts.map +1 -0
  252. package/dist/v1/libs/sw/service/plugins/Ping.mjs +25 -0
  253. package/dist/v1/libs/sw/service/plugins/TabManager.cjs +457 -0
  254. package/dist/v1/libs/sw/service/plugins/TabManager.d.mts +91 -0
  255. package/dist/v1/libs/sw/service/plugins/TabManager.d.mts.map +1 -0
  256. package/dist/v1/libs/sw/service/plugins/TabManager.mjs +372 -0
  257. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.cjs +180 -0
  258. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts +28 -0
  259. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.d.mts.map +1 -0
  260. package/dist/v1/libs/sw/service/plugins/ViteFileDetector.mjs +148 -0
  261. package/dist/v1/libs/sw/service/shared/TinyPushPayload.cjs +199 -0
  262. package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts +80 -0
  263. package/dist/v1/libs/sw/service/shared/TinyPushPayload.d.mts.map +1 -0
  264. package/dist/v1/libs/sw/service/shared/TinyPushPayload.mjs +174 -0
  265. package/dist/v1/libs/sw/utils.cjs +57 -0
  266. package/dist/v1/libs/sw/utils.d.mts +173 -0
  267. package/dist/v1/libs/sw/utils.d.mts.map +1 -0
  268. package/dist/v1/libs/sw/utils.mjs +50 -0
  269. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.cjs +57 -0
  270. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts +39 -0
  271. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.d.mts.map +1 -0
  272. package/dist/v1/libs/text/TinyI18/Browser-NON-DOM.mjs +48 -0
  273. package/dist/v1/libs/text/TinyI18/Browser.cjs +64 -0
  274. package/dist/v1/libs/text/TinyI18/Browser.d.mts +47 -0
  275. package/dist/v1/libs/text/TinyI18/Browser.d.mts.map +1 -0
  276. package/dist/v1/libs/text/TinyI18/Browser.mjs +57 -0
  277. package/dist/v1/libs/text/TinyI18/Node.cjs +49 -0
  278. package/dist/v1/libs/text/TinyI18/Node.d.mts +38 -0
  279. package/dist/v1/libs/text/TinyI18/Node.d.mts.map +1 -0
  280. package/dist/v1/libs/text/TinyI18/Node.mjs +43 -0
  281. package/dist/v1/libs/text/TinyI18/browser-utils.cjs +17 -0
  282. package/dist/v1/libs/text/TinyI18/browser-utils.d.mts +8 -0
  283. package/dist/v1/libs/text/TinyI18/browser-utils.d.mts.map +1 -0
  284. package/dist/v1/libs/text/TinyI18/browser-utils.mjs +13 -0
  285. package/dist/v1/libs/text/{TinyI18.cjs โ†’ TinyI18/index.cjs} +205 -104
  286. package/dist/v1/libs/text/{TinyI18.d.mts โ†’ TinyI18/index.d.mts} +141 -92
  287. package/dist/v1/libs/text/TinyI18/index.d.mts.map +1 -0
  288. package/dist/v1/libs/text/{TinyI18.mjs โ†’ TinyI18/index.mjs} +195 -101
  289. package/dist/v1/libs/tools/TinyBrowserMonitor.cjs +1088 -0
  290. package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts +621 -0
  291. package/dist/v1/libs/tools/TinyBrowserMonitor.d.mts.map +1 -0
  292. package/dist/v1/libs/tools/TinyBrowserMonitor.mjs +940 -0
  293. package/dist/v1/libs/tools/TinyDebugger.cjs +180 -19
  294. package/dist/v1/libs/tools/TinyDebugger.d.mts +220 -24
  295. package/dist/v1/libs/tools/TinyDebugger.d.mts.map +1 -1
  296. package/dist/v1/libs/tools/TinyDebugger.mjs +161 -19
  297. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.cjs +256 -0
  298. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts +125 -0
  299. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.d.mts.map +1 -0
  300. package/dist/v1/libs/tools/TinyHtmlTagRegexBuilder.mjs +223 -0
  301. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.cjs +23 -0
  302. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts +17 -0
  303. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.d.mts.map +1 -0
  304. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser-NON-DOM.mjs +19 -0
  305. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.cjs +23 -0
  306. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts +17 -0
  307. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.d.mts.map +1 -0
  308. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Browser.mjs +19 -0
  309. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.cjs +390 -0
  310. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts +9 -0
  311. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.d.mts.map +1 -0
  312. package/dist/v1/libs/tools/TinyHttpResponseRegistry/EmptyRequestCodes.mjs +387 -0
  313. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.cjs +2 -0
  314. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts +27 -0
  315. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.d.mts.map +1 -0
  316. package/dist/v1/libs/tools/TinyHttpResponseRegistry/JsDoc.mjs +12 -0
  317. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/LICENSE +53 -0
  318. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.cjs +405 -0
  319. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts +34 -0
  320. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.d.mts.map +1 -0
  321. package/dist/v1/libs/tools/TinyHttpResponseRegistry/MozillaRequestCodes/index.mjs +342 -0
  322. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.cjs +23 -0
  323. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts +17 -0
  324. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.d.mts.map +1 -0
  325. package/dist/v1/libs/tools/TinyHttpResponseRegistry/Node.mjs +19 -0
  326. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.cjs +327 -0
  327. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts +9 -0
  328. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.d.mts.map +1 -0
  329. package/dist/v1/libs/tools/TinyHttpResponseRegistry/RequestCodes.mjs +324 -0
  330. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.cjs +268 -0
  331. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts +107 -0
  332. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.d.mts.map +1 -0
  333. package/dist/v1/libs/tools/TinyHttpResponseRegistry/index.mjs +238 -0
  334. package/dist/v1/libs/tools/TinyPasswordValidator.cjs +491 -0
  335. package/dist/v1/libs/tools/TinyPasswordValidator.d.mts +246 -0
  336. package/dist/v1/libs/tools/TinyPasswordValidator.d.mts.map +1 -0
  337. package/dist/v1/libs/tools/TinyPasswordValidator.mjs +434 -0
  338. package/dist/v1/libs/tools/TinyPkgExportValidator.cjs +48 -0
  339. package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts +14 -0
  340. package/dist/v1/libs/tools/TinyPkgExportValidator.d.mts.map +1 -1
  341. package/dist/v1/libs/tools/TinyPkgExportValidator.mjs +44 -0
  342. package/dist/v1/libs/tools/TinySiteMap.cjs +1029 -0
  343. package/dist/v1/libs/tools/TinySiteMap.d.mts +429 -0
  344. package/dist/v1/libs/tools/TinySiteMap.d.mts.map +1 -0
  345. package/dist/v1/libs/tools/TinySiteMap.mjs +910 -0
  346. package/dist/v1/libs/tools/TinySiteMapStream.cjs +121 -0
  347. package/dist/v1/libs/tools/TinySiteMapStream.d.mts +51 -0
  348. package/dist/v1/libs/tools/TinySiteMapStream.d.mts.map +1 -0
  349. package/dist/v1/libs/tools/TinySiteMapStream.mjs +85 -0
  350. package/dist/v1/libs/tools/TinyURLSecurityVerifier.cjs +444 -0
  351. package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts +217 -0
  352. package/dist/v1/libs/tools/TinyURLSecurityVerifier.d.mts.map +1 -0
  353. package/dist/v1/libs/tools/TinyURLSecurityVerifier.mjs +394 -0
  354. package/dist/v1/libs/tools/TinyUriParser/BlueSky.cjs +613 -0
  355. package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts +152 -0
  356. package/dist/v1/libs/tools/TinyUriParser/BlueSky.d.mts.map +1 -0
  357. package/dist/v1/libs/tools/TinyUriParser/BlueSky.mjs +527 -0
  358. package/dist/v1/libs/tools/TinyUriParser/Discord.cjs +1119 -0
  359. package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts +306 -0
  360. package/dist/v1/libs/tools/TinyUriParser/Discord.d.mts.map +1 -0
  361. package/dist/v1/libs/tools/TinyUriParser/Discord.mjs +968 -0
  362. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.cjs +469 -0
  363. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts +80 -0
  364. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.d.mts.map +1 -0
  365. package/dist/v1/libs/tools/TinyUriParser/MatrixProtocol.mjs +379 -0
  366. package/dist/v1/libs/tools/TinyUriParser.cjs +217 -0
  367. package/dist/v1/libs/tools/TinyUriParser.d.mts +109 -0
  368. package/dist/v1/libs/tools/TinyUriParser.d.mts.map +1 -0
  369. package/dist/v1/libs/tools/TinyUriParser.mjs +183 -0
  370. package/dist/v1/libs/utils/TinyCloner.cjs +466 -0
  371. package/dist/v1/libs/utils/TinyCloner.d.mts +221 -0
  372. package/dist/v1/libs/utils/TinyCloner.d.mts.map +1 -0
  373. package/dist/v1/libs/utils/TinyCloner.mjs +416 -0
  374. package/dist/v1/libs/utils/TinyPromiseQueue.cjs +1 -1
  375. package/dist/v1/libs/utils/TinyPromiseQueue.d.mts +2 -2
  376. package/dist/v1/libs/utils/TinyPromiseQueue.d.mts.map +1 -1
  377. package/dist/v1/libs/utils/TinyPromiseQueue.mjs +1 -1
  378. package/dist/v1/libs/utils/TinyThrottledApi.cjs +333 -0
  379. package/dist/v1/libs/utils/TinyThrottledApi.d.mts +163 -0
  380. package/dist/v1/libs/utils/TinyThrottledApi.d.mts.map +1 -0
  381. package/dist/v1/libs/utils/TinyThrottledApi.mjs +294 -0
  382. package/dist/v1/libs/worker/browser/TinyWebWorker.cjs +342 -0
  383. package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts +97 -0
  384. package/dist/v1/libs/worker/browser/TinyWebWorker.d.mts.map +1 -0
  385. package/dist/v1/libs/worker/browser/TinyWebWorker.mjs +305 -0
  386. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.cjs +346 -0
  387. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts +127 -0
  388. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.d.mts.map +1 -0
  389. package/dist/v1/libs/worker/engine/TinyWebWorkerEngine.mjs +304 -0
  390. package/dist/v1/regexp/Email.cjs +185 -0
  391. package/dist/v1/regexp/Email.d.mts +73 -0
  392. package/dist/v1/regexp/Email.d.mts.map +1 -0
  393. package/dist/v1/regexp/Email.mjs +153 -0
  394. package/dist/v1/regexp/Glob.cjs +293 -0
  395. package/dist/v1/regexp/Glob.d.mts +45 -0
  396. package/dist/v1/regexp/Glob.d.mts.map +1 -0
  397. package/dist/v1/regexp/Glob.mjs +260 -0
  398. package/dist/v1/regexp/Ipv4.cjs +57 -0
  399. package/dist/v1/regexp/Ipv4.d.mts +29 -0
  400. package/dist/v1/regexp/Ipv4.d.mts.map +1 -0
  401. package/dist/v1/regexp/Ipv4.mjs +45 -0
  402. package/dist/v1/regexp/Ipv6.cjs +67 -0
  403. package/dist/v1/regexp/Ipv6.d.mts +29 -0
  404. package/dist/v1/regexp/Ipv6.d.mts.map +1 -0
  405. package/dist/v1/regexp/Ipv6.mjs +54 -0
  406. package/dist/v1/regexp/SegmentExtractor.cjs +145 -0
  407. package/dist/v1/regexp/SegmentExtractor.d.mts +91 -0
  408. package/dist/v1/regexp/SegmentExtractor.d.mts.map +1 -0
  409. package/dist/v1/regexp/SegmentExtractor.mjs +116 -0
  410. package/dist/v1/regexp/UrlDetector.cjs +125 -0
  411. package/dist/v1/regexp/UrlDetector.d.mts +67 -0
  412. package/dist/v1/regexp/UrlDetector.d.mts.map +1 -0
  413. package/dist/v1/regexp/UrlDetector.mjs +102 -0
  414. package/dist/v1/regexp/Username/index.cjs +233 -0
  415. package/dist/v1/regexp/Username/index.d.mts +77 -0
  416. package/dist/v1/regexp/Username/index.d.mts.map +1 -0
  417. package/dist/v1/regexp/Username/index.mjs +199 -0
  418. package/dist/v1/regexp/Username/jsDoc.cjs +2 -0
  419. package/dist/v1/regexp/Username/jsDoc.d.mts +57 -0
  420. package/dist/v1/regexp/Username/jsDoc.d.mts.map +1 -0
  421. package/dist/v1/regexp/Username/jsDoc.mjs +18 -0
  422. package/dist/v1/regexp/Username/templates/BlueSky.cjs +56 -0
  423. package/dist/v1/regexp/Username/templates/BlueSky.d.mts +35 -0
  424. package/dist/v1/regexp/Username/templates/BlueSky.d.mts.map +1 -0
  425. package/dist/v1/regexp/Username/templates/BlueSky.mjs +52 -0
  426. package/dist/v1/regexp/Username/templates/Discord.cjs +505 -0
  427. package/dist/v1/regexp/Username/templates/Discord.d.mts +209 -0
  428. package/dist/v1/regexp/Username/templates/Discord.d.mts.map +1 -0
  429. package/dist/v1/regexp/Username/templates/Discord.mjs +458 -0
  430. package/dist/v1/regexp/Username/templates/MatrixProtocol.cjs +143 -0
  431. package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts +70 -0
  432. package/dist/v1/regexp/Username/templates/MatrixProtocol.d.mts.map +1 -0
  433. package/dist/v1/regexp/Username/templates/MatrixProtocol.mjs +128 -0
  434. package/dist/v1/regexp/Username/templates/deprecated/Discord.cjs +24 -0
  435. package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts +17 -0
  436. package/dist/v1/regexp/Username/templates/deprecated/Discord.d.mts.map +1 -0
  437. package/dist/v1/regexp/Username/templates/deprecated/Discord.mjs +20 -0
  438. package/dist/v1/regexp/Username/templates/index.cjs +11 -0
  439. package/dist/v1/regexp/Username/templates/index.d.mts +5 -0
  440. package/dist/v1/regexp/Username/templates/index.d.mts.map +1 -0
  441. package/dist/v1/regexp/Username/templates/index.mjs +4 -0
  442. package/dist/v1/regexp/index.cjs +41 -0
  443. package/dist/v1/regexp/index.d.mts +9 -0
  444. package/dist/v1/regexp/index.d.mts.map +1 -0
  445. package/dist/v1/regexp/index.mjs +8 -0
  446. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.cjs +64 -0
  447. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts +11 -0
  448. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.d.mts.map +1 -0
  449. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser.mjs +51 -0
  450. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.cjs +66 -0
  451. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts +11 -0
  452. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.d.mts.map +1 -0
  453. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput.mjs +51 -0
  454. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.cjs +39 -0
  455. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts +11 -0
  456. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.d.mts.map +1 -0
  457. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Node.mjs +28 -0
  458. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.cjs +494 -0
  459. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts +142 -0
  460. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.d.mts.map +1 -0
  461. package/dist/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters/Template.mjs +445 -0
  462. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.cjs +30 -4
  463. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts +5 -2
  464. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.d.mts.map +1 -1
  465. package/dist/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.mjs +29 -5
  466. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.cjs +135 -0
  467. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts +83 -0
  468. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.d.mts.map +1 -0
  469. package/dist/v1/webTemplates/media/MediaValidator/v1/Browser/index.mjs +120 -0
  470. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.cjs +127 -0
  471. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts +95 -0
  472. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.d.mts.map +1 -0
  473. package/dist/v1/webTemplates/media/MediaValidator/v1/Node/index.mjs +109 -0
  474. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.cjs +83 -0
  475. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts +46 -0
  476. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.d.mts.map +1 -0
  477. package/dist/v1/webTemplates/multiformats/14.0/IPFSHasher/index.mjs +71 -0
  478. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.cjs +493 -0
  479. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts +67 -0
  480. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.d.mts.map +1 -0
  481. package/dist/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.mjs +399 -0
  482. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.cjs +35 -0
  483. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts +6 -0
  484. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.d.mts.map +1 -0
  485. package/dist/v1/webTemplates/vite/7.3/plugins/githubUtils.mjs +29 -0
  486. package/docs/info/RegExp.md +74 -0
  487. package/docs/v1/Exports.md +101 -0
  488. package/docs/v1/README.md +113 -15
  489. package/docs/v1/basics/asyncReplace.md +2 -0
  490. package/docs/v1/basics/browserDetector.md +28 -11
  491. package/docs/v1/basics/crypto.md +85 -0
  492. package/docs/v1/basics/deprecated/html.md +2 -0
  493. package/docs/v1/basics/deprecated/objFilter.md +2 -0
  494. package/docs/v1/basics/html.md +2 -0
  495. package/docs/v1/basics/objChecker.md +55 -0
  496. package/docs/v1/basics/objFilter.md +57 -86
  497. package/docs/v1/basics/promiseUtils.md +12 -3
  498. package/docs/v1/basics/text.md +0 -1
  499. package/docs/v1/libs/array/TinyArrayComparator.md +50 -39
  500. package/docs/v1/libs/fs/TinyFS.md +752 -0
  501. package/docs/v1/libs/fs/TinyOPFSFileSystem.md +495 -0
  502. package/docs/v1/libs/fs/TinyStorageBucketFileSystem.md +407 -0
  503. package/docs/v1/libs/plugin/TinyPlugin.md +441 -0
  504. package/docs/v1/libs/plugin/TinyVersion.md +145 -0
  505. package/docs/v1/libs/router/TinyRouter.md +216 -0
  506. package/docs/v1/libs/storage/TinyMapCache.md +219 -0
  507. package/docs/v1/libs/storage/TinySetMapDatabase.md +478 -0
  508. package/docs/v1/libs/sw/browser/TinyNotificationAdapter.md +280 -0
  509. package/docs/v1/libs/sw/browser/TinyPushManager.md +782 -0
  510. package/docs/v1/libs/sw/browser/TinyServiceWorker.md +365 -0
  511. package/docs/v1/libs/sw/browser/plugins/TabManager.md +133 -0
  512. package/docs/v1/libs/sw/service/TinyPushRouter.md +314 -0
  513. package/docs/v1/libs/sw/service/TinyServiceWorkerEngine.md +748 -0
  514. package/docs/v1/libs/sw/service/plugins/GlobBypassPlugin.md +229 -0
  515. package/docs/v1/libs/sw/service/plugins/GlobCachePlugin.md +91 -0
  516. package/docs/v1/libs/sw/service/plugins/Ping.md +36 -0
  517. package/docs/v1/libs/sw/service/plugins/TabManager.md +64 -0
  518. package/docs/v1/libs/sw/service/plugins/ViteFileDetector.md +92 -0
  519. package/docs/v1/libs/sw/service/shared/TinyPushPayload.md +316 -0
  520. package/docs/v1/libs/text/TinyI18.md +80 -56
  521. package/docs/v1/libs/tools/TinyBrowserMonitor.md +170 -0
  522. package/docs/v1/libs/tools/TinyDebugger.md +117 -1
  523. package/docs/v1/libs/tools/TinyHtmlTagRegexBuilder.md +141 -0
  524. package/docs/v1/libs/tools/TinyHttpResponseRegistry.md +129 -0
  525. package/docs/v1/libs/tools/TinyPasswordValidator.md +153 -0
  526. package/docs/v1/libs/tools/TinyPkgExportValidator.md +45 -1
  527. package/docs/v1/libs/tools/TinySiteMap.md +134 -0
  528. package/docs/v1/libs/tools/TinySiteMapStream.md +97 -0
  529. package/docs/v1/libs/tools/TinyURLSecurityVerifier.md +146 -0
  530. package/docs/v1/libs/tools/TinyUriParser/Discord.md +374 -0
  531. package/docs/v1/libs/tools/TinyUriParser/MatrixProtocol.md +54 -0
  532. package/docs/v1/libs/tools/TinyUriParser.md +128 -0
  533. package/docs/v1/libs/utils/TinyCloner.md +126 -0
  534. package/docs/v1/libs/utils/TinyPromiseQueue.md +1 -1
  535. package/docs/v1/libs/utils/TinyThrottledApi.md +219 -0
  536. package/docs/v1/libs/worker/browser/TinyWebWorker.md +331 -0
  537. package/docs/v1/libs/worker/engine/TinyWebWorkerEngine.md +137 -0
  538. package/docs/v1/regexp/Email.md +127 -0
  539. package/docs/v1/regexp/Glob.md +155 -0
  540. package/docs/v1/regexp/IPv4.md +103 -0
  541. package/docs/v1/regexp/IPv6.md +122 -0
  542. package/docs/v1/regexp/SegmentExtractor.md +120 -0
  543. package/docs/v1/regexp/UrlDetector.md +117 -0
  544. package/docs/v1/regexp/Username/Base.md +131 -0
  545. package/docs/v1/regexp/Username/Discord.md +267 -0
  546. package/docs/v1/regexp/Username/MatrixProtocol.md +131 -0
  547. package/docs/v1/webTemplates/ag-psd/31.0/ProcessSolidFilters.md +565 -0
  548. package/docs/v1/webTemplates/bootstrap/5.3/html/BootstrapDialogs.md +19 -7
  549. package/docs/v1/webTemplates/media/MediaValidator/v1/Browser.md +123 -0
  550. package/docs/v1/webTemplates/media/MediaValidator/v1/Node.md +136 -0
  551. package/docs/v1/webTemplates/multiformats/14.0/IPFSHasher.md +310 -0
  552. package/docs/v1/webTemplates/vite/7.3/plugins/TinyVitePwaPlugin.md +131 -0
  553. package/docs/v1/webTemplates/vite/7.3/plugins/githubUtils.md +50 -0
  554. package/package.json +340 -22
  555. package/types/EventEmitter.d.ts +48 -0
  556. package/dist/v1/libs/text/TinyI18.d.mts.map +0 -1
@@ -0,0 +1,565 @@
1
+ # ๐ŸŽจ ProcessSolidFilters
2
+
3
+ > Extract solid colors from PSD layers, generate separated images per filter, and get pixel statistics โ€” in **Node.js** and the **Browser**, with the exact same API.
4
+
5
+ ---
6
+
7
+ ## ๐Ÿ“– Table of Contents
8
+
9
+ 1. [What is this?](#-what-is-this)
10
+ 2. [โœจ Features](#-features)
11
+ 3. [๐Ÿง  How It Works](#-how-it-works)
12
+ 4. [๐Ÿ“ฆ Installation](#-installation)
13
+ 5. [๐Ÿš€ Quick Start](#-quick-start)
14
+ - [Node.js Usage](#-nodejs-usage)
15
+ - [Browser Usage](#-browser-usage)
16
+ - [Browser File Input Usage](#-browser-file-input-usage)
17
+ 6. [๐ŸŽฏ Filter Criteria (Matching Rules)](#-filter-criteria-matching-rules)
18
+ 7. [๐Ÿ“‚ Folder Matching](#-folder-matching)
19
+ 8. [๐Ÿงฉ API Reference](#-api-reference)
20
+ 9. [๐Ÿ“Š Understanding the Result](#-understanding-the-result)
21
+ 10. [๐Ÿณ Recipes & Daily Workflow](#-recipes--daily-workflow)
22
+ 11. [๐Ÿ”’ Validation & Error Handling](#-validation--error-handling)
23
+ 12. [๐Ÿ› Troubleshooting](#-troubleshooting)
24
+ 13. [๐Ÿงฑ Extending the Library](#-extending-the-library)
25
+
26
+ ---
27
+
28
+ ## ๐Ÿค” What is this?
29
+
30
+ `ProcessSolidFilters` is a **dependency-injected factory** that reads a `.psd` file, walks through every visible layer **from bottom to top**, and paints a "solid color map" where each pixel is colored according to the **filter** that claimed the layer.
31
+
32
+ Think of it as a **paint-by-numbers engine**:
33
+
34
+ - ๐Ÿ–Œ๏ธ Each **filter** you define owns one color.
35
+ - ๐Ÿงฑ Layers are processed in **painting order** (bottom โ†’ top).
36
+ - ๐Ÿ† When two layers overlap, the **top one wins**.
37
+ - ๐Ÿ“‚ Filters can claim an entire **folder** at once, with configurable subfolder behavior.
38
+ - ๐Ÿ—‚๏ธ You get back a **full composite**, one **image per filter**, **pixel statistics**, and **vector metadata** for every layer.
39
+
40
+ ---
41
+
42
+ ## โœจ Features
43
+
44
+ | Feature | Description |
45
+ | --- | --- |
46
+ | ๐ŸŒ **Universal** | One core, three runtimes: Node.js, Browser (URL/Blob), Browser (File Input). |
47
+ | ๐ŸŽจ **Solid Color Extraction** | Every matched layer is flattened into a single solid color. |
48
+ | ๐Ÿงฎ **Pixel Statistics** | Know exactly how many pixels each filter claimed. |
49
+ | ๐Ÿ“ **Vector Metadata** | Get the bounding box, opacity, and name of every layer. |
50
+ | ๐Ÿงฉ **Composable Filters** | Combine `startsWith`, `endsWith`, `contains`, `equals`, `matches`, and custom `test`. |
51
+ | ๐Ÿ“‚ **Folder-Aware Matching** | Claim a whole folder at once, with per-subfolder strategies. |
52
+ | ๐Ÿ›ก๏ธ **Strict Validation** | Every public function throws `TypeError` or `Error` on invalid input. |
53
+
54
+ ---
55
+
56
+ ## ๐Ÿง  How It Works
57
+
58
+ ```
59
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
60
+ โ”‚ PSD File โ”‚ โ”€โ”€โ–ถ โ”‚ Walk Layer Tree โ”‚ โ”€โ”€โ–ถ โ”‚ Match Each Node โ”‚
61
+ โ”‚ (ag-psd) โ”‚ โ”‚ (bottom โ†’ top) โ”‚ โ”‚ against filters โ”‚
62
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
63
+ โ”‚
64
+ โ–ผ
65
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
66
+ โ”‚ Results โ”‚ โ—€โ”€โ”€ โ”‚ Paint ownerMap โ”‚ โ—€โ”€โ”€ โ”‚ Read Pixel Alpha โ”‚
67
+ โ”‚ (4 outputs) โ”‚ โ”‚ (W ร— H array) โ”‚ โ”‚ (threshold > 1) โ”‚
68
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
69
+ ```
70
+
71
+ 1. **Read** the PSD into a raw buffer.
72
+ 2. **Walk** the layer tree recursively, keeping only visible layers in painting order.
73
+ 3. **Match** each layer name against your filters (first match wins).
74
+ 4. **Claim** every layer inside a matched folder, honoring its subfolder strategy.
75
+ 5. **Paint** the `ownerMap`: each pixel stores the `id` of the filter that owns it.
76
+ 6. **Export** the composite image, one image per filter, stats, and vector data.
77
+
78
+ > ๐Ÿ’ก **Why a flat `ownerMap`?** It's a single `Array<W * H>` of strings. It's cache-friendly, easy to reason about, and lets us do a single pass at the end to build every output image.
79
+
80
+ ---
81
+
82
+ ## ๐Ÿ“ฆ Installation
83
+
84
+ ```bash
85
+ npm install ag-psd
86
+ # Node.js only:
87
+ npm install canvas
88
+ ```
89
+
90
+ > โš ๏ธ The `canvas` package is a **peer dependency for Node.js only**. Browsers use the native `<canvas>`.
91
+
92
+ ---
93
+
94
+ ## ๐Ÿš€ Quick Start
95
+
96
+ ### ๐ŸŸข Node.js Usage
97
+
98
+ ```javascript
99
+ import { processPsdSolidFilters } from 'tiny-essentials/webTemplates/ag-psd/31.0/ProcessSolidFilters';
100
+ import { writeFile } from 'fs/promises';
101
+
102
+ const result = await processPsdSolidFilters(
103
+ './artwork.psd',
104
+ [
105
+ { id: 'artist1', color: '#FF0000', startsWith: 'Artist1_' },
106
+ { id: 'artist2', color: '#00FF00', startsWith: 'Artist2_' },
107
+ ],
108
+ { color: '#0000FF' }, // fallback for everything else
109
+ );
110
+
111
+ // Save the full composite
112
+ await writeFile('output/full.png', result.fullImageBuffer);
113
+
114
+ // Save each separated image
115
+ for (const { id, buffer } of result.separatedImages) {
116
+ await writeFile(`output/${id}.png`, buffer);
117
+ }
118
+
119
+ console.log('๐Ÿ“Š Stats:', result.stats);
120
+ console.log('๐Ÿ“ Layers:', result.vectorData.length);
121
+ ```
122
+
123
+ ---
124
+
125
+ ### ๐ŸŒ Browser Usage
126
+
127
+ ```javascript
128
+ import { processPsdSolidFilters } from 'tiny-essentials/webTemplates/ag-psd/31.0/ProcessSolidFilters/Browser';
129
+
130
+ const result = await processPsdSolidFilters(
131
+ 'https://example.com/artwork.psd', // URL or Blob
132
+ [{ id: 'lineart', color: '#000000', contains: 'line' }],
133
+ { color: '#FFFFFF' },
134
+ );
135
+
136
+ // `result.fullImageBuffer` is a Blob in the browser
137
+ const url = URL.createObjectURL(result.fullImageBuffer);
138
+ document.querySelector('img').src = url;
139
+ ```
140
+
141
+ ---
142
+
143
+ ### ๐Ÿ“ Browser File Input Usage
144
+
145
+ Perfect for drag-and-drop or `<input type="file">`:
146
+
147
+ ```html
148
+ <input type="file" id="psd-input" accept=".psd" />
149
+ ```
150
+
151
+ ```javascript
152
+ import { processPsdSolidFiltersFromFile } from 'tiny-essentials/webTemplates/ag-psd/31.0/ProcessSolidFilters/FileInput';
153
+
154
+ const input = document.getElementById('psd-input');
155
+
156
+ input.addEventListener('change', async () => {
157
+ const result = await processPsdSolidFiltersFromFile(
158
+ input, // pass the HTMLInputElement directly โœจ
159
+ [{ id: 'background', color: '#CCCCCC', equals: 'Background' }],
160
+ { color: '#FF00FF' },
161
+ );
162
+
163
+ console.log('Done!', result.stats);
164
+ });
165
+ ```
166
+
167
+ ---
168
+
169
+ ## ๐ŸŽฏ Filter Criteria (Matching Rules)
170
+
171
+ Every filter can combine **multiple criteria**. All criteria inside a single filter are combined with **AND**. Values inside a single criterion are combined with **OR**.
172
+
173
+ | Property | Type | Description |
174
+ | --- | --- | --- |
175
+ | `id` | `string` | **Required.** Unique identifier for the filter. |
176
+ | `color` | `string` | **Required.** HEX color (e.g., `#FF0000`). |
177
+ | `startsWith` | `string \| string[]` | Layer name must start with the value(s). |
178
+ | `endsWith` | `string \| string[]` | Layer name must end with the value(s). |
179
+ | `contains` | `string \| string[]` | Layer name must contain the value(s). |
180
+ | `equals` | `string \| string[]` | Layer name must be exactly equal to the value(s). |
181
+ | `matches` | `RegExp \| RegExp[]` | Layer name must match the RegExp(s). |
182
+ | `test` | `(name: string) => boolean` | Custom predicate for advanced matching. |
183
+ | `folder` | `boolean \| FolderOptions` | When enabled, the filter also claims folders. See [Folder Matching](#-folder-matching). |
184
+
185
+ ### ๐Ÿงช Example: Combining criteria
186
+
187
+ ```javascript
188
+ {
189
+ id: 'skin',
190
+ color: '#F5CBA7',
191
+ startsWith: ['Skin_', 'Face_'], // OR
192
+ contains: 'final', // AND
193
+ }
194
+ // Matches: "Skin_final", "Face_final", "Skin_final_v2"
195
+ // Rejects: "Skin_draft", "Face", "final"
196
+ ```
197
+
198
+ > โš ๏ธ **Avoid the global flag (`/g`)** in `matches`. RegExp objects with `/g` are **stateful** (they remember `lastIndex`), which causes bugs across multiple layers. Use `/pattern/i` instead of `/pattern/gi`.
199
+
200
+ ---
201
+
202
+ ## ๐Ÿ“‚ Folder Matching
203
+
204
+ By default, filters only match **leaf layers**. Enable the `folder` option to let a filter claim an **entire folder** โ€” every layer inside it inherits the filter's color.
205
+
206
+ ```javascript
207
+ {
208
+ id: 'character',
209
+ color: '#FF0000',
210
+ equals: 'Character', // matches the folder named "Character"
211
+ folder: true, // shorthand for { subfolders: 'inherit' }
212
+ }
213
+ ```
214
+
215
+ ### Subfolder strategies
216
+
217
+ The `folder` option accepts a `FolderOptions` object to control what happens with **nested folders**:
218
+
219
+ | `subfolders` | Behavior |
220
+ | --- | --- |
221
+ | `'inherit'` *(default)* | Every subfolder inherits the parent filter. The whole tree gets the same color. |
222
+ | `'exclude'` | Only the layers **directly** inside the folder are claimed. Subfolders fall back to the outer scope. |
223
+ | `'custom'` | Subfolders are matched against `childFilter` instead. |
224
+
225
+ ### Example: three strategies
226
+
227
+ ```javascript
228
+ const filters = [
229
+ // 1. Whole folder, subfolders inherit the same filter
230
+ {
231
+ id: 'character',
232
+ color: '#FF0000',
233
+ equals: 'Character',
234
+ folder: true,
235
+ },
236
+
237
+ // 2. Whole folder, but subfolders are ignored
238
+ {
239
+ id: 'background',
240
+ color: '#00FF00',
241
+ equals: 'Background',
242
+ folder: { subfolders: 'exclude' },
243
+ },
244
+
245
+ // 3. Subfolders use their own nested filters
246
+ {
247
+ id: 'ui',
248
+ color: '#0000FF',
249
+ equals: 'UI',
250
+ folder: {
251
+ subfolders: 'custom',
252
+ childFilter: [
253
+ { id: 'ui-buttons', color: '#FFFF00', equals: 'buttons', folder: true },
254
+ { id: 'ui-icons', color: '#FF00FF', equals: 'icons', folder: true },
255
+ ],
256
+ },
257
+ },
258
+ ];
259
+ ```
260
+
261
+ > ๐Ÿ’ก **Order matters.** Filters are evaluated top to bottom, and the **first match wins**. Folder filters are resolved before descending into their children, so they take priority over layer filters.
262
+
263
+ ---
264
+
265
+ ## ๐Ÿงฉ API Reference
266
+
267
+ ### ๐Ÿญ `createProcessPsdSolidFilters(validator, createCanvas, readPsd, exportCanvas)`
268
+
269
+ The factory. It returns the actual `processPsdSolidFilters` function, wired to a specific environment.
270
+
271
+ | Parameter | Type | Description |
272
+ | --- | --- | --- |
273
+ | `validator` | `(input) => Promise<Buffer \| ArrayBuffer>` | Converts the input into a raw buffer. |
274
+ | `createCanvas` | `(w, h) => Canvas` | Creates a canvas in the target environment. |
275
+ | `readPsd` | `typeof import('ag-psd').readPsd` | The `readPsd` function from `ag-psd`. |
276
+ | `exportCanvas` | `(canvas) => Promise<Blob \| Buffer>` | Serializes a canvas to PNG. |
277
+
278
+ **Returns:** `processPsdSolidFilters(psdInput, filters, defaultConfig)`
279
+
280
+ ---
281
+
282
+ ### ๐ŸŽ›๏ธ `processPsdSolidFilters(psdInput, filters, defaultConfig)`
283
+
284
+ | Parameter | Type | Description |
285
+ | --- | --- | --- |
286
+ | `psdInput` | `string \| Blob \| HTMLInputElement` | The PSD source (environment-dependent). |
287
+ | `filters` | `FilterConfig[]` | The list of filters to apply. |
288
+ | `defaultConfig` | `DefaultConfig` | Fallback color for unmatched layers. |
289
+
290
+ **Returns:** `Promise<ProcessedPsdResult<Data>>`
291
+
292
+ ---
293
+
294
+ ### ๐Ÿงพ Type Definitions
295
+
296
+ #### `FilterConfig`
297
+
298
+ ```typescript
299
+ interface FilterConfig {
300
+ id: string;
301
+ color: string;
302
+ startsWith?: string | string[];
303
+ endsWith?: string | string[];
304
+ contains?: string | string[];
305
+ equals?: string | string[];
306
+ matches?: RegExp | RegExp[];
307
+ test?: (layerName: string) => boolean;
308
+ folder?: boolean | FolderOptions;
309
+ }
310
+ ```
311
+
312
+ #### `FolderOptions`
313
+
314
+ ```typescript
315
+ interface FolderOptions {
316
+ /** How nested folders are handled. Defaults to 'inherit'. */
317
+ subfolders?: 'inherit' | 'exclude' | 'custom';
318
+ /** Nested filters used when 'subfolders' is 'custom'. */
319
+ childFilter?: FilterConfig | FilterConfig[];
320
+ }
321
+ ```
322
+
323
+ #### `DefaultConfig`
324
+
325
+ ```typescript
326
+ interface DefaultConfig {
327
+ color: string; // HEX color for unmatched layers
328
+ }
329
+ ```
330
+
331
+ #### `ProcessedPsdResult<Data>`
332
+
333
+ ```typescript
334
+ interface ProcessedPsdResult<Data> {
335
+ fullImageBuffer: Data;
336
+ separatedImages: Array<{ id: string; buffer: Data }>;
337
+ stats: Record<string, number>;
338
+ vectorData: LayerVectorData[];
339
+ }
340
+ ```
341
+
342
+ #### `LayerVectorData`
343
+
344
+ ```typescript
345
+ interface LayerVectorData {
346
+ name: string;
347
+ filterId: string;
348
+ opacity: number; // 0 to 1
349
+ bounds: VectorBounds;
350
+ }
351
+ ```
352
+
353
+ #### `VectorBounds`
354
+
355
+ ```typescript
356
+ interface VectorBounds {
357
+ x: number;
358
+ y: number;
359
+ width: number;
360
+ height: number;
361
+ }
362
+ ```
363
+
364
+ ---
365
+
366
+ ## ๐Ÿ“Š Understanding the Result
367
+
368
+ Given this input:
369
+
370
+ ```javascript
371
+ const result = await processPsdSolidFilters('file.psd', [
372
+ { id: 'a', color: '#FF0000', startsWith: 'A_' },
373
+ ], { color: '#0000FF' });
374
+ ```
375
+
376
+ You get:
377
+
378
+ ```javascript
379
+ {
380
+ fullImageBuffer: Blob, // ๐Ÿ–ผ๏ธ The complete composite
381
+ separatedImages: [ // ๐Ÿ—‚๏ธ One image per filter
382
+ { id: 'unfiltered', buffer: Blob },
383
+ { id: 'a', buffer: Blob },
384
+ ],
385
+ stats: { // ๐Ÿงฎ Pixel counts
386
+ unclaimed: 1024, // Pixels with no layer
387
+ unfiltered: 2048, // Pixels claimed by the fallback
388
+ a: 51200, // Pixels claimed by filter "a"
389
+ },
390
+ vectorData: [ // ๐Ÿ“ One entry per processed layer
391
+ {
392
+ name: 'A_background',
393
+ filterId: 'a',
394
+ opacity: 1,
395
+ bounds: { x: 0, y: 0, width: 1920, height: 1080 },
396
+ },
397
+ ],
398
+ }
399
+ ```
400
+
401
+ > ๐Ÿ’ก **`unclaimed`** = pixels where no layer painted anything (transparent in the PSD).
402
+ > **`unfiltered`** = pixels claimed by a layer that matched **no** filter (fallback color).
403
+
404
+ ---
405
+
406
+ ## ๐Ÿณ Recipes & Daily Workflow
407
+
408
+ ### ๐ŸŽจ Recipe 1: Assign a color per artist
409
+
410
+ ```javascript
411
+ const filters = ['alice', 'bob', 'carol'].map((name, i) => ({
412
+ id: name,
413
+ color: ['#FF0000', '#00FF00', '#0000FF'][i],
414
+ startsWith: `${name}_`,
415
+ }));
416
+ ```
417
+
418
+ ### ๐Ÿ“‚ Recipe 2: Color an entire folder, but keep subfolders separate
419
+
420
+ ```javascript
421
+ const filters = [
422
+ {
423
+ id: 'character',
424
+ color: '#FF0000',
425
+ equals: 'Character',
426
+ folder: { subfolders: 'custom', childFilter: [] }, // empty = subfolders stay unfiltered
427
+ },
428
+ ];
429
+ ```
430
+
431
+ ### ๐Ÿ” Recipe 3: Debug which layer went where
432
+
433
+ ```javascript
434
+ for (const layer of result.vectorData) {
435
+ console.log(`๐Ÿ“ ${layer.name} โ†’ ${layer.filterId} (opacity: ${layer.opacity})`);
436
+ }
437
+ ```
438
+
439
+ ### ๐Ÿ“‰ Recipe 4: Detect empty filters
440
+
441
+ ```javascript
442
+ for (const [id, count] of Object.entries(result.stats)) {
443
+ if (count === 0) console.warn(`โš ๏ธ Filter "${id}" matched no pixels!`);
444
+ }
445
+ ```
446
+
447
+ ### ๐Ÿ–ผ๏ธ Recipe 5: Convert a Blob to a data URL (browser)
448
+
449
+ ```javascript
450
+ const toDataURL = (blob) =>
451
+ new Promise((resolve) => {
452
+ const reader = new FileReader();
453
+ reader.onload = () => resolve(reader.result);
454
+ reader.readAsDataURL(blob);
455
+ });
456
+
457
+ const dataURL = await toDataURL(result.fullImageBuffer);
458
+ ```
459
+
460
+ ---
461
+
462
+ ## ๐Ÿ”’ Validation & Error Handling
463
+
464
+ The library is **defensive by design**. Every public entry point validates its arguments and throws a **specific** error.
465
+
466
+ | Scenario | Error Type |
467
+ | --- | --- |
468
+ | `filters` is not an array | `TypeError` |
469
+ | `defaultConfig.color` is missing | `Error` |
470
+ | A filter has no `id` | `TypeError` |
471
+ | A filter has no matching criteria | `TypeError` |
472
+ | `folder.subfolders` is not `'inherit' \| 'exclude' \| 'custom'` | `TypeError` |
473
+ | Invalid HEX color | `Error` |
474
+ | File not found (Node.js) | `Error` |
475
+ | Wrong input type for the environment | `TypeError` |
476
+
477
+ **Always wrap calls in `try/catch`:**
478
+
479
+ ```javascript
480
+ try {
481
+ const result = await processPsdSolidFilters(input, filters, { color: '#FFF' });
482
+ } catch (error) {
483
+ if (error instanceof TypeError) {
484
+ console.error('โŒ Invalid argument:', error.message);
485
+ } else {
486
+ console.error('๐Ÿ’ฅ Runtime error:', error.message);
487
+ }
488
+ }
489
+ ```
490
+
491
+ ---
492
+
493
+ ## ๐Ÿ› Troubleshooting
494
+
495
+ <details>
496
+ <summary><strong>โ“ My layers are not being matched</strong></summary>
497
+
498
+ - Check for **invisible characters** or **trailing spaces** in layer names.
499
+ - Remember: `startsWith`, `endsWith`, `contains`, and `equals` are **case-sensitive**.
500
+ - Use a `test` predicate to debug:
501
+
502
+ ```javascript
503
+ { id: 'debug', color: '#000', test: (name) => {
504
+ console.log('๐Ÿ”', JSON.stringify(name));
505
+ return false;
506
+ }}
507
+ ```
508
+ </details>
509
+
510
+ <details>
511
+ <summary><strong>โ“ My folder filter is not claiming the layers inside it</strong></summary>
512
+
513
+ - Make sure `folder` is set to `true` or an object โ€” omitting it disables folder matching.
514
+ - Confirm the folder name matches your criterion (e.g., `equals: 'Character'`).
515
+ - Check the `subfolders` strategy. With `'exclude'`, nested folders are **not** claimed.
516
+ - Verify the folder is **visible**. Hidden folders (`layer.hidden === true`) are skipped entirely.
517
+ </details>
518
+
519
+ <details>
520
+ <summary><strong>โ“ The output image is fully transparent</strong></summary>
521
+
522
+ - The PSD might have all layers hidden (`layer.hidden === true`).
523
+ - The document dimensions might be `0 ร— 0`.
524
+ - Check `result.stats.unclaimed` โ€” if it equals `W * H`, no layer painted anything.
525
+ </details>
526
+
527
+ <details>
528
+ <summary><strong>โ“ Node.js throws "Cannot find module 'canvas'"</strong></summary>
529
+
530
+ Install the peer dependency:
531
+
532
+ ```bash
533
+ npm install canvas
534
+ ```
535
+ </details>
536
+
537
+ <details>
538
+ <summary><strong>โ“ My RegExp filter behaves inconsistently</strong></summary>
539
+
540
+ You are probably using the `/g` flag. Remove it. RegExp objects with `/g` are **stateful** and will alternate between `true` and `false` on the same input.
541
+ </details>
542
+
543
+ ---
544
+
545
+ ## ๐Ÿงฑ Extending the Library
546
+
547
+ Because the core is a **factory**, you can add a new runtime in ~20 lines. Here's a Deno example:
548
+
549
+ ```javascript
550
+ import { readPsd } from 'npm:ag-psd';
551
+ import { createProcessPsdSolidFilters } from './Template.mjs';
552
+
553
+ export const processPsdSolidFilters = createProcessPsdSolidFilters(
554
+ async (path) => Deno.readFile(path),
555
+ (w, h) => new OffscreenCanvas(w, h),
556
+ readPsd,
557
+ (canvas) => canvas.convertToBlob({ type: 'image/png' }),
558
+ );
559
+ ```
560
+
561
+ The only contract is:
562
+
563
+ 1. `validator` returns a `Buffer` or `ArrayBuffer`.
564
+ 2. `createCanvas(w, h)` returns a canvas-like object.
565
+ 3. `exportCanvas(canvas)` returns a `Promise<Blob | Buffer>`.
@@ -9,7 +9,7 @@ It provides a non-blocking, Promise-based workflow and features a robust configu
9
9
  * **๐Ÿ’Ž Promise-Based:** All dialogs are `async`, allowing for clean `await` syntax in your business logic.
10
10
  * **๐ŸŽจ Deep Customization:** Every single part of the modal (header, body, footer, buttons, etc.) can be styled with custom CSS classes and inline styles.
11
11
  * **๐Ÿ›ก๏ธ Security Focused:** Uses strict DOM manipulation to prevent XSS attacks.
12
- * **โณ Loading State:** Includes a built-in, non-dismissible global loading overlay for background tasks.
12
+ * **โณ Loading State:** Includes a built-in, non-dismissible global loading overlay for background tasks with customization support.
13
13
  * **๐Ÿงน Automatic Cleanup:** Automatically manages DOM elements and body classes (`modal-open`) to prevent memory leaks or broken scrolling.
14
14
 
15
15
  ---
@@ -43,10 +43,10 @@ window.prompt = (msg, def) => BootstrapDialogs.prompt(msg, def);
43
43
  >
44
44
  > If you use this replacement, you **must** update your existing code to use `await` when calling these functions.
45
45
  >
46
- > **โŒ Old (Synchronous):**
46
+ > โŒ **Old (Synchronous):**
47
47
  > `if (confirm("Are you sure?")) { ... }`
48
48
  >
49
- > **โœ… New (Asynchronous):**
49
+ > โœ… **New (Asynchronous):**
50
50
  > `if (await confirm("Are you sure?")) { ... }`
51
51
 
52
52
  ---
@@ -74,7 +74,7 @@ Used to customize specific parts of the modal.
74
74
  | `styles` | `Object<string, string>` | CSS properties and values (e.g., `{ 'color': 'red' }`). |
75
75
 
76
76
  #### `ModalOptions` ๐Ÿ“‹
77
- Configuration options for individual dialog calls.
77
+ Configuration options for customization of the modal structure.
78
78
  | Property | Type | Default | Description |
79
79
  | :--- | :--- | :--- | :--- |
80
80
  | `title` | `string` | `'Alert'` | Text for the modal header. |
@@ -106,21 +106,33 @@ Displays a confirmation modal with "Yes" and "No" options.
106
106
  * **Returns:** `Promise<boolean>` (Resolves `true` if confirmed, `false` if cancelled).
107
107
  * **Usage:**
108
108
  ```javascript
109
- const isDeleted = await confirm('Are you sure you want to delete this?');
109
+ const isDeleted = await confirm('Do you really want to delete this user?', {
110
+ title: 'โš ๏ธ Warning',
111
+ confirmText: 'Delete Forever',
112
+ cancelText: 'Keep User',
113
+ confirmBtnConfig: { className: 'btn-danger' }
114
+ });
110
115
  ```
111
116
 
112
117
  ### โŒจ๏ธ `prompt(message, defaultValue, options)`
113
118
  Displays a modal with a text input field.
119
+ * **Parameters:**
120
+ * `message` (string): The instruction or question.
121
+ * `defaultValue` (string): The initial value for the input field.
122
+ * `options` (`ModalOptions`): Configuration options.
114
123
  * **Returns:** `Promise<string | null>` (Resolves with the input value, or `null` if cancelled).
115
124
  * **Usage:**
116
125
  ```javascript
117
126
  const name = await prompt('Enter your name', 'Guest');
118
127
  ```
119
128
 
120
- ### โณ `showLoading(message)`
129
+ ### โณ `showLoading(message, config)`
121
130
  Displays a global, non-dismissible loading spinner.
131
+ * **Parameters:**
132
+ * `message` (string): The text to display.
133
+ * `config` (`CustomElementConfig`): Customization for the loading message element.
122
134
  * **Returns:** `void`
123
- * **Usage:** `showLoading('Fetching data...');`
135
+ * **Usage:** `showLoading('Fetching data...', { className: 'text-warning' });`
124
136
 
125
137
  ### โœ… `hideLoading()`
126
138
  Removes the loading overlay.