@streamscloud/embeddable 3.4.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/ads/ad-card/cmp.ad-card.svelte +193 -0
  2. package/dist/{short-videos/short-video-viewer/cmp.ad.svelte.d.ts → ads/ad-card/cmp.ad-card.svelte.d.ts} +3 -2
  3. package/dist/ads/ad-card/index.d.ts +3 -0
  4. package/dist/ads/ad-card/index.js +2 -0
  5. package/dist/ads/ad-card/mapper.d.ts +3 -0
  6. package/dist/ads/ad-card/mapper.js +13 -0
  7. package/dist/ads/ad-card/operations.generated.d.ts +23 -0
  8. package/dist/ads/ad-card/operations.generated.js +47 -0
  9. package/dist/ads/ad-card/operations.graphql +20 -0
  10. package/dist/ads/ad-card/types.d.ts +17 -0
  11. package/dist/ads/ad-card/types.js +1 -0
  12. package/dist/core/locale.d.ts +3 -0
  13. package/dist/products/price-helper.d.ts +18 -3
  14. package/dist/products/price-helper.js +9 -6
  15. package/dist/products/product-card/cmp.product-card.svelte +218 -0
  16. package/dist/products/product-card/cmp.product-card.svelte.d.ts +15 -0
  17. package/dist/products/product-card/index.d.ts +4 -0
  18. package/dist/products/product-card/index.js +2 -0
  19. package/dist/products/product-card/mapper.d.ts +3 -0
  20. package/dist/products/product-card/mapper.js +22 -0
  21. package/dist/products/product-card/operations.generated.d.ts +26 -0
  22. package/dist/products/product-card/operations.generated.js +59 -0
  23. package/dist/products/product-card/operations.graphql +23 -0
  24. package/dist/products/product-card/product-card-localization.d.ts +8 -0
  25. package/dist/{short-videos/short-video-viewer/short-video-product-localization.js → products/product-card/product-card-localization.js} +1 -1
  26. package/dist/products/product-card/types.d.ts +12 -0
  27. package/dist/products/product-card/types.js +1 -0
  28. package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +12 -40
  29. package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +1 -1
  30. package/dist/short-videos/short-video-viewer/cmp.short-video-controls.svelte +134 -0
  31. package/dist/short-videos/short-video-viewer/cmp.short-video-controls.svelte.d.ts +19 -0
  32. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +45 -20
  33. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +1 -0
  34. package/dist/short-videos/short-video-viewer/index.d.ts +2 -6
  35. package/dist/short-videos/short-video-viewer/index.js +1 -4
  36. package/dist/short-videos/short-video-viewer/mapper.js +12 -42
  37. package/dist/short-videos/short-video-viewer/operations.generated.d.ts +5 -8
  38. package/dist/short-videos/short-video-viewer/operations.generated.js +98 -94
  39. package/dist/short-videos/short-video-viewer/operations.graphql +2 -42
  40. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.d.ts +3 -7
  41. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -14
  42. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +3 -3
  43. package/dist/short-videos/short-video-viewer/types.d.ts +9 -28
  44. package/dist/short-videos/short-video-viewer/types.js +1 -1
  45. package/dist/short-videos/short-video-viewer/ui-manager.svelte.d.ts +5 -0
  46. package/dist/short-videos/short-video-viewer/ui-manager.svelte.js +14 -1
  47. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +23 -163
  48. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +3 -2
  49. package/dist/short-videos/short-videos-player/controls.svelte +110 -127
  50. package/dist/short-videos/short-videos-player/controls.svelte.d.ts +2 -1
  51. package/dist/short-videos/short-videos-player/index.d.ts +2 -0
  52. package/dist/short-videos/short-videos-player/index.js +6 -3
  53. package/dist/short-videos/short-videos-player/operations.generated.d.ts +5 -8
  54. package/dist/short-videos/short-videos-player/operations.generated.js +77 -73
  55. package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +1 -3
  56. package/dist/short-videos/short-videos-player/short-videos-player-localization.js +0 -2
  57. package/dist/short-videos/short-videos-player/short-videos-player-view.svelte +198 -0
  58. package/dist/short-videos/short-videos-player/short-videos-player-view.svelte.d.ts +14 -0
  59. package/dist/short-videos/short-videos-player/types.d.ts +2 -0
  60. package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +3 -3
  61. package/dist/short-videos/short-videos-player/ui-manager.svelte.js +8 -8
  62. package/dist/streams/layout/element-views/price-element-view.svelte +5 -4
  63. package/dist/streams/layout/models/mapper.js +8 -17
  64. package/dist/streams/stream-player/cmp.stream-player.svelte +18 -5
  65. package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +1 -1
  66. package/dist/streams/stream-player/controls.svelte +66 -73
  67. package/dist/streams/stream-player/index.js +2 -2
  68. package/dist/streams/stream-player/stream-overview.svelte +12 -1
  69. package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -0
  70. package/dist/streams/stream-player/stream-player-localization.d.ts +1 -3
  71. package/dist/streams/stream-player/stream-player-localization.js +0 -2
  72. package/dist/streams/stream-player/ui-manager.svelte.d.ts +3 -2
  73. package/dist/streams/stream-player/ui-manager.svelte.js +9 -5
  74. package/dist/ui/button/resources/button-theme.svelte +1 -0
  75. package/dist/ui/shadow-dom/index.d.ts +2 -1
  76. package/dist/ui/shadow-dom/index.js +2 -1
  77. package/dist/ui/shadow-dom/{shadow-host.d.ts → modal-shadow-host.d.ts} +1 -1
  78. package/dist/ui/shadow-dom/modal-shadow-host.js +21 -0
  79. package/dist/ui/shadow-dom/shadow-root-service.d.ts +1 -0
  80. package/dist/ui/shadow-dom/shadow-root-service.js +23 -0
  81. package/dist/ui/video/cmp.video.svelte +2 -2
  82. package/dist/ui/video/cmp.video.svelte.d.ts +1 -0
  83. package/package.json +1 -1
  84. package/dist/short-videos/short-video-viewer/cmp.ad.svelte +0 -140
  85. package/dist/short-videos/short-video-viewer/cmp.product.svelte +0 -168
  86. package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +0 -14
  87. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +0 -125
  88. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +0 -14
  89. package/dist/short-videos/short-video-viewer/cmp.social-interactions.svelte +0 -69
  90. package/dist/short-videos/short-video-viewer/cmp.social-interactions.svelte.d.ts +0 -10
  91. package/dist/short-videos/short-video-viewer/description.svelte +0 -53
  92. package/dist/short-videos/short-video-viewer/description.svelte.d.ts +0 -9
  93. package/dist/short-videos/short-video-viewer/short-video-details-localization.d.ts +0 -14
  94. package/dist/short-videos/short-video-viewer/short-video-details-localization.js +0 -17
  95. package/dist/short-videos/short-video-viewer/short-video-product-localization.d.ts +0 -8
  96. package/dist/short-videos/short-videos-player/action-button.svelte +0 -38
  97. package/dist/short-videos/short-videos-player/action-button.svelte.d.ts +0 -10
  98. package/dist/ui/shadow-dom/shadow-host.js +0 -32
