@morningfast/platform 0.0.6

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 (87) hide show
  1. package/dist/assets/main/style.css +13 -0
  2. package/dist/assets/main.css +1 -0
  3. package/dist/assets/sub/style.css +1 -0
  4. package/dist/auth/index.d.ts +32 -0
  5. package/dist/auth.js +49 -0
  6. package/dist/chunks/Forbidden-gf6y5Zsh.js +30 -0
  7. package/dist/chunks/Login-rBkUOl6l.js +209 -0
  8. package/dist/chunks/MicroAppView-DqTrIZZa.js +249 -0
  9. package/dist/chunks/NotFound-D0ybyfbK.js +30 -0
  10. package/dist/chunks/SystemConfig-DxkDxCnC.js +194 -0
  11. package/dist/chunks/_plugin-vue_export-helper-DvRHjpsZ.js +8 -0
  12. package/dist/chunks/app-Cn5iHmfI.js +221 -0
  13. package/dist/chunks/application-config-0d6f-odq.js +287 -0
  14. package/dist/chunks/auth-C3RvRgcW.js +248 -0
  15. package/dist/chunks/config-DkMAgPn_.js +44 -0
  16. package/dist/chunks/main-CfTD1njJ.js +1798 -0
  17. package/dist/chunks/storage-DNllLr_D.js +18 -0
  18. package/dist/chunks/sub-DlD5e1ys.js +140 -0
  19. package/dist/chunks/system-BbMsTIBR.js +160 -0
  20. package/dist/index.d.ts +4 -0
  21. package/dist/index.js +8 -0
  22. package/dist/main/api/adapter.d.ts +25 -0
  23. package/dist/main/api/auth.d.ts +12 -0
  24. package/dist/main/api/client.d.ts +3 -0
  25. package/dist/main/api/types.d.ts +1 -0
  26. package/dist/main/app/create-app.d.ts +29 -0
  27. package/dist/main/app/runtime-config.d.ts +5 -0
  28. package/dist/main/auth/expired.d.ts +2 -0
  29. package/dist/main/composables/useSortable.d.ts +197 -0
  30. package/dist/main/directives/index.d.ts +2 -0
  31. package/dist/main/index.d.ts +11 -0
  32. package/dist/main/layouts/AppLayout.vue.d.ts +3 -0
  33. package/dist/main/layouts/components/AppContentView.vue.d.ts +6 -0
  34. package/dist/main/layouts/components/AppHeader.vue.d.ts +7 -0
  35. package/dist/main/layouts/components/AppHeaderMenuNode.vue.d.ts +7 -0
  36. package/dist/main/layouts/components/AppMenuSearch.vue.d.ts +10 -0
  37. package/dist/main/layouts/components/AppMenuSearchItem.vue.d.ts +17 -0
  38. package/dist/main/layouts/components/AppMenuSearchTrigger.vue.d.ts +11 -0
  39. package/dist/main/layouts/components/AppSidebar.vue.d.ts +3 -0
  40. package/dist/main/layouts/components/AppSidebarNode.vue.d.ts +8 -0
  41. package/dist/main/layouts/components/AppSidebarSearch.vue.d.ts +11 -0
  42. package/dist/main/layouts/components/AppTabs.vue.d.ts +7 -0
  43. package/dist/main/layouts/components/AppTabsContextMenu.vue.d.ts +38 -0
  44. package/dist/main/layouts/composables/useAppMenus.d.ts +23 -0
  45. package/dist/main/layouts/composables/useShortcutLabel.d.ts +4 -0
  46. package/dist/main/layouts/utils/menuIcons.d.ts +1 -0
  47. package/dist/main/layouts/utils/menuSearch.d.ts +3 -0
  48. package/dist/main/micro-apps/config.d.ts +25 -0
  49. package/dist/main/micro-apps/register.d.ts +1 -0
  50. package/dist/main/micro-apps/status.d.ts +39 -0
  51. package/dist/main/micro-apps/types.d.ts +39 -0
  52. package/dist/main/pages/auth/Login.vue.d.ts +3 -0
  53. package/dist/main/pages/error/Forbidden.vue.d.ts +3 -0
  54. package/dist/main/pages/error/NotFound.vue.d.ts +3 -0
  55. package/dist/main/pages/micro/MicroAppView.vue.d.ts +3 -0
  56. package/dist/main/pages/system/SystemConfig.vue.d.ts +3 -0
  57. package/dist/main/pages/system/application-config/index.vue.d.ts +3 -0
  58. package/dist/main/router/base-routes.d.ts +2 -0
  59. package/dist/main/router/guard.d.ts +2 -0
  60. package/dist/main/router/index.d.ts +8 -0
  61. package/dist/main/settings/components/SystemSettingsDrawer.vue.d.ts +3 -0
  62. package/dist/main/settings/components/ThemeToggleButton.vue.d.ts +3 -0
  63. package/dist/main/settings/components/ThemedSvgImage.vue.d.ts +10 -0
  64. package/dist/main/stores/app.d.ts +85 -0
  65. package/dist/main/stores/auth.d.ts +110 -0
  66. package/dist/main/stores/index.d.ts +4 -0
  67. package/dist/main/stores/system.d.ts +111 -0
  68. package/dist/main/stores/tabs.d.ts +83 -0
  69. package/dist/main/utils/auth.d.ts +1 -0
  70. package/dist/main/utils/persistence.d.ts +3 -0
  71. package/dist/main/utils/storage.d.ts +3 -0
  72. package/dist/main/utils/theme.d.ts +20 -0
  73. package/dist/main.js +5 -0
  74. package/dist/micro-contract/index.d.ts +13 -0
  75. package/dist/micro-contract.js +4 -0
  76. package/dist/request/index.d.ts +72 -0
  77. package/dist/request.js +153 -0
  78. package/dist/sub/app/mount.d.ts +7 -0
  79. package/dist/sub/composables/useRequestClient.d.ts +5 -0
  80. package/dist/sub/composables/useSubAppContext.d.ts +1 -0
  81. package/dist/sub/context/sub-app-context.d.ts +10 -0
  82. package/dist/sub/index.d.ts +8 -0
  83. package/dist/sub/qiankun/index.d.ts +38 -0
  84. package/dist/sub/router/index.d.ts +2 -0
  85. package/dist/sub/theme/index.d.ts +2 -0
  86. package/dist/sub.js +2 -0
  87. package/package.json +86 -0
