@micromag/core 0.4.43 → 0.4.45

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
@@ -1023,28 +1023,23 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
1023
1023
  // Cleanup: clear media registration when this screen deactivates or unmounts.
1024
1024
  // Note: we cannot check mediaRef.current here because React clears callback refs
1025
1025
  // before running effect cleanups, so mediaRef.current is always null at this point.
1026
-
1027
1026
  useEffect(function () {
1028
1027
  return function () {
1029
1028
  if (active) {
1030
- console.log('clear media');
1031
1029
  setMedia(null);
1032
1030
  setIsBackground(false);
1033
1031
  }
1034
1032
  };
1035
- }, [active, setMedia, setIsBackground]);
1033
+ }, [active, setMedia, setIsBackground, updateKey]);
1036
1034
 
1037
1035
  // Register media with context when active and no media is registered
1038
1036
  useEffect(function () {
1039
- console.log('try to register media', active, mediaRef.current, media);
1040
1037
  if (!active || mediaRef.current === null || media !== null) {
1041
1038
  return;
1042
1039
  }
1043
- console.log('register media');
1044
1040
  setIsBackground(background);
1045
1041
  setMedia(mediaRef.current);
1046
1042
  }, [active, background, media, updateKey, setMedia, setIsBackground]);
1047
- console.log('usePlaybackMediaRef', mediaRef.current, media);
1048
1043
  return {
1049
1044
  ref: mediaRef,
1050
1045
  isCurrent: mediaRef.current === media
package/lib/contexts.js CHANGED
@@ -1023,28 +1023,23 @@ var usePlaybackMediaRef = function usePlaybackMediaRef() {
1023
1023
  // Cleanup: clear media registration when this screen deactivates or unmounts.
1024
1024
  // Note: we cannot check mediaRef.current here because React clears callback refs
1025
1025
  // before running effect cleanups, so mediaRef.current is always null at this point.
1026
-
1027
1026
  React.useEffect(function () {
1028
1027
  return function () {
1029
1028
  if (active) {
1030
- console.log('clear media');
1031
1029
  setMedia(null);
1032
1030
  setIsBackground(false);
1033
1031
  }
1034
1032
  };
1035
- }, [active, setMedia, setIsBackground]);
1033
+ }, [active, setMedia, setIsBackground, updateKey]);
1036
1034
 
1037
1035
  // Register media with context when active and no media is registered
1038
1036
  React.useEffect(function () {
1039
- console.log('try to register media', active, mediaRef.current, media);
1040
1037
  if (!active || mediaRef.current === null || media !== null) {
1041
1038
  return;
1042
1039
  }
1043
- console.log('register media');
1044
1040
  setIsBackground(background);
1045
1041
  setMedia(mediaRef.current);
1046
1042
  }, [active, background, media, updateKey, setMedia, setIsBackground]);
1047
- console.log('usePlaybackMediaRef', mediaRef.current, media);
1048
1043
  return {
1049
1044
  ref: mediaRef,
1050
1045
  isCurrent: mediaRef.current === media
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.4.43",
3
+ "version": "0.4.45",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -161,6 +161,6 @@
161
161
  "access": "public",
162
162
  "registry": "https://registry.npmjs.org/"
163
163
  },
164
- "gitHead": "e168b7a9990472d1cb36973e4e45334f16bbeba6",
164
+ "gitHead": "21ad909808957602ac07befd6a45bdc0cbee6183",
165
165
  "types": "es/index.d.ts"
166
166
  }