@streamscloud/embeddable 12.0.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/config/internal-media-center-config.js +13 -12
- package/dist/media-center/config/operations.generated.d.ts +36 -30
- package/dist/media-center/config/operations.generated.js +53 -44
- package/dist/media-center/config/operations.graphql +34 -28
- package/dist/media-center/config/types.d.ts +8 -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/categories-handler.svelte.d.ts +25 -12
- package/dist/media-center/media-center/handlers/categories-handler.svelte.js +18 -3
- package/dist/media-center/media-center/handlers/index.d.ts +1 -0
- 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 +6 -6
- 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 +92 -95
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Locale } from '../core/locale';
|
|
2
2
|
import { type IMediaCenterConfig } from '../media-center/config/types';
|
|
3
|
+
export { default as MediaPage } from './cmp.media-page.svelte';
|
|
3
4
|
export type { IMediaCenterConfig };
|
|
4
5
|
export { mapToPostPlayerModel } from '../posts/data-loaders/mapper';
|
|
5
6
|
/**
|
|
@@ -118,4 +119,5 @@ export type MediaPageViewerSettings = {
|
|
|
118
119
|
locale?: Locale;
|
|
119
120
|
showStreamsCloudWatermark?: boolean;
|
|
120
121
|
hideCloseButton?: boolean;
|
|
122
|
+
theme?: 'light' | 'dark';
|
|
121
123
|
};
|
package/dist/media-page/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { toastrWarning } from '../core/toastr';
|
|
2
2
|
import { InternalMediaCenterConfig } from '../media-center/config/internal-media-center-config';
|
|
3
3
|
import {} from '../media-center/config/types';
|
|
4
|
-
import {
|
|
4
|
+
import { MediaCenterProxy } from '../media-center/media-center';
|
|
5
5
|
import { CloseOrchestrator } from '../ui/player/close-orchestrator';
|
|
6
6
|
import { ModalShadowHost } from '../ui/shadow-dom';
|
|
7
7
|
import { mount, unmount } from 'svelte';
|
|
8
|
+
export { default as MediaPage } from './cmp.media-page.svelte';
|
|
8
9
|
export { mapToPostPlayerModel } from '../posts/data-loaders/mapper';
|
|
9
10
|
export function openMediaPageModal(init) {
|
|
10
11
|
const { id, graphqlOrigin, initiator, viewerSettings, on } = init;
|
|
@@ -28,7 +29,7 @@ export function openMediaPageModal(init) {
|
|
|
28
29
|
},
|
|
29
30
|
canClose: !viewerSettings?.hideCloseButton
|
|
30
31
|
});
|
|
31
|
-
mounted = mount(
|
|
32
|
+
mounted = mount(MediaCenterProxy, {
|
|
32
33
|
target: shadowHost.shadowRoot,
|
|
33
34
|
props: {
|
|
34
35
|
config: mediaCenterConfig,
|
|
@@ -15,7 +15,7 @@ const trackingParams = $derived.by(() => {
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
{#if model.attachments}
|
|
18
|
-
<div class="post-attachments"
|
|
18
|
+
<div class="post-attachments">
|
|
19
19
|
{#if model.attachments.ads.length}
|
|
20
20
|
{#each model.attachments.ads as ad (ad.id)}
|
|
21
21
|
<AdCard
|
|
@@ -16,7 +16,7 @@ import IconShare from '@fluentui/svg-icons/icons/share_48_regular.svg?raw';
|
|
|
16
16
|
import IconShoppingBag from '@fluentui/svg-icons/icons/shopping_bag_32_regular.svg?raw';
|
|
17
17
|
import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_32_regular.svg?raw';
|
|
18
18
|
import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_32_regular.svg?raw';
|
|
19
|
-
let { model, activeColor, inactiveColor, socialInteractionsHandler, on } = $props();
|
|
19
|
+
let { model, activeColor, inactiveColor, socialInteractionsHandler, extraActions, on } = $props();
|
|
20
20
|
const showSocialInteractions = $derived(!!socialInteractionsHandler && model.enableSocialInteractions);
|
|
21
21
|
let isLikedStore = $state.raw({
|
|
22
22
|
get isLiked() {
|
|
@@ -39,6 +39,9 @@ const actions = $derived.by(() => {
|
|
|
39
39
|
if (model.media && !model.media.currentItem.isImage) {
|
|
40
40
|
result.push({ icon: MediaVolumeManager.isMuted ? IconSpeakerMute : IconSpeaker2, callback: onMuteClicked });
|
|
41
41
|
}
|
|
42
|
+
if (extraActions === null || extraActions === void 0 ? void 0 : extraActions.length) {
|
|
43
|
+
result.push(...extraActions);
|
|
44
|
+
}
|
|
42
45
|
return result;
|
|
43
46
|
});
|
|
44
47
|
$effect(() => {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { PostModel } from '../model';
|
|
2
2
|
import type { IPostSocialInteractionsHandler } from '../social-interactions';
|
|
3
|
+
import { type PlayerButtonDef } from '../../ui/player/button';
|
|
3
4
|
type Props = {
|
|
4
5
|
model: PostModel;
|
|
5
6
|
activeColor: string | null;
|
|
6
7
|
inactiveColor: string | null;
|
|
7
8
|
socialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
9
|
+
extraActions?: PlayerButtonDef[];
|
|
8
10
|
on?: {
|
|
9
11
|
attachmentsClicked?: () => void;
|
|
10
12
|
};
|
|
@@ -192,19 +192,14 @@ const variables = $derived.by(() => {
|
|
|
192
192
|
align-items: center;
|
|
193
193
|
width: 15.625rem;
|
|
194
194
|
padding: 0.375rem;
|
|
195
|
-
background-color:
|
|
196
|
-
color:
|
|
197
|
-
border: 0.0625rem solid
|
|
195
|
+
background-color: rgb(from var(--sc-mc-color--bg-card) r g b/90%);
|
|
196
|
+
color: var(--sc-mc-color--text-primary);
|
|
197
|
+
border: 0.0625rem solid var(--sc-mc-color--border-card);
|
|
198
198
|
border-radius: 0.25rem;
|
|
199
199
|
}
|
|
200
200
|
.attachments-card--single {
|
|
201
201
|
width: 100%;
|
|
202
202
|
}
|
|
203
|
-
:global([data-theme="dark"]) .attachments-card {
|
|
204
|
-
background-color: rgba(18, 18, 18, 0.9);
|
|
205
|
-
color: #ffffff;
|
|
206
|
-
border-color: #1e1e1e;
|
|
207
|
-
}
|
|
208
203
|
.attachments-card__thumb {
|
|
209
204
|
--image--rounded--width: 2.375rem;
|
|
210
205
|
--image--rounded--height: 2.375rem;
|
|
@@ -226,11 +221,8 @@ const variables = $derived.by(() => {
|
|
|
226
221
|
}
|
|
227
222
|
.attachments-card__extra-info {
|
|
228
223
|
font-size: 0.625rem;
|
|
229
|
-
color:
|
|
224
|
+
color: var(--sc-mc-color--text-secondary);
|
|
230
225
|
white-space: nowrap;
|
|
231
226
|
overflow: hidden;
|
|
232
227
|
text-overflow: ellipsis;
|
|
233
|
-
}
|
|
234
|
-
:global([data-theme="dark"]) .attachments-card__extra-info {
|
|
235
|
-
color: #ffffff;
|
|
236
228
|
}</style>
|
|
@@ -67,8 +67,8 @@ const variables = $derived.by(() => {
|
|
|
67
67
|
font-size: 0.75rem;
|
|
68
68
|
line-height: 0.9375rem;
|
|
69
69
|
font-weight: 500;
|
|
70
|
-
color:
|
|
71
|
-
text-shadow:
|
|
70
|
+
color: var(--sc-mc-color--text-white);
|
|
71
|
+
text-shadow: var(--sc-mc-color--text-white-shadow);
|
|
72
72
|
text-overflow: ellipsis;
|
|
73
73
|
width: 100%;
|
|
74
74
|
white-space: nowrap;
|
|
@@ -79,6 +79,6 @@ const variables = $derived.by(() => {
|
|
|
79
79
|
font-size: 0.625rem;
|
|
80
80
|
line-height: 0.75rem;
|
|
81
81
|
font-weight: 400;
|
|
82
|
-
color:
|
|
83
|
-
text-shadow:
|
|
82
|
+
color: var(--sc-mc-color--text-white);
|
|
83
|
+
text-shadow: var(--sc-mc-color--text-white-shadow);
|
|
84
84
|
}</style>
|
|
@@ -52,7 +52,7 @@ let { id, media, locale, autoplay = 'on-appearance', on } = $props();
|
|
|
52
52
|
height: 100%;
|
|
53
53
|
min-height: 100%;
|
|
54
54
|
max-height: 100%;
|
|
55
|
-
background-color:
|
|
55
|
+
background-color: rgb(from var(--sc-mc-color--bg-panel) r g b/60%);
|
|
56
56
|
}
|
|
57
57
|
.post-media--fit {
|
|
58
58
|
--video--media-fit: contain;
|
|
@@ -45,8 +45,8 @@ const variables = $derived.by(() => {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
.post-viewer-texts {
|
|
48
|
-
color:
|
|
49
|
-
text-shadow:
|
|
48
|
+
color: var(--sc-mc-color--text-white);
|
|
49
|
+
text-shadow: var(--sc-mc-color--text-white-shadow);
|
|
50
50
|
padding: var(--_post-viewer-texts--padding);
|
|
51
51
|
display: flex;
|
|
52
52
|
flex-direction: column;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {} from '../../media-center/config/types';
|
|
2
|
-
import {
|
|
2
|
+
import { MediaCenterProxy } from '../../media-center/media-center';
|
|
3
3
|
import { CloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
4
4
|
import { ModalShadowHost } from '../../ui/shadow-dom';
|
|
5
5
|
import { default as PostsPlayer } from './cmp.posts-player.svelte';
|
|
@@ -22,7 +22,7 @@ export function openPostsPlayer(init) {
|
|
|
22
22
|
canClose: !playerSettings?.hideCloseButton
|
|
23
23
|
});
|
|
24
24
|
if (mediaCenterConfig) {
|
|
25
|
-
mounted = mount(
|
|
25
|
+
mounted = mount(MediaCenterProxy, {
|
|
26
26
|
target: shadowHost.shadowRoot,
|
|
27
27
|
props: {
|
|
28
28
|
config: mediaCenterConfig,
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
<script lang="ts">import {} from '../../
|
|
2
|
-
import {
|
|
1
|
+
<script lang="ts">import { Theme } from '../../core/theme';
|
|
2
|
+
import {} from '../../ui/player/close-orchestrator';
|
|
3
|
+
import { ShadowRoot } from '../../ui/shadow-dom';
|
|
3
4
|
import { default as PostsPlayerView } from './posts-player-view.svelte';
|
|
5
|
+
import { untrack } from 'svelte';
|
|
4
6
|
let { dataProvider, socialInteractionsHandler, closeOrchestrator, playerSettings, analyticsHandler, on } = $props();
|
|
5
7
|
let backgroundImageUrl = $state(null);
|
|
6
8
|
const handleBackgroundImagedLoaded = (url) => {
|
|
7
9
|
backgroundImageUrl = url;
|
|
8
10
|
};
|
|
11
|
+
$effect(() => {
|
|
12
|
+
void (playerSettings === null || playerSettings === void 0 ? void 0 : playerSettings.theme);
|
|
13
|
+
untrack(() => {
|
|
14
|
+
var _a;
|
|
15
|
+
Theme.set((_a = playerSettings === null || playerSettings === void 0 ? void 0 : playerSettings.theme) !== null && _a !== void 0 ? _a : 'dark');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
9
18
|
</script>
|
|
10
19
|
|
|
11
|
-
<
|
|
20
|
+
<ShadowRoot backgroundDisabled={playerSettings?.disableBackground === true} backgroundImageUrl={backgroundImageUrl}>
|
|
12
21
|
<PostsPlayerView
|
|
13
22
|
dataProvider={{ type: 'provider', provider: dataProvider }}
|
|
14
23
|
socialInteractionsHandler={socialInteractionsHandler}
|
|
@@ -16,4 +25,4 @@ const handleBackgroundImagedLoaded = (url) => {
|
|
|
16
25
|
analyticsHandler={analyticsHandler}
|
|
17
26
|
closeOrchestrator={closeOrchestrator}
|
|
18
27
|
on={{ postActivated: on?.postActivated, backgroundImageLoaded: playerSettings?.disableBackground === true ? undefined : handleBackgroundImagedLoaded }} />
|
|
19
|
-
</
|
|
28
|
+
</ShadowRoot>
|
|
@@ -103,8 +103,8 @@ const styles = $derived.by(() => {
|
|
|
103
103
|
.product-card {
|
|
104
104
|
--_product-card--aspect-ratio: var(--product-card--aspect-ratio, 10/16);
|
|
105
105
|
--_product-card--border-radius: var(--product-card--border-radius, 0.5rem);
|
|
106
|
-
--_product-card--background-color: var(--product-card--background-color, rgb(from
|
|
107
|
-
--_product-card--border-color: var(--product-card--background-color,
|
|
106
|
+
--_product-card--background-color: var(--product-card--background-color, rgb(from var(--sc-mc-color--bg-card) r g b/90%));
|
|
107
|
+
--_product-card--border-color: var(--product-card--background-color, var(--sc-mc-color--border-card));
|
|
108
108
|
--_product-card--price-color: var(--product-card--price-color, inherit);
|
|
109
109
|
--_product-card--sale-price-color: var(--product-card--sale-price-color, inherit);
|
|
110
110
|
--product-price-color: var(--_product-card--price-color);
|
|
@@ -120,7 +120,6 @@ const styles = $derived.by(() => {
|
|
|
120
120
|
position: relative;
|
|
121
121
|
container-type: inline-size;
|
|
122
122
|
aspect-ratio: var(--_product-card--aspect-ratio);
|
|
123
|
-
color: #000000;
|
|
124
123
|
background-color: var(--_product-card--background-color);
|
|
125
124
|
border: 1px solid var(--_product-card--border-color);
|
|
126
125
|
border-radius: var(--_product-card--border-radius);
|
|
@@ -128,11 +127,6 @@ const styles = $derived.by(() => {
|
|
|
128
127
|
justify-content: space-between;
|
|
129
128
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
130
129
|
}
|
|
131
|
-
:global([data-theme="dark"]) .product-card {
|
|
132
|
-
--_product-card--background-color: var(--product-card--background-color, rgb(from #121212 r g b/90%));
|
|
133
|
-
--_product-card--border-color: var(--product-card--background-color, #1e1e1e);
|
|
134
|
-
color: #ffffff;
|
|
135
|
-
}
|
|
136
130
|
@container (width < 230px) {
|
|
137
131
|
.product-card {
|
|
138
132
|
padding: 0.5rem 0.5rem 0.75rem;
|
|
@@ -181,15 +175,12 @@ const styles = $derived.by(() => {
|
|
|
181
175
|
}
|
|
182
176
|
.product-card__description {
|
|
183
177
|
font-weight: 400;
|
|
184
|
-
color:
|
|
178
|
+
color: var(--sc-mc-color--text-secondary);
|
|
185
179
|
font-size: 0.9375rem;
|
|
186
180
|
line-height: 1.375rem;
|
|
187
181
|
min-height: 1.375rem;
|
|
188
182
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
189
183
|
}
|
|
190
|
-
:global([data-theme="dark"]) .product-card__description {
|
|
191
|
-
color: #d1d5db;
|
|
192
|
-
}
|
|
193
184
|
@container (width < 230px) {
|
|
194
185
|
.product-card__description {
|
|
195
186
|
font-size: 0.625rem;
|
|
@@ -217,7 +208,7 @@ const styles = $derived.by(() => {
|
|
|
217
208
|
.product-price {
|
|
218
209
|
--_product-price--color: var(--product-price-color);
|
|
219
210
|
--_product-price--sale--color: var(--product-price--sale--color);
|
|
220
|
-
--_product-price--before--color:
|
|
211
|
+
--_product-price--before--color: var(--sc-mc-color--text-secondary);
|
|
221
212
|
--_product-price--before--font-size: 0.75em;
|
|
222
213
|
--_product-price--font-size: 1.875em;
|
|
223
214
|
--_product-price--gap: 0.375em;
|
|
@@ -236,9 +227,6 @@ const styles = $derived.by(() => {
|
|
|
236
227
|
--_product-price--gap: 0.25rem;
|
|
237
228
|
}
|
|
238
229
|
}
|
|
239
|
-
:global([data-theme="dark"]) .product-price {
|
|
240
|
-
--_product-price--before--color: #d1d5db;
|
|
241
|
-
}
|
|
242
230
|
.product-price__before-price {
|
|
243
231
|
width: 100%;
|
|
244
232
|
color: var(--_product-price--before--color);
|
|
@@ -144,8 +144,8 @@ const adjustTextSize = (node) => {
|
|
|
144
144
|
align-items: center;
|
|
145
145
|
gap: 0.3125em;
|
|
146
146
|
--icon--size: 1.25em;
|
|
147
|
-
--icon--color:
|
|
148
|
-
--icon--filter:
|
|
147
|
+
--icon--color: var(--sc-mc-color--icon-overlay);
|
|
148
|
+
--icon--filter: var(--sc-mc-color--icon-overlay-shadow);
|
|
149
149
|
}
|
|
150
150
|
.short-video-card__info {
|
|
151
151
|
margin-top: clamp(0.4375rem, 3.6cqi, 0.625rem);
|
|
@@ -156,13 +156,13 @@ const adjustTextSize = (node) => {
|
|
|
156
156
|
.short-video-card__meta {
|
|
157
157
|
font-size: clamp(0.625rem, 4.3cqi, 0.75rem);
|
|
158
158
|
font-weight: 500;
|
|
159
|
-
color:
|
|
159
|
+
color: var(--sc-mc-color--text-secondary);
|
|
160
160
|
display: flex;
|
|
161
161
|
align-items: center;
|
|
162
162
|
gap: 0.25rem;
|
|
163
163
|
}
|
|
164
164
|
.short-video-card__text {
|
|
165
|
-
color:
|
|
165
|
+
color: var(--sc-mc-color--text-primary);
|
|
166
166
|
--min-font: 0.75rem;
|
|
167
167
|
--max-font: 0.9375rem;
|
|
168
168
|
--line-height: 1.2;
|
|
@@ -202,7 +202,7 @@ const adjustTextSize = (node) => {
|
|
|
202
202
|
.product-card__info {
|
|
203
203
|
display: flex;
|
|
204
204
|
flex-direction: column;
|
|
205
|
-
color:
|
|
205
|
+
color: var(--sc-mc-color--text-primary);
|
|
206
206
|
font-size: clamp(0.5rem, 2.9cqi, 0.5rem);
|
|
207
207
|
line-height: clamp(0.75rem, 4.3cqi, 0.75rem);
|
|
208
208
|
font-weight: 500;
|
|
@@ -220,6 +220,6 @@ const adjustTextSize = (node) => {
|
|
|
220
220
|
font-weight: 600;
|
|
221
221
|
}
|
|
222
222
|
.product-card__price span:nth-child(2) {
|
|
223
|
-
color:
|
|
223
|
+
color: var(--sc-mc-color--text-secondary);
|
|
224
224
|
text-decoration: line-through;
|
|
225
225
|
}</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StreamStatus } from '../../core/enums';
|
|
1
|
+
import { EmbedStreamsOrderBy, StreamStatus } from '../../core/enums';
|
|
2
2
|
import { mapToStreamPlayerModel } from './mapper';
|
|
3
3
|
import { GetStreamsDocument } from './operations.generated';
|
|
4
4
|
export const getStreamsCursor = async (input) => {
|
|
@@ -16,7 +16,11 @@ export const getStreamsCursor = async (input) => {
|
|
|
16
16
|
showInFeed
|
|
17
17
|
},
|
|
18
18
|
limit,
|
|
19
|
-
continuationToken
|
|
19
|
+
continuationToken,
|
|
20
|
+
sorting: {
|
|
21
|
+
orderBy: EmbedStreamsOrderBy.ContentUpdatedAt,
|
|
22
|
+
ascendingOrder: false
|
|
23
|
+
}
|
|
20
24
|
}
|
|
21
25
|
})
|
|
22
26
|
.toPromise();
|
|
@@ -58,7 +58,7 @@ let { stream, aspectRatio = 9 / 16, on } = $props();
|
|
|
58
58
|
height: clamp(1.75rem, 20cqi, 2.5rem);
|
|
59
59
|
padding-inline: clamp(0.5rem, 6cqi, 0.75rem);
|
|
60
60
|
background: rgba(0, 0, 0, 0.8);
|
|
61
|
-
color:
|
|
61
|
+
color: var(--sc-mc-color--text-white);
|
|
62
62
|
display: flex;
|
|
63
63
|
flex-direction: column;
|
|
64
64
|
align-content: center;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script lang="ts">var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { CloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
11
|
+
import { createShadowRoot } from '../../ui/shadow-dom';
|
|
12
|
+
import { default as StreamsPlayerProxy } from './streams-player-proxy.svelte';
|
|
13
|
+
import { mount, unmount } from 'svelte';
|
|
14
|
+
let { dataProvider, postSocialInteractionsHandler, amplificationParameters, playerSettings, analyticsHandler, on } = $props();
|
|
15
|
+
const initHost = (node) => {
|
|
16
|
+
const shadowRoot = createShadowRoot(node);
|
|
17
|
+
const mounted = mount(StreamsPlayerProxy, {
|
|
18
|
+
target: shadowRoot,
|
|
19
|
+
props: {
|
|
20
|
+
dataProvider,
|
|
21
|
+
postSocialInteractionsHandler,
|
|
22
|
+
analyticsHandler,
|
|
23
|
+
amplificationParameters,
|
|
24
|
+
playerSettings,
|
|
25
|
+
closeOrchestrator: new CloseOrchestrator({
|
|
26
|
+
closeFn: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
yield unmount(mounted);
|
|
28
|
+
}),
|
|
29
|
+
canClose: false
|
|
30
|
+
}),
|
|
31
|
+
on
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
destroy: () => {
|
|
36
|
+
unmount(mounted);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<div class="streams-player-host" use:initHost></div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Locale } from '../../core/locale';
|
|
2
|
+
import type { IPostSocialInteractionsHandler } from '../../posts';
|
|
3
|
+
import type { IStreamAnalyticsHandler, IStreamsPlayerDataProvider, StreamAmplificationParameters } from './types';
|
|
4
|
+
type Props = {
|
|
5
|
+
dataProvider: IStreamsPlayerDataProvider;
|
|
6
|
+
postSocialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
7
|
+
analyticsHandler?: IStreamAnalyticsHandler;
|
|
8
|
+
amplificationParameters?: StreamAmplificationParameters;
|
|
9
|
+
playerSettings?: {
|
|
10
|
+
locale?: Locale;
|
|
11
|
+
showStreamsCloudWatermark?: boolean;
|
|
12
|
+
disableBackground?: boolean;
|
|
13
|
+
theme?: 'light' | 'dark';
|
|
14
|
+
};
|
|
15
|
+
on?: {
|
|
16
|
+
streamActivated?: (data: {
|
|
17
|
+
title: string;
|
|
18
|
+
image: string | null;
|
|
19
|
+
}) => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
23
|
+
type Cmp = ReturnType<typeof Cmp>;
|
|
24
|
+
export default Cmp;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { toastrWarning } from '../../core/toastr';
|
|
2
2
|
import { InternalMediaCenterConfig } from '../../media-center/config/internal-media-center-config';
|
|
3
3
|
import {} from '../../media-center/config/types';
|
|
4
|
-
import {
|
|
4
|
+
import { MediaCenterProxy } from '../../media-center/media-center';
|
|
5
5
|
import { CloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
6
6
|
import { ModalShadowHost } from '../../ui/shadow-dom';
|
|
7
7
|
import { InternalStreamAnalyticsHandler } from './internal-stream-analytics-handler';
|
|
8
8
|
import { InternalStreamsPlayerDataProvider } from './internal-streams-player-data-provider';
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as StreamsPlayerProxy } from './streams-player-proxy.svelte';
|
|
10
10
|
import { mount, unmount } from 'svelte';
|
|
11
11
|
export {};
|
|
12
12
|
export { mapToStreamPlayerModel } from '../data-loaders/mapper';
|
|
@@ -42,7 +42,7 @@ export function openStreamsPlayer(init) {
|
|
|
42
42
|
canClose: !playerSettings?.hideCloseButton
|
|
43
43
|
});
|
|
44
44
|
if (mediaCenterConfig) {
|
|
45
|
-
mounted = mount(
|
|
45
|
+
mounted = mount(MediaCenterProxy, {
|
|
46
46
|
target: shadowHost.shadowRoot,
|
|
47
47
|
props: {
|
|
48
48
|
config: mediaCenterConfig,
|
|
@@ -64,10 +64,10 @@ export function openStreamsPlayer(init) {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
|
-
mounted = mount(
|
|
67
|
+
mounted = mount(StreamsPlayerProxy, {
|
|
68
68
|
target: shadowHost.shadowRoot,
|
|
69
69
|
props: {
|
|
70
|
-
dataProvider
|
|
70
|
+
dataProvider,
|
|
71
71
|
analyticsHandler,
|
|
72
72
|
amplificationParameters,
|
|
73
73
|
playerSettings,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts">import { Theme } from '../../core/theme';
|
|
2
|
+
import {} from '../../ui/player/close-orchestrator';
|
|
3
|
+
import { ShadowRoot } from '../../ui/shadow-dom';
|
|
4
|
+
import { default as StreamsPlayerView } from './streams-player-view.svelte';
|
|
5
|
+
import { untrack } from 'svelte';
|
|
6
|
+
let { dataProvider, postSocialInteractionsHandler, amplificationParameters, closeOrchestrator, playerSettings, analyticsHandler, on } = $props();
|
|
7
|
+
let backgroundImageUrl = $state(null);
|
|
8
|
+
const handleBackgroundImagedLoaded = (url) => {
|
|
9
|
+
backgroundImageUrl = url;
|
|
10
|
+
};
|
|
11
|
+
$effect(() => {
|
|
12
|
+
void (playerSettings === null || playerSettings === void 0 ? void 0 : playerSettings.theme);
|
|
13
|
+
untrack(() => {
|
|
14
|
+
var _a;
|
|
15
|
+
Theme.set((_a = playerSettings === null || playerSettings === void 0 ? void 0 : playerSettings.theme) !== null && _a !== void 0 ? _a : 'dark');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<ShadowRoot backgroundDisabled={playerSettings?.disableBackground === true} backgroundImageUrl={backgroundImageUrl}>
|
|
21
|
+
<StreamsPlayerView
|
|
22
|
+
dataProvider={{ type: 'provider', provider: dataProvider }}
|
|
23
|
+
postSocialInteractionsHandler={postSocialInteractionsHandler}
|
|
24
|
+
analyticsHandler={analyticsHandler}
|
|
25
|
+
amplificationParameters={amplificationParameters}
|
|
26
|
+
playerSettings={playerSettings}
|
|
27
|
+
closeOrchestrator={closeOrchestrator}
|
|
28
|
+
on={{
|
|
29
|
+
streamActivated: on?.streamActivated,
|
|
30
|
+
backgroundImageLoaded: playerSettings?.disableBackground === true ? undefined : handleBackgroundImagedLoaded
|
|
31
|
+
}} />
|
|
32
|
+
</ShadowRoot>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Locale } from '../../core/locale';
|
|
2
|
+
import type { IPostSocialInteractionsHandler } from '../../posts/social-interactions';
|
|
3
|
+
import { type ICloseOrchestrator } from '../../ui/player/close-orchestrator';
|
|
4
|
+
import type { IStreamsPlayerDataProvider, IStreamAnalyticsHandler, StreamAmplificationParameters } from './types';
|
|
5
|
+
type Props = {
|
|
6
|
+
dataProvider: IStreamsPlayerDataProvider;
|
|
7
|
+
postSocialInteractionsHandler?: IPostSocialInteractionsHandler;
|
|
8
|
+
analyticsHandler?: IStreamAnalyticsHandler;
|
|
9
|
+
amplificationParameters?: StreamAmplificationParameters;
|
|
10
|
+
closeOrchestrator: ICloseOrchestrator;
|
|
11
|
+
playerSettings?: {
|
|
12
|
+
locale?: Locale;
|
|
13
|
+
showStreamsCloudWatermark?: boolean;
|
|
14
|
+
disableBackground?: boolean;
|
|
15
|
+
theme?: 'light' | 'dark';
|
|
16
|
+
};
|
|
17
|
+
on?: {
|
|
18
|
+
streamActivated?: (data: {
|
|
19
|
+
title: string;
|
|
20
|
+
image: string | null;
|
|
21
|
+
}) => void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
declare const StreamsPlayerProxy: import("svelte").Component<Props, {}, "">;
|
|
25
|
+
type StreamsPlayerProxy = ReturnType<typeof StreamsPlayerProxy>;
|
|
26
|
+
export default StreamsPlayerProxy;
|