@streamscloud/embeddable 15.0.0-rc.0 → 15.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/external-api/data-providers/internal-media-center-analytics-handler.js +5 -5
  2. package/dist/external-api/data-providers/internal-post-analytics-handler.js +2 -2
  3. package/dist/external-api/data-providers/internal-stream-analytics-handler.js +5 -5
  4. package/dist/external-api/media-page/index.js +1 -1
  5. package/dist/media-center/media-center/discover/discover-view-handler.svelte.js +1 -1
  6. package/dist/media-center/media-center/discover/discover-view.svelte +11 -33
  7. package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +12 -5
  8. package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.js +17 -5
  9. package/dist/media-center/media-center/header/media-center-header-mobile.svelte +4 -2
  10. package/dist/media-center/media-center/header/media-center-header.svelte +4 -2
  11. package/dist/media-center/media-center/media-center-settings.svelte.js +2 -2
  12. package/dist/media-center/media-center/media-center-view.svelte +7 -3
  13. package/dist/media-center/media-center/menu/menu.svelte +4 -6
  14. package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +2 -6
  15. package/dist/posts/post-viewer/attachments-horizontal.svelte +15 -6
  16. package/dist/posts/post-viewer/cmp.post-viewer.svelte +4 -1
  17. package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +2 -0
  18. package/dist/posts/post-viewer/heading.svelte +6 -4
  19. package/dist/posts/post-viewer/media/post-media.svelte +5 -1
  20. package/dist/posts/post-viewer/post-texts.svelte +4 -2
  21. package/dist/streams/layout/cmp.layout.svelte +4 -1
  22. package/dist/streams/layout/cmp.layout.svelte.d.ts +1 -0
  23. package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +3 -2
  24. package/dist/streams/layout/element-views/price-element-view.svelte +5 -5
  25. package/dist/streams/layout/styles-transformer.d.ts +2 -1
  26. package/dist/streams/layout/styles-transformer.js +15 -9
  27. package/dist/streams/layout/styles.d.ts +1 -0
  28. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +2 -2
  29. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +2 -0
  30. package/dist/streams/streams-player/streams-player-view.svelte +163 -46
  31. package/dist/streams/streams-player/types.d.ts +1 -0
  32. package/dist/ui/button/resources/button-theme.svelte +2 -4
  33. package/dist/ui/icon/cmp.icon.svelte +1 -1
  34. package/dist/ui/player/button/cmp.player-button.svelte +1 -3
  35. package/dist/ui/player/button/cmp.player-buttons-group.svelte +1 -3
  36. package/dist/ui/player/player/cmp.player.svelte.d.ts +6 -15
  37. package/dist/ui/player/player/controls-and-attachments.svelte.d.ts +6 -15
  38. package/dist/ui/player/player/overview-panel.svelte +1 -3
  39. package/dist/ui/player/player/overview-panel.svelte.d.ts +5 -14
  40. package/dist/ui/player/progress/cmp.chunks-progress.svelte +60 -0
  41. package/dist/ui/player/progress/cmp.chunks-progress.svelte.d.ts +9 -0
  42. package/dist/ui/player/progress/index.d.ts +1 -0
  43. package/dist/ui/player/progress/index.js +1 -0
  44. package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.js +2 -2
  45. package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +5 -14
  46. package/dist/ui/player/slider-horizontal/cmp.slider.svelte +2 -6
  47. package/dist/ui/player/slider-horizontal/cmp.slider.svelte.d.ts +5 -12
  48. package/dist/ui/shadow-dom/cmp.shadow-root.svelte +2 -2
  49. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">var _a;
2
2
  import { StockStreamElementLocalization } from './stock-stream-element-localization';
3
3
  import { StockStreamElementLevel } from '../enums';
4
- import { mapFlexJustifyContent, transformNumericValue } from '../styles-transformer';
4
+ import { mapFlexJustifyContent, transformNumericValue, transformTextColorValue } from '../styles-transformer';
5
5
  let { model, heightOverrideDdu, locale } = $props();
6
6
  const localization = $derived(new StockStreamElementLocalization(locale));
7
7
  const height = $derived(heightOverrideDdu || ((_a = model.styles) === null || _a === void 0 ? void 0 : _a.height) || 16);
@@ -19,7 +19,8 @@ const dotCustomStyles = $derived.by(() => {
19
19
  return values.join('');
20
20
  });
