@jackbo_vip/admin-kit 1.0.14 → 1.0.15

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 (2) hide show
  1. package/dist/index.d.ts +566 -35
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,40 +1,571 @@
1
1
  // Type declarations for @jackbo_vip/admin-kit
2
2
  // This package bundles all dependencies into a single distributable package
3
+ // Generated automatically - do not edit
3
4
 
4
- // Note: Full type declarations will be available after building all workspace packages
5
- // For now, we provide basic type support
6
-
7
- export * from 'vue';
8
- export * from 'vue-router';
9
- export * from '@vueuse/core';
10
-
11
- // Component types
12
- export declare const AdminButton: any;
13
- export declare const AdminIcon: any;
14
- export declare const Badge: any;
15
- export declare const Card: any;
16
- export declare const CardHeader: any;
17
- export declare const CardTitle: any;
18
- export declare const CardDescription: any;
19
- export declare const CardContent: any;
20
- export declare const CardFooter: any;
21
-
22
- // Composables
23
- export declare function useIsMobile(): any;
24
- export declare function useNamespace(name: string): any;
25
-
26
- // Utilities
27
- export declare function cn(...inputs: any[]): string;
28
- export declare function formatDate(time?: any, format?: string): string;
29
- export declare function formatDateTime(time?: any): string;
30
-
31
- // Form System
32
- export declare function useAdminForm(options: any): readonly [any, any];
33
- export declare function setupAdminForm(options: any): void;
5
+
6
+ // ==========================================
7
+ // From @admin-kit/icons
8
+ // ==========================================
9
+ import * as vue from 'vue';
10
+ export { ArrowDown, ArrowLeft, ArrowLeftToLine, ArrowRightLeft, ArrowRightToLine, ArrowUp, ArrowUpToLine, Bell, BookOpenText, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, Circle, CircleAlert, CircleCheckBig, CircleHelp, CircleX, Copy, CornerDownLeft, Ellipsis, Expand, ExternalLink, Eye, EyeOff, FoldHorizontal, Fullscreen, Github, Grip, GripVertical, Menu as IconDefault, Inbox, Info, InspectionPanel, Languages, LoaderCircle, LockKeyhole, LogOut, MailCheck, Maximize, ArrowRightFromLine as MdiMenuClose, ArrowLeftFromLine as MdiMenuOpen, Menu, Minimize, Minimize2, MoonStar, Palette, PanelLeft, PanelRight, Pin, PinOff, Plus, RotateCw, Search, SearchX, Settings, Shrink, Square, SquareCheckBig, SquareMinus, Sun, SunMoon, SwatchBook, UserRoundPen, X } from 'lucide-vue-next';
11
+ export { Icon as IconifyIcon, IconifyIcon as IconifyIconStructure, addCollection, addIcon, listIcons } from '@iconify/vue';
12
+
13
+ declare function createIconifyIcon(icon: string): vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
14
+ [key: string]: any;
15
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
16
+
17
+ export { createIconifyIcon };
18
+
19
+
20
+ // ==========================================
21
+ // From @admin-kit/typings
22
+ // ==========================================
23
+ import { ComputedRef, MaybeRef, Component } from 'vue';
24
+ import { RouteRecordRaw, RouteLocationNormalized, Router } from 'vue-router';
25
+ export { RouteRecordRaw } from 'vue-router';
26
+
27
+ type LayoutType =
28
+ | 'full-content'
29
+ | 'header-mixed-nav'
30
+ | 'header-nav'
31
+ | 'header-sidebar-nav'
32
+ | 'mixed-nav'
33
+ | 'sidebar-mixed-nav'
34
+ | 'sidebar-nav';
35
+
36
+ type ThemeModeType = 'auto' | 'dark' | 'light';
37
+
38
+ /**
39
+ * 偏好设置按钮位置
40
+ * fixed 固定在右侧
41
+ * header 顶栏
42
+ * auto 自动
43
+ */
44
+ type PreferencesButtonPositionType = 'auto' | 'fixed' | 'header';
45
+
46
+ type BuiltinThemeType =
47
+ | 'custom'
48
+ | 'deep-blue'
49
+ | 'deep-green'
50
+ | 'default'
51
+ | 'gray'
52
+ | 'green'
53
+ | 'neutral'
54
+ | 'orange'
55
+ | 'pink'
56
+ | 'red'
57
+ | 'rose'
58
+ | 'sky-blue'
59
+ | 'slate'
60
+ | 'stone'
61
+ | 'violet'
62
+ | 'yellow'
63
+ | 'zinc'
64
+ | (Record<never, never> & string);
65
+
66
+ type ContentCompactType = 'compact' | 'wide';
67
+
68
+ type LayoutHeaderModeType = 'auto' | 'auto-scroll' | 'fixed' | 'static';
69
+ type LayoutHeaderMenuAlignType = 'center' | 'end' | 'start';
70
+
71
+ /**
72
+ * 登录过期模式
73
+ * modal 弹窗模式
74
+ * page 页面模式
75
+ */
76
+ type LoginExpiredModeType = 'modal' | 'page';
77
+
78
+ /**
79
+ * 面包屑样式
80
+ * background 背景
81
+ * normal 默认
82
+ */
83
+ type BreadcrumbStyleType = 'background' | 'normal';
84
+
85
+ /**
86
+ * 权限模式
87
+ * backend 后端权限模式
88
+ * frontend 前端权限模式
89
+ * mixed 混合权限模式
90
+ */
91
+ type AccessModeType = 'backend' | 'frontend' | 'mixed';
92
+
93
+ /**
94
+ * 导航风格
95
+ * plain 朴素
96
+ * rounded 圆润
97
+ */
98
+ type NavigationStyleType = 'plain' | 'rounded';
99
+
100
+ /**
101
+ * 标签栏风格
102
+ * brisk 轻快
103
+ * card 卡片
104
+ * chrome 谷歌
105
+ * plain 朴素
106
+ */
107
+ type TabsStyleType = 'brisk' | 'card' | 'chrome' | 'plain';
108
+
109
+ /**
110
+ * 页面切换动画
111
+ */
112
+ type PageTransitionType = 'fade' | 'fade-down' | 'fade-slide' | 'fade-up';
113
+
114
+ /**
115
+ * 页面切换动画
116
+ * panel-center 居中布局
117
+ * panel-left 居左布局
118
+ * panel-right 居右布局
119
+ */
120
+ type AuthPageLayoutType = 'panel-center' | 'panel-left' | 'panel-right';
121
+
122
+ /**
123
+ * 时区选项
124
+ */
125
+ interface TimezoneOption {
126
+ label: string;
127
+ offset: number;
128
+ timezone: string;
129
+ }
130
+
131
+ interface BasicOption {
132
+ label: string;
133
+ value: string;
134
+ }
135
+
136
+ type SelectOption = BasicOption;
137
+
138
+ type TabOption = BasicOption;
139
+
140
+ interface BasicUserInfo {
141
+ /**
142
+ * 头像
143
+ */
144
+ avatar: string;
145
+ /**
146
+ * 用户昵称
147
+ */
148
+ realName: string;
149
+ /**
150
+ * 用户角色
151
+ */
152
+ roles?: string[];
153
+ /**
154
+ * 用户id
155
+ */
156
+ userId: string;
157
+ /**
158
+ * 用户名
159
+ */
160
+ username: string;
161
+ }
162
+
163
+ type ClassType = Array<object | string> | object | string;
164
+
165
+ /**
166
+ * 深层递归所有属性为可选
167
+ */
168
+ type DeepPartial<T> = T extends object
169
+ ? {
170
+ [P in keyof T]?: DeepPartial<T[P]>;
171
+ }
172
+ : T;
173
+
174
+ /**
175
+ * 深层递归所有属性为只读
176
+ */
177
+ type DeepReadonly<T> = {
178
+ readonly [P in keyof T]: T[P] extends object ? DeepReadonly<T[P]> : T[P];
179
+ };
180
+
181
+ /**
182
+ * 任意类型的异步函数
183
+ */
184
+
185
+ type AnyPromiseFunction<T extends any[] = any[], R = void> = (
186
+ ...arg: T
187
+ ) => PromiseLike<R>;
188
+
189
+ /**
190
+ * 任意类型的普通函数
191
+ */
192
+ type AnyNormalFunction<T extends any[] = any[], R = void> = (...arg: T) => R;
193
+
194
+ /**
195
+ * 任意类型的函数
196
+ */
197
+ type AnyFunction<T extends any[] = any[], R = void> =
198
+ | AnyNormalFunction<T, R>
199
+ | AnyPromiseFunction<T, R>;
200
+
201
+ /**
202
+ * T | null 包装
203
+ */
204
+ type Nullable<T> = null | T;
205
+
206
+ /**
207
+ * T | Not null 包装
208
+ */
209
+ type NonNullable<T> = T extends null | undefined ? never : T;
210
+
211
+ /**
212
+ * 字符串类型对象
213
+ */
214
+ type Recordable$1<T> = Record<string, T>;
215
+
216
+ /**
217
+ * 字符串类型对象(只读)
218
+ */
219
+ interface ReadonlyRecordable<T = any> {
220
+ readonly [key: string]: T;
221
+ }
222
+
223
+ /**
224
+ * setTimeout 返回值类型
225
+ */
226
+ type TimeoutHandle = ReturnType<typeof setTimeout>;
227
+
228
+ /**
229
+ * setInterval 返回值类型
230
+ */
231
+ type IntervalHandle = ReturnType<typeof setInterval>;
232
+
233
+ /**
234
+ * 也许它是一个计算的 ref,或者一个 getter 函数
235
+ *
236
+ */
237
+ type MaybeReadonlyRef<T> = (() => T) | ComputedRef<T>;
238
+
239
+ /**
240
+ * 也许它是一个 ref,或者一个普通值,或者一个 getter 函数
241
+ *
242
+ */
243
+ type MaybeComputedRef<T> = MaybeReadonlyRef<T> | MaybeRef<T>;
244
+
245
+ type Merge<O extends object, T extends object> = {
246
+ [K in keyof O | keyof T]: K extends keyof T
247
+ ? T[K]
248
+ : K extends keyof O
249
+ ? O[K]
250
+ : never;
251
+ };
252
+
253
+ /**
254
+ * T = [
255
+ * { name: string; age: number; },
256
+ * { sex: 'male' | 'female'; age: string }
257
+ * ]
258
+ * =>
259
+ * MergeAll<T> = {
260
+ * name: string;
261
+ * sex: 'male' | 'female';
262
+ * age: string
263
+ * }
264
+ */
265
+ type MergeAll<
266
+ T extends object[],
267
+ R extends object = Record<string, any>,
268
+ > = T extends [infer F extends object, ...infer Rest extends object[]]
269
+ ? MergeAll<Rest, Merge<R, F>>
270
+ : R;
271
+
272
+ type EmitType = (name: Name, ...args: any[]) => void;
273
+
274
+ type MaybePromise<T> = Promise<T> | T;
275
+
276
+ type ExRouteRecordRaw = RouteRecordRaw & {
277
+ parent?: string;
278
+ parents?: string[];
279
+ path?: any;
280
+ };
281
+ interface MenuRecordBadgeRaw {
282
+ badge?: string;
283
+ badgeType?: 'dot' | 'normal';
284
+ badgeVariants?: 'destructive' | 'primary' | string;
285
+ }
286
+ interface MenuRecordRaw extends MenuRecordBadgeRaw {
287
+ activeIcon?: string;
288
+ children?: MenuRecordRaw[];
289
+ disabled?: boolean;
290
+ icon?: Component | string;
291
+ name: string;
292
+ order?: number;
293
+ parent?: string;
294
+ parents?: string[];
295
+ path: string;
296
+ show?: boolean;
297
+ }
298
+
299
+ interface TabDefinition extends RouteLocationNormalized {
300
+ key?: string;
301
+ }
302
+
303
+ interface RouteMeta {
304
+ /**
305
+ * 激活图标(菜单/tab)
306
+ */
307
+ activeIcon?: string;
308
+ /**
309
+ * 当前激活的菜单,有时候不想激活现有菜单,需要激活父级菜单时使用
310
+ */
311
+ activePath?: string;
312
+ /**
313
+ * 是否固定标签页
314
+ * @default false
315
+ */
316
+ affixTab?: boolean;
317
+ /**
318
+ * 固定标签页的顺序
319
+ * @default 0
320
+ */
321
+ affixTabOrder?: number;
322
+ /**
323
+ * 需要特定的角色标识才可以访问
324
+ * @default []
325
+ */
326
+ authority?: string[];
327
+ /**
328
+ * 徽标
329
+ */
330
+ badge?: string;
331
+ /**
332
+ * 徽标类型
333
+ */
334
+ badgeType?: 'dot' | 'normal';
335
+ /**
336
+ * 徽标颜色
337
+ */
338
+ badgeVariants?:
339
+ | 'default'
340
+ | 'destructive'
341
+ | 'primary'
342
+ | 'success'
343
+ | 'warning'
344
+ | string;
345
+ /**
346
+ * 路由的完整路径作为key(默认true)
347
+ */
348
+ fullPathKey?: boolean;
349
+ /**
350
+ * 当前路由的子级在菜单中不展现
351
+ * @default false
352
+ */
353
+ hideChildrenInMenu?: boolean;
354
+ /**
355
+ * 当前路由在面包屑中不展现
356
+ * @default false
357
+ */
358
+ hideInBreadcrumb?: boolean;
359
+ /**
360
+ * 当前路由在菜单中不展现
361
+ * @default false
362
+ */
363
+ hideInMenu?: boolean;
364
+ /**
365
+ * 当前路由在标签页不展现
366
+ * @default false
367
+ */
368
+ hideInTab?: boolean;
369
+ /**
370
+ * 图标(菜单/tab)
371
+ */
372
+ icon?: Component | string;
373
+ /**
374
+ * iframe 地址
375
+ */
376
+ iframeSrc?: string;
377
+ /**
378
+ * 忽略权限,直接可以访问
379
+ * @default false
380
+ */
381
+ ignoreAccess?: boolean;
382
+ /**
383
+ * 开启KeepAlive缓存
384
+ */
385
+ keepAlive?: boolean;
386
+ /**
387
+ * 外链-跳转路径
388
+ */
389
+ link?: string;
390
+ /**
391
+ * 路由是否已经加载过
392
+ */
393
+ loaded?: boolean;
394
+ /**
395
+ * 标签页最大打开数量
396
+ * @default -1
397
+ */
398
+ maxNumOfOpenTab?: number;
399
+ /**
400
+ * 菜单可以看到,但是访问会被重定向到403
401
+ */
402
+ menuVisibleWithForbidden?: boolean;
403
+ /**
404
+ * 不使用基础布局(仅在顶级生效)
405
+ */
406
+ noBasicLayout?: boolean;
407
+ /**
408
+ * 在新窗口打开
409
+ */
410
+ openInNewWindow?: boolean;
411
+ /**
412
+ * 用于路由->菜单排序
413
+ */
414
+ order?: number;
415
+ /**
416
+ * 菜单所携带的参数
417
+ */
418
+ query?: Recordable;
419
+ /**
420
+ * 标题名称
421
+ */
422
+ title: string;
423
+ }
424
+
425
+ // 定义递归类型以将 RouteRecordRaw 的 component 属性更改为 string
426
+ type RouteRecordStringComponent<T = string> = Omit<
427
+ RouteRecordRaw,
428
+ 'children' | 'component'
429
+ > & {
430
+ children?: RouteRecordStringComponent<T>[];
431
+ component: T;
432
+ };
433
+
434
+ type ComponentRecordType = Record<string, () => Promise<Component>>;
435
+
436
+ interface GenerateMenuAndRoutesOptions {
437
+ fetchMenuListAsync?: () => Promise<RouteRecordStringComponent[]>;
438
+ forbiddenComponent?: RouteRecordRaw['component'];
439
+ layoutMap?: ComponentRecordType;
440
+ pageMap?: ComponentRecordType;
441
+ roles?: string[];
442
+ router: Router;
443
+ routes: RouteRecordRaw[];
444
+ }
445
+
446
+ export type { AccessModeType, AnyFunction, AnyNormalFunction, AnyPromiseFunction, AuthPageLayoutType, BasicOption, BasicUserInfo, BreadcrumbStyleType, BuiltinThemeType, ClassType, ComponentRecordType, ContentCompactType, DeepPartial, DeepReadonly, EmitType, ExRouteRecordRaw, GenerateMenuAndRoutesOptions, IntervalHandle, LayoutHeaderMenuAlignType, LayoutHeaderModeType, LayoutType, LoginExpiredModeType, MaybeComputedRef, MaybePromise, MaybeReadonlyRef, MenuRecordBadgeRaw, MenuRecordRaw, Merge, MergeAll, NavigationStyleType, NonNullable, Nullable, PageTransitionType, PreferencesButtonPositionType, ReadonlyRecordable, Recordable$1 as Recordable, RouteMeta, RouteRecordStringComponent, SelectOption, TabDefinition, TabOption, TabsStyleType, ThemeModeType, TimeoutHandle, TimezoneOption };
447
+
448
+
449
+ // ==========================================
450
+ // From @admin-kit/composables
451
+ // ==========================================
452
+ import * as vue from 'vue';
453
+ import { CSSProperties, Ref, ComputedRef } from 'vue';
454
+ export { default as Sortable } from 'sortablejs';
455
+ export { useEmitAsProps, useForwardExpose, useForwardProps, useForwardPropsEmits } from 'reka-ui';
456
+
457
+ declare function useIsMobile(): {
458
+ isMobile: vue.ComputedRef<boolean>;
459
+ };
460
+
461
+ declare function useLayoutContentStyle(): {
462
+ contentElement: vue.Ref<HTMLDivElement | null, HTMLDivElement | null>;
463
+ overlayStyle: vue.ComputedRef<CSSProperties>;
464
+ visibleDomRect: vue.Ref<{
465
+ bottom: number;
466
+ height: number;
467
+ left: number;
468
+ right: number;
469
+ top: number;
470
+ width: number;
471
+ } | null, VisibleDomRect | {
472
+ bottom: number;
473
+ height: number;
474
+ left: number;
475
+ right: number;
476
+ top: number;
477
+ width: number;
478
+ } | null>;
479
+ };
480
+ declare function useLayoutHeaderStyle(): {
481
+ getLayoutHeaderHeight: () => number;
482
+ setLayoutHeaderHeight: (height: number) => void;
483
+ };
484
+ declare function useLayoutFooterStyle(): {
485
+ getLayoutFooterHeight: () => number;
486
+ setLayoutFooterHeight: (height: number) => void;
487
+ };
488
+
489
+ declare const useNamespace: (block: string) => {
490
+ b: (blockSuffix?: string) => string;
491
+ be: (blockSuffix?: string, element?: string) => string;
492
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
493
+ bm: (blockSuffix?: string, modifier?: string) => string;
494
+ cssVar: (object: Record<string, string>) => Record<string, string>;
495
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
496
+ cssVarBlockName: (name: string) => string;
497
+ cssVarName: (name: string) => string;
498
+ e: (element?: string) => string;
499
+ em: (element?: string, modifier?: string) => string;
500
+ is: {
501
+ (name: string): string;
502
+ (name: string, state: boolean | undefined): string;
503
+ };
504
+ m: (modifier?: string) => string;
505
+ namespace: string;
506
+ };
507
+ type UseNamespaceReturn = ReturnType<typeof useNamespace>;
508
+
509
+ declare function usePriorityValue<T extends Record<string, any>, S extends Record<string, any>, K extends keyof T = keyof T>(key: K, props: T, state: Readonly<Ref<NoInfer<S>>> | undefined): ComputedRef<T[K]>;
510
+ declare function usePriorityValues<T extends Record<string, any>, S extends Ref<Record<string, any>> = Readonly<Ref<NoInfer<T>, NoInfer<T>>>>(props: T, state: S | undefined): { [K in keyof T]: ComputedRef<T[K]>; };
511
+ declare function useForwardPriorityValues<T extends Record<string, any>, S extends Ref<Record<string, any>> = Readonly<Ref<NoInfer<T>, NoInfer<T>>>>(props: T, state: S | undefined): ComputedRef<{ [K in keyof T]: T[K]; }>;
512
+
513
+ declare const SCROLL_FIXED_CLASS = "_scroll__fixed_";
514
+ declare function useScrollLock(): void;
515
+
516
+ type Locale = 'en-US' | 'zh-CN';
517
+
518
+ declare const useSimpleLocale: () => {
519
+ $t: vue.ComputedRef<(key: string) => string>;
520
+ currentLocale: vue.Ref<Locale, Locale>;
521
+ setSimpleLocale: (locale: Locale) => void;
522
+ };
523
+
524
+ declare function useSortable<T extends HTMLElement>(sortableContainer: T, options?: SortableOptions): {
525
+ initializeSortable: () => Promise<Sortable>;
526
+ };
527
+
528
+ export { SCROLL_FIXED_CLASS, useForwardPriorityValues, useIsMobile, useLayoutContentStyle, useLayoutFooterStyle, useLayoutHeaderStyle, useNamespace, usePriorityValue, usePriorityValues, useScrollLock, useSimpleLocale, useSortable };
529
+ export type { UseNamespaceReturn };
530
+
531
+
532
+ // ==========================================
533
+ // From @admin-kit/form-ui
534
+ // ==========================================
535
+ export { setupAdminForm } from './config';
536
+ export type { BaseFormComponentType, ExtendedFormApi, AdminFormProps, FormSchema as AdminFormSchema, } from './types';
537
+ export * from './use-admin-form';
34
538
  export * as z from 'zod';
