@flexiui/svelte-rich-text 0.0.38 → 0.0.40

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.
@@ -286,21 +286,23 @@
286
286
  window.removeEventListener("mousemove", onVolumeGrabMouseMove);
287
287
  window.removeEventListener("mouseup", onVolumeGrabMouseUp);
288
288
  }
289
+
290
+ const styleVars = [
291
+ bgColor && `--player-bg-color: ${bgColor};`,
292
+ playBtnBgColor && `--player-play-btn-bg: ${playBtnBgColor};`,
293
+ playBtnTextColor && `--player-play-btn-color: ${playBtnTextColor};`,
294
+ accentColor && `--player-primary-color: ${accentColor};`,
295
+ accentColorPaused && `--player-progress-default-bg: ${accentColorPaused};`,
296
+ textColor && `--player-text-color: ${textColor};`,
297
+ borderRadius && `--player-border-radius: ${borderRadius};`,
298
+ ].filter(Boolean).join('\n');
289
299
  </script>
290
300
 
291
301
  <div
292
302
  class="audio-player"
293
303
  {id}
294
304
  class:playing
295
- style={`
296
- --player-bg-color: ${bgColor};
297
- --player-play-btn-bg: ${playBtnBgColor};
298
- --player-play-btn-color: ${playBtnTextColor};
299
- --player-primary-color: ${accentColor};
300
- --player-progress-default-bg: ${accentColorPaused};
301
- --player-text-color: ${textColor};
302
- --player-border-radius: ${borderRadius};
303
- `}
305
+ style={styleVars}
304
306
  >
305
307
  <button
306
308
  onclick={() => togglePlayPause()}
@@ -502,7 +504,7 @@ style={`
502
504
  --player-seekbar-height: 6px;
503
505
  --player-progress-default-bg: #f5f5f5;
504
506
  --player-play-btn-bg: #8d8d8d26;
505
- --player-play-btn-color: #fff;
507
+ --player-play-btn-color: currentColor;
506
508
  --player-text-color: currentColor;
507
509
 
508
510
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexiui/svelte-rich-text",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "A lightweight and flexible rich text editor component for Svelte",
5
5
  "keywords": [
6
6
  "svelte",