@streamscloud/embeddable 1.1.11 → 2.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 (247) hide show
  1. package/dist/core/enums.d.ts +33 -0
  2. package/dist/core/enums.js +39 -0
  3. package/dist/core/graphql.d.ts +1 -1
  4. package/dist/core/graphql.js +2 -2
  5. package/dist/core/media/images-size-detector.service.d.ts +1 -1
  6. package/dist/core/media/images-size-detector.service.js +1 -1
  7. package/dist/core/media/index.d.ts +1 -1
  8. package/dist/core/media/index.js +1 -1
  9. package/dist/core/media/media-item-url.service.js +2 -1
  10. package/dist/core/media/types.d.ts +1 -16
  11. package/dist/core/media/types.js +1 -19
  12. package/dist/index.d.ts +1 -3
  13. package/dist/index.js +1 -3
  14. package/dist/products/price-helper.d.ts +2 -2
  15. package/dist/products/price-helper.js +20 -9
  16. package/dist/short-videos/short-video-viewer/cmp.ad.svelte +74 -0
  17. package/dist/{advertising/ad-view/cmp.ad-view.svelte.d.ts → short-videos/short-video-viewer/cmp.ad.svelte.d.ts} +2 -3
  18. package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +70 -0
  19. package/dist/{streams/components/images/cmp.images-component.svelte.d.ts → short-videos/short-video-viewer/cmp.attachments-inline.svelte.d.ts} +2 -2
  20. package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +45 -48
  21. package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +4 -2
  22. package/dist/{streams/components/product/cmp.product-component.svelte → short-videos/short-video-viewer/cmp.product.svelte} +34 -26
  23. package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +10 -0
  24. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +31 -52
  25. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +1 -1
  26. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +6 -6
  27. package/dist/short-videos/short-video-viewer/index.d.ts +6 -3
  28. package/dist/short-videos/short-video-viewer/index.js +4 -2
  29. package/dist/short-videos/short-video-viewer/mapper.js +35 -7
  30. package/dist/short-videos/short-video-viewer/operations.generated.d.ts +1 -1
  31. package/dist/short-videos/short-video-viewer/operations.generated.js +67 -103
  32. package/dist/short-videos/short-video-viewer/operations.graphql +29 -2
  33. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.d.ts +12 -0
  34. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +10 -0
  35. package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.d.ts +3 -4
  36. package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +4 -15
  37. package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.d.ts +7 -0
  38. package/dist/{products/product-card/product-card-localization.svelte.js → short-videos/short-video-viewer/short-video-product-localization.svelte.js} +1 -1
  39. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +3 -0
  40. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +4 -7
  41. package/dist/short-videos/short-video-viewer/types.d.ts +29 -6
  42. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +4 -4
  43. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +2 -2
  44. package/dist/short-videos/short-videos-player/controls.svelte +42 -35
  45. package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -1
  46. package/dist/short-videos/short-videos-player/index.d.ts +28 -2
  47. package/dist/short-videos/short-videos-player/index.js +40 -1
  48. package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +3 -9
  49. package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +2 -17
  50. package/dist/streams/layout/cmp.layout.svelte +34 -0
  51. package/dist/streams/{slots/cmp.stream-component-slot.svelte.d.ts → layout/cmp.layout.svelte.d.ts} +2 -2
  52. package/dist/streams/layout/cmp.slot-content.svelte +32 -0
  53. package/dist/streams/layout/cmp.slot-content.svelte.d.ts +9 -0
  54. package/dist/streams/layout/cmp.slot.svelte +26 -0
  55. package/dist/streams/layout/cmp.slot.svelte.d.ts +9 -0
  56. package/dist/streams/layout/component.d.ts +6 -0
  57. package/dist/streams/layout/component.js +1 -0
  58. package/dist/streams/layout/css-values.d.ts +10 -0
  59. package/dist/streams/layout/css-values.js +1 -0
  60. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +16 -0
  61. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +11 -0
  62. package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +38 -0
  63. package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +9 -0
  64. package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +30 -0
  65. package/dist/streams/layout/element-views/cmp.images-stream-element.svelte.d.ts +9 -0
  66. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +97 -0
  67. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +11 -0
  68. package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +6 -0
  69. package/dist/streams/{components/product/cmp.product-component.svelte.d.ts → layout/element-views/cmp.short-video-stream-element.svelte.d.ts} +2 -3
  70. package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +45 -0
  71. package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte.d.ts +9 -0
  72. package/dist/streams/layout/element-views/cmp.stream-element.svelte +60 -0
  73. package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +13 -0
  74. package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +23 -0
  75. package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +9 -0
  76. package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +8 -0
  77. package/dist/{ui/shadow-dom/cmp.shadow-dom.svelte.d.ts → streams/layout/element-views/cmp.text-stream-element.svelte.d.ts} +2 -2
  78. package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +3 -0
  79. package/dist/streams/layout/element-views/data-by-key-accessor.js +55 -0
  80. package/dist/streams/layout/element-views/index.d.ts +11 -0
  81. package/dist/streams/layout/element-views/index.js +9 -0
  82. package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +9 -0
  83. package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +8 -0
  84. package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +8 -0
  85. package/dist/streams/layout/element-views/stream-element-localization.svelte.js +6 -0
  86. package/dist/streams/layout/elements.d.ts +51 -0
  87. package/dist/streams/layout/elements.js +1 -0
  88. package/dist/streams/layout/enums.d.ts +45 -0
  89. package/dist/streams/layout/enums.js +54 -0
  90. package/dist/streams/layout/index.d.ts +19 -0
  91. package/dist/streams/layout/index.js +15 -0
  92. package/dist/streams/layout/layout.d.ts +13 -0
  93. package/dist/streams/layout/models/index.d.ts +6 -0
  94. package/dist/streams/layout/models/index.js +1 -0
  95. package/dist/streams/layout/models/mapper.d.ts +3 -0
  96. package/dist/streams/layout/models/mapper.js +62 -0
  97. package/dist/streams/layout/models/stream-layout-blob-model.d.ts +4 -0
  98. package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +6 -0
  99. package/dist/streams/layout/models/stream-layout-media-item-model.js +1 -0
  100. package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +11 -0
  101. package/dist/streams/layout/models/stream-layout-post-header-model.js +1 -0
  102. package/dist/streams/layout/models/stream-layout-product-model.d.ts +19 -0
  103. package/dist/streams/layout/models/stream-layout-product-model.js +1 -0
  104. package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +31 -0
  105. package/dist/streams/layout/models/stream-layout-short-video-model.js +1 -0
  106. package/dist/streams/layout/serializer.d.ts +3 -0
  107. package/dist/streams/layout/serializer.js +6 -0
  108. package/dist/streams/layout/slot-data-input.d.ts +14 -0
  109. package/dist/streams/layout/slot-data-input.js +1 -0
  110. package/dist/streams/layout/slot-data.d.ts +18 -0
  111. package/dist/streams/layout/slot-data.js +1 -0
  112. package/dist/streams/layout/slot.d.ts +16 -0
  113. package/dist/streams/layout/slot.js +1 -0
  114. package/dist/streams/layout/styles-transformer.d.ts +13 -0
  115. package/dist/streams/layout/styles-transformer.js +140 -0
  116. package/dist/streams/layout/styles.d.ts +43 -0
  117. package/dist/streams/layout/styles.js +1 -0
  118. package/dist/streams/layout/type-guards.d.ts +8 -0
  119. package/dist/streams/layout/type-guards.js +21 -0
  120. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +8 -42
  121. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -2
  122. package/dist/streams/stream-page-viewer/mapper.d.ts +1 -1
  123. package/dist/streams/stream-page-viewer/mapper.js +7 -8
  124. package/dist/streams/stream-page-viewer/operations.generated.d.ts +1 -104
  125. package/dist/streams/stream-page-viewer/operations.generated.js +2 -375
  126. package/dist/streams/stream-page-viewer/operations.graphql +1 -6
  127. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +3 -0
  128. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +4 -7
  129. package/dist/streams/stream-page-viewer/types.d.ts +5 -5
  130. package/dist/streams/stream-player/cmp.stream-player.svelte +7 -3
  131. package/dist/streams/stream-player/controls.svelte +43 -35
  132. package/dist/streams/stream-player/index.d.ts +29 -2
  133. package/dist/streams/stream-player/index.js +44 -1
  134. package/dist/streams/stream-player/operations.generated.d.ts +1 -103
  135. package/dist/streams/stream-player/operations.generated.js +2 -375
  136. package/dist/streams/stream-player/stream-overview.svelte +2 -2
  137. package/dist/streams/stream-player/stream-player-buffer.svelte.d.ts +1 -1
  138. package/dist/streams/stream-player/stream-player-buffer.svelte.js +1 -1
  139. package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +3 -9
  140. package/dist/streams/stream-player/stream-player-localization.svelte.js +4 -23
  141. package/dist/ui/media-item-view/cmp.media-item-view.svelte +2 -1
  142. package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +2 -1
  143. package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +2 -1
  144. package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +2 -1
  145. package/dist/ui/shadow-dom/_normalize.scss +350 -0
  146. package/dist/ui/shadow-dom/_reset.scss +189 -0
  147. package/dist/ui/shadow-dom/index.d.ts +1 -1
  148. package/dist/ui/shadow-dom/index.js +1 -1
  149. package/dist/ui/shadow-dom/shadow-host.svelte.d.ts +8 -0
  150. package/dist/ui/shadow-dom/shadow-host.svelte.js +39 -0
  151. package/dist/ui/video/cmp.video.svelte +1 -1
  152. package/package.json +68 -26
  153. package/dist/advertising/ad-view/cmp.ad-view.svelte +0 -82
  154. package/dist/advertising/ad-view/index.d.ts +0 -2
  155. package/dist/advertising/ad-view/index.js +0 -1
  156. package/dist/advertising/ad-view/mapper.d.ts +0 -3
  157. package/dist/advertising/ad-view/mapper.js +0 -16
  158. package/dist/advertising/ad-view/operations.generated.d.ts +0 -17
  159. package/dist/advertising/ad-view/operations.generated.js +0 -46
  160. package/dist/advertising/ad-view/operations.graphql +0 -14
  161. package/dist/advertising/ad-view/types.d.ts +0 -10
  162. package/dist/advertising/index.d.ts +0 -1
  163. package/dist/advertising/index.js +0 -1
  164. package/dist/advertising/types.d.ts +0 -5
  165. package/dist/advertising/types.js +0 -6
  166. package/dist/products/index.d.ts +0 -1
  167. package/dist/products/index.js +0 -1
  168. package/dist/products/product-card/cmp.product-card.svelte +0 -121
  169. package/dist/products/product-card/cmp.product-card.svelte.d.ts +0 -10
  170. package/dist/products/product-card/index.d.ts +0 -3
  171. package/dist/products/product-card/index.js +0 -3
  172. package/dist/products/product-card/mapper.d.ts +0 -3
  173. package/dist/products/product-card/mapper.js +0 -14
  174. package/dist/products/product-card/operations.generated.d.ts +0 -22
  175. package/dist/products/product-card/operations.generated.js +0 -65
  176. package/dist/products/product-card/operations.graphql +0 -19
  177. package/dist/products/product-card/product-card-localization.svelte.d.ts +0 -7
  178. package/dist/products/product-card/types.d.ts +0 -10
  179. package/dist/products/product-card/types.js +0 -1
  180. package/dist/products/types.d.ts +0 -5
  181. package/dist/products/types.js +0 -6
  182. package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte +0 -490
  183. package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte.d.ts +0 -3
  184. package/dist/short-videos/short-videos-player-modal/index.d.ts +0 -79
  185. package/dist/short-videos/short-videos-player-modal/index.js +0 -78
  186. package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.d.ts +0 -16
  187. package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.js +0 -13
  188. package/dist/streams/components/cmp.stream-page-component.svelte +0 -16
  189. package/dist/streams/components/cmp.stream-page-component.svelte.d.ts +0 -10
  190. package/dist/streams/components/components.factory.d.ts +0 -22
  191. package/dist/streams/components/components.factory.js +0 -34
  192. package/dist/streams/components/images/cmp.images-component.svelte +0 -7
  193. package/dist/streams/components/images/index.d.ts +0 -2
  194. package/dist/streams/components/images/index.js +0 -1
  195. package/dist/streams/components/images/types.d.ts +0 -8
  196. package/dist/streams/components/images/types.js +0 -5
  197. package/dist/streams/components/index.d.ts +0 -7
  198. package/dist/streams/components/index.js +0 -6
  199. package/dist/streams/components/mapper.d.ts +0 -3
  200. package/dist/streams/components/mapper.js +0 -43
  201. package/dist/streams/components/operations.generated.d.ts +0 -178
  202. package/dist/streams/components/operations.generated.js +0 -653
  203. package/dist/streams/components/operations.graphql +0 -35
  204. package/dist/streams/components/product/index.d.ts +0 -3
  205. package/dist/streams/components/product/index.js +0 -2
  206. package/dist/streams/components/product/mapper.d.ts +0 -3
  207. package/dist/streams/components/product/mapper.js +0 -14
  208. package/dist/streams/components/product/operations.generated.d.ts +0 -22
  209. package/dist/streams/components/product/operations.generated.js +0 -53
  210. package/dist/streams/components/product/operations.graphql +0 -19
  211. package/dist/streams/components/product/types.d.ts +0 -10
  212. package/dist/streams/components/product/types.js +0 -1
  213. package/dist/streams/components/short-video/cmp.short-video-component.svelte +0 -9
  214. package/dist/streams/components/short-video/cmp.short-video-component.svelte.d.ts +0 -10
  215. package/dist/streams/components/short-video/index.d.ts +0 -3
  216. package/dist/streams/components/short-video/index.js +0 -2
  217. package/dist/streams/components/short-video/mapper.d.ts +0 -3
  218. package/dist/streams/components/short-video/mapper.js +0 -4
  219. package/dist/streams/components/short-video/operations.generated.d.ts +0 -56
  220. package/dist/streams/components/short-video/operations.generated.js +0 -193
  221. package/dist/streams/components/short-video/operations.graphql +0 -3
  222. package/dist/streams/components/short-video/types.d.ts +0 -2
  223. package/dist/streams/components/stream-components-localization.svelte.d.ts +0 -10
  224. package/dist/streams/components/stream-components-localization.svelte.js +0 -13
  225. package/dist/streams/components/types.d.ts +0 -27
  226. package/dist/streams/components/types.js +0 -6
  227. package/dist/streams/slots/cmp.stream-component-slot.svelte +0 -35
  228. package/dist/streams/slots/index.d.ts +0 -3
  229. package/dist/streams/slots/index.js +0 -2
  230. package/dist/streams/slots/mapper.d.ts +0 -3
  231. package/dist/streams/slots/mapper.js +0 -18
  232. package/dist/streams/slots/operations.generated.d.ts +0 -17
  233. package/dist/streams/slots/operations.generated.js +0 -34
  234. package/dist/streams/slots/operations.graphql +0 -14
  235. package/dist/streams/slots/styles-transformer.d.ts +0 -6
  236. package/dist/streams/slots/styles-transformer.js +0 -12
  237. package/dist/streams/slots/types.d.ts +0 -16
  238. package/dist/streams/slots/types.js +0 -1
  239. package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte +0 -491
  240. package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte.d.ts +0 -3
  241. package/dist/streams/stream-player-modal/index.d.ts +0 -79
  242. package/dist/streams/stream-player-modal/index.js +0 -78
  243. package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.d.ts +0 -17
  244. package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.js +0 -14
  245. package/dist/ui/shadow-dom/cmp.shadow-dom.svelte +0 -26
  246. /package/dist/{advertising/ad-view/types.js → streams/layout/layout.js} +0 -0
  247. /package/dist/streams/{components/short-video/types.js → layout/models/stream-layout-blob-model.js} +0 -0
