import type { ValueTypeOf } from "@elaraai/east"; import type { PlanPayloadType } from "@elaraai/e3-ui/internal"; import { type ScheduleEditing, type ScheduleEditingArgs, type ScheduleRead } from "../../shared/schedule/editing.js"; export type { ScheduleChange as PlanEventChange, ScheduleKindSession as PlanKindSession, ScheduleEventDraftsValue as PlanEventDraftsValue, ScheduleKindDraftsValue as PlanKindDraftsValue, ScheduleGestureValue as PlanEventGestureValue, } from "../../shared/schedule/editing.js"; type Kind = ValueTypeOf["events"][number]; type Item = Extract, { type: "some"; }>["value"]["item"]; /** The Plan's projected event and its full record row. */ export type PlanEventReadValue = ScheduleRead; /** Shared editing, with the Plan's richer event projection. */ export type PlanEventEditing = ScheduleEditing; /** The Plan's event editing inputs: the shared ones, the rows each kind's cells hold among them (`held`, #1039). */ export interface PlanEventEditingArgs extends Omit, "kinds"> { /** The Plan's event kinds. */ kinds: readonly Kind[]; } /** * Whether an event is locked now (#1541, U9): its kind's `locked`, over the * event as its kind reads it with its drafts in place. A locked event is not * moved, resized, changed or removed. * * @param editing - The event kinds' editing * @param kind - The kind's slot * @param id - The event's key's text * @returns Whether its kind's rule holds it where it is; never for an event the page does not hold, or one whose read fails */ export declare function planEventLocked(editing: PlanEventEditing | undefined, kind: string, id: string): boolean; /** * Adapts the Plan's event projection to the shared record editing history: * each kind's events as Plan draws them. A gesture that changes or removes an * event its kind's `locked` holds where it is records nothing (#1541, U9): * the shared recorder's rule, which every builder's gestures meet, asked of * the row it holds. What draws a locked event says why before it gets there. */ export declare function usePlanEventEditing(args: PlanEventEditingArgs): PlanEventEditing; /** * Removes selected events through their record sessions as one undoable gesture. * Both the inspector and keyboard use the event's original record key. An * event its kind's `locked` holds where it is stays (#1541, U9): the others go, * and those that stayed are what stands selected after. * * @param keys - The selected elements' printed event references * @param editing - The shared event sessions, when the canvas is ready * @param label - A specific history label, when the caller has the event titles * @returns The selection that stands once the removal is recorded: the locked events, which stayed, by their keys; * `undefined` where nothing was removed — every event locked among them — and the selection stands as it was */ export declare function removePlanEvents(keys: readonly string[], editing: PlanEventEditing | undefined, label?: string): readonly string[] | undefined; //# sourceMappingURL=events.d.ts.map