@streamscloud/embeddable 2.1.3 → 2.1.5

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.
@@ -3,12 +3,12 @@ import { Icon } from '../../ui/icon';
3
3
  import { MediaVolumeManager } from '../../ui/media-playback';
4
4
  import { default as ActionButton } from './action-button.svelte';
5
5
  import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte.js';
6
- import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg';
7
- import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg';
8
- import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg';
9
- import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg';
10
- import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg';
11
- import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg';
6
+ import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
7
+ import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
8
+ import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
9
+ import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg?raw';
10
+ import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg?raw';
11
+ import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg?raw';
12
12
  let { buffer, uiManager, localization, on } = $props();
13
13
  const toggleMuted = () => {
14
14
  MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
@@ -5,13 +5,13 @@ import { Icon } from '../../ui/icon';
5
5
  import { MediaVolumeManager } from '../../ui/media-playback';
6
6
  import { default as ActionButton } from './action-button.svelte';
7
7
  import { StreamPlayerLocalization } from './stream-player-localization.svelte';
8
- import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg';
9
- import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg';
10
- import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg';
11
- import IconFullScreenMaximize from '@fluentui/svg-icons/icons/full_screen_maximize_20_regular.svg';
12
- import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg';
13
- import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg';
14
- import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg';
8
+ import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
9
+ import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
10
+ import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
11
+ import IconFullScreenMaximize from '@fluentui/svg-icons/icons/full_screen_maximize_20_regular.svg?raw';
12
+ import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg?raw';
13
+ import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg?raw';
14
+ import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg?raw';
15
15
  let { buffer, uiManager, localization, on } = $props();
16
16
  const toggleMuted = () => {
17
17
  MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
@@ -7,7 +7,7 @@ import { ProportionalContainer } from '../../ui/proportional-container';
7
7
  import { TimeAgo } from '../../ui/time-ago';
8
8
  import { default as ActionButton } from './action-button.svelte';
9
9
  import { StreamPlayerLocalization } from './stream-player-localization.svelte';
10
- import IconPanelLeftText from '@fluentui/svg-icons/icons/panel_left_text_20_regular.svg';
10
+ import IconPanelLeftText from '@fluentui/svg-icons/icons/panel_left_text_20_regular.svg?raw';
11
11
  let { model, buffer, activePageId, on, uiManager, localization } = $props();
12
12
  </script>
13
13
 
@@ -13,20 +13,18 @@ const fillSvg = (node) => {
13
13
  };
14
14
  </script>
15
15
 
16
- <div style="display: contents">
17
- {#if src.startsWith('fa-')}
18
- <i class="{src} font-awesome-icon-to-replace"></i>
16
+ <div class="icon" style="display: contents"
17
+ class:icon--white={color === IconColor.White}
18
+ class:icon--text={color === IconColor.Text}
19
+ class:icon--gray={color === IconColor.Gray}
20
+ class:icon--green={color === IconColor.Green}
21
+ class:icon--red={color === IconColor.Red}
22
+ class:icon--orange={color === IconColor.Orange}
23
+ class:icon--blue={color === IconColor.Blue}>
24
+ {#if src.startsWith('<svg')}
25
+ {@html src}
19
26
  {:else}
20
- <svg
21
- class="icon"
22
- use:fillSvg
23
- class:icon--white={color === IconColor.White}
24
- class:icon--text={color === IconColor.Text}
25
- class:icon--gray={color === IconColor.Gray}
26
- class:icon--green={color === IconColor.Green}
27
- class:icon--red={color === IconColor.Red}
28
- class:icon--orange={color === IconColor.Orange}
29
- class:icon--blue={color === IconColor.Blue}></svg>
27
+ <svg use:fillSvg></svg>
30
28
  {/if}
31
29
  </div>
32
30
 
@@ -45,15 +43,6 @@ const fillSvg = (node) => {
45
43
  --_icon--color: var(--icon--color);
46
44
  --_icon--size: var(--icon--size, 1.25em);
47
45
  --_icon--stroke-width: var(--icon--stroke-width, 0);
48
- display: inline-block;
49
- color: inherit;
50
- fill: var(--_icon--color, currentColor);
51
- height: var(--_icon--size);
52
- min-height: var(--_icon--size);
53
- max-height: var(--_icon--size);
54
- width: var(--_icon--size);
55
- min-width: var(--_icon--size);
56
- max-width: var(--_icon--size);
57
46
  }
58
47
  .icon--white {
59
48
  --_icon--color: #ffffff;
@@ -97,6 +86,17 @@ const fillSvg = (node) => {
97
86
  :global([data-theme="dark"]) .icon--blue {
98
87
  --_icon--color: #91b3f3;
99
88
  }
89
+ .icon :global(svg) {
90
+ display: inline-block;
91
+ color: inherit;
92
+ fill: var(--_icon--color, currentColor);
93
+ height: var(--_icon--size);
94
+ min-height: var(--_icon--size);
95
+ max-height: var(--_icon--size);
96
+ width: var(--_icon--size);
97
+ min-width: var(--_icon--size);
98
+ max-width: var(--_icon--size);
99
+ }
100
100
  .icon :global(path) {
101
101
  stroke: var(--_icon--color);
102
102
  stroke-width: var(--_icon--stroke-width);
@@ -104,10 +104,4 @@ const fillSvg = (node) => {
104
104
  :global([data-theme="dark"]) .icon :global(path) {
105
105
  stroke: var(--_icon--color);
106
106
  stroke-width: var(--_icon--stroke-width);
107
- }
108
-
109
- .font-awesome-icon-to-replace {
110
- font-size: 1em;
111
- transform: scale(2);
112
- color: red;
113
107
  }</style>
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">import { Icon } from '../icon';
2
- import IconImage from '@fluentui/svg-icons/icons/image_20_regular.svg';
2
+ import IconImage from '@fluentui/svg-icons/icons/image_20_regular.svg?raw';
3
3
  </script>
4
4
 
5
5
  <div class="image-stub">
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">import { Icon } from '../icon';
2
2
  import { calculateImageState, ImageState } from './image-state';
3
- import IconImageOff from '@fluentui/svg-icons/icons/image_off_20_regular.svg';
3
+ import IconImageOff from '@fluentui/svg-icons/icons/image_off_20_regular.svg?raw';
4
4
  let { src, alt = '', showStubOnError = false, on, stub } = $props();
5
5
  let hasError = $state(false);
6
6
  const imageState = $derived(calculateImageState(src, hasError, showStubOnError));
@@ -12,10 +12,10 @@ import { Icon, IconColor } from '../icon';
12
12
  import { MediaVolumeManager, PlaybackManager } from '../media-playback';
13
13
  import { Progress } from '../progress';
14
14
  import { SeekBar } from '../seek-bar';
15
- import IconPause from '@fluentui/svg-icons/icons/pause_20_regular.svg';
16
- import IconPlay from '@fluentui/svg-icons/icons/play_20_regular.svg';
17
- import IconSpeaker from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg';
18
- import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg';
15
+ import IconPause from '@fluentui/svg-icons/icons/pause_20_regular.svg?raw';
16
+ import IconPlay from '@fluentui/svg-icons/icons/play_20_regular.svg?raw';
17
+ import IconSpeaker from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg?raw';
18
+ import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg?raw';
19
19
  import { onDestroy, onMount, untrack } from 'svelte';
20
20
  import { slide } from 'svelte/transition';
21
21
  let { src, poster, id = randomNanoid(), controls = true, autoplay = false, loop = false, inert = false, intersectionContainer, on } = $props();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "author": "StreamsCloud",
5
5
  "repository": "https://github.com/StreamsCloud/streamscloud-frontend-packages.git",
6
6
  "type": "module",