@micromag/core 0.3.503 → 0.3.506

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/es/index.js CHANGED
@@ -1301,7 +1301,7 @@ var MediasParser = /*#__PURE__*/function () {
1301
1301
  _field$type = field.type,
1302
1302
  type = _field$type === void 0 ? null : _field$type;
1303
1303
  var path = [namePrefix, name].filter(function (it) {
1304
- return it !== null;
1304
+ return it !== null && it !== '';
1305
1305
  }).join('\\.');
1306
1306
  var fieldDefinition = _objectSpread(_objectSpread({}, type !== null ? _this2.fieldsManager.getDefinition(type) : null), field);
1307
1307
 
@@ -1558,7 +1558,7 @@ var FontsParser = /*#__PURE__*/function () {
1558
1558
  _field$type = field.type,
1559
1559
  type = _field$type === void 0 ? null : _field$type;
1560
1560
  var path = [namePrefix, name].filter(function (it) {
1561
- return it !== null;
1561
+ return it !== null && it !== '';
1562
1562
  }).join('\\.');
1563
1563
  var fieldDefinition = _objectSpread(_objectSpread({}, type !== null ? _this2.fieldsManager.getDefinition(type) : null), field);
1564
1564
 
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/lib/index.js CHANGED
@@ -1387,7 +1387,7 @@ var MediasParser = /*#__PURE__*/function () {
1387
1387
  _field$type = field.type,
1388
1388
  type = _field$type === void 0 ? null : _field$type;
1389
1389
  var path = [namePrefix, name].filter(function (it) {
1390
- return it !== null;
1390
+ return it !== null && it !== '';
1391
1391
  }).join('\\.');
1392
1392
  var fieldDefinition = _objectSpread(_objectSpread({}, type !== null ? _this2.fieldsManager.getDefinition(type) : null), field);
1393
1393
 
@@ -1644,7 +1644,7 @@ var FontsParser = /*#__PURE__*/function () {
1644
1644
  _field$type = field.type,
1645
1645
  type = _field$type === void 0 ? null : _field$type;
1646
1646
  var path = [namePrefix, name].filter(function (it) {
1647
- return it !== null;
1647
+ return it !== null && it !== '';
1648
1648
  }).join('\\.');
1649
1649
  var fieldDefinition = _objectSpread(_objectSpread({}, type !== null ? _this2.fieldsManager.getDefinition(type) : null), field);
1650
1650
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.503",
3
+ "version": "0.3.506",
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": "b3bc0905b6e926384f26f5807551c772ccc55452"
159
159
  }