@vocasync/astro 0.1.0 → 0.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/cli.js CHANGED
File without changes
@@ -110,11 +110,10 @@ const audioDataJson = audioEntry ? JSON.stringify({
110
110
  title="Play/Pause (Space)"
111
111
  >
112
112
  <svg class="vocasync-icon vocasync-icon--play" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
113
- <path d="M8 5v14l11-7z"/>
113
+ <path d="M6 4l15 8-15 8V4z"/>
114
114
  </svg>
115
- <svg class="vocasync-icon vocasync-icon--pause" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
116
- <rect x="6" y="4" width="4" height="16"/>
117
- <rect x="14" y="4" width="4" height="16"/>
115
+ <svg class="vocasync-icon vocasync-icon--pause vocasync-hidden" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
116
+ <path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/>
118
117
  </svg>
119
118
  </button>
120
119
 
@@ -152,12 +151,15 @@ const audioDataJson = audioEntry ? JSON.stringify({
152
151
  data-highlighting="on"
153
152
  title="Toggle highlighting (H)"
154
153
  >
155
- <svg class="vocasync-icon vocasync-icon--highlight-on" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
156
- <path d="M15.6 2.3L12 2l-3.6.3-.2.4L11 6h2l2.8-3.3-.2-.4zM2 22h20v-2H2v2zm1-3h18l-1.5-7.6-.5-.4h-14l-.5.4L3 19zm6-2H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-5-5h-1l-1-4h3l-1 4z"/>
154
+ <svg class="vocasync-icon vocasync-icon--highlight-on" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
155
+ <path d="M12 3v18"/>
156
+ <rect x="4" y="8" width="16" height="8" rx="1" fill="currentColor" opacity="0.3"/>
157
+ <path d="M8 12h8"/>
157
158
  </svg>
158
- <svg class="vocasync-icon vocasync-icon--highlight-off" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
159
- <path d="M15.6 2.3L12 2l-3.6.3-.2.4L11 6h2l2.8-3.3-.2-.4zM2 22h20v-2H2v2zm1-3h18l-1.5-7.6-.5-.4h-14l-.5.4L3 19zm6-2H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-5-5h-1l-1-4h3l-1 4z" opacity="0.3"/>
160
- <line x1="4" y1="4" x2="20" y2="20" stroke="currentColor" stroke-width="2"/>
159
+ <svg class="vocasync-icon vocasync-icon--highlight-off vocasync-hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
160
+ <path d="M12 3v18" opacity="0.3"/>
161
+ <rect x="4" y="8" width="16" height="8" rx="1" opacity="0.3"/>
162
+ <path d="M4 4l16 16"/>
161
163
  </svg>
162
164
  </button>
163
165
 
@@ -190,11 +192,15 @@ const audioDataJson = audioEntry ? JSON.stringify({
190
192
  data-action="mute"
191
193
  title="Toggle mute (M)"
192
194
  >
193
- <svg class="vocasync-icon vocasync-icon--volume-high" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
194
- <path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/>
195
+ <svg class="vocasync-icon vocasync-icon--volume-high" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
196
+ <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5" fill="currentColor"/>
197
+ <path d="M15.54 8.46a5 5 0 0 1 0 7.07"/>
198
+ <path d="M19.07 4.93a10 10 0 0 1 0 14.14"/>
195
199
  </svg>
196
- <svg class="vocasync-icon vocasync-icon--volume-mute" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
197
- <path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/>
200
+ <svg class="vocasync-icon vocasync-icon--volume-mute vocasync-hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
201
+ <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5" fill="currentColor" opacity="0.5"/>
202
+ <line x1="23" y1="9" x2="17" y2="15"/>
203
+ <line x1="17" y1="9" x2="23" y2="15"/>
198
204
  </svg>
199
205
  </button>
200
206
  <input
@@ -207,16 +213,23 @@ const audioDataJson = audioEntry ? JSON.stringify({
207
213
  data-action="volume"
208
214
  />
209
215
  </div>
216
+ </div>
217
+ </div>
218
+
219
+ <!-- Mini player (floating) -->
220
+ {enableMiniPlayer && (
221
+ <div class="vocasync-mini-player" data-mini-player hidden>
222
+ <button
223
+ type="button"
210
224
  class="vocasync-mini-player__play-btn"
211
225
  aria-label="Play"
212
226
  data-action="play-pause"
213
227
  >
214
228
  <svg class="vocasync-icon vocasync-icon--play" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
215
- <path d="M8 5v14l11-7z"/>
229
+ <path d="M6 4l15 8-15 8V4z"/>
216
230
  </svg>
217
- <svg class="vocasync-icon vocasync-icon--pause" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
218
- <rect x="6" y="4" width="4" height="16"/>
219
- <rect x="14" y="4" width="4" height="16"/>
231
+ <svg class="vocasync-icon vocasync-icon--pause vocasync-hidden" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
232
+ <path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/>
220
233
  </svg>
221
234
  </button>
222
235
  <div class="vocasync-mini-player__progress">
@@ -234,7 +247,8 @@ const audioDataJson = audioEntry ? JSON.stringify({
234
247
  </svg>
235
248
  </button>
236
249
  </div>
237
- )}
250
+ )}
251
+ </div>
238
252
 
239
253
  <style>
240
254
  /* ========================================
@@ -324,6 +338,10 @@ const audioDataJson = audioEntry ? JSON.stringify({
324
338
  height: 1.25rem;
325
339
  }
326
340
 
341
+ .vocasync-hidden {
342
+ display: none !important;
343
+ }
344
+
327
345
  /* Progress section */
328
346
  .vocasync-player__progress-section {
329
347
  display: flex;
@@ -465,6 +483,10 @@ const audioDataJson = audioEntry ? JSON.stringify({
465
483
  z-index: 10;
466
484
  }
467
485
 
486
+ .vocasync-player__speed-menu[hidden] {
487
+ display: none !important;
488
+ }
489
+
468
490
  .vocasync-player__speed-menu button {
469
491
  padding: 0.375rem 0.75rem;
470
492
  font-size: 0.75rem;
@@ -681,32 +703,40 @@ const audioDataJson = audioEntry ? JSON.stringify({
681
703
 
682
704
  // Update play/pause button icon
683
705
  function updatePlayButton(playing) {
684
- const playIcon = player.querySelector('.vocasync-icon--play');
685
- const pauseIcon = player.querySelector('.vocasync-icon--pause');
686
- if (playIcon && pauseIcon) {
687
- playIcon.hidden = playing;
688
- pauseIcon.hidden = !playing;
706
+ // Update main player play button
707
+ if (playBtn) {
708
+ const playIcon = playBtn.querySelector('.vocasync-icon--play');
709
+ const pauseIcon = playBtn.querySelector('.vocasync-icon--pause');
710
+ if (playIcon && pauseIcon) {
711
+ playIcon.classList.toggle('vocasync-hidden', playing);
712
+ pauseIcon.classList.toggle('vocasync-hidden', !playing);
713
+ }
689
714
  playBtn.setAttribute('aria-label', playing ? 'Pause' : 'Play');
690
715
  }
691
716
 
692
717
  // Update mini player too
693
718
  if (miniPlayer) {
694
- const miniPlayIcon = miniPlayer.querySelector('.vocasync-icon--play');
695
- const miniPauseIcon = miniPlayer.querySelector('.vocasync-icon--pause');
696
- if (miniPlayIcon && miniPauseIcon) {
697
- miniPlayIcon.hidden = playing;
698
- miniPauseIcon.hidden = !playing;
719
+ const miniPlayBtn = miniPlayer.querySelector('[data-action="play-pause"]');
720
+ if (miniPlayBtn) {
721
+ const miniPlayIcon = miniPlayBtn.querySelector('.vocasync-icon--play');
722
+ const miniPauseIcon = miniPlayBtn.querySelector('.vocasync-icon--pause');
723
+ if (miniPlayIcon && miniPauseIcon) {
724
+ miniPlayIcon.classList.toggle('vocasync-hidden', playing);
725
+ miniPauseIcon.classList.toggle('vocasync-hidden', !playing);
726
+ }
699
727
  }
700
728
  }
701
729
  }
702
730
 
703
731
  // Update volume icon
704
732
  function updateVolumeIcon(muted) {
705
- const highIcon = player.querySelector('.vocasync-icon--volume-high');
706
- const muteIcon = player.querySelector('.vocasync-icon--volume-mute');
707
- if (highIcon && muteIcon) {
708
- highIcon.hidden = muted;
709
- muteIcon.hidden = !muted;
733
+ if (muteBtn) {
734
+ const highIcon = muteBtn.querySelector('.vocasync-icon--volume-high');
735
+ const muteIcon = muteBtn.querySelector('.vocasync-icon--volume-mute');
736
+ if (highIcon && muteIcon) {
737
+ highIcon.classList.toggle('vocasync-hidden', muted);
738
+ muteIcon.classList.toggle('vocasync-hidden', !muted);
739
+ }
710
740
  }
711
741
  }
712
742
 
@@ -716,8 +746,8 @@ const audioDataJson = audioEntry ? JSON.stringify({
716
746
  const onIcon = highlightBtn.querySelector('.vocasync-icon--highlight-on');
717
747
  const offIcon = highlightBtn.querySelector('.vocasync-icon--highlight-off');
718
748
  if (onIcon && offIcon) {
719
- onIcon.hidden = !highlightingEnabled;
720
- offIcon.hidden = highlightingEnabled;
749
+ onIcon.classList.toggle('vocasync-hidden', !highlightingEnabled);
750
+ offIcon.classList.toggle('vocasync-hidden', highlightingEnabled);
721
751
  }
722
752
  highlightBtn.setAttribute('data-highlighting', highlightingEnabled ? 'on' : 'off');
723
753
  highlightBtn.setAttribute('aria-label', highlightingEnabled ? 'Disable word highlighting' : 'Enable word highlighting');
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@vocasync/astro",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "VocaSync integration for Astro - Text-to-speech synthesis and word-level alignment for static sites",
5
5
  "type": "module",
6
+ "types": "./dist/index.d.ts",
6
7
  "exports": {
7
8
  ".": {
8
9
  "types": "./dist/index.d.ts",
@@ -110,11 +110,10 @@ const audioDataJson = audioEntry ? JSON.stringify({
110
110
  title="Play/Pause (Space)"
111
111
  >
112
112
  <svg class="vocasync-icon vocasync-icon--play" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
113
- <path d="M8 5v14l11-7z"/>
113
+ <path d="M6 4l15 8-15 8V4z"/>
114
114
  </svg>
115
- <svg class="vocasync-icon vocasync-icon--pause" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
116
- <rect x="6" y="4" width="4" height="16"/>
117
- <rect x="14" y="4" width="4" height="16"/>
115
+ <svg class="vocasync-icon vocasync-icon--pause vocasync-hidden" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
116
+ <path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/>
118
117
  </svg>
119
118
  </button>
120
119
 
@@ -152,12 +151,15 @@ const audioDataJson = audioEntry ? JSON.stringify({
152
151
  data-highlighting="on"
153
152
  title="Toggle highlighting (H)"
154
153
  >
155
- <svg class="vocasync-icon vocasync-icon--highlight-on" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
156
- <path d="M15.6 2.3L12 2l-3.6.3-.2.4L11 6h2l2.8-3.3-.2-.4zM2 22h20v-2H2v2zm1-3h18l-1.5-7.6-.5-.4h-14l-.5.4L3 19zm6-2H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-5-5h-1l-1-4h3l-1 4z"/>
154
+ <svg class="vocasync-icon vocasync-icon--highlight-on" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
155
+ <path d="M12 3v18"/>
156
+ <rect x="4" y="8" width="16" height="8" rx="1" fill="currentColor" opacity="0.3"/>
157
+ <path d="M8 12h8"/>
157
158
  </svg>
158
- <svg class="vocasync-icon vocasync-icon--highlight-off" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
159
- <path d="M15.6 2.3L12 2l-3.6.3-.2.4L11 6h2l2.8-3.3-.2-.4zM2 22h20v-2H2v2zm1-3h18l-1.5-7.6-.5-.4h-14l-.5.4L3 19zm6-2H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-5-5h-1l-1-4h3l-1 4z" opacity="0.3"/>
160
- <line x1="4" y1="4" x2="20" y2="20" stroke="currentColor" stroke-width="2"/>
159
+ <svg class="vocasync-icon vocasync-icon--highlight-off vocasync-hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
160
+ <path d="M12 3v18" opacity="0.3"/>
161
+ <rect x="4" y="8" width="16" height="8" rx="1" opacity="0.3"/>
162
+ <path d="M4 4l16 16"/>
161
163
  </svg>
162
164
  </button>
163
165
 
@@ -190,11 +192,15 @@ const audioDataJson = audioEntry ? JSON.stringify({
190
192
  data-action="mute"
191
193
  title="Toggle mute (M)"
192
194
  >
193
- <svg class="vocasync-icon vocasync-icon--volume-high" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
194
- <path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/>
195
+ <svg class="vocasync-icon vocasync-icon--volume-high" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
196
+ <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5" fill="currentColor"/>
197
+ <path d="M15.54 8.46a5 5 0 0 1 0 7.07"/>
198
+ <path d="M19.07 4.93a10 10 0 0 1 0 14.14"/>
195
199
  </svg>
196
- <svg class="vocasync-icon vocasync-icon--volume-mute" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
197
- <path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/>
200
+ <svg class="vocasync-icon vocasync-icon--volume-mute vocasync-hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
201
+ <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5" fill="currentColor" opacity="0.5"/>
202
+ <line x1="23" y1="9" x2="17" y2="15"/>
203
+ <line x1="17" y1="9" x2="23" y2="15"/>
198
204
  </svg>
199
205
  </button>
200
206
  <input
@@ -207,16 +213,23 @@ const audioDataJson = audioEntry ? JSON.stringify({
207
213
  data-action="volume"
208
214
  />
209
215
  </div>
216
+ </div>
217
+ </div>
218
+
219
+ <!-- Mini player (floating) -->
220
+ {enableMiniPlayer && (
221
+ <div class="vocasync-mini-player" data-mini-player hidden>
222
+ <button
223
+ type="button"
210
224
  class="vocasync-mini-player__play-btn"
211
225
  aria-label="Play"
212
226
  data-action="play-pause"
213
227
  >
214
228
  <svg class="vocasync-icon vocasync-icon--play" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
215
- <path d="M8 5v14l11-7z"/>
229
+ <path d="M6 4l15 8-15 8V4z"/>
216
230
  </svg>
217
- <svg class="vocasync-icon vocasync-icon--pause" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" hidden>
218
- <rect x="6" y="4" width="4" height="16"/>
219
- <rect x="14" y="4" width="4" height="16"/>
231
+ <svg class="vocasync-icon vocasync-icon--pause vocasync-hidden" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
232
+ <path d="M6 4h4v16H6V4zm8 0h4v16h-4V4z"/>
220
233
  </svg>
221
234
  </button>
222
235
  <div class="vocasync-mini-player__progress">
@@ -234,7 +247,8 @@ const audioDataJson = audioEntry ? JSON.stringify({
234
247
  </svg>
235
248
  </button>
236
249
  </div>
237
- )}
250
+ )}
251
+ </div>
238
252
 
239
253
  <style>
240
254
  /* ========================================
@@ -324,6 +338,10 @@ const audioDataJson = audioEntry ? JSON.stringify({
324
338
  height: 1.25rem;
325
339
  }
326
340
 
341
+ .vocasync-hidden {
342
+ display: none !important;
343
+ }
344
+
327
345
  /* Progress section */
328
346
  .vocasync-player__progress-section {
329
347
  display: flex;
@@ -465,6 +483,10 @@ const audioDataJson = audioEntry ? JSON.stringify({
465
483
  z-index: 10;
466
484
  }
467
485
 
486
+ .vocasync-player__speed-menu[hidden] {
487
+ display: none !important;
488
+ }
489
+
468
490
  .vocasync-player__speed-menu button {
469
491
  padding: 0.375rem 0.75rem;
470
492
  font-size: 0.75rem;
@@ -681,32 +703,40 @@ const audioDataJson = audioEntry ? JSON.stringify({
681
703
 
682
704
  // Update play/pause button icon
683
705
  function updatePlayButton(playing) {
684
- const playIcon = player.querySelector('.vocasync-icon--play');
685
- const pauseIcon = player.querySelector('.vocasync-icon--pause');
686
- if (playIcon && pauseIcon) {
687
- playIcon.hidden = playing;
688
- pauseIcon.hidden = !playing;
706
+ // Update main player play button
707
+ if (playBtn) {
708
+ const playIcon = playBtn.querySelector('.vocasync-icon--play');
709
+ const pauseIcon = playBtn.querySelector('.vocasync-icon--pause');
710
+ if (playIcon && pauseIcon) {
711
+ playIcon.classList.toggle('vocasync-hidden', playing);
712
+ pauseIcon.classList.toggle('vocasync-hidden', !playing);
713
+ }
689
714
  playBtn.setAttribute('aria-label', playing ? 'Pause' : 'Play');
690
715
  }
691
716
 
692
717
  // Update mini player too
693
718
  if (miniPlayer) {
694
- const miniPlayIcon = miniPlayer.querySelector('.vocasync-icon--play');
695
- const miniPauseIcon = miniPlayer.querySelector('.vocasync-icon--pause');
696
- if (miniPlayIcon && miniPauseIcon) {
697
- miniPlayIcon.hidden = playing;
698
- miniPauseIcon.hidden = !playing;
719
+ const miniPlayBtn = miniPlayer.querySelector('[data-action="play-pause"]');
720
+ if (miniPlayBtn) {
721
+ const miniPlayIcon = miniPlayBtn.querySelector('.vocasync-icon--play');
722
+ const miniPauseIcon = miniPlayBtn.querySelector('.vocasync-icon--pause');
723
+ if (miniPlayIcon && miniPauseIcon) {
724
+ miniPlayIcon.classList.toggle('vocasync-hidden', playing);
725
+ miniPauseIcon.classList.toggle('vocasync-hidden', !playing);
726
+ }
699
727
  }
700
728
  }
701
729
  }
702
730
 
703
731
  // Update volume icon
704
732
  function updateVolumeIcon(muted) {
705
- const highIcon = player.querySelector('.vocasync-icon--volume-high');
706
- const muteIcon = player.querySelector('.vocasync-icon--volume-mute');
707
- if (highIcon && muteIcon) {
708
- highIcon.hidden = muted;
709
- muteIcon.hidden = !muted;
733
+ if (muteBtn) {
734
+ const highIcon = muteBtn.querySelector('.vocasync-icon--volume-high');
735
+ const muteIcon = muteBtn.querySelector('.vocasync-icon--volume-mute');
736
+ if (highIcon && muteIcon) {
737
+ highIcon.classList.toggle('vocasync-hidden', muted);
738
+ muteIcon.classList.toggle('vocasync-hidden', !muted);
739
+ }
710
740
  }
711
741
  }
712
742
 
@@ -716,8 +746,8 @@ const audioDataJson = audioEntry ? JSON.stringify({
716
746
  const onIcon = highlightBtn.querySelector('.vocasync-icon--highlight-on');
717
747
  const offIcon = highlightBtn.querySelector('.vocasync-icon--highlight-off');
718
748
  if (onIcon && offIcon) {
719
- onIcon.hidden = !highlightingEnabled;
720
- offIcon.hidden = highlightingEnabled;
749
+ onIcon.classList.toggle('vocasync-hidden', !highlightingEnabled);
750
+ offIcon.classList.toggle('vocasync-hidden', highlightingEnabled);
721
751
  }
722
752
  highlightBtn.setAttribute('data-highlighting', highlightingEnabled ? 'on' : 'off');
723
753
  highlightBtn.setAttribute('aria-label', highlightingEnabled ? 'Disable word highlighting' : 'Enable word highlighting');