yummies 5.4.5 → 5.4.7

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 (466) hide show
  1. package/assets/logo.png +0 -0
  2. package/assets/logo.pxz +0 -0
  3. package/{dist/common.d.ts → common.d.ts} +1 -1
  4. package/common.d.ts.map +1 -0
  5. package/{dist/complex → complex}/global-config.d.ts +1 -1
  6. package/complex/global-config.d.ts.map +1 -0
  7. package/complex/index.d.ts +4 -0
  8. package/complex/index.d.ts.map +1 -0
  9. package/complex/index.js +3 -0
  10. package/{dist/complex → complex}/modules-factory.d.ts +1 -1
  11. package/complex/modules-factory.d.ts.map +1 -0
  12. package/cookie.d.ts +3 -0
  13. package/{dist/cookie.d.ts.map → cookie.d.ts.map} +1 -1
  14. package/{dist/date-time.d.ts → date-time.d.ts} +1 -1
  15. package/date-time.d.ts.map +1 -0
  16. package/{dist/date-time.js → date-time.js} +4 -4
  17. package/{dist/errors.d.ts → errors.d.ts} +1 -1
  18. package/errors.d.ts.map +1 -0
  19. package/{dist/errors.js → errors.js} +1 -1
  20. package/format/_exports.d.ts +5 -0
  21. package/format/_exports.d.ts.map +1 -0
  22. package/format/_exports.js +4 -0
  23. package/format/index.d.ts +3 -0
  24. package/{dist/format → format}/index.d.ts.map +1 -1
  25. package/{dist/format → format}/index.js +1 -1
  26. package/{dist/format → format}/number.d.ts +1 -1
  27. package/format/number.d.ts.map +1 -0
  28. package/{dist/format → format}/number.js +3 -3
  29. package/{dist/format → format}/percent.d.ts +2 -2
  30. package/format/percent.d.ts.map +1 -0
  31. package/{dist/format → format}/percent.js +3 -3
  32. package/{dist/html.d.ts → html.d.ts} +1 -1
  33. package/html.d.ts.map +1 -0
  34. package/{dist/html.js → html.js} +1 -1
  35. package/{dist/imports.js → imports.js} +1 -1
  36. package/{dist/math.d.ts → math.d.ts} +1 -1
  37. package/math.d.ts.map +1 -0
  38. package/{dist/media.js → media.js} +1 -1
  39. package/{dist/mobx → mobx}/apply-observable.d.ts +1 -1
  40. package/mobx/apply-observable.d.ts.map +1 -0
  41. package/{dist/mobx → mobx}/create-enhanced-atom.d.ts +1 -1
  42. package/mobx/create-enhanced-atom.d.ts.map +1 -0
  43. package/{dist/mobx → mobx}/deep-observable-struct.d.ts +1 -1
  44. package/mobx/deep-observable-struct.d.ts.map +1 -0
  45. package/{dist/mobx → mobx}/deep-observable-struct.js +1 -1
  46. package/{dist/mobx → mobx}/get-mobx-administration.d.ts +1 -1
  47. package/mobx/get-mobx-administration.d.ts.map +1 -0
  48. package/mobx/index.d.ts +6 -0
  49. package/mobx/index.d.ts.map +1 -0
  50. package/mobx/index.js +5 -0
  51. package/package.json +350 -340
  52. package/parser/_exports.d.ts +4 -0
  53. package/parser/_exports.d.ts.map +1 -0
  54. package/parser/_exports.js +3 -0
  55. package/parser/index.d.ts +3 -0
  56. package/{dist/parser → parser}/index.d.ts.map +1 -1
  57. package/{dist/parser → parser}/index.js +1 -1
  58. package/{dist/parser → parser}/number.d.ts +1 -1
  59. package/parser/number.d.ts.map +1 -0
  60. package/{dist/parser → parser}/number.js +2 -2
  61. package/{dist/parser → parser}/percent.d.ts +2 -2
  62. package/parser/percent.d.ts.map +1 -0
  63. package/{dist/parser → parser}/percent.js +1 -1
  64. package/{dist/parser → parser}/string.d.ts +1 -1
  65. package/parser/string.d.ts.map +1 -0
  66. package/{dist/parser → parser}/string.js +1 -1
  67. package/react/hooks/index.d.ts +22 -0
  68. package/react/hooks/index.d.ts.map +1 -0
  69. package/react/hooks/index.js +21 -0
  70. package/{dist/react → react}/hooks/use-abort-controller.js +1 -1
  71. package/{dist/react → react}/hooks/use-abort-signal.js +1 -1
  72. package/{dist/react → react}/hooks/use-click-outside.js +1 -1
  73. package/{dist/react → react}/hooks/use-event-listener.js +1 -1
  74. package/react/hooks/use-event.d.ts +3 -0
  75. package/{dist/react → react}/hooks/use-event.d.ts.map +1 -1
  76. package/{dist/react → react}/hooks/use-instance.js +2 -2
  77. package/{dist/react → react}/hooks/use-life-cycle.js +1 -1
  78. package/{dist/react → react}/hooks/use-resize-observer.js +1 -1
  79. package/react/index.d.ts +2 -0
  80. package/react/index.d.ts.map +1 -0
  81. package/react/index.js +1 -0
  82. package/{dist/type-guard → type-guard}/_exports.d.ts +1 -1
  83. package/type-guard/_exports.d.ts.map +1 -0
  84. package/type-guard/index.d.ts +3 -0
  85. package/{dist/type-guard → type-guard}/index.d.ts.map +1 -1
  86. package/{dist/type-guard → type-guard}/index.js +1 -1
  87. package/dist/async.cjs +0 -70
  88. package/dist/async.d.cts +0 -28
  89. package/dist/async.d.cts.map +0 -1
  90. package/dist/common.cjs +0 -18
  91. package/dist/common.d.cts +0 -15
  92. package/dist/common.d.cts.map +0 -1
  93. package/dist/common.d.ts.map +0 -1
  94. package/dist/complex/counter.cjs +0 -21
  95. package/dist/complex/counter.d.cts +0 -15
  96. package/dist/complex/counter.d.cts.map +0 -1
  97. package/dist/complex/global-config.cjs +0 -46
  98. package/dist/complex/global-config.d.cts +0 -11
  99. package/dist/complex/global-config.d.cts.map +0 -1
  100. package/dist/complex/global-config.d.ts.map +0 -1
  101. package/dist/complex/index.cjs +0 -19
  102. package/dist/complex/index.d.cts +0 -4
  103. package/dist/complex/index.d.cts.map +0 -1
  104. package/dist/complex/index.d.ts +0 -4
  105. package/dist/complex/index.d.ts.map +0 -1
  106. package/dist/complex/index.js +0 -3
  107. package/dist/complex/modules-factory.cjs +0 -50
  108. package/dist/complex/modules-factory.d.cts +0 -49
  109. package/dist/complex/modules-factory.d.cts.map +0 -1
  110. package/dist/complex/modules-factory.d.ts.map +0 -1
  111. package/dist/cookie.cjs +0 -13
  112. package/dist/cookie.d.cts +0 -3
  113. package/dist/cookie.d.cts.map +0 -1
  114. package/dist/cookie.d.ts +0 -3
  115. package/dist/css.cjs +0 -28
  116. package/dist/css.d.cts +0 -36
  117. package/dist/css.d.cts.map +0 -1
  118. package/dist/data.cjs +0 -58
  119. package/dist/data.d.cts +0 -4
  120. package/dist/data.d.cts.map +0 -1
  121. package/dist/date-time.cjs +0 -171
  122. package/dist/date-time.d.cts +0 -28
  123. package/dist/date-time.d.cts.map +0 -1
  124. package/dist/date-time.d.ts.map +0 -1
  125. package/dist/device.cjs +0 -28
  126. package/dist/device.d.cts +0 -8
  127. package/dist/device.d.cts.map +0 -1
  128. package/dist/encodings.cjs +0 -270
  129. package/dist/encodings.d.cts +0 -2
  130. package/dist/encodings.d.cts.map +0 -1
  131. package/dist/errors.cjs +0 -34
  132. package/dist/errors.d.cts +0 -19
  133. package/dist/errors.d.cts.map +0 -1
  134. package/dist/errors.d.ts.map +0 -1
  135. package/dist/file.cjs +0 -29
  136. package/dist/file.d.cts +0 -3
  137. package/dist/file.d.cts.map +0 -1
  138. package/dist/format/_exports.cjs +0 -20
  139. package/dist/format/_exports.d.cts +0 -5
  140. package/dist/format/_exports.d.cts.map +0 -1
  141. package/dist/format/_exports.d.ts +0 -5
  142. package/dist/format/_exports.d.ts.map +0 -1
  143. package/dist/format/_exports.js +0 -4
  144. package/dist/format/constants.cjs +0 -6
  145. package/dist/format/constants.d.cts +0 -4
  146. package/dist/format/constants.d.cts.map +0 -1
  147. package/dist/format/index.cjs +0 -40
  148. package/dist/format/index.d.cts +0 -3
  149. package/dist/format/index.d.cts.map +0 -1
  150. package/dist/format/index.d.ts +0 -3
  151. package/dist/format/number.cjs +0 -48
  152. package/dist/format/number.d.cts +0 -36
  153. package/dist/format/number.d.cts.map +0 -1
  154. package/dist/format/number.d.ts.map +0 -1
  155. package/dist/format/percent.cjs +0 -27
  156. package/dist/format/percent.d.cts +0 -15
  157. package/dist/format/percent.d.cts.map +0 -1
  158. package/dist/format/percent.d.ts.map +0 -1
  159. package/dist/format/skip-spaces.cjs +0 -8
  160. package/dist/format/skip-spaces.d.cts +0 -5
  161. package/dist/format/skip-spaces.d.cts.map +0 -1
  162. package/dist/html.cjs +0 -202
  163. package/dist/html.d.cts +0 -44
  164. package/dist/html.d.cts.map +0 -1
  165. package/dist/html.d.ts.map +0 -1
  166. package/dist/id.cjs +0 -76
  167. package/dist/id.d.cts +0 -63
  168. package/dist/id.d.cts.map +0 -1
  169. package/dist/imports.cjs +0 -45
  170. package/dist/imports.d.cts +0 -15
  171. package/dist/imports.d.cts.map +0 -1
  172. package/dist/math.cjs +0 -23
  173. package/dist/math.d.cts +0 -13
  174. package/dist/math.d.cts.map +0 -1
  175. package/dist/math.d.ts.map +0 -1
  176. package/dist/media.cjs +0 -115
  177. package/dist/media.d.cts +0 -20
  178. package/dist/media.d.cts.map +0 -1
  179. package/dist/mobx/apply-observable.cjs +0 -16
  180. package/dist/mobx/apply-observable.d.cts +0 -4
  181. package/dist/mobx/apply-observable.d.cts.map +0 -1
  182. package/dist/mobx/apply-observable.d.ts.map +0 -1
  183. package/dist/mobx/create-enhanced-atom.cjs +0 -16
  184. package/dist/mobx/create-enhanced-atom.d.cts +0 -11
  185. package/dist/mobx/create-enhanced-atom.d.cts.map +0 -1
  186. package/dist/mobx/create-enhanced-atom.d.ts.map +0 -1
  187. package/dist/mobx/deep-observable-struct.cjs +0 -61
  188. package/dist/mobx/deep-observable-struct.d.cts +0 -7
  189. package/dist/mobx/deep-observable-struct.d.cts.map +0 -1
  190. package/dist/mobx/deep-observable-struct.d.ts.map +0 -1
  191. package/dist/mobx/get-mobx-administration.cjs +0 -6
  192. package/dist/mobx/get-mobx-administration.d.cts +0 -6
  193. package/dist/mobx/get-mobx-administration.d.cts.map +0 -1
  194. package/dist/mobx/get-mobx-administration.d.ts.map +0 -1
  195. package/dist/mobx/index.cjs +0 -21
  196. package/dist/mobx/index.d.cts +0 -6
  197. package/dist/mobx/index.d.cts.map +0 -1
  198. package/dist/mobx/index.d.ts +0 -6
  199. package/dist/mobx/index.d.ts.map +0 -1
  200. package/dist/mobx/index.js +0 -5
  201. package/dist/mobx/lazy-observe.cjs +0 -47
  202. package/dist/mobx/lazy-observe.d.cts +0 -8
  203. package/dist/mobx/lazy-observe.d.cts.map +0 -1
  204. package/dist/ms.cjs +0 -22
  205. package/dist/ms.d.cts +0 -19
  206. package/dist/ms.d.cts.map +0 -1
  207. package/dist/number.cjs +0 -16
  208. package/dist/number.d.cts +0 -8
  209. package/dist/number.d.cts.map +0 -1
  210. package/dist/parser/_exports.cjs +0 -19
  211. package/dist/parser/_exports.d.cts +0 -4
  212. package/dist/parser/_exports.d.cts.map +0 -1
  213. package/dist/parser/_exports.d.ts +0 -4
  214. package/dist/parser/_exports.d.ts.map +0 -1
  215. package/dist/parser/_exports.js +0 -3
  216. package/dist/parser/index.cjs +0 -40
  217. package/dist/parser/index.d.cts +0 -3
  218. package/dist/parser/index.d.cts.map +0 -1
  219. package/dist/parser/index.d.ts +0 -3
  220. package/dist/parser/number.cjs +0 -48
  221. package/dist/parser/number.d.cts +0 -21
  222. package/dist/parser/number.d.cts.map +0 -1
  223. package/dist/parser/number.d.ts.map +0 -1
  224. package/dist/parser/percent.cjs +0 -8
  225. package/dist/parser/percent.d.cts +0 -4
  226. package/dist/parser/percent.d.cts.map +0 -1
  227. package/dist/parser/percent.d.ts.map +0 -1
  228. package/dist/parser/string.cjs +0 -18
  229. package/dist/parser/string.d.cts +0 -7
  230. package/dist/parser/string.d.cts.map +0 -1
  231. package/dist/parser/string.d.ts.map +0 -1
  232. package/dist/price.cjs +0 -21
  233. package/dist/price.d.cts +0 -6
  234. package/dist/price.d.cts.map +0 -1
  235. package/dist/random.cjs +0 -25
  236. package/dist/random.d.cts +0 -9
  237. package/dist/random.d.cts.map +0 -1
  238. package/dist/react/hooks/index.cjs +0 -37
  239. package/dist/react/hooks/index.d.cts +0 -22
  240. package/dist/react/hooks/index.d.cts.map +0 -1
  241. package/dist/react/hooks/index.d.ts +0 -22
  242. package/dist/react/hooks/index.d.ts.map +0 -1
  243. package/dist/react/hooks/index.js +0 -21
  244. package/dist/react/hooks/use-abort-controller.cjs +0 -15
  245. package/dist/react/hooks/use-abort-controller.d.cts +0 -2
  246. package/dist/react/hooks/use-abort-controller.d.cts.map +0 -1
  247. package/dist/react/hooks/use-abort-signal.cjs +0 -8
  248. package/dist/react/hooks/use-abort-signal.d.cts +0 -2
  249. package/dist/react/hooks/use-abort-signal.d.cts.map +0 -1
  250. package/dist/react/hooks/use-click-outside.cjs +0 -17
  251. package/dist/react/hooks/use-click-outside.d.cts +0 -9
  252. package/dist/react/hooks/use-click-outside.d.cts.map +0 -1
  253. package/dist/react/hooks/use-constant.cjs +0 -19
  254. package/dist/react/hooks/use-constant.d.cts +0 -9
  255. package/dist/react/hooks/use-constant.d.cts.map +0 -1
  256. package/dist/react/hooks/use-define-ref.cjs +0 -19
  257. package/dist/react/hooks/use-define-ref.d.cts +0 -10
  258. package/dist/react/hooks/use-define-ref.d.cts.map +0 -1
  259. package/dist/react/hooks/use-element-ref.cjs +0 -12
  260. package/dist/react/hooks/use-element-ref.d.cts +0 -2
  261. package/dist/react/hooks/use-element-ref.d.cts.map +0 -1
  262. package/dist/react/hooks/use-event-listener.cjs +0 -17
  263. package/dist/react/hooks/use-event-listener.d.cts +0 -8
  264. package/dist/react/hooks/use-event-listener.d.cts.map +0 -1
  265. package/dist/react/hooks/use-event.cjs +0 -23
  266. package/dist/react/hooks/use-event.d.cts +0 -3
  267. package/dist/react/hooks/use-event.d.cts.map +0 -1
  268. package/dist/react/hooks/use-event.d.ts +0 -3
  269. package/dist/react/hooks/use-flag.cjs +0 -19
  270. package/dist/react/hooks/use-flag.d.cts +0 -8
  271. package/dist/react/hooks/use-flag.d.cts.map +0 -1
  272. package/dist/react/hooks/use-force-update.cjs +0 -11
  273. package/dist/react/hooks/use-force-update.d.cts +0 -2
  274. package/dist/react/hooks/use-force-update.d.cts.map +0 -1
  275. package/dist/react/hooks/use-initial-height.cjs +0 -15
  276. package/dist/react/hooks/use-initial-height.d.cts +0 -5
  277. package/dist/react/hooks/use-initial-height.d.cts.map +0 -1
  278. package/dist/react/hooks/use-instance.cjs +0 -31
  279. package/dist/react/hooks/use-instance.d.cts +0 -27
  280. package/dist/react/hooks/use-instance.d.cts.map +0 -1
  281. package/dist/react/hooks/use-intersection-observer.cjs +0 -14
  282. package/dist/react/hooks/use-intersection-observer.d.cts +0 -2
  283. package/dist/react/hooks/use-intersection-observer.d.cts.map +0 -1
  284. package/dist/react/hooks/use-last-defined-value.cjs +0 -12
  285. package/dist/react/hooks/use-last-defined-value.d.cts +0 -2
  286. package/dist/react/hooks/use-last-defined-value.d.cts.map +0 -1
  287. package/dist/react/hooks/use-last-value-ref.cjs +0 -12
  288. package/dist/react/hooks/use-last-value-ref.d.cts +0 -2
  289. package/dist/react/hooks/use-last-value-ref.d.cts.map +0 -1
  290. package/dist/react/hooks/use-life-cycle.cjs +0 -14
  291. package/dist/react/hooks/use-life-cycle.d.cts +0 -5
  292. package/dist/react/hooks/use-life-cycle.d.cts.map +0 -1
  293. package/dist/react/hooks/use-resize-observer.cjs +0 -15
  294. package/dist/react/hooks/use-resize-observer.d.cts +0 -2
  295. package/dist/react/hooks/use-resize-observer.d.cts.map +0 -1
  296. package/dist/react/hooks/use-sync-ref.cjs +0 -10
  297. package/dist/react/hooks/use-sync-ref.d.cts +0 -2
  298. package/dist/react/hooks/use-sync-ref.d.cts.map +0 -1
  299. package/dist/react/hooks/use-toggle.cjs +0 -10
  300. package/dist/react/hooks/use-toggle.d.cts +0 -2
  301. package/dist/react/hooks/use-toggle.d.cts.map +0 -1
  302. package/dist/react/hooks/use-value.cjs +0 -12
  303. package/dist/react/hooks/use-value.d.cts +0 -5
  304. package/dist/react/hooks/use-value.d.cts.map +0 -1
  305. package/dist/react/hooks/use-visibility-state.cjs +0 -18
  306. package/dist/react/hooks/use-visibility-state.d.cts +0 -2
  307. package/dist/react/hooks/use-visibility-state.d.cts.map +0 -1
  308. package/dist/react/index.cjs +0 -17
  309. package/dist/react/index.d.cts +0 -2
  310. package/dist/react/index.d.cts.map +0 -1
  311. package/dist/react/index.d.ts +0 -2
  312. package/dist/react/index.d.ts.map +0 -1
  313. package/dist/react/index.js +0 -1
  314. package/dist/sound.cjs +0 -16
  315. package/dist/sound.d.cts +0 -7
  316. package/dist/sound.d.cts.map +0 -1
  317. package/dist/storage.cjs +0 -48
  318. package/dist/storage.d.cts +0 -39
  319. package/dist/storage.d.cts.map +0 -1
  320. package/dist/text.cjs +0 -53
  321. package/dist/text.d.cts +0 -15
  322. package/dist/text.d.cts.map +0 -1
  323. package/dist/type-guard/_exports.cjs +0 -129
  324. package/dist/type-guard/_exports.d.cts +0 -86
  325. package/dist/type-guard/_exports.d.cts.map +0 -1
  326. package/dist/type-guard/_exports.d.ts.map +0 -1
  327. package/dist/type-guard/index.cjs +0 -40
  328. package/dist/type-guard/index.d.cts +0 -3
  329. package/dist/type-guard/index.d.cts.map +0 -1
  330. package/dist/type-guard/index.d.ts +0 -3
  331. package/dist/utils/types.cjs +0 -2
  332. package/dist/utils/types.d.cts +0 -395
  333. package/dist/utils/types.d.cts.map +0 -1
  334. package/dist/utils/types.d.ts +0 -395
  335. package/dist/utils/types.d.ts.map +0 -1
  336. package/dist/utils/types.js +0 -1
  337. package/dist/vibrate.cjs +0 -12
  338. package/dist/vibrate.d.cts +0 -5
  339. package/dist/vibrate.d.cts.map +0 -1
  340. package/utils/types.cjs +0 -2
  341. package/utils/types.d.cts +0 -395
  342. package/utils/types.d.cts.map +0 -1
  343. /package/{dist/async.d.ts → async.d.ts} +0 -0
  344. /package/{dist/async.d.ts.map → async.d.ts.map} +0 -0
  345. /package/{dist/async.js → async.js} +0 -0
  346. /package/{dist/common.js → common.js} +0 -0
  347. /package/{dist/complex → complex}/counter.d.ts +0 -0
  348. /package/{dist/complex → complex}/counter.d.ts.map +0 -0
  349. /package/{dist/complex → complex}/counter.js +0 -0
  350. /package/{dist/complex → complex}/global-config.js +0 -0
  351. /package/{dist/complex → complex}/modules-factory.js +0 -0
  352. /package/{dist/cookie.js → cookie.js} +0 -0
  353. /package/{dist/css.d.ts → css.d.ts} +0 -0
  354. /package/{dist/css.d.ts.map → css.d.ts.map} +0 -0
  355. /package/{dist/css.js → css.js} +0 -0
  356. /package/{dist/data.d.ts → data.d.ts} +0 -0
  357. /package/{dist/data.d.ts.map → data.d.ts.map} +0 -0
  358. /package/{dist/data.js → data.js} +0 -0
  359. /package/{dist/device.d.ts → device.d.ts} +0 -0
  360. /package/{dist/device.d.ts.map → device.d.ts.map} +0 -0
  361. /package/{dist/device.js → device.js} +0 -0
  362. /package/{dist/encodings.d.ts → encodings.d.ts} +0 -0
  363. /package/{dist/encodings.d.ts.map → encodings.d.ts.map} +0 -0
  364. /package/{dist/encodings.js → encodings.js} +0 -0
  365. /package/{dist/file.d.ts → file.d.ts} +0 -0
  366. /package/{dist/file.d.ts.map → file.d.ts.map} +0 -0
  367. /package/{dist/file.js → file.js} +0 -0
  368. /package/{dist/format → format}/constants.d.ts +0 -0
  369. /package/{dist/format → format}/constants.d.ts.map +0 -0
  370. /package/{dist/format → format}/constants.js +0 -0
  371. /package/{dist/format → format}/skip-spaces.d.ts +0 -0
  372. /package/{dist/format → format}/skip-spaces.d.ts.map +0 -0
  373. /package/{dist/format → format}/skip-spaces.js +0 -0
  374. /package/{dist/id.d.ts → id.d.ts} +0 -0
  375. /package/{dist/id.d.ts.map → id.d.ts.map} +0 -0
  376. /package/{dist/id.js → id.js} +0 -0
  377. /package/{dist/imports.d.ts → imports.d.ts} +0 -0
  378. /package/{dist/imports.d.ts.map → imports.d.ts.map} +0 -0
  379. /package/{dist/math.js → math.js} +0 -0
  380. /package/{dist/media.d.ts → media.d.ts} +0 -0
  381. /package/{dist/media.d.ts.map → media.d.ts.map} +0 -0
  382. /package/{dist/mobx → mobx}/apply-observable.js +0 -0
  383. /package/{dist/mobx → mobx}/create-enhanced-atom.js +0 -0
  384. /package/{dist/mobx → mobx}/get-mobx-administration.js +0 -0
  385. /package/{dist/mobx → mobx}/lazy-observe.d.ts +0 -0
  386. /package/{dist/mobx → mobx}/lazy-observe.d.ts.map +0 -0
  387. /package/{dist/mobx → mobx}/lazy-observe.js +0 -0
  388. /package/{dist/ms.d.ts → ms.d.ts} +0 -0
  389. /package/{dist/ms.d.ts.map → ms.d.ts.map} +0 -0
  390. /package/{dist/ms.js → ms.js} +0 -0
  391. /package/{dist/number.d.ts → number.d.ts} +0 -0
  392. /package/{dist/number.d.ts.map → number.d.ts.map} +0 -0
  393. /package/{dist/number.js → number.js} +0 -0
  394. /package/{dist/price.d.ts → price.d.ts} +0 -0
  395. /package/{dist/price.d.ts.map → price.d.ts.map} +0 -0
  396. /package/{dist/price.js → price.js} +0 -0
  397. /package/{dist/random.d.ts → random.d.ts} +0 -0
  398. /package/{dist/random.d.ts.map → random.d.ts.map} +0 -0
  399. /package/{dist/random.js → random.js} +0 -0
  400. /package/{dist/react → react}/hooks/use-abort-controller.d.ts +0 -0
  401. /package/{dist/react → react}/hooks/use-abort-controller.d.ts.map +0 -0
  402. /package/{dist/react → react}/hooks/use-abort-signal.d.ts +0 -0
  403. /package/{dist/react → react}/hooks/use-abort-signal.d.ts.map +0 -0
  404. /package/{dist/react → react}/hooks/use-click-outside.d.ts +0 -0
  405. /package/{dist/react → react}/hooks/use-click-outside.d.ts.map +0 -0
  406. /package/{dist/react → react}/hooks/use-constant.d.ts +0 -0
  407. /package/{dist/react → react}/hooks/use-constant.d.ts.map +0 -0
  408. /package/{dist/react → react}/hooks/use-constant.js +0 -0
  409. /package/{dist/react → react}/hooks/use-define-ref.d.ts +0 -0
  410. /package/{dist/react → react}/hooks/use-define-ref.d.ts.map +0 -0
  411. /package/{dist/react → react}/hooks/use-define-ref.js +0 -0
  412. /package/{dist/react → react}/hooks/use-element-ref.d.ts +0 -0
  413. /package/{dist/react → react}/hooks/use-element-ref.d.ts.map +0 -0
  414. /package/{dist/react → react}/hooks/use-element-ref.js +0 -0
  415. /package/{dist/react → react}/hooks/use-event-listener.d.ts +0 -0
  416. /package/{dist/react → react}/hooks/use-event-listener.d.ts.map +0 -0
  417. /package/{dist/react → react}/hooks/use-event.js +0 -0
  418. /package/{dist/react → react}/hooks/use-flag.d.ts +0 -0
  419. /package/{dist/react → react}/hooks/use-flag.d.ts.map +0 -0
  420. /package/{dist/react → react}/hooks/use-flag.js +0 -0
  421. /package/{dist/react → react}/hooks/use-force-update.d.ts +0 -0
  422. /package/{dist/react → react}/hooks/use-force-update.d.ts.map +0 -0
  423. /package/{dist/react → react}/hooks/use-force-update.js +0 -0
  424. /package/{dist/react → react}/hooks/use-initial-height.d.ts +0 -0
  425. /package/{dist/react → react}/hooks/use-initial-height.d.ts.map +0 -0
  426. /package/{dist/react → react}/hooks/use-initial-height.js +0 -0
  427. /package/{dist/react → react}/hooks/use-instance.d.ts +0 -0
  428. /package/{dist/react → react}/hooks/use-instance.d.ts.map +0 -0
  429. /package/{dist/react → react}/hooks/use-intersection-observer.d.ts +0 -0
  430. /package/{dist/react → react}/hooks/use-intersection-observer.d.ts.map +0 -0
  431. /package/{dist/react → react}/hooks/use-intersection-observer.js +0 -0
  432. /package/{dist/react → react}/hooks/use-last-defined-value.d.ts +0 -0
  433. /package/{dist/react → react}/hooks/use-last-defined-value.d.ts.map +0 -0
  434. /package/{dist/react → react}/hooks/use-last-defined-value.js +0 -0
  435. /package/{dist/react → react}/hooks/use-last-value-ref.d.ts +0 -0
  436. /package/{dist/react → react}/hooks/use-last-value-ref.d.ts.map +0 -0
  437. /package/{dist/react → react}/hooks/use-last-value-ref.js +0 -0
  438. /package/{dist/react → react}/hooks/use-life-cycle.d.ts +0 -0
  439. /package/{dist/react → react}/hooks/use-life-cycle.d.ts.map +0 -0
  440. /package/{dist/react → react}/hooks/use-resize-observer.d.ts +0 -0
  441. /package/{dist/react → react}/hooks/use-resize-observer.d.ts.map +0 -0
  442. /package/{dist/react → react}/hooks/use-sync-ref.d.ts +0 -0
  443. /package/{dist/react → react}/hooks/use-sync-ref.d.ts.map +0 -0
  444. /package/{dist/react → react}/hooks/use-sync-ref.js +0 -0
  445. /package/{dist/react → react}/hooks/use-toggle.d.ts +0 -0
  446. /package/{dist/react → react}/hooks/use-toggle.d.ts.map +0 -0
  447. /package/{dist/react → react}/hooks/use-toggle.js +0 -0
  448. /package/{dist/react → react}/hooks/use-value.d.ts +0 -0
  449. /package/{dist/react → react}/hooks/use-value.d.ts.map +0 -0
  450. /package/{dist/react → react}/hooks/use-value.js +0 -0
  451. /package/{dist/react → react}/hooks/use-visibility-state.d.ts +0 -0
  452. /package/{dist/react → react}/hooks/use-visibility-state.d.ts.map +0 -0
  453. /package/{dist/react → react}/hooks/use-visibility-state.js +0 -0
  454. /package/{dist/sound.d.ts → sound.d.ts} +0 -0
  455. /package/{dist/sound.d.ts.map → sound.d.ts.map} +0 -0
  456. /package/{dist/sound.js → sound.js} +0 -0
  457. /package/{dist/storage.d.ts → storage.d.ts} +0 -0
  458. /package/{dist/storage.d.ts.map → storage.d.ts.map} +0 -0
  459. /package/{dist/storage.js → storage.js} +0 -0
  460. /package/{dist/text.d.ts → text.d.ts} +0 -0
  461. /package/{dist/text.d.ts.map → text.d.ts.map} +0 -0
  462. /package/{dist/text.js → text.js} +0 -0
  463. /package/{dist/type-guard → type-guard}/_exports.js +0 -0
  464. /package/{dist/vibrate.d.ts → vibrate.d.ts} +0 -0
  465. /package/{dist/vibrate.d.ts.map → vibrate.d.ts.map} +0 -0
  466. /package/{dist/vibrate.js → vibrate.js} +0 -0
