@robot-admin/layout 3.2.1 → 3.2.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.
- package/CHANGELOG.md +171 -158
- package/README.md +118 -516
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +4 -2
- package/dist/core/index.d.ts +4 -2
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +23 -14
- package/dist/index.d.ts +23 -14
- package/dist/index.js +2 -2
- package/dist/naive/index.cjs +1 -1
- package/dist/naive/index.d.cts +23 -14
- package/dist/naive/index.d.ts +23 -14
- package/dist/naive/index.js +2 -2
- package/dist/{naive-CuOhPLBc.cjs → naive-DTDzKwYP.cjs} +3 -3
- package/dist/naive-DTDzKwYP.cjs.map +1 -0
- package/dist/{naive-AliKeHvO.js → naive-H0am_E7s.js} +4 -4
- package/dist/naive-H0am_E7s.js.map +1 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.d.cts +15 -8
- package/dist/vue/index.d.ts +15 -8
- package/dist/vue/index.js +1 -1
- package/dist/{vue-h8jl2I5K.js → vue-CtBraK0m.js} +6 -2
- package/dist/vue-CtBraK0m.js.map +1 -0
- package/dist/{vue-DVWXVFUx.cjs → vue-CtN1HvrH.cjs} +2 -2
- package/dist/vue-CtN1HvrH.cjs.map +1 -0
- package/docs/assets/banner.png +0 -0
- package/docs/assets/banner.svg +22 -0
- package/docs/assets/logo.png +0 -0
- package/docs/assets/logo.svg +9 -0
- package/docs/guide.md +598 -0
- package/package.json +128 -127
- package/src/styles/settings.scss +421 -421
- package/dist/naive-AliKeHvO.js.map +0 -1
- package/dist/naive-CuOhPLBc.cjs.map +0 -1
- package/dist/vue-DVWXVFUx.cjs.map +0 -1
- package/dist/vue-h8jl2I5K.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -196,7 +196,7 @@ declare function __VLS_template_2(): {
|
|
|
196
196
|
resetSettings: () => void;
|
|
197
197
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
198
198
|
toggleCollapse: () => void;
|
|
199
|
-
}, "
|
|
199
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
200
200
|
defaults: Readonly<{
|
|
201
201
|
themeMode: ThemeMode;
|
|
202
202
|
primaryColor: string;
|
|
@@ -355,7 +355,7 @@ declare function __VLS_template_2(): {
|
|
|
355
355
|
resetSettings: () => void;
|
|
356
356
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
357
357
|
toggleCollapse: () => void;
|
|
358
|
-
}, "
|
|
358
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
359
359
|
defaults: Readonly<{
|
|
360
360
|
themeMode: ThemeMode;
|
|
361
361
|
primaryColor: string;
|
|
@@ -514,7 +514,7 @@ declare function __VLS_template_2(): {
|
|
|
514
514
|
resetSettings: () => void;
|
|
515
515
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
516
516
|
toggleCollapse: () => void;
|
|
517
|
-
}, "
|
|
517
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
518
518
|
defaults: Readonly<{
|
|
519
519
|
themeMode: ThemeMode;
|
|
520
520
|
primaryColor: string;
|
|
@@ -673,7 +673,7 @@ declare function __VLS_template_2(): {
|
|
|
673
673
|
resetSettings: () => void;
|
|
674
674
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
675
675
|
toggleCollapse: () => void;
|
|
676
|
-
}, "
|
|
676
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
677
677
|
defaults: Readonly<{
|
|
678
678
|
themeMode: ThemeMode;
|
|
679
679
|
primaryColor: string;
|
|
@@ -832,7 +832,7 @@ declare function __VLS_template_2(): {
|
|
|
832
832
|
resetSettings: () => void;
|
|
833
833
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
834
834
|
toggleCollapse: () => void;
|
|
835
|
-
}, "
|
|
835
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
836
836
|
defaults: Readonly<{
|
|
837
837
|
themeMode: ThemeMode;
|
|
838
838
|
primaryColor: string;
|
|
@@ -991,7 +991,7 @@ declare function __VLS_template_2(): {
|
|
|
991
991
|
resetSettings: () => void;
|
|
992
992
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
993
993
|
toggleCollapse: () => void;
|
|
994
|
-
}, "
|
|
994
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
995
995
|
defaults: Readonly<{
|
|
996
996
|
themeMode: ThemeMode;
|
|
997
997
|
primaryColor: string;
|
|
@@ -1150,7 +1150,7 @@ declare function __VLS_template_2(): {
|
|
|
1150
1150
|
resetSettings: () => void;
|
|
1151
1151
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
1152
1152
|
toggleCollapse: () => void;
|
|
1153
|
-
}, "
|
|
1153
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
1154
1154
|
defaults: Readonly<{
|
|
1155
1155
|
themeMode: ThemeMode;
|
|
1156
1156
|
primaryColor: string;
|
|
@@ -1585,7 +1585,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
1585
1585
|
resetSettings: () => void;
|
|
1586
1586
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
1587
1587
|
toggleCollapse: () => void;
|
|
1588
|
-
}, "
|
|
1588
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
1589
1589
|
/** 当前 Store 实例实际使用的默认值。 */
|
|
1590
1590
|
defaults: Readonly<{
|
|
1591
1591
|
themeMode: ThemeMode;
|
|
@@ -1872,12 +1872,17 @@ export declare interface LayoutInfo {
|
|
|
1872
1872
|
export declare type LayoutMenuItem<TMeta extends MenuMeta = MenuMeta> = Omit<MenuOptions<TMeta>, "children" | "key" | "meta" | "path"> & {
|
|
1873
1873
|
key: string;
|
|
1874
1874
|
path: string;
|
|
1875
|
-
meta: TMeta
|
|
1876
|
-
title: string;
|
|
1877
|
-
};
|
|
1875
|
+
meta: LayoutMenuMeta<TMeta>;
|
|
1878
1876
|
children?: LayoutMenuItem<TMeta>[];
|
|
1879
1877
|
};
|
|
1880
1878
|
|
|
1879
|
+
/** 标准化只保证通用元数据与标题;宿主扩展字段可能因缺少 meta 而不存在。 */
|
|
1880
|
+
export declare type LayoutMenuMeta<TMeta extends MenuMeta = MenuMeta> = MenuMeta & {
|
|
1881
|
+
[K in keyof TMeta as K extends "title" | "icon" ? never : K]?: TMeta[K];
|
|
1882
|
+
} & {
|
|
1883
|
+
title: string;
|
|
1884
|
+
};
|
|
1885
|
+
|
|
1881
1886
|
/** 内置布局模式。 */
|
|
1882
1887
|
export declare type LayoutMode = "side" | "top" | "mix" | "mix-top" | "reverse-horizontal-mix" | "card-layout";
|
|
1883
1888
|
|
|
@@ -2082,6 +2087,7 @@ export declare const MixTopLayout: {
|
|
|
2082
2087
|
/**
|
|
2083
2088
|
* 非破坏地统一 path/key、label/meta.title 与字符串图标来源。
|
|
2084
2089
|
* 缺少稳定路径或 key 的节点不会进入导航,避免意外跳转到根路由。
|
|
2090
|
+
* meta 可缺省,因此不会把宿主扩展字段提升为必填;title/icon 会按通用规则补齐。
|
|
2085
2091
|
*/
|
|
2086
2092
|
export declare function normalizeLayoutMenus<TMeta extends MenuMeta = MenuMeta>(menus: readonly MenuOptions<TMeta>[]): LayoutMenuItem<TMeta>[];
|
|
2087
2093
|
|
|
@@ -2287,7 +2293,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
2287
2293
|
resetSettings: () => void;
|
|
2288
2294
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
2289
2295
|
toggleCollapse: () => void;
|
|
2290
|
-
}, "
|
|
2296
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
2291
2297
|
defaults: Readonly<{
|
|
2292
2298
|
themeMode: ThemeMode;
|
|
2293
2299
|
primaryColor: string;
|
|
@@ -2479,9 +2485,12 @@ export declare interface ThemePreset {
|
|
|
2479
2485
|
description?: string;
|
|
2480
2486
|
icon: string;
|
|
2481
2487
|
primaryColor: string;
|
|
2482
|
-
settings?:
|
|
2488
|
+
settings?: ThemePresetSettings;
|
|
2483
2489
|
}
|
|
2484
2490
|
|
|
2491
|
+
/** 主题预设实际应用的外观细节;其他布局设置由宿主单独维护。 */
|
|
2492
|
+
export declare type ThemePresetSettings = Partial<Pick<SettingsState, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle">>;
|
|
2493
|
+
|
|
2485
2494
|
/** @deprecated 请使用 C_TopLayout;计划在 4.0 移除。 */
|
|
2486
2495
|
export declare const TopLayout: {
|
|
2487
2496
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
@@ -2808,7 +2817,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
2808
2817
|
resetSettings: () => void;
|
|
2809
2818
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
2810
2819
|
toggleCollapse: () => void;
|
|
2811
|
-
}, "
|
|
2820
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
2812
2821
|
/** 当前 Store 实例实际使用的默认值。 */
|
|
2813
2822
|
defaults: Readonly<{
|
|
2814
2823
|
themeMode: ThemeMode;
|
package/dist/index.d.ts
CHANGED
|
@@ -196,7 +196,7 @@ declare function __VLS_template_2(): {
|
|
|
196
196
|
resetSettings: () => void;
|
|
197
197
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
198
198
|
toggleCollapse: () => void;
|
|
199
|
-
}, "
|
|
199
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
200
200
|
defaults: Readonly<{
|
|
201
201
|
themeMode: ThemeMode;
|
|
202
202
|
primaryColor: string;
|
|
@@ -355,7 +355,7 @@ declare function __VLS_template_2(): {
|
|
|
355
355
|
resetSettings: () => void;
|
|
356
356
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
357
357
|
toggleCollapse: () => void;
|
|
358
|
-
}, "
|
|
358
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
359
359
|
defaults: Readonly<{
|
|
360
360
|
themeMode: ThemeMode;
|
|
361
361
|
primaryColor: string;
|
|
@@ -514,7 +514,7 @@ declare function __VLS_template_2(): {
|
|
|
514
514
|
resetSettings: () => void;
|
|
515
515
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
516
516
|
toggleCollapse: () => void;
|
|
517
|
-
}, "
|
|
517
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
518
518
|
defaults: Readonly<{
|
|
519
519
|
themeMode: ThemeMode;
|
|
520
520
|
primaryColor: string;
|
|
@@ -673,7 +673,7 @@ declare function __VLS_template_2(): {
|
|
|
673
673
|
resetSettings: () => void;
|
|
674
674
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
675
675
|
toggleCollapse: () => void;
|
|
676
|
-
}, "
|
|
676
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
677
677
|
defaults: Readonly<{
|
|
678
678
|
themeMode: ThemeMode;
|
|
679
679
|
primaryColor: string;
|
|
@@ -832,7 +832,7 @@ declare function __VLS_template_2(): {
|
|
|
832
832
|
resetSettings: () => void;
|
|
833
833
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
834
834
|
toggleCollapse: () => void;
|
|
835
|
-
}, "
|
|
835
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
836
836
|
defaults: Readonly<{
|
|
837
837
|
themeMode: ThemeMode;
|
|
838
838
|
primaryColor: string;
|
|
@@ -991,7 +991,7 @@ declare function __VLS_template_2(): {
|
|
|
991
991
|
resetSettings: () => void;
|
|
992
992
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
993
993
|
toggleCollapse: () => void;
|
|
994
|
-
}, "
|
|
994
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
995
995
|
defaults: Readonly<{
|
|
996
996
|
themeMode: ThemeMode;
|
|
997
997
|
primaryColor: string;
|
|
@@ -1150,7 +1150,7 @@ declare function __VLS_template_2(): {
|
|
|
1150
1150
|
resetSettings: () => void;
|
|
1151
1151
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
1152
1152
|
toggleCollapse: () => void;
|
|
1153
|
-
}, "
|
|
1153
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
1154
1154
|
defaults: Readonly<{
|
|
1155
1155
|
themeMode: ThemeMode;
|
|
1156
1156
|
primaryColor: string;
|
|
@@ -1585,7 +1585,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
1585
1585
|
resetSettings: () => void;
|
|
1586
1586
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
1587
1587
|
toggleCollapse: () => void;
|
|
1588
|
-
}, "
|
|
1588
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
1589
1589
|
/** 当前 Store 实例实际使用的默认值。 */
|
|
1590
1590
|
defaults: Readonly<{
|
|
1591
1591
|
themeMode: ThemeMode;
|
|
@@ -1872,12 +1872,17 @@ export declare interface LayoutInfo {
|
|
|
1872
1872
|
export declare type LayoutMenuItem<TMeta extends MenuMeta = MenuMeta> = Omit<MenuOptions<TMeta>, "children" | "key" | "meta" | "path"> & {
|
|
1873
1873
|
key: string;
|
|
1874
1874
|
path: string;
|
|
1875
|
-
meta: TMeta
|
|
1876
|
-
title: string;
|
|
1877
|
-
};
|
|
1875
|
+
meta: LayoutMenuMeta<TMeta>;
|
|
1878
1876
|
children?: LayoutMenuItem<TMeta>[];
|
|
1879
1877
|
};
|
|
1880
1878
|
|
|
1879
|
+
/** 标准化只保证通用元数据与标题;宿主扩展字段可能因缺少 meta 而不存在。 */
|
|
1880
|
+
export declare type LayoutMenuMeta<TMeta extends MenuMeta = MenuMeta> = MenuMeta & {
|
|
1881
|
+
[K in keyof TMeta as K extends "title" | "icon" ? never : K]?: TMeta[K];
|
|
1882
|
+
} & {
|
|
1883
|
+
title: string;
|
|
1884
|
+
};
|
|
1885
|
+
|
|
1881
1886
|
/** 内置布局模式。 */
|
|
1882
1887
|
export declare type LayoutMode = "side" | "top" | "mix" | "mix-top" | "reverse-horizontal-mix" | "card-layout";
|
|
1883
1888
|
|
|
@@ -2082,6 +2087,7 @@ export declare const MixTopLayout: {
|
|
|
2082
2087
|
/**
|
|
2083
2088
|
* 非破坏地统一 path/key、label/meta.title 与字符串图标来源。
|
|
2084
2089
|
* 缺少稳定路径或 key 的节点不会进入导航,避免意外跳转到根路由。
|
|
2090
|
+
* meta 可缺省,因此不会把宿主扩展字段提升为必填;title/icon 会按通用规则补齐。
|
|
2085
2091
|
*/
|
|
2086
2092
|
export declare function normalizeLayoutMenus<TMeta extends MenuMeta = MenuMeta>(menus: readonly MenuOptions<TMeta>[]): LayoutMenuItem<TMeta>[];
|
|
2087
2093
|
|
|
@@ -2287,7 +2293,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
2287
2293
|
resetSettings: () => void;
|
|
2288
2294
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
2289
2295
|
toggleCollapse: () => void;
|
|
2290
|
-
}, "
|
|
2296
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
2291
2297
|
defaults: Readonly<{
|
|
2292
2298
|
themeMode: ThemeMode;
|
|
2293
2299
|
primaryColor: string;
|
|
@@ -2479,9 +2485,12 @@ export declare interface ThemePreset {
|
|
|
2479
2485
|
description?: string;
|
|
2480
2486
|
icon: string;
|
|
2481
2487
|
primaryColor: string;
|
|
2482
|
-
settings?:
|
|
2488
|
+
settings?: ThemePresetSettings;
|
|
2483
2489
|
}
|
|
2484
2490
|
|
|
2491
|
+
/** 主题预设实际应用的外观细节;其他布局设置由宿主单独维护。 */
|
|
2492
|
+
export declare type ThemePresetSettings = Partial<Pick<SettingsState, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle">>;
|
|
2493
|
+
|
|
2485
2494
|
/** @deprecated 请使用 C_TopLayout;计划在 4.0 移除。 */
|
|
2486
2495
|
export declare const TopLayout: {
|
|
2487
2496
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
@@ -2808,7 +2817,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
2808
2817
|
resetSettings: () => void;
|
|
2809
2818
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
2810
2819
|
toggleCollapse: () => void;
|
|
2811
|
-
}, "
|
|
2820
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
2812
2821
|
/** 当前 Store 实例实际使用的默认值。 */
|
|
2813
2822
|
defaults: Readonly<{
|
|
2814
2823
|
themeMode: ThemeMode;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F, y as I } from "./vue-
|
|
2
|
-
import { _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, l as K, m as q, n as J, o as Y, p as X, r as Z, s as Q, t as $, u as ee, v as te, x as ne, y as re } from "./naive-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F, y as I } from "./vue-CtBraK0m.js";
|
|
2
|
+
import { _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, l as K, m as q, n as J, o as Y, p as X, r as Z, s as Q, t as $, u as ee, v as te, x as ne, y as re } from "./naive-H0am_E7s.js";
|
|
3
3
|
export { _ as BORDER_RADIUS_MAP, te as BrandLogo, v as COLOR_SWATCHES, $ as C_CardLayout, z as C_LayoutContainer, J as C_MixLayout, Z as C_MixTopLayout, G as C_ReverseHorizontalMixLayout, R as C_SideLayout, Y as C_TopLayout, Q as CardLayout, S as DEFAULT_BRAND_CONFIG, O as DEFAULT_SETTINGS, s as DRAWER_HANDLER_KEY, q as DrawerMenu, U as FloatingMenu, L as IconMenu, c as LAYOUT_CONTEXT_KEY, T as LAYOUT_MODES, u as LAYOUT_SETTINGS_KEY, j as LayoutActionUnavailableError, i as MENU_COLLAPSE_KEY, X as MenuTrigger, B as MixLayout, K as MixTopLayout, b as PRESET_COLORS, ne as ResponsiveMenu, ee as ReverseHorizontalMixLayout, N as SETTINGS_CONFIG_SCHEMA_VERSION, re as SettingsDrawer, V as SideLayout, W as SideMenu, y as THEME_PRESETS, p as TRANSITION_MAP, H as TopLayout, I as adjustColor, h as assertLayoutSettingsRelationships, w as bindLayoutCssVariables, r as calculateVisibleMenuCount, k as createLayoutContext, A as createSettingsStore, n as estimateMenuItemWidth, P as isPathSegmentPrefix, m as normalizeLayoutMenus, x as provideLayout, a as provideLayoutContext, F as sanitizeLayoutSettingsConfig, d as sanitizeSettingsPatch, D as setupLayout, C as shouldCacheRoute, e as useLayoutCache, o as useLayoutContext, M as useLayoutCssVariables, t as useLayoutIcon, f as useMenuSplit, l as useResponsiveMenu, E as useSettingsController, g as useSettingsStore };
|
package/dist/naive/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../vue-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../vue-CtN1HvrH.cjs`),t=require(`../naive-DTDzKwYP.cjs`);exports.BORDER_RADIUS_MAP=e.d,exports.BrandLogo=t.v,exports.COLOR_SWATCHES=e.f,exports.C_CardLayout=t.t,exports.C_LayoutContainer=t.b,exports.C_MixLayout=t.n,exports.C_MixTopLayout=t.r,exports.C_ReverseHorizontalMixLayout=t.i,exports.C_SideLayout=t.a,exports.C_TopLayout=t.o,exports.CardLayout=t.s,exports.DEFAULT_BRAND_CONFIG=e.j,exports.DEFAULT_SETTINGS=e.p,exports.DRAWER_HANDLER_KEY=e.M,exports.DrawerMenu=t.m,exports.FloatingMenu=t.g,exports.IconMenu=t._,exports.LAYOUT_CONTEXT_KEY=e.N,exports.LAYOUT_MODES=e.m,exports.LAYOUT_SETTINGS_KEY=e.P,exports.LayoutActionUnavailableError=e.t,exports.MENU_COLLAPSE_KEY=e.F,exports.MenuTrigger=t.p,exports.MixLayout=t.c,exports.MixTopLayout=t.l,exports.PRESET_COLORS=e.h,exports.ResponsiveMenu=t.x,exports.ReverseHorizontalMixLayout=t.u,exports.SETTINGS_CONFIG_SCHEMA_VERSION=e.v,exports.SettingsDrawer=t.y,exports.SideLayout=t.d,exports.SideMenu=t.h,exports.THEME_PRESETS=e.g,exports.TRANSITION_MAP=e._,exports.TopLayout=t.f,exports.adjustColor=e.y,exports.assertLayoutSettingsRelationships=e.b,exports.bindLayoutCssVariables=e.l,exports.calculateVisibleMenuCount=e.E,exports.createLayoutContext=e.r,exports.createSettingsStore=e.s,exports.estimateMenuItemWidth=e.D,exports.isPathSegmentPrefix=e.w,exports.normalizeLayoutMenus=e.a,exports.provideLayout=e.i,exports.provideLayoutContext=e.I,exports.sanitizeLayoutSettingsConfig=e.x,exports.sanitizeSettingsPatch=e.S,exports.setupLayout=e.o,exports.shouldCacheRoute=e.k,exports.useLayoutCache=e.A,exports.useLayoutContext=e.L,exports.useLayoutCssVariables=e.u,exports.useLayoutIcon=e.C,exports.useMenuSplit=e.T,exports.useResponsiveMenu=e.O,exports.useSettingsController=e.n,exports.useSettingsStore=e.c;
|
package/dist/naive/index.d.cts
CHANGED
|
@@ -196,7 +196,7 @@ declare function __VLS_template_2(): {
|
|
|
196
196
|
resetSettings: () => void;
|
|
197
197
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
198
198
|
toggleCollapse: () => void;
|
|
199
|
-
}, "
|
|
199
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
200
200
|
defaults: Readonly<{
|
|
201
201
|
themeMode: ThemeMode;
|
|
202
202
|
primaryColor: string;
|
|
@@ -355,7 +355,7 @@ declare function __VLS_template_2(): {
|
|
|
355
355
|
resetSettings: () => void;
|
|
356
356
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
357
357
|
toggleCollapse: () => void;
|
|
358
|
-
}, "
|
|
358
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
359
359
|
defaults: Readonly<{
|
|
360
360
|
themeMode: ThemeMode;
|
|
361
361
|
primaryColor: string;
|
|
@@ -514,7 +514,7 @@ declare function __VLS_template_2(): {
|
|
|
514
514
|
resetSettings: () => void;
|
|
515
515
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
516
516
|
toggleCollapse: () => void;
|
|
517
|
-
}, "
|
|
517
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
518
518
|
defaults: Readonly<{
|
|
519
519
|
themeMode: ThemeMode;
|
|
520
520
|
primaryColor: string;
|
|
@@ -673,7 +673,7 @@ declare function __VLS_template_2(): {
|
|
|
673
673
|
resetSettings: () => void;
|
|
674
674
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
675
675
|
toggleCollapse: () => void;
|
|
676
|
-
}, "
|
|
676
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
677
677
|
defaults: Readonly<{
|
|
678
678
|
themeMode: ThemeMode;
|
|
679
679
|
primaryColor: string;
|
|
@@ -832,7 +832,7 @@ declare function __VLS_template_2(): {
|
|
|
832
832
|
resetSettings: () => void;
|
|
833
833
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
834
834
|
toggleCollapse: () => void;
|
|
835
|
-
}, "
|
|
835
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
836
836
|
defaults: Readonly<{
|
|
837
837
|
themeMode: ThemeMode;
|
|
838
838
|
primaryColor: string;
|
|
@@ -991,7 +991,7 @@ declare function __VLS_template_2(): {
|
|
|
991
991
|
resetSettings: () => void;
|
|
992
992
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
993
993
|
toggleCollapse: () => void;
|
|
994
|
-
}, "
|
|
994
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
995
995
|
defaults: Readonly<{
|
|
996
996
|
themeMode: ThemeMode;
|
|
997
997
|
primaryColor: string;
|
|
@@ -1150,7 +1150,7 @@ declare function __VLS_template_2(): {
|
|
|
1150
1150
|
resetSettings: () => void;
|
|
1151
1151
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
1152
1152
|
toggleCollapse: () => void;
|
|
1153
|
-
}, "
|
|
1153
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
1154
1154
|
defaults: Readonly<{
|
|
1155
1155
|
themeMode: ThemeMode;
|
|
1156
1156
|
primaryColor: string;
|
|
@@ -1585,7 +1585,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
1585
1585
|
resetSettings: () => void;
|
|
1586
1586
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
1587
1587
|
toggleCollapse: () => void;
|
|
1588
|
-
}, "
|
|
1588
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
1589
1589
|
/** 当前 Store 实例实际使用的默认值。 */
|
|
1590
1590
|
defaults: Readonly<{
|
|
1591
1591
|
themeMode: ThemeMode;
|
|
@@ -1872,12 +1872,17 @@ export declare interface LayoutInfo {
|
|
|
1872
1872
|
export declare type LayoutMenuItem<TMeta extends MenuMeta = MenuMeta> = Omit<MenuOptions<TMeta>, "children" | "key" | "meta" | "path"> & {
|
|
1873
1873
|
key: string;
|
|
1874
1874
|
path: string;
|
|
1875
|
-
meta: TMeta
|
|
1876
|
-
title: string;
|
|
1877
|
-
};
|
|
1875
|
+
meta: LayoutMenuMeta<TMeta>;
|
|
1878
1876
|
children?: LayoutMenuItem<TMeta>[];
|
|
1879
1877
|
};
|
|
1880
1878
|
|
|
1879
|
+
/** 标准化只保证通用元数据与标题;宿主扩展字段可能因缺少 meta 而不存在。 */
|
|
1880
|
+
export declare type LayoutMenuMeta<TMeta extends MenuMeta = MenuMeta> = MenuMeta & {
|
|
1881
|
+
[K in keyof TMeta as K extends "title" | "icon" ? never : K]?: TMeta[K];
|
|
1882
|
+
} & {
|
|
1883
|
+
title: string;
|
|
1884
|
+
};
|
|
1885
|
+
|
|
1881
1886
|
/** 内置布局模式。 */
|
|
1882
1887
|
export declare type LayoutMode = "side" | "top" | "mix" | "mix-top" | "reverse-horizontal-mix" | "card-layout";
|
|
1883
1888
|
|
|
@@ -2082,6 +2087,7 @@ export declare const MixTopLayout: {
|
|
|
2082
2087
|
/**
|
|
2083
2088
|
* 非破坏地统一 path/key、label/meta.title 与字符串图标来源。
|
|
2084
2089
|
* 缺少稳定路径或 key 的节点不会进入导航,避免意外跳转到根路由。
|
|
2090
|
+
* meta 可缺省,因此不会把宿主扩展字段提升为必填;title/icon 会按通用规则补齐。
|
|
2085
2091
|
*/
|
|
2086
2092
|
export declare function normalizeLayoutMenus<TMeta extends MenuMeta = MenuMeta>(menus: readonly MenuOptions<TMeta>[]): LayoutMenuItem<TMeta>[];
|
|
2087
2093
|
|
|
@@ -2287,7 +2293,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
2287
2293
|
resetSettings: () => void;
|
|
2288
2294
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
2289
2295
|
toggleCollapse: () => void;
|
|
2290
|
-
}, "
|
|
2296
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
2291
2297
|
defaults: Readonly<{
|
|
2292
2298
|
themeMode: ThemeMode;
|
|
2293
2299
|
primaryColor: string;
|
|
@@ -2479,9 +2485,12 @@ export declare interface ThemePreset {
|
|
|
2479
2485
|
description?: string;
|
|
2480
2486
|
icon: string;
|
|
2481
2487
|
primaryColor: string;
|
|
2482
|
-
settings?:
|
|
2488
|
+
settings?: ThemePresetSettings;
|
|
2483
2489
|
}
|
|
2484
2490
|
|
|
2491
|
+
/** 主题预设实际应用的外观细节;其他布局设置由宿主单独维护。 */
|
|
2492
|
+
export declare type ThemePresetSettings = Partial<Pick<SettingsState, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle">>;
|
|
2493
|
+
|
|
2485
2494
|
/** @deprecated 请使用 C_TopLayout;计划在 4.0 移除。 */
|
|
2486
2495
|
export declare const TopLayout: {
|
|
2487
2496
|
new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
|
|
@@ -2808,7 +2817,7 @@ applyPreset: (preset: ThemePreset) => Promise<void>;
|
|
|
2808
2817
|
resetSettings: () => void;
|
|
2809
2818
|
updateThemeMode: (mode: ThemeMode) => Promise<void>;
|
|
2810
2819
|
toggleCollapse: () => void;
|
|
2811
|
-
}, "
|
|
2820
|
+
}, "borderRadius" | "transitionType" | "showBreadcrumb" | "showTagsView" | "tagsViewStyle" | "themeMode" | "primaryColor" | "enableTransition" | "layoutMode" | "menuExpandMode" | "collapsed" | "fixedHeader" | "showBreadcrumbIcon" | "tagsViewHeight" | "showFooter" | "sidebarWidth" | "sidebarCollapsedWidth" | "headerHeight" | "enableHotkeys" | "version" | "defaults">, Pick<{
|
|
2812
2821
|
/** 当前 Store 实例实际使用的默认值。 */
|
|
2813
2822
|
defaults: Readonly<{
|
|
2814
2823
|
themeMode: ThemeMode;
|