@streamscloud/embeddable 17.0.0-1775770682344 → 17.0.1

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.
@@ -146,6 +146,15 @@ const handleRootResize = (node) => {
146
146
  observer.observe(node);
147
147
  return { destroy: () => observer.disconnect() };
148
148
  };
149
+ // Measured from header
150
+ let headerHeight = $state(0);
151
+ const handleHeaderResize = (node) => {
152
+ const observer = new ResizeObserver(([entry]) => {
153
+ headerHeight = entry.contentRect.height;
154
+ });
155
+ observer.observe(node);
156
+ return { destroy: () => observer.disconnect() };
157
+ };
149
158
  // Measured from video-area
150
159
  let contentViewWidth = $state(0);
151
160
  let videoAreaWidth = $state(0);
@@ -266,7 +275,7 @@ const itemActions = $derived.by(() => {
266
275
  use:handleRootResize>
267
276
  <div class="feed-player__main">
268
277
  {#if header}
269
- <div class="feed-player__header">
278
+ <div class="feed-player__header" use:handleHeaderResize>
270
279
  {@render header()}
271
280
  </div>
272
281
  {/if}
@@ -325,7 +334,9 @@ const itemActions = $derived.by(() => {
325
334
  <div
326
335
  class="feed-player__sidebar"
327
336
  class:feed-player__sidebar--with-close={on?.closed}
337
+ class:feed-player__sidebar--with-header={!on?.closed && !!header}
328
338
  style:--_--feed-player--sidebar--width={SIDEBAR_WIDTH + 'px'}
339
+ style:--_--feed-player--header-height={headerHeight + 'px'}
329
340
  transition:slideHorizontally|local>
330
341
  <SidebarPanel
331
342
  tabs={visibleTabs}
@@ -511,4 +522,7 @@ const itemActions = $derived.by(() => {
511
522
  }
512
523
  .feed-player__sidebar--with-close {
513
524
  padding-top: 3.75rem;
525
+ }
526
+ .feed-player__sidebar--with-header {
527
+ padding-top: var(--_--feed-player--header-height, 0px);
514
528
  }</style>
@@ -7,9 +7,10 @@ let data = $state.raw(null);
7
7
  $effect(() => {
8
8
  void handler;
9
9
  untrack(() => {
10
- handler.getPlaylist().then((result) => {
11
- data = result;
12
- });
10
+ const load = async () => {
11
+ data = await handler.getPlaylist();
12
+ };
13
+ void load();
13
14
  });
14
15
  });
15
16
  const currentPostIndex = $derived.by(() => {
@@ -33,7 +33,7 @@ const formatDate = (dateString) => {
33
33
  style:height="{thumbnailHeight}px"
34
34
  style:--_post-card--thumbnail-radius="{thumbnailRadius}px">
35
35
  <Image src={post.thumbnailUrl} />
36
- {#if post.durationSeconds != null}
36
+ {#if post.durationSeconds !== null && post.durationSeconds !== undefined}
37
37
  <div class="post-card__duration">{formatDuration(post.durationSeconds)}</div>
38
38
  {/if}
39
39
  </div>
@@ -10,9 +10,10 @@ $effect(() => {
10
10
  const postId = currentPostId;
11
11
  untrack(() => {
12
12
  data = null;
13
- handler.getRecommendations(postId).then((result) => {
14
- data = result;
15
- });
13
+ const load = async () => {
14
+ data = await handler.getRecommendations(postId);
15
+ };
16
+ void load();
16
17
  });
17
18
  });
18
19
  </script>
@@ -124,6 +125,7 @@ $effect(() => {
124
125
  background: white;
125
126
  border-radius: 0.375rem;
126
127
  overflow: hidden;
128
+ cursor: pointer;
127
129
  }
128
130
  .recommended-tab__playlist-thumbnail {
129
131
  flex-shrink: 0;
@@ -14,9 +14,7 @@ let { tabs, activeTabId, model, trackingParams, selectedProductId, recommendedHa
14
14
  </script>
15
15
 
16
16
  <div class="sidebar-panel">
17
- {#if tabs.length > 1}
18
- <SidebarTabBar tabs={tabs} activeTabId={activeTabId} on={{ tabChange: on.tabChange }} />
19
- {/if}
17
+ <SidebarTabBar tabs={tabs} activeTabId={activeTabId} on={{ tabChange: on.tabChange }} />
20
18
 
21
19
  <div class="sidebar-panel__content">
22
20
  {#if activeTabId === 'information'}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/embeddable",
3
- "version": "17.0.0-1775770682344",
3
+ "version": "17.0.1",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",