@minto-ai/tools 1.0.51 → 1.0.53

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.
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 流式打字机
3
+ * @param speed 打字速度
4
+ */
5
+ declare class TypeWriter {
6
+ private speed;
7
+ private state;
8
+ private onEndCallback;
9
+ private onChangeCallback;
10
+ constructor(speed?: number);
11
+ private processQueue;
12
+ private init;
13
+ append(text: string): void;
14
+ stop(): void;
15
+ onEnd(callback: (text?: string) => void): void;
16
+ onChange(callback: (text?: string) => void): void;
17
+ }
18
+ export default TypeWriter;
@@ -0,0 +1 @@
1
+ export * from './use-theme';
@@ -0,0 +1,24 @@
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
+ */
24
+ export declare function watchSystemTheme(): (() => void) | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@minto-ai/tools",
3
3
  "type": "module",
4
- "version": "1.0.51",
4
+ "version": "1.0.53",
5
5
  "description": "明途公共工具库",
6
6
  "author": "hcc",
7
7
  "license": "ISC",