35
539
 
36
- // Form Types
37
- export type BaseFormComponentType = string;
38
- export type ExtendedFormApi = any;
39
- export type AdminFormProps = any;
40
- export type AdminFormSchema = any;
540
+
541
+ // ==========================================
542
+ // From @admin-kit/layout-ui
543
+ // ==========================================
544
+ export type * from './admin-layout';
545
+ export { default as AdminLayout } from './admin-layout.vue';
546
+
547
+
548
+ // ==========================================
549
+ // From @admin-kit/menu-ui
550
+ // ==========================================
551
+ export { default as MenuBadge } from './components/menu-badge.vue';
552
+ export * from './components/normal-menu';
553
+ export { default as Menu } from './menu.vue';
554
+ export type * from './types';
555
+
556
+
557
+ // ==========================================
558
+ // From @admin-kit/popup-ui
559
+ // ==========================================
560
+ export * from './alert';
561
+ export * from './drawer';
562
+ export * from './modal';
563
+
564
+
565
+ // ==========================================
566
+ // From @admin-kit/tabs-ui
567
+ // ==========================================
568
+ export * from './components/widgets';
569
+ export { default as TabsView } from './tabs-view.vue';
570
+ export type { IContextMenuItem } from '@admin-kit/shadcn-ui';
571
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jackbo_vip/admin-kit",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "A comprehensive Vue 3 admin UI component library with TypeScript support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",