@egjs/flicking 4.12.0-beta.9 → 4.12.1-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.
Files changed (83) hide show
  1. package/declaration/CrossFlicking.d.ts +89 -76
  2. package/declaration/Flicking.d.ts +244 -244
  3. package/declaration/camera/Camera.d.ts +90 -90
  4. package/declaration/camera/index.d.ts +4 -4
  5. package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
  6. package/declaration/camera/mode/CameraMode.d.ts +20 -20
  7. package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
  8. package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
  9. package/declaration/camera/mode/index.d.ts +6 -6
  10. package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
  11. package/declaration/cfc/getRenderingPanels.d.ts +4 -4
  12. package/declaration/cfc/index.d.ts +5 -5
  13. package/declaration/cfc/sync.d.ts +4 -4
  14. package/declaration/cfc/withFlickingMethods.d.ts +2 -2
  15. package/declaration/const/axes.d.ts +8 -8
  16. package/declaration/const/error.d.ts +34 -34
  17. package/declaration/const/external.d.ts +54 -54
  18. package/declaration/control/AxesController.d.ts +44 -44
  19. package/declaration/control/Control.d.ts +45 -45
  20. package/declaration/control/FreeControl.d.ts +14 -14
  21. package/declaration/control/SnapControl.d.ts +16 -16
  22. package/declaration/control/StateMachine.d.ts +14 -14
  23. package/declaration/control/StrictControl.d.ts +20 -20
  24. package/declaration/control/index.d.ts +14 -14
  25. package/declaration/control/states/AnimatingState.d.ts +9 -9
  26. package/declaration/control/states/DisabledState.d.ts +9 -9
  27. package/declaration/control/states/DraggingState.d.ts +8 -8
  28. package/declaration/control/states/HoldingState.d.ts +10 -10
  29. package/declaration/control/states/IdleState.d.ts +9 -9
  30. package/declaration/control/states/State.d.ts +47 -47
  31. package/declaration/core/AnchorPoint.d.ts +15 -15
  32. package/declaration/core/AutoResizer.d.ts +16 -16
  33. package/declaration/core/FlickingError.d.ts +5 -5
  34. package/declaration/core/ResizeWatcher.d.ts +33 -33
  35. package/declaration/core/Viewport.d.ts +25 -25
  36. package/declaration/core/VirtualManager.d.ts +37 -37
  37. package/declaration/core/index.d.ts +6 -6
  38. package/declaration/core/panel/Panel.d.ts +89 -89
  39. package/declaration/core/panel/VirtualPanel.d.ts +19 -19
  40. package/declaration/core/panel/index.d.ts +5 -5
  41. package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
  42. package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
  43. package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
  44. package/declaration/core/panel/provider/index.d.ts +5 -5
  45. package/declaration/index.cjs.d.ts +3 -3
  46. package/declaration/index.d.ts +15 -15
  47. package/declaration/index.umd.d.ts +2 -2
  48. package/declaration/renderer/ExternalRenderer.d.ts +7 -7
  49. package/declaration/renderer/Renderer.d.ts +59 -59
  50. package/declaration/renderer/VanillaRenderer.d.ts +10 -10
  51. package/declaration/renderer/index.d.ts +6 -6
  52. package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
  53. package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
  54. package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
  55. package/declaration/renderer/strategy/index.d.ts +5 -5
  56. package/declaration/type/event.d.ts +88 -88
  57. package/declaration/type/external.d.ts +31 -31
  58. package/declaration/type/internal.d.ts +13 -13
  59. package/declaration/utils.d.ts +47 -47
  60. package/dist/flicking-inline.css +37 -0
  61. package/dist/flicking-inline.min.css +1 -0
  62. package/dist/flicking-inline.min.min.css +1 -0
  63. package/dist/flicking.cjs.js +33 -5
  64. package/dist/flicking.cjs.js.map +1 -1
  65. package/dist/flicking.css +40 -0
  66. package/dist/flicking.esm.js +33 -5
  67. package/dist/flicking.esm.js.map +1 -1
  68. package/dist/flicking.js +33 -5
  69. package/dist/flicking.js.map +1 -1
  70. package/dist/flicking.min.css +1 -0
  71. package/dist/flicking.min.js +2 -2
  72. package/dist/flicking.min.js.map +1 -1
  73. package/dist/flicking.min.min.css +1 -0
  74. package/dist/flicking.pkgd.js +783 -755
  75. package/dist/flicking.pkgd.js.map +1 -1
  76. package/dist/flicking.pkgd.min.js +2 -2
  77. package/dist/flicking.pkgd.min.js.map +1 -1
  78. package/package.json +5 -6
  79. package/src/CrossFlicking.ts +32 -4
  80. package/src/Flicking.ts +1 -1
  81. package/src/control/states/HoldingState.ts +4 -0
  82. package/src/core/panel/Panel.ts +4 -0
  83. package/src/utils.ts +4 -0
