yummies 5.7.1 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/async.js +26 -59
  2. package/async.js.map +1 -0
  3. package/common.d.ts +1 -1
  4. package/common.d.ts.map +1 -1
  5. package/common.js +5 -13
  6. package/common.js.map +1 -0
  7. package/complex/global-config.d.ts +1 -1
  8. package/complex/global-config.d.ts.map +1 -1
  9. package/complex/index.d.ts +3 -3
  10. package/complex/index.d.ts.map +1 -1
  11. package/complex/modules-factory.d.ts +1 -1
  12. package/complex/modules-factory.d.ts.map +1 -1
  13. package/complex.js +66 -0
  14. package/complex.js.map +1 -0
  15. package/cookie.d.ts +1 -1
  16. package/cookie.d.ts.map +1 -1
  17. package/cookie.js +4 -8
  18. package/cookie.js.map +1 -0
  19. package/css.d.ts +1 -1
  20. package/css.js +2780 -49
  21. package/css.js.map +1 -0
  22. package/data.js +32 -50
  23. package/data.js.map +1 -0
  24. package/date-time.d.ts +2 -3
  25. package/date-time.d.ts.map +1 -1
  26. package/date-time.js +588 -154
  27. package/date-time.js.map +1 -0
  28. package/device.js +23 -20
  29. package/device.js.map +1 -0
  30. package/encodings.js +269 -265
  31. package/encodings.js.map +1 -0
  32. package/errors.d.ts +1 -1
  33. package/errors.d.ts.map +1 -1
  34. package/errors.js +8 -29
  35. package/errors.js.map +1 -0
  36. package/file.js +19 -23
  37. package/file.js.map +1 -0
  38. package/format/_exports.d.ts +4 -4
  39. package/format/_exports.d.ts.map +1 -1
  40. package/format/index.d.ts +1 -1
  41. package/format/index.d.ts.map +1 -1
  42. package/format/number.d.ts +1 -1
  43. package/format/number.d.ts.map +1 -1
  44. package/format/percent.d.ts +2 -2
  45. package/format/percent.d.ts.map +1 -1
  46. package/format.js +27 -0
  47. package/format.js.map +1 -0
  48. package/html.d.ts +2 -2
  49. package/html.d.ts.map +1 -1
  50. package/html.js +636 -169
  51. package/html.js.map +1 -0
  52. package/id.js +25 -70
  53. package/id.js.map +1 -0
  54. package/imports.js +22 -37
  55. package/imports.js.map +1 -0
  56. package/math.d.ts +1 -1
  57. package/math.d.ts.map +1 -1
  58. package/math.js +10 -14
  59. package/math.js.map +1 -0
  60. package/media.js +54 -96
  61. package/media.js.map +1 -0
  62. package/mobx/apply-observable.d.ts +1 -1
  63. package/mobx/apply-observable.d.ts.map +1 -1
  64. package/mobx/create-enhanced-atom.d.ts +2 -2
  65. package/mobx/create-enhanced-atom.d.ts.map +1 -1
  66. package/mobx/deep-observable-struct.d.ts +1 -1
  67. package/mobx/deep-observable-struct.d.ts.map +1 -1
  68. package/mobx/get-mobx-administration.d.ts +2 -2
  69. package/mobx/get-mobx-administration.d.ts.map +1 -1
  70. package/mobx/index.d.ts +5 -5
  71. package/mobx/index.d.ts.map +1 -1
  72. package/mobx.js +89 -0
  73. package/mobx.js.map +1 -0
  74. package/ms.js +12 -17
  75. package/ms.js.map +1 -0
  76. package/number.js +9 -12
  77. package/number.js.map +1 -0
  78. package/package.json +93 -92
  79. package/parser/_exports.d.ts +3 -3
  80. package/parser/_exports.d.ts.map +1 -1
  81. package/parser/index.d.ts +1 -1
  82. package/parser/index.d.ts.map +1 -1
  83. package/parser/number.d.ts +1 -1
  84. package/parser/number.d.ts.map +1 -1
  85. package/parser/percent.d.ts +2 -2
  86. package/parser/percent.d.ts.map +1 -1
  87. package/parser/string.d.ts +1 -1
  88. package/parser/string.d.ts.map +1 -1
  89. package/parser.js +15 -0
  90. package/parser.js.map +1 -0
  91. package/price.js +13 -16
  92. package/price.js.map +1 -0
  93. package/random.js +11 -13
  94. package/random.js.map +1 -0
  95. package/react/hooks/index.d.ts +21 -21
  96. package/react/hooks/index.d.ts.map +1 -1
  97. package/react/hooks/use-click-outside.d.ts +1 -1
  98. package/react/hooks/use-define-ref.d.ts +1 -1
  99. package/react/hooks/use-element-ref.d.ts +1 -1
  100. package/react/hooks/use-event.d.ts +1 -1
  101. package/react/hooks/use-event.d.ts.map +1 -1
  102. package/react/hooks/use-initial-height.d.ts +1 -1
  103. package/react/hooks/use-last-value-ref.d.ts +1 -1
  104. package/react/hooks/use-resize-observer.d.ts +1 -1
  105. package/react/hooks/use-sync-ref.d.ts +1 -1
  106. package/react/hooks/use-toggle.d.ts +1 -1
  107. package/react/hooks/use-value.d.ts +1 -1
  108. package/react/index.d.ts +1 -1
  109. package/react/index.d.ts.map +1 -1
  110. package/react.js +152 -0
  111. package/react.js.map +1 -0
  112. package/sound.js +7 -11
  113. package/sound.js.map +1 -0
  114. package/text.js +20 -46
  115. package/text.js.map +1 -0
  116. package/type-guard/_exports.d.ts +1 -1
  117. package/type-guard/_exports.d.ts.map +1 -1
  118. package/type-guard/index.d.ts +1 -1
  119. package/type-guard/index.d.ts.map +1 -1
  120. package/type-guard.js +5 -0
  121. package/type-guard.js.map +1 -0
  122. package/utility-types.d.ts.map +1 -0
  123. package/utility-types.js +2 -0
  124. package/utility-types.js.map +1 -0
  125. package/utils/types.js +2 -1
  126. package/utils/types.js.map +1 -0
  127. package/vibrate.js +6 -7
  128. package/vibrate.js.map +1 -0
  129. package/~index-C3wKHvHr.js +80 -0
  130. package/~index-C3wKHvHr.js.map +1 -0
  131. package/~number-EWff2XI6.js +25 -0
  132. package/~number-EWff2XI6.js.map +1 -0
  133. package/~number-baxVnzrJ.js +32 -0
  134. package/~number-baxVnzrJ.js.map +1 -0
  135. package/async.cjs +0 -70
  136. package/async.d.cts +0 -28
  137. package/async.d.cts.map +0 -1
  138. package/common.cjs +0 -18
  139. package/common.d.cts +0 -15
  140. package/common.d.cts.map +0 -1
  141. package/complex/counter.cjs +0 -21
  142. package/complex/counter.d.cts +0 -15
  143. package/complex/counter.d.cts.map +0 -1
  144. package/complex/counter.js +0 -17
  145. package/complex/global-config.cjs +0 -46
  146. package/complex/global-config.d.cts +0 -11
  147. package/complex/global-config.d.cts.map +0 -1
  148. package/complex/global-config.js +0 -41
  149. package/complex/index.cjs +0 -19
  150. package/complex/index.d.cts +0 -4
  151. package/complex/index.d.cts.map +0 -1
  152. package/complex/index.js +0 -3
  153. package/complex/modules-factory.cjs +0 -50
  154. package/complex/modules-factory.d.cts +0 -49
  155. package/complex/modules-factory.d.cts.map +0 -1
  156. package/complex/modules-factory.js +0 -46
  157. package/cookie.cjs +0 -13
  158. package/cookie.d.cts +0 -3
  159. package/cookie.d.cts.map +0 -1
  160. package/css.cjs +0 -64
  161. package/css.d.cts +0 -42
  162. package/css.d.cts.map +0 -1
  163. package/data.cjs +0 -58
  164. package/data.d.cts +0 -4
  165. package/data.d.cts.map +0 -1
  166. package/date-time.cjs +0 -171
  167. package/date-time.d.cts +0 -28
  168. package/date-time.d.cts.map +0 -1
  169. package/device.cjs +0 -28
  170. package/device.d.cts +0 -8
  171. package/device.d.cts.map +0 -1
  172. package/encodings.cjs +0 -270
  173. package/encodings.d.cts +0 -2
  174. package/encodings.d.cts.map +0 -1
  175. package/errors.cjs +0 -34
  176. package/errors.d.cts +0 -19
  177. package/errors.d.cts.map +0 -1
  178. package/file.cjs +0 -29
  179. package/file.d.cts +0 -3
  180. package/file.d.cts.map +0 -1
  181. package/format/_exports.cjs +0 -20
  182. package/format/_exports.d.cts +0 -5
  183. package/format/_exports.d.cts.map +0 -1
  184. package/format/_exports.js +0 -4
  185. package/format/constants.cjs +0 -6
  186. package/format/constants.d.cts +0 -4
  187. package/format/constants.d.cts.map +0 -1
  188. package/format/constants.js +0 -3
  189. package/format/index.cjs +0 -40
  190. package/format/index.d.cts +0 -3
  191. package/format/index.d.cts.map +0 -1
  192. package/format/index.js +0 -4
  193. package/format/number.cjs +0 -48
  194. package/format/number.d.cts +0 -36
  195. package/format/number.d.cts.map +0 -1
  196. package/format/number.js +0 -44
  197. package/format/percent.cjs +0 -27
  198. package/format/percent.d.cts +0 -15
  199. package/format/percent.d.cts.map +0 -1
  200. package/format/percent.js +0 -23
  201. package/format/skip-spaces.cjs +0 -8
  202. package/format/skip-spaces.d.cts +0 -5
  203. package/format/skip-spaces.d.cts.map +0 -1
  204. package/format/skip-spaces.js +0 -4
  205. package/html.cjs +0 -202
  206. package/html.d.cts +0 -44
  207. package/html.d.cts.map +0 -1
  208. package/id.cjs +0 -76
  209. package/id.d.cts +0 -63
  210. package/id.d.cts.map +0 -1
  211. package/imports.cjs +0 -45
  212. package/imports.d.cts +0 -15
  213. package/imports.d.cts.map +0 -1
  214. package/math.cjs +0 -23
  215. package/math.d.cts +0 -13
  216. package/math.d.cts.map +0 -1
  217. package/media.cjs +0 -115
  218. package/media.d.cts +0 -20
  219. package/media.d.cts.map +0 -1
  220. package/mobx/apply-observable.cjs +0 -16
  221. package/mobx/apply-observable.d.cts +0 -4
  222. package/mobx/apply-observable.d.cts.map +0 -1
  223. package/mobx/apply-observable.js +0 -12
  224. package/mobx/create-enhanced-atom.cjs +0 -16
  225. package/mobx/create-enhanced-atom.d.cts +0 -11
  226. package/mobx/create-enhanced-atom.d.cts.map +0 -1
  227. package/mobx/create-enhanced-atom.js +0 -12
  228. package/mobx/deep-observable-struct.cjs +0 -61
  229. package/mobx/deep-observable-struct.d.cts +0 -7
  230. package/mobx/deep-observable-struct.d.cts.map +0 -1
  231. package/mobx/deep-observable-struct.js +0 -57
  232. package/mobx/get-mobx-administration.cjs +0 -6
  233. package/mobx/get-mobx-administration.d.cts +0 -6
  234. package/mobx/get-mobx-administration.d.cts.map +0 -1
  235. package/mobx/get-mobx-administration.js +0 -2
  236. package/mobx/index.cjs +0 -21
  237. package/mobx/index.d.cts +0 -6
  238. package/mobx/index.d.cts.map +0 -1
  239. package/mobx/index.js +0 -5
  240. package/mobx/lazy-observe.cjs +0 -66
  241. package/mobx/lazy-observe.d.cts +0 -14
  242. package/mobx/lazy-observe.d.cts.map +0 -1
  243. package/mobx/lazy-observe.js +0 -62
  244. package/ms.cjs +0 -22
  245. package/ms.d.cts +0 -19
  246. package/ms.d.cts.map +0 -1
  247. package/number.cjs +0 -16
  248. package/number.d.cts +0 -8
  249. package/number.d.cts.map +0 -1
  250. package/parser/_exports.cjs +0 -19
  251. package/parser/_exports.d.cts +0 -4
  252. package/parser/_exports.d.cts.map +0 -1
  253. package/parser/_exports.js +0 -3
  254. package/parser/index.cjs +0 -40
  255. package/parser/index.d.cts +0 -3
  256. package/parser/index.d.cts.map +0 -1
  257. package/parser/index.js +0 -4
  258. package/parser/number.cjs +0 -48
  259. package/parser/number.d.cts +0 -21
  260. package/parser/number.d.cts.map +0 -1
  261. package/parser/number.js +0 -44
  262. package/parser/percent.cjs +0 -8
  263. package/parser/percent.d.cts +0 -4
  264. package/parser/percent.d.cts.map +0 -1
  265. package/parser/percent.js +0 -4
  266. package/parser/string.cjs +0 -18
  267. package/parser/string.d.cts +0 -7
  268. package/parser/string.d.cts.map +0 -1
  269. package/parser/string.js +0 -14
  270. package/price.cjs +0 -21
  271. package/price.d.cts +0 -6
  272. package/price.d.cts.map +0 -1
  273. package/random.cjs +0 -25
  274. package/random.d.cts +0 -9
  275. package/random.d.cts.map +0 -1
  276. package/react/hooks/index.cjs +0 -37
  277. package/react/hooks/index.d.cts +0 -22
  278. package/react/hooks/index.d.cts.map +0 -1
  279. package/react/hooks/index.js +0 -21
  280. package/react/hooks/use-abort-controller.cjs +0 -15
  281. package/react/hooks/use-abort-controller.d.cts +0 -2
  282. package/react/hooks/use-abort-controller.d.cts.map +0 -1
  283. package/react/hooks/use-abort-controller.js +0 -11
  284. package/react/hooks/use-abort-signal.cjs +0 -8
  285. package/react/hooks/use-abort-signal.d.cts +0 -2
  286. package/react/hooks/use-abort-signal.d.cts.map +0 -1
  287. package/react/hooks/use-abort-signal.js +0 -4
  288. package/react/hooks/use-click-outside.cjs +0 -17
  289. package/react/hooks/use-click-outside.d.cts +0 -9
  290. package/react/hooks/use-click-outside.d.cts.map +0 -1
  291. package/react/hooks/use-click-outside.js +0 -13
  292. package/react/hooks/use-constant.cjs +0 -19
  293. package/react/hooks/use-constant.d.cts +0 -9
  294. package/react/hooks/use-constant.d.cts.map +0 -1
  295. package/react/hooks/use-constant.js +0 -15
  296. package/react/hooks/use-define-ref.cjs +0 -19
  297. package/react/hooks/use-define-ref.d.cts +0 -10
  298. package/react/hooks/use-define-ref.d.cts.map +0 -1
  299. package/react/hooks/use-define-ref.js +0 -15
  300. package/react/hooks/use-element-ref.cjs +0 -12
  301. package/react/hooks/use-element-ref.d.cts +0 -2
  302. package/react/hooks/use-element-ref.d.cts.map +0 -1
  303. package/react/hooks/use-element-ref.js +0 -8
  304. package/react/hooks/use-event-listener.cjs +0 -17
  305. package/react/hooks/use-event-listener.d.cts +0 -8
  306. package/react/hooks/use-event-listener.d.cts.map +0 -1
  307. package/react/hooks/use-event-listener.js +0 -13
  308. package/react/hooks/use-event.cjs +0 -23
  309. package/react/hooks/use-event.d.cts +0 -3
  310. package/react/hooks/use-event.d.cts.map +0 -1
  311. package/react/hooks/use-event.js +0 -19
  312. package/react/hooks/use-flag.cjs +0 -19
  313. package/react/hooks/use-flag.d.cts +0 -8
  314. package/react/hooks/use-flag.d.cts.map +0 -1
  315. package/react/hooks/use-flag.js +0 -15
  316. package/react/hooks/use-force-update.cjs +0 -11
  317. package/react/hooks/use-force-update.d.cts +0 -2
  318. package/react/hooks/use-force-update.d.cts.map +0 -1
  319. package/react/hooks/use-force-update.js +0 -7
  320. package/react/hooks/use-initial-height.cjs +0 -15
  321. package/react/hooks/use-initial-height.d.cts +0 -5
  322. package/react/hooks/use-initial-height.d.cts.map +0 -1
  323. package/react/hooks/use-initial-height.js +0 -11
  324. package/react/hooks/use-instance.cjs +0 -31
  325. package/react/hooks/use-instance.d.cts +0 -27
  326. package/react/hooks/use-instance.d.cts.map +0 -1
  327. package/react/hooks/use-instance.js +0 -27
  328. package/react/hooks/use-intersection-observer.cjs +0 -14
  329. package/react/hooks/use-intersection-observer.d.cts +0 -2
  330. package/react/hooks/use-intersection-observer.d.cts.map +0 -1
  331. package/react/hooks/use-intersection-observer.js +0 -10
  332. package/react/hooks/use-last-defined-value.cjs +0 -12
  333. package/react/hooks/use-last-defined-value.d.cts +0 -2
  334. package/react/hooks/use-last-defined-value.d.cts.map +0 -1
  335. package/react/hooks/use-last-defined-value.js +0 -8
  336. package/react/hooks/use-last-value-ref.cjs +0 -12
  337. package/react/hooks/use-last-value-ref.d.cts +0 -2
  338. package/react/hooks/use-last-value-ref.d.cts.map +0 -1
  339. package/react/hooks/use-last-value-ref.js +0 -8
  340. package/react/hooks/use-life-cycle.cjs +0 -14
  341. package/react/hooks/use-life-cycle.d.cts +0 -5
  342. package/react/hooks/use-life-cycle.d.cts.map +0 -1
  343. package/react/hooks/use-life-cycle.js +0 -10
  344. package/react/hooks/use-resize-observer.cjs +0 -15
  345. package/react/hooks/use-resize-observer.d.cts +0 -2
  346. package/react/hooks/use-resize-observer.d.cts.map +0 -1
  347. package/react/hooks/use-resize-observer.js +0 -11
  348. package/react/hooks/use-sync-ref.cjs +0 -10
  349. package/react/hooks/use-sync-ref.d.cts +0 -2
  350. package/react/hooks/use-sync-ref.d.cts.map +0 -1
  351. package/react/hooks/use-sync-ref.js +0 -6
  352. package/react/hooks/use-toggle.cjs +0 -10
  353. package/react/hooks/use-toggle.d.cts +0 -2
  354. package/react/hooks/use-toggle.d.cts.map +0 -1
  355. package/react/hooks/use-toggle.js +0 -6
  356. package/react/hooks/use-value.cjs +0 -12
  357. package/react/hooks/use-value.d.cts +0 -5
  358. package/react/hooks/use-value.d.cts.map +0 -1
  359. package/react/hooks/use-value.js +0 -8
  360. package/react/hooks/use-visibility-state.cjs +0 -18
  361. package/react/hooks/use-visibility-state.d.cts +0 -2
  362. package/react/hooks/use-visibility-state.d.cts.map +0 -1
  363. package/react/hooks/use-visibility-state.js +0 -14
  364. package/react/index.cjs +0 -17
  365. package/react/index.d.cts +0 -2
  366. package/react/index.d.cts.map +0 -1
  367. package/react/index.js +0 -1
  368. package/sound.cjs +0 -16
  369. package/sound.d.cts +0 -7
  370. package/sound.d.cts.map +0 -1
  371. package/storage.cjs +0 -48
  372. package/storage.d.cts +0 -39
  373. package/storage.d.cts.map +0 -1
  374. package/storage.js +0 -43
  375. package/text.cjs +0 -53
  376. package/text.d.cts +0 -15
  377. package/text.d.cts.map +0 -1
  378. package/type-guard/_exports.cjs +0 -129
  379. package/type-guard/_exports.d.cts +0 -86
  380. package/type-guard/_exports.d.cts.map +0 -1
  381. package/type-guard/_exports.js +0 -125
  382. package/type-guard/index.cjs +0 -40
  383. package/type-guard/index.d.cts +0 -3
  384. package/type-guard/index.d.cts.map +0 -1
  385. package/type-guard/index.js +0 -4
  386. package/utils/types.cjs +0 -2
  387. package/utils/types.d.cts +0 -395
  388. package/utils/types.d.cts.map +0 -1
  389. package/vibrate.cjs +0 -12
  390. package/vibrate.d.cts +0 -5
  391. package/vibrate.d.cts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yummies",