21
21
  const quantityCustomStyles = $derived.by(() => {
22
- const values = [`font-size: ${transformNumericValue(height * 0.75)};`];
22
+ var _a;
23
+ const values = [`font-size: ${transformNumericValue(height * 0.75)};`, `color: ${transformTextColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.color)};`];
23
24
  return values.join('');
24
25
  });
25
26
  </script>
@@ -12,7 +12,7 @@ import { toPriceRepresentation } from '../../../products/price-helper';
12
12
  import { LineClamp } from '../../../ui/line-clamp';
13
13
  import { PriceStreamElementLocalization } from './price-stream-element-localization';
14
14
  import { default as StockElementView } from './cmp.stock-stream-element.svelte';
15
- import { mapFlexJustifyContent, mapFontFamily, mapFontWeight, transformColorValue, transformFontSizeValue, transformNumericValue } from '../styles-transformer';
15
+ import { mapFlexJustifyContent, mapFontFamily, mapFontWeight, transformTextColorValue, transformBackgroundColorValue, transformFontSizeValue, transformNumericValue } from '../styles-transformer';
16
16
  let { maxElementHeight, model, data, localization, on } = $props();
17
17
  let priceElementRef = $state.raw(null);
18
18
  let priceContainerRef = $state.raw(null);
@@ -62,7 +62,7 @@ const priceCustomStyles = $derived.by(() => {
62
62
  `font-size: ${transformFontSizeValue(priceHeight / lineHeight)};`,
63
63
  `line-height: ${lineHeight};`,
64
64
  `font-weight: ${mapFontWeight((_a = model.styles) === null || _a === void 0 ? void 0 : _a.fontWeight)};`,
65
- `color: ${transformColorValue(data.salePrice ? (_b = model.styles) === null || _b === void 0 ? void 0 : _b.salePriceColor : (_c = model.styles) === null || _c === void 0 ? void 0 : _c.regularPriceColor)};`
65
+ `color: ${transformTextColorValue(data.salePrice ? (_b = model.styles) === null || _b === void 0 ? void 0 : _b.salePriceColor : (_c = model.styles) === null || _c === void 0 ? void 0 : _c.regularPriceColor)};`
66
66
  ];
67
67
  return values.join('');
68
68
  });
@@ -74,8 +74,8 @@ const saveValueCustomStyles = $derived.by(() => {
74
74
  `font-weight: 500;`,
75
75
  `padding: ${transformNumericValue(priceHeight / 8)} ${transformNumericValue(priceHeight / 4)};`,
76
76
  `border-radius: ${transformNumericValue(priceHeight / 8)};`,
77
- `background-color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.saveValueBackgroundColor)};`,
78
- `color: ${transformColorValue((_b = model.styles) === null || _b === void 0 ? void 0 : _b.saveValueColor)};`
77
+ `background-color: ${transformBackgroundColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.saveValueBackgroundColor)};`,
78
+ `color: ${transformTextColorValue((_b = model.styles) === null || _b === void 0 ? void 0 : _b.saveValueColor)};`
79
79
  ];
80
80
  return values.join('');
81
81
  });
@@ -84,7 +84,7 @@ const beforeValueCustomStyles = $derived.by(() => {
84
84
  const values = [
85
85
  `font-size: ${transformFontSizeValue(priceHeight / 5)};`,
86
86
  `font-weight: 500;`,
87
- `color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.beforeValueColor)};`
87
+ `color: ${transformTextColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.beforeValueColor)};`
88
88
  ];
89
89
  return values.join('');
90
90
  });
