@kevisual/kv-login 0.1.14 → 0.1.15

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/dist/app.d.ts ADDED
@@ -0,0 +1,65 @@
1
+ declare const loginEmitter: any;
2
+
3
+ interface KvMessageOptions {
4
+ type?: 'success' | 'error' | 'loading';
5
+ message: string;
6
+ duration?: number;
7
+ closable?: boolean;
8
+ position?: 'center' | 'right';
9
+ }
10
+ declare class KvMessage extends HTMLElement {
11
+ private options;
12
+ private timer;
13
+ constructor();
14
+ connectedCallback(): void;
15
+ setOptions(options: KvMessageOptions): void;
16
+ private render;
17
+ private setTimer;
18
+ remove(): void;
19
+ disconnectedCallback(): void;
20
+ }
21
+ declare class KvMessageManager {
22
+ private static instance;
23
+ private container;
24
+ private defaultPosition;
25
+ static getInstance(): KvMessageManager;
26
+ setDefaultPosition(position: 'center' | 'right'): void;
27
+ private getContainer;
28
+ show(options: KvMessageOptions): KvMessage;
29
+ success(message: string, options?: {
30
+ duration?: number;
31
+ position?: 'center' | 'right';
32
+ closable?: boolean;
33
+ }): KvMessage;
34
+ error(message: string, options?: {
35
+ duration?: number;
36
+ position?: 'center' | 'right';
37
+ closable?: boolean;
38
+ }): KvMessage;
39
+ loading(message: string, options?: {
40
+ position?: 'center' | 'right';
41
+ closable?: boolean;
42
+ }): KvMessage;
43
+ remove(message: KvMessage): void;
44
+ clear(): void;
45
+ }
46
+ declare const createMessage: () => KvMessageManager;
47
+ declare global {
48
+ interface Window {
49
+ createMessage: typeof createMessage;
50
+ }
51
+ }
52
+
53
+ declare const redirectHome: () => void;
54
+ declare const clearCode: () => void;
55
+ type CheckPluginLoginResult = {
56
+ code: number;
57
+ data: {
58
+ redirectUrl: string;
59
+ };
60
+ };
61
+ declare const checkPluginLogin: () => Promise<CheckPluginLoginResult>;
62
+
63
+ declare const queryLogin: any;
64
+
65
+ export { checkPluginLogin, clearCode, createMessage, loginEmitter, queryLogin, redirectHome };