3
- "version": "5.7.1",
3
+ "version": "5.8.0",
4
4
  "keywords": [
5
5
  "javascript",
6
6
  "typescript",
@@ -47,174 +47,175 @@
47
47
  "@vitest/coverage-istanbul": "^3.1.2",
48
48
  "commitfmt": "^1.0.4",
49
49
  "js2me-biome-config": "^1.0.3",
50
- "sborshik": "^1.0.10",
51
50
  "jsdom": "^26.1.0",
52
51
  "lefthook": "^1.11.16",
53
52
  "nodemon": "^3.1.9",
54
53
  "rimraf": "^6.0.1",
54
+ "sborshik": "^1.0.22",
55
55
  "tsx": "^4.20.5",
56
56
  "typescript": "^5.8.3",
57
+ "vite": "^7.1.9",
58
+ "vite-plugin-dts": "^4.5.4",
57
59
  "vitest": "^3.1.2",
58
60
  "zshy": "^0.4.2"
59
61
  },
60
62
  "type": "module",
61
- "files": [
62
- "*"
63
- ],
64
63
  "exports": {
65
- "./package.json": "./package.json",
66
- "./complex": {
67
- "types": "./complex/index.d.cts",
68
- "import": "./complex/index.js",
69
- "require": "./complex/index.cjs"
70
- },
71
- "./format": {
72
- "types": "./format/index.d.cts",
73
- "import": "./format/index.js",
74
- "require": "./format/index.cjs"
75
- },
76
- "./mobx": {
77
- "types": "./mobx/index.d.cts",
78
- "import": "./mobx/index.js",
79
- "require": "./mobx/index.cjs"
80
- },
81
- "./parser": {
82
- "types": "./parser/index.d.cts",
83
- "import": "./parser/index.js",
84
- "require": "./parser/index.cjs"
85
- },
86
- "./react": {
87
- "types": "./react/index.d.cts",
88
- "import": "./react/index.js",
89
- "require": "./react/index.cjs"
90
- },
91
- "./type-guard": {
92
- "types": "./type-guard/index.d.cts",
93
- "import": "./type-guard/index.js",
94
- "require": "./type-guard/index.cjs"
95
- },
96
- "./utils/types": {
97
- "types": "./utils/types.d.cts",
98
- "import": "./utils/types.js",
99
- "require": "./utils/types.cjs"
100
- },
101
64
  "./async": {
102
- "types": "./async.d.cts",
103
65
  "import": "./async.js",
104
- "require": "./async.cjs"
66
+ "default": "./async.js",
67
+ "types": "./async.d.ts"
105
68
  },
106
69
  "./common": {
107
- "types": "./common.d.cts",
108
70
  "import": "./common.js",
109
- "require": "./common.cjs"
71
+ "default": "./common.js",
72
+ "types": "./common.d.ts"
73
+ },
74
+ "./complex": {
75
+ "import": "./complex.js",
76
+ "default": "./complex.js",
77
+ "types": "./complex/index.d.ts"
110
78
  },
111
79
  "./cookie": {
112
- "types": "./cookie.d.cts",
113
80
  "import": "./cookie.js",
114
- "require": "./cookie.cjs"
81
+ "default": "./cookie.js",
82
+ "types": "./cookie.d.ts"
115
83
  },
116
84
  "./css": {
117
- "types": "./css.d.cts",
118
85
  "import": "./css.js",
119
- "require": "./css.cjs"
86
+ "default": "./css.js",
87
+ "types": "./css.d.ts"
120
88
  },
121
89
  "./data": {
122
- "types": "./data.d.cts",
123
90
  "import": "./data.js",
124
- "require": "./data.cjs"
91
+ "default": "./data.js",
92
+ "types": "./data.d.ts"
125
93
  },
126
94
  "./date-time": {
127
- "types": "./date-time.d.cts",
128
95
  "import": "./date-time.js",
129
- "require": "./date-time.cjs"
96
+ "default": "./date-time.js",
97
+ "types": "./date-time.d.ts"
130
98
  },
131
99
  "./device": {
132
- "types": "./device.d.cts",
133
100
  "import": "./device.js",
134
- "require": "./device.cjs"
101
+ "default": "./device.js",
102
+ "types": "./device.d.ts"
135
103
  },
136
104
  "./encodings": {
137
- "types": "./encodings.d.cts",
138
105
  "import": "./encodings.js",
139
- "require": "./encodings.cjs"
106
+ "default": "./encodings.js",
107
+ "types": "./encodings.d.ts"
140
108
  },
141
109
  "./errors": {
142
- "types": "./errors.d.cts",
143
110
  "import": "./errors.js",
144
- "require": "./errors.cjs"
111
+ "default": "./errors.js",
112
+ "types": "./errors.d.ts"
145
113
  },
146
114
  "./file": {
147
- "types": "./file.d.cts",
148
115
  "import": "./file.js",
149
- "require": "./file.cjs"
116
+ "default": "./file.js",
117
+ "types": "./file.d.ts"
118
+ },
119
+ "./format": {
120
+ "import": "./format.js",
121
+ "default": "./format.js",
122
+ "types": "./format/index.d.ts"
150
123
  },
151
124
  "./html": {
152
- "types": "./html.d.cts",
153
125
  "import": "./html.js",
154
- "require": "./html.cjs"
126
+ "default": "./html.js",
127
+ "types": "./html.d.ts"
155
128
  },
156
129
  "./id": {
157
- "types": "./id.d.cts",
158
130
  "import": "./id.js",
159
- "require": "./id.cjs"
131
+ "default": "./id.js",
132
+ "types": "./id.d.ts"
160
133
  },
161
134
  "./imports": {
162
- "types": "./imports.d.cts",
163
135
  "import": "./imports.js",
164
- "require": "./imports.cjs"
136
+ "default": "./imports.js",
137
+ "types": "./imports.d.ts"
165
138
  },
166
139
  "./math": {
167
- "types": "./math.d.cts",
168
140
  "import": "./math.js",
169
- "require": "./math.cjs"
141
+ "default": "./math.js",
142
+ "types": "./math.d.ts"
170
143
  },
171
144
  "./media": {
172
- "types": "./media.d.cts",
173
145
  "import": "./media.js",
174
- "require": "./media.cjs"
146
+ "default": "./media.js",
147
+ "types": "./media.d.ts"
148
+ },
149
+ "./mobx": {
150
+ "import": "./mobx.js",
151
+ "default": "./mobx.js",
152
+ "types": "./mobx/index.d.ts"
175
153
  },
176
154
  "./ms": {
177
- "types": "./ms.d.cts",
178
155
  "import": "./ms.js",
179
- "require": "./ms.cjs"
156
+ "default": "./ms.js",
157
+ "types": "./ms.d.ts"
180
158
  },
181
159
  "./number": {
182
- "types": "./number.d.cts",
183
160
  "import": "./number.js",
184
- "require": "./number.cjs"
161
+ "default": "./number.js",
162
+ "types": "./number.d.ts"
163
+ },
164
+ "./parser": {
165
+ "import": "./parser.js",
166
+ "default": "./parser.js",
167
+ "types": "./parser/index.d.ts"
185
168
  },
186
169
  "./price": {
187
- "types": "./price.d.cts",
188
170
  "import": "./price.js",
189
- "require": "./price.cjs"
171
+ "default": "./price.js",
172
+ "types": "./price.d.ts"
190
173
  },
191
174
  "./random": {
192
- "types": "./random.d.cts",
193
175
  "import": "./random.js",
194
- "require": "./random.cjs"
176
+ "default": "./random.js",
177
+ "types": "./random.d.ts"
178
+ },
179
+ "./react": {
180
+ "import": "./react.js",
181
+ "default": "./react.js",
182
+ "types": "./react/index.d.ts"
195
183
  },
196
184
  "./sound": {
197
- "types": "./sound.d.cts",
198
185
  "import": "./sound.js",
199
- "require": "./sound.cjs"
200
- },
201
- "./storage": {
202
- "types": "./storage.d.cts",
203
- "import": "./storage.js",
204
- "require": "./storage.cjs"
186
+ "default": "./sound.js",
187
+ "types": "./sound.d.ts"
205
188
  },
206
189
  "./text": {
207
- "types": "./text.d.cts",
208
190
  "import": "./text.js",
209
- "require": "./text.cjs"
191
+ "default": "./text.js",
192
+ "types": "./text.d.ts"
193
+ },
194
+ "./type-guard": {
195
+ "import": "./type-guard.js",
196
+ "default": "./type-guard.js",
197
+ "types": "./type-guard/index.d.ts"
198
+ },
199
+ "./utility-types": {
200
+ "import": "./utility-types.js",
201
+ "default": "./utility-types.js",
202
+ "types": "./utility-types.d.ts"
203
+ },
204
+ "./utils/types": {
205
+ "import": "./utils/types.js",
206
+ "default": "./utils/types.js",
207
+ "types": "./utils/types.d.ts"
210
208
  },
211
209
  "./vibrate": {
212
- "types": "./vibrate.d.cts",
213
210
  "import": "./vibrate.js",
214
- "require": "./vibrate.cjs"
211
+ "default": "./vibrate.js",
212
+ "types": "./vibrate.d.ts"
215
213
  },
216
- "./utility-types": "./utility-types.d.ts"
214
+ "./package.json": "./package.json"
217
215
  },
