@streamscloud/embeddable 3.2.8 → 3.3.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.
@@ -11,12 +11,13 @@ const localization = $derived(new ShortVideoDetailsLocalization(localizationInit
11
11
  <div class="short-video-details" transition:slideHorizontally|local data-theme="dark">
12
12
  <div class="short-video-details__sliding-container">
13
13
  <div class="short-video-details__content">
14
- <div class="short-video-details__heading">
15
- <ShortVideoHeading
16
- model={shortVideo.heading}
17
- localization={{ viewsCount: localization.viewsCount, timeAgoLocalization: localization.timeAgoLocalization }} />
18
- </div>
19
-
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}
20
21
  {#if shortVideo.text}
21
22
  <p class="short-video-details__text">
22
23
  {shortVideo.text}
@@ -4,9 +4,11 @@ let { model, localization } = $props();
4
4
  </script>
5
5
 
6
6
  <div class="short-video-description">
7
- <div class="short-video-description__heading">
8
- <ShortVideoHeading model={model.heading} localization={localization} />
9
- </div>
7
+ {#if model.heading}
8
+ <div class="short-video-description__heading">
9
+ <ShortVideoHeading model={model.heading} localization={localization} />
10
+ </div>
11
+ {/if}
10
12
  <div class="short-video-description__text">
11
13
  {#if model.text}
12
14
  <LineClamp value={model.text} maxLines={2} />
@@ -10,7 +10,7 @@ export type ShortVideoViewerModel = {
10
10
  thumbnailUrl: string;
11
11
  };
12
12
  text?: string | null;
13
- heading: ShortVideoViewerHeadingModel;
13
+ heading: ShortVideoViewerHeadingModel | null;
14
14
  products: ShortVideoViewerProductModel[];
15
15
  ad: ShortVideoViewerAdModel | null;
16
16
  };
@@ -10,7 +10,7 @@ export const mapToShortVideoViewerModel = (model) => {
10
10
  thumbnailUrl: model.media.thumbnailUrl
11
11
  },
12
12
  text: model.text,
13
- heading: {
13
+ heading: model.header && {
14
14
  image: model.header.sourceImage,
15
15
  name: model.header.sourceName,
16
16
  displayDate: model.header.postDisplayDate,
@@ -5,7 +5,7 @@ export type StreamLayoutShortVideoModel = {
5
5
  id: string;
6
6
  media: StreamLayoutMediaItemModel;
7
7
  text: string | null;
8
- header: StreamLayoutPostHeaderModel;
8
+ header: StreamLayoutPostHeaderModel | null;
9
9
  enableSocialInteractions: boolean;
10
10
  bookmarksCount: number;
11
11
  products: StreamLayoutShortVideoProductModel[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "3.2.8",
3
+ "version": "3.3.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": "https://github.com/StreamsCloud/streamscloud-frontend-packages.git",
6
6
  "type": "module",