@micromag/core 0.3.619 → 0.3.637

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/contexts.js CHANGED
@@ -2,7 +2,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import isString from 'lodash/isString';
3
3
  import PropTypes from 'prop-types';
4
4
  import React, { useContext, useMemo, useState, useEffect, useCallback, useRef } from 'react';
5
- import { ComponentsManager, PropTypes as PropTypes$1, FieldsManager, ScreensManager, ColorsParser, Tracking } from '@micromag/core';
5
+ import { ComponentsManager, FieldsManager, PropTypes as PropTypes$1, ScreensManager, ColorsParser, Tracking } from '@micromag/core';
6
6
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
7
7
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
8
8
  import uniqBy from 'lodash/uniqBy';
@@ -1182,15 +1182,18 @@ var useTracking = function useTracking() {
1182
1182
  var propTypes$2 = {
1183
1183
  children: PropTypes.node.isRequired,
1184
1184
  variables: PropTypes$1.trackingVariables,
1185
- disabled: PropTypes.bool
1185
+ disabled: PropTypes.bool,
1186
+ paused: PropTypes.bool
1186
1187
  };
1187
1188
  var defaultProps$2 = {
1188
1189
  variables: null,
1189
- disabled: false
1190
+ disabled: false,
1191
+ paused: false
1190
1192
  };
1191
1193
  var TrackingProvider = function TrackingProvider(_ref) {
1192
1194
  var variables = _ref.variables,
1193
1195
  disabled = _ref.disabled,
1196
+ paused = _ref.paused,
1194
1197
  children = _ref.children;
1195
1198
  var contextTracking = useTracking() || null;
1196
1199
  var refTracking = useRef(null);
@@ -1198,14 +1201,16 @@ var TrackingProvider = function TrackingProvider(_ref) {
1198
1201
  if (refTracking.current === null) {
1199
1202
  refTracking.current = new Tracking({
1200
1203
  variables: _objectSpread(_objectSpread({}, contextTracking !== null ? contextTracking.getVariables() : null), variables),
1201
- disabled: disabled
1204
+ disabled: disabled,
1205
+ paused: paused
1202
1206
  });
1203
1207
  } else {
1204
1208
  refTracking.current.setVariables(_objectSpread(_objectSpread({}, refTracking.current.getVariables()), variables));
1205
1209
  refTracking.current.setDisabled(disabled);
1210
+ refTracking.current.setPaused(paused);
1206
1211
  }
1207
1212
  return refTracking.current;
1208
- }, [contextTracking, variables, disabled]);
1213
+ }, [contextTracking, variables, disabled, paused]);
1209
1214
  return /*#__PURE__*/React.createElement(TrackingContainer, {
1210
1215
  tracking: tracking
1211
1216
  }, children);
package/es/index.js CHANGED
@@ -1918,7 +1918,7 @@ var ThemeParser = /*#__PURE__*/function () {
1918
1918
  var fieldThemeValue = newThemeValue !== null ? newThemeValue[key] || null : null;
1919
1919
 
1920
1920
  // Try for early return
1921
- var _ref8 = fieldDefinition,
1921
+ var _ref8 = fieldDefinition || {},
1922
1922
  _ref8$theme = _ref8.theme,
1923
1923
  theme = _ref8$theme === undefined ? null : _ref8$theme;
1924
1924
  if ((theme === null || !isObject(theme)) && fields === null) {
package/es/utils.js CHANGED
@@ -724,7 +724,7 @@ var getStyleFromShadow = function getStyleFromShadow(value) {
724
724
  if (value == null) {
725
725
  return null;
726
726
  }
727
- var _ref = value,
727
+ var _ref = value || {},
728
728
  _ref$shadowAngle = _ref.shadowAngle,
729
729
  shadowAngle = _ref$shadowAngle === undefined ? null : _ref$shadowAngle,
730
730
  _ref$shadowDistance = _ref.shadowDistance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.619",
3
+ "version": "0.3.637",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -110,7 +110,7 @@
110
110
  "@folklore/routes": "^0.2.36",
111
111
  "@folklore/services": "^0.1.24",
112
112
  "@folklore/size": "^0.1.20",
113
- "@folklore/tracking": "~0.0.18",
113
+ "@folklore/tracking": "~0.0.28",
114
114
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
115
115
  "@fortawesome/free-solid-svg-icons": "^6.5.2",
116
116
  "@fortawesome/react-fontawesome": "^0.2.0",
@@ -144,5 +144,5 @@
144
144
  "access": "public",
145
145
  "registry": "https://registry.npmjs.org/"
146
146
  },
147
- "gitHead": "21a901b0f800114994f30dfe692c664d378e12f7"
147
+ "gitHead": "8f06c2a525d71dc47183af7786284632a04332e1"
148
148
  }