@obr-fe/utils 1.2.0 → 2.0.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 (419) hide show
  1. package/dist/array.d.mts +98 -3
  2. package/dist/{array-CiSUhZCW.d.mts → array.d.ts} +8 -9
  3. package/dist/array.js +1 -0
  4. package/dist/array.mjs +1 -1
  5. package/dist/base.d.mts +192 -3
  6. package/dist/{base-BXKvmcaf.d.cts → base.d.ts} +4 -5
  7. package/dist/base.js +1 -0
  8. package/dist/base.mjs +1 -1
  9. package/dist/chunk-3EVCK72A.mjs +1 -0
  10. package/dist/chunk-44EYU7QJ.mjs +1 -0
  11. package/dist/chunk-4JPCGRPU.mjs +1 -0
  12. package/dist/chunk-6DX7ZFGR.mjs +1 -0
  13. package/dist/chunk-7FGMUEZA.mjs +1 -0
  14. package/dist/chunk-7YMDSJIW.mjs +1 -0
  15. package/dist/chunk-A25LR755.mjs +1 -0
  16. package/dist/chunk-A5BXGBYT.mjs +1 -0
  17. package/dist/chunk-AMTPTGPU.mjs +1 -0
  18. package/dist/chunk-BEM6E7R7.mjs +1 -0
  19. package/dist/chunk-BPXO4V4X.mjs +1 -0
  20. package/dist/chunk-CTKIL4BL.mjs +1 -0
  21. package/dist/chunk-DDHFJKTT.mjs +1 -0
  22. package/dist/chunk-DKKF6DRJ.mjs +1 -0
  23. package/dist/chunk-DVMX6FDA.mjs +1 -0
  24. package/dist/chunk-E4SEMOGO.mjs +1 -0
  25. package/dist/chunk-EUDEMS67.mjs +1 -0
  26. package/dist/chunk-G6NAYP42.mjs +1 -0
  27. package/dist/chunk-GS4ARDQV.mjs +1 -0
  28. package/dist/chunk-HOXWKSQ2.mjs +1 -0
  29. package/dist/chunk-HZMHGGXU.mjs +1 -0
  30. package/dist/chunk-INFFTHYR.mjs +1 -0
  31. package/dist/chunk-IZHCWZIN.mjs +1 -0
  32. package/dist/chunk-KGXCJWE5.mjs +1 -0
  33. package/dist/chunk-LPLK3ZT5.mjs +1 -0
  34. package/dist/chunk-MQBXN7R5.mjs +1 -0
  35. package/dist/chunk-MUHFPVB3.mjs +1 -0
  36. package/dist/chunk-MUUIQW2M.mjs +1 -0
  37. package/dist/chunk-NX2HGAYK.mjs +1 -0
  38. package/dist/chunk-PE3DNHCL.mjs +1 -0
  39. package/dist/chunk-PK5CYIDE.mjs +1 -0
  40. package/dist/chunk-SAXMBV46.mjs +1 -0
  41. package/dist/chunk-TQ5GXPYB.mjs +1 -0
  42. package/dist/chunk-UVMLBW6A.mjs +1 -0
  43. package/dist/chunk-VYAKT4FB.mjs +1 -0
  44. package/dist/chunk-WN7L4HYY.mjs +1 -0
  45. package/dist/chunk-X7TUTCBW.mjs +1 -0
  46. package/dist/chunk-YA66RVVU.mjs +1 -0
  47. package/dist/clipboard.d.mts +3 -2
  48. package/dist/clipboard.d.ts +3 -0
  49. package/dist/clipboard.js +1 -0
  50. package/dist/clipboard.mjs +1 -1
  51. package/dist/dayjs.d.mts +29 -2
  52. package/dist/{dayjs-DgS65bx1.d.cts → dayjs.d.ts} +5 -6
  53. package/dist/dayjs.js +1 -0
  54. package/dist/dayjs.mjs +1 -1
  55. package/dist/dom/base.d.mts +24 -2
  56. package/dist/{base-Ca2FN16G.d.mts → dom/base.d.ts} +2 -3
  57. package/dist/dom/base.js +1 -0
  58. package/dist/dom/base.mjs +1 -1
  59. package/dist/dom/class.d.mts +26 -2
  60. package/dist/{class-Bp70Yi1y.d.cts → dom/class.d.ts} +2 -3
  61. package/dist/dom/class.js +1 -0
  62. package/dist/dom/class.mjs +1 -1
  63. package/dist/dom/contains.d.mts +10 -2
  64. package/dist/{contains-Bj-oQ7KI.d.mts → dom/contains.d.ts} +2 -3
  65. package/dist/dom/contains.js +1 -0
  66. package/dist/dom/contains.mjs +1 -1
  67. package/dist/dom/css.d.mts +22 -2
  68. package/dist/{css-5xR1zP0f.d.cts → dom/css.d.ts} +10 -11
  69. package/dist/dom/css.js +1 -0
  70. package/dist/dom/css.mjs +1 -1
  71. package/dist/dom/dynamic-css.d.mts +20 -2
  72. package/dist/{dynamic-css-CIw8ZtwR.d.cts → dom/dynamic-css.d.ts} +8 -9
  73. package/dist/dom/dynamic-css.js +1 -0
  74. package/dist/dom/dynamic-css.mjs +1 -1
  75. package/dist/dom/find-dom-node.d.mts +3 -2
  76. package/dist/dom/find-dom-node.d.ts +3 -0
  77. package/dist/dom/find-dom-node.js +1 -0
  78. package/dist/dom/find-dom-node.mjs +1 -1
  79. package/dist/dom/focus.d.mts +10 -2
  80. package/dist/{focus-BBcVAsFx.d.cts → dom/focus.d.ts} +2 -3
  81. package/dist/dom/focus.js +1 -0
  82. package/dist/dom/focus.mjs +1 -1
  83. package/dist/dom/iframe.d.mts +57 -2
  84. package/dist/{iframe-CBeiHcmx.d.mts → dom/iframe.d.ts} +15 -16
  85. package/dist/dom/iframe.js +1 -0
  86. package/dist/dom/iframe.mjs +1 -1
  87. package/dist/dom/index.d.mts +17 -18
  88. package/dist/dom/index.d.ts +17 -0
  89. package/dist/dom/index.js +1 -0
  90. package/dist/dom/index.mjs +1 -1
  91. package/dist/dom/is-visible.d.mts +3 -2
  92. package/dist/dom/is-visible.d.ts +3 -0
  93. package/dist/dom/is-visible.js +1 -0
  94. package/dist/dom/is-visible.mjs +1 -1
  95. package/dist/dom/lib/can-use-dom.d.mts +2 -3
  96. package/dist/dom/lib/can-use-dom.d.ts +3 -0
  97. package/dist/dom/lib/can-use-dom.js +1 -0
  98. package/dist/dom/lib/can-use-dom.mjs +1 -1
  99. package/dist/dom/scrollbar.d.mts +8 -2
  100. package/dist/{scrollbar-B0PNF6i2.d.mts → dom/scrollbar.d.ts} +2 -3
  101. package/dist/dom/scrollbar.js +1 -0
  102. package/dist/dom/scrollbar.mjs +1 -1
  103. package/dist/dom/storage.d.mts +20 -3
  104. package/dist/{storage-DicI9wsP.d.cts → dom/storage.d.ts} +4 -5
  105. package/dist/dom/storage.js +1 -0
  106. package/dist/dom/storage.mjs +1 -1
  107. package/dist/dom/style-checker.d.mts +4 -2
  108. package/dist/{style-checker-CpyAZJew.d.cts → dom/style-checker.d.ts} +2 -3
  109. package/dist/dom/style-checker.js +1 -0
  110. package/dist/dom/style-checker.mjs +1 -1
  111. package/dist/dom/style-names.d.mts +3 -2
  112. package/dist/{style-names-ClFu2pk1.d.cts → dom/style-names.d.ts} +2 -3
  113. package/dist/dom/style-names.js +1 -0
  114. package/dist/dom/style-names.mjs +1 -1
  115. package/dist/dom/support.d.mts +8 -2
  116. package/dist/dom/support.d.ts +8 -0
  117. package/dist/dom/support.js +1 -0
  118. package/dist/dom/support.mjs +1 -1
  119. package/dist/dom/video.d.mts +9 -2
  120. package/dist/{video-Bp6NaeX6.d.cts → dom/video.d.ts} +2 -3
  121. package/dist/dom/video.js +1 -0
  122. package/dist/dom/video.mjs +1 -1
  123. package/dist/encrypt.d.mts +28 -2
  124. package/dist/{encrypt-BFDBlSX_.d.cts → encrypt.d.ts} +2 -3
  125. package/dist/encrypt.js +1 -0
  126. package/dist/encrypt.mjs +1 -1
  127. package/dist/file.d.mts +35 -2
  128. package/dist/{file-CjjpuB5u.d.cts → file.d.ts} +5 -6
  129. package/dist/file.js +1 -0
  130. package/dist/file.mjs +1 -1
  131. package/dist/index.d.mts +44 -44
  132. package/dist/index.d.ts +44 -0
  133. package/dist/index.js +1 -0
  134. package/dist/index.mjs +1 -1
  135. package/dist/lodash.d.mts +9 -2
  136. package/dist/lodash.d.ts +9 -0
  137. package/dist/lodash.js +1 -0
  138. package/dist/lodash.mjs +1 -1
  139. package/dist/object.d.mts +86 -3
  140. package/dist/{object-CqyPehTh.d.cts → object.d.ts} +4 -5
  141. package/dist/object.js +1 -0
  142. package/dist/object.mjs +1 -1
  143. package/dist/other.d.mts +49 -3
  144. package/dist/{other-BzR4DqG0.d.cts → other.d.ts} +4 -5
  145. package/dist/other.js +1 -0
  146. package/dist/other.mjs +1 -1
  147. package/dist/parse.d.mts +21 -3
  148. package/dist/{parse-DQMRWCdz.d.mts → parse.d.ts} +7 -8
  149. package/dist/parse.js +1 -0
  150. package/dist/parse.mjs +1 -1
  151. package/dist/pinyin.d.mts +18 -2
  152. package/dist/{pinyin-C2BqrFMq.d.mts → pinyin.d.ts} +3 -5
  153. package/dist/pinyin.js +1 -0
  154. package/dist/pinyin.mjs +1 -1
  155. package/dist/request/constant.d.mts +4 -4
  156. package/dist/request/{constant.d.cts → constant.d.ts} +4 -4
  157. package/dist/request/constant.js +1 -0
  158. package/dist/request/constant.mjs +1 -1
  159. package/dist/request/handler.d.mts +10 -3
  160. package/dist/request/handler.d.ts +10 -0
  161. package/dist/request/handler.js +1 -0
  162. package/dist/request/handler.mjs +1 -1
  163. package/dist/request/index.d.mts +4 -6
  164. package/dist/request/index.d.ts +4 -0
  165. package/dist/request/index.js +1 -0
  166. package/dist/request/index.mjs +1 -1
  167. package/dist/request/request.d.mts +99 -3
  168. package/dist/request/request.d.ts +99 -0
  169. package/dist/request/request.js +1 -0
  170. package/dist/request/request.mjs +1 -1
  171. package/dist/request/utils/cancel.d.mts +4 -4
  172. package/dist/request/utils/{cancel.d.cts → cancel.d.ts} +4 -4
  173. package/dist/request/utils/cancel.js +1 -0
  174. package/dist/request/utils/cancel.mjs +1 -1
  175. package/dist/request/utils/file.d.mts +4 -4
  176. package/dist/request/utils/file.d.ts +6 -0
  177. package/dist/request/utils/file.js +1 -0
  178. package/dist/request/utils/file.mjs +1 -1
  179. package/dist/request/utils/format.d.mts +4 -4
  180. package/dist/request/utils/{format.d.cts → format.d.ts} +4 -4
  181. package/dist/request/utils/format.js +1 -0
  182. package/dist/request/utils/format.mjs +1 -1
  183. package/dist/request/utils/params.d.mts +4 -4
  184. package/dist/request/utils/params.d.ts +6 -0
  185. package/dist/request/utils/params.js +1 -0
  186. package/dist/request/utils/params.mjs +1 -1
  187. package/dist/safe-next-tick.d.mts +9 -2
  188. package/dist/{safe-next-tick-DlJsO1Ha.d.mts → safe-next-tick.d.ts} +4 -5
  189. package/dist/safe-next-tick.js +1 -0
  190. package/dist/safe-next-tick.mjs +1 -1
  191. package/dist/types.d.mts +207 -2
  192. package/dist/types.d.ts +207 -0
  193. package/dist/types.js +1 -0
  194. package/dist/types.mjs +1 -1
  195. package/dist/vue/hooks/clipboard.d.mts +8 -2
  196. package/dist/vue/hooks/clipboard.d.ts +8 -0
  197. package/dist/vue/hooks/clipboard.js +1 -0
  198. package/dist/vue/hooks/clipboard.mjs +1 -1
  199. package/dist/vue/index.d.mts +3 -4
  200. package/dist/vue/index.d.ts +3 -0
  201. package/dist/vue/index.js +1 -0
  202. package/dist/vue/index.mjs +1 -1
  203. package/dist/vue/type-util.d.mts +47 -2
  204. package/dist/{type-util-BdSpgYN3.d.mts → vue/type-util.d.ts} +21 -22
  205. package/dist/vue/type-util.js +1 -0
  206. package/dist/vue/type-util.mjs +1 -1
  207. package/package.json +4 -4
  208. package/dist/array-CEhD-Z_e.mjs +0 -1
  209. package/dist/array-okkZATKz.d.cts +0 -99
  210. package/dist/array-ri-t3Wsz.cjs +0 -1
  211. package/dist/array.cjs +0 -1
  212. package/dist/array.d.cts +0 -3
  213. package/dist/base-854WVUaj.mjs +0 -1
  214. package/dist/base-BSg8gJZf.mjs +0 -1
  215. package/dist/base-DSfexc9G.d.cts +0 -25
  216. package/dist/base-DUxrUTOr.cjs +0 -1
  217. package/dist/base-Dl59EolR.d.mts +0 -193
  218. package/dist/base-DmSU_ydZ.cjs +0 -1
  219. package/dist/base.cjs +0 -1
  220. package/dist/base.d.cts +0 -3
  221. package/dist/can-use-dom-DiyvIP5G.mjs +0 -1
  222. package/dist/can-use-dom-DvmMdeGa.cjs +0 -1
  223. package/dist/cancel-BV5B58Lw.mjs +0 -1
  224. package/dist/cancel-Do0w5I5K.cjs +0 -1
  225. package/dist/chunk-BcXMmzxH.cjs +0 -1
  226. package/dist/chunk-Dbq9I6zD.mjs +0 -1
  227. package/dist/class-C29-Mh-o.mjs +0 -1
  228. package/dist/class-D5duI9ps.d.mts +0 -27
  229. package/dist/class-D8a8qnWA.cjs +0 -1
  230. package/dist/clipboard-BN1iiQLu.d.mts +0 -4
  231. package/dist/clipboard-C8ZiJE_h.d.cts +0 -9
  232. package/dist/clipboard-CJ-9sRbH.d.mts +0 -9
  233. package/dist/clipboard-CWQVWiTk.cjs +0 -1
  234. package/dist/clipboard-Ci0l5Dtt.d.cts +0 -4
  235. package/dist/clipboard-CjgXtqbg.mjs +0 -1
  236. package/dist/clipboard-DqGhq6A4.mjs +0 -1
  237. package/dist/clipboard-ZMrs6wzK.cjs +0 -1
  238. package/dist/clipboard.cjs +0 -1
  239. package/dist/clipboard.d.cts +0 -2
  240. package/dist/constant-CskvZDUK.cjs +0 -1
  241. package/dist/constant-Dxt8HuVn.mjs +0 -1
  242. package/dist/contains-BpG9RIaT.mjs +0 -1
  243. package/dist/contains-CYQgjY4K.cjs +0 -1
  244. package/dist/contains-D3q8gHUu.d.cts +0 -11
  245. package/dist/css-DIpTZrC7.mjs +0 -1
  246. package/dist/css-DkmknM-7.d.mts +0 -23
  247. package/dist/css-WYllKaVv.cjs +0 -1
  248. package/dist/dayjs-00xX6Mts.d.mts +0 -31
  249. package/dist/dayjs-BBOQ72ow.mjs +0 -1
  250. package/dist/dayjs-Bvzj_rlD.cjs +0 -1
  251. package/dist/dayjs.cjs +0 -1
  252. package/dist/dayjs.d.cts +0 -2
  253. package/dist/dom/base.cjs +0 -1
  254. package/dist/dom/base.d.cts +0 -2
  255. package/dist/dom/class.cjs +0 -1
  256. package/dist/dom/class.d.cts +0 -2
  257. package/dist/dom/contains.cjs +0 -1
  258. package/dist/dom/contains.d.cts +0 -2
  259. package/dist/dom/css.cjs +0 -1
  260. package/dist/dom/css.d.cts +0 -2
  261. package/dist/dom/dynamic-css.cjs +0 -1
  262. package/dist/dom/dynamic-css.d.cts +0 -2
  263. package/dist/dom/find-dom-node.cjs +0 -1
  264. package/dist/dom/find-dom-node.d.cts +0 -2
  265. package/dist/dom/focus.cjs +0 -1
  266. package/dist/dom/focus.d.cts +0 -2
  267. package/dist/dom/iframe.cjs +0 -1
  268. package/dist/dom/iframe.d.cts +0 -2
  269. package/dist/dom/index.cjs +0 -1
  270. package/dist/dom/index.d.cts +0 -18
  271. package/dist/dom/is-visible.cjs +0 -1
  272. package/dist/dom/is-visible.d.cts +0 -2
  273. package/dist/dom/lib/can-use-dom.cjs +0 -1
  274. package/dist/dom/lib/can-use-dom.d.cts +0 -3
  275. package/dist/dom/scrollbar.cjs +0 -1
  276. package/dist/dom/scrollbar.d.cts +0 -2
  277. package/dist/dom/storage.cjs +0 -1
  278. package/dist/dom/storage.d.cts +0 -3
  279. package/dist/dom/style-checker.cjs +0 -1
  280. package/dist/dom/style-checker.d.cts +0 -2
  281. package/dist/dom/style-names.cjs +0 -1
  282. package/dist/dom/style-names.d.cts +0 -2
  283. package/dist/dom/support.cjs +0 -1
  284. package/dist/dom/support.d.cts +0 -2
  285. package/dist/dom/video.cjs +0 -1
  286. package/dist/dom/video.d.cts +0 -2
  287. package/dist/dom-D2QfuVth.mjs +0 -1
  288. package/dist/dynamic-css-CD9eHWzL.d.mts +0 -21
  289. package/dist/dynamic-css-CP1iFszw.mjs +0 -1
  290. package/dist/dynamic-css-iSnm5CN6.cjs +0 -1
  291. package/dist/encrypt-CHxdyuoC.d.mts +0 -29
  292. package/dist/encrypt-D6oTfiTY.cjs +0 -1
  293. package/dist/encrypt-Z5CU2r_1.mjs +0 -1
  294. package/dist/encrypt.cjs +0 -1
  295. package/dist/encrypt.d.cts +0 -2
  296. package/dist/file-B9oorXhT.cjs +0 -1
  297. package/dist/file-D4oBhObv.d.mts +0 -36
  298. package/dist/file-Dwobl-pF.mjs +0 -1
  299. package/dist/file-TjtumYrh.mjs +0 -1
  300. package/dist/file-rmcv99h0.cjs +0 -1
  301. package/dist/file.cjs +0 -1
  302. package/dist/file.d.cts +0 -2
  303. package/dist/find-dom-node-BYO9We8P.d.mts +0 -4
  304. package/dist/find-dom-node-BkrYW2pm.d.cts +0 -4
  305. package/dist/find-dom-node-gbroqN2N.mjs +0 -1
  306. package/dist/find-dom-node-lY7vePVL.cjs +0 -1
  307. package/dist/focus-ByNB07tt.d.mts +0 -11
  308. package/dist/focus-DtSCSQEr.cjs +0 -1
  309. package/dist/focus-REYXIBdQ.mjs +0 -1
  310. package/dist/format-3CsgkBWg.mjs +0 -1
  311. package/dist/format-CezZBld9.cjs +0 -1
  312. package/dist/handler-C40H2JG4.cjs +0 -1
  313. package/dist/handler-Dk1QWSgF.d.cts +0 -10
  314. package/dist/handler-N6Akxkpa.mjs +0 -1
  315. package/dist/handler-bsPUG7U9.d.mts +0 -10
  316. package/dist/iframe-ByOdqFYr.mjs +0 -1
  317. package/dist/iframe-CR0bl22C.cjs +0 -1
  318. package/dist/iframe-QhpkIola.d.cts +0 -58
  319. package/dist/index-6bSwZ6-V.d.cts +0 -1
  320. package/dist/index-BYjO2-Dk.d.mts +0 -3
  321. package/dist/index-CLTQPxoD.d.mts +0 -1
  322. package/dist/index-CqciuydZ.d.cts +0 -7
  323. package/dist/index-Ctvuv0vV.d.cts +0 -1
  324. package/dist/index-D-9tW2r5.d.mts +0 -1
  325. package/dist/index.cjs +0 -1
  326. package/dist/index.d.cts +0 -43
  327. package/dist/is-visible-BXbqt6I2.mjs +0 -1
  328. package/dist/is-visible-BpFCb4uJ.d.mts +0 -4
  329. package/dist/is-visible-DT2jLmnp.d.cts +0 -4
  330. package/dist/is-visible-laJngqtK.cjs +0 -1
  331. package/dist/lodash-BrrZKPAY.d.cts +0 -10
  332. package/dist/lodash-DAdPs0O9.d.mts +0 -10
  333. package/dist/lodash-iHVEJs1z.mjs +0 -1
  334. package/dist/lodash-kixEH9o9.cjs +0 -1
  335. package/dist/lodash.cjs +0 -1
  336. package/dist/lodash.d.cts +0 -2
  337. package/dist/object-C6qVmoZY.cjs +0 -1
  338. package/dist/object-j-lK643f.mjs +0 -1
  339. package/dist/object-l_DvbWqN.d.mts +0 -87
  340. package/dist/object.cjs +0 -1
  341. package/dist/object.d.cts +0 -3
  342. package/dist/other-B2ug3Xof.mjs +0 -1
  343. package/dist/other-H13CGzY5.d.mts +0 -50
  344. package/dist/other-c9ZDQ-tY.cjs +0 -1
  345. package/dist/other.cjs +0 -1
  346. package/dist/other.d.cts +0 -3
  347. package/dist/params-CnZhAsve.cjs +0 -1
  348. package/dist/params-CpjttIDa.mjs +0 -1
  349. package/dist/parse-BpErok05.cjs +0 -1
  350. package/dist/parse-C1eaIjot.mjs +0 -1
  351. package/dist/parse-vp0jh8-x.d.cts +0 -22
  352. package/dist/parse.cjs +0 -1
  353. package/dist/parse.d.cts +0 -3
  354. package/dist/pinyin-BE6Ew65z.cjs +0 -1
  355. package/dist/pinyin-D11MW4u2.mjs +0 -1
  356. package/dist/pinyin-Di92101W.d.cts +0 -20
  357. package/dist/pinyin.cjs +0 -1
  358. package/dist/pinyin.d.cts +0 -2
  359. package/dist/request/constant.cjs +0 -1
  360. package/dist/request/handler.cjs +0 -1
  361. package/dist/request/handler.d.cts +0 -3
  362. package/dist/request/index.cjs +0 -1
  363. package/dist/request/index.d.cts +0 -6
  364. package/dist/request/request.cjs +0 -1
  365. package/dist/request/request.d.cts +0 -3
  366. package/dist/request/utils/cancel.cjs +0 -1
  367. package/dist/request/utils/file.cjs +0 -1
  368. package/dist/request/utils/file.d.cts +0 -6
  369. package/dist/request/utils/format.cjs +0 -1
  370. package/dist/request/utils/params.cjs +0 -1
  371. package/dist/request/utils/params.d.cts +0 -6
  372. package/dist/request-BG5UIh9R.mjs +0 -1
  373. package/dist/request-C8gChBjl.d.cts +0 -99
  374. package/dist/request-Cbv8Ih3e.cjs +0 -1
  375. package/dist/request-CcQHJNao.cjs +0 -1
  376. package/dist/request-CmsAe99W.mjs +0 -1
  377. package/dist/request-DGUcKxsQ.d.mts +0 -99
  378. package/dist/safe-next-tick-1ezZPIPs.d.cts +0 -10
  379. package/dist/safe-next-tick-Cc30ZlUX.mjs +0 -1
  380. package/dist/safe-next-tick-DphyaFY6.cjs +0 -1
  381. package/dist/safe-next-tick.cjs +0 -1
  382. package/dist/safe-next-tick.d.cts +0 -2
  383. package/dist/scrollbar-07jqhpVk.d.cts +0 -9
  384. package/dist/scrollbar-2zQwgB3N.cjs +0 -1
  385. package/dist/scrollbar-BsVSwcz1.mjs +0 -1
  386. package/dist/storage-CVE8yo6N.mjs +0 -1
  387. package/dist/storage-ClTxbIcP.cjs +0 -1
  388. package/dist/storage-HTBNfA8Q.d.mts +0 -21
  389. package/dist/style-checker-066o7h7_.mjs +0 -1
  390. package/dist/style-checker-B5wzcdHi.d.mts +0 -5
  391. package/dist/style-checker-DAxS0NyJ.cjs +0 -1
  392. package/dist/style-names-CYvxRARD.cjs +0 -1
  393. package/dist/style-names-DDdz6-7S.d.mts +0 -4
  394. package/dist/style-names-cEIIM3cL.mjs +0 -1
  395. package/dist/support-BKRoxgNc.d.mts +0 -9
  396. package/dist/support-BZYJpIOE.cjs +0 -1
  397. package/dist/support-jAYY4GwL.d.cts +0 -9
  398. package/dist/support-wu9hh5gZ.mjs +0 -1
  399. package/dist/type-util-BRGMhQFp.d.cts +0 -48
  400. package/dist/type-util-HyvLYA2w.cjs +0 -1
  401. package/dist/type-util-Qle7ht7X.mjs +0 -1
  402. package/dist/types-BEdiy6mb.d.mts +0 -208
  403. package/dist/types-Bs46AtMe.mjs +0 -1
  404. package/dist/types-DTtPjrm8.d.cts +0 -208
  405. package/dist/types.cjs +0 -1
  406. package/dist/types.d.cts +0 -2
  407. package/dist/video-BDLauzJm.cjs +0 -1
  408. package/dist/video-C_sYI0Ht.d.mts +0 -10
  409. package/dist/video-CtkByFxt.mjs +0 -1
  410. package/dist/vue/hooks/clipboard.cjs +0 -1
  411. package/dist/vue/hooks/clipboard.d.cts +0 -2
  412. package/dist/vue/index.cjs +0 -1
  413. package/dist/vue/index.d.cts +0 -4
  414. package/dist/vue/type-util.cjs +0 -1
  415. package/dist/vue/type-util.d.cts +0 -2
  416. package/dist/vue-Q8n_JN-R.mjs +0 -1
  417. /package/dist/{dom-DzrnEGri.cjs → chunk-G27KRYT2.mjs} +0 -0
  418. /package/dist/{types-DAFnYo8a.cjs → chunk-PM3H3ISM.mjs} +0 -0
  419. /package/dist/{vue-CGBzFhF4.cjs → chunk-WBQAMGXK.mjs} +0 -0
