@streamscloud/embeddable 3.2.1 → 3.2.3

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 (178) hide show
  1. package/dist/core/enums.d.ts +2 -0
  2. package/dist/core/enums.js +2 -0
  3. package/dist/core/graphql.d.ts +1 -3
  4. package/dist/core/graphql.js +3 -12
  5. package/dist/core/utils/html-helper.d.ts +0 -1
  6. package/dist/core/utils/html-helper.js +0 -4
  7. package/dist/products/price-helper.js +1 -1
  8. package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +1 -1
  9. package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +2 -2
  10. package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +2 -3
  11. package/dist/short-videos/short-video-viewer/cmp.product.svelte +1 -1
  12. package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +2 -3
  13. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +1 -1
  14. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +2 -3
  15. package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +2 -6
  16. package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +1 -1
  17. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +1 -1
  18. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +2 -3
  19. package/dist/short-videos/short-video-viewer/description.svelte +0 -5
  20. package/dist/short-videos/short-video-viewer/description.svelte.d.ts +1 -1
  21. package/dist/short-videos/short-video-viewer/index.d.ts +2 -4
  22. package/dist/short-videos/short-video-viewer/index.js +0 -1
  23. package/dist/short-videos/short-video-viewer/mapper.js +1 -5
  24. package/dist/short-videos/short-video-viewer/operations.generated.d.ts +0 -4
  25. package/dist/short-videos/short-video-viewer/operations.generated.js +0 -6
  26. package/dist/short-videos/short-video-viewer/operations.graphql +0 -4
  27. package/dist/short-videos/short-video-viewer/{short-video-attachments-localization.d.ts → short-video-attachments-localization.svelte.d.ts} +4 -5
  28. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +10 -0
  29. package/dist/short-videos/short-video-viewer/{short-video-details-localization.d.ts → short-video-details-localization.svelte.d.ts} +6 -7
  30. package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +10 -0
  31. package/dist/short-videos/short-video-viewer/{short-video-product-localization.d.ts → short-video-product-localization.svelte.d.ts} +1 -2
  32. package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.js +11 -0
  33. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +13 -0
  34. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +10 -0
  35. package/dist/short-videos/short-video-viewer/types.d.ts +0 -4
  36. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +11 -88
  37. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +5 -5
  38. package/dist/short-videos/short-videos-player/controls.svelte +2 -2
  39. package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -1
  40. package/dist/short-videos/short-videos-player/index.d.ts +14 -51
  41. package/dist/short-videos/short-videos-player/index.js +12 -83
  42. package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +8 -0
  43. package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +6 -0
  44. package/dist/streams/layout/cmp.layout.svelte.d.ts +2 -4
  45. package/dist/streams/layout/cmp.slot-content.svelte +4 -4
  46. package/dist/streams/layout/cmp.slot-content.svelte.d.ts +1 -2
  47. package/dist/streams/layout/cmp.slot.svelte.d.ts +2 -7
  48. package/dist/streams/layout/component.d.ts +0 -2
  49. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +1 -1
  50. package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +3 -4
  51. package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +2 -15
  52. package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +3 -7
  53. package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +2 -2
  54. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +89 -15
  55. package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +4 -5
  56. package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +2 -4
  57. package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -3
  58. package/dist/streams/layout/element-views/cmp.stream-element.svelte +17 -24
  59. package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +3 -4
  60. package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +2 -2
  61. package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +2 -6
  62. package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -2
  63. package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +3 -3
  64. package/dist/streams/layout/element-views/index.d.ts +11 -16
  65. package/dist/streams/layout/element-views/index.js +9 -12
  66. package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +9 -0
  67. package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +8 -0
  68. package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +8 -0
  69. package/dist/streams/layout/element-views/stream-element-localization.svelte.js +6 -0
  70. package/dist/streams/layout/elements.d.ts +12 -47
  71. package/dist/streams/layout/elements.js +1 -1
  72. package/dist/streams/layout/enums.d.ts +3 -34
  73. package/dist/streams/layout/enums.js +7 -46
  74. package/dist/streams/layout/index.d.ts +10 -3
  75. package/dist/streams/layout/index.js +2 -3
  76. package/dist/streams/layout/layout.d.ts +1 -2
  77. package/dist/streams/layout/models/index.d.ts +1 -1
  78. package/dist/streams/layout/models/mapper.js +1 -5
  79. package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +1 -1
  80. package/dist/streams/layout/models/stream-layout-media-item-model.js +1 -1
  81. package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +1 -1
  82. package/dist/streams/layout/models/stream-layout-product-model.d.ts +2 -1
  83. package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +0 -4
  84. package/dist/streams/layout/serializer.d.ts +3 -0
  85. package/dist/streams/layout/serializer.js +6 -0
  86. package/dist/streams/layout/slot.d.ts +0 -2
  87. package/dist/streams/layout/styles-transformer.d.ts +2 -3
  88. package/dist/streams/layout/styles-transformer.js +30 -54
  89. package/dist/streams/layout/styles.d.ts +14 -24
  90. package/dist/streams/layout/type-guards.d.ts +0 -31
  91. package/dist/streams/layout/type-guards.js +1 -13
  92. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +2 -4
  93. package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -3
  94. package/dist/streams/stream-page-viewer/index.d.ts +0 -1
  95. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +13 -0
  96. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +10 -0
  97. package/dist/streams/stream-player/cmp.stream-player.svelte +7 -47
  98. package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +4 -6
  99. package/dist/streams/stream-player/controls.svelte +3 -46
  100. package/dist/streams/stream-player/controls.svelte.d.ts +1 -1
  101. package/dist/streams/stream-player/index.d.ts +4 -6
  102. package/dist/streams/stream-player/index.js +28 -15
  103. package/dist/streams/stream-player/operations.generated.d.ts +1 -1
  104. package/dist/streams/stream-player/operations.generated.js +3 -5
  105. package/dist/streams/stream-player/operations.graphql +3 -3
  106. package/dist/streams/stream-player/stream-overview.svelte +2 -2
  107. package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -1
  108. package/dist/streams/stream-player/stream-player-buffer.svelte.js +2 -2
  109. package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +12 -0
  110. package/dist/streams/stream-player/stream-player-localization.svelte.js +10 -0
  111. package/dist/ui/icon/cmp.icon.svelte +26 -13
  112. package/dist/ui/line-clamp/cmp.line-clamp.svelte +2 -2
  113. package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +2 -3
  114. package/dist/ui/line-clamp/index.d.ts +1 -1
  115. package/dist/ui/line-clamp/index.js +1 -1
  116. package/dist/ui/line-clamp/{line-clamp-localization.d.ts → line-clamp-localization.svelte.d.ts} +1 -2
  117. package/dist/ui/line-clamp/line-clamp-localization.svelte.js +15 -0
  118. package/dist/ui/shadow-dom/shadow-host.d.ts +5 -1
  119. package/dist/ui/shadow-dom/shadow-host.js +14 -1
  120. package/dist/ui/time-ago/cmp.time-ago.svelte +1 -1
  121. package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +2 -3
  122. package/dist/ui/time-ago/index.d.ts +1 -1
  123. package/dist/ui/time-ago/{time-ago-localization.d.ts → time-ago-localization.svelte.d.ts} +1 -2
  124. package/dist/ui/time-ago/time-ago-localization.svelte.js +39 -0
  125. package/dist/ui/video/cmp.video.svelte +18 -42
  126. package/package.json +1 -1
  127. package/dist/core/analytics.profile-id.d.ts +0 -5
  128. package/dist/core/analytics.profile-id.js +0 -17
  129. package/dist/core/document.event-handlers.d.ts +0 -1
  130. package/dist/core/document.event-handlers.js +0 -5
  131. package/dist/core/locale.d.ts +0 -6
  132. package/dist/core/locale.js +0 -24
  133. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -21
  134. package/dist/short-videos/short-video-viewer/short-video-details-localization.js +0 -17
  135. package/dist/short-videos/short-video-viewer/short-video-product-localization.js +0 -13
  136. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +0 -14
  137. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.js +0 -17
  138. package/dist/short-videos/short-videos-player/operations.generated.d.ts +0 -68
  139. package/dist/short-videos/short-videos-player/operations.generated.js +0 -199
  140. package/dist/short-videos/short-videos-player/operations.graphql +0 -8
  141. package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +0 -16
  142. package/dist/short-videos/short-videos-player/short-videos-player-localization.js +0 -13
  143. package/dist/short-videos/short-videos-player/types.d.ts +0 -36
  144. package/dist/short-videos/short-videos-player/types.js +0 -6
  145. package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +0 -16
  146. package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte.d.ts +0 -7
  147. package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +0 -74
  148. package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +0 -11
  149. package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +0 -37
  150. package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte.d.ts +0 -7
  151. package/dist/streams/layout/element-views/price-element-view.svelte +0 -168
  152. package/dist/streams/layout/element-views/price-element-view.svelte.d.ts +0 -15
  153. package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +0 -13
  154. package/dist/streams/layout/element-views/price-stream-element-localization.js +0 -21
  155. package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -9
  156. package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
  157. package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +0 -8
  158. package/dist/streams/layout/element-views/stock-stream-element-localization.js +0 -26
  159. package/dist/streams/layout/element-views/stream-element-localization.d.ts +0 -15
  160. package/dist/streams/layout/element-views/stream-element-localization.js +0 -11
  161. package/dist/streams/layout/serializer.svelte.d.ts +0 -29
  162. package/dist/streams/layout/serializer.svelte.js +0 -93
  163. package/dist/streams/layout/slot-data-ref.d.ts +0 -13
  164. package/dist/streams/layout/slot-data-ref.js +0 -1
  165. package/dist/streams/layout/svg-attributes.d.ts +0 -7
  166. package/dist/streams/layout/svg-attributes.js +0 -8
  167. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -9
  168. package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
  169. package/dist/streams/stream-player/stream-player-localization.d.ts +0 -26
  170. package/dist/streams/stream-player/stream-player-localization.js +0 -31
  171. package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
  172. package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -125
  173. package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -9
  174. package/dist/ui/swipe-indicator/index.d.ts +0 -2
  175. package/dist/ui/swipe-indicator/index.js +0 -1
  176. package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -8
  177. package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
  178. package/dist/ui/time-ago/time-ago-localization.js +0 -55
