@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
|
@@ -102,8 +102,8 @@ const styles = $derived.by(() => {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
.ad-card {
|
|
105
|
-
--_ad-card--background-color: var(--ad-card--background-color, rgb(from
|
|
106
|
-
--_ad-card--border-color: var(--ad-card--background-color,
|
|
105
|
+
--_ad-card--background-color: var(--ad-card--background-color, rgb(from var(--sc-mc-color--bg-card) r g b/90%));
|
|
106
|
+
--_ad-card--border-color: var(--ad-card--background-color, var(--sc-mc-color--border-card));
|
|
107
107
|
--_ad-card--price-color: var(--ad-card--price-color, inherit);
|
|
108
108
|
width: 100%;
|
|
109
109
|
height: max-content;
|
|
@@ -112,7 +112,6 @@ const styles = $derived.by(() => {
|
|
|
112
112
|
position: relative;
|
|
113
113
|
container-type: inline-size;
|
|
114
114
|
aspect-ratio: 9/16;
|
|
115
|
-
color: #000000;
|
|
116
115
|
background-color: var(--_ad-card--background-color);
|
|
117
116
|
border: 1px solid var(--_ad-card--border-color);
|
|
118
117
|
border-radius: 0.5rem;
|
|
@@ -121,11 +120,6 @@ const styles = $derived.by(() => {
|
|
|
121
120
|
gap: 0.5rem;
|
|
122
121
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
123
122
|
}
|
|
124
|
-
:global([data-theme="dark"]) .ad-card {
|
|
125
|
-
--_ad-card--background-color: var(--ad-card--background-color, rgb(from #121212 r g b/90%));
|
|
126
|
-
--_ad-card--border-color: var(--ad-card--background-color, #1e1e1e);
|
|
127
|
-
color: #ffffff;
|
|
128
|
-
}
|
|
129
123
|
@container (width < 230px) {
|
|
130
124
|
.ad-card {
|
|
131
125
|
padding: 0.5rem 0.5rem 0.75rem;
|
|
@@ -221,7 +215,7 @@ const styles = $derived.by(() => {
|
|
|
221
215
|
}
|
|
222
216
|
.ad-card__description {
|
|
223
217
|
font-weight: 400;
|
|
224
|
-
color:
|
|
218
|
+
color: var(--sc-mc-color--text-secondary);
|
|
225
219
|
font-size: 0.9375rem;
|
|
226
220
|
line-height: 1.375rem;
|
|
227
221
|
min-height: 1.375rem;
|
|
@@ -234,9 +228,6 @@ const styles = $derived.by(() => {
|
|
|
234
228
|
min-height: 0.875rem;
|
|
235
229
|
}
|
|
236
230
|
}
|
|
237
|
-
:global([data-theme="dark"]) .ad-card__description {
|
|
238
|
-
color: #d1d5db;
|
|
239
|
-
}
|
|
240
231
|
.ad-card__price {
|
|
241
232
|
font-size: 1.6875rem;
|
|
242
233
|
font-weight: 700;
|
|
@@ -262,7 +253,7 @@ const styles = $derived.by(() => {
|
|
|
262
253
|
line-height: 1.09125rem;
|
|
263
254
|
letter-spacing: 0;
|
|
264
255
|
text-align: right;
|
|
265
|
-
color:
|
|
256
|
+
color: var(--sc-mc-color--text-secondary);
|
|
266
257
|
white-space: nowrap;
|
|
267
258
|
overflow: hidden;
|
|
268
259
|
text-overflow: ellipsis;
|
|
@@ -276,9 +267,6 @@ const styles = $derived.by(() => {
|
|
|
276
267
|
line-height: 0.875rem;
|
|
277
268
|
}
|
|
278
269
|
}
|
|
279
|
-
:global([data-theme="dark"]) .ad-card__price-info-label {
|
|
280
|
-
color: #d1d5db;
|
|
281
|
-
}
|
|
282
270
|
.ad-card__button {
|
|
283
271
|
width: 100%;
|
|
284
272
|
}
|
|
@@ -150,7 +150,7 @@ const handleSliderMounted = (node) => {
|
|
|
150
150
|
{/if}
|
|
151
151
|
</div>
|
|
152
152
|
|
|
153
|
-
<ControlsAndAttachments config={config} />
|
|
153
|
+
<ControlsAndAttachments config={config} hasOverview={!!overviewPanelContent} />
|
|
154
154
|
{:else}
|
|
155
155
|
<Loading positionFixedCenter={true} timeout={1000} />
|
|
156
156
|
{/if}
|
|
@@ -34,6 +34,7 @@ export declare class ContentPlayerConfig<T extends {
|
|
|
34
34
|
buttonInactive: string | null;
|
|
35
35
|
cardButton: string | null;
|
|
36
36
|
cardBackground: string | null;
|
|
37
|
+
menuBackground: string | null;
|
|
37
38
|
playerBackground: string | null;
|
|
38
39
|
price: string | null;
|
|
39
40
|
salePrice: string | null;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script lang="ts">import { slideHorizontally } from '../core/transitions';
|
|
2
2
|
import { PostAttachments } from '../posts/attachments';
|
|
3
3
|
import { PostControls } from '../posts/controls';
|
|
4
|
-
import {
|
|
4
|
+
import { IconColor } from '../ui/icon';
|
|
5
|
+
import { PlayerButton, PlayerButtonsGroup } from '../ui/player/button';
|
|
5
6
|
import { ContentPlayerConfig } from './content-player-config.svelte';
|
|
7
|
+
import IconCalendarWeekNumbers from '@fluentui/svg-icons/icons/calendar_week_numbers_24_regular.svg?raw';
|
|
6
8
|
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_28_regular.svg?raw';
|
|
7
9
|
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_28_regular.svg?raw';
|
|
8
10
|
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_28_regular.svg?raw';
|
|
9
|
-
let { config } = $props();
|
|
11
|
+
let { config, hasOverview } = $props();
|
|
10
12
|
const uiManager = config.uiManager;
|
|
11
13
|
let attachmentsCollapsed = $state(false);
|
|
12
14
|
let closeButtonAreaHeight = $state(0);
|
|
@@ -17,6 +19,18 @@ const currentItemPostContainer = $derived.by(() => {
|
|
|
17
19
|
}
|
|
18
20
|
return config.itemAsPostViewerModel(config.playerBuffer.current);
|
|
19
21
|
});
|
|
22
|
+
const extraActions = $derived.by(() => {
|
|
23
|
+
const actions = [];
|
|
24
|
+
if (hasOverview && uiManager.overviewCanBeShown) {
|
|
25
|
+
actions.push({
|
|
26
|
+
icon: IconCalendarWeekNumbers,
|
|
27
|
+
callback: () => {
|
|
28
|
+
uiManager.overviewCollapsed = !uiManager.overviewCollapsed;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return actions;
|
|
33
|
+
});
|
|
20
34
|
const changeShowAttachments = () => {
|
|
21
35
|
attachmentsCollapsed = !attachmentsCollapsed;
|
|
22
36
|
};
|
|
@@ -68,7 +82,23 @@ const variables = $derived.by(() => {
|
|
|
68
82
|
activeColor={config.playerColors.button}
|
|
69
83
|
inactiveColor={config.playerColors.buttonInactive}
|
|
70
84
|
socialInteractionsHandler={config.socialInteractionsHandler}
|
|
85
|
+
extraActions={extraActions}
|
|
71
86
|
on={{ attachmentsClicked: changeShowAttachments }} />
|
|
87
|
+
{:else if extraActions.length}
|
|
88
|
+
{#if extraActions.length === 1}
|
|
89
|
+
<PlayerButton
|
|
90
|
+
scaleEffect={true}
|
|
91
|
+
activeColor={config.playerColors.button}
|
|
92
|
+
inactiveColor={config.playerColors.buttonInactive}
|
|
93
|
+
icon={extraActions[0].icon}
|
|
94
|
+
on={{ click: extraActions[0].callback }} />
|
|
95
|
+
{:else}
|
|
96
|
+
<PlayerButtonsGroup
|
|
97
|
+
scaleEffect={true}
|
|
98
|
+
activeColor={config.playerColors.button}
|
|
99
|
+
backgroundColor={config.playerColors.buttonInactive}
|
|
100
|
+
actions={extraActions} />
|
|
101
|
+
{/if}
|
|
72
102
|
{/if}
|
|
73
103
|
{#if config.playerBuffer}
|
|
74
104
|
<div
|
|
@@ -22,7 +22,7 @@ const styles = $derived.by(() => {
|
|
|
22
22
|
|
|
23
23
|
<!--Double `if` for correct behavior of slideHorizontally-->
|
|
24
24
|
{#if uiManager.viewInitialized}
|
|
25
|
-
{#if !uiManager.overviewCollapsed}
|
|
25
|
+
{#if uiManager.overviewCanBeShown && !uiManager.overviewCollapsed}
|
|
26
26
|
<div class="overview-panel" style={styles} transition:slideHorizontally|local onclick={handlePanelClick} onkeydown={() => {}} role="none">
|
|
27
27
|
<div class="overview-panel__content" onclick={(e) => e.stopPropagation()} onkeydown={() => {}} role="none">
|
|
28
28
|
{@render children()}
|
|
@@ -43,7 +43,7 @@ const styles = $derived.by(() => {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
.overview-panel {
|
|
46
|
-
--_overview-panel--background: var(--overview-panel--background,
|
|
46
|
+
--_overview-panel--background: var(--overview-panel--background, rgb(from var(--sc-mc-color--bg-panel) r g b / 90%));
|
|
47
47
|
--_overview-panel--width: var(--overview-panel--width);
|
|
48
48
|
--_overview-panel--top: var(--overview-panel--top);
|
|
49
49
|
--_overview-panel--bottom: var(--overview-panel--bottom);
|
|
@@ -2,7 +2,8 @@ const ATTACHMENTS_MAX_WIDTH = 176;
|
|
|
2
2
|
const OVERLAY_MAX_WIDTH = 150;
|
|
3
3
|
const SAFE_AREA_SIZE = 70;
|
|
4
4
|
export class ContentPlayerUIManager {
|
|
5
|
-
overviewCollapsed = $
|
|
5
|
+
overviewCollapsed = $state(true);
|
|
6
|
+
overviewCanBeShown = $derived.by(() => this.overviewMaxWidth <= this.sidePanelsMaxWidth);
|
|
6
7
|
overviewMaxWidth = OVERLAY_MAX_WIDTH;
|
|
7
8
|
attachmentsWidth = $state(0);
|
|
8
9
|
attachmentsMaxWidth = ATTACHMENTS_MAX_WIDTH;
|
package/dist/core/enums.d.ts
CHANGED
package/dist/core/enums.js
CHANGED
|
@@ -55,3 +55,7 @@ export var StreamStatus;
|
|
|
55
55
|
(function (StreamStatus) {
|
|
56
56
|
StreamStatus["Published"] = "PUBLISHED";
|
|
57
57
|
})(StreamStatus || (StreamStatus = {}));
|
|
58
|
+
export var EmbedStreamsOrderBy;
|
|
59
|
+
(function (EmbedStreamsOrderBy) {
|
|
60
|
+
EmbedStreamsOrderBy["ContentUpdatedAt"] = "CONTENT_UPDATED_AT";
|
|
61
|
+
})(EmbedStreamsOrderBy || (EmbedStreamsOrderBy = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Theme } from './theme-store.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Theme } from './theme-store.svelte';
|
|
@@ -17,23 +17,24 @@ export class InternalMediaCenterConfig {
|
|
|
17
17
|
this.graphql = createLocalGQLClient(graphqlOrigin, initiator ? { 'x-initiator': initiator } : undefined);
|
|
18
18
|
this.getConfig = async () => {
|
|
19
19
|
const payload = await this.graphql.query(GetMediaPageConfigDocument, { mediaPageId }).toPromise();
|
|
20
|
-
if (!payload.data?.
|
|
20
|
+
if (!payload.data?.embedMediaPage) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
const config = payload.data.
|
|
23
|
+
const config = payload.data.embedMediaPage;
|
|
24
24
|
return {
|
|
25
25
|
targetData: {
|
|
26
|
-
id: config.
|
|
27
|
-
handle: config.
|
|
28
|
-
name: config.
|
|
29
|
-
description: config.
|
|
30
|
-
image: config.
|
|
31
|
-
logo: config.
|
|
32
|
-
banner: config.
|
|
33
|
-
membersCount: config.
|
|
26
|
+
id: config.id,
|
|
27
|
+
handle: config.handle,
|
|
28
|
+
name: config.name,
|
|
29
|
+
description: config.description,
|
|
30
|
+
image: config.image?.url || null,
|
|
31
|
+
logo: config.logo?.url || null,
|
|
32
|
+
banner: config.banner?.url || null,
|
|
33
|
+
membersCount: config.membersCount
|
|
34
34
|
},
|
|
35
|
-
contentCategories: config.
|
|
36
|
-
|
|
35
|
+
contentCategories: config.menuSettings?.contentCategories || [],
|
|
36
|
+
categoryTagAssociations: config.menuSettings?.contentCategoryMenuItems || [],
|
|
37
|
+
playerColors: config.playerColors || null
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
this.postsPlayer = {
|
|
@@ -4,42 +4,48 @@ export type GetMediaPageConfigQueryVariables = SchemaTypes.Exact<{
|
|
|
4
4
|
mediaPageId: SchemaTypes.Scalars['String']['input'];
|
|
5
5
|
}>;
|
|
6
6
|
export type GetMediaPageConfigQuery = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
playerSettings: {
|
|
7
|
+
embedMediaPage: {
|
|
8
|
+
id: string;
|
|
9
|
+
handle: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
membersCount: number;
|
|
13
|
+
image: {
|
|
14
|
+
url: string;
|
|
15
|
+
} | null;
|
|
16
|
+
logo: {
|
|
17
|
+
url: string;
|
|
18
|
+
} | null;
|
|
19
|
+
banner: {
|
|
20
|
+
url: string;
|
|
21
|
+
} | null;
|
|
22
|
+
menuSettings: {
|
|
25
23
|
contentCategories: Array<{
|
|
26
24
|
id: string;
|
|
27
25
|
name: string;
|
|
28
26
|
image: string | null;
|
|
29
27
|
parentId: string | null;
|
|
30
28
|
}>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
contentCategoryMenuItems: Array<{
|
|
30
|
+
id: string;
|
|
31
|
+
tag: {
|
|
32
|
+
text: string;
|
|
33
|
+
backgroundColor: string;
|
|
34
|
+
fontColor: string;
|
|
35
|
+
} | null;
|
|
36
|
+
}> | null;
|
|
37
|
+
} | null;
|
|
38
|
+
playerColors: {
|
|
39
|
+
brand: string | null;
|
|
40
|
+
button: string | null;
|
|
41
|
+
buttonInactive: string | null;
|
|
42
|
+
cardButton: string | null;
|
|
43
|
+
cardBackground: string | null;
|
|
44
|
+
menuBackground: string | null;
|
|
45
|
+
playerBackground: string | null;
|
|
46
|
+
price: string | null;
|
|
47
|
+
salePrice: string | null;
|
|
48
|
+
sidebarBackground: string | null;
|
|
43
49
|
} | null;
|
|
44
50
|
} | null;
|
|
45
51
|
};
|
|
@@ -17,7 +17,7 @@ export const GetMediaPageConfigDocument = {
|
|
|
17
17
|
selections: [
|
|
18
18
|
{
|
|
19
19
|
kind: 'Field',
|
|
20
|
-
name: { kind: 'Name', value: '
|
|
20
|
+
name: { kind: 'Name', value: 'embedMediaPage' },
|
|
21
21
|
arguments: [
|
|
22
22
|
{
|
|
23
23
|
kind: 'Argument',
|
|
@@ -25,11 +25,7 @@ export const GetMediaPageConfigDocument = {
|
|
|
25
25
|
value: {
|
|
26
26
|
kind: 'ObjectValue',
|
|
27
27
|
fields: [
|
|
28
|
-
{
|
|
29
|
-
kind: 'ObjectField',
|
|
30
|
-
name: { kind: 'Name', value: 'mediaPageId' },
|
|
31
|
-
value: { kind: 'Variable', name: { kind: 'Name', value: 'mediaPageId' } }
|
|
32
|
-
}
|
|
28
|
+
{ kind: 'ObjectField', name: { kind: 'Name', value: 'id' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'mediaPageId' } } }
|
|
33
29
|
]
|
|
34
30
|
}
|
|
35
31
|
}
|
|
@@ -37,38 +33,29 @@ export const GetMediaPageConfigDocument = {
|
|
|
37
33
|
selectionSet: {
|
|
38
34
|
kind: 'SelectionSet',
|
|
39
35
|
selections: [
|
|
36
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
37
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'handle' } },
|
|
38
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
|
|
39
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
40
40
|
{
|
|
41
41
|
kind: 'Field',
|
|
42
|
-
name: { kind: 'Name', value: '
|
|
43
|
-
selectionSet: {
|
|
44
|
-
kind: 'SelectionSet',
|
|
45
|
-
selections: [
|
|
46
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
47
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'handle' } },
|
|
48
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'name' } },
|
|
49
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
50
|
-
{
|
|
51
|
-
kind: 'Field',
|
|
52
|
-
name: { kind: 'Name', value: 'image' },
|
|
53
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
kind: 'Field',
|
|
57
|
-
name: { kind: 'Name', value: 'logo' },
|
|
58
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
kind: 'Field',
|
|
62
|
-
name: { kind: 'Name', value: 'banner' },
|
|
63
|
-
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
64
|
-
},
|
|
65
|
-
{ kind: 'Field', name: { kind: 'Name', value: 'membersCount' } }
|
|
66
|
-
]
|
|
67
|
-
}
|
|
42
|
+
name: { kind: 'Name', value: 'image' },
|
|
43
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
68
44
|
},
|
|
69
45
|
{
|
|
70
46
|
kind: 'Field',
|
|
71
|
-
name: { kind: 'Name', value: '
|
|
47
|
+
name: { kind: 'Name', value: 'logo' },
|
|
48
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
kind: 'Field',
|
|
52
|
+
name: { kind: 'Name', value: 'banner' },
|
|
53
|
+
selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'url' } }] }
|
|
54
|
+
},
|
|
55
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'membersCount' } },
|
|
56
|
+
{
|
|
57
|
+
kind: 'Field',
|
|
58
|
+
name: { kind: 'Name', value: 'menuSettings' },
|
|
72
59
|
selectionSet: {
|
|
73
60
|
kind: 'SelectionSet',
|
|
74
61
|
selections: [
|
|
@@ -87,25 +74,47 @@ export const GetMediaPageConfigDocument = {
|
|
|
87
74
|
},
|
|
88
75
|
{
|
|
89
76
|
kind: 'Field',
|
|
90
|
-
name: { kind: 'Name', value: '
|
|
77
|
+
name: { kind: 'Name', value: 'contentCategoryMenuItems' },
|
|
91
78
|
selectionSet: {
|
|
92
79
|
kind: 'SelectionSet',
|
|
93
80
|
selections: [
|
|
94
|
-
{ kind: 'Field', name: { kind: 'Name', value: '
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
81
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
82
|
+
{
|
|
83
|
+
kind: 'Field',
|
|
84
|
+
name: { kind: 'Name', value: 'tag' },
|
|
85
|
+
selectionSet: {
|
|
86
|
+
kind: 'SelectionSet',
|
|
87
|
+
selections: [
|
|
88
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'text' } },
|
|
89
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'backgroundColor' } },
|
|
90
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fontColor' } }
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
104
94
|
]
|
|
105
95
|
}
|
|
106
96
|
}
|
|
107
97
|
]
|
|
108
98
|
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
kind: 'Field',
|
|
102
|
+
name: { kind: 'Name', value: 'playerColors' },
|
|
103
|
+
selectionSet: {
|
|
104
|
+
kind: 'SelectionSet',
|
|
105
|
+
selections: [
|
|
106
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'brand' } },
|
|
107
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'button' } },
|
|
108
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'buttonInactive' } },
|
|
109
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'cardButton' } },
|
|
110
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'cardBackground' } },
|
|
111
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'menuBackground' } },
|
|
112
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'playerBackground' } },
|
|
113
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'price' } },
|
|
114
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
|
|
115
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'sidebarBackground' } }
|
|
116
|
+
]
|
|
117
|
+
}
|
|
109
118
|
}
|
|
110
119
|
]
|
|
111
120
|
}
|
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
query GetMediaPageConfig($mediaPageId: String!) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
url
|
|
13
|
-
}
|
|
14
|
-
banner {
|
|
15
|
-
url
|
|
16
|
-
}
|
|
17
|
-
membersCount
|
|
2
|
+
embedMediaPage(input: { id: $mediaPageId }) {
|
|
3
|
+
id
|
|
4
|
+
handle
|
|
5
|
+
name
|
|
6
|
+
description
|
|
7
|
+
image {
|
|
8
|
+
url
|
|
9
|
+
}
|
|
10
|
+
logo {
|
|
11
|
+
url
|
|
18
12
|
}
|
|
19
|
-
|
|
13
|
+
banner {
|
|
14
|
+
url
|
|
15
|
+
}
|
|
16
|
+
membersCount
|
|
17
|
+
menuSettings {
|
|
20
18
|
contentCategories {
|
|
21
19
|
id
|
|
22
20
|
name
|
|
23
21
|
image
|
|
24
22
|
parentId
|
|
25
23
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
playerBackground
|
|
34
|
-
price
|
|
35
|
-
salePrice
|
|
36
|
-
sidebarBackground
|
|
24
|
+
contentCategoryMenuItems {
|
|
25
|
+
id
|
|
26
|
+
tag {
|
|
27
|
+
text
|
|
28
|
+
backgroundColor
|
|
29
|
+
fontColor
|
|
30
|
+
}
|
|
37
31
|
}
|
|
38
32
|
}
|
|
33
|
+
playerColors {
|
|
34
|
+
brand
|
|
35
|
+
button
|
|
36
|
+
buttonInactive
|
|
37
|
+
cardButton
|
|
38
|
+
cardBackground
|
|
39
|
+
menuBackground
|
|
40
|
+
playerBackground
|
|
41
|
+
price
|
|
42
|
+
salePrice
|
|
43
|
+
sidebarBackground
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
}
|
|
@@ -50,6 +50,14 @@ export type MediaCenterConfigModel = {
|
|
|
50
50
|
image: string | null;
|
|
51
51
|
parentId: string | null;
|
|
52
52
|
}[];
|
|
53
|
+
categoryTagAssociations: {
|
|
54
|
+
id: string;
|
|
55
|
+
tag: {
|
|
56
|
+
text: string;
|
|
57
|
+
fontColor: string;
|
|
58
|
+
backgroundColor: string;
|
|
59
|
+
} | null;
|
|
60
|
+
}[];
|
|
53
61
|
targetData: MediaCenterTargetDataModel;
|
|
54
62
|
playerColors: {
|
|
55
63
|
brand: string | null;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script lang="ts">import { Theme } from '../../core/theme';
|
|
2
|
+
import { Utils } from '../../core/utils';
|
|
3
|
+
import { Loading } from '../../ui/loading';
|
|
4
|
+
import {} from '../../ui/player/close-orchestrator';
|
|
5
|
+
import { ShadowRoot } from '../../ui/shadow-dom';
|
|
6
|
+
import { MediaCenterContext } from './media-center-context.svelte';
|
|
7
|
+
import { default as MediaCenterView } from './media-center-view.svelte';
|
|
8
|
+
import { untrack } from 'svelte';
|
|
9
|
+
let { config, modeProps, settings, closeOrchestrator } = $props();
|
|
10
|
+
const context = new MediaCenterContext({
|
|
11
|
+
config,
|
|
12
|
+
closeOrchestrator,
|
|
13
|
+
settings,
|
|
14
|
+
on: {
|
|
15
|
+
initialized: (instance) => {
|
|
16
|
+
switch (modeProps.mode) {
|
|
17
|
+
case 'posts':
|
|
18
|
+
instance.playPostsFeed({
|
|
19
|
+
dataProvider: modeProps.props.dataProvider,
|
|
20
|
+
onPostActivated: modeProps.props.onPostActivated
|
|
21
|
+
});
|
|
22
|
+
break;
|
|
23
|
+
case 'streams':
|
|
24
|
+
instance.playStreamsFeed({
|
|
25
|
+
dataProvider: modeProps.props.dataProvider,
|
|
26
|
+
onStreamActivated: modeProps.props.onStreamActivated
|
|
27
|
+
});
|
|
28
|
+
break;
|
|
29
|
+
case 'discover':
|
|
30
|
+
instance.activateDiscover({ categoryId: null });
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
Utils.assertUnreachable(modeProps);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
failed: () => {
|
|
37
|
+
console.error('Media Center initialization failed');
|
|
38
|
+
closeOrchestrator.requestClose();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
$effect(() => {
|
|
43
|
+
void (settings === null || settings === void 0 ? void 0 : settings.theme);
|
|
44
|
+
untrack(() => {
|
|
45
|
+
var _a;
|
|
46
|
+
Theme.set((_a = settings === null || settings === void 0 ? void 0 : settings.theme) !== null && _a !== void 0 ? _a : 'dark');
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
{#if context.initializing}
|
|
52
|
+
<Loading positionFixedCenter={true} timeout={600} />
|
|
53
|
+
{:else if !context.initialized}
|
|
54
|
+
Not initialized placeholder
|
|
55
|
+
{:else}
|
|
56
|
+
<ShadowRoot {...context.backgroundWrapperProps}>
|
|
57
|
+
<MediaCenterView context={context} />
|
|
58
|
+
</ShadowRoot>
|
|
59
|
+
{/if}
|