mamba-layout 0.44.0 → 0.46.0

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.
@@ -0,0 +1,2 @@
1
+ import { LayoutUser } from '../../layout/hooks/useSetting';
2
+ export declare const defaultUser: LayoutUser;
@@ -0,0 +1,25 @@
1
+ import { RouteItem } from '../layout/hooks';
2
+ import { useRoute, RouteRecordRaw } from 'vue-router';
3
+ import { LayoutApp, LayoutMenuItem } from '../layout/hooks/useSetting';
4
+ /**
5
+ * 将菜单配置转换为 Vue Router 的 routes 配置
6
+ * @param menus 菜单配置数组
7
+ * @returns Vue Router 的 routes 配置
8
+ */
9
+ export declare const menusToRoutes: (menus: LayoutMenuItem[]) => RouteRecordRaw[];
10
+ export declare const findMenu: (path: string, menus: RouteItem[]) => RouteItem | undefined;
11
+ export declare const getAppPath: (app: LayoutApp) => string;
12
+ export declare const toLayoutApp: (app: LayoutApp, icon?: string) => {
13
+ desc: string;
14
+ path: string;
15
+ icon: string | undefined;
16
+ children: never[];
17
+ appId: string;
18
+ displayAppId?: string;
19
+ name: string;
20
+ };
21
+ export declare const getAppIcon: (appId: string) => "metisicon-moxingku" | "metisicon-wangluojiancedian";
22
+ export declare const findCurrent: (route: ReturnType<typeof useRoute>, menus: RouteItem[]) => {
23
+ currentAppId: import('vue').Ref<string, string>;
24
+ defaultParentActive: import('vue').Ref<any, any>;
25
+ };
@@ -25,7 +25,7 @@ export interface RouteItem {
25
25
  isAffix?: boolean;
26
26
  isHide?: boolean;
27
27
  isKeepAlive?: boolean;
28
- isLink?: boolean;
28
+ isLink?: boolean | string;
29
29
  permissionMenuId?: string;
30
30
  title?: string;
31
31
  visible?: string;
package/package.json CHANGED
@@ -1,68 +1,69 @@
1
- {
2
- "name": "mamba-layout",
3
- "version": "0.44.0",
4
- "description": "Shared Mamba Vue layout shell and standalone browser layout.",
5
- "private": false,
6
- "type": "module",
7
- "main": "./dist/index.js",
8
- "module": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
10
- "style": "./dist/layout.css",
11
- "files": [
12
- "dist"
13
- ],
14
- "sideEffects": [
15
- "*.css",
16
- "*.scss"
17
- ],
18
- "exports": {
19
- ".": {
20
- "types": "./dist/index.d.ts",
21
- "import": "./dist/index.js"
22
- },
23
- "./styles": "./dist/layout.css",
24
- "./layout.css": "./dist/layout.css",
25
- "./layout.global.js": "./dist/layout.global.js"
26
- },
27
- "publishConfig": {
28
- "access": "public"
29
- },
30
- "scripts": {
31
- "build": "vite build && vite build -c vite.standalone.config.ts",
32
- "prepack": "pnpm build",
33
- "prepublishOnly": "pnpm type-check && pnpm build",
34
- "type-check": "vue-tsc --noEmit -p tsconfig.app.json"
35
- },
36
- "keywords": [
37
- "mamba",
38
- "layout",
39
- "vue",
40
- "element-plus"
41
- ],
42
- "dependencies": {
43
- "@element-plus/icons-vue": "^2.3.1"
44
- },
45
- "peerDependencies": {
46
- "element-plus": "^2.11.5",
47
- "tailwindcss": "^4.0.8",
48
- "vue": "^3.5.13",
49
- "vue-i18n": "11",
50
- "vue-router": "^4.5.0"
51
- },
52
- "devDependencies": {
53
- "@tailwindcss/vite": "^4.1.6",
54
- "@types/node": "^22.15.18",
55
- "@vitejs/plugin-vue": "^5.2.3",
56
- "@vue/tsconfig": "^0.7.0",
57
- "element-plus": "^2.11.5",
58
- "sass": "^1.83.0",
59
- "tailwindcss": "^4.1.7",
60
- "typescript": "~5.8.3",
61
- "vite": "^6.3.5",
62
- "vite-plugin-dts": "^4.5.4",
63
- "vue": "^3.5.13",
64
- "vue-i18n": "11",
65
- "vue-router": "^4.5.0",
66
- "vue-tsc": "^2.2.8"
67
- }
68
- }
1
+ {
2
+ "name": "mamba-layout",
3
+ "version": "0.46.0",
4
+ "description": "Shared Mamba Vue layout shell and standalone browser layout.",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "style": "./dist/layout.css",
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "sideEffects": [
16
+ "*.css",
17
+ "*.scss"
18
+ ],
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ },
24
+ "./styles": "./dist/layout.css",
25
+ "./layout.css": "./dist/layout.css",
26
+ "./layout.global.js": "./dist/layout.global.js"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ },
31
+ "scripts": {
32
+ "build": "vite build && vite build -c vite.standalone.config.ts",
33
+ "prepack": "pnpm build",
34
+ "prepublishOnly": "pnpm type-check && pnpm build",
35
+ "type-check": "vue-tsc --noEmit -p tsconfig.app.json"
36
+ },
37
+ "keywords": [
38
+ "mamba",
39
+ "layout",
40
+ "vue",
41
+ "element-plus"
42
+ ],
43
+ "dependencies": {
44
+ "@element-plus/icons-vue": "^2.3.1"
45
+ },
46
+ "peerDependencies": {
47
+ "element-plus": "^2.11.5",
48
+ "tailwindcss": "^4.0.8",
49
+ "vue": "^3.5.13",
50
+ "vue-i18n": "11",
51
+ "vue-router": "^4.5.0"
52
+ },
53
+ "devDependencies": {
54
+ "@tailwindcss/vite": "^4.1.6",
55
+ "@types/node": "^22.15.18",
56
+ "@vitejs/plugin-vue": "^5.2.3",
57
+ "@vue/tsconfig": "^0.7.0",
58
+ "element-plus": "^2.11.5",
59
+ "sass": "^1.83.0",
60
+ "tailwindcss": "^4.1.7",
61
+ "typescript": "~5.8.3",
62
+ "vite": "^6.3.5",
63
+ "vite-plugin-dts": "^4.5.4",
64
+ "vue": "^3.5.13",
65
+ "vue-i18n": "11",
66
+ "vue-router": "^4.5.0",
67
+ "vue-tsc": "^2.2.8"
68
+ }
69
+ }
@@ -1,29 +0,0 @@
1
- import { RouteLocationRaw } from 'vue-router';
2
- export interface LayoutBreadcrumbItem {
3
- title: string;
4
- path?: string;
5
- to?: RouteLocationRaw;
6
- disabled?: boolean;
7
- children?: LayoutBreadcrumbItem[];
8
- }
9
- type __VLS_Props = {
10
- items?: LayoutBreadcrumbItem[];
11
- currentTitle?: string;
12
- parentPath?: string;
13
- preserveQueryKeys?: string[];
14
- showCurrent?: boolean;
15
- showBack?: boolean;
16
- backTo?: RouteLocationRaw;
17
- backLabel?: string;
18
- };
19
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
20
- parentPath: string;
21
- items: LayoutBreadcrumbItem[];
22
- currentTitle: string;
23
- preserveQueryKeys: string[];
24
- showCurrent: boolean;
25
- showBack: boolean;
26
- backTo: RouteLocationRaw;
27
- backLabel: string;
28
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
- export default _default;