@wistia/vhs 2.60.1 → 2.61.0

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.
@@ -0,0 +1,31 @@
1
+ import type { JSX, ComponentPropsWithoutRef } from 'react';
2
+ export type AvatarInstanceType = 'image' | 'initials';
3
+ export type AvatarProps = ComponentPropsWithoutRef<'div'> & {
4
+ /**
5
+ * The height and width of the avatar
6
+ */
7
+ heightAndWidth?: number;
8
+ /**
9
+ * The URL of the image to display
10
+ */
11
+ imageUrl?: string | null;
12
+ /**
13
+ * Initials to display if no image is provided
14
+ *
15
+ * _note: only first initial shown regardless of characters provided_
16
+ */
17
+ initials?: string | null;
18
+ /**
19
+ * A string that will deterministicly set the background color of the avatar
20
+ */
21
+ name?: string | null;
22
+ /**
23
+ * A callback that is invoked after the image has loaded or failed to load
24
+ */
25
+ onImageLoad?: (avatarType: AvatarInstanceType) => void;
26
+ };
27
+ export declare const Avatar: {
28
+ ({ imageUrl, heightAndWidth, initials, name, onImageLoad, ...otherProps }: AvatarProps): JSX.Element;
29
+ displayName: string;
30
+ };
31
+ //# sourceMappingURL=Avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAQ3D,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,UAAU,CAAC;AAatD,MAAM,MAAM,WAAW,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC1D;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACxD,CAAC;AAwDF,eAAO,MAAM,MAAM;+EAOhB,WAAW,GAAG,GAAG,CAAC,OAAO;;CAiD3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const formatInitialsForDisplay: (initials: string | null | undefined) => string;
2
+ //# sourceMappingURL=formatInitialsForDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatInitialsForDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/formatInitialsForDisplay.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,wBAAwB,aAAc,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAkB9E,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Given an ID this function will return a semi-random color from AVATAR_COLORS
3
+ * that will persist across page loads if given the same ID value
4
+ *
5
+ * Logic for generating a random number from the ID value adapted from:
6
+ * https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0
7
+ */
8
+ type UseContactAvatarColorProps = {
9
+ seed: string;
10
+ themeColors: Record<string, string>;
11
+ };
12
+ export declare const generateContactAvatarColors: ({ seed, themeColors, }: UseContactAvatarColorProps) => string[];
13
+ export {};
14
+ //# sourceMappingURL=generateContactAvatarColors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateContactAvatarColors.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/generateContactAvatarColors.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC;AAiBF,eAAO,MAAM,2BAA2B,2BAGrC,0BAA0B,KAAG,MAAM,EAOrC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { AvatarProps, AvatarInstanceType } from './Avatar';
2
+ export { Avatar } from './Avatar';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -11,7 +11,7 @@ type IconThumbnailProps = {
11
11
  */
12
12
  thumbnailUrl?: never;
13
13
  /**
14
- * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image
14
+ * The type of {@link https://wistia.github.io/vhs/?path=/docs/components-icon--docs Icon} to use in place of a thumbnail image
15
15
  */
16
16
  icon: IconNameType;
17
17
  /**