@gem-sdk/core 1.14.0-dev.625 → 1.14.0-dev.627
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var constant=require("./constant.js"),colors=require("./colors.js"),makeStyle=require("./make-style.js");const getStyleBackgroundByDevice=(e,t)=>e?{...getStyleBgColor(e),...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t),...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?colors.isColor(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let o={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return makeStyle.makeStyleResponsive("bgi",o)},getBgImageByDevice=(e,t,o)=>{let g=e?.[t]?.type==="video";if(g)return;let i=e?.[t]?.image?.backupFileKey,a=o?.liquid&&i
|
|
1
|
+
"use strict";var constant=require("./constant.js"),colors=require("./colors.js"),makeStyle=require("./make-style.js");const getStyleBackgroundByDevice=(e,t)=>e?{...getStyleBgColor(e),...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t),...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?colors.isColor(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let o={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return makeStyle.makeStyleResponsive("bgi",o)},getBgImageByDevice=(e,t,o)=>{let g=e?.[t]?.type==="video";if(g)return;let i=e?.[t]?.image?.backupFileKey,a=e?.[t]?.image?.storage,l=e?.[t]?.image?.src;if("FILE_CONTENT"===a&&o?.liquid&&i&&(l=`{{ "${i}" | file_url }}`),("THEME"===a||!a)&&o?.liquid&&i&&(l=`{{ "${i}" | asset_url }}`),"string"==typeof l)return`url(${l})`},getStyleBgPosition=e=>{let t={desktop:getBgPositionByDevice(e,"desktop"),tablet:getBgPositionByDevice(e,"tablet"),mobile:getBgPositionByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgp",t)},getBgPositionByDevice=(e,t)=>{let o=e?.[t]?.position;return o&&`${o.x}% ${o.y}%`},getStyleBgSize=e=>{let t={desktop:getBgSizeByDevice(e,"desktop"),tablet:getBgSizeByDevice(e,"tablet"),mobile:getBgSizeByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgs",t)},getBgSizeByDevice=(e,t)=>e?.[t]?.size,getStyleBgRepeat=e=>{let t={desktop:getBgRepeatByDevice(e,"desktop"),tablet:getBgRepeatByDevice(e,"tablet"),mobile:getBgRepeatByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bgr",t)},getBgRepeatByDevice=(e,t)=>e?.[t]?.repeat,getStyleBgAttachment=e=>{let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")};return makeStyle.makeStyleResponsive("bga",t)},getBgAttachmentByDevice=(e,t)=>e?.[t]?.attachment,composeBackgroundCss=e=>`${e?`background-color: ${colors.getSingleColorVariable(e)} !important;`:void 0}`,makeFixedBgAttachment=e=>{if(!e)return;e.tablet=e.tablet?e.tablet:e.desktop,e.mobile=e.mobile?e.mobile:e.tablet;let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")},o={desktop:{...makeFixedBgAttachmentByDevice("desktop",t.desktop)},tablet:{...makeFixedBgAttachmentByDevice("tablet",t.tablet)},mobile:{...makeFixedBgAttachmentByDevice("mobile",t.mobile)}};return{wrapper:{...o.desktop?.wrapper,...o.tablet?.wrapper,...o.mobile?.wrapper},content:{...o.desktop?.content,...o.tablet?.content,...o.mobile?.content}}},makeFixedBgAttachmentByDevice=(e,t)=>{let o=constant.devicesMapping[e]??"";return"fixed"===t?{wrapper:{[`--pos${o}`]:"absolute",[`--top${o}`]:"0",[`--left${o}`]:"0",[`--w${o}`]:"100%",[`--h${o}`]:"100%"},content:{[`--pos${o}`]:"fixed",[`--w${o}`]:"100vw",[`--h${o}`]:"100vh",[`--bga${o}`]:"unset"}}:{wrapper:{[`--pos${o}`]:"absolute"},content:{[`--w${o}`]:"100%",[`--h${o}`]:"100%",[`--pos${o}`]:"absolute",[`--bga${o}`]:t}}},GRADIENT_BGR_KEY="linear-gradient",getGradientBgrStyleForButton=e=>{if(!e)return;let t={};return Object.keys(e).forEach(o=>{e[o]?.startsWith(GRADIENT_BGR_KEY)&&("normal"===o?Object.assign(t,{"--bg":e[o]}):Object.assign(t,{"--hvr-bg":e[o]}))}),t},getGradientBgrStyleByDevice=e=>{if(!e)return;let t={};return["desktop","tablet","mobile"].forEach(o=>{e[o]?.color?.includes(GRADIENT_BGR_KEY)&&Object.assign(t,{[`--bgc${"desktop"!==o?"-"+o:""}`]:"transparent",[`--bgi${"desktop"!==o?"-"+o:""}`]:`${getBgImageByDevice(e,o)||"url()"}, ${e[o]?.color}`})}),t};exports.GRADIENT_BGR_KEY=GRADIENT_BGR_KEY,exports.composeBackgroundCss=composeBackgroundCss,exports.getBgImageByDevice=getBgImageByDevice,exports.getGradientBgrStyleByDevice=getGradientBgrStyleByDevice,exports.getGradientBgrStyleForButton=getGradientBgrStyleForButton,exports.getStyleBackgroundByDevice=getStyleBackgroundByDevice,exports.makeFixedBgAttachment=makeFixedBgAttachment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var react=require("react"),animations=require("./animations.js");const TAGS_SELECTOR={Button:".gp-button-base",ProductButton:".gp-button-base",Sticky:"gp-sticky",Dialog:"div[role=dialog]",Icon:"div div",ProductTag:"div div div"},useLivePageAnimation=(e,r,t)=>{let n=animations.animations(),[c,u]=react.useState(!1),a=react.useRef(void 0),i=react.useRef(void 0),o=react.useRef(null),
|
|
1
|
+
"use strict";var react=require("react"),animations=require("./animations.js");const TAGS_SELECTOR={Button:".gp-button-base",ProductButton:".gp-button-base",Carousel:".gp-carousel-wrapper",Sticky:"gp-sticky",Dialog:"div[role=dialog]",Icon:"div div",ProductTag:"div div div"},useLivePageAnimation=(e,r,t)=>{let n=animations.animations(),[c,u]=react.useState(!1),a=react.useRef(void 0),i=react.useRef(void 0),o=react.useRef(null),s=react.useRef("none"),l=react.useRef("none"),d=react.useRef(null),b=react.useRef(null),p=react.useRef(null),m=react.useRef("animation-wrapper-"),f=react.useCallback(e=>{d.current&&(d.current.playbackRate=e??1,d.current.play())},[d]),g=react.useCallback(e=>{b.current&&(b.current.playbackRate=e??1,b.current.play())},[b]),k=react.useCallback(()=>{e.current&&(e.current.style.opacity="1"),o.current&&(o.current.style.opacity="1")},[e]),v=react.useCallback(()=>{e.current&&(e.current.style.opacity="1"),o.current&&(o.current.style.opacity="0")},[e]),C=react.useCallback(e=>{e&&e.stopPropagation(),"shake"!==s.current&&v(),d.current&&(b.current?.cancel(),f(),d.current.finished.then(()=>{o.current&&k()}),o.current&&a?.current?.unobserve(o.current))},[v,f,k]),y=react.useCallback(()=>{k(),d.current&&d.current.cancel()},[k,d]),R=react.useCallback(e=>{e&&e.stopPropagation(),b.current&&(y(),g())},[b,y,g]),h=react.useCallback(()=>{if(b.current){if("zoom"===l.current){if(g(-1),!c)return;b.current.finished.then(()=>{clearTimeout(i.current),i.current=setTimeout(()=>{C()},100)});return}b.current.cancel(),c&&C()}},[g,c,C]),E=react.useCallback(()=>{if("desktop"===p.current);else if("tablet"===p.current)return r?.tablet??r?.desktop;else if("mobile"===p.current)return r?.mobile??r?.tablet??r?.desktop;return r?.desktop},[r?.desktop,r?.mobile,r?.tablet]),S=(e,r)=>e?.triggerConfig?.[r]?.animation??"none",L=react.useCallback(e=>{if("none"===s.current)return;let r=e?.triggerConfig?.appear?.setting?.[s.current];u(r.loop),d.current=n?.[s.current]?.(o.current,r)},[n]),T=react.useCallback(e=>{if("none"===l.current)return;let r=e?.triggerConfig?.hover?.setting?.[l.current];b.current=n?.[l.current]?.(o.current,r)},[n]),A=react.useCallback(()=>{d.current&&(d.current=null,o.current&&a.current?.unobserve(o.current)),b&&(b.current=null,o.current&&(o.current.removeEventListener("mouseenter",R),o.current.removeEventListener("mouseleave",h)))},[h,R]),P=react.useCallback(e=>{if(A(),o.current){if(!e?.enabled){k();return}s.current=S(e,"appear"),l.current=S(e,"hover"),"none"===s.current&&k(),"none"!==l.current&&"desktop"===p.current&&(T(e),o.current.addEventListener("mouseenter",R),o.current.addEventListener("mouseleave",h)),"none"!==s.current?(L(e),a.current=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>.1&&C()})},{root:null,rootMargin:"0px",threshold:[.1]}),a.current.observe(o.current)):k()}},[h,L,T,C,R,k,A]),w=react.useCallback(()=>{let e=document.querySelector("html");if(!o.current||!e)return;let r=new ResizeObserver(([e])=>{let r;let t=e?.target.getBoundingClientRect().width??0;r=t>=1024?"desktop":t>=768?"tablet":"mobile",p.current!==r&&(p.current=r,P(E()))});return r.observe(e),()=>r.disconnect()},[E,P]);return react.useEffect(()=>{setTimeout(()=>{if(r&&e.current)return m.current=`animation-wrapper-${Math.random().toString(36).substr(2,5)}`,e.current.setAttribute("data-animationid",m.current),Object.keys(TAGS_SELECTOR).includes(t)?o.current=document.querySelector(`[data-animationid='${m.current}'] ${TAGS_SELECTOR?.[t]??""}`):o.current=document.querySelector(`[data-animationid='${m.current}'] > :first-of-type:not(script,link)`),w()},100)},[w,r,t,e]),{initAnimation:P}};exports.useLivePageAnimation=useLivePageAnimation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devicesMapping as e}from"./constant.js";import{isColor as t,getSingleColorVariable as g}from"./colors.js";import{makeStyleResponsive as o}from"./make-style.js";let getStyleBackgroundByDevice=(e,t)=>e?{...getStyleBgColor(e),...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t),...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return o("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?t(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let g={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return o("bgi",g)},getBgImageByDevice=(e,t,g)=>{let o=e?.[t]?.type==="video";if(o)return;let i=e?.[t]?.image?.backupFileKey,a=g?.liquid&&i
|
|
1
|
+
import{devicesMapping as e}from"./constant.js";import{isColor as t,getSingleColorVariable as g}from"./colors.js";import{makeStyleResponsive as o}from"./make-style.js";let getStyleBackgroundByDevice=(e,t)=>e?{...getStyleBgColor(e),...t?.ignoreBackgroundImage?{}:{...getStyleBgImage(e,t),...getStyleBgPosition(e),...getStyleBgSize(e),...getStyleBgRepeat(e)},...t?.ignoreBgAttachment?{}:getStyleBgAttachment(e)}:{},getStyleBgColor=e=>{let t={desktop:getBgColorByDevice(e,"desktop"),tablet:getBgColorByDevice(e,"tablet"),mobile:getBgColorByDevice(e,"mobile")};return o("bgc",t)},getBgColorByDevice=(e,t)=>getColor(e?.[t]?.color),getColor=e=>e?t(e?.toString())?e:`var(--g-c-${e})`:void 0,getStyleBgImage=(e,t)=>{let g={desktop:getBgImageByDevice(e,"desktop",t),tablet:getBgImageByDevice(e,"tablet",t),mobile:getBgImageByDevice(e,"mobile",t)};return o("bgi",g)},getBgImageByDevice=(e,t,g)=>{let o=e?.[t]?.type==="video";if(o)return;let i=e?.[t]?.image?.backupFileKey,l=e?.[t]?.image?.storage,a=e?.[t]?.image?.src;if("FILE_CONTENT"===l&&g?.liquid&&i&&(a=`{{ "${i}" | file_url }}`),("THEME"===l||!l)&&g?.liquid&&i&&(a=`{{ "${i}" | asset_url }}`),"string"==typeof a)return`url(${a})`},getStyleBgPosition=e=>{let t={desktop:getBgPositionByDevice(e,"desktop"),tablet:getBgPositionByDevice(e,"tablet"),mobile:getBgPositionByDevice(e,"mobile")};return o("bgp",t)},getBgPositionByDevice=(e,t)=>{let g=e?.[t]?.position;return g&&`${g.x}% ${g.y}%`},getStyleBgSize=e=>{let t={desktop:getBgSizeByDevice(e,"desktop"),tablet:getBgSizeByDevice(e,"tablet"),mobile:getBgSizeByDevice(e,"mobile")};return o("bgs",t)},getBgSizeByDevice=(e,t)=>e?.[t]?.size,getStyleBgRepeat=e=>{let t={desktop:getBgRepeatByDevice(e,"desktop"),tablet:getBgRepeatByDevice(e,"tablet"),mobile:getBgRepeatByDevice(e,"mobile")};return o("bgr",t)},getBgRepeatByDevice=(e,t)=>e?.[t]?.repeat,getStyleBgAttachment=e=>{let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")};return o("bga",t)},getBgAttachmentByDevice=(e,t)=>e?.[t]?.attachment,composeBackgroundCss=e=>`${e?`background-color: ${g(e)} !important;`:void 0}`,makeFixedBgAttachment=e=>{if(!e)return;e.tablet=e.tablet?e.tablet:e.desktop,e.mobile=e.mobile?e.mobile:e.tablet;let t={desktop:getBgAttachmentByDevice(e,"desktop"),tablet:getBgAttachmentByDevice(e,"tablet"),mobile:getBgAttachmentByDevice(e,"mobile")},g={desktop:{...makeFixedBgAttachmentByDevice("desktop",t.desktop)},tablet:{...makeFixedBgAttachmentByDevice("tablet",t.tablet)},mobile:{...makeFixedBgAttachmentByDevice("mobile",t.mobile)}};return{wrapper:{...g.desktop?.wrapper,...g.tablet?.wrapper,...g.mobile?.wrapper},content:{...g.desktop?.content,...g.tablet?.content,...g.mobile?.content}}},makeFixedBgAttachmentByDevice=(t,g)=>{let o=e[t]??"";return"fixed"===g?{wrapper:{[`--pos${o}`]:"absolute",[`--top${o}`]:"0",[`--left${o}`]:"0",[`--w${o}`]:"100%",[`--h${o}`]:"100%"},content:{[`--pos${o}`]:"fixed",[`--w${o}`]:"100vw",[`--h${o}`]:"100vh",[`--bga${o}`]:"unset"}}:{wrapper:{[`--pos${o}`]:"absolute"},content:{[`--w${o}`]:"100%",[`--h${o}`]:"100%",[`--pos${o}`]:"absolute",[`--bga${o}`]:g}}},GRADIENT_BGR_KEY="linear-gradient",getGradientBgrStyleForButton=e=>{if(!e)return;let t={};return Object.keys(e).forEach(g=>{e[g]?.startsWith(GRADIENT_BGR_KEY)&&("normal"===g?Object.assign(t,{"--bg":e[g]}):Object.assign(t,{"--hvr-bg":e[g]}))}),t},getGradientBgrStyleByDevice=e=>{if(!e)return;let t={};return["desktop","tablet","mobile"].forEach(g=>{e[g]?.color?.includes(GRADIENT_BGR_KEY)&&Object.assign(t,{[`--bgc${"desktop"!==g?"-"+g:""}`]:"transparent",[`--bgi${"desktop"!==g?"-"+g:""}`]:`${getBgImageByDevice(e,g)||"url()"}, ${e[g]?.color}`})}),t};export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgImageByDevice,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getStyleBackgroundByDevice,makeFixedBgAttachment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState as e,useRef as r,useCallback as t,useEffect as n}from"react";import{animations as u}from"./animations.js";let TAGS_SELECTOR={Button:".gp-button-base",ProductButton:".gp-button-base",Sticky:"gp-sticky",Dialog:"div[role=dialog]",Icon:"div div",ProductTag:"div div div"},useLivePageAnimation=(c,o,i)=>{let a=u(),[l,s]=e(!1),d=r(void 0),p=r(void 0),m=r(null),g=r("none"),v=r("none"),b=r(null),f=r(null),y=r(null),k=r("animation-wrapper-"),h=t(e=>{b.current&&(b.current.playbackRate=e??1,b.current.play())},[b]),E=t(e=>{f.current&&(f.current.playbackRate=e??1,f.current.play())},[f]),S=t(()=>{c.current&&(c.current.style.opacity="1"),m.current&&(m.current.style.opacity="1")},[c]),T=t(()=>{c.current&&(c.current.style.opacity="1"),m.current&&(m.current.style.opacity="0")},[c]),L=t(e=>{e&&e.stopPropagation(),T(),b.current&&(f.current?.cancel(),h(),b.current.finished.then(()=>{m.current&&S()}),m.current&&d?.current?.unobserve(m.current))},[T,h,S]),
|
|
1
|
+
import{useState as e,useRef as r,useCallback as t,useEffect as n}from"react";import{animations as u}from"./animations.js";let TAGS_SELECTOR={Button:".gp-button-base",ProductButton:".gp-button-base",Carousel:".gp-carousel-wrapper",Sticky:"gp-sticky",Dialog:"div[role=dialog]",Icon:"div div",ProductTag:"div div div"},useLivePageAnimation=(c,o,i)=>{let a=u(),[l,s]=e(!1),d=r(void 0),p=r(void 0),m=r(null),g=r("none"),v=r("none"),b=r(null),f=r(null),y=r(null),k=r("animation-wrapper-"),h=t(e=>{b.current&&(b.current.playbackRate=e??1,b.current.play())},[b]),E=t(e=>{f.current&&(f.current.playbackRate=e??1,f.current.play())},[f]),S=t(()=>{c.current&&(c.current.style.opacity="1"),m.current&&(m.current.style.opacity="1")},[c]),T=t(()=>{c.current&&(c.current.style.opacity="1"),m.current&&(m.current.style.opacity="0")},[c]),L=t(e=>{e&&e.stopPropagation(),"shake"!==g.current&&T(),b.current&&(f.current?.cancel(),h(),b.current.finished.then(()=>{m.current&&S()}),m.current&&d?.current?.unobserve(m.current))},[T,h,S]),C=t(()=>{S(),b.current&&b.current.cancel()},[S,b]),R=t(e=>{e&&e.stopPropagation(),f.current&&(C(),E())},[f,C,E]),w=t(()=>{if(f.current){if("zoom"===v.current){if(E(-1),!l)return;f.current.finished.then(()=>{clearTimeout(p.current),p.current=setTimeout(()=>{L()},100)});return}f.current.cancel(),l&&L()}},[E,l,L]),A=t(()=>{if("desktop"===y.current);else if("tablet"===y.current)return o?.tablet??o?.desktop;else if("mobile"===y.current)return o?.mobile??o?.tablet??o?.desktop;return o?.desktop},[o?.desktop,o?.mobile,o?.tablet]),O=(e,r)=>e?.triggerConfig?.[r]?.animation??"none",P=t(e=>{if("none"===g.current)return;let r=e?.triggerConfig?.appear?.setting?.[g.current];s(r.loop),b.current=a?.[g.current]?.(m.current,r)},[a]),$=t(e=>{if("none"===v.current)return;let r=e?.triggerConfig?.hover?.setting?.[v.current];f.current=a?.[v.current]?.(m.current,r)},[a]),q=t(()=>{b.current&&(b.current=null,m.current&&d.current?.unobserve(m.current)),f&&(f.current=null,m.current&&(m.current.removeEventListener("mouseenter",R),m.current.removeEventListener("mouseleave",w)))},[w,R]),B=t(e=>{if(q(),m.current){if(!e?.enabled){S();return}g.current=O(e,"appear"),v.current=O(e,"hover"),"none"===g.current&&S(),"none"!==v.current&&"desktop"===y.current&&($(e),m.current.addEventListener("mouseenter",R),m.current.addEventListener("mouseleave",w)),"none"!==g.current?(P(e),d.current=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>.1&&L()})},{root:null,rootMargin:"0px",threshold:[.1]}),d.current.observe(m.current)):S()}},[w,P,$,L,R,S,q]),G=t(()=>{let e=document.querySelector("html");if(!m.current||!e)return;let r=new ResizeObserver(([e])=>{let r;let t=e?.target.getBoundingClientRect().width??0;r=t>=1024?"desktop":t>=768?"tablet":"mobile",y.current!==r&&(y.current=r,B(A()))});return r.observe(e),()=>r.disconnect()},[A,B]);return n(()=>{setTimeout(()=>{if(o&&c.current)return k.current=`animation-wrapper-${Math.random().toString(36).substr(2,5)}`,c.current.setAttribute("data-animationid",k.current),Object.keys(TAGS_SELECTOR).includes(i)?m.current=document.querySelector(`[data-animationid='${k.current}'] ${TAGS_SELECTOR?.[i]??""}`):m.current=document.querySelector(`[data-animationid='${k.current}'] > :first-of-type:not(script,link)`),G()},100)},[G,o,i,c]),{initAnimation:B}};export{useLivePageAnimation};
|
package/dist/types/index.d.ts
CHANGED