package/dist/types.d.mts CHANGED
@@ -1,2 +1,207 @@
1
- import { C as ResDataType, S as ResAlias, T as TreeItemType, _ as PageQueryType, a as ErrorContentObject, b as RequestMethod, c as HeadersType, d as ObrAxiosInstance, f as ObrAxiosRequestConfig, g as PageAlias, h as OptionResAlias, i as DataType, l as MappingType, m as ObrAxiosStatic, n as CascaderOptionType, o as ErrorType, p as ObrAxiosResponse, r as CascaderRequestOption, s as ErrorTypeKey, t as BaseOptionType, u as ObjectDataType, v as PageResType, w as TokenConfig, x as RequestParamConfig, y as RequestBaseConfig } from "./types-BEdiy6mb.mjs";
2
- export { BaseOptionType, CascaderOptionType, CascaderRequestOption, DataType, ErrorContentObject, ErrorType, ErrorTypeKey, HeadersType, MappingType, ObjectDataType, ObrAxiosInstance, ObrAxiosRequestConfig, ObrAxiosResponse, ObrAxiosStatic, OptionResAlias, PageAlias, PageQueryType, PageResType, RequestBaseConfig, RequestMethod, RequestParamConfig, ResAlias, ResDataType, TokenConfig, TreeItemType };
1
+ import { AxiosRequestConfig, AxiosResponse, CanceledError, AxiosError, Method, AxiosStatic, CreateAxiosDefaults, AxiosInstance, AxiosInterceptorManager } from 'axios';
2
+
3
+ type ObjectDataType<T = any, D extends string = string> = Record<D, T>;
4
+ /**
5
+ * @description: 树形结构数据类型
6
+ * @autor: 刘 相卿
7
+ */
8
+ interface TreeItemType extends ObjectDataType {
9
+ label?: string;
10
+ children?: TreeItemType[];
11
+ }
12
+ /**
13
+ * @description: 数据类型
14
+ * @autor: 刘 相卿
15
+ */
16
+ type DataType = 'set' | 'map' | 'function' | 'object' | 'array' | 'undefined' | 'null' | 'number' | 'symbol' | 'string' | 'boolean' | 'regexp' | 'date' | 'bigint' | 'blob' | 'formdata';
17
+ interface MappingType {
18
+ [x: string | number]: any;
19
+ default: any;
20
+ }
21
+ interface BaseOptionType<T = ObjectDataType> extends ObjectDataType {
22
+ label: string;
23
+ value: any;
24
+ disabled?: boolean;
25
+ json?: T;
26
+ children?: BaseOptionType<T>[];
27
+ }
28
+ interface OptionResAlias {
29
+ label: string;
30
+ value: string;
31
+ disabled: string;
32
+ children: string;
33
+ json: string;
34
+ }
35
+ interface CascaderRequestOption {
36
+ url: string;
37
+ method?: Method;
38
+ params?: RequestParamConfig[];
39
+ alias?: Partial<Omit<OptionResAlias, 'json'>>;
40
+ }
41
+ interface CascaderOptionType<T extends ObjectDataType = ObjectDataType> {
42
+ label: string;
43
+ value: any;
44
+ disabled?: boolean;
45
+ json?: T;
46
+ children?: CascaderOptionType<T>[];
47
+ }
48
+ /**
49
+ * @description: Token配置类型
50
+ * @param {string} key token的键名称
51
+ * @param {() => string} get 获取token的方法
52
+ * @autor: 刘 相卿
53
+ */
54
+ interface TokenConfig {
55
+ key: string;
56
+ get: () => string;
57
+ }
58
+ /**
59
+ * @description: header配置
60
+ * @param {boolean} `X-Never-Cancel` 是否永远不取消该请求
61
+ * @param {'path' | 'method' | 'params'} `X-Cancel-Rule` 取消规则(path: 同一路径; method: 同一路径+请求方法; params: 同一路径+请求方法+参数)
62
+ * @param {boolean} `X-Hide-Message` 是否隐藏请求消息提示
63
+ * @autor: 刘 相卿
64
+ */
65
+ interface HeadersType {
66
+ 'X-Never-Cancel'?: boolean;
67
+ 'X-Cancel-Rule'?: 'path' | 'method' | 'params';
68
+ 'X-Hide-Message'?: boolean;
69
+ }
70
+ interface ObrAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
71
+ headers?: AxiosRequestConfig['headers'] & HeadersType;
72
+ }
73
+ interface ObrAxiosResponse<T = any> extends Omit<AxiosResponse<T>, 'data'> {
74
+ data: ResDataType<T>;
75
+ }
76
+ interface ObrAxiosStatic extends Omit<AxiosStatic, 'create'> {
77
+ create: (config?: CreateAxiosDefaults) => ObrAxiosInstance;
78
+ }
79
+ interface ObrAxiosInstance extends Pick<AxiosInstance, 'defaults'> {
80
+ interceptors: {
81
+ request: AxiosInterceptorManager<ObrAxiosRequestConfig>;
82
+ response: AxiosInterceptorManager<ObrAxiosResponse<ResDataType>>;
83
+ };
84
+ <T = any, D = any>(config: AxiosRequestConfig<D>): Promise<ResDataType<T>>;
85
+ <T = any, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<ResDataType<T>>;
86
+ getUri: (config?: ObrAxiosRequestConfig) => string;
87
+ request: <T = any>(config: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
88
+ get: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
89
+ delete: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
90
+ head: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
91
+ options: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
92
+ post: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
93
+ put: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
94
+ postForm: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
95
+ putForm: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
96
+ patch: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
97
+ patchForm: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
98
+ }
99
+ /**
100
+ * @description: 响应字段别名
101
+ * @param {string} code 响应code别名
102
+ * @param {string} data 响应数据别名
103
+ * @param {string} msg 响应消息提示别名
104
+ * @autor: 刘 相卿
105
+ */
106
+ interface ResAlias {
107
+ code: string;
108
+ data: string;
109
+ msg: string;
110
+ }
111
+ interface PageAlias {
112
+ records: string;
113
+ total: string;
114
+ pageSize: string;
115
+ pageNo: string;
116
+ }
117
+ /**
118
+ * @description: 响应数据类型
119
+ * @param {number} code 响应code
120
+ * @param {T} data 响应数据
121
+ * @param {string} msg 响应消息提示
122
+ * @autor: 刘 相卿
123
+ */
124
+ interface ResDataType<T = any> extends ObjectDataType {
125
+ code: number;
126
+ data: T;
127
+ msg: string;
128
+ }
129
+ /**
130
+ * @description: 分页接口响应数据
131
+ * @param {R[]} records 分页数据
132
+ * @param {number} total 分页总数
133
+ * @autor: 刘 相卿
134
+ */
135
+ interface PageResType<R = ObjectDataType> {
136
+ records: R[];
137
+ total: number;
138
+ }
139
+ /**
140
+ * @description: 错误消息类型
141
+ * @param {number} type 错误类型
142
+ * @param {T} error 错误数据
143
+ * @autor: 刘 相卿
144
+ */
145
+ interface ErrorContentObject {
146
+ REQUEST: {
147
+ type: 'REQUEST';
148
+ content: ResDataType;
149
+ };
150
+ CANCEL: {
151
+ type: 'CANCEL';
152
+ content: CanceledError<any>;
153
+ };
154
+ ERROR: {
155
+ type: 'ERROR';
156
+ content: AxiosError<any>;
157
+ };
158
+ }
159
+ interface ErrorBasicType {
160
+ options: RequestBaseConfig;
161
+ response?: ObrAxiosResponse<ResDataType>;
162
+ }
163
+ type ErrorTypeKey = keyof ErrorContentObject;
164
+ type ErrorType<T extends ErrorTypeKey = ErrorTypeKey> = ErrorBasicType & ErrorContentObject[T];
165
+ /**
166
+ * @description: 分页查询请求参数
167
+ * @param {number} pageSize 分页大小 = 10
168
+ * @param {number} pageNo 分页页码 = 1
169
+ * @autor: 刘 相卿
170
+ */
171
+ interface PageQueryType {
172
+ pageSize?: number;
173
+ pageNo?: number;
174
+ }
175
+ interface RequestBaseConfig extends AxiosRequestConfig {
176
+ basePath?: string;
177
+ allowCancel?: boolean;
178
+ allowNullValue?: boolean;
179
+ successCode?: number | number[];
180
+ unauthorizedCode?: number | number[];
181
+ whiteUrl?: () => string[];
182
+ alias?: () => Partial<ResAlias>;
183
+ token?: TokenConfig;
184
+ beforeRequest?: (config: ObrAxiosRequestConfig) => ObrAxiosRequestConfig;
185
+ afterRequest?: (response: ObrAxiosResponse<ResDataType>, options: RequestBaseConfig) => ObrAxiosResponse<ResDataType>;
186
+ 401?: (error: ErrorType<'REQUEST'>) => any;
187
+ cancel?: (error: ErrorType<'CANCEL'>) => any;
188
+ error?: (error: ErrorType) => any;
189
+ }
190
+ type RequestMethod = Method;
191
+ /**
192
+ * @description: 请求参数配置
193
+ * @return {*}
194
+ * @autor: 刘 相卿
195
+ */
196
+ interface RequestParamConfig {
197
+ key: string;
198
+ required?: boolean;
199
+ toValue?: boolean;
200
+ source: {
201
+ path?: string;
202
+ defaultValue?: any;
203
+ formatter?: 'toArray' | 'toString' | 'toNumber';
204
+ }[];
205
+ }
206
+
207
+ export type { BaseOptionType, CascaderOptionType, CascaderRequestOption, DataType, ErrorContentObject, ErrorType, ErrorTypeKey, HeadersType, MappingType, ObjectDataType, ObrAxiosInstance, ObrAxiosRequestConfig, ObrAxiosResponse, ObrAxiosStatic, OptionResAlias, PageAlias, PageQueryType, PageResType, RequestBaseConfig, RequestMethod, RequestParamConfig, ResAlias, ResDataType, TokenConfig, TreeItemType };
@@ -0,0 +1,207 @@
1
+ import { AxiosRequestConfig, AxiosResponse, CanceledError, AxiosError, Method, AxiosStatic, CreateAxiosDefaults, AxiosInstance, AxiosInterceptorManager } from 'axios';
2
+
3
+ type ObjectDataType<T = any, D extends string = string> = Record<D, T>;
4
+ /**
5
+ * @description: 树形结构数据类型
6
+ * @autor: 刘 相卿
7
+ */
8
+ interface TreeItemType extends ObjectDataType {
9
+ label?: string;
10
+ children?: TreeItemType[];
11
+ }
12
+ /**
13
+ * @description: 数据类型
14
+ * @autor: 刘 相卿
15
+ */
16
+ type DataType = 'set' | 'map' | 'function' | 'object' | 'array' | 'undefined' | 'null' | 'number' | 'symbol' | 'string' | 'boolean' | 'regexp' | 'date' | 'bigint' | 'blob' | 'formdata';
17
+ interface MappingType {
18
+ [x: string | number]: any;
19
+ default: any;
20
+ }
21
+ interface BaseOptionType<T = ObjectDataType> extends ObjectDataType {
22
+ label: string;
23
+ value: any;
24
+ disabled?: boolean;
25
+ json?: T;
26
+ children?: BaseOptionType<T>[];
27
+ }
28
+ interface OptionResAlias {
29
+ label: string;
30
+ value: string;
31
+ disabled: string;
32
+ children: string;
33
+ json: string;
34
+ }
35
+ interface CascaderRequestOption {
36
+ url: string;
37
+ method?: Method;
38
+ params?: RequestParamConfig[];
39
+ alias?: Partial<Omit<OptionResAlias, 'json'>>;
40
+ }
41
+ interface CascaderOptionType<T extends ObjectDataType = ObjectDataType> {
42
+ label: string;
43
+ value: any;
44
+ disabled?: boolean;
45
+ json?: T;
46
+ children?: CascaderOptionType<T>[];
47
+ }
48
+ /**
49
+ * @description: Token配置类型
50
+ * @param {string} key token的键名称
51
+ * @param {() => string} get 获取token的方法
52
+ * @autor: 刘 相卿
53
+ */
54
+ interface TokenConfig {
55
+ key: string;
56
+ get: () => string;
57
+ }
58
+ /**
59
+ * @description: header配置
60
+ * @param {boolean} `X-Never-Cancel` 是否永远不取消该请求
61
+ * @param {'path' | 'method' | 'params'} `X-Cancel-Rule` 取消规则(path: 同一路径; method: 同一路径+请求方法; params: 同一路径+请求方法+参数)
62
+ * @param {boolean} `X-Hide-Message` 是否隐藏请求消息提示
63
+ * @autor: 刘 相卿
64
+ */
65
+ interface HeadersType {
66
+ 'X-Never-Cancel'?: boolean;
67
+ 'X-Cancel-Rule'?: 'path' | 'method' | 'params';
68
+ 'X-Hide-Message'?: boolean;
69
+ }
70
+ interface ObrAxiosRequestConfig<D = any> extends AxiosRequestConfig<D> {
71
+ headers?: AxiosRequestConfig['headers'] & HeadersType;
72
+ }
73
+ interface ObrAxiosResponse<T = any> extends Omit<AxiosResponse<T>, 'data'> {
74
+ data: ResDataType<T>;
75
+ }
76
+ interface ObrAxiosStatic extends Omit<AxiosStatic, 'create'> {
77
+ create: (config?: CreateAxiosDefaults) => ObrAxiosInstance;
78
+ }
79
+ interface ObrAxiosInstance extends Pick<AxiosInstance, 'defaults'> {
80
+ interceptors: {
81
+ request: AxiosInterceptorManager<ObrAxiosRequestConfig>;
82
+ response: AxiosInterceptorManager<ObrAxiosResponse<ResDataType>>;
83
+ };
84
+ <T = any, D = any>(config: AxiosRequestConfig<D>): Promise<ResDataType<T>>;
85
+ <T = any, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<ResDataType<T>>;
86
+ getUri: (config?: ObrAxiosRequestConfig) => string;
87
+ request: <T = any>(config: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
88
+ get: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
89
+ delete: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
90
+ head: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
91
+ options: <T = any>(url: string, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
92
+ post: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
93
+ put: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
94
+ postForm: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
95
+ putForm: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
96
+ patch: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
97
+ patchForm: <T = any, D = any>(url: string, data?: D, config?: ObrAxiosRequestConfig) => Promise<ResDataType<T>>;
98
+ }
99
+ /**
100
+ * @description: 响应字段别名
101
+ * @param {string} code 响应code别名
102
+ * @param {string} data 响应数据别名
103
+ * @param {string} msg 响应消息提示别名
104
+ * @autor: 刘 相卿
105
+ */
106
+ interface ResAlias {
107
+ code: string;
108
+ data: string;
109
+ msg: string;
110
+ }
111
+ interface PageAlias {
112
+ records: string;
113
+ total: string;
114
+ pageSize: string;
115
+ pageNo: string;
116
+ }
117
+ /**
118
+ * @description: 响应数据类型
119
+ * @param {number} code 响应code
120
+ * @param {T} data 响应数据
121
+ * @param {string} msg 响应消息提示
122
+ * @autor: 刘 相卿
123
+ */
124
+ interface ResDataType<T = any> extends ObjectDataType {
125
+ code: number;
126
+ data: T;
127
+ msg: string;
128
+ }
129
+ /**
130
+ * @description: 分页接口响应数据
131
+ * @param {R[]} records 分页数据
132
+ * @param {number} total 分页总数
133
+ * @autor: 刘 相卿
134
+ */
135
+ interface PageResType<R = ObjectDataType> {
136
+ records: R[];
137
+ total: number;
138
+ }
139
+ /**
140
+ * @description: 错误消息类型
141
+ * @param {number} type 错误类型
142
+ * @param {T} error 错误数据
143
+ * @autor: 刘 相卿
144
+ */
145
+ interface ErrorContentObject {
146
+ REQUEST: {
147
+ type: 'REQUEST';
148
+ content: ResDataType;
149
+ };
150
+ CANCEL: {
151
+ type: 'CANCEL';
152
+ content: CanceledError<any>;
153
+ };
154
+ ERROR: {
155
+ type: 'ERROR';
156
+ content: AxiosError<any>;
157
+ };
158
+ }
159
+ interface ErrorBasicType {
160
+ options: RequestBaseConfig;
161
+ response?: ObrAxiosResponse<ResDataType>;
162
+ }
163
+ type ErrorTypeKey = keyof ErrorContentObject;
164
+ type ErrorType<T extends ErrorTypeKey = ErrorTypeKey> = ErrorBasicType & ErrorContentObject[T];
165
+ /**
166
+ * @description: 分页查询请求参数
167
+ * @param {number} pageSize 分页大小 = 10
168
+ * @param {number} pageNo 分页页码 = 1
169
+ * @autor: 刘 相卿
170
+ */
171
+ interface PageQueryType {
172
+ pageSize?: number;
173
+ pageNo?: number;
174
+ }
175
+ interface RequestBaseConfig extends AxiosRequestConfig {
176
+ basePath?: string;
177
+ allowCancel?: boolean;
178
+ allowNullValue?: boolean;
179
+ successCode?: number | number[];
180
+ unauthorizedCode?: number | number[];
181
+ whiteUrl?: () => string[];
182
+ alias?: () => Partial<ResAlias>;
183
+ token?: TokenConfig;
184
+ beforeRequest?: (config: ObrAxiosRequestConfig) => ObrAxiosRequestConfig;
185
+ afterRequest?: (response: ObrAxiosResponse<ResDataType>, options: RequestBaseConfig) => ObrAxiosResponse<ResDataType>;
186
+ 401?: (error: ErrorType<'REQUEST'>) => any;
187
+ cancel?: (error: ErrorType<'CANCEL'>) => any;
188
+ error?: (error: ErrorType) => any;
189
+ }
190
+ type RequestMethod = Method;
191
+ /**
192
+ * @description: 请求参数配置
193
+ * @return {*}
194
+ * @autor: 刘 相卿
195
+ */
196
+ interface RequestParamConfig {
197
+ key: string;
198
+ required?: boolean;
199
+ toValue?: boolean;
200
+ source: {
201
+ path?: string;
202
+ defaultValue?: any;
203
+ formatter?: 'toArray' | 'toString' | 'toNumber';
204
+ }[];
205
+ }
206
+
207
+ export type { BaseOptionType, CascaderOptionType, CascaderRequestOption, DataType, ErrorContentObject, ErrorType, ErrorTypeKey, HeadersType, MappingType, ObjectDataType, ObrAxiosInstance, ObrAxiosRequestConfig, ObrAxiosResponse, ObrAxiosStatic, OptionResAlias, PageAlias, PageQueryType, PageResType, RequestBaseConfig, RequestMethod, RequestParamConfig, ResAlias, ResDataType, TokenConfig, TreeItemType };
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of i(e))!p.call(t,r)&&r!==n&&o(t,r,{get:()=>e[r],enumerable:!(a=s(e,r))||a.enumerable});return t};var y=t=>g(o({},"__esModule",{value:!0}),t);var T={};module.exports=y(T);
package/dist/types.mjs CHANGED
@@ -1 +1 @@
1
- import"./types-Bs46AtMe.mjs";export{};
1
+ import"./chunk-WBQAMGXK.mjs";
@@ -1,2 +1,8 @@
1
- import { t as useClipboard } from "../../clipboard-CJ-9sRbH.mjs";
2
- export { useClipboard };
1
+ import { Ref, ComputedRef, ShallowRef } from 'vue';
2
+
3
+ declare function useClipboard(delay?: number): {
4
+ copied: Ref<boolean, boolean>;
5
+ copy: (text: string | Ref<string> | ComputedRef<string> | ShallowRef<string>) => void;
6
+ };
7
+
8
+ export { useClipboard };
@@ -0,0 +1,8 @@
1
+ import { Ref, ComputedRef, ShallowRef } from 'vue';
2
+
3
+ declare function useClipboard(delay?: number): {
4
+ copied: Ref<boolean, boolean>;
5
+ copy: (text: string | Ref<string> | ComputedRef<string> | ShallowRef<string>) => void;
6
+ };
7
+
8
+ export { useClipboard };
@@ -0,0 +1 @@
1
+ "use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},f=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of d(e))!u.call(t,n)&&n!==o&&a(t,n,{get:()=>e[n],enumerable:!(r=p(e,n))||r.enumerable});return t};var y=t=>f(a({},"__esModule",{value:!0}),t);var C={};m(C,{useClipboard:()=>h});module.exports=y(C);var c=require("vue");function i(){return new DOMException("The request is not allowed","NotAllowedError")}async function w(t){if(!navigator.clipboard)throw i();return navigator.clipboard.writeText(t)}async function g(t){let e=document.createElement("span");e.textContent=t,e.style.whiteSpace="pre",e.style.webkitUserSelect="auto",e.style.userSelect="all",document.body.appendChild(e);let o=window.getSelection(),r=window.document.createRange();o.removeAllRanges(),r.selectNode(e),o.addRange(r);let n=!1;try{n=window.document.execCommand("copy")}finally{o.removeAllRanges(),window.document.body.removeChild(e)}if(!n)throw i()}async function l(t){try{await w(t)}catch(e){try{await g(t)}catch(o){throw o||e||i()}}}function h(t=3e3){let e=(0,c.ref)(!1);return{copied:e,copy:r=>{let n=(0,c.unref)(r);l(n).then(()=>{e.value=!0;let s=setTimeout(()=>{e.value=!1,clearTimeout(s)},t)})}}}0&&(module.exports={useClipboard});
@@ -1 +1 @@
1
- import"../../clipboard-DqGhq6A4.mjs";import{t as e}from"../../clipboard-CjgXtqbg.mjs";export{e as useClipboard};
1
+ import{a}from"../../chunk-TQ5GXPYB.mjs";import"../../chunk-6DX7ZFGR.mjs";export{a as useClipboard};
@@ -1,4 +1,3 @@
1
- import { a as eventType, c as numberType, d as runEvent, f as someType, h as vueNode, i as booleanType, l as objectType, m as vNodeType, n as anyType, o as functionType, p as stringType, r as arrayType, s as getEventValue, t as VueKey, u as runAsyncEvent } from "../type-util-BdSpgYN3.mjs";
2
- import { t as useClipboard } from "../clipboard-CJ-9sRbH.mjs";
3
- import "../index-D-9tW2r5.mjs";
4
- export { VueKey, anyType, arrayType, booleanType, eventType, functionType, getEventValue, numberType, objectType, runAsyncEvent, runEvent, someType, stringType, useClipboard, vNodeType, vueNode };
1
+ export { VueKey, anyType, arrayType, booleanType, eventType, functionType, getEventValue, numberType, objectType, runAsyncEvent, runEvent, someType, stringType, vNodeType, vueNode } from './type-util.mjs';
2
+ export { useClipboard } from './hooks/clipboard.mjs';
3
+ import 'vue';
@@ -0,0 +1,3 @@
1
+ export { VueKey, anyType, arrayType, booleanType, eventType, functionType, getEventValue, numberType, objectType, runAsyncEvent, runEvent, someType, stringType, vNodeType, vueNode } from './type-util.js';
2
+ export { useClipboard } from './hooks/clipboard.js';
3
+ import 'vue';
@@ -0,0 +1 @@
1
+ "use strict";var p=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var f=(e,n)=>{for(var t in n)p(e,t,{get:n[t],enumerable:!0})},m=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of l(n))!d.call(e,r)&&r!==t&&p(e,r,{get:()=>n[r],enumerable:!(o=c(n,r))||o.enumerable});return e};var w=e=>m(p({},"__esModule",{value:!0}),e);var j={};f(j,{anyType:()=>i,arrayType:()=>h,booleanType:()=>g,eventType:()=>R,functionType:()=>A,getEventValue:()=>N,numberType:()=>b,objectType:()=>C,runAsyncEvent:()=>E,runEvent:()=>k,someType:()=>v,stringType:()=>x,useClipboard:()=>y,vNodeType:()=>P});module.exports=w(j);function x(e){return{type:String,default:e}}function b(e){return{type:Number,default:e}}function g(e){return{type:Boolean,default:e}}function h(e){return{type:Array,default:e}}function C(e){return{type:Object,default:e}}function A(e){return{type:Function,default:e}}function i(e,n){let t={validator:()=>!0,default:e};return t}function P(){return{validator:()=>!0}}function v(e,n){return e?{type:e,default:n}:i(n)}function R(){return{type:[Function,Array]}}function k(e,...n){if(typeof e=="function")return e(...n);if(Array.isArray(e))return e.map(t=>t(...n))}async function E(e,...n){if(typeof e=="function")return await e(...n);if(Array.isArray(e))return await Promise.all(e.map(t=>t(...n)))}function N(e,n=0){return Array.isArray(e)?e[n]:e}var a=require("vue");function u(){return new DOMException("The request is not allowed","NotAllowedError")}async function S(e){if(!navigator.clipboard)throw u();return navigator.clipboard.writeText(e)}async function V(e){let n=document.createElement("span");n.textContent=e,n.style.whiteSpace="pre",n.style.webkitUserSelect="auto",n.style.userSelect="all",document.body.appendChild(n);let t=window.getSelection(),o=window.document.createRange();t.removeAllRanges(),o.selectNode(n),t.addRange(o);let r=!1;try{r=window.document.execCommand("copy")}finally{t.removeAllRanges(),window.document.body.removeChild(n)}if(!r)throw u()}async function s(e){try{await S(e)}catch(n){try{await V(e)}catch(t){throw t||n||u()}}}function y(e=3e3){let n=(0,a.ref)(!1);return{copied:n,copy:o=>{let r=(0,a.unref)(o);s(r).then(()=>{n.value=!0;let T=setTimeout(()=>{n.value=!1,clearTimeout(T)},e)})}}}0&&(module.exports={anyType,arrayType,booleanType,eventType,functionType,getEventValue,numberType,objectType,runAsyncEvent,runEvent,someType,stringType,useClipboard,vNodeType});
@@ -1 +1 @@
1
- import"../clipboard-DqGhq6A4.mjs";import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"../type-util-Qle7ht7X.mjs";import{t as p}from"../clipboard-CjgXtqbg.mjs";import"../vue-Q8n_JN-R.mjs";export{d as anyType,o as arrayType,l as booleanType,i as eventType,e as functionType,s as getEventValue,u as numberType,t as objectType,a as runAsyncEvent,f as runEvent,n as someType,r as stringType,p as useClipboard,c as vNodeType};
1
+ import"../chunk-G27KRYT2.mjs";import{a as n}from"../chunk-TQ5GXPYB.mjs";import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunk-YA66RVVU.mjs";import"../chunk-6DX7ZFGR.mjs";export{g as anyType,d as arrayType,c as booleanType,j as eventType,f as functionType,m as getEventValue,b as numberType,e as objectType,l as runAsyncEvent,k as runEvent,i as someType,a as stringType,n as useClipboard,h as vNodeType};
@@ -1,2 +1,47 @@
1
- import { a as eventType, c as numberType, d as runEvent, f as someType, h as vueNode, i as booleanType, l as objectType, m as vNodeType, n as anyType, o as functionType, p as stringType, r as arrayType, s as getEventValue, t as VueKey, u as runAsyncEvent } from "../type-util-BdSpgYN3.mjs";
2
- export { VueKey, anyType, arrayType, booleanType, eventType, functionType, getEventValue, numberType, objectType, runAsyncEvent, runEvent, someType, stringType, vNodeType, vueNode };
1
+ import { VNodeChild, PropType } from 'vue';
2
+
3
+ type vueNode = VNodeChild | string | number | boolean | null | undefined;
4
+ type VueKey = string | number;
5
+ declare function stringType<T extends string = string>(defaultVal?: T): {
6
+ type: PropType<T>;
7
+ default: T;
8
+ };
9
+ declare function numberType<T extends number = number>(defaultVal?: T): {
10
+ type: PropType<T>;
11
+ default: T;
12
+ };
13
+ declare function booleanType<T extends boolean = boolean>(defaultVal?: T): {
14
+ type: PropType<T>;
15
+ default: T;
16
+ };
17
+ declare function arrayType<T extends any[] = any[]>(defaultVal?: T): {
18
+ type: PropType<T>;
19
+ default: T;
20
+ };
21
+ declare function objectType<T extends Record<string, any> = Record<string, any>>(defaultVal?: T): {
22
+ type: PropType<T>;
23
+ default: T;
24
+ };
25
+ declare function functionType<T = () => any>(defaultVal?: T): {
26
+ type: PropType<T>;
27
+ default: T;
28
+ };
29
+ declare function anyType<T = any>(defaultVal?: T, required?: boolean): {
30
+ default: T;
31
+ type: PropType<T>;
32
+ };
33
+ declare function vNodeType<T = vueNode>(): {
34
+ type: PropType<T>;
35
+ };
36
+ declare function someType<T>(types?: any[], defaultVal?: T): {
37
+ type: PropType<T>;
38
+ default: T;
39
+ };
40
+ declare function eventType<T>(): {
41
+ type: PropType<T>;
42
+ };
43
+ declare function runEvent<T>(event: T, ...args: any[]): any;
44
+ declare function runAsyncEvent<T>(event: T, ...args: any[]): Promise<any>;
45
+ declare function getEventValue<T = any>(result: any, index?: number): T;
46
+
47
+ export { type VueKey, anyType, arrayType, booleanType, eventType, functionType, getEventValue, numberType, objectType, runAsyncEvent, runEvent, someType, stringType, vNodeType, type vueNode };
@@ -1,48 +1,47 @@
1
- import { VNodeChild } from "vue";
1
+ import { VNodeChild, PropType } from 'vue';
2
2
 
