ep-craft 0.1.19 → 0.1.21
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/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/affix/affix.d.ts +55 -0
- package/dist/components/affix/affix.js +199 -0
- package/dist/components/affix/index.d.ts +2 -2
- package/dist/components/affix/index.js +3 -4
- package/dist/components/alert/alert.d.ts +39 -0
- package/dist/components/alert/alert.js +94 -0
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +3 -4
- package/dist/components/anchor/anchor.d.ts +54 -0
- package/dist/components/anchor/anchor.js +153 -0
- package/dist/components/anchor/index.d.ts +2 -2
- package/dist/components/anchor/index.js +3 -4
- package/dist/components/anchor-link/anchor-link.d.ts +17 -0
- package/dist/components/anchor-link/anchor-link.js +51 -0
- package/dist/components/anchor-link/index.d.ts +2 -2
- package/dist/components/anchor-link/index.js +6 -4
- package/dist/components/button/EpButton.vue.d.ts +11 -11
- package/dist/components/button/EpButton.vue.js +122 -0
- package/dist/components/button/EpButton2.vue.js +4 -0
- package/dist/components/button/button.d.ts +3 -3
- package/dist/components/button/button.js +95 -0
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +3 -4
- package/dist/components/button/use-button-custom.js +66 -0
- package/dist/components/check-tag/EpCheckTag.vue.d.ts +1 -1
- package/dist/components/check-tag/EpCheckTag.vue.js +29 -0
- package/dist/components/check-tag/EpCheckTag2.vue.js +4 -0
- package/dist/components/check-tag/check-tag.js +20 -0
- package/dist/components/check-tag/index.d.ts +2 -2
- package/dist/components/check-tag/index.js +3 -4
- package/dist/components/collapse-transition/index.d.ts +20 -3
- package/dist/components/collapse-transition/index.js +6 -4
- package/dist/components/collapse-transition/src/collapse-transition.vue.d.ts +12 -0
- package/dist/components/collapse-transition/src/collapse-transition.vue.js +55 -0
- package/dist/components/collapse-transition/src/collapse-transition2.vue.js +4 -0
- package/dist/components/config-provider/src/constants.d.ts +14 -0
- package/dist/components/config-provider/src/hooks/use-global-config.d.ts +32 -0
- package/dist/components/focus-trap/index.d.ts +81 -0
- package/dist/components/focus-trap/index.js +19 -0
- package/dist/components/focus-trap/src/focus-trap.vue.d.ts +32 -0
- package/dist/components/focus-trap/src/focus-trap.vue.js +10 -0
- package/dist/components/focus-trap/src/focus-trap2.vue.js +164 -0
- package/dist/components/focus-trap/src/tokens.d.ts +13 -0
- package/dist/components/focus-trap/src/tokens.js +17 -0
- package/dist/components/focus-trap/src/utils.d.ts +29 -0
- package/dist/components/focus-trap/src/utils.js +83 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.js +4 -2
- package/dist/components/form/src/constants.d.ts +4 -0
- package/dist/components/form/src/constants.js +4 -0
- package/dist/components/form/src/hooks/use-form-common-props.d.ts +6 -0
- package/dist/components/form/src/hooks/use-form-item.d.ts +19 -0
- package/dist/components/form/src/types.d.ts +24 -0
- package/dist/components/icon/index.d.ts +21 -3
- package/dist/components/icon/index.js +7 -4
- package/dist/components/icon/src/icon.d.ts +34 -0
- package/dist/components/icon/src/icon.js +16 -0
- package/dist/components/icon/src/icon.vue.d.ts +13 -0
- package/dist/components/icon/src/icon.vue.js +36 -0
- package/dist/components/icon/src/icon2.vue.js +4 -0
- package/dist/components/menu/menu.d.ts +8 -8
- package/dist/components/popper/index.d.ts +54 -3
- package/dist/components/popper/index.js +30 -5
- package/dist/components/popper/src/arrow.d.ts +30 -0
- package/dist/components/popper/src/arrow.js +14 -0
- package/dist/components/popper/src/arrow.vue.d.ts +7 -0
- package/dist/components/popper/src/arrow.vue.js +4 -0
- package/dist/components/popper/src/arrow2.vue.js +37 -0
- package/dist/components/popper/src/composables/index.d.ts +4 -0
- package/dist/components/popper/src/composables/use-content-dom.d.ts +40 -0
- package/dist/components/popper/src/composables/use-content-dom.js +45 -0
- package/dist/components/popper/src/composables/use-content.d.ts +77 -0
- package/dist/components/popper/src/composables/use-content.js +76 -0
- package/dist/components/popper/src/composables/use-focus-trap.d.ts +12 -0
- package/dist/components/popper/src/composables/use-focus-trap.js +29 -0
- package/dist/components/popper/src/constants.d.ts +23 -0
- package/dist/components/popper/src/constants.js +5 -0
- package/dist/components/popper/src/content.d.ts +234 -0
- package/dist/components/popper/src/content.js +129 -0
- package/dist/components/popper/src/content.vue.d.ts +61 -0
- package/dist/components/popper/src/content.vue.js +4 -0
- package/dist/components/popper/src/content2.vue.js +151 -0
- package/dist/components/popper/src/popper.d.ts +35 -0
- package/dist/components/popper/src/popper.js +22 -0
- package/dist/components/popper/src/popper.vue.d.ts +22 -0
- package/dist/components/popper/src/popper.vue.js +38 -0
- package/dist/components/popper/src/popper2.vue.js +4 -0
- package/dist/components/popper/src/trigger.d.ts +130 -0
- package/dist/components/popper/src/trigger.js +36 -0
- package/dist/components/popper/src/trigger.vue.d.ts +18 -0
- package/dist/components/popper/src/trigger.vue.js +4 -0
- package/dist/components/popper/src/trigger2.vue.js +134 -0
- package/dist/components/popper/src/utils.d.ts +48 -0
- package/dist/components/popper/src/utils.js +57 -0
- package/dist/components/radio/radio.d.ts +2 -2
- package/dist/components/radio-button/radio-button.d.ts +2 -2
- package/dist/components/radio-group/radio-group.d.ts +2 -2
- package/dist/components/slot/index.d.ts +3 -0
- package/dist/components/slot/src/only-child.d.ts +7 -0
- package/dist/components/slot/src/only-child.js +55 -0
- package/dist/components/tab-pane/tab-pane.d.ts +2 -2
- package/dist/components/tabs/tabs.d.ts +2 -2
- package/dist/components/tag/EpTag.vue.d.ts +4 -4
- package/dist/components/tag/EpTag.vue.js +96 -0
- package/dist/components/tag/EpTag2.vue.js +4 -0
- package/dist/components/tag/index.d.ts +2 -2
- package/dist/components/tag/index.js +2 -3
- package/dist/components/tag/tag.js +38 -0
- package/dist/components/tooltip/index.d.ts +174 -3
- package/dist/components/tooltip/index.js +18 -5
- package/dist/components/tooltip/src/constants.d.ts +18 -0
- package/dist/components/tooltip/src/constants.js +4 -0
- package/dist/components/tooltip/src/content.d.ts +327 -0
- package/dist/components/tooltip/src/content.js +72 -0
- package/dist/components/tooltip/src/content.vue.d.ts +47 -0
- package/dist/components/tooltip/src/content.vue.js +188 -0
- package/dist/components/tooltip/src/content2.vue.js +4 -0
- package/dist/components/tooltip/src/tooltip.d.ts +346 -0
- package/dist/components/tooltip/src/tooltip.js +47 -0
- package/dist/components/tooltip/src/tooltip.vue.d.ts +90 -0
- package/dist/components/tooltip/src/tooltip.vue.js +236 -0
- package/dist/components/tooltip/src/tooltip2.vue.js +4 -0
- package/dist/components/tooltip/src/trigger.d.ts +94 -0
- package/dist/components/tooltip/src/trigger.js +41 -0
- package/dist/components/tooltip/src/trigger.vue.d.ts +26 -0
- package/dist/components/tooltip/src/trigger.vue.js +104 -0
- package/dist/components/tooltip/src/trigger2.vue.js +4 -0
- package/dist/components/tooltip/src/utils.d.ts +5 -0
- package/dist/components/tooltip/src/utils.js +9 -0
- package/dist/constants/aria.d.ts +17 -0
- package/dist/constants/aria.js +24 -0
- package/dist/constants/column-alignment.d.ts +2 -0
- package/dist/constants/date.d.ts +3 -0
- package/dist/constants/event.d.ts +3 -0
- package/dist/constants/form.d.ts +2 -0
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/key.d.ts +1 -0
- package/dist/constants/size.d.ts +7 -0
- package/dist/constants/size.js +4 -0
- package/dist/directives/click-outside/index.d.ts +3 -0
- package/dist/directives/index.d.ts +5 -0
- package/dist/directives/mousewheel/index.d.ts +11 -0
- package/dist/directives/repeat-click/index.d.ts +17 -0
- package/dist/directives/trap-focus/index.d.ts +9 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/use-aria/index.d.ts +37 -0
- package/dist/hooks/use-aria/index.js +24 -0
- package/dist/hooks/use-delayed-toggle/index.d.ts +36 -0
- package/dist/hooks/use-delayed-toggle/index.js +63 -0
- package/dist/hooks/use-deprecated/index.d.ts +11 -0
- package/dist/hooks/use-empty-values/index.d.ts +29 -0
- package/dist/hooks/use-empty-values/index.js +23 -0
- package/dist/hooks/use-escape-keydown/index.d.ts +1 -0
- package/dist/hooks/use-escape-keydown/index.js +21 -0
- package/dist/hooks/use-forward-ref/index.d.ts +9 -0
- package/dist/hooks/use-forward-ref/index.js +23 -0
- package/dist/hooks/use-id/index.d.ts +8 -0
- package/dist/hooks/use-id/index.js +27 -0
- package/dist/hooks/use-locale/index.d.ts +17 -0
- package/dist/hooks/use-model-toggle/index.d.ts +46 -0
- package/dist/hooks/use-model-toggle/index.js +67 -0
- package/dist/hooks/use-namespace/index.d.ts +23 -0
- package/dist/hooks/use-namespace/index.js +45 -0
- package/dist/hooks/use-ordered-children/index.d.ts +14 -0
- package/dist/hooks/use-popper/index.d.ts +78 -0
- package/dist/hooks/use-popper/index.js +97 -0
- package/dist/hooks/use-popper-container/index.d.ts +8 -0
- package/dist/hooks/use-popper-container/index.js +26 -0
- package/dist/hooks/use-prop/index.d.ts +2 -0
- package/dist/hooks/use-size/index.d.ts +21 -0
- package/dist/hooks/use-size/index.js +8 -0
- package/dist/hooks/use-timeout/index.d.ts +4 -0
- package/dist/hooks/use-timeout/index.js +16 -0
- package/dist/hooks/use-z-index/index.d.ts +13 -0
- package/dist/hooks/use-z-index/index.js +27 -0
- package/dist/node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/anchor/src/anchor.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/node_modules/.pnpm/element-plus@2.14.3_vue@3.5.40_typescript@5.9.3_/node_modules/element-plus/es/components/button/index.js +2 -2
- package/dist/resolver.js +13 -12
- package/dist/utils/arrays.d.ts +6 -0
- package/dist/utils/arrays.js +5 -0
- package/dist/utils/browser.d.ts +4 -0
- package/dist/utils/browser.js +6 -0
- package/dist/utils/dom/aria.d.ts +26 -0
- package/dist/utils/dom/aria.js +26 -0
- package/dist/utils/dom/element.d.ts +3 -0
- package/dist/utils/dom/event.d.ts +8 -0
- package/dist/utils/dom/event.js +32 -0
- package/dist/utils/dom/index.d.ts +7 -0
- package/dist/utils/dom/position.d.ts +7 -0
- package/dist/utils/dom/scroll.d.ts +11 -0
- package/dist/utils/dom/style.d.ts +9 -0
- package/dist/utils/dom/style.js +15 -0
- package/dist/utils/easings.d.ts +1 -0
- package/dist/utils/error.d.ts +3 -0
- package/dist/utils/error.js +15 -0
- package/dist/utils/functions.d.ts +2 -0
- package/dist/utils/i18n.d.ts +4 -0
- package/dist/utils/index.d.ts +31 -0
- package/dist/utils/numbers.d.ts +6 -0
- package/dist/utils/objects.d.ts +7 -0
- package/dist/utils/raf.d.ts +2 -0
- package/dist/utils/rand.d.ts +12 -0
- package/dist/utils/strings.d.ts +8 -0
- package/dist/utils/throttleByRaf.d.ts +4 -0
- package/dist/utils/types.d.ts +9 -0
- package/dist/utils/types.js +16 -0
- package/dist/utils/typescript.d.ts +93 -0
- package/dist/utils/vue/global-node.d.ts +3 -0
- package/dist/utils/vue/icon.d.ts +27 -0
- package/dist/utils/vue/index.d.ts +9 -0
- package/dist/utils/vue/install.d.ts +7 -0
- package/dist/utils/vue/install.js +34 -0
- package/dist/utils/vue/props/index.d.ts +2 -0
- package/dist/utils/vue/props/runtime.d.ts +29 -0
- package/dist/utils/vue/props/runtime.js +36 -0
- package/dist/utils/vue/props/types.d.ts +85 -0
- package/dist/utils/vue/props/util.d.ts +7 -0
- package/dist/utils/vue/refs.d.ts +2 -0
- package/dist/utils/vue/size.d.ts +2 -0
- package/dist/utils/vue/typescript.d.ts +25 -0
- package/dist/utils/vue/validator.d.ts +3 -0
- package/dist/utils/vue/vnode.d.ts +48 -0
- package/dist/vendored-components.d.ts +13 -0
- package/dist/vendored-components.js +22 -0
- package/package.json +11 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { isArray, isFunction, isObject, isString, isDate, isPromise, isSymbol, isPlainObject, } from '@vue/shared';
|
|
2
|
+
export declare const isUndefined: (val: any) => val is undefined;
|
|
3
|
+
export declare const isBoolean: (val: any) => val is boolean;
|
|
4
|
+
export declare const isNumber: (val: any) => val is number;
|
|
5
|
+
export declare const isEmpty: (val: unknown) => boolean;
|
|
6
|
+
export declare const isElement: (e: unknown) => e is Element;
|
|
7
|
+
export declare const isPropAbsent: (prop: unknown) => prop is null | undefined;
|
|
8
|
+
export declare const isStringNumber: (val: string) => boolean;
|
|
9
|
+
export declare const isWindow: (val: unknown) => val is Window;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isString as t } from "../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
|
|
2
|
+
import { isArray as u, isDate as a, isFunction as b, isObject as c, isPlainObject as l, isPromise as p } from "../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
|
|
3
|
+
const r = (e) => typeof e == "boolean", i = (e) => typeof e == "number", s = (e) => typeof Element > "u" ? !1 : e instanceof Element, o = (e) => t(e) ? !Number.isNaN(Number(e)) : !1;
|
|
4
|
+
export {
|
|
5
|
+
u as isArray,
|
|
6
|
+
r as isBoolean,
|
|
7
|
+
a as isDate,
|
|
8
|
+
s as isElement,
|
|
9
|
+
b as isFunction,
|
|
10
|
+
i as isNumber,
|
|
11
|
+
c as isObject,
|
|
12
|
+
l as isPlainObject,
|
|
13
|
+
p as isPromise,
|
|
14
|
+
t as isString,
|
|
15
|
+
o as isStringNumber
|
|
16
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type * as CSS from 'csstype';
|
|
2
|
+
export declare const mutable: <T extends readonly any[] | Record<string, unknown>>(val: T) => Mutable<typeof val>;
|
|
3
|
+
export type Mutable<T> = {
|
|
4
|
+
-readonly [P in keyof T]: T[P];
|
|
5
|
+
};
|
|
6
|
+
export type HTMLElementCustomized<T> = HTMLElement & T;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated stop to use null
|
|
9
|
+
* @see {@link https://github.com/sindresorhus/meta/discussions/7}
|
|
10
|
+
*/
|
|
11
|
+
export type Nullable<T> = T | null;
|
|
12
|
+
export type Arrayable<T> = T | T[];
|
|
13
|
+
export type Awaitable<T> = Promise<T> | T;
|
|
14
|
+
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
15
|
+
type BrowserNativeObject = Date | FileList | File | Blob | RegExp;
|
|
16
|
+
/**
|
|
17
|
+
* Check whether it is tuple
|
|
18
|
+
*
|
|
19
|
+
* 检查是否为元组
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* IsTuple<[1, 2, 3]> => true
|
|
23
|
+
* IsTuple<Array[number]> => false
|
|
24
|
+
*/
|
|
25
|
+
type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
|
|
26
|
+
/**
|
|
27
|
+
* Array method key
|
|
28
|
+
*
|
|
29
|
+
* 数组方法键
|
|
30
|
+
*/
|
|
31
|
+
type ArrayMethodKey = keyof any[];
|
|
32
|
+
/**
|
|
33
|
+
* Tuple index key
|
|
34
|
+
*
|
|
35
|
+
* 元组下标键
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* TupleKey<[1, 2, 3]> => '0' | '1' | '2'
|
|
39
|
+
*/
|
|
40
|
+
type TupleKey<T extends ReadonlyArray<any>> = Exclude<keyof T, ArrayMethodKey>;
|
|
41
|
+
/**
|
|
42
|
+
* Array index key
|
|
43
|
+
*
|
|
44
|
+
* 数组下标键
|
|
45
|
+
*/
|
|
46
|
+
type ArrayKey = number;
|
|
47
|
+
/**
|
|
48
|
+
* Helper type for recursively constructing paths through a type
|
|
49
|
+
*
|
|
50
|
+
* 用于通过一个类型递归构建路径的辅助类型
|
|
51
|
+
*/
|
|
52
|
+
type PathImpl<K extends string | number, V> = V extends Primitive | BrowserNativeObject ? `${K}` : `${K}` | `${K}.${Path<V>}`;
|
|
53
|
+
/**
|
|
54
|
+
* Type which collects all paths through a type
|
|
55
|
+
*
|
|
56
|
+
* 通过一个类型收集所有路径的类型
|
|
57
|
+
*
|
|
58
|
+
* @see {@link FieldPath}
|
|
59
|
+
*/
|
|
60
|
+
type Path<T> = T extends ReadonlyArray<infer V> ? IsTuple<T> extends true ? {
|
|
61
|
+
[K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K]>;
|
|
62
|
+
}[TupleKey<T>] : PathImpl<ArrayKey, V> : {
|
|
63
|
+
[K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K]>;
|
|
64
|
+
}[keyof T];
|
|
65
|
+
/**
|
|
66
|
+
* Type which collects all paths through a type
|
|
67
|
+
*
|
|
68
|
+
* 通过一个类型收集所有路径的类型
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* FieldPath<{ 1: number; a: number; b: string; c: { d: number; e: string }; f: [{ value: string }]; g: { value: string }[]; h: Date; i: FileList; j: File; k: Blob; l: RegExp }> => '1' | 'a' | 'b' | 'c' | 'f' | 'g' | 'c.d' | 'c.e' | 'f.0' | 'f.0.value' | 'g.number' | 'g.number.value' | 'h' | 'i' | 'j' | 'k' | 'l'
|
|
72
|
+
*/
|
|
73
|
+
export type FieldPath<T> = T extends object ? Path<T> : never;
|
|
74
|
+
/**
|
|
75
|
+
* csstype 是 vue的依赖,因此,直接从vue中导入CSSProperties会导致ts类型解析错误,参考 https://github.com/pnpm/pnpm/issues/7453,因此,我们直接安装csstype,并从csstype中导入CSSProperties
|
|
76
|
+
*
|
|
77
|
+
* csstype is a dependency of vue, so importing CSSProperties directly from vue will cause ts type parsing errors, see https://github.com/pnpm/pnpm/issues/7453. Therefore, we directly install csstype and import CSSProperties from csstype.
|
|
78
|
+
*/
|
|
79
|
+
export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> {
|
|
80
|
+
/**
|
|
81
|
+
* The index signature was removed to enable closed typing for style
|
|
82
|
+
* using CSSType. You're able to use type assertion or module augmentation
|
|
83
|
+
* to add properties or an index signature of your own.
|
|
84
|
+
*
|
|
85
|
+
* For examples and more information, visit:
|
|
86
|
+
* https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
|
|
87
|
+
*/
|
|
88
|
+
[v: `--${string}`]: string | number | undefined;
|
|
89
|
+
}
|
|
90
|
+
export type ObjectFit = CSSProperties['objectFit'];
|
|
91
|
+
export type ZIndexType = CSSProperties['zIndex'];
|
|
92
|
+
export type AlignItems = CSSProperties['alignItems'];
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Loading } from '@element-plus/icons-vue';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
export type IconPropType = string | Component;
|
|
4
|
+
export declare const iconPropType: import("vue").PropType<string | Component>;
|
|
5
|
+
export declare const CloseComponents: {
|
|
6
|
+
Close: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
};
|
|
8
|
+
export declare const TypeComponents: {
|
|
9
|
+
Close: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
SuccessFilled: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
InfoFilled: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
WarningFilled: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
CircleCloseFilled: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
};
|
|
15
|
+
export declare const TypeComponentsMap: {
|
|
16
|
+
primary: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
success: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
warning: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
error: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
info: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
};
|
|
22
|
+
export declare const ValidateComponentsMap: {
|
|
23
|
+
validating: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
success: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
error: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
26
|
+
};
|
|
27
|
+
export type IconComponent = typeof Loading;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode } from "./global-node";
|
|
2
|
+
import { buildProp, buildProps, definePropType, epPropKey, isEpProp } from "./props/runtime";
|
|
3
|
+
import { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType } from "./icon";
|
|
4
|
+
import { withInstall, withInstallDirective, withInstallFunction, withNoopInstall, withPropsDefaultsSetter } from "./install";
|
|
5
|
+
import { composeRefs } from "./refs";
|
|
6
|
+
import { getComponentSize } from "./size";
|
|
7
|
+
import { isValidComponentSize, isValidDatePickType } from "./validator";
|
|
8
|
+
import { PatchFlags, flattedChildren, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from "./vnode";
|
|
9
|
+
export { CloseComponents, PatchFlags, TypeComponents, TypeComponentsMap, ValidateComponentsMap, buildProp, buildProps, changeGlobalNodesTarget, composeRefs, createGlobalNode, definePropType, epPropKey, flattedChildren, getComponentSize, getFirstValidNode, getNormalizedProps, iconPropType, isComment, isEpProp, isFragment, isTemplate, isText, isValidComponentSize, isValidDatePickType, isValidElementNode, removeGlobalNode, renderBlock, renderIf, withInstall, withInstallDirective, withInstallFunction, withNoopInstall, withPropsDefaultsSetter };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Directive } from 'vue';
|
|
2
|
+
import type { SFCInstallWithContext, SFCWithInstall } from './typescript';
|
|
3
|
+
export declare const withPropsDefaultsSetter: (target: any) => void;
|
|
4
|
+
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
|
|
5
|
+
export declare const withInstallFunction: <T>(fn: T, name: string) => SFCInstallWithContext<T>;
|
|
6
|
+
export declare const withInstallDirective: <T extends Directive>(directive: T, name: string) => SFCWithInstall<T>;
|
|
7
|
+
export declare const withNoopInstall: <T>(component: T) => SFCWithInstall<T>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isArray as f, hasOwn as c } from "../../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
|
|
2
|
+
import i from "../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/fromPairs.js";
|
|
3
|
+
import l from "../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js";
|
|
4
|
+
const a = (o) => {
|
|
5
|
+
const s = o.props, t = f(s) ? i(s.map((r) => [r, {}])) : s;
|
|
6
|
+
o.setPropsDefaults = (r) => {
|
|
7
|
+
if (t) {
|
|
8
|
+
for (const [e, n] of Object.entries(r)) {
|
|
9
|
+
const p = t[e];
|
|
10
|
+
if (c(t, e)) {
|
|
11
|
+
if (l(p)) {
|
|
12
|
+
t[e] = {
|
|
13
|
+
...p,
|
|
14
|
+
default: n
|
|
15
|
+
};
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
t[e] = {
|
|
19
|
+
type: p,
|
|
20
|
+
default: n
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
o.props = t;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}, P = (o, s) => (o.install = (t) => {
|
|
28
|
+
for (const r of [o, ...Object.values({})])
|
|
29
|
+
t.component(r.name, r);
|
|
30
|
+
}, a(o), o);
|
|
31
|
+
export {
|
|
32
|
+
P as withInstall,
|
|
33
|
+
a as withPropsDefaultsSetter
|
|
34
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { EpProp, EpPropConvert, EpPropFinalized, EpPropInput, EpPropMergeType, IfEpProp, IfNativePropType, NativePropType } from './types';
|
|
3
|
+
export declare const epPropKey = "__epPropKey";
|
|
4
|
+
export declare const definePropType: <T>(val: any) => PropType<T>;
|
|
5
|
+
export declare const isEpProp: (val: unknown) => val is EpProp<any, any, any>;
|
|
6
|
+
/**
|
|
7
|
+
* @description Build prop. It can better optimize prop types
|
|
8
|
+
* @description 生成 prop,能更好地优化类型
|
|
9
|
+
* @example
|
|
10
|
+
// limited options
|
|
11
|
+
// the type will be PropType<'light' | 'dark'>
|
|
12
|
+
buildProp({
|
|
13
|
+
type: String,
|
|
14
|
+
values: ['light', 'dark'],
|
|
15
|
+
} as const)
|
|
16
|
+
* @example
|
|
17
|
+
// limited options and other types
|
|
18
|
+
// the type will be PropType<'small' | 'large' | number>
|
|
19
|
+
buildProp({
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
values: ['small', 'large'],
|
|
22
|
+
validator: (val: unknown): val is number => typeof val === 'number',
|
|
23
|
+
} as const)
|
|
24
|
+
@link see more: https://github.com/element-plus/element-plus/pull/3341
|
|
25
|
+
*/
|
|
26
|
+
export declare const buildProp: <Type = never, Value = never, Validator = never, Default extends EpPropMergeType<Type, Value, Validator> = never, Required extends boolean = false>(prop: EpPropInput<Type, Value, Validator, Default, Required>, key?: string) => EpPropFinalized<Type, Value, Validator, Default, Required>;
|
|
27
|
+
export declare const buildProps: <Props extends Record<string, {
|
|
28
|
+
[epPropKey]: true;
|
|
29
|
+
} | NativePropType | EpPropInput<any, any, any, any, any>>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { warn as v } from "vue";
|
|
2
|
+
import { isObject as d, hasOwn as s } from "../../../node_modules/.pnpm/@vue_shared@3.5.40/node_modules/@vue/shared/dist/shared.esm-bundler.js";
|
|
3
|
+
import w from "../../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/fromPairs.js";
|
|
4
|
+
const u = "__epPropKey", h = (e) => e, y = (e) => d(e) && !!e[u], O = (e, t) => {
|
|
5
|
+
if (!d(e) || y(e)) return e;
|
|
6
|
+
const { values: r, required: p, default: n, type: c, validator: a } = e, f = {
|
|
7
|
+
type: c,
|
|
8
|
+
required: !!p,
|
|
9
|
+
validator: r || a ? (l) => {
|
|
10
|
+
let i = !1, o = [];
|
|
11
|
+
if (r && (o = Array.from(r), s(e, "default") && o.push(n), i || (i = o.includes(l))), a && (i || (i = a(l))), !i && o.length > 0) {
|
|
12
|
+
const m = [...new Set(o)].map((P) => JSON.stringify(P)).join(", ");
|
|
13
|
+
v(
|
|
14
|
+
`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${m}], got value ${JSON.stringify(
|
|
15
|
+
l
|
|
16
|
+
)}.`
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
return i;
|
|
20
|
+
} : void 0,
|
|
21
|
+
[u]: !0
|
|
22
|
+
};
|
|
23
|
+
return s(e, "default") && (f.default = n), f;
|
|
24
|
+
}, j = (e) => w(
|
|
25
|
+
Object.entries(e).map(([t, r]) => [
|
|
26
|
+
t,
|
|
27
|
+
O(r, t)
|
|
28
|
+
])
|
|
29
|
+
);
|
|
30
|
+
export {
|
|
31
|
+
O as buildProp,
|
|
32
|
+
j as buildProps,
|
|
33
|
+
h as definePropType,
|
|
34
|
+
u as epPropKey,
|
|
35
|
+
y as isEpProp
|
|
36
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { IfNever, UnknownToNever, WritableArray } from './util';
|
|
2
|
+
import { epPropKey } from './runtime';
|
|
3
|
+
import type { ExtractPropTypes, PropType } from 'vue';
|
|
4
|
+
type Value<T> = T[keyof T];
|
|
5
|
+
/**
|
|
6
|
+
* Extract the type of a single prop
|
|
7
|
+
*
|
|
8
|
+
* 提取单个 prop 的参数类型
|
|
9
|
+
*/
|
|
10
|
+
export type ExtractPropType<T extends object> = Value<ExtractPropTypes<{
|
|
11
|
+
key: T;
|
|
12
|
+
}>>;
|
|
13
|
+
/**
|
|
14
|
+
* Extracts types via `ExtractPropTypes`, accepting `PropType<T>`, `XXXConstructor`, `never`...
|
|
15
|
+
*
|
|
16
|
+
* 通过 `ExtractPropTypes` 提取类型,接受 `PropType<T>`、`XXXConstructor`、`never`...
|
|
17
|
+
*/
|
|
18
|
+
export type ResolvePropType<T> = IfNever<T, never, ExtractPropType<{
|
|
19
|
+
type: WritableArray<T>;
|
|
20
|
+
required: true;
|
|
21
|
+
}>>;
|
|
22
|
+
/**
|
|
23
|
+
* Merge Type, Value, Validator types
|
|
24
|
+
* 合并 Type、Value、Validator 的类型
|
|
25
|
+
*/
|
|
26
|
+
export type EpPropMergeType<Type, Value, Validator> = IfNever<UnknownToNever<Value>, ResolvePropType<Type>, never> | UnknownToNever<Value> | UnknownToNever<Validator>;
|
|
27
|
+
/**
|
|
28
|
+
* Handling default values for input (constraints)
|
|
29
|
+
*
|
|
30
|
+
* 处理输入参数的默认值(约束)
|
|
31
|
+
*/
|
|
32
|
+
export type EpPropInputDefault<Required extends boolean, Default> = Required extends true ? never : Default extends Record<string, unknown> | Array<any> ? () => Default : (() => Default) | Default;
|
|
33
|
+
/**
|
|
34
|
+
* Native prop types, e.g: `BooleanConstructor`, `StringConstructor`, `null`, `undefined`, etc.
|
|
35
|
+
*
|
|
36
|
+
* 原生 prop 类型,如 `BooleanConstructor`、`StringConstructor`、`null`、`undefined` 等
|
|
37
|
+
*/
|
|
38
|
+
export type NativePropType = ((...args: any) => any) | {
|
|
39
|
+
new (...args: any): any;
|
|
40
|
+
} | undefined | null;
|
|
41
|
+
export type IfNativePropType<T, Y, N> = [T] extends [NativePropType] ? Y : N;
|
|
42
|
+
/**
|
|
43
|
+
* input prop `buildProp` or `buildProps` (constraints)
|
|
44
|
+
*
|
|
45
|
+
* prop 输入参数(约束)
|
|
46
|
+
*/
|
|
47
|
+
export type EpPropInput<Type, Value, Validator, Default extends EpPropMergeType<Type, Value, Validator>, Required extends boolean> = {
|
|
48
|
+
type?: Type;
|
|
49
|
+
required?: Required;
|
|
50
|
+
values?: readonly Value[];
|
|
51
|
+
validator?: ((val: any) => val is Validator) | ((val: any) => boolean);
|
|
52
|
+
default?: EpPropInputDefault<Required, Default>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* output prop `buildProp` or `buildProps`.
|
|
56
|
+
*
|
|
57
|
+
* prop 输出参数。
|
|
58
|
+
*/
|
|
59
|
+
export type EpProp<Type, Default, Required> = {
|
|
60
|
+
readonly type: PropType<Type>;
|
|
61
|
+
readonly required: [Required] extends [true] ? true : false;
|
|
62
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
63
|
+
[epPropKey]: true;
|
|
64
|
+
} & IfNever<Default, unknown, {
|
|
65
|
+
readonly default: Default;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Determine if it is `EpProp`
|
|
69
|
+
*/
|
|
70
|
+
export type IfEpProp<T, Y, N> = T extends {
|
|
71
|
+
[epPropKey]: true;
|
|
72
|
+
} ? Y : N;
|
|
73
|
+
/**
|
|
74
|
+
* Converting input to output.
|
|
75
|
+
*
|
|
76
|
+
* 将输入转换为输出
|
|
77
|
+
*/
|
|
78
|
+
export type EpPropConvert<Input> = Input extends EpPropInput<infer Type, infer Value, infer Validator, any, infer Required> ? EpPropFinalized<Type, Value, Validator, Input['default'], Required> : never;
|
|
79
|
+
/**
|
|
80
|
+
* Finalized conversion output
|
|
81
|
+
*
|
|
82
|
+
* 最终转换 EpProp
|
|
83
|
+
*/
|
|
84
|
+
export type EpPropFinalized<Type, Value, Validator, Default, Required> = EpProp<EpPropMergeType<Type, Value, Validator>, UnknownToNever<Default>, Required>;
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type Writable<T> = {
|
|
2
|
+
-readonly [P in keyof T]: T[P];
|
|
3
|
+
};
|
|
4
|
+
export type WritableArray<T> = T extends readonly any[] ? Writable<T> : T;
|
|
5
|
+
export type IfNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
|
|
6
|
+
export type IfUnknown<T, Y, N> = [unknown] extends [T] ? Y : N;
|
|
7
|
+
export type UnknownToNever<T> = IfUnknown<T, never, T>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AllowedComponentProps, AppContext, Component, EmitsOptions, ObjectPlugin, SetupContext, VNodeProps } from 'vue';
|
|
2
|
+
import type { ComponentEmit, ComponentProps } from 'vue-component-type-helpers';
|
|
3
|
+
type NativeType = null | undefined | number | string | boolean | symbol | Function;
|
|
4
|
+
/**
|
|
5
|
+
* Reference from https://github.com/vuejs/core/blob/main/packages/runtime-core/src/apiSetupHelpers.ts#L338-L340
|
|
6
|
+
*/
|
|
7
|
+
type InferDefaults<T> = {
|
|
8
|
+
[K in keyof T as string extends K ? never : K]?: InferDefault<T[K]>;
|
|
9
|
+
};
|
|
10
|
+
type InferDefault<T> = (() => T & {}) | (T extends NativeType ? T : never);
|
|
11
|
+
type ExtractEventNames<T> = ComponentEmit<T> extends ((event: string, ...args: any[]) => any) ? never : keyof {
|
|
12
|
+
[K in keyof ComponentProps<T> as K extends `on${infer Event}` ? ComponentEmit<T> extends ((event: Uncapitalize<Event>, ...args: any[]) => any) ? K : never : never]: unknown;
|
|
13
|
+
};
|
|
14
|
+
type ExcludedProps<T> = ExtractEventNames<T> | keyof VNodeProps | keyof AllowedComponentProps;
|
|
15
|
+
export type SFCWithInstall<T> = T & ObjectPlugin & SFCWithPropsDefaultsSetter<T>;
|
|
16
|
+
export type SFCInstallWithContext<T> = SFCWithInstall<T> & {
|
|
17
|
+
_context: AppContext | null;
|
|
18
|
+
};
|
|
19
|
+
type SFCWithPropsDefaultsSetter<T> = T extends Component ? {
|
|
20
|
+
setPropsDefaults: (defaults: InferDefaults<{
|
|
21
|
+
[K in keyof ComponentProps<T> as K extends ExcludedProps<T> ? never : K]?: ComponentProps<T>[K];
|
|
22
|
+
}>) => void;
|
|
23
|
+
} : unknown;
|
|
24
|
+
export type EmitFn<E extends EmitsOptions> = SetupContext<E>['emit'];
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createBlock } from 'vue';
|
|
2
|
+
import type { VNode, VNodeChild, VNodeNormalizedChildren } from 'vue';
|
|
3
|
+
export declare enum PatchFlags {
|
|
4
|
+
TEXT = 1,
|
|
5
|
+
CLASS = 2,
|
|
6
|
+
STYLE = 4,
|
|
7
|
+
PROPS = 8,
|
|
8
|
+
FULL_PROPS = 16,
|
|
9
|
+
HYDRATE_EVENTS = 32,
|
|
10
|
+
STABLE_FRAGMENT = 64,
|
|
11
|
+
KEYED_FRAGMENT = 128,
|
|
12
|
+
UNKEYED_FRAGMENT = 256,
|
|
13
|
+
NEED_PATCH = 512,
|
|
14
|
+
DYNAMIC_SLOTS = 1024,
|
|
15
|
+
HOISTED = -1,
|
|
16
|
+
BAIL = -2
|
|
17
|
+
}
|
|
18
|
+
export type VNodeChildAtom = Exclude<VNodeChild, Array<any>>;
|
|
19
|
+
export type RawSlots = Exclude<VNodeNormalizedChildren, Array<any> | null | string>;
|
|
20
|
+
export declare function isFragment(node: VNode): boolean;
|
|
21
|
+
export declare function isFragment(node: unknown): node is VNode;
|
|
22
|
+
export declare function isText(node: VNode): boolean;
|
|
23
|
+
export declare function isText(node: unknown): node is VNode;
|
|
24
|
+
export declare function isComment(node: VNode): boolean;
|
|
25
|
+
export declare function isComment(node: unknown): node is VNode;
|
|
26
|
+
export declare function isTemplate(node: VNode): boolean;
|
|
27
|
+
export declare function isTemplate(node: unknown): node is VNode;
|
|
28
|
+
/**
|
|
29
|
+
* determine if the element is a valid element type rather than fragments and comment e.g. <template> v-if
|
|
30
|
+
* @param node {VNode} node to be tested
|
|
31
|
+
*/
|
|
32
|
+
export declare function isValidElementNode(node: VNode): boolean;
|
|
33
|
+
export declare function isValidElementNode(node: unknown): node is VNode;
|
|
34
|
+
export declare const getFirstValidNode: (nodes: VNodeNormalizedChildren, maxDepth?: number) => string | number | boolean | void | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}> | import("vue").VNodeArrayChildren | {
|
|
37
|
+
[name: string]: unknown;
|
|
38
|
+
$stable?: boolean;
|
|
39
|
+
} | null | undefined;
|
|
40
|
+
export declare function renderIf(condition: boolean, ...args: Parameters<typeof createBlock>): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}>;
|
|
43
|
+
export declare function renderBlock(...args: Parameters<typeof createBlock>): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}>;
|
|
46
|
+
export declare const getNormalizedProps: (node: VNode) => Record<string, any>;
|
|
47
|
+
export type FlattenVNodes = Array<VNodeChildAtom | RawSlots>;
|
|
48
|
+
export declare const flattedChildren: (children: FlattenVNodes | VNode | VNodeNormalizedChildren) => FlattenVNodes;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 已源码化(vendored)组件的权威清单 —— 单一事实来源。
|
|
3
|
+
*
|
|
4
|
+
* 判定某组件是否源码化的唯一依据。以下工具/代码均从本清单派生,不得各自维护副本:
|
|
5
|
+
* - scripts/gen-components.ts:生成包装文件时跳过源码化组件。
|
|
6
|
+
* - src/resolver.ts:按需导入解析器区分源码化 / 包装组件。
|
|
7
|
+
*
|
|
8
|
+
* 源码化原因:element-plus 的菜单 / 标签页 / 单选框组件内部按 `type.name === 'ElXxx'`
|
|
9
|
+
* 查找父级或子级,改名包装(ElXxx -> EpXxx)会破坏父子识别,必须 vendor 源码。
|
|
10
|
+
*/
|
|
11
|
+
export declare const vendoredComponents: readonly ["Affix", "Alert", "Anchor", "AnchorLink", "Button", "CheckTag", "Tag", "Menu", "MenuItem", "MenuItemGroup", "SubMenu", "Tabs", "TabPane", "Radio", "RadioButton", "RadioGroup"];
|
|
12
|
+
export type VendoredComponentName = (typeof vendoredComponents)[number];
|
|
13
|
+
export declare const isVendored: (name: string) => boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const e = [
|
|
2
|
+
"Affix",
|
|
3
|
+
"Alert",
|
|
4
|
+
"Anchor",
|
|
5
|
+
"AnchorLink",
|
|
6
|
+
"Button",
|
|
7
|
+
"CheckTag",
|
|
8
|
+
"Tag",
|
|
9
|
+
"Menu",
|
|
10
|
+
"MenuItem",
|
|
11
|
+
"MenuItemGroup",
|
|
12
|
+
"SubMenu",
|
|
13
|
+
"Tabs",
|
|
14
|
+
"TabPane",
|
|
15
|
+
"Radio",
|
|
16
|
+
"RadioButton",
|
|
17
|
+
"RadioGroup"
|
|
18
|
+
], o = (n) => e.includes(n);
|
|
19
|
+
export {
|
|
20
|
+
o as isVendored,
|
|
21
|
+
e as vendoredComponents
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep-craft",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "A Vue 3 component library based on element-plus with ep- prefix",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/ep-craft.js",
|
|
@@ -62,7 +62,14 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@ctrl/tinycolor": "^4.2.0",
|
|
64
64
|
"@element-plus/icons-vue": "^2.3.0",
|
|
65
|
-
"
|
|
65
|
+
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.8",
|
|
66
|
+
"@vue/shared": "^3.5.40",
|
|
67
|
+
"@vueuse/core": "14.3.0",
|
|
68
|
+
"csstype": "^3.2.3",
|
|
69
|
+
"element-plus": "^2.9.0",
|
|
70
|
+
"lodash-unified": "^1.0.3",
|
|
71
|
+
"normalize-wheel-es": "^1.2.0",
|
|
72
|
+
"vue-component-type-helpers": "^3.3.5"
|
|
66
73
|
},
|
|
67
74
|
"devDependencies": {
|
|
68
75
|
"@types/node": "^20.11.0",
|
|
@@ -73,7 +80,8 @@
|
|
|
73
80
|
"vite": "^5.4.0",
|
|
74
81
|
"vitepress": "^1.6.4",
|
|
75
82
|
"vue": "^3.4.0",
|
|
76
|
-
"vue-tsc": "^2.0.0"
|
|
83
|
+
"vue-tsc": "^2.0.0",
|
|
84
|
+
"vue-router": "^4.3.0"
|
|
77
85
|
},
|
|
78
86
|
"keywords": [
|
|
79
87
|
"vue",
|