@egjs/flicking 4.15.0 → 4.16.0-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 (185) hide show
  1. package/README.md +6 -175
  2. package/{declaration → dist}/CrossFlicking.d.ts +7 -2
  3. package/dist/Flicking.d.ts +1231 -0
  4. package/dist/camera/Camera.d.ts +324 -0
  5. package/{declaration → dist}/camera/mode/BoundCameraMode.d.ts +5 -4
  6. package/{declaration → dist}/camera/mode/CameraMode.d.ts +7 -6
  7. package/{declaration → dist}/camera/mode/CircularCameraMode.d.ts +9 -5
  8. package/{declaration → dist}/camera/mode/LinearCameraMode.d.ts +2 -4
  9. package/{declaration → dist}/cfc/getDefaultCameraTransform.d.ts +1 -1
  10. package/dist/cfc/withFlickingMethods.d.ts +15 -0
  11. package/{declaration/const/axes.d.ts → dist/constants/internal.d.ts} +8 -0
  12. package/dist/constants/values.d.ts +67 -0
  13. package/dist/control/AxesController.d.ts +186 -0
  14. package/dist/control/Control.d.ts +185 -0
  15. package/dist/control/FreeControl.d.ts +44 -0
  16. package/dist/control/SnapControl.d.ts +54 -0
  17. package/{declaration → dist}/control/StateMachine.d.ts +3 -0
  18. package/dist/control/StrictControl.d.ts +60 -0
  19. package/{declaration → dist}/control/states/AnimatingState.d.ts +12 -0
  20. package/{declaration → dist}/control/states/DisabledState.d.ts +12 -0
  21. package/{declaration → dist}/control/states/DraggingState.d.ts +12 -0
  22. package/{declaration → dist}/control/states/HoldingState.d.ts +12 -0
  23. package/{declaration → dist}/control/states/IdleState.d.ts +12 -0
  24. package/dist/control/states/State.d.ts +86 -0
  25. package/dist/core/AnchorPoint.d.ts +40 -0
  26. package/{declaration → dist}/core/AutoResizer.d.ts +6 -0
  27. package/dist/core/Viewport.d.ts +60 -0
  28. package/dist/core/VirtualManager.d.ts +84 -0
  29. package/dist/core/index.d.ts +6 -0
  30. package/dist/core/panel/Panel.d.ts +298 -0
  31. package/dist/core/panel/VirtualPanel.d.ts +41 -0
  32. package/dist/core/panel/index.d.ts +5 -0
  33. package/{declaration → dist}/core/panel/provider/VanillaElementProvider.d.ts +3 -0
  34. package/{declaration → dist}/core/panel/provider/VirtualElementProvider.d.ts +3 -0
  35. package/dist/error/FlickingError.d.ts +25 -0
  36. package/dist/error/codes.d.ts +79 -0
  37. package/dist/error/groups.d.ts +94 -0
  38. package/dist/error/index.d.ts +4 -0
  39. package/dist/error/types.d.ts +516 -0
  40. package/dist/event/groups.d.ts +40 -0
  41. package/dist/event/index.d.ts +3 -0
  42. package/dist/event/names.d.ts +47 -0
  43. package/dist/event/types.d.ts +318 -0
  44. package/dist/flicking.cjs.js +5559 -7791
  45. package/dist/flicking.cjs.js.map +1 -1
  46. package/dist/flicking.esm.js +5637 -7699
  47. package/dist/flicking.esm.js.map +1 -1
  48. package/dist/flicking.js +6722 -8893
  49. package/dist/flicking.js.map +1 -1
  50. package/dist/flicking.min.js +1 -9
  51. package/dist/flicking.min.js.map +1 -1
  52. package/dist/flicking.pkgd.js +9661 -14086
  53. package/dist/flicking.pkgd.js.map +1 -1
  54. package/dist/flicking.pkgd.min.js +1 -9
  55. package/dist/flicking.pkgd.min.js.map +1 -1
  56. package/dist/index.d.ts +16 -0
  57. package/dist/reactive/index.d.ts +126 -0
  58. package/{declaration → dist}/renderer/ExternalRenderer.d.ts +3 -0
  59. package/dist/renderer/Renderer.d.ts +215 -0
  60. package/{declaration → dist}/renderer/VanillaRenderer.d.ts +6 -0
  61. package/{declaration → dist}/renderer/strategy/NormalRenderingStrategy.d.ts +5 -2
  62. package/{declaration → dist}/renderer/strategy/RenderingStrategy.d.ts +4 -1
  63. package/dist/types/external.d.ts +58 -0
  64. package/dist/types/params.d.ts +10 -0
  65. package/{declaration → dist}/utils.d.ts +7 -7
  66. package/package.json +35 -162
  67. package/src/CrossFlicking.ts +68 -96
  68. package/src/Flicking.ts +1051 -972
  69. package/src/camera/Camera.ts +217 -206
  70. package/src/camera/index.ts +2 -6
  71. package/src/camera/mode/BoundCameraMode.ts +38 -27
  72. package/src/camera/mode/CameraMode.ts +14 -12
  73. package/src/camera/mode/CircularCameraMode.ts +24 -16
  74. package/src/camera/mode/LinearCameraMode.ts +3 -1
  75. package/src/camera/mode/index.ts +4 -10
  76. package/src/cfc/getDefaultCameraTransform.ts +9 -11
  77. package/src/cfc/getRenderingPanels.ts +2 -4
  78. package/src/cfc/index.ts +4 -9
  79. package/src/cfc/sync.ts +11 -5
  80. package/src/cfc/withFlickingMethods.ts +6 -7
  81. package/src/{const/axes.ts → constants/internal.ts} +1 -0
  82. package/src/constants/values.ts +78 -0
  83. package/src/control/AxesController.ts +119 -110
  84. package/src/control/Control.ts +147 -180
  85. package/src/control/FreeControl.ts +36 -60
  86. package/src/control/SnapControl.ts +64 -68
  87. package/src/control/StateMachine.ts +14 -11
  88. package/src/control/StrictControl.ts +58 -73
  89. package/src/control/index.ts +9 -12
  90. package/src/control/states/AnimatingState.ts +8 -11
  91. package/src/control/states/DisabledState.ts +0 -5
  92. package/src/control/states/DraggingState.ts +8 -12
  93. package/src/control/states/HoldingState.ts +10 -15
  94. package/src/control/states/IdleState.ts +1 -6
  95. package/src/control/states/State.ts +46 -85
  96. package/src/core/AnchorPoint.ts +25 -23
  97. package/src/core/AutoResizer.ts +6 -15
  98. package/src/core/ResizeWatcher.ts +17 -16
  99. package/src/core/Viewport.ts +35 -46
  100. package/src/core/VirtualManager.ts +48 -36
  101. package/src/core/index.ts +6 -9
  102. package/src/core/panel/Panel.ts +190 -185
  103. package/src/core/panel/VirtualPanel.ts +17 -21
  104. package/src/core/panel/index.ts +4 -9
  105. package/src/core/panel/provider/VanillaElementProvider.ts +6 -2
  106. package/src/core/panel/provider/VirtualElementProvider.ts +6 -2
  107. package/src/core/panel/provider/index.ts +2 -7
  108. package/src/{core → error}/FlickingError.ts +5 -7
  109. package/src/error/codes.ts +164 -0
  110. package/src/error/groups.ts +124 -0
  111. package/src/error/index.ts +9 -0
  112. package/src/error/types.ts +535 -0
  113. package/src/event/groups.ts +61 -0
  114. package/src/event/index.ts +8 -0
  115. package/src/event/names.ts +52 -0
  116. package/src/event/types.ts +355 -0
  117. package/src/index.ts +9 -11
  118. package/src/index.umd.ts +9 -3
  119. package/src/reactive/index.ts +39 -74
  120. package/src/renderer/Renderer.ts +170 -115
  121. package/src/renderer/VanillaRenderer.ts +12 -9
  122. package/src/renderer/index.ts +4 -9
  123. package/src/renderer/strategy/NormalRenderingStrategy.ts +26 -22
  124. package/src/renderer/strategy/RenderingStrategy.ts +2 -1
  125. package/src/renderer/strategy/VirtualRenderingStrategy.ts +20 -13
  126. package/src/renderer/strategy/index.ts +4 -9
  127. package/src/types/external.ts +72 -0
  128. package/src/{type → types}/internal.ts +2 -5
  129. package/src/types/params.ts +15 -0
  130. package/src/utils.ts +37 -32
  131. package/CONTRIBUTING.md +0 -59
  132. package/NOTICE +0 -31
  133. package/core-packages-link.js +0 -75
  134. package/debug/reactive/index.html +0 -240
  135. package/declaration/Flicking.d.ts +0 -264
  136. package/declaration/camera/Camera.d.ts +0 -90
  137. package/declaration/cfc/withFlickingMethods.d.ts +0 -2
  138. package/declaration/const/error.d.ts +0 -34
  139. package/declaration/const/external.d.ts +0 -54
  140. package/declaration/control/AxesController.d.ts +0 -45
  141. package/declaration/control/Control.d.ts +0 -45
  142. package/declaration/control/FreeControl.d.ts +0 -14
  143. package/declaration/control/SnapControl.d.ts +0 -16
  144. package/declaration/control/StrictControl.d.ts +0 -20
  145. package/declaration/control/states/State.d.ts +0 -47
  146. package/declaration/core/AnchorPoint.d.ts +0 -15
  147. package/declaration/core/FlickingError.d.ts +0 -5
  148. package/declaration/core/Viewport.d.ts +0 -25
  149. package/declaration/core/VirtualManager.d.ts +0 -37
  150. package/declaration/core/index.d.ts +0 -6
  151. package/declaration/core/panel/Panel.d.ts +0 -89
  152. package/declaration/core/panel/VirtualPanel.d.ts +0 -19
  153. package/declaration/core/panel/index.d.ts +0 -5
  154. package/declaration/index.d.ts +0 -16
  155. package/declaration/reactive/index.d.ts +0 -25
  156. package/declaration/renderer/Renderer.d.ts +0 -60
  157. package/declaration/type/event.d.ts +0 -88
  158. package/declaration/type/external.d.ts +0 -31
  159. package/jsconfig.json +0 -5
  160. package/jsdoc-to-mdx.json +0 -7
  161. package/rollup.config.demo.js +0 -24
  162. package/rollup.config.dev.js +0 -12
  163. package/rollup.config.js +0 -57
  164. package/src/const/error.ts +0 -64
  165. package/src/const/external.ts +0 -138
  166. package/src/type/event.ts +0 -315
  167. package/src/type/external.ts +0 -78
  168. package/tsconfig.declaration.json +0 -17
  169. package/tsconfig.eslint.json +0 -10
  170. package/tsconfig.json +0 -23
  171. package/{declaration → dist}/camera/index.d.ts +0 -0
  172. package/{declaration → dist}/camera/mode/index.d.ts +2 -2
  173. package/{declaration → dist}/cfc/getRenderingPanels.d.ts +0 -0
  174. package/{declaration → dist}/cfc/index.d.ts +3 -3
  175. package/{declaration → dist}/cfc/sync.d.ts +0 -0
  176. package/{declaration → dist}/control/index.d.ts +7 -7
  177. package/{declaration → dist}/core/ResizeWatcher.d.ts +0 -0
  178. package/{declaration → dist}/core/panel/provider/ElementProvider.d.ts +0 -0
  179. package/{declaration → dist}/core/panel/provider/index.d.ts +0 -0
  180. package/{declaration → dist}/index.cjs.d.ts +0 -0
  181. package/{declaration → dist}/index.umd.d.ts +0 -0
  182. package/{declaration → dist}/renderer/index.d.ts +1 -1
  183. package/{declaration → dist}/renderer/strategy/VirtualRenderingStrategy.d.ts +1 -1
  184. package/{declaration → dist}/renderer/strategy/index.d.ts +1 -1
  185. /package/{declaration/type → dist/types}/internal.d.ts +0 -0
