@egjs/flicking 4.11.2 → 4.11.3-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.
Files changed (72) hide show
  1. package/declaration/Flicking.d.ts +240 -240
  2. package/declaration/camera/Camera.d.ts +89 -89
  3. package/declaration/camera/index.d.ts +4 -4
  4. package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
  5. package/declaration/camera/mode/CameraMode.d.ts +20 -20
  6. package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
  7. package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
  8. package/declaration/camera/mode/index.d.ts +6 -6
  9. package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
  10. package/declaration/cfc/getRenderingPanels.d.ts +4 -4
  11. package/declaration/cfc/index.d.ts +5 -5
  12. package/declaration/cfc/sync.d.ts +4 -4
  13. package/declaration/cfc/withFlickingMethods.d.ts +2 -2
  14. package/declaration/const/axes.d.ts +8 -8
  15. package/declaration/const/error.d.ts +34 -34
  16. package/declaration/const/external.d.ts +48 -48
  17. package/declaration/control/AxesController.d.ts +44 -44
  18. package/declaration/control/Control.d.ts +45 -45
  19. package/declaration/control/FreeControl.d.ts +14 -14
  20. package/declaration/control/SnapControl.d.ts +16 -16
  21. package/declaration/control/StateMachine.d.ts +14 -14
  22. package/declaration/control/StrictControl.d.ts +20 -20
  23. package/declaration/control/index.d.ts +14 -14
  24. package/declaration/control/states/AnimatingState.d.ts +9 -9
  25. package/declaration/control/states/DisabledState.d.ts +9 -9
  26. package/declaration/control/states/DraggingState.d.ts +8 -8
  27. package/declaration/control/states/HoldingState.d.ts +10 -10
  28. package/declaration/control/states/IdleState.d.ts +9 -9
  29. package/declaration/control/states/State.d.ts +47 -47
  30. package/declaration/core/AnchorPoint.d.ts +15 -15
  31. package/declaration/core/AutoResizer.d.ts +16 -16
  32. package/declaration/core/FlickingError.d.ts +5 -5
  33. package/declaration/core/ResizeWatcher.d.ts +33 -33
  34. package/declaration/core/Viewport.d.ts +25 -25
  35. package/declaration/core/VirtualManager.d.ts +37 -37
  36. package/declaration/core/index.d.ts +6 -6
  37. package/declaration/core/panel/Panel.d.ts +89 -89
  38. package/declaration/core/panel/VirtualPanel.d.ts +19 -19
  39. package/declaration/core/panel/index.d.ts +5 -5
  40. package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
  41. package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
  42. package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
  43. package/declaration/core/panel/provider/index.d.ts +5 -5
  44. package/declaration/index.cjs.d.ts +3 -3
  45. package/declaration/index.d.ts +13 -13
  46. package/declaration/index.umd.d.ts +2 -2
  47. package/declaration/renderer/ExternalRenderer.d.ts +7 -7
  48. package/declaration/renderer/Renderer.d.ts +59 -59
  49. package/declaration/renderer/VanillaRenderer.d.ts +10 -10
  50. package/declaration/renderer/index.d.ts +6 -6
  51. package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
  52. package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
  53. package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
  54. package/declaration/renderer/strategy/index.d.ts +5 -5
  55. package/declaration/type/event.d.ts +88 -88
  56. package/declaration/type/external.d.ts +31 -31
  57. package/declaration/type/internal.d.ts +13 -13
  58. package/declaration/utils.d.ts +45 -45
  59. package/dist/flicking.cjs.js +12 -8
  60. package/dist/flicking.cjs.js.map +1 -1
  61. package/dist/flicking.esm.js +12 -8
  62. package/dist/flicking.esm.js.map +1 -1
  63. package/dist/flicking.js +12 -8
  64. package/dist/flicking.js.map +1 -1
  65. package/dist/flicking.min.js +2 -2
  66. package/dist/flicking.min.js.map +1 -1
  67. package/dist/flicking.pkgd.js +36 -17
  68. package/dist/flicking.pkgd.js.map +1 -1
  69. package/dist/flicking.pkgd.min.js +2 -2
  70. package/dist/flicking.pkgd.min.js.map +1 -1
  71. package/package.json +1 -1
  72. package/src/control/SnapControl.ts +4 -4
