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,174 @@
1
+ import { Application } from '../app/Application';
2
+ export declare namespace NCallbacks {
3
+ /**
4
+ * Callbacks Properties Settings
5
+ */
6
+ interface CallbackBaseSettings {
7
+ /**
8
+ * Name of the callback if needed.
9
+ */
10
+ name?: string | undefined;
11
+ /**
12
+ * Timeout of the callback.
13
+ */
14
+ timeout?: number | undefined;
15
+ /**
16
+ * If true, the callback can't be removed.
17
+ */
18
+ protected?: boolean | undefined;
19
+ /**
20
+ * If true, the callback is to be removed after it is called.
21
+ */
22
+ once?: boolean | undefined;
23
+ }
24
+ /**
25
+ * Callbacks Settings
26
+ */
27
+ interface CallbackSettings<Types, Target extends keyof Types> extends CallbackBaseSettings {
28
+ target: Target;
29
+ do: (arg: Types[Target]) => void;
30
+ }
31
+ /**
32
+ * Callbacks Types
33
+ */
34
+ interface CallbacksTypes {
35
+ }
36
+ /**
37
+ * Callback Full Data
38
+ */
39
+ type CallbacksData<Types> = {
40
+ /**
41
+ * ID of the callback
42
+ */
43
+ id: string;
44
+ /**
45
+ * Defines if the callback is enabled
46
+ */
47
+ on: boolean;
48
+ /**
49
+ * Callback Data
50
+ */
51
+ data: CallbackSettings<Types, keyof Types>;
52
+ };
53
+ type SingleCallbackData<Types, Target extends keyof Types> = {
54
+ /**
55
+ * ID of the callback
56
+ */
57
+ id: string;
58
+ /**
59
+ * Defines if the callback is enabled
60
+ */
61
+ on: boolean;
62
+ /**
63
+ * Callback Data
64
+ */
65
+ data: CallbackSettings<Types, Target>;
66
+ };
67
+ interface AddedCallback {
68
+ /**
69
+ * ID of the callback
70
+ */
71
+ id: string;
72
+ /**
73
+ * Remove the callback
74
+ */
75
+ remove: () => void;
76
+ }
77
+ }
78
+ /**
79
+ * A class for callbacks' manipulation.
80
+ */
81
+ export declare class Callbacks<
82
+ /**
83
+ * Module Callbacks
84
+ */
85
+ Types extends NCallbacks.CallbacksTypes = NCallbacks.CallbacksTypes> {
86
+ /**
87
+ * Vevet Application
88
+ */
89
+ protected _app: Application;
90
+ /**
91
+ * All callbacks
92
+ */
93
+ protected _callbacks: NCallbacks.CallbacksData<Types>[];
94
+ /**
95
+ * Get all callbacks
96
+ */
97
+ get callbacks(): NCallbacks.CallbacksData<Types>[];
98
+ /**
99
+ * @example
100
+ * const callback = new Callbacks();
101
+ */
102
+ constructor(callInit?: boolean);
103
+ /**
104
+ * Initialize the class.
105
+ */
106
+ protected _init(): void;
107
+ /**
108
+ * An empty method that is called in {@linkcode Callbacks._init}.
109
+ */
110
+ protected _constructor(): void;
111
+ /**
112
+ * An empty method that is called in {@linkcode Callbacks._init}.
113
+ */
114
+ protected _setEvents(): void;
115
+ /**
116
+ * Adds a callback
117
+ * @param target - Callback target name
118
+ * @param func - Callback function
119
+ * @param data - Callback data
120
+ *
121
+ * @example
122
+ * const onTarget = callback.add("target-name", () => {
123
+ * alert("callback");
124
+ * });
125
+ */
126
+ add<Target extends keyof Types>(target: Target, func: NCallbacks.CallbackSettings<Types, Target>['do'], data?: NCallbacks.CallbackBaseSettings): NCallbacks.AddedCallback;
127
+ /**
128
+ * Use it to implement some actions after adding a callback.
129
+ */
130
+ protected _onAdd(id: string): void;
131
+ /**
132
+ * Remove a callback.
133
+ */
134
+ remove(id: string, removeProtected?: boolean): boolean;
135
+ /**
136
+ * Use it to implement some actions after removing a callback.
137
+ */
138
+ protected _onRemove(id: string): void;
139
+ /**
140
+ * Remove all callbacks.
141
+ */
142
+ removeAll(removeProtected?: boolean): void;
143
+ /**
144
+ * Enable/disable a callback.
145
+ * @param id - ID of the callback
146
+ * @param enabled - True to enable, false to disable.
147
+ */
148
+ turn(id: string, enabled?: boolean): boolean;
149
+ /**
150
+ * Use it to implement some actions after enabling or disabling a callback.
151
+ */
152
+ protected _onTurn(id: string): void;
153
+ /**
154
+ * Get a callback by id
155
+ */
156
+ get(id: string): false | NCallbacks.CallbacksData<Types>;
157
+ /**
158
+ * Trigger a callback. It will work only if the callback is enabled.
159
+ */
160
+ protected _trigger<Target extends keyof Types>(callback: NCallbacks.SingleCallbackData<Types, Target>, arg: Types[Target]): void;
161
+ /**
162
+ * Launch a callback's function
163
+ */
164
+ protected _triggerFunc(func: Function, arg: false | any): void;
165
+ /**
166
+ * Trigger all enabled callbacks under a certain target name. (TBT: Trigger by target).
167
+ */
168
+ tbt<T extends keyof Types>(target: T, arg: Types[T]): void;
169
+ /**
170
+ * Destroy the callbacks
171
+ */
172
+ destroy(): void;
173
+ }
174
+ //# sourceMappingURL=Callbacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callbacks.d.ts","sourceRoot":"","sources":["../../../src/ts/base/Callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,yBAAiB,UAAU,CAAC;IAExB;;OAEG;IACH,UAAiB,oBAAoB;QACjC;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B;;WAEG;QACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAChC;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAC9B;IAED;;OAEG;IACH,UAAiB,gBAAgB,CAC7B,KAAK,EAAE,MAAM,SAAS,MAAM,KAAK,CACnC,SAAQ,oBAAoB;QAC1B,MAAM,EAAE,MAAM,CAAC;QACf,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;KACpC;IAED;;OAEG;IACH,UAAiB,cAAc;KAAI;IAEnC;;OAEG;IACH,KAAY,aAAa,CAAC,KAAK,IAAI;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,CAAC,MAAM,CAAE,EAAE,EAAE,MAAM;IAM5B;;OAEG;IACI,MAAM,CACT,EAAE,EAAE,MAAM,EACV,eAAe,UAAQ,GACxB,OAAO;IAyBV;;OAEG;IAEH,SAAS,CAAC,SAAS,CAAE,EAAE,EAAE,MAAM;IAI/B;;OAEG;IACI,SAAS,CACZ,eAAe,UAAQ;IAS3B;;;;OAIG;IACI,IAAI,CACP,EAAE,EAAE,MAAM,EACV,OAAO,UAAO,GACf,OAAO;IAWV;;OAEG;IAEH,SAAS,CAAC,OAAO,CAAE,EAAE,EAAE,MAAM;IAM7B;;OAEG;IACI,GAAG,CACN,EAAE,EAAE,MAAM,GACX,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC;IAU1C;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAE,MAAM,SAAS,MAAM,KAAK,EAC1C,QAAQ,EAAE,UAAU,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,EACtD,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC;IAmCtB;;OAEG;IACH,SAAS,CAAC,YAAY,CAClB,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,KAAK,GAAG,GAAG;IASpB;;OAEG;IACI,GAAG,CAAE,CAAC,SAAS,MAAM,KAAK,EAC7B,MAAM,EAAE,CAAC,EACT,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IAWjB;;OAEG;IACI,OAAO;CAGjB"}
@@ -0,0 +1,48 @@
1
+ import { Module, NModule } from './Module';
2
+ import { Plugin } from './Plugin';
3
+ export declare namespace NComponent {
4
+ /**
5
+ * Static properties
6
+ */
7
+ interface StaticProp extends NModule.StaticProp {
8
+ }
9
+ /**
10
+ * Changeable Properties
11
+ */
12
+ interface ChangeableProp extends NModule.ChangeableProp {
13
+ }
14
+ /**
15
+ * Available callbacks
16
+ */
17
+ interface CallbacksTypes extends NModule.CallbacksTypes {
18
+ }
19
+ }
20
+ /**
21
+ * A class for Components.
22
+ */
23
+ export declare class Component<
24
+ /**
25
+ * Static Properties (they never change)
26
+ */
27
+ StaticProp extends NComponent.StaticProp = NComponent.StaticProp,
28
+ /**
29
+ * Mutable Properties
30
+ * (may change on window resize or through {@linkcode Component.changeProp})
31
+ */
32
+ ChangeableProp extends NComponent.ChangeableProp = NComponent.ChangeableProp,
33
+ /**
34
+ * Component Callbacks
35
+ */
36
+ CallbacksTypes extends NComponent.CallbacksTypes = NComponent.CallbacksTypes> extends Module<StaticProp, ChangeableProp, CallbacksTypes> {
37
+ protected _plugins?: Plugin[];
38
+ /**
39
+ * Add a single plugin
40
+ */
41
+ addPlugin(plugin: any): void;
42
+ /**
43
+ * Destroy all plugins
44
+ */
45
+ protected _destroyPlugins(): void;
46
+ protected _destroy(): void;
47
+ }
48
+ //# sourceMappingURL=Component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/ts/base/Component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,yBAAiB,UAAU,CAAC;IAExB;;OAEG;IACH,UAAiB,UAAW,SAAQ,OAAO,CAAC,UAAU;KAAG;IAEzD;;OAEG;IACH,UAAiB,cAAe,SAAQ,OAAO,CAAC,cAAc;KAAG;IAEjE;;OAEG;IACH,UAAiB,cAAe,SAAQ,OAAO,CAAC,cAAc;KAAG;CAEpE;AAID;;GAEG;AACH,qBAAa,SAAS;AAClB;;GAEG;AACH,UAAU,SAAS,UAAU,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU;AAChE;;;GAGG;AACH,cAAc,SAAS,UAAU,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc;AAC5E;;GAEG;AACH,cAAc,SAAS,UAAU,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAC9E,SAAQ,MAAM,CACZ,UAAU,EACV,cAAc,EACd,cAAc,CACjB;IACG,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B;;OAEG;IACI,SAAS,CACZ,MAAM,EAAE,GAAG;IAWf;;OAEG;IACH,SAAS,CAAC,eAAe;IAUzB,SAAS,CAAC,QAAQ;CAIrB"}
@@ -0,0 +1,179 @@
1
+ import { IAddEventListener, IAddEventListenerOptions, ListenerElement } from 'vevet-dom';
2
+ import { Callbacks, NCallbacks } from './Callbacks';
3
+ import { MutableProp, NMutableProp } from './MutableProp';
4
+ import { Application } from '../app/Application';
5
+ import { Viewport } from '../app/events/Viewport';
6
+ import { RequiredModuleProp } from '../utils/types/utility';
7
+ export declare namespace NModule {
8
+ /**
9
+ * Mutable Properties (may change on window resize or through {@linkcode Module.changeProp})
10
+ */
11
+ interface ChangeableProp {
12
+ }
13
+ /**
14
+ * Static properties
15
+ */
16
+ interface StaticProp {
17
+ /**
18
+ * Parent module
19
+ */
20
+ parent?: any;
21
+ }
22
+ /**
23
+ * Available callbacks
24
+ */
25
+ interface CallbacksTypes extends NCallbacks.CallbacksTypes {
26
+ 'destroy': false;
27
+ 'changeProp': false;
28
+ }
29
+ }
30
+ /**
31
+ * A class for modules.
32
+ */
33
+ export declare class Module<
34
+ /**
35
+ * Static Properties (they never change)
36
+ */
37
+ StaticProp extends NModule.StaticProp = NModule.StaticProp,
38
+ /**
39
+ * Mutable Properties
40
+ * (may change on window resize or through {@linkcode Module.changeProp})
41
+ */
42
+ ChangeableProp extends NModule.ChangeableProp = NModule.ChangeableProp,
43
+ /**
44
+ * Module Callbacks
45
+ */
46
+ CallbacksTypes extends NModule.CallbacksTypes = NModule.CallbacksTypes> {
47
+ /**
48
+ * Get Default properties (should be extended)
49
+ */
50
+ protected _getDefaultProp<T extends RequiredModuleProp<StaticProp & ChangeableProp>>(): T;
51
+ /**
52
+ * Current properties
53
+ */
54
+ get prop(): RequiredModuleProp<(StaticProp & ChangeableProp)>;
55
+ /**
56
+ * Responsive properties
57
+ */
58
+ protected _mutableProp: MutableProp<StaticProp, ChangeableProp>;
59
+ /**
60
+ * Module Callbacks
61
+ */
62
+ protected _callbacks: Callbacks<CallbacksTypes>;
63
+ /**
64
+ * Module Callbacks
65
+ */
66
+ get callbacks(): Callbacks<CallbacksTypes>;
67
+ /**
68
+ * Module listeners
69
+ */
70
+ protected _listeners: IAddEventListener[];
71
+ /**
72
+ * Vevet Application
73
+ */
74
+ protected _app: Application;
75
+ /**
76
+ * Module prefix
77
+ */
78
+ get prefix(): string;
79
+ /**
80
+ * Get module name
81
+ */
82
+ get name(): string;
83
+ /**
84
+ * If the module is initialized
85
+ */
86
+ protected _inited: boolean;
87
+ get inited(): boolean;
88
+ /**
89
+ * If the module is destroyed
90
+ */
91
+ protected _destroyed: boolean;
92
+ get destroyed(): boolean;
93
+ /**
94
+ * @example
95
+ * const mod = new Module();
96
+ */
97
+ constructor(
98
+ /**
99
+ * Properties on script start
100
+ */
101
+ initialProp?: (StaticProp & ChangeableProp),
102
+ /**
103
+ * Defines if you need to call {@linkcode Module.init} at the constructor's end.
104
+ * If you want to add responsive properties, set this argument to FALSE.
105
+ */
106
+ init?: boolean);
107
+ /**
108
+ * Add responsive rules
109
+ */
110
+ addResponsiveProp(rules: NMutableProp.Responsive<ChangeableProp>): void;
111
+ /**
112
+ * Change module properties.
113
+ * @example
114
+ *
115
+ * // changing properties
116
+ * // let's imagine that the module has the following properties:
117
+ * prop = {
118
+ * name: 'module',
119
+ * cute: true
120
+ * };
121
+ * // we can change some properties in it: whether one or several properties
122
+ * // after the properties are changed, the method _onPropChange is called.
123
+ * module.changeProp({
124
+ * cute: false
125
+ * });
126
+ */
127
+ changeProp(prop?: ChangeableProp): void;
128
+ /**
129
+ * The method that is called on window resize and properties change.
130
+ */
131
+ protected _onPropResponsive(): void;
132
+ /**
133
+ * The method that is called on properties change.
134
+ */
135
+ protected _onPropChange(changedProp: ChangeableProp): void;
136
+ /**
137
+ * The method that is called on properties change.
138
+ */
139
+ protected _onPropMutate(): void;
140
+ /**
141
+ * Initializes the class.
142
+ */
143
+ init(): void;
144
+ /**
145
+ * Extra constructor
146
+ */
147
+ protected _constructor(): void;
148
+ /**
149
+ * Set events
150
+ */
151
+ protected _setEvents(): void;
152
+ /**
153
+ * Viewport callbacks
154
+ */
155
+ protected _viewportCallbacks: NCallbacks.AddedCallback[];
156
+ /**
157
+ * Add a viewport callback that will be removed on class destroy
158
+ * {@see Viewport}
159
+ */
160
+ addViewportCallback(target: Parameters<Viewport['add']>[0], func: Parameters<Viewport['add']>[1], data?: Parameters<Viewport['add']>[2]): NCallbacks.AddedCallback;
161
+ /**
162
+ * Add a module callback
163
+ * {@see Callbacks}
164
+ */
165
+ addCallback<Target extends keyof CallbacksTypes>(target: Target, func: NCallbacks.CallbackSettings<CallbacksTypes, Target>['do'], data?: NCallbacks.CallbackBaseSettings): NCallbacks.AddedCallback;
166
+ /**
167
+ * Add a DOM event listeners
168
+ */
169
+ addEventListeners<El extends ListenerElement, Target extends keyof HTMLElementEventMap, Callback extends (evt: HTMLElementEventMap[Target]) => void>(el: El, target: Target, callback: Callback, options?: IAddEventListenerOptions): IAddEventListener;
170
+ /**
171
+ * Destroy the module
172
+ */
173
+ destroy(): void;
174
+ /**
175
+ * Destroy the module
176
+ */
177
+ protected _destroy(): void;
178
+ }
179
+ //# sourceMappingURL=Module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Module.d.ts","sourceRoot":"","sources":["../../../src/ts/base/Module.ts"],"names":[],"mappings":"AAAA,OAAO,EACe,iBAAiB,EAAE,wBAAwB,EAAE,eAAe,EACjF,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA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SAAS,CAAC,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,KAAK,IAAI,EAG3D,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,wBAAwB,GAAG,iBAAiB;IAS1D;;OAEG;IACI,OAAO;IAOd;;OAEG;IACH,SAAS,CAAC,QAAQ;CAqBrB"}
@@ -0,0 +1,142 @@
1
+ import { Application } from '../app/Application';
2
+ import { NCallbacks } from './Callbacks';
3
+ export declare namespace NMutableProp {
4
+ interface Responsive<S> {
5
+ /**
6
+ * Breakpoint on which the properties will change.
7
+ * Available breakpoints:
8
+ * <ul>
9
+ * <li>any number - width breakpoint</li>
10
+ * <li>'d' - for desktop size</li>
11
+ * <li>'t' - for tablet size</li>
12
+ * <li>'p' - for phone size</li>
13
+ * <li>'phone' - for phone devices</li>
14
+ * <li>'tablet' - for tablet devices</li>
15
+ * <li>'mobile' - for phone or tablet devices</li>
16
+ * </ul>
17
+ */
18
+ breakpoint: number | 'd' | 't' | 'p' | 'phone' | 'tablet' | 'mobile';
19
+ settings: S;
20
+ }
21
+ }
22
+ /**
23
+ * A class for creating mutable properties that can change on window resize. <br><br>
24
+ *
25
+ * There are two ways to change properties:
26
+ * <ul>
27
+ * <li>
28
+ * To set a resize-listener on window (or use {@linkcode Viewport}).
29
+ * When the window is resized, change the properties with the help of
30
+ * {@linkcode MutableProp.changeProp}</li>
31
+ * <li>
32
+ * The second way is to use the MutableProp and add responsive properties
33
+ * with help of {@linkcode MutableProp.addResponsiveProp}.</li>
34
+ * </ul>
35
+ */
36
+ export declare class MutableProp<
37
+ /**
38
+ * Static Properties (they never change)
39
+ */
40
+ StaticProp extends Record<string, any>,
41
+ /**
42
+ * Mutable Properties
43
+ * (may change on window resize or through {@linkcode MutableProp.changeProp})
44
+ */
45
+ ChangeableProp extends Record<string, any>> {
46
+ /**
47
+ * The properties that were set while initialization.
48
+ * These properties do not change throughout time.
49
+ */
50
+ protected _initProp: (StaticProp & ChangeableProp);
51
+ /**
52
+ * A callback that is launched when properties are changed on window resize
53
+ */
54
+ protected _onResponsive: () => void;
55
+ /**
56
+ * A callback that is launched when properties are changed
57
+ * through {@linkcode MutableProp.changeProp}
58
+ */
59
+ protected _onChange: (prop: ChangeableProp) => void;
60
+ /**
61
+ * Name of the responsive properties.
62
+ */
63
+ protected _name: string;
64
+ /**
65
+ * Vevet Application.
66
+ */
67
+ protected _app: Application;
68
+ /**
69
+ * @description Reference properties.
70
+ * These properties may change only through {@linkcode MutableProp.changeProp}.
71
+ */
72
+ protected _refProp: StaticProp & ChangeableProp;
73
+ /**
74
+ * Current properties.
75
+ * These properties may change both on {@linkcode MutableProp.changeProp} and resize.
76
+ */
77
+ protected _prop: StaticProp & ChangeableProp;
78
+ /**
79
+ * A set of responsive rules
80
+ */
81
+ protected _responsiveRules: NMutableProp.Responsive<ChangeableProp>[];
82
+ /**
83
+ * Get current properties
84
+ */
85
+ get prop(): StaticProp & ChangeableProp;
86
+ /**
87
+ * Viewport callback
88
+ */
89
+ protected _viewportCallback: NCallbacks.AddedCallback | undefined;
90
+ /**
91
+ * @example
92
+ * const static = {
93
+ * myProp: true,
94
+ * };
95
+ * const responsive = [
96
+ * {
97
+ * breakpoint: 'm',
98
+ * settings: {
99
+ * myProp: false
100
+ * }
101
+ * }
102
+ * ];
103
+ * const prop = new MutableProp(static, responsive);
104
+ */
105
+ constructor(
106
+ /**
107
+ * The properties that were set while initialization.
108
+ * These properties do not change throughout time.
109
+ */
110
+ _initProp: (StaticProp & ChangeableProp),
111
+ /**
112
+ * A callback that is launched when properties are changed on window resize
113
+ */
114
+ _onResponsive?: () => void,
115
+ /**
116
+ * A callback that is launched when properties are changed
117
+ * through {@linkcode MutableProp.changeProp}
118
+ */
119
+ _onChange?: (prop: ChangeableProp) => void,
120
+ /**
121
+ * Name of the responsive properties.
122
+ */
123
+ _name?: string);
124
+ /**
125
+ * Add responsive rules
126
+ */
127
+ addResponsiveProp(rules: NMutableProp.Responsive<ChangeableProp>): void;
128
+ /**
129
+ * Change properties according to the "responsive" settings
130
+ * @param onResize - If the method was called on window resize.
131
+ */
132
+ protected _responseProp(onResize?: boolean): void;
133
+ /**
134
+ * This method allows you to change the properties manually.
135
+ */
136
+ changeProp(prop: ChangeableProp): void;
137
+ /**
138
+ * Destroy the responsive properties.
139
+ */
140
+ destroy(): void;
141
+ }
142
+ //# sourceMappingURL=MutableProp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MutableProp.d.ts","sourceRoot":"","sources":["../../../src/ts/base/MutableProp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC,yBAAiB,YAAY,CAAC;IAE1B,UAAiB,UAAU,CAAC,CAAC;QACzB;;;;;;;;;;;;WAYG;QACH,UAAU,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;QACrE,QAAQ,EAAE,CAAC,CAAC;KACf;CAEJ;AAID;;;;;;;;;;;;;GAaG;AACH,qBAAa,WAAW;AACpB;;GAEG;AACH,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;AACtC;;;GAGG;AACH,cAAc,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAsDtC;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC;IAClD;;OAEG;IACH,SAAS,CAAC,aAAa,EAAE,MAAM,IAAI;IACnC;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI;IACnD;;OAEG;IACH,SAAS,CAAC,KAAK;IArEnB;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,UAAU,GAAG,cAAc,CAAC;IAEhD;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,cAAc,CAAC;IAE7C;;OAEG;IACH,SAAS,CAAC,gBAAgB,EAAE,YAAY,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAM;IAE3E;;OAEG;IACH,IAAI,IAAI,gCAEP;IAED;;OAEG;IACH,SAAS,CAAC,iBAAiB,EAAE,UAAU,CAAC,aAAa,GAAG,SAAS,CAAC;IAIlE;;;;;;;;;;;;;;OAcG;;IAEC;;;OAGG;IACO,SAAS,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC;IAClD;;OAEG;IACO,aAAa,GAAE,MAAM,IAAe;IAC9C;;;OAGG;IACO,SAAS,GAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAe;IAC9D;;OAEG;IACO,KAAK,SAAoB;IASvC;;OAEG;IACI,iBAAiB,CACpB,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,cAAc,CAAC;IAiBlD;;;OAGG;IACH,SAAS,CAAC,aAAa,CACnB,QAAQ,UAAQ;IA2DpB;;OAEG;IACI,UAAU,CACb,IAAI,EAAE,cAAc;IAWxB;;OAEG;IACI,OAAO;CAKjB"}
@@ -0,0 +1,35 @@
1
+ import { Module, NModule } from './Module';
2
+ export declare namespace NPlugin {
3
+ /**
4
+ * Static properties
5
+ */
6
+ interface StaticProp {
7
+ }
8
+ /**
9
+ * Changeable Properties
10
+ */
11
+ interface ChangeableProp {
12
+ }
13
+ /**
14
+ * Available callbacks
15
+ */
16
+ interface CallbacksTypes extends NModule.CallbacksTypes {
17
+ }
18
+ }
19
+ /**
20
+ * A class for Plugins.
21
+ */
22
+ export declare abstract class Plugin<StaticProp extends NPlugin.StaticProp = NPlugin.StaticProp, ChangeableProp extends NPlugin.ChangeableProp = NPlugin.ChangeableProp, CallbacksTypes extends NPlugin.CallbacksTypes = NPlugin.CallbacksTypes, Component = any> extends Module<StaticProp, ChangeableProp, CallbacksTypes> {
23
+ constructor(initialProp?: (StaticProp & ChangeableProp));
24
+ protected _component: Component;
25
+ get component(): Component;
26
+ /**
27
+ * Initializes the class
28
+ */
29
+ init(): void;
30
+ /**
31
+ * Initialize the plugin
32
+ */
33
+ initPlugin(parent: Component): void;
34
+ }
35
+ //# sourceMappingURL=Plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../../src/ts/base/Plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAI3C,yBAAiB,OAAO,CAAC;IAErB;;OAEG;IACH,UAAiB,UAAU;KAAG;IAE9B;;OAEG;IACH,UAAiB,cAAc;KAAG;IAElC;;OAEG;IACH,UAAiB,cAAe,SAAQ,OAAO,CAAC,cAAc;KAAG;CAEpE;AAID;;GAEG;AACH,8BAAsB,MAAM,CACxB,UAAU,SAAS,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,EAC1D,cAAc,SAAS,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,EACtE,cAAc,SAAS,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,EACtE,SAAS,GAAG,GAAG,CACjB,SAAQ,MAAM,CACZ,UAAU,EACV,cAAc,EACd,cAAc,CACjB;gBAEO,WAAW,CAAC,EAAE,CAAC,UAAU,GAAG,cAAc,CAAC;IAO/C,SAAS,CAAC,UAAU,EAAG,SAAS,CAAC;IACjC,IAAI,SAAS,cAEZ;IAID;;OAEG;IACI,IAAI;IAOX;;OAEG;IACI,UAAU,CACb,MAAM,EAAE,SAAS;CAQxB"}