vevet 1.4.27 → 2.0.1-dev.3

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 (360) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +7 -71
  3. package/build/cdn/index.js +12 -0
  4. package/build/cdn/index.js.LICENSE.txt +14 -0
  5. package/build/cjs/app/Application.js +297 -0
  6. package/build/cjs/app/events/PageLoad.js +74 -0
  7. package/build/cjs/app/events/Viewport.js +303 -0
  8. package/build/cjs/base/Callbacks.js +232 -0
  9. package/build/cjs/base/Component.js +56 -0
  10. package/build/cjs/base/Module.js +262 -0
  11. package/build/cjs/base/MutableProp.js +165 -0
  12. package/build/cjs/base/Plugin.js +56 -0
  13. package/build/cjs/components/animation-frame/AnimationFrame.js +183 -0
  14. package/build/cjs/components/canvas/Ctx2D.js +200 -0
  15. package/build/cjs/components/canvas/Ctx2DPrerender.js +72 -0
  16. package/build/cjs/components/cursor/CustomCursor.js +344 -0
  17. package/build/cjs/components/dragger/Dragger.js +229 -0
  18. package/build/cjs/components/dragger/DraggerDirection.js +77 -0
  19. package/build/cjs/components/dragger/DraggerMove.js +84 -0
  20. package/build/cjs/components/loading/Preloader.js +229 -0
  21. package/build/cjs/components/loading/ProgressPreloader.js +377 -0
  22. package/build/cjs/components/page/Page.js +353 -0
  23. package/build/cjs/components/scroll/custom-scroll/CustomScroll.js +517 -0
  24. package/build/cjs/components/scroll/plugins/SmoothScrollDragPlugin.js +178 -0
  25. package/build/cjs/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +138 -0
  26. package/build/cjs/components/scroll/scrollable/ScrollEventsBase.js +133 -0
  27. package/build/cjs/components/scroll/scrollable/ScrollView.js +315 -0
  28. package/build/cjs/components/scroll/scrollbar/Bar.js +315 -0
  29. package/build/cjs/components/scroll/scrollbar/ScrollBar.js +206 -0
  30. package/build/cjs/components/scroll/smooth-scroll/SmoothScroll.js +625 -0
  31. package/build/cjs/components/scroll/types.js +2 -0
  32. package/build/cjs/components/split-text/SplitText.js +233 -0
  33. package/build/cjs/components/text/SplitText.js +329 -0
  34. package/build/cjs/components/timeline/StaticTimeline.js +137 -0
  35. package/build/cjs/components/timeline/Timeline.js +190 -0
  36. package/build/cjs/index.js +87 -0
  37. package/build/cjs/utils/common/index.js +12 -0
  38. package/build/cjs/utils/common/mergeWithoutArrays.js +19 -0
  39. package/build/cjs/utils/common/randID.js +11 -0
  40. package/build/cjs/utils/common/timeoutCallback.js +17 -0
  41. package/build/cjs/utils/errors.js +8 -0
  42. package/build/cjs/utils/listeners/index.js +10 -0
  43. package/build/cjs/utils/listeners/intersectionObserverSupported.js +11 -0
  44. package/build/cjs/utils/listeners/onScroll.js +47 -0
  45. package/build/cjs/utils/math/boundVal.js +16 -0
  46. package/build/cjs/utils/math/index.js +12 -0
  47. package/build/cjs/utils/math/lerp.js +15 -0
  48. package/build/cjs/utils/math/scopeProgress.js +25 -0
  49. package/build/cjs/utils/types/general.js +2 -0
  50. package/build/cjs/utils/types/utility.js +2 -0
  51. package/build/es/app/Application.js +210 -0
  52. package/build/es/app/events/PageLoad.js +47 -0
  53. package/build/es/app/events/Viewport.js +232 -0
  54. package/build/es/base/Callbacks.js +205 -0
  55. package/build/es/base/Component.js +32 -0
  56. package/build/es/base/Module.js +225 -0
  57. package/build/es/base/MutableProp.js +152 -0
  58. package/build/es/base/Plugin.js +31 -0
  59. package/build/es/components/animation-frame/AnimationFrame.js +145 -0
  60. package/build/es/components/canvas/Ctx2D.js +133 -0
  61. package/build/es/components/canvas/Ctx2DPrerender.js +37 -0
  62. package/build/es/components/cursor/CustomCursor.js +274 -0
  63. package/build/es/components/dragger/Dragger.js +175 -0
  64. package/build/es/components/dragger/DraggerDirection.js +42 -0
  65. package/build/es/components/dragger/DraggerMove.js +56 -0
  66. package/build/es/components/loading/Preloader.js +164 -0
  67. package/build/es/components/loading/ProgressPreloader.js +304 -0
  68. package/build/es/components/page/Page.js +283 -0
  69. package/build/es/components/scroll/custom-scroll/CustomScroll.js +486 -0
  70. package/build/es/components/scroll/plugins/SmoothScrollDragPlugin.js +140 -0
  71. package/build/es/components/scroll/plugins/SmoothScrollKeyboardPlugin.js +109 -0
  72. package/build/es/components/scroll/scrollable/ScrollEventsBase.js +79 -0
  73. package/build/es/components/scroll/scrollable/ScrollView.js +264 -0
  74. package/build/es/components/scroll/scrollbar/Bar.js +262 -0
  75. package/build/es/components/scroll/scrollbar/ScrollBar.js +152 -0
  76. package/build/es/components/scroll/smooth-scroll/SmoothScroll.js +519 -0
  77. package/build/es/components/scroll/types.js +1 -0
  78. package/build/es/components/split-text/SplitText.js +199 -0
  79. package/build/es/components/text/SplitText.js +270 -0
  80. package/build/es/components/timeline/StaticTimeline.js +92 -0
  81. package/build/es/components/timeline/Timeline.js +141 -0
  82. package/build/es/index.js +37 -0
  83. package/build/es/utils/common/index.js +4 -0
  84. package/build/es/utils/common/mergeWithoutArrays.js +13 -0
  85. package/build/es/utils/common/randID.js +7 -0
  86. package/build/es/utils/common/timeoutCallback.js +14 -0
  87. package/build/es/utils/errors.js +5 -0
  88. package/build/es/utils/listeners/index.js +3 -0
  89. package/build/es/utils/listeners/intersectionObserverSupported.js +8 -0
  90. package/build/es/utils/listeners/onScroll.js +44 -0
  91. package/build/es/utils/math/boundVal.js +12 -0
  92. package/build/es/utils/math/index.js +4 -0
  93. package/build/es/utils/math/lerp.js +11 -0
  94. package/build/es/utils/math/scopeProgress.js +22 -0
  95. package/build/es/utils/types/general.js +1 -0
  96. package/build/es/utils/types/utility.js +1 -0
  97. package/build/types/app/Application.d.ts +161 -0
  98. package/build/types/app/Application.d.ts.map +1 -0
  99. package/build/types/app/events/PageLoad.d.ts +28 -0
  100. package/build/types/app/events/PageLoad.d.ts.map +1 -0
  101. package/build/types/app/events/Viewport.d.ts +137 -0
  102. package/build/types/app/events/Viewport.d.ts.map +1 -0
  103. package/build/types/base/Callbacks.d.ts +174 -0
  104. package/build/types/base/Callbacks.d.ts.map +1 -0
  105. package/build/types/base/Component.d.ts +48 -0
  106. package/build/types/base/Component.d.ts.map +1 -0
  107. package/build/types/base/Module.d.ts +179 -0
  108. package/build/types/base/Module.d.ts.map +1 -0
  109. package/build/types/base/MutableProp.d.ts +142 -0
  110. package/build/types/base/MutableProp.d.ts.map +1 -0
  111. package/build/types/base/Plugin.d.ts +35 -0
  112. package/build/types/base/Plugin.d.ts.map +1 -0
  113. package/build/types/components/animation-frame/AnimationFrame.d.ts +96 -0
  114. package/build/types/components/animation-frame/AnimationFrame.d.ts.map +1 -0
  115. package/build/types/components/canvas/Ctx2D.d.ts +111 -0
  116. package/build/types/components/canvas/Ctx2D.d.ts.map +1 -0
  117. package/build/types/components/canvas/Ctx2DPrerender.d.ts +41 -0
  118. package/build/types/components/canvas/Ctx2DPrerender.d.ts.map +1 -0
  119. package/build/types/components/cursor/CustomCursor.d.ts +181 -0
  120. package/build/types/components/cursor/CustomCursor.d.ts.map +1 -0
  121. package/build/types/components/dragger/Dragger.d.ts +120 -0
  122. package/build/types/components/dragger/Dragger.d.ts.map +1 -0
  123. package/build/types/components/dragger/DraggerDirection.d.ts +39 -0
  124. package/build/types/components/dragger/DraggerDirection.d.ts.map +1 -0
  125. package/build/types/components/dragger/DraggerMove.d.ts +49 -0
  126. package/build/types/components/dragger/DraggerMove.d.ts.map +1 -0
  127. package/build/types/components/loading/Preloader.d.ts +107 -0
  128. package/build/types/components/loading/Preloader.d.ts.map +1 -0
  129. package/build/types/components/loading/ProgressPreloader.d.ts +166 -0
  130. package/build/types/components/loading/ProgressPreloader.d.ts.map +1 -0
  131. package/build/types/components/page/Page.d.ts +126 -0
  132. package/build/types/components/page/Page.d.ts.map +1 -0
  133. package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts +322 -0
  134. package/build/types/components/scroll/custom-scroll/CustomScroll.d.ts.map +1 -0
  135. package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts +97 -0
  136. package/build/types/components/scroll/plugins/SmoothScrollDragPlugin.d.ts.map +1 -0
  137. package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts +34 -0
  138. package/build/types/components/scroll/plugins/SmoothScrollKeyboardPlugin.d.ts.map +1 -0
  139. package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts +60 -0
  140. package/build/types/components/scroll/scrollable/ScrollEventsBase.d.ts.map +1 -0
  141. package/build/types/components/scroll/scrollable/ScrollView.d.ts +140 -0
  142. package/build/types/components/scroll/scrollable/ScrollView.d.ts.map +1 -0
  143. package/build/types/components/scroll/scrollbar/Bar.d.ts +84 -0
  144. package/build/types/components/scroll/scrollbar/Bar.d.ts.map +1 -0
  145. package/build/types/components/scroll/scrollbar/ScrollBar.d.ts +109 -0
  146. package/build/types/components/scroll/scrollbar/ScrollBar.d.ts.map +1 -0
  147. package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts +307 -0
  148. package/build/types/components/scroll/smooth-scroll/SmoothScroll.d.ts.map +1 -0
  149. package/build/types/components/scroll/types.d.ts +11 -0
  150. package/build/types/components/scroll/types.d.ts.map +1 -0
  151. package/build/types/components/split-text/SplitText.d.ts +118 -0
  152. package/build/types/components/split-text/SplitText.d.ts.map +1 -0
  153. package/build/types/components/text/SplitText.d.ts +118 -0
  154. package/build/types/components/text/SplitText.d.ts.map +1 -0
  155. package/build/types/components/timeline/StaticTimeline.d.ts +92 -0
  156. package/build/types/components/timeline/StaticTimeline.d.ts.map +1 -0
  157. package/build/types/components/timeline/Timeline.d.ts +101 -0
  158. package/build/types/components/timeline/Timeline.d.ts.map +1 -0
  159. package/build/types/index.d.ts +38 -0
  160. package/build/types/index.d.ts.map +1 -0
  161. package/build/types/utils/common/index.d.ts +5 -0
  162. package/build/types/utils/common/index.d.ts.map +1 -0
  163. package/build/types/utils/common/mergeWithoutArrays.d.ts +6 -0
  164. package/build/types/utils/common/mergeWithoutArrays.d.ts.map +1 -0
  165. package/build/types/utils/common/randID.d.ts +5 -0
  166. package/build/types/utils/common/randID.d.ts.map +1 -0
  167. package/build/types/utils/common/timeoutCallback.d.ts +6 -0
  168. package/build/types/utils/common/timeoutCallback.d.ts.map +1 -0
  169. package/build/types/utils/errors.d.ts +3 -0
  170. package/build/types/utils/errors.d.ts.map +1 -0
  171. package/build/types/utils/listeners/index.d.ts +4 -0
  172. package/build/types/utils/listeners/index.d.ts.map +1 -0
  173. package/build/types/utils/listeners/intersectionObserverSupported.d.ts +2 -0
  174. package/build/types/utils/listeners/intersectionObserverSupported.d.ts.map +1 -0
  175. package/build/types/utils/listeners/onScroll.d.ts +10 -0
  176. package/build/types/utils/listeners/onScroll.d.ts.map +1 -0
  177. package/build/types/utils/math/boundVal.d.ts +5 -0
  178. package/build/types/utils/math/boundVal.d.ts.map +1 -0
  179. package/build/types/utils/math/index.d.ts +5 -0
  180. package/build/types/utils/math/index.d.ts.map +1 -0
  181. package/build/types/utils/math/lerp.d.ts +5 -0
  182. package/build/types/utils/math/lerp.d.ts.map +1 -0
  183. package/build/types/utils/math/scopeProgress.d.ts +20 -0
  184. package/build/types/utils/math/scopeProgress.d.ts.map +1 -0
  185. package/build/types/utils/types/general.d.ts +7 -0
  186. package/build/types/utils/types/general.d.ts.map +1 -0
  187. package/build/types/utils/types/utility.d.ts +14 -0
  188. package/build/types/utils/types/utility.d.ts.map +1 -0
  189. package/package.json +88 -82
  190. package/src/cdn/index.js +3 -0
  191. package/src/sass/base.scss +3 -0
  192. package/src/sass/components/cursor/_custom-cursor.scss +63 -0
  193. package/src/sass/components/index.scss +6 -0
  194. package/src/sass/components/loading/_preloader.scss +15 -0
  195. package/src/sass/components/scroll/_scrollbar.scss +73 -0
  196. package/src/sass/components/scroll/_smooth-scroll.scss +17 -0
  197. package/src/sass/index.scss +3 -0
  198. package/src/sass/mixins/_scroll.scss +7 -0
  199. package/{dist/scss → src/sass}/mixins/_transition.scss +8 -4
  200. package/src/sass/mixins/_viewport.scss +69 -0
  201. package/src/sass/mixins/index.scss +3 -0
  202. package/src/ts/app/Application.ts +350 -0
  203. package/src/ts/app/events/PageLoad.ts +79 -0
  204. package/src/ts/app/events/Viewport.ts +365 -0
  205. package/src/ts/base/Callbacks.ts +380 -0
  206. package/src/ts/base/Component.ts +83 -0
  207. package/src/ts/base/Module.ts +385 -0
  208. package/src/ts/base/MutableProp.ts +242 -0
  209. package/src/ts/base/Plugin.ts +76 -0
  210. package/src/ts/components/animation-frame/AnimationFrame.ts +264 -0
  211. package/src/ts/components/canvas/Ctx2D.ts +260 -0
  212. package/src/ts/components/canvas/Ctx2DPrerender.ts +96 -0
  213. package/src/ts/components/cursor/CustomCursor.ts +462 -0
  214. package/src/ts/components/dragger/Dragger.ts +313 -0
  215. package/src/ts/components/dragger/DraggerDirection.ts +106 -0
  216. package/src/ts/components/dragger/DraggerMove.ts +114 -0
  217. package/src/ts/components/loading/Preloader.ts +279 -0
  218. package/src/ts/components/loading/ProgressPreloader.ts +484 -0
  219. package/src/ts/components/page/Page.ts +421 -0
  220. package/src/ts/components/scroll/plugins/SmoothScrollDragPlugin.ts +251 -0
  221. package/src/ts/components/scroll/plugins/SmoothScrollKeyboardPlugin.ts +166 -0
  222. package/src/ts/components/scroll/scrollable/ScrollEventsBase.ts +151 -0
  223. package/src/ts/components/scroll/scrollable/ScrollView.ts +435 -0
  224. package/src/ts/components/scroll/scrollbar/Bar.ts +364 -0
  225. package/src/ts/components/scroll/scrollbar/ScrollBar.ts +292 -0
  226. package/src/ts/components/scroll/smooth-scroll/SmoothScroll.ts +861 -0
  227. package/src/ts/components/scroll/types.ts +10 -0
  228. package/src/ts/components/text/SplitText.ts +418 -0
  229. package/src/ts/components/timeline/StaticTimeline.ts +197 -0
  230. package/src/ts/components/timeline/Timeline.ts +256 -0
  231. package/src/ts/index.ts +94 -0
  232. package/src/ts/utils/common/index.ts +9 -0
  233. package/src/ts/utils/common/mergeWithoutArrays.ts +20 -0
  234. package/src/ts/utils/common/randID.ts +9 -0
  235. package/src/ts/utils/common/timeoutCallback.ts +16 -0
  236. package/src/ts/utils/errors.ts +6 -0
  237. package/src/ts/utils/listeners/index.ts +7 -0
  238. package/src/ts/utils/listeners/intersectionObserverSupported.ts +10 -0
  239. package/src/ts/utils/listeners/onScroll.ts +56 -0
  240. package/src/ts/utils/math/boundVal.ts +15 -0
  241. package/src/ts/utils/math/index.ts +9 -0
  242. package/src/ts/utils/math/lerp.ts +16 -0
  243. package/src/ts/utils/math/scopeProgress.ts +23 -0
  244. package/src/ts/utils/types/general.ts +7 -0
  245. package/src/ts/utils/types/utility.ts +34 -0
  246. package/dist/js/AJAXEvent.js +0 -355
  247. package/dist/js/Application.js +0 -345
  248. package/dist/js/ColumnsModule.js +0 -392
  249. package/dist/js/CursorModule.js +0 -390
  250. package/dist/js/DraggerModule.js +0 -792
  251. package/dist/js/Event.js +0 -538
  252. package/dist/js/FilterModule.js +0 -943
  253. package/dist/js/FormModule.js +0 -706
  254. package/dist/js/FrameModule.js +0 -229
  255. package/dist/js/IntervalModule.js +0 -270
  256. package/dist/js/KeydownModule.js +0 -293
  257. package/dist/js/LoadEvent.js +0 -106
  258. package/dist/js/MenuBaseModule.js +0 -292
  259. package/dist/js/MenuModule.js +0 -265
  260. package/dist/js/MenuTimelineModule.js +0 -321
  261. package/dist/js/Module.js +0 -478
  262. package/dist/js/PageAjaxModule.js +0 -1010
  263. package/dist/js/PageLoadMediaPlugin.js +0 -285
  264. package/dist/js/PageModule.js +0 -440
  265. package/dist/js/PaginationModule.js +0 -961
  266. package/dist/js/PaginationScrollPlugin.js +0 -209
  267. package/dist/js/Plugin.js +0 -114
  268. package/dist/js/PopupModule.js +0 -942
  269. package/dist/js/PreloaderModule.js +0 -724
  270. package/dist/js/ResponsiveProp.js +0 -301
  271. package/dist/js/ScrollAnchorModule.js +0 -554
  272. package/dist/js/ScrollAnimateModule.js +0 -419
  273. package/dist/js/ScrollBarPlugin.js +0 -594
  274. package/dist/js/ScrollDragPlugin.js +0 -396
  275. package/dist/js/ScrollModule.js +0 -1071
  276. package/dist/js/ScrollViewModule.js +0 -388
  277. package/dist/js/SelectModule.js +0 -860
  278. package/dist/js/SliderCanvasModule.js +0 -733
  279. package/dist/js/SliderControlsPlugin.js +0 -247
  280. package/dist/js/SliderCounterPlugin.js +0 -278
  281. package/dist/js/SliderDotsPlugin.js +0 -270
  282. package/dist/js/SliderDragSwipePlugin.js +0 -245
  283. package/dist/js/SliderIntervalPlugin.js +0 -192
  284. package/dist/js/SliderKeydownPlugin.js +0 -185
  285. package/dist/js/SliderModule.js +0 -1062
  286. package/dist/js/SliderWheelPlugin.js +0 -194
  287. package/dist/js/TextAnimateModule.js +0 -663
  288. package/dist/js/TextSplitModule.js +0 -785
  289. package/dist/js/TimelineBaseModule.js +0 -405
  290. package/dist/js/TimelineModule.js +0 -494
  291. package/dist/js/URLEvent.js +0 -239
  292. package/dist/js/ViewportEvent.js +0 -465
  293. package/dist/js/WheelEventModule.js +0 -295
  294. package/dist/js/domChildOf.js +0 -46
  295. package/dist/js/domChildren.js +0 -47
  296. package/dist/js/domInsertAfter.js +0 -32
  297. package/dist/js/domRemoveChildren.js +0 -26
  298. package/dist/js/easing.js +0 -363
  299. package/dist/js/eventListenerAdd.js +0 -87
  300. package/dist/js/eventListenerGet.js +0 -49
  301. package/dist/js/eventListenerRemove.js +0 -36
  302. package/dist/js/generateId.js +0 -29
  303. package/dist/js/getBrowserName.js +0 -60
  304. package/dist/js/getOsName.js +0 -39
  305. package/dist/js/getVevetProperties.js +0 -22
  306. package/dist/js/index.js +0 -519
  307. package/dist/js/mathScopeProgress.js +0 -32
  308. package/dist/js/mathSpreadScopeProgress.js +0 -35
  309. package/dist/js/merge.js +0 -33
  310. package/dist/js/normalizeWheel.js +0 -97
  311. package/dist/js/text_animate_module_addons/_composite_elementary.js +0 -196
  312. package/dist/js/text_animate_module_addons/_elementary.js +0 -88
  313. package/dist/js/timeoutCallback.js +0 -26
  314. package/dist/js/vevet.js +0 -10
  315. package/dist/scss/_prefix.scss +0 -1
  316. package/dist/scss/classes/_clear.scss +0 -5
  317. package/dist/scss/classes/_col-row.scss +0 -48
  318. package/dist/scss/classes/_display.scss +0 -65
  319. package/dist/scss/classes/_document-reset.scss +0 -28
  320. package/dist/scss/classes/_document.scss +0 -7
  321. package/dist/scss/classes/_overflow.scss +0 -39
  322. package/dist/scss/classes/_position.scss +0 -55
  323. package/dist/scss/classes/_text.scss +0 -24
  324. package/dist/scss/classes/_transition.scss +0 -22
  325. package/dist/scss/classes/_wrap.scss +0 -31
  326. package/dist/scss/classes/index.scss +0 -14
  327. package/dist/scss/index.scss +0 -3
  328. package/dist/scss/mixins/_clear.scss +0 -6
  329. package/dist/scss/mixins/_display.scss +0 -6
  330. package/dist/scss/mixins/_form.scss +0 -14
  331. package/dist/scss/mixins/_position.scss +0 -42
  332. package/dist/scss/mixins/_reset.scss +0 -17
  333. package/dist/scss/mixins/_responsive.scss +0 -88
  334. package/dist/scss/mixins/index.scss +0 -7
  335. package/dist/scss/modules/columns/_settings.scss +0 -1
  336. package/dist/scss/modules/columns/index.scss +0 -19
  337. package/dist/scss/modules/cursor/_settings.scss +0 -7
  338. package/dist/scss/modules/cursor/index.scss +0 -15
  339. package/dist/scss/modules/form/_settings.scss +0 -15
  340. package/dist/scss/modules/form/index.scss +0 -57
  341. package/dist/scss/modules/index.scss +0 -11
  342. package/dist/scss/modules/menu/_button.scss +0 -58
  343. package/dist/scss/modules/menu/_menu.scss +0 -25
  344. package/dist/scss/modules/menu/_settings.scss +0 -23
  345. package/dist/scss/modules/menu/index.scss +0 -3
  346. package/dist/scss/modules/pagination/_settings.scss +0 -6
  347. package/dist/scss/modules/pagination/index.scss +0 -24
  348. package/dist/scss/modules/popup/_settings.scss +0 -26
  349. package/dist/scss/modules/popup/index.scss +0 -294
  350. package/dist/scss/modules/preloader/_settings.scss +0 -3
  351. package/dist/scss/modules/preloader/index.scss +0 -19
  352. package/dist/scss/modules/scroll/_settings.scss +0 -22
  353. package/dist/scss/modules/scroll/index.scss +0 -94
  354. package/dist/scss/modules/select/_settings.scss +0 -28
  355. package/dist/scss/modules/select/index.scss +0 -142
  356. package/dist/scss/modules/slider/_settings.scss +0 -35
  357. package/dist/scss/modules/slider/index.scss +0 -153
  358. package/dist/scss/modules/text/_settings.scss +0 -1
  359. package/dist/scss/modules/text/index.scss +0 -19
  360. package/dist/types/types.d.ts +0 -18763
