@kevisual/kv-login 0.0.3 → 0.0.4
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/package.json +6 -4
- package/types/index.d.ts +38 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevisual/kv-login",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/main.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"build": "vite build --config vite-lib.config.ts",
|
|
9
9
|
"build:test": "vite build",
|
|
10
10
|
"prepub": "rm -rf ./dist && pnpm run build:test",
|
|
11
|
-
"pub": "ev deploy ./dist -k kv-login-test -v 0.0.
|
|
11
|
+
"pub": "ev deploy ./dist -k kv-login-test -v 0.0.4 -u -y yes"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [],
|
|
14
14
|
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"exports": {
|
|
27
27
|
".": "./dist/kv-login.es.js",
|
|
28
28
|
"./kv-login.es.js": "./dist/kv-login.es.js",
|
|
29
|
-
"./kv-login.umd.js": "./dist/kv-login.umd.js"
|
|
30
|
-
|
|
29
|
+
"./kv-login.umd.js": "./dist/kv-login.umd.js",
|
|
30
|
+
"./types": "./types/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"types": "./types/index.d.ts"
|
|
31
33
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface KvLoginEventMap {
|
|
2
|
+
login: CustomEvent<{
|
|
3
|
+
method: 'password' | 'phone' | 'wechat' | 'wechat-mp' | 'wechat-mp-ticket';
|
|
4
|
+
data: any;
|
|
5
|
+
}>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface KvLogin extends HTMLElement {
|
|
9
|
+
addEventListener<K extends keyof KvLoginEventMap>(
|
|
10
|
+
type: K,
|
|
11
|
+
listener: (this: KvLogin, ev: KvLoginEventMap[K]) => void,
|
|
12
|
+
options?: boolean | AddEventListenerOptions
|
|
13
|
+
): void;
|
|
14
|
+
removeEventListener<K extends keyof KvLoginEventMap>(
|
|
15
|
+
type: K,
|
|
16
|
+
listener: (this: KvLogin, ev: KvLoginEventMap[K]) => void,
|
|
17
|
+
options?: boolean | EventListenerOptions
|
|
18
|
+
): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'kv-login': KvLogin;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
namespace JSX {
|
|
27
|
+
interface IntrinsicElements {
|
|
28
|
+
'kv-login': KvLoginAttributes;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface KvLoginAttributes extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
34
|
+
// 这里可以添加 kv-login 特有的属性
|
|
35
|
+
// 目前这个组件没有额外的属性
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { KvLogin, KvLoginEventMap, KvLoginAttributes };
|