@streamscloud/embeddable 12.1.0 → 12.2.0

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 (93) hide show
  1. package/dist/ads/ad-card/cmp.ad-card.svelte +4 -16
  2. package/dist/content-player/cmp.content-player.svelte +1 -1
  3. package/dist/content-player/content-player-config.svelte.d.ts +1 -0
  4. package/dist/content-player/content-player-settings.js +1 -0
  5. package/dist/content-player/controls-and-attachments.svelte +32 -2
  6. package/dist/content-player/controls-and-attachments.svelte.d.ts +1 -0
  7. package/dist/content-player/overview-panel.svelte +2 -2
  8. package/dist/content-player/ui-manager.svelte.d.ts +2 -1
  9. package/dist/content-player/ui-manager.svelte.js +2 -1
  10. package/dist/core/enums.d.ts +3 -0
  11. package/dist/core/enums.js +4 -0
  12. package/dist/core/theme/index.d.ts +1 -0
  13. package/dist/core/theme/index.js +1 -0
  14. package/dist/core/theme/theme-store.svelte.d.ts +5 -0
  15. package/dist/core/theme/theme-store.svelte.js +10 -0
  16. package/dist/media-center/media-center/cmp.media-center-proxy.svelte +59 -0
  17. package/dist/media-center/media-center/cmp.media-center-proxy.svelte.d.ts +12 -0
  18. package/dist/media-center/media-center/discover/discover-header.svelte +10 -13
  19. package/dist/media-center/media-center/discover/discover-header.svelte.d.ts +0 -2
  20. package/dist/media-center/media-center/discover/discover-view.svelte +6 -6
  21. package/dist/media-center/media-center/discover/discover-view.svelte.d.ts +0 -2
  22. package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +2 -0
  23. package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.js +20 -1
  24. package/dist/media-center/media-center/header-footer/media-center-footer.svelte +5 -5
  25. package/dist/media-center/media-center/header-footer/media-center-header-mobile.svelte +5 -4
  26. package/dist/media-center/media-center/header-footer/media-center-header.svelte +6 -8
  27. package/dist/media-center/media-center/header-footer/media-center-header.svelte.d.ts +0 -2
  28. package/dist/media-center/media-center/index.d.ts +1 -1
  29. package/dist/media-center/media-center/index.js +1 -1
  30. package/dist/media-center/media-center/media-center-context.svelte.d.ts +3 -13
  31. package/dist/media-center/media-center/media-center-context.svelte.js +11 -7
  32. package/dist/media-center/media-center/{cmp.media-center.svelte → media-center-view.svelte} +56 -107
  33. package/dist/media-center/media-center/media-center-view.svelte.d.ts +7 -0
  34. package/dist/media-center/media-center/menu/menu.svelte +27 -23
  35. package/dist/media-center/media-center/menu/menu.svelte.d.ts +0 -2
  36. package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +7 -3
  37. package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +2 -3
  38. package/dist/media-center/media-center/types.d.ts +1 -8
  39. package/dist/media-page/cmp.media-page.svelte +39 -0
  40. package/dist/media-page/cmp.media-page.svelte.d.ts +10 -0
  41. package/dist/media-page/index.d.ts +2 -0
  42. package/dist/media-page/index.js +3 -2
  43. package/dist/posts/attachments/cmp.attachments.svelte +1 -1
  44. package/dist/posts/controls/cmp.controls.svelte +4 -1
  45. package/dist/posts/controls/cmp.controls.svelte.d.ts +2 -0
  46. package/dist/posts/post-viewer/attachments-horizontal.svelte +4 -12
  47. package/dist/posts/post-viewer/heading.svelte +4 -4
  48. package/dist/posts/post-viewer/media/post-media.svelte +1 -1
  49. package/dist/posts/post-viewer/post-texts.svelte +2 -2
  50. package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +1 -0
  51. package/dist/posts/posts-player/index.d.ts +1 -0
  52. package/dist/posts/posts-player/index.js +2 -2
  53. package/dist/posts/posts-player/posts-player-proxy.svelte +13 -4
  54. package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +1 -0
  55. package/dist/products/product-card/cmp.product-card.svelte +4 -16
  56. package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +6 -6
  57. package/dist/streams/data-loaders/streams-loader.js +6 -2
  58. package/dist/streams/stream-card/cmp.stream-card.svelte +1 -1
  59. package/dist/streams/streams-player/cmp.streams-player.svelte +42 -0
  60. package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +24 -0
  61. package/dist/streams/streams-player/index.d.ts +1 -0
  62. package/dist/streams/streams-player/index.js +5 -5
  63. package/dist/streams/streams-player/stream-overview.svelte +1 -1
  64. package/dist/streams/streams-player/streams-player-proxy.svelte +32 -0
  65. package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +26 -0
  66. package/dist/ui/button/resources/button-theme.svelte +0 -151
  67. package/dist/ui/button/resources/button-types.d.ts +0 -1
  68. package/dist/ui/button/resources/button-types.js +0 -1
  69. package/dist/ui/icon/cmp.icon.svelte +8 -28
  70. package/dist/ui/image/cmp.image-rounded.svelte +3 -10
  71. package/dist/ui/image/cmp.image-stub.svelte +1 -4
  72. package/dist/ui/image/cmp.image.svelte +1 -4
  73. package/dist/ui/loading/cmp.loading.svelte +1 -4
  74. package/dist/ui/player/button/cmp.mobile-player-buttons-group.svelte +2 -2
  75. package/dist/ui/player/button/cmp.mobile-player-buttons-group.svelte.d.ts +2 -2
  76. package/dist/ui/player/button/cmp.player-button.svelte +7 -3
  77. package/dist/ui/player/button/cmp.player-buttons-group.svelte +4 -3
  78. package/dist/ui/player/button/cmp.player-buttons-group.svelte.d.ts +2 -2
  79. package/dist/ui/player/button/index.d.ts +1 -1
  80. package/dist/ui/player/button/types.d.ts +1 -1
  81. package/dist/ui/player/colors/player-colors.d.ts +1 -0
  82. package/dist/ui/shadow-dom/cmp.shadow-root.svelte +156 -0
  83. package/dist/ui/shadow-dom/colors.scss +72 -0
  84. package/dist/ui/shadow-dom/index.d.ts +1 -0
  85. package/dist/ui/shadow-dom/index.js +1 -0
  86. package/dist/ui/shadow-dom/shadow-root-service.js +0 -4
  87. package/dist/ui/slider/cmp.slider.svelte +5 -5
  88. package/package.json +1 -1
  89. package/dist/media-center/media-center/cmp.media-center.svelte.d.ts +0 -4
  90. package/dist/ui/with-background/cmp.with-background.svelte +0 -86
  91. package/dist/ui/with-background/index.d.ts +0 -1
  92. package/dist/ui/with-background/index.js +0 -1
  93. /package/dist/ui/{with-background/cmp.with-background.svelte.d.ts → shadow-dom/cmp.shadow-root.svelte.d.ts} +0 -0
