@wistia/ui 0.18.4-beta.a529e874.9a0f097 → 0.18.4
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 +4 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +5 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4138,7 +4138,7 @@ type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
|
4138
4138
|
/**
|
|
4139
4139
|
* The URL of the thumbnail image to display
|
|
4140
4140
|
*/
|
|
4141
|
-
thumbnailUrl: string | null
|
|
4141
|
+
thumbnailUrl: string | null;
|
|
4142
4142
|
/**
|
|
4143
4143
|
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
4144
4144
|
*/
|
|
@@ -4178,7 +4178,7 @@ declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
|
|
|
4178
4178
|
/**
|
|
4179
4179
|
* The URL of the thumbnail image to display
|
|
4180
4180
|
*/
|
|
4181
|
-
thumbnailUrl: string | null
|
|
4181
|
+
thumbnailUrl: string | null;
|
|
4182
4182
|
/**
|
|
4183
4183
|
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
4184
4184
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -4138,7 +4138,7 @@ type ThumbnailProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
|
4138
4138
|
/**
|
|
4139
4139
|
* The URL of the thumbnail image to display
|
|
4140
4140
|
*/
|
|
4141
|
-
thumbnailUrl: string | null
|
|
4141
|
+
thumbnailUrl: string | null;
|
|
4142
4142
|
/**
|
|
4143
4143
|
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
4144
4144
|
*/
|
|
@@ -4178,7 +4178,7 @@ declare const Thumbnail: react.ForwardRefExoticComponent<Omit<Omit<react.Detaile
|
|
|
4178
4178
|
/**
|
|
4179
4179
|
* The URL of the thumbnail image to display
|
|
4180
4180
|
*/
|
|
4181
|
-
thumbnailUrl: string | null
|
|
4181
|
+
thumbnailUrl: string | null;
|
|
4182
4182
|
/**
|
|
4183
4183
|
* Children to render inside the thumbnail; must be a `ThumbnailBadge` component
|
|
4184
4184
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.4
|
|
3
|
+
* @license @wistia/ui v0.18.4
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -17699,14 +17699,7 @@ ThumbnailBadge.displayName = "ThumbnailBadge_UI";
|
|
|
17699
17699
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
17700
17700
|
import { forwardRef as forwardRef37, useState as useState26, useRef as useRef24, useCallback as useCallback20, useMemo as useMemo17 } from "react";
|
|
17701
17701
|
import { styled as styled107 } from "styled-components";
|
|
17702
|
-
import {
|
|
17703
|
-
isNil as isNil19,
|
|
17704
|
-
isNotNil as isNotNil43,
|
|
17705
|
-
isUndefined as isUndefined7,
|
|
17706
|
-
isEmptyString as isEmptyString2,
|
|
17707
|
-
isString as isString4,
|
|
17708
|
-
isNonEmptyString as isNonEmptyString10
|
|
17709
|
-
} from "@wistia/type-guards";
|
|
17702
|
+
import { isNil as isNil19, isNotNil as isNotNil43, isUndefined as isUndefined7, isEmptyString as isEmptyString2, isString as isString4 } from "@wistia/type-guards";
|
|
17710
17703
|
|
|
17711
17704
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
17712
17705
|
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
@@ -18037,11 +18030,7 @@ var StyledThumbnail = styled107.div`
|
|
|
18037
18030
|
width: 100%;
|
|
18038
18031
|
overflow: hidden;
|
|
18039
18032
|
position: relative;
|
|
18040
|
-
|
|
18041
|
-
&,
|
|
18042
|
-
img {
|
|
18043
|
-
border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
|
|
18044
|
-
}
|
|
18033
|
+
border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
|
|
18045
18034
|
|
|
18046
18035
|
@container (min-width: 200px) {
|
|
18047
18036
|
--wui-thumbnail-badge-offset: var(--wui-space-02);
|
|
@@ -18083,9 +18072,6 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
18083
18072
|
left: relativeLeft
|
|
18084
18073
|
};
|
|
18085
18074
|
};
|
|
18086
|
-
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
18087
|
-
return isNotNil43(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
18088
|
-
};
|
|
18089
18075
|
var Thumbnail = forwardRef37(
|
|
18090
18076
|
({
|
|
18091
18077
|
gradientBackground = "defaultMidOne",
|
|
@@ -18104,7 +18090,7 @@ var Thumbnail = forwardRef37(
|
|
|
18104
18090
|
const storyboardElementRef = useRef24(null);
|
|
18105
18091
|
const [cursorPosition, setCursorPosition] = useState26(null);
|
|
18106
18092
|
const backgroundUrl = useMemo17(
|
|
18107
|
-
() => thumbnailImageType === "square" &&
|
|
18093
|
+
() => thumbnailImageType === "square" && isNotNil43(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
18108
18094
|
[thumbnailImageType, thumbnailUrl]
|
|
18109
18095
|
);
|
|
18110
18096
|
const isScrubbable = isNotNil43(storyboard);
|
|
@@ -18155,7 +18141,7 @@ var Thumbnail = forwardRef37(
|
|
|
18155
18141
|
width
|
|
18156
18142
|
}
|
|
18157
18143
|
);
|
|
18158
|
-
} else if (
|
|
18144
|
+
} else if (isNotNil43(thumbnailUrl)) {
|
|
18159
18145
|
thumbnailContent = /* @__PURE__ */ jsx326(
|
|
18160
18146
|
ThumbnailImage,
|
|
18161
18147
|
{
|