x-next 0.0.0-alpha.1 → 0.0.0-alpha.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/README.md +24 -2
  2. package/dist/_hooks/use-overflow.d.ts +5 -0
  3. package/dist/_hooks/use-popup-manager.d.ts +11 -0
  4. package/dist/_props/css.d.ts +13 -0
  5. package/dist/_props/global.d.ts +1 -0
  6. package/dist/_utils/config.d.ts +9 -0
  7. package/dist/_utils/convert-case.d.ts +3 -0
  8. package/dist/_utils/dom.d.ts +10 -0
  9. package/dist/_utils/helpers.d.ts +12 -0
  10. package/dist/_utils/icon.d.ts +59 -0
  11. package/{framework/es/util.d.ts → dist/_utils/is.d.ts} +22 -36
  12. package/dist/_utils/keyboard.d.ts +24 -0
  13. package/dist/_utils/number.d.ts +0 -0
  14. package/dist/_utils/vue-eco.d.ts +28 -0
  15. package/dist/components.d.ts +1 -0
  16. package/dist/componets/button/index.vue.d.ts +162 -0
  17. package/dist/componets/button/install.d.ts +4 -0
  18. package/dist/componets/button/props.d.ts +45 -0
  19. package/dist/componets/dialog/index.vue.d.ts +221 -0
  20. package/dist/componets/dialog/props.d.ts +83 -0
  21. package/dist/componets/dialog/use-props.d.ts +33 -0
  22. package/dist/componets/dialog/use.d.ts +3 -0
  23. package/dist/componets/dialog/warp.d.ts +2 -0
  24. package/dist/componets/message/index.vue.d.ts +387 -0
  25. package/dist/componets/message/props.d.ts +31 -0
  26. package/dist/componets/message/warp.d.ts +3 -0
  27. package/dist/componets/message-box/index.d.ts +3 -0
  28. package/dist/componets/message-box/props.d.ts +52 -0
  29. package/dist/componets/message-box/warp.d.ts +2 -0
  30. package/dist/componets/notification/index.vue.d.ts +160 -0
  31. package/dist/componets/notification/props.d.ts +54 -0
  32. package/dist/componets/notification/warp.d.ts +3 -0
  33. package/dist/componets/space/index.d.ts +42 -0
  34. package/dist/componets/tag-cloud/index.d.ts +0 -0
  35. package/dist/componets/trend-chart/components/trend-chart-curve.d.ts +114 -0
  36. package/dist/componets/trend-chart/components/trend-chart-grid.d.ts +55 -0
  37. package/dist/componets/trend-chart/components/trend-chart-labels.d.ts +22 -0
  38. package/dist/componets/trend-chart/components/trend-chart.d.ts +270 -0
  39. package/dist/componets/trend-chart/helpers/genPath.d.ts +8 -0
  40. package/dist/componets/trend-chart/helpers/genPoints.d.ts +3 -0
  41. package/dist/componets/trend-chart/helpers/getPadding.d.ts +7 -0
  42. package/dist/componets/trend-chart/helpers/validatePadding.d.ts +2 -0
  43. package/dist/componets/trend-chart/index.d.ts +2 -0
  44. package/dist/componets/trend-chart/props.d.ts +206 -0
  45. package/dist/directives/clipboard/cache.d.ts +8 -0
  46. package/dist/directives/clipboard/clipboard.d.ts +18 -0
  47. package/dist/directives/clipboard/convert.d.ts +3 -0
  48. package/dist/directives/clipboard/index.d.ts +3 -0
  49. package/dist/directives/clipboard/plugin.d.ts +2 -0
  50. package/dist/directives/clipboard/textarea.d.ts +3 -0
  51. package/dist/icons/animation/animation-loading.vue.d.ts +55 -0
  52. package/dist/icons/default/check-circle-fill.vue.d.ts +55 -0
  53. package/dist/icons/default/close-circle-fill.vue.d.ts +55 -0
  54. package/dist/icons/default/exclamation-circle-fill.vue.d.ts +55 -0
  55. package/dist/icons/default/info-circle-fill.vue.d.ts +55 -0
  56. package/dist/icons/default/minus-circle-fill.vue.d.ts +55 -0
  57. package/dist/icons/index.d.ts +7 -0
  58. package/dist/index.d.ts +12 -0
  59. package/dist/index.es.js +1431 -0
  60. package/dist/index.umd.js +1 -0
  61. package/dist/style.css +1 -0
  62. package/global.d.ts +8 -0
  63. package/package.json +68 -62
  64. package/LICENSE +0 -21
  65. package/framework/es/client.io.js +0 -2
  66. package/framework/es/client.io.js.map +0 -1
  67. package/framework/es/exception.d.ts +0 -25
  68. package/framework/es/index.d.ts +0 -2
  69. package/framework/es/types.d.ts +0 -33
  70. package/framework/es/websocket.d.ts +0 -118
  71. package/framework/umd/client.io.js +0 -2
  72. package/framework/umd/client.io.js.map +0 -1
  73. package/framework/umd/exception.d.ts +0 -25
  74. package/framework/umd/index.d.ts +0 -2
  75. package/framework/umd/types.d.ts +0 -33
  76. package/framework/umd/util.d.ts +0 -36
  77. package/framework/umd/websocket.d.ts +0 -118
  78. package/index.d.ts +0 -159