@@ -13,4 +13,5 @@ export declare const mapTextAlign: (value: StreamElementStyleHorizontalAlign | n
13
13
  export declare const mapFlexJustifyContent: (value: StreamElementStyleHorizontalAlign | null | undefined) => "center" | "flex-start" | "flex-end";
14
14
  export declare const transformFontSizeValue: (value: number | null | undefined) => string;
15
15
  export declare const transformNumericValue: (value: number | null | undefined, fallback?: string) => string;
16
- export declare const transformColorValue: (value: string | null | undefined) => string;
16
+ export declare const transformTextColorValue: (value: string | null | undefined) => string;
17
+ export declare const transformBackgroundColorValue: (value: string | null | undefined) => string;
@@ -4,7 +4,7 @@ export const generateStreamLayoutStyles = (styles) => {
4
4
  if (!styles) {
5
5
  return '';
6
6
  }
7
- const values = [`background-color: ${transformColorValue(styles.backgroundColor)}`, `font-family: ${mapFontFamily(styles.fontFamily)}`];
7
+ const values = [`background-color: ${transformBackgroundColorValue(styles.backgroundColor)}`, `font-family: ${mapFontFamily(styles.fontFamily)}`];
8
8
  return values.join(';');
9
9
  };
10
10
  export const generateContainerStyles = (styles) => {
@@ -20,10 +20,10 @@ export const generateContainerStyles = (styles) => {
20
20
  `padding-right: ${transformNumericValue(styles.paddingRight)}`,
21
21
  `padding-bottom: ${transformNumericValue(styles.paddingBottom)}`,
22
22
  `padding-left: ${transformNumericValue(styles.paddingLeft)}`,
23
- `background-color: ${transformColorValue(styles.backgroundColor)}`,
23
+ `background-color: ${transformBackgroundColorValue(styles.backgroundColor)}`,
24
24
  `border-width: ${styles.borderColor ? '1px' : '0'}`,
25
25
  `border-radius: ${transformNumericValue(styles.borderRadius)}`,
26
- `border-color: ${transformColorValue(styles.borderColor)}`,
26
+ `border-color: ${transformBackgroundColorValue(styles.borderColor)}`,
27
27
  `overflow: ${styles.borderRadius ? 'hidden' : 'visible'}`
28
28
  ];
29
29
  if (styles.direction) {
@@ -49,11 +49,11 @@ export const generateButtonStyles = (styles) => {
49
49
  `padding-right: ${transformNumericValue(styles.paddingRight)}`,
50
50
  `padding-bottom: ${transformNumericValue(styles.paddingBottom)}`,
51
51
  `padding-left: ${transformNumericValue(styles.paddingLeft)}`,
52
- `color: ${transformColorValue(styles.textColor)}`,
53
- `background-color: ${transformColorValue(styles.backgroundColor)}`,
52
+ `color: ${transformTextColorValue(styles.textColor)}`,
53
+ `background-color: ${transformBackgroundColorValue(styles.backgroundColor)}`,
54
54
  `border-width: ${styles.borderColor ? '1px' : '0'}`,
55
55
  `border-radius: ${transformNumericValue(styles.borderRadius)}`,
56
- `border-color: ${transformColorValue(styles.borderColor)}`,
56
+ `border-color: ${transformBackgroundColorValue(styles.borderColor)}`,
57
57
  `overflow: hidden`
58
58
  ];
59
59
  return values.join(';');
@@ -94,7 +94,7 @@ export const generateProductsSliderStyles = (styles) => {
94
94
  `padding-right: ${transformNumericValue(styles.paddingRight)}`,
95
95
  `padding-bottom: ${transformNumericValue(styles.paddingBottom)}`,
96
96
  `padding-left: ${transformNumericValue(styles.paddingLeft)}`,
97
- `background-color: ${transformColorValue(styles.backgroundColor)}`,
97
+ `background-color: ${transformBackgroundColorValue(styles.backgroundColor)}`,
98
98
  `overflow-x: auto`,
99
99
  `overflow-y: hidden`,
100
100
  `scrollbar-width: none`,
@@ -111,7 +111,7 @@ export const generateTextStyles = (styles) => {
111
111
  `font-weight: ${mapFontWeight(styles.fontWeight)}`,
112
112
  `line-height: ${transformNumericValue(styles.lineHeight, '1.2')}`,
113
113
  `text-align: ${mapTextAlign(styles.textAlign)}`,
114
- `color: ${transformColorValue(styles.color)}`
114
+ `color: ${transformTextColorValue(styles.color)}`
115
115
  ];
116
116
  return values.join(';');
117
117
  };
@@ -203,7 +203,13 @@ export const transformNumericValue = (value, fallback = '0') => {
203
203
  }
204
204
  return `${(value / baseContainerWidth) * 100}cqi`;
205
205
  };
206
- export const transformColorValue = (value) => {
206
+ export const transformTextColorValue = (value) => {
207
+ if (value === null || value === undefined) {
208
+ return '#000000';
209
+ }
210
+ return value;
211
+ };
212
+ export const transformBackgroundColorValue = (value) => {
207
213
  if (value === null || value === undefined) {
208
214
  return 'transparent';
209
215
  }
@@ -66,6 +66,7 @@ export type ProductsSliderStreamElementStyles = {
66
66
  export type StockStreamElementStyles = {
67
67
  height?: number | null;
68
68
  horizontalAlign?: StreamElementStyleHorizontalAlign | null;
69
+ color?: string | null;
69
70
  };
70
71
  export type TextStreamElementStyles = {
71
72
  fontSize?: number | null;
@@ -1,12 +1,12 @@
1
1
  <script lang="ts">import { StreamLayoutSlot, StreamPageLayout, StreamLayoutSlotContent } from '../layout';
2
2
  import { ResponsivePlayerButtonsGroup } from '../../ui/player/button';
3
3
  import { StreamPageViewerLocalization } from './stream-page-viewer-localization';
4
- let { page, trackingParams, overlayControls, locale, on } = $props();
4
+ let { page, trackingParams, overlayControls, locale, on, overlay } = $props();
5
5
  const localization = $derived(new StreamPageViewerLocalization(locale));
6
6
  </script>
7
7
 
8
8
  {#if page.type === 'general'}
9
- <StreamPageLayout model={page.layout}>
9
+ <StreamPageLayout model={page.layout} overlay={overlay}>
10
10
  {#each page.layout.slots as slot (slot)}
11
11
  <StreamLayoutSlot model={slot}>
12
12
  <StreamLayoutSlotContent model={slot} trackingParams={trackingParams} on={on} locale={localization.elementsLocale} />
@@ -2,6 +2,7 @@ import type { Locale } from '../../core/locale';
2
2
  import { type StreamTrackingParams } from '../layout';
3
3
  import { type PlayerButtonDef } from '../../ui/player/button';
4
4
  import type { StreamPageViewerModel } from './types';
5
+ import type { Snippet } from 'svelte';
5
6
  type Props = {
6
7
  page: StreamPageViewerModel;
7
8
  trackingParams: StreamTrackingParams;
@@ -19,6 +20,7 @@ type Props = {
19
20
  productImpression?: (productId: string) => void;
20
21
  progress?: (videoId: string, progress: number) => void;
21
22
  };
23
+ overlay?: Snippet;
22
24
  };
23
25
  declare const Cmp: import("svelte").Component<Props, {}, "">;
24
26
  type Cmp = ReturnType<typeof Cmp>;
@@ -17,6 +17,7 @@ import { mapToPostModel } from '../layout/models';
17
17
  import { StreamPageViewer } from '../stream-page-viewer';
18
18
  import { IconColor } from '../../ui/icon';
19
19
  import { Player, PlayerConfig, PlayerSettings } from '../../ui/player';
20
+ import { ChunksProgress } from '../../ui/player/progress';
20
21
  import { default as Overview } from './stream-overview.svelte';
21
22
  import { StreamPlayerLocalization } from './stream-player-localization';
22
23
  import { StreamsPlayerBuffer } from './streams-player-buffer.svelte';
@@ -232,6 +233,49 @@ const currentItemActions = $derived.by(() => {
232
233
  }
233
234
  return result;
234
235
  });
236
+ const handlePageViewMounted = (node) => {
237
+ const updatePosition = () => {
238
+ var _a;
239
+ const progressElement = node.querySelector('[id^="chunk-progress-"]');
240
+ if (!progressElement) {
241
+ return;
242
+ }
243
+ const overlayMinOffsetTop = (_a = playerSettings === null || playerSettings === void 0 ? void 0 : playerSettings.overlayMinOffsetTop) !== null && _a !== void 0 ? _a : 0;
244
+ if (!overlayMinOffsetTop) {
245
+ progressElement.style.top = '';
246
+ return;
247
+ }
248
+ const contentElement = node.firstElementChild;
249
+ if (!contentElement) {
250
+ progressElement.style.top = '';
251
+ return;
252
+ }
253
+ const nodeRect = node.getBoundingClientRect();
254
+ const contentRect = contentElement.getBoundingClientRect();
255
+ const contentOffsetTop = contentRect.top - nodeRect.top;
256
+ if (contentOffsetTop <= 0) {
257
+ progressElement.style.top = `${overlayMinOffsetTop}px`;
258
+ return;
259
+ }
260
+ const overlayOverlap = overlayMinOffsetTop - contentOffsetTop;
261
+ if (overlayOverlap > 0) {
262
+ progressElement.style.top = `${overlayOverlap}px`;
263
+ }
264
+ else {
265
+ progressElement.style.top = '';
266
+ }
267
+ };
268
+ updatePosition();
269
+ const resizeObserver = new ResizeObserver(() => {
270
+ updatePosition();
271
+ });
272
+ resizeObserver.observe(node);
273
+ return {
274
+ destroy() {
275
+ resizeObserver.disconnect();
276
+ }
277
+ };
278
+ };
235
279
  //#region Activity Tracking
236
280
  const resetInactivityTimer = () => {
237
281
  if (!isActive) {
@@ -297,59 +341,82 @@ const stopActivityTracking = () => {
297
341
  }} />
298
342
  {/if}
299
343
  {/snippet}
344
+ {#snippet overlay()}
345
+ {#if buffer?.activeChunk && buffer.activeChunk.chunkItems.length > 1}
346
+ <div class="stream-progress" id="chunk-progress-{buffer.activeChunk.model.id}">
347
+ {#snippet info()}
348
+ <div class="stream-progress-info">
349
+ <div class="stream-progress-info__title">
350
+ {buffer?.activeChunk.model.title}
351
+ </div>
352
+ {#if buffer?.activeChunk.model.subTitle}
353
+ <div class="stream-progress-info__sub-title">
354
+ {buffer.activeChunk.model.subTitle}
355
+ </div>
356
+ {/if}
357
+ </div>
358
+ {/snippet}
359
+ <ChunksProgress totalItems={buffer.activeChunk.model.pagesCount} activeItemIndex={buffer.activeChunk.activeItemIndex} chunkInfo={info} />
360
+ </div>
361
+ {/if}
362
+ {/snippet}
300
363
  <Player
301
364
  config={contentPlayerConfig}
302
365
  itemActions={currentItemActions}
303
366
  attachmentsView={buffer?.current && itemAsPostModel(buffer.current)?.attachments ? attachmentsView : undefined}>
304
367
  {#snippet itemView({ item })}
305
- {#if item.type === 'general'}
306
- <StreamPageViewer
307
- page={item}
308
- trackingParams={streamTrackingParams}
309
- locale={localization.locale}
310
- overlayControls={{
311
- enabled: contentPlayerConfig.uiManager.showControlsOverlay,
312
- colors: {
313
- active: contentPlayerConfig.playerColors.button,
314
- inactive: contentPlayerConfig.playerColors.buttonInactive
315
- },
316
- actions: buffer?.activeChunk
317
- ? streamActionsGenerator.getGeneralStreamPageActions({ streamId: buffer.activeChunk.model.id, streamPageId: item.id })
318
- : []
319
- }}
320
- on={{
321
- progress: (videoId, progress) => onProgress(item.id, videoId, progress),
322
- productClick: (productId) => onStreamProductClick(productId),
323
- productImpression: (productId) => onStreamProductImpression(productId)
324
- }} />
325
- {:else}
326
- {@const postModel = itemAsPostModel(item)}
327
- {#if postModel}
328
- {@const handler = buffer?.activeChunk
329
- ? streamActionsGenerator.getPostActionsHandler({
330
- model: postModel,
331
- streamId: buffer.activeChunk.model.id,
332
- streamPageId: item.id
333
- })
334
- : null}
335
- <PostViewer
336
- model={postModel}
337
- controlsColors={{ active: contentPlayerConfig.playerColors.button, inactive: contentPlayerConfig.playerColors.buttonInactive }}
338
- trackingParams={trackingParams}
339
- enableAttachments={contentPlayerConfig.uiManager.showAttachmentsOverlay}
340
- enableControls={contentPlayerConfig.uiManager.showControlsOverlay}
341
- controlActions={handler?.actions ?? []}
342
- autoplay="on-appearance"
343
- locale={contentPlayerConfig.settings.locale}
368
+ <div class="page-view" use:handlePageViewMounted>
369
+ {#if item.type === 'general'}
370
+ <StreamPageViewer
371
+ page={item}
372
+ trackingParams={streamTrackingParams}
373
+ locale={localization.locale}
374
+ overlayControls={{
375
+ enabled: contentPlayerConfig.uiManager.showControlsOverlay,
376
+ colors: {
377
+ active: contentPlayerConfig.playerColors.button,
378
+ inactive: contentPlayerConfig.playerColors.buttonInactive
379
+ },
380
+ actions: buffer?.activeChunk
381
+ ? streamActionsGenerator.getGeneralStreamPageActions({ streamId: buffer.activeChunk.model.id, streamPageId: item.id })
382
+ : []
383
+ }}
344
384
  on={{
345
- progress: (progress) => onShortVideoProgress(item.id, postModel.id, progress),
346
- productClick: (productId) => onShortVideoProductClick(productId, postModel.id),
347
- productImpression: (productId) => onShortVideoProductImpression(productId, postModel.id),
348
- adClick: (adId) => onShortVideoAdClick(adId),
349
- adImpression: (adId) => onShortVideoAdImpression(adId)
350
- }} />
385
+ progress: (videoId, progress) => onProgress(item.id, videoId, progress),
386
+ productClick: (productId) => onStreamProductClick(productId),
387
+ productImpression: (productId) => onStreamProductImpression(productId)
388
+ }}
389
+ overlay={overlay} />
390
+ {:else}
391
+ {@const postModel = itemAsPostModel(item)}
392
+ {#if postModel}
393
+ {@const handler = buffer?.activeChunk
394
+ ? streamActionsGenerator.getPostActionsHandler({
395
+ model: postModel,
396
+ streamId: buffer.activeChunk.model.id,
397
+ streamPageId: item.id
398
+ })
399
+ : null}
400
+ <PostViewer
401
+ model={postModel}
402
+ controlsColors={{ active: contentPlayerConfig.playerColors.button, inactive: contentPlayerConfig.playerColors.buttonInactive }}
403
+ trackingParams={trackingParams}
404
+ enableAttachments={contentPlayerConfig.uiManager.showAttachmentsOverlay}
405
+ enableControls={contentPlayerConfig.uiManager.showControlsOverlay}
406
+ controlActions={handler?.actions ?? []}
407
+ autoplay="on-appearance"
408
+ locale={contentPlayerConfig.settings.locale}
409
+ on={{
410
+ progress: (progress) => onShortVideoProgress(item.id, postModel.id, progress),
411
+ productClick: (productId) => onShortVideoProductClick(productId, postModel.id),
412
+ productImpression: (productId) => onShortVideoProductImpression(productId, postModel.id),
413
+ adClick: (adId) => onShortVideoAdClick(adId),
414
+ adImpression: (adId) => onShortVideoAdImpression(adId)
415
+ }}
416
+ overlay={overlay} />
417
+ {/if}
351
418
  {/if}
352
- {/if}
419
+ </div>
353
420
  {/snippet}
354
421
  {#snippet overviewPanelContent()}
355
422
  {#if buffer}
@@ -362,3 +429,53 @@ const stopActivityTracking = () => {
362
429
  {/if}
363
430
  {/snippet}
364
431
  </Player>
432
+
433
+ <style>@keyframes fadeIn {
434
+ 0% {
435
+ opacity: 1;
436
+ }
437
+ 50% {
438
+ opacity: 0.4;
439
+ }
440
+ 100% {
441
+ opacity: 1;
442
+ }
443
+ }
444
+ .page-view {
445
+ width: 100%;
446
+ height: 100%;
447
+ position: relative;
448
+ display: flex;
449
+ justify-content: center;
450
+ align-items: center;
451
+ }
452
+
453
+ .stream-progress {
454
+ position: absolute;
455
+ top: 0.75rem;
456
+ left: 1rem;
457
+ right: 1rem;
458
+ }
459
+
460
+ .stream-progress-info {
461
+ color: var(--sc-mc-color--text-white);
462
+ text-shadow: var(--sc-mc-color--text-white-shadow);
463
+ display: flex;
464
+ flex-direction: column;
465
+ min-width: 0;
466
+ gap: 0.25rem;
467
+ }
468
+ .stream-progress-info__title {
469
+ font-size: 1.125rem;
470
+ text-overflow: ellipsis;
471
+ width: 100%;
472
+ white-space: nowrap;
473
+ overflow: hidden;
474
+ }
475
+ .stream-progress-info__sub-title {
476
+ font-size: 0.875rem;
477
+ text-overflow: ellipsis;
478
+ width: 100%;
479
+ white-space: nowrap;
480
+ overflow: hidden;
481
+ }</style>
@@ -48,6 +48,7 @@ export type StreamsPlayerSettings = {
48
48
  locale?: Locale;
49
49
  showStreamsCloudWatermark?: boolean;
50
50
  playerColors?: Record<ThemeValue, PlayerColors>;
51
+ overlayMinOffsetTop?: number;
51
52
  };
52
53
  export type StreamAmplificationParameters = {
53
54
  campaignId: string;
@@ -36,6 +36,7 @@ let { style = undefined, size = ButtonSize.Standard, children } = $props();
36
36
  }
37
37
  .button-theme {
38
38
  display: contents;
39
+ /*Size*/
39
40
  }
40
41
  .button-theme--standard {
41
42
  --button--font--color: var(--sc-mc-color--text-primary);
@@ -45,15 +46,12 @@ let { style = undefined, size = ButtonSize.Standard, children } = $props();
45
46
  --button--background--disabled: #f2f2f3;
46
47
  --button--border: 1px solid #e5e7eb;
47
48
  }
48
- :global([data-theme='dark']) .button-theme--standard {
49
+ :global([data-theme="dark"]) .button-theme--standard {
49
50
  --button--background--hover: #1f2937;
50
51
  --button--background--active: #374151;
51
52
  --button--background--disabled: #374151;
52
53
  --button--border: 1px solid #4b5563;
53
54
  }
54
- .button-theme {
55
- /*Size*/
56
- }
57
55
  .button-theme--size-standard {
58
56
  --button--height: 2em;
59
57
  --button--text--font-size: 0.75em;
@@ -73,7 +73,7 @@ let { src, color = null } = $props();
73
73
  stroke: var(--_icon--stroke-color, var(--_icon--color));
74
74
  stroke-width: var(--_icon--stroke-width);
75
75
  }
76
- :global([data-theme='dark']) .icon :global(path) {
76
+ :global([data-theme="dark"]) .icon :global(path) {
77
77
  stroke: var(--_icon--stroke-color, var(--_icon--color));
78
78
  stroke-width: var(--_icon--stroke-width);
79
79
  }</style>
@@ -47,6 +47,7 @@ const styles = $derived.by(() => {
47
47
  color: var(--sc-mc-color--text-white);
48
48
  --icon--color: var(--sc-mc-color--icon-overlay);
49
49
  --icon--size: 1.75rem;
50
+ /* Set 'container-type: inline-size;' to reference container*/
50
51
  }
51
52
  .player-button:hover:not(:disabled) {
52
53
  background-color: var(--_player-button--color);
@@ -63,9 +64,6 @@ const styles = $derived.by(() => {
63
64
  transform: scale(var(--_player-button--icon-scale));
64
65
  transition: 0.3s;
65
66
  }
66
- .player-button {
67
- /* Set 'container-type: inline-size;' to reference container*/
68
- }
69
67
  @container (width < 576px) {
70
68
  .player-button {
71
69
  padding: 0.5rem;
@@ -47,6 +47,7 @@ const styles = $derived.by(() => {
47
47
  background: var(--_player-buttons-group--background-color);
48
48
  padding: 0.4375rem 0.0625rem;
49
49
  pointer-events: auto;
50
+ /* Set 'container-type: inline-size;' to reference container*/
50
51
  }
51
52
  .player-buttons-group__action {
52
53
  --_player-action--icon-scale: 1;
@@ -72,9 +73,6 @@ const styles = $derived.by(() => {
72
73
  transform: scale(var(--_player-action--icon-scale));
73
74
  transition: 0.3s;
74
75
  }
75
- .player-buttons-group {
76
- /* Set 'container-type: inline-size;' to reference container*/
77
- }
78
76
  @container (width < 576px) {
79
77
  .player-buttons-group {
80
78
  border-radius: 0.9375rem;
@@ -1,10 +1,10 @@
1
1
  import type { PlayerButtonDef } from '../button';
2
2
  import type { PlayerConfig } from './player-config.svelte';
3
3
  import { type Snippet } from 'svelte';
4
- declare function $$render<T extends {
4
+ declare class __sveltets_Render<T extends {
5
5
  id: string;
6
- }>(): {
7
- props: {
6
+ }> {
7
+ props(): {
8
8
  config: PlayerConfig<T>;
9
9
  itemActions: PlayerButtonDef[];
10
10
  itemView: Snippet<[{
@@ -12,20 +12,11 @@ declare function $$render<T extends {
12
12
  }]>;
13
13
  attachmentsView?: Snippet<[{
14
14
  item: T;
15
- }]>;
15
+ }]> | undefined;
16
16
  overviewPanelContent?: Snippet;
17
17
  };
18
- exports: {};
19
- bindings: "";
20
- slots: {};
21
- events: {};
22
- };
23
- declare class __sveltets_Render<T extends {
24
- id: string;
25
- }> {
26
- props(): ReturnType<typeof $$render<T>>['props'];
27
- events(): ReturnType<typeof $$render<T>>['events'];
28
- slots(): ReturnType<typeof $$render<T>>['slots'];
18
+ events(): {};
19
+ slots(): {};
29
20
  bindings(): "";
30
21
  exports(): {};
31
22
  }
@@ -1,28 +1,19 @@
1
1
  import { type PlayerButtonDef } from '../button';
2
2
  import { PlayerConfig } from './player-config.svelte.js';
3
3
  import type { Snippet } from 'svelte';
4
- declare function $$render<T extends {
4
+ declare class __sveltets_Render<T extends {
5
5
  id: string;
6
- }>(): {
7
- props: {
6
+ }> {
7
+ props(): {
8
8
  config: PlayerConfig<T>;
9
9
  hasOverview: boolean;
10
10
  itemActions: PlayerButtonDef[];
11
11
  attachmentsView?: Snippet<[{
12
12
  item: T;
13
- }]>;
13
+ }]> | undefined;
14
14
  };
15
- exports: {};
16
- bindings: "";
17
- slots: {};
18
- events: {};
19
- };
20
- declare class __sveltets_Render<T extends {
21
- id: string;
22
- }> {
23
- props(): ReturnType<typeof $$render<T>>['props'];
24
- events(): ReturnType<typeof $$render<T>>['events'];
25
- slots(): ReturnType<typeof $$render<T>>['slots'];
15
+ events(): {};
16
+ slots(): {};
26
17
  bindings(): "";
27
18
  exports(): {};
28
19
  }
@@ -59,6 +59,7 @@ const styles = $derived.by(() => {
59
59
  z-index: 0;
60
60
  border-radius: 0.5rem 0 0 0.5rem;
61
61
  background: var(--_overview-panel--background);
62
+ /* Set 'container-type: inline-size;' to reference container*/
62
63
  }
63
64
  .overview-panel__content {
64
65
  width: 100%;
@@ -70,9 +71,6 @@ const styles = $derived.by(() => {
70
71
  overflow: hidden;
71
72
  container-type: inline-size;
72
73
  }
73
- .overview-panel {
74
- /* Set 'container-type: inline-size;' to reference container*/
75
- }
76
74
  @container (width < 576px) {
77
75
  .overview-panel {
78
76
  width: 100%;
@@ -1,10 +1,10 @@
1
1
  import type { PlayerConfig } from './player-config.svelte.js';
2
2
  import type { PlayerUIManager } from './ui-manager.svelte';
3
3
  import type { Snippet } from 'svelte';
4
- declare function $$render<T extends {
4
+ declare class __sveltets_Render<T extends {
5
5
  id: string;
6
- }>(): {
7
- props: {
6
+ }> {
7
+ props(): {
8
8
  config: PlayerConfig<T>;
9
9
  uiManager: PlayerUIManager;
10
10
  position: {
@@ -14,17 +14,8 @@ declare function $$render<T extends {
14
14
  };
15
15
  children: Snippet;
16
16
  };
17
- exports: {};
18
- bindings: "";
19
- slots: {};
20
- events: {};
21
- };
22
- declare class __sveltets_Render<T extends {
23
- id: string;
24
- }> {
25
- props(): ReturnType<typeof $$render<T>>['props'];
26
- events(): ReturnType<typeof $$render<T>>['events'];
27
- slots(): ReturnType<typeof $$render<T>>['slots'];
17
+ events(): {};
18
+ slots(): {};
28
19
  bindings(): "";
29
20
  exports(): {};
30
21
  }