@streamscloud/embeddable 3.4.2 → 5.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 (112) hide show
  1. package/dist/ads/ad-card/cmp.ad-card.svelte +220 -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 +14 -0
  7. package/dist/ads/ad-card/operations.generated.d.ts +24 -0
  8. package/dist/ads/ad-card/operations.generated.js +48 -0
  9. package/dist/ads/ad-card/operations.graphql +21 -0
  10. package/dist/ads/ad-card/types.d.ts +18 -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 +219 -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 +145 -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 +46 -20
  33. package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +4 -2
  34. package/dist/short-videos/short-video-viewer/index.d.ts +3 -7
  35. package/dist/short-videos/short-video-viewer/index.js +2 -5
  36. package/dist/short-videos/short-video-viewer/mapper.d.ts +1 -1
  37. package/dist/short-videos/short-video-viewer/mapper.js +25 -22
  38. package/dist/short-videos/short-video-viewer/operations.generated.d.ts +6 -8
  39. package/dist/short-videos/short-video-viewer/operations.generated.js +10 -17
  40. package/dist/short-videos/short-video-viewer/operations.graphql +8 -10
  41. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.d.ts +3 -7
  42. package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -14
  43. package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +3 -3
  44. package/dist/short-videos/short-video-viewer/types.d.ts +23 -13
  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 +15 -2
  47. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +25 -163
  48. package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +7 -2
  49. package/dist/short-videos/short-videos-player/controls.svelte +125 -125
  50. package/dist/short-videos/short-videos-player/controls.svelte.d.ts +4 -2
  51. package/dist/short-videos/short-videos-player/index.d.ts +2 -0
  52. package/dist/short-videos/short-videos-player/index.js +12 -3
  53. package/dist/short-videos/short-videos-player/operations.generated.d.ts +6 -8
  54. package/dist/short-videos/short-videos-player/operations.generated.js +10 -17
  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 +211 -0
  58. package/dist/short-videos/short-videos-player/short-videos-player-view.svelte.d.ts +18 -0
  59. package/dist/short-videos/short-videos-player/types.d.ts +10 -8
  60. package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +4 -3
  61. package/dist/short-videos/short-videos-player/ui-manager.svelte.js +9 -8
  62. package/dist/streams/layout/element-views/price-element-view.svelte +5 -4
  63. package/dist/streams/layout/models/mapper.js +10 -18
  64. package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +1 -0
  65. package/dist/streams/stream-player/cmp.stream-player.svelte +23 -8
  66. package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +3 -1
  67. package/dist/streams/stream-player/controls.svelte +87 -74
  68. package/dist/streams/stream-player/controls.svelte.d.ts +2 -0
  69. package/dist/streams/stream-player/index.d.ts +2 -0
  70. package/dist/streams/stream-player/index.js +4 -3
  71. package/dist/streams/stream-player/mapper.d.ts +1 -1
  72. package/dist/streams/stream-player/mapper.js +1 -1
  73. package/dist/streams/stream-player/stream-overview.svelte +12 -1
  74. package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -0
  75. package/dist/streams/stream-player/stream-player-localization.d.ts +1 -3
  76. package/dist/streams/stream-player/stream-player-localization.js +0 -2
  77. package/dist/streams/stream-player/ui-manager.svelte.d.ts +4 -2
  78. package/dist/streams/stream-player/ui-manager.svelte.js +10 -5
  79. package/dist/ui/button/resources/button-theme.svelte +1 -0
  80. package/dist/ui/line-clamp/cmp.line-clamp.svelte +35 -13
  81. package/dist/ui/player/cmp.player-slider.svelte +74 -9
  82. package/dist/ui/progress/cmp.progress.svelte +4 -1
  83. package/dist/ui/seek-bar/cmp.seek-bar.svelte +112 -28
  84. package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +3 -0
  85. package/dist/ui/shadow-dom/index.d.ts +2 -1
  86. package/dist/ui/shadow-dom/index.js +2 -1
  87. package/dist/ui/shadow-dom/{shadow-host.d.ts → modal-shadow-host.d.ts} +1 -1
  88. package/dist/ui/shadow-dom/modal-shadow-host.js +21 -0
  89. package/dist/ui/shadow-dom/shadow-root-service.d.ts +1 -0
  90. package/dist/ui/shadow-dom/shadow-root-service.js +23 -0
  91. package/dist/ui/video/cmp.video.svelte +46 -38
  92. package/dist/ui/video/cmp.video.svelte.d.ts +3 -0
  93. package/dist/ui/video/index.d.ts +1 -0
  94. package/dist/ui/video/index.js +1 -0
  95. package/dist/ui/video/types.d.ts +4 -0
  96. package/dist/ui/video/types.js +5 -0
  97. package/package.json +5 -1
  98. package/dist/short-videos/short-video-viewer/cmp.ad.svelte +0 -140
  99. package/dist/short-videos/short-video-viewer/cmp.product.svelte +0 -168
  100. package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +0 -14
  101. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +0 -125
  102. package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +0 -14
  103. package/dist/short-videos/short-video-viewer/cmp.social-interactions.svelte +0 -69
  104. package/dist/short-videos/short-video-viewer/cmp.social-interactions.svelte.d.ts +0 -10
  105. package/dist/short-videos/short-video-viewer/description.svelte +0 -53
  106. package/dist/short-videos/short-video-viewer/description.svelte.d.ts +0 -9
  107. package/dist/short-videos/short-video-viewer/short-video-details-localization.d.ts +0 -14
  108. package/dist/short-videos/short-video-viewer/short-video-details-localization.js +0 -17
  109. package/dist/short-videos/short-video-viewer/short-video-product-localization.d.ts +0 -8
  110. package/dist/short-videos/short-videos-player/action-button.svelte +0 -38
  111. package/dist/short-videos/short-videos-player/action-button.svelte.d.ts +0 -10
  112. package/dist/ui/shadow-dom/shadow-host.js +0 -32
