chore: bump version to 0.3.11 — 状态栏扩展点架构

This commit is contained in:
2026-06-23 11:36:46 +08:00
parent b65e34e288
commit f707b5c7ee
11 changed files with 270 additions and 75 deletions
+24
View File
@@ -0,0 +1,24 @@
import { create } from 'zustand'
/**
* 轻量 auto-save 状态 store
*
* 解耦 useAutoSave hook 与状态栏组件——状态栏的 auto-save 项通过
* 本 store 读取状态,无需在 render 函数中重复调用 useAutoSave()。
* useAutoSave hook 负责写入本 store。
*/
interface AutoSaveState {
isAutoSaving: boolean
autoSaveEnabled: boolean
}
interface AutoSaveStore extends AutoSaveState {
setState: (partial: Partial<AutoSaveState>) => void
}
export const useAutoSaveStore = create<AutoSaveStore>((set) => ({
isAutoSaving: false,
autoSaveEnabled: true,
setState: (partial) => set(partial)
}))