@egjs/flicking 4.11.3-beta.4 → 4.12.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/declaration/Flicking.d.ts +244 -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 +70 -42
  60. package/dist/flicking.cjs.js.map +1 -1
  61. package/dist/flicking.esm.js +70 -42
  62. package/dist/flicking.esm.js.map +1 -1
  63. package/dist/flicking.js +70 -42
  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 +70 -42
  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/Flicking.ts +24 -2
  73. package/src/control/AxesController.ts +1 -1
@@ -4,13 +4,13 @@ name: @egjs/flicking
4
4
  license: MIT
5
5
  author: NAVER Corp.
6
6
  repository: https://github.com/naver/egjs-flicking
7
- version: 4.11.3-beta.4
7
+ version: 4.12.0-beta.0
8
8
  */
9
9
  import Component, { ComponentEvent } from '@egjs/component';
10
10
  import Axes, { PanInput } from '@egjs/axes';
11
11
  import ImReady from '@egjs/imready';
12
12
 
13
- /*! *****************************************************************************
13
+ /******************************************************************************
14
14
  Copyright (c) Microsoft Corporation.
15
15
 
16
16
  Permission to use, copy, modify, and/or distribute this software for any
@@ -24,7 +24,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24
24
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25
25
  PERFORMANCE OF THIS SOFTWARE.
26
26
  ***************************************************************************** */
27
- /* global Reflect, Promise */
27
+ /* global Reflect, Promise, SuppressedError, Symbol */
28
28
 
