zova-ui-vuetify 5.0.136 → 5.0.138
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/package.json +5 -5
- package/src/suite/a-demo/modules/a-demo/src/bean/theme.orange.ts +3 -6
- package/src/suite/a-home/modules/home-theme/src/bean/theme.default.ts +3 -6
- package/src/suite-vendor/a-vuetify/modules/a-vuetify/src/bean/tool.themeHandler.ts +12 -0
- package/src/suite-vendor/a-vuetify/modules/a-vuetify/src/resource/beans.ts +5 -1
- package/src/suite-vendor/a-vuetify/modules/a-vuetify/src/types.ts +4 -0
- package/src/suite-vendor/a-vuetify/modules/a-vuetify/src/bean/.gitkeep +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-ui-vuetify",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.138",
|
|
4
4
|
"description": "A vue3 vuetify framework with ioc",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vue-router": "^4.3.3",
|
|
38
38
|
"vuetify": "^3.6.9",
|
|
39
39
|
"zod": "^3.23.8",
|
|
40
|
-
"zova": "^5.0.
|
|
40
|
+
"zova": "^5.0.95"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@cabloy/lint": "^4.0.10",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
46
46
|
"sass": "^1.77.5",
|
|
47
47
|
"typescript": "^5.4.5",
|
|
48
|
-
"vite": "^5.
|
|
48
|
+
"vite": "^5.3.0",
|
|
49
49
|
"vite-plugin-vuetify": "^2.0.3",
|
|
50
50
|
"vue-tsc": "^2.0.21",
|
|
51
|
-
"zova-vite": "^1.0.
|
|
51
|
+
"zova-vite": "^1.0.101"
|
|
52
52
|
},
|
|
53
53
|
"license": "MIT",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "66609919a02dea2e2e6818412225d719223ae290"
|
|
55
55
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BeanBase,
|
|
1
|
+
import { BeanBase, Theme } from 'zova';
|
|
2
2
|
import { ScopeModule } from '../resource/this.js';
|
|
3
3
|
import { ThemeApplyParams, ThemeApplyResult, ThemeBase } from 'zova-module-a-style';
|
|
4
4
|
import { ThemeToken } from 'zova-module-a-vuetify';
|
|
@@ -81,12 +81,9 @@ const themeDark = {
|
|
|
81
81
|
|
|
82
82
|
@Theme()
|
|
83
83
|
export class ThemeOrange extends BeanBase<ScopeModule> implements ThemeBase {
|
|
84
|
-
async apply({ name, dark }: ThemeApplyParams): Promise<ThemeApplyResult> {
|
|
84
|
+
async apply({ name: _name, dark }: ThemeApplyParams): Promise<ThemeApplyResult> {
|
|
85
85
|
// token
|
|
86
86
|
const token: ThemeToken = dark ? themeDark : themeLight;
|
|
87
|
-
|
|
88
|
-
Cast(this.$vuetify.theme.global).name = name;
|
|
89
|
-
Cast(this.$vuetify.theme.themes)[name] = token;
|
|
90
|
-
return { token };
|
|
87
|
+
return { token, handler: 'a-vuetify.tool.themeHandler' };
|
|
91
88
|
}
|
|
92
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BeanBase,
|
|
1
|
+
import { BeanBase, Theme } from 'zova';
|
|
2
2
|
import { ScopeModule } from '../resource/this.js';
|
|
3
3
|
import { ThemeApplyParams, ThemeApplyResult, ThemeBase } from 'zova-module-a-style';
|
|
4
4
|
import { ThemeToken } from 'zova-module-a-vuetify';
|
|
@@ -81,12 +81,9 @@ const themeDark = {
|
|
|
81
81
|
|
|
82
82
|
@Theme()
|
|
83
83
|
export class ThemeDefault extends BeanBase<ScopeModule> implements ThemeBase {
|
|
84
|
-
async apply({ name, dark }: ThemeApplyParams): Promise<ThemeApplyResult> {
|
|
84
|
+
async apply({ name: _name, dark }: ThemeApplyParams): Promise<ThemeApplyResult> {
|
|
85
85
|
// token
|
|
86
86
|
const token: ThemeToken = dark ? themeDark : themeLight;
|
|
87
|
-
|
|
88
|
-
Cast(this.$vuetify.theme.global).name = name;
|
|
89
|
-
Cast(this.$vuetify.theme.themes)[name] = token;
|
|
90
|
-
return { token };
|
|
87
|
+
return { token, handler: 'a-vuetify.tool.themeHandler' };
|
|
91
88
|
}
|
|
92
89
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BeanBase, Cast, Tool } from 'zova';
|
|
2
|
+
import { ScopeModule } from '../resource/this.js';
|
|
3
|
+
import { ThemeHandler, ThemeHandlerApplyParams } from 'zova-module-a-style';
|
|
4
|
+
|
|
5
|
+
@Tool()
|
|
6
|
+
export class ToolThemeHandler extends BeanBase<ScopeModule> implements ThemeHandler {
|
|
7
|
+
async apply({ name, token }: ThemeHandlerApplyParams): Promise<void> {
|
|
8
|
+
// theme
|
|
9
|
+
Cast(this.$vuetify.theme.global).name = name;
|
|
10
|
+
Cast(this.$vuetify.theme.themes)[name] = token;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
export * from '../bean/tool.themeHandler.js';
|
|
2
|
+
import { ToolThemeHandler } from '../bean/tool.themeHandler.js';
|
|
1
3
|
import 'zova';
|
|
2
4
|
declare module 'zova' {
|
|
3
|
-
export interface IBeanRecord {
|
|
5
|
+
export interface IBeanRecord {
|
|
6
|
+
'a-vuetify.tool.themeHandler': ToolThemeHandler;
|
|
7
|
+
}
|
|
4
8
|
}
|
|
File without changes
|