cosey 0.1.3 → 0.1.5
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/README.md +59 -0
- package/components/audio-card/style/index.d.ts +1 -1
- package/components/audio-viewer/style/index.d.ts +1 -1
- package/components/close/style/index.d.ts +1 -1
- package/components/col/style/index.d.ts +1 -1
- package/components/col/style/index.js +1 -1
- package/components/config-provider/config-provider.vue.js +8 -4
- package/components/config-provider/override-element-plus.d.ts +3 -2
- package/components/config-provider/override-element-plus.js +2 -2
- package/components/container/container.d.ts +0 -1
- package/components/container/container.vue.js +0 -4
- package/components/container/style/index.d.ts +1 -1
- package/components/context-menu/style/index.d.ts +1 -1
- package/components/copy/copy.d.ts +0 -2
- package/components/copy/copy.vue.d.ts +1 -7
- package/components/copy/copy.vue.js +0 -1
- package/components/copy/index.d.ts +3 -19
- package/components/copy/style/index.d.ts +1 -1
- package/components/dnd-sort/dnd-sort-item.vue.js +1 -1
- package/components/dnd-sort/style/index.d.ts +1 -1
- package/components/dnd-sort/style/index.js +1 -0
- package/components/editor/components/color-picker/color-picker.style.d.ts +1 -1
- package/components/editor/components/list/list.style.d.ts +1 -1
- package/components/editor/components/picker/picker.style.d.ts +1 -1
- package/components/editor/components/resize/resize.style.d.ts +1 -1
- package/components/editor/components/table-toolbar/table-toolbar.style.d.ts +1 -1
- package/components/editor/components/toolbar/formats/table.style.d.ts +1 -1
- package/components/editor/editor.d.ts +0 -2
- package/components/editor/editor.vue.js +1 -11
- package/components/editor/modules/image-uploader/formats/image-loading.style.d.ts +1 -1
- package/components/editor/modules/image-uploader/formats/image-loading.style.js +3 -3
- package/components/editor/style/hljs.d.ts +1 -1
- package/components/editor/style/index.d.ts +1 -1
- package/components/file-card/style/index.d.ts +1 -1
- package/components/form/style/index.d.ts +1 -1
- package/components/form-list/style/index.d.ts +1 -1
- package/components/form-query/style/index.d.ts +1 -1
- package/components/highlight/highlight.d.ts +1 -1
- package/components/highlight/highlight.vue.js +11 -4
- package/components/highlight/style/index.d.ts +1 -1
- package/components/highlight/style/index.js +15 -5
- package/components/horizontal-tree/style/index.d.ts +1 -1
- package/components/icon/style/index.d.ts +1 -1
- package/components/image-card/style/index.d.ts +1 -1
- package/components/index.js +1 -0
- package/components/long-text/style/index.d.ts +1 -1
- package/components/mask/style/index.d.ts +1 -1
- package/components/media-card-group/style/index.d.ts +1 -1
- package/components/panel/style/index.d.ts +1 -1
- package/components/row/style/index.d.ts +1 -1
- package/components/scroll-view/style/index.d.ts +1 -1
- package/components/snug-menu/style/index.d.ts +1 -1
- package/components/table/style/index.d.ts +1 -1
- package/components/table/table-column/style/index.d.ts +1 -1
- package/components/table/table-column/table-column.vue.d.ts +3 -3
- package/components/table/table-column-editor/item.vue.js +1 -1
- package/components/table/table-column-editor/style/index.d.ts +1 -1
- package/components/table/table-column-editor/style/index.js +1 -0
- package/components/table/table-export/style/index.d.ts +1 -1
- package/components/table-action/style/index.d.ts +1 -1
- package/components/theme/getGlobalStyleHook.d.ts +2 -3
- package/components/theme/getGlobalStyleHook.js +3 -8
- package/components/theme/getOverrideStyleHook.d.ts +8 -0
- package/components/theme/getOverrideStyleHook.js +39 -0
- package/components/theme/getSimpleStyleHook.d.ts +2 -2
- package/components/theme/getSimpleStyleHook.js +3 -7
- package/components/theme/getStyleHook.d.ts +2 -2
- package/components/theme/getStyleHook.js +3 -7
- package/components/theme/index.d.ts +2 -1
- package/components/theme/index.js +1 -0
- package/components/theme/theme-context.d.ts +11 -2
- package/components/theme/theme-context.js +36 -6
- package/components/theme/useStyleRegister.d.ts +1 -7
- package/components/theme/useStyleRegister.js +3 -4
- package/components/theme/util/useToken.d.ts +4 -4
- package/components/theme/util/useToken.js +6 -6
- package/components/transition/style/index.d.ts +1 -1
- package/components/transition-group/index.d.ts +3 -3
- package/components/transition-group/style/index.d.ts +1 -1
- package/components/transition-group/transition-group.vue.d.ts +1 -1
- package/components/upload/index.d.ts +0 -3
- package/components/upload/style/index.d.ts +1 -1
- package/components/upload/upload.d.ts +0 -2
- package/components/upload/upload.js +0 -1
- package/components/upload/upload.vue.d.ts +0 -1
- package/components/upload/upload.vue.js +0 -4
- package/components/video-card/style/index.d.ts +1 -1
- package/components/video-card/video-card.vue.js +1 -1
- package/components/video-viewer/style/index.d.ts +1 -1
- package/config/http.d.ts +1 -1
- package/config/http.js +1 -1
- package/config/index.d.ts +22 -22
- package/config/nprogress.style.d.ts +1 -1
- package/config/nprogress.style.js +1 -1
- package/hooks/useUpsert.d.ts +15 -16
- package/hooks/useUpsert.js +3 -3
- package/layout/layout-aside/style/index.d.ts +1 -1
- package/layout/layout-auth/style/index.d.ts +1 -1
- package/layout/layout-base/layout-base.vue.js +8 -8
- package/layout/layout-base/style/index.d.ts +1 -1
- package/layout/layout-brand/style/index.d.ts +1 -1
- package/layout/layout-change-password/style/index.d.ts +1 -1
- package/layout/layout-color-scheme/style/index.d.ts +2 -2
- package/layout/layout-content/style/index.d.ts +1 -1
- package/layout/layout-exception/style/index.d.ts +1 -1
- package/layout/layout-header/style/index.d.ts +1 -1
- package/layout/layout-iframe/style/index.d.ts +1 -1
- package/layout/layout-login/style/index.d.ts +1 -1
- package/layout/layout-main/style/index.d.ts +1 -1
- package/layout/layout-mask/style/index.d.ts +1 -1
- package/layout/layout-menu/layout-menu.vue.js +5 -0
- package/layout/layout-menu/style/index.d.ts +1 -1
- package/layout/layout-search/style/index.d.ts +1 -1
- package/layout/layout-sidebar/style/index.d.ts +1 -1
- package/layout/layout-snug-aside/style/index.d.ts +1 -1
- package/layout/layout-switch-effect/style/index.d.ts +1 -1
- package/layout/layout-tabbar/layout-tabbar.vue.js +6 -1
- package/layout/layout-tabbar/style/index.d.ts +1 -1
- package/layout/layout-tabbar/style/index.js +4 -0
- package/layout/layout-topbar/style/index.d.ts +1 -1
- package/layout/layout-user-menu/style/index.d.ts +1 -1
- package/package.json +3 -3
- package/router/guard/index.js +2 -0
- package/router/guard/pageTitle.d.ts +2 -0
- package/router/guard/pageTitle.js +11 -0
- package/router/index.js +1 -1
- package/router/routes/static/auth.js +5 -6
- package/router/routes/static/exception.js +3 -3
- package/router/utils.js +11 -3
- package/store/layout.d.ts +2 -2
- package/store/user.d.ts +3 -3
- package/store/user.js +1 -0
- package/utils/dynamicCSS.d.ts +3 -2
- package/utils/dynamicCSS.js +12 -1
- package/utils/index.js +1 -1
package/store/layout.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RouteMeta } from 'vue-router';
|
|
2
2
|
import { type MenuItem } from '../router';
|
|
3
3
|
export type LayoutMenuType = 'vertical' | 'biserial' | 'horizontal' | 'horizontal-vertical' | 'horizontal-biserial';
|
|
4
4
|
export interface LayoutTab {
|
|
5
5
|
name: string;
|
|
6
|
-
meta:
|
|
6
|
+
meta: RouteMeta;
|
|
7
7
|
}
|
|
8
8
|
export declare const useLayoutStore: import("pinia").StoreDefinition<"cosey-layout", Pick<{
|
|
9
9
|
sidebarVisible: import("vue").Ref<boolean, boolean>;
|
package/store/user.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
|
|
|
10
10
|
userInfo: import("vue").Ref<UserInfo | undefined, UserInfo | undefined>;
|
|
11
11
|
requestedUserInfo: import("vue").Ref<boolean, boolean>;
|
|
12
12
|
login: (data: any) => Promise<void>;
|
|
13
|
-
getUserInfo: () => Promise<
|
|
13
|
+
getUserInfo: () => Promise<UserInfo | undefined>;
|
|
14
14
|
changePassword: (data: any) => Promise<void>;
|
|
15
15
|
setAuthorization: () => Promise<void | undefined>;
|
|
16
16
|
addDynamicRoutes: () => Promise<void>;
|
|
@@ -20,7 +20,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
|
|
|
20
20
|
userInfo: import("vue").Ref<UserInfo | undefined, UserInfo | undefined>;
|
|
21
21
|
requestedUserInfo: import("vue").Ref<boolean, boolean>;
|
|
22
22
|
login: (data: any) => Promise<void>;
|
|
23
|
-
getUserInfo: () => Promise<
|
|
23
|
+
getUserInfo: () => Promise<UserInfo | undefined>;
|
|
24
24
|
changePassword: (data: any) => Promise<void>;
|
|
25
25
|
setAuthorization: () => Promise<void | undefined>;
|
|
26
26
|
addDynamicRoutes: () => Promise<void>;
|
|
@@ -30,7 +30,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"cosey-user",
|
|
|
30
30
|
userInfo: import("vue").Ref<UserInfo | undefined, UserInfo | undefined>;
|
|
31
31
|
requestedUserInfo: import("vue").Ref<boolean, boolean>;
|
|
32
32
|
login: (data: any) => Promise<void>;
|
|
33
|
-
getUserInfo: () => Promise<
|
|
33
|
+
getUserInfo: () => Promise<UserInfo | undefined>;
|
|
34
34
|
changePassword: (data: any) => Promise<void>;
|
|
35
35
|
setAuthorization: () => Promise<void | undefined>;
|
|
36
36
|
addDynamicRoutes: () => Promise<void>;
|
package/store/user.js
CHANGED
package/utils/dynamicCSS.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function insertCSS(styleStr: string, styleId?: string): HTMLStyleElement;
|
|
2
|
-
export declare function findCSSNode(styleId: string):
|
|
3
|
-
export declare function updateCSS(styleStr: string, styleId: string):
|
|
2
|
+
export declare function findCSSNode(styleId: string): HTMLStyleElement | null;
|
|
3
|
+
export declare function updateCSS(styleStr: string, styleId: string): HTMLStyleElement | undefined;
|
|
4
|
+
export declare function updateCSSByStyle(style: HTMLStyleElement | undefined | null, styleStr: string, styleId: string): HTMLStyleElement | undefined;
|
|
4
5
|
export declare function removeCSS(styleId: string): void;
|
package/utils/dynamicCSS.js
CHANGED
|
@@ -23,6 +23,17 @@ function updateCSS(styleStr, styleId) {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
function updateCSSByStyle(style, styleStr, styleId) {
|
|
27
|
+
if (isClient()) {
|
|
28
|
+
if (style) {
|
|
29
|
+
style.innerHTML = styleStr;
|
|
30
|
+
style.dataset.id = styleId;
|
|
31
|
+
return style;
|
|
32
|
+
} else {
|
|
33
|
+
return insertCSS(styleStr, styleId);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
26
37
|
function removeCSS(styleId) {
|
|
27
38
|
const style = findCSSNode(styleId);
|
|
28
39
|
if (style) {
|
|
@@ -30,4 +41,4 @@ function removeCSS(styleId) {
|
|
|
30
41
|
}
|
|
31
42
|
}
|
|
32
43
|
|
|
33
|
-
export { findCSSNode, insertCSS, removeCSS, updateCSS };
|
|
44
|
+
export { findCSSNode, insertCSS, removeCSS, updateCSS, updateCSSByStyle };
|
package/utils/index.js
CHANGED
|
@@ -13,7 +13,7 @@ export { getBasename, getExtname } from './path.js';
|
|
|
13
13
|
export { uniqid, uuid } from './string.js';
|
|
14
14
|
export { Scope, addNullablePlaceholder, createMergedExpose, defineTemplate } from './vue.js';
|
|
15
15
|
export { note, noteOnce, resetWarned, warning, warningOnce } from './warning.js';
|
|
16
|
-
export { findCSSNode, insertCSS, removeCSS, updateCSS } from './dynamicCSS.js';
|
|
16
|
+
export { findCSSNode, insertCSS, removeCSS, updateCSS, updateCSSByStyle } from './dynamicCSS.js';
|
|
17
17
|
export { sleep } from './sleep.js';
|
|
18
18
|
export { arrayToTree, extraTreeToTable, mapTree, mapTreeExtra, walkAncestor, walkTree, walkTreeNode } from './tree.js';
|
|
19
19
|
export { warningConfirm } from './message-box.js';
|