@robot-admin/naive-ui-components 0.10.2 → 0.10.3

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +5 -2
  3. package/dist/{C_AudioPlayer-Cj4lUdZo.css.map → C_AudioPlayer-ldTy9Y34.css.map} +1 -1
  4. package/dist/{C_AvatarGroup-D3PwsKME.css.map → C_AvatarGroup-SIzxuuZr.css.map} +1 -1
  5. package/dist/{C_Breadcrumb-DOcLt9uX.css.map → C_Breadcrumb-Bqqrl8nX.css.map} +1 -1
  6. package/dist/C_Breadcrumb.d.cts +2 -2
  7. package/dist/C_Breadcrumb.d.ts +2 -1
  8. package/dist/C_Captcha.d.cts +1 -1
  9. package/dist/C_Cascade.d.cts +1 -1
  10. package/dist/{C_Chat-DwatUQqu.css.map → C_Chat-CF1SU7mc.css.map} +1 -1
  11. package/dist/C_Chat.css +1 -1
  12. package/dist/C_Chat.d.cts +1 -1
  13. package/dist/C_City.d.cts +1 -1
  14. package/dist/C_Code.d.cts +1 -1
  15. package/dist/{C_ContextMenu-CD0iaSju.css.map → C_ContextMenu-Bn_uhJSo.css.map} +1 -1
  16. package/dist/C_ContextMenu.css +1 -1
  17. package/dist/C_ContextMenu.d.cts +1 -1
  18. package/dist/C_Date.d.cts +1 -1
  19. package/dist/C_Editor.d.cts +1 -1
  20. package/dist/C_Guide.d.cts +1 -1
  21. package/dist/C_Icon.d.cts +1 -1
  22. package/dist/C_Language.d.cts +1 -1
  23. package/dist/{C_Login-BrQBs_m4.css.map → C_Login-B3qYkLrN.css.map} +1 -1
  24. package/dist/C_Login.css +1 -1
  25. package/dist/C_Login.d.cts +1 -1
  26. package/dist/C_Markdown.d.cts +1 -1
  27. package/dist/C_Menu.cjs +1 -1
  28. package/dist/C_Menu.d.cts +2 -2
  29. package/dist/C_Menu.d.ts +2 -1
  30. package/dist/C_Menu.js +1 -1
  31. package/dist/C_Menu.js.map +1 -1
  32. package/dist/C_Menu2.js +1 -1
  33. package/dist/C_Menu2.js.map +1 -1
  34. package/dist/{C_OrgChart-BXEp4i4w.css.map → C_OrgChart-ChZu346B.css.map} +1 -1
  35. package/dist/C_OrgChart.css +1 -1
  36. package/dist/{C_Skeleton-BJoFYwrF.css.map → C_Skeleton-BNPbaut7.css.map} +1 -1
  37. package/dist/C_Skeleton.css +1 -1
  38. package/dist/{C_TagsView-DtGtYhBH.css.map → C_TagsView-BN8vMRsY.css.map} +1 -1
  39. package/dist/C_TagsView.css +1 -1
  40. package/dist/C_TagsView.d.cts +1 -1
  41. package/dist/C_TagsView.d.ts +2 -1
  42. package/dist/{C_Timeline-irQcO-b7.css.map → C_Timeline-4rk0Dzgn.css.map} +1 -1
  43. package/dist/C_Timeline.css +1 -1
  44. package/dist/{C_Transfer-11y3k-WD.css.map → C_Transfer-B-vjvhjI.css.map} +1 -1
  45. package/dist/C_Transfer.css +1 -1
  46. package/dist/_shared.cjs +1 -0
  47. package/dist/_shared.d.cts +2 -0
  48. package/dist/_shared.d.ts +2 -0
  49. package/dist/_shared.js +1 -0
  50. package/dist/constants.d.ts +5 -5
  51. package/dist/constants2.d.ts +4 -4
  52. package/dist/constants3.d.ts +3 -3
  53. package/dist/constants4.d.ts +5 -5
  54. package/dist/constants5.d.ts +2 -2
  55. package/dist/data.d.ts +2 -2
  56. package/dist/index.cjs +1 -1
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.d.cts +16 -16
  59. package/dist/index.d.ts +107 -154
  60. package/dist/index.js +1 -1
  61. package/dist/index.js.map +1 -1
  62. package/dist/index10.vue.d.ts +1 -1
  63. package/dist/index11.vue.d.ts +1 -1
  64. package/dist/index12.vue.d.ts +3 -3
  65. package/dist/index13.vue.d.ts +3 -3
  66. package/dist/index14.vue.d.ts +3 -3
  67. package/dist/index15.vue.d.ts +5 -5
  68. package/dist/index16.vue.d.ts +2 -2
  69. package/dist/index17.vue.d.ts +1 -1
  70. package/dist/index18.vue.d.ts +5 -5
  71. package/dist/index19.vue.d.ts +2 -2
  72. package/dist/index2.vue.d.ts +6 -6
  73. package/dist/index20.vue.d.ts +1 -1
  74. package/dist/index21.vue.d.ts +1 -1
  75. package/dist/index22.vue.d.ts +1 -1
  76. package/dist/index23.vue.d.ts +2 -2
  77. package/dist/index24.vue.d.ts +2 -2
  78. package/dist/index26.vue.d.ts +4 -4
  79. package/dist/index27.vue.d.ts +3 -3
  80. package/dist/index28.vue.d.ts +4 -4
  81. package/dist/index3.vue.d.ts +2 -2
  82. package/dist/index4.vue.d.ts +4 -4
  83. package/dist/index5.vue.d.ts +1 -1
  84. package/dist/index6.vue.d.ts +2 -2
  85. package/dist/index7.vue.d.ts +2 -2
  86. package/dist/index8.vue.d.ts +1 -1
  87. package/dist/index9.vue.d.ts +2 -2
  88. package/dist/{types.d.ts → menuAdapter.d.ts} +61 -2
  89. package/dist/menuAdapter.js +2 -0
  90. package/dist/menuAdapter.js.map +1 -0
  91. package/dist/style.css +16 -16
  92. package/dist/useCollapsePanel.d.ts +1 -1
  93. package/dist/useCropperCore.d.ts +5 -5
  94. package/dist/useDraggableLayout.d.ts +5 -5
  95. package/dist/useDynamicFormState.d.ts +2 -2
  96. package/dist/useEdgeInteraction.d.ts +1 -1
  97. package/dist/useInfiniteScroll.d.ts +3 -3
  98. package/dist/useModalEdit.d.ts +3 -3
  99. package/dist/useQRCode.d.ts +3 -3
  100. package/dist/useSearchState.d.ts +2 -2
  101. package/dist/useSignatureHistory.d.ts +3 -3
  102. package/dist/useSplitResize.d.ts +1 -1
  103. package/dist/useTimeSelection.d.ts +3 -3
  104. package/dist/useTreeOperations.d.ts +2 -2
  105. package/dist/useWorkflowValidation.d.ts +7 -7
  106. package/package.json +3 -2
  107. package/dist/index2.d.ts +0 -120
