@stream-io/video-react-sdk 1.18.6 → 1.18.7
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/CHANGELOG.md +12 -0
- package/dist/css/styles.css +4 -4
- package/dist/css/styles.css.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/Button/CompositeButton.d.ts +2 -2
- package/package.json +4 -4
- package/src/components/Button/CompositeButton.tsx +2 -2
- package/src/components/CallControls/ToggleAudioButton.tsx +9 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ToggleMenuButtonProps } from '../Menu';
|
|
2
|
-
import { ComponentProps, ComponentType,
|
|
2
|
+
import { ComponentProps, ComponentType, PropsWithChildren, ReactElement } from 'react';
|
|
3
3
|
import { Placement } from '@floating-ui/react';
|
|
4
4
|
export type IconButtonWithMenuProps<E extends HTMLElement = HTMLButtonElement> = PropsWithChildren<{
|
|
5
5
|
active?: boolean;
|
|
6
|
-
Menu?: ComponentType |
|
|
6
|
+
Menu?: ComponentType | ReactElement | null;
|
|
7
7
|
caption?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
menuPlacement?: Placement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-react-sdk",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.7",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@floating-ui/react": "^0.27.6",
|
|
33
|
-
"@stream-io/video-client": "1.25.
|
|
33
|
+
"@stream-io/video-client": "1.25.1",
|
|
34
34
|
"@stream-io/video-filters-web": "0.2.1",
|
|
35
|
-
"@stream-io/video-react-bindings": "1.7.
|
|
35
|
+
"@stream-io/video-react-bindings": "1.7.2",
|
|
36
36
|
"chart.js": "^4.4.4",
|
|
37
37
|
"clsx": "^2.0.0",
|
|
38
38
|
"react-chartjs-2": "^5.3.0"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@rollup/plugin-replace": "^6.0.2",
|
|
47
47
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
48
48
|
"@stream-io/audio-filters-web": "^0.4.2",
|
|
49
|
-
"@stream-io/video-styling": "^1.2.
|
|
49
|
+
"@stream-io/video-styling": "^1.2.1",
|
|
50
50
|
"@types/react": "^19.1.3",
|
|
51
51
|
"@types/react-dom": "^19.1.3",
|
|
52
52
|
"react": "19.0.0",
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
ComponentProps,
|
|
5
5
|
ComponentType,
|
|
6
6
|
forwardRef,
|
|
7
|
-
JSX,
|
|
8
7
|
PropsWithChildren,
|
|
8
|
+
ReactElement,
|
|
9
9
|
} from 'react';
|
|
10
10
|
import { Placement } from '@floating-ui/react';
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ import { isComponentType } from '../../utilities';
|
|
|
15
15
|
export type IconButtonWithMenuProps<E extends HTMLElement = HTMLButtonElement> =
|
|
16
16
|
PropsWithChildren<{
|
|
17
17
|
active?: boolean;
|
|
18
|
-
Menu?: ComponentType |
|
|
18
|
+
Menu?: ComponentType | ReactElement | null;
|
|
19
19
|
caption?: string;
|
|
20
20
|
className?: string;
|
|
21
21
|
menuPlacement?: Placement;
|
|
@@ -27,7 +27,13 @@ export type ToggleAudioPreviewButtonProps = PropsWithErrorHandler<
|
|
|
27
27
|
export const ToggleAudioPreviewButton = (
|
|
28
28
|
props: ToggleAudioPreviewButtonProps,
|
|
29
29
|
) => {
|
|
30
|
-
const {
|
|
30
|
+
const {
|
|
31
|
+
caption,
|
|
32
|
+
Menu = DeviceSelectorAudioInput,
|
|
33
|
+
menuPlacement = 'top',
|
|
34
|
+
onMenuToggle,
|
|
35
|
+
...restCompositeButtonProps
|
|
36
|
+
} = props;
|
|
31
37
|
const { t } = useI18n();
|
|
32
38
|
const { useMicrophoneState } = useCallStateHooks();
|
|
33
39
|
const {
|
|
@@ -64,6 +70,8 @@ export const ToggleAudioPreviewButton = (
|
|
|
64
70
|
: 'preview-audio-mute-button'
|
|
65
71
|
}
|
|
66
72
|
onClick={handleClick}
|
|
73
|
+
Menu={Menu}
|
|
74
|
+
menuPlacement={menuPlacement}
|
|
67
75
|
{...restCompositeButtonProps}
|
|
68
76
|
onMenuToggle={(shown) => {
|
|
69
77
|
setTooltipDisabled(shown);
|