@@ -1,168 +0,0 @@
1
- <script lang="ts">import { toPriceRepresentation } from '../../products/price-helper';
2
- import { ImageRounded } from '../../ui/image';
3
- import { ProportionalContainer } from '../../ui/proportional-container';
4
- import { ShortVideoProductLocalization } from './short-video-product-localization';
5
- let { product, fitToContainer = false, localization: localizationInit, on } = $props();
6
- const localization = $derived(new ShortVideoProductLocalization(localizationInit));
7
- const handleProductClick = (event) => {
8
- if (!product.link) {
9
- return;
10
- }
11
- event.preventDefault();
12
- event.stopPropagation();
13
- if (on === null || on === void 0 ? void 0 : on.productClick) {
14
- on.productClick(product.id);
15
- }
16
- window.open(product.link, '_blank', 'noopener noreferrer');
17
- };
18
- </script>
19
-
20
- <div class="short-video-product-viewer">
21
- {#if fitToContainer}
22
- <div class="short-video-product-viewer__image">
23
- <ImageRounded src={product.image} noBorders={true} />
24
- </div>
25
- {:else}
26
- <ProportionalContainer ratio={4 / 5}>
27
- <ImageRounded src={product.image} noBorders={true} />
28
- </ProportionalContainer>
29
- {/if}
30
- <div class="short-video-product-viewer__name">{product.title}</div>
31
- <div class="short-video-product-viewer__price">
32
- <div class="product-price">
33
- {#if !product.salePrice}
34
- <div class="product-price__price">{toPriceRepresentation(product.price, product.currency)}</div>
35
- {:else}
36
- <div class="product-price__before-price">
37
- {#if localization.beforeNowPrefix}
38
- {localization.beforeNowPrefix}
39
- {/if}
40
- {toPriceRepresentation(product.price, product.currency)}
41
- </div>
42
- <div class="product-price__price product-price__price--sale">
43
- {toPriceRepresentation(product.salePrice, product.currency)}
44
- </div>
45
- {/if}
46
- </div>
47
- </div>
48
-
49
- {#if product.link}
50
- <a href={product.link} onclick={handleProductClick} target="_blank" rel="noopener noreferrer" class="short-video-product-viewer__link" aria-label="none"
51
- >&nbsp;</a>
52
- {/if}
53
- </div>
54
-
55
- <style>@keyframes fadeIn {
56
- 0% {
57
- opacity: 1;
58
- }
59
- 50% {
60
- opacity: 0.4;
61
- }
62
- 100% {
63
- opacity: 1;
64
- }
65
- }
66
- .short-video-product-viewer {
67
- width: 100%;
68
- height: auto;
69
- position: relative;
70
- display: flex;
71
- flex-direction: column;
72
- container-type: inline-size;
73
- --image--object-fit: contain;
74
- --image--rounded--outer--border-radius: 0.25em;
75
- --image--rounded--inner--border-color: transparent;
76
- --image--rounded--outer--border-color: transparent;
77
- }
78
- .short-video-product-viewer__image {
79
- flex: 1;
80
- min-height: 0;
81
- }
82
- .short-video-product-viewer__name {
83
- width: 100%;
84
- font-weight: 500;
85
- font-size: 0.9375rem;
86
- color: #ffffff;
87
- margin-top: 0.5rem;
88
- padding: 0 0.3125rem;
89
- text-align: center;
90
- text-overflow: ellipsis;
91
- width: 100%;
92
- white-space: nowrap;
93
- overflow: hidden;
94
- /* Set 'container-type: inline-size;' to reference container*/
95
- }
96
- @container (width < 300px) {
97
- .short-video-product-viewer__name {
98
- font-size: 0.75rem;
99
- margin-top: 0.3125rem;
100
- padding: 0 0.25rem;
101
- }
102
- }
103
- .short-video-product-viewer__price {
104
- padding-top: 0.3125rem;
105
- margin-top: auto;
106
- /* Set 'container-type: inline-size;' to reference container*/
107
- }
108
- @container (width < 300px) {
109
- .short-video-product-viewer__price {
110
- padding-top: 0.25rem;
111
- }
112
- }
113
- .short-video-product-viewer__link {
114
- position: absolute;
115
- top: 0;
116
- left: 0;
117
- width: 100%;
118
- height: 100%;
119
- }
120
-
121
- .product-price {
122
- width: 100%;
123
- display: flex;
124
- flex-direction: column;
125
- gap: 0.4375rem;
126
- /* Set 'container-type: inline-size;' to reference container*/
127
- }
128
- @container (width < 300px) {
129
- .product-price {
130
- gap: 0.3125rem;
131
- }
132
- }
133
- .product-price__before-price {
134
- width: 100%;
135
- color: #e5e7eb;
136
- text-decoration: line-through;
137
- font-size: 0.75rem;
138
- font-weight: 500;
139
- text-align: center;
140
- text-overflow: ellipsis;
141
- width: 100%;
142
- white-space: nowrap;
143
- overflow: hidden;
144
- /* Set 'container-type: inline-size;' to reference container*/
145
- }
146
- @container (width < 300px) {
147
- .product-price__before-price {
148
- font-size: 0.625em;
149
- }
150
- }
151
- .product-price__price {
152
- width: 100%;
153
- font-size: 1.0625em;
154
- color: #ffffff;
155
- font-weight: 800;
156
- margin-top: auto;
157
- text-align: center;
158
- text-overflow: ellipsis;
159
- width: 100%;
160
- white-space: nowrap;
161
- overflow: hidden;
162
- /* Set 'container-type: inline-size;' to reference container*/
163
- }
164
- @container (width < 300px) {
165
- .product-price__price {
166
- font-size: 0.9375em;
167
- }
168
- }</style>
@@ -1,14 +0,0 @@
1
- import type { Locale } from '../../core/locale';
2
- import { type IShortVideoProductLocalization } from './short-video-product-localization';
3
- import type { ShortVideoViewerProductModel } from './types';
4
- type Props = {
5
- product: ShortVideoViewerProductModel;
6
- fitToContainer?: boolean;
7
- localization: IShortVideoProductLocalization | Locale;
8
- on?: {
9
- productClick?: (productId: string) => void;
10
- };
11
- };
12
- declare const Cmp: import("svelte").Component<Props, {}, "">;
13
- type Cmp = ReturnType<typeof Cmp>;
14
- export default Cmp;
@@ -1,125 +0,0 @@
1
- <script lang="ts">import { slideHorizontally } from '../../core/transitions';
2
- import { default as ShortVideoAttachments } from './cmp.attachments.svelte';
3
- import { default as ShortVideoHeading } from './cmp.short-video-heading.svelte';
4
- import { ShortVideoDetailsLocalization } from './short-video-details-localization';
5
- import {} from './types';
6
- let { shortVideo, collapsed, localization: localizationInit, on } = $props();
7
- const localization = $derived(new ShortVideoDetailsLocalization(localizationInit));
8
- </script>
9
-
10
- {#if !collapsed}
11
- <div class="short-video-details" transition:slideHorizontally|local data-theme="dark">
12
- <div class="short-video-details__sliding-container">
13
- <div class="short-video-details__content">
14
- {#if shortVideo.heading}
15
- <div class="short-video-details__heading">
16
- <ShortVideoHeading
17
- model={shortVideo.heading}
18
- localization={{ viewsCount: localization.viewsCount, timeAgoLocalization: localization.timeAgoLocalization }} />
19
- </div>
20
- {/if}
21
- {#if shortVideo.text}
22
- <p class="short-video-details__text">
23
- {shortVideo.text}
24
- </p>
25
- {/if}
26
- </div>
27
-
28
- <div class="short-video-details__section-splitter"></div>
29
-
30
- <ShortVideoAttachments shortVideo={shortVideo} localization={localization.attachmentsLocalization} on={on} />
31
- </div>
32
- </div>
33
- {/if}
34
-
35
- <style>@keyframes fadeIn {
36
- 0% {
37
- opacity: 1;
38
- }
39
- 50% {
40
- opacity: 0.4;
41
- }
42
- 100% {
43
- opacity: 1;
44
- }
45
- }
46
- .short-video-details {
47
- --_short-video-details--padding-horizontal: 1rem;
48
- --short-video-attachments--margin-vertical: 1.25rem;
49
- --short-video-attachments--spacing-horizontal: var(--_short-video-details--padding-horizontal);
50
- background: #1c1c1c;
51
- height: 100%;
52
- min-height: 100%;
53
- max-height: 100%;
54
- width: 25rem;
55
- min-width: 25rem;
56
- max-width: 25rem;
57
- display: flex;
58
- flex-direction: column;
59
- min-height: 0;
60
- padding-bottom: 0.9375rem;
61
- overflow: auto;
62
- scrollbar-color: transparent transparent;
63
- scrollbar-width: thin;
64
- --custom-scrollbar-color: #999999;
65
- position: absolute;
66
- top: 0;
67
- right: 0;
68
- height: 100%;
69
- z-index: 1;
70
- /* Set 'container-type: inline-size;' to reference container*/
71
- }
72
- .short-video-details::-webkit-scrollbar {
73
- width: 3px;
74
- height: 3px;
75
- background: var(--custom-scrollbar-background, transparent);
76
- visibility: hidden;
77
- }
78
- .short-video-details::-webkit-scrollbar-thumb {
79
- background: transparent;
80
- }
81
- .short-video-details:hover {
82
- scrollbar-color: var(--custom-scrollbar-color, #7d7d7d) var(--custom-scrollbar-background, transparent);
83
- scrollbar-width: thin;
84
- }
85
- .short-video-details:hover::-webkit-scrollbar {
86
- width: 3px;
87
- height: 3px;
88
- background: var(--custom-scrollbar-background, transparent);
89
- visibility: hidden;
90
- }
91
- .short-video-details:hover::-webkit-scrollbar-thumb {
92
- background: var(--custom-scrollbar-color, #7d7d7d);
93
- }
94
- .short-video-details__sliding-container {
95
- flex: 1;
96
- display: flex;
97
- flex-direction: column;
98
- min-height: 0;
99
- }
100
- @container (width < 576px) {
101
- .short-video-details {
102
- width: 100%;
103
- min-width: 100%;
104
- max-width: 100%;
105
- }
106
- }
107
- .short-video-details__content {
108
- padding: 1.5rem var(--_short-video-details--padding-horizontal) 0.875rem;
109
- margin-bottom: 0.875rem;
110
- }
111
- .short-video-details__heading {
112
- --short-video-heading--padding: 0 1.875rem 1.25rem 0;
113
- }
114
- .short-video-details__text {
115
- color: #d1d5db;
116
- font-size: 0.9375rem;
117
- line-height: 1.125rem;
118
- font-weight: 400;
119
- white-space: pre-line;
120
- word-break: break-word;
121
- margin-bottom: 0.4375rem;
122
- }
123
- .short-video-details__section-splitter {
124
- border-bottom: 1px solid #4b5563;
125
- }</style>
@@ -1,14 +0,0 @@
1
- import type { Locale } from '../../core/locale';
2
- import { type IShortVideoDetailsLocalization } from './short-video-details-localization';
3
- import { type ShortVideoViewerModel } from './types';
4
- type Props = {
5
- shortVideo: ShortVideoViewerModel;
6
- collapsed: boolean;
7
- localization: IShortVideoDetailsLocalization | Locale;
8
- on?: {
9
- productClick?: (productId: string) => void;
10
- };
11
- };
12
- declare const Cmp: import("svelte").Component<Props, {}, "">;
13
- type Cmp = ReturnType<typeof Cmp>;
14
- export default Cmp;
@@ -1,69 +0,0 @@
1
- <script lang="ts">import { Icon } from '../../ui/icon';
2
- import { MediaVolumeManager } from '../../ui/media-playback';
3
- import IconShoppingBag from '@fluentui/svg-icons/icons/shopping_bag_28_regular.svg?raw';
4
- import IconSpeaker2 from '@fluentui/svg-icons/icons/speaker_2_28_regular.svg?raw';
5
- import IconSpeakerMute from '@fluentui/svg-icons/icons/speaker_mute_28_regular.svg?raw';
6
- let { model, on } = $props();
7
- const onAttachmentsClicked = () => {
8
- var _a;
9
- (_a = on === null || on === void 0 ? void 0 : on.attachmentsClicked) === null || _a === void 0 ? void 0 : _a.call(on);
10
- };
11
- const onMuteClicked = () => {
12
- MediaVolumeManager.isMuted = !MediaVolumeManager.isMuted;
13
- };
14
- </script>
15
-
16
- <div class="short-video-social-interactions" class:short-video-social-interactions--single-action={!(model.products.length || model.ad)}>
17
- {#if model.products.length || model.ad}
18
- <button type="button" class="short-video-social-interactions__action" onclick={onAttachmentsClicked}>
19
- <Icon src={IconShoppingBag} />
20
- </button>
21
- {/if}
22
-
23
- <button type="button" class="short-video-social-interactions__action" onclick={onMuteClicked}>
24
- {#if MediaVolumeManager.isMuted}
25
- <Icon src={IconSpeakerMute} />
26
- {:else}
27
- <Icon src={IconSpeaker2} />
28
- {/if}
29
- </button>
30
- </div>
31
-
32
- <style>@keyframes fadeIn {
33
- 0% {
34
- opacity: 1;
35
- }
36
- 50% {
37
- opacity: 0.4;
38
- }
39
- 100% {
40
- opacity: 1;
41
- }
42
- }
43
- .short-video-social-interactions {
44
- cursor: pointer;
45
- display: flex;
46
- flex-direction: column;
47
- justify-content: center;
48
- gap: 1.125rem;
49
- border-radius: 1.25rem;
50
- border: 0.0625rem solid #1c1c1e;
51
- background: rgba(0, 0, 0, 0.6);
52
- padding: 1rem 0.625rem;
53
- }
54
- .short-video-social-interactions--single-action {
55
- width: var(--stream-player--button--size);
56
- min-width: var(--stream-player--button--size);
57
- max-width: var(--stream-player--button--size);
58
- height: var(--stream-player--button--size);
59
- min-height: var(--stream-player--button--size);
60
- max-height: var(--stream-player--button--size);
61
- border-radius: 50%;
62
- }
63
- .short-video-social-interactions__action {
64
- --icon--size: var(--stream-player--icon--size);
65
- --icon--color: #ffffff;
66
- display: flex;
67
- justify-content: center;
68
- align-items: center;
69
- }</style>
@@ -1,10 +0,0 @@
1
- import type { ShortVideoViewerModel } from '../..';
2
- type Props = {
3
- model: ShortVideoViewerModel;
4
- on?: {
5
- attachmentsClicked?: () => void;
6
- };
7
- };
8
- declare const Cmp: import("svelte").Component<Props, {}, "">;
9
- type Cmp = ReturnType<typeof Cmp>;
10
- export default Cmp;
@@ -1,53 +0,0 @@
1
- <script lang="ts">import { LineClamp } from '../../ui/line-clamp';
2
- import { default as ShortVideoHeading } from './cmp.short-video-heading.svelte';
3
- let { model, localization } = $props();
4
- </script>
5
-
6
- <div class="short-video-description">
7
- {#if model.heading}
8
- <div class="short-video-description__heading">
9
- <ShortVideoHeading model={model.heading} localization={localization} />
10
- </div>
11
- {/if}
12
- <div class="short-video-description__text">
13
- {#if model.text}
14
- <LineClamp value={model.text} maxLines={2} />
15
- {/if}
16
- </div>
17
- </div>
18
-
19
- <style>@keyframes fadeIn {
20
- 0% {
21
- opacity: 1;
22
- }
23
- 50% {
24
- opacity: 0.4;
25
- }
26
- 100% {
27
- opacity: 1;
28
- }
29
- }
30
- .short-video-description {
31
- --_short-video-viewer--description--font--primary-color: var(--short-video-viewer--description--font--primary-color);
32
- --_short-video-viewer--description--font--primary-shadow: var(--short-video-viewer--description--font--primary-shadow, 1px 1px hsl(0, 0%, 10%));
33
- --_short-video-viewer--description--font--secondary-color: var(--short-video-viewer--description--font--secondary-color);
34
- --_short-video-viewer--description--font--secondary-shadow: var(--short-video-viewer--description--font--secondary-shadow, 1px 1px hsl(0, 0%, 10%));
35
- display: flex;
36
- flex-direction: column;
37
- padding-top: 0.75rem;
38
- }
39
- .short-video-description__heading {
40
- --short-video-heading--padding: 0 0 0.875rem 0;
41
- --short-video-heading--text--color: var(--_short-video-viewer--description--font--primary-color);
42
- --short-video-heading--text--shadow: var(--_short-video-viewer--description--font--primary-shadow);
43
- --short-video-heading--meta--color: var(--_short-video-viewer--description--font--secondary-color);
44
- --short-video-heading--meta--shadow: var(--_short-video-viewer--description--font--secondary-shadow);
45
- }
46
- .short-video-description__text {
47
- color: var(--_short-video-viewer--description--font--primary-color);
48
- text-shadow: var(--_short-video-viewer--description--font--primary-shadow);
49
- font-size: 0.9375rem;
50
- line-height: 1.25rem;
51
- font-weight: 400;
52
- height: 2.5rem;
53
- }</style>
@@ -1,9 +0,0 @@
1
- import type { ShortVideoViewerLocalization } from './short-video-viewer-localization';
2
- import type { ShortVideoViewerModel } from './types';
3
- type Props = {
4
- model: ShortVideoViewerModel;
5
- localization: ShortVideoViewerLocalization;
6
- };
7
- declare const Description: import("svelte").Component<Props, {}, "">;
8
- type Description = ReturnType<typeof Description>;
9
- export default Description;
@@ -1,14 +0,0 @@
1
- import { type Locale } from '../../core/locale';
2
- import type { ITimeAgoLocalization } from '../../ui/time-ago';
3
- import type { IShortVideoAttachmentsLocalization } from './short-video-attachments-localization';
4
- export interface IShortVideoDetailsLocalization {
5
- viewsCount?: (count: number) => string;
6
- timeAgoLocalization?: ITimeAgoLocalization | Locale;
7
- attachmentsLocalization?: IShortVideoAttachmentsLocalization | Locale;
8
- }
9
- export declare class ShortVideoDetailsLocalization {
10
- viewsCount: (count: number) => string;
11
- timeAgoLocalization: ITimeAgoLocalization | Locale;
12
- attachmentsLocalization: IShortVideoAttachmentsLocalization | Locale;
13
- constructor(init: IShortVideoDetailsLocalization | Locale);
14
- }
@@ -1,17 +0,0 @@
1
- import { isLocale } from '../../core/locale';
2
- export class ShortVideoDetailsLocalization {
3
- viewsCount;
4
- timeAgoLocalization;
5
- attachmentsLocalization;
6
- constructor(init) {
7
- this.viewsCount = isLocale(init) ? loc.viewsCount[init] : init.viewsCount || loc.viewsCount.en;
8
- this.timeAgoLocalization = isLocale(init) ? init : init.timeAgoLocalization || 'en';
9
- this.attachmentsLocalization = isLocale(init) ? init : init.attachmentsLocalization || 'en';
10
- }
11
- }
12
- const loc = {
13
- viewsCount: {
14
- en: (count) => (count === 1 ? '1 view' : `${count} views`),
15
- no: (count) => (count === 1 ? '1 visning' : `${count} visninger`)
16
- }
17
- };
@@ -1,8 +0,0 @@
1
- import { type Locale } from '../../core/locale';
2
- export interface IShortVideoProductLocalization {
3
- beforeNowPrefix?: string | null;
4
- }
5
- export declare class ShortVideoProductLocalization {
6
- beforeNowPrefix: string | null;
7
- constructor(init: IShortVideoProductLocalization | Locale);
8
- }
@@ -1,38 +0,0 @@
1
- <script lang="ts">let { children, on } = $props();
2
- export {};
3
- </script>
4
-
5
- <button type="button" class="action-button" onclick={() => on.click()}>
6
- {@render children()}
7
- </button>
8
-
9
- <style>@keyframes fadeIn {
10
- 0% {
11
- opacity: 1;
12
- }
13
- 50% {
14
- opacity: 0.4;
15
- }
16
- 100% {
17
- opacity: 1;
18
- }
19
- }
20
- .action-button {
21
- --_short-videos-player--action-button--size: var(--short-videos-player--action-button--size);
22
- --_short-videos-player--action-button--background: var(--action-button-background, #1c1c1c);
23
- width: var(--_short-videos-player--action-button--size);
24
- min-width: var(--_short-videos-player--action-button--size);
25
- max-width: var(--_short-videos-player--action-button--size);
26
- height: var(--_short-videos-player--action-button--size);
27
- min-height: var(--_short-videos-player--action-button--size);
28
- max-height: var(--_short-videos-player--action-button--size);
29
- display: flex;
30
- justify-content: center;
31
- align-items: center;
32
- line-height: 0;
33
- background: var(--_short-videos-player--action-button--background);
34
- border-radius: 50%;
35
- --icon--size: 1.25rem;
36
- z-index: 1;
37
- color: #ffffff;
38
- }</style>
@@ -1,10 +0,0 @@
1
- import type { Snippet } from 'svelte';
2
- type Props = {
3
- on: {
4
- click: () => void;
5
- };
6
- children: Snippet;
7
- };
8
- declare const ActionButton: import("svelte").Component<Props, {}, "">;
9
- type ActionButton = ReturnType<typeof ActionButton>;
10
- export default ActionButton;
@@ -1,32 +0,0 @@
1
- import normalize from './_normalize.scss?raw';
2
- import reset from './_reset.scss?raw';
3
- export class ShadowHost {
4
- shadowRoot;
5
- host;
6
- constructor() {
7
- const host = document.createElement('div');
8
- host.style.all = 'unset';
9
- host.style.position = 'fixed';
10
- host.style.inset = '0';
11
- host.style.zIndex = '9999';
12
- host.style.lineHeight = '1.15';
13
- host.style.fontFamily = 'system-ui, Avenir, Helvetica, Arial, sans-serif';
14
- host.style.fontWeight = '400';
15
- host.style.margin = '0';
16
- host.style.boxSizing = 'border-box';
17
- host.style.textAlign = 'initial';
18
- this.host = host;
19
- this.shadowRoot = host.attachShadow({ mode: 'open' });
20
- const styleElement = document.createElement('style');
21
- styleElement.textContent = normalize + reset;
22
- this.shadowRoot.appendChild(styleElement);
23
- }
24
- attachToBody() {
25
- document.getElementsByTagName('html')[0].style.overflow = 'hidden';
26
- document.body.appendChild(this.host);
27
- }
28
- remove() {
29
- this.host.remove();
30
- document.getElementsByTagName('html')[0].style.overflow = '';
31
- }
32
- }