@@ -1,4 +1,5 @@
1
1
  import { VNode } from "vue";
2
+ import { MenuOption } from "naive-ui/es";
2
3
 
3
4
  //#region src/components/_shared/types.d.ts
4
5
  /**
@@ -104,5 +105,63 @@ interface BreadcrumbItem {
104
105
  children?: BreadcrumbItem[];
105
106
  }
106
107
  //#endregion
107
- export { TagItem as i, RouteItem as n, RouteMeta as r, BreadcrumbItem as t };
108
- //# sourceMappingURL=types.d.ts.map
108
+ //#region src/components/_shared/menuAdapter.d.ts
109
+ /**
110
+ * 菜单适配器配置
111
+ */
112
+ interface MenuAdapterConfig {
113
+ /**
114
+ * 标签文本格式化函数(用于 i18n)
115
+ * 默认:原样返回 title
116
+ */
117
+ labelFormatter?: (title: string) => string;
118
+ /**
119
+ * 获取菜单项的唯一 key
120
+ * 默认:`normalizePath(route.path)`
121
+ */
122
+ getKey?: (route: RouteItem) => string;
123
+ /**
124
+ * 获取显示文本
125
+ * 默认:`route.meta?.title || route.name || ''`
126
+ */
127
+ getLabel?: (route: RouteItem) => string;
128
+ /**
129
+ * 路由过滤器 — return false 排除该项
130
+ * 默认:排除 `meta.hidden === true`
131
+ */
132
+ filter?: (route: RouteItem) => boolean;
133
+ /**
134
+ * 自定义图标渲染
135
+ * 默认:字符串 → Iconify Icon;函数 → 直接调用
136
+ */
137
+ renderIcon?: (icon: string | (() => VNode) | undefined) => (() => VNode) | undefined;
138
+ /**
139
+ * 是否递归处理 children
140
+ * 默认:true
141
+ */
142
+ recursive?: boolean;
143
+ }
144
+ /**
145
+ * 将路由数据转换为 NMenu 的 MenuOption[]
146
+ *
147
+ * 支持的输入格式:
148
+ * 1. **Vue Router RouteRecordRaw** — 直接传 `router.getRoutes()` 或手写路由表
149
+ * 2. **后端 JSON 路由表** — `{ path, meta: { title, icon }, children }`
150
+ * 3. **自定义格式** — 通过 config 完全自定义 key/label/icon 的取值逻辑
151
+ *
152
+ * @param routes 路由数据数组
153
+ * @param config 适配器配置
154
+ * @returns NMenu 可直接使用的 MenuOption[]
155
+ */
156
+ declare function createMenuOptions(routes: RouteItem[], config?: MenuAdapterConfig): MenuOption[];
157
+ /**
158
+ * 将路由树扁平化为一维数组(常用于搜索、快捷导航)
159
+ *
160
+ * @param routes 路由数据数组
161
+ * @param filter 过滤器(默认排除 hidden)
162
+ * @returns 扁平化后的路由数组
163
+ */
164
+ declare function flattenRoutes(routes: RouteItem[], filter?: (route: RouteItem) => boolean): RouteItem[];
165
+ //#endregion
166
+ export { RouteItem as a, BreadcrumbItem as i, createMenuOptions as n, RouteMeta as o, flattenRoutes as r, TagItem as s, MenuAdapterConfig as t };
167
+ //# sourceMappingURL=menuAdapter.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{h as e}from"vue";import{Icon as t}from"@iconify/vue";const n=e=>e.startsWith(`/`)?e:`/${e}`,r=e=>e.path?n(e.path):``,i=e=>e.meta?.title||e.name||``,a=e=>!e.meta?.hidden,o=n=>{if(n){if(typeof n==`string`)return()=>e(`span`,{class:`n-icon`,style:`display: inline-flex; align-items: center;`},[e(t,{icon:n})]);if(typeof n==`function`)return n}};function s(e,t={}){let{labelFormatter:n=e=>e,getKey:s=r,getLabel:c=i,filter:l=a,renderIcon:u=o,recursive:d=!0}=t,f=e=>e.filter(l).map(e=>{let t=e.meta?.icon||e.icon,r=d&&e.children?.length?f(e.children):void 0;return{key:s(e),label:n(c(e)),disabled:e.disabled||!1,icon:u(t),...e.type&&{type:e.type},...r?.length&&{children:r}}});return f(e)}function c(e,t=a){let n=[],r=e=>{for(let i of e)t(i)&&n.push(i),i.children?.length&&r(i.children)};return r(e),n}export{c as n,s as t};
2
+ //# sourceMappingURL=menuAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menuAdapter.js","names":[],"sources":["../src/components/_shared/menuAdapter.ts"],"sourcesContent":["/**\n * 菜单适配器 — 将路由数据转换为 NMenu 的 MenuOption[]\n *\n * 设计理念:\n * - 开箱即用:`createMenuOptions(routes)` 零配置即可生成菜单\n * - 完全可控:通过 `MenuAdapterConfig` 定制每一步转换逻辑\n * - i18n 解耦:`labelFormatter` 回调注入翻译函数,不绑定任何 i18n 方案\n *\n * @example 基础用法\n * ```ts\n * import { createMenuOptions } from '@robot-admin/naive-ui-components'\n *\n * const menuOptions = createMenuOptions(routes)\n * ```\n *\n * @example 带 i18n + 过滤\n * ```ts\n * const menuOptions = createMenuOptions(routes, {\n * labelFormatter: t, // vue-i18n 的 t 函数\n * filter: route => !route.meta?.hidden,\n * })\n * ```\n *\n * @example 自定义 key 取值\n * ```ts\n * const menuOptions = createMenuOptions(routes, {\n * getKey: route => route.name || route.path,\n * })\n * ```\n */\n\nimport { h, type VNode } from 'vue'\nimport { Icon } from '@iconify/vue'\nimport type { MenuOption } from 'naive-ui/es'\nimport type { RouteItem } from './types'\n\n/**\n * 菜单适配器配置\n */\nexport interface MenuAdapterConfig {\n /**\n * 标签文本格式化函数(用于 i18n)\n * 默认:原样返回 title\n */\n labelFormatter?: (title: string) => string\n\n /**\n * 获取菜单项的唯一 key\n * 默认:`normalizePath(route.path)`\n */\n getKey?: (route: RouteItem) => string\n\n /**\n * 获取显示文本\n * 默认:`route.meta?.title || route.name || ''`\n */\n getLabel?: (route: RouteItem) => string\n\n /**\n * 路由过滤器 — return false 排除该项\n * 默认:排除 `meta.hidden === true`\n */\n filter?: (route: RouteItem) => boolean\n\n /**\n * 自定义图标渲染\n * 默认:字符串 → Iconify Icon;函数 → 直接调用\n */\n renderIcon?: (\n icon: string | (() => VNode) | undefined\n ) => (() => VNode) | undefined\n\n /**\n * 是否递归处理 children\n * 默认:true\n */\n recursive?: boolean\n}\n\n// ====== 内置默认值 ======\n\nconst normalizePath = (path: string): string =>\n path.startsWith('/') ? path : `/${path}`\n\nconst defaultGetKey = (route: RouteItem): string =>\n route.path ? normalizePath(route.path) : ''\n\nconst defaultGetLabel = (route: RouteItem): string =>\n route.meta?.title || route.name || ''\n\nconst defaultFilter = (route: RouteItem): boolean => !route.meta?.hidden\n\nconst defaultRenderIcon = (\n icon: string | (() => VNode) | undefined\n): (() => VNode) | undefined => {\n if (!icon) return undefined\n if (typeof icon === 'string') {\n return () =>\n h(\n 'span',\n {\n class: 'n-icon',\n style: 'display: inline-flex; align-items: center;',\n },\n [h(Icon, { icon })]\n )\n }\n if (typeof icon === 'function') return icon\n return undefined\n}\n\n/**\n * 将路由数据转换为 NMenu 的 MenuOption[]\n *\n * 支持的输入格式:\n * 1. **Vue Router RouteRecordRaw** — 直接传 `router.getRoutes()` 或手写路由表\n * 2. **后端 JSON 路由表** — `{ path, meta: { title, icon }, children }`\n * 3. **自定义格式** — 通过 config 完全自定义 key/label/icon 的取值逻辑\n *\n * @param routes 路由数据数组\n * @param config 适配器配置\n * @returns NMenu 可直接使用的 MenuOption[]\n */\nexport function createMenuOptions(\n routes: RouteItem[],\n config: MenuAdapterConfig = {}\n): MenuOption[] {\n const {\n labelFormatter = (s: string) => s,\n getKey = defaultGetKey,\n getLabel = defaultGetLabel,\n filter = defaultFilter,\n renderIcon = defaultRenderIcon,\n recursive = true,\n } = config\n\n const convert = (items: RouteItem[]): MenuOption[] => {\n return items.filter(filter).map(item => {\n const icon = item.meta?.icon || (item as any).icon\n const children =\n recursive && item.children?.length ? convert(item.children) : undefined\n\n return {\n key: getKey(item),\n label: labelFormatter(getLabel(item)),\n disabled: item.disabled || false,\n icon: renderIcon(icon),\n ...(item.type && { type: item.type }),\n ...(children?.length && { children }),\n }\n }) as MenuOption[]\n }\n\n return convert(routes)\n}\n\n/**\n * 将路由树扁平化为一维数组(常用于搜索、快捷导航)\n *\n * @param routes 路由数据数组\n * @param filter 过滤器(默认排除 hidden)\n * @returns 扁平化后的路由数组\n */\nexport function flattenRoutes(\n routes: RouteItem[],\n filter: (route: RouteItem) => boolean = defaultFilter\n): RouteItem[] {\n const result: RouteItem[] = []\n const walk = (items: RouteItem[]) => {\n for (const item of items) {\n if (filter(item)) {\n result.push(item)\n }\n if (item.children?.length) {\n walk(item.children)\n }\n }\n }\n walk(routes)\n return result\n}\n"],"mappings":"4DAiFA,MAAM,EAAiB,GACrB,EAAK,WAAW,IAAI,CAAG,EAAO,IAAI,IAE9B,EAAiB,GACrB,EAAM,KAAO,EAAc,EAAM,KAAK,CAAG,GAErC,EAAmB,GACvB,EAAM,MAAM,OAAS,EAAM,MAAQ,GAE/B,EAAiB,GAA8B,CAAC,EAAM,MAAM,OAE5D,EACJ,GAC8B,CACzB,KACL,IAAI,OAAO,GAAS,SAClB,UACE,EACE,OACA,CACE,MAAO,SACP,MAAO,6CACR,CACD,CAAC,EAAE,EAAM,CAAE,OAAM,CAAC,CAAC,CACpB,CAEL,GAAI,OAAO,GAAS,WAAY,OAAO,IAgBzC,SAAgB,EACd,EACA,EAA4B,EAAE,CAChB,CACd,GAAM,CACJ,iBAAkB,GAAc,EAChC,SAAS,EACT,WAAW,EACX,SAAS,EACT,aAAa,EACb,YAAY,IACV,EAEE,EAAW,GACR,EAAM,OAAO,EAAO,CAAC,IAAI,GAAQ,CACtC,IAAM,EAAO,EAAK,MAAM,MAAS,EAAa,KACxC,EACJ,GAAa,EAAK,UAAU,OAAS,EAAQ,EAAK,SAAS,CAAG,IAAA,GAEhE,MAAO,CACL,IAAK,EAAO,EAAK,CACjB,MAAO,EAAe,EAAS,EAAK,CAAC,CACrC,SAAU,EAAK,UAAY,GAC3B,KAAM,EAAW,EAAK,CACtB,GAAI,EAAK,MAAQ,CAAE,KAAM,EAAK,KAAM,CACpC,GAAI,GAAU,QAAU,CAAE,WAAU,CACrC,EACD,CAGJ,OAAO,EAAQ,EAAO,CAUxB,SAAgB,EACd,EACA,EAAwC,EAC3B,CACb,IAAM,EAAsB,EAAE,CACxB,EAAQ,GAAuB,CACnC,IAAK,IAAM,KAAQ,EACb,EAAO,EAAK,EACd,EAAO,KAAK,EAAK,CAEf,EAAK,UAAU,QACjB,EAAK,EAAK,SAAS,EAKzB,OADA,EAAK,EAAO,CACL"}
package/dist/style.css CHANGED
@@ -1205,7 +1205,7 @@ html.dark .action-divider[data-v-10de07f6]:hover {
1205
1205
 
1206
1206
  /*# sourceMappingURL=C_Cascade-CmCrLVft.css.map*/
1207
1207
 
1208
- /* --- C_Chat-DeUv6uuI.css --- */
1208
+ /* --- C_Chat-CF1SU7mc.css --- */
1209
1209
  /* unplugin-vue-components disabled *//* ─── CSS 变量(基于项目主题变量,自动适配明暗) ───────────────────────── */
1210
1210
  .c-chat[data-v-5b4bf8dc] {
1211
1211
  --chat-bg: var(--card-color);
@@ -1606,7 +1606,7 @@ html.dark .action-divider[data-v-10de07f6]:hover {
1606
1606
  }
1607
1607
  }
1608
1608
 
1609
- /*# sourceMappingURL=C_Chat-DeUv6uuI.css.map*/
1609
+ /*# sourceMappingURL=C_Chat-CF1SU7mc.css.map*/
1610
1610
 
1611
1611
  /* --- C_City-DdkX6u64.css --- */
1612
1612
  /* unplugin-vue-components disabled */.city-selector-trigger[data-v-6286e78d] {
@@ -1925,7 +1925,7 @@ html.dark .action-divider[data-v-10de07f6]:hover {
1925
1925
 
1926
1926
  /*# sourceMappingURL=C_CollapsePanel-BSKcWSmY.css.map*/
1927
1927
 
1928
- /* --- C_ContextMenu-C9iuxG2n.css --- */
1928
+ /* --- C_ContextMenu-Bn_uhJSo.css --- */
1929
1929
  /* unplugin-vue-components disabled */.c-context-menu[data-v-f2de30a3] {
1930
1930
  --ctx-bg: var(--card-color);
1931
1931
  --ctx-bg-blur: 12px;
@@ -2040,7 +2040,7 @@ html.dark .action-divider[data-v-10de07f6]:hover {
2040
2040
  z-index: 9998;
2041
2041
  }
2042
2042
 
2043
- /*# sourceMappingURL=C_ContextMenu-C9iuxG2n.css.map*/
2043
+ /*# sourceMappingURL=C_ContextMenu-Bn_uhJSo.css.map*/
2044
2044
 
2045
2045
  /* --- C_Cron-BIQ2By9v.css --- */
2046
2046
  /* unplugin-vue-components disabled */.cron-field-editor__grid[data-v-e6fa8e5b] {
@@ -5604,7 +5604,7 @@ to {
5604
5604
 
5605
5605
  /*# sourceMappingURL=C_ImageCropper-CdTX2nxU.css.map*/
5606
5606
 
5607
- /* --- C_Login-BrQBs_m4.css --- */
5607
+ /* --- C_Login-B3qYkLrN.css --- */
5608
5608
  /* unplugin-vue-components disabled *//**
5609
5609
  * C_Login 组件样式
5610
5610
  * 通过 CSS 变量覆盖主题,示例:
@@ -6119,7 +6119,7 @@ to {
6119
6119
  --cl-link-hover: #1a1a1a;
6120
6120
  }
6121
6121
 
6122
- /*# sourceMappingURL=C_Login-BrQBs_m4.css.map*/
6122
+ /*# sourceMappingURL=C_Login-B3qYkLrN.css.map*/
6123
6123
 
6124
6124
  /* --- C_Map-CWMMN58_.css --- */
6125
6125
  /* unplugin-vue-components disabled */.c-map[data-v-35363772] {
@@ -6740,7 +6740,7 @@ to {
6740
6740
 
6741
6741
  /*# sourceMappingURL=C_NotificationCenter-D7GGGWg7.css.map*/
6742
6742
 
6743
- /* --- C_OrgChart-BXEp4i4w.css --- */
6743
+ /* --- C_OrgChart-ChZu346B.css --- */
6744
6744
  /* unplugin-vue-components disabled *//* C_OrgChart 组织架构图组件样式 */
6745
6745
  .c-orgchart {
6746
6746
  --c-orgchart-line-color: #d1d5db;
@@ -7022,7 +7022,7 @@ to {
7022
7022
  text-align: center;
7023
7023
  }
7024
7024
 
7025
- /*# sourceMappingURL=C_OrgChart-BXEp4i4w.css.map*/
7025
+ /*# sourceMappingURL=C_OrgChart-ChZu346B.css.map*/
7026
7026
 
7027
7027
  /* --- C_QRCode-B_1lHUdx.css --- */
7028
7028
  /* unplugin-vue-components disabled *//* C_QRCode styles */
@@ -7164,7 +7164,7 @@ to {
7164
7164
 
7165
7165
  /*# sourceMappingURL=C_Signature-Bp-RBpAl.css.map*/
7166
7166
 
7167
- /* --- C_Skeleton-BJoFYwrF.css --- */
7167
+ /* --- C_Skeleton-BNPbaut7.css --- */
7168
7168
  /* unplugin-vue-components disabled *//* C_Skeleton 骨架屏组件样式 */
7169
7169
  .c-skeleton {
7170
7170
  --c-skeleton-bg: #e5e7eb;
@@ -7417,7 +7417,7 @@ to {
7417
7417
  margin-top: 4px;
7418
7418
  }
7419
7419
 
7420
- /*# sourceMappingURL=C_Skeleton-BJoFYwrF.css.map*/
7420
+ /*# sourceMappingURL=C_Skeleton-BNPbaut7.css.map*/
7421
7421
 
7422
7422
  /* --- C_SplitPane-CgGWYsRE.css --- */
7423
7423
  /* unplugin-vue-components disabled *//* 分割面板组件样式 */
@@ -8347,7 +8347,7 @@ to {
8347
8347
 
8348
8348
  /*# sourceMappingURL=C_Table--kbQaaBv.css.map*/
8349
8349
 
8350
- /* --- C_TagsView-DtGtYhBH.css --- */
8350
+ /* --- C_TagsView-BN8vMRsY.css --- */
8351
8351
  /* unplugin-vue-components disabled *//* ===========================================
8352
8352
  * 标签组件样式 - 精简版
8353
8353
  * =========================================== */
@@ -8541,7 +8541,7 @@ to {
8541
8541
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25) !important;
8542
8542
  }
8543
8543
 
8544
- /*# sourceMappingURL=C_TagsView-DtGtYhBH.css.map*/
8544
+ /*# sourceMappingURL=C_TagsView-BN8vMRsY.css.map*/
8545
8545
 
8546
8546
  /* --- C_Time-BQ9PGy8B.css --- */
8547
8547
  /* unplugin-vue-components disabled *//* 时间选择器组件样式 */
@@ -8568,7 +8568,7 @@ to {
8568
8568
 
8569
8569
  /*# sourceMappingURL=C_Time-BQ9PGy8B.css.map*/
8570
8570
 
8571
- /* --- C_Timeline-DdESmqwL.css --- */
8571
+ /* --- C_Timeline-4rk0Dzgn.css --- */
8572
8572
  /* unplugin-vue-components disabled */.c-timeline[data-v-3da6d11e] {
8573
8573
  --tl-bg: transparent;
8574
8574
  --tl-text-primary: var(--app-text-primary);
@@ -8868,9 +8868,9 @@ to {
8868
8868
  }
8869
8869
  }
8870
8870
 
8871
- /*# sourceMappingURL=C_Timeline-DdESmqwL.css.map*/
8871
+ /*# sourceMappingURL=C_Timeline-4rk0Dzgn.css.map*/
8872
8872
 
8873
- /* --- C_Transfer-11y3k-WD.css --- */
8873
+ /* --- C_Transfer-B-vjvhjI.css --- */
8874
8874
  /* unplugin-vue-components disabled *//**
8875
8875
  * C_Transfer — 穿梭框组件样式
8876
8876
  * 变量说明:
@@ -9063,7 +9063,7 @@ to {
9063
9063
  letter-spacing: 0.04em;
9064
9064
  }
9065
9065
 
9066
- /*# sourceMappingURL=C_Transfer-11y3k-WD.css.map*/
9066
+ /*# sourceMappingURL=C_Transfer-B-vjvhjI.css.map*/
9067
9067
 
9068
9068
  /* --- C_Tree-CsXgGfhn.css --- */
9069
9069
  /* unplugin-vue-components disabled */.c-tree[data-v-30316c81] {
@@ -81,12 +81,12 @@ declare const __VLS_base: vue.DefineComponent<Props, CollapsePanelExpose, {}, {}
81
81
  "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
82
82
  }>, {
83
83
  bordered: boolean;
84
+ persistKey: string;
84
85
  activeKeys: string[];
85
86
  defaultActiveKeys: string[];
86
87
  accordion: boolean;
87
88
  variant: CollapsePanelVariant;
88
89
  expandIconPosition: ExpandIconPosition;
89
- persistKey: string;
90
90
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
91
91
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
92
92
  declare const _default: typeof __VLS_export;
@@ -51,28 +51,28 @@ interface ImageCropperEmits {
51
51
  //#endregion
52
52
  //#region src/components/C_ImageCropper/index.vue.d.ts
53
53
  declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
54
- cancel: () => any;
55
54
  error: (error: Event) => any;
56
55
  ready: () => any;
57
56
  crop: (result: any) => any;
58
57
  confirm: (result: any) => any;
58
+ cancel: () => any;
59
59
  }, string, vue.PublicProps, Readonly<ImageCropperProps> & Readonly<{
60
- onCancel?: (() => any) | undefined;
61
60
  onError?: ((error: Event) => any) | undefined;
62
61
  onReady?: (() => any) | undefined;
63
62
  onCrop?: ((result: any) => any) | undefined;
64
63
  onConfirm?: ((result: any) => any) | undefined;
64
+ onCancel?: (() => any) | undefined;
65
65
  }>, {
66
- disabled: boolean;
67
- showPreview: boolean;
68
66
  height: string | number;
69
- showToolbar: boolean;
67
+ disabled: boolean;
70
68
  src: string;
71
69
  aspectRatio: number;
72
70
  outputFormat: CropOutputFormat;
73
71
  outputQuality: number;
74
72
  maxOutputWidth: number;
75
73
  maxOutputHeight: number;
74
+ showPreview: boolean;
75
+ showToolbar: boolean;
76
76
  circular: boolean;
77
77
  modal: boolean;
78
78
  modalTitle: string;
@@ -117,16 +117,16 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
117
117
  "onList-change"?: ((list: DraggableItem[]) => any) | undefined;
118
118
  }>, {
119
119
  sort: boolean;
120
- animation: number;
121
- modelValue: DraggableItem[];
122
120
  disabled: boolean;
121
+ modelValue: DraggableItem[];
122
+ gap: string | number;
123
+ delay: number;
124
+ emptyText: string;
123
125
  direction: "vertical" | "horizontal";
124
126
  layout: LayoutMode;
125
127
  itemClass: string;
126
- delay: number;
127
- gap: string | number;
128
- emptyText: string;
129
128
  group: string | GroupOptions;
129
+ animation: number;
130
130
  handle: string;
131
131
  showHandle: boolean;
132
132
  ghostClass: string;
@@ -490,14 +490,14 @@ declare const __VLS_base: vue.DefineComponent<CFormProps, {
490
490
  asyncLoadingMap: vue.Ref<Record<string, boolean>, Record<string, boolean>>;
491
491
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
492
492
  "update:modelValue": (model: Record<string, any>) => any;
493
+ "validate-error": (errors: unknown) => any;
493
494
  submit: (payload: SubmitEventPayload) => any;
494
495
  "validate-success": (model: Record<string, any>) => any;
495
- "validate-error": (errors: unknown) => any;
496
496
  }, string, vue.PublicProps, Readonly<CFormProps> & Readonly<{
497
497
  "onUpdate:modelValue"?: ((model: Record<string, any>) => any) | undefined;
498
+ "onValidate-error"?: ((errors: unknown) => any) | undefined;
498
499
  onSubmit?: ((payload: SubmitEventPayload) => any) | undefined;
499
500
  "onValidate-success"?: ((model: Record<string, any>) => any) | undefined;
500
- "onValidate-error"?: ((errors: unknown) => any) | undefined;
501
501
  }>, {
502
502
  config: FormConfig;
503
503
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -261,9 +261,9 @@ declare const __VLS_export: vue.DefineComponent<Props, {
261
261
  }>, {
262
262
  width: string | number;
263
263
  height: string | number;
264
+ theme: "light" | "dark";
264
265
  readonly: boolean;
265
266
  showToolbar: boolean;
266
- theme: "light" | "dark";
267
267
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
268
268
  declare const _default: typeof __VLS_export;
269
269
  //#endregion
@@ -79,18 +79,17 @@ type __VLS_Slots = {} & {
79
79
  footer?: (props: typeof __VLS_5) => any;
80
80
  };
81
81
  declare const __VLS_base: vue.DefineComponent<WaterFallProps, WaterFallExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
82
- "item-click": (item: WaterFallItem, index: number) => any;
83
82
  "load-more": () => any;
83
+ "item-click": (item: WaterFallItem, index: number) => any;
84
84
  "image-loaded": (item: WaterFallItem) => any;
85
85
  "image-error": (item: WaterFallItem) => any;
86
86
  }, string, vue.PublicProps, Readonly<WaterFallProps> & Readonly<{
87
- "onItem-click"?: ((item: WaterFallItem, index: number) => any) | undefined;
88
87
  "onLoad-more"?: (() => any) | undefined;
88
+ "onItem-click"?: ((item: WaterFallItem, index: number) => any) | undefined;
89
89
  "onImage-loaded"?: ((item: WaterFallItem) => any) | undefined;
90
90
  "onImage-error"?: ((item: WaterFallItem) => any) | undefined;
91
91
  }>, {
92
92
  columns: number;
93
- loading: boolean;
94
93
  gap: number;
95
94
  lazy: boolean;
96
95
  infinite: boolean;
@@ -98,6 +97,7 @@ declare const __VLS_base: vue.DefineComponent<WaterFallProps, WaterFallExpose, {
98
97
  skeletonCount: number;
99
98
  animationDuration: number;
100
99
  breakpoints: WaterFallBreakpoint[];
100
+ loading: boolean;
101
101
  noMore: boolean;
102
102
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
103
103
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -827,7 +827,7 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props, {
827
827
  clearRowSelection: () => void;
828
828
  resetToFirstPage: () => void;
829
829
  getSelectedRows: () => DataRecord[];
830
- getEditingData: () => DataRecord | vue.Ref<Record<string, any>, Record<string, any>> | null;
830
+ getEditingData: () => vue.Ref<Record<string, any>, Record<string, any>> | DataRecord | null;
831
831
  isEditing: (rowKey: DataTableRowKey$1, columnKey?: string) => boolean;
832
832
  isExpanded: (rowKey: DataTableRowKey$1) => boolean;
833
833
  getManager: () => {
@@ -836,7 +836,7 @@ declare const __VLS_base: vue.DefineComponent<__VLS_Props, {
836
836
  cancel(): void;
837
837
  save(): Promise<void>;
838
838
  isEditing(rowKey: DataTableRowKey$1, columnKey?: string): boolean;
839
- getEditingData(): DataRecord | vue.Ref<Record<string, any>, Record<string, any>> | null;
839
+ getEditingData(): vue.Ref<Record<string, any>, Record<string, any>> | DataRecord | null;
840
840
  };
841
841
  expand: {
842
842
  row(rowKey: DataTableRowKey$1): Promise<void>;
@@ -1158,7 +1158,7 @@ declare function useTableManager(params: TableManagerParams): {
1158
1158
  cancel(): void; /** 保存编辑 */
1159
1159
  save(): Promise<void>; /** 是否正在编辑 */
1160
1160
  isEditing(rowKey: DataTableRowKey$1, columnKey?: string): boolean; /** 获取当前编辑数据 */
1161
- getEditingData(): DataRecord | vue.Ref<Record<string, any>, Record<string, any>> | null;
1161
+ getEditingData(): vue.Ref<Record<string, any>, Record<string, any>> | DataRecord | null;
1162
1162
  };
1163
1163
  expand: {
1164
1164
  /** 展开行 */row(rowKey: DataTableRowKey$1): Promise<void>; /** 折叠行 */
@@ -50,13 +50,13 @@ declare const __VLS_export: vue.DefineComponent<Props, QRCodeExpose, {}, {}, {},
50
50
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
51
51
  onError?: ((error: Error) => any) | undefined;
52
52
  }>, {
53
+ showBorder: boolean;
54
+ label: string;
55
+ showLabel: boolean;
53
56
  mode: RenderMode;
54
57
  size: number;
55
58
  color: string;
56
- label: string;
57
- showBorder: boolean;
58
59
  margin: number;
59
- showLabel: boolean;
60
60
  bgColor: string;
61
61
  errorCorrectionLevel: ErrorCorrectionLevel;
62
62
  logo: LogoOptions;
@@ -55,12 +55,12 @@ declare const __VLS_export: vue.DefineComponent<Props, {
55
55
  cleanFn: () => void;
56
56
  changeFoldState: () => void;
57
57
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
58
- reset: () => any;
59
58
  search: (params: SearchFormParams) => any;
59
+ reset: () => any;
60
60
  "change-params": (params: SearchFormParams) => any;
61
61
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
62
- onReset?: (() => any) | undefined;
63
62
  onSearch?: ((params: SearchFormParams) => any) | undefined;
63
+ onReset?: (() => any) | undefined;
64
64
  "onChange-params"?: ((params: SearchFormParams) => any) | undefined;
65
65
  }>, {
66
66
  size: "small" | "medium" | "large";
@@ -91,16 +91,16 @@ interface SignatureEmits {
91
91
  //#endregion
92
92
  //#region src/components/C_Signature/index.vue.d.ts
93
93
  declare const __VLS_export: vue.DefineComponent<SignatureProps, SignatureExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
94
- clear: () => any;
95
94
  change: (data: SignatureStroke[]) => any;
95
+ clear: () => any;
96
96
  "start-draw": () => any;
97
97
  drawing: (point: SignaturePoint) => any;
98
98
  "end-draw": (stroke: SignatureStroke) => any;
99
99
  undo: () => any;
100
100
  redo: () => any;
101
101
  }, string, vue.PublicProps, Readonly<SignatureProps> & Readonly<{
102
- onClear?: (() => any) | undefined;
103
102
  onChange?: ((data: SignatureStroke[]) => any) | undefined;
103
+ onClear?: (() => any) | undefined;
104
104
  "onStart-draw"?: (() => any) | undefined;
105
105
  onDrawing?: ((point: SignaturePoint) => any) | undefined;
106
106
  "onEnd-draw"?: ((stroke: SignatureStroke) => any) | undefined;
@@ -108,8 +108,8 @@ declare const __VLS_export: vue.DefineComponent<SignatureProps, SignatureExpose,
108
108
  onRedo?: (() => any) | undefined;
109
109
  }>, {
110
110
  width: number | string;
111
- disabled: boolean;
112
111
  height: number | string;
112
+ disabled: boolean;
113
113
  readonly: boolean;
114
114
  showToolbar: boolean;
115
115
  maxHistory: number;
@@ -79,7 +79,6 @@ declare const __VLS_base: vue.DefineComponent<Props, SplitPaneExpose, {}, {}, {}
79
79
  "onDrag-end"?: ((size: number) => any) | undefined;
80
80
  }>, {
81
81
  disabled: boolean;
82
- step: number;
83
82
  direction: SplitDirection;
84
83
  defaultSize: number;
85
84
  minSize: number;
@@ -87,6 +86,7 @@ declare const __VLS_base: vue.DefineComponent<Props, SplitPaneExpose, {}, {}, {}
87
86
  collapsible: boolean;
88
87
  showCollapseButton: boolean;
89
88
  gutterSize: number;
89
+ step: number;
90
90
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
91
91
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
92
92
  declare const _default: typeof __VLS_export;
@@ -48,11 +48,12 @@ declare const __VLS_export: vue.DefineComponent<TimeProps, TimeExpose, {}, {}, {
48
48
  "onChange-start"?: ((time: number | null) => any) | undefined;
49
49
  "onChange-end"?: ((time: number | null) => any) | undefined;
50
50
  }>, {
51
+ format: string;
51
52
  mode: TimeMode;
53
+ placeholder: string;
52
54
  startPlaceholder: string;
53
55
  endPlaceholder: string;
54
- placeholder: string;
55
- format: string;
56
+ attrs: Record<string, any>;
56
57
  useHours: boolean;
57
58
  useMinutes: boolean;
58
59
  useSeconds: boolean;
@@ -61,7 +62,6 @@ declare const __VLS_export: vue.DefineComponent<TimeProps, TimeExpose, {}, {}, {
61
62
  secondStep: number;
62
63
  startTimeProps: Record<string, any>;
63
64
  endTimeProps: Record<string, any>;
64
- attrs: Record<string, any>;
65
65
  defaultStartTime: number | null;
66
66
  defaultEndTime: number | null;
67
67
  defaultSingleTime: number | null;
@@ -104,14 +104,14 @@ declare const __VLS_base: vue.DefineComponent<TreeProps, TreeExpose, {}, {}, {},
104
104
  }>, {
105
105
  mode: TreeMode;
106
106
  showToolbar: boolean;
107
+ actions: ActionConfig[];
108
+ draggable: boolean;
107
109
  labelField: string;
108
110
  childrenField: string;
109
- actions: ActionConfig[];
110
111
  keyField: string;
111
112
  searchPattern: string;
112
113
  searchable: boolean;
113
114
  searchPlaceholder: string;
114
- draggable: boolean;
115
115
  showLine: boolean;
116
116
  addable: boolean;
117
117
  addText: string;
@@ -237,25 +237,25 @@ declare const __VLS_export: vue.DefineComponent<WorkflowProps, {
237
237
  conditionNodes: number;
238
238
  }>;
239
239
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
240
- "update:modelValue": (value: WorkflowData) => any;
241
240
  change: (value: WorkflowData) => any;
242
- save: (data: WorkflowData) => any;
243
- "validate-error": (errors: ValidationError[]) => any;
241
+ "update:modelValue": (value: WorkflowData) => any;
244
242
  "node-click": (node: WorkflowNode) => any;
245
243
  "edge-click": (edge: WorkflowEdge) => any;
244
+ save: (data: WorkflowData) => any;
245
+ "validate-error": (errors: ValidationError[]) => any;
246
246
  }, string, vue.PublicProps, Readonly<WorkflowProps> & Readonly<{
247
- "onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
248
247
  onChange?: ((value: WorkflowData) => any) | undefined;
249
- onSave?: ((data: WorkflowData) => any) | undefined;
250
- "onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
248
+ "onUpdate:modelValue"?: ((value: WorkflowData) => any) | undefined;
251
249
  "onNode-click"?: ((node: WorkflowNode) => any) | undefined;
252
250
  "onEdge-click"?: ((edge: WorkflowEdge) => any) | undefined;
251
+ onSave?: ((data: WorkflowData) => any) | undefined;
252
+ "onValidate-error"?: ((errors: ValidationError[]) => any) | undefined;
253
253
  }>, {
254
- readonly: boolean;
255
254
  theme: "light" | "dark";
256
255
  users: User[];
257
256
  roles: Role[];
258
257
  departments: Department[];
258
+ readonly: boolean;
259
259
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
260
260
  declare const _default: typeof __VLS_export;
261
261
  //#endregion
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.10.2",
6
+ "version": "0.10.3",
7
7
  "description": "基于 Naive UI 的 Vue 3 组件库",
8
8
  "type": "module",
9
9
  "main": "dist/index.cjs",
@@ -60,10 +60,11 @@
60
60
  "build:scss": "node scripts/gen-global-scss.js && sass src/styles/global.scss dist/global-scss.css --style=compressed --no-source-map --load-path=src --silence-deprecation=legacy-js-api",
61
61
  "build:css": "node scripts/merge-css.js",
62
62
  "build:exports": "node scripts/gen-exports.js",
63
- "build": "tsdown && bun run build:scss && bun run build:css && bun run build:exports",
63
+ "build": "tsdown && bun run build:scss && bun run build:css && bun run build:exports && bun run check:dist",
64
64
  "type-check": "tsc --noEmit",
65
65
  "test": "bun test",
66
66
  "check:exports": "node scripts/check-export-conflicts.js",
67
+ "check:dist": "node scripts/check-dist-entries.js",
67
68
  "verify": "bun run type-check && bun run test && bun run check:exports && bun run build",
68
69
  "prepublishOnly": "bun run build",
69
70
  "release": "changeset publish",