@minto-ai/tools 1.0.52 → 1.0.55
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/dist/index.d.ts +1 -0
- package/dist/index.js +2922 -495
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/use-theme.d.ts +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-theme';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 主题类型定义
|
|
4
|
+
*/
|
|
5
|
+
export type Theme = 'light' | 'dark';
|
|
6
|
+
/**
|
|
7
|
+
* 主题切换 Hook
|
|
8
|
+
* @returns {object} 主题相关的方法和状态
|
|
9
|
+
*/
|
|
10
|
+
export declare function useTheme(): {
|
|
11
|
+
theme: Ref<Theme>;
|
|
12
|
+
isDark: ComputedRef<boolean>;
|
|
13
|
+
isLight: ComputedRef<boolean>;
|
|
14
|
+
setTheme: (theme?: Theme) => void;
|
|
15
|
+
getTheme: () => Theme;
|
|
16
|
+
setLight: () => void;
|
|
17
|
+
setDark: () => void;
|
|
18
|
+
toggleTheme: () => void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 监听系统主题变化
|
|
22
|
+
* @returns {(() => void) | undefined} 清理函数或undefined
|
|
23
|
+
*/
|