@@ -6,7 +6,6 @@ export var ButtonStyle;
6
6
  ButtonStyle["White"] = "white";
7
7
  ButtonStyle["Gray"] = "gray";
8
8
  ButtonStyle["Green"] = "green";
9
- ButtonStyle["Black"] = "black";
10
9
  ButtonStyle["TextOnly"] = "text-only";
11
10
  ButtonStyle["TransparentSuccess"] = "transparent-success";
12
11
  ButtonStyle["TransparentPrimary"] = "transparent-primary";
@@ -32,50 +32,30 @@ let { src, color = null } = $props();
32
32
  --_icon--size: var(--icon--size, 1.25em);
33
33
  --_icon--stroke-color: var(--icon--stroke-color);
34
34
  --_icon--stroke-width: var(--icon--stroke-width, 0);
35
+ /*--_icon--filter: drop-shadow(1px 1px 0 rgb(from var(--_icon--color) calc(255 - r) calc(255 - g) calc(255 - b) / 90%));*/
35
36
  --_icon--filter: var(--icon--filter, none);
36
37
  display: contents;
37
38
  }
38
39
  .icon--white {
39
- --_icon--color: #ffffff;
40
- }
41
- :global([data-theme="dark"]) .icon--white {
42
- --_icon--color: #ffffff;
40
+ --_icon--color: var(--sc-mc-color--icon-overlay);
43
41
  }
44
42
  .icon--text {
45
- --_icon--color: #2e2e2e;
46
- }
47
- :global([data-theme="dark"]) .icon--text {
48
- --_icon--color: #ffffff;
43
+ --_icon--color: var(--sc-mc-color--text-primary);
49
44
  }
50
45
  .icon--gray {
51
- --_icon--color: #6b7280;
52
- }
53
- :global([data-theme="dark"]) .icon--gray {
54
- --_icon--color: #6b7280;
46
+ --_icon--color: var(--sc-mc-color--icon-secondary);
55
47
  }
56
48
  .icon--green {
57
- --_icon--color: #0cce6b;
58
- }
59
- :global([data-theme="dark"]) .icon--green {
60
- --_icon--color: #0cce6b;
49
+ --_icon--color: var(--sc-mc-color--icon-success);
61
50
  }
