Skip to content

Commit 6415dc5

Browse files
committed
optimizing compilation
1 parent 824e43f commit 6415dc5

32 files changed

+796
-50
lines changed

dist/gocaptcha.cjs.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gocaptcha.esm.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gocaptcha.global.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/helper/helper.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @Author Awen
3+
* @Date 2024/06/01
4+
5+
**/
6+
export declare function getDomXY(dom: any): {
7+
domX: number;
8+
domY: number;
9+
};
10+
export declare function checkTargetFather(that: any, e: any): boolean;
11+
export declare function isObject(val: any): boolean;
12+
export declare const isArray: (arg: any) => arg is any[];
13+
export declare function deepCopyObject(obj: any): any;

dist/icons/icons.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export declare const makeLoadingSvgIcon: (options?: any) => any;
2+
export declare const makeCloseSvgIcon: (options?: any) => any;
3+
export declare const makeRefreshSvgIcon: (options?: any) => any;
4+
export declare const makeArrowSvgIcon: (options?: any) => any;
5+
export declare const makeBtnDefaultSvgIcon: (options?: any) => any;
6+
export declare const makeBtnWarnSvgIcon: (options?: any) => any;
7+
export declare const makeBtnErrorSvgIcon: (options?: any) => any;
8+
export declare const makeBtnSuccessSvgIcon: (options?: any) => any;

dist/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { Button } from './modules/button';
2+
import { Click } from './modules/click';
3+
import { Slide } from './modules/slide';
4+
import { SlideRegion } from './modules/slide-region';
5+
import { Rotate } from './modules/rotate';
6+
export { Button, Click, Slide, SlideRegion, Rotate };

dist/modules/button/index.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { ButtonConfig, ButtonState } from "./types";
2+
export declare class ButtonCore {
3+
private _logic;
4+
private _el;
5+
constructor(config?: ButtonConfig);
6+
setConfig: (config?: ButtonConfig) => this;
7+
setState: (state?: ButtonState) => this;
8+
mount: (el: HTMLElement) => this;
9+
destroy: () => this;
10+
}
11+
export declare function Button(config?: ButtonConfig): {
12+
setConfig: (config?: ButtonConfig) => ButtonCore;
13+
setState: (state?: ButtonState) => ButtonCore;
14+
mount: (el: HTMLElement) => ButtonCore;
15+
destroy: () => ButtonCore;
16+
};

dist/modules/button/logic.d.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { ButtonConfig, ButtonState } from "./types";
2+
export declare class Logic {
3+
name: string;
4+
private logicProps;
5+
localConfig: any;
6+
localState: any;
7+
btnClass: any;
8+
btnStyles: any;
9+
private unmountFn;
10+
constructor();
11+
setPropsConfig: (config: ButtonConfig) => void;
12+
setPropsState: (state: ButtonState) => void;
13+
setup: () => {};
14+
render: (props: {}) => {
15+
__v_isVnode: boolean;
16+
type: any;
17+
props: any;
18+
children: any;
19+
key: any;
20+
el: any;
21+
shapeFlag: number | import("../../libs/render/shared").ShapeFlags;
22+
ref: any;
23+
patchFlag: any;
24+
};
25+
mount: (el: Element) => void;
26+
unmount: () => void;
27+
}

dist/modules/button/types.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export interface ButtonConfig {
2+
width?: number;
3+
height?: number;
4+
verticalPadding?: number;
5+
horizontalPadding?: number;
6+
}
7+
export interface ButtonState {
8+
type?: ButtonType;
9+
disabled?: boolean;
10+
title?: string;
11+
clickEvent?: () => void;
12+
}
13+
export declare const defaultConfig: () => ButtonConfig;
14+
export declare const defaultState: () => ButtonState;
15+
export type ButtonType = "default" | "warn" | "error" | "success";

dist/modules/click/handler.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @Author Awen
3+
* @Date 2024/06/01
4+
5+
**/
6+
import { ClickData, ClickEvent } from "./types";
7+
export interface handlerType {
8+
dots: {
9+
value: [];
10+
};
11+
clickEvent: (e: Event) => void;
12+
confirmEvent: (e: Event) => void;
13+
closeEvent: (e: Event) => void;
14+
refreshEvent: (e: Event) => void;
15+
resetData: () => void;
16+
clearData: () => void;
17+
refresh: () => void;
18+
close: () => void;
19+
}
20+
export declare const useHandler: (_: ClickData, event: ClickEvent, clearCbs: () => void) => handlerType;

0 commit comments

Comments
 (0)