@@ -1,4 +1,4 @@
1
- import Camera, { CameraOptions } from "./Camera";
2
- export { Camera };
3
- export type { CameraOptions };
4
- export * from "./mode";
1
+ import Camera, { CameraOptions } from "./Camera";
2
+ export { Camera };
3
+ export type { CameraOptions };
4
+ export * from "./mode";
@@ -1,13 +1,13 @@
1
- import AnchorPoint from "../../core/AnchorPoint";
2
- import CameraMode from "./CameraMode";
3
- declare class BoundCameraMode extends CameraMode {
4
- checkAvailability(): boolean;
5
- getRange(): {
6
- min: number;
7
- max: number;
8
- };
9
- getAnchors(): AnchorPoint[];
10
- findAnchorIncludePosition(position: number): AnchorPoint | null;
11
- private _findNearestPanel;
12
- }
13
- export default BoundCameraMode;
1
+ import AnchorPoint from "../../core/AnchorPoint";
2
+ import CameraMode from "./CameraMode";
3
+ declare class BoundCameraMode extends CameraMode {
4
+ checkAvailability(): boolean;
5
+ getRange(): {
6
+ min: number;
7
+ max: number;
8
+ };
9
+ getAnchors(): AnchorPoint[];
10
+ findAnchorIncludePosition(position: number): AnchorPoint | null;
11
+ private _findNearestPanel;
12
+ }
13
+ export default BoundCameraMode;
@@ -1,20 +1,20 @@
1
- import Flicking from "../../Flicking";
2
- import Panel from "../../core/panel/Panel";
3
- import AnchorPoint from "../../core/AnchorPoint";
4
- declare abstract class CameraMode {
5
- protected _flicking: Flicking;
6
- constructor(flicking: Flicking);
7
- abstract checkAvailability(): boolean;
8
- abstract getRange(): {
9
- min: number;
10
- max: number;
11
- };
12
- getAnchors(): AnchorPoint[];
13
- findAnchorIncludePosition(position: number): AnchorPoint | null;
14
- findNearestAnchor(position: number): AnchorPoint | null;
15
- clampToReachablePosition(position: number): number;
16
- getCircularOffset(): number;
17
- canReach(panel: Panel): boolean;
18
- canSee(panel: Panel): boolean;
19
- }
20
- export default CameraMode;
1
+ import Flicking from "../../Flicking";
2
+ import Panel from "../../core/panel/Panel";
3
+ import AnchorPoint from "../../core/AnchorPoint";
4
+ declare abstract class CameraMode {
5
+ protected _flicking: Flicking;
6
+ constructor(flicking: Flicking);
7
+ abstract checkAvailability(): boolean;
8
+ abstract getRange(): {
9
+ min: number;
10
+ max: number;
11
+ };
12
+ getAnchors(): AnchorPoint[];
13
+ findAnchorIncludePosition(position: number): AnchorPoint | null;
14
+ findNearestAnchor(position: number): AnchorPoint | null;
15
+ clampToReachablePosition(position: number): number;
16
+ getCircularOffset(): number;
17
+ canReach(panel: Panel): boolean;
18
+ canSee(panel: Panel): boolean;
19
+ }
20
+ export default CameraMode;
@@ -1,19 +1,19 @@
1
- import Panel from "../../core/panel/Panel";
2
- import AnchorPoint from "../../core/AnchorPoint";
3
- import CameraMode from "./CameraMode";
4
- declare class CircularCameraMode extends CameraMode {
5
- checkAvailability(): boolean;
6
- getRange(): {
7
- min: number;
8
- max: number;
9
- };
10
- getAnchors(): AnchorPoint[];
11
- findNearestAnchor(position: number): AnchorPoint | null;
12
- findAnchorIncludePosition(position: number): AnchorPoint | null;
13
- getCircularOffset(): number;
14
- clampToReachablePosition(position: number): number;
15
- canReach(panel: Panel): boolean;
16
- canSee(panel: Panel): boolean;
17
- private _calcPanelAreaSum;
18
- }
19
- export default CircularCameraMode;
1
+ import Panel from "../../core/panel/Panel";
2
+ import AnchorPoint from "../../core/AnchorPoint";
3
+ import CameraMode from "./CameraMode";
4
+ declare class CircularCameraMode extends CameraMode {
5
+ checkAvailability(): boolean;
6
+ getRange(): {
7
+ min: number;
8
+ max: number;
9
+ };
10
+ getAnchors(): AnchorPoint[];
11
+ findNearestAnchor(position: number): AnchorPoint | null;
12
+ findAnchorIncludePosition(position: number): AnchorPoint | null;
13
+ getCircularOffset(): number;
14
+ clampToReachablePosition(position: number): number;
15
+ canReach(panel: Panel): boolean;
16
+ canSee(panel: Panel): boolean;
17
+ private _calcPanelAreaSum;
18
+ }
19
+ export default CircularCameraMode;
@@ -1,9 +1,9 @@
1
- import CameraMode from "./CameraMode";
2
- declare class LinearCameraMode extends CameraMode {
3
- checkAvailability(): boolean;
4
- getRange(): {
5
- min: number;
6
- max: number;
7
- };
8
- }
9
- export default LinearCameraMode;
1
+ import CameraMode from "./CameraMode";
2
+ declare class LinearCameraMode extends CameraMode {
3
+ checkAvailability(): boolean;
4
+ getRange(): {
5
+ min: number;
6
+ max: number;
7
+ };
8
+ }
9
+ export default LinearCameraMode;
@@ -1,6 +1,6 @@
1
- import CameraMode from "./CameraMode";
2
- import LinearCameraMode from "./LinearCameraMode";
3
- import CircularCameraMode from "./CircularCameraMode";
4
- import BoundCameraMode from "./BoundCameraMode";
5
- export { LinearCameraMode, CircularCameraMode, BoundCameraMode };
6
- export type { CameraMode };
1
+ import CameraMode from "./CameraMode";
2
+ import LinearCameraMode from "./LinearCameraMode";
3
+ import CircularCameraMode from "./CircularCameraMode";
4
+ import BoundCameraMode from "./BoundCameraMode";
5
+ export { LinearCameraMode, CircularCameraMode, BoundCameraMode };
6
+ export type { CameraMode };
@@ -1,3 +1,3 @@
1
- import { FlickingOptions } from "../Flicking";
2
- declare const _default: (align?: FlickingOptions["align"], horizontal?: boolean, firstPanelSize?: string) => string;
3
- export default _default;
1
+ import { FlickingOptions } from "../Flicking";
2
+ declare const _default: (align?: FlickingOptions["align"], horizontal?: boolean, firstPanelSize?: string) => string;
3
+ export default _default;
@@ -1,4 +1,4 @@
1
- import { DiffResult } from "@egjs/list-differ";
2
- import Flicking from "../Flicking";
3
- declare const _default: <T>(flicking: Flicking, diffResult: DiffResult<T>) => T[];
4
- export default _default;
1
+ import { DiffResult } from "@egjs/list-differ";
2
+ import Flicking from "../Flicking";
3
+ declare const _default: <T>(flicking: Flicking, diffResult: DiffResult<T>) => T[];
4
+ export default _default;
@@ -1,5 +1,5 @@
1
- import withFlickingMethods from "./withFlickingMethods";
2
- import sync from "./sync";
3
- import getRenderingPanels from "./getRenderingPanels";
4
- import getDefaultCameraTransform from "./getDefaultCameraTransform";
5
- export { withFlickingMethods, sync, getRenderingPanels, getDefaultCameraTransform };
1
+ import withFlickingMethods from "./withFlickingMethods";
2
+ import sync from "./sync";
3
+ import getRenderingPanels from "./getRenderingPanels";
4
+ import getDefaultCameraTransform from "./getDefaultCameraTransform";
5
+ export { withFlickingMethods, sync, getRenderingPanels, getDefaultCameraTransform };
@@ -1,4 +1,4 @@
1
- import { DiffResult } from "@egjs/list-differ";
2
- import Flicking from "../Flicking";
3
- declare const _default: (flicking: Flicking, diffResult: DiffResult<any>, rendered: any[]) => void;
4
- export default _default;
1
+ import { DiffResult } from "@egjs/list-differ";
2
+ import Flicking from "../Flicking";
3
+ declare const _default: (flicking: Flicking, diffResult: DiffResult<any>, rendered: any[]) => void;
4
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare const withFlickingMethods: (prototype: any, flickingName: string) => void;
2
- export default withFlickingMethods;
1
+ declare const withFlickingMethods: (prototype: any, flickingName: string) => void;
2
+ export default withFlickingMethods;
@@ -1,8 +1,8 @@
1
- export declare const EVENT: {
2
- readonly HOLD: "hold";
3
- readonly CHANGE: "change";
4
- readonly RELEASE: "release";
5
- readonly ANIMATION_END: "animationEnd";
6
- readonly FINISH: "finish";
7
- };
8
- export declare const POSITION_KEY = "flick";
1
+ export declare const EVENT: {
2
+ readonly HOLD: "hold";
3
+ readonly CHANGE: "change";
4
+ readonly RELEASE: "release";
5
+ readonly ANIMATION_END: "animationEnd";
6
+ readonly FINISH: "finish";
7
+ };
8
+ export declare const POSITION_KEY = "flick";
@@ -1,34 +1,34 @@
1
- export declare const CODE: {
2
- readonly WRONG_TYPE: 0;
3
- readonly ELEMENT_NOT_FOUND: 1;
4
- readonly VAL_MUST_NOT_NULL: 2;
5
- readonly NOT_ATTACHED_TO_FLICKING: 3;
6
- readonly WRONG_OPTION: 4;
7
- readonly INDEX_OUT_OF_RANGE: 5;
8
- readonly POSITION_NOT_REACHABLE: 6;
9
- readonly TRANSFORM_NOT_SUPPORTED: 7;
10
- readonly STOP_CALLED_BY_USER: 8;
11
- readonly ANIMATION_INTERRUPTED: 9;
12
- readonly ANIMATION_ALREADY_PLAYING: 10;
13
- readonly NOT_ALLOWED_IN_FRAMEWORK: 11;
14
- readonly NOT_INITIALIZED: 12;
15
- readonly NO_ACTIVE: 13;
16
- readonly NOT_ALLOWED_IN_VIRTUAL: 14;
17
- };
18
- export declare const MESSAGE: {
19
- readonly WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => string;
20
- readonly ELEMENT_NOT_FOUND: (selector: string) => string;
21
- readonly VAL_MUST_NOT_NULL: (val: any, name: string) => string;
22
- readonly NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.";
23
- readonly WRONG_OPTION: (optionName: string, val: any) => string;
24
- readonly INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => string;
25
- readonly POSITION_NOT_REACHABLE: (position: number) => string;
26
- readonly TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.";
27
- readonly STOP_CALLED_BY_USER: "Event stop() is called by user.";
28
- readonly ANIMATION_INTERRUPTED: "Animation is interrupted by user input.";
29
- readonly ANIMATION_ALREADY_PLAYING: "Animation is already playing.";
30
- readonly NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.";
31
- readonly NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.";
32
- readonly NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.";
33
- readonly NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled";
34
- };
1
+ export declare const CODE: {
2
+ readonly WRONG_TYPE: 0;
3
+ readonly ELEMENT_NOT_FOUND: 1;
4
+ readonly VAL_MUST_NOT_NULL: 2;
5
+ readonly NOT_ATTACHED_TO_FLICKING: 3;
6
+ readonly WRONG_OPTION: 4;
7
+ readonly INDEX_OUT_OF_RANGE: 5;
8
+ readonly POSITION_NOT_REACHABLE: 6;
9
+ readonly TRANSFORM_NOT_SUPPORTED: 7;
10
+ readonly STOP_CALLED_BY_USER: 8;
11
+ readonly ANIMATION_INTERRUPTED: 9;
12
+ readonly ANIMATION_ALREADY_PLAYING: 10;
13
+ readonly NOT_ALLOWED_IN_FRAMEWORK: 11;
14
+ readonly NOT_INITIALIZED: 12;
15
+ readonly NO_ACTIVE: 13;
16
+ readonly NOT_ALLOWED_IN_VIRTUAL: 14;
17
+ };
18
+ export declare const MESSAGE: {
19
+ readonly WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => string;
20
+ readonly ELEMENT_NOT_FOUND: (selector: string) => string;
21
+ readonly VAL_MUST_NOT_NULL: (val: any, name: string) => string;
22
+ readonly NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.";
23
+ readonly WRONG_OPTION: (optionName: string, val: any) => string;
24
+ readonly INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => string;
25
+ readonly POSITION_NOT_REACHABLE: (position: number) => string;
26
+ readonly TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.";
27
+ readonly STOP_CALLED_BY_USER: "Event stop() is called by user.";
28
+ readonly ANIMATION_INTERRUPTED: "Animation is interrupted by user input.";
29
+ readonly ANIMATION_ALREADY_PLAYING: "Animation is already playing.";
30
+ readonly NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.";
31
+ readonly NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.";
32
+ readonly NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.";
33
+ readonly NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled";
34
+ };
@@ -1,48 +1,48 @@
1
- export { CODE as ERROR_CODE } from "./error";
2
- export declare const EVENTS: {
3
- readonly READY: "ready";
4
- readonly BEFORE_RESIZE: "beforeResize";
5
- readonly AFTER_RESIZE: "afterResize";
6
- readonly HOLD_START: "holdStart";
7
- readonly HOLD_END: "holdEnd";
8
- readonly MOVE_START: "moveStart";
9
- readonly MOVE: "move";
10
- readonly MOVE_END: "moveEnd";
11
- readonly WILL_CHANGE: "willChange";
12
- readonly CHANGED: "changed";
13
- readonly WILL_RESTORE: "willRestore";
14
- readonly RESTORED: "restored";
15
- readonly SELECT: "select";
16
- readonly NEED_PANEL: "needPanel";
17
- readonly VISIBLE_CHANGE: "visibleChange";
18
- readonly REACH_EDGE: "reachEdge";
19
- readonly PANEL_CHANGE: "panelChange";
20
- };
21
- export declare const ALIGN: {
22
- readonly PREV: "prev";
23
- readonly CENTER: "center";
24
- readonly NEXT: "next";
25
- };
26
- export declare const DIRECTION: {
27
- readonly PREV: "PREV";
28
- readonly NEXT: "NEXT";
29
- readonly NONE: any;
30
- };
31
- export declare const MOVE_TYPE: {
32
- readonly SNAP: "snap";
33
- readonly FREE_SCROLL: "freeScroll";
34
- readonly STRICT: "strict";
35
- };
36
- export declare const CLASS: {
37
- VERTICAL: string;
38
- HIDDEN: string;
39
- DEFAULT_VIRTUAL: string;
40
- };
41
- export declare const CIRCULAR_FALLBACK: {
42
- readonly LINEAR: "linear";
43
- readonly BOUND: "bound";
44
- };
45
- export declare const ORDER: {
46
- readonly LTR: "ltr";
47
- readonly RTL: "rtl";
48
- };
1
+ export { CODE as ERROR_CODE } from "./error";
2
+ export declare const EVENTS: {
3
+ readonly READY: "ready";
4
+ readonly BEFORE_RESIZE: "beforeResize";
5
+ readonly AFTER_RESIZE: "afterResize";
6
+ readonly HOLD_START: "holdStart";
7
+ readonly HOLD_END: "holdEnd";
8
+ readonly MOVE_START: "moveStart";
9
+ readonly MOVE: "move";
10
+ readonly MOVE_END: "moveEnd";
11
+ readonly WILL_CHANGE: "willChange";
12
+ readonly CHANGED: "changed";
13
+ readonly WILL_RESTORE: "willRestore";
14
+ readonly RESTORED: "restored";
15
+ readonly SELECT: "select";
16
+ readonly NEED_PANEL: "needPanel";
17
+ readonly VISIBLE_CHANGE: "visibleChange";
18
+ readonly REACH_EDGE: "reachEdge";
19
+ readonly PANEL_CHANGE: "panelChange";
20
+ };
21
+ export declare const ALIGN: {
22
+ readonly PREV: "prev";
23
+ readonly CENTER: "center";
24
+ readonly NEXT: "next";
25
+ };
26
+ export declare const DIRECTION: {
27
+ readonly PREV: "PREV";
28
+ readonly NEXT: "NEXT";
29
+ readonly NONE: any;
30
+ };
31
+ export declare const MOVE_TYPE: {
32
+ readonly SNAP: "snap";
33
+ readonly FREE_SCROLL: "freeScroll";
34
+ readonly STRICT: "strict";
35
+ };
36
+ export declare const CLASS: {
37
+ VERTICAL: string;
38
+ HIDDEN: string;
39
+ DEFAULT_VIRTUAL: string;
40
+ };
41
+ export declare const CIRCULAR_FALLBACK: {
42
+ readonly LINEAR: "linear";
43
+ readonly BOUND: "bound";
44
+ };
45
+ export declare const ORDER: {
46
+ readonly LTR: "ltr";
47
+ readonly RTL: "rtl";
48
+ };
@@ -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): 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): 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;