react-peer-chat 0.5.0 → 0.5.2

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/README.md CHANGED
@@ -33,7 +33,7 @@ It also exports a `clearChat` function that clears the text chat whenever invoke
33
33
  ```jsx
34
34
  import React from 'react';
35
35
  import Chat, { clearChat } from 'react-peer-chat';
36
- import 'react-peer-chat/build/styles.css';
36
+ import 'react-peer-chat/dist/styles.css';
37
37
 
38
38
  export default function App() {
39
39
  return <div>
@@ -51,7 +51,7 @@ export default function App() {
51
51
  ```jsx
52
52
  import React from 'react';
53
53
  import Chat, { clearChat } from 'react-peer-chat';
54
- import 'react-peer-chat/build/styles.css';
54
+ import 'react-peer-chat/dist/styles.css';
55
55
 
56
56
  export default function App() {
57
57
  return <div>
@@ -70,7 +70,7 @@ Use props provided by `<Chat>` component to customize it.
70
70
  ```jsx
71
71
  import React from 'react';
72
72
  import Chat from 'react-peer-chat';
73
- import 'react-peer-chat/build/styles.css';
73
+ import 'react-peer-chat/dist/styles.css';
74
74
 
75
75
  export default function App() {
76
76
  return <Chat
@@ -92,7 +92,7 @@ Use Function as Children(FoC) to fully customize the `<Chat>` component.
92
92
  ```jsx
93
93
  import React from 'react'
94
94
  import Chat from 'react-peer-chat'
95
- // import 'react-peer-chat/build/styles.css' (No need to import CSS when using custom component)
95
+ // import 'react-peer-chat/dist/styles.css' (No need to import CSS when using custom component)
96
96
 
97
97
  export default function App() {
98
98
  return <Chat
@@ -122,10 +122,10 @@ Here is the full API for the `<Chat>` component, these properties can be set on
122
122
  | `voice` | `boolean` | No | `true` | Voice chat will be enabled if this property is set to true. |
123
123
  | `peerOptions` | [`PeerOptions`](#PeerOptions) | No | - | Options to customize peerjs Peer instance. |
124
124
  | `dialogOptions` | [`DialogOptions`](#DialogOptions) | No | { position: 'center' } | Options to customize text dialog box styling. |
125
- | `onError` | `Function` | No | `() => alert('Browser not supported! Try some other browser.')` | Function to be executed if browser doesn't support [WebRTC](https://webrtc.org/). |
125
+ | `onError` | `Function` | No | `() => alert('Browser not supported! Try some other browser.')` | Function to be executed if browser doesn't support `WebRTC` |
126
126
  | `onMicError` | `Function` | No | `() => alert('Microphone not accessible!')` | Function to be executed when microphone is not accessible. |
127
127
  | `props` | `React.DetailedHTMLProps` | No | - | Props to customize the `<Chat>` component. |
128
- | `children` | [`Children`](#Children) | No | - | Props to customize the `<Chat>` component. |
128
+ | `children` | [`Children`](#Children) | No | - | See [usage with FoC](#Full-Customization) |
129
129
  ### Types
130
130
  #### PeerOptions
131
131
  ```typescript
@@ -157,7 +157,5 @@ type ChildrenOptions = {
157
157
  };
158
158
  type Children = (childrenOptions: ChildrenOptions) => ReactNode;
159
159
  ```
160
- ## Used By
161
- - [StarWars](https://starwarsgame.vercel.app/)
162
160
  ## Author
163
161
  [Sahil Aggarwal](https://www.github.com/SahilAggarwal2004)
@@ -7,7 +7,7 @@ export interface DialogOptions {
7
7
  position?: DialogPosition;
8
8
  style?: CSSProperties;
9
9
  }
10
- type RemotePeers = {
10
+ export type RemotePeers = {
11
11
  [id: string]: string;
12
12
  };
13
13
  export interface Message {
package/package.json CHANGED
@@ -1,42 +1,43 @@
1
- {
2
- "name": "react-peer-chat",
3
- "version": "0.5.0",
4
- "description": "An easy to use react component for impleting peer-to-peer chatting.",
5
- "main": "./build/index.js",
6
- "type": "module",
7
- "scripts": {
8
- "copy": "copy .\\src\\*.css build",
9
- "build": "npm i && tsc && npm run copy"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/SahilAggarwal2004/react-peer-chat.git"
14
- },
15
- "keywords": [
16
- "react",
17
- "chat",
18
- "component",
19
- "peer",
20
- "peerjs",
21
- "p2p",
22
- "peer-to-peer",
23
- "webrtc",
24
- "react-peer-chat"
25
- ],
26
- "author": "Sahil Aggarwal",
27
- "license": "MIT",
28
- "bugs": {
29
- "url": "https://github.com/SahilAggarwal2004/react-peer-chat/issues"
30
- },
31
- "homepage": "https://github.com/SahilAggarwal2004/react-peer-chat#readme",
32
- "peerDependencies": {
33
- "react": ">=16.0.0",
34
- "react-dom": ">=16.0.0"
35
- },
36
- "devDependencies": {
37
- "@types/react": "^18.2.23"
38
- },
39
- "dependencies": {
40
- "peerjs": "^1.5.1"
41
- }
1
+ {
2
+ "name": "react-peer-chat",
3
+ "version": "0.5.2",
4
+ "description": "An easy to use react component for impleting peer-to-peer chatting.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/SahilAggarwal2004/react-peer-chat.git"
11
+ },
12
+ "keywords": [
13
+ "react",
14
+ "chat",
15
+ "component",
16
+ "peer",
17
+ "peerjs",
18
+ "p2p",
19
+ "peer-to-peer",
20
+ "webrtc",
21
+ "react-peer-chat"
22
+ ],
23
+ "author": "Sahil Aggarwal",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/SahilAggarwal2004/react-peer-chat/issues"
27
+ },
28
+ "homepage": "https://github.com/SahilAggarwal2004/react-peer-chat#readme",
29
+ "peerDependencies": {
30
+ "react": ">=16.0.0",
31
+ "react-dom": ">=16.0.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/react": "^18.2.28"
35
+ },
36
+ "dependencies": {
37
+ "peerjs": "^1.5.1"
38
+ },
39
+ "scripts": {
40
+ "copy": "copy .\\src\\*.css dist",
41
+ "build": "npm i && tsc && npm run copy"
42
+ }
42
43
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes