mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): ux improvements & redesign
This is a squash merge of a bajillion messy small commits created while iterating on the UI component library and redesign.
This commit is contained in:
committed by
Kent Keirsey
parent
a47d91f0e7
commit
f0b102d830
@ -1,4 +1,4 @@
|
||||
import { Vector2d } from 'konva/lib/types';
|
||||
import type { Vector2d } from 'konva/lib/types';
|
||||
|
||||
const calculateCoordinates = (
|
||||
containerWidth: number,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { RgbaColor, RgbColor } from 'react-colorful';
|
||||
import type { RgbaColor, RgbColor } from 'react-colorful';
|
||||
|
||||
export const rgbaColorToString = (color: RgbaColor): string => {
|
||||
const { r, g, b, a } = color;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CanvasMaskLine } from 'features/canvas/store/canvasTypes';
|
||||
import type { CanvasMaskLine } from 'features/canvas/store/canvasTypes';
|
||||
import Konva from 'konva';
|
||||
import { IRect } from 'konva/lib/types';
|
||||
import type { IRect } from 'konva/lib/types';
|
||||
|
||||
/**
|
||||
* Creates a stage from array of mask objects.
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Vector2d } from 'konva/lib/types';
|
||||
import type { Vector2d } from 'konva/lib/types';
|
||||
|
||||
const floorCoordinates = (coord: Vector2d): Vector2d => {
|
||||
return {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { RootState } from 'app/store/store';
|
||||
import type { RootState } from 'app/store/store';
|
||||
|
||||
import { getCanvasBaseLayer } from './konvaInstanceProvider';
|
||||
import { konvaNodeToBlob } from './konvaNodeToBlob';
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { logger } from 'app/logging/logger';
|
||||
import { Vector2d } from 'konva/lib/types';
|
||||
import {
|
||||
import type {
|
||||
CanvasLayerState,
|
||||
Dimensions,
|
||||
isCanvasMaskLine,
|
||||
} from 'features/canvas/store/canvasTypes';
|
||||
import { isCanvasMaskLine } from 'features/canvas/store/canvasTypes';
|
||||
import type { Vector2d } from 'konva/lib/types';
|
||||
|
||||
import createMaskStage from './createMaskStage';
|
||||
import { getCanvasBaseLayer, getCanvasStage } from './konvaInstanceProvider';
|
||||
import { konvaNodeToBlob } from './konvaNodeToBlob';
|
||||
|
@ -2,7 +2,7 @@ import {
|
||||
areAnyPixelsBlack,
|
||||
getImageDataTransparency,
|
||||
} from 'common/util/arrayBuffer';
|
||||
import { GenerationMode } from 'features/canvas/store/canvasTypes';
|
||||
import type { GenerationMode } from 'features/canvas/store/canvasTypes';
|
||||
|
||||
export const getCanvasGenerationMode = (
|
||||
baseImageData: ImageData,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { roundToMultiple } from 'common/util/roundDownToMultiple';
|
||||
import { Dimensions } from 'features/canvas/store/canvasTypes';
|
||||
import type { Dimensions } from 'features/canvas/store/canvasTypes';
|
||||
|
||||
const getScaledBoundingBoxDimensions = (dimensions: Dimensions) => {
|
||||
const { width, height } = dimensions;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Stage } from 'konva/lib/Stage';
|
||||
import type { Stage } from 'konva/lib/Stage';
|
||||
|
||||
const getScaledCursorPosition = (stage: Stage) => {
|
||||
const pointerPosition = stage.getPointerPosition();
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Konva from 'konva';
|
||||
import type Konva from 'konva';
|
||||
|
||||
let canvasBaseLayer: Konva.Layer | null = null;
|
||||
let canvasStage: Konva.Stage | null = null;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Konva from 'konva';
|
||||
import { IRect } from 'konva/lib/types';
|
||||
import type Konva from 'konva';
|
||||
import type { IRect } from 'konva/lib/types';
|
||||
|
||||
import { canvasToBlob } from './canvasToBlob';
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Konva from 'konva';
|
||||
import { IRect } from 'konva/lib/types';
|
||||
import type Konva from 'konva';
|
||||
import type { IRect } from 'konva/lib/types';
|
||||
|
||||
import { dataURLToImageData } from './dataURLToImageData';
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { roundToMultiple } from 'common/util/roundDownToMultiple';
|
||||
import { Dimensions } from 'features/canvas/store/canvasTypes';
|
||||
import type { Dimensions } from 'features/canvas/store/canvasTypes';
|
||||
|
||||
const roundDimensionsTo64 = (dimensions: Dimensions): Dimensions => {
|
||||
return {
|
||||
|
Reference in New Issue
Block a user