@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.
- package/dist/core/enums.d.ts +2 -0
- package/dist/core/enums.js +2 -0
- package/dist/core/graphql.d.ts +1 -3
- package/dist/core/graphql.js +3 -12
- package/dist/core/utils/html-helper.d.ts +0 -1
- package/dist/core/utils/html-helper.js +0 -4
- package/dist/products/price-helper.js +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments-inline.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +2 -2
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.product.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +2 -6
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +2 -3
- package/dist/short-videos/short-video-viewer/description.svelte +0 -5
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/index.d.ts +2 -4
- package/dist/short-videos/short-video-viewer/index.js +0 -1
- package/dist/short-videos/short-video-viewer/mapper.js +1 -5
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +0 -4
- package/dist/short-videos/short-video-viewer/operations.generated.js +0 -6
- package/dist/short-videos/short-video-viewer/operations.graphql +0 -4
- package/dist/short-videos/short-video-viewer/{short-video-attachments-localization.d.ts → short-video-attachments-localization.svelte.d.ts} +4 -5
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/{short-video-details-localization.d.ts → short-video-details-localization.svelte.d.ts} +6 -7
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/{short-video-product-localization.d.ts → short-video-product-localization.svelte.d.ts} +1 -2
- package/dist/short-videos/short-video-viewer/short-video-product-localization.svelte.js +11 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +13 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +10 -0
- package/dist/short-videos/short-video-viewer/types.d.ts +0 -4
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +11 -88
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +5 -5
- package/dist/short-videos/short-videos-player/controls.svelte +2 -2
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +1 -1
- package/dist/short-videos/short-videos-player/index.d.ts +14 -51
- package/dist/short-videos/short-videos-player/index.js +12 -83
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +8 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +6 -0
- package/dist/streams/layout/cmp.layout.svelte.d.ts +2 -4
- package/dist/streams/layout/cmp.slot-content.svelte +4 -4
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +1 -2
- package/dist/streams/layout/cmp.slot.svelte.d.ts +2 -7
- package/dist/streams/layout/component.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +1 -1
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +3 -4
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +2 -15
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte.d.ts +3 -7
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +89 -15
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +4 -5
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +2 -4
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -3
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +17 -24
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +3 -4
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +2 -2
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +2 -6
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/data-by-key-accessor.d.ts +3 -3
- package/dist/streams/layout/element-views/index.d.ts +11 -16
- package/dist/streams/layout/element-views/index.js +9 -12
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.d.ts +9 -0
- package/dist/streams/layout/element-views/price-stream-element-localization.svelte.js +8 -0
- package/dist/streams/layout/element-views/stream-element-localization.svelte.d.ts +8 -0
- package/dist/streams/layout/element-views/stream-element-localization.svelte.js +6 -0
- package/dist/streams/layout/elements.d.ts +12 -47
- package/dist/streams/layout/elements.js +1 -1
- package/dist/streams/layout/enums.d.ts +3 -34
- package/dist/streams/layout/enums.js +7 -46
- package/dist/streams/layout/index.d.ts +10 -3
- package/dist/streams/layout/index.js +2 -3
- package/dist/streams/layout/layout.d.ts +1 -2
- package/dist/streams/layout/models/index.d.ts +1 -1
- package/dist/streams/layout/models/mapper.js +1 -5
- package/dist/streams/layout/models/stream-layout-media-item-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-media-item-model.js +1 -1
- package/dist/streams/layout/models/stream-layout-post-header-model.d.ts +1 -1
- package/dist/streams/layout/models/stream-layout-product-model.d.ts +2 -1
- package/dist/streams/layout/models/stream-layout-short-video-model.d.ts +0 -4
- package/dist/streams/layout/serializer.d.ts +3 -0
- package/dist/streams/layout/serializer.js +6 -0
- package/dist/streams/layout/slot.d.ts +0 -2
- package/dist/streams/layout/styles-transformer.d.ts +2 -3
- package/dist/streams/layout/styles-transformer.js +30 -54
- package/dist/streams/layout/styles.d.ts +14 -24
- package/dist/streams/layout/type-guards.d.ts +0 -31
- package/dist/streams/layout/type-guards.js +1 -13
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +2 -4
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +0 -3
- package/dist/streams/stream-page-viewer/index.d.ts +0 -1
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +13 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +10 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte +7 -47
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +4 -6
- package/dist/streams/stream-player/controls.svelte +3 -46
- package/dist/streams/stream-player/controls.svelte.d.ts +1 -1
- package/dist/streams/stream-player/index.d.ts +4 -6
- package/dist/streams/stream-player/index.js +28 -15
- package/dist/streams/stream-player/operations.generated.d.ts +1 -1
- package/dist/streams/stream-player/operations.generated.js +3 -5
- package/dist/streams/stream-player/operations.graphql +3 -3
- package/dist/streams/stream-player/stream-overview.svelte +2 -2
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -1
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +2 -2
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +12 -0
- package/dist/streams/stream-player/stream-player-localization.svelte.js +10 -0
- package/dist/ui/icon/cmp.icon.svelte +26 -13
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +2 -2
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +2 -3
- package/dist/ui/line-clamp/index.d.ts +1 -1
- package/dist/ui/line-clamp/index.js +1 -1
- package/dist/ui/line-clamp/{line-clamp-localization.d.ts → line-clamp-localization.svelte.d.ts} +1 -2
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +15 -0
- package/dist/ui/shadow-dom/shadow-host.d.ts +5 -1
- package/dist/ui/shadow-dom/shadow-host.js +14 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte +1 -1
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +2 -3
- package/dist/ui/time-ago/index.d.ts +1 -1
- package/dist/ui/time-ago/{time-ago-localization.d.ts → time-ago-localization.svelte.d.ts} +1 -2
- package/dist/ui/time-ago/time-ago-localization.svelte.js +39 -0
- package/dist/ui/video/cmp.video.svelte +18 -42
- package/package.json +1 -1
- package/dist/core/analytics.profile-id.d.ts +0 -5
- package/dist/core/analytics.profile-id.js +0 -17
- package/dist/core/document.event-handlers.d.ts +0 -1
- package/dist/core/document.event-handlers.js +0 -5
- package/dist/core/locale.d.ts +0 -6
- package/dist/core/locale.js +0 -24
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -21
- package/dist/short-videos/short-video-viewer/short-video-details-localization.js +0 -17
- package/dist/short-videos/short-video-viewer/short-video-product-localization.js +0 -13
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +0 -14
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.js +0 -17
- package/dist/short-videos/short-videos-player/operations.generated.d.ts +0 -68
- package/dist/short-videos/short-videos-player/operations.generated.js +0 -199
- package/dist/short-videos/short-videos-player/operations.graphql +0 -8
- package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +0 -16
- package/dist/short-videos/short-videos-player/short-videos-player-localization.js +0 -13
- package/dist/short-videos/short-videos-player/types.d.ts +0 -36
- package/dist/short-videos/short-videos-player/types.js +0 -6
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +0 -16
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +0 -74
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +0 -11
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +0 -37
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte.d.ts +0 -7
- package/dist/streams/layout/element-views/price-element-view.svelte +0 -168
- package/dist/streams/layout/element-views/price-element-view.svelte.d.ts +0 -15
- package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +0 -13
- package/dist/streams/layout/element-views/price-stream-element-localization.js +0 -21
- package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -9
- package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
- package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +0 -8
- package/dist/streams/layout/element-views/stock-stream-element-localization.js +0 -26
- package/dist/streams/layout/element-views/stream-element-localization.d.ts +0 -15
- package/dist/streams/layout/element-views/stream-element-localization.js +0 -11
- package/dist/streams/layout/serializer.svelte.d.ts +0 -29
- package/dist/streams/layout/serializer.svelte.js +0 -93
- package/dist/streams/layout/slot-data-ref.d.ts +0 -13
- package/dist/streams/layout/slot-data-ref.js +0 -1
- package/dist/streams/layout/svg-attributes.d.ts +0 -7
- package/dist/streams/layout/svg-attributes.js +0 -8
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -9
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
- package/dist/streams/stream-player/stream-player-localization.d.ts +0 -26
- package/dist/streams/stream-player/stream-player-localization.js +0 -31
- package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -125
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -9
- package/dist/ui/swipe-indicator/index.d.ts +0 -2
- package/dist/ui/swipe-indicator/index.js +0 -1
- package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -8
- package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
- package/dist/ui/time-ago/time-ago-localization.js +0 -55
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Icon } from '../../ui/icon';
|
|
3
3
|
import { MediaVolumeManager } from '../../ui/media-playback';
|
|
4
4
|
import { default as ActionButton } from './action-button.svelte';
|
|
5
|
-
import { ShortVideosPlayerLocalization } from './short-videos-player-localization';
|
|
5
|
+
import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte.js';
|
|
6
6
|
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
|
|
7
7
|
import IconChevronUp from '@fluentui/svg-icons/icons/chevron_up_20_regular.svg?raw';
|
|
8
8
|
import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
|
|
@@ -37,7 +37,7 @@ const shortVideo = $derived(buffer.current);
|
|
|
37
37
|
<div class="short-videos-player-controls__right">
|
|
38
38
|
{#if shortVideo}
|
|
39
39
|
<div class="short-videos-player-controls__short-video-attachments">
|
|
40
|
-
<ShortVideoViewerAttachments shortVideo={shortVideo} localization={localization.
|
|
40
|
+
<ShortVideoViewerAttachments shortVideo={shortVideo} localization={localization.shortVideoDetailsLocalization?.attachmentsLocalization} />
|
|
41
41
|
</div>
|
|
42
42
|
{/if}
|
|
43
43
|
<div class="short-videos-player-controls__controls">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ShortVideoViewerModel } from '../short-video-viewer';
|
|
2
2
|
import type { IPlayerBuffer } from '../../ui/player';
|
|
3
|
-
import { ShortVideosPlayerLocalization } from './short-videos-player-localization';
|
|
3
|
+
import { ShortVideosPlayerLocalization } from './short-videos-player-localization.svelte.js';
|
|
4
4
|
import type { ShortVideosPlayerUiManager } from './ui-manager.svelte';
|
|
5
5
|
type Props = {
|
|
6
6
|
buffer: IPlayerBuffer<ShortVideoViewerModel>;
|
|
@@ -1,38 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
1
|
+
import type { ShortVideoViewerModel } from '../short-video-viewer';
|
|
2
|
+
import type { PlayerItemsProvider } from '../../ui/player';
|
|
3
|
+
import type { IShortVideosPlayerLocalization } from './short-videos-player-localization.svelte';
|
|
3
4
|
export type { IShortVideosPlayerLocalization };
|
|
4
5
|
/**
|
|
5
|
-
* Opens the short videos player modal with the specified provider
|
|
6
|
-
*
|
|
7
|
-
* You can use either a ready-made provider, or simply pass a list of video IDs and a GraphQL endpoint to fetch them.
|
|
6
|
+
* Opens the short videos player modal with the specified provider and optional localization.
|
|
8
7
|
*
|
|
9
8
|
* @param init - Configuration options.
|
|
9
|
+
* @param {PlayerItemsProvider<ShortVideoViewerModel>} init.shortVideosProvider - The provider instance supplying short video items to the player.
|
|
10
|
+
* @param {IShortVideosPlayerLocalization} [init.localization] - Optional localization settings for the player UI.
|
|
10
11
|
*
|
|
11
|
-
* @
|
|
12
|
-
* The provider instance supplying short video items to the player.
|
|
13
|
-
* **Use this if you already have your own provider implementation.**
|
|
14
|
-
*
|
|
15
|
-
* @param {string[]} [init.ids]
|
|
16
|
-
* List of short video IDs to display in the player.
|
|
17
|
-
* **Use this if you want the player to fetch and show specific videos.**
|
|
18
|
-
*
|
|
19
|
-
* @param {string} [init.graphqlUrl]
|
|
20
|
-
* The GraphQL endpoint to use when fetching videos by IDs.
|
|
21
|
-
* **Required if you use `ids`.**
|
|
22
|
-
*
|
|
23
|
-
* @param {string} [init.initialId]
|
|
24
|
-
* The ID of the video that should be shown first.
|
|
25
|
-
* **Optional. Only used when using `ids`.**
|
|
26
|
-
*
|
|
27
|
-
* @param {IShortVideosPlayerLocalization} [init.localization]
|
|
28
|
-
* Optional localization settings for the player UI.
|
|
29
|
-
*
|
|
30
|
-
* @param {object} [init.on]
|
|
31
|
-
* Optional event handlers.
|
|
32
|
-
* @param {() => void} [init.on.playerClosed]
|
|
33
|
-
* Called when the player is closed.
|
|
34
|
-
*
|
|
35
|
-
* @example <caption>Using a custom provider</caption>
|
|
12
|
+
* @example
|
|
36
13
|
* ```ts
|
|
37
14
|
* import { openShortVideosPlayer } from '@streamscloud/embeddable/short-videos-player';
|
|
38
15
|
*
|
|
@@ -44,25 +21,11 @@ export type { IShortVideosPlayerLocalization };
|
|
|
44
21
|
* }
|
|
45
22
|
* });
|
|
46
23
|
* ```
|
|
47
|
-
*
|
|
48
|
-
* @example <caption>Using a list of IDs</caption>
|
|
49
|
-
* ```ts
|
|
50
|
-
* import { openShortVideosPlayer } from '@streamscloud/embeddable/short-videos-player';
|
|
51
|
-
*
|
|
52
|
-
* openShortVideosPlayer({
|
|
53
|
-
* ids: ['id1', 'id2', 'id3'],
|
|
54
|
-
* graphqlOrigin: 'https://api.example.com',
|
|
55
|
-
* initialId: 'id2',
|
|
56
|
-
* localization: {
|
|
57
|
-
* next: 'Next',
|
|
58
|
-
* previous: 'Previous'
|
|
59
|
-
* },
|
|
60
|
-
* on: {
|
|
61
|
-
* playerClosed: () => {
|
|
62
|
-
* console.log('Player was closed');
|
|
63
|
-
* }
|
|
64
|
-
* }
|
|
65
|
-
* });
|
|
66
|
-
* ```
|
|
67
24
|
*/
|
|
68
|
-
export declare const openShortVideosPlayer: (init:
|
|
25
|
+
export declare const openShortVideosPlayer: (init: {
|
|
26
|
+
shortVideosProvider: PlayerItemsProvider<ShortVideoViewerModel>;
|
|
27
|
+
localization?: IShortVideosPlayerLocalization;
|
|
28
|
+
on?: {
|
|
29
|
+
playerClosed?: () => void;
|
|
30
|
+
};
|
|
31
|
+
}) => void;
|
|
@@ -1,40 +1,14 @@
|
|
|
1
|
-
import { getLocale } from '../../core/locale';
|
|
2
1
|
import { ShadowHost } from '../../ui/shadow-dom';
|
|
3
2
|
import { default as ShortVideosPlayer } from './cmp.short-videos-player.svelte';
|
|
4
|
-
import {
|
|
5
|
-
import { mount, unmount } from 'svelte';
|
|
3
|
+
import { mount } from 'svelte';
|
|
6
4
|
/**
|
|
7
|
-
* Opens the short videos player modal with the specified provider
|
|
8
|
-
*
|
|
9
|
-
* You can use either a ready-made provider, or simply pass a list of video IDs and a GraphQL endpoint to fetch them.
|
|
5
|
+
* Opens the short videos player modal with the specified provider and optional localization.
|
|
10
6
|
*
|
|
11
7
|
* @param init - Configuration options.
|
|
8
|
+
* @param {PlayerItemsProvider<ShortVideoViewerModel>} init.shortVideosProvider - The provider instance supplying short video items to the player.
|
|
9
|
+
* @param {IShortVideosPlayerLocalization} [init.localization] - Optional localization settings for the player UI.
|
|
12
10
|
*
|
|
13
|
-
* @
|
|
14
|
-
* The provider instance supplying short video items to the player.
|
|
15
|
-
* **Use this if you already have your own provider implementation.**
|
|
16
|
-
*
|
|
17
|
-
* @param {string[]} [init.ids]
|
|
18
|
-
* List of short video IDs to display in the player.
|
|
19
|
-
* **Use this if you want the player to fetch and show specific videos.**
|
|
20
|
-
*
|
|
21
|
-
* @param {string} [init.graphqlUrl]
|
|
22
|
-
* The GraphQL endpoint to use when fetching videos by IDs.
|
|
23
|
-
* **Required if you use `ids`.**
|
|
24
|
-
*
|
|
25
|
-
* @param {string} [init.initialId]
|
|
26
|
-
* The ID of the video that should be shown first.
|
|
27
|
-
* **Optional. Only used when using `ids`.**
|
|
28
|
-
*
|
|
29
|
-
* @param {IShortVideosPlayerLocalization} [init.localization]
|
|
30
|
-
* Optional localization settings for the player UI.
|
|
31
|
-
*
|
|
32
|
-
* @param {object} [init.on]
|
|
33
|
-
* Optional event handlers.
|
|
34
|
-
* @param {() => void} [init.on.playerClosed]
|
|
35
|
-
* Called when the player is closed.
|
|
36
|
-
*
|
|
37
|
-
* @example <caption>Using a custom provider</caption>
|
|
11
|
+
* @example
|
|
38
12
|
* ```ts
|
|
39
13
|
* import { openShortVideosPlayer } from '@streamscloud/embeddable/short-videos-player';
|
|
40
14
|
*
|
|
@@ -46,62 +20,17 @@ import { mount, unmount } from 'svelte';
|
|
|
46
20
|
* }
|
|
47
21
|
* });
|
|
48
22
|
* ```
|
|
49
|
-
*
|
|
50
|
-
* @example <caption>Using a list of IDs</caption>
|
|
51
|
-
* ```ts
|
|
52
|
-
* import { openShortVideosPlayer } from '@streamscloud/embeddable/short-videos-player';
|
|
53
|
-
*
|
|
54
|
-
* openShortVideosPlayer({
|
|
55
|
-
* ids: ['id1', 'id2', 'id3'],
|
|
56
|
-
* graphqlOrigin: 'https://api.example.com',
|
|
57
|
-
* initialId: 'id2',
|
|
58
|
-
* localization: {
|
|
59
|
-
* next: 'Next',
|
|
60
|
-
* previous: 'Previous'
|
|
61
|
-
* },
|
|
62
|
-
* on: {
|
|
63
|
-
* playerClosed: () => {
|
|
64
|
-
* console.log('Player was closed');
|
|
65
|
-
* }
|
|
66
|
-
* }
|
|
67
|
-
* });
|
|
68
|
-
* ```
|
|
69
23
|
*/
|
|
70
|
-
export const openShortVideosPlayer =
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
type: 'provider',
|
|
75
|
-
provider: init.shortVideosProvider
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
else if (isIdsInit(init)) {
|
|
79
|
-
input = {
|
|
80
|
-
type: 'ids',
|
|
81
|
-
ids: init.ids,
|
|
82
|
-
initialId: init.initialId,
|
|
83
|
-
graphqlOrigin: init.graphqlOrigin,
|
|
84
|
-
initiator: init.initiator
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
input = null;
|
|
89
|
-
}
|
|
90
|
-
if (!input) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const shadowHost = new ShadowHost();
|
|
94
|
-
const mounted = mount(ShortVideosPlayer, {
|
|
24
|
+
export const openShortVideosPlayer = (init) => {
|
|
25
|
+
const { shortVideosProvider, localization } = init;
|
|
26
|
+
const shadowHost = new ShadowHost({ onClosed: () => init.on?.playerClosed?.() });
|
|
27
|
+
mount(ShortVideosPlayer, {
|
|
95
28
|
target: shadowHost.shadowRoot,
|
|
96
29
|
props: {
|
|
97
|
-
|
|
98
|
-
localization
|
|
30
|
+
shortVideosProvider,
|
|
31
|
+
localization,
|
|
99
32
|
on: {
|
|
100
|
-
closePlayer:
|
|
101
|
-
if (init.on?.playerClosed) {
|
|
102
|
-
init.on.playerClosed();
|
|
103
|
-
}
|
|
104
|
-
await unmount(mounted);
|
|
33
|
+
closePlayer: () => {
|
|
105
34
|
shadowHost.remove();
|
|
106
35
|
}
|
|
107
36
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IShortVideoDetailsLocalization } from '../short-video-viewer';
|
|
2
|
+
export interface IShortVideosPlayerLocalization {
|
|
3
|
+
shortVideoDetailsLocalization?: IShortVideoDetailsLocalization;
|
|
4
|
+
}
|
|
5
|
+
export declare class ShortVideosPlayerLocalization {
|
|
6
|
+
shortVideoDetailsLocalization: IShortVideoDetailsLocalization | undefined;
|
|
7
|
+
constructor(init?: IShortVideosPlayerLocalization);
|
|
8
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StreamLayout } from './layout';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
type Props = {
|
|
4
|
-
model:
|
|
5
|
-
styles: StreamLayoutStyles | null;
|
|
6
|
-
};
|
|
4
|
+
model: StreamLayout;
|
|
7
5
|
children: Snippet;
|
|
8
6
|
};
|
|
9
7
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">import { Utils } from '../../core/utils';
|
|
2
|
-
import {
|
|
2
|
+
import { StreamElement } from './element-views';
|
|
3
3
|
import { StreamComponentDataType } from './enums';
|
|
4
4
|
let { model, localization, on } = $props();
|
|
5
5
|
const component = $derived.by(() => {
|
|
6
|
-
return model.components.find((c) =>
|
|
6
|
+
return model.components.find((c) => { var _a; return c.dataType === ((_a = model.data) === null || _a === void 0 ? void 0 : _a.type); });
|
|
7
7
|
});
|
|
8
8
|
const dataIsFilled = $derived.by(() => {
|
|
9
9
|
if (!model.data) {
|
|
@@ -42,9 +42,9 @@ const handleProductClick = (e) => {
|
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
{#snippet slotContent()}
|
|
45
|
-
{#if component &&
|
|
45
|
+
{#if component && model.data && dataIsFilled}
|
|
46
46
|
{#each component.elements as element (element)}
|
|
47
|
-
<
|
|
47
|
+
<StreamElement model={element} data={model.data} localization={localization} on={on} />
|
|
48
48
|
{/each}
|
|
49
49
|
{/if}
|
|
50
50
|
{/snippet}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { Locale } from '../../core/locale';
|
|
2
1
|
import { type IStreamElementLocalization } from './element-views';
|
|
3
2
|
import type { StreamSlot } from './slot';
|
|
4
3
|
type Props = {
|
|
5
4
|
model: StreamSlot;
|
|
6
|
-
localization
|
|
5
|
+
localization?: IStreamElementLocalization;
|
|
7
6
|
on?: {
|
|
8
7
|
productClick: (productId: string) => void;
|
|
9
8
|
progress?: (videoId: string, progress: number) => void;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
+
import type { StreamSlot } from './slot';
|
|
1
2
|
import type { Snippet } from 'svelte';
|
|
2
|
-
type LayoutStyles = {
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
5
|
-
top: number;
|
|
6
|
-
left: number;
|
|
7
|
-
};
|
|
8
3
|
type Props = {
|
|
9
|
-
model:
|
|
4
|
+
model: StreamSlot;
|
|
10
5
|
children: Snippet;
|
|
11
6
|
};
|
|
12
7
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script lang="ts">import {} from './stream-element-localization';
|
|
1
|
+
<script lang="ts">import {} from './stream-element-localization.svelte';
|
|
2
2
|
import { StreamElementStyleDirection } from '../enums';
|
|
3
3
|
import { generateContainerStyles } from '../styles-transformer';
|
|
4
4
|
import { default as StreamElement } from './cmp.stream-element.svelte';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type IStreamElementLocalization } from './stream-element-localization';
|
|
1
|
+
import { type IStreamElementLocalization } from './stream-element-localization.svelte';
|
|
3
2
|
import type { ContainerStreamElementModel } from '../elements';
|
|
4
3
|
import type { StreamSlotData } from '../slot-data';
|
|
5
4
|
type Props = {
|
|
6
5
|
model: ContainerStreamElementModel;
|
|
7
|
-
data: StreamSlotData
|
|
8
|
-
localization
|
|
6
|
+
data: StreamSlotData;
|
|
7
|
+
localization?: IStreamElementLocalization;
|
|
9
8
|
};
|
|
10
9
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
11
10
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
<script lang="ts">import { getStringValueByKey } from './data-by-key-accessor';
|
|
2
2
|
import { generateImageStyles } from '../styles-transformer';
|
|
3
|
-
|
|
4
|
-
let { model, data, annotationView } = $props();
|
|
3
|
+
let { model, data } = $props();
|
|
5
4
|
const value = $derived(getStringValueByKey(data, model.key));
|
|
6
5
|
</script>
|
|
7
6
|
|
|
8
7
|
<div class="image-ref-stream-element">
|
|
9
8
|
<img class="image-ref-stream-element-image" src={value} alt={model.key} style={generateImageStyles(model.styles)} />
|
|
10
|
-
{#if model.annotations}
|
|
11
|
-
{#each model.annotations as annotationModel (annotationModel)}
|
|
12
|
-
{#if annotationView}
|
|
13
|
-
{@render annotationView({ model: annotationModel })}
|
|
14
|
-
{:else}
|
|
15
|
-
<AnnotationStreamElement model={annotationModel} />
|
|
16
|
-
{/if}
|
|
17
|
-
{/each}
|
|
18
|
-
{/if}
|
|
19
9
|
</div>
|
|
20
10
|
|
|
21
11
|
<style>@keyframes fadeIn {
|
|
@@ -36,10 +26,7 @@ const value = $derived(getStringValueByKey(data, model.key));
|
|
|
36
26
|
height: 100%;
|
|
37
27
|
min-height: 100%;
|
|
38
28
|
max-height: 100%;
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
.image-ref-stream-element :global(svg) {
|
|
42
|
-
overflow: visible;
|
|
29
|
+
overflow: hidden;
|
|
43
30
|
}
|
|
44
31
|
|
|
45
32
|
.image-ref-stream-element-image {
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { Snippet } from 'svelte';
|
|
1
|
+
import type { ImageRefStreamElementModel } from '../elements';
|
|
2
|
+
import type { StreamSlotData } from '../slot-data';
|
|
4
3
|
type Props = {
|
|
5
4
|
model: ImageRefStreamElementModel;
|
|
6
|
-
data:
|
|
7
|
-
annotationView?: Snippet<[{
|
|
8
|
-
model: AnnotationStreamElementModel;
|
|
9
|
-
}]>;
|
|
5
|
+
data: StreamSlotData;
|
|
10
6
|
};
|
|
11
7
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
12
8
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script lang="ts">import { Image } from '../../../ui/image';
|
|
2
|
-
import {
|
|
2
|
+
import { ImagesImagesElementMode } from '../enums';
|
|
3
3
|
let { model, data } = $props();
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<div class="images-stream-element">
|
|
7
7
|
{#if data.length > 0}
|
|
8
|
-
{#if model.mode ===
|
|
8
|
+
{#if model.mode === ImagesImagesElementMode.Single || data.length === 1}
|
|
9
9
|
<Image src={data[0].url} />
|
|
10
10
|
{:else}
|
|
11
11
|
need implement multiple images
|
|
@@ -1,23 +1,97 @@
|
|
|
1
1
|
<script lang="ts">var _a;
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { toPriceRepresentation } from '../../../products/price-helper';
|
|
3
|
+
import { PriceStreamElementLocalization } from './price-stream-element-localization.svelte.js';
|
|
4
|
+
import { mapFlexJustifyContent, mapFontFamily, mapFontWeight, transformColorValue, transformFontSizeValue, transformNumericValue } from '../styles-transformer';
|
|
4
5
|
let { model, data, localization: localizationInit } = $props();
|
|
5
6
|
const localization = $derived(new PriceStreamElementLocalization(localizationInit));
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
const lineHeight = 1.2;
|
|
8
|
+
const height = $derived(((_a = model.styles) === null || _a === void 0 ? void 0 : _a.height) || 16);
|
|
9
|
+
const currentPrice = $derived.by(() => {
|
|
10
|
+
if (data.price.salePrice) {
|
|
11
|
+
return toPriceRepresentation(data.price.salePrice, data.price.currency, model.includeCurrency || false);
|
|
12
|
+
}
|
|
13
|
+
return toPriceRepresentation(data.price.price, data.price.currency, model.includeCurrency || false);
|
|
14
|
+
});
|
|
15
|
+
const saveValue = $derived.by(() => {
|
|
16
|
+
if (data.price.salePrice) {
|
|
17
|
+
return toPriceRepresentation(data.price.price - data.price.salePrice, data.price.currency, model.includeCurrency || false);
|
|
18
|
+
}
|
|
19
|
+
return 0;
|
|
20
|
+
});
|
|
21
|
+
const containerStyles = $derived.by(() => {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
const values = [
|
|
24
|
+
`font-family: ${mapFontFamily((_a = model.styles) === null || _a === void 0 ? void 0 : _a.fontFamily)};`,
|
|
25
|
+
`justify-content: ${mapFlexJustifyContent((_b = model.styles) === null || _b === void 0 ? void 0 : _b.horizontalAlign)};`,
|
|
26
|
+
`align-items: center;`,
|
|
27
|
+
`height: ${transformNumericValue(height)};`
|
|
28
|
+
];
|
|
29
|
+
return values.join('');
|
|
30
|
+
});
|
|
31
|
+
const priceCustomStyles = $derived.by(() => {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
const values = [
|
|
34
|
+
`font-size: ${transformFontSizeValue(height / lineHeight)};`,
|
|
35
|
+
`line-height: ${lineHeight};`,
|
|
36
|
+
`font-weight: ${mapFontWeight((_a = model.styles) === null || _a === void 0 ? void 0 : _a.fontWeight)};`,
|
|
37
|
+
`color: ${transformColorValue(data.price.salePrice ? (_b = model.styles) === null || _b === void 0 ? void 0 : _b.salePriceColor : (_c = model.styles) === null || _c === void 0 ? void 0 : _c.regularPriceColor)};`
|
|
38
|
+
];
|
|
39
|
+
return values.join('');
|
|
40
|
+
});
|
|
41
|
+
const saveValueCustomStyles = $derived.by(() => {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
const values = [
|
|
44
|
+
`margin-top: ${transformNumericValue((height - height / lineHeight) / 2)};`,
|
|
45
|
+
`font-size: ${transformFontSizeValue(height / 4)};`,
|
|
46
|
+
`font-weight: 500;`,
|
|
47
|
+
`padding: ${transformNumericValue(height / 8)} ${transformNumericValue(height / 4)};`,
|
|
48
|
+
`border-radius: ${transformNumericValue(height / 8)};`,
|
|
49
|
+
`background-color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.saveValueBackgroundColor)};`,
|
|
50
|
+
`color: ${transformColorValue((_b = model.styles) === null || _b === void 0 ? void 0 : _b.saveValueColor)};`
|
|
51
|
+
];
|
|
52
|
+
return values.join('');
|
|
53
|
+
});
|
|
54
|
+
const beforeValueCustomStyles = $derived.by(() => {
|
|
55
|
+
var _a;
|
|
56
|
+
const values = [`font-size: ${transformFontSizeValue(height / 5)};`, `font-weight: 500;`, `color: ${transformColorValue((_a = model.styles) === null || _a === void 0 ? void 0 : _a.beforeValueColor)};`];
|
|
57
|
+
return values.join('');
|
|
58
|
+
});
|
|
8
59
|
</script>
|
|
9
60
|
|
|
10
|
-
<div class="price-stream-element">
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
61
|
+
<div class="price-stream-element" style={containerStyles}>
|
|
62
|
+
<div class="price-stream-element__price" style={priceCustomStyles}>
|
|
63
|
+
{currentPrice}
|
|
64
|
+
</div>
|
|
65
|
+
{#if data.price.salePrice && !model.excludeBeforePrice}
|
|
66
|
+
<div class="price-stream-element__sale-price">
|
|
67
|
+
<div class="price-stream-element__save" style={saveValueCustomStyles}>
|
|
68
|
+
{localization.saveValue(saveValue)}
|
|
69
|
+
</div>
|
|
70
|
+
<div class="price-stream-element__before-price" style={beforeValueCustomStyles}>
|
|
71
|
+
{localization.beforeValue(toPriceRepresentation(data.price.price, data.price.currency, model.includeCurrency || false))}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
{/if}
|
|
18
75
|
</div>
|
|
19
76
|
|
|
20
|
-
<style
|
|
21
|
-
|
|
22
|
-
|
|
77
|
+
<style>@keyframes fadeIn {
|
|
78
|
+
0% {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
50% {
|
|
82
|
+
opacity: 0.4;
|
|
83
|
+
}
|
|
84
|
+
100% {
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
.price-stream-element {
|
|
89
|
+
display: flex;
|
|
90
|
+
gap: 4cqi;
|
|
91
|
+
}
|
|
92
|
+
.price-stream-element__sale-price {
|
|
93
|
+
display: flex;
|
|
94
|
+
height: 100%;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
justify-content: space-between;
|
|
23
97
|
}</style>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type IPriceStreamElementLocalization } from './price-stream-element-localization';
|
|
1
|
+
import { type IPriceStreamElementLocalization } from './price-stream-element-localization.svelte.js';
|
|
3
2
|
import type { PriceStreamElementModel } from '../elements';
|
|
4
|
-
import type {
|
|
3
|
+
import type { StreamLayoutProductModel } from '../models';
|
|
5
4
|
type Props = {
|
|
6
5
|
model: PriceStreamElementModel;
|
|
7
|
-
data:
|
|
8
|
-
localization
|
|
6
|
+
data: StreamLayoutProductModel;
|
|
7
|
+
localization?: IPriceStreamElementLocalization;
|
|
9
8
|
};
|
|
10
9
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
11
10
|
type Cmp = ReturnType<typeof Cmp>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<script lang="ts">import { ShortVideoViewer } from '../../../short-videos/short-video-viewer';
|
|
2
|
-
import { ShortVideoStreamElementLocalization } from './short-video-stream-element-localization';
|
|
3
2
|
import { mapToShortVideoViewerModel } from '../models';
|
|
4
|
-
let { data,
|
|
5
|
-
const localization = $derived(new ShortVideoStreamElementLocalization(localizationInit));
|
|
3
|
+
let { data, on } = $props();
|
|
6
4
|
</script>
|
|
7
5
|
|
|
8
|
-
<ShortVideoViewer model={mapToShortVideoViewerModel(data)} autoplay={false}
|
|
6
|
+
<ShortVideoViewer model={mapToShortVideoViewerModel(data)} autoplay={false} on={on} />
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { Locale } from '../../../core/locale';
|
|
2
|
-
import { type IShortVideoStreamElementLocalization } from './short-video-stream-element-localization';
|
|
3
1
|
import { type StreamLayoutShortVideoModel } from '../models';
|
|
4
2
|
type Props = {
|
|
5
3
|
data: StreamLayoutShortVideoModel;
|
|
6
|
-
localization: IShortVideoStreamElementLocalization | Locale;
|
|
7
4
|
on?: {
|
|
8
5
|
progress?: (progress: number) => void;
|
|
9
6
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<script lang="ts">import {
|
|
2
|
-
import { StreamElementLocalization } from './stream-element-localization';
|
|
1
|
+
<script lang="ts">import { ContainerStreamElement, ImageRefStreamElement, ImagesStreamElement, PriceStreamElement, ShortVideoStreamElement, SpacerStreamElement, TextRefStreamElement, TextStreamElement } from '.';
|
|
2
|
+
import { StreamElementLocalization } from './stream-element-localization.svelte';
|
|
3
3
|
import { StreamComponentDataType, StreamElementStyleDirection, StreamElementType } from '../enums';
|
|
4
|
-
let { model, data, constainerDirection = StreamElementStyleDirection.Vertical, localization:
|
|
5
|
-
const localization = $derived(new StreamElementLocalization(
|
|
4
|
+
let { model, data, constainerDirection = StreamElementStyleDirection.Vertical, localization: localizatoinInit, on } = $props();
|
|
5
|
+
const localization = $derived(new StreamElementLocalization(localizatoinInit));
|
|
6
6
|
const shortVideoModel = $derived.by(() => {
|
|
7
7
|
if (!data) {
|
|
8
8
|
return null;
|
|
@@ -41,35 +41,28 @@ const productModel = $derived.by(() => {
|
|
|
41
41
|
});
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
|
-
{#if model.type === StreamElementType.
|
|
45
|
-
<
|
|
46
|
-
{:else if model.type === StreamElementType.
|
|
47
|
-
<
|
|
48
|
-
{:else if model.type === StreamElementType.ImageRef
|
|
49
|
-
<
|
|
44
|
+
{#if model.type === StreamElementType.Container}
|
|
45
|
+
<ContainerStreamElement model={model} data={data} localization={localizatoinInit} />
|
|
46
|
+
{:else if model.type === StreamElementType.Spacer}
|
|
47
|
+
<SpacerStreamElement model={model} parentContainerDirection={constainerDirection} />
|
|
48
|
+
{:else if model.type === StreamElementType.ImageRef}
|
|
49
|
+
<ImageRefStreamElement model={model} data={data} />
|
|
50
50
|
{:else if model.type === StreamElementType.Images && imagesModel?.length}
|
|
51
|
-
<
|
|
51
|
+
<ImagesStreamElement model={model} data={imagesModel} />
|
|
52
52
|
{:else if model.type === StreamElementType.Price && productModel}
|
|
53
|
-
<
|
|
53
|
+
<PriceStreamElement model={model} data={productModel} localization={localization.priceElementLocalization} />
|
|
54
54
|
{:else if model.type === StreamElementType.ShortVideo && shortVideoModel}
|
|
55
|
-
<
|
|
55
|
+
<ShortVideoStreamElement
|
|
56
56
|
data={shortVideoModel}
|
|
57
|
-
localization={localization.shortVideoElementLocalization}
|
|
58
57
|
on={on
|
|
59
58
|
? {
|
|
60
|
-
progress: (progress:
|
|
59
|
+
progress: (progress: number) => {
|
|
61
60
|
on.progress?.(shortVideoModel.id, progress);
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
: undefined} />
|
|
65
|
-
{:else if model.type === StreamElementType.Spacer}
|
|
66
|
-
<SpacerStreamElementView model={model} parentContainerDirection={constainerDirection} />
|
|
67
|
-
{:else if model.type === StreamElementType.Stock}
|
|
68
|
-
<StockStreamElementView model={model} localization={localization.stockElementLocalization} />
|
|
69
64
|
{:else if model.type === StreamElementType.Text}
|
|
70
|
-
<
|
|
71
|
-
{:else if model.type === StreamElementType.TextRef
|
|
72
|
-
<
|
|
73
|
-
{:else if model.type === StreamElementType.WebView}
|
|
74
|
-
<WebViewStreamElementView model={model} />
|
|
65
|
+
<TextStreamElement model={model} />
|
|
66
|
+
{:else if model.type === StreamElementType.TextRef}
|
|
67
|
+
<TextRefStreamElement model={model} data={data} />
|
|
75
68
|
{/if}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type IStreamElementLocalization } from './stream-element-localization';
|
|
1
|
+
import { type IStreamElementLocalization } from './stream-element-localization.svelte';
|
|
3
2
|
import type { StreamElementModel } from '../elements';
|
|
4
3
|
import { StreamElementStyleDirection } from '../enums';
|
|
5
4
|
import type { StreamSlotData } from '../slot-data';
|
|
6
5
|
type Props = {
|
|
7
6
|
model: StreamElementModel;
|
|
8
|
-
data: StreamSlotData
|
|
7
|
+
data: StreamSlotData;
|
|
9
8
|
constainerDirection?: StreamElementStyleDirection;
|
|
10
|
-
localization
|
|
9
|
+
localization?: IStreamElementLocalization;
|
|
11
10
|
on?: {
|
|
12
11
|
progress?: (videoId: string, progress: number) => void;
|
|
13
12
|
};
|