vevet 5.2.1 → 5.4.0
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.
- package/README.md +0 -6
- package/lib/cdn/vevet.iife.min.js +11 -14
- package/lib/cjs/base/Callbacks/index.js +3 -2
- package/lib/cjs/base/Callbacks/index.js.map +1 -1
- package/lib/cjs/base/Responsive/index.js +0 -9
- package/lib/cjs/base/Responsive/index.js.map +1 -1
- package/lib/cjs/components/Cursor/HoverElement/index.js +250 -0
- package/lib/cjs/components/Cursor/HoverElement/index.js.map +1 -0
- package/lib/cjs/components/Cursor/HoverElement/types.js.map +1 -0
- package/lib/cjs/components/Cursor/Path/index.js +109 -0
- package/lib/cjs/components/Cursor/Path/index.js.map +1 -0
- package/lib/cjs/components/Cursor/Path/svgQuadraticCurvePath.js +15 -0
- package/lib/cjs/components/Cursor/Path/svgQuadraticCurvePath.js.map +1 -0
- package/lib/cjs/components/Cursor/Path/types.js.map +1 -0
- package/lib/cjs/components/Cursor/constants.js +5 -0
- package/lib/cjs/components/Cursor/constants.js.map +1 -0
- package/lib/cjs/components/Cursor/index.js +204 -111
- package/lib/cjs/components/Cursor/index.js.map +1 -1
- package/lib/cjs/components/Cursor/styles.js +3 -2
- package/lib/cjs/components/Cursor/styles.js.map +1 -1
- package/lib/cjs/components/InView/index.js +14 -5
- package/lib/cjs/components/InView/index.js.map +1 -1
- package/lib/cjs/components/Marquee/index.js +21 -10
- package/lib/cjs/components/Marquee/index.js.map +1 -1
- package/lib/cjs/components/ProgressPreloader/index.js +26 -7
- package/lib/cjs/components/ProgressPreloader/index.js.map +1 -1
- package/lib/cjs/components/Scrollbar/styles.js +2 -1
- package/lib/cjs/components/Scrollbar/styles.js.map +1 -1
- package/lib/cjs/components/Snap/index.js +33 -50
- package/lib/cjs/components/Snap/index.js.map +1 -1
- package/lib/cjs/components/Snap/logic/Keyboard/index.js +35 -0
- package/lib/cjs/components/Snap/logic/Keyboard/index.js.map +1 -0
- package/lib/cjs/components/Snap/logic/SnapLogic/index.js +31 -0
- package/lib/cjs/components/Snap/logic/SnapLogic/index.js.map +1 -0
- package/lib/cjs/components/Snap/{Swipe → logic/Swipe}/index.js +57 -45
- package/lib/cjs/components/Snap/logic/Swipe/index.js.map +1 -0
- package/lib/cjs/components/Snap/logic/Swipe/types.js.map +1 -0
- package/lib/cjs/components/Snap/{Track → logic/Track}/index.js +77 -29
- package/lib/cjs/components/Snap/logic/Track/index.js.map +1 -0
- package/lib/cjs/components/Snap/logic/Track/types.js.map +1 -0
- package/lib/cjs/components/Snap/{Wheel → logic/Wheel}/index.js +49 -40
- package/lib/cjs/components/Snap/logic/Wheel/index.js.map +1 -0
- package/lib/cjs/components/Snap/logic/Wheel/types.js.map +1 -0
- package/lib/cjs/components/Snap/{Slide → slide/Slide}/index.js +8 -8
- package/lib/cjs/components/Snap/slide/Slide/index.js.map +1 -0
- package/lib/cjs/components/Snap/slide/Slide/types.js +3 -0
- package/lib/cjs/components/Snap/slide/Slide/types.js.map +1 -0
- package/lib/cjs/components/Snap/slide/SlideParallax/constants.js +106 -0
- package/lib/cjs/components/Snap/slide/SlideParallax/constants.js.map +1 -0
- package/lib/cjs/components/Snap/slide/SlideParallax/globals.js.map +1 -0
- package/lib/cjs/components/Snap/{SlideParallax → slide/SlideParallax}/index.js +65 -34
- package/lib/cjs/components/Snap/slide/SlideParallax/index.js.map +1 -0
- package/lib/cjs/components/Snap/slide/SlideParallax/types.js +3 -0
- package/lib/cjs/components/Snap/slide/SlideParallax/types.js.map +1 -0
- package/lib/cjs/components/Swipe/index.js +8 -0
- package/lib/cjs/components/Swipe/index.js.map +1 -1
- package/lib/cjs/core/handlers/createViewport/index.js +0 -22
- package/lib/cjs/core/handlers/createViewport/index.js.map +1 -1
- package/lib/cjs/core/index.js +0 -2
- package/lib/cjs/core/index.js.map +1 -1
- package/lib/cjs/internal/prependStyles.js +14 -0
- package/lib/cjs/internal/prependStyles.js.map +1 -0
- package/lib/cjs/internal/safeAction.js +13 -0
- package/lib/cjs/internal/safeAction.js.map +1 -0
- package/lib/cjs/manifest.json +1 -1
- package/lib/esm/base/Callbacks/index.js +3 -2
- package/lib/esm/base/Callbacks/index.js.map +1 -1
- package/lib/esm/base/Responsive/index.js +0 -9
- package/lib/esm/base/Responsive/index.js.map +1 -1
- package/lib/esm/components/Cursor/HoverElement/index.js +200 -0
- package/lib/esm/components/Cursor/HoverElement/index.js.map +1 -0
- package/lib/esm/components/Cursor/HoverElement/types.js.map +1 -0
- package/lib/esm/components/Cursor/Path/index.js +91 -0
- package/lib/esm/components/Cursor/Path/index.js.map +1 -0
- package/lib/esm/components/Cursor/Path/svgQuadraticCurvePath.js +11 -0
- package/lib/esm/components/Cursor/Path/svgQuadraticCurvePath.js.map +1 -0
- package/lib/esm/components/Cursor/Path/types.js.map +1 -0
- package/lib/esm/components/Cursor/constants.js +2 -0
- package/lib/esm/components/Cursor/constants.js.map +1 -0
- package/lib/esm/components/Cursor/index.js +192 -121
- package/lib/esm/components/Cursor/index.js.map +1 -1
- package/lib/esm/components/Cursor/styles.js +5 -7
- package/lib/esm/components/Cursor/styles.js.map +1 -1
- package/lib/esm/components/InView/index.js +14 -5
- package/lib/esm/components/InView/index.js.map +1 -1
- package/lib/esm/components/Marquee/index.js +16 -9
- package/lib/esm/components/Marquee/index.js.map +1 -1
- package/lib/esm/components/ProgressPreloader/index.js +18 -7
- package/lib/esm/components/ProgressPreloader/index.js.map +1 -1
- package/lib/esm/components/Scrollbar/styles.js +3 -2
- package/lib/esm/components/Scrollbar/styles.js.map +1 -1
- package/lib/esm/components/Snap/index.js +33 -50
- package/lib/esm/components/Snap/index.js.map +1 -1
- package/lib/esm/components/Snap/logic/Keyboard/index.js +13 -0
- package/lib/esm/components/Snap/logic/Keyboard/index.js.map +1 -0
- package/lib/esm/components/Snap/{Keyboard → logic/SnapLogic}/index.js +4 -6
- package/lib/esm/components/Snap/logic/SnapLogic/index.js.map +1 -0
- package/lib/esm/components/Snap/{Swipe → logic/Swipe}/index.js +35 -39
- package/lib/esm/components/Snap/logic/Swipe/index.js.map +1 -0
- package/lib/esm/components/Snap/logic/Swipe/types.js.map +1 -0
- package/lib/esm/components/Snap/{Track → logic/Track}/index.js +47 -28
- package/lib/esm/components/Snap/logic/Track/index.js.map +1 -0
- package/lib/esm/components/Snap/logic/Track/types.js.map +1 -0
- package/lib/esm/components/Snap/{Wheel → logic/Wheel}/index.js +28 -31
- package/lib/esm/components/Snap/logic/Wheel/index.js.map +1 -0
- package/lib/esm/components/Snap/logic/Wheel/types.js.map +1 -0
- package/lib/esm/components/Snap/{Slide → slide/Slide}/index.js +8 -8
- package/lib/esm/components/Snap/slide/Slide/index.js.map +1 -0
- package/lib/esm/components/Snap/slide/Slide/types.js +2 -0
- package/lib/esm/components/Snap/slide/Slide/types.js.map +1 -0
- package/lib/esm/components/Snap/slide/SlideParallax/constants.js +97 -0
- package/lib/esm/components/Snap/slide/SlideParallax/constants.js.map +1 -0
- package/lib/esm/components/Snap/slide/SlideParallax/globals.js.map +1 -0
- package/lib/esm/components/Snap/{SlideParallax → slide/SlideParallax}/index.js +61 -34
- package/lib/esm/components/Snap/slide/SlideParallax/index.js.map +1 -0
- package/lib/esm/components/Snap/slide/SlideParallax/types.js +2 -0
- package/lib/esm/components/Snap/slide/SlideParallax/types.js.map +1 -0
- package/lib/esm/components/Swipe/index.js +4 -0
- package/lib/esm/components/Swipe/index.js.map +1 -1
- package/lib/esm/core/handlers/createViewport/index.js +0 -22
- package/lib/esm/core/handlers/createViewport/index.js.map +1 -1
- package/lib/esm/core/index.js +0 -2
- package/lib/esm/core/index.js.map +1 -1
- package/lib/esm/internal/prependStyles.js +11 -0
- package/lib/esm/internal/prependStyles.js.map +1 -0
- package/lib/esm/internal/safeAction.js +10 -0
- package/lib/esm/internal/safeAction.js.map +1 -0
- package/lib/esm/manifest.json +1 -1
- package/lib/types/base/Callbacks/index.d.ts.map +1 -1
- package/lib/types/base/Responsive/index.d.ts.map +1 -1
- package/lib/types/components/Cursor/HoverElement/index.d.ts +60 -0
- package/lib/types/components/Cursor/HoverElement/index.d.ts.map +1 -0
- package/lib/types/components/Cursor/HoverElement/types.d.ts +60 -0
- package/lib/types/components/Cursor/HoverElement/types.d.ts.map +1 -0
- package/lib/types/components/Cursor/Path/index.d.ts +26 -0
- package/lib/types/components/Cursor/Path/index.d.ts.map +1 -0
- package/lib/types/components/Cursor/Path/svgQuadraticCurvePath.d.ts +3 -0
- package/lib/types/components/Cursor/Path/svgQuadraticCurvePath.d.ts.map +1 -0
- package/lib/types/components/Cursor/Path/types.d.ts +11 -0
- package/lib/types/components/Cursor/Path/types.d.ts.map +1 -0
- package/lib/types/components/Cursor/constants.d.ts +2 -0
- package/lib/types/components/Cursor/constants.d.ts.map +1 -0
- package/lib/types/components/Cursor/index.d.ts +51 -46
- package/lib/types/components/Cursor/index.d.ts.map +1 -1
- package/lib/types/components/Cursor/styles.d.ts.map +1 -1
- package/lib/types/components/Cursor/types.d.ts +43 -41
- package/lib/types/components/Cursor/types.d.ts.map +1 -1
- package/lib/types/components/InView/index.d.ts +2 -0
- package/lib/types/components/InView/index.d.ts.map +1 -1
- package/lib/types/components/Marquee/index.d.ts +5 -1
- package/lib/types/components/Marquee/index.d.ts.map +1 -1
- package/lib/types/components/ProgressPreloader/index.d.ts +6 -0
- package/lib/types/components/ProgressPreloader/index.d.ts.map +1 -1
- package/lib/types/components/ProgressPreloader/types.d.ts +5 -0
- package/lib/types/components/ProgressPreloader/types.d.ts.map +1 -1
- package/lib/types/components/Scrollbar/styles.d.ts.map +1 -1
- package/lib/types/components/Snap/index.d.ts +7 -12
- package/lib/types/components/Snap/index.d.ts.map +1 -1
- package/lib/types/components/Snap/logic/Keyboard/index.d.ts +8 -0
- package/lib/types/components/Snap/logic/Keyboard/index.d.ts.map +1 -0
- package/lib/types/components/Snap/logic/SnapLogic/index.d.ts +14 -0
- package/lib/types/components/Snap/logic/SnapLogic/index.d.ts.map +1 -0
- package/lib/types/components/Snap/{Swipe → logic/Swipe}/index.d.ts +11 -16
- package/lib/types/components/Snap/logic/Swipe/index.d.ts.map +1 -0
- package/lib/types/components/Snap/logic/Swipe/types.d.ts.map +1 -0
- package/lib/types/components/Snap/{Track → logic/Track}/index.d.ts +14 -9
- package/lib/types/components/Snap/logic/Track/index.d.ts.map +1 -0
- package/lib/types/components/Snap/logic/Track/types.d.ts.map +1 -0
- package/lib/types/components/Snap/{Wheel → logic/Wheel}/index.d.ts +4 -10
- package/lib/types/components/Snap/logic/Wheel/index.d.ts.map +1 -0
- package/lib/types/components/Snap/logic/Wheel/types.d.ts.map +1 -0
- package/lib/types/components/Snap/{Slide → slide/Slide}/index.d.ts +7 -7
- package/lib/types/components/Snap/slide/Slide/index.d.ts.map +1 -0
- package/lib/types/components/Snap/slide/Slide/types.d.ts.map +1 -0
- package/lib/types/components/Snap/slide/SlideParallax/constants.d.ts +5 -0
- package/lib/types/components/Snap/slide/SlideParallax/constants.d.ts.map +1 -0
- package/lib/types/components/Snap/slide/SlideParallax/globals.d.ts.map +1 -0
- package/lib/types/components/Snap/{SlideParallax → slide/SlideParallax}/index.d.ts +5 -1
- package/lib/types/components/Snap/slide/SlideParallax/index.d.ts.map +1 -0
- package/lib/types/components/Snap/{SlideParallax → slide/SlideParallax}/types.d.ts +14 -5
- package/lib/types/components/Snap/slide/SlideParallax/types.d.ts.map +1 -0
- package/lib/types/components/Snap/types.d.ts +16 -5
- package/lib/types/components/Snap/types.d.ts.map +1 -1
- package/lib/types/components/Swipe/index.d.ts.map +1 -1
- package/lib/types/components/Swipe/types.d.ts +2 -1
- package/lib/types/components/Swipe/types.d.ts.map +1 -1
- package/lib/types/core/handlers/createViewport/index.d.ts.map +1 -1
- package/lib/types/core/handlers/createViewport/types.d.ts +0 -6
- package/lib/types/core/handlers/createViewport/types.d.ts.map +1 -1
- package/lib/types/core/index.d.ts.map +1 -1
- package/lib/types/core/types.d.ts +0 -14
- package/lib/types/core/types.d.ts.map +1 -1
- package/lib/types/internal/prependStyles.d.ts +2 -0
- package/lib/types/internal/prependStyles.d.ts.map +1 -0
- package/lib/types/internal/safeAction.d.ts +2 -0
- package/lib/types/internal/safeAction.d.ts.map +1 -0
- package/package.json +24 -15
- package/src/base/Callbacks/index.ts +6 -2
- package/src/base/Responsive/index.ts +1 -11
- package/src/components/Cursor/HoverElement/index.ts +283 -0
- package/src/components/Cursor/HoverElement/types.ts +75 -0
- package/src/components/Cursor/Path/index.ts +120 -0
- package/src/components/Cursor/Path/svgQuadraticCurvePath.ts +16 -0
- package/src/components/Cursor/Path/types.ts +11 -0
- package/src/components/Cursor/constants.ts +1 -0
- package/src/components/Cursor/index.ts +273 -171
- package/src/components/Cursor/styles.ts +5 -7
- package/src/components/Cursor/types.ts +47 -44
- package/src/components/InView/index.ts +17 -7
- package/src/components/Marquee/index.ts +18 -11
- package/src/components/ProgressPreloader/index.ts +26 -7
- package/src/components/ProgressPreloader/types.ts +6 -0
- package/src/components/Scrollbar/styles.ts +3 -2
- package/src/components/Snap/index.ts +43 -61
- package/src/components/Snap/logic/Keyboard/index.ts +18 -0
- package/src/components/Snap/logic/SnapLogic/index.ts +25 -0
- package/src/components/Snap/{Swipe → logic/Swipe}/index.ts +41 -44
- package/src/components/Snap/{Track → logic/Track}/index.ts +60 -30
- package/src/components/Snap/{Wheel → logic/Wheel}/index.ts +26 -32
- package/src/components/Snap/{Slide → slide/Slide}/index.ts +8 -8
- package/src/components/Snap/slide/SlideParallax/constants.ts +102 -0
- package/src/components/Snap/{SlideParallax → slide/SlideParallax}/index.ts +76 -40
- package/src/components/Snap/{SlideParallax → slide/SlideParallax}/types.ts +15 -5
- package/src/components/Snap/types.ts +18 -5
- package/src/components/Swipe/index.ts +8 -0
- package/src/components/Swipe/types.ts +4 -1
- package/src/core/handlers/createViewport/index.ts +0 -25
- package/src/core/handlers/createViewport/types.ts +0 -9
- package/src/core/index.ts +0 -2
- package/src/core/types.ts +0 -16
- package/src/internal/prependStyles.ts +9 -0
- package/src/internal/safeAction.ts +8 -0
- package/src/manifest.json +1 -1
- package/lib/cjs/components/Snap/Keyboard/index.js +0 -33
- package/lib/cjs/components/Snap/Keyboard/index.js.map +0 -1
- package/lib/cjs/components/Snap/Slide/index.js.map +0 -1
- package/lib/cjs/components/Snap/Slide/types.js.map +0 -1
- package/lib/cjs/components/Snap/SlideParallax/constants.js +0 -101
- package/lib/cjs/components/Snap/SlideParallax/constants.js.map +0 -1
- package/lib/cjs/components/Snap/SlideParallax/globals.js.map +0 -1
- package/lib/cjs/components/Snap/SlideParallax/index.js.map +0 -1
- package/lib/cjs/components/Snap/SlideParallax/types.js.map +0 -1
- package/lib/cjs/components/Snap/Swipe/index.js.map +0 -1
- package/lib/cjs/components/Snap/Swipe/types.js.map +0 -1
- package/lib/cjs/components/Snap/Track/index.js.map +0 -1
- package/lib/cjs/components/Snap/Track/types.js.map +0 -1
- package/lib/cjs/components/Snap/Wheel/index.js.map +0 -1
- package/lib/cjs/components/Snap/Wheel/types.js.map +0 -1
- package/lib/esm/components/Snap/Keyboard/index.js.map +0 -1
- package/lib/esm/components/Snap/Slide/index.js.map +0 -1
- package/lib/esm/components/Snap/Slide/types.js.map +0 -1
- package/lib/esm/components/Snap/SlideParallax/constants.js +0 -95
- package/lib/esm/components/Snap/SlideParallax/constants.js.map +0 -1
- package/lib/esm/components/Snap/SlideParallax/globals.js.map +0 -1
- package/lib/esm/components/Snap/SlideParallax/index.js.map +0 -1
- package/lib/esm/components/Snap/SlideParallax/types.js.map +0 -1
- package/lib/esm/components/Snap/Swipe/index.js.map +0 -1
- package/lib/esm/components/Snap/Swipe/types.js.map +0 -1
- package/lib/esm/components/Snap/Track/index.js.map +0 -1
- package/lib/esm/components/Snap/Track/types.js.map +0 -1
- package/lib/esm/components/Snap/Wheel/index.js.map +0 -1
- package/lib/esm/components/Snap/Wheel/types.js.map +0 -1
- package/lib/styles/index.scss +0 -32
- package/lib/types/components/Snap/Keyboard/index.d.ts +0 -14
- package/lib/types/components/Snap/Keyboard/index.d.ts.map +0 -1
- package/lib/types/components/Snap/Slide/index.d.ts.map +0 -1
- package/lib/types/components/Snap/Slide/types.d.ts.map +0 -1
- package/lib/types/components/Snap/SlideParallax/constants.d.ts +0 -7
- package/lib/types/components/Snap/SlideParallax/constants.d.ts.map +0 -1
- package/lib/types/components/Snap/SlideParallax/globals.d.ts.map +0 -1
- package/lib/types/components/Snap/SlideParallax/index.d.ts.map +0 -1
- package/lib/types/components/Snap/SlideParallax/types.d.ts.map +0 -1
- package/lib/types/components/Snap/Swipe/index.d.ts.map +0 -1
- package/lib/types/components/Snap/Swipe/types.d.ts.map +0 -1
- package/lib/types/components/Snap/Track/index.d.ts.map +0 -1
- package/lib/types/components/Snap/Track/types.d.ts.map +0 -1
- package/lib/types/components/Snap/Wheel/index.d.ts.map +0 -1
- package/lib/types/components/Snap/Wheel/types.d.ts.map +0 -1
- package/src/components/Snap/Keyboard/index.ts +0 -30
- package/src/components/Snap/SlideParallax/constants.ts +0 -100
- package/src/styles/index.scss +0 -32
- /package/lib/cjs/components/{Snap/Slide → Cursor/HoverElement}/types.js +0 -0
- /package/lib/cjs/components/{Snap/SlideParallax → Cursor/Path}/types.js +0 -0
- /package/lib/cjs/components/Snap/{Swipe → logic/Swipe}/types.js +0 -0
- /package/lib/cjs/components/Snap/{Track → logic/Track}/types.js +0 -0
- /package/lib/cjs/components/Snap/{Wheel → logic/Wheel}/types.js +0 -0
- /package/lib/cjs/components/Snap/{SlideParallax → slide/SlideParallax}/globals.js +0 -0
- /package/lib/esm/components/{Snap/Slide → Cursor/HoverElement}/types.js +0 -0
- /package/lib/esm/components/{Snap/SlideParallax → Cursor/Path}/types.js +0 -0
- /package/lib/esm/components/Snap/{Swipe → logic/Swipe}/types.js +0 -0
- /package/lib/esm/components/Snap/{Track → logic/Track}/types.js +0 -0
- /package/lib/esm/components/Snap/{Wheel → logic/Wheel}/types.js +0 -0
- /package/lib/esm/components/Snap/{SlideParallax → slide/SlideParallax}/globals.js +0 -0
- /package/lib/types/components/Snap/{Swipe → logic/Swipe}/types.d.ts +0 -0
- /package/lib/types/components/Snap/{Track → logic/Track}/types.d.ts +0 -0
- /package/lib/types/components/Snap/{Wheel → logic/Wheel}/types.d.ts +0 -0
- /package/lib/types/components/Snap/{Slide → slide/Slide}/types.d.ts +0 -0
- /package/lib/types/components/Snap/{SlideParallax → slide/SlideParallax}/globals.d.ts +0 -0
- /package/src/components/Snap/{Swipe → logic/Swipe}/types.ts +0 -0
- /package/src/components/Snap/{Track → logic/Track}/types.ts +0 -0
- /package/src/components/Snap/{Wheel → logic/Wheel}/types.ts +0 -0
- /package/src/components/Snap/{Slide → slide/Slide}/types.ts +0 -0
- /package/src/components/Snap/{SlideParallax → slide/SlideParallax}/globals.ts +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Information about the currently hovered element affecting cursor behavior.
|
|
3
|
+
*/
|
|
4
|
+
export interface ICursorHoverElementProps {
|
|
5
|
+
/** Hoverable DOM element */
|
|
6
|
+
element: Element;
|
|
7
|
+
/** Cursor type to activate on hover */
|
|
8
|
+
type?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Debounce time for hover events, in milliseconds
|
|
11
|
+
* @default 16
|
|
12
|
+
*/
|
|
13
|
+
hoverDebounce?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Snap cursor to the element center.
|
|
16
|
+
* Does not work with `behavior: "path"`.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
snap?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Target cursor width on hover.
|
|
22
|
+
* Supports css units like `px`, `rem`, `vw`, `vh`, `svh`.
|
|
23
|
+
* @default null
|
|
24
|
+
*/
|
|
25
|
+
width?: null | number | 'auto' | (string & {});
|
|
26
|
+
/**
|
|
27
|
+
* Target cursor height on hover.
|
|
28
|
+
* Supports css units like `px`, `rem`, `vw`, `vh`, `svh`.
|
|
29
|
+
* @default null
|
|
30
|
+
*/
|
|
31
|
+
height?: null | number | 'auto' | (string & {});
|
|
32
|
+
/**
|
|
33
|
+
* Padding applied around the cursor.
|
|
34
|
+
* Supports css units like `px`, `rem`, `vw`, `vh`, `svh`.
|
|
35
|
+
* @default 0
|
|
36
|
+
*/
|
|
37
|
+
padding?: number | string;
|
|
38
|
+
/**
|
|
39
|
+
* Enable sticky behavior for the hovered element.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
sticky?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Linear interpolation factor for smooth sticky animation.
|
|
45
|
+
* @default this.props.lerp
|
|
46
|
+
*/
|
|
47
|
+
stickyLerp?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Sticky animation amplitude.
|
|
50
|
+
* Supports css units like `px`, `rem`, `vw`, `vh`, `svh`.
|
|
51
|
+
* @default 'auto'
|
|
52
|
+
*/
|
|
53
|
+
stickyAmplitude?: TCursorHoverElementStickyAmplitude | TCursorHoverElementStickyAmplitudeObject;
|
|
54
|
+
}
|
|
55
|
+
export type TCursorHoverElementStickyAmplitude = number | 'auto' | (string & {});
|
|
56
|
+
export type TCursorHoverElementStickyAmplitudeObject = {
|
|
57
|
+
x: TCursorHoverElementStickyAmplitude;
|
|
58
|
+
y: TCursorHoverElementStickyAmplitude;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Cursor/HoverElement/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,4BAA4B;IAC5B,OAAO,EAAE,OAAO,CAAC;IAEjB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAE/C;;;;OAIG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAEhD;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,eAAe,CAAC,EACZ,kCAAkC,GAClC,wCAAwC,CAAC;CAC9C;AAED,MAAM,MAAM,kCAAkC,GAC1C,MAAM,GACN,MAAM,GACN,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,wCAAwC,GAAG;IACrD,CAAC,EAAE,kCAAkC,CAAC;IACtC,CAAC,EAAE,kCAAkC,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ICursorPathPoint, ICursorPathVec2 } from './types';
|
|
2
|
+
export declare class CursorPath {
|
|
3
|
+
protected _isEnabled: boolean;
|
|
4
|
+
/** Cursor SVG Path Points */
|
|
5
|
+
protected _points: ICursorPathPoint[];
|
|
6
|
+
/** Cursor SVG Path */
|
|
7
|
+
protected _path: SVGPathElement;
|
|
8
|
+
/** Cursor SVG Path Line */
|
|
9
|
+
protected _line: {
|
|
10
|
+
current: number;
|
|
11
|
+
target: number;
|
|
12
|
+
};
|
|
13
|
+
get path(): SVGPathElement;
|
|
14
|
+
constructor(_isEnabled: boolean);
|
|
15
|
+
/** Update SVG Path */
|
|
16
|
+
addPoint(coords: ICursorPathVec2, isInstant?: boolean): void;
|
|
17
|
+
/** Minimize SVG Path */
|
|
18
|
+
minimize(): void;
|
|
19
|
+
/** Check if the path is interpolated */
|
|
20
|
+
get isInterpolated(): boolean;
|
|
21
|
+
/** Interpolate line */
|
|
22
|
+
lerp(factor: number): void;
|
|
23
|
+
/** Get current coordinate */
|
|
24
|
+
get coord(): DOMPoint;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Cursor/Path/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG5D,qBAAa,UAAU;IAcT,SAAS,CAAC,UAAU,EAAE,OAAO;IAbzC,6BAA6B;IAC7B,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAM;IAE3C,sBAAsB;IACtB,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC;IAEhC,2BAA2B;IAC3B,SAAS,CAAC,KAAK;;;MAA6B;IAE5C,IAAI,IAAI,mBAEP;gBAEqB,UAAU,EAAE,OAAO;IAOzC,sBAAsB;IACf,QAAQ,CAAC,MAAM,EAAE,eAAe,EAAE,SAAS,UAAQ;IA2B1D,wBAAwB;IACjB,QAAQ;IAgDf,wCAAwC;IACxC,IAAW,cAAc,YAExB;IAED,uBAAuB;IAChB,IAAI,CAAC,MAAM,EAAE,MAAM;IAM1B,6BAA6B;IAC7B,IAAI,KAAK,aAER;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svgQuadraticCurvePath.d.ts","sourceRoot":"","sources":["../../../../../src/components/Cursor/Path/svgQuadraticCurvePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,qBAAqB,WAAY,gBAAgB,EAAE,WAa/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Cursor/Path/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/Cursor/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,SAAS,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { TRequiredProps } from '../../internal/requiredProps';
|
|
2
|
-
import { ICursorCallbacksMap, ICursorFullCoords,
|
|
2
|
+
import { ICursorCallbacksMap, ICursorFullCoords, ICursorMutableProps, ICursorStaticProps, ICursorTargetCoords, ICursorType } from './types';
|
|
3
3
|
import { Module, TModuleOnCallbacksProps } from '../../base/Module';
|
|
4
4
|
import { Raf } from '../Raf';
|
|
5
|
+
import { CursorPath } from './Path';
|
|
6
|
+
import { CursorHoverElement } from './HoverElement';
|
|
7
|
+
import { ICursorHoverElementProps } from './HoverElement/types';
|
|
5
8
|
export * from './types';
|
|
9
|
+
export type { ICursorHoverElementProps };
|
|
6
10
|
/**
|
|
7
11
|
* A customizable custom cursor component with smooth animations and hover interactions.
|
|
8
12
|
* Supports dynamic appearance changes and enhanced user interaction.
|
|
@@ -16,6 +20,38 @@ export declare class Cursor<C extends ICursorCallbacksMap = ICursorCallbacksMap,
|
|
|
16
20
|
_getStatic(): TRequiredProps<S>;
|
|
17
21
|
/** Get default mutable properties */
|
|
18
22
|
_getMutable(): TRequiredProps<M>;
|
|
23
|
+
/** The outer element of the custom cursor */
|
|
24
|
+
protected _outer: HTMLElement;
|
|
25
|
+
/** The inner element of the custom cursor. */
|
|
26
|
+
protected _inner: HTMLElement;
|
|
27
|
+
/** Attached hover elements */
|
|
28
|
+
protected _hoverElements: CursorHoverElement[];
|
|
29
|
+
/** Active hovered element */
|
|
30
|
+
protected _activeHoverElements: CursorHoverElement[];
|
|
31
|
+
/** Request animation frame handler */
|
|
32
|
+
protected _raf: Raf;
|
|
33
|
+
/** The current coordinates */
|
|
34
|
+
protected _coords: ICursorFullCoords;
|
|
35
|
+
/** Target coordinates of the cursor. Element dimensions are not considered here (in getter - yes). */
|
|
36
|
+
protected _rawTarget: ICursorTargetCoords;
|
|
37
|
+
/** Defines if the cursor has been moved after initialization */
|
|
38
|
+
protected _isFirstMove: boolean;
|
|
39
|
+
/** Cursor types */
|
|
40
|
+
protected _types: ICursorType[];
|
|
41
|
+
/** Active cursor types */
|
|
42
|
+
protected _activeTypes: string[];
|
|
43
|
+
/** Cursor Path Instance */
|
|
44
|
+
protected _path: CursorPath;
|
|
45
|
+
constructor(props?: S & M, onCallbacks?: TModuleOnCallbacksProps<C, Cursor<C, S, M>>);
|
|
46
|
+
/** Cursor initial width */
|
|
47
|
+
get initialWidth(): number;
|
|
48
|
+
/** Cursor initial width */
|
|
49
|
+
get initialHeight(): number;
|
|
50
|
+
/**
|
|
51
|
+
* The current coordinates (x, y, width, height).
|
|
52
|
+
* These are updated during cursor movement.
|
|
53
|
+
*/
|
|
54
|
+
get coords(): ICursorFullCoords;
|
|
19
55
|
/**
|
|
20
56
|
* Classname prefix for styling elements.
|
|
21
57
|
*/
|
|
@@ -24,53 +60,27 @@ export declare class Cursor<C extends ICursorCallbacksMap = ICursorCallbacksMap,
|
|
|
24
60
|
get container(): Element | Window;
|
|
25
61
|
/** Returns the DOM parent for the cursor element. */
|
|
26
62
|
get domContainer(): HTMLElement;
|
|
27
|
-
/** The outer element of the custom cursor */
|
|
28
|
-
protected _outer: HTMLElement;
|
|
29
63
|
/**
|
|
30
64
|
* The outer element of the custom cursor.
|
|
31
65
|
* This is the visual element that represents the cursor on screen.
|
|
32
66
|
*/
|
|
33
67
|
get outer(): HTMLElement;
|
|
34
|
-
/** The inner element of the custom cursor. */
|
|
35
|
-
protected _inner: HTMLElement;
|
|
36
68
|
/**
|
|
37
69
|
* The inner element of the custom cursor.
|
|
38
70
|
* This element is nested inside the outer element and can provide additional styling.
|
|
39
71
|
*/
|
|
40
72
|
get inner(): HTMLElement;
|
|
41
|
-
/** The currently hovered element */
|
|
42
|
-
protected _hoveredElement?: ICursorHoveredElement;
|
|
43
73
|
/**
|
|
44
74
|
* The currently hovered element.
|
|
45
75
|
* Stores information about the element that the cursor is currently interacting with.
|
|
46
76
|
*/
|
|
47
|
-
get hoveredElement():
|
|
48
|
-
set hoveredElement(value: ICursorHoveredElement | undefined);
|
|
49
|
-
/** Request animation frame handler */
|
|
50
|
-
protected _raf: Raf;
|
|
51
|
-
/** The current coordinates */
|
|
52
|
-
protected _coords: ICursorFullCoords;
|
|
53
|
-
/**
|
|
54
|
-
* The current coordinates (x, y, width, height).
|
|
55
|
-
* These are updated during cursor movement.
|
|
56
|
-
*/
|
|
57
|
-
get coords(): ICursorFullCoords;
|
|
77
|
+
get hoveredElement(): CursorHoverElement | undefined;
|
|
58
78
|
/** Target coordinates of the cursor (without smooth interpolation). */
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
get
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
width: number;
|
|
65
|
-
height: number;
|
|
66
|
-
};
|
|
67
|
-
/** Defines if the cursor has been moved after initialization */
|
|
68
|
-
protected _isFirstMove: boolean;
|
|
69
|
-
/** Cursor types */
|
|
70
|
-
protected _types: ICursorType[];
|
|
71
|
-
/** Active cursor types */
|
|
72
|
-
protected _activeTypes: string[];
|
|
73
|
-
constructor(props?: S & M, onCallbacks?: TModuleOnCallbacksProps<C, Cursor<C, S, M>>);
|
|
79
|
+
get targetCoords(): ICursorFullCoords;
|
|
80
|
+
/** Returns an SVG path element which represents the cursor movement */
|
|
81
|
+
get path(): SVGPathElement;
|
|
82
|
+
/** Check if the cursor has a path */
|
|
83
|
+
protected get hasPath(): boolean;
|
|
74
84
|
/** Creates the custom cursor and appends it to the DOM. */
|
|
75
85
|
protected _createElements(): void;
|
|
76
86
|
/** Sets up the various event listeners for the cursor, such as mouse movements and clicks. */
|
|
@@ -93,15 +103,13 @@ export declare class Cursor<C extends ICursorCallbacksMap = ICursorCallbacksMap,
|
|
|
93
103
|
protected _handleWindowBlur(): void;
|
|
94
104
|
/**
|
|
95
105
|
* Registers an element to interact with the cursor, enabling dynamic size and position changes based on hover effects.
|
|
96
|
-
* @param settings The settings for the hovered element.
|
|
97
|
-
* @param {number} [enterTimeout=100] The timeout before the hover effect is applied.
|
|
98
106
|
* @returns Returns a destructor
|
|
99
107
|
*/
|
|
100
|
-
|
|
101
|
-
/** Handle element enter */
|
|
102
|
-
protected _handleElementEnter(data:
|
|
103
|
-
/** Handle element leave */
|
|
104
|
-
protected _handleElementLeave(data:
|
|
108
|
+
attachHover(settings: ICursorHoverElementProps): () => void;
|
|
109
|
+
/** Handle element mouse enter event */
|
|
110
|
+
protected _handleElementEnter(data: CursorHoverElement): void;
|
|
111
|
+
/** Handle element mouse leave event */
|
|
112
|
+
protected _handleElementLeave(data: CursorHoverElement): void;
|
|
105
113
|
/**
|
|
106
114
|
* Registers a cursor type.
|
|
107
115
|
*/
|
|
@@ -117,12 +125,9 @@ export declare class Cursor<C extends ICursorCallbacksMap = ICursorCallbacksMap,
|
|
|
117
125
|
render(): void;
|
|
118
126
|
/** Recalculates current coordinates. */
|
|
119
127
|
protected _calculate(): void;
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
* @param {number} target The target value.
|
|
124
|
-
* @returns {number} The interpolated value.
|
|
125
|
-
*/
|
|
128
|
+
/** Gets the interpolation factor. */
|
|
129
|
+
protected _getLerpFactor(input?: number): number;
|
|
130
|
+
/** Performs linear interpolation. */
|
|
126
131
|
protected _lerp(current: number, target: number): number;
|
|
127
132
|
/** Renders the cursor elements. */
|
|
128
133
|
protected _renderElements(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Cursor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,c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C,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO;IASlC,kCAAkC;IAClC,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,UAAU;IAkB3C,kCAAkC;IAClC,SAAS,CAAC,iBAAiB;IAI3B,iCAAiC;IACjC,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,UAAU;IAiD1C,iCAAiC;IACjC,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,UAAU;IAS1C,+BAA+B;IAC/B,SAAS,CAAC,cAAc;IAOxB,kCAAkC;IAClC,SAAS,CAAC,iBAAiB;IAI3B;;;OAGG;IAEI,WAAW,CAAC,QAAQ,EAAE,wBAAwB;IAmBrD,uCAAuC;IACvC,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,kBAAkB;IActD,uCAAuC;IACvC,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,kBAAkB;IAgBtD;;OAEG;IAEI,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,WAAW;IAMlD,sCAAsC;IACtC,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO;IA2BtD;;;OAGG;IACH,SAAS,KAAK,cAAc,YAwB3B;IAED,0BAA0B;IAEnB,MAAM;IAYb,wCAAwC;IACxC,SAAS,CAAC,UAAU;IA4BpB,qCAAqC;IACrC,SAAS,CAAC,cAAc,CAAC,KAAK,SAAkB;IAUhD,qCAAqC;IACrC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAO/C,mCAAmC;IACnC,SAAS,CAAC,eAAe;CAsB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Cursor/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Cursor/styles.ts"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,oBAuEhD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IModuleCallbacksMap, IModuleMutableProps, IModuleStaticProps } from '../../base/Module';
|
|
2
|
+
import { CursorHoverElement } from './HoverElement';
|
|
2
3
|
export interface ICursorStaticProps extends IModuleStaticProps {
|
|
3
4
|
/**
|
|
4
5
|
* The container where the custom cursor is active.
|
|
@@ -11,6 +12,16 @@ export interface ICursorStaticProps extends IModuleStaticProps {
|
|
|
11
12
|
* @default false
|
|
12
13
|
*/
|
|
13
14
|
hideNative?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Cursor behavior
|
|
17
|
+
* @default 'default'
|
|
18
|
+
*/
|
|
19
|
+
behavior?: 'default' | 'path';
|
|
20
|
+
/**
|
|
21
|
+
* Modifier for the cursor transform.
|
|
22
|
+
* @default (coords) => `translate(${coords.x}px, ${coords.y}px)`
|
|
23
|
+
*/
|
|
24
|
+
transformModifier?: (coords: ICursorFullCoords) => string;
|
|
14
25
|
}
|
|
15
26
|
export interface ICursorMutableProps extends IModuleMutableProps {
|
|
16
27
|
/**
|
|
@@ -20,14 +31,16 @@ export interface ICursorMutableProps extends IModuleMutableProps {
|
|
|
20
31
|
enabled?: boolean;
|
|
21
32
|
/**
|
|
22
33
|
* The initial width of the custom cursor.
|
|
34
|
+
* Supports css units like `px`, `rem`, `vw`, `vh`, `svh`.
|
|
23
35
|
* @default 50
|
|
24
36
|
*/
|
|
25
|
-
width?: number;
|
|
37
|
+
width?: number | string;
|
|
26
38
|
/**
|
|
27
39
|
* The initial height of the custom cursor.
|
|
40
|
+
* Supports css units like `px`, `rem`, `vw`, `vh`, `svh`.
|
|
28
41
|
* @default 50
|
|
29
42
|
*/
|
|
30
|
-
height?: number;
|
|
43
|
+
height?: number | string;
|
|
31
44
|
/**
|
|
32
45
|
* Linear interpolation factor for smooth cursor movement.
|
|
33
46
|
* The value must be between `0` and `1`, with higher values indicating faster movement.
|
|
@@ -49,59 +62,48 @@ export interface ICursorCallbacksMap extends IModuleCallbacksMap {
|
|
|
49
62
|
* Triggered on each render to update the cursor's position.
|
|
50
63
|
*/
|
|
51
64
|
render: undefined;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Represents the cursor's position.
|
|
55
|
-
*/
|
|
56
|
-
export interface ICursorCoords {
|
|
57
|
-
x: number;
|
|
58
|
-
y: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Represents the cursor's position and size.
|
|
62
|
-
*/
|
|
63
|
-
export interface ICursorFullCoords {
|
|
64
|
-
x: number;
|
|
65
|
-
y: number;
|
|
66
|
-
width: number;
|
|
67
|
-
height: number;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Information about the currently hovered element affecting cursor behavior.
|
|
71
|
-
*/
|
|
72
|
-
export interface ICursorHoveredElement {
|
|
73
65
|
/**
|
|
74
|
-
*
|
|
66
|
+
* Triggered when an attached element is hovered.
|
|
75
67
|
*/
|
|
76
|
-
|
|
77
|
-
/** Cursor type */
|
|
78
|
-
type?: string;
|
|
68
|
+
hoverEnter: CursorHoverElement;
|
|
79
69
|
/**
|
|
80
|
-
*
|
|
70
|
+
* Triggered when an attached element is no longer hovered.
|
|
81
71
|
*/
|
|
82
|
-
|
|
72
|
+
hoverLeave: CursorHoverElement;
|
|
83
73
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @default null
|
|
74
|
+
* Triggered when a cursor type is visible.
|
|
86
75
|
*/
|
|
87
|
-
|
|
76
|
+
typeShow: ICursorType;
|
|
88
77
|
/**
|
|
89
|
-
*
|
|
90
|
-
* @default null
|
|
78
|
+
* Triggered when a cursor type becomes invisible.
|
|
91
79
|
*/
|
|
92
|
-
|
|
80
|
+
typeHide: ICursorType;
|
|
93
81
|
/**
|
|
94
|
-
*
|
|
82
|
+
* Triggered when no cursor type is applied.
|
|
95
83
|
*/
|
|
96
|
-
|
|
84
|
+
noType: undefined;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Represents the cursor's target position, angle and velocity.
|
|
88
|
+
*/
|
|
89
|
+
export interface ICursorTargetCoords {
|
|
90
|
+
x: number;
|
|
91
|
+
y: number;
|
|
92
|
+
angle: number;
|
|
93
|
+
velocity: number;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Represents the cursor's coordinates, angle and size.
|
|
97
|
+
*/
|
|
98
|
+
export interface ICursorFullCoords extends ICursorTargetCoords {
|
|
99
|
+
width: number;
|
|
100
|
+
height: number;
|
|
97
101
|
}
|
|
98
102
|
/**
|
|
99
|
-
*
|
|
103
|
+
* Custom cursor type configuration.
|
|
100
104
|
*/
|
|
101
105
|
export interface ICursorType {
|
|
102
|
-
/**
|
|
103
|
-
* The currently hovered element.
|
|
104
|
-
*/
|
|
106
|
+
/** Custom cursor element */
|
|
105
107
|
element: Element;
|
|
106
108
|
/** Cursor type */
|
|
107
109
|
type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Cursor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Cursor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE7B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAE9B;;;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returns all elements currently being observed.
|
|
36
36
|
*/
|
|
37
37
|
get elements(): IInViewElement[];
|
|
38
|
+
/** Detects if the container is RTL */
|
|
39
|
+
protected _isRtl: boolean;
|
|
38
40
|
/**
|
|
39
41
|
* Initializes the `InView` module.
|
|
40
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/InView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/InView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAOhE,cAAc,SAAS,CAAC;AAExB;;;;;;;GAOG;AACH,qBAAa,MAAM,CACjB,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,EACnD,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,EACjD,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,CACnD,SAAQ,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACvB;;OAEG;IACI,UAAU,IAAI,cAAc,CAAC,CAAC,CAAC;IAStC;;OAEG;IACI,WAAW,IAAI,cAAc,CAAC,CAAC,CAAC;IAQvC,0EAA0E;IAC1E,SAAS,CAAC,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAE7C,yEAAyE;IACzE,SAAS,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IAE9C,6EAA6E;IAC7E,SAAS,CAAC,eAAe,UAAQ;IAEjC;;OAEG;IACH,IAAI,cAAc,YAEjB;IAED,0CAA0C;IAC1C,SAAS,CAAC,SAAS,EAAE,cAAc,EAAE,CAAM;IAE3C;;OAEG;IACH,IAAI,QAAQ,qBAEX;IAED,sCAAsC;IACtC,SAAS,CAAC,MAAM,UAAS;IAEzB;;OAEG;gBAED,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,EACb,WAAW,CAAC,EAAE,uBAAuB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAU3D;;OAEG;IACH,SAAS,CAAC,YAAY;IAMtB;;OAEG;IACH,SAAS,CAAC,MAAM;IAQhB;;OAEG;IACH,SAAS,CAAC,iBAAiB;IAQ3B;;OAEG;IACH,SAAS,CAAC,cAAc;IAqBxB;;OAEG;IACH,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,yBAAyB,EAAE;IA+BrD;;OAEG;IACH,SAAS,CAAC,UAAU,CAAC,IAAI,EAAE,yBAAyB,EAAE;IAoBtD;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO;IAUjE;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAc;IA8BlD;;;;;;OAMG;IAEI,UAAU,CAAC,OAAO,EAAE,OAAO;IAYlC;;OAEG;IAEI,aAAa,CAAC,OAAO,EAAE,OAAO;IAWrC;;OAEG;IACH,SAAS,CAAC,QAAQ;CAKnB"}
|
|
@@ -54,6 +54,8 @@ export declare class Marquee<C extends IMarqueeCallbacksMap = IMarqueeCallbacksM
|
|
|
54
54
|
protected _raf: Raf;
|
|
55
55
|
/** Intersection observer */
|
|
56
56
|
protected _intersection?: IntersectionObserver;
|
|
57
|
+
/** Detects if the container is RTL */
|
|
58
|
+
protected _isRtl: boolean;
|
|
57
59
|
constructor(props?: S & M, onCallbacks?: TModuleOnCallbacksProps<C, Marquee<C, S, M>>);
|
|
58
60
|
/** Handles property changes */
|
|
59
61
|
protected _handleProps(): void;
|
|
@@ -67,6 +69,8 @@ export declare class Marquee<C extends IMarqueeCallbacksMap = IMarqueeCallbacksM
|
|
|
67
69
|
* Adds necessary styles to a given element.
|
|
68
70
|
*/
|
|
69
71
|
protected _applyNodeStyles(element: HTMLElement, isAbsolute: boolean): void;
|
|
72
|
+
/** Marquee gap */
|
|
73
|
+
protected get gap(): number;
|
|
70
74
|
/** Resizes the marquee, recalculating element positions and cloning if necessary. */
|
|
71
75
|
resize(): void;
|
|
72
76
|
/** Renders the marquee, adjusting element positions. */
|
|
@@ -74,7 +78,7 @@ export declare class Marquee<C extends IMarqueeCallbacksMap = IMarqueeCallbacksM
|
|
|
74
78
|
/**
|
|
75
79
|
* Renders the marquee, calculating element positions based on the provided speed.
|
|
76
80
|
*/
|
|
77
|
-
protected _render(
|
|
81
|
+
protected _render(stepProp?: string | number): void;
|
|
78
82
|
/**
|
|
79
83
|
* Handle intersection observer
|
|
80
84
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Marquee/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAO7B,cAAc,SAAS,CAAC;AAExB;;;;;;;;;GASG;AACH,qBAAa,OAAO,CAClB,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EACrD,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,EACnD,CAAC,SAAS,oBAAoB,GAAG,oBAAoB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ACtC,SAAS,CAAC,MAAM,UAAS;gBAGvB,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,EACb,WAAW,CAAC,EAAE,uBAAuB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAgE5D,gCAAgC;IAChC,SAAS,CAAC,YAAY;IActB,6EAA6E;IAC7E,SAAS,CAAC,MAAM;IA6ChB;;OAEG;IACH,SAAS,CAAC,aAAa;IAsBvB;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO;IAgBpE,kBAAkB;IAClB,SAAS,KAAK,GAAG,WAEhB;IAED,qFAAqF;IAE9E,MAAM;IA2Cb,wDAAwD;IAEjD,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM;IAI3B;;OAEG;IACH,SAAS,CAAC,OAAO,CAAC,QAAQ,kBAAmB;IA4C7C;;OAEG;IACH,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,yBAAyB,EAAE;IAclE,oDAAoD;IACpD,SAAS,CAAC,QAAQ;CAiBnB"}
|
|
@@ -49,9 +49,15 @@ export declare class ProgressPreloader<C extends IProgressPreloaderCallbacksMap
|
|
|
49
49
|
* Gets the current progress value.
|
|
50
50
|
*/
|
|
51
51
|
get progress(): number;
|
|
52
|
+
/**
|
|
53
|
+
* Linear interpolation factor
|
|
54
|
+
*/
|
|
55
|
+
protected get lerpEase(): number;
|
|
52
56
|
/** Animation frame instance for managing smooth progress updates. */
|
|
53
57
|
protected _raf: Raf;
|
|
54
58
|
constructor(props?: S & M, onCallbacks?: TModuleOnCallbacksProps<C, ProgressPreloader<C, S, M>>);
|
|
59
|
+
/** Container source for preloader resources. */
|
|
60
|
+
get resourceContainer(): HTMLElement;
|
|
55
61
|
/** Preload images */
|
|
56
62
|
protected _fetchImages(): void;
|
|
57
63
|
/** Preload videos */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressPreloader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAK7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEjD,cAAc,SAAS,CAAC;AAIxB;;;;;;;GAOG;AACH,qBAAa,iBAAiB,CAC5B,CAAC,SAAS,8BAA8B,GAAG,8BAA8B,EACzE,CAAC,SAAS,6BAA6B,GAAG,6BAA6B,EACvE,CAAC,SAAS,8BAA8B,GAAG,8BAA8B,CACzE,SAAQ,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1B;;OAEG;IACI,UAAU,IAAI,cAAc,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressPreloader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAK7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEjD,cAAc,SAAS,CAAC;AAIxB;;;;;;;GAOG;AACH,qBAAa,iBAAiB,CAC5B,CAAC,SAAS,8BAA8B,GAAG,8BAA8B,EACzE,CAAC,SAAS,6BAA6B,GAAG,6BAA6B,EACvE,CAAC,SAAS,8B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QAAQ;CAKnB"}
|
|
@@ -3,6 +3,11 @@ import { IPreloaderCallbacksMap, IPreloaderMutableProps, IPreloaderStaticProps }
|
|
|
3
3
|
* Static properties for configuring the progress preloader.
|
|
4
4
|
*/
|
|
5
5
|
export interface IProgressPreloaderStaticProps extends IPreloaderStaticProps {
|
|
6
|
+
/**
|
|
7
|
+
* Container source for preloader resources.
|
|
8
|
+
* @default null
|
|
9
|
+
*/
|
|
10
|
+
resourceContainer?: HTMLElement | null;
|
|
6
11
|
/**
|
|
7
12
|
* Enables automatic preloading of images.
|
|
8
13
|
* @default true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressPreloader/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,8BACf,SAAQ,sBAAsB;CAAG;AAEnC;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,sBAAsB;IAC5E;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressPreloader/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E;;;OAGG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,8BACf,SAAQ,sBAAsB;CAAG;AAEnC;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,sBAAsB;IAC5E;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Scrollbar/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Scrollbar/styles.ts"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,oBA4FnD"}
|
|
@@ -2,15 +2,14 @@ import { Module, TModuleOnCallbacksProps } from '../../base';
|
|
|
2
2
|
import { Timeline } from '../Timeline';
|
|
3
3
|
import { ISnapCallbacksMap, ISnapMagnet, ISnapMutableProps, ISnapNexPrevArg, ISnapStaticProps, ISnapToSlideArg, ISnapTransitionArg } from './types';
|
|
4
4
|
import { TRequiredProps } from '../../internal/requiredProps';
|
|
5
|
-
import { Raf } from '../Raf';
|
|
6
5
|
import { IOnResize } from '../../utils';
|
|
7
|
-
import { SnapSlide } from './Slide';
|
|
8
|
-
import { SnapWheel } from './Wheel';
|
|
9
|
-
import { SnapSwipe } from './Swipe';
|
|
10
|
-
import { SnapTrack } from './Track';
|
|
11
|
-
import { SnapKeyboard } from './Keyboard';
|
|
6
|
+
import { SnapSlide } from './slide/Slide';
|
|
7
|
+
import { SnapWheel } from './logic/Wheel';
|
|
8
|
+
import { SnapSwipe } from './logic/Swipe';
|
|
9
|
+
import { SnapTrack } from './logic/Track';
|
|
10
|
+
import { SnapKeyboard } from './logic/Keyboard';
|
|
12
11
|
export * from './types';
|
|
13
|
-
export * from './Slide';
|
|
12
|
+
export * from './slide/Slide';
|
|
14
13
|
/**
|
|
15
14
|
* Snap/Carousel handler.
|
|
16
15
|
* This class manages sliding progress with options like swipe, wheel interactions, and smooth transitions.
|
|
@@ -26,8 +25,6 @@ export declare class Snap<C extends ISnapCallbacksMap = ISnapCallbacksMap, S ext
|
|
|
26
25
|
_getStatic(): TRequiredProps<S>;
|
|
27
26
|
/** Retrieves the default mutable properties. */
|
|
28
27
|
_getMutable(): TRequiredProps<M>;
|
|
29
|
-
/** Animation frame for smooth animations */
|
|
30
|
-
protected _raf: Raf;
|
|
31
28
|
/** Wheel events */
|
|
32
29
|
protected _wheel: SnapWheel;
|
|
33
30
|
/** Swipe events */
|
|
@@ -50,7 +47,7 @@ export declare class Snap<C extends ISnapCallbacksMap = ISnapCallbacksMap, S ext
|
|
|
50
47
|
protected _activeIndex: number;
|
|
51
48
|
/** Target slide index */
|
|
52
49
|
protected _targetIndex?: number;
|
|
53
|
-
constructor(props
|
|
50
|
+
constructor(props: S & M, onCallbacks?: TModuleOnCallbacksProps<C, Snap<C, S, M>>);
|
|
54
51
|
/** Handles properties change */
|
|
55
52
|
protected _handleProps(): void;
|
|
56
53
|
/** Update slides list and attach them */
|
|
@@ -84,8 +81,6 @@ export declare class Snap<C extends ISnapCallbacksMap = ISnapCallbacksMap, S ext
|
|
|
84
81
|
get isSwiping(): boolean;
|
|
85
82
|
/** Reflow: update static values of slides */
|
|
86
83
|
protected _reflow(): void;
|
|
87
|
-
/** Handle RAF update, interpolate track values */
|
|
88
|
-
protected _handleRaf(): void;
|
|
89
84
|
/** Render slides */
|
|
90
85
|
render(frameDuration?: number): void;
|
|
91
86
|
/** Update slides values */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Snap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EACnB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Snap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,iBA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