3
- //#region src/vue/type-util.d.ts
4
3
  type vueNode = VNodeChild | string | number | boolean | null | undefined;
5
4
  type VueKey = string | number;
6
5
  declare function stringType<T extends string = string>(defaultVal?: T): {
7
- type: PropType<T>;
8
- default: T;
6
+ type: PropType<T>;
7
+ default: T;
9
8
  };
10
9
  declare function numberType<T extends number = number>(defaultVal?: T): {
11
- type: PropType<T>;
12
- default: T;
10
+ type: PropType<T>;
11
+ default: T;
13
12
  };
14
13
  declare function booleanType<T extends boolean = boolean>(defaultVal?: T): {
15
- type: PropType<T>;
16
- default: T;
14
+ type: PropType<T>;
15
+ default: T;
17
16
  };
18
17
  declare function arrayType<T extends any[] = any[]>(defaultVal?: T): {
19
- type: PropType<T>;
20
- default: T;
18
+ type: PropType<T>;
19
+ default: T;
21
20
  };
22
21
  declare function objectType<T extends Record<string, any> = Record<string, any>>(defaultVal?: T): {
23
- type: PropType<T>;
24
- default: T;
22
+ type: PropType<T>;
23
+ default: T;
25
24
  };
26
25
  declare function functionType<T = () => any>(defaultVal?: T): {
27
- type: PropType<T>;
28
- default: T;
26
+ type: PropType<T>;
27
+ default: T;
29
28
  };
