zova-suite-a-devui 5.0.22 → 5.0.24
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-devui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.24",
|
|
4
4
|
"title": "a-devui",
|
|
5
5
|
"zovaModule": {
|
|
6
6
|
"capabilities": {
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"scripts": {},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "82b2bc7d0826a0e8619a318de31e078fcaf47825"
|
|
35
35
|
}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BeanSimple, IMonkeyAppInitialize } from 'zova';
|
|
2
2
|
import { ScopeModuleAStyle } from 'zova-module-a-style';
|
|
3
|
-
import { LocalSSR } from './bean/local.ssr.js';
|
|
4
3
|
|
|
5
|
-
export class Monkey extends BeanSimple implements
|
|
4
|
+
export class Monkey extends BeanSimple implements IMonkeyAppInitialize {
|
|
6
5
|
async appInitialize() {
|
|
7
6
|
// defaultThemeHandler
|
|
8
7
|
const scopeStyle: ScopeModuleAStyle = await this.bean.getScope('a-style');
|
|
9
8
|
scopeStyle.config.defaultThemeHandler = 'a-devui.tool.themeHandler';
|
|
10
|
-
// ssr
|
|
11
|
-
const localSSR = await this.bean._newBean(LocalSSR, false);
|
|
12
|
-
await localSSR.initialize();
|
|
13
9
|
}
|
|
14
|
-
async appInitialized() {}
|
|
15
|
-
async appReady() {}
|
|
16
|
-
async beanInit(_bean: BeanContainer, _beanInstance: BeanBase) {}
|
|
17
|
-
async beanInited(_bean: BeanContainer, _beanInstance: BeanBase) {}
|
|
18
|
-
beanDispose(_bean: BeanContainer, _beanInstance: BeanBase) {}
|
|
19
|
-
beanDisposed(_bean: BeanContainer, _beanInstance: BeanBase) {}
|
|
20
10
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-suite-a-devui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.24",
|
|
4
4
|
"title": "a-devui",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "devui",
|
|
7
7
|
"author": "zhennann",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"zova-module-a-devui": "^5.0.
|
|
9
|
+
"zova-module-a-devui": "^5.0.24"
|
|
10
10
|
},
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "82b2bc7d0826a0e8619a318de31e078fcaf47825"
|
|
12
12
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BeanBase, Local } from 'zova';
|
|
2
|
-
import { ScopeModule } from '../.metadata/this.js';
|
|
3
|
-
|
|
4
|
-
@Local()
|
|
5
|
-
export class LocalSSR extends BeanBase<ScopeModule> {
|
|
6
|
-
public async initialize() {
|
|
7
|
-
// ssr hydrated
|
|
8
|
-
if (process.env.CLIENT) {
|
|
9
|
-
this.ctx.meta.ssr.onHydrated(() => {
|
|
10
|
-
// do something
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
// ssr theme
|
|
14
|
-
if (process.env.SERVER) {
|
|
15
|
-
this.ctx.meta.ssr.context.onRendered(() => {
|
|
16
|
-
if (!this.app.config.ssr.cookieThemeDark) {
|
|
17
|
-
this.ctx.meta.ssr.context._meta.bodyTags += `<script id="__prefersColorSchemeDarkJS">
|
|
18
|
-
document.body.setAttribute('data-theme', window.ssr_themedark_data);
|
|
19
|
-
document.querySelector('#__prefersColorSchemeDarkJS').remove();
|
|
20
|
-
</script>`.replaceAll('\n', '');
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|