@micromag/core 0.3.755 → 0.3.763

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/es/hooks.js CHANGED
@@ -4,7 +4,7 @@ import { EventsManager, MediasParser, StoryParser, ThemeParser } from '@micromag
4
4
  import { createUseEvent, getMediaFilesAsArray } from '@micromag/core/utils';
5
5
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
6
6
  import { useSpring, useSprings } from '@react-spring/core';
7
- import { useDrag } from '@use-gesture/react';
7
+ import { useGesture, useDrag } from '@use-gesture/react';
8
8
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
9
9
  import { useForm as useForm$1 } from '@folklore/forms';
10
10
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
@@ -201,6 +201,8 @@ function useDragProgress() {
201
201
  computeProgress = _ref$computeProgress === void 0 ? null : _ref$computeProgress,
202
202
  _ref$onProgress = _ref.onProgress,
203
203
  onProgress = _ref$onProgress === void 0 ? null : _ref$onProgress,
204
+ _ref$onPointerDown = _ref.onPointerDown,
205
+ onPointerDown = _ref$onPointerDown === void 0 ? null : _ref$onPointerDown,
204
206
  _ref$springParams = _ref.springParams,
205
207
  springParams = _ref$springParams === void 0 ? undefined : _ref$springParams,
206
208
  _ref$dragOptions = _ref.dragOptions,
@@ -268,7 +270,12 @@ function useDragProgress() {
268
270
  onProgress(newProgress, gestureState);
269
271
  }
270
272
  }, [setDragging, disabled, onTap, computeProgress, dragging, onProgress]);
271
- var bind = useDrag(onDrag, dragOptions);
273
+ var bind = useGesture({
274
+ onDrag: onDrag,
275
+ onPointerDown: onPointerDown
276
+ }, {
277
+ drag: dragOptions
278
+ });
272
279
  useEffect(function () {
273
280
  if (!refDragging.current && wantedProgress !== refProgress.current) {
274
281
  setDirection(wantedProgress < refProgress.current ? -1 : 1);
package/es/index.js CHANGED
@@ -17,7 +17,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
17
17
  import isString from 'lodash/isString';
18
18
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
19
19
  import uniq from 'lodash/uniq';
20
- import { isString as isString$1 } from 'lodash';
21
20
  import isEmpty from 'lodash/isEmpty';
22
21
  import { Tracking as Tracking$1 } from '@folklore/tracking';
23
22
  import PropTypes$1 from 'prop-types';
@@ -1786,7 +1785,7 @@ var KeypadItemLabel = /*#__PURE__*/function () {
1786
1785
  }
1787
1786
  var hasStringItemLabel = (items || []).some(function () {
1788
1787
  var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1789
- return item !== null && isString$1(item === null || item === void 0 ? void 0 : item.label);
1788
+ return item !== null && isString(item === null || item === void 0 ? void 0 : item.label);
1790
1789
  });
1791
1790
  if (!hasStringItemLabel) {
1792
1791
  return false;
@@ -1803,7 +1802,7 @@ var KeypadItemLabel = /*#__PURE__*/function () {
1803
1802
  return _objectSpread(_objectSpread({}, restScreen), {}, {
1804
1803
  items: items.map(function () {
1805
1804
  var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1806
- if (item === null || !isString$1(item === null || item === void 0 ? void 0 : item.label)) {
1805
+ if (item === null || !isString(item === null || item === void 0 ? void 0 : item.label)) {
1807
1806
  return item;
1808
1807
  }
1809
1808
  var _ref3 = item || {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.755",
3
+ "version": "0.3.763",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -111,7 +111,7 @@
111
111
  "@panneau/element-media-card": "^3.0.300",
112
112
  "@panneau/element-media-player": "^3.0.300",
113
113
  "@panneau/element-modal": "^3.0.300",
114
- "@panneau/fields": "^3.0.301",
114
+ "@panneau/fields": "^3.0.306",
115
115
  "@panneau/filters": "^3.0.301",
116
116
  "@panneau/medias": "^3.0.300",
117
117
  "@panneau/uppy": "^3.0.162",
@@ -159,5 +159,5 @@
159
159
  "access": "public",
160
160
  "registry": "https://registry.npmjs.org/"
161
161
  },
162
- "gitHead": "56016c3456a703961947dc66b2ff52d741691900"
162
+ "gitHead": "843084e78ba9bf2de883b2c958bd38853cdc20e6"
163
163
  }