react-peer-chat 0.3.8 → 0.3.10
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/build/icons.d.ts +6 -5
- package/build/index.d.ts +18 -16
- package/build/styles.css +2 -2
- package/package.json +1 -1
package/build/icons.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
2
|
+
export type IconProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
|
|
3
|
+
export declare function BiSolidMessageDetail(props: IconProps): React.JSX.Element;
|
|
4
|
+
export declare function BiSolidMessageX(props: IconProps): React.JSX.Element;
|
|
5
|
+
export declare function GrSend(props: IconProps): React.JSX.Element;
|
|
6
|
+
export declare function BsFillMicFill(props: IconProps): React.JSX.Element;
|
|
7
|
+
export declare function BsFillMicMuteFill(props: IconProps): React.JSX.Element;
|
package/build/index.d.ts
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import React, { CSSProperties, DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { PeerOptions } from 'peerjs';
|
|
3
|
-
type
|
|
2
|
+
import { PeerOptions as ImportedPeerOptions } from 'peerjs';
|
|
3
|
+
export type PeerOptions = ImportedPeerOptions;
|
|
4
|
+
export type DialogPosition = 'left' | 'center' | 'right';
|
|
5
|
+
export interface DialogOptions {
|
|
6
|
+
position?: DialogPosition;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
export interface Message {
|
|
4
10
|
id: string;
|
|
5
11
|
text: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
12
|
+
}
|
|
13
|
+
export interface ChildrenOptions {
|
|
8
14
|
remotePeerName?: string;
|
|
9
15
|
messages?: Message[];
|
|
10
16
|
addMessage?: (message: Message, sendToRemotePeer?: boolean) => void;
|
|
11
17
|
audio?: boolean;
|
|
12
18
|
setAudio?: (audio: boolean) => void;
|
|
13
|
-
}
|
|
14
|
-
type
|
|
15
|
-
type
|
|
16
|
-
|
|
17
|
-
style: CSSProperties;
|
|
18
|
-
};
|
|
19
|
-
type Props = {
|
|
19
|
+
}
|
|
20
|
+
export type Children = (childrenOptions: ChildrenOptions) => ReactNode;
|
|
21
|
+
export type Props = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
22
|
+
export interface ChatProps {
|
|
20
23
|
name?: string;
|
|
21
24
|
peerId: string;
|
|
22
25
|
remotePeerId?: string;
|
|
@@ -25,9 +28,8 @@ type Props = {
|
|
|
25
28
|
peerOptions?: PeerOptions;
|
|
26
29
|
dialogOptions?: DialogOptions;
|
|
27
30
|
onError?: Function;
|
|
28
|
-
children?:
|
|
29
|
-
props?:
|
|
30
|
-
}
|
|
31
|
-
export default function Chat({ name, peerId, remotePeerId, peerOptions, text, voice, dialogOptions, onError, children, props }:
|
|
31
|
+
children?: Children;
|
|
32
|
+
props?: Props;
|
|
33
|
+
}
|
|
34
|
+
export default function Chat({ name, peerId, remotePeerId, peerOptions, text, voice, dialogOptions, onError, children, props }: ChatProps): React.JSX.Element;
|
|
32
35
|
export declare const clearChat: () => void;
|
|
33
|
-
export {};
|
package/build/styles.css
CHANGED