@egjs/flicking 4.15.0 → 4.16.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/README.md +6 -175
- package/{declaration → dist}/CrossFlicking.d.ts +7 -2
- package/dist/Flicking.d.ts +1231 -0
- package/dist/camera/Camera.d.ts +324 -0
- package/{declaration → dist}/camera/mode/BoundCameraMode.d.ts +5 -4
- package/{declaration → dist}/camera/mode/CameraMode.d.ts +7 -6
- package/{declaration → dist}/camera/mode/CircularCameraMode.d.ts +9 -5
- package/{declaration → dist}/camera/mode/LinearCameraMode.d.ts +2 -4
- package/{declaration → dist}/cfc/getDefaultCameraTransform.d.ts +1 -1
- package/dist/cfc/withFlickingMethods.d.ts +15 -0
- package/{declaration/const/axes.d.ts → dist/constants/internal.d.ts} +8 -0
- package/dist/constants/values.d.ts +67 -0
- package/dist/control/AxesController.d.ts +186 -0
- package/dist/control/Control.d.ts +185 -0
- package/dist/control/FreeControl.d.ts +44 -0
- package/dist/control/SnapControl.d.ts +54 -0
- package/{declaration → dist}/control/StateMachine.d.ts +3 -0
- package/dist/control/StrictControl.d.ts +60 -0
- package/{declaration → dist}/control/states/AnimatingState.d.ts +12 -0
- package/{declaration → dist}/control/states/DisabledState.d.ts +12 -0
- package/{declaration → dist}/control/states/DraggingState.d.ts +12 -0
- package/{declaration → dist}/control/states/HoldingState.d.ts +12 -0
- package/{declaration → dist}/control/states/IdleState.d.ts +12 -0
- package/dist/control/states/State.d.ts +86 -0
- package/dist/core/AnchorPoint.d.ts +40 -0
- package/{declaration → dist}/core/AutoResizer.d.ts +6 -0
- package/dist/core/Viewport.d.ts +60 -0
- package/dist/core/VirtualManager.d.ts +84 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/panel/Panel.d.ts +298 -0
- package/dist/core/panel/VirtualPanel.d.ts +41 -0
- package/dist/core/panel/index.d.ts +5 -0
- package/{declaration → dist}/core/panel/provider/VanillaElementProvider.d.ts +3 -0
- package/{declaration → dist}/core/panel/provider/VirtualElementProvider.d.ts +3 -0
- package/dist/error/FlickingError.d.ts +25 -0
- package/dist/error/codes.d.ts +79 -0
- package/dist/error/groups.d.ts +94 -0
- package/dist/error/index.d.ts +4 -0
- package/dist/error/types.d.ts +516 -0
- package/dist/event/groups.d.ts +40 -0
- package/dist/event/index.d.ts +3 -0
- package/dist/event/names.d.ts +47 -0
- package/dist/event/types.d.ts +318 -0
- package/dist/flicking.cjs.js +5559 -7791
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +5637 -7699
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +6722 -8893
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +1 -9
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +9661 -14086
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +1 -9
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/reactive/index.d.ts +126 -0
- package/{declaration → dist}/renderer/ExternalRenderer.d.ts +3 -0
- package/dist/renderer/Renderer.d.ts +215 -0
- package/{declaration → dist}/renderer/VanillaRenderer.d.ts +6 -0
- package/{declaration → dist}/renderer/strategy/NormalRenderingStrategy.d.ts +5 -2
- package/{declaration → dist}/renderer/strategy/RenderingStrategy.d.ts +4 -1
- package/dist/types/external.d.ts +58 -0
- package/dist/types/params.d.ts +10 -0
- package/{declaration → dist}/utils.d.ts +7 -7
- package/package.json +35 -162
- package/src/CrossFlicking.ts +68 -96
- package/src/Flicking.ts +1051 -972
- package/src/camera/Camera.ts +217 -206
- package/src/camera/index.ts +2 -6
- package/src/camera/mode/BoundCameraMode.ts +38 -27
- package/src/camera/mode/CameraMode.ts +14 -12
- package/src/camera/mode/CircularCameraMode.ts +24 -16
- package/src/camera/mode/LinearCameraMode.ts +3 -1
- package/src/camera/mode/index.ts +4 -10
- package/src/cfc/getDefaultCameraTransform.ts +9 -11
- package/src/cfc/getRenderingPanels.ts +2 -4
- package/src/cfc/index.ts +4 -9
- package/src/cfc/sync.ts +11 -5
- package/src/cfc/withFlickingMethods.ts +6 -7
- package/src/{const/axes.ts → constants/internal.ts} +1 -0
- package/src/constants/values.ts +78 -0
- package/src/control/AxesController.ts +119 -110
- package/src/control/Control.ts +147 -180
- package/src/control/FreeControl.ts +36 -60
- package/src/control/SnapControl.ts +64 -68
- package/src/control/StateMachine.ts +14 -11
- package/src/control/StrictControl.ts +58 -73
- package/src/control/index.ts +9 -12
- package/src/control/states/AnimatingState.ts +8 -11
- package/src/control/states/DisabledState.ts +0 -5
- package/src/control/states/DraggingState.ts +8 -12
- package/src/control/states/HoldingState.ts +10 -15
- package/src/control/states/IdleState.ts +1 -6
- package/src/control/states/State.ts +46 -85
- package/src/core/AnchorPoint.ts +25 -23
- package/src/core/AutoResizer.ts +6 -15
- package/src/core/ResizeWatcher.ts +17 -16
- package/src/core/Viewport.ts +35 -46
- package/src/core/VirtualManager.ts +48 -36
- package/src/core/index.ts +6 -9
- package/src/core/panel/Panel.ts +190 -185
- package/src/core/panel/VirtualPanel.ts +17 -21
- package/src/core/panel/index.ts +4 -9
- package/src/core/panel/provider/VanillaElementProvider.ts +6 -2
- package/src/core/panel/provider/VirtualElementProvider.ts +6 -2
- package/src/core/panel/provider/index.ts +2 -7
- package/src/{core → error}/FlickingError.ts +5 -7
- package/src/error/codes.ts +164 -0
- package/src/error/groups.ts +124 -0
- package/src/error/index.ts +9 -0
- package/src/error/types.ts +535 -0
- package/src/event/groups.ts +61 -0
- package/src/event/index.ts +8 -0
- package/src/event/names.ts +52 -0
- package/src/event/types.ts +355 -0
- package/src/index.ts +9 -11
- package/src/index.umd.ts +9 -3
- package/src/reactive/index.ts +39 -74
- package/src/renderer/Renderer.ts +170 -115
- package/src/renderer/VanillaRenderer.ts +12 -9
- package/src/renderer/index.ts +4 -9
- package/src/renderer/strategy/NormalRenderingStrategy.ts +26 -22
- package/src/renderer/strategy/RenderingStrategy.ts +2 -1
- package/src/renderer/strategy/VirtualRenderingStrategy.ts +20 -13
- package/src/renderer/strategy/index.ts +4 -9
- package/src/types/external.ts +72 -0
- package/src/{type → types}/internal.ts +2 -5
- package/src/types/params.ts +15 -0
- package/src/utils.ts +37 -32
- package/CONTRIBUTING.md +0 -59
- package/NOTICE +0 -31
- package/core-packages-link.js +0 -75
- package/debug/reactive/index.html +0 -240
- package/declaration/Flicking.d.ts +0 -264
- package/declaration/camera/Camera.d.ts +0 -90
- package/declaration/cfc/withFlickingMethods.d.ts +0 -2
- package/declaration/const/error.d.ts +0 -34
- package/declaration/const/external.d.ts +0 -54
- package/declaration/control/AxesController.d.ts +0 -45
- package/declaration/control/Control.d.ts +0 -45
- package/declaration/control/FreeControl.d.ts +0 -14
- package/declaration/control/SnapControl.d.ts +0 -16
- package/declaration/control/StrictControl.d.ts +0 -20
- package/declaration/control/states/State.d.ts +0 -47
- package/declaration/core/AnchorPoint.d.ts +0 -15
- package/declaration/core/FlickingError.d.ts +0 -5
- package/declaration/core/Viewport.d.ts +0 -25
- package/declaration/core/VirtualManager.d.ts +0 -37
- package/declaration/core/index.d.ts +0 -6
- package/declaration/core/panel/Panel.d.ts +0 -89
- package/declaration/core/panel/VirtualPanel.d.ts +0 -19
- package/declaration/core/panel/index.d.ts +0 -5
- package/declaration/index.d.ts +0 -16
- package/declaration/reactive/index.d.ts +0 -25
- package/declaration/renderer/Renderer.d.ts +0 -60
- package/declaration/type/event.d.ts +0 -88
- package/declaration/type/external.d.ts +0 -31
- package/jsconfig.json +0 -5
- package/jsdoc-to-mdx.json +0 -7
- package/rollup.config.demo.js +0 -24
- package/rollup.config.dev.js +0 -12
- package/rollup.config.js +0 -57
- package/src/const/error.ts +0 -64
- package/src/const/external.ts +0 -138
- package/src/type/event.ts +0 -315
- package/src/type/external.ts +0 -78
- package/tsconfig.declaration.json +0 -17
- package/tsconfig.eslint.json +0 -10
- package/tsconfig.json +0 -23
- package/{declaration → dist}/camera/index.d.ts +0 -0
- package/{declaration → dist}/camera/mode/index.d.ts +2 -2
- package/{declaration → dist}/cfc/getRenderingPanels.d.ts +0 -0
- package/{declaration → dist}/cfc/index.d.ts +3 -3
- package/{declaration → dist}/cfc/sync.d.ts +0 -0
- package/{declaration → dist}/control/index.d.ts +7 -7
- package/{declaration → dist}/core/ResizeWatcher.d.ts +0 -0
- package/{declaration → dist}/core/panel/provider/ElementProvider.d.ts +0 -0
- package/{declaration → dist}/core/panel/provider/index.d.ts +0 -0
- package/{declaration → dist}/index.cjs.d.ts +0 -0
- package/{declaration → dist}/index.umd.d.ts +0 -0
- package/{declaration → dist}/renderer/index.d.ts +1 -1
- package/{declaration → dist}/renderer/strategy/VirtualRenderingStrategy.d.ts +1 -1
- package/{declaration → dist}/renderer/strategy/index.d.ts +1 -1
- /package/{declaration/type → dist/types}/internal.d.ts +0 -0
package/src/type/external.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import Flicking from "../Flicking";
|
|
2
|
-
import { SnapControlOptions, FreeControlOptions, StrictControlOptions } from "../control";
|
|
3
|
-
import { MOVE_TYPE } from "../const/external";
|
|
4
|
-
import { ValueOf } from "../type/internal";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* HTML `string` of single/mutiple HTMLElement, or an instance of `HTMLElement`
|
|
8
|
-
* @ko 단일/복수의 HTMLElement의 outerHTML에 해당하는 `string`, 혹은 `HTMLElement`의 인스턴스
|
|
9
|
-
* @typedef
|
|
10
|
-
*/
|
|
11
|
-
export type ElementLike = string | HTMLElement;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Flicking Plugin
|
|
15
|
-
* @ko Flicking 플러그인
|
|
16
|
-
* @interface
|
|
17
|
-
* @property - Initialize the plugin<ko>플러그인을 초기화합니다</ko>
|
|
18
|
-
* @property - Destroy plugin and detach all events binded<ko>플러그인을 제거하고 부착된 모든 이벤트들을 제거합니다.</ko>
|
|
19
|
-
* @property - Update plugin to match current Flicking's status<ko>현재 Flicking의 상태에 대응하도록 플러그인을 업데이트합니다.</ko>
|
|
20
|
-
*/
|
|
21
|
-
export interface Plugin {
|
|
22
|
-
init(flicking: Flicking): void;
|
|
23
|
-
destroy(): void;
|
|
24
|
-
update(flicking: Flicking): void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Flicking Status returned by {@link Flicking#getStatus}
|
|
29
|
-
* @ko {@link Flicking#getStatus}에 의해 반환된 Flicking 상태 객체
|
|
30
|
-
* @interface
|
|
31
|
-
* @property {number} index An index of the active panel<ko>활성화된 패널의 인덱스</ko>
|
|
32
|
-
* @property {object} position A info to restore camera {@link Camera#position position}<ko>카메라 {@link Camera#position position}을 설정하기 위한 정보들</ko>
|
|
33
|
-
* @property {number} [position.panel] An index of the panel camera is located at<ko>카메라가 위치한 패널의 인덱스</ko>
|
|
34
|
-
* @property {number} [position.progressInPanel] A progress of the camera position inside the panel<ko>패널 내에서의 카메라 위치의 진행도</ko>
|
|
35
|
-
* @property {number} visibleOffset An offset to visible panel's original index. This value is available only when `visiblePanelsOnly` is `true`
|
|
36
|
-
* <ko>현재 보이는 패널들을 저장했을 때, 원래의 인덱스 대비 offset. `visiblePanelsOnly` 옵션을 사용했을 때만 사용 가능합니다</ko>
|
|
37
|
-
* @property {object[]} panels A data array of panels<ko>패널의 정보를 담은 배열</ko>
|
|
38
|
-
* @property {index} [panels.index] An index of the panel<ko>패널의 인덱스</ko>
|
|
39
|
-
* @property {string | undefined} [panels.html] An `outerHTML` of the panel element<ko>패널 엘리먼트의 `outerHTML`</ko>
|
|
40
|
-
*/
|
|
41
|
-
export interface Status {
|
|
42
|
-
index?: number;
|
|
43
|
-
position?: {
|
|
44
|
-
panel: number;
|
|
45
|
-
progressInPanel: number;
|
|
46
|
-
};
|
|
47
|
-
visibleOffset?: number;
|
|
48
|
-
panels: Array<{
|
|
49
|
-
index: number;
|
|
50
|
-
html?: string;
|
|
51
|
-
}>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* eslint-disable @typescript-eslint/indent */
|
|
55
|
-
export type MoveTypeOptions<T extends ValueOf<typeof MOVE_TYPE>> =
|
|
56
|
-
T extends typeof MOVE_TYPE.SNAP ? [T] | [T, Partial<SnapControlOptions>] :
|
|
57
|
-
T extends typeof MOVE_TYPE.FREE_SCROLL ? [T] | [T, Partial<FreeControlOptions>] :
|
|
58
|
-
T extends typeof MOVE_TYPE.STRICT ? [T] | [T, Partial<StrictControlOptions>] :
|
|
59
|
-
[T];
|
|
60
|
-
/* eslint-enable */
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* A current parameters of the Camera for updating {@link AxesController}
|
|
64
|
-
* @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들
|
|
65
|
-
* @interface
|
|
66
|
-
* @property {object} range A moveable range for Camera<ko>Camera가 이동 가능한 범위</ko>
|
|
67
|
-
* @property {number} position Current camera position<ko>현재 카메라 좌표</ko>
|
|
68
|
-
* @property {boolean} circular A Boolean indicating whether the {@link Flicking#circular circular} option is enabled<ko>{@link Flicking#circular circular}옵션 활성화 여부</ko>
|
|
69
|
-
* @readonly
|
|
70
|
-
*/
|
|
71
|
-
export interface ControlParams {
|
|
72
|
-
range: {
|
|
73
|
-
min: number;
|
|
74
|
-
max: number;
|
|
75
|
-
};
|
|
76
|
-
position: number;
|
|
77
|
-
circular: boolean;
|
|
78
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"removeComments": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"emitDeclarationOnly": true,
|
|
7
|
-
"declarationDir": "declaration",
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"strictNullChecks": false
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"./src/**/*.ts",
|
|
13
|
-
],
|
|
14
|
-
"exclude": [
|
|
15
|
-
"node_modules"
|
|
16
|
-
]
|
|
17
|
-
}
|
package/tsconfig.eslint.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./outjs/",
|
|
4
|
-
"module": "es2015",
|
|
5
|
-
"target": "es5",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"lib": ["es2015", "dom"],
|
|
8
|
-
"sourceMap": true,
|
|
9
|
-
"strictNullChecks": true,
|
|
10
|
-
"downlevelIteration": true,
|
|
11
|
-
"emitDecoratorMetadata": true,
|
|
12
|
-
"experimentalDecorators": true,
|
|
13
|
-
"esModuleInterop": false,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"baseUrl": "."
|
|
16
|
-
},
|
|
17
|
-
"include": [
|
|
18
|
-
"./src/**/*.ts"
|
|
19
|
-
],
|
|
20
|
-
"exclude": [
|
|
21
|
-
"node_modules"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import BoundCameraMode from "./BoundCameraMode";
|
|
1
2
|
import CameraMode from "./CameraMode";
|
|
2
|
-
import LinearCameraMode from "./LinearCameraMode";
|
|
3
3
|
import CircularCameraMode from "./CircularCameraMode";
|
|
4
|
-
import
|
|
4
|
+
import LinearCameraMode from "./LinearCameraMode";
|
|
5
5
|
export { LinearCameraMode, CircularCameraMode, BoundCameraMode };
|
|
6
6
|
export type { CameraMode };
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import withFlickingMethods from "./withFlickingMethods";
|
|
2
|
-
import sync from "./sync";
|
|
3
|
-
import getRenderingPanels from "./getRenderingPanels";
|
|
4
1
|
import getDefaultCameraTransform from "./getDefaultCameraTransform";
|
|
2
|
+
import getRenderingPanels from "./getRenderingPanels";
|
|
3
|
+
import sync from "./sync";
|
|
4
|
+
import withFlickingMethods from "./withFlickingMethods";
|
|
5
5
|
export { withFlickingMethods, sync, getRenderingPanels, getDefaultCameraTransform };
|
|
File without changes
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import AxesController from "./AxesController";
|
|
1
2
|
import Control from "./Control";
|
|
2
|
-
import SnapControl, { SnapControlOptions } from "./SnapControl";
|
|
3
3
|
import FreeControl, { FreeControlOptions } from "./FreeControl";
|
|
4
|
+
import SnapControl, { SnapControlOptions } from "./SnapControl";
|
|
5
|
+
import StateMachine from "./StateMachine";
|
|
4
6
|
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
7
|
import AnimatingState from "./states/AnimatingState";
|
|
11
8
|
import DisabledState from "./states/DisabledState";
|
|
12
|
-
import
|
|
9
|
+
import DraggingState from "./states/DraggingState";
|
|
10
|
+
import HoldingState from "./states/HoldingState";
|
|
11
|
+
import IdleState from "./states/IdleState";
|
|
12
|
+
import State from "./states/State";
|
|
13
13
|
export { Control, SnapControl, FreeControl, StrictControl, AxesController, State, IdleState, HoldingState, DraggingState, AnimatingState, DisabledState, StateMachine };
|
|
14
14
|
export type { SnapControlOptions, FreeControlOptions, StrictControlOptions };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import ExternalRenderer from "./ExternalRenderer";
|
|
1
2
|
import Renderer, { RendererOptions } from "./Renderer";
|
|
2
3
|
import VanillaRenderer from "./VanillaRenderer";
|
|
3
|
-
import ExternalRenderer from "./ExternalRenderer";
|
|
4
4
|
export * from "./strategy";
|
|
5
5
|
export { Renderer, VanillaRenderer, ExternalRenderer };
|
|
6
6
|
export type { RendererOptions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Flicking from "../../Flicking";
|
|
2
1
|
import { PanelOptions } from "../../core/panel/Panel";
|
|
3
2
|
import VirtualPanel from "../../core/panel/VirtualPanel";
|
|
3
|
+
import Flicking from "../../Flicking";
|
|
4
4
|
import RenderingStrategy from "./RenderingStrategy";
|
|
5
5
|
declare class VirtualRenderingStrategy implements RenderingStrategy {
|
|
6
6
|
renderPanels(flicking: Flicking): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import RenderingStrategy from "./RenderingStrategy";
|
|
2
1
|
import NormalRenderingStrategy, { NormalRenderingStrategyOptions } from "./NormalRenderingStrategy";
|
|
2
|
+
import RenderingStrategy from "./RenderingStrategy";
|
|
3
3
|
import VirtualRenderingStrategy from "./VirtualRenderingStrategy";
|
|
4
4
|
export { NormalRenderingStrategy, VirtualRenderingStrategy };
|
|
5
5
|
export type { RenderingStrategy, NormalRenderingStrategyOptions };
|
|
File without changes
|