yummies 5.4.6 → 5.4.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 (508) hide show
  1. package/async.cjs +70 -0
  2. package/async.d.cts +28 -0
  3. package/async.d.cts.map +1 -0
  4. package/async.d.ts +28 -0
  5. package/async.d.ts.map +1 -0
  6. package/async.js +62 -0
  7. package/common.cjs +18 -0
  8. package/common.d.cts +15 -0
  9. package/common.d.cts.map +1 -0
  10. package/common.d.ts +15 -0
  11. package/common.d.ts.map +1 -0
  12. package/common.js +14 -0
  13. package/complex/counter.cjs +21 -0
  14. package/complex/counter.d.cts +15 -0
  15. package/complex/counter.d.cts.map +1 -0
  16. package/complex/counter.d.ts +15 -0
  17. package/complex/counter.d.ts.map +1 -0
  18. package/complex/counter.js +17 -0
  19. package/complex/global-config.cjs +46 -0
  20. package/complex/global-config.d.cts +11 -0
  21. package/complex/global-config.d.cts.map +1 -0
  22. package/complex/global-config.d.ts +11 -0
  23. package/complex/global-config.d.ts.map +1 -0
  24. package/complex/global-config.js +41 -0
  25. package/complex/index.cjs +19 -0
  26. package/complex/index.d.cts +4 -0
  27. package/complex/index.d.cts.map +1 -0
  28. package/complex/index.d.ts +4 -0
  29. package/complex/index.d.ts.map +1 -0
  30. package/complex/index.js +3 -0
  31. package/complex/modules-factory.cjs +50 -0
  32. package/complex/modules-factory.d.cts +49 -0
  33. package/complex/modules-factory.d.cts.map +1 -0
  34. package/complex/modules-factory.d.ts +49 -0
  35. package/complex/modules-factory.d.ts.map +1 -0
  36. package/complex/modules-factory.js +46 -0
  37. package/cookie.cjs +13 -0
  38. package/cookie.d.cts +3 -0
  39. package/cookie.d.cts.map +1 -0
  40. package/cookie.d.ts +3 -0
  41. package/cookie.d.ts.map +1 -0
  42. package/cookie.js +9 -0
  43. package/css.cjs +28 -0
  44. package/css.d.cts +36 -0
  45. package/css.d.cts.map +1 -0
  46. package/css.d.ts +36 -0
  47. package/css.d.ts.map +1 -0
  48. package/css.js +20 -0
  49. package/data.cjs +58 -0
  50. package/data.d.cts +4 -0
  51. package/data.d.cts.map +1 -0
  52. package/data.d.ts +4 -0
  53. package/data.d.ts.map +1 -0
  54. package/data.js +52 -0
  55. package/date-time.cjs +171 -0
  56. package/date-time.d.cts +28 -0
  57. package/date-time.d.cts.map +1 -0
  58. package/date-time.d.ts +28 -0
  59. package/date-time.d.ts.map +1 -0
  60. package/date-time.js +160 -0
  61. package/device.cjs +28 -0
  62. package/device.d.cts +8 -0
  63. package/device.d.cts.map +1 -0
  64. package/device.d.ts +8 -0
  65. package/device.d.ts.map +1 -0
  66. package/device.js +21 -0
  67. package/encodings.cjs +270 -0
  68. package/encodings.d.cts +2 -0
  69. package/encodings.d.cts.map +1 -0
  70. package/encodings.d.ts +2 -0
  71. package/encodings.d.ts.map +1 -0
  72. package/encodings.js +267 -0
  73. package/errors.cjs +34 -0
  74. package/errors.d.cts +19 -0
  75. package/errors.d.cts.map +1 -0
  76. package/errors.d.ts +19 -0
  77. package/errors.d.ts.map +1 -0
  78. package/errors.js +30 -0
  79. package/file.cjs +29 -0
  80. package/file.d.cts +3 -0
  81. package/file.d.cts.map +1 -0
  82. package/file.d.ts +3 -0
  83. package/file.d.ts.map +1 -0
  84. package/file.js +24 -0
  85. package/format/_exports.cjs +20 -0
  86. package/format/_exports.d.cts +5 -0
  87. package/format/_exports.d.cts.map +1 -0
  88. package/format/_exports.d.ts +5 -0
  89. package/format/_exports.d.ts.map +1 -0
  90. package/format/_exports.js +4 -0
  91. package/format/constants.cjs +6 -0
  92. package/format/constants.d.cts +4 -0
  93. package/format/constants.d.cts.map +1 -0
  94. package/format/constants.d.ts +4 -0
  95. package/format/constants.d.ts.map +1 -0
  96. package/{src/format/constants.ts → format/constants.js} +0 -2
  97. package/format/index.cjs +40 -0
  98. package/format/index.d.cts +3 -0
  99. package/format/index.d.cts.map +1 -0
  100. package/format/index.d.ts +3 -0
  101. package/format/index.d.ts.map +1 -0
  102. package/{src/format/index.ts → format/index.js} +1 -2
  103. package/format/number.cjs +48 -0
  104. package/format/number.d.cts +36 -0
  105. package/format/number.d.cts.map +1 -0
  106. package/format/number.d.ts +36 -0
  107. package/format/number.d.ts.map +1 -0
  108. package/format/number.js +44 -0
  109. package/format/percent.cjs +27 -0
  110. package/format/percent.d.cts +15 -0
  111. package/format/percent.d.cts.map +1 -0
  112. package/format/percent.d.ts +15 -0
  113. package/format/percent.d.ts.map +1 -0
  114. package/format/percent.js +23 -0
  115. package/format/skip-spaces.cjs +8 -0
  116. package/format/skip-spaces.d.cts +5 -0
  117. package/format/skip-spaces.d.cts.map +1 -0
  118. package/format/skip-spaces.d.ts +5 -0
  119. package/format/skip-spaces.d.ts.map +1 -0
  120. package/format/skip-spaces.js +4 -0
  121. package/html.cjs +202 -0
  122. package/html.d.cts +44 -0
  123. package/html.d.cts.map +1 -0
  124. package/html.d.ts +44 -0
  125. package/html.d.ts.map +1 -0
  126. package/html.js +182 -0
  127. package/id.cjs +76 -0
  128. package/id.d.cts +63 -0
  129. package/id.d.cts.map +1 -0
  130. package/id.d.ts +63 -0
  131. package/id.d.ts.map +1 -0
  132. package/{src/id.ts → id.js} +6 -16
  133. package/imports.cjs +45 -0
  134. package/imports.d.cts +15 -0
  135. package/imports.d.cts.map +1 -0
  136. package/imports.d.ts +15 -0
  137. package/imports.d.ts.map +1 -0
  138. package/imports.js +40 -0
  139. package/math.cjs +23 -0
  140. package/math.d.cts +13 -0
  141. package/math.d.cts.map +1 -0
  142. package/math.d.ts +13 -0
  143. package/math.d.ts.map +1 -0
  144. package/math.js +17 -0
  145. package/media.cjs +115 -0
  146. package/media.d.cts +20 -0
  147. package/media.d.cts.map +1 -0
  148. package/media.d.ts +20 -0
  149. package/media.d.ts.map +1 -0
  150. package/media.js +103 -0
  151. package/mobx/apply-observable.cjs +16 -0
  152. package/mobx/apply-observable.d.cts +4 -0
  153. package/mobx/apply-observable.d.cts.map +1 -0
  154. package/mobx/apply-observable.d.ts +4 -0
  155. package/mobx/apply-observable.d.ts.map +1 -0
  156. package/mobx/apply-observable.js +12 -0
  157. package/mobx/create-enhanced-atom.cjs +16 -0
  158. package/mobx/create-enhanced-atom.d.cts +11 -0
  159. package/mobx/create-enhanced-atom.d.cts.map +1 -0
  160. package/mobx/create-enhanced-atom.d.ts +11 -0
  161. package/mobx/create-enhanced-atom.d.ts.map +1 -0
  162. package/mobx/create-enhanced-atom.js +12 -0
  163. package/mobx/deep-observable-struct.cjs +61 -0
  164. package/mobx/deep-observable-struct.d.cts +7 -0
  165. package/mobx/deep-observable-struct.d.cts.map +1 -0
  166. package/mobx/deep-observable-struct.d.ts +7 -0
  167. package/mobx/deep-observable-struct.d.ts.map +1 -0
  168. package/mobx/deep-observable-struct.js +57 -0
  169. package/mobx/get-mobx-administration.cjs +6 -0
  170. package/mobx/get-mobx-administration.d.cts +6 -0
  171. package/mobx/get-mobx-administration.d.cts.map +1 -0
  172. package/mobx/get-mobx-administration.d.ts +6 -0
  173. package/mobx/get-mobx-administration.d.ts.map +1 -0
  174. package/mobx/get-mobx-administration.js +2 -0
  175. package/mobx/index.cjs +21 -0
  176. package/mobx/index.d.cts +6 -0
  177. package/mobx/index.d.cts.map +1 -0
  178. package/mobx/index.d.ts +6 -0
  179. package/mobx/index.d.ts.map +1 -0
  180. package/mobx/index.js +5 -0
  181. package/mobx/lazy-observe.cjs +47 -0
  182. package/mobx/lazy-observe.d.cts +8 -0
  183. package/mobx/lazy-observe.d.cts.map +1 -0
  184. package/mobx/lazy-observe.d.ts +8 -0
  185. package/mobx/lazy-observe.d.ts.map +1 -0
  186. package/mobx/lazy-observe.js +43 -0
  187. package/ms.cjs +22 -0
  188. package/ms.d.cts +19 -0
  189. package/ms.d.cts.map +1 -0
  190. package/ms.d.ts +19 -0
  191. package/ms.d.ts.map +1 -0
  192. package/ms.js +18 -0
  193. package/number.cjs +16 -0
  194. package/number.d.cts +8 -0
  195. package/number.d.cts.map +1 -0
  196. package/number.d.ts +8 -0
  197. package/number.d.ts.map +1 -0
  198. package/number.js +13 -0
  199. package/package.json +163 -5
  200. package/parser/_exports.cjs +19 -0
  201. package/parser/_exports.d.cts +4 -0
  202. package/parser/_exports.d.cts.map +1 -0
  203. package/parser/_exports.d.ts +4 -0
  204. package/parser/_exports.d.ts.map +1 -0
  205. package/parser/_exports.js +3 -0
  206. package/parser/index.cjs +40 -0
  207. package/parser/index.d.cts +3 -0
  208. package/parser/index.d.cts.map +1 -0
  209. package/parser/index.d.ts +3 -0
  210. package/parser/index.d.ts.map +1 -0
  211. package/{src/parser/index.ts → parser/index.js} +1 -2
  212. package/parser/number.cjs +48 -0
  213. package/parser/number.d.cts +21 -0
  214. package/parser/number.d.cts.map +1 -0
  215. package/parser/number.d.ts +21 -0
  216. package/parser/number.d.ts.map +1 -0
  217. package/parser/number.js +44 -0
  218. package/parser/percent.cjs +8 -0
  219. package/parser/percent.d.cts +4 -0
  220. package/parser/percent.d.cts.map +1 -0
  221. package/parser/percent.d.ts +4 -0
  222. package/parser/percent.d.ts.map +1 -0
  223. package/parser/percent.js +4 -0
  224. package/parser/string.cjs +18 -0
  225. package/parser/string.d.cts +7 -0
  226. package/parser/string.d.cts.map +1 -0
  227. package/parser/string.d.ts +7 -0
  228. package/parser/string.d.ts.map +1 -0
  229. package/parser/string.js +14 -0
  230. package/price.cjs +21 -0
  231. package/price.d.cts +6 -0
  232. package/price.d.cts.map +1 -0
  233. package/price.d.ts +6 -0
  234. package/price.d.ts.map +1 -0
  235. package/price.js +17 -0
  236. package/random.cjs +25 -0
  237. package/random.d.cts +9 -0
  238. package/random.d.cts.map +1 -0
  239. package/random.d.ts +9 -0
  240. package/random.d.ts.map +1 -0
  241. package/random.js +14 -0
  242. package/react/hooks/index.cjs +37 -0
  243. package/react/hooks/index.d.cts +22 -0
  244. package/react/hooks/index.d.cts.map +1 -0
  245. package/react/hooks/index.d.ts +22 -0
  246. package/react/hooks/index.d.ts.map +1 -0
  247. package/react/hooks/index.js +21 -0
  248. package/react/hooks/use-abort-controller.cjs +15 -0
  249. package/react/hooks/use-abort-controller.d.cts +2 -0
  250. package/react/hooks/use-abort-controller.d.cts.map +1 -0
  251. package/react/hooks/use-abort-controller.d.ts +2 -0
  252. package/react/hooks/use-abort-controller.d.ts.map +1 -0
  253. package/react/hooks/use-abort-controller.js +11 -0
  254. package/react/hooks/use-abort-signal.cjs +8 -0
  255. package/react/hooks/use-abort-signal.d.cts +2 -0
  256. package/react/hooks/use-abort-signal.d.cts.map +1 -0
  257. package/react/hooks/use-abort-signal.d.ts +2 -0
  258. package/react/hooks/use-abort-signal.d.ts.map +1 -0
  259. package/react/hooks/use-abort-signal.js +4 -0
  260. package/react/hooks/use-click-outside.cjs +17 -0
  261. package/react/hooks/use-click-outside.d.cts +9 -0
  262. package/react/hooks/use-click-outside.d.cts.map +1 -0
  263. package/react/hooks/use-click-outside.d.ts +9 -0
  264. package/react/hooks/use-click-outside.d.ts.map +1 -0
  265. package/react/hooks/use-click-outside.js +13 -0
  266. package/react/hooks/use-constant.cjs +19 -0
  267. package/react/hooks/use-constant.d.cts +9 -0
  268. package/react/hooks/use-constant.d.cts.map +1 -0
  269. package/react/hooks/use-constant.d.ts +9 -0
  270. package/react/hooks/use-constant.d.ts.map +1 -0
  271. package/{src/react/hooks/use-constant.ts → react/hooks/use-constant.js} +6 -9
  272. package/react/hooks/use-define-ref.cjs +19 -0
  273. package/react/hooks/use-define-ref.d.cts +10 -0
  274. package/react/hooks/use-define-ref.d.cts.map +1 -0
  275. package/react/hooks/use-define-ref.d.ts +10 -0
  276. package/react/hooks/use-define-ref.d.ts.map +1 -0
  277. package/{src/react/hooks/use-define-ref.ts → react/hooks/use-define-ref.js} +7 -10
  278. package/react/hooks/use-element-ref.cjs +12 -0
  279. package/react/hooks/use-element-ref.d.cts +2 -0
  280. package/react/hooks/use-element-ref.d.cts.map +1 -0
  281. package/react/hooks/use-element-ref.d.ts +2 -0
  282. package/react/hooks/use-element-ref.d.ts.map +1 -0
  283. package/react/hooks/use-element-ref.js +8 -0
  284. package/react/hooks/use-event-listener.cjs +17 -0
  285. package/react/hooks/use-event-listener.d.cts +8 -0
  286. package/react/hooks/use-event-listener.d.cts.map +1 -0
  287. package/react/hooks/use-event-listener.d.ts +8 -0
  288. package/react/hooks/use-event-listener.d.ts.map +1 -0
  289. package/react/hooks/use-event-listener.js +13 -0
  290. package/react/hooks/use-event.cjs +23 -0
  291. package/react/hooks/use-event.d.cts +3 -0
  292. package/react/hooks/use-event.d.cts.map +1 -0
  293. package/react/hooks/use-event.d.ts +3 -0
  294. package/react/hooks/use-event.d.ts.map +1 -0
  295. package/react/hooks/use-event.js +19 -0
  296. package/react/hooks/use-flag.cjs +19 -0
  297. package/react/hooks/use-flag.d.cts +8 -0
  298. package/react/hooks/use-flag.d.cts.map +1 -0
  299. package/react/hooks/use-flag.d.ts +8 -0
  300. package/react/hooks/use-flag.d.ts.map +1 -0
  301. package/react/hooks/use-flag.js +15 -0
  302. package/react/hooks/use-force-update.cjs +11 -0
  303. package/react/hooks/use-force-update.d.cts +2 -0
  304. package/react/hooks/use-force-update.d.cts.map +1 -0
  305. package/react/hooks/use-force-update.d.ts +2 -0
  306. package/react/hooks/use-force-update.d.ts.map +1 -0
  307. package/react/hooks/use-force-update.js +7 -0
  308. package/react/hooks/use-initial-height.cjs +15 -0
  309. package/react/hooks/use-initial-height.d.cts +5 -0
  310. package/react/hooks/use-initial-height.d.cts.map +1 -0
  311. package/react/hooks/use-initial-height.d.ts +5 -0
  312. package/react/hooks/use-initial-height.d.ts.map +1 -0
  313. package/react/hooks/use-initial-height.js +11 -0
  314. package/react/hooks/use-instance.cjs +31 -0
  315. package/react/hooks/use-instance.d.cts +27 -0
  316. package/react/hooks/use-instance.d.cts.map +1 -0
  317. package/react/hooks/use-instance.d.ts +27 -0
  318. package/react/hooks/use-instance.d.ts.map +1 -0
  319. package/{src/react/hooks/use-instance.ts → react/hooks/use-instance.js} +9 -31
  320. package/react/hooks/use-intersection-observer.cjs +14 -0
  321. package/react/hooks/use-intersection-observer.d.cts +2 -0
  322. package/react/hooks/use-intersection-observer.d.cts.map +1 -0
  323. package/react/hooks/use-intersection-observer.d.ts +2 -0
  324. package/react/hooks/use-intersection-observer.d.ts.map +1 -0
  325. package/react/hooks/use-intersection-observer.js +10 -0
  326. package/react/hooks/use-last-defined-value.cjs +12 -0
  327. package/react/hooks/use-last-defined-value.d.cts +2 -0
  328. package/react/hooks/use-last-defined-value.d.cts.map +1 -0
  329. package/react/hooks/use-last-defined-value.d.ts +2 -0
  330. package/react/hooks/use-last-defined-value.d.ts.map +1 -0
  331. package/react/hooks/use-last-defined-value.js +8 -0
  332. package/react/hooks/use-last-value-ref.cjs +12 -0
  333. package/react/hooks/use-last-value-ref.d.cts +2 -0
  334. package/react/hooks/use-last-value-ref.d.cts.map +1 -0
  335. package/react/hooks/use-last-value-ref.d.ts +2 -0
  336. package/react/hooks/use-last-value-ref.d.ts.map +1 -0
  337. package/react/hooks/use-last-value-ref.js +8 -0
  338. package/react/hooks/use-life-cycle.cjs +14 -0
  339. package/react/hooks/use-life-cycle.d.cts +5 -0
  340. package/react/hooks/use-life-cycle.d.cts.map +1 -0
  341. package/react/hooks/use-life-cycle.d.ts +5 -0
  342. package/react/hooks/use-life-cycle.d.ts.map +1 -0
  343. package/react/hooks/use-life-cycle.js +10 -0
  344. package/react/hooks/use-resize-observer.cjs +15 -0
  345. package/react/hooks/use-resize-observer.d.cts +2 -0
  346. package/react/hooks/use-resize-observer.d.cts.map +1 -0
  347. package/react/hooks/use-resize-observer.d.ts +2 -0
  348. package/react/hooks/use-resize-observer.d.ts.map +1 -0
  349. package/react/hooks/use-resize-observer.js +11 -0
  350. package/react/hooks/use-sync-ref.cjs +10 -0
  351. package/react/hooks/use-sync-ref.d.cts +2 -0
  352. package/react/hooks/use-sync-ref.d.cts.map +1 -0
  353. package/react/hooks/use-sync-ref.d.ts +2 -0
  354. package/react/hooks/use-sync-ref.d.ts.map +1 -0
  355. package/react/hooks/use-sync-ref.js +6 -0
  356. package/react/hooks/use-toggle.cjs +10 -0
  357. package/react/hooks/use-toggle.d.cts +2 -0
  358. package/react/hooks/use-toggle.d.cts.map +1 -0
  359. package/react/hooks/use-toggle.d.ts +2 -0
  360. package/react/hooks/use-toggle.d.ts.map +1 -0
  361. package/react/hooks/use-toggle.js +6 -0
  362. package/react/hooks/use-value.cjs +12 -0
  363. package/react/hooks/use-value.d.cts +5 -0
  364. package/react/hooks/use-value.d.cts.map +1 -0
  365. package/react/hooks/use-value.d.ts +5 -0
  366. package/react/hooks/use-value.d.ts.map +1 -0
  367. package/react/hooks/use-value.js +8 -0
  368. package/react/hooks/use-visibility-state.cjs +18 -0
  369. package/react/hooks/use-visibility-state.d.cts +2 -0
  370. package/react/hooks/use-visibility-state.d.cts.map +1 -0
  371. package/react/hooks/use-visibility-state.d.ts +2 -0
  372. package/react/hooks/use-visibility-state.d.ts.map +1 -0
  373. package/react/hooks/use-visibility-state.js +14 -0
  374. package/react/index.cjs +17 -0
  375. package/react/index.d.cts +2 -0
  376. package/react/index.d.cts.map +1 -0
  377. package/react/index.d.ts +2 -0
  378. package/react/index.d.ts.map +1 -0
  379. package/react/index.js +1 -0
  380. package/sound.cjs +16 -0
  381. package/sound.d.cts +7 -0
  382. package/sound.d.cts.map +1 -0
  383. package/sound.d.ts +7 -0
  384. package/sound.d.ts.map +1 -0
  385. package/sound.js +12 -0
  386. package/storage.cjs +48 -0
  387. package/storage.d.cts +39 -0
  388. package/storage.d.cts.map +1 -0
  389. package/storage.d.ts +39 -0
  390. package/storage.d.ts.map +1 -0
  391. package/storage.js +43 -0
  392. package/text.cjs +53 -0
  393. package/text.d.cts +15 -0
  394. package/text.d.cts.map +1 -0
  395. package/text.d.ts +15 -0
  396. package/text.d.ts.map +1 -0
  397. package/text.js +48 -0
  398. package/type-guard/_exports.cjs +129 -0
  399. package/type-guard/_exports.d.cts +86 -0
  400. package/type-guard/_exports.d.cts.map +1 -0
  401. package/type-guard/_exports.d.ts +86 -0
  402. package/type-guard/_exports.d.ts.map +1 -0
  403. package/type-guard/_exports.js +125 -0
  404. package/type-guard/index.cjs +40 -0
  405. package/type-guard/index.d.cts +3 -0
  406. package/type-guard/index.d.cts.map +1 -0
  407. package/type-guard/index.d.ts +3 -0
  408. package/type-guard/index.d.ts.map +1 -0
  409. package/{src/type-guard/index.ts → type-guard/index.js} +1 -2
  410. package/utility-types.d.ts +396 -0
  411. package/utils/types.cjs +2 -0
  412. package/utils/types.d.cts +395 -0
  413. package/utils/types.d.cts.map +1 -0
  414. package/utils/types.d.ts +395 -0
  415. package/utils/types.d.ts.map +1 -0
  416. package/utils/types.js +1 -0
  417. package/vibrate.cjs +12 -0
  418. package/vibrate.d.cts +5 -0
  419. package/vibrate.d.cts.map +1 -0
  420. package/vibrate.d.ts +5 -0
  421. package/vibrate.d.ts.map +1 -0
  422. package/vibrate.js +8 -0
  423. package/.changeset/README.md +0 -8
  424. package/.changeset/config.json +0 -11
  425. package/.github/FUNDING.yml +0 -1
  426. package/.github/workflows/main.yml +0 -34
  427. package/.github/workflows/version-or-publish.yml +0 -45
  428. package/.nvmrc +0 -1
  429. package/.vscode/settings.json +0 -19
  430. package/CHANGELOG.md +0 -215
  431. package/CONTRIBUTING.md +0 -8
  432. package/Makefile +0 -7
  433. package/biome.json +0 -3
  434. package/commitfmt.toml +0 -18
  435. package/lefthook.yml +0 -14
  436. package/scripts/post-build.ts +0 -71
  437. package/src/async.ts +0 -86
  438. package/src/common.ts +0 -26
  439. package/src/complex/counter.test.ts +0 -41
  440. package/src/complex/counter.ts +0 -40
  441. package/src/complex/global-config.ts +0 -55
  442. package/src/complex/index.ts +0 -3
  443. package/src/complex/modules-factory.ts +0 -65
  444. package/src/cookie.ts +0 -11
  445. package/src/css.ts +0 -60
  446. package/src/data.test.ts +0 -99
  447. package/src/data.ts +0 -65
  448. package/src/date-time.test.ts +0 -119
  449. package/src/date-time.ts +0 -236
  450. package/src/device.ts +0 -42
  451. package/src/encodings.ts +0 -270
  452. package/src/errors.ts +0 -40
  453. package/src/file.ts +0 -25
  454. package/src/format/_exports.ts +0 -4
  455. package/src/format/number.test.ts +0 -16
  456. package/src/format/number.ts +0 -96
  457. package/src/format/percent.ts +0 -40
  458. package/src/format/skip-spaces.ts +0 -4
  459. package/src/html.ts +0 -238
  460. package/src/imports.ts +0 -52
  461. package/src/math.ts +0 -20
  462. package/src/media.ts +0 -134
  463. package/src/mobx/apply-observable.ts +0 -20
  464. package/src/mobx/create-enhanced-atom.ts +0 -28
  465. package/src/mobx/deep-observable-struct.test.ts +0 -69
  466. package/src/mobx/deep-observable-struct.ts +0 -69
  467. package/src/mobx/get-mobx-administration.ts +0 -10
  468. package/src/mobx/index.ts +0 -5
  469. package/src/mobx/lazy-observe.ts +0 -59
  470. package/src/ms.ts +0 -20
  471. package/src/number.ts +0 -14
  472. package/src/parser/_exports.ts +0 -3
  473. package/src/parser/number.test.ts +0 -38
  474. package/src/parser/number.ts +0 -73
  475. package/src/parser/percent.ts +0 -11
  476. package/src/parser/string.ts +0 -29
  477. package/src/price.ts +0 -33
  478. package/src/random.ts +0 -27
  479. package/src/react/hooks/index.ts +0 -21
  480. package/src/react/hooks/use-abort-controller.ts +0 -15
  481. package/src/react/hooks/use-abort-signal.ts +0 -5
  482. package/src/react/hooks/use-click-outside.ts +0 -27
  483. package/src/react/hooks/use-element-ref.ts +0 -11
  484. package/src/react/hooks/use-event-listener.ts +0 -29
  485. package/src/react/hooks/use-event.ts +0 -23
  486. package/src/react/hooks/use-flag.ts +0 -27
  487. package/src/react/hooks/use-force-update.ts +0 -9
  488. package/src/react/hooks/use-initial-height.ts +0 -16
  489. package/src/react/hooks/use-intersection-observer.ts +0 -18
  490. package/src/react/hooks/use-last-defined-value.ts +0 -9
  491. package/src/react/hooks/use-last-value-ref.ts +0 -11
  492. package/src/react/hooks/use-life-cycle.ts +0 -17
  493. package/src/react/hooks/use-resize-observer.ts +0 -14
  494. package/src/react/hooks/use-sync-ref.ts +0 -7
  495. package/src/react/hooks/use-toggle.ts +0 -9
  496. package/src/react/hooks/use-value.ts +0 -10
  497. package/src/react/hooks/use-visibility-state.ts +0 -19
  498. package/src/react/index.ts +0 -1
  499. package/src/sound.ts +0 -15
  500. package/src/storage.ts +0 -137
  501. package/src/text.test.ts +0 -91
  502. package/src/text.ts +0 -60
  503. package/src/type-guard/_exports.ts +0 -154
  504. package/src/type-guard/index.test.ts +0 -127
  505. package/src/vibrate.ts +0 -8
  506. package/tsconfig.json +0 -26
  507. package/tsconfig.test.json +0 -33
  508. package/vitest.config.ts +0 -20
