@robot-admin/naive-ui-components 0.6.8 → 0.6.11
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/README.md +277 -261
- package/dist/C_AudioPlayer-DKRIGhi7.css.map +1 -0
- package/dist/C_AudioPlayer-DlB6eNsa.css.map +1 -0
- package/dist/C_AudioPlayer.cjs +1 -0
- package/dist/C_AudioPlayer.css +283 -0
- package/dist/C_AudioPlayer.d.cts +2 -0
- package/dist/C_AudioPlayer.d.ts +2 -0
- package/dist/C_AudioPlayer.js +1 -0
- package/dist/C_AudioPlayer.js.map +1 -0
- package/dist/C_AudioPlayer2.js +2 -0
- package/dist/C_AudioPlayer2.js.map +1 -0
- package/dist/C_AvatarGroup-D02zci-i.css.map +1 -0
- package/dist/C_AvatarGroup-DatHaUlY.css.map +1 -0
- package/dist/C_AvatarGroup.cjs +1 -0
- package/dist/C_AvatarGroup.css +107 -0
- package/dist/C_AvatarGroup.d.cts +2 -0
- package/dist/C_AvatarGroup.d.ts +2 -0
- package/dist/C_AvatarGroup.js +1 -0
- package/dist/C_AvatarGroup.js.map +1 -0
- package/dist/C_AvatarGroup2.js +2 -0
- package/dist/C_AvatarGroup2.js.map +1 -0
- package/dist/C_Barcode.d.cts +1 -1
- package/dist/C_Barcode.d.ts +1 -1
- package/dist/{C_Breadcrumb-B5PGpP5m.css.map → C_Breadcrumb-BiH0d9AI.css.map} +1 -1
- package/dist/{C_Breadcrumb-Cay7qluL.css.map → C_Breadcrumb-Bqqrl8nX.css.map} +1 -1
- package/dist/C_Breadcrumb.css +8 -2
- package/dist/C_Breadcrumb.d.cts +1 -1
- package/dist/C_Breadcrumb.d.ts +1 -1
- package/dist/C_Breadcrumb.js.map +1 -1
- package/dist/C_Breadcrumb2.js.map +1 -1
- package/dist/C_Captcha.d.cts +1 -1
- package/dist/C_Captcha.d.ts +1 -1
- package/dist/C_Cascade.d.cts +1 -1
- package/dist/C_Cascade.d.ts +1 -1
- package/dist/C_Chat-CcjZdAwu.css.map +1 -0
- package/dist/C_Chat-Diq7tyWU.css.map +1 -0
- package/dist/C_Chat.cjs +1 -0
- package/dist/C_Chat.css +395 -0
- package/dist/C_Chat.d.cts +2 -0
- package/dist/C_Chat.d.ts +2 -0
- package/dist/C_Chat.js +1 -0
- package/dist/C_Chat.js.map +1 -0
- package/dist/C_Chat2.js +2 -0
- package/dist/C_Chat2.js.map +1 -0
- package/dist/C_City.d.cts +1 -1
- package/dist/C_City.d.ts +1 -1
- package/dist/C_Code.d.cts +1 -1
- package/dist/C_Code.d.ts +1 -1
- package/dist/C_ContextMenu-B3Cgz_wJ.css.map +1 -0
- package/dist/C_ContextMenu-u1LixF3_.css.map +1 -0
- package/dist/C_ContextMenu.cjs +1 -0
- package/dist/C_ContextMenu.css +115 -0
- package/dist/C_ContextMenu.d.cts +2 -0
- package/dist/C_ContextMenu.d.ts +2 -0
- package/dist/C_ContextMenu.js +1 -0
- package/dist/C_ContextMenu.js.map +1 -0
- package/dist/C_ContextMenu2.js +2 -0
- package/dist/C_ContextMenu2.js.map +1 -0
- package/dist/C_Date.d.cts +1 -1
- package/dist/C_Date.d.ts +1 -1
- package/dist/C_Editor.d.cts +1 -1
- package/dist/C_Editor.d.ts +1 -1
- package/dist/C_Guide.d.cts +1 -1
- package/dist/C_Guide.d.ts +1 -1
- package/dist/C_Icon.d.cts +1 -1
- package/dist/C_Icon.d.ts +1 -1
- package/dist/C_Icon.js.map +1 -1
- package/dist/C_Icon2.js +1 -1
- package/dist/C_Icon2.js.map +1 -1
- package/dist/C_Language.d.cts +1 -1
- package/dist/C_Language.d.ts +1 -1
- package/dist/C_Language.js.map +1 -1
- package/dist/C_Language2.js +1 -1
- package/dist/C_Language2.js.map +1 -1
- package/dist/C_Login-BkdnkBKX.css.map +1 -0
- package/dist/C_Login-VkMM6OJ2.css.map +1 -0
- package/dist/C_Login.cjs +1 -0
- package/dist/C_Login.css +515 -0
- package/dist/C_Login.d.cts +2 -0
- package/dist/C_Login.d.ts +2 -0
- package/dist/C_Login.js +1 -0
- package/dist/C_Login.js.map +1 -0
- package/dist/C_Login2.js +2 -0
- package/dist/C_Login2.js.map +1 -0
- package/dist/C_Markdown.d.cts +1 -1
- package/dist/C_Markdown.d.ts +1 -1
- package/dist/C_Menu.d.cts +1 -1
- package/dist/C_Menu.d.ts +1 -1
- package/dist/C_Progress.d.cts +1 -1
- package/dist/C_Progress.d.ts +1 -1
- package/dist/C_Steps.d.cts +1 -1
- package/dist/C_Steps.d.ts +1 -1
- package/dist/C_TagsView.d.cts +1 -1
- package/dist/C_TagsView.d.ts +1 -1
- package/dist/C_Theme.d.cts +1 -1
- package/dist/C_Theme.d.ts +1 -1
- package/dist/C_Timeline-BIvw3f41.css.map +1 -0
- package/dist/C_Timeline-VsDfCv4Q.css.map +1 -0
- package/dist/C_Timeline.cjs +1 -0
- package/dist/C_Timeline.css +271 -0
- package/dist/C_Timeline.d.cts +2 -0
- package/dist/C_Timeline.d.ts +2 -0
- package/dist/C_Timeline.js +1 -0
- package/dist/C_Timeline.js.map +1 -0
- package/dist/C_Timeline2.js +2 -0
- package/dist/C_Timeline2.js.map +1 -0
- package/dist/C_Transfer-BOB6OBqS.css.map +1 -0
- package/dist/C_Transfer-Dpq7ezWC.css.map +1 -0
- package/dist/C_Transfer.cjs +1 -0
- package/dist/C_Transfer.css +193 -0
- package/dist/C_Transfer.d.cts +2 -0
- package/dist/C_Transfer.d.ts +2 -0
- package/dist/C_Transfer.js +1 -0
- package/dist/C_Transfer.js.map +1 -0
- package/dist/C_Transfer2.js +2 -0
- package/dist/C_Transfer2.js.map +1 -0
- package/dist/C_VtableGantt.d.cts +1 -1
- package/dist/C_VtableGantt.d.ts +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants2.d.ts +2 -2
- package/dist/constants4.d.ts +3 -3
- package/dist/constants5.d.ts +2 -2
- package/dist/data.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -41
- package/dist/index.d.ts +48 -41
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.vue.d.ts +1 -1
- package/dist/index10.vue.d.ts +41 -23
- package/dist/index11.vue.d.ts +80 -63
- package/dist/index12.vue.d.ts +48 -20
- package/dist/index13.vue.d.ts +23 -63
- package/dist/index14.vue.d.ts +21 -58
- package/dist/index15.vue.d.ts +65 -48
- package/dist/index16.vue.d.ts +16 -21
- package/dist/index17.vue.d.ts +106 -77
- package/dist/index18.vue.d.ts +74 -11
- package/dist/index19.vue.d.ts +58 -653
- package/dist/index2.vue.d.ts +75 -30
- package/dist/index20.vue.d.ts +55 -0
- package/dist/index21.vue.d.ts +33 -0
- package/dist/index22.vue.d.ts +88 -0
- package/dist/index23.vue.d.ts +18 -0
- package/dist/index24.vue.d.ts +112 -0
- package/dist/index25.vue.d.ts +81 -0
- package/dist/index26.vue.d.ts +662 -0
- package/dist/index3.vue.d.ts +77 -19
- package/dist/index4.vue.d.ts +29 -36
- package/dist/index5.vue.d.ts +19 -20
- package/dist/index6.vue.d.ts +36 -26
- package/dist/index7.vue.d.ts +23 -40
- package/dist/index8.vue.d.ts +117 -45
- package/dist/index9.vue.d.ts +19 -25
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.d.cts +1 -1
- package/dist/resolver.d.ts +1 -1
- package/dist/resolver.js +1 -1
- package/dist/resolver.js.map +1 -1
- package/dist/style.css +1920 -21
- package/dist/useCollapsePanel.d.ts +1 -1
- package/dist/useCropperCore.d.ts +4 -4
- package/dist/useDraggableLayout.d.ts +8 -8
- package/dist/useDynamicFormState.d.ts +10 -10
- package/dist/useEdgeInteraction.d.ts +1 -1
- package/dist/useInfiniteScroll.d.ts +2 -2
- package/dist/useModalEdit.d.ts +2 -2
- package/dist/useQRCode.d.ts +4 -4
- package/dist/useSearchState.d.ts +2 -2
- package/dist/useSignatureHistory.d.ts +1 -1
- package/dist/useSplitResize.d.ts +5 -5
- package/dist/useTimeSelection.d.ts +2 -2
- package/dist/useTreeOperations.d.ts +6 -6
- package/dist/useWorkflowValidation.d.ts +1 -1
- package/package.json +1 -1
package/dist/index3.vue.d.ts
CHANGED
|
@@ -1,30 +1,88 @@
|
|
|
1
|
-
import { i as BreadcrumbItem } from "./menuAdapter.js";
|
|
2
1
|
import * as vue from "vue";
|
|
3
2
|
|
|
4
|
-
//#region src/components/
|
|
3
|
+
//#region src/components/C_AvatarGroup/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* @Description: 头像组组件类型定义
|
|
6
|
+
* Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
|
|
7
|
+
*/
|
|
8
|
+
/** 单个头像数据 */
|
|
9
|
+
interface AvatarItem {
|
|
10
|
+
/** 唯一标识 */
|
|
11
|
+
id: string | number;
|
|
12
|
+
/** 头像图片 URL */
|
|
13
|
+
src?: string;
|
|
14
|
+
/** 姓名(用于首字母 fallback 和 tooltip) */
|
|
15
|
+
name: string;
|
|
16
|
+
/** 悬浮提示(默认取 name) */
|
|
17
|
+
tooltip?: string;
|
|
18
|
+
/** 在线状态 */
|
|
19
|
+
status?: 'online' | 'offline' | 'busy' | 'away';
|
|
20
|
+
/** 额外数据 */
|
|
21
|
+
extra?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/** 组件 Props */
|
|
24
|
+
interface AvatarGroupProps {
|
|
25
|
+
/** 头像数据列表 */
|
|
26
|
+
items: AvatarItem[];
|
|
27
|
+
/** 最多显示数量(超出 +N) */
|
|
28
|
+
max?: number;
|
|
29
|
+
/** 头像尺寸 (px) */
|
|
30
|
+
size?: number;
|
|
31
|
+
/** 头像间重叠偏移量 (px),负值表示堆叠 */
|
|
32
|
+
overlap?: number;
|
|
33
|
+
/** 形状 */
|
|
34
|
+
shape?: 'circle' | 'square';
|
|
35
|
+
/** 是否显示状态指示点 */
|
|
36
|
+
showStatus?: boolean;
|
|
37
|
+
/** 是否显示悬浮提示 */
|
|
38
|
+
showTooltip?: boolean;
|
|
39
|
+
/** 是否可点击 */
|
|
40
|
+
clickable?: boolean;
|
|
41
|
+
/** +N 溢出按钮是否可点击 */
|
|
42
|
+
overflowClickable?: boolean;
|
|
43
|
+
/** 堆叠方向 */
|
|
44
|
+
direction?: 'ltr' | 'rtl';
|
|
45
|
+
}
|
|
46
|
+
/** 默认 Props */
|
|
47
|
+
declare const DEFAULT_AVATAR_GROUP_PROPS: Partial<AvatarGroupProps>;
|
|
48
|
+
/** 状态颜色映射 */
|
|
49
|
+
declare const STATUS_COLOR_MAP: Record<string, string>;
|
|
50
|
+
/** 从名字中提取首字母 */
|
|
51
|
+
declare function getInitials(name: string): string;
|
|
52
|
+
/** 根据名字生成稳定的背景色 */
|
|
53
|
+
declare function nameToColor(name: string): string;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/C_AvatarGroup/index.vue.d.ts
|
|
5
56
|
type __VLS_Props = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
labelFormatter?: (label: string) => string;
|
|
57
|
+
items: AvatarGroupProps['items'];
|
|
58
|
+
max?: number;
|
|
59
|
+
size?: number;
|
|
60
|
+
overlap?: number;
|
|
61
|
+
shape?: AvatarGroupProps['shape'];
|
|
62
|
+
showStatus?: boolean;
|
|
63
|
+
showTooltip?: boolean;
|
|
64
|
+
clickable?: boolean;
|
|
65
|
+
overflowClickable?: boolean;
|
|
66
|
+
direction?: AvatarGroupProps['direction'];
|
|
18
67
|
};
|
|
19
68
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
-
|
|
69
|
+
itemClick: (item: AvatarItem) => any;
|
|
70
|
+
overflowClick: (hiddenItems: AvatarItem[]) => any;
|
|
21
71
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
|
|
72
|
+
onItemClick?: ((item: AvatarItem) => any) | undefined;
|
|
73
|
+
onOverflowClick?: ((hiddenItems: AvatarItem[]) => any) | undefined;
|
|
23
74
|
}>, {
|
|
24
|
-
|
|
25
|
-
|
|
75
|
+
size: number;
|
|
76
|
+
clickable: boolean;
|
|
77
|
+
direction: "ltr" | "rtl";
|
|
78
|
+
max: number;
|
|
79
|
+
overlap: number;
|
|
80
|
+
shape: "circle" | "square";
|
|
81
|
+
showStatus: boolean;
|
|
82
|
+
showTooltip: boolean;
|
|
83
|
+
overflowClickable: boolean;
|
|
26
84
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
27
85
|
declare const _default: typeof __VLS_export;
|
|
28
86
|
//#endregion
|
|
29
|
-
export { _default as t };
|
|
87
|
+
export { STATUS_COLOR_MAP as a, DEFAULT_AVATAR_GROUP_PROPS as i, AvatarGroupProps as n, getInitials as o, AvatarItem as r, nameToColor as s, _default as t };
|
|
30
88
|
//# sourceMappingURL=index3.vue.d.ts.map
|
package/dist/index4.vue.d.ts
CHANGED
|
@@ -1,43 +1,36 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
interface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
//#region src/components/C_Barcode/index.vue.d.ts
|
|
4
|
+
interface Props {
|
|
5
|
+
value: string;
|
|
6
|
+
format?: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
showText?: boolean;
|
|
10
|
+
fontSize?: number;
|
|
11
|
+
textPosition?: "bottom" | "top";
|
|
12
|
+
lineColor?: string;
|
|
13
|
+
background?: string;
|
|
14
|
+
showBorder?: boolean;
|
|
15
|
+
label?: string;
|
|
16
|
+
showLabel?: boolean;
|
|
9
17
|
}
|
|
10
|
-
declare const __VLS_export: vue.DefineComponent<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
token: string;
|
|
15
|
-
timestamp: number;
|
|
16
|
-
type: string;
|
|
17
|
-
} | null;
|
|
18
|
-
reset: () => void;
|
|
19
|
-
show: () => void;
|
|
20
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
21
|
-
change: (valid: boolean) => any;
|
|
22
|
-
success: (data: {
|
|
23
|
-
token: string;
|
|
24
|
-
timestamp: number;
|
|
25
|
-
}) => any;
|
|
26
|
-
fail: (error: string) => any;
|
|
27
|
-
reset: () => any;
|
|
28
|
-
}, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
|
|
29
|
-
onChange?: ((valid: boolean) => any) | undefined;
|
|
30
|
-
onSuccess?: ((data: {
|
|
31
|
-
token: string;
|
|
32
|
-
timestamp: number;
|
|
33
|
-
}) => any) | undefined;
|
|
34
|
-
onFail?: ((error: string) => any) | undefined;
|
|
35
|
-
onReset?: (() => any) | undefined;
|
|
18
|
+
declare const __VLS_export: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
19
|
+
error: (error: Error) => any;
|
|
20
|
+
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
21
|
+
onError?: ((error: Error) => any) | undefined;
|
|
36
22
|
}>, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
label: string;
|
|
26
|
+
showBorder: boolean;
|
|
27
|
+
showLabel: boolean;
|
|
28
|
+
format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
29
|
+
fontSize: number;
|
|
30
|
+
background: string;
|
|
31
|
+
showText: boolean;
|
|
32
|
+
textPosition: "bottom" | "top";
|
|
33
|
+
lineColor: string;
|
|
41
34
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
42
35
|
declare const _default: typeof __VLS_export;
|
|
43
36
|
//#endregion
|
package/dist/index5.vue.d.ts
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
|
+
import { i as BreadcrumbItem } from "./menuAdapter.js";
|
|
1
2
|
import * as vue from "vue";
|
|
2
3
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
interface CascadeItem {
|
|
5
|
-
label: string;
|
|
6
|
-
value: string | number;
|
|
7
|
-
children?: CascadeItem[];
|
|
8
|
-
}
|
|
9
|
-
interface CascadeValue {
|
|
10
|
-
primary?: Pick<CascadeItem, "label" | "value"> | null;
|
|
11
|
-
secondary?: Pick<CascadeItem, "label" | "value"> | null;
|
|
12
|
-
tertiary?: Pick<CascadeItem, "label" | "value"> | null;
|
|
13
|
-
}
|
|
4
|
+
//#region src/components/C_Breadcrumb/index.vue.d.ts
|
|
14
5
|
type __VLS_Props = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 手动传入面包屑数据
|
|
8
|
+
* 不传时自动从 `route.matched` 生成(零配置)
|
|
9
|
+
*/
|
|
10
|
+
items?: BreadcrumbItem[]; /** 是否显示图标 */
|
|
11
|
+
showIcon?: boolean; /** 图标大小 (px),默认 16 */
|
|
12
|
+
iconSize?: number;
|
|
13
|
+
/**
|
|
14
|
+
* 标签文本格式化函数(用于 i18n)
|
|
15
|
+
* 仅在自动模式下生效
|
|
16
|
+
*/
|
|
17
|
+
labelFormatter?: (label: string) => string;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
-
|
|
21
|
-
change: (value: CascadeValue) => any;
|
|
20
|
+
select: (path: string) => any;
|
|
22
21
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
-
|
|
24
|
-
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
22
|
+
onSelect?: ((path: string) => any) | undefined;
|
|
25
23
|
}>, {
|
|
26
|
-
|
|
24
|
+
showIcon: boolean;
|
|
25
|
+
iconSize: number;
|
|
27
26
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
28
27
|
declare const _default: typeof __VLS_export;
|
|
29
28
|
//#endregion
|
|
30
|
-
export { _default as
|
|
29
|
+
export { _default as t };
|
|
31
30
|
//# sourceMappingURL=index5.vue.d.ts.map
|
package/dist/index6.vue.d.ts
CHANGED
|
@@ -1,35 +1,45 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
interface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
//#region src/components/C_Captcha/index.vue.d.ts
|
|
4
|
+
interface CaptchaProps {
|
|
5
|
+
triggerText?: string;
|
|
6
|
+
images?: string[];
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
theme?: "light" | "dark";
|
|
8
9
|
}
|
|
9
|
-
declare
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
11
|
+
validate: () => boolean;
|
|
12
|
+
getToken: () => string;
|
|
13
|
+
getVerificationData: () => {
|
|
14
|
+
token: string;
|
|
15
|
+
timestamp: number;
|
|
16
|
+
type: string;
|
|
17
|
+
} | null;
|
|
18
|
+
reset: () => void;
|
|
19
|
+
show: () => void;
|
|
20
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
21
|
+
change: (valid: boolean) => any;
|
|
22
|
+
reset: () => any;
|
|
23
|
+
success: (data: {
|
|
24
|
+
token: string;
|
|
25
|
+
timestamp: number;
|
|
26
|
+
}) => any;
|
|
27
|
+
fail: (error: string) => any;
|
|
28
|
+
}, string, vue.PublicProps, Readonly<CaptchaProps> & Readonly<{
|
|
29
|
+
onChange?: ((valid: boolean) => any) | undefined;
|
|
30
|
+
onReset?: (() => any) | undefined;
|
|
31
|
+
onSuccess?: ((data: {
|
|
32
|
+
token: string;
|
|
33
|
+
timestamp: number;
|
|
34
|
+
}) => any) | undefined;
|
|
35
|
+
onFail?: ((error: string) => any) | undefined;
|
|
22
36
|
}>, {
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
theme: "light" | "dark";
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
triggerText: string;
|
|
40
|
+
images: string[];
|
|
25
41
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
26
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
42
|
declare const _default: typeof __VLS_export;
|
|
28
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
-
new (): {
|
|
30
|
-
$slots: S;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
43
|
//#endregion
|
|
34
44
|
export { _default as t };
|
|
35
45
|
//# sourceMappingURL=index6.vue.d.ts.map
|
package/dist/index7.vue.d.ts
CHANGED
|
@@ -1,48 +1,31 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
interface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
showHeader?: boolean;
|
|
9
|
-
showLineNumbers?: boolean;
|
|
10
|
-
wordWrap?: boolean;
|
|
11
|
-
trim?: boolean;
|
|
12
|
-
showFullscreen?: boolean;
|
|
13
|
-
maxHeight?: string | number;
|
|
14
|
-
autoLoadLanguage?: boolean;
|
|
3
|
+
//#region src/components/C_Cascade/index.vue.d.ts
|
|
4
|
+
interface CascadeItem {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
children?: CascadeItem[];
|
|
15
8
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
onCopy?: ((code: string) => any) | undefined;
|
|
33
|
-
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
34
|
-
onFullscreen?: ((isFullscreen: boolean) => any) | undefined;
|
|
9
|
+
interface CascadeValue {
|
|
10
|
+
primary?: Pick<CascadeItem, "label" | "value"> | null;
|
|
11
|
+
secondary?: Pick<CascadeItem, "label" | "value"> | null;
|
|
12
|
+
tertiary?: Pick<CascadeItem, "label" | "value"> | null;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
data: CascadeItem[];
|
|
16
|
+
placeholders?: string[];
|
|
17
|
+
modelValue?: CascadeValue;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: CascadeValue) => any;
|
|
21
|
+
change: (value: CascadeValue) => any;
|
|
22
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
|
|
24
|
+
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
35
25
|
}>, {
|
|
36
|
-
|
|
37
|
-
wordWrap: boolean;
|
|
38
|
-
code: string;
|
|
39
|
-
language: string;
|
|
40
|
-
showHeader: boolean;
|
|
41
|
-
showLineNumbers: boolean;
|
|
42
|
-
showFullscreen: boolean;
|
|
43
|
-
autoLoadLanguage: boolean;
|
|
26
|
+
placeholders: string[];
|
|
44
27
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
45
28
|
declare const _default: typeof __VLS_export;
|
|
46
29
|
//#endregion
|
|
47
|
-
export { _default as t };
|
|
30
|
+
export { _default as n, CascadeItem as t };
|
|
48
31
|
//# sourceMappingURL=index7.vue.d.ts.map
|
package/dist/index8.vue.d.ts
CHANGED
|
@@ -1,56 +1,128 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
//#region src/components/C_Chat/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* @Description: C_Chat 通用聊天组件 - 类型定义
|
|
6
|
+
*/
|
|
7
|
+
/** 消息类型 */
|
|
8
|
+
type MessageType = 'text' | 'image' | 'file' | 'system';
|
|
9
|
+
/** 消息发送方 */
|
|
10
|
+
type MessageSender = 'self' | 'other' | 'system';
|
|
11
|
+
/** 消息状态 */
|
|
12
|
+
type MessageStatus = 'sending' | 'sent' | 'failed';
|
|
13
|
+
/** 单条消息 */
|
|
14
|
+
interface ChatMessage {
|
|
15
|
+
/** 唯一标识 */
|
|
16
|
+
id: string;
|
|
17
|
+
/** 消息内容(文本 / 图片 URL / 文件信息 JSON) */
|
|
18
|
+
content: string;
|
|
19
|
+
/** 消息类型 */
|
|
20
|
+
type: MessageType;
|
|
21
|
+
/** 发送方 */
|
|
22
|
+
sender: MessageSender;
|
|
23
|
+
/** 发送时间(ISO 字符串 或 时间戳) */
|
|
24
|
+
timestamp: string | number;
|
|
25
|
+
/** 发送者头像 URL */
|
|
26
|
+
avatar?: string;
|
|
27
|
+
/** 发送者用户名 */
|
|
28
|
+
username?: string;
|
|
29
|
+
/** 消息状态 */
|
|
30
|
+
status?: MessageStatus;
|
|
31
|
+
/** 文件名(type = 'file' 时使用) */
|
|
32
|
+
fileName?: string;
|
|
33
|
+
/** 文件大小(字节) */
|
|
34
|
+
fileSize?: number;
|
|
35
|
+
}
|
|
36
|
+
/** 联系人 / 会话 */
|
|
37
|
+
interface ChatContact {
|
|
38
|
+
/** 唯一标识 */
|
|
39
|
+
id: string;
|
|
40
|
+
/** 显示名称 */
|
|
41
|
+
name: string;
|
|
42
|
+
/** 头像 URL */
|
|
43
|
+
avatar?: string;
|
|
44
|
+
/** 最后一条消息摘要 */
|
|
45
|
+
lastMessage?: string;
|
|
46
|
+
/** 最后消息时间 */
|
|
47
|
+
lastTime?: string | number;
|
|
48
|
+
/** 未读数 */
|
|
49
|
+
unread?: number;
|
|
50
|
+
/** 是否在线 */
|
|
51
|
+
online?: boolean;
|
|
52
|
+
}
|
|
53
|
+
interface ChatProps {
|
|
54
|
+
/** 联系人列表 */
|
|
55
|
+
contacts?: ChatContact[];
|
|
56
|
+
/** 消息列表 */
|
|
57
|
+
messages?: ChatMessage[];
|
|
58
|
+
/** 当前选中的联系人 ID */
|
|
59
|
+
currentContactId?: string;
|
|
60
|
+
/** 输入框占位符 */
|
|
9
61
|
placeholder?: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
62
|
+
/** 是否显示联系人侧栏 */
|
|
63
|
+
showContacts?: boolean;
|
|
64
|
+
/** 是否显示消息时间戳 */
|
|
65
|
+
showTimestamp?: boolean;
|
|
66
|
+
/** 当前用户头像 */
|
|
67
|
+
selfAvatar?: string;
|
|
68
|
+
/** 当前用户名 */
|
|
69
|
+
selfName?: string;
|
|
70
|
+
/** 是否显示发送按钮 */
|
|
71
|
+
showSendBtn?: boolean;
|
|
72
|
+
/** 是否正在加载历史消息 */
|
|
73
|
+
loadingHistory?: boolean;
|
|
74
|
+
/** 标题(无联系人模式时显示) */
|
|
75
|
+
title?: string;
|
|
18
76
|
}
|
|
19
|
-
declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
77
|
+
declare const DEFAULT_CHAT_PROPS: Required<Pick<ChatProps, 'placeholder' | 'showContacts' | 'showTimestamp' | 'showSendBtn' | 'loadingHistory' | 'title'>>;
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/components/C_Chat/index.vue.d.ts
|
|
80
|
+
declare var __VLS_18: {}, __VLS_30: {};
|
|
81
|
+
type __VLS_Slots = {} & {
|
|
82
|
+
header?: (props: typeof __VLS_18) => any;
|
|
83
|
+
} & {
|
|
84
|
+
'input-actions'?: (props: typeof __VLS_30) => any;
|
|
85
|
+
};
|
|
86
|
+
declare const __VLS_base: vue.DefineComponent<ChatProps, {
|
|
87
|
+
scrollToBottom: () => void;
|
|
27
88
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
89
|
+
send: (content: string) => any;
|
|
90
|
+
"select-contact": (id: string) => any;
|
|
91
|
+
"load-more": () => any;
|
|
92
|
+
"image-preview": (url: string) => any;
|
|
93
|
+
"file-click": (msg: ChatMessage) => any;
|
|
94
|
+
"file-upload": () => any;
|
|
95
|
+
"emoji-click": () => any;
|
|
96
|
+
resend: (msg: ChatMessage) => any;
|
|
97
|
+
}, string, vue.PublicProps, Readonly<ChatProps> & Readonly<{
|
|
98
|
+
onSend?: ((content: string) => any) | undefined;
|
|
99
|
+
"onSelect-contact"?: ((id: string) => any) | undefined;
|
|
100
|
+
"onLoad-more"?: (() => any) | undefined;
|
|
101
|
+
"onImage-preview"?: ((url: string) => any) | undefined;
|
|
102
|
+
"onFile-click"?: ((msg: ChatMessage) => any) | undefined;
|
|
103
|
+
"onFile-upload"?: (() => any) | undefined;
|
|
104
|
+
"onEmoji-click"?: (() => any) | undefined;
|
|
105
|
+
onResend?: ((msg: ChatMessage) => any) | undefined;
|
|
41
106
|
}>, {
|
|
42
107
|
placeholder: string;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
108
|
+
showContacts: boolean;
|
|
109
|
+
showTimestamp: boolean;
|
|
110
|
+
showSendBtn: boolean;
|
|
111
|
+
loadingHistory: boolean;
|
|
112
|
+
title: string;
|
|
113
|
+
contacts: ChatContact[];
|
|
114
|
+
messages: ChatMessage[];
|
|
115
|
+
currentContactId: string;
|
|
116
|
+
selfAvatar: string;
|
|
117
|
+
selfName: string;
|
|
52
118
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
119
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
120
|
declare const _default: typeof __VLS_export;
|
|
121
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
122
|
+
new (): {
|
|
123
|
+
$slots: S;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
54
126
|
//#endregion
|
|
55
|
-
export { _default as t };
|
|
127
|
+
export { DEFAULT_CHAT_PROPS as a, MessageType as c, ChatProps as i, ChatContact as n, MessageSender as o, ChatMessage as r, MessageStatus as s, _default as t };
|
|
56
128
|
//# sourceMappingURL=index8.vue.d.ts.map
|
package/dist/index9.vue.d.ts
CHANGED
|
@@ -1,41 +1,35 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
2
|
|
|
3
|
-
//#region src/components/
|
|
3
|
+
//#region src/components/C_City/index.vue.d.ts
|
|
4
4
|
interface Props {
|
|
5
|
-
editorId: string;
|
|
6
5
|
modelValue?: string;
|
|
7
6
|
placeholder?: string;
|
|
8
|
-
|
|
9
|
-
readonly?: boolean;
|
|
10
|
-
height?: number;
|
|
11
|
-
theme?: "light" | "dark";
|
|
7
|
+
showLetters?: boolean;
|
|
12
8
|
}
|
|
13
|
-
declare
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
isInitialized: Readonly<vue.Ref<boolean, boolean>>;
|
|
22
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
9
|
+
declare var __VLS_9: {
|
|
10
|
+
value: string | undefined;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
trigger?: (props: typeof __VLS_9) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
23
17
|
"update:modelValue": (value: string) => any;
|
|
24
|
-
|
|
25
|
-
"editor-change": (html: string) => any;
|
|
18
|
+
change: (value: string) => any;
|
|
26
19
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
27
20
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
28
|
-
|
|
29
|
-
"onEditor-change"?: ((html: string) => any) | undefined;
|
|
21
|
+
onChange?: ((value: string) => any) | undefined;
|
|
30
22
|
}>, {
|
|
31
|
-
modelValue: string;
|
|
32
23
|
placeholder: string;
|
|
33
|
-
|
|
34
|
-
theme: "light" | "dark";
|
|
35
|
-
height: number;
|
|
36
|
-
readonly: boolean;
|
|
24
|
+
showLetters: boolean;
|
|
37
25
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
38
27
|
declare const _default: typeof __VLS_export;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
39
33
|
//#endregion
|
|
40
34
|
export { _default as t };
|
|
41
35
|
//# sourceMappingURL=index9.vue.d.ts.map
|
package/dist/resolver.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=`@robot-admin/naive-ui-components`,t=`C_ActionBar.C_AntV.C_Barcode.C_Breadcrumb.C_Captcha.C_Cascade.C_City.C_Code.C_CollapsePanel.C_Cron.C_Date.C_Draggable.C_Editor.C_FilePreview.C_Form.C_FormSearch.C_FormulaEditor.C_FullCalendar.C_GlobalSearch.C_Guide.C_Icon.C_ImageCropper.C_Language.C_Map.C_Markdown.C_Menu.C_NotificationCenter.C_Progress.C_QRCode.C_Signature.C_SplitPane.C_Steps.C_Table.C_TagsView.C_Theme.C_Time.C_Tree.C_Upload.C_VideoPlayer.C_VtableGantt.C_WaterFall.C_WorkFlow`.split(`.`),n=new Set(t);function r(t={}){let{importOnDemand:r=!1,importStyle:i=!1}=t;return{type:`component`,resolve:t=>{if(n.has(t))return{name:t,from:r?`${e}/${t}`:e,sideEffects:r&&i?`${e}/${t}/style.css`:void 0}}}}exports.RobotNaiveUiResolver=r,exports.componentNames=t;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=`@robot-admin/naive-ui-components`,t=`C_ActionBar.C_AntV.C_AudioPlayer.C_AvatarGroup.C_Barcode.C_Breadcrumb.C_Captcha.C_Cascade.C_Chat.C_City.C_Code.C_CollapsePanel.C_ContextMenu.C_Cron.C_Date.C_Draggable.C_Editor.C_FilePreview.C_Form.C_FormSearch.C_FormulaEditor.C_FullCalendar.C_GlobalSearch.C_Guide.C_Icon.C_ImageCropper.C_Language.C_Login.C_Map.C_Markdown.C_Menu.C_NotificationCenter.C_Progress.C_QRCode.C_Signature.C_SplitPane.C_Steps.C_Table.C_TagsView.C_Theme.C_Time.C_Timeline.C_Transfer.C_Tree.C_Upload.C_VideoPlayer.C_VtableGantt.C_WaterFall.C_WorkFlow`.split(`.`),n=new Set(t);function r(t={}){let{importOnDemand:r=!1,importStyle:i=!1}=t;return{type:`component`,resolve:t=>{if(n.has(t))return{name:t,from:r?`${e}/${t}`:e,sideEffects:r&&i?`${e}/${t}/style.css`:void 0}}}}exports.RobotNaiveUiResolver=r,exports.componentNames=t;
|
|
2
2
|
//# sourceMappingURL=resolver.cjs.map
|
package/dist/resolver.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.cjs","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\n * @robot-admin/naive-ui-components Resolver\n * 用于 unplugin-vue-components 的自动导入解析器\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import Components from 'unplugin-vue-components/vite'\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\n *\n * export default defineConfig({\n * plugins: [\n * Components({\n * resolvers: [RobotNaiveUiResolver()]\n * })\n * ]\n * })\n * ```\n */\n\nconst PKG_NAME = '@robot-admin/naive-ui-components'\n\n/** 组件库包含的所有组件名称 */\nexport const componentNames = [\n 'C_ActionBar',\n 'C_AntV',\n 'C_Barcode',\n 'C_Breadcrumb',\n 'C_Captcha',\n 'C_Cascade',\n 'C_City',\n 'C_Code',\n 'C_CollapsePanel',\n 'C_Cron',\n 'C_Date',\n 'C_Draggable',\n 'C_Editor',\n 'C_FilePreview',\n 'C_Form',\n 'C_FormSearch',\n 'C_FormulaEditor',\n 'C_FullCalendar',\n 'C_GlobalSearch',\n 'C_Guide',\n 'C_Icon',\n 'C_ImageCropper',\n 'C_Language',\n 'C_Map',\n 'C_Markdown',\n 'C_Menu',\n 'C_NotificationCenter',\n 'C_Progress',\n 'C_QRCode',\n 'C_Signature',\n 'C_SplitPane',\n 'C_Steps',\n 'C_Table',\n 'C_TagsView',\n 'C_Theme',\n 'C_Time',\n 'C_Tree',\n 'C_Upload',\n 'C_VideoPlayer',\n 'C_VtableGantt',\n 'C_WaterFall',\n 'C_WorkFlow',\n] as const\n\n/** 组件名称类型 */\nexport type ComponentName = (typeof componentNames)[number]\n\n/** 组件名称集合(快速查找) */\nconst componentSet = new Set<string>(componentNames)\n\nexport interface RobotNaiveUiResolverOptions {\n /**\n * 按需导入:从子路径解析单个组件,减少打包体积\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\n */\n importOnDemand?: boolean\n /**\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\n * - false (默认): 需手动导入 style.css 全量样式\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\n */\n importStyle?: boolean\n}\n\n/**\n * @robot-admin/naive-ui-components 组件自动导入解析器\n *\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\n */\nexport function RobotNaiveUiResolver(\n options: RobotNaiveUiResolverOptions = {}\n) {\n const { importOnDemand = false, importStyle = false } = options\n\n return {\n type: 'component' as const,\n resolve: (name: string) => {\n if (componentSet.has(name)) {\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\n const sideEffects =\n importOnDemand && importStyle\n ? `${PKG_NAME}/${name}/style.css`\n : undefined\n return {\n name,\n from,\n sideEffects,\n }\n }\n },\n }\n}\n"],"mappings":"mEAoBA,MAAM,EAAW,mCAGJ,EAAiB,
|
|
1
|
+
{"version":3,"file":"resolver.cjs","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\n * @robot-admin/naive-ui-components Resolver\n * 用于 unplugin-vue-components 的自动导入解析器\n *\n * @example\n * ```ts\n * // vite.config.ts\n * import Components from 'unplugin-vue-components/vite'\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\n *\n * export default defineConfig({\n * plugins: [\n * Components({\n * resolvers: [RobotNaiveUiResolver()]\n * })\n * ]\n * })\n * ```\n */\n\nconst PKG_NAME = '@robot-admin/naive-ui-components'\n\n/** 组件库包含的所有组件名称 */\nexport const componentNames = [\n 'C_ActionBar',\n 'C_AntV',\n 'C_AudioPlayer',\n 'C_AvatarGroup',\n 'C_Barcode',\n 'C_Breadcrumb',\n 'C_Captcha',\n 'C_Cascade',\n 'C_Chat',\n 'C_City',\n 'C_Code',\n 'C_CollapsePanel',\n 'C_ContextMenu',\n 'C_Cron',\n 'C_Date',\n 'C_Draggable',\n 'C_Editor',\n 'C_FilePreview',\n 'C_Form',\n 'C_FormSearch',\n 'C_FormulaEditor',\n 'C_FullCalendar',\n 'C_GlobalSearch',\n 'C_Guide',\n 'C_Icon',\n 'C_ImageCropper',\n 'C_Language',\n 'C_Login',\n 'C_Map',\n 'C_Markdown',\n 'C_Menu',\n 'C_NotificationCenter',\n 'C_Progress',\n 'C_QRCode',\n 'C_Signature',\n 'C_SplitPane',\n 'C_Steps',\n 'C_Table',\n 'C_TagsView',\n 'C_Theme',\n 'C_Time',\n 'C_Timeline',\n 'C_Transfer',\n 'C_Tree',\n 'C_Upload',\n 'C_VideoPlayer',\n 'C_VtableGantt',\n 'C_WaterFall',\n 'C_WorkFlow',\n] as const\n\n/** 组件名称类型 */\nexport type ComponentName = (typeof componentNames)[number]\n\n/** 组件名称集合(快速查找) */\nconst componentSet = new Set<string>(componentNames)\n\nexport interface RobotNaiveUiResolverOptions {\n /**\n * 按需导入:从子路径解析单个组件,减少打包体积\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\n */\n importOnDemand?: boolean\n /**\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\n * - false (默认): 需手动导入 style.css 全量样式\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\n */\n importStyle?: boolean\n}\n\n/**\n * @robot-admin/naive-ui-components 组件自动导入解析器\n *\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\n */\nexport function RobotNaiveUiResolver(\n options: RobotNaiveUiResolverOptions = {}\n) {\n const { importOnDemand = false, importStyle = false } = options\n\n return {\n type: 'component' as const,\n resolve: (name: string) => {\n if (componentSet.has(name)) {\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\n const sideEffects =\n importOnDemand && importStyle\n ? `${PKG_NAME}/${name}/style.css`\n : undefined\n return {\n name,\n from,\n sideEffects,\n }\n }\n },\n }\n}\n"],"mappings":"mEAoBA,MAAM,EAAW,mCAGJ,EAAiB,yhBAkD7B,CAMK,EAAe,IAAI,IAAY,EAAe,CAuBpD,SAAgB,EACd,EAAuC,EAAE,CACzC,CACA,GAAM,CAAE,iBAAiB,GAAO,cAAc,IAAU,EAExD,MAAO,CACL,KAAM,YACN,QAAU,GAAiB,CACzB,GAAI,EAAa,IAAI,EAAK,CAMxB,MAAO,CACL,OACA,KAPW,EAAiB,GAAG,EAAS,GAAG,IAAS,EAQpD,YANA,GAAkB,EACd,GAAG,EAAS,GAAG,EAAK,YACpB,IAAA,GAKL,EAGN"}
|