@studiometa/js-toolkit 3.9.0-beta.1 → 3.9.0-beta.2

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 (668) hide show
  1. package/dist/Base/Base.d.ts +5 -1
  2. package/dist/Base/Base.js +12 -13
  3. package/dist/Base/Base.js.map +2 -2
  4. package/dist/Base/managers/AbstractManager.d.ts +1 -1
  5. package/dist/Base/managers/AbstractManager.js.map +1 -1
  6. package/dist/Base/managers/ChildrenManager.d.ts +1 -1
  7. package/dist/Base/managers/ChildrenManager.js +1 -1
  8. package/dist/Base/managers/ChildrenManager.js.map +2 -2
  9. package/dist/Base/managers/EventsManager.d.ts +1 -1
  10. package/dist/Base/managers/EventsManager.js +3 -2
  11. package/dist/Base/managers/EventsManager.js.map +2 -2
  12. package/dist/Base/managers/OptionsManager.d.ts +1 -1
  13. package/dist/Base/managers/OptionsManager.js +2 -9
  14. package/dist/Base/managers/OptionsManager.js.map +2 -2
  15. package/dist/Base/managers/RefsManager.js +6 -9
  16. package/dist/Base/managers/RefsManager.js.map +2 -2
  17. package/dist/Base/managers/ResponsiveOptionsManager.d.ts +1 -2
  18. package/dist/Base/managers/ResponsiveOptionsManager.js +3 -3
  19. package/dist/Base/managers/ResponsiveOptionsManager.js.map +2 -2
  20. package/dist/Base/managers/ServicesManager.d.ts +6 -2
  21. package/dist/Base/managers/ServicesManager.js +7 -2
  22. package/dist/Base/managers/ServicesManager.js.map +2 -2
  23. package/dist/Base/types.d.ts +7 -3
  24. package/dist/Base/utils.d.ts +1 -1
  25. package/dist/Base/utils.js +3 -1
  26. package/dist/Base/utils.js.map +2 -2
  27. package/dist/autoload/define-manifest.js.map +1 -1
  28. package/dist/autoload/loader.d.ts +1 -1
  29. package/dist/autoload/loader.js.map +2 -2
  30. package/dist/autoload/types.d.ts +1 -1
  31. package/dist/decorators/withBreakpointManager.d.ts +1 -1
  32. package/dist/decorators/withBreakpointManager.js +2 -2
  33. package/dist/decorators/withBreakpointManager.js.map +2 -2
  34. package/dist/decorators/withBreakpointObserver.d.ts +1 -1
  35. package/dist/decorators/withBreakpointObserver.js +3 -2
  36. package/dist/decorators/withBreakpointObserver.js.map +2 -2
  37. package/dist/decorators/withDrag.d.ts +2 -2
  38. package/dist/decorators/withDrag.js +3 -1
  39. package/dist/decorators/withDrag.js.map +2 -2
  40. package/dist/decorators/withExtraConfig.d.ts +1 -1
  41. package/dist/decorators/withExtraConfig.js.map +1 -1
  42. package/dist/decorators/withFreezedOptions.d.ts +1 -1
  43. package/dist/decorators/withFreezedOptions.js.map +1 -1
  44. package/dist/decorators/withGroup.d.ts +1 -1
  45. package/dist/decorators/withGroup.js.map +1 -1
  46. package/dist/decorators/withIntersectionObserver.d.ts +1 -1
  47. package/dist/decorators/withIntersectionObserver.js +1 -1
  48. package/dist/decorators/withIntersectionObserver.js.map +1 -1
  49. package/dist/decorators/withMountOnMediaQuery.d.ts +2 -2
  50. package/dist/decorators/withMountOnMediaQuery.js.map +1 -1
  51. package/dist/decorators/withMountWhenInView.d.ts +2 -2
  52. package/dist/decorators/withMountWhenInView.js.map +1 -1
  53. package/dist/decorators/withMountWhenPrefersMotion.d.ts +1 -1
  54. package/dist/decorators/withMountWhenPrefersMotion.js.map +2 -2
  55. package/dist/decorators/withMutation.d.ts +2 -2
  56. package/dist/decorators/withMutation.js +3 -1
  57. package/dist/decorators/withMutation.js.map +2 -2
  58. package/dist/decorators/withName.d.ts +1 -1
  59. package/dist/decorators/withName.js.map +1 -1
  60. package/dist/decorators/withRelativePointer.d.ts +2 -2
  61. package/dist/decorators/withRelativePointer.js +1 -1
  62. package/dist/decorators/withRelativePointer.js.map +2 -2
  63. package/dist/decorators/withResponsiveOptions.d.ts +2 -2
  64. package/dist/decorators/withResponsiveOptions.js +1 -1
  65. package/dist/decorators/withResponsiveOptions.js.map +2 -2
  66. package/dist/decorators/withScrolledInView/utils.js +2 -1
  67. package/dist/decorators/withScrolledInView/utils.js.map +2 -2
  68. package/dist/decorators/withScrolledInView/withScrolledInView.d.ts +5 -3
  69. package/dist/decorators/withScrolledInView/withScrolledInView.js +8 -10
  70. package/dist/decorators/withScrolledInView/withScrolledInView.js.map +2 -2
  71. package/dist/helpers/createApp.d.ts +2 -2
  72. package/dist/helpers/createApp.js +1 -1
  73. package/dist/helpers/createApp.js.map +2 -2
  74. package/dist/helpers/defineFeatures.d.ts +1 -1
  75. package/dist/helpers/defineFeatures.js +1 -1
  76. package/dist/helpers/defineFeatures.js.map +2 -2
  77. package/dist/helpers/getClosestParent.d.ts +1 -1
  78. package/dist/helpers/getClosestParent.js +1 -1
  79. package/dist/helpers/getClosestParent.js.map +2 -2
  80. package/dist/helpers/getDirectChildren.d.ts +1 -1
  81. package/dist/helpers/getDirectChildren.js +1 -1
  82. package/dist/helpers/getDirectChildren.js.map +1 -1
  83. package/dist/helpers/getInstanceFromElement.d.ts +1 -1
  84. package/dist/helpers/getInstanceFromElement.js.map +1 -1
  85. package/dist/helpers/importOnInteraction.d.ts +1 -1
  86. package/dist/helpers/importOnInteraction.js +2 -1
  87. package/dist/helpers/importOnInteraction.js.map +2 -2
  88. package/dist/helpers/importOnMediaQuery.d.ts +1 -1
  89. package/dist/helpers/importOnMediaQuery.js +1 -1
  90. package/dist/helpers/importOnMediaQuery.js.map +1 -1
  91. package/dist/helpers/importWhenIdle.d.ts +1 -1
  92. package/dist/helpers/importWhenIdle.js +1 -1
  93. package/dist/helpers/importWhenIdle.js.map +1 -1
  94. package/dist/helpers/importWhenPrefersMotion.d.ts +1 -1
  95. package/dist/helpers/importWhenPrefersMotion.js.map +1 -1
  96. package/dist/helpers/importWhenVisible.d.ts +1 -1
  97. package/dist/helpers/importWhenVisible.js +1 -1
  98. package/dist/helpers/importWhenVisible.js.map +2 -2
  99. package/dist/helpers/logTree.js +1 -1
  100. package/dist/helpers/logTree.js.map +1 -1
  101. package/dist/helpers/queryComponent.d.ts +1 -1
  102. package/dist/helpers/queryComponent.js.map +1 -1
  103. package/dist/helpers/registerComponent.js +1 -1
  104. package/dist/helpers/registerComponent.js.map +1 -1
  105. package/dist/helpers/registerComponents.js +1 -1
  106. package/dist/helpers/registerComponents.js.map +1 -1
  107. package/dist/helpers/utils.js +1 -1
  108. package/dist/helpers/utils.js.map +2 -2
  109. package/dist/services/DragService.d.ts +1 -2
  110. package/dist/services/DragService.js +2 -2
  111. package/dist/services/DragService.js.map +2 -2
  112. package/dist/subpaths/AbstractService.d.ts +1 -1
  113. package/dist/subpaths/AbstractService.js +1 -1
  114. package/dist/subpaths/AbstractService.js.map +1 -1
  115. package/dist/subpaths/AutoloadHandle.d.ts +1 -1
  116. package/dist/subpaths/AutoloadOptions.d.ts +1 -1
  117. package/dist/subpaths/AutoloadRuntime.d.ts +1 -1
  118. package/dist/subpaths/Base.d.ts +1 -1
  119. package/dist/subpaths/Base.js +1 -1
  120. package/dist/subpaths/Base.js.map +1 -1
  121. package/dist/subpaths/BaseAsyncConstructor.d.ts +1 -1
  122. package/dist/subpaths/BaseChildren.d.ts +1 -1
  123. package/dist/subpaths/BaseConfig.d.ts +1 -1
  124. package/dist/subpaths/BaseConfigComponents.d.ts +1 -1
  125. package/dist/subpaths/BaseConstructor.d.ts +1 -1
  126. package/dist/subpaths/BaseEl.d.ts +1 -1
  127. package/dist/subpaths/BaseOptions.d.ts +1 -1
  128. package/dist/subpaths/BaseProps.d.ts +1 -1
  129. package/dist/subpaths/BaseRefs.d.ts +1 -1
  130. package/dist/subpaths/ComponentLoadStrategy.d.ts +1 -1
  131. package/dist/subpaths/ComponentLoader.d.ts +1 -1
  132. package/dist/subpaths/ComponentLoader.js +1 -1
  133. package/dist/subpaths/ComponentLoader.js.map +1 -1
  134. package/dist/subpaths/ComponentLoaderOptions.d.ts +1 -1
  135. package/dist/subpaths/ComponentLoaderStartOptions.d.ts +1 -1
  136. package/dist/subpaths/ComponentManifest.d.ts +1 -1
  137. package/dist/subpaths/ComponentManifestEntry.d.ts +1 -1
  138. package/dist/subpaths/ComponentOverride.d.ts +1 -1
  139. package/dist/subpaths/CreateAppOptions.d.ts +1 -1
  140. package/dist/subpaths/DEFAULT_DIAGNOSTIC_PREFIX.d.ts +1 -1
  141. package/dist/subpaths/DEFAULT_DIAGNOSTIC_PREFIX.js +1 -1
  142. package/dist/subpaths/DEFAULT_DIAGNOSTIC_PREFIX.js.map +1 -1
  143. package/dist/subpaths/DefineManifestOptions.d.ts +1 -1
  144. package/dist/subpaths/DragDecoratorOptions.d.ts +1 -1
  145. package/dist/subpaths/DragService.d.ts +1 -1
  146. package/dist/subpaths/DragService.js +1 -1
  147. package/dist/subpaths/DragService.js.map +1 -1
  148. package/dist/subpaths/DragServiceInterface.d.ts +1 -1
  149. package/dist/subpaths/DragServiceOptions.d.ts +1 -1
  150. package/dist/subpaths/DragServiceProps.d.ts +1 -1
  151. package/dist/subpaths/IDLE_TIMEOUT.d.ts +1 -1
  152. package/dist/subpaths/IDLE_TIMEOUT.js +1 -1
  153. package/dist/subpaths/IDLE_TIMEOUT.js.map +1 -1
  154. package/dist/subpaths/KeyService.d.ts +1 -1
  155. package/dist/subpaths/KeyService.js +1 -1
  156. package/dist/subpaths/KeyService.js.map +1 -1
  157. package/dist/subpaths/KeyServiceInterface.d.ts +1 -1
  158. package/dist/subpaths/KeyServiceProps.d.ts +1 -1
  159. package/dist/subpaths/LoadService.d.ts +1 -1
  160. package/dist/subpaths/LoadService.js +1 -1
  161. package/dist/subpaths/LoadService.js.map +1 -1
  162. package/dist/subpaths/LoadServiceInterface.d.ts +1 -1
  163. package/dist/subpaths/LoadServiceProps.d.ts +1 -1
  164. package/dist/subpaths/LoaderDependencies.d.ts +1 -1
  165. package/dist/subpaths/Managers.d.ts +1 -1
  166. package/dist/subpaths/ModuleRecord.d.ts +1 -1
  167. package/dist/subpaths/MutationDecoratorOptions.d.ts +1 -1
  168. package/dist/subpaths/MutationService.d.ts +1 -1
  169. package/dist/subpaths/MutationService.js +1 -1
  170. package/dist/subpaths/MutationService.js.map +1 -1
  171. package/dist/subpaths/MutationServiceInterface.d.ts +1 -1
  172. package/dist/subpaths/MutationServiceOptions.d.ts +1 -1
  173. package/dist/subpaths/MutationServiceProps.d.ts +1 -1
  174. package/dist/subpaths/NormalizedOffset.d.ts +1 -1
  175. package/dist/subpaths/OffsetValue.d.ts +1 -1
  176. package/dist/subpaths/PointerService.d.ts +1 -1
  177. package/dist/subpaths/PointerService.js +1 -1
  178. package/dist/subpaths/PointerService.js.map +1 -1
  179. package/dist/subpaths/PointerServiceInterface.d.ts +1 -1
  180. package/dist/subpaths/PointerServiceProps.d.ts +1 -1
  181. package/dist/subpaths/QueryOptions.d.ts +1 -1
  182. package/dist/subpaths/RafService.d.ts +1 -1
  183. package/dist/subpaths/RafService.js +1 -1
  184. package/dist/subpaths/RafService.js.map +1 -1
  185. package/dist/subpaths/RafServiceInterface.d.ts +1 -1
  186. package/dist/subpaths/RafServiceProps.d.ts +1 -1
  187. package/dist/subpaths/RegisterManifestOptions.d.ts +1 -1
  188. package/dist/subpaths/RelativePointerDecoratorOptions.d.ts +1 -1
  189. package/dist/subpaths/RelativePointerInterface.d.ts +1 -1
  190. package/dist/subpaths/ResizeService.d.ts +1 -1
  191. package/dist/subpaths/ResizeService.js +1 -1
  192. package/dist/subpaths/ResizeService.js.map +1 -1
  193. package/dist/subpaths/ResizeServiceInterface.d.ts +1 -1
  194. package/dist/subpaths/ResizeServiceProps.d.ts +1 -1
  195. package/dist/subpaths/ScrollInViewProps.d.ts +1 -1
  196. package/dist/subpaths/ScrollService.d.ts +1 -1
  197. package/dist/subpaths/ScrollService.js +1 -1
  198. package/dist/subpaths/ScrollService.js.map +1 -1
  199. package/dist/subpaths/ScrollServiceInterface.d.ts +1 -1
  200. package/dist/subpaths/ScrollServiceProps.d.ts +1 -1
  201. package/dist/subpaths/ServiceConfig.d.ts +1 -1
  202. package/dist/subpaths/ServiceInterface.d.ts +1 -1
  203. package/dist/subpaths/VISIBLE_ROOT_MARGIN.d.ts +1 -1
  204. package/dist/subpaths/VISIBLE_ROOT_MARGIN.js +1 -1
  205. package/dist/subpaths/VISIBLE_ROOT_MARGIN.js.map +1 -1
  206. package/dist/subpaths/WebpackContextLike.d.ts +1 -1
  207. package/dist/subpaths/WithBreakpointObserverInterface.d.ts +1 -1
  208. package/dist/subpaths/WithBreakpointObserverProps.d.ts +1 -1
  209. package/dist/subpaths/WithDragInterface.d.ts +1 -1
  210. package/dist/subpaths/WithFreezedOptionsInterface.d.ts +1 -1
  211. package/dist/subpaths/WithGroupInterface.d.ts +1 -1
  212. package/dist/subpaths/WithGroupOptions.d.ts +1 -1
  213. package/dist/subpaths/WithGroupProps.d.ts +1 -1
  214. package/dist/subpaths/WithIntersectionObserverInterface.d.ts +1 -1
  215. package/dist/subpaths/WithIntersectionObserverProps.d.ts +1 -1
  216. package/dist/subpaths/WithMountWhenInViewInterface.d.ts +1 -1
  217. package/dist/subpaths/WithMountWhenInViewProps.d.ts +1 -1
  218. package/dist/subpaths/WithMutationInterface.d.ts +1 -1
  219. package/dist/subpaths/WithScrolledInViewInterface.d.ts +1 -1
  220. package/dist/subpaths/WithScrolledInViewOptions.d.ts +1 -1
  221. package/dist/subpaths/WithScrolledInViewProps.d.ts +1 -1
  222. package/dist/subpaths/autoload.d.ts +1 -1
  223. package/dist/subpaths/autoload.js +1 -1
  224. package/dist/subpaths/autoload.js.map +1 -1
  225. package/dist/subpaths/closestComponent.d.ts +1 -1
  226. package/dist/subpaths/closestComponent.js +1 -1
  227. package/dist/subpaths/closestComponent.js.map +1 -1
  228. package/dist/subpaths/composeManifests.d.ts +1 -1
  229. package/dist/subpaths/composeManifests.js +1 -1
  230. package/dist/subpaths/composeManifests.js.map +1 -1
  231. package/dist/subpaths/createApp.d.ts +1 -1
  232. package/dist/subpaths/createApp.js +1 -1
  233. package/dist/subpaths/createApp.js.map +1 -1
  234. package/dist/subpaths/defineFeatures.d.ts +1 -1
  235. package/dist/subpaths/defineFeatures.js +1 -1
  236. package/dist/subpaths/defineFeatures.js.map +1 -1
  237. package/dist/subpaths/defineManifest.d.ts +1 -1
  238. package/dist/subpaths/defineManifest.js +1 -1
  239. package/dist/subpaths/defineManifest.js.map +1 -1
  240. package/dist/subpaths/fromMetaGlob.d.ts +1 -1
  241. package/dist/subpaths/fromMetaGlob.js +1 -1
  242. package/dist/subpaths/fromMetaGlob.js.map +1 -1
  243. package/dist/subpaths/fromWebpackContext.d.ts +1 -1
  244. package/dist/subpaths/fromWebpackContext.js +1 -1
  245. package/dist/subpaths/fromWebpackContext.js.map +1 -1
  246. package/dist/subpaths/getClosestParent.d.ts +1 -1
  247. package/dist/subpaths/getClosestParent.js +1 -1
  248. package/dist/subpaths/getClosestParent.js.map +1 -1
  249. package/dist/subpaths/getDirectChildren.d.ts +1 -1
  250. package/dist/subpaths/getDirectChildren.js +1 -1
  251. package/dist/subpaths/getDirectChildren.js.map +1 -1
  252. package/dist/subpaths/getInstanceFromElement.d.ts +1 -1
  253. package/dist/subpaths/getInstanceFromElement.js +1 -1
  254. package/dist/subpaths/getInstanceFromElement.js.map +1 -1
  255. package/dist/subpaths/getInstances.d.ts +1 -1
  256. package/dist/subpaths/getInstances.js +1 -1
  257. package/dist/subpaths/getInstances.js.map +1 -1
  258. package/dist/subpaths/getScopedGroups.d.ts +1 -1
  259. package/dist/subpaths/getScopedGroups.js +1 -1
  260. package/dist/subpaths/getScopedGroups.js.map +1 -1
  261. package/dist/subpaths/importOnInteraction.d.ts +1 -1
  262. package/dist/subpaths/importOnInteraction.js +1 -1
  263. package/dist/subpaths/importOnInteraction.js.map +1 -1
  264. package/dist/subpaths/importOnMediaQuery.d.ts +1 -1
  265. package/dist/subpaths/importOnMediaQuery.js +1 -1
  266. package/dist/subpaths/importOnMediaQuery.js.map +1 -1
  267. package/dist/subpaths/importWhenIdle.d.ts +1 -1
  268. package/dist/subpaths/importWhenIdle.js +1 -1
  269. package/dist/subpaths/importWhenIdle.js.map +1 -1
  270. package/dist/subpaths/importWhenPrefersMotion.d.ts +1 -1
  271. package/dist/subpaths/importWhenPrefersMotion.js +1 -1
  272. package/dist/subpaths/importWhenPrefersMotion.js.map +1 -1
  273. package/dist/subpaths/importWhenVisible.d.ts +1 -1
  274. package/dist/subpaths/importWhenVisible.js +1 -1
  275. package/dist/subpaths/importWhenVisible.js.map +1 -1
  276. package/dist/subpaths/isDirectChild.d.ts +1 -1
  277. package/dist/subpaths/isDirectChild.js +1 -1
  278. package/dist/subpaths/isDirectChild.js.map +1 -1
  279. package/dist/subpaths/logTree.d.ts +1 -1
  280. package/dist/subpaths/logTree.js +1 -1
  281. package/dist/subpaths/logTree.js.map +1 -1
  282. package/dist/subpaths/queryComponent.d.ts +1 -1
  283. package/dist/subpaths/queryComponent.js +1 -1
  284. package/dist/subpaths/queryComponent.js.map +1 -1
  285. package/dist/subpaths/queryComponentAll.d.ts +1 -1
  286. package/dist/subpaths/queryComponentAll.js +1 -1
  287. package/dist/subpaths/queryComponentAll.js.map +1 -1
  288. package/dist/subpaths/readEagerTokens.d.ts +1 -1
  289. package/dist/subpaths/readEagerTokens.js +1 -1
  290. package/dist/subpaths/readEagerTokens.js.map +1 -1
  291. package/dist/subpaths/registerComponent.d.ts +1 -1
  292. package/dist/subpaths/registerComponent.js +1 -1
  293. package/dist/subpaths/registerComponent.js.map +1 -1
  294. package/dist/subpaths/registerComponents.d.ts +1 -1
  295. package/dist/subpaths/registerComponents.js +1 -1
  296. package/dist/subpaths/registerComponents.js.map +1 -1
  297. package/dist/subpaths/registerManifest.d.ts +1 -1
  298. package/dist/subpaths/registerManifest.js +1 -1
  299. package/dist/subpaths/registerManifest.js.map +1 -1
  300. package/dist/subpaths/registerManifests.d.ts +1 -1
  301. package/dist/subpaths/registerManifests.js +1 -1
  302. package/dist/subpaths/registerManifests.js.map +1 -1
  303. package/dist/subpaths/useDrag.d.ts +1 -1
  304. package/dist/subpaths/useDrag.js +1 -1
  305. package/dist/subpaths/useDrag.js.map +1 -1
  306. package/dist/subpaths/useKey.d.ts +1 -1
  307. package/dist/subpaths/useKey.js +1 -1
  308. package/dist/subpaths/useKey.js.map +1 -1
  309. package/dist/subpaths/useLoad.d.ts +1 -1
  310. package/dist/subpaths/useLoad.js +1 -1
  311. package/dist/subpaths/useLoad.js.map +1 -1
  312. package/dist/subpaths/useMutation.d.ts +1 -1
  313. package/dist/subpaths/useMutation.js +1 -1
  314. package/dist/subpaths/useMutation.js.map +1 -1
  315. package/dist/subpaths/usePointer.d.ts +1 -1
  316. package/dist/subpaths/usePointer.js +1 -1
  317. package/dist/subpaths/usePointer.js.map +1 -1
  318. package/dist/subpaths/useRaf.d.ts +1 -1
  319. package/dist/subpaths/useRaf.js +1 -1
  320. package/dist/subpaths/useRaf.js.map +1 -1
  321. package/dist/subpaths/useResize.d.ts +1 -1
  322. package/dist/subpaths/useResize.js +1 -1
  323. package/dist/subpaths/useResize.js.map +1 -1
  324. package/dist/subpaths/useScroll.d.ts +1 -1
  325. package/dist/subpaths/useScroll.js +1 -1
  326. package/dist/subpaths/useScroll.js.map +1 -1
  327. package/dist/subpaths/utils/Animate.1.d.ts +1 -1
  328. package/dist/subpaths/utils/AnimateOptions.d.ts +1 -1
  329. package/dist/subpaths/utils/CSSCustomPropertyName.d.ts +1 -1
  330. package/dist/subpaths/utils/EasingFunction.d.ts +1 -1
  331. package/dist/subpaths/utils/Keyframe.d.ts +1 -1
  332. package/dist/subpaths/utils/NormalizedKeyframe.d.ts +1 -1
  333. package/dist/subpaths/utils/StorageInstance.d.ts +1 -1
  334. package/dist/subpaths/utils/StorageOptions.d.ts +1 -1
  335. package/dist/subpaths/utils/StorageProvider.d.ts +1 -1
  336. package/dist/subpaths/utils/StorageSerializer.d.ts +1 -1
  337. package/dist/subpaths/utils/TransformProps.d.ts +1 -1
  338. package/dist/subpaths/utils/UrlProviderOptions.d.ts +1 -1
  339. package/dist/subpaths/utils/addClass.d.ts +1 -1
  340. package/dist/subpaths/utils/addClass.js +3 -3
  341. package/dist/subpaths/utils/addClass.js.map +3 -3
  342. package/dist/subpaths/utils/addStyle.d.ts +1 -1
  343. package/dist/subpaths/utils/addStyle.js +3 -3
  344. package/dist/subpaths/utils/addStyle.js.map +3 -3
  345. package/dist/subpaths/utils/animate.d.ts +1 -1
  346. package/dist/subpaths/utils/animate.js +1 -1
  347. package/dist/subpaths/utils/animate.js.map +1 -1
  348. package/dist/subpaths/utils/boundingRectToCircle.d.ts +1 -1
  349. package/dist/subpaths/utils/boundingRectToCircle.js +1 -1
  350. package/dist/subpaths/utils/boundingRectToCircle.js.map +1 -1
  351. package/dist/subpaths/utils/camelCase.d.ts +1 -1
  352. package/dist/subpaths/utils/camelCase.js +1 -1
  353. package/dist/subpaths/utils/camelCase.js.map +1 -1
  354. package/dist/subpaths/utils/clamp.d.ts +1 -1
  355. package/dist/subpaths/utils/clamp.js +1 -1
  356. package/dist/subpaths/utils/clamp.js.map +1 -1
  357. package/dist/subpaths/utils/clamp01.d.ts +1 -1
  358. package/dist/subpaths/utils/clamp01.js +1 -1
  359. package/dist/subpaths/utils/clamp01.js.map +1 -1
  360. package/dist/subpaths/utils/collideCircleCircle.d.ts +1 -1
  361. package/dist/subpaths/utils/collideCircleCircle.js +1 -1
  362. package/dist/subpaths/utils/collideCircleCircle.js.map +1 -1
  363. package/dist/subpaths/utils/collideCircleRect.d.ts +1 -1
  364. package/dist/subpaths/utils/collideCircleRect.js +1 -1
  365. package/dist/subpaths/utils/collideCircleRect.js.map +1 -1
  366. package/dist/subpaths/utils/collidePointCircle.d.ts +1 -1
  367. package/dist/subpaths/utils/collidePointCircle.js +1 -1
  368. package/dist/subpaths/utils/collidePointCircle.js.map +1 -1
  369. package/dist/subpaths/utils/collidePointRect.d.ts +1 -1
  370. package/dist/subpaths/utils/collidePointRect.js +1 -1
  371. package/dist/subpaths/utils/collidePointRect.js.map +1 -1
  372. package/dist/subpaths/utils/collideRectRect.d.ts +1 -1
  373. package/dist/subpaths/utils/collideRectRect.js +1 -1
  374. package/dist/subpaths/utils/collideRectRect.js.map +1 -1
  375. package/dist/subpaths/utils/createEaseInOut.d.ts +1 -1
  376. package/dist/subpaths/utils/createEaseInOut.js +1 -1
  377. package/dist/subpaths/utils/createEaseInOut.js.map +1 -1
  378. package/dist/subpaths/utils/createEaseOut.d.ts +1 -1
  379. package/dist/subpaths/utils/createEaseOut.js +1 -1
  380. package/dist/subpaths/utils/createEaseOut.js.map +1 -1
  381. package/dist/subpaths/utils/createElement.d.ts +1 -1
  382. package/dist/subpaths/utils/createElement.js +1 -1
  383. package/dist/subpaths/utils/createElement.js.map +1 -1
  384. package/dist/subpaths/utils/createLocalStorage.d.ts +1 -1
  385. package/dist/subpaths/utils/createLocalStorage.js +1 -1
  386. package/dist/subpaths/utils/createLocalStorage.js.map +1 -1
  387. package/dist/subpaths/utils/createLocalStorageProvider.d.ts +1 -1
  388. package/dist/subpaths/utils/createLocalStorageProvider.js +1 -1
  389. package/dist/subpaths/utils/createLocalStorageProvider.js.map +1 -1
  390. package/dist/subpaths/utils/createMemoryStorageProvider.d.ts +1 -1
  391. package/dist/subpaths/utils/createMemoryStorageProvider.js +1 -1
  392. package/dist/subpaths/utils/createMemoryStorageProvider.js.map +1 -1
  393. package/dist/subpaths/utils/createNoopProvider.d.ts +1 -1
  394. package/dist/subpaths/utils/createNoopProvider.js +1 -1
  395. package/dist/subpaths/utils/createNoopProvider.js.map +1 -1
  396. package/dist/subpaths/utils/createRange.d.ts +1 -1
  397. package/dist/subpaths/utils/createRange.js +1 -1
  398. package/dist/subpaths/utils/createRange.js.map +1 -1
  399. package/dist/subpaths/utils/createSessionStorage.d.ts +1 -1
  400. package/dist/subpaths/utils/createSessionStorage.js +1 -1
  401. package/dist/subpaths/utils/createSessionStorage.js.map +1 -1
  402. package/dist/subpaths/utils/createSessionStorageProvider.d.ts +1 -1
  403. package/dist/subpaths/utils/createSessionStorageProvider.js +1 -1
  404. package/dist/subpaths/utils/createSessionStorageProvider.js.map +1 -1
  405. package/dist/subpaths/utils/createStorage.d.ts +1 -1
  406. package/dist/subpaths/utils/createStorage.js +1 -1
  407. package/dist/subpaths/utils/createStorage.js.map +1 -1
  408. package/dist/subpaths/utils/createUrlSearchParamsInHashProvider.d.ts +1 -1
  409. package/dist/subpaths/utils/createUrlSearchParamsInHashProvider.js +1 -1
  410. package/dist/subpaths/utils/createUrlSearchParamsInHashProvider.js.map +1 -1
  411. package/dist/subpaths/utils/createUrlSearchParamsInHashStorage.d.ts +1 -1
  412. package/dist/subpaths/utils/createUrlSearchParamsInHashStorage.js +1 -1
  413. package/dist/subpaths/utils/createUrlSearchParamsInHashStorage.js.map +1 -1
  414. package/dist/subpaths/utils/createUrlSearchParamsProvider.d.ts +1 -1
  415. package/dist/subpaths/utils/createUrlSearchParamsProvider.js +1 -1
  416. package/dist/subpaths/utils/createUrlSearchParamsProvider.js.map +1 -1
  417. package/dist/subpaths/utils/createUrlSearchParamsStorage.d.ts +1 -1
  418. package/dist/subpaths/utils/createUrlSearchParamsStorage.js +1 -1
  419. package/dist/subpaths/utils/createUrlSearchParamsStorage.js.map +1 -1
  420. package/dist/subpaths/utils/damp.d.ts +1 -1
  421. package/dist/subpaths/utils/damp.js +1 -1
  422. package/dist/subpaths/utils/damp.js.map +1 -1
  423. package/dist/subpaths/utils/dashCase.d.ts +1 -1
  424. package/dist/subpaths/utils/dashCase.js +1 -1
  425. package/dist/subpaths/utils/dashCase.js.map +1 -1
  426. package/dist/subpaths/utils/easeInCirc.d.ts +1 -1
  427. package/dist/subpaths/utils/easeInCirc.js +1 -1
  428. package/dist/subpaths/utils/easeInCirc.js.map +1 -1
  429. package/dist/subpaths/utils/easeInCubic.d.ts +1 -1
  430. package/dist/subpaths/utils/easeInCubic.js +1 -1
  431. package/dist/subpaths/utils/easeInCubic.js.map +1 -1
  432. package/dist/subpaths/utils/easeInExpo.d.ts +1 -1
  433. package/dist/subpaths/utils/easeInExpo.js +1 -1
  434. package/dist/subpaths/utils/easeInExpo.js.map +1 -1
  435. package/dist/subpaths/utils/easeInOutCirc.d.ts +1 -1
  436. package/dist/subpaths/utils/easeInOutCirc.js +1 -1
  437. package/dist/subpaths/utils/easeInOutCirc.js.map +1 -1
  438. package/dist/subpaths/utils/easeInOutCubic.d.ts +1 -1
  439. package/dist/subpaths/utils/easeInOutCubic.js +1 -1
  440. package/dist/subpaths/utils/easeInOutCubic.js.map +1 -1
  441. package/dist/subpaths/utils/easeInOutExpo.d.ts +1 -1
  442. package/dist/subpaths/utils/easeInOutExpo.js +1 -1
  443. package/dist/subpaths/utils/easeInOutExpo.js.map +1 -1
  444. package/dist/subpaths/utils/easeInOutQuad.d.ts +1 -1
  445. package/dist/subpaths/utils/easeInOutQuad.js +1 -1
  446. package/dist/subpaths/utils/easeInOutQuad.js.map +1 -1
  447. package/dist/subpaths/utils/easeInOutQuart.d.ts +1 -1
  448. package/dist/subpaths/utils/easeInOutQuart.js +1 -1
  449. package/dist/subpaths/utils/easeInOutQuart.js.map +1 -1
  450. package/dist/subpaths/utils/easeInOutQuint.d.ts +1 -1
  451. package/dist/subpaths/utils/easeInOutQuint.js +1 -1
  452. package/dist/subpaths/utils/easeInOutQuint.js.map +1 -1
  453. package/dist/subpaths/utils/easeInOutSine.d.ts +1 -1
  454. package/dist/subpaths/utils/easeInOutSine.js +1 -1
  455. package/dist/subpaths/utils/easeInOutSine.js.map +1 -1
  456. package/dist/subpaths/utils/easeInQuad.d.ts +1 -1
  457. package/dist/subpaths/utils/easeInQuad.js +1 -1
  458. package/dist/subpaths/utils/easeInQuad.js.map +1 -1
  459. package/dist/subpaths/utils/easeInQuart.d.ts +1 -1
  460. package/dist/subpaths/utils/easeInQuart.js +1 -1
  461. package/dist/subpaths/utils/easeInQuart.js.map +1 -1
  462. package/dist/subpaths/utils/easeInQuint.d.ts +1 -1
  463. package/dist/subpaths/utils/easeInQuint.js +1 -1
  464. package/dist/subpaths/utils/easeInQuint.js.map +1 -1
  465. package/dist/subpaths/utils/easeInSine.d.ts +1 -1
  466. package/dist/subpaths/utils/easeInSine.js +1 -1
  467. package/dist/subpaths/utils/easeInSine.js.map +1 -1
  468. package/dist/subpaths/utils/easeLinear.d.ts +1 -1
  469. package/dist/subpaths/utils/easeLinear.js +3 -3
  470. package/dist/subpaths/utils/easeLinear.js.map +3 -3
  471. package/dist/subpaths/utils/easeOutCirc.d.ts +1 -1
  472. package/dist/subpaths/utils/easeOutCirc.js +1 -1
  473. package/dist/subpaths/utils/easeOutCirc.js.map +1 -1
  474. package/dist/subpaths/utils/easeOutCubic.d.ts +1 -1
  475. package/dist/subpaths/utils/easeOutCubic.js +1 -1
  476. package/dist/subpaths/utils/easeOutCubic.js.map +1 -1
  477. package/dist/subpaths/utils/easeOutExpo.d.ts +1 -1
  478. package/dist/subpaths/utils/easeOutExpo.js +1 -1
  479. package/dist/subpaths/utils/easeOutExpo.js.map +1 -1
  480. package/dist/subpaths/utils/easeOutQuad.d.ts +1 -1
  481. package/dist/subpaths/utils/easeOutQuad.js +1 -1
  482. package/dist/subpaths/utils/easeOutQuad.js.map +1 -1
  483. package/dist/subpaths/utils/easeOutQuart.d.ts +1 -1
  484. package/dist/subpaths/utils/easeOutQuart.js +1 -1
  485. package/dist/subpaths/utils/easeOutQuart.js.map +1 -1
  486. package/dist/subpaths/utils/easeOutQuint.d.ts +1 -1
  487. package/dist/subpaths/utils/easeOutQuint.js +1 -1
  488. package/dist/subpaths/utils/easeOutQuint.js.map +1 -1
  489. package/dist/subpaths/utils/easeOutSine.d.ts +1 -1
  490. package/dist/subpaths/utils/easeOutSine.js +1 -1
  491. package/dist/subpaths/utils/easeOutSine.js.map +1 -1
  492. package/dist/subpaths/utils/endsWith.d.ts +1 -1
  493. package/dist/subpaths/utils/endsWith.js +1 -1
  494. package/dist/subpaths/utils/endsWith.js.map +1 -1
  495. package/dist/subpaths/utils/fold.d.ts +1 -1
  496. package/dist/subpaths/utils/fold.js +1 -1
  497. package/dist/subpaths/utils/fold.js.map +1 -1
  498. package/dist/subpaths/utils/getAncestorWhere.d.ts +1 -1
  499. package/dist/subpaths/utils/getAncestorWhere.js +1 -1
  500. package/dist/subpaths/utils/getAncestorWhere.js.map +1 -1
  501. package/dist/subpaths/utils/getAncestorWhereUntil.d.ts +1 -1
  502. package/dist/subpaths/utils/getAncestorWhereUntil.js +1 -1
  503. package/dist/subpaths/utils/getAncestorWhereUntil.js.map +1 -1
  504. package/dist/subpaths/utils/getOffsetSizes.d.ts +1 -1
  505. package/dist/subpaths/utils/getOffsetSizes.js +1 -1
  506. package/dist/subpaths/utils/getOffsetSizes.js.map +1 -1
  507. package/dist/subpaths/utils/inertiaFinalValue.d.ts +1 -1
  508. package/dist/subpaths/utils/inertiaFinalValue.js +1 -1
  509. package/dist/subpaths/utils/inertiaFinalValue.js.map +1 -1
  510. package/dist/subpaths/utils/lerp.d.ts +1 -1
  511. package/dist/subpaths/utils/lerp.js +1 -1
  512. package/dist/subpaths/utils/lerp.js.map +1 -1
  513. package/dist/subpaths/utils/localStorageProvider.d.ts +1 -1
  514. package/dist/subpaths/utils/localStorageProvider.js +1 -1
  515. package/dist/subpaths/utils/localStorageProvider.js.map +1 -1
  516. package/dist/subpaths/utils/lowerCase.d.ts +1 -1
  517. package/dist/subpaths/utils/lowerCase.js +1 -1
  518. package/dist/subpaths/utils/lowerCase.js.map +1 -1
  519. package/dist/subpaths/utils/map.d.ts +1 -1
  520. package/dist/subpaths/utils/map.js +1 -1
  521. package/dist/subpaths/utils/map.js.map +1 -1
  522. package/dist/subpaths/utils/matrix.d.ts +1 -1
  523. package/dist/subpaths/utils/matrix.js +1 -1
  524. package/dist/subpaths/utils/matrix.js.map +1 -1
  525. package/dist/subpaths/utils/mean.d.ts +1 -1
  526. package/dist/subpaths/utils/mean.js +1 -1
  527. package/dist/subpaths/utils/mean.js.map +1 -1
  528. package/dist/subpaths/utils/memoryStorageProvider.d.ts +1 -1
  529. package/dist/subpaths/utils/memoryStorageProvider.js +1 -1
  530. package/dist/subpaths/utils/memoryStorageProvider.js.map +1 -1
  531. package/dist/subpaths/utils/pascalCase.d.ts +1 -1
  532. package/dist/subpaths/utils/pascalCase.js +1 -1
  533. package/dist/subpaths/utils/pascalCase.js.map +1 -1
  534. package/dist/subpaths/utils/removeClass.d.ts +1 -1
  535. package/dist/subpaths/utils/removeClass.js +3 -3
  536. package/dist/subpaths/utils/removeClass.js.map +3 -3
  537. package/dist/subpaths/utils/removeStyle.d.ts +1 -1
  538. package/dist/subpaths/utils/removeStyle.js +3 -3
  539. package/dist/subpaths/utils/removeStyle.js.map +3 -3
  540. package/dist/subpaths/utils/round.d.ts +1 -1
  541. package/dist/subpaths/utils/round.js +1 -1
  542. package/dist/subpaths/utils/round.js.map +1 -1
  543. package/dist/subpaths/utils/sessionStorageProvider.d.ts +1 -1
  544. package/dist/subpaths/utils/sessionStorageProvider.js +1 -1
  545. package/dist/subpaths/utils/sessionStorageProvider.js.map +1 -1
  546. package/dist/subpaths/utils/smoothTo.d.ts +1 -1
  547. package/dist/subpaths/utils/smoothTo.js +1 -1
  548. package/dist/subpaths/utils/smoothTo.js.map +1 -1
  549. package/dist/subpaths/utils/snakeCase.d.ts +1 -1
  550. package/dist/subpaths/utils/snakeCase.js +1 -1
  551. package/dist/subpaths/utils/snakeCase.js.map +1 -1
  552. package/dist/subpaths/utils/spring.d.ts +1 -1
  553. package/dist/subpaths/utils/spring.js +1 -1
  554. package/dist/subpaths/utils/spring.js.map +1 -1
  555. package/dist/subpaths/utils/startsWith.d.ts +1 -1
  556. package/dist/subpaths/utils/startsWith.js +1 -1
  557. package/dist/subpaths/utils/startsWith.js.map +1 -1
  558. package/dist/subpaths/utils/toggleClass.d.ts +1 -1
  559. package/dist/subpaths/utils/toggleClass.js +3 -3
  560. package/dist/subpaths/utils/toggleClass.js.map +3 -3
  561. package/dist/subpaths/utils/transform.d.ts +1 -1
  562. package/dist/subpaths/utils/transform.js +1 -1
  563. package/dist/subpaths/utils/transform.js.map +1 -1
  564. package/dist/subpaths/utils/transition.d.ts +1 -1
  565. package/dist/subpaths/utils/transition.js +1 -1
  566. package/dist/subpaths/utils/transition.js.map +1 -1
  567. package/dist/subpaths/utils/upperCase.d.ts +1 -1
  568. package/dist/subpaths/utils/upperCase.js +1 -1
  569. package/dist/subpaths/utils/upperCase.js.map +1 -1
  570. package/dist/subpaths/utils/urlSearchParamsInHashProvider.d.ts +1 -1
  571. package/dist/subpaths/utils/urlSearchParamsInHashProvider.js +1 -1
  572. package/dist/subpaths/utils/urlSearchParamsInHashProvider.js.map +1 -1
  573. package/dist/subpaths/utils/urlSearchParamsProvider.d.ts +1 -1
  574. package/dist/subpaths/utils/urlSearchParamsProvider.js +1 -1
  575. package/dist/subpaths/utils/urlSearchParamsProvider.js.map +1 -1
  576. package/dist/subpaths/utils/withLeadingCharacters.d.ts +1 -1
  577. package/dist/subpaths/utils/withLeadingCharacters.js +1 -1
  578. package/dist/subpaths/utils/withLeadingCharacters.js.map +1 -1
  579. package/dist/subpaths/utils/withLeadingSlash.d.ts +1 -1
  580. package/dist/subpaths/utils/withLeadingSlash.js +1 -1
  581. package/dist/subpaths/utils/withLeadingSlash.js.map +1 -1
  582. package/dist/subpaths/utils/withTrailingCharacters.d.ts +1 -1
  583. package/dist/subpaths/utils/withTrailingCharacters.js +1 -1
  584. package/dist/subpaths/utils/withTrailingCharacters.js.map +1 -1
  585. package/dist/subpaths/utils/withTrailingSlash.d.ts +1 -1
  586. package/dist/subpaths/utils/withTrailingSlash.js +1 -1
  587. package/dist/subpaths/utils/withTrailingSlash.js.map +1 -1
  588. package/dist/subpaths/utils/withoutLeadingCharacters.d.ts +1 -1
  589. package/dist/subpaths/utils/withoutLeadingCharacters.js +1 -1
  590. package/dist/subpaths/utils/withoutLeadingCharacters.js.map +1 -1
  591. package/dist/subpaths/utils/withoutLeadingCharactersRecursive.d.ts +1 -1
  592. package/dist/subpaths/utils/withoutLeadingCharactersRecursive.js +1 -1
  593. package/dist/subpaths/utils/withoutLeadingCharactersRecursive.js.map +1 -1
  594. package/dist/subpaths/utils/withoutLeadingSlash.d.ts +1 -1
  595. package/dist/subpaths/utils/withoutLeadingSlash.js +1 -1
  596. package/dist/subpaths/utils/withoutLeadingSlash.js.map +1 -1
  597. package/dist/subpaths/utils/withoutTrailingCharacters.d.ts +1 -1
  598. package/dist/subpaths/utils/withoutTrailingCharacters.js +1 -1
  599. package/dist/subpaths/utils/withoutTrailingCharacters.js.map +1 -1
  600. package/dist/subpaths/utils/withoutTrailingCharactersRecursive.d.ts +1 -1
  601. package/dist/subpaths/utils/withoutTrailingCharactersRecursive.js +1 -1
  602. package/dist/subpaths/utils/withoutTrailingCharactersRecursive.js.map +1 -1
  603. package/dist/subpaths/utils/withoutTrailingSlash.d.ts +1 -1
  604. package/dist/subpaths/utils/withoutTrailingSlash.js +1 -1
  605. package/dist/subpaths/utils/withoutTrailingSlash.js.map +1 -1
  606. package/dist/subpaths/utils/wrap.d.ts +1 -1
  607. package/dist/subpaths/utils/wrap.js +1 -1
  608. package/dist/subpaths/utils/wrap.js.map +1 -1
  609. package/dist/subpaths/withBreakpointManager.d.ts +1 -1
  610. package/dist/subpaths/withBreakpointManager.js +1 -1
  611. package/dist/subpaths/withBreakpointManager.js.map +1 -1
  612. package/dist/subpaths/withBreakpointObserver.d.ts +1 -1
  613. package/dist/subpaths/withBreakpointObserver.js +1 -1
  614. package/dist/subpaths/withBreakpointObserver.js.map +1 -1
  615. package/dist/subpaths/withDrag.d.ts +1 -1
  616. package/dist/subpaths/withDrag.js +1 -1
  617. package/dist/subpaths/withDrag.js.map +1 -1
  618. package/dist/subpaths/withExtraConfig.d.ts +1 -1
  619. package/dist/subpaths/withExtraConfig.js +1 -1
  620. package/dist/subpaths/withExtraConfig.js.map +1 -1
  621. package/dist/subpaths/withFreezedOptions.d.ts +1 -1
  622. package/dist/subpaths/withFreezedOptions.js +1 -1
  623. package/dist/subpaths/withFreezedOptions.js.map +1 -1
  624. package/dist/subpaths/withGroup.d.ts +1 -1
  625. package/dist/subpaths/withGroup.js +1 -1
  626. package/dist/subpaths/withGroup.js.map +1 -1
  627. package/dist/subpaths/withIntersectionObserver.d.ts +1 -1
  628. package/dist/subpaths/withIntersectionObserver.js +1 -1
  629. package/dist/subpaths/withIntersectionObserver.js.map +1 -1
  630. package/dist/subpaths/withMountOnMediaQuery.d.ts +1 -1
  631. package/dist/subpaths/withMountOnMediaQuery.js +1 -1
  632. package/dist/subpaths/withMountOnMediaQuery.js.map +1 -1
  633. package/dist/subpaths/withMountOnMediaQueryInterface.d.ts +1 -1
  634. package/dist/subpaths/withMountOnMediaQueryProps.d.ts +1 -1
  635. package/dist/subpaths/withMountWhenInView.d.ts +1 -1
  636. package/dist/subpaths/withMountWhenInView.js +1 -1
  637. package/dist/subpaths/withMountWhenInView.js.map +1 -1
  638. package/dist/subpaths/withMountWhenPrefersMotion.d.ts +1 -1
  639. package/dist/subpaths/withMountWhenPrefersMotion.js +1 -1
  640. package/dist/subpaths/withMountWhenPrefersMotion.js.map +1 -1
  641. package/dist/subpaths/withMutation.d.ts +1 -1
  642. package/dist/subpaths/withMutation.js +1 -1
  643. package/dist/subpaths/withMutation.js.map +1 -1
  644. package/dist/subpaths/withName.d.ts +1 -1
  645. package/dist/subpaths/withName.js +1 -1
  646. package/dist/subpaths/withName.js.map +1 -1
  647. package/dist/subpaths/withRelativePointer.d.ts +1 -1
  648. package/dist/subpaths/withRelativePointer.js +1 -1
  649. package/dist/subpaths/withRelativePointer.js.map +1 -1
  650. package/dist/subpaths/withResponsiveOptions.d.ts +1 -1
  651. package/dist/subpaths/withResponsiveOptions.js +1 -1
  652. package/dist/subpaths/withResponsiveOptions.js.map +1 -1
  653. package/dist/subpaths/withScrolledInView.d.ts +1 -1
  654. package/dist/subpaths/withScrolledInView.js +1 -1
  655. package/dist/subpaths/withScrolledInView.js.map +1 -1
  656. package/dist/utils/css/animate.d.ts +2 -2
  657. package/dist/utils/css/animate.js +5 -3
  658. package/dist/utils/css/animate.js.map +2 -2
  659. package/dist/utils/history.js +1 -1
  660. package/dist/utils/history.js.map +2 -2
  661. package/dist/utils/scrollTo.d.ts +1 -1
  662. package/dist/utils/scrollTo.js +2 -2
  663. package/dist/utils/scrollTo.js.map +2 -2
  664. package/dist/utils/tween.js +7 -2
  665. package/dist/utils/tween.js.map +2 -2
  666. package/dist/version.d.ts +1 -1
  667. package/dist/version.js +1 -1
  668. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