@@ -1,113 +1,10 @@
1
- import type * as SchemaTypes from '../../../gql/types';
2
1
  import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
3
2
  export type StreamPageViewerPayloadFragment = {
4
3
  id: string;
5
4
  name: string | null;
5
+ layout: string;
6
6
  cover: {
7
7
  url: string;
8
8
  } | null;
9
- components: Array<{
10
- slotId: string;
11
- type: SchemaTypes.StreamComponentType;
12
- params: {
13
- shortVideo: {
14
- data: {
15
- id: string;
16
- enableSocialInteractions: boolean;
17
- postHeading: {
18
- sourceImage: string | null;
19
- sourceName: string;
20
- postDisplayDate: any;
21
- postViewsCount: number;
22
- };
23
- allProducts: Array<{
24
- title: string;
25
- id: string;
26
- link: string | null;
27
- media: Array<{
28
- url: string;
29
- thumbnailUrl: string | null;
30
- type: SchemaTypes.MediaType;
31
- }>;
32
- priceAndAvailability: {
33
- currency: SchemaTypes.Currency;
34
- price: number;
35
- productSalePrices: Array<{
36
- salePrice: number;
37
- salePriceEffectiveDateFrom: any | null;
38
- salePriceEffectiveDateTo: any | null;
39
- }> | null;
40
- };
41
- }>;
42
- ad: {
43
- id: string;
44
- title: string;
45
- description: string | null;
46
- buttonText: string | null;
47
- buttonUrl: string | null;
48
- openLinkInNewWindow: boolean | null;
49
- type: SchemaTypes.AdType;
50
- media: Array<{
51
- type: SchemaTypes.MediaType;
52
- url: string;
53
- thumbnailUrl: string | null;
54
- }>;
55
- } | null;
56
- postData: {
57
- media: Array<{
58
- url: string;
59
- thumbnailUrl: string | null;
60
- type: SchemaTypes.MediaType;
61
- }>;
62
- shortVideoData: {
63
- text: string | null;
64
- } | null;
65
- };
66
- } | null;
67
- } | null;
68
- images: {
69
- mode: SchemaTypes.StreamMediaComponentMode;
70
- images: Array<{
71
- id: string;
72
- url: string;
73
- }>;
74
- } | null;
75
- product: {
76
- data: {
77
- title: string;
78
- id: string;
79
- link: string | null;
80
- media: Array<{
81
- url: string;
82
- thumbnailUrl: string | null;
83
- type: SchemaTypes.MediaType;
84
- }>;
85
- priceAndAvailability: {
86
- currency: SchemaTypes.Currency;
87
- price: number;
88
- productSalePrices: Array<{
89
- salePrice: number;
90
- salePriceEffectiveDateFrom: any | null;
91
- salePriceEffectiveDateTo: any | null;
92
- }> | null;
93
- };
94
- } | null;
95
- } | null;
96
- };
97
- }>;
98
- slots: Array<{
99
- id: string;
100
- allowedComponents: Array<SchemaTypes.StreamComponentType>;
101
- top: number;
102
- left: number;
103
- width: number;
104
- height: number;
105
- styles: {
106
- paddingTop: number;
107
- paddingRight: number;
108
- paddingBottom: number;
109
- paddingLeft: number;
110
- } | null;
111
- }>;
112
9
  };
