react-peer-chat 0.11.9 → 0.11.11

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.
@@ -1,4 +1,4 @@
1
- import { useChat } from './chunk-KLBS4XTE.js';
1
+ import { useChat } from './chunk-R74TCSLB.js';
2
2
  import { BiSolidMessageX, BiSolidMessageDetail, GrSend, BsFillMicFill, BsFillMicMuteFill } from './chunk-QIPTWGEX.js';
3
3
  import { __objRest, __spreadValues } from './chunk-FZ4QVG4I.js';
4
4
  import React, { useRef, useState, useEffect } from 'react';
@@ -297,7 +297,7 @@ function useStorage(key, initialValue, local = false) {
297
297
  });
298
298
  };
299
299
  useEffect(() => {
300
- return subscribeToStorage(key, local, (value) => setStoredValue(value));
300
+ return subscribeToStorage(key, local, (value) => setStoredValue(value != null ? value : initialValue));
301
301
  }, [key, local]);
302
302
  return [storedValue, setValue];
303
303
  }
@@ -1,5 +1,5 @@
1
- export { Chat as default } from './chunks/chunk-SO7XYGB7.js';
2
- import './chunks/chunk-KLBS4XTE.js';
1
+ export { Chat as default } from './chunks/chunk-6FW6VHDM.js';
2
+ import './chunks/chunk-R74TCSLB.js';
3
3
  import './chunks/chunk-QIPTWGEX.js';
4
4
  import './chunks/chunk-MRYWIJDZ.js';
5
5
  import './chunks/chunk-FZ4QVG4I.js';
package/dist/hooks.js CHANGED
@@ -1,3 +1,3 @@
1
- export { useAudio, useChat, useMessages, useStorage } from './chunks/chunk-KLBS4XTE.js';
1
+ export { useAudio, useChat, useMessages, useStorage } from './chunks/chunk-R74TCSLB.js';
2
2
  import './chunks/chunk-MRYWIJDZ.js';
3
3
  import './chunks/chunk-FZ4QVG4I.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { Chat as default } from './chunks/chunk-SO7XYGB7.js';
2
- export { useChat } from './chunks/chunk-KLBS4XTE.js';
1
+ export { Chat as default } from './chunks/chunk-6FW6VHDM.js';
2
+ export { useChat } from './chunks/chunk-R74TCSLB.js';
3
3
  import './chunks/chunk-QIPTWGEX.js';
4
4
  export { clearChat } from './chunks/chunk-MRYWIJDZ.js';
5
5
  import './chunks/chunk-FZ4QVG4I.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-peer-chat",
3
- "version": "0.11.9",
3
+ "version": "0.11.11",
4
4
  "description": "An easy to use react component for impleting peer-to-peer chatting.",
5
5
  "license": "MIT",
6
6
  "author": "Sahil Aggarwal <aggarwalsahil2004@gmail.com>",
@@ -35,10 +35,10 @@
35
35
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@release-it/conventional-changelog": "^10.0.4",
39
- "@types/react": "^19.2.8",
38
+ "@release-it/conventional-changelog": "^10.0.5",
39
+ "@types/react": "^19.2.14",
40
40
  "prettier-package-json": "^2.8.0",
41
- "release-it": "^19.2.3",
41
+ "release-it": "^19.2.4",
42
42
  "tsup": "^8.5.1",
43
43
  "typescript": "^5.9.3"
44
44
  },