@egjs/flicking 4.11.3 → 4.12.0-beta.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/declaration/Flicking.d.ts +244 -240
- package/declaration/camera/Camera.d.ts +89 -89
- package/declaration/camera/index.d.ts +4 -4
- package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
- package/declaration/camera/mode/CameraMode.d.ts +20 -20
- package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
- package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
- package/declaration/camera/mode/index.d.ts +6 -6
- package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
- package/declaration/cfc/getRenderingPanels.d.ts +4 -4
- package/declaration/cfc/index.d.ts +5 -5
- package/declaration/cfc/sync.d.ts +4 -4
- package/declaration/cfc/withFlickingMethods.d.ts +2 -2
- package/declaration/const/axes.d.ts +8 -8
- package/declaration/const/error.d.ts +34 -34
- package/declaration/const/external.d.ts +48 -48
- package/declaration/control/AxesController.d.ts +44 -44
- package/declaration/control/Control.d.ts +45 -45
- package/declaration/control/FreeControl.d.ts +14 -14
- package/declaration/control/SnapControl.d.ts +16 -16
- package/declaration/control/StateMachine.d.ts +14 -14
- package/declaration/control/StrictControl.d.ts +20 -20
- package/declaration/control/index.d.ts +14 -14
- package/declaration/control/states/AnimatingState.d.ts +9 -9
- package/declaration/control/states/DisabledState.d.ts +9 -9
- package/declaration/control/states/DraggingState.d.ts +8 -8
- package/declaration/control/states/HoldingState.d.ts +10 -10
- package/declaration/control/states/IdleState.d.ts +9 -9
- package/declaration/control/states/State.d.ts +47 -47
- package/declaration/core/AnchorPoint.d.ts +15 -15
- package/declaration/core/AutoResizer.d.ts +16 -16
- package/declaration/core/FlickingError.d.ts +5 -5
- package/declaration/core/ResizeWatcher.d.ts +33 -33
- package/declaration/core/Viewport.d.ts +25 -25
- package/declaration/core/VirtualManager.d.ts +37 -37
- package/declaration/core/index.d.ts +6 -6
- package/declaration/core/panel/Panel.d.ts +89 -89
- package/declaration/core/panel/VirtualPanel.d.ts +19 -19
- package/declaration/core/panel/index.d.ts +5 -5
- package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
- package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
- package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
- package/declaration/core/panel/provider/index.d.ts +5 -5
- package/declaration/index.cjs.d.ts +3 -3
- package/declaration/index.d.ts +13 -13
- package/declaration/index.umd.d.ts +2 -2
- package/declaration/renderer/ExternalRenderer.d.ts +7 -7
- package/declaration/renderer/Renderer.d.ts +59 -59
- package/declaration/renderer/VanillaRenderer.d.ts +10 -10
- package/declaration/renderer/index.d.ts +6 -6
- package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
- package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
- package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
- package/declaration/renderer/strategy/index.d.ts +5 -5
- package/declaration/type/event.d.ts +88 -88
- package/declaration/type/external.d.ts +31 -31
- package/declaration/type/internal.d.ts +13 -13
- package/declaration/utils.d.ts +45 -45
- package/dist/flicking.cjs.js +63 -39
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +63 -39
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +63 -39
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +63 -39
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/Flicking.ts +24 -2
- package/src/control/AxesController.ts +1 -1
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { OnRelease } from "@egjs/axes";
|
|
2
|
-
import Flicking from "../Flicking";
|
|
3
|
-
import Panel from "../core/panel/Panel";
|
|
4
|
-
import AxesController from "../control/AxesController";
|
|
5
|
-
import { DIRECTION } from "../const/external";
|
|
6
|
-
import { ValueOf } from "../type/internal";
|
|
7
|
-
declare abstract class Control {
|
|
8
|
-
protected _flicking: Flicking | null;
|
|
9
|
-
protected _controller: AxesController;
|
|
10
|
-
protected _activePanel: Panel | null;
|
|
11
|
-
protected _nextPanel: Panel | null;
|
|
12
|
-
get controller(): AxesController;
|
|
13
|
-
get activeIndex(): number;
|
|
14
|
-
get activePanel(): Panel;
|
|
15
|
-
get animating(): boolean;
|
|
16
|
-
get holding(): boolean;
|
|
17
|
-
constructor();
|
|
18
|
-
abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
19
|
-
init(flicking: Flicking): this;
|
|
20
|
-
destroy(): void;
|
|
21
|
-
enable(): this;
|
|
22
|
-
disable(): this;
|
|
23
|
-
release(): this;
|
|
24
|
-
updateAnimation(panel: Panel, duration?: number, direction?: ValueOf<typeof DIRECTION>): this;
|
|
25
|
-
stopAnimation(): this;
|
|
26
|
-
updatePosition(progressInPanel: number): void;
|
|
27
|
-
updateInput(): this;
|
|
28
|
-
resetActive(): this;
|
|
29
|
-
moveToPanel(panel: Panel, { duration, direction, axesEvent }: {
|
|
30
|
-
duration: number;
|
|
31
|
-
direction?: ValueOf<typeof DIRECTION>;
|
|
32
|
-
axesEvent?: OnRelease;
|
|
33
|
-
}): Promise<void>;
|
|
34
|
-
setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean): void;
|
|
35
|
-
copy(control: Control): void;
|
|
36
|
-
protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf<typeof DIRECTION>): void;
|
|
37
|
-
protected _animateToPosition({ position, duration, newActivePanel, axesEvent }: {
|
|
38
|
-
position: number;
|
|
39
|
-
duration: number;
|
|
40
|
-
newActivePanel: Panel;
|
|
41
|
-
axesEvent?: OnRelease;
|
|
42
|
-
}): Promise<void>;
|
|
43
|
-
private _getPosition;
|
|
44
|
-
}
|
|
45
|
-
export default Control;
|
|
1
|
+
import { OnRelease } from "@egjs/axes";
|
|
2
|
+
import Flicking from "../Flicking";
|
|
3
|
+
import Panel from "../core/panel/Panel";
|
|
4
|
+
import AxesController from "../control/AxesController";
|
|
5
|
+
import { DIRECTION } from "../const/external";
|
|
6
|
+
import { ValueOf } from "../type/internal";
|
|
7
|
+
declare abstract class Control {
|
|
8
|
+
protected _flicking: Flicking | null;
|
|
9
|
+
protected _controller: AxesController;
|
|
10
|
+
protected _activePanel: Panel | null;
|
|
11
|
+
protected _nextPanel: Panel | null;
|
|
12
|
+
get controller(): AxesController;
|
|
13
|
+
get activeIndex(): number;
|
|
14
|
+
get activePanel(): Panel;
|
|
15
|
+
get animating(): boolean;
|
|
16
|
+
get holding(): boolean;
|
|
17
|
+
constructor();
|
|
18
|
+
abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
19
|
+
init(flicking: Flicking): this;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
enable(): this;
|
|
22
|
+
disable(): this;
|
|
23
|
+
release(): this;
|
|
24
|
+
updateAnimation(panel: Panel, duration?: number, direction?: ValueOf<typeof DIRECTION>): this;
|
|
25
|
+
stopAnimation(): this;
|
|
26
|
+
updatePosition(progressInPanel: number): void;
|
|
27
|
+
updateInput(): this;
|
|
28
|
+
resetActive(): this;
|
|
29
|
+
moveToPanel(panel: Panel, { duration, direction, axesEvent }: {
|
|
30
|
+
duration: number;
|
|
31
|
+
direction?: ValueOf<typeof DIRECTION>;
|
|
32
|
+
axesEvent?: OnRelease;
|
|
33
|
+
}): Promise<void>;
|
|
34
|
+
setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean): void;
|
|
35
|
+
copy(control: Control): void;
|
|
36
|
+
protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf<typeof DIRECTION>): void;
|
|
37
|
+
protected _animateToPosition({ position, duration, newActivePanel, axesEvent }: {
|
|
38
|
+
position: number;
|
|
39
|
+
duration: number;
|
|
40
|
+
newActivePanel: Panel;
|
|
41
|
+
axesEvent?: OnRelease;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
private _getPosition;
|
|
44
|
+
}
|
|
45
|
+
export default Control;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { OnRelease } from "@egjs/axes";
|
|
2
|
-
import Control from "./Control";
|
|
3
|
-
export interface FreeControlOptions {
|
|
4
|
-
stopAtEdge: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare class FreeControl extends Control {
|
|
7
|
-
private _stopAtEdge;
|
|
8
|
-
get stopAtEdge(): FreeControlOptions["stopAtEdge"];
|
|
9
|
-
set stopAtEdge(val: FreeControlOptions["stopAtEdge"]);
|
|
10
|
-
constructor({ stopAtEdge }?: Partial<FreeControlOptions>);
|
|
11
|
-
updatePosition(progressInPanel: number): void;
|
|
12
|
-
moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
export default FreeControl;
|
|
1
|
+
import { OnRelease } from "@egjs/axes";
|
|
2
|
+
import Control from "./Control";
|
|
3
|
+
export interface FreeControlOptions {
|
|
4
|
+
stopAtEdge: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare class FreeControl extends Control {
|
|
7
|
+
private _stopAtEdge;
|
|
8
|
+
get stopAtEdge(): FreeControlOptions["stopAtEdge"];
|
|
9
|
+
set stopAtEdge(val: FreeControlOptions["stopAtEdge"]);
|
|
10
|
+
constructor({ stopAtEdge }?: Partial<FreeControlOptions>);
|
|
11
|
+
updatePosition(progressInPanel: number): void;
|
|
12
|
+
moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export default FreeControl;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { OnRelease } from "@egjs/axes";
|
|
2
|
-
import Control from "./Control";
|
|
3
|
-
export interface SnapControlOptions {
|
|
4
|
-
count: number;
|
|
5
|
-
}
|
|
6
|
-
declare class SnapControl extends Control {
|
|
7
|
-
private _count;
|
|
8
|
-
get count(): SnapControlOptions["count"];
|
|
9
|
-
set count(val: SnapControlOptions["count"]);
|
|
10
|
-
constructor({ count }?: Partial<SnapControlOptions>);
|
|
11
|
-
moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
12
|
-
private _findSnappedAnchor;
|
|
13
|
-
private _findAdjacentAnchor;
|
|
14
|
-
private _calcSnapThreshold;
|
|
15
|
-
}
|
|
16
|
-
export default SnapControl;
|
|
1
|
+
import { OnRelease } from "@egjs/axes";
|
|
2
|
+
import Control from "./Control";
|
|
3
|
+
export interface SnapControlOptions {
|
|
4
|
+
count: number;
|
|
5
|
+
}
|
|
6
|
+
declare class SnapControl extends Control {
|
|
7
|
+
private _count;
|
|
8
|
+
get count(): SnapControlOptions["count"];
|
|
9
|
+
set count(val: SnapControlOptions["count"]);
|
|
10
|
+
constructor({ count }?: Partial<SnapControlOptions>);
|
|
11
|
+
moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
12
|
+
private _findSnappedAnchor;
|
|
13
|
+
private _findAdjacentAnchor;
|
|
14
|
+
private _calcSnapThreshold;
|
|
15
|
+
}
|
|
16
|
+
export default SnapControl;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { AxesEvents } from "@egjs/axes";
|
|
2
|
-
import Flicking from "../Flicking";
|
|
3
|
-
import State, { STATE_TYPE } from "./states/State";
|
|
4
|
-
declare class StateMachine {
|
|
5
|
-
private _state;
|
|
6
|
-
get state(): State;
|
|
7
|
-
constructor();
|
|
8
|
-
fire(eventType: keyof AxesEvents, externalCtx: {
|
|
9
|
-
flicking: Flicking;
|
|
10
|
-
axesEvent: any;
|
|
11
|
-
}): void;
|
|
12
|
-
transitTo: (nextStateType: STATE_TYPE) => State;
|
|
13
|
-
}
|
|
14
|
-
export default StateMachine;
|
|
1
|
+
import { AxesEvents } from "@egjs/axes";
|
|
2
|
+
import Flicking from "../Flicking";
|
|
3
|
+
import State, { STATE_TYPE } from "./states/State";
|
|
4
|
+
declare class StateMachine {
|
|
5
|
+
private _state;
|
|
6
|
+
get state(): State;
|
|
7
|
+
constructor();
|
|
8
|
+
fire(eventType: keyof AxesEvents, externalCtx: {
|
|
9
|
+
flicking: Flicking;
|
|
10
|
+
axesEvent: any;
|
|
11
|
+
}): void;
|
|
12
|
+
transitTo: (nextStateType: STATE_TYPE) => State;
|
|
13
|
+
}
|
|
14
|
+
export default StateMachine;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { OnRelease } from "@egjs/axes";
|
|
2
|
-
import Panel from "../core/panel/Panel";
|
|
3
|
-
import Control from "./Control";
|
|
4
|
-
export interface StrictControlOptions {
|
|
5
|
-
count: number;
|
|
6
|
-
}
|
|
7
|
-
declare class StrictControl extends Control {
|
|
8
|
-
private _count;
|
|
9
|
-
private _indexRange;
|
|
10
|
-
get count(): StrictControlOptions["count"];
|
|
11
|
-
set count(val: StrictControlOptions["count"]);
|
|
12
|
-
constructor({ count }?: Partial<StrictControlOptions>);
|
|
13
|
-
destroy(): void;
|
|
14
|
-
updateInput(): this;
|
|
15
|
-
moveToPanel(panel: Panel, options: Parameters<Control["moveToPanel"]>[1]): Promise<void>;
|
|
16
|
-
moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
17
|
-
setActive: (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => void;
|
|
18
|
-
private _resetIndexRange;
|
|
19
|
-
}
|
|
20
|
-
export default StrictControl;
|
|
1
|
+
import { OnRelease } from "@egjs/axes";
|
|
2
|
+
import Panel from "../core/panel/Panel";
|
|
3
|
+
import Control from "./Control";
|
|
4
|
+
export interface StrictControlOptions {
|
|
5
|
+
count: number;
|
|
6
|
+
}
|
|
7
|
+
declare class StrictControl extends Control {
|
|
8
|
+
private _count;
|
|
9
|
+
private _indexRange;
|
|
10
|
+
get count(): StrictControlOptions["count"];
|
|
11
|
+
set count(val: StrictControlOptions["count"]);
|
|
12
|
+
constructor({ count }?: Partial<StrictControlOptions>);
|
|
13
|
+
destroy(): void;
|
|
14
|
+
updateInput(): this;
|
|
15
|
+
moveToPanel(panel: Panel, options: Parameters<Control["moveToPanel"]>[1]): Promise<void>;
|
|
16
|
+
moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
|
|
17
|
+
setActive: (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => void;
|
|
18
|
+
private _resetIndexRange;
|
|
19
|
+
}
|
|
20
|
+
export default StrictControl;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import Control from "./Control";
|
|
2
|
-
import SnapControl, { SnapControlOptions } from "./SnapControl";
|
|
3
|
-
import FreeControl, { FreeControlOptions } from "./FreeControl";
|
|
4
|
-
import StrictControl, { StrictControlOptions } from "./StrictControl";
|
|
5
|
-
import AxesController from "./AxesController";
|
|
6
|
-
import State from "./states/State";
|
|
7
|
-
import IdleState from "./states/IdleState";
|
|
8
|
-
import HoldingState from "./states/HoldingState";
|
|
9
|
-
import DraggingState from "./states/DraggingState";
|
|
10
|
-
import AnimatingState from "./states/AnimatingState";
|
|
11
|
-
import DisabledState from "./states/DisabledState";
|
|
12
|
-
import StateMachine from "./StateMachine";
|
|
13
|
-
export { Control, SnapControl, FreeControl, StrictControl, AxesController, State, IdleState, HoldingState, DraggingState, AnimatingState, DisabledState, StateMachine };
|
|
14
|
-
export type { SnapControlOptions, FreeControlOptions, StrictControlOptions };
|
|
1
|
+
import Control from "./Control";
|
|
2
|
+
import SnapControl, { SnapControlOptions } from "./SnapControl";
|
|
3
|
+
import FreeControl, { FreeControlOptions } from "./FreeControl";
|
|
4
|
+
import StrictControl, { StrictControlOptions } from "./StrictControl";
|
|
5
|
+
import AxesController from "./AxesController";
|
|
6
|
+
import State from "./states/State";
|
|
7
|
+
import IdleState from "./states/IdleState";
|
|
8
|
+
import HoldingState from "./states/HoldingState";
|
|
9
|
+
import DraggingState from "./states/DraggingState";
|
|
10
|
+
import AnimatingState from "./states/AnimatingState";
|
|
11
|
+
import DisabledState from "./states/DisabledState";
|
|
12
|
+
import StateMachine from "./StateMachine";
|
|
13
|
+
export { Control, SnapControl, FreeControl, StrictControl, AxesController, State, IdleState, HoldingState, DraggingState, AnimatingState, DisabledState, StateMachine };
|
|
14
|
+
export type { SnapControlOptions, FreeControlOptions, StrictControlOptions };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import State from "./State";
|
|
2
|
-
declare class AnimatingState extends State {
|
|
3
|
-
readonly holding = false;
|
|
4
|
-
readonly animating = true;
|
|
5
|
-
onHold(ctx: Parameters<State["onHold"]>[0]): void;
|
|
6
|
-
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
7
|
-
onFinish(ctx: Parameters<State["onFinish"]>[0]): void;
|
|
8
|
-
}
|
|
9
|
-
export default AnimatingState;
|
|
1
|
+
import State from "./State";
|
|
2
|
+
declare class AnimatingState extends State {
|
|
3
|
+
readonly holding = false;
|
|
4
|
+
readonly animating = true;
|
|
5
|
+
onHold(ctx: Parameters<State["onHold"]>[0]): void;
|
|
6
|
+
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
7
|
+
onFinish(ctx: Parameters<State["onFinish"]>[0]): void;
|
|
8
|
+
}
|
|
9
|
+
export default AnimatingState;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import State from "./State";
|
|
2
|
-
declare class DisabledState extends State {
|
|
3
|
-
readonly holding = false;
|
|
4
|
-
readonly animating = true;
|
|
5
|
-
onAnimationEnd(ctx: Parameters<State["onAnimationEnd"]>[0]): void;
|
|
6
|
-
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
7
|
-
onRelease(ctx: Parameters<State["onRelease"]>[0]): void;
|
|
8
|
-
}
|
|
9
|
-
export default DisabledState;
|
|
1
|
+
import State from "./State";
|
|
2
|
+
declare class DisabledState extends State {
|
|
3
|
+
readonly holding = false;
|
|
4
|
+
readonly animating = true;
|
|
5
|
+
onAnimationEnd(ctx: Parameters<State["onAnimationEnd"]>[0]): void;
|
|
6
|
+
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
7
|
+
onRelease(ctx: Parameters<State["onRelease"]>[0]): void;
|
|
8
|
+
}
|
|
9
|
+
export default DisabledState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import State from "./State";
|
|
2
|
-
declare class DraggingState extends State {
|
|
3
|
-
readonly holding = true;
|
|
4
|
-
readonly animating = true;
|
|
5
|
-
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
6
|
-
onRelease(ctx: Parameters<State["onRelease"]>[0]): void;
|
|
7
|
-
}
|
|
8
|
-
export default DraggingState;
|
|
1
|
+
import State from "./State";
|
|
2
|
+
declare class DraggingState extends State {
|
|
3
|
+
readonly holding = true;
|
|
4
|
+
readonly animating = true;
|
|
5
|
+
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
6
|
+
onRelease(ctx: Parameters<State["onRelease"]>[0]): void;
|
|
7
|
+
}
|
|
8
|
+
export default DraggingState;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import State from "./State";
|
|
2
|
-
declare class HoldingState extends State {
|
|
3
|
-
readonly holding = true;
|
|
4
|
-
readonly animating = false;
|
|
5
|
-
private _releaseEvent;
|
|
6
|
-
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
7
|
-
onRelease(ctx: Parameters<State["onRelease"]>[0]): void;
|
|
8
|
-
onFinish(ctx: Parameters<State["onFinish"]>[0]): void;
|
|
9
|
-
}
|
|
10
|
-
export default HoldingState;
|
|
1
|
+
import State from "./State";
|
|
2
|
+
declare class HoldingState extends State {
|
|
3
|
+
readonly holding = true;
|
|
4
|
+
readonly animating = false;
|
|
5
|
+
private _releaseEvent;
|
|
6
|
+
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
7
|
+
onRelease(ctx: Parameters<State["onRelease"]>[0]): void;
|
|
8
|
+
onFinish(ctx: Parameters<State["onFinish"]>[0]): void;
|
|
9
|
+
}
|
|
10
|
+
export default HoldingState;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import State from "./State";
|
|
2
|
-
declare class IdleState extends State {
|
|
3
|
-
readonly holding = false;
|
|
4
|
-
readonly animating = false;
|
|
5
|
-
onEnter(): void;
|
|
6
|
-
onHold(ctx: Parameters<State["onHold"]>[0]): void;
|
|
7
|
-
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
8
|
-
}
|
|
9
|
-
export default IdleState;
|
|
1
|
+
import State from "./State";
|
|
2
|
+
declare class IdleState extends State {
|
|
3
|
+
readonly holding = false;
|
|
4
|
+
readonly animating = false;
|
|
5
|
+
onEnter(): void;
|
|
6
|
+
onHold(ctx: Parameters<State["onHold"]>[0]): void;
|
|
7
|
+
onChange(ctx: Parameters<State["onChange"]>[0]): void;
|
|
8
|
+
}
|
|
9
|
+
export default IdleState;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from "@egjs/axes";
|
|
2
|
-
import Flicking from "../../Flicking";
|
|
3
|
-
import Panel from "../../core/panel/Panel";
|
|
4
|
-
export declare enum STATE_TYPE {
|
|
5
|
-
IDLE = 0,
|
|
6
|
-
HOLDING = 1,
|
|
7
|
-
DRAGGING = 2,
|
|
8
|
-
ANIMATING = 3,
|
|
9
|
-
DISABLED = 4
|
|
10
|
-
}
|
|
11
|
-
declare abstract class State {
|
|
12
|
-
abstract readonly holding: boolean;
|
|
13
|
-
abstract readonly animating: boolean;
|
|
14
|
-
protected _delta: number;
|
|
15
|
-
protected _targetPanel: Panel | null;
|
|
16
|
-
get delta(): number;
|
|
17
|
-
get targetPanel(): Panel | null;
|
|
18
|
-
set targetPanel(val: Panel | null);
|
|
19
|
-
onEnter(prevState: State): void;
|
|
20
|
-
onHold(ctx: {
|
|
21
|
-
flicking: Flicking;
|
|
22
|
-
axesEvent: OnHold;
|
|
23
|
-
transitTo: (nextState: STATE_TYPE) => State;
|
|
24
|
-
}): void;
|
|
25
|
-
onChange(ctx: {
|
|
26
|
-
flicking: Flicking;
|
|
27
|
-
axesEvent: OnChange;
|
|
28
|
-
transitTo: (nextState: STATE_TYPE) => State;
|
|
29
|
-
}): void;
|
|
30
|
-
onRelease(ctx: {
|
|
31
|
-
flicking: Flicking;
|
|
32
|
-
axesEvent: OnRelease;
|
|
33
|
-
transitTo: (nextState: STATE_TYPE) => State;
|
|
34
|
-
}): void;
|
|
35
|
-
onAnimationEnd(ctx: {
|
|
36
|
-
flicking: Flicking;
|
|
37
|
-
axesEvent: OnAnimationEnd;
|
|
38
|
-
transitTo: (nextState: STATE_TYPE) => State;
|
|
39
|
-
}): void;
|
|
40
|
-
onFinish(ctx: {
|
|
41
|
-
flicking: Flicking;
|
|
42
|
-
axesEvent: OnFinish;
|
|
43
|
-
transitTo: (nextState: STATE_TYPE) => State;
|
|
44
|
-
}): void;
|
|
45
|
-
protected _moveToChangedPosition(ctx: Parameters<State["onChange"]>[0]): void;
|
|
46
|
-
}
|
|
47
|
-
export default State;
|
|
1
|
+
import { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from "@egjs/axes";
|
|
2
|
+
import Flicking from "../../Flicking";
|
|
3
|
+
import Panel from "../../core/panel/Panel";
|
|
4
|
+
export declare enum STATE_TYPE {
|
|
5
|
+
IDLE = 0,
|
|
6
|
+
HOLDING = 1,
|
|
7
|
+
DRAGGING = 2,
|
|
8
|
+
ANIMATING = 3,
|
|
9
|
+
DISABLED = 4
|
|
10
|
+
}
|
|
11
|
+
declare abstract class State {
|
|
12
|
+
abstract readonly holding: boolean;
|
|
13
|
+
abstract readonly animating: boolean;
|
|
14
|
+
protected _delta: number;
|
|
15
|
+
protected _targetPanel: Panel | null;
|
|
16
|
+
get delta(): number;
|
|
17
|
+
get targetPanel(): Panel | null;
|
|
18
|
+
set targetPanel(val: Panel | null);
|
|
19
|
+
onEnter(prevState: State): void;
|
|
20
|
+
onHold(ctx: {
|
|
21
|
+
flicking: Flicking;
|
|
22
|
+
axesEvent: OnHold;
|
|
23
|
+
transitTo: (nextState: STATE_TYPE) => State;
|
|
24
|
+
}): void;
|
|
25
|
+
onChange(ctx: {
|
|
26
|
+
flicking: Flicking;
|
|
27
|
+
axesEvent: OnChange;
|
|
28
|
+
transitTo: (nextState: STATE_TYPE) => State;
|
|
29
|
+
}): void;
|
|
30
|
+
onRelease(ctx: {
|
|
31
|
+
flicking: Flicking;
|
|
32
|
+
axesEvent: OnRelease;
|
|
33
|
+
transitTo: (nextState: STATE_TYPE) => State;
|
|
34
|
+
}): void;
|
|
35
|
+
onAnimationEnd(ctx: {
|
|
36
|
+
flicking: Flicking;
|
|
37
|
+
axesEvent: OnAnimationEnd;
|
|
38
|
+
transitTo: (nextState: STATE_TYPE) => State;
|
|
39
|
+
}): void;
|
|
40
|
+
onFinish(ctx: {
|
|
41
|
+
flicking: Flicking;
|
|
42
|
+
axesEvent: OnFinish;
|
|
43
|
+
transitTo: (nextState: STATE_TYPE) => State;
|
|
44
|
+
}): void;
|
|
45
|
+
protected _moveToChangedPosition(ctx: Parameters<State["onChange"]>[0]): void;
|
|
46
|
+
}
|
|
47
|
+
export default State;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Panel from "./panel/Panel";
|
|
2
|
-
declare class AnchorPoint {
|
|
3
|
-
private _index;
|
|
4
|
-
private _pos;
|
|
5
|
-
private _panel;
|
|
6
|
-
get index(): number;
|
|
7
|
-
get position(): number;
|
|
8
|
-
get panel(): Panel;
|
|
9
|
-
constructor({ index, position, panel }: {
|
|
10
|
-
index: number;
|
|
11
|
-
position: number;
|
|
12
|
-
panel: Panel;
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export default AnchorPoint;
|
|
1
|
+
import Panel from "./panel/Panel";
|
|
2
|
+
declare class AnchorPoint {
|
|
3
|
+
private _index;
|
|
4
|
+
private _pos;
|
|
5
|
+
private _panel;
|
|
6
|
+
get index(): number;
|
|
7
|
+
get position(): number;
|
|
8
|
+
get panel(): Panel;
|
|
9
|
+
constructor({ index, position, panel }: {
|
|
10
|
+
index: number;
|
|
11
|
+
position: number;
|
|
12
|
+
panel: Panel;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export default AnchorPoint;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import Flicking from "../Flicking";
|
|
2
|
-
declare class AutoResizer {
|
|
3
|
-
private _flicking;
|
|
4
|
-
private _enabled;
|
|
5
|
-
private _resizeObserver;
|
|
6
|
-
private _resizeTimer;
|
|
7
|
-
private _maxResizeDebounceTimer;
|
|
8
|
-
get enabled(): boolean;
|
|
9
|
-
constructor(flicking: Flicking);
|
|
10
|
-
enable(): this;
|
|
11
|
-
disable(): this;
|
|
12
|
-
private _onResize;
|
|
13
|
-
private _doScheduledResize;
|
|
14
|
-
private _skipFirstResize;
|
|
15
|
-
}
|
|
16
|
-
export default AutoResizer;
|
|
1
|
+
import Flicking from "../Flicking";
|
|
2
|
+
declare class AutoResizer {
|
|
3
|
+
private _flicking;
|
|
4
|
+
private _enabled;
|
|
5
|
+
private _resizeObserver;
|
|
6
|
+
private _resizeTimer;
|
|
7
|
+
private _maxResizeDebounceTimer;
|
|
8
|
+
get enabled(): boolean;
|
|
9
|
+
constructor(flicking: Flicking);
|
|
10
|
+
enable(): this;
|
|
11
|
+
disable(): this;
|
|
12
|
+
private _onResize;
|
|
13
|
+
private _doScheduledResize;
|
|
14
|
+
private _skipFirstResize;
|
|
15
|
+
}
|
|
16
|
+
export default AutoResizer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare class FlickingError extends Error {
|
|
2
|
-
code: number;
|
|
3
|
-
constructor(message: string, code: number);
|
|
4
|
-
}
|
|
5
|
-
export default FlickingError;
|
|
1
|
+
declare class FlickingError extends Error {
|
|
2
|
+
code: number;
|
|
3
|
+
constructor(message: string, code: number);
|
|
4
|
+
}
|
|
5
|
+
export default FlickingError;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
export interface ResizeWatherOptions {
|
|
2
|
-
resizeDebounce?: number;
|
|
3
|
-
maxResizeDebounce?: number;
|
|
4
|
-
useResizeObserver?: boolean;
|
|
5
|
-
useWindowResize?: boolean;
|
|
6
|
-
watchDirection?: "width" | "height" | "box" | false;
|
|
7
|
-
rectBox?: "border-box" | "content-box";
|
|
8
|
-
}
|
|
9
|
-
declare class ResizeWatcher {
|
|
10
|
-
private _container;
|
|
11
|
-
private _rect;
|
|
12
|
-
private _resizeTimer;
|
|
13
|
-
private _maxResizeDebounceTimer;
|
|
14
|
-
private _emitter;
|
|
15
|
-
private _observer;
|
|
16
|
-
private _options;
|
|
17
|
-
constructor(container: HTMLElement | string, options?: ResizeWatherOptions);
|
|
18
|
-
getRect(): {
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
};
|
|
22
|
-
setRect(rect: {
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
}): void;
|
|
26
|
-
resize(): void;
|
|
27
|
-
listen(callback: () => void): this;
|
|
28
|
-
destroy(): void;
|
|
29
|
-
private _init;
|
|
30
|
-
private _onResize;
|
|
31
|
-
private _scheduleResize;
|
|
32
|
-
}
|
|
33
|
-
export default ResizeWatcher;
|
|
1
|
+
export interface ResizeWatherOptions {
|
|
2
|
+
resizeDebounce?: number;
|
|
3
|
+
maxResizeDebounce?: number;
|
|
4
|
+
useResizeObserver?: boolean;
|
|
5
|
+
useWindowResize?: boolean;
|
|
6
|
+
watchDirection?: "width" | "height" | "box" | false;
|
|
7
|
+
rectBox?: "border-box" | "content-box";
|
|
8
|
+
}
|
|
9
|
+
declare class ResizeWatcher {
|
|
10
|
+
private _container;
|
|
11
|
+
private _rect;
|
|
12
|
+
private _resizeTimer;
|
|
13
|
+
private _maxResizeDebounceTimer;
|
|
14
|
+
private _emitter;
|
|
15
|
+
private _observer;
|
|
16
|
+
private _options;
|
|
17
|
+
constructor(container: HTMLElement | string, options?: ResizeWatherOptions);
|
|
18
|
+
getRect(): {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
setRect(rect: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
}): void;
|
|
26
|
+
resize(): void;
|
|
27
|
+
listen(callback: () => void): this;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
private _init;
|
|
30
|
+
private _onResize;
|
|
31
|
+
private _scheduleResize;
|
|
32
|
+
}
|
|
33
|
+
export default ResizeWatcher;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import Flicking from "../Flicking";
|
|
2
|
-
declare class Viewport {
|
|
3
|
-
private _flicking;
|
|
4
|
-
private _el;
|
|
5
|
-
private _width;
|
|
6
|
-
private _height;
|
|
7
|
-
private _isBorderBoxSizing;
|
|
8
|
-
private _padding;
|
|
9
|
-
get element(): HTMLElement;
|
|
10
|
-
get width(): number;
|
|
11
|
-
get height(): number;
|
|
12
|
-
get padding(): {
|
|
13
|
-
left: number;
|
|
14
|
-
right: number;
|
|
15
|
-
top: number;
|
|
16
|
-
bottom: number;
|
|
17
|
-
};
|
|
18
|
-
constructor(flicking: Flicking, el: HTMLElement);
|
|
19
|
-
setSize({ width, height }: Partial<{
|
|
20
|
-
width: number | string;
|
|
21
|
-
height: number | string;
|
|
22
|
-
}>): void;
|
|
23
|
-
resize(): void;
|
|
24
|
-
}
|
|
25
|
-
export default Viewport;
|
|
1
|
+
import Flicking from "../Flicking";
|
|
2
|
+
declare class Viewport {
|
|
3
|
+
private _flicking;
|
|
4
|
+
private _el;
|
|
5
|
+
private _width;
|
|
6
|
+
private _height;
|
|
7
|
+
private _isBorderBoxSizing;
|
|
8
|
+
private _padding;
|
|
9
|
+
get element(): HTMLElement;
|
|
10
|
+
get width(): number;
|
|
11
|
+
get height(): number;
|
|
12
|
+
get padding(): {
|
|
13
|
+
left: number;
|
|
14
|
+
right: number;
|
|
15
|
+
top: number;
|
|
16
|
+
bottom: number;
|
|
17
|
+
};
|
|
18
|
+
constructor(flicking: Flicking, el: HTMLElement);
|
|
19
|
+
setSize({ width, height }: Partial<{
|
|
20
|
+
width: number | string;
|
|
21
|
+
height: number | string;
|
|
22
|
+
}>): void;
|
|
23
|
+
resize(): void;
|
|
24
|
+
}
|
|
25
|
+
export default Viewport;
|