@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.
- package/dist/ads/ad-card/cmp.ad-card.svelte +4 -16
- package/dist/content-player/cmp.content-player.svelte +1 -1
- package/dist/content-player/content-player-config.svelte.d.ts +1 -0
- package/dist/content-player/content-player-settings.js +1 -0
- package/dist/content-player/controls-and-attachments.svelte +32 -2
- package/dist/content-player/controls-and-attachments.svelte.d.ts +1 -0
- package/dist/content-player/overview-panel.svelte +2 -2
- package/dist/content-player/ui-manager.svelte.d.ts +2 -1
- package/dist/content-player/ui-manager.svelte.js +2 -1
- package/dist/core/enums.d.ts +3 -0
- package/dist/core/enums.js +4 -0
- package/dist/core/theme/index.d.ts +1 -0
- package/dist/core/theme/index.js +1 -0
- package/dist/core/theme/theme-store.svelte.d.ts +5 -0
- package/dist/core/theme/theme-store.svelte.js +10 -0
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte +59 -0
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte.d.ts +12 -0
- package/dist/media-center/media-center/discover/discover-header.svelte +10 -13
- package/dist/media-center/media-center/discover/discover-header.svelte.d.ts +0 -2
- package/dist/media-center/media-center/discover/discover-view.svelte +6 -6
- package/dist/media-center/media-center/discover/discover-view.svelte.d.ts +0 -2
- package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +2 -0
- package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.js +20 -1
- package/dist/media-center/media-center/header-footer/media-center-footer.svelte +5 -5
- package/dist/media-center/media-center/header-footer/media-center-header-mobile.svelte +5 -4
- package/dist/media-center/media-center/header-footer/media-center-header.svelte +6 -8
- package/dist/media-center/media-center/header-footer/media-center-header.svelte.d.ts +0 -2
- package/dist/media-center/media-center/index.d.ts +1 -1
- package/dist/media-center/media-center/index.js +1 -1
- package/dist/media-center/media-center/media-center-context.svelte.d.ts +3 -13
- package/dist/media-center/media-center/media-center-context.svelte.js +11 -7
- package/dist/media-center/media-center/{cmp.media-center.svelte → media-center-view.svelte} +56 -107
- package/dist/media-center/media-center/media-center-view.svelte.d.ts +7 -0
- package/dist/media-center/media-center/menu/menu.svelte +27 -23
- package/dist/media-center/media-center/menu/menu.svelte.d.ts +0 -2
- package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +7 -3
- package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +2 -3
- package/dist/media-center/media-center/types.d.ts +1 -8
- package/dist/media-page/cmp.media-page.svelte +39 -0
- package/dist/media-page/cmp.media-page.svelte.d.ts +10 -0
- package/dist/media-page/index.d.ts +2 -0
- package/dist/media-page/index.js +3 -2
- package/dist/posts/attachments/cmp.attachments.svelte +1 -1
- package/dist/posts/controls/cmp.controls.svelte +4 -1
- package/dist/posts/controls/cmp.controls.svelte.d.ts +2 -0
- package/dist/posts/post-viewer/attachments-horizontal.svelte +4 -12
- package/dist/posts/post-viewer/heading.svelte +4 -4
- package/dist/posts/post-viewer/media/post-media.svelte +1 -1
- package/dist/posts/post-viewer/post-texts.svelte +2 -2
- package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +1 -0
- package/dist/posts/posts-player/index.d.ts +1 -0
- package/dist/posts/posts-player/index.js +2 -2
- package/dist/posts/posts-player/posts-player-proxy.svelte +13 -4
- package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +1 -0
- package/dist/products/product-card/cmp.product-card.svelte +4 -16
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +6 -6
- package/dist/streams/data-loaders/streams-loader.js +6 -2
- package/dist/streams/stream-card/cmp.stream-card.svelte +1 -1
- package/dist/streams/streams-player/cmp.streams-player.svelte +42 -0
- package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +24 -0
- package/dist/streams/streams-player/index.d.ts +1 -0
- package/dist/streams/streams-player/index.js +5 -5
- package/dist/streams/streams-player/stream-overview.svelte +1 -1
- package/dist/streams/streams-player/streams-player-proxy.svelte +32 -0
- package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +26 -0
- package/dist/ui/button/resources/button-theme.svelte +0 -151
- package/dist/ui/button/resources/button-types.d.ts +0 -1
- package/dist/ui/button/resources/button-types.js +0 -1
- package/dist/ui/icon/cmp.icon.svelte +8 -28
- package/dist/ui/image/cmp.image-rounded.svelte +3 -10
- package/dist/ui/image/cmp.image-stub.svelte +1 -4
- package/dist/ui/image/cmp.image.svelte +1 -4
- package/dist/ui/loading/cmp.loading.svelte +1 -4
- package/dist/ui/player/button/cmp.mobile-player-buttons-group.svelte +2 -2
- package/dist/ui/player/button/cmp.mobile-player-buttons-group.svelte.d.ts +2 -2
- package/dist/ui/player/button/cmp.player-button.svelte +7 -3
- package/dist/ui/player/button/cmp.player-buttons-group.svelte +4 -3
- package/dist/ui/player/button/cmp.player-buttons-group.svelte.d.ts +2 -2
- package/dist/ui/player/button/index.d.ts +1 -1
- package/dist/ui/player/button/types.d.ts +1 -1
- package/dist/ui/player/colors/player-colors.d.ts +1 -0
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +156 -0
- package/dist/ui/shadow-dom/colors.scss +72 -0
- package/dist/ui/shadow-dom/index.d.ts +1 -0
- package/dist/ui/shadow-dom/index.js +1 -0
- package/dist/ui/shadow-dom/shadow-root-service.js +0 -4
- package/dist/ui/slider/cmp.slider.svelte +5 -5
- package/package.json +1 -1
- package/dist/media-center/media-center/cmp.media-center.svelte.d.ts +0 -4
- package/dist/ui/with-background/cmp.with-background.svelte +0 -86
- package/dist/ui/with-background/index.d.ts +0 -1
- package/dist/ui/with-background/index.js +0 -1
- /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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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:
|
|
38
|
+
--icon--color: var(--sc-mc-color--icon-overlay);
|
|
39
39
|
--icon--size: 2rem;
|
|
40
|
-
--icon--filter:
|
|
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 {
|
|
1
|
+
import type { PlayerButtonDef } from './types';
|
|
2
2
|
type Props = {
|
|
3
|
-
actions:
|
|
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
|
|
34
|
-
--_player-button--color--inactive: var(
|
|
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
|
-
|
|
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
|
|
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,
|
|
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
|
-
|
|
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 {
|
|
1
|
+
import type { PlayerButtonDef } from './types';
|
|
2
2
|
type Props = {
|
|
3
3
|
activeColor: string | null;
|
|
4
4
|
backgroundColor: string | null;
|
|
5
|
-
actions:
|
|
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 {
|
|
4
|
+
export type { PlayerButtonDef } from './types';
|
|
@@ -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
|
+
}
|
|
@@ -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:
|
|
304
|
+
background-color: var(--sc-mc-color--button-secondary);
|
|
305
305
|
border-radius: 50%;
|
|
306
306
|
text-align: center;
|
|
307
|
-
color:
|
|
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:
|
|
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:
|
|
352
|
+
background-color: var(--sc-mc-color--button-secondary);
|
|
353
353
|
border-radius: 50%;
|
|
354
354
|
text-align: center;
|
|
355
|
-
color:
|
|
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,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';
|
|
File without changes
|