@wistia/ui 0.15.2-beta.4815d3cd.6be61cd → 0.15.2-beta.bca1a865.2d7a120

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.
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.15.2-beta.4815d3cd.6be61cd
3
+ * @license @wistia/ui v0.15.2-beta.bca1a865.2d7a120
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -16498,7 +16498,7 @@ var Container10 = import_styled_components106.default.div`
16498
16498
  flex: 1 1 auto;
16499
16499
  `;
16500
16500
  var ScrollContainer = import_styled_components106.default.div`
16501
- overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
16501
+ overflow: auto;
16502
16502
  height: 100%;
16503
16503
  width: 100%;
16504
16504
  `;
@@ -16538,7 +16538,7 @@ var ShadowAtRight = (0, import_styled_components106.default)(Shadow)`
16538
16538
  width: 0;
16539
16539
  `;
16540
16540
  var ScrollArea = (0, import_react85.forwardRef)(
16541
- ({ children, onScroll, style, locked = false, ...props }, forwardedRef) => {
16541
+ ({ children, onScroll, style, ...props }, forwardedRef) => {
16542
16542
  const scrollContainerRefInternal = (0, import_react85.useRef)(null);
16543
16543
  const [shadowState, setShadowState] = (0, import_react85.useState)({
16544
16544
  canScrollUp: false,
@@ -16579,7 +16579,6 @@ var ScrollArea = (0, import_react85.forwardRef)(
16579
16579
  ScrollContainer,
16580
16580
  {
16581
16581
  ref: scrollContainerRef,
16582
- $locked: locked,
16583
16582
  onScroll: onScrollScrollContainer,
16584
16583
  ...props,
16585
16584
  children
@@ -17791,6 +17790,14 @@ var ThumbnailStoryboardViewer = ({
17791
17790
 
17792
17791
  // src/components/Thumbnail/Thumbnail.tsx
17793
17792
  var import_jsx_runtime325 = require("react/jsx-runtime");
17793
+ var WIDE_ASPECT_RATIO = 16 / 9;
17794
+ var SQUARE_ASPECT_RATIO = 1;
17795
+ var getAspectRatioValue = (aspectRatio) => {
17796
+ if (aspectRatio === "square") {
17797
+ return SQUARE_ASPECT_RATIO;
17798
+ }
17799
+ return WIDE_ASPECT_RATIO;
17800
+ };
17794
17801
  var WideThumbnailImage = import_styled_components126.default.img`
17795
17802
  height: 100%;
17796
17803
  object-fit: cover;
@@ -17829,7 +17836,7 @@ var StyledThumbnail = import_styled_components126.default.div`
17829
17836
  )};
17830
17837
  background-position: center center;
17831
17838
  background-size: cover;
17832
- aspect-ratio: 16 / 9;
17839
+ aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};
17833
17840
  display: flex;
17834
17841
  overflow: hidden;
17835
17842
  position: relative;
@@ -17838,7 +17845,10 @@ var StyledThumbnail = import_styled_components126.default.div`
17838
17845
 
17839
17846
  &,
17840
17847
  img {
17841
- border-radius: calc(8% * (9 / 16)) / 8%;
17848
+ border-radius: ${({ $aspectRatio }) => {
17849
+ const heightPercentage = 8 / $aspectRatio;
17850
+ return `calc(8% * (1 / ${$aspectRatio})) / ${heightPercentage}%`;
17851
+ }};
17842
17852
  }
17843
17853
  `;
17844
17854
  var StoryboardRenderer = ({
@@ -17846,17 +17856,10 @@ var StoryboardRenderer = ({
17846
17856
  width,
17847
17857
  percent,
17848
17858
  cursorPosition,
17849
- isStoryboardReady
17859
+ isStoryboardReady,
17860
+ aspectRatio
17850
17861
  }) => {
17851
- const {
17852
- url,
17853
- width: sbWidth,
17854
- height: sbHeight,
17855
- frameHeight,
17856
- frameWidth,
17857
- frameCount,
17858
- aspectRatio
17859
- } = storyboard;
17862
+ const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
17860
17863
  const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
17861
17864
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
17862
17865
  return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
@@ -17870,7 +17873,7 @@ var StoryboardRenderer = ({
17870
17873
  storyboardHeight: sbHeight,
17871
17874
  storyboardUrl: url,
17872
17875
  storyboardWidth: sbWidth,
17873
- targetAspectRatio: aspectRatio,
17876
+ targetAspectRatio: getAspectRatioValue(aspectRatio),
17874
17877
  targetWidth
17875
17878
  }
17876
17879
  );
@@ -17893,6 +17896,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
17893
17896
  children,
17894
17897
  storyboard,
17895
17898
  height,
17899
+ aspectRatio = "wide",
17896
17900
  ...props
17897
17901
  }, ref) => {
17898
17902
  const [percent, setPercent] = (0, import_react100.useState)(0);
@@ -17944,6 +17948,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
17944
17948
  thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
17945
17949
  StoryboardRenderer,
17946
17950
  {
17951
+ aspectRatio,
17947
17952
  cursorPosition,
17948
17953
  isStoryboardReady,
17949
17954
  percent,
@@ -17967,6 +17972,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
17967
17972
  {
17968
17973
  ref,
17969
17974
  ...props,
17975
+ $aspectRatio: getAspectRatioValue(aspectRatio),
17970
17976
  $backgroundUrl: backgroundUrl,
17971
17977
  $gradientBackground: gradientBackground,
17972
17978
  $isScrubbable: isScrubbable,