@tuya-sat/sdf-main-sdk 0.3.3 → 0.4.0-alpha.2

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,7 +1,7 @@
1
1
  {
2
2
  "main.css": "auto/main.css",
3
3
  "main.js": "auto/main.bundle.js",
4
- "131.638b9bb0.chunk.js": "auto/131.638b9bb0.chunk.js",
4
+ "131.ccc388ad.chunk.js": "auto/131.ccc388ad.chunk.js",
5
5
  "static/img/reLogin.png": "auto/static/img/294142da390c5af23324.png",
6
6
  "static/img/emptyPage.png": "auto/static/img/daa00e3565343b2c9c18.png",
7
7
  "static/img/expira.png": "auto/static/img/ddf3e1f8ec8350445a4a.png",
@@ -9,5 +9,5 @@
9
9
  "zh.json": "auto/zh.json",
10
10
  "main.css.map": "auto/main.css.map",
11
11
  "main.bundle.js.map": "auto/main.bundle.js.map",
12
- "131.638b9bb0.chunk.js.map": "auto/131.638b9bb0.chunk.js.map"
12
+ "131.ccc388ad.chunk.js.map": "auto/131.ccc388ad.chunk.js.map"
13
13
  }
@@ -1,6 +1,13 @@
1
1
  import type { MenuType } from 'src/components/BLayout/components/Menu';
2
2
  export declare const LIGHT = "light";
3
3
  export declare const DARK = "dark";
4
+ export declare const getAntd5ThemeConfig: () => {
5
+ themeMode: Theme;
6
+ token: {
7
+ colorPrimary: string;
8
+ colorBgBase: string;
9
+ };
10
+ };
4
11
  export type Theme = typeof LIGHT | typeof DARK;
5
12
  export interface ColorConfig {
6
13
  menuBg?: string;
@@ -1,4 +1,7 @@
1
1
  import type { Theme } from './base';
2
+ export declare function getRenderCssVariable(theme: Theme): {
3
+ primaryColor: string;
4
+ };
2
5
  declare function changeTheme(theme: Theme): void;
3
6
  declare function useTheme(): {
4
7
  theme: Theme;
@@ -1,8 +1,21 @@
1
- import type { Theme } from './base';
1
+ import { getAntd5ThemeConfig } from './base';
2
+ type Antd5ThemeConfig = ReturnType<typeof getAntd5ThemeConfig>;
2
3
  declare const THEME_TYPE = "CHANGE THEME";
3
4
  export declare const themeSubscribe: {
4
- subscribe: (cb: (type: typeof THEME_TYPE, value: Theme) => void, callImmediately: boolean) => () => void;
5
- getValue: () => Theme;
6
- publish: (value: Theme) => void;
5
+ subscribe: (cb: (type: typeof THEME_TYPE, value: Antd5ThemeConfig) => void, callImmediately: boolean) => () => void;
6
+ getValue: () => {
7
+ themeMode: import("./base").Theme;
8
+ token: {
9
+ colorPrimary: string;
10
+ colorBgBase: string;
11
+ };
12
+ };
13
+ publish: (value: {
14
+ themeMode: import("./base").Theme;
15
+ token: {
16
+ colorPrimary: string;
17
+ colorBgBase: string;
18
+ };
19
+ }) => void;
7
20
  };
8
21
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/sdf-main-sdk",
3
- "version": "0.3.3",
3
+ "version": "0.4.0-alpha.2",
4
4
  "main": "./dist/main.bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",