- Add actions-ai-evaluation, actions-analytics, actions-attachments, actions-calendar, actions-comments, actions-formative, actions-questions, actions-review, actions-substitutes - Add corresponding data-access layers for each new action module - Add calendar-view, curriculum-map-view, version-diff-viewer components - Add editor-slice, selection-slice, version-slice hooks for state management - Add document-diff and scope-check lib utilities - Add default-question-service and external-questions-bridge services
18 lines
408 B
TypeScript
18 lines
408 B
TypeScript
import type { StateCreator } from "zustand";
|
|
import type { EditorState } from "./use-lesson-plan-editor";
|
|
|
|
export interface SelectionSlice {
|
|
selectedNodeId: string | null;
|
|
selectNode: (id: string | null) => void;
|
|
}
|
|
|
|
export const createSelectionSlice: StateCreator<
|
|
EditorState,
|
|
[],
|
|
[],
|
|
SelectionSlice
|
|
> = (set) => ({
|
|
selectedNodeId: null,
|
|
selectNode: (id) => set({ selectedNodeId: id }),
|
|
});
|