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

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 +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 +22 -16
  60. package/dist/flicking.cjs.js.map +1 -1
  61. package/dist/flicking.esm.js +22 -16
  62. package/dist/flicking.esm.js.map +1 -1
  63. package/dist/flicking.js +22 -16
  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 +22 -16
  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.3-beta.4
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.
@@ -7071,7 +7067,7 @@ version: 4.11.3-beta.2
7071
7067
  if (!activeAnchor || !anchorAtCamera) {
7072
7068
  return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
7073
7069
  }
7074
- var snapThreshold = this._calcSnapThreshold(position, activeAnchor);
7070
+ var snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);
7075
7071
  var posDelta = flicking.animating ? state.delta : position - camera.position;
7076
7072
  var absPosDelta = Math.abs(posDelta);
7077
7073
  var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta;
@@ -7158,7 +7154,7 @@ version: 4.11.3-beta.2
7158
7154
  var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera;
7159
7155
  return adjacentAnchor;
7160
7156
  };
7161
- __proto._calcSnapThreshold = function (position, activeAnchor) {
7157
+ __proto._calcSnapThreshold = function (threshold, position, activeAnchor) {
7162
7158
  var isNextDirection = position > activeAnchor.position;
7163
7159
  var panel = activeAnchor.panel;
7164
7160
  var panelSize = panel.size;
@@ -7169,7 +7165,7 @@ version: 4.11.3-beta.2
7169
7165
  * |<------>|<------------>|
7170
7166
  * [ |<-Anchor ]
7171
7167
  */
7172
- return isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev;
7168
+ return Math.max(threshold, isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev);
7173
7169
  };
7174
7170
  return SnapControl;
7175
7171
  }(Control$1);
@@ -8395,11 +8391,13 @@ version: 4.11.3-beta.2
8395
8391
  * @return {AnchorPoint | null}
8396
8392
  */
8397
8393
  __proto.findActiveAnchor = function () {
8394
+ var _a;
8398
8395
  var flicking = getFlickingAttached(this._flicking);
8399
- var activeIndex = flicking.control.activeIndex;
8400
- return find$1(this._anchors, function (anchor) {
8401
- return anchor.panel.index === activeIndex;
8402
- });
8396
+ var activePanel = flicking.control.activePanel;
8397
+ if (!activePanel) return null;
8398
+ return (_a = find$1(this._anchors, function (anchor) {
8399
+ return anchor.panel.index === activePanel.index;
8400
+ })) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
8403
8401
  };
8404
8402
  /**
8405
8403
  * Clamp the given position between camera's range
@@ -12703,6 +12701,10 @@ version: 4.11.3-beta.2
12703
12701
  return [4 /*yield*/, renderer.forceRenderAllPanels()];
12704
12702
  case 1:
12705
12703
  _a.sent(); // Render all panel elements, to update sizes
12704
+ if (!this._initialized) {
12705
+ return [2 /*return*/];
12706
+ }
12707
+
12706
12708
  renderer.updatePanelSize();
12707
12709
  camera.updateAlignPos();
12708
12710
  camera.updateRange();
@@ -12713,6 +12715,10 @@ version: 4.11.3-beta.2
12713
12715
  return [4 /*yield*/, renderer.render()];
12714
12716
  case 2:
12715
12717
  _a.sent();
12718
+ if (!this._initialized) {
12719
+ return [2 /*return*/];
12720
+ }
12721
+
12716
12722
  if (control.animating) ; else {
12717
12723
  control.updatePosition(prevProgressInPanel);
12718
12724
  control.updateInput();
@@ -12949,7 +12955,7 @@ version: 4.11.3-beta.2
12949
12955
  * Flicking.VERSION; // ex) 4.0.0
12950
12956
  * ```
12951
12957
  */
12952
- Flicking.VERSION = "4.11.3-beta.2";
12958
+ Flicking.VERSION = "4.11.3-beta.4";
12953
12959
  return Flicking;
12954
12960
  }(Component);
12955
12961