113
10
  export declare const StreamPageViewerPayloadFragmentDoc: DocumentNode<StreamPageViewerPayloadFragment, unknown>;
@@ -17,381 +17,8 @@ export const StreamPageViewerPayloadFragmentDoc = {
17
17
  { kind: 'Field', name: { kind: 'Name', value: 'name' } },
18
18
  {
19
19
  kind: 'Field',
20
- name: { kind: 'Name', value: 'components' },
21
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'StreamComponentPayloadFragment' } }] }
22
- },
23
- {
24
- kind: 'Field',
25
- name: { kind: 'Name', value: 'slots' },
26
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'StreamComponentSlotFragment' } }] }
27
- }
28
- ]
29
- }
30
- },
31
- {
32
- kind: 'FragmentDefinition',
33
- name: { kind: 'Name', value: 'ProductCardPayloadFragment' },
34
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
35
- selectionSet: {
36
- kind: 'SelectionSet',
37
- selections: [
38
- {
39
- kind: 'Field',
40
- name: { kind: 'Name', value: 'media' },
41
- selectionSet: {
42
- kind: 'SelectionSet',
43
- selections: [
44
- {
45
- kind: 'Field',
46
- name: { kind: 'Name', value: 'url' },
47
- arguments: [
48
- { kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
49
- ]
50
- },
51
- {
52
- kind: 'Field',
53
- name: { kind: 'Name', value: 'thumbnailUrl' },
54
- arguments: [
55
- { kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
56
- ]
57
- },
58
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
59
- ]
60
- }
61
- },
62
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
63
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
64
- { kind: 'Field', name: { kind: 'Name', value: 'link' } },
65
- {
66
- kind: 'Field',
67
- name: { kind: 'Name', value: 'priceAndAvailability' },
68
- selectionSet: {
69
- kind: 'SelectionSet',
70
- selections: [
71
- { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
72
- { kind: 'Field', name: { kind: 'Name', value: 'price' } },
73
- {
74
- kind: 'Field',
75
- name: { kind: 'Name', value: 'productSalePrices' },
76
- selectionSet: {
77
- kind: 'SelectionSet',
78
- selections: [
79
- { kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
80
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
81
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
82
- ]
83
- }
84
- }
85
- ]
86
- }
87
- }
88
- ]
89
- }
90
- },
91
- {
92
- kind: 'FragmentDefinition',
93
- name: { kind: 'Name', value: 'AdViewPayloadFragment' },
94
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Ad' } },
95
- selectionSet: {
96
- kind: 'SelectionSet',
97
- selections: [
98
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
99
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
100
- { kind: 'Field', name: { kind: 'Name', value: 'description' } },
101
- { kind: 'Field', name: { kind: 'Name', value: 'buttonText' } },
102
- { kind: 'Field', name: { kind: 'Name', value: 'buttonUrl' } },
103
- { kind: 'Field', name: { kind: 'Name', value: 'openLinkInNewWindow' } },
104
- { kind: 'Field', name: { kind: 'Name', value: 'type' } },
105
- {
106
- kind: 'Field',
107
- name: { kind: 'Name', value: 'media' },
108
- selectionSet: {
109
- kind: 'SelectionSet',
110
- selections: [
111
- { kind: 'Field', name: { kind: 'Name', value: 'type' } },
112
- {
113
- kind: 'Field',
114
- name: { kind: 'Name', value: 'url' },
115
- arguments: [
116
- { kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
117
- ]
118
- },
119
- {
120
- kind: 'Field',
121
- name: { kind: 'Name', value: 'thumbnailUrl' },
122
- arguments: [
123
- { kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }
124
- ]
125
- }
126
- ]
127
- }
128
- }
129
- ]
130
- }
131
- },
132
- {
133
- kind: 'FragmentDefinition',
134
- name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
135
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
136
- selectionSet: {
137
- kind: 'SelectionSet',
138
- selections: [
139
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
140
- { kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
141
- {
142
- kind: 'Field',
143
- name: { kind: 'Name', value: 'postHeading' },
144
- selectionSet: {
145
- kind: 'SelectionSet',
146
- selections: [
147
- { kind: 'Field', name: { kind: 'Name', value: 'sourceImage' } },
148
- { kind: 'Field', name: { kind: 'Name', value: 'sourceName' } },
149
- { kind: 'Field', name: { kind: 'Name', value: 'postDisplayDate' } },
150
- { kind: 'Field', name: { kind: 'Name', value: 'postViewsCount' } }
151
- ]
152
- }
153
- },
154
- {
155
- kind: 'Field',
156
- name: { kind: 'Name', value: 'allProducts' },
157
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductCardPayloadFragment' } }] }
158
- },
159
- {
160
- kind: 'Field',
161
- name: { kind: 'Name', value: 'ad' },
162
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'AdViewPayloadFragment' } }] }
163
- },
164
- {
165
- kind: 'Field',
166
- name: { kind: 'Name', value: 'postData' },
167
- selectionSet: {
168
- kind: 'SelectionSet',
169
- selections: [
170
- {
171
- kind: 'Field',
172
- name: { kind: 'Name', value: 'media' },
173
- selectionSet: {
174
- kind: 'SelectionSet',
175
- selections: [
176
- {
177
- kind: 'Field',
178
- name: { kind: 'Name', value: 'url' },
179
- arguments: [
180
- {
181
- kind: 'Argument',
182
- name: { kind: 'Name', value: 'scale' },
183
- value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
184
- }
185
- ]
186
- },
187
- {
188
- kind: 'Field',
189
- name: { kind: 'Name', value: 'thumbnailUrl' },
190
- arguments: [
191
- {
192
- kind: 'Argument',
193
- name: { kind: 'Name', value: 'scale' },
194
- value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
195
- }
196
- ]
197
- },
198
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
199
- ]
200
- }
201
- },
202
- {
203
- kind: 'Field',
204
- name: { kind: 'Name', value: 'shortVideoData' },
205
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
206
- }
207
- ]
208
- }
209
- }
210
- ]
211
- }
212
- },
213
- {
214
- kind: 'FragmentDefinition',
215
- name: { kind: 'Name', value: 'ShortVideoStreamComponentDataFragment' },
216
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
217
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } }] }
218
- },
219
- {
220
- kind: 'FragmentDefinition',
221
- name: { kind: 'Name', value: 'ShortVideoStreamComponentParamsFragment' },
222
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ShortVideoStreamComponentParams' } },
223
- selectionSet: {
224
- kind: 'SelectionSet',
225
- selections: [
226
- {
227
- kind: 'Field',
228
- name: { kind: 'Name', value: 'data' },
229
- selectionSet: {
230
- kind: 'SelectionSet',
231
- selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoStreamComponentDataFragment' } }]
232
- }
233
- }
234
- ]
235
- }
236
- },
237
- {
238
- kind: 'FragmentDefinition',
239
- name: { kind: 'Name', value: 'ImagesStreamComponentParamsFragment' },
240
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ImagesStreamComponentParams' } },
241
- selectionSet: {
242
- kind: 'SelectionSet',
243
- selections: [
244
- {
245
- kind: 'Field',
246
- name: { kind: 'Name', value: 'images' },
247
- selectionSet: {
248
- kind: 'SelectionSet',
249
- selections: [
250
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
251
- { kind: 'Field', name: { kind: 'Name', value: 'url' } }
252
- ]
253
- }
254
- },
255
- { kind: 'Field', name: { kind: 'Name', value: 'mode' } }
256
- ]
257
- }
258
- },
259
- {
260
- kind: 'FragmentDefinition',
261
- name: { kind: 'Name', value: 'ProductStreamComponentDataFragment' },
262
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Product' } },
263
- selectionSet: {
264
- kind: 'SelectionSet',
265
- selections: [
266
- {
267
- kind: 'Field',
268
- name: { kind: 'Name', value: 'media' },
269
- selectionSet: {
270
- kind: 'SelectionSet',
271
- selections: [
272
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
273
- { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
274
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
275
- ]
276
- }
277
- },
278
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
279
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
280
- { kind: 'Field', name: { kind: 'Name', value: 'link' } },
281
- {
282
- kind: 'Field',
283
- name: { kind: 'Name', value: 'priceAndAvailability' },
284
- selectionSet: {
285
- kind: 'SelectionSet',
286
- selections: [
287
- { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
288
- { kind: 'Field', name: { kind: 'Name', value: 'price' } },
289
- {
290
- kind: 'Field',
291
- name: { kind: 'Name', value: 'productSalePrices' },
292
- selectionSet: {
293
- kind: 'SelectionSet',
294
- selections: [
295
- { kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
296
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
297
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
298
- ]
299
- }
300
- }
301
- ]
302
- }
303
- }
304
- ]
305
- }
306
- },
307
- {
308
- kind: 'FragmentDefinition',
309
- name: { kind: 'Name', value: 'ProductStreamComponentParamsFragment' },
310
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'ProductStreamComponentParams' } },
311
- selectionSet: {
312
- kind: 'SelectionSet',
313
- selections: [
314
- {
315
- kind: 'Field',
316
- name: { kind: 'Name', value: 'data' },
317
- selectionSet: {
318
- kind: 'SelectionSet',
319
- selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductStreamComponentDataFragment' } }]
320
- }
321
- }
322
- ]
323
- }
324
- },
325
- {
326
- kind: 'FragmentDefinition',
327
- name: { kind: 'Name', value: 'StreamComponentPayloadFragment' },
328
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'StreamComponent' } },
329
- selectionSet: {
330
- kind: 'SelectionSet',
331
- selections: [
332
- { kind: 'Field', name: { kind: 'Name', value: 'slotId' } },
333
- { kind: 'Field', name: { kind: 'Name', value: 'type' } },
334
- {
335
- kind: 'Field',
336
- name: { kind: 'Name', value: 'params' },
337
- selectionSet: {
338
- kind: 'SelectionSet',
339
- selections: [
340
- {
341
- kind: 'Field',
342
- name: { kind: 'Name', value: 'shortVideo' },
343
- selectionSet: {
344
- kind: 'SelectionSet',
345
- selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoStreamComponentParamsFragment' } }]
346
- }
347
- },
348
- {
349
- kind: 'Field',
350
- name: { kind: 'Name', value: 'images' },
351
- selectionSet: {
352
- kind: 'SelectionSet',
353
- selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ImagesStreamComponentParamsFragment' } }]
354
- }
355
- },
356
- {
357
- kind: 'Field',
358
- name: { kind: 'Name', value: 'product' },
359
- selectionSet: {
360
- kind: 'SelectionSet',
361
- selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ProductStreamComponentParamsFragment' } }]
362
- }
363
- }
364
- ]
365
- }
366
- }
367
- ]
368
- }
369
- },
370
- {
371
- kind: 'FragmentDefinition',
372
- name: { kind: 'Name', value: 'StreamComponentSlotFragment' },
373
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'StreamComponentSlot' } },
374
- selectionSet: {
375
- kind: 'SelectionSet',
376
- selections: [
377
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
378
- { kind: 'Field', name: { kind: 'Name', value: 'allowedComponents' } },
379
- { kind: 'Field', name: { kind: 'Name', value: 'top' } },
380
- { kind: 'Field', name: { kind: 'Name', value: 'left' } },
381
- { kind: 'Field', name: { kind: 'Name', value: 'width' } },
382
- { kind: 'Field', name: { kind: 'Name', value: 'height' } },
383
- {
384
- kind: 'Field',
385
- name: { kind: 'Name', value: 'styles' },
386
- selectionSet: {
387
- kind: 'SelectionSet',
388
- selections: [
389
- { kind: 'Field', name: { kind: 'Name', value: 'paddingTop' } },
390
- { kind: 'Field', name: { kind: 'Name', value: 'paddingRight' } },
391
- { kind: 'Field', name: { kind: 'Name', value: 'paddingBottom' } },
392
- { kind: 'Field', name: { kind: 'Name', value: 'paddingLeft' } }
393
- ]
394
- }
20
+ name: { kind: 'Name', value: 'layout' },
21
+ arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'scale' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } } }]
395
22
  }
