2025-11-23 10:55:04 +08:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import { create } from "zustand";
|
|
|
|
|
|
|
|
|
|
interface PageLayoutState {
|
|
|
|
|
showInspector: boolean;
|
|
|
|
|
toggleInspector: () => void;
|
|
|
|
|
setInspector: (visible: boolean) => void;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const usePageLayoutStore = create<PageLayoutState>((set) => ({
|
2025-11-23 17:22:35 +08:00
|
|
|
showInspector: false,
|
2025-11-23 10:55:04 +08:00
|
|
|
toggleInspector: () =>
|
|
|
|
|
set((state) => ({
|
|
|
|
|
showInspector: !state.showInspector,
|
|
|
|
|
})),
|
|
|
|
|
setInspector: (visible) => set({ showInspector: visible }),
|
|
|
|
|
}));
|