@studiometa/js-toolkit 2.11.2 → 3.0.0-alpha.1

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 (407) hide show
  1. package/Base/Base.d.ts +2 -2
  2. package/Base/Base.js +142 -79
  3. package/Base/Base.js.map +2 -2
  4. package/Base/features.d.ts +10 -2
  5. package/Base/features.js +23 -1
  6. package/Base/features.js.map +2 -2
  7. package/Base/managers/AbstractManager.d.ts +3 -3
  8. package/Base/managers/AbstractManager.js +21 -0
  9. package/Base/managers/AbstractManager.js.map +1 -1
  10. package/Base/managers/ActionManager.d.ts +4 -0
  11. package/Base/managers/ActionManager.js +10 -0
  12. package/Base/managers/ActionManager.js.map +7 -0
  13. package/Base/managers/ChildrenManager.d.ts +1 -1
  14. package/Base/managers/ChildrenManager.js +41 -8
  15. package/Base/managers/ChildrenManager.js.map +2 -2
  16. package/Base/managers/EventsManager.js +88 -7
  17. package/Base/managers/EventsManager.js.map +2 -2
  18. package/Base/managers/OptionsManager.js +25 -2
  19. package/Base/managers/OptionsManager.js.map +2 -2
  20. package/Base/managers/RefsManager.js +27 -6
  21. package/Base/managers/RefsManager.js.map +2 -2
  22. package/Base/managers/ResponsiveOptionsManager.js +22 -6
  23. package/Base/managers/ResponsiveOptionsManager.js.map +2 -2
  24. package/Base/managers/ServicesManager.d.ts +2 -4
  25. package/Base/managers/ServicesManager.js +56 -7
  26. package/Base/managers/ServicesManager.js.map +2 -2
  27. package/Base/utils.js +5 -1
  28. package/Base/utils.js.map +2 -2
  29. package/decorators/index.d.ts +0 -1
  30. package/decorators/index.js +0 -1
  31. package/decorators/index.js.map +2 -2
  32. package/decorators/withBreakpointManager.js +14 -4
  33. package/decorators/withBreakpointManager.js.map +2 -2
  34. package/decorators/withBreakpointObserver.js +13 -3
  35. package/decorators/withBreakpointObserver.js.map +2 -2
  36. package/decorators/withDrag.js +6 -0
  37. package/decorators/withDrag.js.map +1 -1
  38. package/decorators/withExtraConfig.js +3 -0
  39. package/decorators/withExtraConfig.js.map +1 -1
  40. package/decorators/withFreezedOptions.js +8 -0
  41. package/decorators/withFreezedOptions.js.map +1 -1
  42. package/decorators/withIntersectionObserver.js +10 -1
  43. package/decorators/withIntersectionObserver.js.map +2 -2
  44. package/decorators/withMountOnMediaQuery.js +17 -1
  45. package/decorators/withMountOnMediaQuery.js.map +2 -2
  46. package/decorators/withMountWhenInView.js +22 -1
  47. package/decorators/withMountWhenInView.js.map +2 -2
  48. package/decorators/withRelativePointer.js +6 -0
  49. package/decorators/withRelativePointer.js.map +1 -1
  50. package/decorators/withResponsiveOptions.js +3 -0
  51. package/decorators/withResponsiveOptions.js.map +1 -1
  52. package/decorators/withScrolledInView/utils.d.ts +12 -1
  53. package/decorators/withScrolledInView/utils.js +7 -7
  54. package/decorators/withScrolledInView/utils.js.map +2 -2
  55. package/decorators/withScrolledInView/withScrolledInView.js +13 -35
  56. package/decorators/withScrolledInView/withScrolledInView.js.map +2 -2
  57. package/helpers/createApp.d.ts +2 -1
  58. package/helpers/createApp.js +2 -2
  59. package/helpers/createApp.js.map +2 -2
  60. package/helpers/getDirectChildren.js.map +1 -1
  61. package/helpers/importOnInteraction.js +4 -4
  62. package/helpers/importOnInteraction.js.map +2 -2
  63. package/helpers/importWhenVisible.js +2 -1
  64. package/helpers/importWhenVisible.js.map +2 -2
  65. package/package.json +2 -10
  66. package/services/drag.js +8 -8
  67. package/services/drag.js.map +2 -2
  68. package/services/index.d.ts +1 -1
  69. package/services/index.js.map +2 -2
  70. package/services/key.js +2 -2
  71. package/services/key.js.map +2 -2
  72. package/services/load.js +3 -0
  73. package/services/load.js.map +1 -1
  74. package/services/pointer.d.ts +1 -1
  75. package/services/pointer.js +7 -7
  76. package/services/pointer.js.map +2 -2
  77. package/services/raf.js +4 -6
  78. package/services/raf.js.map +2 -2
  79. package/services/resize.d.ts +7 -6
  80. package/services/resize.js +19 -26
  81. package/services/resize.js.map +2 -2
  82. package/services/scroll.js +8 -8
  83. package/services/scroll.js.map +2 -2
  84. package/services/service.js +2 -2
  85. package/services/service.js.map +2 -2
  86. package/utils/Queue.js +30 -0
  87. package/utils/Queue.js.map +1 -1
  88. package/utils/SmartQueue.d.ts +1 -1
  89. package/utils/SmartQueue.js +13 -1
  90. package/utils/SmartQueue.js.map +2 -2
  91. package/utils/collide/collidePointRect.js +4 -1
  92. package/utils/collide/collidePointRect.js.map +1 -1
  93. package/utils/collide/collideRectRect.js +4 -1
  94. package/utils/collide/collideRectRect.js.map +1 -1
  95. package/utils/css/animate.d.ts +33 -15
  96. package/utils/css/animate.js +80 -34
  97. package/utils/css/animate.js.map +2 -2
  98. package/utils/css/classes.js +2 -3
  99. package/utils/css/classes.js.map +2 -2
  100. package/utils/css/getOffsetSizes.js +2 -2
  101. package/utils/css/getOffsetSizes.js.map +1 -1
  102. package/utils/css/index.d.ts +2 -1
  103. package/utils/css/index.js +4 -4
  104. package/utils/css/index.js.map +2 -2
  105. package/utils/css/matrix.d.ts +1 -1
  106. package/utils/css/matrix.js.map +2 -2
  107. package/utils/css/styles.js +2 -2
  108. package/utils/css/styles.js.map +2 -2
  109. package/utils/css/transform.d.ts +1 -1
  110. package/utils/css/transform.js +1 -1
  111. package/utils/css/transform.js.map +2 -2
  112. package/utils/css/transition.js +15 -0
  113. package/utils/css/transition.js.map +1 -1
  114. package/utils/css/utils.d.ts +1 -1
  115. package/utils/css/utils.js +1 -1
  116. package/utils/css/utils.js.map +2 -2
  117. package/utils/history.js +6 -5
  118. package/utils/history.js.map +2 -2
  119. package/utils/index.d.ts +5 -4
  120. package/utils/index.js +16 -16
  121. package/utils/index.js.map +2 -2
  122. package/utils/is.d.ts +12 -0
  123. package/utils/is.js +17 -0
  124. package/utils/is.js.map +2 -2
  125. package/utils/math/ease.d.ts +1 -0
  126. package/utils/math/ease.js +2 -0
  127. package/utils/math/ease.js.map +2 -2
  128. package/utils/math/index.d.ts +4 -3
  129. package/utils/math/index.js +5 -3
  130. package/utils/math/index.js.map +2 -2
  131. package/utils/math/mean.d.ts +1 -0
  132. package/utils/math/mean.js +17 -0
  133. package/utils/math/mean.js.map +7 -0
  134. package/utils/nextFrame.d.ts +4 -22
  135. package/utils/nextFrame.js +3 -10
  136. package/utils/nextFrame.js.map +2 -2
  137. package/utils/nextMicrotask.d.ts +4 -1
  138. package/utils/nextMicrotask.js +3 -3
  139. package/utils/nextMicrotask.js.map +2 -2
  140. package/utils/nextTick.d.ts +4 -1
  141. package/utils/nextTick.js +3 -3
  142. package/utils/nextTick.js.map +2 -2
  143. package/utils/random.d.ts +15 -0
  144. package/utils/random.js +15 -0
  145. package/utils/random.js.map +7 -0
  146. package/utils/scheduler.js +4 -4
  147. package/utils/scheduler.js.map +2 -2
  148. package/utils/scrollTo.d.ts +30 -6
  149. package/utils/scrollTo.js +97 -43
  150. package/utils/scrollTo.js.map +2 -2
  151. package/utils/string/endsWith.d.ts +8 -0
  152. package/utils/string/endsWith.js +13 -0
  153. package/utils/string/endsWith.js.map +7 -0
  154. package/utils/string/index.d.ts +2 -0
  155. package/utils/string/index.js +2 -0
  156. package/utils/string/index.js.map +2 -2
  157. package/utils/string/startsWith.d.ts +8 -0
  158. package/utils/string/startsWith.js +13 -0
  159. package/utils/string/startsWith.js.map +7 -0
  160. package/utils/string/withLeadingCharacters.js.map +1 -1
  161. package/utils/string/withTrailingCharacters.js.map +1 -1
  162. package/utils/string/withoutLeadingCharacters.js.map +1 -1
  163. package/utils/string/withoutLeadingCharactersRecursive.js.map +1 -1
  164. package/utils/string/withoutTrailingCharacters.js.map +1 -1
  165. package/utils/string/withoutTrailingCharactersRecursive.js.map +1 -1
  166. package/utils/{focusTrap.d.ts → trapFocus.d.ts} +2 -10
  167. package/utils/{focusTrap.js → trapFocus.js} +5 -9
  168. package/utils/trapFocus.js.map +7 -0
  169. package/utils/tween.d.ts +59 -10
  170. package/utils/tween.js +24 -18
  171. package/utils/tween.js.map +2 -2
  172. package/Base/Base.cjs +0 -325
  173. package/Base/Base.cjs.map +0 -7
  174. package/Base/features.cjs +0 -27
  175. package/Base/features.cjs.map +0 -7
  176. package/Base/index.cjs +0 -21
  177. package/Base/index.cjs.map +0 -7
  178. package/Base/managers/AbstractManager.cjs +0 -57
  179. package/Base/managers/AbstractManager.cjs.map +0 -7
  180. package/Base/managers/ChildrenManager.cjs +0 -123
  181. package/Base/managers/ChildrenManager.cjs.map +0 -7
  182. package/Base/managers/EventsManager.cjs +0 -220
  183. package/Base/managers/EventsManager.cjs.map +0 -7
  184. package/Base/managers/OptionsManager.cjs +0 -171
  185. package/Base/managers/OptionsManager.cjs.map +0 -7
  186. package/Base/managers/RefsManager.cjs +0 -104
  187. package/Base/managers/RefsManager.cjs.map +0 -7
  188. package/Base/managers/ResponsiveOptionsManager.cjs +0 -63
  189. package/Base/managers/ResponsiveOptionsManager.cjs.map +0 -7
  190. package/Base/managers/ServicesManager.cjs +0 -111
  191. package/Base/managers/ServicesManager.cjs.map +0 -7
  192. package/Base/managers/index.cjs +0 -39
  193. package/Base/managers/index.cjs.map +0 -7
  194. package/Base/types.cjs +0 -19
  195. package/Base/types.cjs.map +0 -7
  196. package/Base/utils.cjs +0 -91
  197. package/Base/utils.cjs.map +0 -7
  198. package/decorators/index.cjs +0 -33
  199. package/decorators/index.cjs.map +0 -7
  200. package/decorators/withBreakpointManager.cjs +0 -92
  201. package/decorators/withBreakpointManager.cjs.map +0 -7
  202. package/decorators/withBreakpointObserver.cjs +0 -118
  203. package/decorators/withBreakpointObserver.cjs.map +0 -7
  204. package/decorators/withDrag.cjs +0 -50
  205. package/decorators/withDrag.cjs.map +0 -7
  206. package/decorators/withExtraConfig.cjs +0 -43
  207. package/decorators/withExtraConfig.cjs.map +0 -7
  208. package/decorators/withFreezedOptions.cjs +0 -42
  209. package/decorators/withFreezedOptions.cjs.map +0 -7
  210. package/decorators/withIntersectionObserver.cjs +0 -62
  211. package/decorators/withIntersectionObserver.cjs.map +0 -7
  212. package/decorators/withMountOnMediaQuery.cjs +0 -70
  213. package/decorators/withMountOnMediaQuery.cjs.map +0 -7
  214. package/decorators/withMountWhenInView.cjs +0 -71
  215. package/decorators/withMountWhenInView.cjs.map +0 -7
  216. package/decorators/withMountWhenPrefersMotion.cjs +0 -30
  217. package/decorators/withMountWhenPrefersMotion.cjs.map +0 -7
  218. package/decorators/withRelativePointer.cjs +0 -50
  219. package/decorators/withRelativePointer.cjs.map +0 -7
  220. package/decorators/withResponsiveOptions.cjs +0 -38
  221. package/decorators/withResponsiveOptions.cjs.map +0 -7
  222. package/decorators/withScrolledInView/index.cjs +0 -22
  223. package/decorators/withScrolledInView/index.cjs.map +0 -7
  224. package/decorators/withScrolledInView/types.cjs +0 -19
  225. package/decorators/withScrolledInView/types.cjs.map +0 -7
  226. package/decorators/withScrolledInView/utils.cjs +0 -99
  227. package/decorators/withScrolledInView/utils.cjs.map +0 -7
  228. package/decorators/withScrolledInView/withScrolledInView.cjs +0 -216
  229. package/decorators/withScrolledInView/withScrolledInView.cjs.map +0 -7
  230. package/decorators/withVue2.cjs +0 -65
  231. package/decorators/withVue2.cjs.map +0 -7
  232. package/decorators/withVue2.d.ts +0 -16
  233. package/decorators/withVue2.js +0 -43
  234. package/decorators/withVue2.js.map +0 -7
  235. package/helpers/createApp.cjs +0 -58
  236. package/helpers/createApp.cjs.map +0 -7
  237. package/helpers/getClosestParent.cjs +0 -41
  238. package/helpers/getClosestParent.cjs.map +0 -7
  239. package/helpers/getDirectChildren.cjs +0 -47
  240. package/helpers/getDirectChildren.cjs.map +0 -7
  241. package/helpers/getInstanceFromElement.cjs +0 -32
  242. package/helpers/getInstanceFromElement.cjs.map +0 -7
  243. package/helpers/importOnInteraction.cjs +0 -48
  244. package/helpers/importOnInteraction.cjs.map +0 -7
  245. package/helpers/importOnMediaQuery.cjs +0 -44
  246. package/helpers/importOnMediaQuery.cjs.map +0 -7
  247. package/helpers/importWhenIdle.cjs +0 -46
  248. package/helpers/importWhenIdle.cjs.map +0 -7
  249. package/helpers/importWhenPrefersMotion.cjs +0 -36
  250. package/helpers/importWhenPrefersMotion.cjs.map +0 -7
  251. package/helpers/importWhenVisible.cjs +0 -43
  252. package/helpers/importWhenVisible.cjs.map +0 -7
  253. package/helpers/index.cjs +0 -49
  254. package/helpers/index.cjs.map +0 -7
  255. package/helpers/utils.cjs +0 -37
  256. package/helpers/utils.cjs.map +0 -7
  257. package/index.cjs +0 -31
  258. package/index.cjs.map +0 -7
  259. package/services/drag.cjs +0 -227
  260. package/services/drag.cjs.map +0 -7
  261. package/services/index.cjs +0 -47
  262. package/services/index.cjs.map +0 -7
  263. package/services/key.cjs +0 -93
  264. package/services/key.cjs.map +0 -7
  265. package/services/load.cjs +0 -57
  266. package/services/load.cjs.map +0 -7
  267. package/services/pointer.cjs +0 -145
  268. package/services/pointer.cjs.map +0 -7
  269. package/services/raf.cjs +0 -80
  270. package/services/raf.cjs.map +0 -7
  271. package/services/resize.cjs +0 -103
  272. package/services/resize.cjs.map +0 -7
  273. package/services/scroll.cjs +0 -115
  274. package/services/scroll.cjs.map +0 -7
  275. package/services/service.cjs +0 -69
  276. package/services/service.cjs.map +0 -7
  277. package/utils/Queue.cjs +0 -63
  278. package/utils/Queue.cjs.map +0 -7
  279. package/utils/SmartQueue.cjs +0 -57
  280. package/utils/SmartQueue.cjs.map +0 -7
  281. package/utils/collide/boundingRectToCircle.cjs +0 -36
  282. package/utils/collide/boundingRectToCircle.cjs.map +0 -7
  283. package/utils/collide/collideCircleCircle.cjs +0 -35
  284. package/utils/collide/collideCircleCircle.cjs.map +0 -7
  285. package/utils/collide/collideCircleRect.cjs +0 -47
  286. package/utils/collide/collideCircleRect.cjs.map +0 -7
  287. package/utils/collide/collidePointCircle.cjs +0 -32
  288. package/utils/collide/collidePointCircle.cjs.map +0 -7
  289. package/utils/collide/collidePointRect.cjs +0 -29
  290. package/utils/collide/collidePointRect.cjs.map +0 -7
  291. package/utils/collide/collideRectRect.cjs +0 -29
  292. package/utils/collide/collideRectRect.cjs.map +0 -7
  293. package/utils/collide/index.cjs +0 -43
  294. package/utils/collide/index.cjs.map +0 -7
  295. package/utils/css/animate.cjs +0 -193
  296. package/utils/css/animate.cjs.map +0 -7
  297. package/utils/css/classes.cjs +0 -52
  298. package/utils/css/classes.cjs.map +0 -7
  299. package/utils/css/getOffsetSizes.cjs +0 -48
  300. package/utils/css/getOffsetSizes.cjs.map +0 -7
  301. package/utils/css/index.cjs +0 -48
  302. package/utils/css/index.cjs.map +0 -7
  303. package/utils/css/matrix.cjs +0 -30
  304. package/utils/css/matrix.cjs.map +0 -7
  305. package/utils/css/styles.cjs +0 -45
  306. package/utils/css/styles.cjs.map +0 -7
  307. package/utils/css/transform.cjs +0 -91
  308. package/utils/css/transform.cjs.map +0 -7
  309. package/utils/css/transition.cjs +0 -126
  310. package/utils/css/transition.cjs.map +0 -7
  311. package/utils/css/utils.cjs +0 -32
  312. package/utils/css/utils.cjs.map +0 -7
  313. package/utils/debounce.cjs +0 -35
  314. package/utils/debounce.cjs.map +0 -7
  315. package/utils/dom/ancestors.cjs +0 -37
  316. package/utils/dom/ancestors.cjs.map +0 -7
  317. package/utils/dom/index.cjs +0 -21
  318. package/utils/dom/index.cjs.map +0 -7
  319. package/utils/focusTrap.cjs +0 -89
  320. package/utils/focusTrap.cjs.map +0 -7
  321. package/utils/focusTrap.js.map +0 -7
  322. package/utils/getComponentResolver.cjs +0 -38
  323. package/utils/getComponentResolver.cjs.map +0 -7
  324. package/utils/has.cjs +0 -29
  325. package/utils/has.cjs.map +0 -7
  326. package/utils/history.cjs +0 -91
  327. package/utils/history.cjs.map +0 -7
  328. package/utils/index.cjs +0 -72
  329. package/utils/index.cjs.map +0 -7
  330. package/utils/is.cjs +0 -41
  331. package/utils/is.cjs.map +0 -7
  332. package/utils/keyCodes.cjs +0 -36
  333. package/utils/keyCodes.cjs.map +0 -7
  334. package/utils/math/clamp.cjs +0 -29
  335. package/utils/math/clamp.cjs.map +0 -7
  336. package/utils/math/clamp01.cjs +0 -36
  337. package/utils/math/clamp01.cjs.map +0 -7
  338. package/utils/math/createEases.cjs +0 -33
  339. package/utils/math/createEases.cjs.map +0 -7
  340. package/utils/math/damp.cjs +0 -29
  341. package/utils/math/damp.cjs.map +0 -7
  342. package/utils/math/ease.cjs +0 -82
  343. package/utils/math/ease.cjs.map +0 -7
  344. package/utils/math/index.cjs +0 -50
  345. package/utils/math/index.cjs.map +0 -7
  346. package/utils/math/inertiaFinalValue.cjs +0 -43
  347. package/utils/math/inertiaFinalValue.cjs.map +0 -7
  348. package/utils/math/lerp.cjs +0 -29
  349. package/utils/math/lerp.cjs.map +0 -7
  350. package/utils/math/map.cjs +0 -29
  351. package/utils/math/map.cjs.map +0 -7
  352. package/utils/math/round.cjs +0 -29
  353. package/utils/math/round.cjs.map +0 -7
  354. package/utils/memoize.cjs +0 -48
  355. package/utils/memoize.cjs.map +0 -7
  356. package/utils/nextFrame.cjs +0 -41
  357. package/utils/nextFrame.cjs.map +0 -7
  358. package/utils/nextMicrotask.cjs +0 -30
  359. package/utils/nextMicrotask.cjs.map +0 -7
  360. package/utils/nextTick.cjs +0 -31
  361. package/utils/nextTick.cjs.map +0 -7
  362. package/utils/noop.cjs +0 -32
  363. package/utils/noop.cjs.map +0 -7
  364. package/utils/object/autoBind.cjs +0 -54
  365. package/utils/object/autoBind.cjs.map +0 -7
  366. package/utils/object/autoBind.d.ts +0 -14
  367. package/utils/object/autoBind.js +0 -26
  368. package/utils/object/autoBind.js.map +0 -7
  369. package/utils/object/getAllProperties.cjs +0 -39
  370. package/utils/object/getAllProperties.cjs.map +0 -7
  371. package/utils/object/index.cjs +0 -35
  372. package/utils/object/index.cjs.map +0 -7
  373. package/utils/object/index.d.ts +0 -2
  374. package/utils/object/index.js +0 -7
  375. package/utils/object/index.js.map +0 -7
  376. package/utils/scheduler.cjs +0 -75
  377. package/utils/scheduler.cjs.map +0 -7
  378. package/utils/scrollTo.cjs +0 -84
  379. package/utils/scrollTo.cjs.map +0 -7
  380. package/utils/string/index.cjs +0 -51
  381. package/utils/string/index.cjs.map +0 -7
  382. package/utils/string/withLeadingCharacters.cjs +0 -36
  383. package/utils/string/withLeadingCharacters.cjs.map +0 -7
  384. package/utils/string/withLeadingSlash.cjs +0 -36
  385. package/utils/string/withLeadingSlash.cjs.map +0 -7
  386. package/utils/string/withTrailingCharacters.cjs +0 -36
  387. package/utils/string/withTrailingCharacters.cjs.map +0 -7
  388. package/utils/string/withTrailingSlash.cjs +0 -36
  389. package/utils/string/withTrailingSlash.cjs.map +0 -7
  390. package/utils/string/withoutLeadingCharacters.cjs +0 -29
  391. package/utils/string/withoutLeadingCharacters.cjs.map +0 -7
  392. package/utils/string/withoutLeadingCharactersRecursive.cjs +0 -41
  393. package/utils/string/withoutLeadingCharactersRecursive.cjs.map +0 -7
  394. package/utils/string/withoutLeadingSlash.cjs +0 -36
  395. package/utils/string/withoutLeadingSlash.cjs.map +0 -7
  396. package/utils/string/withoutTrailingCharacters.cjs +0 -29
  397. package/utils/string/withoutTrailingCharacters.cjs.map +0 -7
  398. package/utils/string/withoutTrailingCharactersRecursive.cjs +0 -41
  399. package/utils/string/withoutTrailingCharactersRecursive.cjs.map +0 -7
  400. package/utils/string/withoutTrailingSlash.cjs +0 -36
  401. package/utils/string/withoutTrailingSlash.cjs.map +0 -7
  402. package/utils/throttle.cjs +0 -37
  403. package/utils/throttle.cjs.map +0 -7
  404. package/utils/tween.cjs +0 -118
  405. package/utils/tween.cjs.map +0 -7
  406. package/utils/wait.cjs +0 -31
  407. package/utils/wait.cjs.map +0 -7
