@destyler/carousel 0.2.7 → 0.2.10
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/index.d.mts +2 -1
- package/dist/index.mjs +6 -2
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as _destyler_anatomy0 from "@destyler/anatomy";
|
|
1
2
|
import * as _destyler_xstate0 from "@destyler/xstate";
|
|
2
3
|
import { AnyEventObject, ContextRef, Machine, XSend, XState } from "@destyler/xstate";
|
|
3
4
|
import { CommonProperties, DirectionProperty, NormalizeProps, Orientation, OrientationProperty, PropTypes, RequiredBy } from "@destyler/types";
|
|
4
5
|
|
|
5
6
|
//#region src/anatomy.d.ts
|
|
6
|
-
declare const anatomy:
|
|
7
|
+
declare const anatomy: _destyler_anatomy0.AnatomyInstance<"root" | "itemGroup" | "item" | "control" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "indicator" | "autoplayTrigger">;
|
|
7
8
|
//#endregion
|
|
8
9
|
//#region src/types.d.ts
|
|
9
10
|
interface PageChangeDetails {
|
package/dist/index.mjs
CHANGED
|
@@ -407,7 +407,11 @@ function machine(userContext) {
|
|
|
407
407
|
watch: {
|
|
408
408
|
slidesPerPage: ["setSnapPoints"],
|
|
409
409
|
slidesPerMove: ["setSnapPoints"],
|
|
410
|
-
page: [
|
|
410
|
+
page: [
|
|
411
|
+
"clearScrollEndTimer",
|
|
412
|
+
"scrollToPage",
|
|
413
|
+
"focusIndicatorEl"
|
|
414
|
+
],
|
|
411
415
|
orientation: ["setSnapPoints", "scrollToPage"]
|
|
412
416
|
},
|
|
413
417
|
on: {
|
|
@@ -603,7 +607,7 @@ function machine(userContext) {
|
|
|
603
607
|
},
|
|
604
608
|
scrollToPage(ctx$1, evt) {
|
|
605
609
|
const behavior = evt.instant ? "instant" : "smooth";
|
|
606
|
-
const index = clamp(
|
|
610
|
+
const index = clamp(ctx$1.page ?? 0, 0, ctx$1.pageSnapPoints.length - 1);
|
|
607
611
|
const el = dom.getItemGroupEl(ctx$1);
|
|
608
612
|
const axis = ctx$1.isHorizontal ? "left" : "top";
|
|
609
613
|
el.scrollTo({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@destyler/carousel",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.10",
|
|
5
5
|
"description": "an interactive slideshow component for cycling through elements.",
|
|
6
6
|
"author": "Elone Hoo <elonehoo@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@destyler/anatomy": "0.2.
|
|
26
|
-
"@destyler/
|
|
27
|
-
"@destyler/
|
|
28
|
-
"@destyler/
|
|
29
|
-
"@destyler/xstate": "0.2.
|
|
30
|
-
"@destyler/
|
|
25
|
+
"@destyler/anatomy": "0.2.10",
|
|
26
|
+
"@destyler/dom": "0.2.10",
|
|
27
|
+
"@destyler/types": "0.2.10",
|
|
28
|
+
"@destyler/utils": "0.2.10",
|
|
29
|
+
"@destyler/xstate": "0.2.10",
|
|
30
|
+
"@destyler/scroll-snap": "0.2.10"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|