@egjs/flicking 4.11.3-beta.2 → 4.11.3-beta.3

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 (74) hide show
  1. package/declaration/Flicking.d.ts +240 -240
  2. package/declaration/camera/Camera.d.ts +82 -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 +44 -48
  17. package/declaration/control/AxesController.d.ts +44 -44
  18. package/declaration/control/Control.d.ts +44 -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 +19 -74
  60. package/dist/flicking.cjs.js.map +1 -1
  61. package/dist/flicking.esm.js +20 -73
  62. package/dist/flicking.esm.js.map +1 -1
  63. package/dist/flicking.js +19 -73
  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 +19 -73
  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 +6 -0
  73. package/src/camera/Camera.ts +4 -2
  74. package/src/control/SnapControl.ts +4 -4
@@ -4,7 +4,7 @@ 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.2
7
+ version: 4.11.0-snapshot
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -12,7 +12,7 @@ version: 4.11.3-beta.2
12
12
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory());
13
13
  })(this, (function () { 'use strict';
14
14
 
15
- /******************************************************************************
15
+ /*! *****************************************************************************
16
16
  Copyright (c) Microsoft Corporation.
17
17
 
18
18
  Permission to use, copy, modify, and/or distribute this software for any
@@ -26,7 +26,7 @@ version: 4.11.3-beta.2
26
26
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27
27
  PERFORMANCE OF THIS SOFTWARE.
28
28
  ***************************************************************************** */
29
- /* global Reflect, Promise, SuppressedError, Symbol */
29
+ /* global Reflect, Promise */
30
30
 
31
31
  var extendStatics$3 = function (d, b) {
32
32
  extendStatics$3 = Object.setPrototypeOf || {
@@ -111,7 +111,7 @@ version: 4.11.3-beta.2
111
111
  }
112
112
  function step(op) {
113
113
  if (f) throw new TypeError("Generator is already executing.");
114
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
114
+ while (_) try {
115
115
  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;
116
116
  if (y = 0, t) op = [op[0] & 2, t.value];
117
117
  switch (op[0]) {
@@ -215,10 +215,6 @@ version: 4.11.3-beta.2
215
215
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$1(arguments[i]));
216
216
  return ar;
217
217
  }
218
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
219
- var e = new Error(message);
220
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
221
- };
222
218
 
223
219
  /*
224
220
  Copyright (c) NAVER Corp.
@@ -809,17 +805,6 @@ version: 4.11.3-beta.2
809
805
  LINEAR: "linear",
810
806
  BOUND: "bound"
811
807
  };
812
- /**
813
- * 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`)
814
- * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체
815
- * @type {object}
816
- * @property {string} LTR "ltr"
817
- * @property {string} RTL "rtl"
818
- */
819
- var ORDER = {
820
- LTR: "ltr",
821
- RTL: "rtl"
822
- };
823
808
 
824
809
  var Constants = {
825
810
  __proto__: null,
@@ -829,7 +814,6 @@ version: 4.11.3-beta.2
829
814
  MOVE_TYPE: MOVE_TYPE,
830
815
  CLASS: CLASS,
831
816
  CIRCULAR_FALLBACK: CIRCULAR_FALLBACK,
832
- ORDER: ORDER,
833
817
  ERROR_CODE: CODE
834
818
  };
835
819
 
@@ -1125,22 +1109,20 @@ version: 4.11.3-beta.2
1125
1109
  useFractionalSize = _a.useFractionalSize,
1126
1110
  useOffset = _a.useOffset,
1127
1111
  style = _a.style;
1128
- var size = 0;
1129
1112
  if (useFractionalSize) {
1130
- var baseSize = parseFloat(horizontal ? style.width : style.height) || 0;
1113
+ var baseSize = parseFloat(horizontal ? style.width : style.height);
1131
1114
  var isBorderBoxSizing = style.boxSizing === "border-box";
1132
1115
  var border = horizontal ? parseFloat(style.borderLeftWidth || "0") + parseFloat(style.borderRightWidth || "0") : parseFloat(style.borderTopWidth || "0") + parseFloat(style.borderBottomWidth || "0");
1133
1116
  if (isBorderBoxSizing) {
1134
- size = useOffset ? baseSize : baseSize - border;
1117
+ return useOffset ? baseSize : baseSize - border;
1135
1118
  } else {
1136
1119
  var padding = horizontal ? parseFloat(style.paddingLeft || "0") + parseFloat(style.paddingRight || "0") : parseFloat(style.paddingTop || "0") + parseFloat(style.paddingBottom || "0");
1137
- size = useOffset ? baseSize + padding + border : baseSize + padding;
1120
+ return useOffset ? baseSize + padding + border : baseSize + padding;
1138
1121
  }
1139
1122
  } else {
1140
1123
  var sizeStr = horizontal ? "Width" : "Height";
1141
- size = useOffset ? el["offset" + sizeStr] : el["client" + sizeStr];
1124
+ return useOffset ? el["offset" + sizeStr] : el["client" + sizeStr];
1142
1125
  }
1143
- return Math.max(size, 0);
1144
1126
  };
1145
1127
  var setPrototypeOf = Object.setPrototypeOf || function (obj, proto) {
1146
1128
  obj.__proto__ = proto;
@@ -6308,7 +6290,7 @@ version: 4.11.3-beta.2
6308
6290
  threshold: 1,
6309
6291
  iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
6310
6292
  preventDefaultOnDrag: flicking.preventDefaultOnDrag,
6311
- scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
6293
+ scale: flicking.horizontal ? [-1, 0] : [0, -1],
6312
6294
  releaseOnScroll: true
6313
6295
  });
6314
6296
  var axes = this._axes;
@@ -6533,7 +6515,7 @@ version: 4.11.3-beta.2
6533
6515
  var panInput = this._panInput;
6534
6516
  axes.disconnect(panInput);
6535
6517
  axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput);
6536
- panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];
6518
+ panInput.options.scale = flicking.horizontal ? [-1, 0] : [0, -1];
6537
6519
  };
