@streamscloud/embeddable 3.2.6 → 3.2.8

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.
@@ -34,6 +34,7 @@ export const mapShortVideoViewerModel = (payload) => {
34
34
  const mapToShortVideoViewerAdModel = (payload) => {
35
35
  return {
36
36
  id: payload.id,
37
+ type: payload.type,
37
38
  image: getMediaItemImageUrl(payload.media[0]),
38
39
  title: payload.title,
39
40
  description: payload.description,
@@ -1,4 +1,4 @@
1
- import type { Currency } from '../../core/enums';
1
+ import { AdType, type Currency } from '../../core/enums';
2
2
  export type ShortVideoViewerModel = {
3
3
  id: string;
4
4
  media: {
@@ -22,6 +22,7 @@ export type ShortVideoViewerHeadingModel = {
22
22
  };
23
23
  export type ShortVideoViewerAdModel = {
24
24
  id: string;
25
+ type: AdType;
25
26
  image: string | null;
26
27
  title: string;
27
28
  description: string | null;
@@ -1 +1 @@
1
- export {};
1
+ import { AdType } from '../../core/enums';
@@ -41,6 +41,7 @@ export const mapToShortVideoViewerModel = (model) => {
41
41
  const mapToAdViewModel = (model) => {
42
42
  return {
43
43
  id: model.id,
44
+ type: model.type,
44
45
  image: model.image,
45
46
  title: model.title,
46
47
  description: model.description,
@@ -1,4 +1,4 @@
1
- import type { Currency } from '../../../core/enums';
1
+ import { AdType, type Currency } from '../../../core/enums';
2
2
  import type { StreamLayoutMediaItemModel } from './stream-layout-media-item-model';
3
3
  import type { StreamLayoutPostHeaderModel } from './stream-layout-post-header-model';
4
4
  export type StreamLayoutShortVideoModel = {
@@ -13,6 +13,7 @@ export type StreamLayoutShortVideoModel = {
13
13
  };
14
14
  export type StreamLayoutShortVideoAdModel = {
15
15
  id: string;
16
+ type: AdType;
16
17
  image: string | null;
17
18
  title: string;
18
19
  description: string | null;
@@ -1 +1 @@
1
- export {};
1
+ import { AdType } from '../../../core/enums';
@@ -8,7 +8,7 @@ export declare class StreamPlayerBuffer implements IPlayerBuffer<StreamPageViewe
8
8
  readonly canLoadNext: boolean;
9
9
  readonly canLoadPrevious: boolean;
10
10
  readonly navigationDisabled: boolean;
11
- readonly animationDuration = 1200;
11
+ readonly animationDuration = 300;
12
12
  private _pagesLoader;
13
13
  private _currentIndex;
14
14
  private _loaded;
@@ -12,7 +12,7 @@ export class StreamPlayerBuffer {
12
12
  canLoadNext = $derived(this.currentIndex < this.loaded.length - 1);
13
13
  canLoadPrevious = $derived(this.currentIndex > 0);
14
14
  navigationDisabled = $derived(!this.canLoadNext && !this.canLoadPrevious);
15
- animationDuration = 1200;
15
+ animationDuration = 300;
16
16
  _pagesLoader;
17
17
  _currentIndex = $state(-1);
18
18
  _loaded = $state.raw([]);
@@ -23,7 +23,7 @@ export class StreamPlayerBuffer {
23
23
  const payload = await graphql
24
24
  .query(GetStreamPagesDocument, {
25
25
  input: {
26
- limit: 2,
26
+ limit: 10,
27
27
  continuationToken,
28
28
  filter: {
29
29
  streamId
@@ -5,7 +5,7 @@ let { buffer, children, on } = $props();
5
5
  let slidesRef;
6
6
  let sliderHeight = $state(0);
7
7
  let swipeTransition = $state(0);
8
- let cssAnimationDuration = $state(buffer.animationDuration * 0.75);
8
+ let cssAnimationDuration = $state(buffer.animationDuration);
9
9
  let resizeObserver;
10
10
  let activeIndex = $state.raw(buffer.currentIndex);
11
11
  const actualTransition = $derived(-sliderHeight * activeIndex);
@@ -81,7 +81,7 @@ onMount(() => {
81
81
  if (e.deltaY < 0 && buffer.canLoadPrevious) {
82
82
  buffer.loadPrevious();
83
83
  }
84
- }, buffer.animationDuration + 250));
84
+ }, buffer.animationDuration));
85
85
  slidesRef.addEventListener('transitionend', (e) => {
86
86
  if (e.target !== slidesRef) {
87
87
  return;
@@ -8,7 +8,7 @@ export declare class PlayerBuffer<T extends {
8
8
  readonly canLoadNext: boolean;
9
9
  readonly canLoadPrevious: boolean;
10
10
  readonly navigationDisabled: boolean;
11
- readonly animationDuration = 1200;
11
+ readonly animationDuration = 300;
12
12
  private _currentIndex;
13
13
  private _loaded;
14
14
  private loadMoreFn;
@@ -6,7 +6,7 @@ export class PlayerBuffer {
6
6
  canLoadNext = $derived(this.currentIndex < this.loaded.length - 1);
7
7
  canLoadPrevious = $derived(this.currentIndex > 0);
8
8
  navigationDisabled = $derived(!this.canLoadNext && !this.canLoadPrevious);
9
- animationDuration = 1200;
9
+ animationDuration = 300;
10
10
  _currentIndex = $state(-1);
11
11
  _loaded = $state.raw([]);
12
12
  loadMoreFn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "3.2.6",
3
+ "version": "3.2.8",
4
4
  "author": "StreamsCloud",
5
5
  "repository": "https://github.com/StreamsCloud/streamscloud-frontend-packages.git",
6
6
  "type": "module",