29
29
  var extendStatics = function (d, b) {
30
30
  extendStatics = Object.setPrototypeOf || {
@@ -109,7 +109,7 @@ function __generator(thisArg, body) {
109
109
  }
110
110
  function step(op) {
111
111
  if (f) throw new TypeError("Generator is already executing.");
112
- while (_) try {
112
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
113
113
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
114
114
  if (y = 0, t) op = [op[0] & 2, t.value];
115
115
  switch (op[0]) {
@@ -213,6 +213,10 @@ function __spread() {
213
213
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
214
214
  return ar;
215
215
  }
216
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
217
+ var e = new Error(message);
218
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
219
+ };
216
220
 
217
221
  /*
218
222
  * Copyright (c) 2015 NAVER Corp.
@@ -2096,7 +2100,7 @@ var AxesController = /*#__PURE__*/function () {
2096
2100
  });
2097
2101
  this._panInput = new PanInput(flicking.viewport.element, {
2098
2102
  inputType: flicking.inputType,
2099
- threshold: 1,
2103
+ threshold: flicking.dragThreshold,
2100
2104
  iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
2101
2105
  preventDefaultOnDrag: flicking.preventDefaultOnDrag,
2102
2106
  scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
@@ -6006,40 +6010,42 @@ var Flicking = /*#__PURE__*/function (_super) {
6006
6010
  moveType = _v === void 0 ? "snap" : _v,
6007
6011
  _w = _b.threshold,
6008
6012
  threshold = _w === void 0 ? 40 : _w,
6009
- _x = _b.interruptable,
6010
- interruptable = _x === void 0 ? true : _x,
6011
- _y = _b.bounce,
6012
- bounce = _y === void 0 ? "20%" : _y,
6013
- _z = _b.iOSEdgeSwipeThreshold,
6014
- iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z,
6015
- _0 = _b.preventClickOnDrag,
6016
- preventClickOnDrag = _0 === void 0 ? true : _0,
6017
- _1 = _b.preventDefaultOnDrag,
6018
- preventDefaultOnDrag = _1 === void 0 ? false : _1,
6019
- _2 = _b.disableOnInit,
6020
- disableOnInit = _2 === void 0 ? false : _2,
6021
- _3 = _b.changeOnHold,
6022
- changeOnHold = _3 === void 0 ? false : _3,
6023
- _4 = _b.renderOnlyVisible,
6024
- renderOnlyVisible = _4 === void 0 ? false : _4,
6025
- _5 = _b.virtual,
6026
- virtual = _5 === void 0 ? null : _5,
6027
- _6 = _b.autoInit,
6028
- autoInit = _6 === void 0 ? true : _6,
6029
- _7 = _b.autoResize,
6030
- autoResize = _7 === void 0 ? true : _7,
6031
- _8 = _b.useResizeObserver,
6032
- useResizeObserver = _8 === void 0 ? true : _8,
6033
- _9 = _b.resizeDebounce,
6034
- resizeDebounce = _9 === void 0 ? 0 : _9,
6035
- _10 = _b.maxResizeDebounce,
6036
- maxResizeDebounce = _10 === void 0 ? 100 : _10,
6037
- _11 = _b.useFractionalSize,
6038
- useFractionalSize = _11 === void 0 ? false : _11,
6039
- _12 = _b.externalRenderer,
6040
- externalRenderer = _12 === void 0 ? null : _12,
6041
- _13 = _b.renderExternal,
6042
- renderExternal = _13 === void 0 ? null : _13;
6013
+ _x = _b.dragThreshold,
6014
+ dragThreshold = _x === void 0 ? 1 : _x,
6015
+ _y = _b.interruptable,
6016
+ interruptable = _y === void 0 ? true : _y,
6017
+ _z = _b.bounce,
6018
+ bounce = _z === void 0 ? "20%" : _z,
6019
+ _0 = _b.iOSEdgeSwipeThreshold,
6020
+ iOSEdgeSwipeThreshold = _0 === void 0 ? 30 : _0,
6021
+ _1 = _b.preventClickOnDrag,
6022
+ preventClickOnDrag = _1 === void 0 ? true : _1,
6023
+ _2 = _b.preventDefaultOnDrag,
6024
+ preventDefaultOnDrag = _2 === void 0 ? false : _2,
6025
+ _3 = _b.disableOnInit,
6026
+ disableOnInit = _3 === void 0 ? false : _3,
6027
+ _4 = _b.changeOnHold,
6028
+ changeOnHold = _4 === void 0 ? false : _4,
6029
+ _5 = _b.renderOnlyVisible,
6030
+ renderOnlyVisible = _5 === void 0 ? false : _5,
6031
+ _6 = _b.virtual,
6032
+ virtual = _6 === void 0 ? null : _6,
6033
+ _7 = _b.autoInit,
6034
+ autoInit = _7 === void 0 ? true : _7,
6035
+ _8 = _b.autoResize,
6036
+ autoResize = _8 === void 0 ? true : _8,
6037
+ _9 = _b.useResizeObserver,
6038
+ useResizeObserver = _9 === void 0 ? true : _9,
6039
+ _10 = _b.resizeDebounce,
6040
+ resizeDebounce = _10 === void 0 ? 0 : _10,
6041
+ _11 = _b.maxResizeDebounce,
6042
+ maxResizeDebounce = _11 === void 0 ? 100 : _11,
6043
+ _12 = _b.useFractionalSize,
6044
+ useFractionalSize = _12 === void 0 ? false : _12,
6045
+ _13 = _b.externalRenderer,
6046
+ externalRenderer = _13 === void 0 ? null : _13,
6047
+ _14 = _b.renderExternal,
6048
+ renderExternal = _14 === void 0 ? null : _14;
6043
6049
  var _this = _super.call(this) || this;
6044
6050
  // Internal states
6045
6051
  _this._initialized = false;
@@ -6065,6 +6071,7 @@ var Flicking = /*#__PURE__*/function (_super) {
6065
6071
  _this._inputType = inputType;
6066
6072
  _this._moveType = moveType;
6067
6073
  _this._threshold = threshold;
6074
+ _this._dragThreshold = dragThreshold;
6068
6075
  _this._interruptable = interruptable;
6069
6076
  _this._bounce = bounce;
6070
6077
  _this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;
@@ -6379,7 +6386,7 @@ var Flicking = /*#__PURE__*/function (_super) {
6379
6386
  Object.defineProperty(__proto, "defaultIndex", {
6380
6387
  /**
6381
6388
  * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer
6382
- * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다
6389
+ * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다.
6383
6390
  * @type {number}
6384
6391
  * @default 0
6385
6392
  * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}
@@ -6744,7 +6751,7 @@ var Flicking = /*#__PURE__*/function (_super) {
6744
6751
  Object.defineProperty(__proto, "threshold", {
6745
6752
  /**
6746
6753
  * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.
6747
- * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.
6754
+ * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능합니다.
6748
6755
  * @type {number}
6749
6756
  * @default 40
6750
6757
  * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}
@@ -6758,6 +6765,27 @@ var Flicking = /*#__PURE__*/function (_super) {
6758
6765
  enumerable: false,
6759
6766
  configurable: true
6760
6767
  });
6768
+ Object.defineProperty(__proto, "dragThreshold", {
6769
+ /**
6770
+ * Minimal distance of user input before recognizing (unit: px). It should be dragged above the dragThreshold to move the panel.
6771
+ * @ko 사용자의 입력을 인식하기 위한 최소한의 거리 (단위: px). 주어진 값 이상으로 스크롤해야만 패널이 움직입니다.
6772
+ * @type {number}
6773
+ * @default 1
6774
+ * @see {@link https://naver.github.io/egjs-flicking/Options#dragThreshold dragThreshold ( Options )}
6775
+ */
6776
+ get: function () {
6777
+ return this._dragThreshold;
6778
+ },
6779
+ set: function (val) {
6780
+ this._dragThreshold = val;
6781
+ var panInput = this._control.controller.panInput;
6782
+ if (panInput) {
6783
+ panInput.options.threshold = val;
6784
+ }
6785
+ },
6786
+ enumerable: false,
6787
+ configurable: true
6788
+ });
6761
6789
  Object.defineProperty(__proto, "interruptable", {
6762
6790
  /**
6763
6791
  * Set animation to be interruptable by click/touch.
@@ -7832,7 +7860,7 @@ var Flicking = /*#__PURE__*/function (_super) {
7832
7860
  * Flicking.VERSION; // ex) 4.0.0
7833
7861
  * ```
7834
7862
  */
7835
- Flicking.VERSION = "4.11.3-beta.4";
7863
+ Flicking.VERSION = "4.12.0-beta.0";
7836
7864
  return Flicking;
7837
7865
  }(Component);
7838
7866