30
29
  declare function anyType<T = any>(defaultVal?: T, required?: boolean): {
31
- default: T;
32
- type: PropType<T>;
30
+ default: T;
31
+ type: PropType<T>;
33
32
  };
34
33
  declare function vNodeType<T = vueNode>(): {
35
- type: PropType<T>;
34
+ type: PropType<T>;
36
35
  };
37
36
  declare function someType<T>(types?: any[], defaultVal?: T): {
38
- type: PropType<T>;
39
- default: T;
37
+ type: PropType<T>;
38
+ default: T;
40
39
  };
41
40
  declare function eventType<T>(): {
42
- type: PropType<T>;
41
+ type: PropType<T>;
43
42
  };
44
43
  declare function runEvent<T>(event: T, ...args: any[]): any;
45
44
  declare function runAsyncEvent<T>(event: T, ...args: any[]): Promise<any>;
46
45
  declare function getEventValue<T = any>(result: any, index?: number): T;
47
- //#endregion
48
- export { eventType as a, numberType as c, runEvent as d, someType as f, vueNode as h, booleanType as i, objectType as l, vNodeType as m, anyType as n, functionType as o, stringType as p, arrayType as r, getEventValue as s, VueKey as t, runAsyncEvent as u };
46
+
47
+ export { type VueKey, anyType, arrayType, booleanType, eventType, functionType, getEventValue, numberType, objectType, runAsyncEvent, runEvent, someType, stringType, vNodeType, type vueNode };
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var s=(e,n)=>{for(var r in n)o(e,r,{get:n[r],enumerable:!0})},i=(e,n,r,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of u(n))!y.call(e,t)&&t!==r&&o(e,t,{get:()=>n[t],enumerable:!(a=p(n,t))||a.enumerable});return e};var f=e=>i(o({},"__esModule",{value:!0}),e);var v={};s(v,{anyType:()=>T,arrayType:()=>x,booleanType:()=>l,eventType:()=>A,functionType:()=>P,getEventValue:()=>N,numberType:()=>c,objectType:()=>b,runAsyncEvent:()=>g,runEvent:()=>k,someType:()=>w,stringType:()=>d,vNodeType:()=>m});module.exports=f(v);function d(e){return{type:String,default:e}}function c(e){return{type:Number,default:e}}function l(e){return{type:Boolean,default:e}}function x(e){return{type:Array,default:e}}function b(e){return{type:Object,default:e}}function P(e){return{type:Function,default:e}}function T(e,n){let r={validator:()=>!0,default:e};return r}function m(){return{validator:()=>!0}}function w(e,n){return e?{type:e,default:n}:T(n)}function A(){return{type:[Function,Array]}}function k(e,...n){if(typeof e=="function")return e(...n);if(Array.isArray(e))return e.map(r=>r(...n))}async function g(e,...n){if(typeof e=="function")return await e(...n);if(Array.isArray(e))return await Promise.all(e.map(r=>r(...n)))}function N(e,n=0){return Array.isArray(e)?e[n]:e}0&&(module.exports={anyType,arrayType,booleanType,eventType,functionType,getEventValue,numberType,objectType,runAsyncEvent,runEvent,someType,stringType,vNodeType});
@@ -1 +1 @@
1
- import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"../type-util-Qle7ht7X.mjs";export{d as anyType,o as arrayType,l as booleanType,i as eventType,e as functionType,s as getEventValue,u as numberType,t as objectType,a as runAsyncEvent,f as runEvent,n as someType,r as stringType,c as vNodeType};
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunk-YA66RVVU.mjs";export{g as anyType,d as arrayType,c as booleanType,j as eventType,f as functionType,m as getEventValue,b as numberType,e as objectType,l as runAsyncEvent,k as runEvent,i as someType,a as stringType,h as vNodeType};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obr-fe/utils",
3
- "version": "1.2.0",
3
+ "version": "2.0.0",
4
4
  "description": "Generic JavaScript utility functions by Beijing Oubeier Software.",
