@streamscloud/embeddable 17.0.0 → 17.0.2

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}
@@ -366,12 +377,14 @@ const itemActions = $derived.by(() => {
366
377
  | Property | Description | Default |
367
378
  |---|---|---|
368
379
  | `--sc-fp--background` | Player background | `light-dark(white, black)` |
380
+ | `--sc-fp--padding-left` | Left padding for video area offset | `0px` |
369
381
  | `--sc-fp--button--color` | Control button color | inherited |
370
382
  | `--sc-fp--button--color--inactive` | Inactive control button color | inherited |
371
383
  -->
372
384
 
373
385
  <style>.feed-player {
374
386
  --_feed-player--background: var(--sc-fp--background, light-dark(#ffffff, #000000));
387
+ --_feed-player--padding-left: var(--sc-fp--padding-left, 0px);
375
388
  --_feed-player--button--color: var(--sc-fp--button--color);
376
389
  --_feed-player--button--color--inactive: var(--sc-fp--button--color--inactive);
377
390
  --post-viewer--button--color: var(--_feed-player--button--color);
@@ -380,6 +393,7 @@ const itemActions = $derived.by(() => {
380
393
  width: 100%;
381
394
  height: 100%;
382
395
  display: flex;
396
+ padding-left: var(--_feed-player--padding-left);
383
397
  background: var(--_feed-player--background);
384
398
  overflow: hidden;
385
399
  container-type: inline-size;
@@ -511,4 +525,7 @@ const itemActions = $derived.by(() => {
511
525
  }
512
526
  .feed-player__sidebar--with-close {
513
527
  padding-top: 3.75rem;
528
+ }
529
+ .feed-player__sidebar--with-header {
530
+ padding-top: var(--_--feed-player--header-height, 0px);
514
531
  }</style>
@@ -6,6 +6,7 @@ import type { FeedPlayerProps } from './types';
6
6
  * | Property | Description | Default |
7
7
  * |---|---|---|
8
8
  * | `--sc-fp--background` | Player background | `light-dark(white, black)` |
9
+ * | `--sc-fp--padding-left` | Left padding for video area offset | `0px` |
9
10
  * | `--sc-fp--button--color` | Control button color | inherited |
10
11
  * | `--sc-fp--button--color--inactive` | Inactive control button color | inherited |
11
12
  */
@@ -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",
3
+ "version": "17.0.2",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",