396
23
  ]
397
24
  }
@@ -4,10 +4,5 @@ fragment StreamPageViewerPayloadFragment on StreamPage {
4
4
  url
5
5
  }
6
6
  name
7
- components {
8
- ...StreamComponentPayloadFragment
9
- }
10
- slots {
11
- ...StreamComponentSlotFragment
12
- }
7
+ layout(scale: $image_scale)
13
8
  }
@@ -1,10 +1,13 @@
1
+ import type { IStreamElementLocalization } from '../layout/element-views';
1
2
  import type { ITimeAgoLocalization } from '../../ui/time-ago';
2
3
  export interface IStreamPageViewerLocalization {
3
4
  viewsCount?: (count: number) => string;
4
5
  timeAgoLocalization?: ITimeAgoLocalization;
6
+ elementsLocalization?: IStreamElementLocalization;
5
7
  }
6
8
  export declare class StreamPageViewerLocalization {
7
9
  viewsCount: (count: number) => string;
8
10
  timeAgoLocalization: ITimeAgoLocalization | undefined;
11
+ elementsLocalization: IStreamElementLocalization | undefined;
9
12
  constructor(init?: IStreamPageViewerLocalization);
10
13
  }
@@ -1,13 +1,10 @@
1
1
  export class StreamPageViewerLocalization {
2
2
  viewsCount = $state((count) => (count === 1 ? '1 view' : `${count} views`));
3
3
  timeAgoLocalization = $state(undefined);
4
+ elementsLocalization = $state(undefined);
4
5
  constructor(init) {
5
- if (!init) {
6
- return;
7
- }
8
- if (init.viewsCount !== undefined) {
9
- this.viewsCount = init.viewsCount;
10
- }
11
- this.timeAgoLocalization = init.timeAgoLocalization;
6
+ this.viewsCount = init?.viewsCount ?? this.viewsCount;
7
+ this.timeAgoLocalization = init?.timeAgoLocalization ?? this.timeAgoLocalization;
8
+ this.elementsLocalization = init?.elementsLocalization ?? this.elementsLocalization;
12
9
  }
13
10
  }