@@ -1,68 +0,0 @@
1
- import type * as SchemaTypes from '../../../gql/types';
2
- import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
3
- export type GetShortVideosQueryVariables = SchemaTypes.Exact<{
4
- input: SchemaTypes.EmbedPostsInput;
5
- image_scale?: SchemaTypes.InputMaybe<SchemaTypes.ImageScale>;
6
- }>;
7
- export type GetShortVideosQuery = {
8
- shortVideos: {
9
- items: Array<{
10
- id: string;
11
- enableSocialInteractions: boolean;
12
- postHeading: {
13
- sourceImage: string | null;
14
- sourceName: string;
15
- postDisplayDate: any;
16
- postViewsCount: number;
17
- };
18
- allProducts: Array<{
19
- title: string;
20
- id: string;
21
- link: string | null;
22
- shortDescription: string | null;
23
- media: Array<{
24
- url: string;
25
- thumbnailUrl: string | null;
26
- type: SchemaTypes.MediaType;
27
- }>;
28
- brand: {
29
- name: string;
30
- } | null;
31
- priceAndAvailability: {
32
- currency: SchemaTypes.Currency;
33
- price: number;
34
- productSalePrices: Array<{
35
- salePrice: number;
36
- salePriceEffectiveDateFrom: any | null;
37
- salePriceEffectiveDateTo: any | null;
38
- }> | null;
39
- };
40
- }>;
41
- ad: {
42
- id: string;
43
- title: string;
44
- description: string | null;
45
- buttonText: string | null;
46
- buttonUrl: string | null;
47
- openLinkInNewWindow: boolean | null;
48
- type: SchemaTypes.AdType;
49
- media: Array<{
50
- url: string;
51
- thumbnailUrl: string | null;
52
- type: SchemaTypes.MediaType;
53
- }>;
54
- } | null;
55
- postData: {
56
- media: Array<{
57
- url: string;
58
- thumbnailUrl: string | null;
59
- type: SchemaTypes.MediaType;
60
- }>;
61
- shortVideoData: {
62
- text: string | null;
63
- } | null;
64
- };
65
- }>;
66
- };
67
- };
68
- export declare const GetShortVideosDocument: DocumentNode<GetShortVideosQuery, GetShortVideosQueryVariables>;
@@ -1,199 +0,0 @@
1
- export const GetShortVideosDocument = {
2
- kind: 'Document',
3
- definitions: [
4
- {
5
- kind: 'OperationDefinition',
6
- operation: 'query',
7
- name: { kind: 'Name', value: 'GetShortVideos' },
8
- variableDefinitions: [
9
- {
10
- kind: 'VariableDefinition',
11
- variable: { kind: 'Variable', name: { kind: 'Name', value: 'input' } },
12
- type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'EmbedPostsInput' } } }
13
- },
14
- {
15
- kind: 'VariableDefinition',
16
- variable: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } },
17
- type: { kind: 'NamedType', name: { kind: 'Name', value: 'ImageScale' } },
18
- defaultValue: { kind: 'EnumValue', value: 'ORIGINAL_ENCODED' }
19
- }
20
- ],
21
- selectionSet: {
22
- kind: 'SelectionSet',
23
- selections: [
24
- {
25
- kind: 'Field',
26
- alias: { kind: 'Name', value: 'shortVideos' },
27
- name: { kind: 'Name', value: 'embedPosts' },
28
- arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'input' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'input' } } }],
29
- selectionSet: {
30
- kind: 'SelectionSet',
31
- selections: [
32
- {
33
- kind: 'Field',
34
- name: { kind: 'Name', value: 'items' },
35
- selectionSet: {
36
- kind: 'SelectionSet',
37
- selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' } }]
38
- }
39
- }
40
- ]
41
- }
42
- }
43
- ]
44
- }
45
- },
46
- {
47
- kind: 'FragmentDefinition',
48
- name: { kind: 'Name', value: 'ShortVideoViewerPayloadFragment' },
49
- typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Post' } },
50
- selectionSet: {
51
- kind: 'SelectionSet',
52
- selections: [
53
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
54
- { kind: 'Field', name: { kind: 'Name', value: 'enableSocialInteractions' } },
55
- {
56
- kind: 'Field',
57
- name: { kind: 'Name', value: 'postHeading' },
58
- selectionSet: {
59
- kind: 'SelectionSet',
60
- 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' } }
65
- ]
66
- }
67
- },
68
- {
69
- kind: 'Field',
70
- name: { kind: 'Name', value: 'allProducts' },
71
- selectionSet: {
72
- kind: 'SelectionSet',
73
- selections: [
74
- {
75
- 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: 'brand' },
93
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'name' } }] }
94
- },
95
- {
96
- kind: 'Field',
97
- name: { kind: 'Name', value: 'priceAndAvailability' },
98
- selectionSet: {
99
- kind: 'SelectionSet',
100
- selections: [
101
- { kind: 'Field', name: { kind: 'Name', value: 'currency' } },
102
- { kind: 'Field', name: { kind: 'Name', value: 'price' } },
103
- {
104
- kind: 'Field',
105
- name: { kind: 'Name', value: 'productSalePrices' },
106
- selectionSet: {
107
- kind: 'SelectionSet',
108
- selections: [
109
- { kind: 'Field', name: { kind: 'Name', value: 'salePrice' } },
110
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateFrom' } },
111
- { kind: 'Field', name: { kind: 'Name', value: 'salePriceEffectiveDateTo' } }
112
- ]
113
- }
114
- }
115
- ]
116
- }
117
- }
118
- ]
119
- }
120
- },
121
- {
122
- kind: 'Field',
123
- name: { kind: 'Name', value: 'ad' },
124
- selectionSet: {
125
- kind: 'SelectionSet',
126
- selections: [
127
- { kind: 'Field', name: { kind: 'Name', value: 'id' } },
128
- { kind: 'Field', name: { kind: 'Name', value: 'title' } },
129
- { kind: 'Field', name: { kind: 'Name', value: 'description' } },
130
- { kind: 'Field', name: { kind: 'Name', value: 'buttonText' } },
131
- { kind: 'Field', name: { kind: 'Name', value: 'buttonUrl' } },
132
- { kind: 'Field', name: { kind: 'Name', value: 'openLinkInNewWindow' } },
133
- { kind: 'Field', name: { kind: 'Name', value: 'type' } },
134
- {
135
- kind: 'Field',
136
- name: { kind: 'Name', value: 'media' },
137
- selectionSet: {
138
- kind: 'SelectionSet',
139
- selections: [
140
- { kind: 'Field', name: { kind: 'Name', value: 'url' } },
141
- { kind: 'Field', name: { kind: 'Name', value: 'thumbnailUrl' } },
142
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
143
- ]
144
- }
145
- }
146
- ]
147
- }
148
- },
149
- {
150
- kind: 'Field',
151
- name: { kind: 'Name', value: 'postData' },
152
- selectionSet: {
153
- kind: 'SelectionSet',
154
- selections: [
155
- {
156
- kind: 'Field',
157
- name: { kind: 'Name', value: 'media' },
158
- selectionSet: {
159
- kind: 'SelectionSet',
160
- selections: [
161
- {
162
- kind: 'Field',
163
- name: { kind: 'Name', value: 'url' },
164
- arguments: [
165
- {
166
- kind: 'Argument',
167
- name: { kind: 'Name', value: 'scale' },
168
- value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
169
- }
170
- ]
171
- },
172
- {
173
- kind: 'Field',
174
- name: { kind: 'Name', value: 'thumbnailUrl' },
175
- arguments: [
176
- {
177
- kind: 'Argument',
178
- name: { kind: 'Name', value: 'scale' },
179
- value: { kind: 'Variable', name: { kind: 'Name', value: 'image_scale' } }
180
- }
181
- ]
182
- },
183
- { kind: 'Field', name: { kind: 'Name', value: 'type' } }
184
- ]
185
- }
186
- },
187
- {
188
- kind: 'Field',
189
- name: { kind: 'Name', value: 'shortVideoData' },
190
- selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'text' } }] }
191
- }
192
- ]
193
- }
194
- }
195
- ]
196
- }
197
- }
198
- ]
199
- };
@@ -1,8 +0,0 @@
1
- # noinspection GraphQLSchemaValidation
2
- query GetShortVideos($input: EmbedPostsInput!, $image_scale: ImageScale = ORIGINAL_ENCODED) {
3
- shortVideos: embedPosts(input: $input) {
4
- items {
5
- ...ShortVideoViewerPayloadFragment
6
- }
7
- }
8
- }
@@ -1,16 +0,0 @@
1
- import { type Locale } from '../../core/locale';
2
- import type { IShortVideoAttachmentsLocalization, IShortVideoDetailsLocalization, IShortVideoViewerLocalization } from '../short-video-viewer';
3
- import type { ISwipeIndicatorLocalization } from '../../ui/swipe-indicator';
4
- export interface IShortVideosPlayerLocalization {
5
- shortVideoAttachmentsLocalization?: IShortVideoAttachmentsLocalization | Locale;
6
- shortVideoDetailsLocalization?: IShortVideoDetailsLocalization | Locale;
7
- shortVideoViewerLocalization?: IShortVideoViewerLocalization | Locale;
8
- swipeIndicatorLocalization?: ISwipeIndicatorLocalization | Locale;
9
- }
10
- export declare class ShortVideosPlayerLocalization {
11
- shortVideoAttachmentsLocalization: IShortVideoAttachmentsLocalization | Locale;
12
- shortVideoDetailsLocalization: IShortVideoDetailsLocalization | Locale;
13
- shortVideoViewerLocalization: IShortVideoViewerLocalization | Locale;
14
- swipeIndicatorLocalization: ISwipeIndicatorLocalization | Locale;
15
- constructor(init: IShortVideosPlayerLocalization | Locale);
16
- }
@@ -1,13 +0,0 @@
1
- import { isLocale } from '../../core/locale';
2
- export class ShortVideosPlayerLocalization {
3
- shortVideoAttachmentsLocalization;
4
- shortVideoDetailsLocalization;
5
- shortVideoViewerLocalization;
6
- swipeIndicatorLocalization;
7
- constructor(init) {
8
- this.shortVideoAttachmentsLocalization = isLocale(init) ? init : init.shortVideoAttachmentsLocalization || 'en';
9
- this.shortVideoDetailsLocalization = isLocale(init) ? init : init.shortVideoDetailsLocalization || 'en';
10
- this.shortVideoViewerLocalization = isLocale(init) ? init : init.shortVideoViewerLocalization || 'en';
11
- this.swipeIndicatorLocalization = isLocale(init) ? init : init.swipeIndicatorLocalization || 'en';
12
- }
13
- }
@@ -1,36 +0,0 @@
1
- import type { ShortVideoViewerModel } from '../..';
2
- import type { PlayerItemsProvider } from '../../ui/player';
3
- import type { IShortVideosPlayerLocalization } from './short-videos-player-localization';
4
- export type PlayerInput = ProviderPlayerInput | IdsPlayerInput;
5
- export type ProviderPlayerInput = {
6
- type: 'provider';
7
- provider: PlayerItemsProvider<ShortVideoViewerModel>;
8
- };
9
- export type IdsPlayerInput = {
10
- type: 'ids';
11
- ids: string[];
12
- initialId?: string;
13
- graphqlOrigin?: string;
14
- initiator?: string;
15
- };
16
- export type OpenShortVideosPlayerInit = ProviderInit | IdsInit;
17
- type ProviderInit = {
18
- shortVideosProvider: PlayerItemsProvider<ShortVideoViewerModel>;
19
- localization?: IShortVideosPlayerLocalization | 'en' | 'no';
20
- on?: {
21
- playerClosed?: () => void;
22
- };
23
- };
24
- type IdsInit = {
25
- ids: string[];
26
- graphqlOrigin?: string;
27
- initialId?: string;
28
- localization?: IShortVideosPlayerLocalization | 'en' | 'no';
29
- initiator?: string;
30
- on?: {
31
- playerClosed?: () => void;
32
- };
33
- };
34
- export declare const isShortVideosProviderInit: (init: unknown) => init is ProviderInit;
35
- export declare function isIdsInit(init: unknown): init is IdsInit;
36
- export {};
@@ -1,6 +0,0 @@
1
- export const isShortVideosProviderInit = (init) => {
2
- return typeof init === 'object' && init !== null && 'shortVideosProvider' in init;
3
- };
4
- export function isIdsInit(init) {
5
- return typeof init === 'object' && init !== null && 'ids' in init && 'graphqlOrigin' in init;
6
- }
@@ -1,16 +0,0 @@
1
- <script lang="ts">import { HtmlHelper } from '../../../core/utils/html-helper';
2
- import { generateAnnotationStyles } from '../styles-transformer';
3
- let { model } = $props();
4
- const svgValue = $derived.by(() => {
5
- if (model.svg) {
6
- return HtmlHelper.sanitizeSvg(model.svg);
7
- }
8
- return '';
9
- });
10
- </script>
11
-
12
- {#if !model.inactive}
13
- <div class="annotation-stream-element" style={generateAnnotationStyles(model.styles, model.placement)}>
14
- {@html svgValue}
15
- </div>
16
- {/if}
@@ -1,7 +0,0 @@
1
- import type { AnnotationStreamElementModel } from '../elements';
2
- type Props = {
3
- model: AnnotationStreamElementModel;
4
- };
5
- declare const Cmp: import("svelte").Component<Props, {}, "">;
6
- type Cmp = ReturnType<typeof Cmp>;
7
- export default Cmp;
@@ -1,74 +0,0 @@
1
- <script lang="ts">var _a;
2
- import { StockStreamElementLocalization } from './stock-stream-element-localization';
3
- import { StockStreamElementLevel } from '../enums';
4
- import { mapFlexJustifyContent, transformNumericValue } from '../styles-transformer';
5
- let { model, heightOverrideDdu, localization: localizationInit } = $props();
6
- const localization = $derived(new StockStreamElementLocalization(localizationInit));
7
- const height = $derived(heightOverrideDdu || ((_a = model.styles) === null || _a === void 0 ? void 0 : _a.height) || 16);
8
- const containerStyles = $derived.by(() => {
9
- var _a;
10
- const values = [
11
- `align-items: center;`,
12
- `height: ${transformNumericValue(height)}; gap: 1cqi;`,
13
- `justify-content: ${mapFlexJustifyContent((_a = model.styles) === null || _a === void 0 ? void 0 : _a.horizontalAlign)};`
14
- ];
15
- return values.join('');
16
- });
17
- const dotCustomStyles = $derived.by(() => {
18
- const values = [`height: ${transformNumericValue(height)};`, `width: ${transformNumericValue(height)};`];
19
- return values.join('');
20
- });
21
- const quantityCustomStyles = $derived.by(() => {
22
- const values = [`font-size: ${transformNumericValue(height * 0.75)};`];
23
- return values.join('');
24
- });
25
- </script>
26
-
27
- <div class="stock-stream-element" style={containerStyles}>
28
- <div
29
- class="stock-stream-element__dot"
30
- style={dotCustomStyles}
31
- class:stock-stream-element__dot--high={model.level === StockStreamElementLevel.High}
32
- class:stock-stream-element__dot--medium={model.level === StockStreamElementLevel.Medium}
33
- class:stock-stream-element__dot--low={model.level === StockStreamElementLevel.Low}
34
- class:stock-stream-element__dot--out-of-stock={model.level === StockStreamElementLevel.OutOfStock}>
35
- &nbsp;
36
- </div>
37
- <div class="stock-stream-element__quantity" style={quantityCustomStyles}>
38
- {localization.quantity(model.quantity, [StockStreamElementLevel.Low, StockStreamElementLevel.OutOfStock].includes(model.level))}
39
- {#if model.textAfter}
40
- &nbsp;{model.textAfter}
41
- {/if}
42
- </div>
43
- </div>
44
-
45
- <style>@keyframes fadeIn {
46
- 0% {
47
- opacity: 1;
48
- }
49
- 50% {
50
- opacity: 0.4;
51
- }
52
- 100% {
53
- opacity: 1;
54
- }
55
- }
56
- .stock-stream-element {
57
- display: flex;
58
- }
59
- .stock-stream-element__dot {
60
- border-radius: 50%;
61
- }
62
- .stock-stream-element__dot--high {
63
- background-color: #0cce6b;
64
- }
65
- .stock-stream-element__dot--medium {
66
- background-color: #ffa62b;
67
- }
68
- .stock-stream-element__dot--low {
69
- background-color: #e71d36;
70
- }
71
- .stock-stream-element__dot--out-of-stock {
72
- border: 1px solid #144ab0;
73
- background-color: #ffffff;
74
- }</style>
@@ -1,11 +0,0 @@
1
- import type { Locale } from '../../../core/locale';
2
- import { type IStockStreamElementLocalization } from './stock-stream-element-localization';
3
- import type { StockStreamElementModel } from '../elements';
4
- type Props = {
5
- model: StockStreamElementModel;
6
- heightOverrideDdu?: number;
7
- localization: IStockStreamElementLocalization | Locale;
8
- };
9
- declare const Cmp: import("svelte").Component<Props, {}, "">;
10
- type Cmp = ReturnType<typeof Cmp>;
11
- export default Cmp;
@@ -1,37 +0,0 @@
1
- <script lang="ts">let { model } = $props();
2
- export {};
3
- </script>
4
-
5
- <div class="web-view-stream-element">
6
- {#if model.url}
7
- <iframe
8
- title="Web View"
9
- src={model.url}
10
- style="width: 100%; height: 100%; border: none;"
11
- allowfullscreen
12
- sandbox="allow-scripts allow-forms allow-same-origin"></iframe>
13
- {:else}
14
- <p>No URL provided for the web view.</p>
15
- {/if}
16
- </div>
17
-
18
- <style>@keyframes fadeIn {
19
- 0% {
20
- opacity: 1;
21
- }
22
- 50% {
23
- opacity: 0.4;
24
- }
25
- 100% {
26
- opacity: 1;
27
- }
28
- }
29
- .web-view-stream-element {
30
- width: 100%;
31
- min-width: 100%;
32
- max-width: 100%;
33
- height: 100%;
34
- min-height: 100%;
35
- max-height: 100%;
36
- position: relative;
37
- }</style>
@@ -1,7 +0,0 @@
1
- import type { WebViewStreamElementModel } from '../elements';
2
- type Props = {
3
- model: WebViewStreamElementModel;
4
- };
5
- declare const Cmp: import("svelte").Component<Props, {}, "">;
6
- type Cmp = ReturnType<typeof Cmp>;
7
- export default Cmp;