@wistia/ui 0.14.18 → 0.14.19-beta.08cecd35.021a981

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.14.18
3
+ * @license @wistia/ui v0.14.19-beta.08cecd35.021a981
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -76,17 +76,6 @@ var globalStyleAdjustmentsCss = css`
76
76
  list-style: none;
77
77
  }
78
78
 
79
- /* Set shorter line heights on headings and interactive elements */
80
- h1,
81
- h2,
82
- h3,
83
- h4,
84
- button,
85
- input,
86
- label {
87
- line-height: 1.1;
88
- }
89
-
90
79
  /* Balance text wrapping on headings */
91
80
 
92
81
  /* h1,
@@ -11141,7 +11130,7 @@ var Input = forwardRef15(
11141
11130
  rightIcon,
11142
11131
  ...props
11143
11132
  }, externalRef) => {
11144
- const internalRef = useRef9();
11133
+ const internalRef = useRef9(null);
11145
11134
  const ref = isNotNil18(externalRef) && isRecord4(externalRef) && "current" in externalRef ? externalRef : internalRef;
11146
11135
  let leftIconToDisplay = leftIcon;
11147
11136
  if (isNil13(leftIcon) && type === "search") {
@@ -11164,7 +11153,7 @@ var Input = forwardRef15(
11164
11153
  if (isNotNil18(props.onFocus)) {
11165
11154
  props.onFocus(event);
11166
11155
  }
11167
- if (autoSelect && isValidRef(ref) && "current" in ref) {
11156
+ if (autoSelect && type !== "multiline" && ref.current instanceof HTMLInputElement) {
11168
11157
  requestAnimationFrame(() => {
11169
11158
  ref.current?.select();
11170
11159
  });
@@ -16271,12 +16260,16 @@ var getCoverProps = (viewerWidth, viewerHeight, scaledWidth, scaledHeight) => {
16271
16260
  left
16272
16261
  };
16273
16262
  };
16274
- var getFramePosition = (frameIndex, framesPerRow, width, height, scaleFactor) => {
16263
+ var getFramePosition = (frameIndex, framesPerRow, width, height, scaleFactor, frameCount, targetHeight) => {
16275
16264
  const col = frameIndex % framesPerRow;
16276
16265
  const row = Math.floor(frameIndex / framesPerRow);
16277
16266
  const imageX = -width * col * scaleFactor;
16278
16267
  const imageY = -height * row * scaleFactor;
16279
- return `${imageX}px ${imageY}px`;
16268
+ const rows = Math.ceil(frameCount / framesPerRow);
16269
+ const frameHeightInStoryboard = height / rows;
16270
+ const verticalCenterOffset = (targetHeight - frameHeightInStoryboard) / 2;
16271
+ const adjustedY = imageY - verticalCenterOffset;
16272
+ return `${imageX}px ${adjustedY}px`;
16280
16273
  };
16281
16274
  var ThumbnailStoryboardViewer = ({
16282
16275
  storyboardUrl,
@@ -16287,6 +16280,7 @@ var ThumbnailStoryboardViewer = ({
16287
16280
  frameCount,
16288
16281
  percent,
16289
16282
  targetWidth = 200,
16283
+ targetHeight,
16290
16284
  targetAspectRatio,
16291
16285
  scaleFactor = 1,
16292
16286
  framesPerRow = 10,
@@ -16295,10 +16289,11 @@ var ThumbnailStoryboardViewer = ({
16295
16289
  }) => {
16296
16290
  const originalAspectRatio = frameWidth / frameHeight;
16297
16291
  const effectiveTargetAspectRatio = targetAspectRatio ?? originalAspectRatio;
16298
- const targetHeight = targetWidth / effectiveTargetAspectRatio;
16292
+ const calculatedHeight = targetWidth / effectiveTargetAspectRatio;
16293
+ const finalHeight = targetHeight ?? calculatedHeight;
16299
16294
  const viewerDimensions = {
16300
16295
  viewerWidth: targetWidth,
16301
- viewerHeight: targetHeight
16296
+ viewerHeight: finalHeight
16302
16297
  };
16303
16298
  const { scaledHeight, scaledWidth } = getScaledDimensions(
16304
16299
  originalAspectRatio,
@@ -16318,7 +16313,9 @@ var ThumbnailStoryboardViewer = ({
16318
16313
  framesPerRow,
16319
16314
  coverProps.width,
16320
16315
  coverProps.height,
16321
- scaleFactor
16316
+ scaleFactor,
16317
+ frameCount,
16318
+ calculatedHeight
16322
16319
  );
16323
16320
  const scaleFactorFromAspectRatioFit = coverProps.height / frameHeight;
16324
16321
  const scaledStoryboardWidth = storyboardWidth * scaleFactorFromAspectRatioFit * scaleFactor;