@streamscloud/embeddable 16.2.2 → 16.2.4

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.
@@ -142,14 +142,14 @@ const handleAdClick = () => {
142
142
  display: flex;
143
143
  justify-content: flex-end;
144
144
  align-items: center;
145
- min-height: 3rem;
145
+ height: 3rem;
146
146
  overflow: hidden;
147
147
  min-width: 0;
148
148
  /* Set 'container-type: inline-size;' to reference container*/
149
149
  }
150
150
  @container (width < 230px) {
151
151
  .ad-card__price-container {
152
- min-height: 2rem;
152
+ height: 2rem;
153
153
  }
154
154
  }
155
155
  .ad-card__button-container {
@@ -157,15 +157,13 @@ const handleAdClick = () => {
157
157
  display: flex;
158
158
  justify-content: center;
159
159
  align-items: end;
160
- min-height: 2.5rem;
161
- margin-top: 0.125rem;
160
+ margin-top: 0.625rem;
162
161
  min-width: 0;
163
162
  /* Set 'container-type: inline-size;' to reference container*/
164
163
  }
165
164
  @container (width < 230px) {
166
165
  .ad-card__button-container {
167
- min-height: 2rem;
168
- margin-top: 0.0938rem;
166
+ margin-top: 0.375rem;
169
167
  }
170
168
  }
171
169
  .ad-card__button-text {
@@ -23,6 +23,7 @@ declare class ContentPlayerSettingsLocal {
23
23
  private settings;
24
24
  locale?: AppLocaleValue;
25
25
  showStreamsCloudWatermark?: boolean;
26
+ showSwipeIndicator?: boolean;
26
27
  overlayMinOffsetTop?: number;
27
28
  constructor(settings: MediaCenterSettings);
28
29
  }
@@ -32,6 +32,7 @@ class ContentPlayerSettingsLocal {
32
32
  settings;
33
33
  locale = $derived.by(() => this.settings.locale);
34
34
  showStreamsCloudWatermark = $derived.by(() => this.settings.showStreamsCloudWatermark);
35
+ showSwipeIndicator = $derived.by(() => this.settings.showSwipeIndicator);
35
36
  overlayMinOffsetTop = $state(0);
36
37
  constructor(settings) {
37
38
  this.settings = settings;
@@ -5,6 +5,7 @@ import type { AppLocaleValue } from '@streamscloud/kit/core/locale';
5
5
  export declare class MediaCenterSettings {
6
6
  locale: AppLocaleValue;
7
7
  showStreamsCloudWatermark: boolean;
8
+ showSwipeIndicator: boolean;
8
9
  disableBackground: boolean;
9
10
  theme: ThemeValue | undefined;
10
11
  state: MediaCenterState | null;
@@ -1,6 +1,7 @@
1
1
  export class MediaCenterSettings {
2
2
  locale = $state('en');
3
3
  showStreamsCloudWatermark = $state(false);
4
+ showSwipeIndicator = $state(true);
4
5
  disableBackground = $state(false);
5
6
  theme = $state(undefined);
6
7
  state = $state.raw(null);
@@ -10,6 +11,7 @@ export class MediaCenterSettings {
10
11
  update = (data) => {
11
12
  this.locale = data?.locale ?? 'en';
12
13
  this.showStreamsCloudWatermark = data?.showStreamsCloudWatermark ?? false;
14
+ this.showSwipeIndicator = data?.showSwipeIndicator ?? true;
13
15
  this.disableBackground = data?.disableBackground ?? false;
14
16
  this.theme = data?.theme;
15
17
  this.state = data?.state ?? null;
@@ -40,6 +40,7 @@ export type PlayerProps = {
40
40
  export type IMediaCenterSettings = {
41
41
  locale?: AppLocaleValue;
42
42
  showStreamsCloudWatermark?: boolean;
43
+ showSwipeIndicator?: boolean;
43
44
  disableBackground?: boolean;
44
45
  theme?: 'light' | 'dark';
45
46
  state?: MediaCenterState | null;
@@ -40,6 +40,7 @@ export type PostsPlayerProps = {
40
40
  export type PostPlayerSettings = {
41
41
  locale?: AppLocaleValue;
42
42
  showStreamsCloudWatermark?: boolean;
43
+ showSwipeIndicator?: boolean;
43
44
  };
44
45
  export type PostManagementActions = {
45
46
  editPost: ((id: string) => void) | null;
@@ -46,7 +46,7 @@ const onBuyClicked = (event) => {
46
46
  };
47
47
  </script>
48
48
 
49
- <div class="product-card" inert={inert} use:trackImpression>
49
+ <div class="product-card" class:product-card--with-buy={!!on?.buy} inert={inert} use:trackImpression>
50
50
  <ProportionalContainer ratio={1}>
51
51
  <Image src={product.image} />
52
52
  </ProportionalContainer>
@@ -123,6 +123,9 @@ const onBuyClicked = (event) => {
123
123
  padding: 0.5rem 0.5rem 0.75rem;
124
124
  }
125
125
  }
126
+ .product-card--with-buy {
127
+ aspect-ratio: auto;
128
+ }
126
129
  .product-card__info {
127
130
  display: flex;
128
131
  flex-direction: column;
@@ -191,7 +194,7 @@ const onBuyClicked = (event) => {
191
194
  .product-card__buy {
192
195
  position: relative;
193
196
  z-index: 1;
194
- margin-top: 0.375rem;
197
+ margin-top: 0.625rem;
195
198
  --sc-kit--button--background: light-dark(
196
199
  var(--sc-player--light--card-button, #f2f2f2),
197
200
  var(--sc-player--dark--card-button, #2e2e2e)
@@ -201,7 +204,7 @@ const onBuyClicked = (event) => {
201
204
  }
202
205
  @container (width < 230px) {
203
206
  .product-card__buy {
204
- margin-top: 0.25rem;
207
+ margin-top: 0.375rem;
205
208
  }
206
209
  }
207
210
  .product-card__link {
@@ -45,6 +45,7 @@ export type StreamsPlayerProps = {
45
45
  export type StreamsPlayerSettings = {
46
46
  locale?: AppLocaleValue;
47
47
  showStreamsCloudWatermark?: boolean;
48
+ showSwipeIndicator?: boolean;
48
49
  overlayMinOffsetTop?: number;
49
50
  };
50
51
  export type StreamAmplificationParameters = {
@@ -113,7 +113,7 @@ const handleSliderMounted = (node) => {
113
113
  {#snippet children({ item })}
114
114
  <div class="player__content">
115
115
  {@render itemView({ item })}
116
- {#if uiManager.isMobileView && config.playerBuffer && config.playerBuffer.loaded.length > 1 && !everTouched}
116
+ {#if config.settings.showSwipeIndicator && uiManager.isMobileView && config.playerBuffer && config.playerBuffer.loaded.length > 1 && !everTouched}
117
117
  <SwipeIndicator />
118
118
  {/if}
119
119
  </div>
@@ -2,10 +2,12 @@ import type { AppLocaleValue } from '@streamscloud/kit/core/locale';
2
2
  export declare class PlayerSettings {
3
3
  locale: AppLocaleValue;
4
4
  showStreamsCloudWatermark: boolean;
5
+ showSwipeIndicator: boolean;
5
6
  constructor(init?: IContentPlayerSettings);
6
7
  patch: (settings?: IContentPlayerSettings) => void;
7
8
  }
8
9
  export type IContentPlayerSettings = {
9
10
  locale?: AppLocaleValue;
10
11
  showStreamsCloudWatermark?: boolean;
12
+ showSwipeIndicator?: boolean;
11
13
  };
@@ -1,6 +1,7 @@
1
1
  export class PlayerSettings {
2
2
  locale = $state('en');
3
3
  showStreamsCloudWatermark = $state(false);
4
+ showSwipeIndicator = $state(true);
4
5
  constructor(init) {
5
6
  this.patch(init);
6
7
  }
@@ -11,5 +12,8 @@ export class PlayerSettings {
11
12
  if (settings?.showStreamsCloudWatermark !== undefined) {
12
13
  this.showStreamsCloudWatermark = settings.showStreamsCloudWatermark;
13
14
  }
15
+ if (settings?.showSwipeIndicator !== undefined) {
16
+ this.showSwipeIndicator = settings.showSwipeIndicator;
17
+ }
14
18
  };
15
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "16.2.2",
3
+ "version": "16.2.4",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",