@sprawlify/primitives 0.0.6 → 0.0.8

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 (329) hide show
  1. package/dist/anatomy.d.cts +1 -1
  2. package/dist/anatomy.d.mts +1 -1
  3. package/dist/anatomy.mjs +1 -1
  4. package/dist/{aria-hidden-Dvvxh8vn.mjs → aria-hidden-DIoJxbA3.mjs} +1 -1
  5. package/dist/aria-hidden.mjs +2 -2
  6. package/dist/{auto-resize-jPNnPyMJ.mjs → auto-resize-L6Oqa0lE.mjs} +1 -1
  7. package/dist/auto-resize.mjs +2 -2
  8. package/dist/{collection-Bxz7UdDS.mjs → collection-0DmMA3br.mjs} +2 -2
  9. package/dist/collection.d.cts +4 -4
  10. package/dist/collection.d.mts +4 -4
  11. package/dist/collection.mjs +2 -2
  12. package/dist/{color-utils-DbSDg6nI.mjs → color-utils-D0Lo5X-u.mjs} +2 -2
  13. package/dist/color-utils.d.cts +1 -1
  14. package/dist/color-utils.d.mts +1 -1
  15. package/dist/color-utils.mjs +2 -2
  16. package/dist/{core-Bap2tV4J.d.cts → core-75kSaDJc.d.mts} +3 -3
  17. package/dist/{core-1JwD9Bth.d.mts → core-D_pI64vx.d.cts} +3 -3
  18. package/dist/{core-C77LsUvk.mjs → core-qHH8MshY.mjs} +2 -2
  19. package/dist/core.d.cts +2 -2
  20. package/dist/core.d.mts +2 -2
  21. package/dist/core.mjs +3 -3
  22. package/dist/date-utils.d.cts +6 -6
  23. package/dist/date-utils.d.mts +1 -1
  24. package/dist/date-utils.mjs +1 -1
  25. package/dist/{dismissable-WpM6GqPg.mjs → dismissable-C-6M-juU.mjs} +3 -3
  26. package/dist/{dismissable-layer-DwFMEm4o.d.mts → dismissable-layer-2TW8ZBcS.d.cts} +2 -2
  27. package/dist/{dismissable-layer-BHdxdWFo.d.cts → dismissable-layer-CllXZ1N9.d.mts} +2 -2
  28. package/dist/dismissable.d.cts +2 -2
  29. package/dist/dismissable.d.mts +2 -2
  30. package/dist/dismissable.mjs +4 -4
  31. package/dist/{dom-query-DlipWdON.mjs → dom-query-Bwyyt0Vp.mjs} +1 -1
  32. package/dist/dom-query.d.cts +6 -6
  33. package/dist/dom-query.d.mts +6 -6
  34. package/dist/dom-query.mjs +1 -1
  35. package/dist/file-utils-5E6-AtJ9.mjs +210 -0
  36. package/dist/file-utils-G9_tYexo.cjs +270 -0
  37. package/dist/file-utils.cjs +12 -220
  38. package/dist/file-utils.d.cts +2 -12
  39. package/dist/file-utils.d.mts +2 -12
  40. package/dist/file-utils.mjs +1 -208
  41. package/dist/{focus-trap-BY0WXiLZ.mjs → focus-trap-BG22frp5.mjs} +2 -2
  42. package/dist/focus-trap.cjs +1 -1
  43. package/dist/focus-trap.mjs +2 -2
  44. package/dist/{focus-visible-C8Gu5QYM.mjs → focus-visible-BKLakzc7.mjs} +1 -1
  45. package/dist/focus-visible.cjs +1 -1
  46. package/dist/focus-visible.mjs +2 -2
  47. package/dist/hotkeys.mjs +1 -1
  48. package/dist/i18n-utils-B8IY1mOh.cjs +505 -0
  49. package/dist/i18n-utils-DCz8B6DF.mjs +440 -0
  50. package/dist/i18n-utils.cjs +14 -450
  51. package/dist/i18n-utils.mjs +2 -438
  52. package/dist/{index-CNyu_Zzq.d.mts → index-DYzqCFaj.d.mts} +5 -5
  53. package/dist/{interact-outside-JTrDIgHe.mjs → interact-outside-BtY3-DVp.mjs} +2 -2
  54. package/dist/interact-outside.d.cts +1 -1
  55. package/dist/interact-outside.d.mts +1 -1
  56. package/dist/interact-outside.mjs +3 -3
  57. package/dist/{list-collection-BQSMBg4X.d.mts → list-collection-BvMwDNHf.d.cts} +1 -1
  58. package/dist/{list-collection-DrnwYduc.d.cts → list-collection-CTt1eong.d.mts} +1 -1
  59. package/dist/live-region.cjs +1 -1
  60. package/dist/live-region.d.cts +1 -1
  61. package/dist/live-region.d.mts +1 -1
  62. package/dist/live-region.mjs +1 -1
  63. package/dist/machines/accordion/index.cjs +1 -1
  64. package/dist/machines/accordion/index.d.cts +3 -3
  65. package/dist/machines/accordion/index.d.mts +3 -3
  66. package/dist/machines/accordion/index.mjs +5 -5
  67. package/dist/machines/angle-slider/index.cjs +2 -2
  68. package/dist/machines/angle-slider/index.d.cts +4 -4
  69. package/dist/machines/angle-slider/index.d.mts +4 -4
  70. package/dist/machines/angle-slider/index.mjs +6 -6
  71. package/dist/machines/async-list/index.d.cts +1 -1
  72. package/dist/machines/async-list/index.d.mts +1 -1
  73. package/dist/machines/async-list/index.mjs +3 -3
  74. package/dist/machines/avatar/index.cjs +1 -1
  75. package/dist/machines/avatar/index.d.cts +3 -3
  76. package/dist/machines/avatar/index.d.mts +3 -3
  77. package/dist/machines/avatar/index.mjs +5 -5
  78. package/dist/machines/bottom-sheet/index.cjs +3 -3
  79. package/dist/machines/bottom-sheet/index.d.cts +6 -6
  80. package/dist/machines/bottom-sheet/index.d.mts +6 -6
  81. package/dist/machines/bottom-sheet/index.mjs +11 -11
  82. package/dist/machines/carousel/index.cjs +2 -2
  83. package/dist/machines/carousel/index.d.cts +4 -4
  84. package/dist/machines/carousel/index.d.mts +4 -4
  85. package/dist/machines/carousel/index.mjs +6 -6
  86. package/dist/machines/checkbox/index.cjs +2 -2
  87. package/dist/machines/checkbox/index.d.cts +4 -4
  88. package/dist/machines/checkbox/index.d.mts +4 -4
  89. package/dist/machines/checkbox/index.mjs +6 -6
  90. package/dist/machines/clipboard/index.cjs +1 -1
  91. package/dist/machines/clipboard/index.d.cts +4 -4
  92. package/dist/machines/clipboard/index.d.mts +4 -4
  93. package/dist/machines/clipboard/index.mjs +5 -5
  94. package/dist/machines/collapsible/index.cjs +1 -1
  95. package/dist/machines/collapsible/index.d.cts +4 -4
  96. package/dist/machines/collapsible/index.d.mts +4 -4
  97. package/dist/machines/collapsible/index.mjs +5 -5
  98. package/dist/machines/color-picker/index.cjs +2 -2
  99. package/dist/machines/color-picker/index.d.cts +7 -7
  100. package/dist/machines/color-picker/index.d.mts +7 -7
  101. package/dist/machines/color-picker/index.mjs +9 -9
  102. package/dist/machines/combobox/index.cjs +2 -2
  103. package/dist/machines/combobox/index.d.cts +8 -8
  104. package/dist/machines/combobox/index.d.mts +8 -8
  105. package/dist/machines/combobox/index.mjs +9 -9
  106. package/dist/machines/date-picker/index.cjs +3 -3
  107. package/dist/machines/date-picker/index.d.cts +8 -8
  108. package/dist/machines/date-picker/index.d.mts +8 -8
  109. package/dist/machines/date-picker/index.mjs +10 -10
  110. package/dist/machines/dialog/index.cjs +3 -3
  111. package/dist/machines/dialog/index.d.cts +6 -6
  112. package/dist/machines/dialog/index.d.mts +6 -6
  113. package/dist/machines/dialog/index.mjs +10 -10
  114. package/dist/machines/editable/index.cjs +1 -1
  115. package/dist/machines/editable/index.d.cts +5 -5
  116. package/dist/machines/editable/index.d.mts +5 -5
  117. package/dist/machines/editable/index.mjs +6 -6
  118. package/dist/machines/file-upload/index.cjs +627 -0
  119. package/dist/machines/file-upload/index.d.cts +145 -0
  120. package/dist/machines/file-upload/index.d.mts +145 -0
  121. package/dist/machines/file-upload/index.mjs +621 -0
  122. package/dist/machines/floating-panel/index.cjs +3 -3
  123. package/dist/machines/floating-panel/index.d.cts +5 -5
  124. package/dist/machines/floating-panel/index.d.mts +5 -5
  125. package/dist/machines/floating-panel/index.mjs +7 -7
  126. package/dist/machines/hover-card/index.cjs +2 -2
  127. package/dist/machines/hover-card/index.d.cts +6 -6
  128. package/dist/machines/hover-card/index.d.mts +6 -6
  129. package/dist/machines/hover-card/index.mjs +8 -8
  130. package/dist/machines/image-cropper/index.cjs +1 -1
  131. package/dist/machines/image-cropper/index.d.cts +3 -3
  132. package/dist/machines/image-cropper/index.d.mts +3 -3
  133. package/dist/machines/image-cropper/index.mjs +5 -5
  134. package/dist/machines/listbox/index.cjs +2 -2
  135. package/dist/machines/listbox/index.d.cts +8 -8
  136. package/dist/machines/listbox/index.d.mts +8 -8
  137. package/dist/machines/listbox/index.mjs +7 -7
  138. package/dist/machines/marquee/index.cjs +1 -1
  139. package/dist/machines/marquee/index.d.cts +6 -6
  140. package/dist/machines/marquee/index.d.mts +6 -6
  141. package/dist/machines/marquee/index.mjs +5 -5
  142. package/dist/machines/menu/index.cjs +3 -3
  143. package/dist/machines/menu/index.d.cts +9 -9
  144. package/dist/machines/menu/index.d.mts +9 -9
  145. package/dist/machines/menu/index.mjs +9 -9
  146. package/dist/machines/navigation-menu/index.cjs +1 -1
  147. package/dist/machines/navigation-menu/index.d.cts +4 -4
  148. package/dist/machines/navigation-menu/index.d.mts +4 -4
  149. package/dist/machines/navigation-menu/index.mjs +7 -7
  150. package/dist/machines/number-input/index.cjs +1 -1
  151. package/dist/machines/number-input/index.d.cts +4 -4
  152. package/dist/machines/number-input/index.d.mts +4 -4
  153. package/dist/machines/number-input/index.mjs +5 -5
  154. package/dist/machines/pagination/index.cjs +1 -1
  155. package/dist/machines/pagination/index.d.cts +4 -4
  156. package/dist/machines/pagination/index.d.mts +4 -4
  157. package/dist/machines/pagination/index.mjs +5 -5
  158. package/dist/machines/password-input/index.cjs +1 -1
  159. package/dist/machines/password-input/index.d.cts +4 -4
  160. package/dist/machines/password-input/index.d.mts +4 -4
  161. package/dist/machines/password-input/index.mjs +5 -5
  162. package/dist/machines/pin-input/index.cjs +1 -1
  163. package/dist/machines/pin-input/index.d.cts +4 -4
  164. package/dist/machines/pin-input/index.d.mts +4 -4
  165. package/dist/machines/pin-input/index.mjs +5 -5
  166. package/dist/machines/popover/index.cjs +4 -4
  167. package/dist/machines/popover/index.d.cts +7 -7
  168. package/dist/machines/popover/index.d.mts +7 -7
  169. package/dist/machines/popover/index.mjs +11 -11
  170. package/dist/machines/presence/index.cjs +1 -1
  171. package/dist/machines/presence/index.d.cts +2 -2
  172. package/dist/machines/presence/index.d.mts +2 -2
  173. package/dist/machines/presence/index.mjs +4 -4
  174. package/dist/machines/progress/index.cjs +1 -1
  175. package/dist/machines/progress/index.d.cts +4 -4
  176. package/dist/machines/progress/index.d.mts +4 -4
  177. package/dist/machines/progress/index.mjs +5 -5
  178. package/dist/machines/qr-code/index.cjs +1 -1
  179. package/dist/machines/qr-code/index.d.cts +4 -4
  180. package/dist/machines/qr-code/index.d.mts +4 -4
  181. package/dist/machines/qr-code/index.mjs +5 -5
  182. package/dist/machines/radio-group/index.cjs +2 -2
  183. package/dist/machines/radio-group/index.d.cts +4 -4
  184. package/dist/machines/radio-group/index.d.mts +4 -4
  185. package/dist/machines/radio-group/index.mjs +6 -6
  186. package/dist/machines/rating-group/index.cjs +1 -1
  187. package/dist/machines/rating-group/index.d.cts +4 -4
  188. package/dist/machines/rating-group/index.d.mts +4 -4
  189. package/dist/machines/rating-group/index.mjs +5 -5
  190. package/dist/machines/scroll-area/index.cjs +1 -1
  191. package/dist/machines/scroll-area/index.d.cts +4 -4
  192. package/dist/machines/scroll-area/index.d.mts +4 -4
  193. package/dist/machines/scroll-area/index.mjs +6 -6
  194. package/dist/machines/select/index.cjs +2 -2
  195. package/dist/machines/select/index.d.cts +9 -9
  196. package/dist/machines/select/index.d.mts +9 -9
  197. package/dist/machines/select/index.mjs +9 -9
  198. package/dist/machines/signature-pad/index.cjs +1 -1
  199. package/dist/machines/signature-pad/index.d.cts +4 -4
  200. package/dist/machines/signature-pad/index.d.mts +4 -4
  201. package/dist/machines/signature-pad/index.mjs +5 -5
  202. package/dist/machines/slider/index.cjs +1 -1
  203. package/dist/machines/slider/index.d.cts +4 -4
  204. package/dist/machines/slider/index.d.mts +4 -4
  205. package/dist/machines/slider/index.mjs +5 -5
  206. package/dist/machines/splitter/index.cjs +1 -1
  207. package/dist/machines/splitter/index.d.cts +3 -3
  208. package/dist/machines/splitter/index.d.mts +3 -3
  209. package/dist/machines/splitter/index.mjs +5 -5
  210. package/dist/machines/steps/index.cjs +1 -1
  211. package/dist/machines/steps/index.d.cts +4 -4
  212. package/dist/machines/steps/index.d.mts +4 -4
  213. package/dist/machines/steps/index.mjs +5 -5
  214. package/dist/machines/switch/index.cjs +2 -2
  215. package/dist/machines/switch/index.d.cts +3 -3
  216. package/dist/machines/switch/index.d.mts +3 -3
  217. package/dist/machines/switch/index.mjs +6 -6
  218. package/dist/machines/tabs/index.cjs +1 -1
  219. package/dist/machines/tabs/index.d.cts +4 -4
  220. package/dist/machines/tabs/index.d.mts +4 -4
  221. package/dist/machines/tabs/index.mjs +5 -5
  222. package/dist/machines/tags-input/index.cjs +2 -2
  223. package/dist/machines/tags-input/index.d.cts +6 -6
  224. package/dist/machines/tags-input/index.d.mts +6 -6
  225. package/dist/machines/tags-input/index.mjs +8 -8
  226. package/dist/machines/timer/index.cjs +1 -1
  227. package/dist/machines/timer/index.d.cts +4 -4
  228. package/dist/machines/timer/index.d.mts +4 -4
  229. package/dist/machines/timer/index.mjs +5 -5
  230. package/dist/machines/toast/index.d.cts +5 -5
  231. package/dist/machines/toast/index.d.mts +5 -5
  232. package/dist/machines/toast/index.mjs +6 -6
  233. package/dist/machines/toggle/index.cjs +1 -1
  234. package/dist/machines/toggle/index.d.cts +3 -3
  235. package/dist/machines/toggle/index.d.mts +3 -3
  236. package/dist/machines/toggle/index.mjs +5 -5
  237. package/dist/machines/toggle-group/index.cjs +1 -1
  238. package/dist/machines/toggle-group/index.d.cts +3 -3
  239. package/dist/machines/toggle-group/index.d.mts +3 -3
  240. package/dist/machines/toggle-group/index.mjs +5 -5
  241. package/dist/machines/tooltip/index.cjs +3 -3
  242. package/dist/machines/tooltip/index.d.cts +5 -5
  243. package/dist/machines/tooltip/index.d.mts +5 -5
  244. package/dist/machines/tooltip/index.mjs +7 -7
  245. package/dist/machines/tour/index.cjs +3 -3
  246. package/dist/machines/tour/index.d.cts +7 -7
  247. package/dist/machines/tour/index.d.mts +7 -7
  248. package/dist/machines/tour/index.mjs +9 -9
  249. package/dist/machines/tree-view/index.cjs +1 -1
  250. package/dist/machines/tree-view/index.d.cts +7 -7
  251. package/dist/machines/tree-view/index.d.mts +7 -7
  252. package/dist/machines/tree-view/index.mjs +6 -6
  253. package/dist/{popper-MxgCIf_4.mjs → popper-4MZcEna4.mjs} +2 -2
  254. package/dist/popper.cjs +1 -1
  255. package/dist/popper.d.cts +1 -1
  256. package/dist/popper.d.mts +1 -1
  257. package/dist/popper.mjs +3 -3
  258. package/dist/{rect-utils-BENI97My.mjs → rect-utils-j6C9uZk1.mjs} +1 -1
  259. package/dist/rect-utils.cjs +1 -1
  260. package/dist/rect-utils.d.cts +1 -1
  261. package/dist/rect-utils.d.mts +1 -1
  262. package/dist/rect-utils.mjs +1 -1
  263. package/dist/{remove-scroll-BL1SJPHq.mjs → remove-scroll-C73TLIgr.mjs} +1 -1
  264. package/dist/{scroll-snap-D-BtyzPh.mjs → scroll-snap-D4hJV_c8.mjs} +1 -1
  265. package/dist/scroll-snap.cjs +1 -1
  266. package/dist/scroll-snap.mjs +2 -2
  267. package/dist/{selection-BerN7Dvw.d.mts → selection-JDFmyke7.d.mts} +2 -2
  268. package/dist/{selection-Bm0boSA-.d.cts → selection-vng1guNc.d.cts} +2 -2
  269. package/dist/store.cjs +1 -1
  270. package/dist/store.mjs +1 -1
  271. package/dist/{tree-collection-Ders6toe.d.mts → tree-collection-DYIVkVee.d.mts} +1 -1
  272. package/dist/{tree-collection-CcgKezAi.d.cts → tree-collection-Dlv1BAsc.d.cts} +1 -1
  273. package/dist/types-CsK6JMut.d.mts +13 -0
  274. package/dist/types-xyuh-a2-.d.cts +13 -0
  275. package/dist/types.cjs +1 -1
  276. package/dist/types.d.cts +1 -1
  277. package/dist/types.d.mts +1 -1
  278. package/dist/types.mjs +1 -1
  279. package/dist/{utils-BxXp67XU.mjs → utils-hFKGi-oS.mjs} +1 -1
  280. package/dist/utils.d.cts +1 -1
  281. package/dist/utils.d.mts +1 -1
  282. package/dist/utils.mjs +1 -1
  283. package/package.json +11 -1
  284. /package/dist/{color-DMmL1Ky0.d.cts → color-CIaXnwJx.d.mts} +0 -0
  285. /package/dist/{color-blKFMqAz.d.mts → color-_pKYh-E2.d.cts} +0 -0
  286. /package/dist/{create-anatomy-Df7y5SsP.mjs → create-anatomy-CArN8dVu.mjs} +0 -0
  287. /package/dist/{create-anatomy-B1eclDhe.d.cts → create-anatomy-DHVOqZET.d.mts} +0 -0
  288. /package/dist/{create-anatomy-B9oniNA9.d.mts → create-anatomy-smWrirg1.d.cts} +0 -0
  289. /package/dist/{create-props-BML_gpX0.mjs → create-props-SRSjdUTq.mjs} +0 -0
  290. /package/dist/{create-props-YKy7JIKj.cjs → create-props-l5q5b8Wo.cjs} +0 -0
  291. /package/dist/{data-url-B5BT_GnT.d.mts → data-url-BqpiKO1L.d.mts} +0 -0
  292. /package/dist/{data-url-p1B_RG_H.d.cts → data-url-og2AwQaU.d.cts} +0 -0
  293. /package/dist/{date-utils-DftsV7SR.mjs → date-utils-d1Jt6z5f.mjs} +0 -0
  294. /package/dist/{defineProperty-DxNiKPNe.mjs → defineProperty-Cql4jybt.mjs} +0 -0
  295. /package/dist/{focus-trap-D4i52S9A.cjs → focus-trap-DMoa9bOi.cjs} +0 -0
  296. /package/dist/{focus-visible-DYTWdWpa.cjs → focus-visible-BVOZnp76.cjs} +0 -0
  297. /package/dist/{functions-D3G3aWHL.d.mts → functions-DFnYr-gp.d.cts} +0 -0
  298. /package/dist/{functions-DtSGq3MR.d.cts → functions-i_nVCRW0.d.mts} +0 -0
  299. /package/dist/{index-CefB9yps.d.mts → index-9OlOKr2i.d.mts} +0 -0
  300. /package/dist/{index-DQnU976_.d.cts → index-BBTkH09t.d.cts} +0 -0
  301. /package/dist/{index-CuONGeOw.d.mts → index-BVcPBg7R.d.mts} +0 -0
  302. /package/dist/{index-WDB45Zqi.d.mts → index-C9ajBf1B.d.mts} +0 -0
  303. /package/dist/{index-DvpM-Mfi.d.cts → index-DFiQyzeW.d.cts} +0 -0
  304. /package/dist/{index-pPMoFaB-.d.mts → index-DikGG00a.d.mts} +0 -0
  305. /package/dist/{index-PMpGStDQ.d.cts → index-UNyqrBDu.d.cts} +0 -0
  306. /package/dist/{live-region-CcZPGo89.cjs → live-region-2RiuzOr-.cjs} +0 -0
  307. /package/dist/{live-region-BjruYEJ2.mjs → live-region-BcSdQIM8.mjs} +0 -0
  308. /package/dist/{node-Cs9VjvUL.d.cts → node-BecR7gec.d.cts} +0 -0
  309. /package/dist/{node-R56TVizn.d.mts → node-v8Pyrj9P.d.mts} +0 -0
  310. /package/dist/{popper-D0FAW_p7.cjs → popper-CWip5FHB.cjs} +0 -0
  311. /package/dist/{raf-BBPHUdcb.d.mts → raf-BF2VrckK.d.cts} +0 -0
  312. /package/dist/{raf-DiJ6_y_m.d.cts → raf-DX52LaVy.d.mts} +0 -0
  313. /package/dist/{rect-utils-DKLRhP8G.cjs → rect-utils-Dp9Wvl7-.cjs} +0 -0
  314. /package/dist/{remove-scroll-Uvzg1L9r.cjs → remove-scroll-Dh9PjZFE.cjs} +0 -0
  315. /package/dist/{scroll-snap-zyiZLv7W.cjs → scroll-snap-BsPbmOTg.cjs} +0 -0
  316. /package/dist/{store-D6DXvVrK.mjs → store-CpMJ6RZR.mjs} +0 -0
  317. /package/dist/{store-BZcXv49B.cjs → store-DDjfrUhd.cjs} +0 -0
  318. /package/dist/{typeahead-DoNxux_s.d.mts → typeahead-BWyD_KIb.d.cts} +0 -0
  319. /package/dist/{typeahead-JQJrD3Fg.d.cts → typeahead-BX-BWYjD.d.mts} +0 -0
  320. /package/dist/{types-BrAcjFWl.d.cts → types-BIy26Uwn.d.cts} +0 -0
  321. /package/dist/{types-BLWhvNQm.d.cts → types-ByFp2QfD.d.mts} +0 -0
  322. /package/dist/{types-BXIZOjVE.d.mts → types-CADkcKtr.d.cts} +0 -0
  323. /package/dist/{types-YxEXuJrz.d.mts → types-CaxzY9yP.d.cts} +0 -0
  324. /package/dist/{types-DwwrI0dI.d.cts → types-Df8ZhdY-.d.mts} +0 -0
  325. /package/dist/{types-oXs2YVjs.d.cts → types-PjLoIczn.d.cts} +0 -0
  326. /package/dist/{types-D9XpvNCK.d.mts → types-jyV564Ip.d.mts} +0 -0
  327. /package/dist/{types-D3yZIhlx.d.cts → types-oh90SH45.d.cts} +0 -0
  328. /package/dist/{wait-for-CdgWKT7N.d.mts → wait-for-C9QyzQj2.d.cts} +0 -0
  329. /package/dist/{wait-for-kzsbN3VT.d.cts → wait-for-Pn6RmrHX.d.mts} +0 -0
