@wistia/vhs 4.0.0-beta.bf1fe785.cd2d6ec → 4.0.0-beta.d0fdacea.2b9bb3b
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 +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -18
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as styled_components from 'styled-components';
|
|
|
2
2
|
import { css, DefaultTheme } from 'styled-components';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import { JSX, ReactNode, ComponentPropsWithoutRef, Dispatch, SetStateAction, RefObject, MutableRefObject, MouseEvent, ComponentPropsWithRef, ChangeEvent, ElementType, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent as KeyboardEvent$1, ReactElement, ComponentType, PropsWithChildren } from 'react';
|
|
5
|
+
import { JSX, ReactNode, ComponentPropsWithoutRef, Dispatch, SetStateAction, RefObject, MutableRefObject, MouseEvent, ComponentPropsWithRef, ChangeEvent, ElementType, Ref, ComponentClass, ComponentProps, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent as KeyboardEvent$1, ReactElement, ComponentType, PropsWithChildren } from 'react';
|
|
6
6
|
import { FormikProps, FormikHelpers, FormikErrors, Field } from 'formik';
|
|
7
7
|
export { useFormikContext } from 'formik';
|
|
8
8
|
import { DropdownMenuProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps } from '@radix-ui/react-dropdown-menu';
|
|
@@ -547,7 +547,7 @@ type Rect = {
|
|
|
547
547
|
x: number;
|
|
548
548
|
y: number;
|
|
549
549
|
};
|
|
550
|
-
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T
|
|
550
|
+
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T>, Rect];
|
|
551
551
|
|
|
552
552
|
type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
553
553
|
type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
@@ -555,7 +555,7 @@ declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListener
|
|
|
555
555
|
|
|
556
556
|
type UseFocusTrapOptions = {
|
|
557
557
|
disableAriaHider?: boolean;
|
|
558
|
-
focusSelector?: HTMLElement | RefObject<HTMLElement
|
|
558
|
+
focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
|
|
559
559
|
};
|
|
560
560
|
declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
|
|
561
561
|
|
|
@@ -1786,7 +1786,7 @@ type FormProps = {
|
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Ref to access the form's state and API
|
|
1788
1788
|
*/
|
|
1789
|
-
innerRef?:
|
|
1789
|
+
innerRef?: Ref<FormState>;
|
|
1790
1790
|
/**
|
|
1791
1791
|
* On-submit callback
|
|
1792
1792
|
*/
|
|
@@ -1886,7 +1886,7 @@ type FormFieldProps = Omit<ComponentPropsWithRef<'input'>, 'placeholder'> & {
|
|
|
1886
1886
|
/**
|
|
1887
1887
|
* A custom component that acts as a field and that needs access to Formik fields
|
|
1888
1888
|
*/
|
|
1889
|
-
customComponent?:
|
|
1889
|
+
customComponent?: ComponentClass<CustomComponentClass> | ((arg?: ComponentProps<typeof Field>) => ReactNode) | ((arg?: Record<string, unknown>) => ReactNode) | undefined;
|
|
1890
1890
|
/**
|
|
1891
1891
|
* Should the radio buttons be displayed vertically as a column or horizontally as a row
|
|
1892
1892
|
*/
|
|
@@ -2532,7 +2532,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2532
2532
|
/**
|
|
2533
2533
|
* Ref to the element that should receive focus when the modal opens
|
|
2534
2534
|
*/
|
|
2535
|
-
initialFocusRef?: RefObject<HTMLElement
|
|
2535
|
+
initialFocusRef?: RefObject<HTMLElement>;
|
|
2536
2536
|
/**
|
|
2537
2537
|
* Whether or not the modal is open, and should be rendered
|
|
2538
2538
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as styled_components from 'styled-components';
|
|
|
2
2
|
import { css, DefaultTheme } from 'styled-components';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import { JSX, ReactNode, ComponentPropsWithoutRef, Dispatch, SetStateAction, RefObject, MutableRefObject, MouseEvent, ComponentPropsWithRef, ChangeEvent, ElementType, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent as KeyboardEvent$1, ReactElement, ComponentType, PropsWithChildren } from 'react';
|
|
5
|
+
import { JSX, ReactNode, ComponentPropsWithoutRef, Dispatch, SetStateAction, RefObject, MutableRefObject, MouseEvent, ComponentPropsWithRef, ChangeEvent, ElementType, Ref, ComponentClass, ComponentProps, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent as KeyboardEvent$1, ReactElement, ComponentType, PropsWithChildren } from 'react';
|
|
6
6
|
import { FormikProps, FormikHelpers, FormikErrors, Field } from 'formik';
|
|
7
7
|
export { useFormikContext } from 'formik';
|
|
8
8
|
import { DropdownMenuProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioItemProps } from '@radix-ui/react-dropdown-menu';
|
|
@@ -547,7 +547,7 @@ type Rect = {
|
|
|
547
547
|
x: number;
|
|
548
548
|
y: number;
|
|
549
549
|
};
|
|
550
|
-
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T
|
|
550
|
+
declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T>, Rect];
|
|
551
551
|
|
|
552
552
|
type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
553
553
|
type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
|
|
@@ -555,7 +555,7 @@ declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListener
|
|
|
555
555
|
|
|
556
556
|
type UseFocusTrapOptions = {
|
|
557
557
|
disableAriaHider?: boolean;
|
|
558
|
-
focusSelector?: HTMLElement | RefObject<HTMLElement
|
|
558
|
+
focusSelector?: HTMLElement | RefObject<HTMLElement> | string | null | undefined;
|
|
559
559
|
};
|
|
560
560
|
declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
|
|
561
561
|
|
|
@@ -1786,7 +1786,7 @@ type FormProps = {
|
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Ref to access the form's state and API
|
|
1788
1788
|
*/
|
|
1789
|
-
innerRef?:
|
|
1789
|
+
innerRef?: Ref<FormState>;
|
|
1790
1790
|
/**
|
|
1791
1791
|
* On-submit callback
|
|
1792
1792
|
*/
|
|
@@ -1886,7 +1886,7 @@ type FormFieldProps = Omit<ComponentPropsWithRef<'input'>, 'placeholder'> & {
|
|
|
1886
1886
|
/**
|
|
1887
1887
|
* A custom component that acts as a field and that needs access to Formik fields
|
|
1888
1888
|
*/
|
|
1889
|
-
customComponent?:
|
|
1889
|
+
customComponent?: ComponentClass<CustomComponentClass> | ((arg?: ComponentProps<typeof Field>) => ReactNode) | ((arg?: Record<string, unknown>) => ReactNode) | undefined;
|
|
1890
1890
|
/**
|
|
1891
1891
|
* Should the radio buttons be displayed vertically as a column or horizontally as a row
|
|
1892
1892
|
*/
|
|
@@ -2532,7 +2532,7 @@ type ModalProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2532
2532
|
/**
|
|
2533
2533
|
* Ref to the element that should receive focus when the modal opens
|
|
2534
2534
|
*/
|
|
2535
|
-
initialFocusRef?: RefObject<HTMLElement
|
|
2535
|
+
initialFocusRef?: RefObject<HTMLElement>;
|
|
2536
2536
|
/**
|
|
2537
2537
|
* Whether or not the modal is open, and should be rendered
|
|
2538
2538
|
*/
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/vhs v4.0.0-beta.
|
|
3
|
+
* @license @wistia/vhs v4.0.0-beta.d0fdacea.2b9bb3b
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2021-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -3937,7 +3937,7 @@ import { useCallback as useCallback5 } from "react";
|
|
|
3937
3937
|
import { useEffect as useEffect2, useRef as useRef2, useState as useState5 } from "react";
|
|
3938
3938
|
var useTimedToggle = (initialValue) => {
|
|
3939
3939
|
const [value, setValue] = useState5(false);
|
|
3940
|
-
const timeoutRef = useRef2(
|
|
3940
|
+
const timeoutRef = useRef2();
|
|
3941
3941
|
const initialValueRef = useRef2(initialValue);
|
|
3942
3942
|
const toggleValue = (timeout2) => {
|
|
3943
3943
|
clearTimeout(timeoutRef.current);
|
|
@@ -4010,8 +4010,8 @@ var isEventTargetSupported = (eventTarget) => (
|
|
|
4010
4010
|
Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener)
|
|
4011
4011
|
);
|
|
4012
4012
|
var useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
4013
|
-
const savedEventHandler = useRef4(
|
|
4014
|
-
const savedEventOptions = useRef4(
|
|
4013
|
+
const savedEventHandler = useRef4();
|
|
4014
|
+
const savedEventOptions = useRef4();
|
|
4015
4015
|
useEffect3(() => {
|
|
4016
4016
|
savedEventHandler.current = eventHandler;
|
|
4017
4017
|
}, [eventHandler]);
|
|
@@ -4448,7 +4448,7 @@ var usePreventScroll = (locked) => {
|
|
|
4448
4448
|
// src/hooks/usePreviousValue/usePreviousValue.ts
|
|
4449
4449
|
import { useEffect as useEffect7, useRef as useRef7 } from "react";
|
|
4450
4450
|
var usePreviousValue = (value) => {
|
|
4451
|
-
const ref = useRef7(
|
|
4451
|
+
const ref = useRef7();
|
|
4452
4452
|
useEffect7(() => {
|
|
4453
4453
|
ref.current = value;
|
|
4454
4454
|
});
|
|
@@ -4545,7 +4545,7 @@ var ModalBaseContent = ({
|
|
|
4545
4545
|
const wasJustShown = usePreviousValue(isShown);
|
|
4546
4546
|
const hide = () => setIsShownAttempted(false);
|
|
4547
4547
|
const show = useCallback8(() => setIsShownAttempted(true), []);
|
|
4548
|
-
const toggleButtonRef = useRef8(
|
|
4548
|
+
const toggleButtonRef = useRef8();
|
|
4549
4549
|
const modalEl = document.createElement("div");
|
|
4550
4550
|
modalEl.classList.add("Modal");
|
|
4551
4551
|
if (isNotUndefined2(className)) {
|
|
@@ -7555,7 +7555,7 @@ import { useEffect as useEffect13 } from "react";
|
|
|
7555
7555
|
import { useCallback as useCallback10, useEffect as useEffect12, useRef as useRef10 } from "react";
|
|
7556
7556
|
var useTimeoutFunc = (func, timeout2 = 0) => {
|
|
7557
7557
|
const readyRef = useRef10(false);
|
|
7558
|
-
const timeoutRef = useRef10(
|
|
7558
|
+
const timeoutRef = useRef10();
|
|
7559
7559
|
const callbackRef = useRef10(func);
|
|
7560
7560
|
const isReady = useCallback10(() => readyRef.current, []);
|
|
7561
7561
|
const set = useCallback10(() => {
|
|
@@ -11307,7 +11307,7 @@ var Menu2 = forwardRef16(
|
|
|
11307
11307
|
onClose,
|
|
11308
11308
|
...otherProps
|
|
11309
11309
|
}, ref) => {
|
|
11310
|
-
const menuRef = useRef12(
|
|
11310
|
+
const menuRef = useRef12();
|
|
11311
11311
|
const onClickOutsideFn = isNotNil32(onClickOutside) ? onClickOutside : () => {
|
|
11312
11312
|
};
|
|
11313
11313
|
useOnClickOutside(menuRef, onClickOutsideFn);
|