react-modern-audio-player 1.1.1 → 1.1.2

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/dist/index.cjs CHANGED
@@ -420,7 +420,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
420
420
  left: ${e==="right"?`${t.width}px`:void 0};
421
421
  right: ${e==="left"?`${t.width}px`:void 0};
422
422
  `}
423
- `,xd=({children:e})=>L("div",{className:"dropdown-trigger-wrapper",children:e});gt.Content=wd;gt.Trigger=xd;const Pd=()=>{const e=x.useRef(null),{activeUI:{volumeSlider:t}}=j(Z),[r,n]=x.useState("bottom");return x.useEffect(()=>{e.current&&n((()=>e.current.getBoundingClientRect().top<window.innerHeight/2?"bottom":"top")())},[e.current]),le(gt,{placement:r,triggerType:"hover",disabled:t,children:[L(gt.Trigger,{children:L(So,{ref:e})}),L(gt.Content,{children:L(bd,{placement:r})})]})},Ad=()=>{var r,n,a,i,s,o,l,h,p,$,b,v,P,A,k,C;const{interfacePlacement:e,activeUI:t}=j(Z);return le(ze,{children:[L(ge.Item,{gridArea:((r=e==null?void 0:e.itemCustomArea)==null?void 0:r.progress)||((n=e==null?void 0:e.templateArea)==null?void 0:n.progress)||pe.templateArea.progress,width:"100%",visible:Boolean(t.progress!==void 0?t.progress:t.all),children:L(gd,{})}),L(ge.Item,{gridArea:((a=e==null?void 0:e.itemCustomArea)==null?void 0:a.repeatType)||((i=e==null?void 0:e.templateArea)==null?void 0:i.repeatType)||pe.templateArea.repeatType,visible:Boolean((s=t.repeatType)!=null?s:t.all),children:L(Bf,{})}),L(ge.Item,{gridArea:((o=e==null?void 0:e.itemCustomArea)==null?void 0:o.playButton)||((l=e==null?void 0:e.templateArea)==null?void 0:l.playButton)||pe.templateArea.playButton,visible:Boolean((h=t.playButton)!=null?h:t.all),children:le(jn,{UNSAFE_className:"btn-wrapper",alignItems:"center",gap:"10px",children:[L(Ea,{type:"prev",visible:Boolean((p=t.prevNnext)!=null?p:t.all)}),L(kf,{}),L(Ea,{type:"next",visible:Boolean(($=t.prevNnext)!=null?$:t.all)})]})}),L(ge.Item,{gridArea:((b=e==null?void 0:e.itemCustomArea)==null?void 0:b.volume)||((v=e==null?void 0:e.templateArea)==null?void 0:v.volume)||pe.templateArea.volume,visible:Boolean((P=t.volume)!=null?P:t.all),children:L(Pd,{})}),L(ge.Item,{gridArea:((A=e==null?void 0:e.itemCustomArea)==null?void 0:A.playList)||((k=e==null?void 0:e.templateArea)==null?void 0:k.playList)||pe.templateArea.playList,visible:Boolean((C=t.playList)!=null?C:t.all),children:L(cd,{})})]})},Td=ae.default.div`
423
+ `,xd=({children:e})=>L("div",{className:"dropdown-trigger-wrapper",children:e});gt.Content=wd;gt.Trigger=xd;const Pd=()=>{const e=x.useRef(null),{activeUI:{volumeSlider:t}}=j(Z),[r,n]=x.useState("bottom");return x.useEffect(()=>{e.current&&n((()=>e.current.getBoundingClientRect().top<window.innerHeight/2?"bottom":"top")())},[e.current]),le(gt,{placement:r,triggerType:"hover",disabled:!t,children:[L(gt.Trigger,{children:L(So,{ref:e})}),L(gt.Content,{children:L(bd,{placement:r})})]})},Ad=()=>{var r,n,a,i,s,o,l,h,p,$,b,v,P,A,k,C;const{interfacePlacement:e,activeUI:t}=j(Z);return le(ze,{children:[L(ge.Item,{gridArea:((r=e==null?void 0:e.itemCustomArea)==null?void 0:r.progress)||((n=e==null?void 0:e.templateArea)==null?void 0:n.progress)||pe.templateArea.progress,width:"100%",visible:Boolean(t.progress!==void 0?t.progress:t.all),children:L(gd,{})}),L(ge.Item,{gridArea:((a=e==null?void 0:e.itemCustomArea)==null?void 0:a.repeatType)||((i=e==null?void 0:e.templateArea)==null?void 0:i.repeatType)||pe.templateArea.repeatType,visible:Boolean((s=t.repeatType)!=null?s:t.all),children:L(Bf,{})}),L(ge.Item,{gridArea:((o=e==null?void 0:e.itemCustomArea)==null?void 0:o.playButton)||((l=e==null?void 0:e.templateArea)==null?void 0:l.playButton)||pe.templateArea.playButton,visible:Boolean((h=t.playButton)!=null?h:t.all),children:le(jn,{UNSAFE_className:"btn-wrapper",alignItems:"center",gap:"10px",children:[L(Ea,{type:"prev",visible:Boolean((p=t.prevNnext)!=null?p:t.all)}),L(kf,{}),L(Ea,{type:"next",visible:Boolean(($=t.prevNnext)!=null?$:t.all)})]})}),L(ge.Item,{gridArea:((b=e==null?void 0:e.itemCustomArea)==null?void 0:b.volume)||((v=e==null?void 0:e.templateArea)==null?void 0:v.volume)||pe.templateArea.volume,visible:Boolean((P=t.volume)!=null?P:t.all),children:L(Pd,{})}),L(ge.Item,{gridArea:((A=e==null?void 0:e.itemCustomArea)==null?void 0:A.playList)||((k=e==null?void 0:e.templateArea)==null?void 0:k.playList)||pe.templateArea.playList,visible:Boolean((C=t.playList)!=null?C:t.all),children:L(cd,{})})]})},Td=ae.default.div`
424
424
  display: flex;
425
425
  align-items: center;
426
426
  width: 100%;
package/dist/index.es.js CHANGED
@@ -14420,7 +14420,7 @@ const Volume = () => {
14420
14420
  return /* @__PURE__ */ jsxs(Dropdown, {
14421
14421
  placement: volumeSliderPlacement,
14422
14422
  triggerType: "hover",
14423
- disabled: volumeSlider,
14423
+ disabled: !volumeSlider,
14424
14424
  children: [/* @__PURE__ */ jsx(Dropdown.Trigger, {
14425
14425
  children: /* @__PURE__ */ jsx(VolumeTriggerBtn, {
14426
14426
  ref: triggerRef
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-modern-audio-player",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "homepage": "https://github.com/slash9494/react-modern-audio-player/",
5
5
  "module": "dist/index.es.js",
6
6
  "main": "dist/index.cjs",
@@ -16,8 +16,7 @@
16
16
  "scripts": {
17
17
  "dev": "vite --host",
18
18
  "build": "rm -rf dist && tsc && vite build",
19
- "preview": "vite preview",
20
- "publish": "npm publish --access public"
19
+ "preview": "vite preview"
21
20
  },
22
21
  "peerDependencies": {
23
22
  "react": ">=16.8.0",