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
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.Plugin = void 0;
19
+ var Module_1 = require("./Module");
20
+ /**
21
+ * A class for Plugins.
22
+ */
23
+ var Plugin = /** @class */ (function (_super) {
24
+ __extends(Plugin, _super);
25
+ function Plugin(initialProp) {
26
+ return _super.call(this, initialProp, false) || this;
27
+ }
28
+ Object.defineProperty(Plugin.prototype, "component", {
29
+ get: function () {
30
+ return this._component;
31
+ },
32
+ enumerable: false,
33
+ configurable: true
34
+ });
35
+ /**
36
+ * Initializes the class
37
+ */
38
+ Plugin.prototype.init = function () {
39
+ if (!this._component) {
40
+ throw new Error('Component is not set. Be sure that initlugin is called before.');
41
+ }
42
+ _super.prototype.init.call(this);
43
+ };
44
+ /**
45
+ * Initialize the plugin
46
+ */
47
+ Plugin.prototype.initPlugin = function (parent) {
48
+ if (this._inited) {
49
+ return;
50
+ }
51
+ this._component = parent;
52
+ this.init();
53
+ };
54
+ return Plugin;
55
+ }(Module_1.Module));
56
+ exports.Plugin = Plugin;
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.AnimationFrame = void 0;
30
+ var Component_1 = require("../../base/Component");
31
+ var math_1 = require("../../utils/math");
32
+ /**
33
+ * Launch an animation frame with a certain FPS
34
+ */
35
+ var AnimationFrame = /** @class */ (function (_super) {
36
+ __extends(AnimationFrame, _super);
37
+ function AnimationFrame(initialProp, init) {
38
+ if (init === void 0) { init = true; }
39
+ var _this = _super.call(this, initialProp, false) || this;
40
+ _this._isPlaying = false;
41
+ _this._frame = null;
42
+ _this._frameIndex = -1;
43
+ _this._timeStamp = null;
44
+ _this._prevFrameTime = null;
45
+ if (init) {
46
+ _this.init();
47
+ }
48
+ return _this;
49
+ }
50
+ Object.defineProperty(AnimationFrame.prototype, "isPlaying", {
51
+ get: function () {
52
+ return this._isPlaying;
53
+ },
54
+ enumerable: false,
55
+ configurable: true
56
+ });
57
+ /**
58
+ * Get default properties
59
+ */
60
+ AnimationFrame.prototype._getDefaultProp = function () {
61
+ return __assign(__assign({}, _super.prototype._getDefaultProp.call(this)), { fps: 140, run: false });
62
+ };
63
+ // Extra constructor
64
+ AnimationFrame.prototype._constructor = function () {
65
+ _super.prototype._constructor.call(this);
66
+ this._create();
67
+ };
68
+ /**
69
+ * Create the frame
70
+ */
71
+ AnimationFrame.prototype._create = function () {
72
+ if (this.prop.run) {
73
+ this.play();
74
+ }
75
+ };
76
+ AnimationFrame.prototype._onPropMutate = function () {
77
+ this._frameIndex = -1;
78
+ this._timeStamp = null;
79
+ this._prevFrameTime = null;
80
+ if (this.prop.run) {
81
+ this._play();
82
+ }
83
+ else {
84
+ this._pause();
85
+ }
86
+ };
87
+ /**
88
+ * Launch the animation frame.
89
+ */
90
+ AnimationFrame.prototype.play = function () {
91
+ if (this.destroyed) {
92
+ return;
93
+ }
94
+ if (this.prop.run) {
95
+ return;
96
+ }
97
+ this.changeProp({
98
+ run: true,
99
+ });
100
+ };
101
+ /**
102
+ * Launch the animation frame.
103
+ */
104
+ AnimationFrame.prototype._play = function () {
105
+ // check if already playing
106
+ if (this.isPlaying) {
107
+ return;
108
+ }
109
+ this._isPlaying = true;
110
+ // launch animation
111
+ this._frame = window.requestAnimationFrame(this._animate.bind(this));
112
+ };
113
+ /**
114
+ * Stop the animation frame
115
+ */
116
+ AnimationFrame.prototype.pause = function () {
117
+ if (!this.prop.run) {
118
+ return;
119
+ }
120
+ this.changeProp({
121
+ run: false,
122
+ });
123
+ };
124
+ /**
125
+ * Stop the animation frame
126
+ */
127
+ AnimationFrame.prototype._pause = function () {
128
+ if (!this.isPlaying) {
129
+ return;
130
+ }
131
+ // cancel animation frame
132
+ if (this._frame) {
133
+ window.cancelAnimationFrame(this._frame);
134
+ this._frame = null;
135
+ }
136
+ // bool
137
+ this._isPlaying = false;
138
+ };
139
+ /**
140
+ * Launch the animation frame.
141
+ */
142
+ AnimationFrame.prototype._animate = function (timestamp) {
143
+ if (!this._isPlaying) {
144
+ return;
145
+ }
146
+ // launch animation
147
+ this._frame = window.requestAnimationFrame(this._animate.bind(this));
148
+ // update variables
149
+ var currentTime = +new Date();
150
+ if (this._timeStamp == null) {
151
+ this._timeStamp = timestamp;
152
+ }
153
+ if (this._prevFrameTime == null) {
154
+ this._prevFrameTime = currentTime;
155
+ }
156
+ // calculate frame index
157
+ var newFrameIndex = Math.floor((timestamp - this._timeStamp) / (1000 / this.prop.fps));
158
+ if (newFrameIndex <= this._frameIndex) {
159
+ return;
160
+ }
161
+ // update frame index
162
+ this._frameIndex = newFrameIndex;
163
+ // calculate real fps
164
+ var timeDiff = currentTime - this._prevFrameTime;
165
+ var realFPS = math_1.boundVal(timeDiff === 0 ? 1000 / 60 : Math.floor(1000 / timeDiff), [1, Infinity]);
166
+ // launch callbacks
167
+ this.callbacks.tbt('frame', {
168
+ fps: this.prop.fps,
169
+ realFPS: realFPS,
170
+ prevFrameDuration: currentTime - this._prevFrameTime,
171
+ });
172
+ this._prevFrameTime = +new Date();
173
+ };
174
+ /**
175
+ * Destroy the animation frame
176
+ */
177
+ AnimationFrame.prototype._destroy = function () {
178
+ this.pause();
179
+ _super.prototype._destroy.call(this);
180
+ };
181
+ return AnimationFrame;
182
+ }(Component_1.Component));
183
+ exports.AnimationFrame = AnimationFrame;
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Ctx2D = void 0;
30
+ var vevet_dom_1 = require("vevet-dom");
31
+ var Component_1 = require("../../base/Component");
32
+ /**
33
+ * Makes working with canvas easier.
34
+ * It creates an HTML5 Canvas element and its 2d context and can
35
+ * implement automatic resize.
36
+ */
37
+ var Ctx2D = /** @class */ (function (_super) {
38
+ __extends(Ctx2D, _super);
39
+ function Ctx2D(initialProp, init) {
40
+ if (init === void 0) { init = true; }
41
+ var _this = _super.call(this, initialProp, false) || this;
42
+ // set default values
43
+ _this._width = 0;
44
+ _this._height = 0;
45
+ _this._dpr = 1;
46
+ // create canvas
47
+ var _a = _this.prop, append = _a.append, container = _a.container;
48
+ var parent = (append && container) ? container : undefined;
49
+ _this._canvas = vevet_dom_1.createElement('canvas', {
50
+ parent: parent,
51
+ });
52
+ _this._ctx = _this._canvas.getContext('2d');
53
+ // and resize it for the first time
54
+ _this.resize();
55
+ // initialize the class
56
+ if (init) {
57
+ _this.init();
58
+ }
59
+ return _this;
60
+ }
61
+ Object.defineProperty(Ctx2D.prototype, "container", {
62
+ /**
63
+ * The parent container of the canvas
64
+ */
65
+ get: function () {
66
+ return this.prop.container;
67
+ },
68
+ enumerable: false,
69
+ configurable: true
70
+ });
71
+ Object.defineProperty(Ctx2D.prototype, "canvas", {
72
+ get: function () {
73
+ return this._canvas;
74
+ },
75
+ enumerable: false,
76
+ configurable: true
77
+ });
78
+ Object.defineProperty(Ctx2D.prototype, "ctx", {
79
+ get: function () {
80
+ return this._ctx;
81
+ },
82
+ enumerable: false,
83
+ configurable: true
84
+ });
85
+ Object.defineProperty(Ctx2D.prototype, "width", {
86
+ get: function () {
87
+ return this._width;
88
+ },
89
+ enumerable: false,
90
+ configurable: true
91
+ });
92
+ Object.defineProperty(Ctx2D.prototype, "nonDPRWidth", {
93
+ /**
94
+ * Canvas width without DPR
95
+ */
96
+ get: function () {
97
+ return this.width / this.dpr;
98
+ },
99
+ enumerable: false,
100
+ configurable: true
101
+ });
102
+ Object.defineProperty(Ctx2D.prototype, "height", {
103
+ get: function () {
104
+ return this._height;
105
+ },
106
+ enumerable: false,
107
+ configurable: true
108
+ });
109
+ Object.defineProperty(Ctx2D.prototype, "nonDPRHeight", {
110
+ /**
111
+ * Canvas height without DPR
112
+ */
113
+ get: function () {
114
+ return this.height / this.dpr;
115
+ },
116
+ enumerable: false,
117
+ configurable: true
118
+ });
119
+ Object.defineProperty(Ctx2D.prototype, "dpr", {
120
+ get: function () {
121
+ return this._dpr;
122
+ },
123
+ enumerable: false,
124
+ configurable: true
125
+ });
126
+ Ctx2D.prototype._getDefaultProp = function () {
127
+ return __assign(__assign({}, _super.prototype._getDefaultProp.call(this)), { container: false, append: true, updateOnResize: false, width: false, height: false, dpr: false });
128
+ };
129
+ // Set Module Events
130
+ Ctx2D.prototype._setEvents = function () {
131
+ var _this = this;
132
+ _super.prototype._setEvents.call(this);
133
+ if (this.prop.updateOnResize !== false) {
134
+ var viewportTarget = typeof this.prop.updateOnResize === 'boolean' ? '' : this.prop.updateOnResize;
135
+ this.addViewportCallback(viewportTarget, function () {
136
+ _this.resize();
137
+ });
138
+ this.resize();
139
+ }
140
+ };
141
+ Ctx2D.prototype._onPropMutate = function () {
142
+ _super.prototype._onPropMutate.call(this);
143
+ this.resize();
144
+ };
145
+ /**
146
+ * Resize the canvas
147
+ */
148
+ Ctx2D.prototype.resize = function () {
149
+ // vars
150
+ var _a = this, prop = _a.prop, canvas = _a.canvas;
151
+ if (!canvas) {
152
+ return;
153
+ }
154
+ var app = this._app;
155
+ var viewport = app.viewport;
156
+ // calculate dpr
157
+ if (typeof prop.dpr === 'number') {
158
+ this._dpr = prop.dpr;
159
+ }
160
+ else {
161
+ this._dpr = viewport.dpr;
162
+ }
163
+ var dpr = this._dpr;
164
+ // calculate new width & height
165
+ var newWidth = 0;
166
+ var newHeight = 0;
167
+ if (typeof prop.width === 'number' && typeof prop.height === 'number') {
168
+ newWidth = prop.width;
169
+ newHeight = prop.height;
170
+ }
171
+ else if (this.container) {
172
+ newWidth = this.container.clientWidth;
173
+ newHeight = this.container.clientHeight;
174
+ }
175
+ else {
176
+ newWidth = viewport.width;
177
+ newHeight = viewport.height;
178
+ }
179
+ newWidth *= dpr;
180
+ newHeight *= dpr;
181
+ // update sizes
182
+ this._width = newWidth;
183
+ this._height = newHeight;
184
+ // apply sizes
185
+ canvas.width = newWidth;
186
+ canvas.height = newHeight;
187
+ this.callbacks.tbt('resize', false);
188
+ };
189
+ /**
190
+ * Destroy the module
191
+ */
192
+ Ctx2D.prototype._destroy = function () {
193
+ _super.prototype._destroy.call(this);
194
+ if (this.canvas) {
195
+ this.canvas.remove();
196
+ }
197
+ };
198
+ return Ctx2D;
199
+ }(Component_1.Component));
200
+ exports.Ctx2D = Ctx2D;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Ctx2DPrerender = void 0;
30
+ var get_image_pos_1 = require("get-image-pos");
31
+ var Ctx2D_1 = require("./Ctx2D");
32
+ /**
33
+ * The class allows you to prerender media for further use with reduced payloads.
34
+ */
35
+ var Ctx2DPrerender = /** @class */ (function (_super) {
36
+ __extends(Ctx2DPrerender, _super);
37
+ function Ctx2DPrerender() {
38
+ return _super !== null && _super.apply(this, arguments) || this;
39
+ }
40
+ Ctx2DPrerender.prototype._getDefaultProp = function () {
41
+ return __assign(__assign({}, _super.prototype._getDefaultProp.call(this)), { media: false, posRule: 'cover' });
42
+ };
43
+ /**
44
+ * Resize the canvas
45
+ */
46
+ Ctx2DPrerender.prototype.resize = function () {
47
+ _super.prototype.resize.call(this);
48
+ this._prerender();
49
+ };
50
+ Ctx2DPrerender.prototype._prerender = function () {
51
+ // check if media exists
52
+ var media = this.prop.media;
53
+ if (!media) {
54
+ return;
55
+ }
56
+ // get media sizes
57
+ var size = get_image_pos_1.getPos({
58
+ source: media,
59
+ rule: this.prop.posRule,
60
+ scale: 1,
61
+ width: this.width,
62
+ height: this.height,
63
+ });
64
+ this._ctx.clearRect(0, 0, this.width, this.height);
65
+ // render the media
66
+ this._ctx.drawImage(media, 0, 0, size.sourceWidth, size.sourceHeight, size.x, size.y, size.width, size.height);
67
+ // launch callbacks on prerender
68
+ this.callbacks.tbt('prerender', false);
69
+ };
70
+ return Ctx2DPrerender;
71
+ }(Ctx2D_1.Ctx2D));
72
+ exports.Ctx2DPrerender = Ctx2DPrerender;