import { atom } from "jotai"; import { atomWithStorage } from "jotai/utils"; export const customModelsPathAtom = atomWithStorage( "customModelsPath", null, ); export const scaleAtom = atomWithStorage("scale", "4"); export const batchModeAtom = atom(false); /** * The path to the last folder the user saved an image to. * Reset to "" if rememberOutputFolder is false. */ export const savedOutputPathAtom = atomWithStorage( "savedOutputPath", null, ); export const progressAtom = atom(""); export const rememberOutputFolderAtom = atomWithStorage( "rememberOutputFolder", false, ); export const dontShowCloudModalAtom = atomWithStorage( "dontShowCloudModal", false, ); export const noImageProcessingAtom = atomWithStorage( "noImageProcessing", false, ); export const compressionAtom = atomWithStorage("compression", 0); export const overwriteAtom = atomWithStorage("overwrite", false); export const turnOffNotificationsAtom = atomWithStorage( "turnOffNotifications", false, ); export const viewTypeAtom = atomWithStorage<"slider" | "lens">( "viewType", "slider", ); export const lensSizeAtom = atomWithStorage("lensSize", 100); export const customWidthAtom = atomWithStorage("customWidth", 0); export const useCustomWidthAtom = atomWithStorage( "useCustomWidth", false, ); export const tileSizeAtom = atomWithStorage("tileSize", null); // CLIENT SIDE ONLY export const showSidebarAtom = atomWithStorage("showSidebar", true);