react-peer-chat 0.5.1 → 0.5.3

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
@@ -9,7 +9,7 @@ An easy to use react component for impleting peer-to-peer chatting using [peerjs
9
9
  - Clear text chat on command
10
10
  - Supports voice chat
11
11
  - Multiple peer connections. See [multi peer usage](#Multi-Peer-Usage)
12
- - Fully Customizable. See [usage with FoC](#Full-Customization)
12
+ - Fully Customizable. See [usage with FaC](#Full-Customization)
13
13
  ## Installation
14
14
  To install react-peer-chat
15
15
  ```bash
@@ -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
@@ -88,11 +88,11 @@ export default function App() {
88
88
  }
89
89
  ```
90
90
  #### Full Customization
91
- Use Function as Children(FoC) to fully customize the `<Chat>` component.
91
+ Use Function as Children(FaC) 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
@@ -125,7 +125,7 @@ Here is the full API for the `<Chat>` component, these properties can be set on
125
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 FaC](#Full-Customization) |
129
129
  ### Types
130
130
  #### PeerOptions
131
131
  ```typescript
package/package.json CHANGED
@@ -1,42 +1,43 @@
1
- {
2
- "name": "react-peer-chat",
3
- "version": "0.5.1",
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.28"
38
- },
39
- "dependencies": {
40
- "peerjs": "^1.5.1"
41
- }
1
+ {
2
+ "name": "react-peer-chat",
3
+ "version": "0.5.3",
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.38"
35
+ },
36
+ "dependencies": {
37
+ "peerjs": "^1.5.1"
38
+ },
39
+ "scripts": {
40
+ "copy": "copy .\\src\\*.css dist",
41
+ "build": "pnpm i && tsc && pnpm run copy"
42
+ }
42
43
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes