@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.d.mts
CHANGED
|
@@ -4118,7 +4118,6 @@ declare const gradients: {
|
|
|
4118
4118
|
};
|
|
4119
4119
|
type GradientNameType = keyof typeof gradients;
|
|
4120
4120
|
|
|
4121
|
-
type AspectRatioType = 'square' | 'wide';
|
|
4122
4121
|
type Storyboard = {
|
|
4123
4122
|
__typename?: string;
|
|
4124
4123
|
aspectRatio: number;
|
|
@@ -4161,11 +4160,6 @@ type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
|
4161
4160
|
* Example: '180px'
|
|
4162
4161
|
*/
|
|
4163
4162
|
height?: string;
|
|
4164
|
-
/**
|
|
4165
|
-
* The aspect ratio of the thumbnail container.
|
|
4166
|
-
* 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
|
|
4167
|
-
*/
|
|
4168
|
-
aspectRatio?: AspectRatioType;
|
|
4169
4163
|
};
|
|
4170
4164
|
/**
|
|
4171
4165
|
* A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
|
|
@@ -4201,11 +4195,6 @@ declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
|
|
|
4201
4195
|
* Example: '180px'
|
|
4202
4196
|
*/
|
|
4203
4197
|
height?: string;
|
|
4204
|
-
/**
|
|
4205
|
-
* The aspect ratio of the thumbnail container.
|
|
4206
|
-
* 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
|
|
4207
|
-
*/
|
|
4208
|
-
aspectRatio?: AspectRatioType;
|
|
4209
4198
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
4210
4199
|
|
|
4211
4200
|
type ThumbnailCollageProps = {
|
package/dist/index.d.ts
CHANGED
|
@@ -4118,7 +4118,6 @@ declare const gradients: {
|
|
|
4118
4118
|
};
|
|
4119
4119
|
type GradientNameType = keyof typeof gradients;
|
|
4120
4120
|
|
|
4121
|
-
type AspectRatioType = 'square' | 'wide';
|
|
4122
4121
|
type Storyboard = {
|
|
4123
4122
|
__typename?: string;
|
|
4124
4123
|
aspectRatio: number;
|
|
@@ -4161,11 +4160,6 @@ type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
|
4161
4160
|
* Example: '180px'
|
|
4162
4161
|
*/
|
|
4163
4162
|
height?: string;
|
|
4164
|
-
/**
|
|
4165
|
-
* The aspect ratio of the thumbnail container.
|
|
4166
|
-
* 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
|
|
4167
|
-
*/
|
|
4168
|
-
aspectRatio?: AspectRatioType;
|
|
4169
4163
|
};
|
|
4170
4164
|
/**
|
|
4171
4165
|
* A `Thumbnail` is a small, reduced-size version of an image or video used as a preview or representative image.
|
|
@@ -4201,11 +4195,6 @@ declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
|
|
|
4201
4195
|
* Example: '180px'
|
|
4202
4196
|
*/
|
|
4203
4197
|
height?: string;
|
|
4204
|
-
/**
|
|
4205
|
-
* The aspect ratio of the thumbnail container.
|
|
4206
|
-
* 'wide' maps to 16:9 ratio, 'square' maps to 1:1 ratio.
|
|
4207
|
-
*/
|
|
4208
|
-
aspectRatio?: AspectRatioType;
|
|
4209
4198
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
4210
4199
|
|
|
4211
4200
|
type ThumbnailCollageProps = {
|
package/dist/index.mjs
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
|
*
|
|
@@ -17891,14 +17891,6 @@ var ThumbnailStoryboardViewer = ({
|
|
|
17891
17891
|
|
|
17892
17892
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17893
17893
|
import { jsx as jsx325, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
17894
|
-
var WIDE_ASPECT_RATIO = 16 / 9;
|
|
17895
|
-
var SQUARE_ASPECT_RATIO = 1;
|
|
17896
|
-
var getAspectRatioValue = (aspectRatio) => {
|
|
17897
|
-
if (aspectRatio === "square") {
|
|
17898
|
-
return SQUARE_ASPECT_RATIO;
|
|
17899
|
-
}
|
|
17900
|
-
return WIDE_ASPECT_RATIO;
|
|
17901
|
-
};
|
|
17902
17894
|
var WideThumbnailImage = styled106.img`
|
|
17903
17895
|
height: 100%;
|
|
17904
17896
|
object-fit: cover;
|
|
@@ -17937,7 +17929,7 @@ var StyledThumbnail = styled106.div`
|
|
|
17937
17929
|
)};
|
|
17938
17930
|
background-position: center center;
|
|
17939
17931
|
background-size: cover;
|
|
17940
|
-
aspect-ratio:
|
|
17932
|
+
aspect-ratio: 16 / 9;
|
|
17941
17933
|
display: flex;
|
|
17942
17934
|
overflow: hidden;
|
|
17943
17935
|
position: relative;
|
|
@@ -17946,12 +17938,7 @@ var StyledThumbnail = styled106.div`
|
|
|
17946
17938
|
|
|
17947
17939
|
&,
|
|
17948
17940
|
img {
|
|
17949
|
-
border-radius:
|
|
17950
|
-
if ($aspectRatio === "square") {
|
|
17951
|
-
return "8%";
|
|
17952
|
-
}
|
|
17953
|
-
return `calc(8% * (9 / 16)) / 8%`;
|
|
17954
|
-
}};
|
|
17941
|
+
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
17955
17942
|
}
|
|
17956
17943
|
`;
|
|
17957
17944
|
var StoryboardRenderer = ({
|
|
@@ -17959,10 +17946,17 @@ var StoryboardRenderer = ({
|
|
|
17959
17946
|
width,
|
|
17960
17947
|
percent,
|
|
17961
17948
|
cursorPosition,
|
|
17962
|
-
isStoryboardReady
|
|
17963
|
-
aspectRatio
|
|
17949
|
+
isStoryboardReady
|
|
17964
17950
|
}) => {
|
|
17965
|
-
const {
|
|
17951
|
+
const {
|
|
17952
|
+
url,
|
|
17953
|
+
width: sbWidth,
|
|
17954
|
+
height: sbHeight,
|
|
17955
|
+
frameHeight,
|
|
17956
|
+
frameWidth,
|
|
17957
|
+
frameCount,
|
|
17958
|
+
aspectRatio
|
|
17959
|
+
} = storyboard;
|
|
17966
17960
|
const targetWidth = isString4(width) ? parseInt(width, 10) : Number(width);
|
|
17967
17961
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
17968
17962
|
return /* @__PURE__ */ jsx325(
|
|
@@ -17976,7 +17970,7 @@ var StoryboardRenderer = ({
|
|
|
17976
17970
|
storyboardHeight: sbHeight,
|
|
17977
17971
|
storyboardUrl: url,
|
|
17978
17972
|
storyboardWidth: sbWidth,
|
|
17979
|
-
targetAspectRatio:
|
|
17973
|
+
targetAspectRatio: aspectRatio,
|
|
17980
17974
|
targetWidth
|
|
17981
17975
|
}
|
|
17982
17976
|
);
|
|
@@ -17999,7 +17993,6 @@ var Thumbnail = forwardRef37(
|
|
|
17999
17993
|
children,
|
|
18000
17994
|
storyboard,
|
|
18001
17995
|
height,
|
|
18002
|
-
aspectRatio = "wide",
|
|
18003
17996
|
...props
|
|
18004
17997
|
}, ref) => {
|
|
18005
17998
|
const [percent, setPercent] = useState26(0);
|
|
@@ -18051,7 +18044,6 @@ var Thumbnail = forwardRef37(
|
|
|
18051
18044
|
thumbnailContent = /* @__PURE__ */ jsx325(
|
|
18052
18045
|
StoryboardRenderer,
|
|
18053
18046
|
{
|
|
18054
|
-
aspectRatio,
|
|
18055
18047
|
cursorPosition,
|
|
18056
18048
|
isStoryboardReady,
|
|
18057
18049
|
percent,
|
|
@@ -18075,7 +18067,6 @@ var Thumbnail = forwardRef37(
|
|
|
18075
18067
|
{
|
|
18076
18068
|
ref,
|
|
18077
18069
|
...props,
|
|
18078
|
-
$aspectRatio: aspectRatio,
|
|
18079
18070
|
$backgroundUrl: backgroundUrl,
|
|
18080
18071
|
$gradientBackground: gradientBackground,
|
|
18081
18072
|
$isScrubbable: isScrubbable,
|