im-ui-mobile 0.0.52 → 0.0.54

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.
@@ -27,10 +27,7 @@
27
27
  <script setup lang="ts">
28
28
  import ImHeadImage from '../im-head-image/im-head-image.vue'
29
29
  import { datetime, dom, messageType, emoji } from '../../index'
30
- // import dom from '../../types/utils/dom'
31
- // import messageType from '../../types/utils/messageType'
32
- import { MESSAGE_TYPE } from '../../types'
33
- // import emoji from '../../types/utils/emoji';
30
+ import { MESSAGE_TYPE } from '../../index'
34
31
 
35
32
  interface Props {
36
33
  chat?: any;
@@ -91,12 +91,8 @@
91
91
  import ImHeadImage from '../im-head-image/im-head-image.vue'
92
92
  import ImChatGroupReaded from '../im-chat-group-readed/im-chat-group-readed.vue'
93
93
  import ImLongPressMenu from '../im-long-press-menu/im-long-press-menu.vue'
94
- import { MESSAGE_TYPE, MESSAGE_STATUS, } from '../../types/utils/enums'
95
- import emoji from '../../types/utils/emoji';
96
- import url from '../../types/utils/url';
97
- import datetime from '../../types/utils/datetime';
98
- import messageType from '../../types/utils/messageType';
99
- import dom from '../../types/utils/dom';
94
+ import { MESSAGE_TYPE, MESSAGE_STATUS } from '../../index'
95
+ import { datetime, dom, url,messageType, emoji } from '../../index'
100
96
 
101
97
  interface Props {
102
98
  avatar?: string;
@@ -26,8 +26,7 @@
26
26
  </template>
27
27
 
28
28
  <script setup lang="ts">
29
- import recorderApp from '../../types/utils/recorderApp';
30
- import recorderH5 from '../../types/utils/recorderH5';
29
+ import { recorderApp, recorderH5 } from '../../index'
31
30
 
32
31
  const recording = ref(false);
33
32
  const moveToCancel = ref(false);
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Pinia } from './plugins/pinia.js'
1
+ import { PiniaPlugin } from './plugins/pinia.js'
2
2
  import { UViewPlusPlugin } from './plugins/uview-plus.js'
3
3
 
4
4
  const importFn = import.meta.glob('./components/im-*/im-*.vue', { eager: true })
@@ -27,7 +27,7 @@ for (const key in importFn) {
27
27
  const install = (app, options = {}) => {
28
28
  // 安装pinia插件
29
29
  if (options.usePinia !== false) {
30
- app.use(Pinia, options.piniaOptions)
30
+ app.use(PiniaPlugin, options.piniaOptions)
31
31
  }
32
32
 
33
33
  // 安装 uview-plus
@@ -53,6 +53,7 @@ import Requester from "./utils/requester.js";
53
53
  import * as url from "./utils/url.js";
54
54
  import { useDynamicRefs } from "./utils/useDynamicRefs.js";
55
55
  import { webSocketManager, WebSocketManager } from "./utils/websocket.js";
56
+ import { MESSAGE_TYPE, RTC_STATE, TERMINAL_TYPE, MESSAGE_STATUS } from "./utils/enums.js";
56
57
 
57
58
  export {
58
59
  eventBus,
@@ -67,7 +68,13 @@ export {
67
68
  url,
68
69
  useDynamicRefs,
69
70
  webSocketManager,
70
- WebSocketManager
71
+ WebSocketManager,
72
+
73
+ // Enums
74
+ MESSAGE_TYPE,
75
+ RTC_STATE,
76
+ TERMINAL_TYPE,
77
+ MESSAGE_STATUS
71
78
  }
72
79
 
73
80
  export default {
package/libs/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { RTC_STATE, MESSAGE_TYPE } from '../types/utils/enums'
1
+ import type { RTC_STATE, MESSAGE_TYPE } from '../types/utils/enums.d.ts'
2
2
 
3
3
 
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "description": "A Vue3.0 + typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/plugins/pinia.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createPinia } from 'pinia'
2
2
 
3
- export const Pinia = {
3
+ export const PiniaPlugin = {
4
4
  install(app, options = {}) {
5
5
  // 创建pinia实例
6
6
  const pinia = createPinia()
@@ -1,4 +1,4 @@
1
- import type { RTC_STATE, MESSAGE_TYPE } from '../utils/enums';
1
+ import type { RTC_STATE, MESSAGE_TYPE } from '../utils/enums.d.ts';
2
2
  /**
3
3
  * 通话模式类型
4
4
  */
@@ -1,5 +1,4 @@
1
1
  /// <reference types="@dcloudio/types" />
2
- /// <reference types="@dcloudio/types" />
3
2
  import type { Response } from '../libs/index';
4
3
  export default class Requester {
5
4
  private baseURL;