@wistia/ui 0.14.18-beta.fe0c62a3.6efbc99 → 0.14.19-beta.08cecd35.021a981
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 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +37 -23
- package/dist/index.d.ts +37 -23
- package/dist/index.mjs +21 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.14.
|
|
3
|
+
* @license @wistia/ui v0.14.19-beta.08cecd35.021a981
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -250,17 +250,6 @@ var globalStyleAdjustmentsCss = import_styled_components.css`
|
|
|
250
250
|
list-style: none;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
/* Set shorter line heights on headings and interactive elements */
|
|
254
|
-
h1,
|
|
255
|
-
h2,
|
|
256
|
-
h3,
|
|
257
|
-
h4,
|
|
258
|
-
button,
|
|
259
|
-
input,
|
|
260
|
-
label {
|
|
261
|
-
line-height: 1.1;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
253
|
/* Balance text wrapping on headings */
|
|
265
254
|
|
|
266
255
|
/* h1,
|
|
@@ -2153,7 +2142,7 @@ var import_react7 = require("react");
|
|
|
2153
2142
|
var import_react6 = require("react");
|
|
2154
2143
|
var useTimedToggle = (initialValue) => {
|
|
2155
2144
|
const [value, setValue] = (0, import_react6.useState)(false);
|
|
2156
|
-
const timeoutRef = (0, import_react6.useRef)(
|
|
2145
|
+
const timeoutRef = (0, import_react6.useRef)();
|
|
2157
2146
|
const initialValueRef = (0, import_react6.useRef)(initialValue);
|
|
2158
2147
|
const toggleValue = (timeout) => {
|
|
2159
2148
|
clearTimeout(timeoutRef.current);
|
|
@@ -2519,8 +2508,8 @@ var isEventTargetSupported = (eventTarget) => (
|
|
|
2519
2508
|
Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener)
|
|
2520
2509
|
);
|
|
2521
2510
|
var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
2522
|
-
const savedEventHandler = (0, import_react12.useRef)(
|
|
2523
|
-
const savedEventOptions = (0, import_react12.useRef)(
|
|
2511
|
+
const savedEventHandler = (0, import_react12.useRef)();
|
|
2512
|
+
const savedEventOptions = (0, import_react12.useRef)();
|
|
2524
2513
|
(0, import_react12.useEffect)(() => {
|
|
2525
2514
|
savedEventHandler.current = eventHandler;
|
|
2526
2515
|
}, [eventHandler]);
|
|
@@ -2713,7 +2702,7 @@ var useOnClickOutside = (ref, handler, eventTypes = ["mousedown", "touchend"]) =
|
|
|
2713
2702
|
// src/hooks/usePreviousValue/usePreviousValue.ts
|
|
2714
2703
|
var import_react18 = require("react");
|
|
2715
2704
|
var usePreviousValue = (value) => {
|
|
2716
|
-
const ref = (0, import_react18.useRef)(
|
|
2705
|
+
const ref = (0, import_react18.useRef)();
|
|
2717
2706
|
(0, import_react18.useEffect)(() => {
|
|
2718
2707
|
ref.current = value;
|
|
2719
2708
|
});
|
|
@@ -9638,7 +9627,7 @@ var StyledTrigger = (0, import_styled_components45.default)(import_react_collaps
|
|
|
9638
9627
|
}
|
|
9639
9628
|
`;
|
|
9640
9629
|
var CollapsibleTrigger = ({ children }) => {
|
|
9641
|
-
|
|
9630
|
+
import_react40.Children.only(children);
|
|
9642
9631
|
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(StyledTrigger, { asChild: true, children });
|
|
9643
9632
|
};
|
|
9644
9633
|
|
|
@@ -13115,7 +13104,7 @@ var FormField = ({
|
|
|
13115
13104
|
"aria-invalid": (0, import_type_guards39.isNotNil)(error)
|
|
13116
13105
|
};
|
|
13117
13106
|
}
|
|
13118
|
-
|
|
13107
|
+
import_react59.Children.only(children);
|
|
13119
13108
|
return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
|
|
13120
13109
|
StyledFormField,
|
|
13121
13110
|
{
|
|
@@ -16384,12 +16373,16 @@ var getCoverProps = (viewerWidth, viewerHeight, scaledWidth, scaledHeight) => {
|
|
|
16384
16373
|
left
|
|
16385
16374
|
};
|
|
16386
16375
|
};
|
|
16387
|
-
var getFramePosition = (frameIndex, framesPerRow, width, height, scaleFactor) => {
|
|
16376
|
+
var getFramePosition = (frameIndex, framesPerRow, width, height, scaleFactor, frameCount, targetHeight) => {
|
|
16388
16377
|
const col = frameIndex % framesPerRow;
|
|
16389
16378
|
const row = Math.floor(frameIndex / framesPerRow);
|
|
16390
16379
|
const imageX = -width * col * scaleFactor;
|
|
16391
16380
|
const imageY = -height * row * scaleFactor;
|
|
16392
|
-
|
|
16381
|
+
const rows = Math.ceil(frameCount / framesPerRow);
|
|
16382
|
+
const frameHeightInStoryboard = height / rows;
|
|
16383
|
+
const verticalCenterOffset = (targetHeight - frameHeightInStoryboard) / 2;
|
|
16384
|
+
const adjustedY = imageY - verticalCenterOffset;
|
|
16385
|
+
return `${imageX}px ${adjustedY}px`;
|
|
16393
16386
|
};
|
|
16394
16387
|
var ThumbnailStoryboardViewer = ({
|
|
16395
16388
|
storyboardUrl,
|
|
@@ -16400,6 +16393,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16400
16393
|
frameCount,
|
|
16401
16394
|
percent,
|
|
16402
16395
|
targetWidth = 200,
|
|
16396
|
+
targetHeight,
|
|
16403
16397
|
targetAspectRatio,
|
|
16404
16398
|
scaleFactor = 1,
|
|
16405
16399
|
framesPerRow = 10,
|
|
@@ -16408,10 +16402,11 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16408
16402
|
}) => {
|
|
16409
16403
|
const originalAspectRatio = frameWidth / frameHeight;
|
|
16410
16404
|
const effectiveTargetAspectRatio = targetAspectRatio ?? originalAspectRatio;
|
|
16411
|
-
const
|
|
16405
|
+
const calculatedHeight = targetWidth / effectiveTargetAspectRatio;
|
|
16406
|
+
const finalHeight = targetHeight ?? calculatedHeight;
|
|
16412
16407
|
const viewerDimensions = {
|
|
16413
16408
|
viewerWidth: targetWidth,
|
|
16414
|
-
viewerHeight:
|
|
16409
|
+
viewerHeight: finalHeight
|
|
16415
16410
|
};
|
|
16416
16411
|
const { scaledHeight, scaledWidth } = getScaledDimensions(
|
|
16417
16412
|
originalAspectRatio,
|
|
@@ -16431,7 +16426,9 @@ var ThumbnailStoryboardViewer = ({
|
|
|
16431
16426
|
framesPerRow,
|
|
16432
16427
|
coverProps.width,
|
|
16433
16428
|
coverProps.height,
|
|
16434
|
-
scaleFactor
|
|
16429
|
+
scaleFactor,
|
|
16430
|
+
frameCount,
|
|
16431
|
+
calculatedHeight
|
|
16435
16432
|
);
|
|
16436
16433
|
const scaleFactorFromAspectRatioFit = coverProps.height / frameHeight;
|
|
16437
16434
|
const scaledStoryboardWidth = storyboardWidth * scaleFactorFromAspectRatioFit * scaleFactor;
|
|
@@ -17046,7 +17043,7 @@ var DataList = ({
|
|
|
17046
17043
|
DataList.displayName = "DataList_UI";
|
|
17047
17044
|
|
|
17048
17045
|
// src/components/DataList/DataListItem.tsx
|
|
17049
|
-
var DataListItem =
|
|
17046
|
+
var DataListItem = ({ children }) => {
|
|
17050
17047
|
return children;
|
|
17051
17048
|
};
|
|
17052
17049
|
DataListItem.displayName = "DataListItem_UI";
|