@wistia/ui 0.18.1-beta.341b7714.c1c1bd7 → 0.18.1
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 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +0 -11
- package/dist/index.d.ts +0 -11
- package/dist/index.mjs +14 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.1
|
|
3
|
+
* @license @wistia/ui v0.18.1
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -18027,14 +18027,6 @@ var ThumbnailStoryboardViewer = ({
|
|
|
18027
18027
|
|
|
18028
18028
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
18029
18029
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
18030
|
-
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
18031
|
-
var SQUARE_ASPECT_RATIO = 1;
|
|
18032
|
-
var getAspectRatioValue = (aspectRatio) => {
|
|
18033
|
-
if (aspectRatio === "square") {
|
|
18034
|
-
return SQUARE_ASPECT_RATIO;
|
|
18035
|
-
}
|
|
18036
|
-
return WIDE_ASPECT_RATIO;
|
|
18037
|
-
};
|
|
18038
18030
|
var WideThumbnailImage = import_styled_components126.styled.img`
|
|
18039
18031
|
height: 100%;
|
|
18040
18032
|
object-fit: cover;
|
|
@@ -18073,7 +18065,7 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18073
18065
|
)};
|
|
18074
18066
|
background-position: center center;
|
|
18075
18067
|
background-size: cover;
|
|
18076
|
-
aspect-ratio:
|
|
18068
|
+
aspect-ratio: 16 / 9;
|
|
18077
18069
|
display: flex;
|
|
18078
18070
|
overflow: hidden;
|
|
18079
18071
|
position: relative;
|
|
@@ -18082,12 +18074,7 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18082
18074
|
|
|
18083
18075
|
&,
|
|
18084
18076
|
img {
|
|
18085
|
-
border-radius:
|
|
18086
|
-
if ($aspectRatio === "square") {
|
|
18087
|
-
return "8%";
|
|
18088
|
-
}
|
|
18089
|
-
return `calc(8% * (9 / 16)) / 8%`;
|
|
18090
|
-
}};
|
|
18077
|
+
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
18091
18078
|
}
|
|
18092
18079
|
`;
|
|
18093
18080
|
var StoryboardRenderer = ({
|
|
@@ -18095,10 +18082,17 @@ var StoryboardRenderer = ({
|
|
|
18095
18082
|
width,
|
|
18096
18083
|
percent,
|
|
18097
18084
|
cursorPosition,
|
|
18098
|
-
isStoryboardReady
|
|
18099
|
-
aspectRatio
|
|
18085
|
+
isStoryboardReady
|
|
18100
18086
|
}) => {
|
|
18101
|
-
const {
|
|
18087
|
+
const {
|
|
18088
|
+
url,
|
|
18089
|
+
width: sbWidth,
|
|
18090
|
+
height: sbHeight,
|
|
18091
|
+
frameHeight,
|
|
18092
|
+
frameWidth,
|
|
18093
|
+
frameCount,
|
|
18094
|
+
aspectRatio
|
|
18095
|
+
} = storyboard;
|
|
18102
18096
|
const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
18103
18097
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
18104
18098
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
@@ -18112,7 +18106,7 @@ var StoryboardRenderer = ({
|
|
|
18112
18106
|
storyboardHeight: sbHeight,
|
|
18113
18107
|
storyboardUrl: url,
|
|
18114
18108
|
storyboardWidth: sbWidth,
|
|
18115
|
-
targetAspectRatio:
|
|
18109
|
+
targetAspectRatio: aspectRatio,
|
|
18116
18110
|
targetWidth
|
|
18117
18111
|
}
|
|
18118
18112
|
);
|
|
@@ -18135,7 +18129,6 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18135
18129
|
children,
|
|
18136
18130
|
storyboard,
|
|
18137
18131
|
height,
|
|
18138
|
-
aspectRatio = "wide",
|
|
18139
18132
|
...props
|
|
18140
18133
|
}, ref) => {
|
|
18141
18134
|
const [percent, setPercent] = (0, import_react100.useState)(0);
|
|
@@ -18187,7 +18180,6 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18187
18180
|
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18188
18181
|
StoryboardRenderer,
|
|
18189
18182
|
{
|
|
18190
|
-
aspectRatio,
|
|
18191
18183
|
cursorPosition,
|
|
18192
18184
|
isStoryboardReady,
|
|
18193
18185
|
percent,
|
|
@@ -18211,7 +18203,6 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18211
18203
|
{
|
|
18212
18204
|
ref,
|
|
18213
18205
|
...props,
|
|
18214
|
-
$aspectRatio: aspectRatio,
|
|
18215
18206
|
$backgroundUrl: backgroundUrl,
|
|
18216
18207
|
$gradientBackground: gradientBackground,
|
|
18217
18208
|
$isScrubbable: isScrubbable,
|