@@ -1,84 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/scrollTo.ts
26
- var scrollTo_exports = {};
27
- __export(scrollTo_exports, {
28
- default: () => scrollTo
29
- });
30
- module.exports = __toCommonJS(scrollTo_exports);
31
- var import_damp = __toESM(require("./math/damp.cjs"), 1);
32
- function scrollTo(selectorElement, { offset = 0, dampFactor = 0.2 } = {}) {
33
- let targetElement = null;
34
- if (selectorElement instanceof HTMLElement) {
35
- targetElement = selectorElement;
36
- } else {
37
- targetElement = document.querySelector(selectorElement);
38
- }
39
- if (!targetElement) {
40
- return Promise.resolve(window.pageYOffset);
41
- }
42
- const sizes = targetElement.getBoundingClientRect();
43
- const scrollMargin = getComputedStyle(targetElement).scrollMarginTop || "0";
44
- const max = document.documentElement.scrollHeight - window.innerHeight;
45
- let scrollTarget = sizes.top + window.pageYOffset - Number.parseInt(scrollMargin, 10) - offset;
46
- if (scrollTarget > max) {
47
- scrollTarget = max;
48
- }
49
- return new Promise((resolve) => {
50
- let isScrolling = false;
51
- let scroll = window.pageYOffset;
52
- let dampScroll = window.pageYOffset;
53
- function eventHandler() {
54
- isScrolling = false;
55
- }
56
- function end() {
57
- window.removeEventListener("wheel", eventHandler);
58
- window.removeEventListener("touchmove", eventHandler);
59
- resolve(window.pageYOffset);
60
- }
61
- function loop() {
62
- if (!isScrolling) {
63
- return end();
64
- }
65
- dampScroll = (0, import_damp.default)(scroll, dampScroll, dampFactor);
66
- window.scrollTo({ top: dampScroll });
67
- if (dampScroll === scroll) {
68
- isScrolling = false;
69
- }
70
- return requestAnimationFrame(loop);
71
- }
72
- function start(target) {
73
- isScrolling = true;
74
- dampScroll = window.pageYOffset;
75
- scroll = target;
76
- window.addEventListener("wheel", eventHandler, { passive: true });
77
- window.addEventListener("touchmove", eventHandler, { passive: true });
78
- loop();
79
- }
80
- start(scrollTarget);
81
- });
82
- }
83
- if (module.exports.default) module.exports = module.exports.default;
84
- //# sourceMappingURL=scrollTo.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../packages/js-toolkit/utils/scrollTo.ts"],
4
- "sourcesContent": ["import damp from './math/damp.js';\n\n/**\n * Handler for the click event on anchor links\n *\n * @returns {Promise<number>} A promising resolving with the target scroll position.\n */\nexport default function scrollTo(\n selectorElement: HTMLElement | string,\n { offset = 0, dampFactor = 0.2 } = {},\n): Promise<number> {\n let targetElement = null;\n\n if (selectorElement instanceof HTMLElement) {\n targetElement = selectorElement;\n } else {\n targetElement = document.querySelector(selectorElement);\n }\n\n if (!targetElement) {\n return Promise.resolve(window.pageYOffset);\n }\n\n const sizes = targetElement.getBoundingClientRect();\n const scrollMargin = getComputedStyle(targetElement).scrollMarginTop || '0';\n const max = document.documentElement.scrollHeight - window.innerHeight;\n let scrollTarget = sizes.top + window.pageYOffset - Number.parseInt(scrollMargin, 10) - offset;\n\n // Make sure to not scroll more than the max scroll allowed\n if (scrollTarget > max) {\n scrollTarget = max;\n }\n\n return new Promise((resolve) => {\n let isScrolling = false;\n let scroll = window.pageYOffset;\n let dampScroll = window.pageYOffset;\n\n /**\n * Handler for the wheel event\n * Is used to cancel the programmatic scroll animation\n */\n function eventHandler() {\n isScrolling = false;\n }\n\n /**\n * Scroll animation end's hook\n */\n function end() {\n window.removeEventListener('wheel', eventHandler);\n window.removeEventListener('touchmove', eventHandler);\n resolve(window.pageYOffset);\n }\n\n /**\n * Scroll animation's loop\n *\n * @returns {void|number}\n */\n function loop() {\n if (!isScrolling) {\n return end();\n }\n\n dampScroll = damp(scroll, dampScroll, dampFactor);\n window.scrollTo({ top: dampScroll });\n\n if (dampScroll === scroll) {\n isScrolling = false;\n }\n\n return requestAnimationFrame(loop);\n }\n\n /**\n * Start the scroll animation\n *\n * @param {number} target The target scroll\n */\n function start(target) {\n // Update vars\n isScrolling = true;\n dampScroll = window.pageYOffset;\n scroll = target;\n\n // Bind wheel event to stop the animation if\n // the user wants to scroll manually\n window.addEventListener('wheel', eventHandler, { passive: true });\n window.addEventListener('touchmove', eventHandler, { passive: true });\n\n // Init the loop\n loop();\n }\n\n // Start the scroll\n start(scrollTarget);\n });\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAOF,SAAR,SACL,iBACA,EAAE,SAAS,GAAG,aAAa,IAAI,IAAI,CAAC,GACnB;AACjB,MAAI,gBAAgB;AAEpB,MAAI,2BAA2B,aAAa;AAC1C,oBAAgB;AAAA,EAClB,OAAO;AACL,oBAAgB,SAAS,cAAc,eAAe;AAAA,EACxD;AAEA,MAAI,CAAC,eAAe;AAClB,WAAO,QAAQ,QAAQ,OAAO,WAAW;AAAA,EAC3C;AAEA,QAAM,QAAQ,cAAc,sBAAsB;AAClD,QAAM,eAAe,iBAAiB,aAAa,EAAE,mBAAmB;AACxE,QAAM,MAAM,SAAS,gBAAgB,eAAe,OAAO;AAC3D,MAAI,eAAe,MAAM,MAAM,OAAO,cAAc,OAAO,SAAS,cAAc,EAAE,IAAI;AAGxF,MAAI,eAAe,KAAK;AACtB,mBAAe;AAAA,EACjB;AAEA,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,QAAI,cAAc;AAClB,QAAI,SAAS,OAAO;AACpB,QAAI,aAAa,OAAO;AAMxB,aAAS,eAAe;AACtB,oBAAc;AAAA,IAChB;AAKA,aAAS,MAAM;AACb,aAAO,oBAAoB,SAAS,YAAY;AAChD,aAAO,oBAAoB,aAAa,YAAY;AACpD,cAAQ,OAAO,WAAW;AAAA,IAC5B;AAOA,aAAS,OAAO;AACd,UAAI,CAAC,aAAa;AAChB,eAAO,IAAI;AAAA,MACb;AAEA,uBAAa,YAAAA,SAAK,QAAQ,YAAY,UAAU;AAChD,aAAO,SAAS,EAAE,KAAK,WAAW,CAAC;AAEnC,UAAI,eAAe,QAAQ;AACzB,sBAAc;AAAA,MAChB;AAEA,aAAO,sBAAsB,IAAI;AAAA,IACnC;AAOA,aAAS,MAAM,QAAQ;AAErB,oBAAc;AACd,mBAAa,OAAO;AACpB,eAAS;AAIT,aAAO,iBAAiB,SAAS,cAAc,EAAE,SAAS,KAAK,CAAC;AAChE,aAAO,iBAAiB,aAAa,cAAc,EAAE,SAAS,KAAK,CAAC;AAGpE,WAAK;AAAA,IACP;AAGA,UAAM,YAAY;AAAA,EACpB,CAAC;AACH;",
6
- "names": ["damp"]
7
- }
@@ -1,51 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/index.ts
26
- var string_exports = {};
27
- __export(string_exports, {
28
- withLeadingCharacters: () => import_withLeadingCharacters.default,
29
- withLeadingSlash: () => import_withLeadingSlash.default,
30
- withTrailingCharacters: () => import_withTrailingCharacters.default,
31
- withTrailingSlash: () => import_withTrailingSlash.default,
32
- withoutLeadingCharacters: () => import_withoutLeadingCharacters.default,
33
- withoutLeadingCharactersRecursive: () => import_withoutLeadingCharactersRecursive.default,
34
- withoutLeadingSlash: () => import_withoutLeadingSlash.default,
35
- withoutTrailingCharacters: () => import_withoutTrailingCharacters.default,
36
- withoutTrailingCharactersRecursive: () => import_withoutTrailingCharactersRecursive.default,
37
- withoutTrailingSlash: () => import_withoutTrailingSlash.default
38
- });
39
- module.exports = __toCommonJS(string_exports);
40
- var import_withLeadingCharacters = __toESM(require("./withLeadingCharacters.cjs"), 1);
41
- var import_withLeadingSlash = __toESM(require("./withLeadingSlash.cjs"), 1);
42
- var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
43
- var import_withoutLeadingCharactersRecursive = __toESM(require("./withoutLeadingCharactersRecursive.cjs"), 1);
44
- var import_withoutLeadingSlash = __toESM(require("./withoutLeadingSlash.cjs"), 1);
45
- var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
46
- var import_withoutTrailingCharactersRecursive = __toESM(require("./withoutTrailingCharactersRecursive.cjs"), 1);
47
- var import_withoutTrailingSlash = __toESM(require("./withoutTrailingSlash.cjs"), 1);
48
- var import_withTrailingCharacters = __toESM(require("./withTrailingCharacters.cjs"), 1);
49
- var import_withTrailingSlash = __toESM(require("./withTrailingSlash.cjs"), 1);
50
- if (module.exports.default) module.exports = module.exports.default;
51
- //# sourceMappingURL=index.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/index.ts"],
4
- "sourcesContent": ["export { default as withLeadingCharacters } from './withLeadingCharacters.js';\nexport { default as withLeadingSlash } from './withLeadingSlash.js';\nexport { default as withoutLeadingCharacters } from './withoutLeadingCharacters.js';\nexport { default as withoutLeadingCharactersRecursive } from './withoutLeadingCharactersRecursive.js';\nexport { default as withoutLeadingSlash } from './withoutLeadingSlash.js';\nexport { default as withoutTrailingCharacters } from './withoutTrailingCharacters.js';\nexport { default as withoutTrailingCharactersRecursive } from './withoutTrailingCharactersRecursive.js';\nexport { default as withoutTrailingSlash } from './withoutTrailingSlash.js';\nexport { default as withTrailingCharacters } from './withTrailingCharacters.js';\nexport { default as withTrailingSlash } from './withTrailingSlash.js';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAiD;AACjD,8BAA4C;AAC5C,sCAAoD;AACpD,+CAA6D;AAC7D,iCAA+C;AAC/C,uCAAqD;AACrD,gDAA8D;AAC9D,kCAAgD;AAChD,oCAAkD;AAClD,+BAA6C;",
6
- "names": []
7
- }
@@ -1,36 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withLeadingCharacters.ts
26
- var withLeadingCharacters_exports = {};
27
- __export(withLeadingCharacters_exports, {
28
- default: () => withLeadingCharacters
29
- });
30
- module.exports = __toCommonJS(withLeadingCharacters_exports);
31
- var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
32
- function withLeadingCharacters(string, characters) {
33
- return `${characters}${(0, import_withoutLeadingCharacters.default)(string, characters)}`;
34
- }
35
- if (module.exports.default) module.exports = module.exports.default;
36
- //# sourceMappingURL=withLeadingCharacters.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withLeadingCharacters.ts"],
4
- "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Add the given characters to the start of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withLeadingCharacters(string: string, characters: string): string {\n return `${characters}${withoutLeadingCharacters(string, characters)}`;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAqC;AAStB,SAAR,sBAAuC,QAAgB,YAA4B;AACxF,SAAO,GAAG,iBAAa,gCAAAA,SAAyB,QAAQ,UAAU;AACpE;",
6
- "names": ["withoutLeadingCharacters"]
7
- }
@@ -1,36 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withLeadingSlash.ts
26
- var withLeadingSlash_exports = {};
27
- __export(withLeadingSlash_exports, {
28
- default: () => withLeadingSlash
29
- });
30
- module.exports = __toCommonJS(withLeadingSlash_exports);
31
- var import_withLeadingCharacters = __toESM(require("./withLeadingCharacters.cjs"), 1);
32
- function withLeadingSlash(string) {
33
- return (0, import_withLeadingCharacters.default)(string, "/");
34
- }
35
- if (module.exports.default) module.exports = module.exports.default;
36
- //# sourceMappingURL=withLeadingSlash.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withLeadingSlash.ts"],
4
- "sourcesContent": ["import withLeadingCharacters from './withLeadingCharacters.js';\n\n/**\n * Add a leading slash to a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string with a leading slash.\n */\nexport default function withLeadingSlash(string: string): string {\n return withLeadingCharacters(string, '/');\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAAkC;AAQnB,SAAR,iBAAkC,QAAwB;AAC/D,aAAO,6BAAAA,SAAsB,QAAQ,GAAG;AAC1C;",
6
- "names": ["withLeadingCharacters"]
7
- }
@@ -1,36 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withTrailingCharacters.ts
26
- var withTrailingCharacters_exports = {};
27
- __export(withTrailingCharacters_exports, {
28
- default: () => withTrailingCharacters
29
- });
30
- module.exports = __toCommonJS(withTrailingCharacters_exports);
31
- var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
32
- function withTrailingCharacters(string, characters) {
33
- return `${(0, import_withoutTrailingCharacters.default)(string, characters)}${characters}`;
34
- }
35
- if (module.exports.default) module.exports = module.exports.default;
36
- //# sourceMappingURL=withTrailingCharacters.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withTrailingCharacters.ts"],
4
- "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Add the given characters to the end of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the end.\n * @returns {string}\n */\nexport default function withTrailingCharacters(string: string, characters: string): string {\n return `${withoutTrailingCharacters(string, characters)}${characters}`;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAsC;AASvB,SAAR,uBAAwC,QAAgB,YAA4B;AACzF,SAAO,OAAG,iCAAAA,SAA0B,QAAQ,UAAU,IAAI;AAC5D;",
6
- "names": ["withoutTrailingCharacters"]
7
- }
@@ -1,36 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withTrailingSlash.ts
26
- var withTrailingSlash_exports = {};
27
- __export(withTrailingSlash_exports, {
28
- default: () => withTrailingSlash
29
- });
30
- module.exports = __toCommonJS(withTrailingSlash_exports);
31
- var import_withTrailingCharacters = __toESM(require("./withTrailingCharacters.cjs"), 1);
32
- function withTrailingSlash(string) {
33
- return (0, import_withTrailingCharacters.default)(string, "/");
34
- }
35
- if (module.exports.default) module.exports = module.exports.default;
36
- //# sourceMappingURL=withTrailingSlash.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withTrailingSlash.ts"],
4
- "sourcesContent": ["import withTrailingCharacters from './withTrailingCharacters.js';\n\n/**\n * Add a trailing slash to a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string with a trailing slash.\n */\nexport default function withTrailingSlash(string: string): string {\n return withTrailingCharacters(string, '/');\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCAAmC;AAQpB,SAAR,kBAAmC,QAAwB;AAChE,aAAO,8BAAAA,SAAuB,QAAQ,GAAG;AAC3C;",
6
- "names": ["withTrailingCharacters"]
7
- }
@@ -1,29 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // packages/js-toolkit/utils/string/withoutLeadingCharacters.ts
20
- var withoutLeadingCharacters_exports = {};
21
- __export(withoutLeadingCharacters_exports, {
22
- default: () => withoutLeadingCharacters
23
- });
24
- module.exports = __toCommonJS(withoutLeadingCharacters_exports);
25
- function withoutLeadingCharacters(string, characters) {
26
- return string.replace(new RegExp(`^${characters}`), "");
27
- }
28
- if (module.exports.default) module.exports = module.exports.default;
29
- //# sourceMappingURL=withoutLeadingCharacters.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingCharacters.ts"],
4
- "sourcesContent": ["/**\n * Remove the given characters from the start of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to remove from the start.\n * @returns {string}\n */\nexport default function withoutLeadingCharacters(string: string, characters: string): string {\n return string.replace(new RegExp(`^${characters}`), '');\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOe,SAAR,yBAA0C,QAAgB,YAA4B;AAC3F,SAAO,OAAO,QAAQ,IAAI,OAAO,IAAI,YAAY,GAAG,EAAE;AACxD;",
6
- "names": []
7
- }
@@ -1,41 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withoutLeadingCharactersRecursive.ts
26
- var withoutLeadingCharactersRecursive_exports = {};
27
- __export(withoutLeadingCharactersRecursive_exports, {
28
- default: () => withoutLeadingCharactersRecursive
29
- });
30
- module.exports = __toCommonJS(withoutLeadingCharactersRecursive_exports);
31
- var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
32
- function withoutLeadingCharactersRecursive(string, characters) {
33
- let str = (0, import_withoutLeadingCharacters.default)(string, characters);
34
- const regex = new RegExp(`^${characters}`);
35
- while (regex.test(str)) {
36
- str = (0, import_withoutLeadingCharacters.default)(str, characters);
37
- }
38
- return str;
39
- }
40
- if (module.exports.default) module.exports = module.exports.default;
41
- //# sourceMappingURL=withoutLeadingCharactersRecursive.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingCharactersRecursive.ts"],
4
- "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Remove the given characters to the start of the given string recursively.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withoutLeadingCharactersRecursive(\n string: string,\n characters: string,\n): string {\n let str = withoutLeadingCharacters(string, characters);\n const regex = new RegExp(`^${characters}`);\n\n while (regex.test(str)) {\n str = withoutLeadingCharacters(str, characters);\n }\n\n return str;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAqC;AAStB,SAAR,kCACL,QACA,YACQ;AACR,MAAI,UAAM,gCAAAA,SAAyB,QAAQ,UAAU;AACrD,QAAM,QAAQ,IAAI,OAAO,IAAI,YAAY;AAEzC,SAAO,MAAM,KAAK,GAAG,GAAG;AACtB,cAAM,gCAAAA,SAAyB,KAAK,UAAU;AAAA,EAChD;AAEA,SAAO;AACT;",
6
- "names": ["withoutLeadingCharacters"]
7
- }
@@ -1,36 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withoutLeadingSlash.ts
26
- var withoutLeadingSlash_exports = {};
27
- __export(withoutLeadingSlash_exports, {
28
- default: () => withoutLeadingSlash
29
- });
30
- module.exports = __toCommonJS(withoutLeadingSlash_exports);
31
- var import_withoutLeadingCharacters = __toESM(require("./withoutLeadingCharacters.cjs"), 1);
32
- function withoutLeadingSlash(string) {
33
- return (0, import_withoutLeadingCharacters.default)(string, "/");
34
- }
35
- if (module.exports.default) module.exports = module.exports.default;
36
- //# sourceMappingURL=withoutLeadingSlash.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withoutLeadingSlash.ts"],
4
- "sourcesContent": ["import withoutLeadingCharacters from './withoutLeadingCharacters.js';\n\n/**\n * Remove the leading slash from a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string without leading slash.\n */\nexport default function withoutLeadingSlash(string: string): string {\n return withoutLeadingCharacters(string, '/');\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAqC;AAQtB,SAAR,oBAAqC,QAAwB;AAClE,aAAO,gCAAAA,SAAyB,QAAQ,GAAG;AAC7C;",
6
- "names": ["withoutLeadingCharacters"]
7
- }
@@ -1,29 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // packages/js-toolkit/utils/string/withoutTrailingCharacters.ts
20
- var withoutTrailingCharacters_exports = {};
21
- __export(withoutTrailingCharacters_exports, {
22
- default: () => withoutTrailingCharacters
23
- });
24
- module.exports = __toCommonJS(withoutTrailingCharacters_exports);
25
- function withoutTrailingCharacters(string, characters) {
26
- return string.replace(new RegExp(`${characters}$`), "");
27
- }
28
- if (module.exports.default) module.exports = module.exports.default;
29
- //# sourceMappingURL=withoutTrailingCharacters.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingCharacters.ts"],
4
- "sourcesContent": ["/**\n * Remove the given characters from the end of the given string.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to remove from the end.\n * @returns {string}\n */\nexport default function withoutTrailingCharacters(string: string, characters: string): string {\n return string.replace(new RegExp(`${characters}$`), '');\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOe,SAAR,0BAA2C,QAAgB,YAA4B;AAC5F,SAAO,OAAO,QAAQ,IAAI,OAAO,GAAG,aAAa,GAAG,EAAE;AACxD;",
6
- "names": []
7
- }
@@ -1,41 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withoutTrailingCharactersRecursive.ts
26
- var withoutTrailingCharactersRecursive_exports = {};
27
- __export(withoutTrailingCharactersRecursive_exports, {
28
- default: () => withoutTrailingCharactersRecursive
29
- });
30
- module.exports = __toCommonJS(withoutTrailingCharactersRecursive_exports);
31
- var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
32
- function withoutTrailingCharactersRecursive(string, characters) {
33
- let str = (0, import_withoutTrailingCharacters.default)(string, characters);
34
- const regex = new RegExp(`${characters}$`);
35
- while (regex.test(str)) {
36
- str = (0, import_withoutTrailingCharacters.default)(str, characters);
37
- }
38
- return str;
39
- }
40
- if (module.exports.default) module.exports = module.exports.default;
41
- //# sourceMappingURL=withoutTrailingCharactersRecursive.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingCharactersRecursive.ts"],
4
- "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Remove the given characters to the start of the given string recursively.\n *\n * @param {string} string The string to modify.\n * @param {string} characters The characters to add to the start.\n * @returns {string}\n */\nexport default function withoutTrailingCharactersRecursive(\n string: string,\n characters: string,\n): string {\n let str = withoutTrailingCharacters(string, characters);\n const regex = new RegExp(`${characters}$`);\n\n while (regex.test(str)) {\n str = withoutTrailingCharacters(str, characters);\n }\n\n return str;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAsC;AASvB,SAAR,mCACL,QACA,YACQ;AACR,MAAI,UAAM,iCAAAA,SAA0B,QAAQ,UAAU;AACtD,QAAM,QAAQ,IAAI,OAAO,GAAG,aAAa;AAEzC,SAAO,MAAM,KAAK,GAAG,GAAG;AACtB,cAAM,iCAAAA,SAA0B,KAAK,UAAU;AAAA,EACjD;AAEA,SAAO;AACT;",
6
- "names": ["withoutTrailingCharacters"]
7
- }
@@ -1,36 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
-
25
- // packages/js-toolkit/utils/string/withoutTrailingSlash.ts
26
- var withoutTrailingSlash_exports = {};
27
- __export(withoutTrailingSlash_exports, {
28
- default: () => withoutTrailingSlash
29
- });
30
- module.exports = __toCommonJS(withoutTrailingSlash_exports);
31
- var import_withoutTrailingCharacters = __toESM(require("./withoutTrailingCharacters.cjs"), 1);
32
- function withoutTrailingSlash(string) {
33
- return (0, import_withoutTrailingCharacters.default)(string, "/");
34
- }
35
- if (module.exports.default) module.exports = module.exports.default;
36
- //# sourceMappingURL=withoutTrailingSlash.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../packages/js-toolkit/utils/string/withoutTrailingSlash.ts"],
4
- "sourcesContent": ["import withoutTrailingCharacters from './withoutTrailingCharacters.js';\n\n/**\n * Remove the trailing slash from a string.\n *\n * @param {string} string The string to modify.\n * @returns {string} The string without trailing slash.\n */\nexport default function withoutTrailingSlash(string: string): string {\n return withoutTrailingCharacters(string, '/');\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uCAAsC;AAQvB,SAAR,qBAAsC,QAAwB;AACnE,aAAO,iCAAAA,SAA0B,QAAQ,GAAG;AAC9C;",
6
- "names": ["withoutTrailingCharacters"]
7
- }