Skip to content

Commit 922d656

Browse files
author
Attila Cseh
committed
UI build errors fixed
1 parent 251a668 commit 922d656

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

invokeai/frontend/web/src/features/controlLayers/store/canvasSlice.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type { SliceConfig } from 'app/store/types';
44
import { moveOneToEnd, moveOneToStart, moveToEnd, moveToStart } from 'common/util/arrayUtils';
55
import { deepClone } from 'common/util/deepClone';
66
import { roundDownToMultiple, roundToMultiple } from 'common/util/roundDownToMultiple';
7+
import { isPlainObject } from 'es-toolkit';
78
import { merge } from 'es-toolkit/compat';
8-
import { isPlainObject, omit } from 'es-toolkit';
99
import { getPrefixedId } from 'features/controlLayers/konva/util';
1010
import { canvasReset } from 'features/controlLayers/store/actions';
1111
import { modelChanged } from 'features/controlLayers/store/paramsSlice';
@@ -54,6 +54,7 @@ import {
5454
isIPAdapterModelConfig,
5555
type T2IAdapterModelConfig,
5656
} from 'services/api/types';
57+
import { assert } from 'tsafe';
5758

5859
import type {
5960
AspectRatioID,
@@ -106,8 +107,6 @@ import {
106107
initialT2IAdapter,
107108
makeDefaultRasterLayerAdjustments,
108109
} from './util';
109-
import { assert } from 'tsafe';
110-
import { Canvas } from 'konva/lib/Canvas';
111110

112111
type CanvasDeletedPayloadAction = PayloadAction<{ id: string }>;
113112

@@ -145,14 +144,14 @@ const getInitialCanvasesState = (): CanvasesStateWithoutHistory => {
145144
selectedCanvasId: canvasId,
146145
canvases: [canvas],
147146
};
148-
}
147+
};
149148

150149
const getInitialCanvasesHistoryState = (): CanvasesStateWithHistory => {
151150
const state = getInitialCanvasesState();
152151

153152
return {
154153
...state,
155-
canvases: state.canvases.map((canvas) => newHistory([], canvas, []))
154+
canvases: state.canvases.map((canvas) => newHistory([], canvas, [])),
156155
};
157156
};
158157

@@ -2038,17 +2037,17 @@ export const canvasSliceConfig: SliceConfig<typeof slice, CanvasesStateWithHisto
20382037
const canvas = {
20392038
id: canvasId,
20402039
name: canvasName,
2041-
...state
2040+
...state,
20422041
} as CanvasState;
20432042

20442043
state = {
20452044
_version: 4,
20462045
selectedCanvasId: canvas.id,
2047-
canvases: [ canvas ]
2046+
canvases: [canvas],
20482047
};
20492048
}
20502049
return zCanvasesStateWithoutHistory.parse(state);
2051-
}
2050+
},
20522051
},
20532052
};
20542053

invokeai/frontend/web/src/features/controlLayers/store/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ const zCanvasState = z.object({
758758
});
759759
export type CanvasState = z.infer<typeof zCanvasState>;
760760
const zCanvasStateWithHistory = zStateWithHistory(zCanvasState);
761-
export const zCanvasesState = <T extends z.ZodTypeAny>(canvasStateSchema: T) =>
761+
const zCanvasesState = <T extends z.ZodTypeAny>(canvasStateSchema: T) =>
762762
z.object({
763763
_version: z.literal(4),
764764
selectedCanvasId: zId,

invokeai/frontend/web/src/features/ui/layouts/CanvasTabEditableTitle.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ export const CanvasTabEditableTitle = memo(({ id, name, isSelected }: CanvasTabE
1717
const isHovering = useBoolean(false);
1818
const inputRef = useRef<HTMLInputElement>(null);
1919

20-
const onChange = useCallback((value: string) => {
21-
dispatch(canvasNameChanged({ id, name: value }));
22-
}, [dispatch, id]);
20+
const onChange = useCallback(
21+
(value: string) => {
22+
dispatch(canvasNameChanged({ id, name: value }));
23+
},
24+
[dispatch, id]
25+
);
2326

2427
const editable = useEditable({
2528
value: name,

0 commit comments

Comments
 (0)