@@ -1,70 +1,59 @@
1
- <script lang="ts">import { ShortVideoDetails, ShortVideoViewerAttachments, ShortVideoViewerAttachmentsInline } from '../short-video-viewer';
1
+ <script lang="ts">import { slideHorizontally } from '../../core/transitions';
2
+ import { ShortVideoControls, ShortVideoViewerAttachments, ShortVideoViewerAttachmentsInline } from '../short-video-viewer';
2
3
  import { Icon } from '../../ui/icon';
3
- import { MediaVolumeManager } from '../../ui/media-playback';
4
- import { default as ActionButton } from './action-button.svelte';
5
4
  import { ShortVideosPlayerLocalization } from './short-videos-player-localization';
6
5
  import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
7
6
  import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
8
7
  import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
9
- import IconPanelRightGallery from '@fluentui/svg-icons/icons/panel_right_gallery_20_regular.svg?raw';
10
- import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_20_regular.svg?raw';
11
- import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_20_regular.svg?raw';
12
8
  let { buffer, uiManager, localization, on } = $props();
13
- const toggleMuted = () => {
14
- MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
15
- };
16
9
  const shortVideo = $derived(buffer.current);
10
+ const changeShowAttachments = () => {
11
+ uiManager.showAttachments = !uiManager.showAttachments;
12
+ };
17
13
  </script>
18
14
 