@@ -0,0 +1,505 @@
1
+ const require_dom_query = require('./dom-query-CWZdWUGp.cjs');
2
+
3
+ //#region src/shared/i18n-utils/cache.ts
4
+ function i18nCache(Ins) {
5
+ const formatterCache = /* @__PURE__ */ new Map();
6
+ return function create(locale, options) {
7
+ const cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
8
+ if (formatterCache.has(cacheKey)) return formatterCache.get(cacheKey);
9
+ let formatter = new Ins(locale, options);
10
+ formatterCache.set(cacheKey, formatter);
11
+ return formatter;
12
+ };
13
+ }
14
+
15
+ //#endregion
16
+ //#region src/shared/i18n-utils/collator.ts
17
+ const getCollator = i18nCache(Intl.Collator);
18
+ function createCollator(locale = "en-US", options = {}) {
19
+ return getCollator(locale, options);
20
+ }
21
+
22
+ //#endregion
23
+ //#region src/shared/i18n-utils/filter.ts
24
+ const collatorCache = i18nCache(Intl.Collator);
25
+ function createFilter(options) {
26
+ const { locale, ...rest } = options || {};
27
+ const collator = collatorCache(locale || "en-US", {
28
+ usage: "search",
29
+ ...rest
30
+ });
31
+ function normalize(string) {
32
+ string = string.normalize("NFC");
33
+ if (collator.resolvedOptions().ignorePunctuation) string = string.replace(/\p{P}/gu, "");
34
+ return string;
35
+ }
36
+ function startsWith(string, substring) {
37
+ if (substring.length === 0) return true;
38
+ string = normalize(string);
39
+ substring = normalize(substring);
40
+ return collator.compare(string.slice(0, substring.length), substring) === 0;
41
+ }
42
+ function endsWith(string, substring) {
43
+ if (substring.length === 0) return true;
44
+ string = normalize(string);
45
+ substring = normalize(substring);
46
+ return collator.compare(string.slice(-substring.length), substring) === 0;
47
+ }
48
+ function contains(string, substring) {
49
+ if (substring.length === 0) return true;
50
+ string = normalize(string);
51
+ substring = normalize(substring);
52
+ let scan = 0;
53
+ let sliceLen = substring.length;
54
+ for (; scan + sliceLen <= string.length; scan++) {
55
+ let slice = string.slice(scan, scan + sliceLen);
56
+ if (collator.compare(substring, slice) === 0) return true;
57
+ }
58
+ return false;
59
+ }
60
+ return {
61
+ startsWith,
62
+ endsWith,
63
+ contains
64
+ };
65
+ }
66
+
67
+ //#endregion
68
+ //#region src/shared/i18n-utils/format-number.ts
69
+ const getNumberFormatter = i18nCache(Intl.NumberFormat);
70
+ function formatNumber(v, locale, options = {}) {
71
+ return getNumberFormatter(locale, options).format(v);
72
+ }
73
+
74
+ //#endregion
75
+ //#region src/shared/i18n-utils/format-bytes.ts
76
+ const bitPrefixes = [
77
+ "",
78
+ "kilo",
79
+ "mega",
80
+ "giga",
81
+ "tera"
82
+ ];
83
+ const bytePrefixes = [
84
+ "",
85
+ "kilo",
86
+ "mega",
87
+ "giga",
88
+ "tera",
89
+ "peta"
90
+ ];
91
+ const formatBytes = (bytes, locale = "en-US", options = {}) => {
92
+ if (Number.isNaN(bytes)) return "";
93
+ if (bytes === 0) return "0 B";
94
+ const { unitSystem = "decimal", precision = 3, unit = "byte", unitDisplay = "short" } = options;
95
+ const factor = unitSystem === "binary" ? 1024 : 1e3;
96
+ const prefix = unit === "bit" ? bitPrefixes : bytePrefixes;
97
+ const isNegative = bytes < 0;
98
+ let value = Math.abs(bytes);
99
+ let index = 0;
100
+ while (value >= factor && index < prefix.length - 1) {
101
+ value /= factor;
102
+ index++;
103
+ }
104
+ const v = parseFloat(value.toPrecision(precision));
105
+ return formatNumber(isNegative ? -v : v, locale, {
106
+ style: "unit",
107
+ unit: prefix[index] + unit,
108
+ unitDisplay
109
+ });
110
+ };
111
+
112
+ //#endregion
113
+ //#region src/shared/i18n-utils/format-date.ts
114
+ const symbols = "\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";
115
+ function createRegEx(sign) {
116
+ return new RegExp("(^|>|" + symbols + ")(" + sign + ")($|<|\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;)", "g");
117
+ }
118
+ const FORMATS = [
119
+ "G",
120
+ "GG",
121
+ "GGG",
122
+ "GGGG",
123
+ "GGGGG",
124
+ "y",
125
+ "yo",
126
+ "yy",
127
+ "yyy",
128
+ "yyyy",
129
+ "Y",
130
+ "Yo",
131
+ "YY",
132
+ "YYY",
133
+ "YYYY",
134
+ "Q",
135
+ "Qo",
136
+ "QQ",
137
+ "QQQ",
138
+ "QQQQ",
139
+ "QQQQQ",
140
+ "M",
141
+ "Mo",
142
+ "MM",
143
+ "MMM",
144
+ "MMMM",
145
+ "MMMMM",
146
+ "E",
147
+ "EE",
148
+ "EEE",
149
+ "EEEE",
150
+ "EEEEE",
151
+ "EEEEEE",
152
+ "a",
153
+ "aa",
154
+ "aaa",
155
+ "aaaa",
156
+ "aaaaa",
157
+ "d",
158
+ "do",
159
+ "dd",
160
+ "D",
161
+ "Do",
162
+ "DD",
163
+ "DDD",
164
+ "w",
165
+ "wo",
166
+ "ww",
167
+ "s",
168
+ "so",
169
+ "ss",
170
+ "m",
171
+ "mo",
172
+ "mm",
173
+ "h",
174
+ "ho",
175
+ "hh",
176
+ "H",
177
+ "Ho",
178
+ "HH",
179
+ "z",
180
+ "zz",
181
+ "zzz",
182
+ "zzzz",
183
+ "T"
184
+ ];
185
+ function ordinal(num) {
186
+ const n = typeof num === "string" ? parseFloat(num) : num;
187
+ let suffix = "th";
188
+ if (n % 10 === 1 && n % 100 !== 11) suffix = "st";
189
+ else if (n % 10 === 2 && n % 100 !== 12) suffix = "nd";
190
+ else if (n % 10 === 3 && n % 100 !== 13) suffix = "rd";
191
+ return `${n}${suffix}`;
192
+ }
193
+ function pad(num, length) {
194
+ return String(num).padStart(length, "0");
195
+ }
196
+ function zone(str) {
197
+ return str.split(/AM|PM/)[1].trim();
198
+ }
199
+ function getFormat(date, options) {
200
+ const { locale, format, timeZone } = options;
201
+ switch (format) {
202
+ case "G":
203
+ case "GG":
204
+ case "GGG": return date.toLocaleString(locale, { era: "short" });
205
+ case "GGGG": return date.toLocaleString(locale, { era: "long" });
206
+ case "GGGGG": return date.toLocaleString(locale, { era: "narrow" });
207
+ case "y":
208
+ case "Y": return date.getFullYear();
209
+ case "yo":
210
+ case "Yo": return ordinal(date.toLocaleString(locale, { year: "numeric" }));
211
+ case "yy":
212
+ case "YY": return date.toLocaleString(locale, { year: "2-digit" });
213
+ case "yyy":
214
+ case "YYY": return date.toLocaleString(locale, { year: "numeric" }).padStart(3, "0");
215
+ case "yyyy":
216
+ case "YYYY": return date.toLocaleString(locale, { year: "numeric" }).padStart(4, "0");
217
+ case "Q":
218
+ case "QQQQQ": return Math.ceil((date.getMonth() + 1) / 3);
219
+ case "Qo": return ordinal(Math.ceil((date.getMonth() + 1) / 3));
220
+ case "QQ": return pad(Math.ceil((date.getMonth() + 1) / 3), 2);
221
+ case "QQQ": return `Q${Math.ceil((date.getMonth() + 1) / 3)}`;
222
+ case "QQQQ": return `${ordinal(String(Math.ceil((date.getMonth() + 1) / 3)))} quarter`;
223
+ case "M": return date.getMonth() + 1;
224
+ case "Mo": return ordinal(date.getMonth() + 1);
225
+ case "MM": return date.toLocaleString(locale, { month: "2-digit" });
226
+ case "MMM": return date.toLocaleString(locale, { month: "short" });
227
+ case "MMMM": return date.toLocaleString(locale, { month: "long" });
228
+ case "MMMMM": return date.toLocaleString(locale, { month: "narrow" });
229
+ case "w": return Math.ceil(date.getDate() / 7);
230
+ case "wo": return ordinal(Math.ceil(date.getDate() / 7));
231
+ case "ww": return pad(Math.ceil(date.getDate() / 7), 2);
232
+ case "d":
233
+ case "D": return date.getDate();
234
+ case "do":
235
+ case "Do": return ordinal(date.getDate());
236
+ case "dd":
237
+ case "DD": return date.toLocaleString(locale, { day: "2-digit" });
238
+ case "DDD": return pad(date.getDate(), 3);
239
+ case "E":
240
+ case "EE":
241
+ case "EEE": return date.toLocaleString(locale, { weekday: "short" });
242
+ case "EEEE": return date.toLocaleString(locale, { weekday: "long" });
243
+ case "EEEEE": return date.toLocaleString(locale, { weekday: "narrow" });
244
+ case "EEEEEE": return date.toLocaleString(locale, { weekday: "short" }).slice(0, 2);
245
+ case "h": return date.toLocaleString(locale, {
246
+ hour: "numeric",
247
+ hour12: true
248
+ });
249
+ case "ho": return ordinal(date.toLocaleString(locale, {
250
+ hour: "2-digit",
251
+ hour12: true
252
+ }));
253
+ case "hh": return date.toLocaleString(locale, {
254
+ hour: "2-digit",
255
+ hour12: true
256
+ });
257
+ case "H": return date.toLocaleString(locale, {
258
+ hour: "numeric",
259
+ hour12: false
260
+ });
261
+ case "Ho": return ordinal(+date.toLocaleString(locale, {
262
+ hour: "numeric",
263
+ hour12: false
264
+ }));
265
+ case "HH": return date.toLocaleString(locale, {
266
+ hour: "2-digit",
267
+ hour12: false
268
+ });
269
+ case "m": return date.toLocaleString(locale, { minute: "numeric" });
270
+ case "mo": return ordinal(date.toLocaleString(locale, { minute: "numeric" }));
271
+ case "mm": return date.toLocaleString(locale, { minute: "2-digit" });
272
+ case "s": return date.toLocaleString(locale, { second: "numeric" });
273
+ case "so": return ordinal(date.toLocaleString(locale, { second: "numeric" }));
274
+ case "ss": return date.toLocaleString(locale, { second: "2-digit" });
275
+ case "T": return date.getTime();
276
+ case "a":
277
+ case "aa":
278
+ case "aaa": return date.toLocaleString(locale, {
279
+ hour: "numeric",
280
+ hour12: true
281
+ }).toLocaleUpperCase();
282
+ case "aaaa": return date.toLocaleString(locale, {
283
+ hour: "numeric",
284
+ hour12: true
285
+ }).toLocaleLowerCase();
286
+ case "aaaaa": return date.toLocaleString(locale, {
287
+ hour: "numeric",
288
+ hour12: true
289
+ }).charAt(0);
290
+ case "z":
291
+ case "zz":
292
+ case "zzz": return zone(date.toLocaleString(locale, {
293
+ timeZone,
294
+ timeZoneName: "shortOffset"
295
+ }));
296
+ case "zzzz": return zone(date.toLocaleString(locale, {
297
+ timeZone,
298
+ timeZoneName: "longOffset"
299
+ }));
300
+ default: throw new Error(`Unknown format: ${format}`);
301
+ }
302
+ }
303
+ function formatDate(date, format, locale, timeZone) {
304
+ let result = format;
305
+ for (const key of FORMATS) {
306
+ const res = getFormat(date, {
307
+ locale,
308
+ format: key,
309
+ timeZone
310
+ });
311
+ result = result.replace(createRegEx(key), "$1" + res + "$3");
312
+ }
313
+ return result;
314
+ }
315
+
316
+ //#endregion
317
+ //#region src/shared/i18n-utils/format-list.ts
318
+ const getListFormatter = i18nCache(Intl.ListFormat);
319
+ function formatList(list, locale, options = {}) {
320
+ return getListFormatter(locale, options).format(list);
321
+ }
322
+
323
+ //#endregion
324
+ //#region src/shared/i18n-utils/format-relative-time.ts
325
+ const getRelativeTimeFormatter = i18nCache(Intl.RelativeTimeFormat);
326
+ function formatRelativeTime(value, locale, options = {}) {
327
+ const rtf = getRelativeTimeFormatter(locale, options);
328
+ const diff = getDistance(/* @__PURE__ */ new Date(), value);
329
+ if (diff.years > 0) return rtf.format(diff.years * diff.sign, "year");
330
+ if (diff.months > 0) return rtf.format(diff.months * diff.sign, "month");
331
+ if (diff.weeks > 0) return rtf.format(diff.weeks * diff.sign, "week");
332
+ if (diff.days > 0) return rtf.format(diff.days * diff.sign, "day");
333
+ if (diff.hours > 0) return rtf.format(diff.hours * diff.sign, "hour");
334
+ if (diff.minutes > 0) return rtf.format(diff.minutes * diff.sign, "minute");
335
+ return rtf.format(diff.seconds * diff.sign, "second");
336
+ }
337
+ const SECOND_TO_MS = 1e3;
338
+ const MINUTE_TO_MS = 1e3 * 60;
339
+ const HOUR_TO_MS = 1e3 * 60 * 60;
340
+ const DAY_TO_MS = 1e3 * 60 * 60 * 24;
341
+ const WEEK_TO_MS = 1e3 * 60 * 60 * 24 * 7;
342
+ const MONTH_TO_MS = 1e3 * 60 * 60 * 24 * 30;
343
+ const YEAR_TO_MS = 1e3 * 60 * 60 * 24 * 365;
344
+ function getDistance(startDate, endDate) {
345
+ const endTime = endDate.getTime();
346
+ const startTime = startDate.getTime();
347
+ const distance = Math.abs(endTime - startTime);
348
+ return {
349
+ sign: Math.sign(endTime - startTime),
350
+ days: Math.floor(distance / DAY_TO_MS),
351
+ hours: Math.floor(distance % DAY_TO_MS / HOUR_TO_MS),
352
+ minutes: Math.floor(distance % HOUR_TO_MS / MINUTE_TO_MS),
353
+ seconds: Math.floor(distance % MINUTE_TO_MS / SECOND_TO_MS),
354
+ weeks: Math.floor(distance / WEEK_TO_MS),
355
+ months: Math.floor(distance / MONTH_TO_MS),
356
+ years: Math.floor(distance / YEAR_TO_MS)
357
+ };
358
+ }
359
+
360
+ //#endregion
361
+ //#region src/shared/i18n-utils/is-rtl.ts
362
+ const RTL_SCRIPTS = new Set([
363
+ "Avst",
364
+ "Arab",
365
+ "Armi",
366
+ "Syrc",
367
+ "Samr",
368
+ "Mand",
369
+ "Thaa",
370
+ "Mend",
371
+ "Nkoo",
372
+ "Adlm",
373
+ "Rohg",
374
+ "Hebr"
375
+ ]);
376
+ const RTL_LANGS = new Set([
377
+ "ae",
378
+ "ar",
379
+ "arc",
380
+ "bcc",
381
+ "bqi",
382
+ "ckb",
383
+ "dv",
384
+ "fa",
385
+ "glk",
386
+ "he",
387
+ "ku",
388
+ "mzn",
389
+ "nqo",
390
+ "pnb",
391
+ "ps",
392
+ "sd",
393
+ "ug",
394
+ "ur",
395
+ "yi"
396
+ ]);
397
+ function isRTL(locale) {
398
+ if (Intl.Locale) {
399
+ const script = new Intl.Locale(locale).maximize().script ?? "";
400
+ return RTL_SCRIPTS.has(script);
401
+ }
402
+ const lang = locale.split("-")[0];
403
+ return RTL_LANGS.has(lang);
404
+ }
405
+ function getLocaleDir(locale) {
406
+ return isRTL(locale) ? "rtl" : "ltr";
407
+ }
408
+
409
+ //#endregion
410
+ //#region src/shared/i18n-utils/locale.ts
411
+ function getDefaultLocale() {
412
+ let locale = typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
413
+ try {
414
+ Intl.DateTimeFormat.supportedLocalesOf([locale]);
415
+ } catch {
416
+ locale = "en-US";
417
+ }
418
+ return {
419
+ locale,
420
+ dir: isRTL(locale) ? "rtl" : "ltr"
421
+ };
422
+ }
423
+
424
+ //#endregion
425
+ //#region src/shared/i18n-utils/track-locale.ts
426
+ function trackLocale(options = {}) {
427
+ const { getRootNode, onLocaleChange } = options;
428
+ onLocaleChange?.(getDefaultLocale());
429
+ const handleLocaleChange = () => {
430
+ onLocaleChange?.(getDefaultLocale());
431
+ };
432
+ const win = getRootNode ? require_dom_query.getWindow(getRootNode()) : window;
433
+ win.addEventListener("languagechange", handleLocaleChange);
434
+ return () => {
435
+ win.removeEventListener("languagechange", handleLocaleChange);
436
+ };
437
+ }
438
+
439
+ //#endregion
440
+ Object.defineProperty(exports, 'createCollator', {
441
+ enumerable: true,
442
+ get: function () {
443
+ return createCollator;
444
+ }
445
+ });
446
+ Object.defineProperty(exports, 'createFilter', {
447
+ enumerable: true,
448
+ get: function () {
449
+ return createFilter;
450
+ }
451
+ });
452
+ Object.defineProperty(exports, 'formatBytes', {
453
+ enumerable: true,
454
+ get: function () {
455
+ return formatBytes;
456
+ }
457
+ });
458
+ Object.defineProperty(exports, 'formatDate', {
459
+ enumerable: true,
460
+ get: function () {
461
+ return formatDate;
462
+ }
463
+ });
464
+ Object.defineProperty(exports, 'formatList', {
465
+ enumerable: true,
466
+ get: function () {
467
+ return formatList;
468
+ }
469
+ });
470
+ Object.defineProperty(exports, 'formatNumber', {
471
+ enumerable: true,
472
+ get: function () {
473
+ return formatNumber;
474
+ }
475
+ });
476
+ Object.defineProperty(exports, 'formatRelativeTime', {
477
+ enumerable: true,
478
+ get: function () {
479
+ return formatRelativeTime;
480
+ }
481
+ });
482
+ Object.defineProperty(exports, 'getDefaultLocale', {
483
+ enumerable: true,
484
+ get: function () {
485
+ return getDefaultLocale;
486
+ }
487
+ });
488
+ Object.defineProperty(exports, 'getLocaleDir', {
489
+ enumerable: true,
490
+ get: function () {
491
+ return getLocaleDir;
492
+ }
493
+ });
494
+ Object.defineProperty(exports, 'isRTL', {
495
+ enumerable: true,
496
+ get: function () {
497
+ return isRTL;
498
+ }
499
+ });
500
+ Object.defineProperty(exports, 'trackLocale', {
501
+ enumerable: true,
502
+ get: function () {
503
+ return trackLocale;
504
+ }
505
+ });