@micromag/core 0.3.679 → 0.3.703

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
@@ -905,21 +905,21 @@ var PlaybackProvider = function PlaybackProvider(_ref) {
905
905
  controls = _useState8[0],
906
906
  setControls = _useState8[1];
907
907
  var _useState9 = useState(initialControlsSuggestPlay),
908
- _useState10 = _slicedToArray(_useState9, 2),
909
- controlsSuggestPlay = _useState10[0],
910
- setControlsSuggestPlay = _useState10[1];
911
- var _useState11 = useState(initialControlsVisible),
908
+ _useState0 = _slicedToArray(_useState9, 2),
909
+ controlsSuggestPlay = _useState0[0],
910
+ setControlsSuggestPlay = _useState0[1];
911
+ var _useState1 = useState(initialControlsVisible),
912
+ _useState10 = _slicedToArray(_useState1, 2),
913
+ controlsVisible = _useState10[0],
914
+ setControlsVisible = _useState10[1];
915
+ var _useState11 = useState(initialControlsTheme),
912
916
  _useState12 = _slicedToArray(_useState11, 2),
913
- controlsVisible = _useState12[0],
914
- setControlsVisible = _useState12[1];
915
- var _useState13 = useState(initialControlsTheme),
917
+ controlsTheme = _useState12[0],
918
+ setControlsTheme = _useState12[1];
919
+ var _useState13 = useState(initialCurrentQualityLevel),
916
920
  _useState14 = _slicedToArray(_useState13, 2),
917
- controlsTheme = _useState14[0],
918
- setControlsTheme = _useState14[1];
919
- var _useState15 = useState(initialCurrentQualityLevel),
920
- _useState16 = _slicedToArray(_useState15, 2),
921
- currentQualityLevel = _useState16[0],
922
- setCurrentQualityLevel = _useState16[1];
921
+ currentQualityLevel = _useState14[0],
922
+ setCurrentQualityLevel = _useState14[1];
923
923
  var finalSetControls = useCallback(function (newControls) {
924
924
  if (newControls) {
925
925
  setControls(true);
package/es/hooks.js CHANGED
@@ -923,17 +923,17 @@ var useMediaApi = function useMediaApi() {
923
923
  ready = _useState8[0],
924
924
  setReady = _useState8[1];
925
925
  var _useState9 = useState(false),
926
- _useState10 = _slicedToArray(_useState9, 2),
927
- dataReady = _useState10[0],
928
- setDataReady = _useState10[1];
929
- var _useState11 = useState(true),
926
+ _useState0 = _slicedToArray(_useState9, 2),
927
+ dataReady = _useState0[0],
928
+ setDataReady = _useState0[1];
929
+ var _useState1 = useState(true),
930
+ _useState10 = _slicedToArray(_useState1, 2),
931
+ initialPlay = _useState10[0],
932
+ setInitialPlay = _useState10[1];
933
+ var _useState11 = useState(false),
930
934
  _useState12 = _slicedToArray(_useState11, 2),
931
- initialPlay = _useState12[0],
932
- setInitialPlay = _useState12[1];
933
- var _useState13 = useState(false),
934
- _useState14 = _slicedToArray(_useState13, 2),
935
- suspended = _useState14[0],
936
- setSuspended = _useState14[1];
935
+ suspended = _useState12[0],
936
+ setSuspended = _useState12[1];
937
937
  var progressStepsReached = useRef({});
938
938
  var paused = !playing;
939
939
 
package/es/index.js CHANGED
@@ -1902,20 +1902,20 @@ var ButtonPadding = /*#__PURE__*/function () {
1902
1902
  return _createClass(ButtonPadding, [{
1903
1903
  key: "test",
1904
1904
  value: function test(screen) {
1905
- var _ref10 = screen || {},
1906
- _ref10$footer = _ref10.footer,
1907
- footer = _ref10$footer === void 0 ? null : _ref10$footer,
1908
- _ref10$header = _ref10.header,
1909
- header = _ref10$header === void 0 ? null : _ref10$header;
1905
+ var _ref0 = screen || {},
1906
+ _ref0$footer = _ref0.footer,
1907
+ footer = _ref0$footer === void 0 ? null : _ref0$footer,
1908
+ _ref0$header = _ref0.header,
1909
+ header = _ref0$header === void 0 ? null : _ref0$header;
1910
1910
  if (header === null || footer === null) {
1911
1911
  return false;
1912
1912
  }
1913
- var _ref11 = header || {},
1914
- _ref11$badge = _ref11.badge,
1915
- badge = _ref11$badge === void 0 ? null : _ref11$badge;
1916
- var _ref12 = footer || {},
1917
- _ref12$callToAction = _ref12.callToAction,
1918
- callToAction = _ref12$callToAction === void 0 ? null : _ref12$callToAction;
1913
+ var _ref1 = header || {},
1914
+ _ref1$badge = _ref1.badge,
1915
+ badge = _ref1$badge === void 0 ? null : _ref1$badge;
1916
+ var _ref10 = footer || {},
1917
+ _ref10$callToAction = _ref10.callToAction,
1918
+ callToAction = _ref10$callToAction === void 0 ? null : _ref10$callToAction;
1919
1919
  if (callToAction === null) {
1920
1920
  return false;
1921
1921
  }
@@ -1935,20 +1935,20 @@ var ButtonPadding = /*#__PURE__*/function () {
1935
1935
  }, {
1936
1936
  key: "parse",
1937
1937
  value: function parse(screen) {
1938
- var _ref13 = screen || {},
1939
- _ref13$footer = _ref13.footer,
1940
- footer = _ref13$footer === void 0 ? null : _ref13$footer,
1941
- _ref13$header = _ref13.header,
1942
- header = _ref13$header === void 0 ? null : _ref13$header,
1943
- restScreen = _objectWithoutProperties(_ref13, _excluded$3);
1944
- var _ref14 = header || {},
1945
- _ref14$badge = _ref14.badge,
1946
- badge = _ref14$badge === void 0 ? null : _ref14$badge,
1947
- restHeader = _objectWithoutProperties(_ref14, _excluded2$1);
1948
- var _ref15 = footer || {},
1949
- _ref15$callToAction = _ref15.callToAction,
1950
- callToAction = _ref15$callToAction === void 0 ? null : _ref15$callToAction,
1951
- restFooter = _objectWithoutProperties(_ref15, _excluded3);
1938
+ var _ref11 = screen || {},
1939
+ _ref11$footer = _ref11.footer,
1940
+ footer = _ref11$footer === void 0 ? null : _ref11$footer,
1941
+ _ref11$header = _ref11.header,
1942
+ header = _ref11$header === void 0 ? null : _ref11$header,
1943
+ restScreen = _objectWithoutProperties(_ref11, _excluded$3);
1944
+ var _ref12 = header || {},
1945
+ _ref12$badge = _ref12.badge,
1946
+ badge = _ref12$badge === void 0 ? null : _ref12$badge,
1947
+ restHeader = _objectWithoutProperties(_ref12, _excluded2$1);
1948
+ var _ref13 = footer || {},
1949
+ _ref13$callToAction = _ref13.callToAction,
1950
+ callToAction = _ref13$callToAction === void 0 ? null : _ref13$callToAction,
1951
+ restFooter = _objectWithoutProperties(_ref13, _excluded3);
1952
1952
  return _objectSpread(_objectSpread({}, restScreen), {}, {
1953
1953
  header: _objectSpread(_objectSpread({}, restHeader), badge !== null ? {
1954
1954
  badge: parsePadding(badge)
@@ -2285,9 +2285,9 @@ var ThemeParser = /*#__PURE__*/function () {
2285
2285
  var innerDefinition = isArray(fieldsOrDefinition) ? fieldsOrDefinition.find(function (it) {
2286
2286
  return it.name === innerFieldName;
2287
2287
  }) || null : fieldsOrDefinition;
2288
- var _ref10 = innerDefinition || {},
2289
- _ref10$theme = _ref10.theme,
2290
- idfTheme = _ref10$theme === void 0 ? null : _ref10$theme;
2288
+ var _ref0 = innerDefinition || {},
2289
+ _ref0$theme = _ref0.theme,
2290
+ idfTheme = _ref0$theme === void 0 ? null : _ref0$theme;
2291
2291
  var innerValue = value[innerFieldName];
2292
2292
 
2293
2293
  // For items fields
@@ -2318,14 +2318,14 @@ var ThemeParser = /*#__PURE__*/function () {
2318
2318
  var _this5 = this;
2319
2319
  if (isObject(initialValue) || isObject(fieldTheme)) {
2320
2320
  var value = initialValue || null;
2321
- var _ref11 = fieldTheme || {},
2322
- _ref11$textStyle = _ref11.textStyle,
2323
- fieldTextStyleName = _ref11$textStyle === void 0 ? null : _ref11$textStyle,
2324
- _ref11$color = _ref11.color,
2325
- fieldColorName = _ref11$color === void 0 ? null : _ref11$color,
2326
- _ref11$boxStyle = _ref11.boxStyle,
2327
- fieldBoxStyleName = _ref11$boxStyle === void 0 ? null : _ref11$boxStyle,
2328
- otherProps = _objectWithoutProperties(_ref11, _excluded$1);
2321
+ var _ref1 = fieldTheme || {},
2322
+ _ref1$textStyle = _ref1.textStyle,
2323
+ fieldTextStyleName = _ref1$textStyle === void 0 ? null : _ref1$textStyle,
2324
+ _ref1$color = _ref1.color,
2325
+ fieldColorName = _ref1$color === void 0 ? null : _ref1$color,
2326
+ _ref1$boxStyle = _ref1.boxStyle,
2327
+ fieldBoxStyleName = _ref1$boxStyle === void 0 ? null : _ref1$boxStyle,
2328
+ otherProps = _objectWithoutProperties(_ref1, _excluded$1);
2329
2329
  if (fieldTextStyleName === null && fieldColorName === null && fieldBoxStyleName === null && isEmpty(otherProps) && !isObject(fieldTheme)) {
2330
2330
  return value;
2331
2331
  }
@@ -2337,11 +2337,11 @@ var ThemeParser = /*#__PURE__*/function () {
2337
2337
  return _objectSpread(_objectSpread({}, newObject), newValue !== null ? _defineProperty({}, key, newValue) : null);
2338
2338
  }, {});
2339
2339
  }
2340
- var _ref13 = value || {},
2341
- _ref13$textStyle = _ref13.textStyle,
2342
- valueTextStyle = _ref13$textStyle === void 0 ? null : _ref13$textStyle,
2343
- _ref13$boxStyle = _ref13.boxStyle,
2344
- valueBoxStyle = _ref13$boxStyle === void 0 ? null : _ref13$boxStyle;
2340
+ var _ref11 = value || {},
2341
+ _ref11$textStyle = _ref11.textStyle,
2342
+ valueTextStyle = _ref11$textStyle === void 0 ? null : _ref11$textStyle,
2343
+ _ref11$boxStyle = _ref11.boxStyle,
2344
+ valueBoxStyle = _ref11$boxStyle === void 0 ? null : _ref11$boxStyle;
2345
2345
 
2346
2346
  // Color
2347
2347
  var fieldColor = fieldColorName !== null && themeColors !== null ? themeColors[fieldColorName] || null : null;
package/es/utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import isNumber from 'lodash/isNumber';
2
2
  import { kebabCase, pascalCase, snakeCase } from 'change-case';
3
3
  export { camelCase, pascalCase, snakeCase } from 'change-case';
4
- import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
4
+ import _regenerator from '@babel/runtime/helpers/regenerator';
5
5
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
6
6
  import isObject from 'lodash/isObject';
7
7
  import { useEffect, useMemo } from 'react';
@@ -33,20 +33,17 @@ function copyClipboardApi(_x) {
33
33
  return _copyClipboardApi.apply(this, arguments);
34
34
  }
35
35
  function _copyClipboardApi() {
36
- _copyClipboardApi = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
37
- return _regeneratorRuntime().wrap(function _callee$(_context) {
38
- while (1) switch (_context.prev = _context.next) {
36
+ _copyClipboardApi = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(text) {
37
+ return _regenerator().w(function (_context) {
38
+ while (1) switch (_context.n) {
39
39
  case 0:
40
40
  if (navigator.clipboard) {
41
- _context.next = 2;
41
+ _context.n = 1;
42
42
  break;
43
43
  }
44
44
  throw makeError();
45
- case 2:
46
- return _context.abrupt("return", navigator.clipboard.writeText(text));
47
- case 3:
48
- case "end":
49
- return _context.stop();
45
+ case 1:
46
+ return _context.a(2, navigator.clipboard.writeText(text));
50
47
  }
51
48
  }, _callee);
52
49
  }));
@@ -56,10 +53,10 @@ function copyExecCommand(_x2) {
56
53
  return _copyExecCommand.apply(this, arguments);
57
54
  }
58
55
  function _copyExecCommand() {
59
- _copyExecCommand = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(text) {
56
+ _copyExecCommand = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(text) {
60
57
  var span, selection, range, success;
61
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
62
- while (1) switch (_context2.prev = _context2.next) {
58
+ return _regenerator().w(function (_context2) {
59
+ while (1) switch (_context2.n) {
63
60
  case 0:
64
61
  // Put the text to copy into a <span>
65
62
  span = document.createElement('span');
@@ -90,13 +87,12 @@ function _copyExecCommand() {
90
87
  window.document.body.removeChild(span);
91
88
  }
92
89
  if (success) {
93
- _context2.next = 15;
90
+ _context2.n = 1;
94
91
  break;
95
92
  }
96
93
  throw makeError();
97
- case 15:
98
- case "end":
99
- return _context2.stop();
94
+ case 1:
95
+ return _context2.a(2);
100
96
  }
101
97
  }, _callee2);
102
98
  }));
@@ -106,34 +102,34 @@ function copyToClipboard(_x3) {
106
102
  return _copyToClipboard.apply(this, arguments);
107
103
  }
108
104
  function _copyToClipboard() {
109
- _copyToClipboard = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(text) {
110
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
111
- while (1) switch (_context3.prev = _context3.next) {
105
+ _copyToClipboard = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(text) {
106
+ var _t, _t2;
107
+ return _regenerator().w(function (_context3) {
108
+ while (1) switch (_context3.n) {
112
109
  case 0:
113
- _context3.prev = 0;
114
- _context3.next = 3;
110
+ _context3.p = 0;
111
+ _context3.n = 1;
115
112
  return copyClipboardApi(text);
116
- case 3:
117
- _context3.next = 15;
113
+ case 1:
114
+ _context3.n = 6;
118
115
  break;
119
- case 5:
120
- _context3.prev = 5;
121
- _context3.t0 = _context3["catch"](0);
122
- _context3.prev = 7;
123
- _context3.next = 10;
116
+ case 2:
117
+ _context3.p = 2;
118
+ _t = _context3.v;
119
+ _context3.p = 3;
120
+ _context3.n = 4;
124
121
  return copyExecCommand(text);
125
- case 10:
126
- _context3.next = 15;
122
+ case 4:
123
+ _context3.n = 6;
127
124
  break;
128
- case 12:
129
- _context3.prev = 12;
130
- _context3.t1 = _context3["catch"](7);
131
- throw _context3.t1 || _context3.t0 || makeError();
132
- case 15:
133
- case "end":
134
- return _context3.stop();
125
+ case 5:
126
+ _context3.p = 5;
127
+ _t2 = _context3.v;
128
+ throw _t2 || _t || makeError();
129
+ case 6:
130
+ return _context3.a(2);
135
131
  }
136
- }, _callee3, null, [[0, 5], [7, 12]]);
132
+ }, _callee3, null, [[3, 5], [0, 2]]);
137
133
  }));
138
134
  return _copyToClipboard.apply(this, arguments);
139
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.679",
3
+ "version": "0.3.703",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -118,7 +118,7 @@
118
118
  "@react-spring/core": "^9.6.1",
119
119
  "@react-spring/web": "^9.6.1",
120
120
  "@use-gesture/react": "^10.3.1",
121
- "bootstrap": "^5.3.1",
121
+ "bootstrap": "^5.3.7",
122
122
  "change-case": "^5.4.4",
123
123
  "classnames": "^2.2.6",
124
124
  "css-mediaquery": "^0.1.2",
@@ -144,5 +144,5 @@
144
144
  "access": "public",
145
145
  "registry": "https://registry.npmjs.org/"
146
146
  },
147
- "gitHead": "ed32123e4d66d2cfe32ec1fecaf1a435e1b04bbf"
147
+ "gitHead": "15a0df01ed9d05f47a056fb2ff078aded803d33d"
148
148
  }