@@ -0,0 +1,4 @@
1
+ export * from './main';
2
+ export * from './sub';
3
+ export * from './request';
4
+ export * from './micro-contract';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { MICRO_AUTH_EXPIRED_EVENT as e } from "./micro-contract.js";
2
+ import { a as t, c as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./chunks/main-CfTD1njJ.js";
3
+ import { ApiError as d, RequestManager as f, createRequestClient as p, formatErrorMessage as m } from "./request.js";
4
+ import { a as h, i as g, n as _, r as v, t as y } from "./chunks/auth-C3RvRgcW.js";
5
+ import { t as b } from "./chunks/system-BbMsTIBR.js";
6
+ import { t as x } from "./chunks/app-Cn5iHmfI.js";
7
+ import { a as S, c as C, d as w, i as T, l as E, n as D, o as O, r as k, s as A, t as j, u as M } from "./chunks/sub-DlD5e1ys.js";
8
+ export { d as ApiError, O as DEFAULT_SUB_APP_BASE, r as HOME_TAB_PATH, e as MICRO_AUTH_EXPIRED_EVENT, f as RequestManager, A as SUB_APP_NAME, C as SUB_APP_THEME_CHANGE_EVENT, T as applySubAppTheme, o as configureMorningfastRequestClient, c as createApi, _ as createMockLoginResult, v as createMockUserProfile, s as createMorningfastBaseRoutes, a as createMorningfastRouter, p as createRequestClient, M as createSubAppContext, S as createSubAppRouter, m as formatErrorMessage, n as http, l as mountMorningfastApp, k as mountSubApp, g as normalizeLoginResult, h as normalizeUserProfile, i as requestManager, E as resolveSubAppBasePath, u as setupAuthExpiredHandler, w as subAppContextKey, x as useAppStore, y as useAuthStore, j as useRequestClient, D as useSubAppContext, b as useSystemStore, t as useTabsStore };
@@ -0,0 +1,25 @@
1
+ import { RouteRecordRaw } from 'vue-router';
2
+ export interface AuthUser {
3
+ id?: string | number;
4
+ name: string;
5
+ role?: string;
6
+ roleLabel?: string;
7
+ }
8
+ export interface AuthRole {
9
+ id?: string | number;
10
+ code: string;
11
+ name: string;
12
+ }
13
+ export interface NormalizedLoginResult {
14
+ token: string;
15
+ }
16
+ export interface NormalizedUserProfile {
17
+ user: AuthUser;
18
+ roles: AuthRole[];
19
+ permissions: string[];
20
+ menus: RouteRecordRaw[];
21
+ }
22
+ export declare function createMockLoginResult(username: string): NormalizedLoginResult;
23
+ export declare function createMockUserProfile(): NormalizedUserProfile;
24
+ export declare function normalizeLoginResult(raw: unknown, fallbackUsername?: string): NormalizedLoginResult;
25
+ export declare function normalizeUserProfile(raw: unknown): NormalizedUserProfile;
@@ -0,0 +1,12 @@
1
+ import { NormalizedLoginResult, NormalizedUserProfile } from './adapter';
2
+ export interface LoginPayload {
3
+ username: string;
4
+ password: string;
5
+ }
6
+ /**
7
+ * 平台统一认证接口。
8
+ * 当前模板阶段先返回 mock 数据,后续接真实后端时只替换这里。
9
+ */
10
+ export declare function loginRequest(payload: LoginPayload): Promise<NormalizedLoginResult>;
11
+ export declare function logoutRequest(): Promise<void>;
12
+ export declare function userProfileRequest(): Promise<NormalizedUserProfile>;
@@ -0,0 +1,3 @@
1
+ export type { ApiError, ApiResponse, ManagedApi, ManagedRequestConfig, PageQuery, PageResult, RequestConfig, RequestErrorContext, } from '../../request';
2
+ export declare const http: import('axios').AxiosInstance, createApi: <Params = void, Result = void>(option: import('../../request').ManagedRequestConfig) => import('../../request').ManagedApi<Params, Result>, requestManager: import('../../request').RequestManager;
3
+ export declare function configureMorningfastRequestClient(): void;
@@ -0,0 +1 @@
1
+ export type { ApiResponse, ManagedRequestConfig, PageQuery, PageResult, RequestConfig, RequestErrorContext, } from '../../request';
@@ -0,0 +1,29 @@
1
+ import { App as VueApp, Component } from 'vue';
2
+ import { Pinia } from 'pinia';
3
+ import { Router, RouterHistory, RouterScrollBehavior, RouteRecordRaw } from 'vue-router';
4
+ import { http, requestManager } from '../api/client';
5
+ import { MorningfastAppConfig } from './runtime-config';
6
+ export interface MountMorningfastAppOptions {
7
+ appConfig: MorningfastAppConfig;
8
+ businessRoutes?: RouteRecordRaw[];
9
+ rootComponent: Component;
10
+ routerHistory?: RouterHistory;
11
+ routerScrollBehavior?: RouterScrollBehavior;
12
+ setupRouter?: (router: Router) => void;
13
+ setupApp?: (context: MountMorningfastAppContext) => void | Promise<void>;
14
+ beforePlatformInit?: (context: MountMorningfastAppContext) => void | Promise<void>;
15
+ afterPlatformInit?: (context: MountMorningfastAppContext) => void | Promise<void>;
16
+ beforeMount?: (context: MountMorningfastAppContext) => void | Promise<void>;
17
+ afterMount?: (context: MountedMorningfastAppContext) => void | Promise<void>;
18
+ }
19
+ export interface MountMorningfastAppContext {
20
+ app: VueApp<Element>;
21
+ router: Router;
22
+ pinia: Pinia;
23
+ http: typeof http;
24
+ requestManager: typeof requestManager;
25
+ }
26
+ export interface MountedMorningfastAppContext extends MountMorningfastAppContext {
27
+ vm: ReturnType<VueApp<Element>['mount']>;
28
+ }
29
+ export declare function mountMorningfastApp(options: MountMorningfastAppOptions): Promise<VueApp<Element>>;
@@ -0,0 +1,5 @@
1
+ export interface MorningfastAppConfig {
2
+ apiBaseUrl: string;
3
+ }
4
+ export declare function setMorningfastAppConfig(appConfig: MorningfastAppConfig): void;
5
+ export declare function getMorningfastAppConfig(): MorningfastAppConfig;
@@ -0,0 +1,2 @@
1
+ import { Router } from 'vue-router';
2
+ export declare function setupAuthExpiredHandler(router: Router): () => void;
@@ -0,0 +1,197 @@
1
+ import { default as Sortable, SortableEvent } from 'sortablejs';
2
+ export interface UseSortableOptions {
3
+ animation?: number;
4
+ chosenClass?: string;
5
+ direction?: 'horizontal' | 'vertical';
6
+ disabled?: boolean;
7
+ dragClass?: string;
8
+ draggable?: string;
9
+ easing?: string;
10
+ filter?: string;
11
+ ghostClass?: string;
12
+ handle?: string;
13
+ invertSwap?: boolean;
14
+ onEnd?: ((oldIndex: number, newIndex: number) => void) | (() => void);
15
+ onStart?: () => void;
16
+ preventOnFilter?: boolean;
17
+ swapThreshold?: number;
18
+ }
19
+ export declare function useSortable(options?: UseSortableOptions): {
20
+ destroy: () => void;
21
+ init: (element: HTMLElement | null) => void;
22
+ sortableInstance: import('vue').Ref<{
23
+ options: {
24
+ animation?: number | undefined | undefined;
25
+ chosenClass?: string | undefined | undefined;
26
+ dataIdAttr?: string | undefined | undefined;
27
+ delay?: number | undefined | undefined;
28
+ delayOnTouchOnly?: boolean | undefined | undefined;
29
+ direction?: ((evt: SortableEvent, target: HTMLElement, dragEl: HTMLElement) => Sortable.Direction) | Sortable.Direction | undefined;
30
+ disabled?: boolean | undefined | undefined;
31
+ dragClass?: string | undefined | undefined;
32
+ draggable?: string | undefined | undefined;
33
+ dragoverBubble?: boolean | undefined | undefined;
34
+ dropBubble?: boolean | undefined | undefined;
35
+ emptyInsertThreshold?: number | undefined | undefined;
36
+ easing?: string | undefined | undefined;
37
+ fallbackClass?: string | undefined | undefined;
38
+ fallbackOnBody?: boolean | undefined | undefined;
39
+ fallbackTolerance?: number | undefined | undefined;
40
+ fallbackOffset?: {
41
+ x: number;
42
+ y: number;
43
+ } | undefined;
44
+ filter?: string | ((this: Sortable, event: Event | TouchEvent, target: HTMLElement, sortable: Sortable) => boolean) | undefined | undefined;
45
+ forceFallback?: boolean | undefined | undefined;
46
+ ghostClass?: string | undefined | undefined;
47
+ group?: string | {
48
+ name: string;
49
+ pull?: Sortable.PullResult | ((to: Sortable, from: Sortable, dragEl: HTMLElement, event: SortableEvent) => Sortable.PullResult) | undefined;
50
+ put?: Sortable.PutResult | ((to: Sortable, from: Sortable, dragEl: HTMLElement, event: SortableEvent) => Sortable.PutResult) | undefined;
51
+ checkPull?: ((sortable: Sortable, activeSortable: Sortable, dragEl: HTMLElement, event: SortableEvent) => boolean | string | string[]) | undefined | undefined;
52
+ checkPut?: ((sortable: Sortable, activeSortable: Sortable, dragEl: HTMLElement, event: SortableEvent) => boolean | string | "clone" | string[]) | undefined | undefined;
53
+ revertClone?: boolean | undefined | undefined;
54
+ } | undefined;
55
+ handle?: string | undefined | undefined;
56
+ ignore?: string | undefined | undefined;
57
+ invertSwap?: boolean | undefined | undefined;
58
+ invertedSwapThreshold?: number | undefined | undefined;
59
+ preventOnFilter?: boolean | undefined | undefined;
60
+ removeCloneOnHide?: boolean | undefined | undefined;
61
+ sort?: boolean | undefined | undefined;
62
+ store?: {
63
+ get: (sortable: Sortable) => string[];
64
+ set: (sortable: Sortable) => void;
65
+ } | undefined;
66
+ swapThreshold?: number | undefined | undefined;
67
+ touchStartThreshold?: number | undefined | undefined;
68
+ setData?: ((dataTransfer: DataTransfer, draggedElement: HTMLElement) => void) | undefined | undefined;
69
+ onStart?: ((event: SortableEvent) => void) | undefined | undefined;
70
+ onEnd?: ((event: SortableEvent) => void) | undefined | undefined;
71
+ onAdd?: ((event: SortableEvent) => void) | undefined | undefined;
72
+ onClone?: ((event: SortableEvent) => void) | undefined | undefined;
73
+ onChoose?: ((event: SortableEvent) => void) | undefined | undefined;
74
+ onUnchoose?: ((event: SortableEvent) => void) | undefined | undefined;
75
+ onUpdate?: ((event: SortableEvent) => void) | undefined | undefined;
76
+ onSort?: ((event: SortableEvent) => void) | undefined | undefined;
77
+ onRemove?: ((event: SortableEvent) => void) | undefined | undefined;
78
+ onFilter?: ((event: SortableEvent) => void) | undefined | undefined;
79
+ onMove?: ((evt: Sortable.MoveEvent, originalEvent: Event) => boolean | -1 | 1 | void) | undefined | undefined;
80
+ onChange?: ((evt: SortableEvent) => void) | undefined | undefined;
81
+ scroll?: boolean | HTMLElement | undefined;
82
+ forceAutoScrollFallback?: boolean | undefined | undefined;
83
+ scrollFn?: ((this: Sortable, offsetX: number, offsetY: number, originalEvent: Event, touchEvt: TouchEvent, hoverTargetEl: HTMLElement) => "continue" | void) | undefined | undefined;
84
+ scrollSensitivity?: number | undefined | undefined;
85
+ scrollSpeed?: number | undefined | undefined;
86
+ bubbleScroll?: boolean | undefined | undefined;
87
+ multiDrag?: boolean | undefined | undefined;
88
+ selectedClass?: string | undefined | undefined;
89
+ multiDragKey?: null | undefined | string | undefined;
90
+ avoidImplicitDeselect?: boolean | undefined | undefined;
91
+ onSelect?: ((event: SortableEvent) => void) | undefined | undefined;
92
+ onDeselect?: ((event: SortableEvent) => void) | undefined | undefined;
93
+ revertOnSpill?: boolean | undefined | undefined;
94
+ removeOnSpill?: boolean | undefined | undefined;
95
+ onSpill?: ((evt: SortableEvent) => void) | undefined | undefined;
96
+ swap?: boolean | undefined | undefined;
97
+ swapClass?: string | undefined | undefined;
98
+ };
99
+ el: HTMLElement;
100
+ option: {
101
+ <K extends keyof Sortable.Options>(name: K, value: Sortable.Options[K]): void;
102
+ <K extends keyof Sortable.Options>(name: K): Sortable.Options[K];
103
+ };
104
+ closest: (element: HTMLElement, selector?: string) => HTMLElement | null;
105
+ sort: (order: readonly string[], useAnimation?: boolean) => void;
106
+ save: () => void;
107
+ destroy: () => void;
108
+ toArray: () => string[];
109
+ } | null, Sortable | {
110
+ options: {
111
+ animation?: number | undefined | undefined;
112
+ chosenClass?: string | undefined | undefined;
113
+ dataIdAttr?: string | undefined | undefined;
114
+ delay?: number | undefined | undefined;
115
+ delayOnTouchOnly?: boolean | undefined | undefined;
116
+ direction?: ((evt: SortableEvent, target: HTMLElement, dragEl: HTMLElement) => Sortable.Direction) | Sortable.Direction | undefined;
117
+ disabled?: boolean | undefined | undefined;
118
+ dragClass?: string | undefined | undefined;
119
+ draggable?: string | undefined | undefined;
120
+ dragoverBubble?: boolean | undefined | undefined;
121
+ dropBubble?: boolean | undefined | undefined;
122
+ emptyInsertThreshold?: number | undefined | undefined;
123
+ easing?: string | undefined | undefined;
124
+ fallbackClass?: string | undefined | undefined;
125
+ fallbackOnBody?: boolean | undefined | undefined;
126
+ fallbackTolerance?: number | undefined | undefined;
127
+ fallbackOffset?: {
128
+ x: number;
129
+ y: number;
130
+ } | undefined;
131
+ filter?: string | ((this: Sortable, event: Event | TouchEvent, target: HTMLElement, sortable: Sortable) => boolean) | undefined | undefined;
132
+ forceFallback?: boolean | undefined | undefined;
133
+ ghostClass?: string | undefined | undefined;
134
+ group?: string | {
135
+ name: string;
136
+ pull?: Sortable.PullResult | ((to: Sortable, from: Sortable, dragEl: HTMLElement, event: SortableEvent) => Sortable.PullResult) | undefined;
137
+ put?: Sortable.PutResult | ((to: Sortable, from: Sortable, dragEl: HTMLElement, event: SortableEvent) => Sortable.PutResult) | undefined;
138
+ checkPull?: ((sortable: Sortable, activeSortable: Sortable, dragEl: HTMLElement, event: SortableEvent) => boolean | string | string[]) | undefined | undefined;
139
+ checkPut?: ((sortable: Sortable, activeSortable: Sortable, dragEl: HTMLElement, event: SortableEvent) => boolean | string | "clone" | string[]) | undefined | undefined;
140
+ revertClone?: boolean | undefined | undefined;
141
+ } | undefined;
142
+ handle?: string | undefined | undefined;
143
+ ignore?: string | undefined | undefined;
144
+ invertSwap?: boolean | undefined | undefined;
145
+ invertedSwapThreshold?: number | undefined | undefined;
146
+ preventOnFilter?: boolean | undefined | undefined;
147
+ removeCloneOnHide?: boolean | undefined | undefined;
148
+ sort?: boolean | undefined | undefined;
149
+ store?: {
150
+ get: (sortable: Sortable) => string[];
151
+ set: (sortable: Sortable) => void;
152
+ } | undefined;
153
+ swapThreshold?: number | undefined | undefined;
154
+ touchStartThreshold?: number | undefined | undefined;
155
+ setData?: ((dataTransfer: DataTransfer, draggedElement: HTMLElement) => void) | undefined | undefined;
156
+ onStart?: ((event: SortableEvent) => void) | undefined | undefined;
157
+ onEnd?: ((event: SortableEvent) => void) | undefined | undefined;
158
+ onAdd?: ((event: SortableEvent) => void) | undefined | undefined;
159
+ onClone?: ((event: SortableEvent) => void) | undefined | undefined;
160
+ onChoose?: ((event: SortableEvent) => void) | undefined | undefined;
161
+ onUnchoose?: ((event: SortableEvent) => void) | undefined | undefined;
162
+ onUpdate?: ((event: SortableEvent) => void) | undefined | undefined;
163
+ onSort?: ((event: SortableEvent) => void) | undefined | undefined;
164
+ onRemove?: ((event: SortableEvent) => void) | undefined | undefined;
165
+ onFilter?: ((event: SortableEvent) => void) | undefined | undefined;
166
+ onMove?: ((evt: Sortable.MoveEvent, originalEvent: Event) => boolean | -1 | 1 | void) | undefined | undefined;
167
+ onChange?: ((evt: SortableEvent) => void) | undefined | undefined;
168
+ scroll?: boolean | HTMLElement | undefined;
169
+ forceAutoScrollFallback?: boolean | undefined | undefined;
170
+ scrollFn?: ((this: Sortable, offsetX: number, offsetY: number, originalEvent: Event, touchEvt: TouchEvent, hoverTargetEl: HTMLElement) => "continue" | void) | undefined | undefined;
171
+ scrollSensitivity?: number | undefined | undefined;
172
+ scrollSpeed?: number | undefined | undefined;
173
+ bubbleScroll?: boolean | undefined | undefined;
174
+ multiDrag?: boolean | undefined | undefined;
175
+ selectedClass?: string | undefined | undefined;
176
+ multiDragKey?: null | undefined | string | undefined;
177
+ avoidImplicitDeselect?: boolean | undefined | undefined;
178
+ onSelect?: ((event: SortableEvent) => void) | undefined | undefined;
179
+ onDeselect?: ((event: SortableEvent) => void) | undefined | undefined;
180
+ revertOnSpill?: boolean | undefined | undefined;
181
+ removeOnSpill?: boolean | undefined | undefined;
182
+ onSpill?: ((evt: SortableEvent) => void) | undefined | undefined;
183
+ swap?: boolean | undefined | undefined;
184
+ swapClass?: string | undefined | undefined;
185
+ };
186
+ el: HTMLElement;
187
+ option: {
188
+ <K extends keyof Sortable.Options>(name: K, value: Sortable.Options[K]): void;
189
+ <K extends keyof Sortable.Options>(name: K): Sortable.Options[K];
190
+ };
191
+ closest: (element: HTMLElement, selector?: string) => HTMLElement | null;
192
+ sort: (order: readonly string[], useAnimation?: boolean) => void;
193
+ save: () => void;
194
+ destroy: () => void;
195
+ toArray: () => string[];
196
+ } | null>;
197
+ };
@@ -0,0 +1,2 @@
1
+ import { App } from 'vue';
2
+ export declare function setupDirectives(app: App): void;
@@ -0,0 +1,11 @@
1
+ export { setupAuthExpiredHandler } from './auth/expired';
2
+ export { createMorningfastRouter } from './router';
3
+ export type { CreateMorningfastRouterOptions } from './router';
4
+ export { createMorningfastBaseRoutes } from './router/base-routes';
5
+ export { mountMorningfastApp } from './app/create-app';
6
+ export type { MountedMorningfastAppContext, MountMorningfastAppContext, MountMorningfastAppOptions, } from './app/create-app';
7
+ export type { MorningfastAppConfig } from './app/runtime-config';
8
+ export * from './api/client';
9
+ export * from './api/adapter';
10
+ export * from './api/types';
11
+ export * from './stores';
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ refreshKey: number;
3
+ };
4
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { RouteLocationMatched } from 'vue-router';
2
+ type __VLS_Props = {
3
+ breadcrumbItems: RouteLocationMatched[];
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { AppMenuNode } from '../composables/useAppMenus';
2
+ type __VLS_Props = {
3
+ node: AppMenuNode;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ modelValue: boolean;
3
+ };
4
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ "update:modelValue": (value: boolean) => any;
6
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
8
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { AppMenuNode } from '../composables/useAppMenus';
2
+ type __VLS_Props = {
3
+ active: boolean;
4
+ item: AppMenuNode;
5
+ removable?: boolean;
6
+ };
7
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ select: (item: AppMenuNode) => any;
9
+ enter: (item: AppMenuNode) => any;
10
+ remove: (item: AppMenuNode) => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onSelect?: ((item: AppMenuNode) => any) | undefined;
13
+ onEnter?: ((item: AppMenuNode) => any) | undefined;
14
+ onRemove?: ((item: AppMenuNode) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { LayoutMode } from '../../stores/app';
2
+ type __VLS_Props = {
3
+ layoutMode: LayoutMode;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ open: () => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onOpen?: (() => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { AppMenuNode } from '../composables/useAppMenus';
2
+ type __VLS_Props = {
3
+ node: AppMenuNode;
4
+ keyword?: string;
5
+ };
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ collapsed: boolean;
3
+ keyword: string;
4
+ };
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ "update:keyword": (value: string) => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onUpdate:keyword"?: ((value: string) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -0,0 +1,7 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ refresh: () => any;
3
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
+ onRefresh?: (() => any) | undefined;
5
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { TabItem } from '../../stores/tabs';
2
+ type __VLS_Props = {
3
+ hasLeftTabs: boolean;
4
+ hasMultipleTabs: boolean;
5
+ hasRightTabs: boolean;
6
+ hasLastActive: boolean;
7
+ isTargetActive: boolean;
8
+ isTargetHome: boolean;
9
+ visible: boolean;
10
+ position: {
11
+ x: number;
12
+ y: number;
13
+ };
14
+ targetTab: TabItem | null;
15
+ };
16
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ close: () => any;
18
+ closeAll: () => any;
19
+ closeLeft: (path: string) => any;
20
+ closeOthers: (path: string) => any;
21
+ closeRight: (path: string) => any;
22
+ closeTab: (path: string) => any;
23
+ openInNewTab: (path: string) => any;
24
+ refresh: (path: string) => any;
25
+ switchPrev: () => any;
26
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ onClose?: (() => any) | undefined;
28
+ onCloseAll?: (() => any) | undefined;
29
+ onCloseLeft?: ((path: string) => any) | undefined;
30
+ onCloseOthers?: ((path: string) => any) | undefined;
31
+ onCloseRight?: ((path: string) => any) | undefined;
32
+ onCloseTab?: ((path: string) => any) | undefined;
33
+ onOpenInNewTab?: ((path: string) => any) | undefined;
34
+ onRefresh?: ((path: string) => any) | undefined;
35
+ onSwitchPrev?: (() => any) | undefined;
36
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { RouteRecordRaw } from 'vue-router';
2
+ export interface AppMenuNode {
3
+ path: string;
4
+ fullPath: string;
5
+ title: string;
6
+ icon?: string;
7
+ children?: AppMenuNode[];
8
+ }
9
+ export declare function useAppMenus(): {
10
+ activeMenu: import('vue').ComputedRef<string>;
11
+ activeTopMenuPath: import('vue').ComputedRef<string>;
12
+ allMenus: import('vue').ComputedRef<AppMenuNode[]>;
13
+ flatMenus: import('vue').ComputedRef<AppMenuNode[]>;
14
+ flatSideMenus: import('vue').ComputedRef<AppMenuNode[]>;
15
+ findFirstLeafNode: typeof findFirstLeafNode;
16
+ findFirstLeafPath: typeof findFirstLeafPath;
17
+ sideMenus: import('vue').ComputedRef<AppMenuNode[]>;
18
+ topMenus: import('vue').ComputedRef<AppMenuNode[]>;
19
+ };
20
+ export declare function buildMenuNodes(routes: readonly RouteRecordRaw[], parentPath: string, hasPermission: (permission: string) => boolean): AppMenuNode[];
21
+ export declare function flattenMenuNodes(nodes: readonly AppMenuNode[]): AppMenuNode[];
22
+ export declare function findFirstLeafNode(node: AppMenuNode): AppMenuNode | null;
23
+ export declare function findFirstLeafPath(routes: readonly RouteRecordRaw[], targetPath: string, parentPath?: string): string | null;
@@ -0,0 +1,4 @@
1
+ export declare function useShortcutLabel(): {
2
+ isMac: import('vue').ComputedRef<boolean>;
3
+ searchShortcutLabel: import('vue').ComputedRef<"⌘ K" | "Ctrl K">;
4
+ };
@@ -0,0 +1 @@
1
+ export declare function resolveMenuIcon(icon?: string): import('vue').DefineComponent<{}, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,3 @@
1
+ import { AppMenuNode } from '../composables/useAppMenus';
2
+ export declare function filterMenuTree(nodes: readonly AppMenuNode[], keyword: string): AppMenuNode[];
3
+ export declare function highlightMenuTitle(title: string, keyword: string): string;
@@ -0,0 +1,25 @@
1
+ import { MicroAppConfig, MicroAppInfo } from './types';
2
+ export declare const DEFAULT_SUB_APP_ENTRY = "http://localhost:5174";
3
+ export interface AppConfigItem {
4
+ id: string;
5
+ name: string;
6
+ type: 'sub';
7
+ description: string;
8
+ basePath: string;
9
+ entry: string;
10
+ }
11
+ export declare const DEFAULT_SUB_APPS: AppConfigItem[];
12
+ export declare const MICRO_APP_CONTAINER_ID = "micro-app-container";
13
+ export declare function getAppConfigs(): AppConfigItem[];
14
+ export declare function saveAppConfigs(apps: AppConfigItem[]): Promise<void>;
15
+ export declare function getMicroAppConfigs(apps: AppConfigItem[]): {
16
+ id: string;
17
+ name: string;
18
+ title: string;
19
+ entry: string;
20
+ activeRule: string;
21
+ container: string;
22
+ }[];
23
+ export declare function toMicroAppInfo(app: MicroAppConfig): MicroAppInfo;
24
+ export declare function toMicroAppName(app: AppConfigItem): string;
25
+ export declare function normalizeMicroAppBasePath(basePath: string): string;
@@ -0,0 +1 @@
1
+ export declare function setupMicroApps(): void;
@@ -0,0 +1,39 @@
1
+ import { MicroAppConfig } from './types';
2
+ export type MicroAppLoadStatus = 'idle' | 'loading' | 'mounted' | 'error';
3
+ export interface MicroAppStatus {
4
+ name: string;
5
+ title: string;
6
+ entry: string;
7
+ activeRule: string;
8
+ status: MicroAppLoadStatus;
9
+ message?: string;
10
+ updatedAt: number;
11
+ }
12
+ export interface MicroAppRouteError {
13
+ path: string;
14
+ name: string;
15
+ title: string;
16
+ entry: string;
17
+ activeRule: string;
18
+ message: string;
19
+ updatedAt: number;
20
+ }
21
+ export declare function getMicroAppStatuses(): Record<string, MicroAppStatus>;
22
+ export declare function getMicroAppRouteError(path: string): MicroAppRouteError;
23
+ export declare function findMicroAppByPath(path: string): {
24
+ id: string;
25
+ name: string;
26
+ title: string;
27
+ entry: string;
28
+ activeRule: string;
29
+ container: string;
30
+ } | undefined;
31
+ export declare function ensureMicroAppStatus(app: MicroAppConfig): MicroAppStatus;
32
+ export declare function setMicroAppLoading(app: MicroAppConfig): void;
33
+ export declare function setMicroAppLoadingByName(name: string): void;
34
+ export declare function setMicroAppMounted(app: MicroAppConfig): void;
35
+ export declare function setMicroAppMountedByName(name: string): void;
36
+ export declare function setMicroAppError(app: MicroAppConfig, error: unknown): void;
37
+ export declare function setMicroAppErrorByName(name: string, error: unknown): boolean;
38
+ export declare function setMicroAppRouteError(app: MicroAppConfig, path: string, error: unknown): void;
39
+ export declare function clearMicroAppRouteError(path: string): void;
@@ -0,0 +1,39 @@
1
+ export declare const MICRO_APP_THEME_CHANGE_EVENT = "morningfast:theme-change";
2
+ export interface MicroAppConfig {
3
+ name: string;
4
+ title: string;
5
+ entry: string;
6
+ activeRule: string;
7
+ container: string;
8
+ }
9
+ export interface MicroAppInfo {
10
+ id: string;
11
+ name: string;
12
+ title: string;
13
+ entry: string;
14
+ activeRule: string;
15
+ }
16
+ export interface MicroAppRuntimeContext {
17
+ env: string;
18
+ apiBaseUrl: string;
19
+ }
20
+ export interface MicroAppRuntimeProps {
21
+ theme: MicroAppThemeContext;
22
+ }
23
+ export interface MicroAppProps {
24
+ basePath: string;
25
+ app: MicroAppInfo;
26
+ runtime: MicroAppRuntimeContext;
27
+ theme: MicroAppThemeContext;
28
+ getRuntimeProps?: () => Partial<MicroAppRuntimeProps>;
29
+ }
30
+ export interface MicroAppThemeContext {
31
+ colorPrimary: string;
32
+ colorPrimaryLight3: string;
33
+ colorPrimaryLight5: string;
34
+ colorPrimaryLight7: string;
35
+ colorPrimaryLight8: string;
36
+ colorPrimaryLight9: string;
37
+ colorPrimaryDark2: string;
38
+ mode: 'light' | 'dark';
39
+ }
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;