@wistia/vhs 5.0.0 → 5.0.1-beta.1a5d434d.9b8af84

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.d.ts CHANGED
@@ -2,9 +2,8 @@ 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, Ref, ComponentClass, ComponentProps, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent as KeyboardEvent$1, ReactElement, ComponentType, PropsWithChildren } from 'react';
5
+ import { JSX, ReactNode, ComponentPropsWithoutRef, RefObject, MouseEvent, ComponentPropsWithRef, ChangeEvent, ElementType, Ref, ComponentClass, ComponentProps, FocusEvent, HTMLInputTypeAttribute, KeyboardEvent, ReactElement, ComponentType, PropsWithChildren } from 'react';
6
6
  import { FormikProps, FormikHelpers, FormikErrors, Field } from 'formik';
7
- export { useFormikContext } from 'formik';
8
7
  import { BaseEditor, Descendant } from 'slate';
9
8
  import { ReactEditor } from 'slate-react';
10
9
  import { HistoryEditor } from 'slate-history';
@@ -527,93 +526,6 @@ type VHSProviderProps = {
527
526
  };
528
527
  declare const VHSProvider: ({ children, theme, globalStylesIncluded, skipAnimations, Link, }: VHSProviderProps) => react_jsx_runtime.JSX.Element;
529
528
 
530
- type UseBooleanReturn = [
531
- boolean,
532
- () => void,
533
- () => void,
534
- () => void,
535
- Dispatch<SetStateAction<boolean>>
536
- ];
537
- declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
538
-
539
- declare const useClipboard: (textToCopy: string, timeout?: number) => [() => Promise<void>, boolean, boolean];
540
-
541
- type Rect = {
542
- width: number;
543
- height: number;
544
- top: number;
545
- left: number;
546
- bottom: number;
547
- right: number;
548
- x: number;
549
- y: number;
550
- };
551
- declare const useElementObserver: <T extends HTMLElement>() => [RefObject<T | null>, Rect];
552
-
553
- type AddEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
554
- type RemoveEventListenerType = (type: string, listener: (evt: Event) => void, options?: AddEventListenerOptions | boolean) => void;
555
- declare const useEvent: <T extends Event>(eventName: Parameters<AddEventListenerType>[0], eventHandler: (event: T) => unknown, eventTarget?: unknown, eventOptions?: Parameters<RemoveEventListenerType>[2]) => void;
556
-
557
- type UseFocusTrapOptions = {
558
- disableAriaHider?: boolean;
559
- focusSelector?: HTMLElement | RefObject<HTMLElement | null> | string | null | undefined;
560
- };
561
- declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) => (node: HTMLElement | null | undefined) => void;
562
-
563
- declare const useForceUpdate: () => (() => void);
564
-
565
- type HoverProps = {
566
- onFocus: () => void;
567
- onMouseEnter: () => void;
568
- onBlur: () => void;
569
- onMouseLeave: () => void;
570
- onMouseMove?: () => void;
571
- };
572
- declare const useIsHovered: () => [boolean, HoverProps, (hovered: boolean) => void];
573
-
574
- type KeyFilterPredicate = (evt: KeyboardEvent) => boolean;
575
- type KeyFilter = KeyFilterPredicate | boolean | string | null | undefined;
576
- type EventHandler = (event: KeyboardEvent) => unknown;
577
- type UseKeyOptions = {
578
- eventName?: string;
579
- eventTarget?: Parameters<typeof useEvent>[2];
580
- eventOptions?: Parameters<typeof useEvent>[3];
581
- };
582
- declare const useKey: (key: KeyFilter, eventHandler: EventHandler, options?: UseKeyOptions, dependencies?: unknown[]) => void;
583
-
584
- type KeyPressState = [boolean, KeyboardEvent | null];
585
- declare const useKeyPress: (keyFilter: Parameters<typeof useKey>[0]) => KeyPressState;
586
-
587
- type KeyEventHandler = (keyboardEvent: KeyboardEvent) => unknown;
588
- declare const useKeyPressOnce: (key: Parameters<typeof useKeyPress>[0], keydownHandler?: KeyEventHandler | null | undefined, keyupHandler?: KeyEventHandler | null | undefined) => void;
589
-
590
- type SetItemType = Storage['setItem'];
591
- declare const useLocalStorage: <T, _>(key: Parameters<SetItemType>[0], initialValue: T, storage?: Storage) => [T | undefined, (newValue: T) => void, () => void];
592
-
593
- type AcceptedElementTypes = HTMLElement | JSX.Element | ReactNode;
594
- type AcceptedRefs = MutableRefObject<unknown> | ((element: AcceptedElementTypes) => unknown) | null | undefined;
595
- declare const useMergedRefs: (refs: AcceptedRefs[]) => (element: AcceptedElementTypes) => void;
596
-
597
- type MediaQueryBooleans = {
598
- isXsAndUp: boolean;
599
- isSmAndUp: boolean;
600
- isMdAndUp: boolean;
601
- isLgAndUp: boolean;
602
- isXlAndUp: boolean;
603
- isXsAndDown: boolean;
604
- isSmAndDown: boolean;
605
- isMdAndDown: boolean;
606
- isLgAndDown: boolean;
607
- isXlAndDown: boolean;
608
- };
609
- declare const useMq: () => MediaQueryBooleans;
610
-
611
- declare const useOnClickOutside: (ref: RefObject<HTMLElement | null | undefined>, handler: (event: Event) => unknown) => void;
612
-
613
- declare const usePreventScroll: (locked: boolean) => void;
614
-
615
- declare const usePreviousValue: <T>(value: T) => T | undefined;
616
-
617
529
  declare const useTheme: <T extends DefaultTheme = DefaultTheme>() => T;
