im-ui-mobile 0.0.71 → 0.0.72

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/index.js CHANGED
@@ -11,7 +11,6 @@ import Requester from "./utils/requester.js";
11
11
  import url from "./utils/url.js";
12
12
  import { useDynamicRefs } from "./utils/useDynamicRefs.js";
13
13
  import WebSocket from "./utils/websocket.js";
14
- import { webSocket } from "./utils/websocket.js";
15
14
  import { MESSAGE_TYPE, RTC_STATE, TERMINAL_TYPE, MESSAGE_STATUS } from "./utils/enums.js";
16
15
 
17
16
  const importFn = import.meta.glob('./components/im-*/im-*.vue', { eager: true })
@@ -69,6 +68,7 @@ const install = (app, options = {}) => {
69
68
  }
70
69
 
71
70
  const getConfig = () => ({ ...config });
71
+ const webSocket = new WebSocket();
72
72
 
73
73
  export {
74
74
  getConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.0.71",
3
+ "version": "0.0.72",
4
4
  "description": "A Vue3.0 + typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/types/index.d.ts CHANGED
@@ -13,7 +13,6 @@ import Requester from "./utils/requester.d.ts";
13
13
  import * as url from "./utils/url.d.ts";
14
14
  import { useDynamicRefs } from "./utils/useDynamicRefs.d.ts";
15
15
  import WebSocket from "./utils/websocket.d.ts";
16
- import { webSocket } from "./utils/websocket.d.ts";
17
16
  import type {
18
17
  // 类型常量
19
18
  RtcMode,
@@ -61,7 +60,6 @@ declare module 'im-ui-mobile' {
61
60
  url,
62
61
  useDynamicRefs,
63
62
  WebSocket,
64
- webSocket,
65
63
 
66
64
  // 枚举类型
67
65
  RTC_STATE,
@@ -31,6 +31,4 @@ declare class WebSocket {
31
31
  setHeartCheckTimeout(timeout: number): void;
32
32
  destroy(): void;
33
33
  }
34
- declare const webSocket: WebSocket;
35
- export { webSocket, WebSocket };
36
- export default webSocket;
34
+ export default WebSocket;
@@ -222,9 +222,4 @@ class WebSocket {
222
222
  }
223
223
  }
224
224
 
225
- // 创建单例实例
226
- const webSocket = new WebSocket();
227
-
228
- // 导出单例和类
229
- export { webSocket, WebSocket };
230
- export default webSocket;
225
+ export default WebSocket;