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

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