@gem-sdk/core 1.23.0-staging.290 → 1.23.0-staging.294

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.
@@ -67,9 +67,11 @@ const useLivePageAnimation = (wrapperRef, settings, tag)=>{
67
67
  removeZeroOpacity
68
68
  ]);
69
69
  const cancelAppear = react.useCallback(()=>{
70
+ removeZeroOpacity();
70
71
  if (!animationAppearInstance.current) return;
71
72
  animationAppearInstance.current.cancel();
72
73
  }, [
74
+ removeZeroOpacity,
73
75
  animationAppearInstance
74
76
  ]);
75
77
  const playHover = react.useCallback((e)=>{
@@ -213,7 +215,7 @@ const useLivePageAnimation = (wrapperRef, settings, tag)=>{
213
215
  wrapperId.current = `animation-wrapper-${Math.random().toString(36).substr(2, 5)}`;
214
216
  wrapperRef.current.setAttribute('data-animationid', wrapperId.current);
215
217
  if (Object.keys(TAGS_SELECTOR).includes(tag)) animationElement.current = document.querySelector(`[data-animationid='${wrapperId.current}'] ${TAGS_SELECTOR?.[tag] ?? ''}`);
216
- else animationElement.current = document.querySelector(`[data-animationid='${wrapperId.current}'] > :first-child`);
218
+ else animationElement.current = document.querySelector(`[data-animationid='${wrapperId.current}'] > :first-of-type:not(script,link)`);
217
219
  return initResizeObserver();
218
220
  }, 100);
219
221
  }, [
@@ -65,9 +65,11 @@ const useLivePageAnimation = (wrapperRef, settings, tag)=>{
65
65
  removeZeroOpacity
66
66
  ]);
67
67
  const cancelAppear = useCallback(()=>{
68
+ removeZeroOpacity();
68
69
  if (!animationAppearInstance.current) return;
69
70
  animationAppearInstance.current.cancel();
70
71
  }, [
72
+ removeZeroOpacity,
71
73
  animationAppearInstance
72
74
  ]);
73
75
  const playHover = useCallback((e)=>{
@@ -211,7 +213,7 @@ const useLivePageAnimation = (wrapperRef, settings, tag)=>{
211
213
  wrapperId.current = `animation-wrapper-${Math.random().toString(36).substr(2, 5)}`;
212
214
  wrapperRef.current.setAttribute('data-animationid', wrapperId.current);
213
215
  if (Object.keys(TAGS_SELECTOR).includes(tag)) animationElement.current = document.querySelector(`[data-animationid='${wrapperId.current}'] ${TAGS_SELECTOR?.[tag] ?? ''}`);
214
- else animationElement.current = document.querySelector(`[data-animationid='${wrapperId.current}'] > :first-child`);
216
+ else animationElement.current = document.querySelector(`[data-animationid='${wrapperId.current}'] > :first-of-type:not(script,link)`);
215
217
  return initResizeObserver();
216
218
  }, 100);
217
219
  }, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.23.0-staging.290",
3
+ "version": "1.23.0-staging.294",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",