@wistia/ui 0.18.3 → 0.18.4-beta.a529e874.9a0f097
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 +15 -8
- 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 +23 -9
- 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 | undefined;
|
|
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 | undefined;
|
|
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 | undefined;
|
|
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 | undefined;
|
|
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.
|
|
3
|
+
* @license @wistia/ui v0.18.4-beta.a529e874.9a0f097
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -6690,13 +6690,13 @@ var SpeedIcon = (props) => /* @__PURE__ */ jsx168(
|
|
|
6690
6690
|
|
|
6691
6691
|
// src/components/Icon/icons/SpinnerIcon.tsx
|
|
6692
6692
|
import { jsx as jsx169, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
6693
|
-
var SpinnerIcon = (props) => /* @__PURE__ */
|
|
6693
|
+
var SpinnerIcon = (props) => /* @__PURE__ */ jsx169(
|
|
6694
6694
|
"svg",
|
|
6695
6695
|
{
|
|
6696
6696
|
...props,
|
|
6697
6697
|
viewBox: "0 0 24 24",
|
|
6698
6698
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6699
|
-
children: [
|
|
6699
|
+
children: /* @__PURE__ */ jsxs7("g", { children: [
|
|
6700
6700
|
/* @__PURE__ */ jsx169(
|
|
6701
6701
|
"path",
|
|
6702
6702
|
{
|
|
@@ -6714,10 +6714,10 @@ var SpinnerIcon = (props) => /* @__PURE__ */ jsxs7(
|
|
|
6714
6714
|
keyTimes: "0;1",
|
|
6715
6715
|
repeatCount: "indefinite",
|
|
6716
6716
|
type: "rotate",
|
|
6717
|
-
values: "0
|
|
6717
|
+
values: "0 12 12;360 12 12"
|
|
6718
6718
|
}
|
|
6719
6719
|
)
|
|
6720
|
-
]
|
|
6720
|
+
] })
|
|
6721
6721
|
}
|
|
6722
6722
|
);
|
|
6723
6723
|
|
|
@@ -17699,7 +17699,14 @@ 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 {
|
|
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";
|
|
17703
17710
|
|
|
17704
17711
|
// src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
17705
17712
|
import { isNotNil as isNotNil41 } from "@wistia/type-guards";
|
|
@@ -18030,7 +18037,11 @@ var StyledThumbnail = styled107.div`
|
|
|
18030
18037
|
width: 100%;
|
|
18031
18038
|
overflow: hidden;
|
|
18032
18039
|
position: relative;
|
|
18033
|
-
|
|
18040
|
+
|
|
18041
|
+
&,
|
|
18042
|
+
img {
|
|
18043
|
+
border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
|
|
18044
|
+
}
|
|
18034
18045
|
|
|
18035
18046
|
@container (min-width: 200px) {
|
|
18036
18047
|
--wui-thumbnail-badge-offset: var(--wui-space-02);
|
|
@@ -18072,6 +18083,9 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
18072
18083
|
left: relativeLeft
|
|
18073
18084
|
};
|
|
18074
18085
|
};
|
|
18086
|
+
var hasValidThumbnailUrl = (thumbnailUrl) => {
|
|
18087
|
+
return isNotNil43(thumbnailUrl) && isNonEmptyString10(thumbnailUrl);
|
|
18088
|
+
};
|
|
18075
18089
|
var Thumbnail = forwardRef37(
|
|
18076
18090
|
({
|
|
18077
18091
|
gradientBackground = "defaultMidOne",
|
|
@@ -18090,7 +18104,7 @@ var Thumbnail = forwardRef37(
|
|
|
18090
18104
|
const storyboardElementRef = useRef24(null);
|
|
18091
18105
|
const [cursorPosition, setCursorPosition] = useState26(null);
|
|
18092
18106
|
const backgroundUrl = useMemo17(
|
|
18093
|
-
() => thumbnailImageType === "square" &&
|
|
18107
|
+
() => thumbnailImageType === "square" && hasValidThumbnailUrl(thumbnailUrl) ? thumbnailUrl : void 0,
|
|
18094
18108
|
[thumbnailImageType, thumbnailUrl]
|
|
18095
18109
|
);
|
|
18096
18110
|
const isScrubbable = isNotNil43(storyboard);
|
|
@@ -18141,7 +18155,7 @@ var Thumbnail = forwardRef37(
|
|
|
18141
18155
|
width
|
|
18142
18156
|
}
|
|
18143
18157
|
);
|
|
18144
|
-
} else if (
|
|
18158
|
+
} else if (hasValidThumbnailUrl(thumbnailUrl)) {
|
|
18145
18159
|
thumbnailContent = /* @__PURE__ */ jsx326(
|
|
18146
18160
|
ThumbnailImage,
|
|
18147
18161
|
{
|