216
+ "files": [
217
+ "*"
218
+ ],
218
219
  "scripts": {
219
220
  "clean": "rm -rf dist",
220
221
  "lint:check": "pnpm exec biome check --write --no-errors-on-unmatched --files-ignore-unknown=true",
@@ -222,7 +223,7 @@
222
223
  "check": "npm run lint:check && npm run ts:check",
223
224
  "prebuild": "npm run clean && npm run check",
224
225
  "build:watch": "pnpm build && nodemon --watch src --ext ts --exec \"pnpm build\"",
225
- "build": "sborshik build --fillDist && tsx scripts/generate-utility-types-file",
226
+ "build": "vite build && tsx scripts/prepare-dist && tsx scripts/generate-utility-types-file",
226
227
  "pub": "pnpm build && sborshik publish --useDistDir",
227
228
  "pub:patch": "PUBLISH_VERSION=patch pnpm pub",
228
229
  "pub:minor": "PUBLISH_VERSION=minor pnpm pub",
@@ -1,4 +1,4 @@
1
- export * from "./number.js";
2
- export * from "./percent.js";
3
- export * from "./string.js";
1
+ export * from './number.js';
2
+ export * from './percent.js';
3
+ export * from './string.js';
4
4
  //# sourceMappingURL=_exports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_exports.d.ts","sourceRoot":"","sources":["../../src/parser/_exports.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,6BAA6B;AAC7B,4BAA4B"}
1
+ {"version":3,"file":"_exports.d.ts","sourceRoot":"","sources":["../../src/parser/_exports.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
package/parser/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import * as parser from "./_exports.js";
1
+ import * as parser from './_exports.js';
2
2
  export { parser };
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,sBAAsB;AAExC,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Maybe } from "../utils/types.js";
1
+ import { Maybe } from '../utils/types.ts';
2
2
  export interface NumberParserSettings<TFallback = number> {
3
3
  digits?: number;
4
4
  fallback?: TFallback;
@@ -1 +1 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/parser/number.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B;AAE/C,MAAM,WAAW,oBAAoB,CAAC,SAAS,GAAG,MAAM;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,MAAM;KAAI,SAAS,kBACvB,KAAK,CAAC,OAAO,CAAC,iBACN,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,GACpD,MAAM,GAAG,SAAS;;CA+CpB,CAAC"}
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/parser/number.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,WAAW,oBAAoB,CAAC,SAAS,GAAG,MAAM;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,MAAM;KAAI,SAAS,kBACvB,KAAK,CAAC,OAAO,CAAC,iBACN,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,GACpD,MAAM,GAAG,SAAS;;CA+CpB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Maybe } from "../utils/types.js";
2
- import { type NumberParserSettings } from "./number.js";
1
+ import { Maybe } from '../utils/types.ts';
2
+ import { NumberParserSettings } from './number.js';
3
3
  export declare const percent: <TFallback = number>(value: Maybe<string | number>, maxValue?: Maybe<string | number>, settings?: Maybe<NumberParserSettings<TFallback>>) => number | TFallback;
4
4
  //# sourceMappingURL=percent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"percent.d.ts","sourceRoot":"","sources":["../../src/parser/percent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B;AAE/C,OAAO,EAAE,KAAK,oBAAoB,EAAU,oBAAoB;AAEhE,eAAO,MAAM,OAAO,GAAI,SAAS,GAAG,MAAM,EACxC,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAC7B,WAAW,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EACjC,WAAW,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,uBAGlD,CAAC"}
1
+ {"version":3,"file":"percent.d.ts","sourceRoot":"","sources":["../../src/parser/percent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,KAAK,oBAAoB,EAAU,MAAM,aAAa,CAAC;AAEhE,eAAO,MAAM,OAAO,GAAI,SAAS,GAAG,MAAM,EACxC,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAC7B,WAAW,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EACjC,WAAW,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,uBAGlD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Maybe } from "../utils/types.js";
1
+ import { Maybe } from '../utils/types.ts';
2
2
  export interface StringParserSettings<TFallback = string> {
3
3
  fallback?: TFallback;
4
4
  prettyJson?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/parser/string.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B;AAE/C,MAAM,WAAW,oBAAoB,CAAC,SAAS,GAAG,MAAM;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,MAAM,GAAI,SAAS,GAAG,MAAM,EACvC,OAAO,KAAK,CAAC,OAAO,CAAC,EACrB,WAAW,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAChD,MAAM,GAAG,SAiBX,CAAC"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/parser/string.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,WAAW,oBAAoB,CAAC,SAAS,GAAG,MAAM;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,MAAM,GAAI,SAAS,GAAG,MAAM,EACvC,OAAO,KAAK,CAAC,OAAO,CAAC,EACrB,WAAW,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,KAChD,MAAM,GAAG,SAiBX,CAAC"}
package/parser.js ADDED
@@ -0,0 +1,15 @@
1
+ import { n as o } from "./~number-EWff2XI6.js";
2
+ import { typeGuard as n } from "yummies/type-guard";
3
+ const l = (r, e, t) => o(Number(r) / Number(e) * 100, t), a = (r, e) => {
4
+ const t = e && "fallback" in e ? e.fallback : "";
5
+ return r == null ? t : n.isObject(r) ? e?.prettyJson ? JSON.stringify(r, null, 2) : JSON.stringify(r) : String(r);
6
+ }, b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7
+ __proto__: null,
8
+ number: o,
9
+ percent: l,
10
+ string: a
11
+ }, Symbol.toStringTag, { value: "Module" }));
12
+ export {
13
+ b as parser
14
+ };
15
+ //# sourceMappingURL=parser.js.map
package/parser.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sources":["../src/parser/percent.ts","../src/parser/string.ts"],"sourcesContent":["import type { Maybe } from 'yummies/utils/types';\n\nimport { type NumberParserSettings, number } from './number.js';\n\nexport const percent = <TFallback = number>(\n value: Maybe<string | number>,\n maxValue?: Maybe<string | number>,\n settings?: Maybe<NumberParserSettings<TFallback>>,\n) => {\n return number<TFallback>((Number(value) / Number(maxValue)) * 100, settings);\n};\n","import { typeGuard } from 'yummies/type-guard';\nimport type { Maybe } from 'yummies/utils/types';\n\nexport interface StringParserSettings<TFallback = string> {\n fallback?: TFallback;\n prettyJson?: boolean;\n}\n\nexport const string = <TFallback = string>(\n input: Maybe<unknown>,\n settings?: Maybe<StringParserSettings<TFallback>>,\n): string | TFallback => {\n const fallback =\n settings && 'fallback' in settings ? (settings.fallback as TFallback) : '';\n\n if (input == null) {\n return fallback;\n }\n\n if (typeGuard.isObject(input)) {\n if (settings?.prettyJson) {\n return JSON.stringify(input, null, 2);\n }\n\n return JSON.stringify(input);\n }\n\n return String(input);\n};\n"],"names":["percent","value","maxValue","settings","number","string","input","fallback","typeGuard"],"mappings":";;AAIO,MAAMA,IAAU,CACrBC,GACAC,GACAC,MAEOC,EAAmB,OAAOH,CAAK,IAAI,OAAOC,CAAQ,IAAK,KAAKC,CAAQ,GCDhEE,IAAS,CACpBC,GACAH,MACuB;AACvB,QAAMI,IACJJ,KAAY,cAAcA,IAAYA,EAAS,WAAyB;AAE1E,SAAIG,KAAS,OACJC,IAGLC,EAAU,SAASF,CAAK,IACtBH,GAAU,aACL,KAAK,UAAUG,GAAO,MAAM,CAAC,IAG/B,KAAK,UAAUA,CAAK,IAGtB,OAAOA,CAAK;AACrB;;;;;;"}
package/price.js CHANGED
@@ -1,17 +1,14 @@
1
- export const formatPrice = (price, locale, currency, { withoutSymbol, customSymbol, ...options } = {}) => {
2
- const priceFormatter = new Intl.NumberFormat(locale, {
3
- style: 'currency',
4
- currency,
5
- minimumFractionDigits: 0,
6
- currencyDisplay: 'narrowSymbol',
7
- ...options,
8
- });
9
- const zeroPrice = priceFormatter.format(0);
10
- const currencySymbol = zeroPrice.replace('0', '');
11
- const rawPrice = priceFormatter.format(price);
12
- const priceWithoutCurrency = rawPrice.replace(currencySymbol, '');
13
- if (withoutSymbol) {
14
- return priceWithoutCurrency;
15
- }
16
- return `${priceWithoutCurrency} ${customSymbol ?? (currency === 'RUB' ? 'р' : currencySymbol)}`.replace(/\s{2,}/, ' ');
1
+ const u = (o, n, r, { withoutSymbol: i, customSymbol: a, ...m } = {}) => {
2
+ const e = new Intl.NumberFormat(n, {
3
+ style: "currency",
4
+ currency: r,
5
+ minimumFractionDigits: 0,
6
+ currencyDisplay: "narrowSymbol",
7
+ ...m
8
+ }), c = e.format(0).replace("0", ""), t = e.format(o).replace(c, "");
9
+ return i ? t : `${t} ${a ?? (r === "RUB" ? "р" : c)}`.replace(/\s{2,}/, " ");
17
10
  };
11
+ export {
12
+ u as formatPrice
13
+ };
14
+ //# sourceMappingURL=price.js.map
package/price.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price.js","sources":["../src/price.ts"],"sourcesContent":["export interface PriceFormatOptions\n extends Partial<Omit<Intl.NumberFormatOptions, 'currency'>> {\n withoutSymbol?: boolean;\n customSymbol?: string;\n}\n\nexport const formatPrice = (\n price: number,\n locale: string,\n currency?: string,\n { withoutSymbol, customSymbol, ...options }: PriceFormatOptions = {},\n) => {\n const priceFormatter = new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n minimumFractionDigits: 0,\n currencyDisplay: 'narrowSymbol',\n ...options,\n });\n\n const zeroPrice = priceFormatter.format(0);\n const currencySymbol = zeroPrice.replace('0', '');\n const rawPrice = priceFormatter.format(price);\n const priceWithoutCurrency = rawPrice.replace(currencySymbol, '');\n\n if (withoutSymbol) {\n return priceWithoutCurrency;\n }\n\n return `${priceWithoutCurrency} ${\n customSymbol ?? (currency === 'RUB' ? 'р' : currencySymbol)\n }`.replace(/\\s{2,}/, ' ');\n};\n"],"names":["formatPrice","price","locale","currency","withoutSymbol","customSymbol","options","priceFormatter","currencySymbol","priceWithoutCurrency"],"mappings":"AAMO,MAAMA,IAAc,CACzBC,GACAC,GACAC,GACA,EAAE,eAAAC,GAAe,cAAAC,GAAc,GAAGC,EAAA,IAAgC,OAC/D;AACH,QAAMC,IAAiB,IAAI,KAAK,aAAaL,GAAQ;AAAA,IACnD,OAAO;AAAA,IACP,UAAAC;AAAA,IACA,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,IACjB,GAAGG;AAAA,EAAA,CACJ,GAGKE,IADYD,EAAe,OAAO,CAAC,EACR,QAAQ,KAAK,EAAE,GAE1CE,IADWF,EAAe,OAAON,CAAK,EACN,QAAQO,GAAgB,EAAE;AAEhE,SAAIJ,IACKK,IAGF,GAAGA,CAAoB,IAC5BJ,MAAiBF,MAAa,QAAQ,MAAMK,EAC9C,GAAG,QAAQ,UAAU,GAAG;AAC1B;"}
package/random.js CHANGED
@@ -1,14 +1,12 @@
1
- export const getRandomFloat = (min = 0, max = 1) => (Math.random() * (max - min) + min);
2
- export const getRandomInt = (min = 0, max = 1) => min === max ? min : Math.round(getRandomFloat(min, max));
3
- export const getRandomChoice = (arr) => arr[getRandomInt(0, arr.length - 1)];
4
- export const getRandomSizeArray = (min = 0, max = 10) => Array.from({ length: getRandomInt(min, max) }).fill(null);
5
- export const getRandomBool = () => getRandomInt(0, 1) === 1;
6
- export const getMajorRandomBool = () => {
7
- return getRandomInt(0, 10) <= 6;
8
- };
9
- export const getMinorRandomBool = () => {
10
- return !getMajorRandomBool();
11
- };
12
- export const getFrequencyValue = (frequency) => {
13
- return Math.random() < frequency;
1
+ const e = (o = 0, t = 1) => Math.random() * (t - o) + o, n = (o = 0, t = 1) => o === t ? o : Math.round(e(o, t)), a = (o) => o[n(0, o.length - 1)], l = (o = 0, t = 10) => Array.from({ length: n(o, t) }).fill(null), c = () => n(0, 1) === 1, r = () => n(0, 10) <= 6, d = () => !r(), g = (o) => Math.random() < o;
2
+ export {
3
+ g as getFrequencyValue,
4
+ r as getMajorRandomBool,
5
+ d as getMinorRandomBool,
6
+ c as getRandomBool,
7
+ a as getRandomChoice,
8
+ e as getRandomFloat,
9
+ n as getRandomInt,
10
+ l as getRandomSizeArray
14
11
  };
12
+ //# sourceMappingURL=random.js.map
package/random.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.js","sources":["../src/random.ts"],"sourcesContent":["export const getRandomFloat = <T extends number = number>(\n min = 0,\n max = 1,\n): T => (Math.random() * (max - min) + min) as T;\n\nexport const getRandomInt = <T extends number = number>(min = 0, max = 1): T =>\n min === max ? (min as T) : (Math.round(getRandomFloat(min, max)) as T);\n\nexport const getRandomChoice = <T>(arr: T[]): T =>\n arr[getRandomInt(0, arr.length - 1)];\n\nexport const getRandomSizeArray = (min = 0, max = 10) =>\n Array.from({ length: getRandomInt(min, max) }).fill(null);\n\nexport const getRandomBool = () => getRandomInt(0, 1) === 1;\n\nexport const getMajorRandomBool = () => {\n return getRandomInt(0, 10) <= 6;\n};\n\nexport const getMinorRandomBool = () => {\n return !getMajorRandomBool();\n};\n\nexport const getFrequencyValue = (frequency: number) => {\n return Math.random() < frequency;\n};\n"],"names":["getRandomFloat","min","max","getRandomInt","getRandomChoice","arr","getRandomSizeArray","getRandomBool","getMajorRandomBool","getMinorRandomBool","getFrequencyValue","frequency"],"mappings":"AAAO,MAAMA,IAAiB,CAC5BC,IAAM,GACNC,IAAM,MACC,KAAK,OAAA,KAAYA,IAAMD,KAAOA,GAE1BE,IAAe,CAA4BF,IAAM,GAAGC,IAAM,MACrED,MAAQC,IAAOD,IAAa,KAAK,MAAMD,EAAeC,GAAKC,CAAG,CAAC,GAEpDE,IAAkB,CAAIC,MACjCA,EAAIF,EAAa,GAAGE,EAAI,SAAS,CAAC,CAAC,GAExBC,IAAqB,CAACL,IAAM,GAAGC,IAAM,OAChD,MAAM,KAAK,EAAE,QAAQC,EAAaF,GAAKC,CAAG,GAAG,EAAE,KAAK,IAAI,GAE7CK,IAAgB,MAAMJ,EAAa,GAAG,CAAC,MAAM,GAE7CK,IAAqB,MACzBL,EAAa,GAAG,EAAE,KAAK,GAGnBM,IAAqB,MACzB,CAACD,EAAA,GAGGE,IAAoB,CAACC,MACzB,KAAK,WAAWA;"}
@@ -1,22 +1,22 @@
1
- export * from "./use-abort-controller.js";
2
- export * from "./use-abort-signal.js";
3
- export * from "./use-click-outside.js";
4
- export * from "./use-constant.js";
5
- export * from "./use-define-ref.js";
6
- export * from "./use-element-ref.js";
7
- export * from "./use-event.js";
8
- export * from "./use-event-listener.js";
9
- export * from "./use-flag.js";
10
- export * from "./use-force-update.js";
11
- export * from "./use-initial-height.js";
12
- export * from "./use-instance.js";
13
- export * from "./use-intersection-observer.js";
14
- export * from "./use-last-defined-value.js";
15
- export * from "./use-last-value-ref.js";
16
- export * from "./use-life-cycle.js";
17
- export * from "./use-resize-observer.js";
18
- export * from "./use-sync-ref.js";
19
- export * from "./use-toggle.js";
20
- export * from "./use-value.js";
21
- export * from "./use-visibility-state.js";
1
+ export * from './use-abort-controller.js';
2
+ export * from './use-abort-signal.js';
3
+ export * from './use-click-outside.js';
4
+ export * from './use-constant.js';
5
+ export * from './use-define-ref.js';
6
+ export * from './use-element-ref.js';
7
+ export * from './use-event.js';
8
+ export * from './use-event-listener.js';
9
+ export * from './use-flag.js';
10
+ export * from './use-force-update.js';
11
+ export * from './use-initial-height.js';
12
+ export * from './use-instance.js';
13
+ export * from './use-intersection-observer.js';
14
+ export * from './use-last-defined-value.js';
15
+ export * from './use-last-value-ref.js';
16
+ export * from './use-life-cycle.js';
17
+ export * from './use-resize-observer.js';
18
+ export * from './use-sync-ref.js';
19
+ export * from './use-toggle.js';
20
+ export * from './use-value.js';
21
+ export * from './use-visibility-state.js';
22
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,sCAAsC;AACtC,uCAAuC;AACvC,kCAAkC;AAClC,oCAAoC;AACpC,qCAAqC;AACrC,+BAA+B;AAC/B,wCAAwC;AACxC,8BAA8B;AAC9B,sCAAsC;AACtC,wCAAwC;AACxC,kCAAkC;AAClC,+CAA+C;AAC/C,4CAA4C;AAC5C,wCAAwC;AACxC,oCAAoC;AACpC,yCAAyC;AACzC,kCAAkC;AAClC,gCAAgC;AAChC,+BAA+B;AAC/B,0CAA0C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { MutableRefObject } from 'react';
1
+ import { MutableRefObject } from 'react';
2
2
  type ClickOutsideInput = {
3
3
  contentRef: MutableRefObject<HTMLElement | null>;
4
4
  onClick: VoidFunction;
@@ -1,4 +1,4 @@
1
- import { type MutableRefObject } from 'react';
1
+ import { MutableRefObject } from 'react';
2
2
  /**
3
3
  * React hook for creating a value exactly once.
4
4
  * useMemo doesn't give this guarantee unfortunately -
@@ -1,2 +1,2 @@
1
- export declare const useElementRef: <T extends HTMLElement>(selector: () => T) => import("react").MutableRefObject<T | undefined>;
1
+ export declare const useElementRef: <T extends HTMLElement>(selector: () => T) => import('react').MutableRefObject<T | undefined>;
2
2
  //# sourceMappingURL=use-element-ref.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { AnyFunction } from "../../utils/types.js";
1
+ import { AnyFunction } from '../../utils/types.ts';
2
2
  export declare const useEvent: <H extends AnyFunction>(handler: H) => H;
3
3
  //# sourceMappingURL=use-event.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-event.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-event.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,6BAA6B;AAExD,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,WAAW,EAAE,SAAS,CAAC,KAAG,CAa5D,CAAC"}
1
+ {"version":3,"file":"use-event.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-event.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,WAAW,EAAE,SAAS,CAAC,KAAG,CAa5D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export declare const useInitialHeight: <T extends HTMLElement>() => {
2
- ref: import("react").MutableRefObject<T | null>;
2
+ ref: import('react').MutableRefObject<T | null>;
3
3
  initialHeight: number | undefined;
4
4
  };
5
5
  //# sourceMappingURL=use-initial-height.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const useLastValueRef: <T>(value: T | null | undefined) => import("react").MutableRefObject<T | null | undefined>;
1
+ export declare const useLastValueRef: <T>(value: T | null | undefined) => import('react').MutableRefObject<T | null | undefined>;
2
2
  //# sourceMappingURL=use-last-value-ref.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const useResizeObserver: (callback: ResizeObserverCallback) => import("react").MutableRefObject<ResizeObserver>;
1
+ export declare const useResizeObserver: (callback: ResizeObserverCallback) => import('react').MutableRefObject<ResizeObserver>;
2
2
  //# sourceMappingURL=use-resize-observer.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const useSyncRef: <T>(value: T) => import("react").MutableRefObject<T>;
1
+ export declare const useSyncRef: <T>(value: T) => import('react').MutableRefObject<T>;
2
2
  //# sourceMappingURL=use-sync-ref.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const useToggle: (initialState?: boolean) => readonly [boolean, () => void, import("react").Dispatch<import("react").SetStateAction<boolean>>];
1
+ export declare const useToggle: (initialState?: boolean) => readonly [boolean, () => void, import('react').Dispatch<import('react').SetStateAction<boolean>>];
2
2
  //# sourceMappingURL=use-toggle.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export declare const useValue: <T>(defaults: T | (() => T)) => {
2
2
  value: T;
3
- set: import("react").Dispatch<import("react").SetStateAction<T>>;
3
+ set: import('react').Dispatch<import('react').SetStateAction<T>>;
4
4
  };
5
5
  //# sourceMappingURL=use-value.d.ts.map
package/react/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./hooks/index.js";
1
+ export * from './hooks/index.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,iCAAiC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}