motion-plus-vue 1.4.0 → 1.5.0-beta.1
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/dist/cjs/index.js +2 -2
- package/dist/components/Carousel/Carousel.d.ts +28 -0
- package/dist/components/Carousel/CarouselView.d.ts +32 -0
- package/dist/components/Carousel/const.d.ts +3 -0
- package/dist/components/Carousel/context.d.ts +15 -0
- package/dist/components/Carousel/index.d.ts +3 -0
- package/dist/components/Carousel/utils/calc-current-page.d.ts +1 -0
- package/dist/components/Carousel/utils/calc-page-insets.d.ts +5 -0
- package/dist/components/Carousel/utils/find-current-index.d.ts +2 -0
- package/dist/components/Carousel/utils/find-next-page.d.ts +3 -0
- package/dist/components/Carousel/utils/find-prev-page.d.ts +3 -0
- package/dist/components/Cursor/Cursor.d.ts +2 -2
- package/dist/components/Ticker/DefaultTickerItem.d.ts +14 -0
- package/dist/components/Ticker/Ticker.d.ts +60 -5
- package/dist/components/Ticker/TickerItem.d.ts +59 -13
- package/dist/components/Ticker/const.d.ts +3 -0
- package/dist/components/Ticker/context.d.ts +4259 -2
- package/dist/components/Ticker/index.d.ts +1 -1
- package/dist/components/Ticker/types.d.ts +16 -1
- package/dist/components/Ticker/utils/layout-strategy.d.ts +2 -0
- package/dist/components/Typewriter/Typewriter.d.ts +1 -1
- package/dist/es/components/Carousel/Carousel.vue.mjs +79 -0
- package/dist/es/components/Carousel/Carousel.vue2.mjs +4 -0
- package/dist/es/components/Carousel/CarouselView.vue.mjs +115 -0
- package/dist/es/components/Carousel/CarouselView.vue2.mjs +4 -0
- package/dist/es/components/Carousel/const.mjs +13 -0
- package/dist/es/components/Carousel/context.mjs +6 -0
- package/dist/es/components/Carousel/utils/calc-current-page.mjs +13 -0
- package/dist/es/components/Carousel/utils/calc-page-insets.mjs +42 -0
- package/dist/es/components/Carousel/utils/find-current-index.mjs +13 -0
- package/dist/es/components/Carousel/utils/find-next-page.mjs +26 -0
- package/dist/es/components/Carousel/utils/find-prev-page.mjs +31 -0
- package/dist/es/components/Ticker/Ticker.vue.mjs +270 -111
- package/dist/es/components/Ticker/TickerItem.vue.mjs +68 -36
- package/dist/es/components/Ticker/const.mjs +12 -3
- package/dist/es/components/Ticker/context.mjs +5 -3
- package/dist/es/components/Ticker/utils/layout-strategy.mjs +57 -0
- package/dist/es/index.mjs +21 -16
- package/dist/es/utils/flatten-slots.mjs +22 -16
- package/dist/index.d.ts +1 -0
- package/package.json +3 -3
- package/dist/es/components/Ticker/use-item-offset.mjs +0 -12
- package/dist/es/components/Ticker/utils/get-cumulative-offset.mjs +0 -9
package/dist/es/index.mjs
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import { AnimateNumber as o } from "./components/AnimateNumber/index.mjs";
|
|
2
|
-
import { Ticker as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { Ticker as s } from "./components/Ticker/index.mjs";
|
|
3
|
+
import { default as f } from "./components/Cursor/Cursor.vue.mjs";
|
|
4
|
+
import { default as a } from "./components/Ticker/TickerItem.vue.mjs";
|
|
5
|
+
import { default as x } from "./components/Typewriter/Typewriter.vue.mjs";
|
|
6
|
+
import { default as l } from "./components/Carousel/Carousel.vue.mjs";
|
|
7
|
+
import { useCursorState as n } from "./components/Cursor/hooks/use-cursor-state/index.mjs";
|
|
8
|
+
import { useCursorIsInView as T } from "./components/Cursor/hooks/use-cursor-in-view.mjs";
|
|
9
|
+
import { usePointerPosition as k } from "./components/Cursor/hooks/use-pointer-position.mjs";
|
|
9
10
|
import { useMagneticPull as P } from "./components/Cursor/magnetic/use-magnetic-pull.mjs";
|
|
10
|
-
import {
|
|
11
|
+
import { useTicker as b, useTickerItem as g } from "./components/Ticker/context.mjs";
|
|
12
|
+
import { useCarousel as A } from "./components/Carousel/context.mjs";
|
|
11
13
|
export {
|
|
12
14
|
o as AnimateNumber,
|
|
13
|
-
|
|
14
|
-
f as
|
|
15
|
-
|
|
16
|
-
a as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
l as Carousel,
|
|
16
|
+
f as Cursor,
|
|
17
|
+
s as Ticker,
|
|
18
|
+
a as TickerItem,
|
|
19
|
+
x as Typewriter,
|
|
20
|
+
A as useCarousel,
|
|
21
|
+
T as useCursorIsInView,
|
|
22
|
+
n as useCursorState,
|
|
20
23
|
P as useMagneticPull,
|
|
21
|
-
|
|
24
|
+
k as usePointerPosition,
|
|
25
|
+
b as useTicker,
|
|
26
|
+
g as useTickerItem
|
|
22
27
|
};
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import { Comment as
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Comment as i, Fragment as c } from "vue";
|
|
2
|
+
function s(t = []) {
|
|
3
|
+
var n;
|
|
4
|
+
const r = [];
|
|
5
|
+
for (const e of t)
|
|
6
|
+
if (e.type !== i)
|
|
7
|
+
if (e.type === c) {
|
|
8
|
+
const o = Array.isArray(e.children) ? e.children : (n = e.children) == null ? void 0 : n.default();
|
|
9
|
+
r.push(...s(o));
|
|
10
|
+
} else
|
|
11
|
+
r.push(e);
|
|
12
|
+
return r;
|
|
7
13
|
}
|
|
8
|
-
function
|
|
14
|
+
function l(t) {
|
|
9
15
|
var n;
|
|
10
|
-
const
|
|
11
|
-
for (const
|
|
12
|
-
if (
|
|
13
|
-
const o = Array.isArray(
|
|
14
|
-
|
|
16
|
+
const r = [];
|
|
17
|
+
for (const e of t)
|
|
18
|
+
if (e.type === c) {
|
|
19
|
+
const o = Array.isArray(e.children) ? e.children : (n = e.children) == null ? void 0 : n.default();
|
|
20
|
+
r.push(...l(o));
|
|
15
21
|
} else
|
|
16
|
-
|
|
17
|
-
return
|
|
22
|
+
r.push(e);
|
|
23
|
+
return r;
|
|
18
24
|
}
|
|
19
25
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
s as flattenSlots,
|
|
27
|
+
l as renderVNode
|
|
22
28
|
};
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-plus-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0-beta.1",
|
|
4
4
|
"description": "Motion Plus Vue",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
],
|
|
26
26
|
"typings": "./dist/index.d.ts",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"motion-v": "^1.
|
|
28
|
+
"motion-v": "^1.7.4",
|
|
29
29
|
"vue": ">=3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"motion-plus-dom": "^
|
|
32
|
+
"motion-plus-dom": "^2.0.2"
|
|
33
33
|
},
|
|
34
34
|
"size-limit": [
|
|
35
35
|
{
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { invariant as t } from "motion-v";
|
|
2
|
-
import { useTickerItemContext as o } from "./context.mjs";
|
|
3
|
-
function n() {
|
|
4
|
-
const e = o(null);
|
|
5
|
-
return t(
|
|
6
|
-
!!e,
|
|
7
|
-
"useItemOffset must be used within a TickerItem"
|
|
8
|
-
), e == null ? void 0 : e.offset;
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
n as useItemOffset
|
|
12
|
-
};
|