5
5
  "author": "oberyun",
6
6
  "license": "MIT",
@@ -40,8 +40,8 @@
40
40
  "dist"
41
41
  ],
42
42
  "scripts": {
43
- "build": "tsdown",
44
- "dev": "tsdown --watch",
43
+ "build": "tsup",
44
+ "dev": "tsup --watch",
45
45
  "docs:dev": "vitepress dev docs",
46
46
  "docs:build": "vitepress build docs",
47
47
  "docs:preview": "vitepress preview docs",
@@ -79,7 +79,7 @@
79
79
  "@types/node": "^20.12.12",
80
80
  "eslint": "^9.15.0",
81
81
  "fast-glob": "^3.3.1",
82
- "tsdown": "0.17.0-beta.5",
82
+ "tsup": "^8.5.1",
83
83
  "typescript": "^4.9.5",
84
84
  "vitepress": "^1.0.2"
85
85
  }
@@ -1 +0,0 @@
1
- import{d as e,f as t,g as n,v as r}from"./base-854WVUaj.mjs";import{r as i}from"./lodash-iHVEJs1z.mjs";import{n as a}from"./object-j-lK643f.mjs";const o=(...e)=>e,s=(...e)=>e;function c(e){return Array.isArray(e)?e:[e]}function l(e=[],t=`id`,n=`pid`,r=`children`){let a=[],o={},s=i(e);for(let e=0;e<s.length;e++)o[s[e][t]]=s[e];for(let e=0;e<s.length;e++)o[s[e][n]]&&s[e][t]!==s[e][n]?(o[s[e][n]][r]||(o[s[e][n]][r]=[]),o[s[e][n]][r].push(s[e])):a.push(s[e]);return a}function u(e,t){return e.map(e=>({label:e[t.label],value:e[t.value]}))}function d(e){return e.filter(e=>!t(e))}function f(e=[],n,r,i=!1){let o={value:`value`,children:`children`,...a(r)},s=[],[c]=n,l=e.find(e=>e[o.value]===c);if(!t(c)&&!t(l)){let{[o.children]:e,...t}=l;return s.concat(i?{...t,children:e}:t,...f(e??[],n.slice(1),o))}return s}function p(e=[],t=`children`,n=!1){let r=[],i=(e,t)=>{e.forEach(e=>{let{[t]:a,...o}=e;n?r.push(e):r.push(o),a&&i(a,t)})};return i(e,t),r}function m(e,t){return e.reduce((e,n)=>(e.find(e=>t.every(t=>e[t]===n[t]))||e.push(n),e),[])}function h(e,t=[]){return e.filter(e=>!t.includes(e))}function g(t,i=[]){return t.filter(t=>!i.some(i=>r(i)&&r(t)?e(i)?e(t):Object.entries(i).every(([e,n])=>n===t[e]):n(i)&&Number.isNaN(i)?n(t)&&Number.isNaN(t):t===i))}export{d as a,p as c,m as d,g as i,o as l,l as n,f as o,h as r,c as s,u as t,s as u};