History panel + undo in the editor (#49) (#63)
Build image / build-and-push (push) Successful in 9s

Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #63.
This commit is contained in:
2026-07-21 05:23:25 +00:00
committed by steve
parent 3ec77a1099
commit 2a8fe24766
9 changed files with 725 additions and 41 deletions
+10
View File
@@ -26,6 +26,12 @@ interface EditorState {
focusedObjectId: number | null
setFocusedObject: (id: number | null) => void
// Which rail tab is showing, or null when the rail is closed. Selecting an
// object switches this to 'inspector' (see GardenEditorPage), so editing never
// starts with a click on the rail itself.
railTab: string | null
setRailTab: (tab: string | null) => void
// The plant armed for placing plops (set after the PlantPicker choice); stays
// armed for repeat-placement until cleared (Escape / done). null = not placing.
armedPlant: Plant | null
@@ -70,6 +76,9 @@ export const useEditorStore = create<EditorState>((set) => ({
focusedObjectId: null,
setFocusedObject: (id) => set({ focusedObjectId: id }),
railTab: null,
setRailTab: (tab) => set({ railTab: tab }),
armedPlant: null,
setArmedPlant: (p) => set({ armedPlant: p }),
@@ -94,5 +103,6 @@ export const useEditorStore = create<EditorState>((set) => ({
armedKind: null,
liveObject: null,
livePlanting: null,
railTab: null,
}),
}))