im-ui-mobile 0.0.70 → 0.0.71

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
@@ -1,4 +1,3 @@
1
- // import { PiniaPlugin } from './plugins/pinia.js'
2
1
  import { UViewPlusPlugin } from './plugins/uview-plus.js'
3
2
  import eventBus from "./utils/eventBus.js";
4
3
  import datetime from "./utils/datetime.js";
@@ -44,36 +43,23 @@ let config = {}
44
43
  // 默认配置
45
44
  const defaultConfig = {
46
45
  emojiUrl: '',
47
- baseURL: ''
46
+ baseUrl: ''
48
47
  }
49
48
 
50
49
  const install = (app, options = {}) => {
51
50
  // 合并配置
52
51
  config = { ...defaultConfig, ...options }
53
52
 
54
- // // 配置 Emoji
55
- // if (globalConfig.emojiUrl) {
56
- // emoji.setEmojiUrl(globalConfig.emojiUrl);
57
- // }
58
-
59
-
60
53
  // 提供全局配置
61
- app.provide('im-config', options.config || {})
54
+ app.provide('im-config', options || {})
62
55
 
63
- // 应用配置到各个模块
56
+ // 应用配置到各个模块
64
57
  if (config.emojiUrl) {
65
- // 初始化 emoji 模块
66
- emoji.setEmojiUrl(config.emojiUrl);
58
+ // 设置 emoji 模块
59
+ emoji.setEmojiUrl(config.emojiUrl);
67
60
  }
68
61
 
69
62
  // 安装插件
70
-
71
- // // 安装pinia插件
72
- // if (options.usePinia !== false) {
73
- // app.use(PiniaPlugin, options.piniaOptions)
74
- // }
75
-
76
- // 安装 uview-plus
77
63
  app.use(UViewPlusPlugin)
78
64
 
79
65
  // 注册组件
@@ -82,13 +68,6 @@ const install = (app, options = {}) => {
82
68
  })
83
69
  }
84
70
 
85
- // // 导出安装函数和配置方法
86
- // const setConfig = (options) => {
87
- // if (options.emoji && options.emoji.baseUrl) {
88
- // emoji.setEmojiUrl(options.emoji.baseUrl);
89
- // }
90
- // };
91
-
92
71
  const getConfig = () => ({ ...config });
93
72
 
94
73
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "description": "A Vue3.0 + typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface ArrowBarProps {
4
4
  title: string
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface BarGroupSlots {
4
4
  default?: () => any
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface ButtonProps {
4
4
  title: string
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
  import { GroupMember } from '../../libs'
3
3
 
4
4
  declare interface ChatAtBoxProps {
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
  import { Chat, Message } from '../../libs'
3
3
 
4
4
  declare interface ChatGroupReadedProps {
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface ChatItemProps {
4
4
  chat?: any
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface ChatMessageItemProps {
4
4
  avatar?: string
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface ChatRecordEmits {
4
4
  (e: 'send', data: any): void
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface UploadFile {
4
4
  url: string
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface FriendItemProps {
4
4
  friend?: any
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface GroupItemProps {
4
4
  group?: any
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface Member {
4
4
  userId: number
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
  import { UserInfo } from '../../libs'
3
3
 
4
4
  declare interface RtcInfo {
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface HeadImageProps {
4
4
  id?: number
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface LoadingProps {
4
4
  size?: number
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface LongPressMenuProps {
4
4
  items?: any[]
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface SampleProps {
4
4
  type: string
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface SwitchBarProps {
4
4
  title: string
@@ -1,4 +1,4 @@
1
- import { AllowedComponentProps, VNodeProps } from './_common'
1
+ import { AllowedComponentProps, VNodeProps } from '../common'
2
2
 
3
3
  declare interface VirtualScrollerProps {
4
4
  height?: string
package/types/index.d.ts CHANGED
@@ -43,12 +43,14 @@ declare module 'im-ui-mobile' {
43
43
  export function install(): void
44
44
 
45
45
  interface Config {
46
+ baseUrl: string;
46
47
  emojiUrl: string;
47
48
  }
48
49
 
49
- export function getConfig(): Config;
50
+ function getConfig(): Config;
50
51
 
51
52
  export {
53
+ getConfig,
52
54
  eventBus,
53
55
  datetime,
54
56
  Emoji,
@@ -1,4 +1,5 @@
1
1
  declare class Emoji {
2
+ constructor();
2
3
  setEmojiUrl: (url: string) => void;
3
4
  getEmojiUrl: (F) => string;
4
5
  containEmoji: (content: string) => boolean;
@@ -1,8 +1,9 @@
1
1
  import type { UploadRecorderFileResult } from '../libs';
2
- declare const _default: {
2
+ declare class RecorderApp {
3
+ constructor();
3
4
  checkIsEnable: () => boolean;
4
5
  start: () => Promise<void>;
5
6
  close: () => void;
6
7
  upload: () => Promise<UploadRecorderFileResult>;
7
8
  };
8
- export default _default;
9
+ export default RecorderApp;
@@ -1,8 +1,9 @@
1
1
  import type { UploadRecorderFileResult } from '../libs';
2
- declare const _default: {
2
+ declare class RecorderH5 {
3
+ constructor();
3
4
  checkIsEnable: () => boolean;
4
5
  start: () => Promise<void>;
5
6
  close: () => void;
6
7
  upload: () => Promise<UploadRecorderFileResult>;
7
8
  };
8
- export default _default;
9
+ export default RecorderH5;
@@ -2,7 +2,7 @@
2
2
  * 使用动态Refs(组合式函数)
3
3
  */
4
4
  export declare function useDynamicRefs<T = any>(): {
5
- refs: import("vue").Ref<Map<string, import("@vue/reactivity").UnwrapRefSimple<T>> & Omit<Map<string, T>, keyof Map<any, any>>, Map<string, T> | (Map<string, import("@vue/reactivity").UnwrapRefSimple<T>> & Omit<Map<string, T>, keyof Map<any, any>>)>;
5
+ refs: import("vue").Ref<Map<string, import("@vue/reactivity").UnwrapRefSimple<T>> & Omit<Map<string, T>, keyof Map<any, any>>, Map<string, T> | (Map<string, import("@vue/reactivity").UnwrapRefSimple<T>> & Omit<Map<string, T>, keyof Map<any, any>>) >;
6
6
  setRef: (key: string) => (el: T) => void;
7
7
  getRef: (key: string) => T | undefined;
8
8
  getAllRefs: () => Map<string, import("@vue/reactivity").UnwrapRefSimple<T>> & Omit<Map<string, T>, keyof Map<any, any>>;
@@ -14,12 +14,13 @@ declare class WebSocket {
14
14
  private startHeartCheck;
15
15
  private resetHeartCheck;
16
16
  private clearHeartCheck;
17
- connect(wsurl: string, token: string): void;
18
17
  private setupSocketEvents;
19
18
  private handleMessage;
20
19
  private handleClose;
21
- reconnect(wsurl: string, token: string): void;
22
20
  private scheduleReconnect;
21
+ constructor();
22
+ connect(wsurl: string, token: string): void;
23
+ reconnect(wsurl: string, token: string): void;
23
24
  close(code?: number): void;
24
25
  sendMessage(message: string): void;
25
26
  onConnect(callback: ConnectCallback): void;
File without changes