@@ -1,36 +0,0 @@
1
- export declare function isArray(obj: any): obj is any[];
2
- export declare function isNull(obj: any): obj is null;
3
- export declare function isBoolean(obj: unknown): obj is boolean;
4
- export declare function isObject(obj: any): obj is Record<string, unknown>;
5
- export declare const isPromise: <T>(obj: unknown) => obj is Promise<T>;
6
- export declare function isString(obj: any): obj is string;
7
- export declare function isNumber(obj: any): obj is number;
8
- export declare function isRegExp(obj: any): boolean;
9
- export declare function isDate(obj: any): boolean;
10
- export declare function isColor(color: any): boolean;
11
- export declare function isUndefined(obj: any): obj is undefined;
12
- export declare function isFunction(obj: any): obj is (...args: any[]) => any;
13
- export declare function isClass(value: unknown): boolean;
14
- export declare function isEmptyObject(obj: any): boolean;
15
- export declare function isEmpty(obj: any): boolean;
16
- export declare function isExist(obj: any): boolean;
17
- export declare function isWindow(el: any): el is Window;
18
- /**
19
- * 控制台消息打印
20
- * @param name
21
- * @param message
22
- * @param color
23
- * @param bgColor
24
- */
25
- export declare function consoleLog(name: string, message: string, color: string, bgColor: string): void;
26
- /**
27
- * 当前时间
28
- * @description 用于控制台打印使用
29
- */
30
- export declare function now(): string;
31
- /**
32
- * jsonStringify2Parse
33
- * @param value
34
- * @description 将JSON字符串转换为JSON对象
35
- */
36
- export declare function jsonStringify2Parse(value: unknown): any;
@@ -1,118 +0,0 @@
1
- import { SendMsg, WebSocketBucketCreate, WebSocketBucketOptions } from './types';
2
- declare enum WebSocketBucketState {
3
- CONNECTING = "CONNECTING",
4
- OPEN = "OPEN",
5
- CLOSING = "CLOSING",
6
- CLOSED = "CLOSED",
7
- FAIL = "FAIL"
8
- }
9
- /**
10
- * @class WebSocketBucket
11
- * @public
12
- * @classdesc WebSocket快速部署开发,可同开多个WebSocket,并分别命名,可对多个Client进行监听,每一个Bucket为Client运行所必需的空间环境。
13
- * @example
14
- * WebSocketBucket.create({url:'wss://ws.demo.com/socket-io'})
15
- * WebSocketBucket.sendMessage('Hello World')
16
- */
17
- export declare class WebSocketBucket {
18
- static NO_BUCKET: string;
19
- static NO_BUCKET_CLIENT: string;
20
- static NO_BUCKET_KEY: string;
21
- static DEFAULT_NAME: string;
22
- client: WebSocket | undefined;
23
- buckets: Map<string, WebSocketBucketOptions>;
24
- bucketName: string;
25
- static instance: WebSocketBucket;
26
- constructor();
27
- /**
28
- * create
29
- * 创建一个Bucket空间
30
- * @param url {string} 服务地址(SSL)
31
- * @param name {string} 实例名称
32
- * @param heartbeat {function} (sendMessage,instanceName)=>void 心跳执行函数 send {Function} 消息发送函数
33
- * @param heartRate 心跳频率 毫秒
34
- * @param restartTime 重启时间,按照通用方式,例如第一次3秒后重连如果没连上第二次就3*2=6秒后重连,如果还没有连上第三次就是3*2*2=12秒后重连,以此类推直到重连上为止,一旦重连上重连等待时间就会自动回到3秒这个初始值
35
- * @param restartTimes 重启次数,0为不限制,>0为最大重启次数
36
- * @param restartedTimes 已重启次数
37
- * @param receive 接收拦截器
38
- * @param send 发送拦截器
39
- */
40
- static create({ url, name, heartbeat, heartRate, restartTime, restartTimes, restartedTimes, receive, send, }: WebSocketBucketCreate): WebSocket | undefined;
41
- /**
42
- * readBucket
43
- * 读取Bucket空间
44
- * @param name
45
- * @return WebSocketBucketOptions
46
- */
47
- static getBucket(name: string | undefined): WebSocketBucketOptions;
48
- /**
49
- * setBucketKeyValue
50
- * 设置Bucket属性值
51
- * @param key
52
- * @param value
53
- * @param name
54
- */
55
- static setBucketKeyValue(key: string, value: number, name: string): void;
56
- /**
57
- * 获取Bucket客户端
58
- * @param name
59
- */
60
- static getBucketClient(name: string | undefined): WebSocket | undefined;
61
- /**
62
- * 获取Bucket空间名称
63
- * @param name
64
- */
65
- static getBucketName(name: string | undefined): string;
66
- /**
67
- * 获取Bucket客户端状态
68
- * @param name
69
- */
70
- static getBucketClientState(name: string | undefined): WebSocketBucketState;
71
- /**
72
- * 监听WebSocket报错
73
- * @param callback
74
- * @param name
75
- */
76
- static wsErrorEventListener(callback: (event: Event) => void, name?: undefined): void;
77
- /**
78
- * 监听WebSocket关闭
79
- * @param callback
80
- * @param name
81
- */
82
- static wsCloseEventListener(callback: (event: CloseEvent) => void, name?: undefined): void;
83
- /**
84
- * 监听WebSocket打开
85
- * @param callback
86
- * @param name
87
- */
88
- static wsOpenEventListener(callback: (event: Event) => void, name?: undefined): void;
89
- /**
90
- * 发送消息
91
- * @param msg 消息
92
- * @param name Bucket名称
93
- * @param isCloseWarn 是否关闭警告
94
- */
95
- static sendMessage(msg?: SendMsg, name?: string | undefined, isCloseWarn?: boolean): void;
96
- /**
97
- * 绑定消息
98
- * @param name
99
- */
100
- static bindMessage(name: string | undefined): void;
101
- /**
102
- * 接收消息
103
- * @param callback 接收消息的回调函数
104
- * @param name Bucket名称
105
- */
106
- static receiveMessage(callback: (event: MessageEvent<any>) => void, name?: string): void;
107
- /**
108
- * 注册消息接收事件
109
- * @param name
110
- */
111
- static registerOnMessage(name?: string): void;
112
- /**
113
- * 获取单例实例
114
- * @description 采用单例方式有利于减少内存占用
115
- */
116
- static getInstance(): WebSocketBucket;
117
- }
118
- export {};
package/index.d.ts DELETED
@@ -1,159 +0,0 @@
1
- declare type WebSocketUrl = `ws://${string}` | `wss://${string}`;
2
- declare type Heartbeat = (callback: HeartbeatCallback) => void;
3
- declare type HeartbeatCallback = (msg: string) => void;
4
- declare type ReceiveInterceptor = (event: MessageEvent<any>, send: (msg: SendMsg) => void) => any;
5
- declare type SendInterceptor = (event: any) => any;
6
- declare type WebSocketBucketCreate = {
7
- url: WebSocketUrl;
8
- name?: string;
9
- heartbeat?: Heartbeat;
10
- heartRate?: Millisecond;
11
- restartTime?: Millisecond;
12
- restartTimes?: number;
13
- restartedTimes?: number;
14
- receive?: ReceiveInterceptor;
15
- send?: SendInterceptor;
16
- };
17
- declare type WebSocketBucketOptions = {
18
- name: string;
19
- client: WebSocket;
20
- url: WebSocketUrl;
21
- heartbeat?: Heartbeat;
22
- heartRate: Millisecond;
23
- heartRateTimer: number;
24
- restartTime: Millisecond;
25
- restartTimes: number;
26
- restartedTimes: number;
27
- receive?: ReceiveInterceptor;
28
- send?: SendInterceptor;
29
- receiveMessageCallbacks: Map<string, (event: MessageEvent<any>) => void>;
30
- [key: string]: unknown;
31
- };
32
- declare type Millisecond = number;
33
- declare type SendMsg = string | ArrayBufferLike | Blob | ArrayBufferView;
34
-
35
- declare enum WebSocketBucketState {
36
- CONNECTING = "CONNECTING",
37
- OPEN = "OPEN",
38
- CLOSING = "CLOSING",
39
- CLOSED = "CLOSED",
40
- FAIL = "FAIL"
41
- }
42
- /**
43
- * @class WebSocketBucket
44
- * @public
45
- * @classdesc WebSocket快速部署开发,可同开多个WebSocket,并分别命名,可对多个Client进行监听,每一个Bucket为Client运行所必需的空间环境。
46
- * @example
47
- * WebSocketBucket.create({url:'wss://ws.demo.com/socket-io'})
48
- * WebSocketBucket.sendMessage('Hello World')
49
- */
50
- declare class WebSocketBucket {
51
- static NO_BUCKET: string;
52
- static NO_BUCKET_CLIENT: string;
53
- static NO_BUCKET_KEY: string;
54
- static DEFAULT_NAME: string;
55
- client: WebSocket | undefined;
56
- buckets: Map<string, WebSocketBucketOptions>;
57
- bucketName: string;
58
- static instance: WebSocketBucket;
59
- constructor();
60
- /**
61
- * create
62
- * 创建一个Bucket空间
63
- * @param url {string} 服务地址(SSL)
64
- * @param name {string} 实例名称
65
- * @param heartbeat {function} (sendMessage,instanceName)=>void 心跳执行函数 send {Function} 消息发送函数
66
- * @param heartRate 心跳频率 毫秒
67
- * @param restartTime 重启时间,按照通用方式,例如第一次3秒后重连如果没连上第二次就3*2=6秒后重连,如果还没有连上第三次就是3*2*2=12秒后重连,以此类推直到重连上为止,一旦重连上重连等待时间就会自动回到3秒这个初始值
68
- * @param restartTimes 重启次数,0为不限制,>0为最大重启次数
69
- * @param restartedTimes 已重启次数
70
- * @param receive 接收拦截器
71
- * @param send 发送拦截器
72
- */
73
- static create({ url, name, heartbeat, heartRate, restartTime, restartTimes, restartedTimes, receive, send, }: WebSocketBucketCreate): WebSocket | undefined;
74
- /**
75
- * readBucket
76
- * 读取Bucket空间
77
- * @param name
78
- * @return WebSocketBucketOptions
79
- */
80
- static getBucket(name: string | undefined): WebSocketBucketOptions;
81
- /**
82
- * setBucketKeyValue
83
- * 设置Bucket属性值
84
- * @param key
85
- * @param value
86
- * @param name
87
- */
88
- static setBucketKeyValue(key: string, value: number, name: string): void;
89
- /**
90
- * 获取Bucket客户端
91
- * @param name
92
- */
93
- static getBucketClient(name: string | undefined): WebSocket | undefined;
94
- /**
95
- * 获取Bucket空间名称
96
- * @param name
97
- */
98
- static getBucketName(name: string | undefined): string;
99
- /**
100
- * 获取Bucket客户端状态
101
- * @param name
102
- */
103
- static getBucketClientState(name: string | undefined): WebSocketBucketState;
104
- /**
105
- * 监听WebSocket报错
106
- * @param callback
107
- * @param name
108
- */
109
- static wsErrorEventListener(callback: (event: Event) => void, name?: undefined): void;
110
- /**
111
- * 监听WebSocket关闭
112
- * @param callback
113
- * @param name
114
- */
115
- static wsCloseEventListener(callback: (event: CloseEvent) => void, name?: undefined): void;
116
- /**
117
- * 监听WebSocket打开
118
- * @param callback
119
- * @param name
120
- */
121
- static wsOpenEventListener(callback: (event: Event) => void, name?: undefined): void;
122
- /**
123
- * 发送消息
124
- * @param msg 消息
125
- * @param name Bucket名称
126
- * @param isCloseWarn 是否关闭警告
127
- */
128
- static sendMessage(msg?: SendMsg, name?: string | undefined, isCloseWarn?: boolean): void;
129
- /**
130
- * 绑定消息
131
- * @param name
132
- */
133
- static bindMessage(name: string | undefined): void;
134
- /**
135
- * 接收消息
136
- * @param callback 接收消息的回调函数
137
- * @param name Bucket名称
138
- */
139
- static receiveMessage(callback: (event: MessageEvent<any>) => void, name?: string): void;
140
- /**
141
- * 注册消息接收事件
142
- * @param name
143
- */
144
- static registerOnMessage(name?: string): void;
145
- /**
146
- * 获取单例实例
147
- * @description 采用单例方式有利于减少内存占用
148
- */
149
- static getInstance(): WebSocketBucket;
150
- }
151
-
152
- /**
153
- * jsonStringify2Parse
154
- * @param value
155
- * @description 将JSON字符串转换为JSON对象
156
- */
157
- declare function jsonStringify2Parse(value: unknown): any;
158
-
159
- export { WebSocketBucket, jsonStringify2Parse };