@wistia/ui 0.18.0-beta.1338688d.84af1a8 → 0.18.0-beta.3a151a03.96acbe5
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 +21 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.mjs +21 -22
- 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.0-beta.
|
|
3
|
+
* @license @wistia/ui v0.18.0-beta.3a151a03.96acbe5
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -236,7 +236,6 @@ var globalStyleAdjustmentsCss = import_styled_components.css`
|
|
|
236
236
|
* 1. Without this fonts are too heavy weight in OS X Firefox
|
|
237
237
|
* 2. Design decision
|
|
238
238
|
3. See: https://allthingssmitty.com/2020/05/11/css-fix-for-100vh-in-mobile-webkit/
|
|
239
|
-
4. Default font settings that all elements should get unless overridden
|
|
240
239
|
*/
|
|
241
240
|
body {
|
|
242
241
|
-moz-osx-font-smoothing: grayscale; /* 1 */
|
|
@@ -244,13 +243,6 @@ var globalStyleAdjustmentsCss = import_styled_components.css`
|
|
|
244
243
|
line-height: 1.5; /* 2 */
|
|
245
244
|
min-height: 100vh; /* 3 */
|
|
246
245
|
min-height: -webkit-fill-available; /* 3 */
|
|
247
|
-
color: var(--wui-color-text-high-contrast); /* 4 */
|
|
248
|
-
font-family: var(--wui-typography-body-2-family); /* 4 */
|
|
249
|
-
font-size: var(--wui-typography-body-2-size); /* 4 */
|
|
250
|
-
font-weight: var(--wui-typography-body-2-weight); /* 4 */
|
|
251
|
-
|
|
252
|
-
/* line-height: var(--wui-typography-body-2-line-height); */
|
|
253
|
-
margin: 0; /* 2 */
|
|
254
246
|
}
|
|
255
247
|
|
|
256
248
|
/* Remove default margin in favour of better control in authored CSS */
|
|
@@ -17989,6 +17981,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17989
17981
|
|
|
17990
17982
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17991
17983
|
var import_jsx_runtime327 = require("react/jsx-runtime");
|
|
17984
|
+
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
17985
|
+
var SQUARE_ASPECT_RATIO = 1;
|
|
17986
|
+
var getAspectRatioValue = (aspectRatio) => {
|
|
17987
|
+
if (aspectRatio === "square") {
|
|
17988
|
+
return SQUARE_ASPECT_RATIO;
|
|
17989
|
+
}
|
|
17990
|
+
return WIDE_ASPECT_RATIO;
|
|
17991
|
+
};
|
|
17992
17992
|
var WideThumbnailImage = import_styled_components126.styled.img`
|
|
17993
17993
|
height: 100%;
|
|
17994
17994
|
object-fit: cover;
|
|
@@ -18027,7 +18027,7 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18027
18027
|
)};
|
|
18028
18028
|
background-position: center center;
|
|
18029
18029
|
background-size: cover;
|
|
18030
|
-
aspect-ratio:
|
|
18030
|
+
aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};
|
|
18031
18031
|
display: flex;
|
|
18032
18032
|
overflow: hidden;
|
|
18033
18033
|
position: relative;
|
|
@@ -18036,7 +18036,10 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18036
18036
|
|
|
18037
18037
|
&,
|
|
18038
18038
|
img {
|
|
18039
|
-
border-radius:
|
|
18039
|
+
border-radius: ${({ $aspectRatio }) => {
|
|
18040
|
+
const heightPercentage = 8 / $aspectRatio;
|
|
18041
|
+
return `calc(8% * (1 / ${$aspectRatio})) / ${heightPercentage}%`;
|
|
18042
|
+
}};
|
|
18040
18043
|
}
|
|
18041
18044
|
`;
|
|
18042
18045
|
var StoryboardRenderer = ({
|
|
@@ -18044,17 +18047,10 @@ var StoryboardRenderer = ({
|
|
|
18044
18047
|
width,
|
|
18045
18048
|
percent,
|
|
18046
18049
|
cursorPosition,
|
|
18047
|
-
isStoryboardReady
|
|
18050
|
+
isStoryboardReady,
|
|
18051
|
+
aspectRatio
|
|
18048
18052
|
}) => {
|
|
18049
|
-
const {
|
|
18050
|
-
url,
|
|
18051
|
-
width: sbWidth,
|
|
18052
|
-
height: sbHeight,
|
|
18053
|
-
frameHeight,
|
|
18054
|
-
frameWidth,
|
|
18055
|
-
frameCount,
|
|
18056
|
-
aspectRatio
|
|
18057
|
-
} = storyboard;
|
|
18053
|
+
const { url, width: sbWidth, height: sbHeight, frameHeight, frameWidth, frameCount } = storyboard;
|
|
18058
18054
|
const targetWidth = (0, import_type_guards74.isString)(width) ? parseInt(width, 10) : Number(width);
|
|
18059
18055
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
18060
18056
|
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
@@ -18068,7 +18064,7 @@ var StoryboardRenderer = ({
|
|
|
18068
18064
|
storyboardHeight: sbHeight,
|
|
18069
18065
|
storyboardUrl: url,
|
|
18070
18066
|
storyboardWidth: sbWidth,
|
|
18071
|
-
targetAspectRatio: aspectRatio,
|
|
18067
|
+
targetAspectRatio: getAspectRatioValue(aspectRatio),
|
|
18072
18068
|
targetWidth
|
|
18073
18069
|
}
|
|
18074
18070
|
);
|
|
@@ -18091,6 +18087,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18091
18087
|
children,
|
|
18092
18088
|
storyboard,
|
|
18093
18089
|
height,
|
|
18090
|
+
aspectRatio = "wide",
|
|
18094
18091
|
...props
|
|
18095
18092
|
}, ref) => {
|
|
18096
18093
|
const [percent, setPercent] = (0, import_react100.useState)(0);
|
|
@@ -18142,6 +18139,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18142
18139
|
thumbnailContent = /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18143
18140
|
StoryboardRenderer,
|
|
18144
18141
|
{
|
|
18142
|
+
aspectRatio,
|
|
18145
18143
|
cursorPosition,
|
|
18146
18144
|
isStoryboardReady,
|
|
18147
18145
|
percent,
|
|
@@ -18165,6 +18163,7 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18165
18163
|
{
|
|
18166
18164
|
ref,
|
|
18167
18165
|
...props,
|
|
18166
|
+
$aspectRatio: getAspectRatioValue(aspectRatio),
|
|
18168
18167
|
$backgroundUrl: backgroundUrl,
|
|
18169
18168
|
$gradientBackground: gradientBackground,
|
|
18170
18169
|
$isScrubbable: isScrubbable,
|