@axium/client 0.24.0 → 0.24.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.
Files changed (2) hide show
  1. package/lib/Audio.svelte +25 -11
  2. package/package.json +1 -1
package/lib/Audio.svelte CHANGED
@@ -28,7 +28,7 @@
28
28
  const media = new MediaState();
29
29
  </script>
30
30
 
31
- <div onkeydown={media.keydown}>
31
+ <div class="Audio" onkeydown={media.keydown}>
32
32
  {#if showCover}
33
33
  <div class="audio-cover" onclick={media.click}>
34
34
  {#if picture}
@@ -52,9 +52,11 @@
52
52
  ></audio>
53
53
  <MediaControls {media}>
54
54
  {#if extraControls}{@render extraControls()}{/if}
55
- <button class="reset icon-text" command="show-modal" commandfor="{id}:audio-info">
56
- <Icon i="regular/circle-info" />
57
- </button>
55
+ {#if audioInfo.some(([, value]) => !!value)}
56
+ <button class="reset icon-text" command="show-modal" commandfor="{id}:audio-info">
57
+ <Icon i="regular/circle-info" />
58
+ </button>
59
+ {/if}
58
60
  </MediaControls>
59
61
  </div>
60
62
 
@@ -73,9 +75,22 @@
73
75
  </dialog>
74
76
 
75
77
  <style>
78
+ .Audio {
79
+ display: flex;
80
+ flex-direction: column;
81
+ align-items: center;
82
+ width: 100%;
83
+ max-width: 512px;
84
+
85
+ :global(.MediaControls) {
86
+ width: 100%;
87
+ margin-top: 1em;
88
+ }
89
+ }
90
+
76
91
  .audio-cover {
77
- width: 512px;
78
- height: 512px;
92
+ width: 100%;
93
+ aspect-ratio: 1/1;
79
94
  background-color: var(--bg-alt);
80
95
  border-radius: 1em;
81
96
  display: flex;
@@ -83,13 +98,12 @@
83
98
  gap: 1em;
84
99
  align-items: center;
85
100
  justify-content: center;
101
+ overflow: hidden;
86
102
 
87
103
  img {
88
- border-radius: 1em;
89
- }
90
-
91
- :global(.MediaControls) {
92
- width: 512px;
104
+ width: 100%;
105
+ height: 100%;
106
+ object-fit: scale-down;
93
107
  }
94
108
  }
95
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/client",
3
- "version": "0.24.0",
3
+ "version": "0.24.2",
4
4
  "author": "James Prevett <jp@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",