@@ -1,12 +0,0 @@
1
- const buildHelper = require("./config/build-helper");
2
-
3
- export default buildHelper([
4
- {
5
- name: "Flicking",
6
- input: "./src/index.umd.ts",
7
- output: "./dist/flicking.pkgd.js",
8
- format: "umd",
9
- resolve: true
10
- }
11
- ]);
12
-
package/rollup.config.js DELETED
@@ -1,57 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
-
3
- const buildHelper = require("./config/build-helper");
4
-
5
- const external = {
6
- "@egjs/axes": "eg.Axes",
7
- "@egjs/component": "eg.Component",
8
- "@egjs/imready": "eg.ImReady"
9
- };
10
- const name = "Flicking";
11
-
12
- export default buildHelper([
13
- {
14
- name,
15
- input: "./src/index.umd.ts",
16
- output: "./dist/flicking.js",
17
- format: "umd",
18
- external
19
- },
20
- {
21
- name,
22
- input: "./src/index.umd.ts",
23
- output: "./dist/flicking.min.js",
24
- format: "umd",
25
- uglify: true,
26
- external
27
- },
28
- {
29
- name,
30
- input: "./src/index.umd.ts",
31
- output: "./dist/flicking.pkgd.js",
32
- format: "umd",
33
- resolve: true
34
- },
35
- {
36
- name,
37
- input: "./src/index.umd.ts",
38
- output: "./dist/flicking.pkgd.min.js",
39
- format: "umd",
40
- resolve: true,
41
- uglify: true
42
- },
43
- {
44
- input: "./src/index.ts",
45
- output: "./dist/flicking.esm.js",
46
- format: "esm",
47
- external,
48
- exports: "named"
49
- },
50
- {
51
- input: "./src/index.cjs.ts",
52
- output: "./dist/flicking.cjs.js",
53
- format: "cjs",
54
- exports: "named",
55
- }
56
- ]);
57
-
@@ -1,64 +0,0 @@
1
- /*
2
- * Copyright (c) 2015 NAVER Corp.
3
- * egjs projects are licensed under the MIT license
4
- */
5
- /* eslint-disable @typescript-eslint/restrict-template-expressions */
6
-
7
- /**
8
- * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.
9
- * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.
10
- * @name ERROR_CODE
11
- * @constant
12
- * @type object
13
- * @property {number} WRONG_TYPE Parameter type is wrong<ko>패러미터의 타입이 잘못되었을 경우</ko>
14
- * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector<ko>주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우</ko>
15
- * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`<ko>값을 기대했으나, `null`이나 `undefined`를 받은 경우</ko>
16
- * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)<ko>Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)</ko>
17
- * @property {number} WRONG_OPTION One of the options is wrong<ko>옵션들 중 잘못된 값이 있을 때</ko>
18
- * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range<ko>인덱스가 주어진 범위를 벗어난 경우</ko>
19
- * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.<ko>{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우</ko>
20
- * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) <ko>CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)</ko>
21
- * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.<ko>사용자에 의해 이벤트의 `stop()`이 호출된 경우</ko>
22
- * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.<ko>사용자에 의해 애니메이션이 중단된 경우</ko>
23
- * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.<ko>현재 애니메이션이 이미 진행중인 경우</ko>
24
- * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)
25
- * <ko>프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우</ko>
26
- * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed<ko>{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우</ko>
27
- * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels<ko>현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다</ko>
28
- * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabled<ko>virtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우</ko>
29
- */
30
- export const CODE = {
31
- WRONG_TYPE: 0,
32
- ELEMENT_NOT_FOUND: 1,
33
- VAL_MUST_NOT_NULL: 2,
34
- NOT_ATTACHED_TO_FLICKING: 3,
35
- WRONG_OPTION: 4,
36
- INDEX_OUT_OF_RANGE: 5,
37
- POSITION_NOT_REACHABLE: 6,
38
- TRANSFORM_NOT_SUPPORTED: 7,
39
- STOP_CALLED_BY_USER: 8,
40
- ANIMATION_INTERRUPTED: 9,
41
- ANIMATION_ALREADY_PLAYING: 10,
42
- NOT_ALLOWED_IN_FRAMEWORK: 11,
43
- NOT_INITIALIZED: 12,
44
- NO_ACTIVE: 13,
45
- NOT_ALLOWED_IN_VIRTUAL: 14
46
- } as const;
47
-
48
- export const MESSAGE = {
49
- WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `"${type}"`).join(" or ")}.`,
50
- ELEMENT_NOT_FOUND: (selector: string) => `Element with selector "${selector}" not found.`,
51
- VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,
52
- NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.",
53
- WRONG_OPTION: (optionName: string, val: any) => `Option "${optionName}" is not in correct format, given: ${val}`,
54
- INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index "${val}" is out of range: should be between ${min} and ${max}.`,
55
- POSITION_NOT_REACHABLE: (position: number) => `Position "${position}" is not reachable.`,
56
- TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.",
57
- STOP_CALLED_BY_USER: "Event stop() is called by user.",
58
- ANIMATION_INTERRUPTED: "Animation is interrupted by user input.",
59
- ANIMATION_ALREADY_PLAYING: "Animation is already playing.",
60
- NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.",
61
- NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.",
62
- NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.",
63
- NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled"
64
- } as const;
@@ -1,138 +0,0 @@
1
- /*
2
- * Copyright (c) 2015 NAVER Corp.
3
- * egjs projects are licensed under the MIT license
4
- */
5
- export { CODE as ERROR_CODE } from "./error";
6
-
7
- /**
8
- * Event type object with event name strings of {@link Flicking}
9
- * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체
10
- * @type {object}
11
- * @property {"holdStart"} HOLD_START holdStart event<ko>holdStart 이벤트</ko>
12
- * @property {"holdEnd"} HOLD_END holdEnd event<ko>holdEnd 이벤트</ko>
13
- * @property {"moveStart"} MOVE_START moveStart event<ko>moveStart 이벤트</ko>
14
- * @property {"move"} MOVE move event<ko>move 이벤트</ko>
15
- * @property {"moveEnd"} MOVE_END moveEnd event<ko>moveEnd 이벤트</ko>
16
- * @property {"willChange"} WILL_CHANGE willChange event<ko>willChange 이벤트</ko>
17
- * @property {"changed"} CHANGED changed event<ko>changed 이벤트</ko>
18
- * @property {"willRestore"} WILL_RESTORE willRestore event<ko>willRestore 이벤트</ko>
19
- * @property {"restored"} RESTORED restored event<ko>restored 이벤트</ko>
20
- * @property {"select"} SELECT select event<ko>select 이벤트</ko>
21
- * @property {"needPanel"} NEED_PANEL needPanel event<ko>needPanel 이벤트</ko>
22
- * @property {"panelChange"} PANEL_CHANGE panelChange event<ko>panelChange 이벤트</ko>
23
- * @example
24
- * ```ts
25
- * import { EVENTS } from "@egjs/flicking";
26
- * EVENTS.MOVE_START; // "moveStart"
27
- * ```
28
- */
29
- export const EVENTS = {
30
- READY: "ready",
31
- BEFORE_RESIZE: "beforeResize",
32
- AFTER_RESIZE: "afterResize",
33
- HOLD_START: "holdStart",
34
- HOLD_END: "holdEnd",
35
- MOVE_START: "moveStart",
36
- MOVE: "move",
37
- MOVE_END: "moveEnd",
38
- WILL_CHANGE: "willChange",
39
- CHANGED: "changed",
40
- WILL_RESTORE: "willRestore",
41
- RESTORED: "restored",
42
- SELECT: "select",
43
- NEED_PANEL: "needPanel",
44
- VISIBLE_CHANGE: "visibleChange",
45
- REACH_EDGE: "reachEdge",
46
- PANEL_CHANGE: "panelChange"
47
- } as const;
48
-
49
- /**
50
- * An object with all possible predefined literal string for the {@link Flicking#align align} option
51
- * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체
52
- * @type {object}
53
- * @property {"prev"} PREV left/top align<ko>좌/상 정렬</ko>
54
- * @property {"center"} CENTER center align<ko>중앙 정렬</ko>
55
- * @property {"next"} NEXT right/bottom align<ko>우/하 정렬</ko>
56
- */
57
- export const ALIGN = {
58
- PREV: "prev",
59
- CENTER: "center",
60
- NEXT: "next"
61
- } as const;
62
-
63
- /**
64
- * An object of directions
65
- * @ko 방향을 나타내는 값들을 담고 있는 객체
66
- * @type {object}
67
- * @property {"PREV"} PREV "left" when {@link Flicking#horizontal horizontal} is true, and "top" when {@link Flicking#horizontal horizontal} is false
68
- * <ko>{@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다</ko>
69
- * @property {"NEXT"} NEXT "right" when {@link Flicking#horizontal horizontal} is true, and "bottom" when {@link Flicking#horizontal horizontal} is false
70
- * <ko>{@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다</ko>
71
- * @property {null} NONE This value usually means it's the same position<ko>주로 제자리인 경우를 의미합니다</ko>
72
- */
73
- export const DIRECTION = {
74
- PREV: "PREV",
75
- NEXT: "NEXT",
76
- NONE: null
77
- } as const;
78
-
79
- /**
80
- * An object with all possible {@link Flicking#moveType moveType}s
81
- * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체
82
- * @type {object}
83
- * @property {"snap"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control}
84
- * <ko>Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType}</ko>
85
- * @property {"freeScroll"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control}
86
- * <ko>Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType}</ko>
87
- * @property {"strict"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control}
88
- * <ko>Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType}</ko>
89
- */
90
- export const MOVE_TYPE = {
91
- SNAP: "snap",
92
- FREE_SCROLL: "freeScroll",
93
- STRICT: "strict"
94
- } as const;
95
-
96
- export const CLASS = {
97
- VIEWPORT: "flicking-viewport",
98
- CAMERA: "flicking-camera",
99
- VERTICAL: "vertical",
100
- HIDDEN: "flicking-hidden",
101
- DEFAULT_VIRTUAL: "flicking-panel"
102
- };
103
-
104
- /**
105
- * An object with all possible {@link Flicking#circularFallback circularFallback}s
106
- * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체
107
- * @type {object}
108
- * @property {string} LINEAR "linear"
109
- * @property {string} BOUND "bound"
110
- */
111
- export const CIRCULAR_FALLBACK = {
112
- LINEAR: "linear",
113
- BOUND: "bound"
114
- } as const;
115
-
116
- /**
117
- * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)
118
- * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체
119
- * @type {object}
120
- * @property {string} LTR "ltr"
121
- * @property {string} RTL "rtl"
122
- */
123
- export const ORDER = {
124
- LTR: "ltr",
125
- RTL: "rtl"
126
- } as const;
127
-
128
- /**
129
- * An object that contains the direction that {@link Flicking} is moving
130
- * @ko {@link Flicking}이 움직이는 방향을 담고 있는 객체
131
- * @type {object}
132
- * @property {"horizontal"} HORIZONTAL horizontal<ko>수평 방향</ko>
133
- * @property {"vertical"} VERTICAL vertical<ko>수직 방향</ko>
134
- */
135
- export const MOVE_DIRECTION = {
136
- HORIZONTAL: "horizontal",
137
- VERTICAL: "vertical"
138
- } as const;
package/src/type/event.ts DELETED
@@ -1,315 +0,0 @@
1
- /* eslint-disable @typescript-eslint/ban-types */
2
- /*
3
- * Copyright (c) 2015 NAVER Corp.
4
- * egjs projects are licensed under the MIT license
5
- */
6
- import { OnChange, OnFinish, OnHold, OnRelease } from "@egjs/axes";
7
- import { ComponentEvent } from "@egjs/component";
8
-
9
- import Flicking from "../Flicking";
10
- import Panel from "../core/panel/Panel";
11
- import { EVENTS, DIRECTION } from "../const/external";
12
- import { ValueOf } from "../type/internal";
13
-
14
- /**
15
- * Event that fires when Flicking's {@link Flicking#init init()} is called
16
- * @ko Flicking의 {@link Flicking#init init()}이 호출되었을 때 발생하는 이벤트
17
- * @event Flicking#ready
18
- * @type {object}
19
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
20
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
21
- */
22
- export type ReadyEvent<T extends Flicking = Flicking> = ComponentEvent<{}, typeof EVENTS["READY"], T>;
23
-
24
- /**
25
- * Event that fires when Flicking's {@link Flicking#resize resize()} is called, before updating the sizes of panels and viewport.
26
- * You can update the sizes of panels and viewport with this event, and it'll be applied after {@link Flicking#resize resize()} is finished.
27
- * @ko Flicking의 {@link Flicking#resize resize())}이 호출되었을 때 발생하는 이벤트로, 패널 및 뷰포트의 크기를 업데이트하기 전에 발생합니다.
28
- * 이 이벤트 단계에서 패널 및 뷰포트의 크기를 업데이트할 경우, 해당 크기가 최종적으로 반영됩니다.
29
- * @event Flicking#beforeResize
30
- * @type {object}
31
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
32
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
33
- * @property {number} width Previous width of the viewport<ko>기존 뷰포트 너비</ko>
34
- * @property {number} height Previous height of the viewport<ko>기존 뷰포트 높이</ko>
35
- * @property {HTMLElement} element The viewport element<ko>뷰포트 엘리먼트</ko>
36
- */
37
- export interface BeforeResizeEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["BEFORE_RESIZE"], T> {
38
- width: number;
39
- height: number;
40
- element: HTMLElement;
41
- }
42
-
43
- /**
44
- * Event that fires when Flicking's {@link Flicking#resize resize()} is called, after updating the sizes of panels and viewport.
45
- * @ko Flicking의 {@link Flicking#resize resize())}이 호출되었을 때 발생하는 이벤트로, 패널 및 뷰포트의 크기를 업데이트한 이후에 발생합니다.
46
- * @event Flicking#afterResize
47
- * @type {object}
48
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
49
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
50
- * @property {number} width New width of the viewport<ko>업데이트된 뷰포트 너비</ko>
51
- * @property {number} height New height of the viewport<ko>업데이트된 뷰포트 높이</ko>
52
- * @property {object} prev Previous size of the viewport<ko>기존 뷰포트 크기</ko>
53
- * @property {number} [prev.width] Previous width of the viewport<ko>기존 뷰포트 너비</ko>
54
- * @property {number} [prev.height] Previous height of the viewport<ko>기존 뷰포트 높이</ko>
55
- * @property {boolean} sizeChanged A Boolean value indicating whether the width/height of the viewport element is changed<ko>뷰포트 너비/크기가 변경되었는지 여부를 나타내는 값</ko>
56
- * @property {HTMLElement} element The viewport element<ko>뷰포트 엘리먼트</ko>
57
- */
58
- export interface AfterResizeEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["AFTER_RESIZE"], T> {
59
- width: number;
60
- height: number;
61
- prev: {
62
- width: number;
63
- height: number;
64
- };
65
- sizeChanged: boolean;
66
- element: HTMLElement;
67
- }
68
-
69
- /**
70
- * Event that fires when user started dragging.
71
- * @ko 사용자가 드래그를 시작했을 때 발생하는 이벤트
72
- * @event Flicking#holdStart
73
- * @type {object}
74
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
75
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
76
- * @property {function} stop Stop the event action and prevent user from dragging<ko>이벤트 동작을 멈추고, 사용자가 드래그하지 못하도록 막습니다.</ko>
77
- * @property {object} axesEvent {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of {@link https://naver.github.io/egjs-axes/ Axes}
78
- * <ko>{@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트</ko>
79
- */
80
- export interface HoldStartEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["HOLD_START"], T> {
81
- axesEvent: OnHold;
82
- }
83
-
84
- /**
85
- * Event that fires when user stopped dragging.
86
- * @ko 사용자가 드래그를 끝냈을 때 발생하는 이벤트
87
- * @event Flicking#holdEnd
88
- * @type {object}
89
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
90
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
91
- * @property {object} axesEvent {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}
92
- * <ko>{@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트</ko>
93
- */
94
- export interface HoldEndEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["HOLD_END"], T> {
95
- axesEvent: OnRelease;
96
- }
97
-
98
- /**
99
- * Event that fires once before first {@link Flicking#event:move move} event
100
- * @ko 첫 번째 {@link Flicking#event:move move} 이벤트 직전에 단 한번 발생하는 이벤트
101
- * @event Flicking#moveStart
102
- * @type {object}
103
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
104
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
105
- * @property {function} stop Stop the event action and prevent user from dragging<ko>이벤트 동작을 멈추고, 사용자가 드래그하지 못하도록 막습니다.</ko>
106
- * @property {boolean} isTrusted Boolean that indicates whether the event was generated by a user action<ko>이벤트가 사용자 입력에 의하여 발생되었는지를 나타내는 값</ko>
107
- * @property {boolean} holding Boolean that indicates whether the user is dragging the viewport element<ko>사용자가 현재 viewport 엘리먼트를 드래그하고있는지를 나타내는 값</ko>
108
- * @property {DIRECTION} direction Moving direction relative to previous position of the camera<ko>이전 카메라 위치 대비 이동 방향</ko>
109
- * @property {object} axesEvent {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of {@link https://naver.github.io/egjs-axes/ Axes}
110
- * <ko>{@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트</ko>
111
- */
112
- export interface MoveStartEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["MOVE_START"], T> {
113
- isTrusted: boolean;
114
- holding: boolean;
115
- direction: ValueOf<typeof DIRECTION>;
116
- axesEvent: OnChange;
117
- }
118
-
119
- /**
120
- * Event that fires for every movement
121
- * @ko 이동시마다 발생하는 이벤트
122
- * @event Flicking#move
123
- * @type {object}
124
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
125
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
126
- * @property {function} stop Stop the event action and prevent user from dragging<ko>이벤트 동작을 멈추고, 사용자가 드래그하지 못하도록 막습니다.</ko>
127
- * @property {boolean} isTrusted Boolean that indicates whether the event was generated by a user action<ko>이벤트가 사용자 입력에 의하여 발생되었는지를 나타내는 값</ko>
128
- * @property {boolean} holding Boolean that indicates whether the user is dragging the viewport element<ko>사용자가 현재 viewport 엘리먼트를 드래그하고있는지를 나타내는 값</ko>
129
- * @property {DIRECTION} direction Moving direction relative to previous position of the camera<ko>이전 카메라 위치 대비 이동 방향</ko>
130
- * @property {object} axesEvent {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of {@link https://naver.github.io/egjs-axes/ Axes}
131
- * <ko>{@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트</ko>
132
- */
133
- export interface MoveEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["MOVE"], T> {
134
- isTrusted: boolean;
135
- holding: boolean;
136
- direction: ValueOf<typeof DIRECTION>;
137
- axesEvent: OnChange;
138
- }
139
-
140
- /**
141
- * Event that fires when the movement is finished by user input release or animation end.
142
- * @ko 사용자 입력 중단/애니메이션 종료 등 이동이 끝났을 때 발생하는 이벤트
143
- * @event Flicking#moveEnd
144
- * @type {object}
145
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
146
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
147
- * @property {boolean} isTrusted Boolean that indicates whether the event was generated by a user action<ko>이벤트가 사용자 입력에 의하여 발생되었는지를 나타내는 값</ko>
148
- * @property {boolean} holding Boolean that indicates whether the user is dragging the viewport element<ko>사용자가 현재 viewport 엘리먼트를 드래그하고있는지를 나타내는 값</ko>
149
- * @property {DIRECTION} direction Moving direction relative to previous position of the camera<ko>이전 카메라 위치 대비 이동 방향</ko>
150
- * @property {object} axesEvent {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of {@link https://naver.github.io/egjs-axes/ Axes}
151
- * <ko>{@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트</ko>
152
- */
153
- export interface MoveEndEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["MOVE_END"], T> {
154
- isTrusted: boolean;
155
- direction: ValueOf<typeof DIRECTION>;
156
- axesEvent: OnFinish;
157
- }
158
-
159
- /**
160
- * Event that fires when Flicking's active index will be changed. Index will be changed at the {@link Flicking#event:changed changed} event.
161
- * It can be triggered when user finished input, or flicking start to move by method.
162
- * Calling `stop()` in event will prevent index change and camera movement.
163
- * @ko Flicking의 인덱스가 변경될 것임을 나타내는 이벤트. 실제 인덱스는 {@link Flicking#event:changed changed} 이벤트에서 변경된다.
164
- * 사용자가 입력을 마쳤을 때, 혹은 메소드를 통해 이동을 시작했을 때 발생한다.
165
- * 이벤트의 stop()을 호출시 인덱스 변경 및 패널로의 이동을 막는다.
166
- * @event Flicking#willChange
167
- * @type {object}
168
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
169
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
170
- * @property {function} stop Stop the event action and prevent user from dragging<ko>이벤트 동작을 멈추고, 사용자가 드래그하지 못하도록 막습니다.</ko>
171
- * @property {number} index New active index<ko>변경할 인덱스</ko>
172
- * @property {Panel} panel New active panel<ko>인덱스 변경 이후 활성화된 패널로 설정할 패널</ko>
173
- * @property {boolean} isTrusted Boolean that indicates whether the event was generated by a user action<ko>이벤트가 사용자 입력에 의하여 발생되었는지를 나타내는 값</ko>
174
- * @property {DIRECTION} direction Moving direction from the active panel to the target panel<ko>현재 활성화된 패널로부터 이동하고자 하는 패널의 방향</ko>
175
- */
176
- export interface WillChangeEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["WILL_CHANGE"], T> {
177
- index: number;
178
- panel: Panel;
179
- isTrusted: boolean;
180
- direction: ValueOf<typeof DIRECTION>;
181
- }
182
-
183
- /**
184
- * Event that fires when Flicking's index is changed.
185
- * @event Flicking#changed
186
- * @type {object}
187
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
188
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
189
- * @property {number} index New index<ko>새 인덱스</ko>
190
- * @property {Panel} panel New active panel<ko>새로 선택된 패널</ko>
191
- * @property {number} prevIndex Previous index<ko>이전 인덱스</ko>
192
- * @property {Panel | null} prevPanel Previous active panel<ko>이전 패널</ko>
193
- * @property {boolean} isTrusted Boolean that indicates whether the event was generated by a user action<ko>이벤트가 사용자 입력에 의하여 발생되었는지를 나타내는 값</ko>
194
- * @property {DIRECTION} direction Moving direction from the active panel to the target panel<ko>현재 활성화된 패널로부터 이동하고자 하는 패널의 방향</ko>
195
- */
196
- export interface ChangedEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["CHANGED"], T> {
197
- index: number;
198
- panel: Panel;
199
- prevIndex: number;
200
- prevPanel: Panel | null;
201
- isTrusted: boolean;
202
- direction: ValueOf<typeof DIRECTION>;
203
- }
204
-
205
- /**
206
- * Event fires when user drag amount not reached {@link Flicking#threshold threshold} and is returning to {@link Flicking#currentPanel currentPanel}
207
- * @ko 사용자가 드래그하여 이동한 거리가 {@link Flicking#threshold threshold}에 도달하지 못해, 기존 {@link Flicking#currentPanel currentPanel}로 돌아갈 것임을 나타내는 이벤트
208
- * @event Flicking#willRestore
209
- * @type {object}
210
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
211
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
212
- * @property {function} stop Stop the event action and prevent user from dragging<ko>이벤트 동작을 멈추고, 사용자가 드래그하지 못하도록 막습니다</ko>
213
- * @property {number} index Index of the panel to restore<ko>복귀하고자 하는 패널의 인덱스</ko>
214
- * @property {Panel} panel Panel to restore<ko>복귀하고자 하는 패널</ko>
215
- * @property {boolean} isTrusted Boolean that indicates whether the event was generated by a user action<ko>이벤트가 사용자 입력에 의하여 발생되었는지를 나타내는 값</ko>
216
- * @property {DIRECTION} direction Moving direction relative to previous position of the camera<ko>이전 카메라 위치 대비 이동 방향</ko>
217
- */
218
- export interface WillRestoreEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["WILL_RESTORE"], T> {
219
- index: number;
220
- panel: Panel;
221
- isTrusted: boolean;
222
- direction: ValueOf<typeof DIRECTION>;
223
- }
224
-
225
- /**
226
- * Event that fires when Flicking has returned to {@link Flicking#currentPanel currentPanel}
227
- * @ko Flicking이 {@link Flicking#currentPanel currentPanel}의 위치로 다시 돌아왔을 때 발생하는 이벤트
228
- * @event Flicking#restored
229
- * @type {object}
230
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
231
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
232
- * @property {boolean} isTrusted Boolean that indicates whether the event was generated by a user action<ko>이벤트가 사용자 입력에 의하여 발생되었는지를 나타내는 값</ko>
233
- */
234
- export interface RestoredEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["RESTORED"], T> {
235
- isTrusted: boolean;
236
- }
237
-
238
- /**
239
- * Event that fires when panel is statically click / touched
240
- * @ko 패널이 정적으로 클릭(혹은 터치)되었을 때 발생하는 이벤트
241
- * @event Flicking#select
242
- * @type {object}
243
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
244
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
245
- * @property {number} index Selected panel's index<ko>선택된 패널의 인덱스</ko>
246
- * @property {Panel} panel Selected panel<ko>선택된 패널</ko>
247
- * @property {DIRECTION} direction Direction from current camera position to the selected panel's position<ko>현재 카메라 위치 대비 선택된 패널의 위치</ko>
248
- */
249
- export interface SelectEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["SELECT"], T> {
250
- index: number;
251
- panel: Panel;
252
- direction: ValueOf<typeof DIRECTION> | null;
253
- }
254
-
255
- /**
256
- * Event that fires when an empty panel area is visible at the edge of viewport
257
- * You can set its threshold with {@link Flicking#needPanelThreshold needPanelThreshold}
258
- * @ko 빈 패널 영역이 뷰포트 끝에 도달했을 때 발생하는 이벤트
259
- * {@link Flicking#needPanelThreshold needPanelThreshold}를 이용해서 이벤트가 발생하는 지점을 조절할 수 있습니다
260
- * @event Flicking#needPanel
261
- * @type {object}
262
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
263
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
264
- * @property {DIRECTION} direction Direction where new panel is needed. `DIRECTION.PREV` means panels should be {@link Flicking#prepend prepend}ed and `DIRECTION.NEXT` means panels should be {@link Flicking#append append}ed
265
- * <ko>패널이 필요한 방향. `DIRECTION.PREV`의 경우 패널이 {@link Flicking#prepend prepend}되어야 함을 의미하고, `DIRECTION.NEXT`는 패널이 {@link Flicking#append append}되어야 함을 의미한다</ko>
266
- */
267
- export interface NeedPanelEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["NEED_PANEL"], T> {
268
- direction: Exclude<ValueOf<typeof DIRECTION>, null>;
269
- }
270
-
271
- /**
272
- * Event that fires when visible panel inside the viewport changes
273
- * @ko 현재 뷰포트 내에서 보이는 패널이 변경되었을 때 발생되는 이벤트
274
- * @event Flicking#visibleChange
275
- * @type {object}
276
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
277
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
278
- * @property {Panel[]} added Panels that added from previous visible panels<ko>새로 보이는 패널의 배열</ko>
279
- * @property {Panel[]} removed Panels that removed from previous visible panels<ko>보이지 않게 된 패널의 배열</ko>
280
- * @property {Panel[]} visiblePanels Current visible panels<ko>현재 보이는 패널의 배열</ko>
281
- */
282
- export interface VisibleChangeEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["VISIBLE_CHANGE"], T> {
283
- added: Panel[];
284
- removed: Panel[];
285
- visiblePanels: Panel[];
286
- }
287
-
288
- /**
289
- * Event that fires when camera reaches the maximum/minimum range
290
- * @ko 카메라가 이동 가능한 영역의 끝에 도달했을 때 발생하는 이벤트
291
- * @event Flicking#reachEdge
292
- * @type {object}
293
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
294
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
295
- * @property {DIRECTION} direction Direction indicates whether the camera's position is at the maximum range({@link DIRECTION DIRECTION.NEXT}) or minimum range({@link DIRECTION DIRECTION.PREV})
296
- * <ko>카메라의 위치가 이동 가능한 범위의 최대점({@link DIRECTION DIRECTION.NEXT}) 혹은 최소점({@link DIRECTION DIRECTION.PREV})에 도달했는지를 나타내는 값</ko>
297
- */
298
- export interface ReachEdgeEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["REACH_EDGE"], T> {
299
- direction: ValueOf<typeof DIRECTION>;
300
- }
301
-
302
- /**
303
- * Event that fires when a panel is added or removed
304
- * @ko 패널 추가/제거시에 발생하는 이벤트
305
- * @event Flicking#panelChange
306
- * @type {object}
307
- * @property {Flicking} currentTarget An Flicking instance that triggered this event<ko>이 이벤트를 트리거한 Flicking의 인스턴스</ko>
308
- * @property {string} eventType Name of the event<ko>이벤트명</ko>
309
- * @property {Panel[]} added An array of new panels added<ko>새로 추가된 패널의 배열</ko>
310
- * @property {Panel[]} removed An array of panels removed<ko>제거된 패널의 배열</ko>
311
- */
312
- export interface PanelChangeEvent<T extends Flicking = Flicking> extends ComponentEvent<{}, typeof EVENTS["PANEL_CHANGE"], T> {
313
- added: Panel[];
314
- removed: Panel[];
315
- }