6538
6520
  __proto._resetInternalValues = function () {
6539
6521
  this._flicking = null;
@@ -6798,7 +6780,7 @@ version: 4.11.3-beta.2
6798
6780
  var position;
6799
6781
  return __generator(this, function (_c) {
6800
6782
  position = this._getPosition(panel, direction);
6801
- this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);
6783
+ this._triggerIndexChangeEvent(panel, panel.position, axesEvent);
6802
6784
  return [2 /*return*/, this._animateToPosition({
6803
6785
  position: position,
6804
6786
  duration: duration,
@@ -6815,7 +6797,6 @@ version: 4.11.3-beta.2
6815
6797
  var _a;
6816
6798
  var flicking = getFlickingAttached(this._flicking);
6817
6799
  this._activePanel = newActivePanel;
6818
- this._nextPanel = null;
6819
6800
  flicking.camera.updateAdaptiveHeight();
6820
6801
  if (newActivePanel !== prevActivePanel) {
6821
6802
  flicking.trigger(new ComponentEvent$1(EVENTS.CHANGED, {
@@ -6840,7 +6821,7 @@ version: 4.11.3-beta.2
6840
6821
  this._activePanel = control._activePanel;
6841
6822
  this._controller = control._controller;
6842
6823
  };
6843
- __proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) {
6824
+ __proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
6844
6825
  var _a;
6845
6826
  var flicking = getFlickingAttached(this._flicking);
6846
6827
  var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;
@@ -6850,9 +6831,8 @@ version: 4.11.3-beta.2
6850
6831
  index: panel.index,
6851
6832
  panel: panel,
6852
6833
  isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false,
6853
- direction: direction !== null && direction !== void 0 ? direction : getDirection$1((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
6834
+ direction: getDirection$1((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
6854
6835
  });
6855
- this._nextPanel = panel;
6856
6836
  flicking.trigger(event);
6857
6837
  if (event.isCanceled()) {
6858
6838
  throw new FlickingError(MESSAGE.STOP_CALLED_BY_USER, CODE.STOP_CALLED_BY_USER);
@@ -7440,20 +7420,19 @@ version: 4.11.3-beta.2
7440
7420
  * @return {Promise<void>} A Promise which will be resolved after reaching the target position<ko>해당 좌표 도달시에 resolve되는 Promise</ko>
7441
7421
  */
7442
7422
  __proto.moveToPosition = function (position, duration, axesEvent) {
7443
- var _a;
7444
7423
  var flicking = getFlickingAttached(this._flicking);
7445
7424
  var camera = flicking.camera;
7446
- var currentPanel = (_a = this._nextPanel) !== null && _a !== void 0 ? _a : this._activePanel;
7425
+ var activePanel = this._activePanel;
7447
7426
  var axesRange = this._controller.range;
7448
7427
  var indexRange = this._indexRange;
7449
7428
  var cameraRange = camera.range;
7450
7429
  var state = this._controller.state;
7451
7430
  var clampedPosition = clamp$1(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]);
7452
7431
  var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);
7453
- if (!anchorAtPosition || !currentPanel) {
7432
+ if (!anchorAtPosition || !activePanel) {
7454
7433
  return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
7455
7434
  }
7456
- var prevPos = currentPanel.position;
7435
+ var prevPos = activePanel.position;
7457
7436
  var posDelta = flicking.animating ? state.delta : position - camera.position;
7458
7437
  var isOverThreshold = Math.abs(posDelta) >= flicking.threshold;
7459
7438
  var adjacentAnchor = position > prevPos ? camera.getNextAnchor(anchorAtPosition) : camera.getPrevAnchor(anchorAtPosition);
@@ -7470,7 +7449,7 @@ version: 4.11.3-beta.2
7470
7449
  var targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor;
7471
7450
  targetPanel = targetAnchor.panel;
7472
7451
  targetPos = targetAnchor.position;
7473
- } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) {
7452
+ } else if (isOverThreshold && anchorAtPosition.position !== activePanel.position) {
7474
7453
  // Move to anchor at position
7475
7454
  targetPanel = anchorAtPosition.panel;
7476
7455
  targetPos = anchorAtPosition.position;
@@ -8229,19 +8208,6 @@ version: 4.11.3-beta.2
8229
8208
  enumerable: false,
8230
8209
  configurable: true
8231
8210
  });
8232
- Object.defineProperty(__proto, "panelOrder", {
8233
- /**
8234
- * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)
8235
- * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성
8236
- * @type {string}
8237
- * @readonly
8238
- */
8239
- get: function () {
8240
- return this._panelOrder;
8241
- },
8242
- enumerable: false,
8243
- configurable: true
8244
- });
8245
8211
  Object.defineProperty(__proto, "align", {
8246
8212
  // Options Getter
8247
8213
  /**
@@ -8273,7 +8239,6 @@ version: 4.11.3-beta.2
8273
8239
  this._el = viewportEl.firstElementChild;
8274
8240
  this._checkTranslateSupport();
8275
8241
  this._updateMode();
8276
- this.updatePanelOrder();
8277
8242
  return this;
8278
8243
  };
8279
8244
  /**
@@ -8516,24 +8481,6 @@ version: 4.11.3-beta.2
8516
8481
  this.applyTransform();
8517
8482
  return this;
8518
8483
  };
8519
- /**
8520
- * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element
8521
- * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다
8522
- * @return {this}
8523
- */
8524
- __proto.updatePanelOrder = function () {
8525
- var flicking = getFlickingAttached(this._flicking);
8526
- if (!flicking.horizontal) return this;
8527
- var el = this._el;
8528
- var direction = getStyle(el).direction;
8529
- if (direction !== this._panelOrder) {
8530
- this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR;
8531
- if (flicking.initialized) {
8532
- flicking.control.controller.updateDirection();
8533
- }
8534
- }
8535
- return this;
8536
- };
8537
8484
  /**
8538
8485
  * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again
8539
8486
  * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다
@@ -8558,7 +8505,7 @@ version: 4.11.3-beta.2
8558
8505
  var renderer = flicking.renderer;
8559
8506
  if (renderer.rendering || !flicking.initialized) return this;
8560
8507
  var actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;
8561
- el.style[this._transform] = flicking.horizontal ? "translate(" + (this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition) + "px)" : "translate(0, " + -actualPosition + "px)";
8508
+ el.style[this._transform] = flicking.horizontal ? "translate(" + -actualPosition + "px)" : "translate(0, " + -actualPosition + "px)";
8562
8509
  return this;
8563
8510
  };
8564
8511
  __proto._resetInternalValues = function () {
@@ -12708,7 +12655,6 @@ version: 4.11.3-beta.2
12708
12655
  camera.updateRange();
12709
12656
  camera.updateAnchors();
12710
12657
  camera.updateAdaptiveHeight();
12711
- camera.updatePanelOrder();
12712
12658
  camera.updateOffset();
12713
12659
  return [4 /*yield*/, renderer.render()];
12714
12660
  case 2:
@@ -12949,7 +12895,7 @@ version: 4.11.3-beta.2
12949
12895
  * Flicking.VERSION; // ex) 4.0.0
12950
12896
  * ```
12951
12897
  */
12952
- Flicking.VERSION = "4.11.3-beta.2";
12898
+ Flicking.VERSION = "4.11.0-snapshot";
12953
12899
  return Flicking;
12954
12900
  }(Component);
12955
12901