package/date-time.js ADDED
@@ -0,0 +1,160 @@
1
+ import dayjs from 'dayjs';
2
+ import duration from 'dayjs/plugin/duration.js';
3
+ import relativeTime from 'dayjs/plugin/relativeTime.js';
4
+ import { format } from "./format/index.js";
5
+ import { unitsToMs } from "./ms.js";
6
+ import { declension } from "./text.js";
7
+ import { typeGuard } from "./type-guard/index.js";
8
+ import 'dayjs/locale/ru.js';
9
+ dayjs.extend(relativeTime);
10
+ dayjs.extend(duration);
11
+ dayjs.locale('ru');
12
+ const toLibFormat = (value, asTime) => {
13
+ if (typeGuard.isNumber(value)) {
14
+ if (asTime) {
15
+ return dayjs.duration(value);
16
+ }
17
+ return dayjs(value);
18
+ }
19
+ else if (dayjs.isDayjs(value)) {
20
+ return value;
21
+ }
22
+ else {
23
+ return dayjs(value);
24
+ }
25
+ };
26
+ export const formatDate = (value, settings) => {
27
+ const dateFormat = settings?.format;
28
+ const datePattern = settings?.pattern;
29
+ const asTime = settings?.asTime;
30
+ value = toLibFormat(value, asTime);
31
+ if (typeGuard.isUndefined(value) || !value.isValid()) {
32
+ return format.NO_VALUE;
33
+ }
34
+ if (datePattern) {
35
+ return value.format(datePattern);
36
+ }
37
+ switch (dateFormat) {
38
+ case 'human': {
39
+ return value.fromNow();
40
+ }
41
+ case 'spent-time': {
42
+ return value.fromNow(true);
43
+ }
44
+ case 'full': {
45
+ return value.format('DD MMM YYYY HH:mm:ss');
46
+ }
47
+ case 'short': {
48
+ return value.format('DD MMM HH:mm');
49
+ }
50
+ case 'time': {
51
+ return value.format('HH:mm:ss');
52
+ }
53
+ case 'time-short': {
54
+ return value.format('HH:mm');
55
+ }
56
+ case 'day': {
57
+ return value.format('DD MMM YYYY');
58
+ }
59
+ case 'month': {
60
+ return value.format('MMMM YYYY');
61
+ }
62
+ default: {
63
+ return value.format('DD.MM.YYYY');
64
+ }
65
+ }
66
+ };
67
+ export const dayTimeDuration = (timeInMs) => {
68
+ let left = Math.max(timeInMs, 0);
69
+ const days = Math.floor(left / unitsToMs.day);
70
+ left = left % unitsToMs.day;
71
+ const hours = Math.floor(left / unitsToMs.hour);
72
+ left = left % unitsToMs.hour;
73
+ const minutes = Math.floor(left / unitsToMs.min);
74
+ left = left % unitsToMs.min;
75
+ const seconds = Math.floor(left / unitsToMs.sec);
76
+ left = left % unitsToMs.sec;
77
+ const milliseconds = Math.floor(left);
78
+ return {
79
+ days,
80
+ hours,
81
+ minutes,
82
+ seconds,
83
+ milliseconds,
84
+ };
85
+ };
86
+ export const changeDate = (date, ...args) => {
87
+ let wrappedDate = toLibFormat(date);
88
+ for (let i = 0; i < args.length; i += 2) {
89
+ const amount = args[i];
90
+ const unit = args[i + 1];
91
+ if (unit != null) {
92
+ wrappedDate = wrappedDate.add(amount, unit);
93
+ }
94
+ }
95
+ return wrappedDate.toDate();
96
+ };
97
+ export const timeDuration = (timeInMs) => {
98
+ const { days, hours, milliseconds, minutes, seconds } = dayTimeDuration(timeInMs);
99
+ return {
100
+ hours: hours + unitsToMs.day * days,
101
+ milliseconds,
102
+ minutes,
103
+ seconds,
104
+ };
105
+ };
106
+ const durationFormatLabels = {
107
+ days: { compact: 'д', full: ['день', 'дня', 'дней'] },
108
+ hours: { compact: 'ч', full: ['час', 'часа', 'часов'] },
109
+ minutes: { compact: 'мин', full: ['минута', 'минуты', 'минут'] },
110
+ seconds: { compact: 'сек', full: ['секунда', 'секунды', 'секунд'] },
111
+ };
112
+ export function getFormatDuration(...args) {
113
+ let compact = false;
114
+ let diff = 0;
115
+ if (args[0] instanceof Date) {
116
+ const startedDate = dayjs(args[0]);
117
+ const endedDate = dayjs(args[1]);
118
+ diff = endedDate.diff(startedDate, 'ms');
119
+ compact = args[2] === true;
120
+ }
121
+ else {
122
+ diff = args[0];
123
+ compact = args[1] === true;
124
+ }
125
+ const { days, hours, minutes, seconds } = dayTimeDuration(diff);
126
+ const formattedParts = [];
127
+ if (days) {
128
+ if (compact) {
129
+ formattedParts.push(`${days} ${durationFormatLabels.days.compact}`);
130
+ }
131
+ else {
132
+ formattedParts.push(`${days} ${declension(days, durationFormatLabels.days.full)}`);
133
+ }
134
+ }
135
+ if (hours) {
136
+ if (compact) {
137
+ formattedParts.push(`${hours} ${durationFormatLabels.hours.compact}`);
138
+ }
139
+ else {
140
+ formattedParts.push(`${hours} ${declension(hours, durationFormatLabels.hours.full)}`);
141
+ }
142
+ }
143
+ if (minutes) {
144
+ if (compact) {
145
+ formattedParts.push(`${minutes} ${durationFormatLabels.minutes.compact}`);
146
+ }
147
+ else {
148
+ formattedParts.push(`${minutes} ${declension(minutes, durationFormatLabels.minutes.full)}`);
149
+ }
150
+ }
151
+ if (seconds) {
152
+ if (compact) {
153
+ formattedParts.push(`${seconds} ${durationFormatLabels.seconds.compact}`);
154
+ }
155
+ else {
156
+ formattedParts.push(`${seconds} ${declension(seconds, durationFormatLabels.seconds.full)}`);
157
+ }
158
+ }
159
+ return formattedParts.join(' ');
160
+ }
package/device.cjs ADDED
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTouchDevice = exports.isTabletDevice = exports.isMobileDevice = exports.checkIsTouchDevice = exports.checkIsTabletDevice = exports.checkIsMobileDevice = exports.getUserAgent = void 0;
4
+ const getUserAgent = () => (navigator.userAgent ||
5
+ navigator.vendor ||
6
+ // @ts-expect-error skip opera
7
+ globalThis.opera ||
8
+ '').toLowerCase();
9
+ exports.getUserAgent = getUserAgent;
10
+ const checkIsMobileDevice = () => {
11
+ const userAgent = (0, exports.getUserAgent)();
12
+ if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent || '') ||
13
+ /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test((userAgent || '').slice(0, 4))) {
14
+ return true;
15
+ }
16
+ return false;
17
+ };
18
+ exports.checkIsMobileDevice = checkIsMobileDevice;
19
+ const checkIsTabletDevice = () => {
20
+ const userAgent = (0, exports.getUserAgent)();
21
+ return /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(userAgent);
22
+ };
23
+ exports.checkIsTabletDevice = checkIsTabletDevice;
24
+ const checkIsTouchDevice = () => (0, exports.checkIsMobileDevice)() || (0, exports.checkIsTabletDevice)();
25
+ exports.checkIsTouchDevice = checkIsTouchDevice;
26
+ exports.isMobileDevice = (0, exports.checkIsMobileDevice)();
27
+ exports.isTabletDevice = (0, exports.checkIsTabletDevice)();
28
+ exports.isTouchDevice = exports.isMobileDevice || exports.isTabletDevice;
package/device.d.cts ADDED
@@ -0,0 +1,8 @@
1
+ export declare const getUserAgent: () => any;
2
+ export declare const checkIsMobileDevice: () => boolean;
3
+ export declare const checkIsTabletDevice: () => boolean;
4
+ export declare const checkIsTouchDevice: () => boolean;
5
+ export declare const isMobileDevice: boolean;
6
+ export declare const isTabletDevice: boolean;
7
+ export declare const isTouchDevice: boolean;
8
+ //# sourceMappingURL=device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,WAOR,CAAC;AAElB,eAAO,MAAM,mBAAmB,eAe/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAM/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,eACiB,CAAC;AAEjD,eAAO,MAAM,cAAc,SAAwB,CAAC;AAEpD,eAAO,MAAM,cAAc,SAAwB,CAAC;AAEpD,eAAO,MAAM,aAAa,SAAmC,CAAC"}
package/device.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ export declare const getUserAgent: () => any;
2
+ export declare const checkIsMobileDevice: () => boolean;
3
+ export declare const checkIsTabletDevice: () => boolean;
4
+ export declare const checkIsTouchDevice: () => boolean;
5
+ export declare const isMobileDevice: boolean;
6
+ export declare const isTabletDevice: boolean;
7
+ export declare const isTouchDevice: boolean;
8
+ //# sourceMappingURL=device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../src/device.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,WAOR,CAAC;AAElB,eAAO,MAAM,mBAAmB,eAe/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAM/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,eACiB,CAAC;AAEjD,eAAO,MAAM,cAAc,SAAwB,CAAC;AAEpD,eAAO,MAAM,cAAc,SAAwB,CAAC;AAEpD,eAAO,MAAM,aAAa,SAAmC,CAAC"}
package/device.js ADDED
@@ -0,0 +1,21 @@
1
+ export const getUserAgent = () => (navigator.userAgent ||
2
+ navigator.vendor ||
3
+ // @ts-expect-error skip opera
4
+ globalThis.opera ||
5
+ '').toLowerCase();
6
+ export const checkIsMobileDevice = () => {
7
+ const userAgent = getUserAgent();
8
+ if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(userAgent || '') ||
9
+ /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test((userAgent || '').slice(0, 4))) {
10
+ return true;
11
+ }
12
+ return false;
13
+ };
14
+ export const checkIsTabletDevice = () => {
15
+ const userAgent = getUserAgent();
16
+ return /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(userAgent);
17
+ };
18
+ export const checkIsTouchDevice = () => checkIsMobileDevice() || checkIsTabletDevice();
19
+ export const isMobileDevice = checkIsMobileDevice();
20
+ export const isTabletDevice = checkIsTabletDevice();
21
+ export const isTouchDevice = isMobileDevice || isTabletDevice;
package/encodings.cjs ADDED
@@ -0,0 +1,270 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ export declare function unicodeToWin1251(s: string): string;
2
+ //# sourceMappingURL=encodings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodings.d.ts","sourceRoot":"","sources":["../src/encodings.ts"],"names":[],"mappings":"AAoQA,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,UASzC"}
package/encodings.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare function unicodeToWin1251(s: string): string;
2
+ //# sourceMappingURL=encodings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encodings.d.ts","sourceRoot":"","sources":["../src/encodings.ts"],"names":[],"mappings":"AAoQA,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,UASzC"}