+ import type { Base, BaseProps } from '../Base/Base.js';
1
2
  import type { BaseDecorator, BaseInterface } from '../Base/types.js';
2
- import type { Base, BaseProps } from '../Base/index.js';
3
3
  export interface WithIntersectionObserverProps extends BaseProps {
4
4
  $options: {
5
5
  intersectionObserver: IntersectionObserverInit;
@@ -1,4 +1,4 @@
1
- import { createRange } from "../utils/index.js";
1
+ import { createRange } from "../utils/math/createRange.js";
2
2
  function withIntersectionObserver(BaseClass, defaultOptions = { threshold: createRange(0, 1, 0.01) }) {
3
3
  class WithIntersectionObserver extends BaseClass {
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withIntersectionObserver.ts"],
4
- "sourcesContent": ["import type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport type { Base, BaseProps, BaseConfig } from '../Base/index.js';\nimport { createRange } from '../utils/index.js';\n\nexport interface WithIntersectionObserverProps extends BaseProps {\n $options: {\n intersectionObserver: IntersectionObserverInit;\n };\n $observer: IntersectionObserver;\n intersected(entries: IntersectionObserverEntry[]): void;\n}\n\nexport interface WithIntersectionObserverInterface extends BaseInterface {\n $observer: IntersectionObserver;\n}\n\n/**\n * IntersectionObserver decoration.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withIntersectionObserver.html\n */\nexport function withIntersectionObserver<S extends Base>(\n BaseClass: typeof Base,\n // eslint-disable-next-line unicorn/no-object-as-default-parameter\n defaultOptions: IntersectionObserverInit = { threshold: createRange(0, 1, 0.01) },\n): BaseDecorator<WithIntersectionObserverInterface, S, WithIntersectionObserverProps> {\n /**\n * Class.\n */\n class WithIntersectionObserver<T extends BaseProps = BaseProps> extends BaseClass<\n T & WithIntersectionObserverProps\n > {\n /**\n * Config\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n options: {\n intersectionObserver: Object,\n },\n emits: ['intersected'],\n };\n\n /**\n * Intersection observer instance.\n */\n $observer: IntersectionObserver;\n\n /**\n * Create an observer when the class in instantiated.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n this.$observer = new IntersectionObserver(\n (entries) => {\n this.__callMethod('intersected', entries);\n },\n {\n ...defaultOptions,\n ...(this.$options.intersectionObserver as IntersectionObserverInit),\n },\n );\n\n this.$on('mounted', () => {\n this.$observer.observe(this.$el);\n });\n\n this.$on('destroyed', () => {\n this.$observer.unobserve(this.$el);\n });\n }\n }\n\n // @ts-ignore\n return WithIntersectionObserver;\n}\n"],
4
+ "sourcesContent": ["import type { Base, BaseConfig, BaseProps } from '../Base/Base.js';\nimport type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport { createRange } from '../utils/math/createRange.js';\n\nexport interface WithIntersectionObserverProps extends BaseProps {\n $options: {\n intersectionObserver: IntersectionObserverInit;\n };\n $observer: IntersectionObserver;\n intersected(entries: IntersectionObserverEntry[]): void;\n}\n\nexport interface WithIntersectionObserverInterface extends BaseInterface {\n $observer: IntersectionObserver;\n}\n\n/**\n * IntersectionObserver decoration.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withIntersectionObserver.html\n */\nexport function withIntersectionObserver<S extends Base>(\n BaseClass: typeof Base,\n // eslint-disable-next-line unicorn/no-object-as-default-parameter\n defaultOptions: IntersectionObserverInit = { threshold: createRange(0, 1, 0.01) },\n): BaseDecorator<WithIntersectionObserverInterface, S, WithIntersectionObserverProps> {\n /**\n * Class.\n */\n class WithIntersectionObserver<T extends BaseProps = BaseProps> extends BaseClass<\n T & WithIntersectionObserverProps\n > {\n /**\n * Config\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n options: {\n intersectionObserver: Object,\n },\n emits: ['intersected'],\n };\n\n /**\n * Intersection observer instance.\n */\n $observer: IntersectionObserver;\n\n /**\n * Create an observer when the class in instantiated.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n this.$observer = new IntersectionObserver(\n (entries) => {\n this.__callMethod('intersected', entries);\n },\n {\n ...defaultOptions,\n ...(this.$options.intersectionObserver as IntersectionObserverInit),\n },\n );\n\n this.$on('mounted', () => {\n this.$observer.observe(this.$el);\n });\n\n this.$on('destroyed', () => {\n this.$observer.unobserve(this.$el);\n });\n }\n }\n\n // @ts-ignore\n return WithIntersectionObserver;\n}\n"],
5
5
  "mappings": "AAEA,SAAS,mBAAmB;AAkBrB,SAAS,yBACd,WAEA,iBAA2C,EAAE,WAAW,YAAY,GAAG,GAAG,IAAI,EAAE,GACI;AAAA,EAIpF,MAAM,iCAAkE,UAEtE;AAAA;AAAA;AAAA;AAAA,IAIA,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb,SAAS;AAAA,QACP,sBAAsB;AAAA,MACxB;AAAA,MACA,OAAO,CAAC,aAAa;AAAA,IACvB;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAY,SAAsB;AAChC,YAAM,OAAO;AAEb,WAAK,YAAY,IAAI;AAAA,QACnB,CAAC,YAAY;AACX,eAAK,aAAa,eAAe,OAAO;AAAA,QAC1C;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,GAAI,KAAK,SAAS;AAAA,QACpB;AAAA,MACF;AAEA,WAAK,IAAI,WAAW,MAAM;AACxB,aAAK,UAAU,QAAQ,KAAK,GAAG;AAAA,MACjC,CAAC;AAED,WAAK,IAAI,aAAa,MAAM;AAC1B,aAAK,UAAU,UAAU,KAAK,GAAG;AAAA,MACnC,CAAC;AAAA,IACH;AAAA,EACF;AAGA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import { BaseInterface, BaseDecorator } from '../Base/types.js';
2
- import type { Base, BaseProps } from '../Base/index.js';
1
+ import type { Base, BaseProps } from '../Base/Base.js';
2
+ import { BaseDecorator, BaseInterface } from '../Base/types.js';
3
3
  export interface withMountOnMediaQueryProps extends BaseProps {
4
4
  $options: {
5
5
  media: string;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withMountOnMediaQuery.ts"],
4
- "sourcesContent": ["import { BaseInterface, BaseDecorator } from '../Base/types.js';\nimport type { Base, BaseProps, BaseConfig } from '../Base/index.js';\nimport { isDev } from '../utils/is.js';\n\nexport interface withMountOnMediaQueryProps extends BaseProps {\n $options: {\n media: string;\n };\n}\n\nexport interface withMountOnMediaQueryInterface extends BaseInterface {\n /**\n * @private\n */\n __matches: boolean;\n}\n\n/**\n * IntersectionObserver decoration.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMountOnMediaQuery.html\n */\nexport function withMountOnMediaQuery<S extends Base = Base>(\n BaseClass: typeof Base,\n media,\n): BaseDecorator<withMountOnMediaQueryInterface, S, withMountOnMediaQueryProps> {\n /**\n * Class.\n */\n class WithMountOnMediaQuery<T extends BaseProps = BaseProps> extends BaseClass<\n T & withMountOnMediaQueryProps\n > {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n options: {\n media: String,\n },\n };\n\n /**\n * Is the media query matches?\n *\n * @private\n */\n __matches = false;\n\n /**\n * Listen for media query changes when the class in instantiated.\n *\n * @param {HTMLElement} element The component's root element.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n if (isDev && !this.$options.media && !media) {\n this.$warn(\n 'Missing either \"$options.media\" or \"media\" argument in withMountOnMediaQuery decorator.',\n );\n return;\n }\n\n const mediaQueryList = window.matchMedia(this.$options.media || media);\n\n // Set initial value\n this.__matches = mediaQueryList.matches;\n\n const changeHandler = (event: MediaQueryListEvent) => {\n this.__matches = event.matches;\n\n if (event.matches && !this.$isMounted) {\n this.$mount();\n } else if (this.$isMounted) {\n setTimeout(() => this.$destroy());\n }\n };\n\n // Start listening for changes\n mediaQueryList.addEventListener('change', changeHandler);\n\n this.$on('terminated', () => {\n mediaQueryList.removeEventListener('change', changeHandler);\n });\n }\n\n /**\n * Override the mounting of the component.\n */\n async $mount() {\n if (this.__matches) {\n return super.$mount();\n }\n\n return this;\n }\n }\n\n // @ts-ignore\n return WithMountOnMediaQuery;\n}\n"],
4
+ "sourcesContent": ["import type { Base, BaseConfig, BaseProps } from '../Base/Base.js';\nimport { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport { isDev } from '../utils/is.js';\n\nexport interface withMountOnMediaQueryProps extends BaseProps {\n $options: {\n media: string;\n };\n}\n\nexport interface withMountOnMediaQueryInterface extends BaseInterface {\n /**\n * @private\n */\n __matches: boolean;\n}\n\n/**\n * IntersectionObserver decoration.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMountOnMediaQuery.html\n */\nexport function withMountOnMediaQuery<S extends Base = Base>(\n BaseClass: typeof Base,\n media,\n): BaseDecorator<withMountOnMediaQueryInterface, S, withMountOnMediaQueryProps> {\n /**\n * Class.\n */\n class WithMountOnMediaQuery<T extends BaseProps = BaseProps> extends BaseClass<\n T & withMountOnMediaQueryProps\n > {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n options: {\n media: String,\n },\n };\n\n /**\n * Is the media query matches?\n *\n * @private\n */\n __matches = false;\n\n /**\n * Listen for media query changes when the class in instantiated.\n *\n * @param {HTMLElement} element The component's root element.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n if (isDev && !this.$options.media && !media) {\n this.$warn(\n 'Missing either \"$options.media\" or \"media\" argument in withMountOnMediaQuery decorator.',\n );\n return;\n }\n\n const mediaQueryList = window.matchMedia(this.$options.media || media);\n\n // Set initial value\n this.__matches = mediaQueryList.matches;\n\n const changeHandler = (event: MediaQueryListEvent) => {\n this.__matches = event.matches;\n\n if (event.matches && !this.$isMounted) {\n this.$mount();\n } else if (this.$isMounted) {\n setTimeout(() => this.$destroy());\n }\n };\n\n // Start listening for changes\n mediaQueryList.addEventListener('change', changeHandler);\n\n this.$on('terminated', () => {\n mediaQueryList.removeEventListener('change', changeHandler);\n });\n }\n\n /**\n * Override the mounting of the component.\n */\n async $mount() {\n if (this.__matches) {\n return super.$mount();\n }\n\n return this;\n }\n }\n\n // @ts-ignore\n return WithMountOnMediaQuery;\n}\n"],
5
5
  "mappings": "AAEA,SAAS,aAAa;AAmBf,SAAS,sBACd,WACA,OAC8E;AAAA,EAI9E,MAAM,8BAA+D,UAEnE;AAAA;AAAA;AAAA;AAAA,IAIA,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb,SAAS;AAAA,QACP,OAAO;AAAA,MACT;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOZ,YAAY,SAAsB;AAChC,YAAM,OAAO;AAEb,UAAI,SAAS,CAAC,KAAK,SAAS,SAAS,CAAC,OAAO;AAC3C,aAAK;AAAA,UACH;AAAA,QACF;AACA;AAAA,MACF;AAEA,YAAM,iBAAiB,OAAO,WAAW,KAAK,SAAS,SAAS,KAAK;AAGrE,WAAK,YAAY,eAAe;AAEhC,YAAM,gBAAgB,CAAC,UAA+B;AACpD,aAAK,YAAY,MAAM;AAEvB,YAAI,MAAM,WAAW,CAAC,KAAK,YAAY;AACrC,eAAK,OAAO;AAAA,QACd,WAAW,KAAK,YAAY;AAC1B,qBAAW,MAAM,KAAK,SAAS,CAAC;AAAA,QAClC;AAAA,MACF;AAGA,qBAAe,iBAAiB,UAAU,aAAa;AAEvD,WAAK,IAAI,cAAc,MAAM;AAC3B,uBAAe,oBAAoB,UAAU,aAAa;AAAA,MAC5D,CAAC;AAAA,IACH;AAAA;AAAA;AAAA;AAAA,IAKA,MAAM,SAAS;AACb,UAAI,KAAK,WAAW;AAClB,eAAO,MAAM,OAAO;AAAA,MACtB;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAGA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import { BaseInterface, BaseDecorator } from '../Base/types.js';
2
- import type { Base, BaseProps } from '../Base/index.js';
1
+ import type { Base, BaseProps } from '../Base/Base.js';
2
+ import { BaseDecorator, BaseInterface } from '../Base/types.js';
3
3
  export interface WithMountWhenInViewProps extends BaseProps {
4
4
  $options: {
5
5
  intersectionObserver: IntersectionObserverInit;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withMountWhenInView.ts"],
4
- "sourcesContent": ["import { BaseInterface, BaseDecorator } from '../Base/types.js';\nimport type { Base, BaseProps, BaseConfig } from '../Base/index.js';\n\nexport interface WithMountWhenInViewProps extends BaseProps {\n $options: {\n intersectionObserver: IntersectionObserverInit;\n };\n}\n\nexport interface WithMountWhenInViewInterface extends BaseInterface {\n /**\n * @private\n */\n __isVisible: boolean;\n /**\n * @private\n */\n __observer: IntersectionObserver;\n}\n\n/**\n * IntersectionObserver decoration.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMountWhenInView.html\n */\nexport function withMountWhenInView<S extends Base = Base>(\n BaseClass: typeof Base,\n // eslint-disable-next-line unicorn/no-object-as-default-parameter\n defaultOptions: IntersectionObserverInit = { threshold: [0, 1] },\n): BaseDecorator<WithMountWhenInViewInterface, S, WithMountWhenInViewProps> {\n /**\n * Class.\n */\n class WithMountWhenInView<T extends BaseProps = BaseProps> extends BaseClass<\n T & WithMountWhenInViewProps\n > {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n options: {\n intersectionObserver: Object,\n },\n };\n\n /**\n * Is the component visible?\n *\n * @private\n */\n __isVisible = false;\n\n /**\n * The component's observer.\n *\n * @private\n */\n __observer: IntersectionObserver;\n\n /**\n * Create an observer when the class in instantiated.\n *\n * @param {HTMLElement} element The component's root element.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n this.__observer = new IntersectionObserver(\n (entries) => {\n const isVisible = entries.reduce((acc, entry) => acc || entry.isIntersecting, false);\n if (this.__isVisible !== isVisible) {\n this.__isVisible = isVisible;\n\n if (isVisible) {\n this.$mount();\n } else {\n setTimeout(() => this.$destroy());\n }\n }\n },\n {\n ...defaultOptions,\n ...(this.$options as typeof this.$options & WithMountWhenInViewProps['$options'])\n .intersectionObserver,\n },\n );\n\n this.__observer.observe(this.$el);\n\n this.$on('terminated', () => {\n this.__observer.disconnect();\n });\n }\n\n /**\n * Override the mounting of the component.\n */\n async $mount() {\n if (this.__isVisible) {\n return super.$mount();\n }\n\n return this;\n }\n }\n\n // @ts-ignore\n return WithMountWhenInView;\n}\n"],
4
+ "sourcesContent": ["import type { Base, BaseConfig, BaseProps } from '../Base/Base.js';\nimport { BaseDecorator, BaseInterface } from '../Base/types.js';\n\nexport interface WithMountWhenInViewProps extends BaseProps {\n $options: {\n intersectionObserver: IntersectionObserverInit;\n };\n}\n\nexport interface WithMountWhenInViewInterface extends BaseInterface {\n /**\n * @private\n */\n __isVisible: boolean;\n /**\n * @private\n */\n __observer: IntersectionObserver;\n}\n\n/**\n * IntersectionObserver decoration.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMountWhenInView.html\n */\nexport function withMountWhenInView<S extends Base = Base>(\n BaseClass: typeof Base,\n // eslint-disable-next-line unicorn/no-object-as-default-parameter\n defaultOptions: IntersectionObserverInit = { threshold: [0, 1] },\n): BaseDecorator<WithMountWhenInViewInterface, S, WithMountWhenInViewProps> {\n /**\n * Class.\n */\n class WithMountWhenInView<T extends BaseProps = BaseProps> extends BaseClass<\n T & WithMountWhenInViewProps\n > {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n options: {\n intersectionObserver: Object,\n },\n };\n\n /**\n * Is the component visible?\n *\n * @private\n */\n __isVisible = false;\n\n /**\n * The component's observer.\n *\n * @private\n */\n __observer: IntersectionObserver;\n\n /**\n * Create an observer when the class in instantiated.\n *\n * @param {HTMLElement} element The component's root element.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n this.__observer = new IntersectionObserver(\n (entries) => {\n const isVisible = entries.reduce((acc, entry) => acc || entry.isIntersecting, false);\n if (this.__isVisible !== isVisible) {\n this.__isVisible = isVisible;\n\n if (isVisible) {\n this.$mount();\n } else {\n setTimeout(() => this.$destroy());\n }\n }\n },\n {\n ...defaultOptions,\n ...(this.$options as typeof this.$options & WithMountWhenInViewProps['$options'])\n .intersectionObserver,\n },\n );\n\n this.__observer.observe(this.$el);\n\n this.$on('terminated', () => {\n this.__observer.disconnect();\n });\n }\n\n /**\n * Override the mounting of the component.\n */\n async $mount() {\n if (this.__isVisible) {\n return super.$mount();\n }\n\n return this;\n }\n }\n\n // @ts-ignore\n return WithMountWhenInView;\n}\n"],
5
5
  "mappings": "AAwBO,SAAS,oBACd,WAEA,iBAA2C,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,GACW;AAAA,EAI1E,MAAM,4BAA6D,UAEjE;AAAA;AAAA;AAAA;AAAA,IAIA,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb,SAAS;AAAA,QACP,sBAAsB;AAAA,MACxB;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAY,SAAsB;AAChC,YAAM,OAAO;AAEb,WAAK,aAAa,IAAI;AAAA,QACpB,CAAC,YAAY;AACX,gBAAM,YAAY,QAAQ,OAAO,CAAC,KAAK,UAAU,OAAO,MAAM,gBAAgB,KAAK;AACnF,cAAI,KAAK,gBAAgB,WAAW;AAClC,iBAAK,cAAc;AAEnB,gBAAI,WAAW;AACb,mBAAK,OAAO;AAAA,YACd,OAAO;AACL,yBAAW,MAAM,KAAK,SAAS,CAAC;AAAA,YAClC;AAAA,UACF;AAAA,QACF;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,GAAI,KAAK,SACN;AAAA,QACL;AAAA,MACF;AAEA,WAAK,WAAW,QAAQ,KAAK,GAAG;AAEhC,WAAK,IAAI,cAAc,MAAM;AAC3B,aAAK,WAAW,WAAW;AAAA,MAC7B,CAAC;AAAA,IACH;AAAA;AAAA;AAAA;AAAA,IAKA,MAAM,SAAS;AACb,UAAI,KAAK,aAAa;AACpB,eAAO,MAAM,OAAO;AAAA,MACtB;AAEA,aAAO;AAAA,IACT;AAAA,EACF;AAGA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { Base } from '../Base/index.js';
1
+ import type { Base } from '../Base/Base.js';
2
2
  import { BaseDecorator, BaseInterface } from '../Base/types.js';
3
3
  /**
4
4
  * @link https://js-toolkit.studiometa.dev/api/decorators/withMountWhenPrefersMotion.html
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withMountWhenPrefersMotion.ts"],
4
- "sourcesContent": ["import { withMountOnMediaQuery } from './withMountOnMediaQuery.js';\nimport type { Base } from '../Base/index.js';\nimport { BaseDecorator, BaseInterface } from '../Base/types.js';\n\n/**\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMountWhenPrefersMotion.html\n */\nexport function withMountWhenPrefersMotion<S extends Base = Base>(\n BaseClass: typeof Base,\n): BaseDecorator<BaseInterface, S> {\n return withMountOnMediaQuery(BaseClass, 'not (prefers-reduced-motion)');\n}\n"],
5
- "mappings": "AAAA,SAAS,6BAA6B;AAO/B,SAAS,2BACd,WACiC;AACjC,SAAO,sBAAsB,WAAW,8BAA8B;AACxE;",
4
+ "sourcesContent": ["import type { Base } from '../Base/Base.js';\nimport { withMountOnMediaQuery } from './withMountOnMediaQuery.js';\nimport { BaseDecorator, BaseInterface } from '../Base/types.js';\n\n/**\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMountWhenPrefersMotion.html\n */\nexport function withMountWhenPrefersMotion<S extends Base = Base>(\n BaseClass: typeof Base,\n): BaseDecorator<BaseInterface, S> {\n return withMountOnMediaQuery(BaseClass, 'not (prefers-reduced-motion)');\n}\n"],
5
+ "mappings": "AACA,SAAS,6BAA6B;AAM/B,SAAS,2BACd,WACiC;AACjC,SAAO,sBAAsB,WAAW,8BAA8B;AACxE;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
+ import type { Base } from '../Base/Base.js';
1
2
  import type { BaseDecorator, BaseInterface } from '../Base/types.js';
2
- import type { Base } from '../Base/index.js';
3
- import type { MutationServiceOptions, MutationServiceProps } from '../services/index.js';
3
+ import { type MutationServiceOptions, type MutationServiceProps } from '../services/MutationService.js';
4
4
  export type MutationDecoratorOptions = MutationServiceOptions & {
5
5
  target?: (this: Base, instance: Base) => Node;
6
6
  };
@@ -1,4 +1,6 @@
1
- import { useMutation } from "../services/index.js";
1
+ import {
2
+ useMutation
3
+ } from "../services/MutationService.js";
2
4
  function withMutation(BaseClass, { target = (instance) => instance.$el, ...options } = {}) {
3
5
  class WithMutation extends BaseClass {
4
6
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withMutation.ts"],
4
- "sourcesContent": ["import type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport type { Base, BaseProps, BaseConfig } from '../Base/index.js';\nimport type { MutationServiceOptions, MutationServiceProps } from '../services/index.js';\nimport { useMutation } from '../services/index.js';\n\nexport type MutationDecoratorOptions = MutationServiceOptions & {\n target?: (this: Base, instance: Base) => Node;\n};\n\nexport interface WithMutationInterface extends BaseInterface {\n mutated?(props: MutationServiceProps): void;\n}\n\n/**\n * Add a mutation observer to a component.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMutation.html\n */\nexport function withMutation<S extends Base>(\n BaseClass: typeof Base,\n { target = (instance) => instance.$el, ...options }: MutationDecoratorOptions = {},\n): BaseDecorator<BaseInterface, S> {\n /**\n * Class.\n */\n class WithMutation<T extends BaseProps = BaseProps> extends BaseClass<T & WithMutationInterface> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n emits: ['mutated'],\n };\n\n /**\n * Class constructor.\n */\n constructor(element: HTMLElement) {\n super(element);\n this.$on('mounted', () => {\n this.$services.register(\n 'mutated',\n useMutation.bind(undefined, target.call(this, this), options),\n );\n this.$services.enable('mutated');\n });\n\n this.$on('destroyed', () => {\n this.$services.disable('mutated');\n this.$services.unregister('mutated');\n });\n }\n }\n\n // @ts-ignore\n return WithMutation;\n}\n"],
5
- "mappings": "AAGA,SAAS,mBAAmB;AAcrB,SAAS,aACd,WACA,EAAE,SAAS,CAAC,aAAa,SAAS,KAAK,GAAG,QAAQ,IAA8B,CAAC,GAChD;AAAA,EAIjC,MAAM,qBAAsD,UAAqC;AAAA;AAAA;AAAA;AAAA,IAI/F,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb,OAAO,CAAC,SAAS;AAAA,IACnB;AAAA;AAAA;AAAA;AAAA,IAKA,YAAY,SAAsB;AAChC,YAAM,OAAO;AACb,WAAK,IAAI,WAAW,MAAM;AACxB,aAAK,UAAU;AAAA,UACb;AAAA,UACA,YAAY,KAAK,QAAW,OAAO,KAAK,MAAM,IAAI,GAAG,OAAO;AAAA,QAC9D;AACA,aAAK,UAAU,OAAO,SAAS;AAAA,MACjC,CAAC;AAED,WAAK,IAAI,aAAa,MAAM;AAC1B,aAAK,UAAU,QAAQ,SAAS;AAChC,aAAK,UAAU,WAAW,SAAS;AAAA,MACrC,CAAC;AAAA,IACH;AAAA,EACF;AAGA,SAAO;AACT;",
4
+ "sourcesContent": ["import type { Base, BaseConfig, BaseProps } from '../Base/Base.js';\nimport type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport {\n type MutationServiceOptions,\n type MutationServiceProps,\n useMutation,\n} from '../services/MutationService.js';\n\nexport type MutationDecoratorOptions = MutationServiceOptions & {\n target?: (this: Base, instance: Base) => Node;\n};\n\nexport interface WithMutationInterface extends BaseInterface {\n mutated?(props: MutationServiceProps): void;\n}\n\n/**\n * Add a mutation observer to a component.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withMutation.html\n */\nexport function withMutation<S extends Base>(\n BaseClass: typeof Base,\n { target = (instance) => instance.$el, ...options }: MutationDecoratorOptions = {},\n): BaseDecorator<BaseInterface, S> {\n /**\n * Class.\n */\n class WithMutation<T extends BaseProps = BaseProps> extends BaseClass<T & WithMutationInterface> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n emits: ['mutated'],\n };\n\n /**\n * Class constructor.\n */\n constructor(element: HTMLElement) {\n super(element);\n this.$on('mounted', () => {\n this.$services.register(\n 'mutated',\n useMutation.bind(undefined, target.call(this, this), options),\n );\n this.$services.enable('mutated');\n });\n\n this.$on('destroyed', () => {\n this.$services.disable('mutated');\n this.$services.unregister('mutated');\n });\n }\n }\n\n // @ts-ignore\n return WithMutation;\n}\n"],
5
+ "mappings": "AAEA;AAAA,EAGE;AAAA,OACK;AAcA,SAAS,aACd,WACA,EAAE,SAAS,CAAC,aAAa,SAAS,KAAK,GAAG,QAAQ,IAA8B,CAAC,GAChD;AAAA,EAIjC,MAAM,qBAAsD,UAAqC;AAAA;AAAA;AAAA;AAAA,IAI/F,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb,OAAO,CAAC,SAAS;AAAA,IACnB;AAAA;AAAA;AAAA;AAAA,IAKA,YAAY,SAAsB;AAChC,YAAM,OAAO;AACb,WAAK,IAAI,WAAW,MAAM;AACxB,aAAK,UAAU;AAAA,UACb;AAAA,UACA,YAAY,KAAK,QAAW,OAAO,KAAK,MAAM,IAAI,GAAG,OAAO;AAAA,QAC9D;AACA,aAAK,UAAU,OAAO,SAAS;AAAA,MACjC,CAAC;AAED,WAAK,IAAI,aAAa,MAAM;AAC1B,aAAK,UAAU,QAAQ,SAAS;AAChC,aAAK,UAAU,WAAW,SAAS;AAAA,MACrC,CAAC;AAAA,IACH;AAAA,EACF;AAGA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
+ import type { Base, BaseProps } from '../Base/Base.js';
1
2
  import type { BaseDecorator, BaseInterface } from '../Base/types.js';
2
- import type { Base, BaseProps } from '../Base/index.js';
3
3
  /**
4
4
  * Override the name of the given component.
5
5
  */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withName.ts"],
4
- "sourcesContent": ["import type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport type { Base, BaseProps, BaseConfig } from '../Base/index.js';\n\n/**\n * Override the name of the given component.\n */\nexport function withName<S extends Base = Base>(\n BaseClass: typeof Base,\n name: string,\n): BaseDecorator<BaseInterface, S, BaseProps> {\n // @ts-ignore\n return class extends BaseClass {\n static config: BaseConfig = {\n ...BaseClass.config,\n name,\n };\n };\n}\n"],
4
+ "sourcesContent": ["import type { Base, BaseConfig, BaseProps } from '../Base/Base.js';\nimport type { BaseDecorator, BaseInterface } from '../Base/types.js';\n\n/**\n * Override the name of the given component.\n */\nexport function withName<S extends Base = Base>(\n BaseClass: typeof Base,\n name: string,\n): BaseDecorator<BaseInterface, S, BaseProps> {\n // @ts-ignore\n return class extends BaseClass {\n static config: BaseConfig = {\n ...BaseClass.config,\n name,\n };\n };\n}\n"],
5
5
  "mappings": "AAMO,SAAS,SACd,WACA,MAC4C;AAE5C,SAAO,cAAc,UAAU;AAAA,IAC7B,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
+ import type { Base } from '../Base/Base.js';
1
2
  import type { BaseDecorator, BaseInterface } from '../Base/types.js';
2
- import type { Base } from '../Base/index.js';
3
- import type { PointerServiceProps } from '../services/index.js';
3
+ import { type PointerServiceProps } from '../services/PointerService.js';
4
4
  export type RelativePointerDecoratorOptions = {
5
5
  target?: (this: Base, instance: Base) => HTMLElement;
6
6
  };
@@ -1,4 +1,4 @@
1
- import { usePointer } from "../services/index.js";
1
+ import { usePointer } from "../services/PointerService.js";
2
2
  function withRelativePointer(BaseClass, { target = (instance) => instance.$el } = {}) {
3
3
  class WithRelativePointer extends BaseClass {
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withRelativePointer.ts"],
4
- "sourcesContent": ["import type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport type { Base, BaseProps, BaseConfig } from '../Base/index.js';\nimport type { PointerServiceProps } from '../services/index.js';\nimport { usePointer } from '../services/index.js';\n\nexport type RelativePointerDecoratorOptions = {\n target?: (this: Base, instance: Base) => HTMLElement;\n};\n\nexport interface RelativePointerInterface extends BaseInterface {\n movedrelative?(props: PointerServiceProps): void;\n}\n\n/**\n * Add dragging capabilities to a component.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withRelativePointer.html\n */\nexport function withRelativePointer<S extends Base>(\n BaseClass: typeof Base,\n { target = (instance) => instance.$el }: RelativePointerDecoratorOptions = {},\n): BaseDecorator<RelativePointerInterface, S> {\n /**\n * Class.\n */\n class WithRelativePointer<T extends BaseProps = BaseProps> extends BaseClass<T> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n emits: ['movedrelative'],\n };\n\n /**\n * Class constructor.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n this.$on('mounted', () => {\n this.$services.register(\n 'movedrelative',\n usePointer.bind(undefined, target.call(this, this)),\n );\n this.$services.enable('movedrelative');\n });\n\n this.$on('destroyed', () => {\n this.$services.disable('movedrelative');\n this.$services.unregister('movedrelative');\n });\n }\n }\n\n // @ts-ignore\n return WithRelativePointer;\n}\n"],
5
- "mappings": "AAGA,SAAS,kBAAkB;AAcpB,SAAS,oBACd,WACA,EAAE,SAAS,CAAC,aAAa,SAAS,IAAI,IAAqC,CAAC,GAChC;AAAA,EAI5C,MAAM,4BAA6D,UAAa;AAAA;AAAA;AAAA;AAAA,IAI9E,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb,OAAO,CAAC,eAAe;AAAA,IACzB;AAAA;AAAA;AAAA;AAAA,IAKA,YAAY,SAAsB;AAChC,YAAM,OAAO;AAEb,WAAK,IAAI,WAAW,MAAM;AACxB,aAAK,UAAU;AAAA,UACb;AAAA,UACA,WAAW,KAAK,QAAW,OAAO,KAAK,MAAM,IAAI,CAAC;AAAA,QACpD;AACA,aAAK,UAAU,OAAO,eAAe;AAAA,MACvC,CAAC;AAED,WAAK,IAAI,aAAa,MAAM;AAC1B,aAAK,UAAU,QAAQ,eAAe;AACtC,aAAK,UAAU,WAAW,eAAe;AAAA,MAC3C,CAAC;AAAA,IACH;AAAA,EACF;AAGA,SAAO;AACT;",
4
+ "sourcesContent": ["import type { Base, BaseConfig, BaseProps } from '../Base/Base.js';\nimport type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport { type PointerServiceProps, usePointer } from '../services/PointerService.js';\n\nexport type RelativePointerDecoratorOptions = {\n target?: (this: Base, instance: Base) => HTMLElement;\n};\n\nexport interface RelativePointerInterface extends BaseInterface {\n movedrelative?(props: PointerServiceProps): void;\n}\n\n/**\n * Add dragging capabilities to a component.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withRelativePointer.html\n */\nexport function withRelativePointer<S extends Base>(\n BaseClass: typeof Base,\n { target = (instance) => instance.$el }: RelativePointerDecoratorOptions = {},\n): BaseDecorator<RelativePointerInterface, S> {\n /**\n * Class.\n */\n class WithRelativePointer<T extends BaseProps = BaseProps> extends BaseClass<T> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n emits: ['movedrelative'],\n };\n\n /**\n * Class constructor.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n this.$on('mounted', () => {\n this.$services.register(\n 'movedrelative',\n usePointer.bind(undefined, target.call(this, this)),\n );\n this.$services.enable('movedrelative');\n });\n\n this.$on('destroyed', () => {\n this.$services.disable('movedrelative');\n this.$services.unregister('movedrelative');\n });\n }\n }\n\n // @ts-ignore\n return WithRelativePointer;\n}\n"],
5
+ "mappings": "AAEA,SAAmC,kBAAkB;AAc9C,SAAS,oBACd,WACA,EAAE,SAAS,CAAC,aAAa,SAAS,IAAI,IAAqC,CAAC,GAChC;AAAA,EAI5C,MAAM,4BAA6D,UAAa;AAAA;AAAA;AAAA;AAAA,IAI9E,OAAO,SAAqB;AAAA,MAC1B,GAAG,UAAU;AAAA,MACb,OAAO,CAAC,eAAe;AAAA,IACzB;AAAA;AAAA;AAAA;AAAA,IAKA,YAAY,SAAsB;AAChC,YAAM,OAAO;AAEb,WAAK,IAAI,WAAW,MAAM;AACxB,aAAK,UAAU;AAAA,UACb;AAAA,UACA,WAAW,KAAK,QAAW,OAAO,KAAK,MAAM,IAAI,CAAC;AAAA,QACpD;AACA,aAAK,UAAU,OAAO,eAAe;AAAA,MACvC,CAAC;AAED,WAAK,IAAI,aAAa,MAAM;AAC1B,aAAK,UAAU,QAAQ,eAAe;AACtC,aAAK,UAAU,WAAW,eAAe;AAAA,MAC3C,CAAC;AAAA,IACH;AAAA,EACF;AAGA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import type { BaseInterface, BaseDecorator } from '../Base/types.js';
2
- import type { Base } from '../Base/index.js';
1
+ import type { Base } from '../Base/Base.js';
2
+ import type { BaseDecorator, BaseInterface } from '../Base/types.js';
3
3
  /**
4
4
  * Extends the configuration of an existing class.
5
5
  * @link https://js-toolkit.studiometa.dev/api/decorators/withResponsiveOptions.html
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ResponsiveOptionsManager
3
3
  } from "../Base/managers/ResponsiveOptionsManager.js";
4
- import { isDefined, isObject } from "../utils/index.js";
4
+ import { isDefined, isObject } from "../utils/is.js";
5
5
  function withResponsiveOptions(BaseClass, { responsiveOptions = [] } = {}) {
6
6
  class WithResponsiveOptions extends BaseClass {
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/decorators/withResponsiveOptions.ts"],
4
- "sourcesContent": ["import type { BaseInterface, BaseDecorator } from '../Base/types.js';\nimport type { Base, BaseProps, Managers } from '../Base/index.js';\nimport type { OptionObject, OptionType } from '../Base/managers/OptionsManager.js';\nimport {\n ResponsiveOptionsManager,\n ResponsiveOptionObject,\n} from '../Base/managers/ResponsiveOptionsManager.js';\nimport { isDefined, isObject } from '../utils/index.js';\n\n/**\n * Extends the configuration of an existing class.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withResponsiveOptions.html\n */\nexport function withResponsiveOptions<S extends Base>(\n BaseClass: typeof Base,\n { responsiveOptions = [] } = {},\n): BaseDecorator<BaseInterface, S> {\n /**\n * Class.\n */\n class WithResponsiveOptions<T extends BaseProps = BaseProps> extends BaseClass<T> {\n /**\n * Configure responsive options.\n */\n get __config() {\n const config = super.__config;\n const options = config.options;\n\n for (const option of responsiveOptions) {\n if (isDefined(options[option])) {\n const oldOption = options[option];\n options[option] = {\n type: isObject(oldOption)\n ? (oldOption as OptionObject).type\n : (oldOption as OptionType),\n responsive: true,\n } as ResponsiveOptionObject;\n }\n }\n\n return config;\n }\n\n /**\n * Get managers.\n */\n get __managers(): Managers & { OptionsManager: typeof ResponsiveOptionsManager } {\n return {\n ...super.__managers,\n OptionsManager: ResponsiveOptionsManager,\n };\n }\n }\n\n // @ts-ignore\n return WithResponsiveOptions;\n}\n"],
5
- "mappings": "AAGA;AAAA,EACE;AAAA,OAEK;AACP,SAAS,WAAW,gBAAgB;AAM7B,SAAS,sBACd,WACA,EAAE,oBAAoB,CAAC,EAAE,IAAI,CAAC,GACG;AAAA,EAIjC,MAAM,8BAA+D,UAAa;AAAA;AAAA;AAAA;AAAA,IAIhF,IAAI,WAAW;AACb,YAAM,SAAS,MAAM;AACrB,YAAM,UAAU,OAAO;AAEvB,iBAAW,UAAU,mBAAmB;AACtC,YAAI,UAAU,QAAQ,MAAM,CAAC,GAAG;AAC9B,gBAAM,YAAY,QAAQ,MAAM;AAChC,kBAAQ,MAAM,IAAI;AAAA,YAChB,MAAM,SAAS,SAAS,IACnB,UAA2B,OAC3B;AAAA,YACL,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKA,IAAI,aAA6E;AAC/E,aAAO;AAAA,QACL,GAAG,MAAM;AAAA,QACT,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAGA,SAAO;AACT;",
4
+ "sourcesContent": ["import type { Base, BaseProps, Managers } from '../Base/Base.js';\nimport {\n ResponsiveOptionObject,\n ResponsiveOptionsManager,\n} from '../Base/managers/ResponsiveOptionsManager.js';\nimport type { BaseDecorator, BaseInterface } from '../Base/types.js';\nimport { isDefined, isObject } from '../utils/is.js';\nimport type { OptionObject, OptionType } from '../Base/managers/OptionsManager.js';\n\n/**\n * Extends the configuration of an existing class.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withResponsiveOptions.html\n */\nexport function withResponsiveOptions<S extends Base>(\n BaseClass: typeof Base,\n { responsiveOptions = [] } = {},\n): BaseDecorator<BaseInterface, S> {\n /**\n * Class.\n */\n class WithResponsiveOptions<T extends BaseProps = BaseProps> extends BaseClass<T> {\n /**\n * Configure responsive options.\n */\n get __config() {\n const config = super.__config;\n const options = config.options;\n\n for (const option of responsiveOptions) {\n if (isDefined(options[option])) {\n const oldOption = options[option];\n options[option] = {\n type: isObject(oldOption)\n ? (oldOption as OptionObject).type\n : (oldOption as OptionType),\n responsive: true,\n } as ResponsiveOptionObject;\n }\n }\n\n return config;\n }\n\n /**\n * Get managers.\n */\n get __managers(): Managers & { OptionsManager: typeof ResponsiveOptionsManager } {\n return {\n ...super.__managers,\n OptionsManager: ResponsiveOptionsManager,\n };\n }\n }\n\n // @ts-ignore\n return WithResponsiveOptions;\n}\n"],
5
+ "mappings": "AACA;AAAA,EAEE;AAAA,OACK;AAEP,SAAS,WAAW,gBAAgB;AAO7B,SAAS,sBACd,WACA,EAAE,oBAAoB,CAAC,EAAE,IAAI,CAAC,GACG;AAAA,EAIjC,MAAM,8BAA+D,UAAa;AAAA;AAAA;AAAA;AAAA,IAIhF,IAAI,WAAW;AACb,YAAM,SAAS,MAAM;AACrB,YAAM,UAAU,OAAO;AAEvB,iBAAW,UAAU,mBAAmB;AACtC,YAAI,UAAU,QAAQ,MAAM,CAAC,GAAG;AAC9B,gBAAM,YAAY,QAAQ,MAAM;AAChC,kBAAQ,MAAM,IAAI;AAAA,YAChB,MAAM,SAAS,SAAS,IACnB,UAA2B,OAC3B;AAAA,YACL,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAEA,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKA,IAAI,aAA6E;AAC/E,aAAO;AAAA,QACL,GAAG,MAAM;AAAA,QACT,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAGA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,5 @@
1
- import { isNumber, isString, endsWith } from "../../utils/index.js";
1
+ import { isNumber, isString } from "../../utils/is.js";
2
+ import { endsWith } from "../../utils/string/endsWith.js";
2
3
  const units = {
3
4
  px: "px",
4
5
  vh: "vh",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../packages/js-toolkit/decorators/withScrolledInView/utils.ts"],
4
- "sourcesContent": ["import { isNumber, isString, endsWith } from '../../utils/index.js';\nimport type { NormalizedOffset } from './types.js';\n\nconst units = {\n px: 'px',\n vh: 'vh',\n vw: 'vw',\n vmin: 'vmin',\n vmax: 'vmax',\n percent: '%',\n};\n\nconst namedOffsets = {\n start: 0,\n center: 0.5,\n end: 1,\n};\n\n/**\n * Normalize offset input.\n */\nexport function normalizeOffset(offsets: string): NormalizedOffset {\n return offsets\n .split('/')\n .map((offset) => offset.trim().split(' ').slice(0, 2)) as NormalizedOffset;\n}\n\n/**\n * Parse the given offset.\n */\nexport function parseNamedOffset(offset: string | number): string | number {\n if (isNumber(offset)) {\n return offset;\n }\n\n if (isNumber(namedOffsets[offset])) {\n return namedOffsets[offset];\n }\n\n if (isNumber(Number(offset))) {\n return Number(offset);\n }\n\n if (isString(offset) && endsWith(offset, units.percent)) {\n return Number.parseFloat(offset) / 100;\n }\n\n return offset;\n}\n\n/**\n * Get an edge value given a start, size and offset value.\n */\nexport function getEdgeWithOffset(start: number, size: number, offset: string | number): number {\n if (isNumber(offset)) {\n return start + size * offset;\n }\n\n const parsedNamedOffset = parseNamedOffset(offset);\n if (isNumber(parsedNamedOffset)) {\n return start + size * parsedNamedOffset;\n }\n\n if (isString(parsedNamedOffset)) {\n const parsedOffset = Number.parseFloat(parsedNamedOffset);\n\n if (endsWith(parsedNamedOffset, units.px)) {\n return start + parsedOffset;\n }\n\n if (endsWith(parsedNamedOffset, units.vh)) {\n return start + (parsedOffset * window.innerHeight) / 100;\n }\n\n if (endsWith(parsedNamedOffset, units.vw)) {\n return start + (parsedOffset * window.innerWidth) / 100;\n }\n\n if (endsWith(parsedNamedOffset, units.vmin)) {\n return start + (parsedOffset * Math.min(window.innerWidth, window.innerHeight)) / 100;\n }\n\n if (endsWith(parsedNamedOffset, units.vmax)) {\n return start + (parsedOffset * Math.max(window.innerWidth, window.innerHeight)) / 100;\n }\n }\n\n return start;\n}\n\ntype HorizontalOnlyRect = {\n x: number;\n width: number;\n};\n\ntype VerticalOnlyRect = {\n y: number;\n height: number;\n};\n\ntype HorizontalRect = HorizontalOnlyRect & Partial<VerticalOnlyRect>;\ntype VerticalRect = Partial<HorizontalOnlyRect> & VerticalOnlyRect;\n\n/**\n * Get starting and ending edges for a given axis, a target sizings, a container sizings and their offset.\n */\nexport function getEdges<T extends 'x' | 'y'>(\n axis: T,\n targetSizes: T extends 'x' ? HorizontalRect : VerticalRect,\n containerSizes: T extends 'x' ? HorizontalRect : VerticalRect,\n offset: NormalizedOffset,\n): [number, number] {\n const sizeKey = axis === 'x' ? 'width' : 'height';\n const targetStart = getEdgeWithOffset(targetSizes[axis], targetSizes[sizeKey], offset[0][0]);\n const containerStart = getEdgeWithOffset(0, containerSizes[sizeKey], offset[0][1]);\n const targetEnd = getEdgeWithOffset(targetSizes[axis], targetSizes[sizeKey], offset[1][0]);\n const containerEnd = getEdgeWithOffset(0, containerSizes[sizeKey], offset[1][1]);\n const start = targetStart - containerStart;\n const end = targetEnd - containerEnd;\n\n return [start, end];\n}\n"],
5
- "mappings": "AAAA,SAAS,UAAU,UAAU,gBAAgB;AAG7C,MAAM,QAAQ;AAAA,EACZ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX;AAEA,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AACP;AAKO,SAAS,gBAAgB,SAAmC;AACjE,SAAO,QACJ,MAAM,GAAG,EACT,IAAI,CAAC,WAAW,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;AACzD;AAKO,SAAS,iBAAiB,QAA0C;AACzE,MAAI,SAAS,MAAM,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,SAAS,aAAa,MAAM,CAAC,GAAG;AAClC,WAAO,aAAa,MAAM;AAAA,EAC5B;AAEA,MAAI,SAAS,OAAO,MAAM,CAAC,GAAG;AAC5B,WAAO,OAAO,MAAM;AAAA,EACtB;AAEA,MAAI,SAAS,MAAM,KAAK,SAAS,QAAQ,MAAM,OAAO,GAAG;AACvD,WAAO,OAAO,WAAW,MAAM,IAAI;AAAA,EACrC;AAEA,SAAO;AACT;AAKO,SAAS,kBAAkB,OAAe,MAAc,QAAiC;AAC9F,MAAI,SAAS,MAAM,GAAG;AACpB,WAAO,QAAQ,OAAO;AAAA,EACxB;AAEA,QAAM,oBAAoB,iBAAiB,MAAM;AACjD,MAAI,SAAS,iBAAiB,GAAG;AAC/B,WAAO,QAAQ,OAAO;AAAA,EACxB;AAEA,MAAI,SAAS,iBAAiB,GAAG;AAC/B,UAAM,eAAe,OAAO,WAAW,iBAAiB;AAExD,QAAI,SAAS,mBAAmB,MAAM,EAAE,GAAG;AACzC,aAAO,QAAQ;AAAA,IACjB;AAEA,QAAI,SAAS,mBAAmB,MAAM,EAAE,GAAG;AACzC,aAAO,QAAS,eAAe,OAAO,cAAe;AAAA,IACvD;AAEA,QAAI,SAAS,mBAAmB,MAAM,EAAE,GAAG;AACzC,aAAO,QAAS,eAAe,OAAO,aAAc;AAAA,IACtD;AAEA,QAAI,SAAS,mBAAmB,MAAM,IAAI,GAAG;AAC3C,aAAO,QAAS,eAAe,KAAK,IAAI,OAAO,YAAY,OAAO,WAAW,IAAK;AAAA,IACpF;AAEA,QAAI,SAAS,mBAAmB,MAAM,IAAI,GAAG;AAC3C,aAAO,QAAS,eAAe,KAAK,IAAI,OAAO,YAAY,OAAO,WAAW,IAAK;AAAA,IACpF;AAAA,EACF;AAEA,SAAO;AACT;AAkBO,SAAS,SACd,MACA,aACA,gBACA,QACkB;AAClB,QAAM,UAAU,SAAS,MAAM,UAAU;AACzC,QAAM,cAAc,kBAAkB,YAAY,IAAI,GAAG,YAAY,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AAC3F,QAAM,iBAAiB,kBAAkB,GAAG,eAAe,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AACjF,QAAM,YAAY,kBAAkB,YAAY,IAAI,GAAG,YAAY,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AACzF,QAAM,eAAe,kBAAkB,GAAG,eAAe,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AAC/E,QAAM,QAAQ,cAAc;AAC5B,QAAM,MAAM,YAAY;AAExB,SAAO,CAAC,OAAO,GAAG;AACpB;",
4
+ "sourcesContent": ["import { isNumber, isString } from '../../utils/is.js';\nimport { endsWith } from '../../utils/string/endsWith.js';\nimport type { NormalizedOffset } from './types.js';\n\nconst units = {\n px: 'px',\n vh: 'vh',\n vw: 'vw',\n vmin: 'vmin',\n vmax: 'vmax',\n percent: '%',\n};\n\nconst namedOffsets = {\n start: 0,\n center: 0.5,\n end: 1,\n};\n\n/**\n * Normalize offset input.\n */\nexport function normalizeOffset(offsets: string): NormalizedOffset {\n return offsets\n .split('/')\n .map((offset) => offset.trim().split(' ').slice(0, 2)) as NormalizedOffset;\n}\n\n/**\n * Parse the given offset.\n */\nexport function parseNamedOffset(offset: string | number): string | number {\n if (isNumber(offset)) {\n return offset;\n }\n\n if (isNumber(namedOffsets[offset])) {\n return namedOffsets[offset];\n }\n\n if (isNumber(Number(offset))) {\n return Number(offset);\n }\n\n if (isString(offset) && endsWith(offset, units.percent)) {\n return Number.parseFloat(offset) / 100;\n }\n\n return offset;\n}\n\n/**\n * Get an edge value given a start, size and offset value.\n */\nexport function getEdgeWithOffset(start: number, size: number, offset: string | number): number {\n if (isNumber(offset)) {\n return start + size * offset;\n }\n\n const parsedNamedOffset = parseNamedOffset(offset);\n if (isNumber(parsedNamedOffset)) {\n return start + size * parsedNamedOffset;\n }\n\n if (isString(parsedNamedOffset)) {\n const parsedOffset = Number.parseFloat(parsedNamedOffset);\n\n if (endsWith(parsedNamedOffset, units.px)) {\n return start + parsedOffset;\n }\n\n if (endsWith(parsedNamedOffset, units.vh)) {\n return start + (parsedOffset * window.innerHeight) / 100;\n }\n\n if (endsWith(parsedNamedOffset, units.vw)) {\n return start + (parsedOffset * window.innerWidth) / 100;\n }\n\n if (endsWith(parsedNamedOffset, units.vmin)) {\n return start + (parsedOffset * Math.min(window.innerWidth, window.innerHeight)) / 100;\n }\n\n if (endsWith(parsedNamedOffset, units.vmax)) {\n return start + (parsedOffset * Math.max(window.innerWidth, window.innerHeight)) / 100;\n }\n }\n\n return start;\n}\n\ntype HorizontalOnlyRect = {\n x: number;\n width: number;\n};\n\ntype VerticalOnlyRect = {\n y: number;\n height: number;\n};\n\ntype HorizontalRect = HorizontalOnlyRect & Partial<VerticalOnlyRect>;\ntype VerticalRect = Partial<HorizontalOnlyRect> & VerticalOnlyRect;\n\n/**\n * Get starting and ending edges for a given axis, a target sizings, a container sizings and their offset.\n */\nexport function getEdges<T extends 'x' | 'y'>(\n axis: T,\n targetSizes: T extends 'x' ? HorizontalRect : VerticalRect,\n containerSizes: T extends 'x' ? HorizontalRect : VerticalRect,\n offset: NormalizedOffset,\n): [number, number] {\n const sizeKey = axis === 'x' ? 'width' : 'height';\n const targetStart = getEdgeWithOffset(targetSizes[axis], targetSizes[sizeKey], offset[0][0]);\n const containerStart = getEdgeWithOffset(0, containerSizes[sizeKey], offset[0][1]);\n const targetEnd = getEdgeWithOffset(targetSizes[axis], targetSizes[sizeKey], offset[1][0]);\n const containerEnd = getEdgeWithOffset(0, containerSizes[sizeKey], offset[1][1]);\n const start = targetStart - containerStart;\n const end = targetEnd - containerEnd;\n\n return [start, end];\n}\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,gBAAgB;AACnC,SAAS,gBAAgB;AAGzB,MAAM,QAAQ;AAAA,EACZ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AACX;AAEA,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AACP;AAKO,SAAS,gBAAgB,SAAmC;AACjE,SAAO,QACJ,MAAM,GAAG,EACT,IAAI,CAAC,WAAW,OAAO,KAAK,EAAE,MAAM,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;AACzD;AAKO,SAAS,iBAAiB,QAA0C;AACzE,MAAI,SAAS,MAAM,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,SAAS,aAAa,MAAM,CAAC,GAAG;AAClC,WAAO,aAAa,MAAM;AAAA,EAC5B;AAEA,MAAI,SAAS,OAAO,MAAM,CAAC,GAAG;AAC5B,WAAO,OAAO,MAAM;AAAA,EACtB;AAEA,MAAI,SAAS,MAAM,KAAK,SAAS,QAAQ,MAAM,OAAO,GAAG;AACvD,WAAO,OAAO,WAAW,MAAM,IAAI;AAAA,EACrC;AAEA,SAAO;AACT;AAKO,SAAS,kBAAkB,OAAe,MAAc,QAAiC;AAC9F,MAAI,SAAS,MAAM,GAAG;AACpB,WAAO,QAAQ,OAAO;AAAA,EACxB;AAEA,QAAM,oBAAoB,iBAAiB,MAAM;AACjD,MAAI,SAAS,iBAAiB,GAAG;AAC/B,WAAO,QAAQ,OAAO;AAAA,EACxB;AAEA,MAAI,SAAS,iBAAiB,GAAG;AAC/B,UAAM,eAAe,OAAO,WAAW,iBAAiB;AAExD,QAAI,SAAS,mBAAmB,MAAM,EAAE,GAAG;AACzC,aAAO,QAAQ;AAAA,IACjB;AAEA,QAAI,SAAS,mBAAmB,MAAM,EAAE,GAAG;AACzC,aAAO,QAAS,eAAe,OAAO,cAAe;AAAA,IACvD;AAEA,QAAI,SAAS,mBAAmB,MAAM,EAAE,GAAG;AACzC,aAAO,QAAS,eAAe,OAAO,aAAc;AAAA,IACtD;AAEA,QAAI,SAAS,mBAAmB,MAAM,IAAI,GAAG;AAC3C,aAAO,QAAS,eAAe,KAAK,IAAI,OAAO,YAAY,OAAO,WAAW,IAAK;AAAA,IACpF;AAEA,QAAI,SAAS,mBAAmB,MAAM,IAAI,GAAG;AAC3C,aAAO,QAAS,eAAe,KAAK,IAAI,OAAO,YAAY,OAAO,WAAW,IAAK;AAAA,IACpF;AAAA,EACF;AAEA,SAAO;AACT;AAkBO,SAAS,SACd,MACA,aACA,gBACA,QACkB;AAClB,QAAM,UAAU,SAAS,MAAM,UAAU;AACzC,QAAM,cAAc,kBAAkB,YAAY,IAAI,GAAG,YAAY,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AAC3F,QAAM,iBAAiB,kBAAkB,GAAG,eAAe,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AACjF,QAAM,YAAY,kBAAkB,YAAY,IAAI,GAAG,YAAY,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AACzF,QAAM,eAAe,kBAAkB,GAAG,eAAe,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;AAC/E,QAAM,QAAQ,cAAc;AAC5B,QAAM,MAAM,YAAY;AAExB,SAAO,CAAC,OAAO,GAAG;AACpB;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,8 @@
1
- import type { BaseInterface, BaseDecorator } from '../../Base/types.js';
2
- import type { Base, BaseProps } from '../../Base/index.js';
3
- import type { RafServiceProps, ScrollServiceProps, ResizeServiceProps } from '../../services/index.js';
1
+ import type { Base, BaseProps } from '../../Base/Base.js';
2
+ import type { BaseDecorator, BaseInterface } from '../../Base/types.js';
3
+ import type { RafServiceProps } from '../../services/RafService.js';
4
+ import type { ResizeServiceProps } from '../../services/ResizeService.js';
5
+ import { type ScrollServiceProps } from '../../services/ScrollService.js';
4
6
  export interface WithScrolledInViewProps extends BaseProps {
5
7
  $options: {
6
8
  dampFactor: number;
@@ -1,14 +1,12 @@
1
- import { useScroll } from "../../services/index.js";
1
+ import { useScroll } from "../../services/ScrollService.js";
2
+ import { getOffsetSizes } from "../../utils/css/getOffsetSizes.js";
3
+ import { isFunction } from "../../utils/is.js";
4
+ import { clamp } from "../../utils/math/clamp.js";
5
+ import { clamp01 } from "../../utils/math/clamp01.js";
6
+ import { damp } from "../../utils/math/damp.js";
7
+ import { domScheduler as scheduler } from "../../utils/scheduler.js";
8
+ import { getEdges, normalizeOffset } from "./utils.js";
2
9
  import { withMountWhenInView } from "../withMountWhenInView.js";
3
- import {
4
- damp,
5
- clamp,
6
- clamp01,
7
- getOffsetSizes,
8
- isFunction,
9
- domScheduler as scheduler
10
- } from "../../utils/index.js";
11
- import { normalizeOffset, getEdges } from "./utils.js";
12
10
  function updateProgress(props, axis, progressKey, currentKey) {
13
11
  props[progressKey][axis] = props.start[axis] === props.end[axis] ? 0 : clamp01(
14
12
  (props[currentKey][axis] - props.start[axis]) / (props.end[axis] - props.start[axis])
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../packages/js-toolkit/decorators/withScrolledInView/withScrolledInView.ts"],
4
- "sourcesContent": ["import type { BaseInterface, BaseDecorator } from '../../Base/types.js';\nimport type { Base, BaseProps, BaseConfig } from '../../Base/index.js';\nimport type {\n RafServiceProps,\n ScrollServiceProps,\n ResizeServiceProps,\n} from '../../services/index.js';\nimport { useScroll } from '../../services/index.js';\nimport { withMountWhenInView } from '../withMountWhenInView.js';\nimport {\n damp,\n clamp,\n clamp01,\n getOffsetSizes,\n isFunction,\n domScheduler as scheduler,\n} from '../../utils/index.js';\nimport { normalizeOffset, getEdges } from './utils.js';\n\nexport interface WithScrolledInViewProps extends BaseProps {\n $options: {\n dampFactor: number;\n dampPrecision: number;\n offset: string;\n };\n}\n\nexport type ScrollInViewProps = {\n start: {\n x: number;\n y: number;\n };\n end: {\n x: number;\n y: number;\n };\n current: {\n x: number;\n y: number;\n };\n dampedCurrent: {\n x: number;\n y: number;\n };\n progress: {\n x: number;\n y: number;\n };\n dampedProgress: {\n x: number;\n y: number;\n };\n};\n\nexport type WithScrolledInViewOptions = IntersectionObserverInit & {\n useOffsetSizes?: boolean;\n};\n\nfunction updateProgress(\n props: ScrollInViewProps,\n axis: 'x' | 'y',\n progressKey: 'progress' | 'dampedProgress',\n currentKey: 'current' | 'dampedCurrent',\n) {\n props[progressKey][axis] =\n props.start[axis] === props.end[axis]\n ? 0\n : clamp01(\n (props[currentKey][axis] - props.start[axis]) / (props.end[axis] - props.start[axis]),\n );\n}\n\n/**\n * Update props on tick.\n */\nfunction updateProps(\n props: ScrollInViewProps,\n dampFactor: number,\n dampPrecision: number,\n axis: 'x' | 'y' = 'x',\n): void {\n props.current[axis] = clamp(useScroll().props()[axis], props.start[axis], props.end[axis]);\n props.dampedCurrent[axis] = damp(\n props.current[axis],\n props.dampedCurrent[axis],\n dampFactor,\n dampPrecision,\n );\n updateProgress(props, axis, 'progress', 'current');\n updateProgress(props, axis, 'dampedProgress', 'dampedCurrent');\n}\n\nexport interface WithScrolledInViewInterface extends BaseInterface {\n /**\n * @type {ScrollInViewProps}\n */\n readonly props: ScrollInViewProps;\n dampFactor?: number;\n dampPrecision?: number;\n mounted(): void;\n resized(props: ResizeServiceProps): void;\n scrolled(props: ScrollServiceProps): void;\n ticked(props: RafServiceProps): void;\n destroyed(): void;\n}\n\n/**\n * Add scrolled in view capabilities to a component.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withScrolledInView.html\n */\nexport function withScrolledInView<S extends Base = Base>(\n BaseClass: typeof Base,\n options: WithScrolledInViewOptions = {},\n): BaseDecorator<WithScrolledInViewInterface, S, WithScrolledInViewProps> {\n /**\n * Class.\n */\n class WithScrolledInView<T extends BaseProps = BaseProps> extends withMountWhenInView(\n BaseClass,\n options,\n )<T & WithScrolledInViewProps> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n emits: ['scrolledInView'],\n options: {\n dampFactor: {\n type: Number,\n default: 0.1,\n },\n dampPrecision: {\n type: Number,\n default: 0.001,\n },\n offset: {\n type: String,\n default: 'start end / end start',\n },\n },\n };\n\n __props: ScrollInViewProps = {\n start: {\n x: 0,\n y: 0,\n },\n end: {\n x: 0,\n y: 0,\n },\n current: {\n x: 0,\n y: 0,\n },\n dampedCurrent: {\n x: 0,\n y: 0,\n },\n progress: {\n x: 0,\n y: 0,\n },\n dampedProgress: {\n x: 0,\n y: 0,\n },\n };\n\n shouldEvaluateProps = true;\n\n get props() {\n if (this.shouldEvaluateProps) {\n this.shouldEvaluateProps = false;\n const targetSizes = options.useOffsetSizes\n ? getOffsetSizes(this.$el)\n : this.$el.getBoundingClientRect();\n\n targetSizes.y += window.scrollY;\n targetSizes.x += window.scrollX;\n\n const containerSizes = {\n x: 0,\n y: 0,\n height: window.innerHeight,\n width: window.innerWidth,\n };\n\n const offset = normalizeOffset(this.$options.offset);\n\n // Y axis\n const [yStart, yEnd] = getEdges('y', targetSizes, containerSizes, offset);\n const yCurrent = clamp(window.scrollY, yStart, yEnd);\n const yProgress = yStart === yEnd ? 0 : clamp01((yCurrent - yStart) / (yEnd - yStart));\n // X axis\n const [xStart, xEnd] = getEdges('x', targetSizes, containerSizes, offset);\n const xCurrent = clamp(window.scrollX, xStart, xEnd);\n const xProgress = xStart === xEnd ? 0 : clamp01((xCurrent - xStart) / (xEnd - xStart));\n\n this.__props.start.x = xStart;\n this.__props.start.y = yStart;\n this.__props.end.x = xEnd;\n this.__props.end.y = yEnd;\n this.__props.current.x = xCurrent;\n this.__props.current.y = yCurrent;\n this.__props.dampedCurrent.x = xCurrent;\n this.__props.dampedCurrent.y = yCurrent;\n this.__props.progress.x = xProgress;\n this.__props.progress.y = yProgress;\n this.__props.dampedProgress.x = xProgress;\n this.__props.dampedProgress.y = yProgress;\n }\n\n return this.__props;\n }\n\n /**\n * Bind listeners.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n const render = () => {\n scheduler.read(() => {\n // @ts-ignore\n const renderFn = this.__callMethod('scrolledInView', this.props);\n if (isFunction(renderFn)) {\n scheduler.write(() => {\n renderFn(this.__props);\n });\n }\n });\n };\n\n const delegate = {\n handleEvent(event: CustomEvent) {\n delegate[event.type](event.detail[0]);\n },\n resized: () => {\n this.shouldEvaluateProps = true;\n render();\n },\n scrolled: (props: ScrollServiceProps) => {\n if (props.changed.y || props.changed.x) {\n this.$services.enable('ticked');\n }\n },\n mounted: () => render(),\n ticked: () => {\n const { dampFactor, dampPrecision } = this.$options;\n updateProps(this.__props, dampFactor, dampPrecision, 'x');\n updateProps(this.__props, dampFactor, dampPrecision, 'y');\n\n if (\n this.__props.dampedCurrent.x === this.__props.current.x &&\n this.__props.dampedCurrent.y === this.__props.current.y\n ) {\n this.$services.disable('ticked');\n }\n\n render();\n },\n };\n\n this.$on('before-mounted', () => {\n this.$on('mounted', delegate);\n this.$on('resized', delegate);\n this.$on('scrolled', delegate);\n this.$on('ticked', delegate);\n });\n\n this.$on('destroyed', () => {\n this.$off('mounted', delegate);\n this.$off('resized', delegate);\n this.$off('scrolled', delegate);\n this.$off('ticked', delegate);\n\n // Clamp damped values to their final value and trigger one last render on destroy\n this.__props.dampedCurrent.x = this.__props.current.x;\n this.__props.dampedCurrent.y = this.__props.current.y;\n this.__props.dampedProgress.x = this.__props.progress.x;\n this.__props.dampedProgress.y = this.__props.progress.y;\n render();\n });\n }\n }\n\n // @ts-ignore\n return WithScrolledInView;\n}\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import type { Base, BaseConfig, BaseProps } from '../../Base/Base.js';\nimport type { BaseDecorator, BaseInterface } from '../../Base/types.js';\nimport type { RafServiceProps } from '../../services/RafService.js';\nimport type { ResizeServiceProps } from '../../services/ResizeService.js';\nimport { type ScrollServiceProps, useScroll } from '../../services/ScrollService.js';\nimport { getOffsetSizes } from '../../utils/css/getOffsetSizes.js';\nimport { isFunction } from '../../utils/is.js';\nimport { clamp } from '../../utils/math/clamp.js';\nimport { clamp01 } from '../../utils/math/clamp01.js';\nimport { damp } from '../../utils/math/damp.js';\nimport { domScheduler as scheduler } from '../../utils/scheduler.js';\nimport { getEdges, normalizeOffset } from './utils.js';\nimport { withMountWhenInView } from '../withMountWhenInView.js';\n\nexport interface WithScrolledInViewProps extends BaseProps {\n $options: {\n dampFactor: number;\n dampPrecision: number;\n offset: string;\n };\n}\n\nexport type ScrollInViewProps = {\n start: {\n x: number;\n y: number;\n };\n end: {\n x: number;\n y: number;\n };\n current: {\n x: number;\n y: number;\n };\n dampedCurrent: {\n x: number;\n y: number;\n };\n progress: {\n x: number;\n y: number;\n };\n dampedProgress: {\n x: number;\n y: number;\n };\n};\n\nexport type WithScrolledInViewOptions = IntersectionObserverInit & {\n useOffsetSizes?: boolean;\n};\n\nfunction updateProgress(\n props: ScrollInViewProps,\n axis: 'x' | 'y',\n progressKey: 'progress' | 'dampedProgress',\n currentKey: 'current' | 'dampedCurrent',\n) {\n props[progressKey][axis] =\n props.start[axis] === props.end[axis]\n ? 0\n : clamp01(\n (props[currentKey][axis] - props.start[axis]) / (props.end[axis] - props.start[axis]),\n );\n}\n\n/**\n * Update props on tick.\n */\nfunction updateProps(\n props: ScrollInViewProps,\n dampFactor: number,\n dampPrecision: number,\n axis: 'x' | 'y' = 'x',\n): void {\n props.current[axis] = clamp(useScroll().props()[axis], props.start[axis], props.end[axis]);\n props.dampedCurrent[axis] = damp(\n props.current[axis],\n props.dampedCurrent[axis],\n dampFactor,\n dampPrecision,\n );\n updateProgress(props, axis, 'progress', 'current');\n updateProgress(props, axis, 'dampedProgress', 'dampedCurrent');\n}\n\nexport interface WithScrolledInViewInterface extends BaseInterface {\n /**\n * @type {ScrollInViewProps}\n */\n readonly props: ScrollInViewProps;\n dampFactor?: number;\n dampPrecision?: number;\n mounted(): void;\n resized(props: ResizeServiceProps): void;\n scrolled(props: ScrollServiceProps): void;\n ticked(props: RafServiceProps): void;\n destroyed(): void;\n}\n\n/**\n * Add scrolled in view capabilities to a component.\n * @link https://js-toolkit.studiometa.dev/api/decorators/withScrolledInView.html\n */\nexport function withScrolledInView<S extends Base = Base>(\n BaseClass: typeof Base,\n options: WithScrolledInViewOptions = {},\n): BaseDecorator<WithScrolledInViewInterface, S, WithScrolledInViewProps> {\n /**\n * Class.\n */\n class WithScrolledInView<T extends BaseProps = BaseProps> extends withMountWhenInView(\n BaseClass,\n options,\n )<T & WithScrolledInViewProps> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n ...BaseClass.config,\n emits: ['scrolledInView'],\n options: {\n dampFactor: {\n type: Number,\n default: 0.1,\n },\n dampPrecision: {\n type: Number,\n default: 0.001,\n },\n offset: {\n type: String,\n default: 'start end / end start',\n },\n },\n };\n\n __props: ScrollInViewProps = {\n start: {\n x: 0,\n y: 0,\n },\n end: {\n x: 0,\n y: 0,\n },\n current: {\n x: 0,\n y: 0,\n },\n dampedCurrent: {\n x: 0,\n y: 0,\n },\n progress: {\n x: 0,\n y: 0,\n },\n dampedProgress: {\n x: 0,\n y: 0,\n },\n };\n\n shouldEvaluateProps = true;\n\n get props() {\n if (this.shouldEvaluateProps) {\n this.shouldEvaluateProps = false;\n const targetSizes = options.useOffsetSizes\n ? getOffsetSizes(this.$el)\n : this.$el.getBoundingClientRect();\n\n targetSizes.y += window.scrollY;\n targetSizes.x += window.scrollX;\n\n const containerSizes = {\n x: 0,\n y: 0,\n height: window.innerHeight,\n width: window.innerWidth,\n };\n\n const offset = normalizeOffset(this.$options.offset);\n\n // Y axis\n const [yStart, yEnd] = getEdges('y', targetSizes, containerSizes, offset);\n const yCurrent = clamp(window.scrollY, yStart, yEnd);\n const yProgress = yStart === yEnd ? 0 : clamp01((yCurrent - yStart) / (yEnd - yStart));\n // X axis\n const [xStart, xEnd] = getEdges('x', targetSizes, containerSizes, offset);\n const xCurrent = clamp(window.scrollX, xStart, xEnd);\n const xProgress = xStart === xEnd ? 0 : clamp01((xCurrent - xStart) / (xEnd - xStart));\n\n this.__props.start.x = xStart;\n this.__props.start.y = yStart;\n this.__props.end.x = xEnd;\n this.__props.end.y = yEnd;\n this.__props.current.x = xCurrent;\n this.__props.current.y = yCurrent;\n this.__props.dampedCurrent.x = xCurrent;\n this.__props.dampedCurrent.y = yCurrent;\n this.__props.progress.x = xProgress;\n this.__props.progress.y = yProgress;\n this.__props.dampedProgress.x = xProgress;\n this.__props.dampedProgress.y = yProgress;\n }\n\n return this.__props;\n }\n\n /**\n * Bind listeners.\n */\n constructor(element: HTMLElement) {\n super(element);\n\n const render = () => {\n scheduler.read(() => {\n // @ts-ignore\n const renderFn = this.__callMethod('scrolledInView', this.props);\n if (isFunction(renderFn)) {\n scheduler.write(() => {\n renderFn(this.__props);\n });\n }\n });\n };\n\n const delegate = {\n handleEvent(event: CustomEvent) {\n delegate[event.type](event.detail[0]);\n },\n resized: () => {\n this.shouldEvaluateProps = true;\n render();\n },\n scrolled: (props: ScrollServiceProps) => {\n if (props.changed.y || props.changed.x) {\n this.$services.enable('ticked');\n }\n },\n mounted: () => render(),\n ticked: () => {\n const { dampFactor, dampPrecision } = this.$options;\n updateProps(this.__props, dampFactor, dampPrecision, 'x');\n updateProps(this.__props, dampFactor, dampPrecision, 'y');\n\n if (\n this.__props.dampedCurrent.x === this.__props.current.x &&\n this.__props.dampedCurrent.y === this.__props.current.y\n ) {\n this.$services.disable('ticked');\n }\n\n render();\n },\n };\n\n this.$on('before-mounted', () => {\n this.$on('mounted', delegate);\n this.$on('resized', delegate);\n this.$on('scrolled', delegate);\n this.$on('ticked', delegate);\n });\n\n this.$on('destroyed', () => {\n this.$off('mounted', delegate);\n this.$off('resized', delegate);\n this.$off('scrolled', delegate);\n this.$off('ticked', delegate);\n\n // Clamp damped values to their final value and trigger one last render on destroy\n this.__props.dampedCurrent.x = this.__props.current.x;\n this.__props.dampedCurrent.y = this.__props.current.y;\n this.__props.dampedProgress.x = this.__props.progress.x;\n this.__props.dampedProgress.y = this.__props.progress.y;\n render();\n });\n }\n }\n\n // @ts-ignore\n return WithScrolledInView;\n}\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import type { Base, BaseConstructor, BaseProps } from '../Base/index.js';
2
- import type { Features } from '../Base/features.js';
1
+ import type { Base, BaseConstructor, BaseProps } from '../Base/Base.js';
2
+ import { type Features } from '../Base/features.js';
3
3
  export type CreateAppOptions = Partial<Features> & {
4
4
  root?: HTMLElement;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import { features } from "../Base/features.js";
2
+ import { isDev } from "../utils/is.js";
2
3
  import { defineFeatures } from "./defineFeatures.js";
3
- import { isDev } from "../utils/index.js";
4
4
  import { logTree } from "./logTree.js";
5
5
  function createApp(App, options = {}) {
6
6
  let app;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/helpers/createApp.ts"],
4
- "sourcesContent": ["import type { Base, BaseConstructor, BaseProps } from '../Base/index.js';\nimport type { Features } from '../Base/features.js';\nimport { features } from '../Base/features.js';\nimport { defineFeatures } from './defineFeatures.js';\nimport { isDev } from '../utils/index.js';\nimport { logTree } from './logTree.js';\n\nexport type CreateAppOptions = Partial<Features> & {\n root?: HTMLElement;\n};\n\n/**\n * Instantiate and mount the given component on the given root element when the page has been loaded\n * and return a function to use the app instance when it is ready.\n * @link https://js-toolkit.studiometa.dev/api/helpers/createApp.html\n */\nexport function createApp<S extends BaseConstructor<Base>, T extends BaseProps = BaseProps>(\n App: S,\n options: HTMLElement | CreateAppOptions = {},\n): () => Promise<S & Base<T>> {\n let app: S & Base<T>;\n const { root = document.body, ...featureOptions } =\n options instanceof HTMLElement ? { root: options } : options;\n\n defineFeatures(featureOptions);\n\n async function init() {\n app = new App(root) as S & Base<T>;\n await app.$mount();\n if (isDev) {\n globalThis.$logTree = () => logTree(app);\n }\n return app;\n }\n\n let p: Promise<S & Base<T>>;\n\n if (features.get('blocking')) {\n p = init();\n } else {\n p = new Promise<S & Base<T>>((resolve) => {\n if (document.readyState === 'complete') {\n resolve(init());\n } else {\n document.addEventListener('readystatechange', () => {\n if (document.readyState === 'complete') {\n resolve(init());\n }\n });\n }\n });\n }\n\n return () => p;\n}\n"],
5
- "mappings": "AAEA,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,aAAa;AACtB,SAAS,eAAe;AAWjB,SAAS,UACd,KACA,UAA0C,CAAC,GACf;AAC5B,MAAI;AACJ,QAAM,EAAE,OAAO,SAAS,MAAM,GAAG,eAAe,IAC9C,mBAAmB,cAAc,EAAE,MAAM,QAAQ,IAAI;AAEvD,iBAAe,cAAc;AAE7B,iBAAe,OAAO;AACpB,UAAM,IAAI,IAAI,IAAI;AAClB,UAAM,IAAI,OAAO;AACjB,QAAI,OAAO;AACT,iBAAW,WAAW,MAAM,QAAQ,GAAG;AAAA,IACzC;AACA,WAAO;AAAA,EACT;AAEA,MAAI;AAEJ,MAAI,SAAS,IAAI,UAAU,GAAG;AAC5B,QAAI,KAAK;AAAA,EACX,OAAO;AACL,QAAI,IAAI,QAAqB,CAAC,YAAY;AACxC,UAAI,SAAS,eAAe,YAAY;AACtC,gBAAQ,KAAK,CAAC;AAAA,MAChB,OAAO;AACL,iBAAS,iBAAiB,oBAAoB,MAAM;AAClD,cAAI,SAAS,eAAe,YAAY;AACtC,oBAAQ,KAAK,CAAC;AAAA,UAChB;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO,MAAM;AACf;",
4
+ "sourcesContent": ["import type { Base, BaseConstructor, BaseProps } from '../Base/Base.js';\nimport { features, type Features } from '../Base/features.js';\nimport { isDev } from '../utils/is.js';\nimport { defineFeatures } from './defineFeatures.js';\nimport { logTree } from './logTree.js';\n\nexport type CreateAppOptions = Partial<Features> & {\n root?: HTMLElement;\n};\n\n/**\n * Instantiate and mount the given component on the given root element when the page has been loaded\n * and return a function to use the app instance when it is ready.\n * @link https://js-toolkit.studiometa.dev/api/helpers/createApp.html\n */\nexport function createApp<S extends BaseConstructor<Base>, T extends BaseProps = BaseProps>(\n App: S,\n options: HTMLElement | CreateAppOptions = {},\n): () => Promise<S & Base<T>> {\n let app: S & Base<T>;\n const { root = document.body, ...featureOptions } =\n options instanceof HTMLElement ? { root: options } : options;\n\n defineFeatures(featureOptions);\n\n async function init() {\n app = new App(root) as S & Base<T>;\n await app.$mount();\n if (isDev) {\n globalThis.$logTree = () => logTree(app);\n }\n return app;\n }\n\n let p: Promise<S & Base<T>>;\n\n if (features.get('blocking')) {\n p = init();\n } else {\n p = new Promise<S & Base<T>>((resolve) => {\n if (document.readyState === 'complete') {\n resolve(init());\n } else {\n document.addEventListener('readystatechange', () => {\n if (document.readyState === 'complete') {\n resolve(init());\n }\n });\n }\n });\n }\n\n return () => p;\n}\n"],
5
+ "mappings": "AACA,SAAS,gBAA+B;AACxC,SAAS,aAAa;AACtB,SAAS,sBAAsB;AAC/B,SAAS,eAAe;AAWjB,SAAS,UACd,KACA,UAA0C,CAAC,GACf;AAC5B,MAAI;AACJ,QAAM,EAAE,OAAO,SAAS,MAAM,GAAG,eAAe,IAC9C,mBAAmB,cAAc,EAAE,MAAM,QAAQ,IAAI;AAEvD,iBAAe,cAAc;AAE7B,iBAAe,OAAO;AACpB,UAAM,IAAI,IAAI,IAAI;AAClB,UAAM,IAAI,OAAO;AACjB,QAAI,OAAO;AACT,iBAAW,WAAW,MAAM,QAAQ,GAAG;AAAA,IACzC;AACA,WAAO;AAAA,EACT;AAEA,MAAI;AAEJ,MAAI,SAAS,IAAI,UAAU,GAAG;AAC5B,QAAI,KAAK;AAAA,EACX,OAAO;AACL,QAAI,IAAI,QAAqB,CAAC,YAAY;AACxC,UAAI,SAAS,eAAe,YAAY;AACtC,gBAAQ,KAAK,CAAC;AAAA,MAChB,OAAO;AACL,iBAAS,iBAAiB,oBAAoB,MAAM;AAClD,cAAI,SAAS,eAAe,YAAY;AACtC,oBAAQ,KAAK,CAAC;AAAA,UAChB;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO,MAAM;AACf;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { Features } from '../Base/features.js';
1
+ import { type Features } from '../Base/features.js';
2
2
  /**
3
3
  * Configure global features outside of `createApp`.
4
4
  * Useful when using `registerComponent` instead of `createApp`.
@@ -1,5 +1,5 @@
1
1
  import { features } from "../Base/features.js";
2
- import { isBoolean, isObject, isString } from "../utils/index.js";
2
+ import { isBoolean, isObject, isString } from "../utils/is.js";
3
3
  function defineFeatures(options) {
4
4
  const { breakpoints, blocking, prefix, attributes } = options;
5
5
  if (isObject(breakpoints)) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/helpers/defineFeatures.ts"],
4
- "sourcesContent": ["import type { Features } from '../Base/features.js';\nimport { features } from '../Base/features.js';\nimport { isBoolean, isObject, isString } from '../utils/index.js';\n\n/**\n * Configure global features outside of `createApp`.\n * Useful when using `registerComponent` instead of `createApp`.\n * @link https://js-toolkit.studiometa.dev/api/helpers/defineFeatures.html\n */\nexport function defineFeatures(options: Partial<Features>): void {\n const { breakpoints, blocking, prefix, attributes } = options;\n\n if (isObject(breakpoints)) {\n features.set('breakpoints', breakpoints);\n }\n\n if (isBoolean(blocking)) {\n features.set('blocking', blocking);\n }\n\n if (isString(prefix)) {\n features.set('prefix', prefix);\n }\n\n if (isObject(attributes)) {\n features.set('attributes', attributes);\n }\n}\n"],
5
- "mappings": "AACA,SAAS,gBAAgB;AACzB,SAAS,WAAW,UAAU,gBAAgB;AAOvC,SAAS,eAAe,SAAkC;AAC/D,QAAM,EAAE,aAAa,UAAU,QAAQ,WAAW,IAAI;AAEtD,MAAI,SAAS,WAAW,GAAG;AACzB,aAAS,IAAI,eAAe,WAAW;AAAA,EACzC;AAEA,MAAI,UAAU,QAAQ,GAAG;AACvB,aAAS,IAAI,YAAY,QAAQ;AAAA,EACnC;AAEA,MAAI,SAAS,MAAM,GAAG;AACpB,aAAS,IAAI,UAAU,MAAM;AAAA,EAC/B;AAEA,MAAI,SAAS,UAAU,GAAG;AACxB,aAAS,IAAI,cAAc,UAAU;AAAA,EACvC;AACF;",
4
+ "sourcesContent": ["import { features, type Features } from '../Base/features.js';\nimport { isBoolean, isObject, isString } from '../utils/is.js';\n\n/**\n * Configure global features outside of `createApp`.\n * Useful when using `registerComponent` instead of `createApp`.\n * @link https://js-toolkit.studiometa.dev/api/helpers/defineFeatures.html\n */\nexport function defineFeatures(options: Partial<Features>): void {\n const { breakpoints, blocking, prefix, attributes } = options;\n\n if (isObject(breakpoints)) {\n features.set('breakpoints', breakpoints);\n }\n\n if (isBoolean(blocking)) {\n features.set('blocking', blocking);\n }\n\n if (isString(prefix)) {\n features.set('prefix', prefix);\n }\n\n if (isObject(attributes)) {\n features.set('attributes', attributes);\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,gBAA+B;AACxC,SAAS,WAAW,UAAU,gBAAgB;AAOvC,SAAS,eAAe,SAAkC;AAC/D,QAAM,EAAE,aAAa,UAAU,QAAQ,WAAW,IAAI;AAEtD,MAAI,SAAS,WAAW,GAAG;AACzB,aAAS,IAAI,eAAe,WAAW;AAAA,EACzC;AAEA,MAAI,UAAU,QAAQ,GAAG;AACvB,aAAS,IAAI,YAAY,QAAQ;AAAA,EACnC;AAEA,MAAI,SAAS,MAAM,GAAG;AACpB,aAAS,IAAI,UAAU,MAAM;AAAA,EAC/B;AAEA,MAAI,SAAS,UAAU,GAAG;AACxB,aAAS,IAAI,cAAc,UAAU;AAAA,EACvC;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { Base, BaseConstructor } from '../Base/index.js';
1
+ import type { Base, BaseConstructor } from '../Base/Base.js';
2
2
  /**
3
3
  * Get the closest parent of a component.
4
4
  * @link https://js-toolkit.studiometa.dev/api/helpers/getClosestParent.html
@@ -1,5 +1,5 @@
1
+ import { getAncestorWhere } from "../utils/dom/ancestors.js";
1
2
  import { getInstanceFromElement } from "./getInstanceFromElement.js";
2
- import { getAncestorWhere } from "../utils/index.js";
3
3
  function getClosestParent(childInstance, ParentConstructor) {
4
4
  const parentEl = getAncestorWhere(
5
5
  childInstance.$el,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/helpers/getClosestParent.ts"],
4
- "sourcesContent": ["import type { Base, BaseConstructor } from '../Base/index.js';\nimport { getInstanceFromElement } from './getInstanceFromElement.js';\nimport { getAncestorWhere } from '../utils/index.js';\n\n/**\n * Get the closest parent of a component.\n * @link https://js-toolkit.studiometa.dev/api/helpers/getClosestParent.html\n */\nexport function getClosestParent<T extends BaseConstructor>(\n childInstance: Base,\n ParentConstructor: T,\n) {\n const parentEl = getAncestorWhere(\n childInstance.$el,\n (element) => element && getInstanceFromElement(element, ParentConstructor) !== null,\n );\n\n return parentEl ? getInstanceFromElement(parentEl, ParentConstructor) : null;\n}\n"],
5
- "mappings": "AACA,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AAM1B,SAAS,iBACd,eACA,mBACA;AACA,QAAM,WAAW;AAAA,IACf,cAAc;AAAA,IACd,CAAC,YAAY,WAAW,uBAAuB,SAAS,iBAAiB,MAAM;AAAA,EACjF;AAEA,SAAO,WAAW,uBAAuB,UAAU,iBAAiB,IAAI;AAC1E;",
4
+ "sourcesContent": ["import type { Base, BaseConstructor } from '../Base/Base.js';\nimport { getAncestorWhere } from '../utils/dom/ancestors.js';\nimport { getInstanceFromElement } from './getInstanceFromElement.js';\n\n/**\n * Get the closest parent of a component.\n * @link https://js-toolkit.studiometa.dev/api/helpers/getClosestParent.html\n */\nexport function getClosestParent<T extends BaseConstructor>(\n childInstance: Base,\n ParentConstructor: T,\n) {\n const parentEl = getAncestorWhere(\n childInstance.$el,\n (element) => element && getInstanceFromElement(element, ParentConstructor) !== null,\n );\n\n return parentEl ? getInstanceFromElement(parentEl, ParentConstructor) : null;\n}\n"],
5
+ "mappings": "AACA,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AAMhC,SAAS,iBACd,eACA,mBACA;AACA,QAAM,WAAW;AAAA,IACf,cAAc;AAAA,IACd,CAAC,YAAY,WAAW,uBAAuB,SAAS,iBAAiB,MAAM;AAAA,EACjF;AAEA,SAAO,WAAW,uBAAuB,UAAU,iBAAiB,IAAI;AAC1E;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Base } from '../Base/index.js';
1
+ import { Base } from '../Base/Base.js';
2
2
  /**
3
3
  * Get direct children from a parent when working with nested components.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { isArray } from "../utils/index.js";
1
+ import { isArray } from "../utils/is.js";
2
2
  function getDirectChildren(parentInstance, parentName, childrenName) {
3
3
  const allChildren = parentInstance.__children.props;
4
4
  const children = allChildren[childrenName];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/helpers/getDirectChildren.ts"],
4
- "sourcesContent": ["import { Base, BaseProps } from '../Base/index.js';\nimport { isArray } from '../utils/index.js';\n\n/**\n * Get direct children from a parent when working with nested components.\n *\n * @template {Base} T\n * @param {Base} parentInstance\n * @param {string} parentName\n * @param {string} childrenName\n * @return {T[]}\n * @link https://js-toolkit.studiometa.dev/api/helpers/getDirectChildren.html\n */\nexport function getDirectChildren<T extends Base = Base>(\n parentInstance: Base,\n parentName: string,\n childrenName: string,\n): T[] {\n const allChildren = parentInstance.__children.props;\n const children = allChildren[childrenName] as Base<BaseProps>[];\n const nestedParents = allChildren[parentName] as Base<BaseProps>[];\n\n if (!isArray(children)) {\n return [];\n }\n\n if (!isArray(nestedParents) || nestedParents.length <= 0) {\n return children as T[];\n }\n\n const directChildren = [];\n\n for (const child of children) {\n for (const nestedParent of nestedParents) {\n const nestedChildren = nestedParent.__children.props[childrenName] as Base<BaseProps>[];\n\n if (isArray(nestedChildren) && nestedChildren.includes(child)) {\n continue;\n }\n\n directChildren.push(child);\n }\n }\n\n return directChildren;\n}\n\n/**\n * Test if a component instance is a direct child from the given component.\n *\n * @param {Base} parentInstance\n * @param {string} parentName\n * @param {string} childrenName\n * @param {Base} childInstance\n * @return {boolean}\n * @link https://js-toolkit.studiometa.dev/api/helpers/isDirectChild.html\n */\nexport function isDirectChild(parentInstance, parentName, childrenName, childInstance) {\n return getDirectChildren(parentInstance, parentName, childrenName).includes(childInstance);\n}\n"],
4
+ "sourcesContent": ["import { Base, BaseProps } from '../Base/Base.js';\nimport { isArray } from '../utils/is.js';\n\n/**\n * Get direct children from a parent when working with nested components.\n *\n * @template {Base} T\n * @param {Base} parentInstance\n * @param {string} parentName\n * @param {string} childrenName\n * @return {T[]}\n * @link https://js-toolkit.studiometa.dev/api/helpers/getDirectChildren.html\n */\nexport function getDirectChildren<T extends Base = Base>(\n parentInstance: Base,\n parentName: string,\n childrenName: string,\n): T[] {\n const allChildren = parentInstance.__children.props;\n const children = allChildren[childrenName] as Base<BaseProps>[];\n const nestedParents = allChildren[parentName] as Base<BaseProps>[];\n\n if (!isArray(children)) {\n return [];\n }\n\n if (!isArray(nestedParents) || nestedParents.length <= 0) {\n return children as T[];\n }\n\n const directChildren = [];\n\n for (const child of children) {\n for (const nestedParent of nestedParents) {\n const nestedChildren = nestedParent.__children.props[childrenName] as Base<BaseProps>[];\n\n if (isArray(nestedChildren) && nestedChildren.includes(child)) {\n continue;\n }\n\n directChildren.push(child);\n }\n }\n\n return directChildren;\n}\n\n/**\n * Test if a component instance is a direct child from the given component.\n *\n * @param {Base} parentInstance\n * @param {string} parentName\n * @param {string} childrenName\n * @param {Base} childInstance\n * @return {boolean}\n * @link https://js-toolkit.studiometa.dev/api/helpers/isDirectChild.html\n */\nexport function isDirectChild(parentInstance, parentName, childrenName, childInstance) {\n return getDirectChildren(parentInstance, parentName, childrenName).includes(childInstance);\n}\n"],
5
5
  "mappings": "AACA,SAAS,eAAe;AAYjB,SAAS,kBACd,gBACA,YACA,cACK;AACL,QAAM,cAAc,eAAe,WAAW;AAC9C,QAAM,WAAW,YAAY,YAAY;AACzC,QAAM,gBAAgB,YAAY,UAAU;AAE5C,MAAI,CAAC,QAAQ,QAAQ,GAAG;AACtB,WAAO,CAAC;AAAA,EACV;AAEA,MAAI,CAAC,QAAQ,aAAa,KAAK,cAAc,UAAU,GAAG;AACxD,WAAO;AAAA,EACT;AAEA,QAAM,iBAAiB,CAAC;AAExB,aAAW,SAAS,UAAU;AAC5B,eAAW,gBAAgB,eAAe;AACxC,YAAM,iBAAiB,aAAa,WAAW,MAAM,YAAY;AAEjE,UAAI,QAAQ,cAAc,KAAK,eAAe,SAAS,KAAK,GAAG;AAC7D;AAAA,MACF;AAEA,qBAAe,KAAK,KAAK;AAAA,IAC3B;AAAA,EACF;AAEA,SAAO;AACT;AAYO,SAAS,cAAc,gBAAgB,YAAY,cAAc,eAAe;AACrF,SAAO,kBAAkB,gBAAgB,YAAY,YAAY,EAAE,SAAS,aAAa;AAC3F;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { BaseConstructor, BaseEl } from '../Base/index.js';
1
+ import type { BaseConstructor, BaseEl } from '../Base/Base.js';
2
2
  /**
3
3
  * Get a component instance from a DOM element.
4
4
  * @link https://js-toolkit.studiometa.dev/api/helpers/getInstanceFromElement.html
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../packages/js-toolkit/helpers/getInstanceFromElement.ts"],
4
- "sourcesContent": ["import type { BaseConstructor, BaseEl } from '../Base/index.js';\n\n/**\n * Get a component instance from a DOM element.\n * @link https://js-toolkit.studiometa.dev/api/helpers/getInstanceFromElement.html\n */\nexport function getInstanceFromElement<T extends BaseConstructor>(\n element: BaseEl,\n Constructor: T,\n): InstanceType<T> | null {\n if (!element || !element.__base__ || !element.__base__.has(Constructor.config.name)) {\n return null;\n }\n\n return element.__base__.get(Constructor.config.name) as InstanceType<T>;\n}\n"],
4
+ "sourcesContent": ["import type { BaseConstructor, BaseEl } from '../Base/Base.js';\n\n/**\n * Get a component instance from a DOM element.\n * @link https://js-toolkit.studiometa.dev/api/helpers/getInstanceFromElement.html\n */\nexport function getInstanceFromElement<T extends BaseConstructor>(\n element: BaseEl,\n Constructor: T,\n): InstanceType<T> | null {\n if (!element || !element.__base__ || !element.__base__.has(Constructor.config.name)) {\n return null;\n }\n\n return element.__base__.get(Constructor.config.name) as InstanceType<T>;\n}\n"],
5
5
  "mappings": "AAMO,SAAS,uBACd,SACA,aACwB;AACxB,MAAI,CAAC,WAAW,CAAC,QAAQ,YAAY,CAAC,QAAQ,SAAS,IAAI,YAAY,OAAO,IAAI,GAAG;AACnF,WAAO;AAAA,EACT;AAEA,SAAO,QAAQ,SAAS,IAAI,YAAY,OAAO,IAAI;AACrD;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { Base, BaseConstructor } from '../Base/index.js';
1
+ import type { Base, BaseConstructor } from '../Base/Base.js';
2
2
  /**
3
3
  * Import a component on an interaction.
4
4
  *
@@ -1,5 +1,6 @@
1
+ import { getComponentResolver } from "../utils/getComponentResolver.js";
2
+ import { isString } from "../utils/is.js";
1
3
  import { getTargetElements } from "./utils.js";
2
- import { isString, getComponentResolver } from "../utils/index.js";
3
4
  function importOnInteraction(fn, nameOrSelectorOrElement, events, parent) {
4
5
  const normalizedEvents = isString(events) ? [events] : events;
5
6
  const resolver = getComponentResolver(fn);