@micromag/core 0.3.503 → 0.3.505

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
@@ -230,13 +230,16 @@ function useDragProgress() {
230
230
  var active = gestureState.active,
231
231
  tap = gestureState.tap;
232
232
  if (disabled) {
233
+ refDragging.current = false;
233
234
  return;
234
235
  }
235
236
  if (tap) {
237
+ refDragging.current = false;
236
238
  if (onTap !== null) onTap(gestureState);
237
239
  return;
238
240
  }
239
241
  if (dragDisabled) {
242
+ refDragging.current = false;
240
243
  return;
241
244
  }
242
245
  var newProgress = computeProgress(gestureState);
package/lib/components.js CHANGED
@@ -65,11 +65,13 @@ function _interopNamespaceDefault(e) {
65
65
 
66
66
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
67
67
 
68
- // React.useInsertionEffect is not available in React <18
69
68
  var useEffect = React__namespace.useEffect,
70
69
  useLayoutEffect = React__namespace.useLayoutEffect,
71
- useRef = React__namespace.useRef,
72
- useBuiltinInsertionEffect = React__namespace.useInsertionEffect;
70
+ useRef = React__namespace.useRef;
71
+
72
+ // React.useInsertionEffect is not available in React <18
73
+ // This hack fixes a transpilation issue on some apps
74
+ var useBuiltinInsertionEffect = React__namespace['useInsertion' + 'Effect'];
73
75
 
74
76
  // Copied from:
75
77
  // https://github.com/facebook/react/blob/main/packages/shared/ExecutionEnvironment.js
package/lib/contexts.js CHANGED
@@ -1006,11 +1006,13 @@ var PlaybackProvider = function PlaybackProvider(_ref) {
1006
1006
  PlaybackProvider.propTypes = propTypes$7;
1007
1007
  PlaybackProvider.defaultProps = defaultProps$7;
1008
1008
 
1009
- // React.useInsertionEffect is not available in React <18
1010
1009
  var useEffect = React__namespace.useEffect,
1011
1010
  useLayoutEffect = React__namespace.useLayoutEffect,
1012
- useRef = React__namespace.useRef,
1013
- useBuiltinInsertionEffect = React__namespace.useInsertionEffect;
1011
+ useRef = React__namespace.useRef;
1012
+
1013
+ // React.useInsertionEffect is not available in React <18
1014
+ // This hack fixes a transpilation issue on some apps
1015
+ var useBuiltinInsertionEffect = React__namespace['useInsertion' + 'Effect'];
1014
1016
 
1015
1017
  // Copied from:
1016
1018
  // https://github.com/facebook/react/blob/main/packages/shared/ExecutionEnvironment.js
package/lib/hooks.js CHANGED
@@ -232,13 +232,16 @@ function useDragProgress() {
232
232
  var active = gestureState.active,
233
233
  tap = gestureState.tap;
234
234
  if (disabled) {
235
+ refDragging.current = false;
235
236
  return;
236
237
  }
237
238
  if (tap) {
239
+ refDragging.current = false;
238
240
  if (onTap !== null) onTap(gestureState);
239
241
  return;
240
242
  }
241
243
  if (dragDisabled) {
244
+ refDragging.current = false;
242
245
  return;
243
246
  }
244
247
  var newProgress = computeProgress(gestureState);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.503",
3
+ "version": "0.3.505",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -155,5 +155,5 @@
155
155
  "access": "public",
156
156
  "registry": "https://registry.npmjs.org/"
157
157
  },
158
- "gitHead": "50e91d4d3f655cd4fbe8a9fc1c3dec54f3fc63ca"
158
+ "gitHead": "f16e0f95385c69df3b07b182c70a9f0eb56cbe3a"
159
159
  }