@micromag/core 0.4.77 → 0.4.80

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
@@ -224,9 +224,10 @@ const useFormattedTime = (options = null) => {
224
224
  };
225
225
 
226
226
  const useDebounced = (handler, watchedValue, t0) => {
227
- const $ = c(7);
227
+ const $ = c(5);
228
228
  const delay = t0 === undefined ? 300 : t0;
229
229
  let t1;
230
+ let t2;
230
231
  if ($[0] !== delay || $[1] !== handler || $[2] !== watchedValue) {
231
232
  t1 = () => {
232
233
  const timeoutHandler = setTimeout(() => {
@@ -238,21 +239,15 @@ const useDebounced = (handler, watchedValue, t0) => {
238
239
  clearTimeout(timeoutHandler);
239
240
  };
240
241
  };
242
+ t2 = [watchedValue, delay, handler];
241
243
  $[0] = delay;
242
244
  $[1] = handler;
243
245
  $[2] = watchedValue;
244
246
  $[3] = t1;
247
+ $[4] = t2;
245
248
  } else {
246
249
  t1 = $[3];
247
- }
248
- let t2;
249
- if ($[4] !== delay || $[5] !== watchedValue) {
250
- t2 = [watchedValue, delay];
251
- $[4] = delay;
252
- $[5] = watchedValue;
253
- $[6] = t2;
254
- } else {
255
- t2 = $[6];
250
+ t2 = $[4];
256
251
  }
257
252
  useEffect(t1, t2);
258
253
  };
@@ -344,7 +339,6 @@ function useDragProgress(t0) {
344
339
  tap,
345
340
  first
346
341
  } = gestureState;
347
- console.log("DRAG");
348
342
  if (disabled) {
349
343
  draggingRef.current = false;
350
344
  return;
package/es/utils.js CHANGED
@@ -970,7 +970,7 @@ function mergeRefs(...refs) {
970
970
  refs.forEach(ref => {
971
971
  if (typeof ref === 'function') {
972
972
  ref(value);
973
- } else if (ref != null) {
973
+ } else if (ref !== null) {
974
974
  ref.current = value;
975
975
  }
976
976
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.4.77",
3
+ "version": "0.4.80",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -157,6 +157,6 @@
157
157
  "access": "public",
158
158
  "registry": "https://registry.npmjs.org/"
159
159
  },
160
- "gitHead": "b55c2c748383d30c8ff0ca7594e499dbdc8d1c10",
160
+ "gitHead": "7b7cc58e5fec6cc024896ac481b80fd2976ca26d",
161
161
  "types": "es/index.d.ts"
162
162
  }