react-peer-chat 0.5.3 → 0.5.5

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +8 -8
  2. package/package.json +9 -4
package/dist/index.d.ts CHANGED
@@ -3,27 +3,27 @@ import { PeerOptions as ImportedPeerOptions } from 'peerjs';
3
3
  export type RemotePeerId = string | string[];
4
4
  export type PeerOptions = ImportedPeerOptions;
5
5
  export type DialogPosition = 'left' | 'center' | 'right';
6
- export interface DialogOptions {
6
+ export type DialogOptions = {
7
7
  position?: DialogPosition;
8
8
  style?: CSSProperties;
9
- }
9
+ };
10
10
  export type RemotePeers = {
11
11
  [id: string]: string;
12
12
  };
13
- export interface Message {
13
+ export type Message = {
14
14
  id: string;
15
15
  text: string;
16
- }
17
- export interface ChildrenOptions {
16
+ };
17
+ export type ChildrenOptions = {
18
18
  remotePeers?: RemotePeers;
19
19
  messages?: Message[];
20
20
  addMessage?: (message: Message, sendToRemotePeer?: boolean) => void;
21
21
  audio?: boolean;
22
22
  setAudio?: (audio: boolean) => void;
23
- }
23
+ };
24
24
  export type Children = (childrenOptions: ChildrenOptions) => ReactNode;
25
25
  export type Props = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
26
- export interface ChatProps {
26
+ export type ChatProps = {
27
27
  name?: string;
28
28
  peerId: string;
29
29
  remotePeerId?: RemotePeerId;
@@ -36,7 +36,7 @@ export interface ChatProps {
36
36
  onMicError?: Function;
37
37
  children?: Children;
38
38
  props?: Props;
39
- }
39
+ };
40
40
  export type { IconProps } from './icons.js';
41
41
  export default function Chat({ name, peerId, remotePeerId, peerOptions, text, recoverChat, voice, dialogOptions, onError, onMicError, children, props }: ChatProps): React.JSX.Element;
42
42
  export declare const clearChat: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-peer-chat",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "An easy to use react component for impleting peer-to-peer chatting.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,12 @@
18
18
  "p2p",
19
19
  "peer-to-peer",
20
20
  "webrtc",
21
- "react-peer-chat"
21
+ "react-peer-chat",
22
+ "typescript",
23
+ "voice-chat",
24
+ "p2p-chat",
25
+ "text-chat",
26
+ "peerjs-webrtc"
22
27
  ],
23
28
  "author": "Sahil Aggarwal",
24
29
  "license": "MIT",
@@ -31,10 +36,10 @@
31
36
  "react-dom": ">=16.0.0"
32
37
  },
33
38
  "devDependencies": {
34
- "@types/react": "^18.2.38"
39
+ "@types/react": "^18.2.42"
35
40
  },
36
41
  "dependencies": {
37
- "peerjs": "^1.5.1"
42
+ "peerjs": "^1.5.2"
38
43
  },
39
44
  "scripts": {
40
45
  "copy": "copy .\\src\\*.css dist",