@wistia/ui 0.15.2-beta.bca1a865.2d7a120 → 0.15.2-beta.f16ddbc2.511b369

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.bca1a865.2d7a120
3
+ * @license @wistia/ui v0.15.2-beta.f16ddbc2.511b369
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -2992,11 +2992,26 @@ var useForceUpdate = () => {
2992
2992
  var import_react11 = require("react");
2993
2993
  var useIsHovered = () => {
2994
2994
  const [isHovered, setIsHovered] = (0, import_react11.useState)(false);
2995
- const onFocus = () => setIsHovered(true);
2996
- const onMouseEnter = () => setIsHovered(true);
2997
- const onMouseMove = () => setIsHovered(true);
2998
- const onBlur = () => setIsHovered(false);
2999
- const onMouseLeave = () => setIsHovered(false);
2995
+ const onFocus = (event) => {
2996
+ if (event.target !== event.currentTarget) return;
2997
+ setIsHovered(true);
2998
+ };
2999
+ const onMouseEnter = (event) => {
3000
+ if (event.target !== event.currentTarget) return;
3001
+ setIsHovered(true);
3002
+ };
3003
+ const onMouseMove = (event) => {
3004
+ if (event.target !== event.currentTarget) return;
3005
+ setIsHovered(true);
3006
+ };
3007
+ const onBlur = (event) => {
3008
+ if (event.target !== event.currentTarget) return;
3009
+ setIsHovered(false);
3010
+ };
3011
+ const onMouseLeave = (event) => {
3012
+ if (event.target !== event.currentTarget) return;
3013
+ setIsHovered(false);
3014
+ };
3000
3015
  const hoverProps = {
3001
3016
  onFocus,
3002
3017
  onMouseEnter,
@@ -16498,7 +16513,7 @@ var Container10 = import_styled_components106.default.div`
16498
16513
  flex: 1 1 auto;
16499
16514
  `;
16500
16515
  var ScrollContainer = import_styled_components106.default.div`
16501
- overflow: auto;
16516
+ overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
16502
16517
  height: 100%;
16503
16518
  width: 100%;
16504
16519
  `;
@@ -16538,7 +16553,7 @@ var ShadowAtRight = (0, import_styled_components106.default)(Shadow)`
16538
16553
  width: 0;
16539
16554
  `;
16540
16555
  var ScrollArea = (0, import_react85.forwardRef)(
16541
- ({ children, onScroll, style, ...props }, forwardedRef) => {
16556
+ ({ children, onScroll, style, locked = false, ...props }, forwardedRef) => {
16542
16557
  const scrollContainerRefInternal = (0, import_react85.useRef)(null);
16543
16558
  const [shadowState, setShadowState] = (0, import_react85.useState)({
16544
16559
  canScrollUp: false,
@@ -16579,6 +16594,7 @@ var ScrollArea = (0, import_react85.forwardRef)(
16579
16594
  ScrollContainer,
16580
16595
  {
16581
16596
  ref: scrollContainerRef,
16597
+ $locked: locked,
16582
16598
  onScroll: onScrollScrollContainer,
16583
16599
  ...props,
16584
16600
  children
@@ -17790,14 +17806,6 @@ var ThumbnailStoryboardViewer = ({
17790
17806
 
17791
17807
  // src/components/Thumbnail/Thumbnail.tsx
17792
17808
  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
- };
17801
17809
  var WideThumbnailImage = import_styled_components126.default.img`
17802
17810
  height: 100%;
17803
17811
  object-fit: cover;
@@ -17836,7 +17844,7 @@ var StyledThumbnail = import_styled_components126.default.div`
17836
17844
  )};
17837
17845
  background-position: center center;
17838
17846
  background-size: cover;
17839
- aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};
17847
+ aspect-ratio: 16 / 9;
17840
17848
  display: flex;
17841
17849
  overflow: hidden;
17842
17850
  position: relative;
@@ -17845,10 +17853,7 @@ var StyledThumbnail = import_styled_components126.default.div`
17845
17853
 
17846
17854
  &,
17847
17855
  img {
17848
- border-radius: ${({ $aspectRatio }) => {
17849
- const heightPercentage = 8 / $aspectRatio;
17850
- return `calc(8% * (1 / ${$aspectRatio})) / ${heightPercentage}%`;
17851
- }};
17856
+ border-radius: calc(8% * (9 / 16)) / 8%;
17852
17857
  }
17853
17858
  `;
17854
17859
  var StoryboardRenderer = ({
@@ -17856,10 +17861,17 @@ var StoryboardRenderer = ({
17856
17861
  width,
17857
17862
  percent,
17858
17863
  cursorPosition,
17859
- isStoryboardReady,
17860
- aspectRatio
17864
+ isStoryboardReady
17861
17865
  }) => {
17862
- const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
17866
+ const {
17867
+ url,
17868
+ width: sbWidth,
17869
+ height: sbHeight,
17870
+ frameHeight,
17871
+ frameWidth,
17872
+ frameCount,
17873
+ aspectRatio
17874
+ } = storyboard;
17863
17875
  const targetWidth = (0, import_type_guards73.isString)(width) ? parseInt(width, 10) : Number(width);
17864
17876
  const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
17865
17877
  return /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
@@ -17873,7 +17885,7 @@ var StoryboardRenderer = ({
17873
17885
  storyboardHeight: sbHeight,
17874
17886
  storyboardUrl: url,
17875
17887
  storyboardWidth: sbWidth,
17876
- targetAspectRatio: getAspectRatioValue(aspectRatio),
17888
+ targetAspectRatio: aspectRatio,
17877
17889
  targetWidth
17878
17890
  }
17879
17891
  );
@@ -17896,7 +17908,6 @@ var Thumbnail = (0, import_react100.forwardRef)(
17896
17908
  children,
17897
17909
  storyboard,
17898
17910
  height,
17899
- aspectRatio = "wide",
17900
17911
  ...props
17901
17912
  }, ref) => {
17902
17913
  const [percent, setPercent] = (0, import_react100.useState)(0);
@@ -17948,7 +17959,6 @@ var Thumbnail = (0, import_react100.forwardRef)(
17948
17959
  thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime325.jsx)(
17949
17960
  StoryboardRenderer,
17950
17961
  {
17951
- aspectRatio,
17952
17962
  cursorPosition,
17953
17963
  isStoryboardReady,
17954
17964
  percent,
@@ -17972,7 +17982,6 @@ var Thumbnail = (0, import_react100.forwardRef)(
17972
17982
  {
17973
17983
  ref,
17974
17984
  ...props,
17975
- $aspectRatio: getAspectRatioValue(aspectRatio),
17976
17985
  $backgroundUrl: backgroundUrl,
17977
17986
  $gradientBackground: gradientBackground,
17978
17987
  $isScrubbable: isScrubbable,