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,785 +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
- var _domInsertAfter = _interopRequireDefault(require("./domInsertAfter"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
-
20
- 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); } }
21
-
22
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
-
24
- 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); }
25
-
26
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
27
-
28
- 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); }
29
-
30
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
-
32
- 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); }; }
33
-
34
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
35
-
36
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
-
38
- 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; } }
39
-
40
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
-
42
- var selectEl = require('select-el');
43
-
44
- var dom = require('dom-create-element');
45
- /**
46
- * @classdesc Split text into letters, words & lines. <br>
47
- * Available targets:
48
- * <ul>
49
- * <li>resize - when window is resizes.</li>
50
- * <li>split - when the text is splitted into letters, words & lines. Argument - {@linkcode Vevet.TextSplitModule.Elements}</li>
51
- * </ul>
52
- * <br><br> <b>import {TextSplitModule} from 'vevet';</b>
53
- *
54
- * @vevetModuleCallback { Vevet.TextSplitModule : resize : }
55
- * @vevetModuleCallback { Vevet.TextSplitModule : split : Vevet.TextSplitModule.Elements }
56
- *
57
- * @class
58
- * @memberof Vevet
59
- * @augments Vevet.Module
60
- */
61
-
62
-
63
- var TextSplitModule = /*#__PURE__*/function (_Module) {
64
- _inherits(TextSplitModule, _Module);
65
-
66
- var _super = _createSuper(TextSplitModule);
67
-
68
- /**
69
- * @memberof Vevet.TextSplitModule
70
- * @typedef {object} Properties
71
- * @augments Vevet.Module.Properties
72
- *
73
- * @property {string|HTMLElement} [selector=.vevet-textSplit] - *** Element with text.
74
- * @property {number} [resizeTimeout=0] - Timeout before lines are updated when the window is resized.
75
- * @property {boolean} [appendLetters=true] - *** Defines if we need to wrap each char into a span.
76
- * @property {boolean} [appendWords=true] - *** Defines if we need to wrap each word into a span.
77
- * @property {boolean} [appendLines=false] - *** Defines if we need to wrap each line into a span.
78
- */
79
-
80
- /**
81
- * @alias Vevet.TextSplitModule
82
- *
83
- * @param {Vevet.TextSplitModule.Properties} [data]
84
- */
85
- function TextSplitModule(data) {
86
- _classCallCheck(this, TextSplitModule);
87
-
88
- return _super.call(this, data);
89
- }
90
-
91
- _createClass(TextSplitModule, [{
92
- key: "prefix",
93
- get: function get() {
94
- return "".concat(this._v.prefix, "text-split");
95
- }
96
- /**
97
- * @readonly
98
- * @type {Vevet.TextSplitModule.Properties}
99
- */
100
-
101
- }, {
102
- key: "defaultProp",
103
- get: function get() {
104
- return (0, _merge.default)(_get(_getPrototypeOf(TextSplitModule.prototype), "defaultProp", this), {
105
- selector: ".".concat(this._prefix),
106
- resizeTimeout: 0,
107
- appendLetters: true,
108
- appendWords: true,
109
- appendLines: false
110
- });
111
- }
112
- /**
113
- * @member Vevet.TextSplitModule#prop
114
- * @memberof Vevet.TextSplitModule
115
- * @readonly
116
- * @type {Vevet.TextSplitModule.Properties}
117
- */
118
-
119
- /**
120
- * @member Vevet.TextSplitModule#_prop
121
- * @memberof Vevet.TextSplitModule
122
- * @protected
123
- * @type {Vevet.TextSplitModule.Properties}
124
- */
125
-
126
- /**
127
- * @function Vevet.TextSplitModule#changeProp
128
- * @memberof Vevet.TextSplitModule
129
- * @param {Vevet.TextSplitModule.Properties} [prop]
130
- */
131
-
132
- /**
133
- * @memberof Vevet.TextSplitModule
134
- * @typedef {object} Letter
135
- * @property {HTMLElement|false} el Defines the span element itself.
136
- * @property {string} content Defines innerHTML of the element.
137
- * @property {boolean} newline Defines if the element precedes a new line.
138
- * @property {boolean} whitespace Defines if the element precedes a whitespace.
139
- * @property {string} type Defines the type of the element.
140
- */
141
-
142
- /**
143
- * @description Get letters.
144
- * @readonly
145
- * @type {Array<Vevet.TextSplitModule.Letter>}
146
- */
147
-
148
- }, {
149
- key: "letters",
150
- get: function get() {
151
- return this._el.letters;
152
- }
153
- /**
154
- * @memberof Vevet.TextSplitModule
155
- * @typedef {object} Word
156
- * @property {HTMLElement|false} el Defines the span element itself.
157
- * @property {string} content Defines the contents of all letters inside the word.
158
- * @property {Array<Vevet.TextSplitModule.Letter>} children All letters inside the word.
159
- * @property {boolean} newline Defines if the element precedes a new line.
160
- * @property {string} type Defines the type of the element.
161
- */
162
-
163
- /**
164
- * @description Get words.
165
- * @readonly
166
- * @type {Array<Vevet.TextSplitModule.Word>}
167
- */
168
-
169
- }, {
170
- key: "words",
171
- get: function get() {
172
- return this._el.words;
173
- }
174
- /**
175
- * @memberof Vevet.TextSplitModule
176
- * @typedef {object} Line
177
- * @property {HTMLElement|false} el Defines the span element itself.
178
- * @property {string} content The contents of all words inside of the line.
179
- * @property {Array<Vevet.TextSplitModule.Word|Vevet.TextSplitModule.Letter>} children All words inside of the line.
180
- * @property {string} type Defines the type of the element.
181
- */
182
-
183
- /**
184
- * @description Get lines.
185
- * @readonly
186
- * @type {Array<Vevet.TextSplitModule.Line>}
187
- */
188
-
189
- }, {
190
- key: "lines",
191
- get: function get() {
192
- return this._el.lines;
193
- }
194
- /**
195
- * @memberof Vevet.TextSplitModule
196
- * @typedef {object} Elements
197
- * @property {Array<Vevet.TextSplitModule.Letter>} letters
198
- * @property {Array<Vevet.TextSplitModule.Word>} words
199
- * @property {Array<Vevet.TextSplitModule.Line>} lines
200
- */
201
-
202
- /**
203
- * @description Get all elements of the text.
204
- * @readonly
205
- * @type {Vevet.TextSplitModule.Elements}
206
- */
207
-
208
- }, {
209
- key: "elements",
210
- get: function get() {
211
- return this._el;
212
- }
213
- /**
214
- * @description Get outer element.
215
- * @readonly
216
- * @type {HTMLElement}
217
- */
218
-
219
- }, {
220
- key: "outer",
221
- get: function get() {
222
- return this._outer;
223
- } // Extra Constructor
224
-
225
- }, {
226
- key: "_extra",
227
- value: function _extra() {
228
- _get(_getPrototypeOf(TextSplitModule.prototype), "_extra", this).call(this);
229
- /**
230
- * @description Outer element.
231
- * @protected
232
- * @member {HTMLElement}
233
- */
234
-
235
-
236
- this._outer = selectEl.one(this._prop.selector);
237
- var outer = this._outer;
238
- outer.classList.add("".concat(this._prefix));
239
- /**
240
- * @description Inner text.
241
- * @protected
242
- * @member {string}
243
- */
244
-
245
- this._text = outer.innerText;
246
-
247
- if (this._text.length == 0) {
248
- this._text = outer.textContent;
249
- }
250
- /**
251
- * @description Inner HTML.
252
- * @protected
253
- * @member {string}
254
- */
255
-
256
-
257
- this._html = outer.innerHTML;
258
- /**
259
- * @description Defines if the text is already split into letters & words.
260
- * @protected
261
- * @member {boolean}
262
- */
263
-
264
- this._splitBool = false;
265
- /**
266
- * @description Elements.
267
- * @protected
268
- * @member {Vevet.TextSplitModule.Elements}
269
- */
270
-
271
- this._el = {
272
- letters: [],
273
- words: [],
274
- lines: []
275
- }; // split text
276
-
277
- this.split();
278
- } // Set events
279
-
280
- }, {
281
- key: "_setEvents",
282
- value: function _setEvents() {
283
- var _this = this;
284
-
285
- _get(_getPrototypeOf(TextSplitModule.prototype), "_setEvents", this).call(this);
286
-
287
- this.addEvent("viewport", {
288
- target: 'w_',
289
- name: this.name,
290
- do: function _do() {
291
- _this._resize();
292
- }
293
- });
294
- }
295
- /**
296
- * @description Resize & split.
297
- * @protected
298
- */
299
-
300
- }, {
301
- key: "_resize",
302
- value: function _resize() {
303
- var _this2 = this;
304
-
305
- setTimeout(function () {
306
- _this2._resizeFunc();
307
- }, this._prop.resizeTimeout);
308
- }
309
- /**
310
- * @description Split on resize.
311
- * @protected
312
- */
313
-
314
- }, {
315
- key: "_resizeFunc",
316
- value: function _resizeFunc() {
317
- this.split();
318
- this.lbt("resize");
319
- }
320
- /**
321
- * @description Split the text into letters, words and lines.
322
- * If the text is already split into words and letters, a new array of lines containing words
323
- * will be formed. See {@linkcode Vevet.TextSplitModule.Elements}
324
- */
325
-
326
- }, {
327
- key: "split",
328
- value: function split() {
329
- // get prop
330
- var prop = this._prop; // perhaps, you will need thid class
331
- // it is added when the text is being split
332
- // and it removes when it is already split
333
-
334
- this._outer.classList.add("".concat(this._prefix, "_splitting")); // split text into letters and words
335
-
336
-
337
- if (!this._splitBool) {
338
- // split
339
- this._wordsSplit();
340
-
341
- this._lettersSplit(); // clear innerHTML
342
-
343
-
344
- this._outer.innerHTML = ''; // and append
345
-
346
- this._lettersAppend();
347
-
348
- this._wordsAppend();
349
- } // remove previous lines
350
-
351
-
352
- if (this._splitBool) {
353
- this._linesRemove();
354
- } // append spaces
355
-
356
-
357
- if (!prop.appendLines) {
358
- if (!this._splitBool) {
359
- this._appendSpaces();
360
- }
361
- } // split to lines
362
-
363
-
364
- if (prop.appendLines) {
365
- this._appendSpaces();
366
-
367
- this._linesSplit();
368
-
369
- this._removeBr();
370
-
371
- this._linesAppend();
372
-
373
- this._appendSpaces();
374
- } else {
375
- this._linesSplit();
376
- } // change value
377
-
378
-
379
- this._splitBool = true; // remove the class
380
-
381
- this._outer.classList.remove("".concat(this._prefix, "_splitting")); // launch callback
382
-
383
-
384
- this.lbt("split", this._el);
385
- }
386
- /**
387
- * @description Split text into words.
388
- * @protected
389
- */
390
-
391
- }, {
392
- key: "_wordsSplit",
393
- value: function _wordsSplit() {
394
- var _this3 = this;
395
-
396
- // split text to chars
397
- var chars = this._text.split(""),
398
- el = [],
399
- word = []; // gor thru all chars and add them to single words
400
-
401
-
402
- var i = 0;
403
- chars.forEach(function (char) {
404
- var whitespace = false,
405
- newline = false,
406
- charCode = char.charCodeAt(0),
407
- newWord = false,
408
- lastChar = i == chars.length - 1; // if a whitespace
409
-
410
- if (charCode === 32 || charCode === 160) {
411
- whitespace = true;
412
- } // if a new line
413
- else if (charCode === 10) {
414
- newline = true;
415
- } // define if a new word
416
-
417
-
418
- if (newline || whitespace || lastChar) {
419
- newWord = true;
420
-
421
- if (lastChar) {
422
- word.push(char);
423
- }
424
- } // if a new word
425
-
426
-
427
- if (newWord) {
428
- // add previous word to elements
429
- if (word.length > 0) {
430
- el.push({
431
- el: false,
432
- children: word,
433
- newline: newline,
434
- content: word.join(""),
435
- type: 'word'
436
- });
437
- }
438
-
439
- word = [];
440
- } else {
441
- word.push(char);
442
- } // iteration
443
-
444
-
445
- i++;
446
- }); // add elements to words
447
-
448
- if (this._prop.appendWords) {
449
- el.forEach(function (word) {
450
- word.el = dom({
451
- selector: 'span',
452
- styles: "".concat(_this3._prefix, "__word")
453
- });
454
- word.el.classList.add();
455
-
456
- if (!_this3._prop.appendLetters) {
457
- word.el.innerHTML = word.content;
458
- }
459
- });
460
- } // add to stack
461
-
462
-
463
- this._el.words = el;
464
- }
465
- /**
466
- * @description Append words to the outer element.
467
- * @protected
468
- */
469
-
470
- }, {
471
- key: "_wordsAppend",
472
- value: function _wordsAppend() {
473
- var _this4 = this;
474
-
475
- if (this._prop.appendWords) {
476
- this._el.words.forEach(function (obj) {
477
- _this4._outer.appendChild(obj.el);
478
- });
479
- }
480
- }
481
- /**
482
- * @description Split text into letters.
483
- * @protected
484
- */
485
-
486
- }, {
487
- key: "_lettersSplit",
488
- value: function _lettersSplit() {
489
- var _this5 = this;
490
-
491
- // get words
492
- var words = this._el.words; // in each word point out a letter
493
-
494
- words.forEach(function (word) {
495
- // get chars
496
- var chars = word.children; // create letters
497
-
498
- var letters = [],
499
- i = 0;
500
- chars.forEach(function (char) {
501
- // last element
502
- var last = i == chars.length - 1; // create object
503
-
504
- var letter = {
505
- el: false,
506
- content: char,
507
- whitespace: last,
508
- newline: !!(last && word.newline),
509
- type: 'letter'
510
- }; // create element
511
-
512
- if (_this5._prop.appendLetters) {
513
- letter.el = dom({
514
- selector: 'span',
515
- styles: "".concat(_this5._prefix, "__letter")
516
- });
517
- letter.el.innerHTML = char;
518
- } // add to stack
519
-
520
-
521
- letters.push(letter);
522
-
523
- _this5._el.letters.push(letter); // iteration
524
-
525
-
526
- i++;
527
- }); // change letters in words
528
-
529
- word.children = letters;
530
- });
531
- }
532
- /**
533
- * @description Append letters to the outer element.
534
- * @protected
535
- */
536
-
537
- }, {
538
- key: "_lettersAppend",
539
- value: function _lettersAppend() {
540
- var _this6 = this;
541
-
542
- if (this._prop.appendLetters) {
543
- if (!this._prop.appendWords) {
544
- // if words are disabled, append to outer
545
- if (!this._prop.appendWords) {
546
- this._el.letters.forEach(function (obj) {
547
- // append letters
548
- _this6._outer.appendChild(obj.el);
549
- });
550
- }
551
- } // append letters to words
552
- else {
553
- this._el.words.forEach(function (word) {
554
- word.children.forEach(function (letter) {
555
- word.el.appendChild(letter.el);
556
- });
557
- });
558
- }
559
- }
560
- }
561
- /**
562
- * @description Append spaces between words & letters.
563
- * @protected
564
- */
565
-
566
- }, {
567
- key: "_appendSpaces",
568
- value: function _appendSpaces() {
569
- var prop = this._prop,
570
- el = this._el;
571
-
572
- if (prop.appendWords) {
573
- this._appendSpacesType(el.words);
574
- } else if (prop.appendLetters) {
575
- this._appendSpacesType(el.letters);
576
- }
577
- }
578
- /**
579
- * @description Append spaces between elements.
580
- * @param {Array<Vevet.TextSplitModule.Letter>|Array<Vevet.TextSplitModule.Word>} el
581
- * @protected
582
- */
583
-
584
- }, {
585
- key: "_appendSpacesType",
586
- value: function _appendSpacesType(el) {
587
- el.forEach(function (obj) {
588
- // append whitespace
589
- var whitespace = false;
590
-
591
- if (obj.type == 'word') {
592
- whitespace = true;
593
- } else {
594
- if (obj.whitespace) {
595
- whitespace = true;
596
- }
597
- }
598
-
599
- if (whitespace) {
600
- whitespace = document.createTextNode("\x20");
601
- (0, _domInsertAfter.default)(whitespace, obj.el);
602
- } // append br
603
-
604
-
605
- if (obj.newline) {
606
- var br = dom({
607
- selector: 'br'
608
- });
609
- (0, _domInsertAfter.default)(br, obj.el);
610
- }
611
- });
612
- }
613
- /**
614
- * @description Remove new lines (br tags).
615
- * @protected
616
- */
617
-
618
- }, {
619
- key: "_removeBr",
620
- value: function _removeBr() {
621
- var br = this._outer.querySelectorAll("br");
622
-
623
- br.forEach(function (el) {
624
- el.remove();
625
- });
626
- }
627
- /**
628
- * @description Split text into lines.
629
- * @protected
630
- */
631
-
632
- }, {
633
- key: "_linesSplit",
634
- value: function _linesSplit() {
635
- var _this7 = this;
636
-
637
- var prop = this._prop; // get elements
638
-
639
- var el = [];
640
-
641
- if (prop.appendWords) {
642
- el = this._el.words;
643
- } else {
644
- if (prop.appendLetters) {
645
- el = this._el.letters;
646
- }
647
- } // vars
648
-
649
-
650
- var lines = [],
651
- line = [],
652
- offsetPrev = 0,
653
- newline = false; // go thru all elements and split them into lines
654
-
655
- for (var i = 0; i < el.length; i++) {
656
- // vars
657
- var obj = el[i]; // compare offsets
658
-
659
- var offset = obj.el.offsetTop;
660
-
661
- if (offset !== offsetPrev) {
662
- newline = true;
663
- } else {
664
- newline = false;
665
- }
666
-
667
- offsetPrev = offset; // add new line to stack
668
-
669
- if (newline & line.length > 0) {
670
- lines.push(line);
671
- line = [];
672
- } // add to line
673
-
674
-
675
- line.push(obj);
676
- } // add last line
677
-
678
-
679
- lines.push(line); // create an array of lines
680
-
681
- var l = this._el.lines; // add lines to the array
682
-
683
- lines.forEach(function (line) {
684
- var obj = {
685
- el: false,
686
- children: line,
687
- content: '',
688
- type: 'line'
689
- }; // add content
690
-
691
- line.forEach(function (child) {
692
- obj.content += child.content;
693
-
694
- if (child.type == 'word' || child.whitespace) {
695
- obj.content += ' ';
696
- }
697
- }); // create element
698
-
699
- if (prop.appendLines) {
700
- obj.el = dom({
701
- selector: 'span',
702
- styles: "".concat(_this7._prefix, "__line")
703
- });
704
- } // add to lines
705
-
706
-
707
- l.push(obj);
708
- });
709
- }
710
- /**
711
- * @description Append lines to the outer element.
712
- * @protected
713
- */
714
-
715
- }, {
716
- key: "_linesAppend",
717
- value: function _linesAppend() {
718
- var _this8 = this;
719
-
720
- // append lines
721
- if (this._prop.appendLines) {
722
- this._el.lines.forEach(function (line) {
723
- // append line
724
- _this8._outer.appendChild(line.el); // appnd children
725
-
726
-
727
- line.children.forEach(function (child) {
728
- line.el.appendChild(child.el);
729
- });
730
- });
731
- }
732
- }
733
- /**
734
- * @description Remove lines from the outer element.
735
- * @protected
736
- */
737
-
738
- }, {
739
- key: "_linesRemove",
740
- value: function _linesRemove() {
741
- var prop = this._prop,
742
- el = this._el,
743
- outer = this._outer;
744
-
745
- if (prop.appendLines) {
746
- // move words
747
- if (prop.appendWords) {
748
- el.words.forEach(function (obj) {
749
- outer.appendChild(obj.el);
750
- });
751
- } else {
752
- // move letters
753
- if (prop.appendLetters) {
754
- el.letters.forEach(function (obj) {
755
- outer.appendChild(obj.el);
756
- });
757
- }
758
- }
759
- } // remove lines
760
-
761
-
762
- el.lines.forEach(function (obj) {
763
- if (obj.el) {
764
- obj.el.remove();
765
- }
766
- });
767
- el.lines = [];
768
- }
769
- /**
770
- * @description Destroy the class.
771
- */
772
-
773
- }, {
774
- key: "destroy",
775
- value: function destroy() {
776
- _get(_getPrototypeOf(TextSplitModule.prototype), "destroy", this).call(this);
777
-
778
- this._outer.innerHTML = this._html;
779
- }
780
- }]);
781
-
782
- return TextSplitModule;
783
- }(_Module2.default);
784
-
785
- exports.default = TextSplitModule;