@micromag/core 0.4.79 → 0.4.83

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.
Files changed (3) hide show
  1. package/es/hooks.js +5 -10
  2. package/es/utils.js +1 -1
  3. package/package.json +18 -18
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
  };
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.79",
3
+ "version": "0.4.83",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -94,22 +94,22 @@
94
94
  "react-dom": "^19.0.0"
95
95
  },
96
96
  "peerDependencies": {
97
- "@panneau/displays": "^4.0.40-alpha.1",
98
- "@panneau/element-button": "^4.0.40-alpha.1",
99
- "@panneau/element-buttons": "^4.0.40-alpha.1",
100
- "@panneau/element-dropdown": "^4.0.40-alpha.1",
101
- "@panneau/element-form-group": "^4.0.40-alpha.1",
102
- "@panneau/element-grid": "^4.0.40-alpha.1",
103
- "@panneau/element-icon": "^4.0.40-alpha.1",
104
- "@panneau/element-link": "^4.0.40-alpha.1",
105
- "@panneau/element-media-card": "^4.0.40-alpha.1",
106
- "@panneau/element-media-player": "^4.0.40-alpha.1",
107
- "@panneau/element-modal": "^4.0.40-alpha.1",
108
- "@panneau/fields": "^4.0.40-alpha.1",
109
- "@panneau/filters": "^4.0.40-alpha.1",
110
- "@panneau/intl": "^4.0.40-alpha.1",
111
- "@panneau/medias": "^4.0.40-alpha.1",
112
- "@panneau/uppy": "^4.0.40-alpha.1",
97
+ "@panneau/displays": "^4.0.40",
98
+ "@panneau/element-button": "^4.0.40",
99
+ "@panneau/element-buttons": "^4.0.40",
100
+ "@panneau/element-dropdown": "^4.0.40",
101
+ "@panneau/element-form-group": "^4.0.40",
102
+ "@panneau/element-grid": "^4.0.40",
103
+ "@panneau/element-icon": "^4.0.40",
104
+ "@panneau/element-link": "^4.0.40",
105
+ "@panneau/element-media-card": "^4.0.40",
106
+ "@panneau/element-media-player": "^4.0.40",
107
+ "@panneau/element-modal": "^4.0.40",
108
+ "@panneau/fields": "^4.0.40",
109
+ "@panneau/filters": "^4.0.40",
110
+ "@panneau/intl": "^4.0.40",
111
+ "@panneau/medias": "^4.0.42",
112
+ "@panneau/uppy": "^4.0.40",
113
113
  "@uppy/core": "^5.1.1",
114
114
  "@uppy/dashboard": "^5.0.4",
115
115
  "@uppy/react": "^5.1.1",
@@ -157,6 +157,6 @@
157
157
  "access": "public",
158
158
  "registry": "https://registry.npmjs.org/"
159
159
  },
160
- "gitHead": "9390fd82c9dbf9c0eeaa15697e34bbc79625383c",
160
+ "gitHead": "323b1d85d8fe4665b160783048a92d78f663050f",
161
161
  "types": "es/index.d.ts"
162
162
  }