@@ -1,270 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unicodeToWin1251 = unicodeToWin1251;
4
- const DMap = {
5
- 0: 0,
6
- 1: 1,
7
- 2: 2,
8
- 3: 3,
9
- 4: 4,
10
- 5: 5,
11
- 6: 6,
12
- 7: 7,
13
- 8: 8,
14
- 9: 9,
15
- 10: 10,
16
- 11: 11,
17
- 12: 12,
18
- 13: 13,
19
- 14: 14,
20
- 15: 15,
21
- 16: 16,
22
- 17: 17,
23
- 18: 18,
24
- 19: 19,
25
- 20: 20,
26
- 21: 21,
27
- 22: 22,
28
- 23: 23,
29
- 24: 24,
30
- 25: 25,
31
- 26: 26,
32
- 27: 27,
33
- 28: 28,
34
- 29: 29,
35
- 30: 30,
36
- 31: 31,
37
- 32: 32,
38
- 33: 33,
39
- 34: 34,
40
- 35: 35,
41
- 36: 36,
42
- 37: 37,
43
- 38: 38,
44
- 39: 39,
45
- 40: 40,
46
- 41: 41,
47
- 42: 42,
48
- 43: 43,
49
- 44: 44,
50
- 45: 45,
51
- 46: 46,
52
- 47: 47,
53
- 48: 48,
54
- 49: 49,
55
- 50: 50,
56
- 51: 51,
57
- 52: 52,
58
- 53: 53,
59
- 54: 54,
60
- 55: 55,
61
- 56: 56,
62
- 57: 57,
63
- 58: 58,
64
- 59: 59,
65
- 60: 60,
66
- 61: 61,
67
- 62: 62,
68
- 63: 63,
69
- 64: 64,
70
- 65: 65,
71
- 66: 66,
72
- 67: 67,
73
- 68: 68,
74
- 69: 69,
75
- 70: 70,
76
- 71: 71,
77
- 72: 72,
78
- 73: 73,
79
- 74: 74,
80
- 75: 75,
81
- 76: 76,
82
- 77: 77,
83
- 78: 78,
84
- 79: 79,
85
- 80: 80,
86
- 81: 81,
87
- 82: 82,
88
- 83: 83,
89
- 84: 84,
90
- 85: 85,
91
- 86: 86,
92
- 87: 87,
93
- 88: 88,
94
- 89: 89,
95
- 90: 90,
96
- 91: 91,
97
- 92: 92,
98
- 93: 93,
99
- 94: 94,
100
- 95: 95,
101
- 96: 96,
102
- 97: 97,
103
- 98: 98,
104
- 99: 99,
105
- 100: 100,
106
- 101: 101,
107
- 102: 102,
108
- 103: 103,
109
- 104: 104,
110
- 105: 105,
111
- 106: 106,
112
- 107: 107,
113
- 108: 108,
114
- 109: 109,
115
- 110: 110,
116
- 111: 111,
117
- 112: 112,
118
- 113: 113,
119
- 114: 114,
120
- 115: 115,
121
- 116: 116,
122
- 117: 117,
123
- 118: 118,
124
- 119: 119,
125
- 120: 120,
126
- 121: 121,
127
- 122: 122,
128
- 123: 123,
129
- 124: 124,
130
- 125: 125,
131
- 126: 126,
132
- 127: 127,
133
- 1027: 129,
134
- 8225: 135,
135
- 1046: 198,
136
- 8222: 132,
137
- 1047: 199,
138
- 1168: 165,
139
- 1048: 200,
140
- 1113: 154,
141
- 1049: 201,
142
- 1045: 197,
143
- 1050: 202,
144
- 1028: 170,
145
- 160: 160,
146
- 1040: 192,
147
- 1051: 203,
148
- 164: 164,
149
- 166: 166,
150
- 167: 167,
151
- 169: 169,
152
- 171: 171,
153
- 172: 172,
154
- 173: 173,
155
- 174: 174,
156
- 1053: 205,
157
- 176: 176,
158
- 177: 177,
159
- 1114: 156,
160
- 181: 181,
161
- 182: 182,
162
- 183: 183,
163
- 8221: 148,
164
- 187: 187,
165
- 1029: 189,
166
- 1056: 208,
167
- 1057: 209,
168
- 1058: 210,
169
- 8364: 136,
170
- 1112: 188,
171
- 1115: 158,
172
- 1059: 211,
173
- 1060: 212,
174
- 1030: 178,
175
- 1061: 213,
176
- 1062: 214,
177
- 1063: 215,
178
- 1116: 157,
179
- 1064: 216,
180
- 1065: 217,
181
- 1031: 175,
182
- 1066: 218,
183
- 1067: 219,
184
- 1068: 220,
185
- 1069: 221,
186
- 1070: 222,
187
- 1032: 163,
188
- 8226: 149,
189
- 1071: 223,
190
- 1072: 224,
191
- 8482: 153,
192
- 1073: 225,
193
- 8240: 137,
194
- 1118: 162,
195
- 1074: 226,
196
- 1110: 179,
197
- 8230: 133,
198
- 1075: 227,
199
- 1033: 138,
200
- 1076: 228,
201
- 1077: 229,
202
- 8211: 150,
203
- 1078: 230,
204
- 1119: 159,
205
- 1079: 231,
206
- 1042: 194,
207
- 1080: 232,
208
- 1034: 140,
209
- 1025: 168,
210
- 1081: 233,
211
- 1082: 234,
212
- 8212: 151,
213
- 1083: 235,
214
- 1169: 180,
215
- 1084: 236,
216
- 1052: 204,
217
- 1085: 237,
218
- 1035: 142,
219
- 1086: 238,
220
- 1087: 239,
221
- 1088: 240,
222
- 1089: 241,
223
- 1090: 242,
224
- 1036: 141,
225
- 1041: 193,
226
- 1091: 243,
227
- 1092: 244,
228
- 8224: 134,
229
- 1093: 245,
230
- 8470: 185,
231
- 1094: 246,
232
- 1054: 206,
233
- 1095: 247,
234
- 1096: 248,
235
- 8249: 139,
236
- 1097: 249,
237
- 1098: 250,
238
- 1044: 196,
239
- 1099: 251,
240
- 1111: 191,
241
- 1055: 207,
242
- 1100: 252,
243
- 1038: 161,
244
- 8220: 147,
245
- 1101: 253,
246
- 8250: 155,
247
- 1102: 254,
248
- 8216: 145,
249
- 1103: 255,
250
- 1043: 195,
251
- 1105: 184,
252
- 1039: 143,
253
- 1026: 128,
254
- 1106: 144,
255
- 8218: 130,
256
- 1107: 131,
257
- 8217: 146,
258
- 1108: 186,
259
- 1109: 190,
260
- };
261
- function unicodeToWin1251(s) {
262
- const L = [];
263
- for (let i = 0; i < s.length; i++) {
264
- const ord = s.charCodeAt(i);
265
- if (!(ord in DMap))
266
- throw new Error(`Character ${s.charAt(i)} isn't supported by win1251!`);
267
- L.push(String.fromCharCode(DMap[ord]));
268
- }
269
- return L.join('');
270
- }
@@ -1,2 +0,0 @@
1
- export declare function unicodeToWin1251(s: string): string;
2
- //# sourceMappingURL=encodings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"encodings.d.ts","sourceRoot":"","sources":["../src/encodings.ts"],"names":[],"mappings":"AAoQA,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,UASzC"}
package/dist/errors.cjs DELETED
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getErrorText = void 0;
4
- const index_js_1 = require("./type-guard/index.cjs");
5
- /**
6
- * Universal function for transforming any errors into readable error text
7
- *
8
- * This function can be enhanced with custom handlers using:
9
- * - `getErrorText.unknownErrorText`
10
- * - `getErrorText.formatError`
11
- * - `getErrorText.enhance`
12
- */
13
- const getErrorText = (error) => {
14
- if (!error) {
15
- return exports.getErrorText.unknownErrorText;
16
- }
17
- if (index_js_1.typeGuard.isString(error)) {
18
- return error || exports.getErrorText.unknownErrorText;
19
- }
20
- if (error instanceof Error) {
21
- return ((exports.getErrorText.formatError?.(error) ?? error.message) ||
22
- exports.getErrorText.unknownErrorText);
23
- }
24
- if (exports.getErrorText.enhance) {
25
- return exports.getErrorText.enhance(error) ?? exports.getErrorText.unknownErrorText;
26
- }
27
- else {
28
- return exports.getErrorText.unknownErrorText;
29
- }
30
- };
31
- exports.getErrorText = getErrorText;
32
- exports.getErrorText.unknownErrorText = '';
33
- exports.getErrorText.formatError = null;
34
- exports.getErrorText.enhance = null;
package/dist/errors.d.cts DELETED
@@ -1,19 +0,0 @@
1
- import type { Maybe } from "./utils/types.cjs";
2
- type GetErrorTextEnhancer = (error: any) => string;
3
- type GetErrorTextFormatErrorFn = (error: Error) => string;
4
- /**
5
- * Universal function for transforming any errors into readable error text
6
- *
7
- * This function can be enhanced with custom handlers using:
8
- * - `getErrorText.unknownErrorText`
9
- * - `getErrorText.formatError`
10
- * - `getErrorText.enhance`
11
- */
12
- export declare const getErrorText: {
13
- (error: unknown): string;
14
- unknownErrorText: string;
15
- formatError: Maybe<GetErrorTextFormatErrorFn>;
16
- enhance: Maybe<GetErrorTextEnhancer>;
17
- };
18
- export {};
19
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAyB;AAE9C,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;AACnD,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;YAAW,OAAO;;;;CAqB1C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,yBAAyB;AAE9C,KAAK,oBAAoB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAC;AACnD,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;YAAW,OAAO;;;;CAqB1C,CAAC"}
package/dist/file.cjs DELETED
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTextFromFile = exports.getBase64FromFile = void 0;
4
- const getBase64FromFile = (file) => {
5
- return new Promise((resolve, reject) => {
6
- const reader = new FileReader();
7
- reader.readAsDataURL(file);
8
- reader.onload = () => {
9
- resolve(reader.result.toString());
10
- };
11
- reader.onerror = (error) => {
12
- reject(error);
13
- };
14
- });
15
- };
16
- exports.getBase64FromFile = getBase64FromFile;
17
- const getTextFromFile = (file, encoding) => {
18
- return new Promise((resolve, reject) => {
19
- const reader = new FileReader();
20
- reader.readAsText(file, encoding);
21
- reader.onload = () => {
22
- resolve(reader.result.toString());
23
- };
24
- reader.onerror = (error) => {
25
- reject(error);
26
- };
27
- });
28
- };
29
- exports.getTextFromFile = getTextFromFile;
package/dist/file.d.cts DELETED
@@ -1,3 +0,0 @@
1
- export declare const getBase64FromFile: (file: File) => Promise<string>;
2
- export declare const getTextFromFile: (file: File, encoding?: string) => Promise<string>;
3
- //# sourceMappingURL=file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,oBAW3C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,EAAE,WAAW,MAAM,oBAW5D,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./constants.cjs"), exports);
18
- __exportStar(require("./number.cjs"), exports);
19
- __exportStar(require("./percent.cjs"), exports);
20
- __exportStar(require("./skip-spaces.cjs"), exports);
@@ -1,5 +0,0 @@
1
- export * from "./constants.cjs";
2
- export * from "./number.cjs";
3
- export * from "./percent.cjs";
4
- export * from "./skip-spaces.cjs";
5
- //# sourceMappingURL=_exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_exports.d.ts","sourceRoot":"","sources":["../../src/format/_exports.ts"],"names":[],"mappings":"AAAA,gCAA+B;AAC/B,6BAA4B;AAC5B,8BAA6B;AAC7B,kCAAiC"}
@@ -1,5 +0,0 @@
1
- export * from "./constants.js";
2
- export * from "./number.js";
3
- export * from "./percent.js";
4
- export * from "./skip-spaces.js";
5
- //# sourceMappingURL=_exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_exports.d.ts","sourceRoot":"","sources":["../../src/format/_exports.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,4BAA4B;AAC5B,6BAA6B;AAC7B,iCAAiC"}
@@ -1,4 +0,0 @@
1
- export * from "./constants.js";
2
- export * from "./number.js";
3
- export * from "./percent.js";
4
- export * from "./skip-spaces.js";
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INFINITY = exports.HYPHEN = exports.NO_VALUE = void 0;
4
- exports.NO_VALUE = '–'; // en-dash
5
- exports.HYPHEN = '-';
6
- exports.INFINITY = '∞';
@@ -1,4 +0,0 @@
1
- export declare const NO_VALUE = "\u2013";
2
- export declare const HYPHEN = "-";
3
- export declare const INFINITY = "\u221E";
4
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/format/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,WAAM,CAAC;AAE5B,eAAO,MAAM,MAAM,MAAM,CAAC;AAE1B,eAAO,MAAM,QAAQ,WAAM,CAAC"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.format = void 0;
37
- // This way is more treeshakable than collecting
38
- // it into one exportable object export const format
39
- const format = __importStar(require("./_exports.cjs"));
40
- exports.format = format;
@@ -1,3 +0,0 @@
1
- import * as format from "./_exports.cjs";
2
- export { format };
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/format/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,uBAAsB;AAExC,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- import * as format from "./_exports.js";
2
- export { format };
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.number = void 0;
4
- const number_js_1 = require("../parser/number.cjs");
5
- const index_js_1 = require("../type-guard/index.cjs");
6
- const constants_js_1 = require("./constants.cjs");
7
- const number = (rawValue, userSettings) => {
8
- const settings = {
9
- ...exports.number.defaultSettings,
10
- ...userSettings,
11
- };
12
- const digits = settings.digits ?? 0;
13
- const cutZeros = settings?.cutZeros ?? false;
14
- const delimiter = settings.delimiter ?? ' ';
15
- const postfix = settings.postfix ?? '';
16
- const emptyText = settings.emptyText ?? constants_js_1.NO_VALUE;
17
- const digitsOnlyForFloat = settings.digitsOnlyForFloat ?? true;
18
- let value;
19
- if (index_js_1.typeGuard.isString(rawValue)) {
20
- value = (0, number_js_1.number)(value, { fallback: undefined });
21
- }
22
- else {
23
- value = rawValue;
24
- }
25
- if (index_js_1.typeGuard.isNumber(value)) {
26
- let raw = `${value}`;
27
- if (digits !== false) {
28
- raw = value.toFixed(digits);
29
- }
30
- if (cutZeros) {
31
- raw = `${+raw}`;
32
- }
33
- const [integerPart, decimalPart] = raw.split('.', 2);
34
- let formattedIntegerPart = integerPart;
35
- let formattedDecimalPart = '';
36
- if (decimalPart && (!digitsOnlyForFloat || !/^0+$/.test(decimalPart))) {
37
- formattedDecimalPart = `.${decimalPart}`;
38
- }
39
- const rgx = /(\d+)(\d{3})/;
40
- while (rgx.test(formattedIntegerPart) && delimiter) {
41
- formattedIntegerPart = formattedIntegerPart.replace(rgx, `$1${delimiter}$2`);
42
- }
43
- return formattedIntegerPart + formattedDecimalPart + postfix;
44
- }
45
- return emptyText;
46
- };
47
- exports.number = number;
48
- exports.number.defaultSettings = {};
@@ -1,36 +0,0 @@
1
- import type { Maybe } from "../utils/types.cjs";
2
- export interface NumberFormatSettings {
3
- delimiter?: string;
4
- /**
5
- * digitsOnlyForFloat - Show digits after decimal point only if they are not zeros after converting to number.
6
- * Example: "0.00" -> "0", "0.10" -> "0.1", but "0.003" -> "0.003"
7
- *
8
- * @default true
9
- */
10
- digitsOnlyForFloat?: boolean;
11
- /**
12
- * Text which will be returned if the value is undefined, null, NaN, Infinity or empty string.
13
- * Example: "–" will be returned if the value is undefined and emptyText is "–".
14
- */
15
- emptyText?: string;
16
- /**
17
- * Text to append to the end of the formatted number.
18
- * Example: if value is 1000 and postfix is "₽", result will be "1 000₽".
19
- */
20
- postfix?: string;
21
- /**
22
- * Fixed number of digits after the decimal point (number.toFixed() method)
23
- * If set to false, the truncation is ignored!
24
- */
25
- digits?: number | false;
26
- /**
27
- * Remove trailing zeros from the end of the number
28
- * Example: 0.010000000000000000000000000000000000000000000 -> 0.01
29
- */
30
- cutZeros?: boolean;
31
- }
32
- export declare const number: {
33
- (rawValue: Maybe<string | number>, userSettings?: Maybe<NumberFormatSettings>): string;
34
- defaultSettings: NumberFormatSettings;
35
- };
36
- //# sourceMappingURL=number.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/format/number.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,2BAA0B;AAI/C,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,MAAM;eACP,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,iBACjB,KAAK,CAAC,oBAAoB,CAAC,GACzC,MAAM;;CAqDR,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/format/number.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B;AAI/C,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,MAAM;eACP,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,iBACjB,KAAK,CAAC,oBAAoB,CAAC,GACzC,MAAM;;CAqDR,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.percent = void 0;
4
- const number_js_1 = require("../parser/number.cjs");
5
- const index_js_1 = require("../type-guard/index.cjs");
6
- const constants_js_1 = require("./constants.cjs");
7
- /**
8
- * 100 -> 100%
9
- * 99.123214412 -> 99.12%
10
- * 99.123214412 -> 99,12%
11
- */
12
- const percent = (value, settings) => {
13
- const numericValue = (0, number_js_1.number)(value, {
14
- ...settings,
15
- digits: settings?.digits ?? 2,
16
- fallback: Number.NaN,
17
- });
18
- if (index_js_1.typeGuard.isNumber(numericValue)) {
19
- const divider = settings?.divider ?? '.';
20
- const formattedPercent = divider === '.' ? numericValue : `${numericValue}`.replace('.', divider);
21
- return `${formattedPercent}${settings?.delimiter ?? ''}${settings?.symbol ?? '%'}`;
22
- }
23
- else {
24
- return settings?.emptyText ?? constants_js_1.NO_VALUE;
25
- }
26
- };
27
- exports.percent = percent;
@@ -1,15 +0,0 @@
1
- import { type NumberParserSettings } from "../parser/number.cjs";
2
- import type { Maybe } from "../utils/types.cjs";
3
- export interface PercentFormatSettings extends Omit<NumberParserSettings, 'fallback'> {
4
- divider?: string;
5
- delimiter?: string;
6
- symbol?: string;
7
- emptyText?: string;
8
- }
9
- /**
10
- * 100 -> 100%
11
- * 99.123214412 -> 99.12%
12
- * 99.123214412 -> 99,12%
13
- */
14
- export declare const percent: (value: Maybe<number | string>, settings?: PercentFormatSettings) => string;
15
- //# sourceMappingURL=percent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"percent.d.ts","sourceRoot":"","sources":["../../src/format/percent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAU,6BAA4B;AAExE,OAAO,KAAK,EAAE,KAAK,EAAE,2BAA0B;AAI/C,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAClB,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAC7B,WAAW,qBAAqB,WAkBjC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"percent.d.ts","sourceRoot":"","sources":["../../src/format/percent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAU,4BAA4B;AAExE,OAAO,KAAK,EAAE,KAAK,EAAE,0BAA0B;AAI/C,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAClB,OAAO,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAC7B,WAAW,qBAAqB,WAkBjC,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.skipSpaces = void 0;
4
- /**
5
- * Removes all spaces in string
6
- */
7
- const skipSpaces = (value) => value.replaceAll(/\s/g, '');
8
- exports.skipSpaces = skipSpaces;
@@ -1,5 +0,0 @@
1
- /**
2
- * Removes all spaces in string
3
- */
4
- export declare const skipSpaces: (value: string) => string;
5
- //# sourceMappingURL=skip-spaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skip-spaces.d.ts","sourceRoot":"","sources":["../../src/format/skip-spaces.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,WAAgC,CAAC"}