Spaces:
Running
Running
File size: 514 Bytes
f42b4a1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
"use client"
import { create } from "zustand"
import { ClapProject } from "@/lib/clap/types"
import { newClap } from "@/lib/clap/newClap"
export type LatentEngineStore = {
clap: ClapProject
loaded: boolean
load: (clap: ClapProject) => void
}
export const useLatentEngine = create<LatentEngineStore>((set, get) => ({
clap: newClap(),
loaded: false,
// TODO: add a loader for either a Clap or a LatentScript
load: (clap: ClapProject) => {
set({
clap,
loaded: true
})
},
}))
|