@wistia/vhs 2.48.1 → 2.48.2-beta.0d2ad1c2.376c350
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 +502 -511
- package/dist/index.cjs.map +4 -4
- package/dist/index.mjs +495 -504
- package/dist/index.mjs.map +4 -4
- package/dist/src/components/Slider/Slider.d.ts +19 -10
- package/dist/src/components/Slider/Slider.d.ts.map +1 -1
- package/dist/src/hooks/useKeyPressOnce/UseKeyPressOnceExample.d.ts.map +1 -1
- package/dist/src/hooks/usePreventScroll/UsePreventScrollExample.d.ts.map +1 -1
- package/dist/src/private/components/HideInVisualRegressionTests/HideInVisualRegressionTests.d.ts.map +1 -0
- package/dist/src/private/components/HideInVisualRegressionTests/index.d.ts +2 -0
- package/dist/src/private/components/HideInVisualRegressionTests/index.d.ts.map +1 -0
- package/dist/src/private/helpers/escapeHtml.d.ts +8 -0
- package/dist/src/private/helpers/escapeHtml.d.ts.map +1 -0
- package/package.json +23 -10
- package/dist/.storybook/components/HideInVisualRegressionTests.d.ts.map +0 -1
- package/dist/.storybook/helpers/getRandomEmoji.d.ts +0 -2
- package/dist/.storybook/helpers/getRandomEmoji.d.ts.map +0 -1
- package/dist/.storybook/helpers/placeholderText.d.ts +0 -8
- package/dist/.storybook/helpers/placeholderText.d.ts.map +0 -1
- /package/dist/{.storybook/components → src/private/components/HideInVisualRegressionTests}/HideInVisualRegressionTests.d.ts +0 -0
|
@@ -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.
|
|
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.
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
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,
|
|
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.
|
|
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;
|
|
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;AAyFtD,KAAK,2CAA2C,GAAG,IAAI,CACrD,wBAAwB,CAAC,KAAK,CAAC,EAC/B,cAAc,GAAG,UAAU,CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,2CAA2C,GAAG;IACtE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C;;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;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseKeyPressOnceExample.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useKeyPressOnce/UseKeyPressOnceExample.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UseKeyPressOnceExample.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useKeyPressOnce/UseKeyPressOnceExample.tsx"],"names":[],"mappings":"AAoDA,eAAO,MAAM,sBAAsB,+CAmClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsePreventScrollExample.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePreventScroll/UsePreventScrollExample.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UsePreventScrollExample.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePreventScroll/UsePreventScrollExample.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,uBAAuB,+CAsBnC,CAAC"}
|
package/dist/src/private/components/HideInVisualRegressionTests/HideInVisualRegressionTests.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HideInVisualRegressionTests.d.ts","sourceRoot":"","sources":["../../../../../src/private/components/HideInVisualRegressionTests/HideInVisualRegressionTests.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,KAAK,gCAAgC,GAAG;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAIF,eAAO,MAAM,2BAA2B,kBAErC,gCAAgC,KAAG,WAOrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/private/components/HideInVisualRegressionTests/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handle special characters by escaping in the provided text string.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} stringToEscape - the string to escape
|
|
5
|
+
* @return {string} - the escaped string
|
|
6
|
+
*/
|
|
7
|
+
export declare const escapeHtml: (stringToEscape: number | string | null | undefined) => string;
|
|
8
|
+
//# sourceMappingURL=escapeHtml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escapeHtml.d.ts","sourceRoot":"","sources":["../../../../src/private/helpers/escapeHtml.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,eAAO,MAAM,UAAU,mBAAoB,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAwC/E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/vhs",
|
|
3
|
-
"version": "2.48.
|
|
3
|
+
"version": "2.48.2-beta.0d2ad1c2.376c350",
|
|
4
4
|
"packageManager": "yarn@4.1.1",
|
|
5
5
|
"description": "Visual Hype System",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -8,11 +8,24 @@
|
|
|
8
8
|
"module": "dist/index.mjs",
|
|
9
9
|
"types": "dist/src/index.d.ts",
|
|
10
10
|
"sideEffects": false,
|
|
11
|
+
"exports": {
|
|
12
|
+
"./package.json": "./package.json",
|
|
13
|
+
".": {
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/src/index.d.ts",
|
|
16
|
+
"default": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/src/index.d.ts",
|
|
20
|
+
"default": "./dist/index.mjs"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
11
24
|
"files": [
|
|
12
25
|
"dist"
|
|
13
26
|
],
|
|
14
27
|
"engines": {
|
|
15
|
-
"node": ">=
|
|
28
|
+
"node": ">=18.0.0 || >=20.0.0"
|
|
16
29
|
},
|
|
17
30
|
"scripts": {
|
|
18
31
|
"browsers": "./scripts/browserSupport.mjs",
|
|
@@ -36,6 +49,7 @@
|
|
|
36
49
|
"lint:style": "stylelint --cache --cache-location .stylelintcache --report-needless-disables \"**/*.tsx\"",
|
|
37
50
|
"outdated": "yarn upgrade-interactive",
|
|
38
51
|
"prepublishOnly": "yarn run build",
|
|
52
|
+
"publint": "publint",
|
|
39
53
|
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider storybook dev --host localhost --port 6006",
|
|
40
54
|
"storybook:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider storybook build --quiet",
|
|
41
55
|
"test": "cross-env NODE_ENV=test vitest run",
|
|
@@ -43,8 +57,7 @@
|
|
|
43
57
|
"test:coverage": "yarn run test --coverage=true && open ./coverage/lcov-report/index.html",
|
|
44
58
|
"test:debug": "echo 'open chrome://inspect/#devices' && cross-env NODE_ENV=test vitest --inspect-brk --no-file-parallelism",
|
|
45
59
|
"ts:check": "tsc",
|
|
46
|
-
"ts:generate": "tsx ./scripts/generateTypes.ts"
|
|
47
|
-
"ts:progress": "node ./scripts/typescriptMigrationProgress.mjs"
|
|
60
|
+
"ts:generate": "tsx ./scripts/generateTypes.ts"
|
|
48
61
|
},
|
|
49
62
|
"peerDependencies": {
|
|
50
63
|
"@types/react": "^17.0 || ^18.0",
|
|
@@ -60,12 +73,11 @@
|
|
|
60
73
|
"@wistia/type-guards": "^0.0.8",
|
|
61
74
|
"@wistia/vhs-design-tokens": "^2.1.0",
|
|
62
75
|
"date-fns": "^3.6.0",
|
|
63
|
-
"escape-html": "^1.0.3",
|
|
64
76
|
"formik": "^2.4.5",
|
|
65
77
|
"is-hotkey": "^0.2.0",
|
|
66
|
-
"lodash.isequal": "^4.5.0",
|
|
67
78
|
"polished": "^4.3.1",
|
|
68
79
|
"react-aria-live": "^2.0.5",
|
|
80
|
+
"react-fast-compare": "^3.2.2",
|
|
69
81
|
"react-is": "^18.2.0",
|
|
70
82
|
"react-slider": "^2.0.6",
|
|
71
83
|
"react-transition-group": "^4.4.5",
|
|
@@ -92,13 +104,14 @@
|
|
|
92
104
|
"@testing-library/jest-dom": "^6.4.2",
|
|
93
105
|
"@testing-library/react": "^15.0.1",
|
|
94
106
|
"@testing-library/user-event": "^14.5.2",
|
|
95
|
-
"@types/escape-html": "^1.0.4",
|
|
96
|
-
"@types/lodash.template": "^4.5.3",
|
|
97
107
|
"@types/node": "^20.12.7",
|
|
98
108
|
"@types/react": "18.2.21",
|
|
109
|
+
"@types/react-aria-live": "^2.0.6",
|
|
99
110
|
"@types/react-dom": "^18.2.24",
|
|
111
|
+
"@types/react-slider": "^1.3.6",
|
|
100
112
|
"@types/react-transition-group": "^4.4.10",
|
|
101
113
|
"@types/styled-components": "^5.1.34",
|
|
114
|
+
"@types/throttle-debounce": "^5.0.2",
|
|
102
115
|
"@types/uuid": "^9.0.8",
|
|
103
116
|
"@vitejs/plugin-react": "^4.2.1",
|
|
104
117
|
"@vitest/coverage-istanbul": "^1.4.0",
|
|
@@ -116,9 +129,9 @@
|
|
|
116
129
|
"globby": "^14.0.1",
|
|
117
130
|
"jsdoc-to-markdown": "^8.0.1",
|
|
118
131
|
"jsdom": "^24.0.0",
|
|
119
|
-
"lodash.camelcase": "^4.3.0",
|
|
120
|
-
"lodash.template": "^4.5.0",
|
|
121
132
|
"minimist": "^1.2.8",
|
|
133
|
+
"pascalcase": "^2.0.0",
|
|
134
|
+
"publint": "^0.2.7",
|
|
122
135
|
"react": "^18.2.0",
|
|
123
136
|
"react-dom": "^18.2.0",
|
|
124
137
|
"shx": "^0.3.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HideInVisualRegressionTests.d.ts","sourceRoot":"","sources":["../../../.storybook/components/HideInVisualRegressionTests.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,KAAK,gCAAgC,GAAG;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAIF,eAAO,MAAM,2BAA2B,kBAErC,gCAAgC,KAAG,WAOrC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getRandomEmoji.d.ts","sourceRoot":"","sources":["../../../.storybook/helpers/getRandomEmoji.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,cAAc,sBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,GAAG,SAO5E,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type dictType = keyof typeof dictionary;
|
|
2
|
-
declare const dictionary: {
|
|
3
|
-
default: string[];
|
|
4
|
-
marketing: string[];
|
|
5
|
-
};
|
|
6
|
-
export declare const placeholderText: (wordCount?: number, dictionaryType?: dictType, addPeriod?: boolean, noSpaces?: boolean) => string;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=placeholderText.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"placeholderText.d.ts","sourceRoot":"","sources":["../../../.storybook/helpers/placeholderText.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,GAAG,MAAM,OAAO,UAAU,CAAC;AAGxC,QAAA,MAAM,UAAU;;;CAGf,CAAC;AAMF,eAAO,MAAM,eAAe,wCAEV,QAAQ,oDAgBzB,CAAC"}
|