@wistia/ui 0.14.18 → 0.14.19-beta.458638b3.28f2f7e
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 +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +14 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.19-beta.458638b3.28f2f7e
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -11300,7 +11300,7 @@ var Input = (0, import_react47.forwardRef)(
|
|
|
11300
11300
|
rightIcon,
|
|
11301
11301
|
...props
|
|
11302
11302
|
}, externalRef) => {
|
|
11303
|
-
const internalRef = (0, import_react47.useRef)();
|
|
11303
|
+
const internalRef = (0, import_react47.useRef)(null);
|
|
11304
11304
|
const ref = (0, import_type_guards35.isNotNil)(externalRef) && (0, import_type_guards35.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef;
|
|
11305
11305
|
let leftIconToDisplay = leftIcon;
|
|
11306
11306
|
if ((0, import_type_guards35.isNil)(leftIcon) && type === "search") {
|
|
@@ -11323,7 +11323,7 @@ var Input = (0, import_react47.forwardRef)(
|
|
|
11323
11323
|
if ((0, import_type_guards35.isNotNil)(props.onFocus)) {
|
|
11324
11324
|
props.onFocus(event);
|
|
11325
11325
|
}
|
|
11326
|
-
if (autoSelect &&
|
|
11326
|
+
if (autoSelect && type !== "multiline" && ref.current instanceof HTMLInputElement) {
|
|
11327
11327
|
requestAnimationFrame(() => {
|
|
11328
11328
|
ref.current?.select();
|
|
11329
11329
|
});
|
|
@@ -16400,6 +16400,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16400
16400
|
frameCount,
|
|
16401
16401
|
percent,
|
|
16402
16402
|
targetWidth = 200,
|
|
16403
|
+
targetHeight,
|
|
16403
16404
|
targetAspectRatio,
|
|
16404
16405
|
scaleFactor = 1,
|
|
16405
16406
|
framesPerRow = 10,
|
|
@@ -16408,10 +16409,11 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16408
16409
|
}) => {
|
|
16409
16410
|
const originalAspectRatio = frameWidth / frameHeight;
|
|
16410
16411
|
const effectiveTargetAspectRatio = targetAspectRatio ?? originalAspectRatio;
|
|
16411
|
-
const
|
|
16412
|
+
const calculatedHeight = targetWidth / effectiveTargetAspectRatio;
|
|
16413
|
+
const finalHeight = targetHeight ?? calculatedHeight;
|
|
16412
16414
|
const viewerDimensions = {
|
|
16413
16415
|
viewerWidth: targetWidth,
|
|
16414
|
-
viewerHeight:
|
|
16416
|
+
viewerHeight: finalHeight
|
|
16415
16417
|
};
|
|
16416
16418
|
const { scaledHeight, scaledWidth } = getScaledDimensions(
|
|
16417
16419
|
originalAspectRatio,
|
|
@@ -16426,13 +16428,19 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16426
16428
|
scaledHeight
|
|
16427
16429
|
);
|
|
16428
16430
|
const frameIndex = Math.floor(percent * frameCount);
|
|
16429
|
-
const
|
|
16431
|
+
const framePosition = getFramePosition(
|
|
16430
16432
|
frameIndex,
|
|
16431
16433
|
framesPerRow,
|
|
16432
16434
|
coverProps.width,
|
|
16433
16435
|
coverProps.height,
|
|
16434
16436
|
scaleFactor
|
|
16435
16437
|
);
|
|
16438
|
+
const rows = Math.ceil(frameCount / framesPerRow);
|
|
16439
|
+
const frameHeightInStoryboard = coverProps.height / rows;
|
|
16440
|
+
const verticalCenterOffset = (calculatedHeight - frameHeightInStoryboard) / 2;
|
|
16441
|
+
const [x, y] = framePosition.split(" ");
|
|
16442
|
+
const adjustedY = `calc(${y} - ${verticalCenterOffset}px)`;
|
|
16443
|
+
const backgroundPosition = `${x} ${adjustedY}`;
|
|
16436
16444
|
const scaleFactorFromAspectRatioFit = coverProps.height / frameHeight;
|
|
16437
16445
|
const scaledStoryboardWidth = storyboardWidth * scaleFactorFromAspectRatioFit * scaleFactor;
|
|
16438
16446
|
const scaledStoryboardHeight = Math.floor(
|