@@ -1,792 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _Module2 = _interopRequireDefault(require("./Module"));
11
-
12
- var _merge = _interopRequireDefault(require("./merge"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
-
18
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
19
-
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
21
-
22
- function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
23
-
24
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
25
-
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
-
28
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
-
30
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
31
-
32
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
33
-
34
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
35
-
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
-
38
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
39
-
40
- var selectEl = require('select-el');
41
- /**
42
- * @classdesc Dragging/Swiping. <br>
43
- * Available targets:
44
- * <ul>
45
- * <li>start - argument {@linkcode Vevet.DraggerModule.Callback}<li>
46
- * <li>end - argument {@linkcode Vevet.DraggerModule.Callback}</li>
47
- * <li>move - argument {@linkcode Vevet.DraggerModule.Callback}</li>
48
- * <li>up</li>
49
- * <li>down</li>
50
- * <li>left</li>
51
- * <li>right</li>
52
- * </ul>
53
- * <br><br> <b>import {DraggerModule} from 'vevet';</b>
54
- *
55
- * @vevetModuleCallback { Vevet.DraggerModule : start : Vevet.DraggerModule.Callback }
56
- * @vevetModuleCallback { Vevet.DraggerModule : end : Vevet.DraggerModule.Callback }
57
- * @vevetModuleCallback { Vevet.DraggerModule : move : Vevet.DraggerModule.Callback }
58
- * @vevetModuleCallback { Vevet.DraggerModule : up : }
59
- * @vevetModuleCallback { Vevet.DraggerModule : down : }
60
- * @vevetModuleCallback { Vevet.DraggerModule : left : }
61
- * @vevetModuleCallback { Vevet.DraggerModule : right : }
62
- *
63
- * @class
64
- * @memberof Vevet
65
- * @augments Vevet.Module
66
- */
67
-
68
-
69
- var DraggerModule = /*#__PURE__*/function (_Module) {
70
- _inherits(DraggerModule, _Module);
71
-
72
- var _super = _createSuper(DraggerModule);
73
-
74
- /**
75
- * @memberof Vevet.DraggerModule
76
- * @typedef {object} ThresholdPropagation
77
- *
78
- * @property { 'x' | 'y' } dir
79
- * @property { number } value
80
- */
81
-
82
- /**
83
- * @memberof Vevet.DraggerModule
84
- * @typedef {object} Properties
85
- * @augments Vevet.Module.Properties
86
- *
87
- * @property {boolean} [on=true] - If the module is enabled.
88
- * @property {string|HTMLElement|Window} outer - *** Selector of the element or the element itself.
89
- * @property {number} [min=100] - Minimum length of movement in pixels to launch events under the targets "up", "down, "left", "right".
90
- * @property {boolean} [momentum=false] - If momentum drag/swipe is enabled.
91
- * @property {number} [momentumStopThreshold=0.01] - When the momentum stops.
92
- * @property {number} [friction=.95] - Momentum deceleration friction.
93
- * @property { Vevet.DraggerModule.ThresholdPropagation | false } [thresholdPropagation=false] - Stop propagation if a definite length of movement in pixels was reached.
94
- * @property { boolean } [preventDefault=false] - Prevent default action on all events
95
- * @property { boolean } [stopPropagation=false] - Stop event propagation action on all events
96
- */
97
-
98
- /**
99
- * @alias Vevet.DraggerModule
100
- *
101
- * @param {Vevet.DraggerModule.Properties} [data]
102
- */
103
- function DraggerModule(data) {
104
- _classCallCheck(this, DraggerModule);
105
-
106
- return _super.call(this, data);
107
- }
108
- /**
109
- * @readonly
110
- * @type {Vevet.DraggerModule.Properties}
111
- */
112
-
113
-
114
- _createClass(DraggerModule, [{
115
- key: "defaultProp",
116
- get: function get() {
117
- return (0, _merge.default)(_get(_getPrototypeOf(DraggerModule.prototype), "defaultProp", this), {
118
- on: true,
119
- outer: '',
120
- min: 100,
121
- momentum: false,
122
- momentumStopThreshold: .01,
123
- friction: .95,
124
- thresholdPropagation: false,
125
- preventDefault: false,
126
- stopPropagation: false
127
- });
128
- }
129
- /**
130
- * @member Vevet.DraggerModule#prop
131
- * @memberof Vevet.DraggerModule
132
- * @readonly
133
- * @type {Vevet.DraggerModule.Properties}
134
- */
135
-
136
- /**
137
- * @member Vevet.DraggerModule#_prop
138
- * @memberof Vevet.DraggerModule
139
- * @protected
140
- * @type {Vevet.DraggerModule.Properties}
141
- */
142
-
143
- /**
144
- * @function Vevet.DraggerModule#changeProp
145
- * @memberof Vevet.DraggerModule
146
- * @param {Vevet.DraggerModule.Properties} [prop]
147
- */
148
-
149
- /**
150
- * @memberof Vevet.DraggerModule
151
- * @typedef {object} Coords
152
- * @property {number} x
153
- * @property {number} y
154
- */
155
- // Extra Constructor
156
-
157
- }, {
158
- key: "_extra",
159
- value: function _extra() {
160
- _get(_getPrototypeOf(DraggerModule.prototype), "_extra", this).call(this);
161
- /**
162
- * @description Start coordinates. They can change when using "thresholdPropagation".
163
- * @protected
164
- * @member {Vevet.DraggerModule.Coords}
165
- */
166
-
167
-
168
- this._start = {
169
- x: 0,
170
- y: 0
171
- };
172
- /**
173
- * @description Global coordinates / relative to the window.
174
- * @protected
175
- * @member {Vevet.DraggerModule.Coords}
176
- */
177
-
178
- this._global = {
179
- x: 0,
180
- y: 0
181
- };
182
- /**
183
- * @description Previous global coordinates.
184
- * @protected
185
- * @member {Vevet.DraggerModule.Coords}
186
- */
187
-
188
- this._prev = {
189
- x: 0,
190
- y: 0
191
- };
192
- /**
193
- * @description Difference between the previous and current values since the drag/swipe was started.
194
- * @protected
195
- * @member {Vevet.DraggerModule.Coords}
196
- */
197
-
198
- this._diff = {
199
- x: 0,
200
- y: 0
201
- };
202
- /**
203
- * @description If dragging at the moment
204
- * @protected
205
- * @member {boolean}
206
- */
207
-
208
- this._dragging = false;
209
- /**
210
- * @description If preventDefault and stopPropagation must be applied.
211
- * @protected
212
- * @member {boolean}
213
- */
214
-
215
- this._prevent = false;
216
- /**
217
- * @description If momentum is in process.
218
- * @protected
219
- * @member {boolean}
220
- */
221
-
222
- this._decelerating = false;
223
- /**
224
- * @description Deceleration target values.
225
- * @protected
226
- * @member {Vevet.DraggerModule.Coords}
227
- */
228
-
229
- this._deceleration = {
230
- x: 0,
231
- y: 0
232
- };
233
- /**
234
- * @description Pointer ID.
235
- * @protected
236
- * @member { any }
237
- */
238
-
239
- this._pointerID = false;
240
- /**
241
- * @description Tracking points. They are used to calculate the momentum strength.
242
- * @type { Array<Vevet.DraggerModule.TrackingPoint> }
243
- * @protected
244
- */
245
-
246
- this._trackingPoints = [];
247
- /**
248
- * @description Additional event listeners.
249
- * @protected
250
- * @member { Array<Vevet.BindListener> }
251
- */
252
-
253
- this._runningListeners = []; // get elements
254
-
255
- this._getElements();
256
- }
257
- /**
258
- * @description Get elements
259
- * @protected
260
- */
261
-
262
- }, {
263
- key: "_getElements",
264
- value: function _getElements() {
265
- /**
266
- * @description Outer element.
267
- * @protected
268
- * @member {HTMLElement}
269
- */
270
- this._outer = selectEl.one(this._prop.outer);
271
- } // Remove event listeners when properties are changed
272
-
273
- }, {
274
- key: "_changeProp",
275
- value: function _changeProp() {
276
- // remove events
277
- this.removeEventListeners(); // update elements
278
-
279
- this._getElements(); // set events
280
-
281
-
282
- this._setEvents();
283
- }
284
- /**
285
- * @description Set events.
286
- * @protected
287
- */
288
-
289
- }, {
290
- key: "_setEvents",
291
- value: function _setEvents() {
292
- if (this._prop.on) {
293
- this._setStartEvents();
294
- }
295
- }
296
- /**
297
- * @description Set events to start dragging. In {@linkcode Vevet.DraggerModule} is is empty.
298
- * @protected
299
- */
300
-
301
- }, {
302
- key: "_setStartEvents",
303
- value: function _setStartEvents() {
304
- this.listener(this._outer, "mousedown", this._onStart.bind(this));
305
- this.listener(this._outer, "touchstart", this._onStart.bind(this));
306
- }
307
- /**
308
- * @description Add running events.
309
- * @protected
310
- */
311
-
312
- }, {
313
- key: "_addRunningEvents",
314
- value: function _addRunningEvents() {
315
- this._removeRunningEvents();
316
-
317
- var listeners = this._runningListeners;
318
- var outer = this._outer;
319
- listeners.push(this.listener(outer, 'touchmove', this._onMove.bind(this), {
320
- passive: false
321
- }));
322
- listeners.push(this.listener(outer, 'touchend', this._onEnd.bind(this), {
323
- passive: false
324
- }));
325
- listeners.push(this.listener(outer, 'touchcancel', this._onStop.bind(this), {
326
- passive: false
327
- }));
328
- listeners.push(this.listener(window, 'mousemove', this._onMove.bind(this), {
329
- passive: false
330
- }));
331
- listeners.push(this.listener(window, 'mouseup', this._onEnd.bind(this), {
332
- passive: false
333
- }));
334
- listeners.push(this.listener(window, 'blur', this._onStop.bind(this), {
335
- passive: false
336
- }));
337
- }
338
- /**
339
- * @description Remove running events.
340
- * @protected
341
- */
342
-
343
- }, {
344
- key: "_removeRunningEvents",
345
- value: function _removeRunningEvents() {
346
- var _this = this;
347
-
348
- this._runningListeners.forEach(function (event) {
349
- _this.removeEventListener({
350
- id: event.id,
351
- el: event.el
352
- });
353
- });
354
-
355
- this._runningListeners = [];
356
- }
357
- /**
358
- * @description When dragging has been started.
359
- * @param { MouseEvent | TouchEvent } e
360
- * @protected
361
- */
362
-
363
- }, {
364
- key: "_onStart",
365
- value: function _onStart(e) {
366
- var event = this._normalizeEvent(e);
367
-
368
- if (this._prop.preventDefault) {
369
- e.preventDefault();
370
- }
371
-
372
- if (this._prop.stopPropagation) {
373
- e.stopPropagation();
374
- }
375
-
376
- if (!this._dragging) {
377
- // prevent actions
378
- if (e.type == 'mousedown') {
379
- if (e.which == 1) {
380
- e.stopPropagation();
381
- } else {
382
- return;
383
- }
384
- } // change dragging vars
385
-
386
-
387
- this._dragging = true;
388
- this._decelerating = false;
389
- this._prevent = false;
390
- this._pointerID = event.id; // reset difference
391
-
392
- this._diff.x = 0;
393
- this._diff.y = 0; // change coordinates
394
-
395
- this._global.x = this._prev.x = this._start.x = event.x;
396
- this._global.y = this._prev.y = this._start.y = event.y; // change tracking points
397
-
398
- this._trackingPoints = [];
399
-
400
- this._addTrackingPoint(event.x, event.y); // add additional events
401
-
402
-
403
- this._addRunningEvents(); // call events
404
-
405
-
406
- this._callEvents('start');
407
- }
408
- }
409
- /**
410
- * @description Handles move events
411
- * @param { Event } e
412
- */
413
-
414
- }, {
415
- key: "_onMove",
416
- value: function _onMove(e) {
417
- if (this._prop.preventDefault) {
418
- e.preventDefault();
419
- }
420
-
421
- if (this._prop.stopPropagation) {
422
- e.stopPropagation();
423
- }
424
-
425
- var event = this._normalizeEvent(e);
426
-
427
- if (this._dragging && event.id === this._pointerID) {
428
- // calculate difference between current and previous coordinates
429
- this._diff.x += Math.abs(event.x - this._global.x);
430
- var diffX = this._diff.x;
431
- this._diff.y += Math.abs(event.y - this._global.y);
432
- var diffY = this._diff.y; // change coordinates
433
-
434
- this._global.x = event.x;
435
- this._global.y = event.y; // check if movement is possible
436
- // or prevent the default event and propagation
437
-
438
- var thresholdPropagation = this._prop.thresholdPropagation;
439
-
440
- if (thresholdPropagation) {
441
- var value = thresholdPropagation.value;
442
-
443
- if (thresholdPropagation.dir == 'x' & diffX > value & diffX > diffY || thresholdPropagation.dir == 'y' & diffY > value & diffY > diffX) {
444
- e.stopPropagation();
445
- e.preventDefault();
446
- this._prevent = true; // if (this._prop.stopppp) {
447
- // console.log("stopppp")
448
- // }
449
- } else {
450
- this._start.x = event.x;
451
- this._start.y = event.y;
452
- return;
453
- }
454
- } // add a tracking point
455
-
456
-
457
- this._addTrackingPoint(this._prev.x, this._prev.y); // call events
458
-
459
-
460
- this._callEvents("move");
461
- }
462
- }
463
- /**
464
- * @description Handles end events
465
- * @param { Event } e
466
- */
467
-
468
- }, {
469
- key: "_onEnd",
470
- value: function _onEnd(e) {
471
- if (this._prop.preventDefault) {
472
- e.preventDefault();
473
- }
474
-
475
- if (this._prop.stopPropagation) {
476
- e.stopPropagation();
477
- }
478
-
479
- var event = this._normalizeEvent(e);
480
-
481
- if (this._dragging && event.id === this._pointerID) {
482
- this.stopDrag(false); // start deceleration at the end if enabled
483
-
484
- if (this._prop.momentum) {
485
- this._startDeceleration();
486
- } // if no, call the end events
487
- else {
488
- this._callEvents("end");
489
- }
490
- }
491
- }
492
- /**
493
- * @description Handles end events
494
- */
495
-
496
- }, {
497
- key: "_onStop",
498
- value: function _onStop() {
499
- if (this._dragging) {
500
- this.stopDrag();
501
- }
502
- }
503
- /**
504
- * @description Stop Swipe/Drag.
505
- * @param { boolean } [bool] - Launch end callbacks.
506
- */
507
-
508
- }, {
509
- key: "stopDrag",
510
- value: function stopDrag() {
511
- var bool = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
512
- // change dragging bools
513
- this._dragging = false;
514
- this._decelerating = false;
515
- this._prevent = false; // remove runtime listeners
516
-
517
- this._removeRunningEvents(); // callbacks
518
-
519
-
520
- if (bool) {
521
- this._callEvents("end");
522
- }
523
- }
524
- /**
525
- * @memberof Vevet.DraggerModule
526
- * @typedef {object} NormalizedEvent
527
- * @property { number } x
528
- * @property { number } y
529
- * @property { any } id
530
- */
531
-
532
- /**
533
- * @description Normalize Data from the event.
534
- * @param { Event } e
535
- * @protected
536
- */
537
-
538
- }, {
539
- key: "_normalizeEvent",
540
- value: function _normalizeEvent(e) {
541
- // touch events
542
- if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
543
- var touch = e.targetTouches[0] || e.changedTouches[0];
544
- return {
545
- x: touch.clientX,
546
- y: touch.clientY,
547
- id: touch.identifier
548
- };
549
- } // mouse events
550
-
551
-
552
- return {
553
- x: e.clientX,
554
- y: e.clientY,
555
- id: null
556
- };
557
- }
558
- /**
559
- * @description Records movement for the last 100ms
560
- * @param {number} x
561
- * @param {number} y
562
- * @protected
563
- */
564
-
565
- }, {
566
- key: "_addTrackingPoint",
567
- value: function _addTrackingPoint(x, y) {
568
- var time = Date.now();
569
- var trackingPoints = this._trackingPoints;
570
-
571
- while (trackingPoints.length > 0) {
572
- if (time - trackingPoints[0].time <= 100) {
573
- break;
574
- }
575
-
576
- trackingPoints.shift();
577
- }
578
-
579
- trackingPoints.push({
580
- x: x,
581
- y: y,
582
- time: time
583
- });
584
- this._trackingPoints = trackingPoints;
585
- }
586
- /**
587
- * @memberof Vevet.DraggerModule
588
- * @typedef {object} TrackingPoint
589
- * @property { number } time
590
- * @property { number } x
591
- * @property { number } y
592
- */
593
-
594
- /**
595
- * @description Calculate and start momentum deceleration.
596
- * @protected
597
- */
598
-
599
- }, {
600
- key: "_startDeceleration",
601
- value: function _startDeceleration() {
602
- var trackingPoints = this._trackingPoints;
603
- var firstPoint = trackingPoints[0];
604
- var lastPoint = trackingPoints[trackingPoints.length - 1];
605
- var xOffset = lastPoint.x - firstPoint.x;
606
- var yOffset = lastPoint.y - firstPoint.y;
607
- var timeOffset = lastPoint.time - firstPoint.time;
608
- var D = timeOffset / 35;
609
- var decelerateTarget = this._deceleration;
610
- decelerateTarget.x = xOffset / D || 0;
611
- decelerateTarget.y = yOffset / D || 0;
612
-
613
- if (Math.abs(decelerateTarget.x) > 1 || Math.abs(decelerateTarget.y) > 1) {
614
- this._decelerating = true;
615
- window.requestAnimationFrame(this._decelerationAnim.bind(this));
616
- } else {
617
- this.stopDrag();
618
- }
619
- }
620
- /**
621
- * @description Momentum deceleration animation.
622
- * @protected
623
- */
624
-
625
- }, {
626
- key: "_decelerationAnim",
627
- value: function _decelerationAnim() {
628
- // stop if not decelerating
629
- if (!this._decelerating) {
630
- return;
631
- } // vars
632
-
633
-
634
- var stopThreshold = this._prop.momentumStopThreshold;
635
- var friction = this._prop.friction; // decelerate momentum
636
-
637
- this._deceleration.x *= friction;
638
- var x = this._deceleration.x;
639
- this._deceleration.y *= friction;
640
- var y = this._deceleration.y; // iterate global coordinates
641
-
642
- this._global.x += x;
643
- this._global.y += y; // launch callbacks
644
-
645
- this._callEvents("move"); // continue decelerating
646
-
647
-
648
- if (Math.abs(x) > stopThreshold & Math.abs(y) > stopThreshold) {
649
- window.requestAnimationFrame(this._decelerationAnim.bind(this));
650
- } else {
651
- this.stopDrag();
652
- }
653
- }
654
- /**
655
- * @description Call events.
656
- * @param { 'start' | 'move' | 'end' } target
657
- */
658
-
659
- }, {
660
- key: "_callEvents",
661
- value: function _callEvents(target) {
662
- // get new coordinates
663
- var coords = this._calcCoords(); // if the target is "start", call the start callback
664
-
665
-
666
- if (target == 'start') {
667
- this.lbt("start", coords);
668
- } // if the target is "move", call the move callback
669
- else if (target == 'move') {
670
- this.lbt("move", coords);
671
- } // if another target, call "end" callbacks and the "once-callbacks" if they exist
672
- else {
673
- this.lbt("end", coords);
674
-
675
- this._callOnceEvents(coords);
676
- } // change previous values
677
-
678
-
679
- this._prev.x = this._global.x;
680
- this._prev.y = this._global.y;
681
- }
682
- /**
683
- * @description Call once-events
684
- * @protected
685
- * @param { Vevet.DraggerModule.Coords } coords
686
- */
687
-
688
- }, {
689
- key: "_callOnceEvents",
690
- value: function _callOnceEvents(coords) {
691
- var global = coords.global;
692
- var startX = this._start.x;
693
- var startY = this._start.y;
694
- var min = this._prop.min; // to left / left
695
-
696
- if (startX > global.x) {
697
- if (Math.abs(startX - global.x) > Math.abs(min)) {
698
- this.lbt("left");
699
- }
700
- } // to right / right
701
-
702
-
703
- if (startX < global.x) {
704
- if (Math.abs(startX - global.x) > Math.abs(min)) {
705
- this.lbt("right");
706
- }
707
- } // to top / up
708
-
709
-
710
- if (startY > global.y) {
711
- if (Math.abs(startY - global.y) > Math.abs(min)) {
712
- this.lbt("up");
713
- }
714
- } // to bottom / down
715
-
716
-
717
- if (startY < global.y) {
718
- if (Math.abs(startY - global.y) > Math.abs(min)) {
719
- this.lbt("down");
720
- }
721
- }
722
- }
723
- /**
724
- * @memberof Vevet.DraggerModule
725
- * @typedef {object} Callback
726
- * @property {Vevet.DraggerModule.Coords} global - Coordinates relative to the window.
727
- * @property {Vevet.DraggerModule.Coords} inner - Coordinates relative to the outer.
728
- * @property {Vevet.DraggerModule.Coords} diff - Difference between the start and current coordinates.
729
- * @property {Vevet.DraggerModule.Coords} step - Difference between current and previous values.
730
- */
731
-
732
- /**
733
- * @description Calculate current coordinates.
734
- * @protected
735
- * @returns { Vevet.DraggerModule.Callback }
736
- */
737
-
738
- }, {
739
- key: "_calcCoords",
740
- value: function _calcCoords() {
741
- // get outer
742
- var outer = this._outer; // get global coords
743
-
744
- var global = this._global; // calculate all coordinates
745
-
746
- var bounding = {
747
- top: 0,
748
- left: 0
749
- },
750
- inner = {
751
- x: 0,
752
- y: 0
753
- },
754
- diff = {
755
- x: 0,
756
- y: 0
757
- },
758
- step = {
759
- x: 0,
760
- y: 0
761
- }; // get inner coords
762
- // if the outer is not the window or document, its bounding will be taken into consideration also
763
-
764
- if (outer instanceof Window || outer instanceof Document) {
765
- inner.x = global.x;
766
- inner.y = global.y;
767
- } else {
768
- bounding = outer.getBoundingClientRect();
769
- inner.x = global.x - bounding.left;
770
- inner.y = global.y - bounding.top;
771
- } // get difference coords
772
-
773
-
774
- diff.x = inner.x - (this._start.x - bounding.left);
775
- diff.y = inner.y - (this._start.y - bounding.top); // get step values
776
-
777
- step.x = global.x - this._prev.x;
778
- step.y = global.y - this._prev.y; // create an object with new coordinates
779
-
780
- return {
781
- global: global,
782
- inner: inner,
783
- diff: diff,
784
- step: step
785
- };
786
- }
787
- }]);
788
-
789
- return DraggerModule;
790
- }(_Module2.default);
791
-
792
- exports.default = DraggerModule;