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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +93 -2
  3. package/dist/favicon.ico +0 -0
  4. package/dist/index.d.ts +0 -0
  5. package/dist/types/_hooks/use-overflow.d.ts +5 -0
  6. package/dist/types/_hooks/use-popup-manager.d.ts +11 -0
  7. package/dist/types/_props/css.d.ts +13 -0
  8. package/dist/types/_props/global.d.ts +1 -0
  9. package/dist/types/_utils/config.d.ts +9 -0
  10. package/dist/types/_utils/convert-case.d.ts +3 -0
  11. package/dist/types/_utils/dom.d.ts +10 -0
  12. package/dist/types/_utils/helpers.d.ts +12 -0
  13. package/dist/types/_utils/icon.d.ts +59 -0
  14. package/dist/types/_utils/is.d.ts +25 -0
  15. package/dist/types/_utils/keyboard.d.ts +24 -0
  16. package/dist/types/_utils/number.d.ts +0 -0
  17. package/dist/types/_utils/vue-eco.d.ts +32 -0
  18. package/dist/types/componets/button/index.vue.d.ts +107 -0
  19. package/dist/types/componets/button/props.d.ts +45 -0
  20. package/dist/types/componets/dialog/index.vue.d.ts +221 -0
  21. package/dist/types/componets/dialog/props.d.ts +83 -0
  22. package/dist/types/componets/dialog/use-props.d.ts +33 -0
  23. package/dist/types/componets/dialog/use.d.ts +3 -0
  24. package/dist/types/componets/dialog/warp.d.ts +2 -0
  25. package/dist/types/componets/message/index.vue.d.ts +116 -0
  26. package/dist/types/componets/message/props.d.ts +31 -0
  27. package/dist/types/componets/message/warp.d.ts +3 -0
  28. package/dist/types/componets/message-box/index.d.ts +3 -0
  29. package/dist/types/componets/message-box/props.d.ts +52 -0
  30. package/dist/types/componets/message-box/warp.d.ts +2 -0
  31. package/dist/types/componets/notification/index.vue.d.ts +160 -0
  32. package/dist/types/componets/notification/props.d.ts +54 -0
  33. package/dist/types/componets/notification/warp.d.ts +3 -0
  34. package/dist/types/componets/space/index.d.ts +42 -0
  35. package/dist/types/componets/tag-cloud/index.d.ts +0 -0
  36. package/dist/types/componets/trend-chart/components/trend-chart-curve.d.ts +114 -0
  37. package/dist/types/componets/trend-chart/components/trend-chart-grid.d.ts +55 -0
  38. package/dist/types/componets/trend-chart/components/trend-chart-labels.d.ts +22 -0
  39. package/dist/types/componets/trend-chart/components/trend-chart.d.ts +270 -0
  40. package/dist/types/componets/trend-chart/helpers/genPath.d.ts +8 -0
  41. package/dist/types/componets/trend-chart/helpers/genPoints.d.ts +3 -0
  42. package/dist/types/componets/trend-chart/helpers/getPadding.d.ts +7 -0
  43. package/dist/types/componets/trend-chart/helpers/validatePadding.d.ts +2 -0
  44. package/dist/types/componets/trend-chart/index.d.ts +2 -0
  45. package/dist/types/componets/trend-chart/props.d.ts +206 -0
  46. package/dist/types/icons/animation/animation-loading.vue.d.ts +55 -0
  47. package/dist/types/icons/default/check-circle-fill.vue.d.ts +55 -0
  48. package/dist/types/icons/default/close-circle-fill.vue.d.ts +55 -0
  49. package/dist/types/icons/default/exclamation-circle-fill.vue.d.ts +55 -0
  50. package/dist/types/icons/default/info-circle-fill.vue.d.ts +55 -0
  51. package/dist/types/icons/default/minus-circle-fill.vue.d.ts +55 -0
  52. package/dist/types/icons/index.d.ts +7 -0
  53. package/dist/types/ui.d.ts +5 -0
  54. package/dist/ui.cjs.js +2 -0
  55. package/dist/ui.es.js +1395 -0
  56. package/dist/ui.umd.js +3 -0
  57. package/package.json +64 -63
  58. package/framework/es/client.io.js +0 -2
  59. package/framework/es/client.io.js.map +0 -1
  60. package/framework/es/exception.d.ts +0 -25
  61. package/framework/es/index.d.ts +0 -2
  62. package/framework/es/types.d.ts +0 -33
  63. package/framework/es/util.d.ts +0 -36
  64. package/framework/es/websocket.d.ts +0 -118
  65. package/framework/umd/client.io.js +0 -2
  66. package/framework/umd/client.io.js.map +0 -1
  67. package/framework/umd/exception.d.ts +0 -25
  68. package/framework/umd/index.d.ts +0 -2
  69. package/framework/umd/types.d.ts +0 -33
  70. package/framework/umd/util.d.ts +0 -36
  71. package/framework/umd/websocket.d.ts +0 -118
  72. package/index.d.ts +0 -159
@@ -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 };