{"version":3,"file":"index.mjs","sources":["../../../packages/constants/index.ts"],"sourcesContent":["import { Emitter } from \"mitt\";\r\nimport { InjectionKey, App, ComponentPublicInstance } from \"vue\";\r\n\r\n//* 类型\r\nexport namespace UiTypes {\r\n    export type size = \"default\" | \"middle\" | \"large\" | \"small\";\r\n    export type type = \"success\" | \"warning\" | \"info\" | \"error\";\r\n    export type align = \"end\" | \"start\" | \"center\";\r\n    export type loading = boolean | { is: boolean; context?: string };\r\n    export type direction = \"top\" | \"left\" | \"right\" | \"bottom\";\r\n    export type candidate = { label: any; value: any; [name: string]: any };\r\n    export type verifyResult = {\r\n        type?: UiTypes.type;\r\n        verify: boolean;\r\n        message: string;\r\n    };\r\n    export type verifyRule = {\r\n        trigger: \"change\" | \"verify\" | \"blur\";\r\n        verify: ((data: { [name: string]: any }) => verifyResult) | ((data: { [name: string]: any }) => Promise<verifyResult>);\r\n    };\r\n}\r\n\r\nexport interface UiHTMLElement extends HTMLElement {\r\n    app?: App<Element>;\r\n    instance?: ComponentPublicInstance;\r\n}\r\n\r\n//* 表单触发器Key\r\nexport const UiFormEmitterKey: InjectionKey<Emitter<any>> = Symbol(\"UiFormEmitterKey\");\r\n//* 表单数据Key\r\nexport const UiFormDataKey: InjectionKey<{ [name: string]: any }> = Symbol(\"UiFormDataKey\");\r\n//* 表单校验规则Key\r\nexport const UiFormRulesKey: InjectionKey<{ [name: string]: UiTypes.verifyRule[] }> = Symbol(\"UiFormRulesKey\");\r\n\r\nexport * from \"./components\";\r\n"],"names":[],"mappings":";;;;AA4Ba,MAAA,gBAAA,GAA+C,OAAO,kBAAkB,EAAA;AAExE,MAAA,aAAA,GAAuD,OAAO,eAAe,EAAA;AAE7E,MAAA,cAAA,GAAyE,OAAO,gBAAgB;;;;"}