From 55a9a712de934e27135af77584d74fef29258098 Mon Sep 17 00:00:00 2001 From: wyuc Date: Sun, 24 May 2026 01:40:03 -0400 Subject: [PATCH] chore(maic-editor): drop the now-dead addElement helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `addElement` was only ever used by the inline image-insert which became `insertImageElement`; text uses `armText` (toggle). PPTElement-typed parameter was already unused after the text refactor — removing the dead helper resolves the lint warning. Co-Authored-By: Claude Opus 4.7 --- components/edit/surfaces/slide/use-slide-surface.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/edit/surfaces/slide/use-slide-surface.ts b/components/edit/surfaces/slide/use-slide-surface.ts index 6cc42a3b9..da9dee546 100644 --- a/components/edit/surfaces/slide/use-slide-surface.ts +++ b/components/edit/surfaces/slide/use-slide-surface.ts @@ -29,8 +29,6 @@ export function buildInsertItems( // branch in useInsertFromCreateSelection adds the element at that rect. creatingType?: string, ): InsertPaletteItem[] { - const addElement = (element: PPTElement) => - useSlideEditSession.getState().applyOp({ type: 'element.add', element }); const armText = () => { const cs = useCanvasStore.getState(); cs.setCreatingElement(creatingType === 'text' ? null : { type: 'text' });