62
51
  .icon--red {
63
- --_icon--color: #e71d36;
64
- }
65
- :global([data-theme="dark"]) .icon--red {
66
- --_icon--color: #e71d36;
52
+ --_icon--color: var(--sc-mc-color--icon-destructive);
67
53
  }
68
54
  .icon--orange {
69
- --_icon--color: #ffa62b;
70
- }
71
- :global([data-theme="dark"]) .icon--orange {
72
- --_icon--color: #ffa62b;
55
+ --_icon--color: var(--sc-mc-color--icon-warning);
73
56
  }
74
57
  .icon--blue {
75
- --_icon--color: #144ab0;
76
- }
77
- :global([data-theme="dark"]) .icon--blue {
78
- --_icon--color: #91b3f3;
58
+ --_icon--color: var(--sc-mc-color--icon-brand);
79
59
  }
80
60
  .icon :global(svg) {
81
61
  display: inline-block;
@@ -27,19 +27,16 @@ let { src, alt = '', noBorders = false, on } = $props();
27
27
  --image--rounded--image--border-radius,
28
28
  calc(var(--image--rounded--inner--border-radius_) - var(--image--rounded--inner--border-width_))
29
29
  );
30
- --image--rounded--inner--border-color_: var(--image--rounded--inner--border-color, #ffffff);
30
+ --image--rounded--inner--border-color_: var(--image--rounded--inner--border-color, var(--sc-mc-color--bg-card));
31
31
  --image--rounded--inner--border-radius_: var(
32
32
  --image--rounded--inner--border-radius,
33
33
  calc(var(--image--rounded--outer--border-radius_) - var(--image--rounded--outer--border-width_))
34
34
  );
35
35
  --image--rounded--inner--border-width_: var(--image--rounded--inner--border-width, 4px);
36
- --image--rounded--outer--border-color_: var(
37
- --image--rounded--outer--border-color,
38
- linear-gradient(#144ab0, #dfe9fb)
39
- );
36
+ --image--rounded--outer--border-color_: var(--image--rounded--outer--border-color, var(--sc-mc-color--bg-card));
40
37
  --image--rounded--outer--border-radius_: var(--image--rounded--outer--border-radius, 0);
41
38
  --image--rounded--outer--border-width_: var(--image--rounded--outer--border-width, 2px);
42
- --image--rounded--stub--background_: var(--image--rounded--stub--background, #f3f4f6);
39
+ --image--rounded--stub--background_: var(--image--rounded--stub--background, var(--sc-mc-color--bg-image));
43
40
  width: var(--image--rounded--width_);
44
41
  height: var(--image--rounded--height_);
45
42
  border-radius: var(--image--rounded--outer--border-radius_);
@@ -47,10 +44,6 @@ let { src, alt = '', noBorders = false, on } = $props();
47
44
  background: var(--image--rounded--outer--border-color_);
48
45
  overflow: hidden;
49
46
  }
50
- :global([data-theme="dark"]) .rounded-img {
51
- --image--rounded--inner--border-color_: var(--image--rounded--inner--border-color, #000000);
52
- --image--rounded--stub--background_: var(--image--rounded--stub--background, #374151);
53
- }
54
47
  .rounded-img--stub {
55
48
  background: var(--image--rounded--stub--background_);
56
49
  }
@@ -18,7 +18,7 @@ import IconImage from '@fluentui/svg-icons/icons/image_20_regular.svg?raw';
18
18
  }
19
19
  }
20
20
  .image-stub {
21
- --_image-stub--color: var(--image-stub--color, #d1d5db);
21
+ --_image-stub--color: var(--image-stub--color, var(--sc-mc-color--bg-image));
22
22
  width: 100%;
23
23
  height: 100%;
24
24
  z-index: 2;
@@ -28,7 +28,4 @@ import IconImage from '@fluentui/svg-icons/icons/image_20_regular.svg?raw';
28
28
  color: var(--_image-stub--color);
29
29
  border: 1px solid var(--_image-stub--color);
30
30
  border-radius: 0.25rem;
31
- }
32
- :global([data-theme="dark"]) .image-stub {
33
- --_image-stub--color: var(--image-stub--color, #374151);
34
31
  }</style>
@@ -49,7 +49,7 @@ const onLoadError = () => {
49
49
  --_image--background: var(--image--background, transparent);
50
50
  --_image--border-radius: var(--image--border-radius, 0);
51
51
  --_image--object-fit: var(--image--object-fit, cover);
52
- --_image--stub--background: var(--image--stub--background, #e5e7eb);
52
+ --_image--stub--background: var(--image--stub--background, var(--sc-mc-color--bg-image));
53
53
  position: relative;
54
54
  width: 100%;
55
55
  height: 100%;
@@ -57,9 +57,6 @@ const onLoadError = () => {
57
57
  border-radius: var(--_image--border-radius);
58
58
  background: var(--_image--background);
59
59
  }
60
- :global([data-theme="dark"]) .image {
61
- --_image--stub--background: var(--image--stub--background, #374151);
62
- }
63
60
  .image__img {
64
61
  width: 100%;
65
62
  height: 100%;
@@ -43,7 +43,7 @@ onMount(() => {
43
43
  }
44
44
 
45
45
  .la-ball-clip-rotate {
46
- --loading--spinner-color_: var(--loading--spinner-color, #144ab0);
46
+ --loading--spinner-color_: var(--loading--spinner-color, var(--sc-mc-color--text-brand));
47
47
  color: var(--loading--spinner-color_);
48
48
  display: block;
49
49
  opacity: 0;
@@ -51,9 +51,6 @@ onMount(() => {
51
51
  height: 2em;
52
52
  z-index: 10;
53
53
  }
54
- :global([data-theme="dark"]) .la-ball-clip-rotate {
55
- --loading--spinner-color_: var(--loading--spinner-color, #5a8dec);
56
- }
57
54
  .la-ball-clip-rotate--visible {
58
55
  opacity: 1;
59
56
  }
@@ -35,9 +35,9 @@ let { actions } = $props();
35
35
  justify-content: center;
36
36
  align-items: center;
37
37
  padding: 1rem;
38
- --icon--color: #ffffff;
38
+ --icon--color: var(--sc-mc-color--icon-overlay);
39
39
  --icon--size: 2rem;
40
- --icon--filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
40
+ --icon--filter: var(--sc-mc-color--icon-overlay-shadow);
41
41
  }
42
42
  .mobile-player-buttons-group__action-icon {
43
43
  display: block;
@@ -1,6 +1,6 @@
1
- import type { PlayerButtonsGroupAction } from './types';
1
+ import type { PlayerButtonDef } from './types';
2
2
  type Props = {
3
- actions: PlayerButtonsGroupAction[];
3
+ actions: PlayerButtonDef[];
4
4
  };
5
5
  declare const Cmp: import("svelte").Component<Props, {}, "">;
6
6
  type Cmp = ReturnType<typeof Cmp>;
@@ -30,8 +30,11 @@ const styles = $derived.by(() => {
30
30
  }
31
31
  }
32
32
  .player-button {
33
- --_player-button--color: var(--player-button--color, rgb(from #000000 r g b / 95%));
34
- --_player-button--color--inactive: var(--player-button--color--inactive, rgb(from var(--_player-button--color, #000000) r g b / 60%));
33
+ --_player-button--color: var(--player-button--color, rgb(from var(--sc-mc-color--button-player) r g b / 95%));
34
+ --_player-button--color--inactive: var(
35
+ --player-button--color--inactive,
36
+ rgb(from var(--_player-button--color, var(--sc-mc-color--button-player)) r g b / 60%)
37
+ );
35
38
  --_player-button--icon-scale: 1;
36
39
  pointer-events: auto;
37
40
  padding: 0.625rem;
@@ -41,7 +44,8 @@ const styles = $derived.by(() => {
41
44
  background-color: var(--_player-button--color--inactive);
42
45
  transition: background-color 0.5s;
43
46
  border-radius: 50%;
44
- --icon--color: #ffffff;
47
+ color: var(--sc-mc-color--text-white);
48
+ --icon--color: var(--sc-mc-color--icon-overlay);
45
49
  --icon--size: 1.75rem;
46
50
  /* Set 'container-type: inline-size;' to reference container*/
47
51
  }
@@ -34,10 +34,10 @@ const styles = $derived.by(() => {
34
34
  }
35
35
  }
36
36
  .player-buttons-group {
37
- --_player-buttons-group--active-color: var(--player-buttons-group--active-color, rgb(from #000000 r g b / 95%));
37
+ --_player-buttons-group--active-color: var(--player-buttons-group--active-color, rgb(from var(--sc-mc-color--button-player) r g b / 95%));
38
38
  --_player-buttons-group--background-color: var(
39
39
  --player-buttons-group--background-color,
40
- rgb(from var(--_player-buttons-group--active-color, #000000) r g b / 60%)
40
+ rgb(from var(--_player-buttons-group--active-color, var(--sc-mc-color--button-player)) r g b / 60%)
41
41
  );
42
42
  cursor: pointer;
43
43
  display: flex;
@@ -56,7 +56,8 @@ const styles = $derived.by(() => {
56
56
  align-items: center;
57
57
  padding: 0.5625rem;
58
58
  border-radius: 1.25rem;
59
- --icon--color: #ffffff;
59
+ color: var(--sc-mc-color--text-white);
60
+ --icon--color: var(--sc-mc-color--icon-overlay);
60
61
  --icon--size: 1.75rem;
61
62
  transition: background-color 0.5s;
62
63
  }
@@ -1,8 +1,8 @@
1
- import type { PlayerButtonsGroupAction } from './types';
1
+ import type { PlayerButtonDef } from './types';
2
2
  type Props = {
3
3
  activeColor: string | null;
4
4
  backgroundColor: string | null;
5
- actions: PlayerButtonsGroupAction[];
5
+ actions: PlayerButtonDef[];
6
6
  scaleEffect?: boolean;
7
7
  };
8
8
  declare const Cmp: import("svelte").Component<Props, {}, "">;
@@ -1,4 +1,4 @@
1
1
  export { default as PlayerButton } from './cmp.player-button.svelte';
2
2
  export { default as PlayerButtonsGroup } from './cmp.player-buttons-group.svelte';
3
3
  export { default as MobilePlayerButtonsGroup } from './cmp.mobile-player-buttons-group.svelte';
4
- export type { PlayerButtonsGroupAction } from './types';
4
+ export type { PlayerButtonDef } from './types';
@@ -1,5 +1,5 @@
1
1
  import { IconColor } from '../../icon';
2
- export type PlayerButtonsGroupAction = {
2
+ export type PlayerButtonDef = {
3
3
  icon: string;
4
4
  iconColor?: IconColor;
5
5
  callback: () => void;
@@ -4,6 +4,7 @@ export type PlayerColors = {
4
4
  buttonInactive: string | null;
5
5
  cardButton: string | null;
6
6
  cardBackground: string | null;
7
+ menuBackground: string | null;
7
8
  playerBackground: string | null;
8
9
  price: string | null;
9
10
  salePrice: string | null;
@@ -0,0 +1,156 @@
1
+ <script lang="ts">import { Theme } from '../../core/theme';
2
+ let { backgroundDisabled, backgroundImageUrl, backgroundColor, children } = $props();
3
+ const styles = $derived.by(() => {
4
+ const values = [];
5
+ if (backgroundImageUrl) {
6
+ values.push(`--shadow-root--background-image-url: url(${backgroundImageUrl})`);
7
+ }
8
+ if (backgroundColor) {
9
+ values.push(`--shadow-root--background: ${backgroundColor}`);
10
+ }
11
+ return values.join(';');
12
+ });
13
+ </script>
14
+
15
+ <svelte:head>
16
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300..700&display=swap" />
17
+ <meta name="theme-color" content="#242424" />
18
+ <meta name="color-scheme" content="dark" />
19
+ <meta name="mobile-web-app-capable" content="yes" />
20
+ <meta name="apple-mobile-web-app-capable" content="yes" />
21
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
22
+
23
+ <style>
24
+ html,
25
+ body {
26
+ background-color: #242424;
27
+ color-scheme: dark;
28
+ }
29
+ </style>
30
+ </svelte:head>
31
+
32
+ <div
33
+ class="shadow-root"
34
+ class:shadow-root--background-enabled={!backgroundDisabled}
35
+ class:shadow-root--background-active={!backgroundDisabled && backgroundImageUrl && backgroundImageUrl !== 'not-applicable'}
36
+ class:shadow-root--background-loading={!backgroundDisabled && !backgroundImageUrl}
37
+ style={styles}
38
+ data-theme={Theme.get()}>
39
+ {@render children()}
40
+ </div>
41
+
42
+ <style>@keyframes fadeIn {
43
+ 0% {
44
+ opacity: 1;
45
+ }
46
+ 50% {
47
+ opacity: 0.4;
48
+ }
49
+ 100% {
50
+ opacity: 1;
51
+ }
52
+ }
53
+ :host,
54
+ :global([data-theme="default"]) {
55
+ /* Backgrounds */
56
+ --sc-mc-color--bg-screen: #f9fafb;
57
+ --sc-mc-color--bg-card: #ffffff;
58
+ --sc-mc-color--bg-panel: #ffffff;
59
+ --sc-mc-color--bg-image: #d1d5db;
60
+ /* Borders */
61
+ --sc-mc-color--border-brand: #144ab0;
62
+ --sc-mc-color--border-card: #f2f2f2;
63
+ /* Buttons */
64
+ --sc-mc-color--button-secondary: #9ca3af;
65
+ --sc-mc-color--button-player: #272727;
66
+ /* Icons */
67
+ --sc-mc-color--icon-brand: #144ab0;
68
+ --sc-mc-color--icon-destructive: #e71d36;
69
+ --sc-mc-color--icon-overlay: #ffffff;
70
+ --sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
71
+ --sc-mc-color--icon-primary: #1f2937;
72
+ --sc-mc-color--icon-secondary: #9ca3af;
73
+ --sc-mc-color--icon-success: #0cce6b;
74
+ --sc-mc-color--icon-warning: #ffa62b;
75
+ /* Text */
76
+ --sc-mc-color--text-brand: #144ab0;
77
+ --sc-mc-color--text-inverted: #ffffff;
78
+ --sc-mc-color--text-primary: #000000;
79
+ --sc-mc-color--text-secondary: #6b7280;
80
+ --sc-mc-color--text-white: #ffffff;
81
+ --sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
82
+ --sc-mc-color--text-inactive: #e5e7eb;
83
+ }
84
+
85
+ :global([data-theme="dark"]) {
86
+ /* Backgrounds */
87
+ --sc-mc-color--bg-screen: #1e1e1e;
88
+ --sc-mc-color--bg-card: #000000;
89
+ --sc-mc-color--bg-panel: #000000;
90
+ --sc-mc-color--bg-image: #374151;
91
+ /* Borders */
92
+ --sc-mc-color--border-brand: #5a8dec;
93
+ --sc-mc-color--border-card: #000000;
94
+ /* Buttons */
95
+ --sc-mc-color--button-secondary: #9ca3af;
96
+ --sc-mc-color--button-player: #000000;
97
+ /* Icons */
98
+ --sc-mc-color--icon-brand: #ffffff;
99
+ --sc-mc-color--icon-destructive: #d4172d;
100
+ --sc-mc-color--icon-overlay: #ffffff;
101
+ --sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
102
+ --sc-mc-color--icon-primary: #1f2937;
103
+ --sc-mc-color--icon-secondary: #9ca3af;
104
+ --sc-mc-color--icon-success: #0cce6b;
105
+ --sc-mc-color--icon-warning: #ffa62b;
106
+ /* Text */
107
+ --sc-mc-color--text-brand: #5a8dec;
108
+ --sc-mc-color--text-inverted: #ffffff;
109
+ --sc-mc-color--text-primary: #ffffff;
110
+ --sc-mc-color--text-secondary: #d1d5db;
111
+ --sc-mc-color--text-white: #ffffff;
112
+ --sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
113
+ --sc-mc-color--text-inactive: #d1d5db;
114
+ }
115
+
116
+ .shadow-root {
117
+ --_shadow-root--background-color: rgb(from var(--shadow-root--background, var(--sc-mc-color--bg-screen)) r g b);
118
+ --_shadow-root--shield-color: rgb(from var(--shadow-root--background, rgb(from var(--sc-mc-color--bg-screen) r g b / 50%)) r g b / alpha);
119
+ --_shadow-root--background-image-url: var(--shadow-root--background-image-url);
120
+ font-family: "Inter", sans-serif;
121
+ font-size: 16px;
122
+ font-weight: normal;
123
+ color: var(--sc-mc-color--text-primary);
124
+ width: 100%;
125
+ min-width: 100%;
126
+ max-width: 100%;
127
+ height: 100%;
128
+ min-height: 100%;
129
+ max-height: 100%;
130
+ container-type: inline-size;
131
+ display: flex;
132
+ flex-direction: column;
133
+ position: relative;
134
+ }
135
+ .shadow-root:before {
136
+ content: "";
137
+ position: absolute;
138
+ inset: 0;
139
+ backdrop-filter: blur(30px);
140
+ background-color: var(--_shadow-root--shield-color);
141
+ display: none;
142
+ }
143
+ .shadow-root--background-enabled {
144
+ background-color: var(--_shadow-root--background-color);
145
+ }
146
+ .shadow-root--background-enabled:before {
147
+ display: block;
148
+ }
149
+ .shadow-root--background-active {
150
+ background-image: var(--_shadow-root--background-image-url);
151
+ background-size: cover;
152
+ background-blend-mode: multiply;
153
+ }
154
+ .shadow-root--background-loading {
155
+ background-color: transparent;
156
+ }</style>
@@ -0,0 +1,72 @@
1
+ @use 'src/styles/colors';
2
+
3
+ :host,
4
+ :global([data-theme='default']) {
5
+ /* Backgrounds */
6
+ --sc-mc-color--bg-screen: #{colors.$color-neutral-50};
7
+ --sc-mc-color--bg-card: #{colors.$color-white};
8
+ --sc-mc-color--bg-panel: #{colors.$color-white};
9
+ --sc-mc-color--bg-image: #{colors.$color-neutral-300};
10
+
11
+ /* Borders */
12
+ --sc-mc-color--border-brand: #{colors.$color-primary-500};
13
+ --sc-mc-color--border-card: #{colors.$color-gray-100};
14
+
15
+ /* Buttons */
16
+ --sc-mc-color--button-secondary: #{colors.$color-neutral-400};
17
+ --sc-mc-color--button-player: #{colors.$color-dark-500};
18
+
19
+ /* Icons */
20
+ --sc-mc-color--icon-brand: #{colors.$color-primary-500};
21
+ --sc-mc-color--icon-destructive: #{colors.$color-destructive-500};
22
+ --sc-mc-color--icon-overlay: #{colors.$color-white};
23
+ --sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
24
+ --sc-mc-color--icon-primary: #{colors.$color-neutral-800};
25
+ --sc-mc-color--icon-secondary: #{colors.$color-neutral-400};
26
+ --sc-mc-color--icon-success: #{colors.$color-success-500};
27
+ --sc-mc-color--icon-warning: #{colors.$color-warning-500};
28
+
29
+ /* Text */
30
+ --sc-mc-color--text-brand: #{colors.$color-primary-500};
31
+ --sc-mc-color--text-inverted: #{colors.$color-white};
32
+ --sc-mc-color--text-primary: #{colors.$color-black};
33
+ --sc-mc-color--text-secondary: #{colors.$color-neutral-500};
34
+ --sc-mc-color--text-white: #{colors.$color-white};
35
+ --sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
36
+ --sc-mc-color--text-inactive: #{colors.$color-neutral-200};
37
+ }
38
+
39
+ :global([data-theme='dark']) {
40
+ /* Backgrounds */
41
+ --sc-mc-color--bg-screen: #{colors.$color-dark-800};
42
+ --sc-mc-color--bg-card: #{colors.$color-black};
43
+ --sc-mc-color--bg-panel: #{colors.$color-black};
44
+ --sc-mc-color--bg-image: #{colors.$color-neutral-700};
45
+
46
+ /* Borders */
47
+ --sc-mc-color--border-brand: #{colors.$color-primary-400};
48
+ --sc-mc-color--border-card: #{colors.$color-black};
49
+
50
+ /* Buttons */
51
+ --sc-mc-color--button-secondary: #{colors.$color-neutral-400};
52
+ --sc-mc-color--button-player: #{colors.$color-black};
53
+
54
+ /* Icons */
55
+ --sc-mc-color--icon-brand: #{colors.$color-white};
56
+ --sc-mc-color--icon-destructive: #{colors.$color-destructive-600};
57
+ --sc-mc-color--icon-overlay: #{colors.$color-white};
58
+ --sc-mc-color--icon-overlay-shadow: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.2));
59
+ --sc-mc-color--icon-primary: #{colors.$color-neutral-800};
60
+ --sc-mc-color--icon-secondary: #{colors.$color-neutral-400};
61
+ --sc-mc-color--icon-success: #{colors.$color-success-500};
62
+ --sc-mc-color--icon-warning: #{colors.$color-warning-500};
63
+
64
+ /* Text */
65
+ --sc-mc-color--text-brand: #{colors.$color-primary-400};
66
+ --sc-mc-color--text-inverted: #{colors.$color-white};
67
+ --sc-mc-color--text-primary: #{colors.$color-white};
68
+ --sc-mc-color--text-secondary: #{colors.$color-neutral-300};
69
+ --sc-mc-color--text-white: #{colors.$color-white};
70
+ --sc-mc-color--text-white-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
71
+ --sc-mc-color--text-inactive: #{colors.$color-neutral-300};
72
+ }
@@ -1,2 +1,3 @@
1
1
  export { ModalShadowHost } from './modal-shadow-host';
2
2
  export { createShadowRoot } from './shadow-root-service';
3
+ export { default as ShadowRoot } from './cmp.shadow-root.svelte';
@@ -1,2 +1,3 @@
1
1
  export { ModalShadowHost } from './modal-shadow-host';
2
2
  export { createShadowRoot } from './shadow-root-service';
3
+ export { default as ShadowRoot } from './cmp.shadow-root.svelte';
@@ -3,10 +3,6 @@ import reset from './reset-shadow.css?raw';
3
3
  export const createShadowRoot = (host) => {
4
4
  prepareShadowRootHost(host);
5
5
  const shadowRoot = host.attachShadow({ mode: 'open' });
6
- const link = document.createElement('link');
7
- link.rel = 'stylesheet';
8
- link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@300..700&display=swap';
9
- shadowRoot.appendChild(link);
10
6
  const styleElement = document.createElement('style');
11
7
  styleElement.textContent = normalize + reset;
12
8
  shadowRoot.appendChild(styleElement);
@@ -301,10 +301,10 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
301
301
  font-size: 0.75rem;
302
302
  width: 1.875rem;
303
303
  height: 1.875rem;
304
- background-color: #9ca3af;
304
+ background-color: var(--sc-mc-color--button-secondary);
305
305
  border-radius: 50%;
306
306
  text-align: center;
307
- color: #ffffff;
307
+ color: var(--sc-mc-color--text-white);
308
308
  position: absolute;
309
309
  top: 50%;
310
310
  transform: translateY(-50%);
@@ -342,17 +342,17 @@ const showClassicArrowsAndDots = $derived([SliderMode.ArrowsAndDots, SliderMode.
342
342
  font-weight: 300;
343
343
  width: 5.625rem;
344
344
  text-align: center;
345
- color: #ffffff;
345
+ color: var(--sc-mc-color--text-white);
346
346
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
347
347
  }
348
348
  .slider__counts-navigation-button {
349
349
  font-size: 0.75rem;
350
350
  width: 1.625rem;
351
351
  height: 1.625rem;
352
- background-color: #9ca3af;
352
+ background-color: var(--sc-mc-color--button-secondary);
353
353
  border-radius: 50%;
354
354
  text-align: center;
355
- color: #ffffff;
355
+ color: var(--sc-mc-color--text-white);
356
356
  visibility: hidden;
357
357
  /* Set 'container-type: inline-size;' to reference container*/
358
358
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "12.1.0",
3
+ "version": "12.2.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,4 +0,0 @@
1
- import type { MediaCenterProps } from './types';
2
- declare const Cmp: import("svelte").Component<MediaCenterProps, {}, "">;
3
- type Cmp = ReturnType<typeof Cmp>;
4
- export default Cmp;
@@ -1,86 +0,0 @@
1
- <script lang="ts">let { backgroundDisabled, backgroundImageUrl, backgroundColor, children } = $props();
2
- const styles = $derived.by(() => {
3
- const values = [];
4
- if (backgroundImageUrl) {
5
- values.push(`--with-background--background-image-url: url(${backgroundImageUrl})`);
6
- }
7
- if (backgroundColor) {
8
- values.push(`--with-background--background: ${backgroundColor}`);
9
- }
10
- return values.join(';');
11
- });
12
- export {};
13
- </script>
14
-
15
- <svelte:head>
16
- <meta name="theme-color" content="#242424" />
17
- <meta name="color-scheme" content="dark" />
18
- <meta name="mobile-web-app-capable" content="yes" />
19
- <meta name="apple-mobile-web-app-capable" content="yes" />
20
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
21
-
22
- <style>
23
- html,
24
- body {
25
- background-color: #242424;
26
- color-scheme: dark;
27
- }
28
- </style>
29
- </svelte:head>
30
-
31
- <div
32
- class="with-background"
33
- class:with-background--background-enabled={!backgroundDisabled}
34
- class:with-background--background-active={!backgroundDisabled && backgroundImageUrl && backgroundImageUrl !== 'not-applicable'}
35
- class:with-background--background-loading={!backgroundDisabled && backgroundImageUrl !== 'not-applicable'}
36
- style={styles}>
37
- {@render children()}
38
- </div>
39
-
40
- <style>@keyframes fadeIn {
41
- 0% {
42
- opacity: 1;
43
- }
44
- 50% {
45
- opacity: 0.4;
46
- }
47
- 100% {
48
- opacity: 1;
49
- }
50
- }
51
- .with-background {
52
- --_with-background--background: var(--with-background--background);
53
- --_with-background--background-image-url: var(--with-background--background-image-url);
54
- width: 100%;
55
- min-width: 100%;
56
- max-width: 100%;
57
- height: 100%;
58
- min-height: 100%;
59
- max-height: 100%;
60
- container-type: inline-size;
61
- display: flex;
62
- flex-direction: column;
63
- position: relative;
64
- }
65
- .with-background:before {
66
- content: "";
67
- position: absolute;
68
- inset: 0;
69
- backdrop-filter: blur(30px);
70
- background-color: var(--_with-background--background);
71
- display: none;
72
- }
73
- .with-background--background-enabled {
74
- background-color: #7d7d7d;
75
- }
76
- .with-background--background-enabled:before {
77
- display: block;
78
- }
79
- .with-background--background-active {
80
- background-image: var(--_with-background--background-image-url);
81
- background-size: cover;
82
- background-blend-mode: multiply;
83
- }
84
- .with-background--background-loading {
85
- background-color: transparent;
86
- }</style>
@@ -1 +0,0 @@
1
- export { default as WithBackground } from './cmp.with-background.svelte';
@@ -1 +0,0 @@
1
- export { default as WithBackground } from './cmp.with-background.svelte';