@@ -1,18 +1,18 @@
1
- import type { ShortVideoStreamComponentData, StreamComponentModel } from '../components';
2
- import type { StreamComponentSlotModel } from '../slots';
1
+ import type { StreamLayout } from '../layout';
2
+ import type { StreamLayoutShortVideoModel } from '../layout/models';
3
3
  export type StreamPageViewerModel = GeneralStreamPageViewerModel | ShortVideoStreamPageViewerModel;
4
4
  export type ShortVideoStreamPageViewerModel = {
5
5
  type: 'short-video';
6
6
  id: string;
7
7
  cover: string | null;
8
8
  name: string | null;
9
- shortVideo: ShortVideoStreamComponentData;
9
+ shortVideo: StreamLayoutShortVideoModel;
10
+ layout: StreamLayout;
10
11
  };
11
12
  export type GeneralStreamPageViewerModel = {
12
13
  type: 'general';
13
14
  id: string;
14
15
  cover: string | null;
15
16
  name: string | null;
16
- components: StreamComponentModel[];
17
- slots: StreamComponentSlotModel[];
17
+ layout: StreamLayout;
18
18
  };
@@ -8,10 +8,11 @@
8
8
  });
9
9
  };
10
10
  import { toastrWarning } from '../../core/toastr';
11
- import { PlayerSlider } from '../../ui/player';
12
- import { ShortVideosViewer } from '../../short-videos/short-video-viewer';
11
+ import { ShortVideoViewer } from '../../short-videos/short-video-viewer';
12
+ import { mapToShortVideoViewerModel } from '../layout/models';
13
13
  import { StreamPageViewer } from '../stream-page-viewer';
14
14
  import { Loading } from '../../ui/loading';
15
+ import { PlayerSlider } from '../../ui/player';
15
16
  import { SpotlightLayout } from '../../ui/spotlight-layout';
16
17
  import { default as Controls } from './controls.svelte';
17
18
  import { mapStreamPlayerModel } from './mapper';
@@ -79,7 +80,10 @@ const handleDimensionsChanged = (dimensions) => {
79
80
  {#if item.type === 'general'}
80
81
  <StreamPageViewer page={item} />
81
82
  {:else if item.type === 'short-video'}
82
- <ShortVideosViewer model={item.shortVideo} autoplay="on-appearance" showAttachments={uiManager.showShortVideoOverlay} />
83
+ <ShortVideoViewer
84
+ model={mapToShortVideoViewerModel(item.shortVideo)}
85
+ autoplay="on-appearance"
86
+ showAttachments={uiManager.showShortVideoOverlay} />
83
87
  {/if}
84
88
  {/snippet}
85
89
  </PlayerSlider>