618
530
 
619
531
  type ColorKeysFromTheme<Theme extends DefaultTheme = DefaultTheme> = keyof Theme['color'];
@@ -626,11 +538,6 @@ type UseThemeColor = {
626
538
  };
627
539
  declare const useThemeColor: UseThemeColor;
628
540
 
629
- declare const useWindowSize: (interval?: number) => {
630
- width: number;
631
- height: number;
632
- };
633
-
634
541
  type OnBeforeHideInterface = {
635
542
  shouldShowMessage: boolean;
636
543
  message: string;
@@ -2311,7 +2218,7 @@ type LinkButtonProps = ComponentPropsWithoutRef<'button'> & {
2311
2218
  /**
2312
2219
  * Callback function invoked when the button is clicked
2313
2220
  */
2314
- onClick?: (event: KeyboardEvent$1 | MouseEvent) => void;
2221
+ onClick?: (event: KeyboardEvent | MouseEvent) => void;
2315
2222
  /**
2316
2223
  * Will only display an underline when the Link is in a hover state
2317
2224
  */
@@ -2346,7 +2253,7 @@ declare const LinkButton: react.ForwardRefExoticComponent<Omit<react.DetailedHTM
2346
2253
  /**
2347
2254
  * Callback function invoked when the button is clicked
2348
2255
  */
2349
- onClick?: (event: KeyboardEvent$1 | MouseEvent) => void;
2256
+ onClick?: (event: KeyboardEvent | MouseEvent) => void;
2350
2257
  /**
2351
2258
  * Will only display an underline when the Link is in a hover state
2352
2259
  */
@@ -3484,4 +3391,4 @@ declare const WistiaLogo: {
3484
3391
  displayName: string;
3485
3392
  };
3486
3393
 
3487
- export { ActionModal, type ActionModalProps, Avatar, type AvatarInstanceType, type AvatarProps, Backdrop, type BackdropProps, BackgroundImage, type BackgroundImageProps, Badge, type BadgeColorScheme, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, CheckboxMenuItem, type CheckboxMenuItemProps, type CheckboxProps, ClickArea, type ClickAreaProps, CloseButton, type CloseButtonProps, CollapsibleGroup, type CollapsibleGroupProps, Divider, type DividerProps, Ellipsis, type EllipsisProps, FileSelect, type FileSelectProps, Form, FormButtons, type FormButtonsProps, FormField, FormFieldError, type FormFieldErrorProps, type FormFieldProps, FormGlobalError, type FormProps, type FormState, FullScreenModal, type FullScreenModalProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, LabelDescription, type LabelDescriptionProps, type LabelProps, Link, LinkButton, type LinkButtonProps, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Menu, MenuButton, type MenuButtonProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, Modal, ModalBase, type ModalBaseContentProps, ModalBody, ModalCloseButton, type ModalCloseButtonProps, ModalFooter, ModalHeader, type ModalProps, type NodeElementObject, type OnBeforeHideInterface, type OptionsType, Paper, type PaperProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, type RadioGroupProps, RadioMenuItem, type RadioMenuItemProps, type RadioProps, RangeSelector, type RangeSelectorProps, RichTextEditor, type RichTextEditorProps, ScreenReaderOnly, type ScreenReaderOnlyProps, Select, type SelectProps, Slider, type SliderProps, Stack, type StackProps, SubMenu, Switch, type SwitchProps, Text, type TextProps, Thumbnail, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Toast, type ToastProps, ToastProvider, type ToastVariants, Tooltip, type TooltipProps, Truncate, type TruncateProps, VHSProvider, type VHSProviderProps, type VHSTheme, WistiaLogo, type WistiaLogoProps, type WrapperProviderLinkType, copyToClipboard, datetimeHelpers, ellipsisFlexParentStyle, ellipsisStyle, getBackgroundGradient, getSemiRandomBackgroundGradient, iconSizeMap, mq, objectHelpers, rteDeserializeHTML, rteFormatTypes, rteSerializeToHTML, screenReaderOnlyStyle, stringHelpers, useBoolean, useClipboard, useElementObserver, useEvent, useFocusTrap, useForceUpdate, useIsHovered, useKey, useKeyPress, useKeyPressOnce, useLocalStorage, useMergedRefs, useMq, useOnClickOutside, usePreventScroll, usePreviousValue, useTheme, useThemeColor, useToast, useWindowSize };
3394
+ export { ActionModal, type ActionModalProps, Avatar, type AvatarInstanceType, type AvatarProps, Backdrop, type BackdropProps, BackgroundImage, type BackgroundImageProps, Badge, type BadgeColorScheme, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, CheckboxMenuItem, type CheckboxMenuItemProps, type CheckboxProps, ClickArea, type ClickAreaProps, CloseButton, type CloseButtonProps, CollapsibleGroup, type CollapsibleGroupProps, Divider, type DividerProps, Ellipsis, type EllipsisProps, FileSelect, type FileSelectProps, Form, FormButtons, type FormButtonsProps, FormField, FormFieldError, type FormFieldErrorProps, type FormFieldProps, FormGlobalError, type FormProps, type FormState, FullScreenModal, type FullScreenModalProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, LabelDescription, type LabelDescriptionProps, type LabelProps, Link, LinkButton, type LinkButtonProps, type LinkProps, List, ListItem, type ListItemProps, type ListProps, Menu, MenuButton, type MenuButtonProps, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, Modal, ModalBase, type ModalBaseContentProps, ModalBody, ModalCloseButton, type ModalCloseButtonProps, ModalFooter, ModalHeader, type ModalProps, type NodeElementObject, type OnBeforeHideInterface, type OptionsType, Paper, type PaperProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, type RadioGroupProps, RadioMenuItem, type RadioMenuItemProps, type RadioProps, RangeSelector, type RangeSelectorProps, RichTextEditor, type RichTextEditorProps, ScreenReaderOnly, type ScreenReaderOnlyProps, Select, type SelectProps, Slider, type SliderProps, Stack, type StackProps, SubMenu, Switch, type SwitchProps, Text, type TextProps, Thumbnail, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Toast, type ToastProps, ToastProvider, type ToastVariants, Tooltip, type TooltipProps, Truncate, type TruncateProps, VHSProvider, type VHSProviderProps, type VHSTheme, WistiaLogo, type WistiaLogoProps, type WrapperProviderLinkType, copyToClipboard, datetimeHelpers, ellipsisFlexParentStyle, ellipsisStyle, getBackgroundGradient, getSemiRandomBackgroundGradient, iconSizeMap, mq, objectHelpers, rteDeserializeHTML, rteFormatTypes, rteSerializeToHTML, screenReaderOnlyStyle, stringHelpers, useTheme, useThemeColor, useToast };