mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(ui): organise files
This commit is contained in:
parent
e0cde3815a
commit
27657f8b7a
@ -1,6 +1,6 @@
|
||||
import { enqueueRequested } from 'app/store/actions';
|
||||
import type { AppStartListening } from 'app/store/middleware/listenerMiddleware';
|
||||
import { getNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import { getNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { stagingAreaCanceledStaging, stagingAreaStartedStaging } from 'features/controlLayers/store/canvasV2Slice';
|
||||
import { prepareLinearUIBatch } from 'features/nodes/util/graph/buildLinearBatchConfig';
|
||||
import { buildSD1Graph } from 'features/nodes/util/graph/generation/buildSD1Graph';
|
||||
|
@ -3,7 +3,7 @@ import { logger } from 'app/logging/logger';
|
||||
import { $isDebugging } from 'app/store/nanostores/isDebugging';
|
||||
import { useAppStore } from 'app/store/storeHooks';
|
||||
import { HeadsUpDisplay } from 'features/controlLayers/components/HeadsUpDisplay';
|
||||
import { KonvaNodeManager, setNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import { KonvaNodeManager, setNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import Konva from 'konva';
|
||||
import { memo, useCallback, useEffect, useLayoutEffect, useState } from 'react';
|
||||
import { useDevicePixelRatio } from 'use-device-pixel-ratio';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { getArbitraryBaseColor } from '@invoke-ai/ui-library';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import Konva from 'konva';
|
||||
|
||||
const baseGridLineColor = getArbitraryBaseColor(27);
|
@ -1,10 +1,10 @@
|
||||
import { roundToMultiple, roundToMultipleMin } from 'common/util/roundDownToMultiple';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import {
|
||||
PREVIEW_GENERATION_BBOX_DUMMY_RECT,
|
||||
PREVIEW_GENERATION_BBOX_GROUP,
|
||||
PREVIEW_GENERATION_BBOX_TRANSFORMER,
|
||||
} from 'features/controlLayers/konva/naming';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import Konva from 'konva';
|
||||
import type { IRect } from 'konva/lib/types';
|
||||
import { atom } from 'nanostores';
|
@ -1,6 +1,6 @@
|
||||
import { getArbitraryBaseColor } from '@invoke-ai/ui-library';
|
||||
import { DOCUMENT_FIT_PADDING_PX } from 'features/controlLayers/konva/constants';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import Konva from 'konva';
|
||||
|
||||
export class CanvasDocumentSizeOverlay {
|
@ -1,7 +1,7 @@
|
||||
import { rgbColorToString } from 'common/util/colorCodeTransformers';
|
||||
import { getNodeBboxFast } from 'features/controlLayers/konva/entityBbox';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { getObjectGroupId,INPAINT_MASK_LAYER_ID } from 'features/controlLayers/konva/naming';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import { KonvaBrushLine, KonvaEraserLine, KonvaRect } from 'features/controlLayers/konva/objects';
|
||||
import { mapId } from 'features/controlLayers/konva/util';
|
||||
import { type InpaintMaskEntity, isDrawingTool } from 'features/controlLayers/store/types';
|
@ -1,5 +1,5 @@
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { getObjectGroupId } from 'features/controlLayers/konva/naming';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import { KonvaBrushLine, KonvaEraserLine, KonvaImage, KonvaRect } from 'features/controlLayers/konva/objects';
|
||||
import { mapId } from 'features/controlLayers/konva/util';
|
||||
import { isDrawingTool, type LayerEntity } from 'features/controlLayers/store/types';
|
@ -1,9 +1,9 @@
|
||||
import Konva from 'konva';
|
||||
|
||||
import type { CanvasBbox } from './bbox';
|
||||
import type { CanvasDocumentSizeOverlay } from './documentSizeOverlay';
|
||||
import type { CanvasStagingArea } from './stagingArea';
|
||||
import type { CanvasTool } from './tool';
|
||||
import type { CanvasBbox } from './CanvasBbox';
|
||||
import type { CanvasDocumentSizeOverlay } from './CanvasDocumentSizeOverlay';
|
||||
import type { CanvasStagingArea } from './CanvasStagingArea';
|
||||
import type { CanvasTool } from './CanvasTool';
|
||||
|
||||
export class CanvasPreview {
|
||||
layer: Konva.Layer;
|
@ -1,7 +1,7 @@
|
||||
import { rgbColorToString } from 'common/util/colorCodeTransformers';
|
||||
import { getObjectGroupId } from 'features/controlLayers/konva/naming';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import { getNodeBboxFast } from 'features/controlLayers/konva/entityBbox';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { getObjectGroupId } from 'features/controlLayers/konva/naming';
|
||||
import { KonvaBrushLine, KonvaEraserLine, KonvaRect } from 'features/controlLayers/konva/objects';
|
||||
import { mapId } from 'features/controlLayers/konva/util';
|
||||
import { isDrawingTool, type RegionEntity } from 'features/controlLayers/store/types';
|
@ -1,4 +1,4 @@
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { KonvaImage, KonvaProgressImage } from 'features/controlLayers/konva/objects';
|
||||
import Konva from 'konva';
|
||||
import type { ImageDTO } from 'services/api/types';
|
@ -4,8 +4,8 @@ import {
|
||||
BRUSH_BORDER_OUTER_COLOR,
|
||||
BRUSH_ERASER_BORDER_WIDTH,
|
||||
} from 'features/controlLayers/konva/constants';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { PREVIEW_RECT_ID } from 'features/controlLayers/konva/naming';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import Konva from 'konva';
|
||||
|
||||
export class CanvasTool {
|
@ -1,10 +1,6 @@
|
||||
import type { Store } from '@reduxjs/toolkit';
|
||||
import type { RootState } from 'app/store/store';
|
||||
import { getImageDataTransparency } from 'common/util/arrayBuffer';
|
||||
import { CanvasBackground } from 'features/controlLayers/konva/background';
|
||||
import { setStageEventHandlers } from 'features/controlLayers/konva/events';
|
||||
import { CanvasPreview } from 'features/controlLayers/konva/preview';
|
||||
import { konvaNodeToBlob, konvaNodeToImageData, previewBlob } from 'features/controlLayers/konva/util';
|
||||
import { $lastProgressEvent, $shouldShowStagedImage } from 'features/controlLayers/store/canvasV2Slice';
|
||||
import type { CanvasV2State, GenerationMode, Rect } from 'features/controlLayers/store/types';
|
||||
import { isValidLayer } from 'features/nodes/util/graph/generation/addLayers';
|
||||
@ -14,15 +10,19 @@ import { getImageDTO as defaultGetImageDTO, uploadImage as defaultUploadImage }
|
||||
import type { ImageCategory, ImageDTO } from 'services/api/types';
|
||||
import { assert } from 'tsafe';
|
||||
|
||||
import { CanvasBbox } from './bbox';
|
||||
import { CanvasControlAdapter } from './controlAdapters';
|
||||
import { CanvasDocumentSizeOverlay } from './documentSizeOverlay';
|
||||
import { CanvasInpaintMask } from './inpaintMask';
|
||||
import { CanvasLayer } from './layers';
|
||||
import { CanvasRegion } from './regions';
|
||||
import { CanvasStagingArea } from './stagingArea';
|
||||
import { StateApi } from './stateApi';
|
||||
import { CanvasTool } from './tool';
|
||||
import { CanvasBackground } from './CanvasBackground';
|
||||
import { CanvasBbox } from './CanvasBbox';
|
||||
import { CanvasControlAdapter } from './CanvasControlAdapter';
|
||||
import { CanvasDocumentSizeOverlay } from './CanvasDocumentSizeOverlay';
|
||||
import { CanvasInpaintMask } from './CanvasInpaintMask';
|
||||
import { CanvasLayer } from './CanvasLayer';
|
||||
import { CanvasPreview } from './CanvasPreview';
|
||||
import { CanvasRegion } from './CanvasRegion';
|
||||
import { CanvasStagingArea } from './CanvasStagingArea';
|
||||
import { CanvasTool } from './CanvasTool';
|
||||
import { setStageEventHandlers } from './events';
|
||||
import { StateApi } from './StateApi';
|
||||
import { konvaNodeToBlob, konvaNodeToImageData, previewBlob } from './util';
|
||||
|
||||
type Util = {
|
||||
getImageDTO: (imageName: string) => Promise<ImageDTO | null>;
|
@ -1,4 +1,4 @@
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { getScaledCursorPosition } from 'features/controlLayers/konva/util';
|
||||
import type { CanvasEntity } from 'features/controlLayers/store/types';
|
||||
import type Konva from 'konva';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import type { CanvasV2State, Size } from 'features/controlLayers/store/types';
|
||||
import type { Graph } from 'features/nodes/util/graph/generation/Graph';
|
||||
import { isEqual, pick } from 'lodash-es';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import type { CanvasV2State, Size } from 'features/controlLayers/store/types';
|
||||
import type { Graph } from 'features/nodes/util/graph/generation/Graph';
|
||||
import type { ParameterPrecision } from 'features/parameters/types/parameterSchemas';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import type { CanvasV2State, Size } from 'features/controlLayers/store/types';
|
||||
import type { Graph } from 'features/nodes/util/graph/generation/Graph';
|
||||
import { getInfill } from 'features/nodes/util/graph/graphBuilderUtils';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { deepClone } from 'common/util/deepClone';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import type { IPAdapterEntity, Rect, RegionEntity } from 'features/controlLayers/store/types';
|
||||
import {
|
||||
PROMPT_REGION_INVERT_TENSOR_MASK_PREFIX,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { fetchModelConfigWithTypeGuard } from 'features/metadata/util/modelFetchingHelpers';
|
||||
import {
|
||||
LATENTS_TO_IMAGE,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { fetchModelConfigWithTypeGuard } from 'features/metadata/util/modelFetchingHelpers';
|
||||
import {
|
||||
CANVAS_OUTPUT,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { fetchModelConfigWithTypeGuard } from 'features/metadata/util/modelFetchingHelpers';
|
||||
import {
|
||||
CANVAS_OUTPUT,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { RootState } from 'app/store/store';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/nodeManager';
|
||||
import type { KonvaNodeManager } from 'features/controlLayers/konva/KonvaNodeManager';
|
||||
import { fetchModelConfigWithTypeGuard } from 'features/metadata/util/modelFetchingHelpers';
|
||||
import {
|
||||
CLIP_SKIP,
|
||||
|
Loading…
Reference in New Issue
Block a user