@wistia/vhs 2.48.2 → 2.48.3

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.
@@ -2,13 +2,15 @@ import type { ComponentPropsWithoutRef } from 'react';
2
2
  type ComponentPropsWithoutRefWithoutDefaultValue = Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'onChange'>;
3
3
  export type SliderProps = ComponentPropsWithoutRefWithoutDefaultValue & {
4
4
  /**
5
- * aria-label for screen-readers to apply to the thumbs. Use an array for more than one thumb. The length of the array must match the number of thumbs in the value array.
5
+ * aria-label for screen-readers to apply to the thumbs. Use an array for more than one thumb.
6
+ * The length of the array must match the number of thumbs in the value array.
6
7
  */
7
- ariaLabel?: string[] | string;
8
+ ariaLabel?: string[] | string | undefined;
8
9
  /**
9
- * aria-labelledby for screen-readers to apply to the thumbs. Used when slider rendered with separate label. Use an array for more than one thumb. The length of the array must match the number of thumbs in the value array.
10
+ * aria-labelledby for screen-readers to apply to the thumbs. Used when slider rendered with separate label.
11
+ * Use an array for more than one thumb. The length of the array must match the number of thumbs in the value array.
10
12
  */
11
- ariaLabelledby?: string[] | string;
13
+ ariaLabelledby?: string[] | string | undefined;
12
14
  /**
13
15
  *
14
16
  */
@@ -18,11 +20,16 @@ export type SliderProps = ComponentPropsWithoutRefWithoutDefaultValue & {
18
20
  */
19
21
  'data-testid'?: string;
20
22
  /**
21
- *Determines the initial positions of the thumbs and the number of thumbs.
22
-
23
- *If a number is passed a slider with one thumb will be rendered. If an array is passed each value will determine the position of one thumb. The values in the array must be sorted.
23
+ * Determines the initial position(s) of the thumb(s) and the number of thumbs.
24
+ *
25
+ * If a number is passed a slider with one thumb will be rendered.
26
+ * If an array is passed each value will determine the position of one thumb.
27
+ * The values in the array must be sorted.
28
+ *
29
+ * Don't pass a default value if the slider is controlled (i.e. if you already
30
+ * use the `value` prop).
24
31
  */
25
- defaultValue?: number[] | number;
32
+ defaultValue?: number[] | number | undefined;
26
33
  /**
27
34
  * If `true` the thumbs can't be moved.
28
35
  */
@@ -36,11 +43,13 @@ export type SliderProps = ComponentPropsWithoutRefWithoutDefaultValue & {
36
43
  */
37
44
  min?: number;
38
45
  /**
39
- * Callback called on every value change. The function will be called with two arguments, the first being the new value(s) the second being thumb index. **It does not return an event.**
46
+ * Callback called on every value change. The function will be called with two arguments,
47
+ * the first being the new value(s) the second being thumb index. **It does not return an event.**
40
48
  */
41
49
  onChange?: (value: number, index?: number) => unknown;
42
50
  /**
43
- * Value to be added or subtracted on each step the slider makes. Must be greater than zero. max - min should be evenly divisible by the step value.
51
+ * Value to be added or subtracted on each step the slider makes. Must be greater than zero.
52
+ * max - min should be evenly divisible by the step value.
44
53
  */
45
54
  step?: number;
46
55
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AA8EtD,KAAK,2CAA2C,GAAG,IAAI,CACrD,wBAAwB,CAAC,KAAK,CAAC,EAC/B,cAAc,GAAG,UAAU,CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,2CAA2C,GAAG;IACtE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,CAAC;IACvE;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC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b;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;IACtD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,MAAM;4JAahB,WAAW,GAAG,WAAW;;CAmE3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/vhs",
3
- "version": "2.48.2",
3
+ "version": "2.48.3",
4
4
  "packageManager": "yarn@4.1.1",
5
5
  "description": "Visual Hype System",
6
6
  "type": "commonjs",
@@ -106,9 +106,12 @@
106
106
  "@testing-library/user-event": "^14.5.2",
107
107
  "@types/node": "^20.12.7",
108
108
  "@types/react": "18.2.21",
109
+ "@types/react-aria-live": "^2.0.6",
109
110
  "@types/react-dom": "^18.2.24",
111
+ "@types/react-slider": "^1.3.6",
110
112
  "@types/react-transition-group": "^4.4.10",
111
113
  "@types/styled-components": "^5.1.34",
114
+ "@types/throttle-debounce": "^5.0.2",
112
115
  "@types/uuid": "^9.0.8",
113
116
  "@vitejs/plugin-react": "^4.2.1",
114
117
  "@vitest/coverage-istanbul": "^1.4.0",