@robot-admin/naive-ui-components 0.6.31 → 0.7.1
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/CHANGELOG.md +12 -0
- package/README.md +5 -3
- package/dist/C_OrgChart.js.map +1 -1
- package/dist/C_OrgChart2.js.map +1 -1
- package/dist/C_Skeleton.js.map +1 -1
- package/dist/C_Skeleton2.js.map +1 -1
- package/dist/{C_Table-B8hpzOcR.css.map → C_Table-BcM5LqAM.css.map} +1 -1
- package/dist/{C_Table-CGP3n_u0.css.map → C_Table-HATVoq1F.css.map} +1 -1
- package/dist/C_Table.cjs +1 -1
- package/dist/C_Table.css +140 -97
- package/dist/C_Table.d.cts +2 -2
- package/dist/C_Table.d.ts +2 -2
- package/dist/C_Table.js +1 -1
- package/dist/C_Table.js.map +1 -1
- package/dist/C_Table2.js +3 -1
- package/dist/C_Table2.js.map +1 -1
- package/dist/constants.d.ts +4 -4
- package/dist/constants2.d.ts +3 -3
- package/dist/constants3.d.ts +3 -3
- package/dist/constants4.d.ts +2 -2
- package/dist/constants5.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- 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 +1 -1
- package/dist/index11.vue.d.ts +2 -2
- package/dist/index13.vue.d.ts +3 -3
- package/dist/index14.vue.d.ts +1 -1
- package/dist/index15.vue.d.ts +4 -4
- package/dist/index16.vue.d.ts +2 -2
- package/dist/index18.vue.d.ts +4 -4
- package/dist/index2.vue.d.ts +6 -6
- package/dist/index20.vue.d.ts +1 -1
- package/dist/index21.vue.d.ts +1 -1
- package/dist/index22.vue.d.ts +2 -2
- package/dist/index23.vue.d.ts +1 -1
- package/dist/index24.vue.d.ts +1 -1
- package/dist/index26.vue.d.ts +4 -4
- package/dist/index27.vue.d.ts +2 -2
- package/dist/index28.vue.d.ts +3 -3
- package/dist/index3.vue.d.ts +3 -3
- package/dist/index4.vue.d.ts +5 -5
- package/dist/index6.vue.d.ts +2 -2
- package/dist/index7.vue.d.ts +2 -2
- package/dist/index9.vue.d.ts +2 -2
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.js.map +1 -1
- package/dist/style.css +142 -99
- package/dist/useCalendarEvents.d.ts +1 -1
- package/dist/useCollapsePanel.d.ts +5 -5
- package/dist/useCropperCore.d.ts +4 -4
- package/dist/useDraggableLayout.d.ts +5 -5
- package/dist/useDynamicFormState.d.ts +124 -124
- package/dist/useEdgeInteraction.d.ts +1 -1
- package/dist/useGlobalSearch.d.ts +1 -1
- package/dist/useInfiniteScroll.d.ts +4 -4
- package/dist/useModalEdit.d.ts +513 -240
- package/dist/useQRCode.d.ts +3 -3
- package/dist/useSearchState.d.ts +2 -2
- package/dist/useSignatureHistory.d.ts +3 -3
- package/dist/useSplitResize.d.ts +5 -5
- package/dist/useTimeSelection.d.ts +2 -2
- package/dist/useTreeOperations.d.ts +4 -4
- package/dist/useWorkflowValidation.d.ts +7 -7
- package/package.json +1 -1
package/dist/index2.vue.d.ts
CHANGED
|
@@ -60,22 +60,22 @@ type __VLS_Props = {
|
|
|
60
60
|
theme?: AudioPlayerProps['theme'];
|
|
61
61
|
};
|
|
62
62
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
63
|
-
play: (index: number) => any;
|
|
64
|
-
pause: () => any;
|
|
65
63
|
ended: (index: number) => any;
|
|
64
|
+
pause: () => any;
|
|
65
|
+
play: (index: number) => any;
|
|
66
66
|
modeChange: (mode: string) => any;
|
|
67
67
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
68
|
-
onPlay?: ((index: number) => any) | undefined;
|
|
69
|
-
onPause?: (() => any) | undefined;
|
|
70
68
|
onEnded?: ((index: number) => any) | undefined;
|
|
69
|
+
onPause?: (() => any) | undefined;
|
|
70
|
+
onPlay?: ((index: number) => any) | undefined;
|
|
71
71
|
onModeChange?: ((mode: string) => any) | undefined;
|
|
72
72
|
}>, {
|
|
73
73
|
theme: "default" | "minimal";
|
|
74
|
+
mode: "list" | "single" | "loop" | "shuffle";
|
|
75
|
+
autoplay: boolean;
|
|
74
76
|
initialIndex: number;
|
|
75
77
|
showPlaylist: boolean;
|
|
76
78
|
showCover: boolean;
|
|
77
|
-
autoplay: boolean;
|
|
78
|
-
mode: "list" | "loop" | "single" | "shuffle";
|
|
79
79
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
80
80
|
declare const _default: typeof __VLS_export;
|
|
81
81
|
//#endregion
|
package/dist/index20.vue.d.ts
CHANGED
|
@@ -78,8 +78,8 @@ declare const __VLS_base: vue.DefineComponent<OrgChartProps, {
|
|
|
78
78
|
"onNode-collapse"?: ((node: OrgChartNode) => any) | undefined;
|
|
79
79
|
}>, {
|
|
80
80
|
direction: OrgChartDirection;
|
|
81
|
-
lineColor: string;
|
|
82
81
|
lineStyle: OrgChartLineStyle;
|
|
82
|
+
lineColor: string;
|
|
83
83
|
lineWidth: number;
|
|
84
84
|
nodeSpacing: number;
|
|
85
85
|
levelSpacing: number;
|
package/dist/index21.vue.d.ts
CHANGED
|
@@ -34,9 +34,9 @@ type __VLS_Slots = {} & {
|
|
|
34
34
|
indicator?: (props: typeof __VLS_9) => any;
|
|
35
35
|
};
|
|
36
36
|
declare const __VLS_base: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
37
|
-
status: "default" | "success" | "error" | "warning" | "info";
|
|
38
37
|
strokeWidth: number;
|
|
39
38
|
time: number;
|
|
39
|
+
status: "default" | "success" | "error" | "warning" | "info";
|
|
40
40
|
percentage: number | number[];
|
|
41
41
|
isAnimation: boolean;
|
|
42
42
|
indicatorPlacement: "inside" | "outside";
|
package/dist/index22.vue.d.ts
CHANGED
|
@@ -86,11 +86,11 @@ type __VLS_Slots = {} & {
|
|
|
86
86
|
default?: (props: typeof __VLS_1) => any;
|
|
87
87
|
};
|
|
88
88
|
declare const __VLS_base: vue.DefineComponent<SkeletonProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {
|
|
89
|
+
animation: SkeletonAnimation;
|
|
89
90
|
repeat: number;
|
|
90
|
-
loading: boolean;
|
|
91
91
|
borderRadius: string;
|
|
92
|
+
loading: boolean;
|
|
92
93
|
preset: SkeletonPreset;
|
|
93
|
-
animation: SkeletonAnimation;
|
|
94
94
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
95
95
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
96
96
|
declare const _default: typeof __VLS_export;
|
package/dist/index23.vue.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue
|
|
|
24
24
|
onChange?: ((args_0: number) => any) | undefined;
|
|
25
25
|
"onUpdate:current"?: ((args_0: number) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
-
clickable: boolean;
|
|
28
27
|
direction: "horizontal" | "vertical";
|
|
28
|
+
clickable: boolean;
|
|
29
29
|
current: number;
|
|
30
30
|
connected: boolean;
|
|
31
31
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index24.vue.d.ts
CHANGED
|
@@ -76,10 +76,10 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {
|
|
|
76
76
|
onClose?: ((fallbackPath: string) => any) | undefined;
|
|
77
77
|
onCloseAll?: (() => any) | undefined;
|
|
78
78
|
}>, {
|
|
79
|
-
persistKey: string;
|
|
80
79
|
homePath: string;
|
|
81
80
|
homeTitle: string;
|
|
82
81
|
homeIcon: string;
|
|
82
|
+
persistKey: string;
|
|
83
83
|
contextMenuLabels: ContextMenuLabels;
|
|
84
84
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
85
85
|
declare const _default: typeof __VLS_export;
|
package/dist/index26.vue.d.ts
CHANGED
|
@@ -84,18 +84,18 @@ declare const __VLS_base: vue.DefineComponent<TimelineProps, {
|
|
|
84
84
|
/** 展开全部 */expandAll: () => void; /** 折叠全部 */
|
|
85
85
|
collapseAll: () => void;
|
|
86
86
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
87
|
-
expand: (item: TimelineItem, expanded: boolean) => any;
|
|
88
87
|
"item-click": (item: TimelineItem, index: number) => any;
|
|
88
|
+
expand: (item: TimelineItem, expanded: boolean) => any;
|
|
89
89
|
}, string, vue.PublicProps, Readonly<TimelineProps> & Readonly<{
|
|
90
|
-
onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
|
|
91
90
|
"onItem-click"?: ((item: TimelineItem, index: number) => any) | undefined;
|
|
91
|
+
onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
|
|
92
92
|
}>, {
|
|
93
|
+
reverse: boolean;
|
|
93
94
|
items: TimelineItem[];
|
|
94
95
|
size: "small" | "medium" | "large";
|
|
95
|
-
|
|
96
|
+
labelPlacement: "left" | "right" | "alternate";
|
|
96
97
|
mode: "vertical" | "horizontal";
|
|
97
98
|
pending: boolean;
|
|
98
|
-
labelPlacement: "left" | "right" | "alternate";
|
|
99
99
|
pendingText: string;
|
|
100
100
|
lineType: "solid" | "dashed" | "dotted";
|
|
101
101
|
showTime: boolean;
|
package/dist/index27.vue.d.ts
CHANGED
|
@@ -61,11 +61,11 @@ type __VLS_Props = {
|
|
|
61
61
|
size?: TransferProps['size'];
|
|
62
62
|
};
|
|
63
63
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
64
|
-
change: (targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any;
|
|
65
64
|
"update:modelValue": (value: (string | number)[]) => any;
|
|
65
|
+
change: (targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any;
|
|
66
66
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
67
|
-
onChange?: ((targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any) | undefined;
|
|
68
67
|
"onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
|
|
68
|
+
onChange?: ((targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any) | undefined;
|
|
69
69
|
}>, {
|
|
70
70
|
size: "small" | "medium" | "large";
|
|
71
71
|
filterable: boolean;
|
package/dist/index28.vue.d.ts
CHANGED
|
@@ -647,12 +647,12 @@ declare const __VLS_export: vue.DefineComponent<Props, {
|
|
|
647
647
|
onTaskClick?: ((task: GanttTask, event: Event) => any) | undefined;
|
|
648
648
|
onTaskChange?: ((task: GanttTask, changes: any) => any) | undefined;
|
|
649
649
|
}>, {
|
|
650
|
+
data: GanttTask[];
|
|
651
|
+
height: string | number;
|
|
652
|
+
showToolbar: boolean;
|
|
650
653
|
theme: "light" | "dark";
|
|
651
654
|
title: string;
|
|
652
|
-
height: string | number;
|
|
653
655
|
options: GanttOptions;
|
|
654
|
-
data: GanttTask[];
|
|
655
|
-
showToolbar: boolean;
|
|
656
656
|
preset: GanttPreset;
|
|
657
657
|
showFullscreenButton: boolean;
|
|
658
658
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index3.vue.d.ts
CHANGED
|
@@ -72,15 +72,15 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue
|
|
|
72
72
|
onItemClick?: ((item: AvatarItem) => any) | undefined;
|
|
73
73
|
onOverflowClick?: ((hiddenItems: AvatarItem[]) => any) | undefined;
|
|
74
74
|
}>, {
|
|
75
|
-
|
|
75
|
+
direction: "ltr" | "rtl";
|
|
76
76
|
size: number;
|
|
77
|
+
max: number;
|
|
77
78
|
overlap: number;
|
|
79
|
+
clickable: boolean;
|
|
78
80
|
shape: "circle" | "square";
|
|
79
81
|
showStatus: boolean;
|
|
80
82
|
showTooltip: boolean;
|
|
81
|
-
clickable: boolean;
|
|
82
83
|
overflowClickable: boolean;
|
|
83
|
-
direction: "ltr" | "rtl";
|
|
84
84
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
85
85
|
declare const _default: typeof __VLS_export;
|
|
86
86
|
//#endregion
|
package/dist/index4.vue.d.ts
CHANGED
|
@@ -20,17 +20,17 @@ declare const __VLS_export: vue.DefineComponent<Props, {}, {}, {}, {}, vue.Compo
|
|
|
20
20
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
21
21
|
onError?: ((error: Error) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
-
format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
24
23
|
width: number;
|
|
25
24
|
height: number;
|
|
26
|
-
|
|
25
|
+
label: string;
|
|
26
|
+
format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
|
|
27
27
|
fontSize: number;
|
|
28
|
-
textPosition: "bottom" | "top";
|
|
29
|
-
lineColor: string;
|
|
30
28
|
background: string;
|
|
31
29
|
showBorder: boolean;
|
|
32
|
-
label: string;
|
|
33
30
|
showLabel: boolean;
|
|
31
|
+
lineColor: string;
|
|
32
|
+
showText: boolean;
|
|
33
|
+
textPosition: "bottom" | "top";
|
|
34
34
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
36
36
|
//#endregion
|
package/dist/index6.vue.d.ts
CHANGED
|
@@ -34,10 +34,10 @@ declare const __VLS_export: vue.DefineComponent<CaptchaProps, {
|
|
|
34
34
|
onChange?: ((valid: boolean) => any) | undefined;
|
|
35
35
|
onReset?: (() => any) | undefined;
|
|
36
36
|
}>, {
|
|
37
|
+
theme: "light" | "dark";
|
|
38
|
+
disabled: boolean;
|
|
37
39
|
triggerText: string;
|
|
38
40
|
images: string[];
|
|
39
|
-
disabled: boolean;
|
|
40
|
-
theme: "light" | "dark";
|
|
41
41
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
42
42
|
declare const _default: typeof __VLS_export;
|
|
43
43
|
//#endregion
|
package/dist/index7.vue.d.ts
CHANGED
|
@@ -17,11 +17,11 @@ type __VLS_Props = {
|
|
|
17
17
|
modelValue?: CascadeValue;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
-
change: (value: CascadeValue) => any;
|
|
21
20
|
"update:modelValue": (value: CascadeValue) => any;
|
|
21
|
+
change: (value: CascadeValue) => any;
|
|
22
22
|
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
-
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
24
23
|
"onUpdate:modelValue"?: ((value: CascadeValue) => any) | undefined;
|
|
24
|
+
onChange?: ((value: CascadeValue) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
placeholders: string[];
|
|
27
27
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
package/dist/index9.vue.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
trigger?: (props: typeof __VLS_9) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: vue.DefineComponent<Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
17
|
-
change: (value: string) => any;
|
|
18
17
|
"update:modelValue": (value: string) => any;
|
|
18
|
+
change: (value: string) => any;
|
|
19
19
|
}, string, vue.PublicProps, Readonly<Props> & Readonly<{
|
|
20
|
-
onChange?: ((value: string) => any) | undefined;
|
|
21
20
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
21
|
+
onChange?: ((value: string) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
23
|
placeholder: string;
|
|
24
24
|
showLetters: boolean;
|
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_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_OrgChart',\n 'C_Progress',\n 'C_QRCode',\n 'C_Signature',\n 'C_Skeleton',\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,+iBAoD7B,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"}
|
|
1
|
+
{"version":3,"file":"resolver.cjs","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\r\n * @robot-admin/naive-ui-components Resolver\r\n * 用于 unplugin-vue-components 的自动导入解析器\r\n *\r\n * @example\r\n * ```ts\r\n * // vite.config.ts\r\n * import Components from 'unplugin-vue-components/vite'\r\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\r\n *\r\n * export default defineConfig({\r\n * plugins: [\r\n * Components({\r\n * resolvers: [RobotNaiveUiResolver()]\r\n * })\r\n * ]\r\n * })\r\n * ```\r\n */\r\n\r\nconst PKG_NAME = '@robot-admin/naive-ui-components'\r\n\r\n/** 组件库包含的所有组件名称 */\r\nexport const componentNames = [\r\n 'C_ActionBar',\r\n 'C_AntV',\r\n 'C_AudioPlayer',\r\n 'C_AvatarGroup',\r\n 'C_Barcode',\r\n 'C_Breadcrumb',\r\n 'C_Captcha',\r\n 'C_Cascade',\r\n 'C_Chat',\r\n 'C_City',\r\n 'C_Code',\r\n 'C_CollapsePanel',\r\n 'C_ContextMenu',\r\n 'C_Cron',\r\n 'C_Date',\r\n 'C_Draggable',\r\n 'C_Editor',\r\n 'C_FilePreview',\r\n 'C_Form',\r\n 'C_FormSearch',\r\n 'C_FormulaEditor',\r\n 'C_FullCalendar',\r\n 'C_GlobalSearch',\r\n 'C_Guide',\r\n 'C_Icon',\r\n 'C_ImageCropper',\r\n 'C_Language',\r\n 'C_Login',\r\n 'C_Map',\r\n 'C_Markdown',\r\n 'C_Menu',\r\n 'C_NotificationCenter',\r\n 'C_OrgChart',\r\n 'C_Progress',\r\n 'C_QRCode',\r\n 'C_Signature',\r\n 'C_Skeleton',\r\n 'C_SplitPane',\r\n 'C_Steps',\r\n 'C_Table',\r\n 'C_TagsView',\r\n 'C_Theme',\r\n 'C_Time',\r\n 'C_Timeline',\r\n 'C_Transfer',\r\n 'C_Tree',\r\n 'C_Upload',\r\n 'C_VideoPlayer',\r\n 'C_VtableGantt',\r\n 'C_WaterFall',\r\n 'C_WorkFlow',\r\n] as const\r\n\r\n/** 组件名称类型 */\r\nexport type ComponentName = (typeof componentNames)[number]\r\n\r\n/** 组件名称集合(快速查找) */\r\nconst componentSet = new Set<string>(componentNames)\r\n\r\nexport interface RobotNaiveUiResolverOptions {\r\n /**\r\n * 按需导入:从子路径解析单个组件,减少打包体积\r\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\r\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\r\n */\r\n importOnDemand?: boolean\r\n /**\r\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\r\n * - false (默认): 需手动导入 style.css 全量样式\r\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\r\n */\r\n importStyle?: boolean\r\n}\r\n\r\n/**\r\n * @robot-admin/naive-ui-components 组件自动导入解析器\r\n *\r\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\r\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\r\n */\r\nexport function RobotNaiveUiResolver(\r\n options: RobotNaiveUiResolverOptions = {}\r\n) {\r\n const { importOnDemand = false, importStyle = false } = options\r\n\r\n return {\r\n type: 'component' as const,\r\n resolve: (name: string) => {\r\n if (componentSet.has(name)) {\r\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\r\n const sideEffects =\r\n importOnDemand && importStyle\r\n ? `${PKG_NAME}/${name}/style.css`\r\n : undefined\r\n return {\r\n name,\r\n from,\r\n sideEffects,\r\n }\r\n }\r\n },\r\n }\r\n}\r\n"],"mappings":"mEAoBA,MAAM,EAAW,mCAGJ,EAAiB,+iBAoD7B,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"}
|
package/dist/resolver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","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_OrgChart',\n 'C_Progress',\n 'C_QRCode',\n 'C_Signature',\n 'C_Skeleton',\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":"AAoBA,MAAM,EAAW,mCAGJ,EAAiB,+iBAoD7B,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"}
|
|
1
|
+
{"version":3,"file":"resolver.js","names":[],"sources":["../src/resolver.ts"],"sourcesContent":["/**\r\n * @robot-admin/naive-ui-components Resolver\r\n * 用于 unplugin-vue-components 的自动导入解析器\r\n *\r\n * @example\r\n * ```ts\r\n * // vite.config.ts\r\n * import Components from 'unplugin-vue-components/vite'\r\n * import { RobotNaiveUiResolver } from '@robot-admin/naive-ui-components/resolver'\r\n *\r\n * export default defineConfig({\r\n * plugins: [\r\n * Components({\r\n * resolvers: [RobotNaiveUiResolver()]\r\n * })\r\n * ]\r\n * })\r\n * ```\r\n */\r\n\r\nconst PKG_NAME = '@robot-admin/naive-ui-components'\r\n\r\n/** 组件库包含的所有组件名称 */\r\nexport const componentNames = [\r\n 'C_ActionBar',\r\n 'C_AntV',\r\n 'C_AudioPlayer',\r\n 'C_AvatarGroup',\r\n 'C_Barcode',\r\n 'C_Breadcrumb',\r\n 'C_Captcha',\r\n 'C_Cascade',\r\n 'C_Chat',\r\n 'C_City',\r\n 'C_Code',\r\n 'C_CollapsePanel',\r\n 'C_ContextMenu',\r\n 'C_Cron',\r\n 'C_Date',\r\n 'C_Draggable',\r\n 'C_Editor',\r\n 'C_FilePreview',\r\n 'C_Form',\r\n 'C_FormSearch',\r\n 'C_FormulaEditor',\r\n 'C_FullCalendar',\r\n 'C_GlobalSearch',\r\n 'C_Guide',\r\n 'C_Icon',\r\n 'C_ImageCropper',\r\n 'C_Language',\r\n 'C_Login',\r\n 'C_Map',\r\n 'C_Markdown',\r\n 'C_Menu',\r\n 'C_NotificationCenter',\r\n 'C_OrgChart',\r\n 'C_Progress',\r\n 'C_QRCode',\r\n 'C_Signature',\r\n 'C_Skeleton',\r\n 'C_SplitPane',\r\n 'C_Steps',\r\n 'C_Table',\r\n 'C_TagsView',\r\n 'C_Theme',\r\n 'C_Time',\r\n 'C_Timeline',\r\n 'C_Transfer',\r\n 'C_Tree',\r\n 'C_Upload',\r\n 'C_VideoPlayer',\r\n 'C_VtableGantt',\r\n 'C_WaterFall',\r\n 'C_WorkFlow',\r\n] as const\r\n\r\n/** 组件名称类型 */\r\nexport type ComponentName = (typeof componentNames)[number]\r\n\r\n/** 组件名称集合(快速查找) */\r\nconst componentSet = new Set<string>(componentNames)\r\n\r\nexport interface RobotNaiveUiResolverOptions {\r\n /**\r\n * 按需导入:从子路径解析单个组件,减少打包体积\r\n * - false (默认): `import { C_Form } from '@robot-admin/naive-ui-components'`\r\n * - true: `import { C_Form } from '@robot-admin/naive-ui-components/C_Form'`\r\n */\r\n importOnDemand?: boolean\r\n /**\r\n * 按需导入组件样式(仅在 importOnDemand 为 true 时生效)\r\n * - false (默认): 需手动导入 style.css 全量样式\r\n * - true: 自动导入对应组件的独立样式 `@robot-admin/naive-ui-components/C_Form/style.css`\r\n */\r\n importStyle?: boolean\r\n}\r\n\r\n/**\r\n * @robot-admin/naive-ui-components 组件自动导入解析器\r\n *\r\n * 匹配组件库中所有 C_ 前缀的组件,自动解析导入路径。\r\n * 类似于 NaiveUiResolver、ElementPlusResolver 等成熟解析器的设计。\r\n */\r\nexport function RobotNaiveUiResolver(\r\n options: RobotNaiveUiResolverOptions = {}\r\n) {\r\n const { importOnDemand = false, importStyle = false } = options\r\n\r\n return {\r\n type: 'component' as const,\r\n resolve: (name: string) => {\r\n if (componentSet.has(name)) {\r\n const from = importOnDemand ? `${PKG_NAME}/${name}` : PKG_NAME\r\n const sideEffects =\r\n importOnDemand && importStyle\r\n ? `${PKG_NAME}/${name}/style.css`\r\n : undefined\r\n return {\r\n name,\r\n from,\r\n sideEffects,\r\n }\r\n }\r\n },\r\n }\r\n}\r\n"],"mappings":"AAoBA,MAAM,EAAW,mCAGJ,EAAiB,+iBAoD7B,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"}
|