@streamscloud/embeddable 3.4.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ads/ad-card/cmp.ad-card.svelte +193 -0
- package/dist/{short-videos/short-video-viewer/cmp.ad.svelte.d.ts → ads/ad-card/cmp.ad-card.svelte.d.ts} +3 -2
- package/dist/ads/ad-card/index.d.ts +3 -0
- package/dist/ads/ad-card/index.js +2 -0
- package/dist/ads/ad-card/mapper.d.ts +3 -0
- package/dist/ads/ad-card/mapper.js +13 -0
- package/dist/ads/ad-card/operations.generated.d.ts +23 -0
- package/dist/ads/ad-card/operations.generated.js +47 -0
- package/dist/ads/ad-card/operations.graphql +20 -0
- package/dist/ads/ad-card/types.d.ts +17 -0
- package/dist/ads/ad-card/types.js +1 -0
- package/dist/core/locale.d.ts +3 -0
- package/dist/products/price-helper.d.ts +18 -3
- package/dist/products/price-helper.js +9 -6
- package/dist/products/product-card/cmp.product-card.svelte +218 -0
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +15 -0
- package/dist/products/product-card/index.d.ts +4 -0
- package/dist/products/product-card/index.js +2 -0
- package/dist/products/product-card/mapper.d.ts +3 -0
- package/dist/products/product-card/mapper.js +22 -0
- package/dist/products/product-card/operations.generated.d.ts +26 -0
- package/dist/products/product-card/operations.generated.js +59 -0
- package/dist/products/product-card/operations.graphql +23 -0
- package/dist/products/product-card/product-card-localization.d.ts +8 -0
- package/dist/{short-videos/short-video-viewer/short-video-product-localization.js → products/product-card/product-card-localization.js} +1 -1
- package/dist/products/product-card/types.d.ts +12 -0
- package/dist/products/product-card/types.js +1 -0
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +12 -40
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +1 -1
- package/dist/short-videos/short-video-viewer/cmp.short-video-controls.svelte +134 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-controls.svelte.d.ts +19 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +45 -20
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +1 -0
- package/dist/short-videos/short-video-viewer/index.d.ts +2 -6
- package/dist/short-videos/short-video-viewer/index.js +1 -4
- package/dist/short-videos/short-video-viewer/mapper.js +12 -42
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +5 -8
- package/dist/short-videos/short-video-viewer/operations.generated.js +98 -94
- package/dist/short-videos/short-video-viewer/operations.graphql +2 -42
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.d.ts +3 -7
- package/dist/short-videos/short-video-viewer/short-video-attachments-localization.js +0 -14
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.d.ts +3 -3
- package/dist/short-videos/short-video-viewer/types.d.ts +9 -28
- package/dist/short-videos/short-video-viewer/types.js +1 -1
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.d.ts +5 -0
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.js +14 -1
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +23 -163
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +3 -2
- package/dist/short-videos/short-videos-player/controls.svelte +110 -127
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +2 -1
- package/dist/short-videos/short-videos-player/index.d.ts +2 -0
- package/dist/short-videos/short-videos-player/index.js +6 -3
- package/dist/short-videos/short-videos-player/operations.generated.d.ts +5 -8
- package/dist/short-videos/short-videos-player/operations.generated.js +77 -73
- package/dist/short-videos/short-videos-player/short-videos-player-localization.d.ts +1 -3
- package/dist/short-videos/short-videos-player/short-videos-player-localization.js +0 -2
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte +198 -0
- package/dist/short-videos/short-videos-player/short-videos-player-view.svelte.d.ts +14 -0
- package/dist/short-videos/short-videos-player/types.d.ts +2 -0
- package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +3 -3
- package/dist/short-videos/short-videos-player/ui-manager.svelte.js +8 -8
- package/dist/streams/layout/element-views/price-element-view.svelte +5 -4
- package/dist/streams/layout/models/mapper.js +8 -17
- package/dist/streams/stream-player/cmp.stream-player.svelte +18 -5
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +1 -1
- package/dist/streams/stream-player/controls.svelte +66 -73
- package/dist/streams/stream-player/index.js +2 -2
- package/dist/streams/stream-player/stream-overview.svelte +12 -1
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +1 -0
- package/dist/streams/stream-player/stream-player-localization.d.ts +1 -3
- package/dist/streams/stream-player/stream-player-localization.js +0 -2
- package/dist/streams/stream-player/ui-manager.svelte.d.ts +3 -2
- package/dist/streams/stream-player/ui-manager.svelte.js +9 -5
- package/dist/ui/button/resources/button-theme.svelte +1 -0
- package/dist/ui/shadow-dom/index.d.ts +2 -1
- package/dist/ui/shadow-dom/index.js +2 -1
- package/dist/ui/shadow-dom/{shadow-host.d.ts → modal-shadow-host.d.ts} +1 -1
- package/dist/ui/shadow-dom/modal-shadow-host.js +21 -0
- package/dist/ui/shadow-dom/shadow-root-service.d.ts +1 -0
- package/dist/ui/shadow-dom/shadow-root-service.js +23 -0
- package/dist/ui/video/cmp.video.svelte +2 -2
- package/dist/ui/video/cmp.video.svelte.d.ts +1 -0
- package/package.json +1 -1
- package/dist/short-videos/short-video-viewer/cmp.ad.svelte +0 -140
- package/dist/short-videos/short-video-viewer/cmp.product.svelte +0 -168
- package/dist/short-videos/short-video-viewer/cmp.product.svelte.d.ts +0 -14
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +0 -125
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +0 -14
- package/dist/short-videos/short-video-viewer/cmp.social-interactions.svelte +0 -69
- package/dist/short-videos/short-video-viewer/cmp.social-interactions.svelte.d.ts +0 -10
- package/dist/short-videos/short-video-viewer/description.svelte +0 -53
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +0 -9
- package/dist/short-videos/short-video-viewer/short-video-details-localization.d.ts +0 -14
- 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.d.ts +0 -8
- package/dist/short-videos/short-videos-player/action-button.svelte +0 -38
- package/dist/short-videos/short-videos-player/action-button.svelte.d.ts +0 -10
- package/dist/ui/shadow-dom/shadow-host.js +0 -32
|
@@ -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
|
-
}
|