Skip to content

Commit edd34a9

Browse files
author
Attila Cseh
committed
UI build errors fixed
1 parent e593318 commit edd34a9

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,
@@ -107,8 +108,6 @@ import {
107108
initialT2IAdapter,
108109
makeDefaultRasterLayerAdjustments,
109110
} from './util';
110-
import { assert } from 'tsafe';
111-
import { Canvas } from 'konva/lib/Canvas';
112111

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

@@ -146,14 +145,14 @@ const getInitialCanvasesState = (): CanvasesStateWithoutHistory => {
146145
selectedCanvasId: canvasId,
147146
canvases: [canvas],
148147
};
149-
}
148+
};
150149

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

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

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

20452044
state = {
20462045
_version: 4,
20472046
selectedCanvasId: canvas.id,
2048-
canvases: [ canvas ]
2047+
canvases: [canvas],
20492048
};
20502049
}
20512050
return zCanvasesStateWithoutHistory.parse(state);
2052-
}
2051+
},
20532052
},
20542053
};
20552054

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ const zCanvasState = z.object({
824824
});
825825
export type CanvasState = z.infer<typeof zCanvasState>;
826826
const zCanvasStateWithHistory = zStateWithHistory(zCanvasState);
827-
export const zCanvasesState = <T extends z.ZodTypeAny>(canvasStateSchema: T) =>
827+
const zCanvasesState = <T extends z.ZodTypeAny>(canvasStateSchema: T) =>
828828
z.object({
829829
_version: z.literal(4),
830830
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)