19
- <div class="short-videos-player-controls">
20
- <div class="short-videos-player-controls__left">
21
- {#if shortVideo && uiManager.detailsCollapsed && !uiManager.showShortVideoOverlay}
22
- <div class="short-videos-player-controls__short-video-overlay">
23
- <div class="short-videos-player-controls__short-video-attachments-inline">
24
- <ShortVideoViewerAttachmentsInline model={shortVideo} />
15
+ {#if !uiManager.showShortVideoOverlay}
16
+ <div class="short-videos-player-controls">
17
+ <div class="short-videos-player-controls__left">
18
+ {#if shortVideo}
19
+ <div class="short-videos-player-controls__short-video-hub">
20
+ {#if uiManager.showAttachments}
21
+ <div class="short-videos-player-controls__short-video-attachments-inline">
22
+ <ShortVideoViewerAttachmentsInline model={shortVideo} />
23
+ </div>
24
+ {/if}
25
+ <ShortVideoControls model={shortVideo} on={{ attachmentsClicked: changeShowAttachments }} />
25
26
  </div>
27
+ {/if}
28
+ <div class="short-videos-player-controls__navigation-buttons">
29
+ <button type="button" class="navigation-button" disabled={!buffer.canLoadPrevious} onclick={buffer.loadPrevious}>
30
+ <Icon src={IconChevronUp} />
31
+ </button>
32
+ <button type="button" class="navigation-button" disabled={!buffer.canLoadNext} onclick={buffer.loadNext}>
33
+ <Icon src={IconChevronDown} />
34
+ </button>
26
35
  </div>
27
- {/if}
28
- <div class="short-videos-player-controls__navigation-buttons">
29
- <button type="button" class="navigation-button" disabled={!buffer.canLoadPrevious} onclick={buffer.loadPrevious}>
30
- <Icon src={IconChevronUp} />
31
- </button>
32
- <button type="button" class="navigation-button" disabled={!buffer.canLoadNext} onclick={buffer.loadNext}>
33
- <Icon src={IconChevronDown} />
34
- </button>
35
36
  </div>
36
- </div>
37
- <div class="short-videos-player-controls__right">
38
- {#if shortVideo}
39
- <div class="short-videos-player-controls__short-video-attachments">
40
- <ShortVideoViewerAttachments shortVideo={shortVideo} localization={localization.shortVideoAttachmentsLocalization} />
41
- </div>
42
- {/if}
43
- <div class="short-videos-player-controls__controls">
44
- {#if shortVideo}
45
- <ActionButton on={{ click: toggleMuted }}>
46
- {#if MediaVolumeManager.isMuted}
47
- <Icon src={IconSpeakerMute} />
48
- {:else}
49
- <Icon src={IconSpeaker2} />
50
- {/if}
51
- </ActionButton>
37
+ <div class="short-videos-player-controls__right">
38
+ {#if shortVideo && uiManager.showAttachments}
39
+ <div class="short-videos-player-controls__short-video-attachments" transition:slideHorizontally|local>
40
+ <ShortVideoViewerAttachments
41
+ shortVideo={shortVideo}
42
+ localization={localization.shortVideoAttachmentsLocalization}
43
+ on={{
44
+ productClick: on.productClick
45
+ }} />
46
+ </div>
52
47
  {/if}
53
48
  </div>
54
49
  </div>
55
- </div>
50
+ {/if}
56
51
 
57
- {#if shortVideo && !uiManager.isMobileView}
58
- <ShortVideoDetails shortVideo={shortVideo} collapsed={uiManager.detailsCollapsed} localization={localization.shortVideoDetailsLocalization} />
59
- <div class="toggle-collapsed-button">
60
- <ActionButton on={{ click: () => (uiManager.detailsCollapsed = !uiManager.detailsCollapsed) }}>
61
- <Icon src={IconPanelRightGallery} />
62
- </ActionButton>
63
- </div>
52
+ {#if on.closePlayer}
53
+ <button type="button" class="close-button navigation-button" onclick={on.closePlayer}>
54
+ <Icon src={IconDismiss} />
55
+ </button>
64
56
  {/if}
65
- <button type="button" class="close-button navigation-button" onclick={on.closePlayer}>
66
- <Icon src={IconDismiss} />
67
- </button>
68
57
 
69
58
  <style>@keyframes fadeIn {
70
59
  0% {
@@ -77,20 +66,6 @@ const shortVideo = $derived(buffer.current);
77
66
  opacity: 1;
78
67
  }
79
68
  }
80
- .close-button {
81
- position: absolute;
82
- top: var(--short-videos-player--controls--offset-vertical);
83
- right: var(--short-videos-player--controls--offset-horizontal);
84
- z-index: 1;
85
- }
86
-
87
- .toggle-collapsed-button {
88
- position: absolute;
89
- bottom: var(--short-videos-player--controls--offset-vertical);
90
- right: var(--short-videos-player--controls--offset-horizontal);
91
- z-index: 1;
92
- }
93
-
94
69
  .short-videos-player-controls {
95
70
  position: absolute;
96
71
  top: 0;
@@ -99,15 +74,15 @@ const shortVideo = $derived(buffer.current);
99
74
  width: var(--short-videos-player--sidebar--available-space);
100
75
  display: flex;
101
76
  justify-content: space-between;
102
- gap: 2.5rem;
103
77
  padding: var(--short-videos-player--controls--offset-vertical) var(--short-videos-player--controls--offset-horizontal);
104
78
  container-type: inline-size;
105
79
  }
106
80
  .short-videos-player-controls__left {
107
81
  display: flex;
108
82
  flex-direction: column;
109
- gap: 2.5rem;
83
+ gap: 2.3125rem;
110
84
  justify-content: flex-end;
85
+ align-items: center;
111
86
  }
112
87
  .short-videos-player-controls__right {
113
88
  flex: 1;
@@ -115,69 +90,59 @@ const shortVideo = $derived(buffer.current);
115
90
  justify-content: space-between;
116
91
  align-items: flex-end;
117
92
  flex-direction: column;
118
- padding-top: 3.75rem;
119
- /* Set 'container-type: inline-size;' to reference container*/
120
- }
121
- @container (width < 9.375rem) {
122
- .short-videos-player-controls__right {
123
- display: none;
124
- }
125
- }
126
- .short-videos-player-controls__short-video-overlay {
127
- gap: 2.5rem;
128
- display: flex;
129
- flex: 1;
130
- min-height: 0;
131
- flex-direction: column;
132
- align-items: flex-start;
133
- justify-content: flex-end;
134
- --short-video-viewer--interactions--icon--size: var(--short-videos-player--navigation-button--size);
135
- --short-video-viewer--interactions--background--color: #1c1c1c;
136
- --short-video-viewer--interactions--counter--color: #f3f4f6;
137
- --short-video-viewer--interactions--icon--font-color: #f3f4f6;
138
- }
139
- .short-videos-player-controls__short-video-attachments-inline {
140
- display: none;
141
- /* Set 'container-type: inline-size;' to reference container*/
142
- }
143
- @container (width < calc(21.875rem + 3.75rem)) {
144
- .short-videos-player-controls__short-video-attachments-inline {
145
- display: contents;
146
- }
147
- }
148
- .short-videos-player-controls__short-video-attachments {
149
- flex: 1;
150
93
  overflow-x: hidden;
151
94
  overflow-y: auto;
152
95
  scrollbar-color: transparent transparent;
153
96
  scrollbar-width: thin;
154
- width: 21.875rem;
155
- max-width: 21.875rem;
156
- /* Set 'container-type: inline-size;' to reference container*/
157
97
  }
158
- .short-videos-player-controls__short-video-attachments::-webkit-scrollbar {
98
+ .short-videos-player-controls__right::-webkit-scrollbar {
159
99
  width: 3px;
160
100
  height: 3px;
161
101
  background: var(--custom-scrollbar-background, transparent);
162
102
  visibility: hidden;
163
103
  }
164
- .short-videos-player-controls__short-video-attachments::-webkit-scrollbar-thumb {
104
+ .short-videos-player-controls__right::-webkit-scrollbar-thumb {
165
105
  background: transparent;
166
106
  }
167
- .short-videos-player-controls__short-video-attachments:hover {
107
+ .short-videos-player-controls__right:hover {
168
108
  scrollbar-color: var(--custom-scrollbar-color, #7d7d7d) var(--custom-scrollbar-background, transparent);
169
109
  scrollbar-width: thin;
170
110
  }
171
- .short-videos-player-controls__short-video-attachments:hover::-webkit-scrollbar {
111
+ .short-videos-player-controls__right:hover::-webkit-scrollbar {
172
112
  width: 3px;
173
113
  height: 3px;
174
114
  background: var(--custom-scrollbar-background, transparent);
175
115
  visibility: hidden;
176
116
  }
177
- .short-videos-player-controls__short-video-attachments:hover::-webkit-scrollbar-thumb {
117
+ .short-videos-player-controls__right:hover::-webkit-scrollbar-thumb {
178
118
  background: var(--custom-scrollbar-color, #7d7d7d);
179
119
  }
180
- @container (width < calc(21.875rem + 3.75rem)) {
120
+ .short-videos-player-controls__short-video-hub {
121
+ gap: 2.5rem;
122
+ display: flex;
123
+ flex: 1;
124
+ min-height: 0;
125
+ flex-direction: column;
126
+ align-items: flex-start;
127
+ justify-content: flex-end;
128
+ --short-video-controls--icon--size: var(--short-videos-player--icon--size);
129
+ }
130
+ .short-videos-player-controls__short-video-attachments-inline {
131
+ display: none;
132
+ /* Set 'container-type: inline-size;' to reference container*/
133
+ }
134
+ @container (width < calc(11rem + 3.75rem)) {
135
+ .short-videos-player-controls__short-video-attachments-inline {
136
+ display: contents;
137
+ }
138
+ }
139
+ .short-videos-player-controls__short-video-attachments {
140
+ flex: 1;
141
+ width: 11rem;
142
+ max-width: 11rem;
143
+ /* Set 'container-type: inline-size;' to reference container*/
144
+ }
145
+ @container (width < calc(11rem + 3.75rem)) {
181
146
  .short-videos-player-controls__short-video-attachments {
182
147
  display: none;
183
148
  }
@@ -188,35 +153,53 @@ const shortVideo = $derived(buffer.current);
188
153
  gap: 1rem;
189
154
  margin-bottom: 0.625rem;
190
155
  z-index: 1;
191
- /* Set 'container-type: inline-size;' to reference container*/
192
- }
193
- @container (width < 6.25rem) {
194
- .short-videos-player-controls__navigation-buttons {
195
- visibility: hidden;
196
- }
197
- }
198
- .short-videos-player-controls__controls {
199
- display: flex;
200
- margin-top: auto;
201
- gap: 1rem;
202
- align-self: flex-start;
203
156
  }
204
157
 
205
158
  .navigation-button {
206
- width: var(--short-videos-player--navigation-button--size);
207
- min-width: var(--short-videos-player--navigation-button--size);
208
- max-width: var(--short-videos-player--navigation-button--size);
209
- height: var(--short-videos-player--navigation-button--size);
210
- min-height: var(--short-videos-player--navigation-button--size);
211
- max-height: var(--short-videos-player--navigation-button--size);
212
- background-color: #000000;
159
+ width: var(--short-videos-player--button--size);
160
+ min-width: var(--short-videos-player--button--size);
161
+ max-width: var(--short-videos-player--button--size);
162
+ height: var(--short-videos-player--button--size);
163
+ min-height: var(--short-videos-player--button--size);
164
+ max-height: var(--short-videos-player--button--size);
165
+ background-color: rgba(0, 0, 0, 0.6);
213
166
  border: 1px solid #1c1c1c;
214
167
  border-radius: 50%;
215
168
  text-align: center;
216
169
  --icon--color: #ffffff;
217
- --icon--stroke-width: 0.6;
170
+ --icon--size: var(--short-videos-player--icon--size);
218
171
  }
219
172
  .navigation-button:disabled {
220
173
  opacity: 0.5;
221
174
  cursor: default;
175
+ }
176
+
177
+ .close-button {
178
+ width: var(--short-videos-player--button--size);
179
+ min-width: var(--short-videos-player--button--size);
180
+ max-width: var(--short-videos-player--button--size);
181
+ height: var(--short-videos-player--button--size);
182
+ min-height: var(--short-videos-player--button--size);
183
+ max-height: var(--short-videos-player--button--size);
184
+ background-color: rgba(0, 0, 0, 0.6);
185
+ border: 1px solid #1c1c1c;
186
+ border-radius: 50%;
187
+ text-align: center;
188
+ --icon--color: #ffffff;
189
+ --icon--size: var(--short-videos-player--icon--size);
190
+ position: absolute;
191
+ top: 0.9375rem;
192
+ left: 0.625rem;
193
+ z-index: 1;
194
+ /* Set 'container-type: inline-size;' to reference container*/
195
+ }
196
+ .close-button:disabled {
197
+ opacity: 0.5;
198
+ cursor: default;
199
+ }
200
+ @container (width < 576px) {
201
+ .close-button {
202
+ left: unset;
203
+ right: 0.625rem;
204
+ }
222
205
  }</style>
@@ -7,7 +7,8 @@ type Props = {
7
7
  uiManager: ShortVideosPlayerUiManager;
8
8
  localization: ShortVideosPlayerLocalization;
9
9
  on: {
10
- closePlayer: () => void;
10
+ closePlayer?: () => void;
11
+ productClick?: (productId: string) => void;
11
12
  };
12
13
  };
13
14
  declare const Controls: import("svelte").Component<Props, {}, "">;
@@ -1,5 +1,7 @@
1
+ import { default as ShortVideosPlayer } from './cmp.short-videos-player.svelte';
1
2
  import type { IShortVideosPlayerLocalization } from './short-videos-player-localization';
2
3
  import { type OpenShortVideosPlayerInit } from './types';
4
+ export { ShortVideosPlayer };
3
5
  export type { IShortVideosPlayerLocalization };
4
6
  /**
5
7
  * Opens the short videos player modal with the specified provider or by fetching videos by IDs.
@@ -1,8 +1,10 @@
1
1
  import { getLocale } from '../../core/locale';
2
- import { ShadowHost } from '../../ui/shadow-dom';
2
+ import { ModalShadowHost } from '../../ui/shadow-dom';
3
3
  import { default as ShortVideosPlayer } from './cmp.short-videos-player.svelte';
4
+ import { default as ShortVideosPlayerView } from './short-videos-player-view.svelte';
4
5
  import { isIdsInit, isShortVideosProviderInit } from './types';
5
6
  import { mount, unmount } from 'svelte';
7
+ export { ShortVideosPlayer };
6
8
  /**
7
9
  * Opens the short videos player modal with the specified provider or by fetching videos by IDs.
8
10
  *
@@ -90,12 +92,13 @@ export const openShortVideosPlayer = async (init) => {
90
92
  if (!input) {
91
93
  return;
92
94
  }
93
- const shadowHost = new ShadowHost();
94
- const mounted = mount(ShortVideosPlayer, {
95
+ const shadowHost = new ModalShadowHost();
96
+ const mounted = mount(ShortVideosPlayerView, {
95
97
  target: shadowHost.shadowRoot,
96
98
  props: {
97
99
  input,
98
100
  localization: getLocale(init.localization),
101
+ showStreamsCloudWatermark: init.showStreamsCloudWatermark,
99
102
  on: {
100
103
  closePlayer: async () => {
101
104
  if (init.on?.playerClosed) {
@@ -9,22 +9,19 @@ export type GetShortVideosQuery = {
9
9
  items: Array<{
10
10
  id: string;
11
11
  enableSocialInteractions: boolean;
12
- postHeading: {
13
- sourceImage: string | null;
14
- sourceName: string;
15
- postDisplayDate: any;
16
- postViewsCount: number;
17
- };
18
12
  allProducts: Array<{
19
- title: string;
20
13
  id: string;
21
- link: string | null;
14
+ title: string;
22
15
  shortDescription: string | null;
16
+ link: string | null;
23
17
  media: Array<{
24
18
  url: string;
25
19
  thumbnailUrl: string | null;
26
20
  type: SchemaTypes.MediaType;
27
21
  }>;
22
+ brand: {
23
+ name: string;
24
+ } | null;
28
25
  priceAndAvailability: {
29
26
  currency: SchemaTypes.Currency;
30
27
  price: number;
@@ -45,114 +45,118 @@ export const GetShortVideosDocument = {
45
45
  },
46
46
  {
47
47
  kind: 'FragmentDefinition',
48
- name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
49
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
48
+ name: { kind: 'Name', value: 'ProductCardPayloadFragment' },
49
+ typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
50
50
  selectionSet: {
51
51
  kind: 'SelectionSet',
52
52
  selections: [
53
53
  { kind: 'Field', name: { kind: 'Name', value: 'id' } },
54
- { kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
54
+ { kind: 'Field', name: { kind: 'Name', value: 'title' } },
55
+ { kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
56
+ { kind: 'Field', name: { kind: 'Name', value: 'link' } },
55
57
  {
56
58
  kind: 'Field',
57
- name: { kind: 'Name', value: 'postHeading' },
59
+ name: { kind: 'Name', value: 'media' },
58
60
  selectionSet: {
59
61
  kind: 'SelectionSet',
60
62
  selections: [
61
- { kind: 'Field', name: { kind: 'Name', value: 'sourceImage' } },
62
- { kind: 'Field', name: { kind: 'Name', value: 'sourceName' } },
63
- { kind: 'Field', name: { kind: 'Name', value: 'postDisplayDate' } },
64
- { kind: 'Field', name: { kind: 'Name', value: 'postViewsCount' } }
63
+ { kind: 'Field', name: { kind: 'Name', value: 'url' } },
64
+ { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
65
+ { kind: 'Field', name: { kind: 'Name', value: 'type' } }
65
66
  ]
66
67
  }
67
68
  },
68
69
  {
69
70
  kind: 'Field',
70
- name: { kind: 'Name', value: 'allProducts' },
71
+ name: { kind: 'Name', value: 'brand' },
72
+ selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
73
+ },
74
+ {
75
+ kind: 'Field',
76
+ name: { kind: 'Name', value: 'priceAndAvailability' },
71
77
  selectionSet: {
72
78
  kind: 'SelectionSet',
73
79
  selections: [
80
+ { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
81
+ { kind: 'Field', name: { kind: 'Name', value: 'price' } },
74
82
  {
75
83
  kind: 'Field',
76
- name: { kind: 'Name', value: 'media' },
77
- selectionSet: {
78
- kind: 'SelectionSet',
79
- selections: [
80
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
81
- { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
82
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
83
- ]
84
- }
85
- },
86
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
87
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
88
- { kind: 'Field', name: { kind: 'Name', value: 'link' } },
89
- { kind: 'Field', name: { kind: 'Name', value: 'shortDescription' } },
90
- {
91
- kind: 'Field',
92
- name: { kind: 'Name', value: 'priceAndAvailability' },
84
+ name: { kind: 'Name', value: 'productSalePrices' },
93
85
  selectionSet: {
94
86
  kind: 'SelectionSet',
95
87
  selections: [
96
- { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
97
- { kind: 'Field', name: { kind: 'Name', value: 'price' } },
98
- {
99
- kind: 'Field',
100
- name: { kind: 'Name', value: 'productSalePrices' },
101
- selectionSet: {
102
- kind: 'SelectionSet',
103
- selections: [
104
- { kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
105
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
106
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
107
- ]
108
- }
109
- }
88
+ { kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
89
+ { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
90
+ { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
110
91
  ]
111
92
  }
112
93
  }
113
94
  ]
114
95
  }
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ kind: 'FragmentDefinition',
102
+ name: { kind: 'Name', value: 'AdCardPayloadFragment' },
103
+ typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Ad' } },
104
+ selectionSet: {
105
+ kind: 'SelectionSet',
106
+ selections: [
107
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
108
+ { kind: 'Field', name: { kind: 'Name', value: 'title' } },
109
+ { kind: 'Field', name: { kind: 'Name', value: 'description' } },
110
+ { kind: 'Field', name: { kind: 'Name', value: 'price' } },
111
+ { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
112
+ {
113
+ kind: 'Field',
114
+ name: { kind: 'Name', value: 'ctaButton' },
115
+ selectionSet: {
116
+ kind: 'SelectionSet',
117
+ selections: [
118
+ { kind: 'Field', name: { kind: 'Name', value: 'background' } },
119
+ { kind: 'Field', name: { kind: 'Name', value: 'textColor' } },
120
+ { kind: 'Field', name: { kind: 'Name', value: 'text' } },
121
+ { kind: 'Field', name: { kind: 'Name', value: 'url' } },
122
+ { kind: 'Field', name: { kind: 'Name', value: 'border' } }
123
+ ]
124
+ }
115
125
  },
126
+ { kind: 'Field', name: { kind: 'Name', value: 'type' } },
116
127
  {
117
128
  kind: 'Field',
118
- name: { kind: 'Name', value: 'ad' },
129
+ name: { kind: 'Name', value: 'media' },
119
130
  selectionSet: {
120
131
  kind: 'SelectionSet',
121
132
  selections: [
122
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
123
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
124
- { kind: 'Field', name: { kind: 'Name', value: 'description' } },
125
- { kind: 'Field', name: { kind: 'Name', value: 'price' } },
126
- { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
127
- {
128
- kind: 'Field',
129
- name: { kind: 'Name', value: 'ctaButton' },
130
- selectionSet: {
131
- kind: 'SelectionSet',
132
- selections: [
133
- { kind: 'Field', name: { kind: 'Name', value: 'background' } },
134
- { kind: 'Field', name: { kind: 'Name', value: 'textColor' } },
135
- { kind: 'Field', name: { kind: 'Name', value: 'text' } },
136
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
137
- { kind: 'Field', name: { kind: 'Name', value: 'border' } }
138
- ]
139
- }
140
- },
141
- { kind: 'Field', name: { kind: 'Name', value: 'type' } },
142
- {
143
- kind: 'Field',
144
- name: { kind: 'Name', value: 'media' },
145
- selectionSet: {
146
- kind: 'SelectionSet',
147
- selections: [
148
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
149
- { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
150
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
151
- ]
152
- }
153
- }
133
+ { kind: 'Field', name: { kind: 'Name', value: 'url' } },
134
+ { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
135
+ { kind: 'Field', name: { kind: 'Name', value: 'type' } }
154
136
  ]
155
137
  }
138
+ }
139
+ ]
140
+ }
141
+ },
142
+ {
143
+ kind: 'FragmentDefinition',
144
+ name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
145
+ typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
146
+ selectionSet: {
147
+ kind: 'SelectionSet',
148
+ selections: [
149
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
150
+ { kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
151
+ {
152
+ kind: 'Field',
153
+ name: { kind: 'Name', value: 'allProducts' },
154
+ selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductCardPayloadFragment' } }] }
155
+ },
156
+ {
157
+ kind: 'Field',
158
+ name: { kind: 'Name', value: 'ad' },
159
+ selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'AdCardPayloadFragment' } }] }
156
160
  },
157
161
  {
158
162
  kind: 'Field',
@@ -1,15 +1,13 @@
1
1
  import { type Locale } from '../../core/locale';
2
- import type { IShortVideoAttachmentsLocalization, IShortVideoDetailsLocalization, IShortVideoViewerLocalization } from '../short-video-viewer';
2
+ import type { IShortVideoAttachmentsLocalization, IShortVideoViewerLocalization } from '../short-video-viewer';
3
3
  import type { ISwipeIndicatorLocalization } from '../../ui/swipe-indicator';
4
4
  export interface IShortVideosPlayerLocalization {
5
5
  shortVideoAttachmentsLocalization?: IShortVideoAttachmentsLocalization | Locale;
6
- shortVideoDetailsLocalization?: IShortVideoDetailsLocalization | Locale;
7
6
  shortVideoViewerLocalization?: IShortVideoViewerLocalization | Locale;
8
7
  swipeIndicatorLocalization?: ISwipeIndicatorLocalization | Locale;
9
8
  }
10
9
  export declare class ShortVideosPlayerLocalization {
11
10
  shortVideoAttachmentsLocalization: IShortVideoAttachmentsLocalization | Locale;
12
- shortVideoDetailsLocalization: IShortVideoDetailsLocalization | Locale;
13
11
  shortVideoViewerLocalization: IShortVideoViewerLocalization | Locale;
14
12
  swipeIndicatorLocalization: ISwipeIndicatorLocalization | Locale;
15
13
  constructor(init: IShortVideosPlayerLocalization | Locale);
@@ -1,12 +1,10 @@
1
1
  import { isLocale } from '../../core/locale';
2
2
  export class ShortVideosPlayerLocalization {
3
3
  shortVideoAttachmentsLocalization;
4
- shortVideoDetailsLocalization;
5
4
  shortVideoViewerLocalization;
6
5
  swipeIndicatorLocalization;
7
6
  constructor(init) {
8
7
  this.shortVideoAttachmentsLocalization = isLocale(init) ? init : init.shortVideoAttachmentsLocalization || 'en';
9
- this.shortVideoDetailsLocalization = isLocale(init) ? init : init.shortVideoDetailsLocalization || 'en';
10
8
  this.shortVideoViewerLocalization = isLocale(init) ? init : init.shortVideoViewerLocalization || 'en';
11
9
  this.swipeIndicatorLocalization = isLocale(init) ? init : init.swipeIndicatorLocalization || 'en';
12
10
  }