@@ -1,44 +1,44 @@
1
- import Axes, { PanInput, OnRelease } from "@egjs/axes";
2
- import Flicking from "../Flicking";
3
- import { ControlParams } from "../type/external";
4
- import StateMachine from "./StateMachine";
5
- declare class AxesController {
6
- private _flicking;
7
- private _axes;
8
- private _panInput;
9
- private _stateMachine;
10
- private _animatingContext;
11
- private _dragged;
12
- get axes(): Axes;
13
- get panInput(): PanInput;
14
- get stateMachine(): StateMachine;
15
- get state(): import("./states/State").default;
16
- get animatingContext(): {
17
- start: number;
18
- end: number;
19
- offset: number;
20
- };
21
- get controlParams(): ControlParams;
22
- get enabled(): boolean;
23
- get position(): number;
24
- get range(): number[];
25
- get bounce(): number[];
26
- constructor();
27
- init(flicking: Flicking): this;
28
- destroy(): void;
29
- enable(): this;
30
- disable(): this;
31
- release(): this;
32
- updateAnimation(position: number, duration?: number): this;
33
- stopAnimation(): this;
34
- update(controlParams: ControlParams): this;
35
- addPreventClickHandler(): this;
36
- removePreventClickHandler(): this;
37
- animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
38
- updateDirection(): void;
39
- private _resetInternalValues;
40
- private _onAxesHold;
41
- private _onAxesChange;
42
- private _preventClickWhenDragged;
43
- }
44
- export default AxesController;
1
+ import Axes, { PanInput, OnRelease } from "@egjs/axes";
2
+ import Flicking from "../Flicking";
3
+ import { ControlParams } from "../type/external";
4
+ import StateMachine from "./StateMachine";
5
+ declare class AxesController {
6
+ private _flicking;
7
+ private _axes;
8
+ private _panInput;
9
+ private _stateMachine;
10
+ private _animatingContext;
11
+ private _dragged;
12
+ get axes(): Axes;
13
+ get panInput(): PanInput;
14
+ get stateMachine(): StateMachine;
15
+ get state(): import("./states/State").default;
16
+ get animatingContext(): {
17
+ start: number;
18
+ end: number;
19
+ offset: number;
20
+ };
21
+ get controlParams(): ControlParams;
22
+ get enabled(): boolean;
23
+ get position(): number;
24
+ get range(): number[];
25
+ get bounce(): number[];
26
+ constructor();
27
+ init(flicking: Flicking): this;
28
+ destroy(): void;
29
+ enable(): this;
30
+ disable(): this;
31
+ release(): this;
32
+ updateAnimation(position: number, duration?: number): this;
33
+ stopAnimation(): this;
34
+ update(controlParams: ControlParams): this;
35
+ addPreventClickHandler(): this;
36
+ removePreventClickHandler(): this;
37
+ animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise<void>;
38
+ updateDirection(): void;
39
+ private _resetInternalValues;
40
+ private _onAxesHold;
41
+ private _onAxesChange;
42
+ private _preventClickWhenDragged;
43
+ }
44
+ export default AxesController;
@@ -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;