diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelsLoaded.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelsLoaded.ts index 587f06720f..42b1cd36b4 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelsLoaded.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/modelsLoaded.ts @@ -6,12 +6,12 @@ import { controlAdapterModelCleared, selectControlAdapterAll, } from 'features/controlAdapters/store/controlAdaptersSlice'; +import { heightChanged, widthChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { loraRemoved } from 'features/lora/store/loraSlice'; import { calculateNewSize } from 'features/parameters/components/ImageSize/calculateNewSize'; import { modelChanged, vaeSelected } from 'features/parameters/store/generationSlice'; import { zParameterModel, zParameterVAEModel } from 'features/parameters/types/parameterSchemas'; import { getIsSizeOptimal, getOptimalDimension } from 'features/parameters/util/optimalDimension'; -import { heightChanged, widthChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { refinerModelChanged } from 'features/sdxl/store/sdxlSlice'; import { forEach } from 'lodash-es'; import type { Logger } from 'roarr'; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/promptChanged.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/promptChanged.ts index db38a0aa2e..06df2e2b92 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/promptChanged.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/promptChanged.ts @@ -1,5 +1,6 @@ import { isAnyOf } from '@reduxjs/toolkit'; import type { AppStartListening } from 'app/store/middleware/listenerMiddleware'; +import { positivePromptChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { combinatorialToggled, isErrorChanged, @@ -10,7 +11,6 @@ import { promptsChanged, } from 'features/dynamicPrompts/store/dynamicPromptsSlice'; import { getShouldProcessPrompt } from 'features/dynamicPrompts/util/getShouldProcessPrompt'; -import { positivePromptChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { utilitiesApi } from 'services/api/endpoints/utilities'; import { socketConnected } from 'services/events/actions'; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/regionalControlToControlAdapterBridge.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/regionalControlToControlAdapterBridge.ts index 6f53159d4b..ae7913594a 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/regionalControlToControlAdapterBridge.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/regionalControlToControlAdapterBridge.ts @@ -11,8 +11,8 @@ import { maskedGuidanceLayerAdded, maskLayerIPAdapterAdded, maskLayerIPAdapterDeleted, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; -import type { Layer } from 'features/regionalPrompts/store/types'; +} from 'features/controlLayers/store/regionalPromptsSlice'; +import type { Layer } from 'features/controlLayers/store/types'; import { modelConfigsAdapterSelectors, modelsApi } from 'services/api/endpoints/models'; import { isControlNetModelConfig, isIPAdapterModelConfig } from 'services/api/types'; import { assert } from 'tsafe'; diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/setDefaultSettings.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/setDefaultSettings.ts index 83fadffb26..0644e40856 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/setDefaultSettings.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/setDefaultSettings.ts @@ -1,4 +1,5 @@ import type { AppStartListening } from 'app/store/middleware/listenerMiddleware'; +import { heightChanged, widthChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { setDefaultSettings } from 'features/parameters/store/actions'; import { setCfgRescaleMultiplier, @@ -18,7 +19,6 @@ import { isParameterWidth, zParameterVAEModel, } from 'features/parameters/types/parameterSchemas'; -import { heightChanged, widthChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { addToast } from 'features/system/store/systemSlice'; import { makeToast } from 'features/system/util/makeToast'; import { t } from 'i18next'; diff --git a/invokeai/frontend/web/src/app/store/store.ts b/invokeai/frontend/web/src/app/store/store.ts index a21879cfcb..054617f77c 100644 --- a/invokeai/frontend/web/src/app/store/store.ts +++ b/invokeai/frontend/web/src/app/store/store.ts @@ -10,6 +10,11 @@ import { controlAdaptersPersistConfig, controlAdaptersSlice, } from 'features/controlAdapters/store/controlAdaptersSlice'; +import { + regionalPromptsPersistConfig, + regionalPromptsSlice, + regionalPromptsUndoableConfig, +} from 'features/controlLayers/store/regionalPromptsSlice'; import { deleteImageModalSlice } from 'features/deleteImageModal/store/slice'; import { dynamicPromptsPersistConfig, dynamicPromptsSlice } from 'features/dynamicPrompts/store/dynamicPromptsSlice'; import { galleryPersistConfig, gallerySlice } from 'features/gallery/store/gallerySlice'; @@ -21,11 +26,6 @@ import { workflowPersistConfig, workflowSlice } from 'features/nodes/store/workf import { generationPersistConfig, generationSlice } from 'features/parameters/store/generationSlice'; import { postprocessingPersistConfig, postprocessingSlice } from 'features/parameters/store/postprocessingSlice'; import { queueSlice } from 'features/queue/store/queueSlice'; -import { - regionalPromptsPersistConfig, - regionalPromptsSlice, - regionalPromptsUndoableConfig, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; import { sdxlPersistConfig, sdxlSlice } from 'features/sdxl/store/sdxlSlice'; import { configSlice } from 'features/system/store/configSlice'; import { systemPersistConfig, systemSlice } from 'features/system/store/systemSlice'; diff --git a/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts b/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts index 26ce9eaf58..461c3b3032 100644 --- a/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts +++ b/invokeai/frontend/web/src/common/hooks/useIsReadyToEnqueue.ts @@ -5,12 +5,12 @@ import { selectControlAdaptersSlice, } from 'features/controlAdapters/store/controlAdaptersSlice'; import { isControlNetOrT2IAdapter } from 'features/controlAdapters/store/types'; +import { selectRegionalPromptsSlice } from 'features/controlLayers/store/regionalPromptsSlice'; import { selectDynamicPromptsSlice } from 'features/dynamicPrompts/store/dynamicPromptsSlice'; import { getShouldProcessPrompt } from 'features/dynamicPrompts/util/getShouldProcessPrompt'; import { selectNodesSlice } from 'features/nodes/store/nodesSlice'; import { isInvocationNode } from 'features/nodes/types/invocation'; import { selectGenerationSlice } from 'features/parameters/store/generationSlice'; -import { selectRegionalPromptsSlice } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { selectSystemSlice } from 'features/system/store/systemSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import i18n from 'i18next'; diff --git a/invokeai/frontend/web/src/features/controlAdapters/components/ControlAdapterImagePreview.tsx b/invokeai/frontend/web/src/features/controlAdapters/components/ControlAdapterImagePreview.tsx index 33269656ad..017cbe4bf6 100644 --- a/invokeai/frontend/web/src/features/controlAdapters/components/ControlAdapterImagePreview.tsx +++ b/invokeai/frontend/web/src/features/controlAdapters/components/ControlAdapterImagePreview.tsx @@ -13,10 +13,10 @@ import { controlAdapterImageChanged, selectControlAdaptersSlice, } from 'features/controlAdapters/store/controlAdaptersSlice'; +import { heightChanged, widthChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import type { TypesafeDraggableData, TypesafeDroppableData } from 'features/dnd/types'; import { calculateNewSize } from 'features/parameters/components/ImageSize/calculateNewSize'; import { selectOptimalDimension } from 'features/parameters/store/generationSlice'; -import { heightChanged, widthChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/AddLayerButton.tsx b/invokeai/frontend/web/src/features/controlLayers/components/AddLayerButton.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/AddLayerButton.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/AddLayerButton.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/AddPromptButtons.tsx b/invokeai/frontend/web/src/features/controlLayers/components/AddPromptButtons.tsx similarity index 97% rename from invokeai/frontend/web/src/features/regionalPrompts/components/AddPromptButtons.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/AddPromptButtons.tsx index ebb7ef217d..0ed7a479c4 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/AddPromptButtons.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/AddPromptButtons.tsx @@ -7,7 +7,7 @@ import { maskLayerNegativePromptChanged, maskLayerPositivePromptChanged, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { PiPlusBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/BrushSize.tsx b/invokeai/frontend/web/src/features/controlLayers/components/BrushSize.tsx similarity index 97% rename from invokeai/frontend/web/src/features/regionalPrompts/components/BrushSize.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/BrushSize.tsx index ae042f848d..f145a47e75 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/BrushSize.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/BrushSize.tsx @@ -10,7 +10,7 @@ import { PopoverTrigger, } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import { brushSizeChanged, initialRegionalPromptsState } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { brushSizeChanged, initialRegionalPromptsState } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/CALayerOpacity.tsx b/invokeai/frontend/web/src/features/controlLayers/components/CALayerOpacity.tsx similarity index 92% rename from invokeai/frontend/web/src/features/regionalPrompts/components/CALayerOpacity.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/CALayerOpacity.tsx index 9d7649be2e..a44ed56e1d 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/CALayerOpacity.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/CALayerOpacity.tsx @@ -12,8 +12,8 @@ import { PopoverTrigger, } from '@invoke-ai/ui-library'; import { useAppDispatch } from 'app/store/storeHooks'; -import { useLayerOpacity } from 'features/regionalPrompts/hooks/layerStateHooks'; -import { layerOpacityChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { useLayerOpacity } from 'features/controlLayers/hooks/layerStateHooks'; +import { layerOpacityChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { PiDropHalfFill } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/ControlAdapterLayerListItem.tsx b/invokeai/frontend/web/src/features/controlLayers/components/ControlAdapterLayerListItem.tsx similarity index 76% rename from invokeai/frontend/web/src/features/regionalPrompts/components/ControlAdapterLayerListItem.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/ControlAdapterLayerListItem.tsx index 95c2c5fbb1..0c501e5e45 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/ControlAdapterLayerListItem.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/ControlAdapterLayerListItem.tsx @@ -1,17 +1,17 @@ import { Flex, Spacer } from '@invoke-ai/ui-library'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import CALayerOpacity from 'features/regionalPrompts/components/CALayerOpacity'; -import ControlAdapterLayerConfig from 'features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterLayerConfig'; -import { LayerTitle } from 'features/regionalPrompts/components/LayerTitle'; -import { RPLayerDeleteButton } from 'features/regionalPrompts/components/RPLayerDeleteButton'; -import { RPLayerMenu } from 'features/regionalPrompts/components/RPLayerMenu'; -import { RPLayerVisibilityToggle } from 'features/regionalPrompts/components/RPLayerVisibilityToggle'; +import CALayerOpacity from 'features/controlLayers/components/CALayerOpacity'; +import ControlAdapterLayerConfig from 'features/controlLayers/components/controlAdapterOverrides/ControlAdapterLayerConfig'; +import { LayerTitle } from 'features/controlLayers/components/LayerTitle'; +import { RPLayerDeleteButton } from 'features/controlLayers/components/RPLayerDeleteButton'; +import { RPLayerMenu } from 'features/controlLayers/components/RPLayerMenu'; +import { RPLayerVisibilityToggle } from 'features/controlLayers/components/RPLayerVisibilityToggle'; import { isControlAdapterLayer, layerSelected, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback, useMemo } from 'react'; import { assert } from 'tsafe'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/ControlLayersSettingsPopover.tsx b/invokeai/frontend/web/src/features/controlLayers/components/ControlLayersSettingsPopover.tsx similarity index 88% rename from invokeai/frontend/web/src/features/regionalPrompts/components/ControlLayersSettingsPopover.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/ControlLayersSettingsPopover.tsx index ea3f7af325..89032b7c76 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/ControlLayersSettingsPopover.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/ControlLayersSettingsPopover.tsx @@ -1,5 +1,5 @@ import { Flex, IconButton, Popover, PopoverBody, PopoverContent, PopoverTrigger } from '@invoke-ai/ui-library'; -import { GlobalMaskLayerOpacity } from 'features/regionalPrompts/components/GlobalMaskLayerOpacity'; +import { GlobalMaskLayerOpacity } from 'features/controlLayers/components/GlobalMaskLayerOpacity'; import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { RiSettings4Fill } from 'react-icons/ri'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/DeleteAllLayersButton.tsx b/invokeai/frontend/web/src/features/controlLayers/components/DeleteAllLayersButton.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/DeleteAllLayersButton.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/DeleteAllLayersButton.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/GlobalMaskLayerOpacity.tsx b/invokeai/frontend/web/src/features/controlLayers/components/GlobalMaskLayerOpacity.tsx similarity index 96% rename from invokeai/frontend/web/src/features/regionalPrompts/components/GlobalMaskLayerOpacity.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/GlobalMaskLayerOpacity.tsx index c24e224a61..3769b40bc7 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/GlobalMaskLayerOpacity.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/GlobalMaskLayerOpacity.tsx @@ -3,7 +3,7 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { globalMaskLayerOpacityChanged, initialRegionalPromptsState, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/IPAdapterLayerListItem.tsx b/invokeai/frontend/web/src/features/controlLayers/components/IPAdapterLayerListItem.tsx similarity index 75% rename from invokeai/frontend/web/src/features/regionalPrompts/components/IPAdapterLayerListItem.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/IPAdapterLayerListItem.tsx index 9673a301d7..0a07f29e82 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/IPAdapterLayerListItem.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/IPAdapterLayerListItem.tsx @@ -1,11 +1,11 @@ import { Flex, Spacer } from '@invoke-ai/ui-library'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppSelector } from 'app/store/storeHooks'; -import ControlAdapterLayerConfig from 'features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterLayerConfig'; -import { LayerTitle } from 'features/regionalPrompts/components/LayerTitle'; -import { RPLayerDeleteButton } from 'features/regionalPrompts/components/RPLayerDeleteButton'; -import { RPLayerVisibilityToggle } from 'features/regionalPrompts/components/RPLayerVisibilityToggle'; -import { isIPAdapterLayer, selectRegionalPromptsSlice } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import ControlAdapterLayerConfig from 'features/controlLayers/components/controlAdapterOverrides/ControlAdapterLayerConfig'; +import { LayerTitle } from 'features/controlLayers/components/LayerTitle'; +import { RPLayerDeleteButton } from 'features/controlLayers/components/RPLayerDeleteButton'; +import { RPLayerVisibilityToggle } from 'features/controlLayers/components/RPLayerVisibilityToggle'; +import { isIPAdapterLayer, selectRegionalPromptsSlice } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useMemo } from 'react'; import { assert } from 'tsafe'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/LayerTitle.tsx b/invokeai/frontend/web/src/features/controlLayers/components/LayerTitle.tsx similarity index 91% rename from invokeai/frontend/web/src/features/regionalPrompts/components/LayerTitle.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/LayerTitle.tsx index c5eafe92c2..a14ce1fd96 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/LayerTitle.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/LayerTitle.tsx @@ -1,5 +1,5 @@ import { Text } from '@invoke-ai/ui-library'; -import type { Layer } from 'features/regionalPrompts/store/types'; +import type { Layer } from 'features/controlLayers/store/types'; import { memo, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/MaskedGuidanceLayerListItem.tsx b/invokeai/frontend/web/src/features/controlLayers/components/MaskedGuidanceLayerListItem.tsx similarity index 77% rename from invokeai/frontend/web/src/features/regionalPrompts/components/MaskedGuidanceLayerListItem.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/MaskedGuidanceLayerListItem.tsx index ce18daed0e..11b285dae0 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/MaskedGuidanceLayerListItem.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/MaskedGuidanceLayerListItem.tsx @@ -2,20 +2,20 @@ import { Badge, Flex, Spacer } from '@invoke-ai/ui-library'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { rgbColorToString } from 'features/canvas/util/colorToString'; -import { LayerTitle } from 'features/regionalPrompts/components/LayerTitle'; -import { RPLayerColorPicker } from 'features/regionalPrompts/components/RPLayerColorPicker'; -import { RPLayerDeleteButton } from 'features/regionalPrompts/components/RPLayerDeleteButton'; -import { RPLayerIPAdapterList } from 'features/regionalPrompts/components/RPLayerIPAdapterList'; -import { RPLayerMenu } from 'features/regionalPrompts/components/RPLayerMenu'; -import { RPLayerNegativePrompt } from 'features/regionalPrompts/components/RPLayerNegativePrompt'; -import { RPLayerPositivePrompt } from 'features/regionalPrompts/components/RPLayerPositivePrompt'; -import RPLayerSettingsPopover from 'features/regionalPrompts/components/RPLayerSettingsPopover'; -import { RPLayerVisibilityToggle } from 'features/regionalPrompts/components/RPLayerVisibilityToggle'; +import { LayerTitle } from 'features/controlLayers/components/LayerTitle'; +import { RPLayerColorPicker } from 'features/controlLayers/components/RPLayerColorPicker'; +import { RPLayerDeleteButton } from 'features/controlLayers/components/RPLayerDeleteButton'; +import { RPLayerIPAdapterList } from 'features/controlLayers/components/RPLayerIPAdapterList'; +import { RPLayerMenu } from 'features/controlLayers/components/RPLayerMenu'; +import { RPLayerNegativePrompt } from 'features/controlLayers/components/RPLayerNegativePrompt'; +import { RPLayerPositivePrompt } from 'features/controlLayers/components/RPLayerPositivePrompt'; +import RPLayerSettingsPopover from 'features/controlLayers/components/RPLayerSettingsPopover'; +import { RPLayerVisibilityToggle } from 'features/controlLayers/components/RPLayerVisibilityToggle'; import { isMaskedGuidanceLayer, layerSelected, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { assert } from 'tsafe'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerAutoNegativeCheckbox.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerAutoNegativeCheckbox.tsx similarity index 96% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerAutoNegativeCheckbox.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerAutoNegativeCheckbox.tsx index 205b4b058e..ec9ac5b24e 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerAutoNegativeCheckbox.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerAutoNegativeCheckbox.tsx @@ -5,7 +5,7 @@ import { isMaskedGuidanceLayer, maskLayerAutoNegativeChanged, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import type { ChangeEvent } from 'react'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerColorPicker.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerColorPicker.tsx similarity index 97% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerColorPicker.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerColorPicker.tsx index 81c4b17fdd..550ff1a2bc 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerColorPicker.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerColorPicker.tsx @@ -7,7 +7,7 @@ import { isMaskedGuidanceLayer, maskLayerPreviewColorChanged, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback, useMemo } from 'react'; import type { RgbColor } from 'react-colorful'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerDeleteButton.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerDeleteButton.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerDeleteButton.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerDeleteButton.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerIPAdapterList.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerIPAdapterList.tsx similarity index 93% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerIPAdapterList.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerIPAdapterList.tsx index 73f04cb23f..7f13a6f281 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerIPAdapterList.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerIPAdapterList.tsx @@ -2,8 +2,8 @@ import { Divider, Flex, IconButton, Spacer, Text } from '@invoke-ai/ui-library'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { guidanceLayerIPAdapterDeleted } from 'app/store/middleware/listenerMiddleware/listeners/regionalControlToControlAdapterBridge'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import ControlAdapterLayerConfig from 'features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterLayerConfig'; -import { isMaskedGuidanceLayer, selectRegionalPromptsSlice } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import ControlAdapterLayerConfig from 'features/controlLayers/components/controlAdapterOverrides/ControlAdapterLayerConfig'; +import { isMaskedGuidanceLayer, selectRegionalPromptsSlice } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback, useMemo } from 'react'; import { PiTrashSimpleBold } from 'react-icons/pi'; import { assert } from 'tsafe'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenu.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenu.tsx similarity index 81% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenu.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenu.tsx index 16619e924e..41e1fb3aa8 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenu.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenu.tsx @@ -1,9 +1,9 @@ import { IconButton, Menu, MenuButton, MenuDivider, MenuItem, MenuList } from '@invoke-ai/ui-library'; import { useAppDispatch } from 'app/store/storeHooks'; -import { RPLayerMenuArrangeActions } from 'features/regionalPrompts/components/RPLayerMenuArrangeActions'; -import { RPLayerMenuMaskedGuidanceActions } from 'features/regionalPrompts/components/RPLayerMenuMaskedGuidanceActions'; -import { useLayerType } from 'features/regionalPrompts/hooks/layerStateHooks'; -import { layerDeleted, layerReset } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { RPLayerMenuArrangeActions } from 'features/controlLayers/components/RPLayerMenuArrangeActions'; +import { RPLayerMenuMaskedGuidanceActions } from 'features/controlLayers/components/RPLayerMenuMaskedGuidanceActions'; +import { useLayerType } from 'features/controlLayers/hooks/layerStateHooks'; +import { layerDeleted, layerReset } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { PiArrowCounterClockwiseBold, PiDotsThreeVerticalBold, PiTrashSimpleBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenuArrangeActions.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenuArrangeActions.tsx similarity index 97% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenuArrangeActions.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenuArrangeActions.tsx index 99878cb95c..deb74d4cc5 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenuArrangeActions.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenuArrangeActions.tsx @@ -8,7 +8,7 @@ import { layerMovedToBack, layerMovedToFront, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { PiArrowDownBold, PiArrowLineDownBold, PiArrowLineUpBold, PiArrowUpBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenuMaskedGuidanceActions.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenuMaskedGuidanceActions.tsx similarity index 97% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenuMaskedGuidanceActions.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenuMaskedGuidanceActions.tsx index 542f08c379..674c9d3a26 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerMenuMaskedGuidanceActions.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerMenuMaskedGuidanceActions.tsx @@ -7,7 +7,7 @@ import { maskLayerNegativePromptChanged, maskLayerPositivePromptChanged, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { PiPlusBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerNegativePrompt.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerNegativePrompt.tsx similarity index 86% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerNegativePrompt.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerNegativePrompt.tsx index 382b698b8f..c81c7009fe 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerNegativePrompt.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerNegativePrompt.tsx @@ -1,12 +1,12 @@ import { Box, Textarea } from '@invoke-ai/ui-library'; import { useAppDispatch } from 'app/store/storeHooks'; +import { RPLayerPromptDeleteButton } from 'features/controlLayers/components/RPLayerPromptDeleteButton'; +import { useLayerNegativePrompt } from 'features/controlLayers/hooks/layerStateHooks'; +import { maskLayerNegativePromptChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { PromptOverlayButtonWrapper } from 'features/parameters/components/Prompts/PromptOverlayButtonWrapper'; import { AddPromptTriggerButton } from 'features/prompt/AddPromptTriggerButton'; import { PromptPopover } from 'features/prompt/PromptPopover'; import { usePrompt } from 'features/prompt/usePrompt'; -import { RPLayerPromptDeleteButton } from 'features/regionalPrompts/components/RPLayerPromptDeleteButton'; -import { useLayerNegativePrompt } from 'features/regionalPrompts/hooks/layerStateHooks'; -import { maskLayerNegativePromptChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { memo, useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerPositivePrompt.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerPositivePrompt.tsx similarity index 86% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerPositivePrompt.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerPositivePrompt.tsx index 595a44e83e..b99c529e34 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerPositivePrompt.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerPositivePrompt.tsx @@ -1,12 +1,12 @@ import { Box, Textarea } from '@invoke-ai/ui-library'; import { useAppDispatch } from 'app/store/storeHooks'; +import { RPLayerPromptDeleteButton } from 'features/controlLayers/components/RPLayerPromptDeleteButton'; +import { useLayerPositivePrompt } from 'features/controlLayers/hooks/layerStateHooks'; +import { maskLayerPositivePromptChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { PromptOverlayButtonWrapper } from 'features/parameters/components/Prompts/PromptOverlayButtonWrapper'; import { AddPromptTriggerButton } from 'features/prompt/AddPromptTriggerButton'; import { PromptPopover } from 'features/prompt/PromptPopover'; import { usePrompt } from 'features/prompt/usePrompt'; -import { RPLayerPromptDeleteButton } from 'features/regionalPrompts/components/RPLayerPromptDeleteButton'; -import { useLayerPositivePrompt } from 'features/regionalPrompts/hooks/layerStateHooks'; -import { maskLayerPositivePromptChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { memo, useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerPromptDeleteButton.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerPromptDeleteButton.tsx similarity index 95% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerPromptDeleteButton.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerPromptDeleteButton.tsx index 7448e3a035..ae3c9317fd 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerPromptDeleteButton.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerPromptDeleteButton.tsx @@ -3,7 +3,7 @@ import { useAppDispatch } from 'app/store/storeHooks'; import { maskLayerNegativePromptChanged, maskLayerPositivePromptChanged, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { PiTrashSimpleBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerSettingsPopover.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerSettingsPopover.tsx similarity index 95% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerSettingsPopover.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerSettingsPopover.tsx index 10495f0900..cf6674db5d 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerSettingsPopover.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerSettingsPopover.tsx @@ -9,7 +9,7 @@ import { PopoverContent, PopoverTrigger, } from '@invoke-ai/ui-library'; -import { MaskedGuidanceLayerAutoNegativeCheckbox } from 'features/regionalPrompts/components/RPLayerAutoNegativeCheckbox'; +import { MaskedGuidanceLayerAutoNegativeCheckbox } from 'features/controlLayers/components/RPLayerAutoNegativeCheckbox'; import { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { PiGearSixBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerVisibilityToggle.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerVisibilityToggle.tsx similarity index 84% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerVisibilityToggle.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RPLayerVisibilityToggle.tsx index 4f9e5e84b4..67d249191c 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RPLayerVisibilityToggle.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RPLayerVisibilityToggle.tsx @@ -1,7 +1,7 @@ import { IconButton } from '@invoke-ai/ui-library'; import { useAppDispatch } from 'app/store/storeHooks'; -import { useLayerIsVisible } from 'features/regionalPrompts/hooks/layerStateHooks'; -import { layerVisibilityToggled } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { useLayerIsVisible } from 'features/controlLayers/hooks/layerStateHooks'; +import { layerVisibilityToggled } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { PiCheckBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptingEditor.stories.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptingEditor.stories.tsx similarity index 83% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptingEditor.stories.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptingEditor.stories.tsx index 943be227c8..8d822fb954 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptingEditor.stories.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptingEditor.stories.tsx @@ -1,6 +1,6 @@ import { Flex } from '@invoke-ai/ui-library'; import type { Meta, StoryObj } from '@storybook/react'; -import { RegionalPromptsEditor } from 'features/regionalPrompts/components/RegionalPromptsEditor'; +import { RegionalPromptsEditor } from 'features/controlLayers/components/RegionalPromptsEditor'; const meta: Meta = { title: 'Feature/RegionalPrompts', diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsEditor.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsEditor.tsx similarity index 73% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsEditor.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsEditor.tsx index dd2e797235..cf190a444c 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsEditor.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsEditor.tsx @@ -1,7 +1,7 @@ /* eslint-disable i18next/no-literal-string */ import { Flex } from '@invoke-ai/ui-library'; -import { RegionalPromptsToolbar } from 'features/regionalPrompts/components/RegionalPromptsToolbar'; -import { StageComponent } from 'features/regionalPrompts/components/StageComponent'; +import { RegionalPromptsToolbar } from 'features/controlLayers/components/RegionalPromptsToolbar'; +import { StageComponent } from 'features/controlLayers/components/StageComponent'; import { memo } from 'react'; export const RegionalPromptsEditor = memo(() => { diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsPanelContent.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsPanelContent.tsx similarity index 75% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsPanelContent.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsPanelContent.tsx index e975d33056..59853ddda3 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsPanelContent.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsPanelContent.tsx @@ -3,13 +3,13 @@ import { Flex } from '@invoke-ai/ui-library'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppSelector } from 'app/store/storeHooks'; import ScrollableContent from 'common/components/OverlayScrollbars/ScrollableContent'; -import { AddLayerButton } from 'features/regionalPrompts/components/AddLayerButton'; -import { ControlAdapterLayerListItem } from 'features/regionalPrompts/components/ControlAdapterLayerListItem'; -import { DeleteAllLayersButton } from 'features/regionalPrompts/components/DeleteAllLayersButton'; -import { IPAdapterLayerListItem } from 'features/regionalPrompts/components/IPAdapterLayerListItem'; -import { MaskedGuidanceLayerListItem } from 'features/regionalPrompts/components/MaskedGuidanceLayerListItem'; -import { isRenderableLayer, selectRegionalPromptsSlice } from 'features/regionalPrompts/store/regionalPromptsSlice'; -import type { Layer } from 'features/regionalPrompts/store/types'; +import { AddLayerButton } from 'features/controlLayers/components/AddLayerButton'; +import { ControlAdapterLayerListItem } from 'features/controlLayers/components/ControlAdapterLayerListItem'; +import { DeleteAllLayersButton } from 'features/controlLayers/components/DeleteAllLayersButton'; +import { IPAdapterLayerListItem } from 'features/controlLayers/components/IPAdapterLayerListItem'; +import { MaskedGuidanceLayerListItem } from 'features/controlLayers/components/MaskedGuidanceLayerListItem'; +import { isRenderableLayer, selectRegionalPromptsSlice } from 'features/controlLayers/store/regionalPromptsSlice'; +import type { Layer } from 'features/controlLayers/store/types'; import { partition } from 'lodash-es'; import { memo } from 'react'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsToolbar.tsx b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsToolbar.tsx similarity index 52% rename from invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsToolbar.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsToolbar.tsx index 3ffeedd245..978dddf717 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/RegionalPromptsToolbar.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/RegionalPromptsToolbar.tsx @@ -1,9 +1,9 @@ /* eslint-disable i18next/no-literal-string */ import { Flex } from '@invoke-ai/ui-library'; -import { BrushSize } from 'features/regionalPrompts/components/BrushSize'; -import ControlLayersSettingsPopover from 'features/regionalPrompts/components/ControlLayersSettingsPopover'; -import { ToolChooser } from 'features/regionalPrompts/components/ToolChooser'; -import { UndoRedoButtonGroup } from 'features/regionalPrompts/components/UndoRedoButtonGroup'; +import { BrushSize } from 'features/controlLayers/components/BrushSize'; +import ControlLayersSettingsPopover from 'features/controlLayers/components/ControlLayersSettingsPopover'; +import { ToolChooser } from 'features/controlLayers/components/ToolChooser'; +import { UndoRedoButtonGroup } from 'features/controlLayers/components/UndoRedoButtonGroup'; import { memo } from 'react'; export const RegionalPromptsToolbar = memo(() => { diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/StageComponent.tsx b/invokeai/frontend/web/src/features/controlLayers/components/StageComponent.tsx similarity index 97% rename from invokeai/frontend/web/src/features/regionalPrompts/components/StageComponent.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/StageComponent.tsx index 83f589a392..2cff657aad 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/StageComponent.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/StageComponent.tsx @@ -4,7 +4,7 @@ import { createSelector } from '@reduxjs/toolkit'; import { logger } from 'app/logging/logger'; import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import { useMouseEvents } from 'features/regionalPrompts/hooks/mouseEventHooks'; +import { useMouseEvents } from 'features/controlLayers/hooks/mouseEventHooks'; import { $cursorPosition, $isMouseOver, @@ -14,8 +14,8 @@ import { layerBboxChanged, layerTranslated, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; -import { debouncedRenderers, renderers as normalRenderers } from 'features/regionalPrompts/util/renderers'; +} from 'features/controlLayers/store/regionalPromptsSlice'; +import { debouncedRenderers, renderers as normalRenderers } from 'features/controlLayers/util/renderers'; import Konva from 'konva'; import type { IRect } from 'konva/lib/types'; import { memo, useCallback, useLayoutEffect, useMemo, useState } from 'react'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/ToolChooser.tsx b/invokeai/frontend/web/src/features/controlLayers/components/ToolChooser.tsx similarity index 98% rename from invokeai/frontend/web/src/features/regionalPrompts/components/ToolChooser.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/ToolChooser.tsx index a3b556a7e5..bc93556f77 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/ToolChooser.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/ToolChooser.tsx @@ -7,7 +7,7 @@ import { selectedLayerDeleted, selectedLayerReset, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { useCallback } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/UndoRedoButtonGroup.tsx b/invokeai/frontend/web/src/features/controlLayers/components/UndoRedoButtonGroup.tsx similarity index 95% rename from invokeai/frontend/web/src/features/regionalPrompts/components/UndoRedoButtonGroup.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/UndoRedoButtonGroup.tsx index bb8f9cfd6e..bfc5e0bd24 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/UndoRedoButtonGroup.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/UndoRedoButtonGroup.tsx @@ -1,7 +1,7 @@ /* eslint-disable i18next/no-literal-string */ import { ButtonGroup, IconButton } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import { redo, undo } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { redo, undo } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterImagePreview.tsx b/invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ControlAdapterImagePreview.tsx similarity index 98% rename from invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterImagePreview.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ControlAdapterImagePreview.tsx index 6238ec498d..41339b0efa 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterImagePreview.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ControlAdapterImagePreview.tsx @@ -13,10 +13,10 @@ import { controlAdapterImageChanged, selectControlAdaptersSlice, } from 'features/controlAdapters/store/controlAdaptersSlice'; +import { heightChanged, widthChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import type { TypesafeDraggableData, TypesafeDroppableData } from 'features/dnd/types'; import { calculateNewSize } from 'features/parameters/components/ImageSize/calculateNewSize'; import { selectOptimalDimension } from 'features/parameters/store/generationSlice'; -import { heightChanged, widthChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { memo, useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterLayerConfig.tsx b/invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ControlAdapterLayerConfig.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ControlAdapterLayerConfig.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ControlAdapterLayerConfig.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterBeginEnd.tsx b/invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterBeginEnd.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterBeginEnd.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterBeginEnd.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterControlMode.tsx b/invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterControlMode.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterControlMode.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterControlMode.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterModel.tsx b/invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterModel.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterModel.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterModel.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterWeight.tsx b/invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterWeight.tsx similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/components/controlAdapterOverrides/ParamControlAdapterWeight.tsx rename to invokeai/frontend/web/src/features/controlLayers/components/controlAdapterOverrides/ParamControlAdapterWeight.tsx diff --git a/invokeai/frontend/web/src/features/regionalPrompts/hooks/layerStateHooks.ts b/invokeai/frontend/web/src/features/controlLayers/hooks/layerStateHooks.ts similarity index 97% rename from invokeai/frontend/web/src/features/regionalPrompts/hooks/layerStateHooks.ts rename to invokeai/frontend/web/src/features/controlLayers/hooks/layerStateHooks.ts index dd0042431c..5925322fc9 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/hooks/layerStateHooks.ts +++ b/invokeai/frontend/web/src/features/controlLayers/hooks/layerStateHooks.ts @@ -4,7 +4,7 @@ import { isControlAdapterLayer, isMaskedGuidanceLayer, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { useMemo } from 'react'; import { assert } from 'tsafe'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/hooks/mouseEventHooks.ts b/invokeai/frontend/web/src/features/controlLayers/hooks/mouseEventHooks.ts similarity index 99% rename from invokeai/frontend/web/src/features/regionalPrompts/hooks/mouseEventHooks.ts rename to invokeai/frontend/web/src/features/controlLayers/hooks/mouseEventHooks.ts index fc58de60ed..ca44480a2b 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/hooks/mouseEventHooks.ts +++ b/invokeai/frontend/web/src/features/controlLayers/hooks/mouseEventHooks.ts @@ -12,7 +12,7 @@ import { maskLayerLineAdded, maskLayerPointsAdded, maskLayerRectAdded, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import type Konva from 'konva'; import type { KonvaEventObject } from 'konva/lib/Node'; import type { Vector2d } from 'konva/lib/types'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/hooks/useRegionalControlTitle.ts b/invokeai/frontend/web/src/features/controlLayers/hooks/useRegionalControlTitle.ts similarity index 95% rename from invokeai/frontend/web/src/features/regionalPrompts/hooks/useRegionalControlTitle.ts rename to invokeai/frontend/web/src/features/controlLayers/hooks/useRegionalControlTitle.ts index 536e03bedc..c5e74868d7 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/hooks/useRegionalControlTitle.ts +++ b/invokeai/frontend/web/src/features/controlLayers/hooks/useRegionalControlTitle.ts @@ -1,6 +1,6 @@ import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store/storeHooks'; -import { isMaskedGuidanceLayer, selectRegionalPromptsSlice } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { isMaskedGuidanceLayer, selectRegionalPromptsSlice } from 'features/controlLayers/store/regionalPromptsSlice'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/store/regionalPromptsSlice.ts b/invokeai/frontend/web/src/features/controlLayers/store/regionalPromptsSlice.ts similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/store/regionalPromptsSlice.ts rename to invokeai/frontend/web/src/features/controlLayers/store/regionalPromptsSlice.ts diff --git a/invokeai/frontend/web/src/features/regionalPrompts/store/types.ts b/invokeai/frontend/web/src/features/controlLayers/store/types.ts similarity index 100% rename from invokeai/frontend/web/src/features/regionalPrompts/store/types.ts rename to invokeai/frontend/web/src/features/controlLayers/store/types.ts diff --git a/invokeai/frontend/web/src/features/regionalPrompts/util/bbox.ts b/invokeai/frontend/web/src/features/controlLayers/util/bbox.ts similarity index 98% rename from invokeai/frontend/web/src/features/regionalPrompts/util/bbox.ts rename to invokeai/frontend/web/src/features/controlLayers/util/bbox.ts index b17d805552..a75650fd0a 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/util/bbox.ts +++ b/invokeai/frontend/web/src/features/controlLayers/util/bbox.ts @@ -1,6 +1,6 @@ import openBase64ImageInTab from 'common/util/openBase64ImageInTab'; import { imageDataToDataURL } from 'features/canvas/util/blobToDataURL'; -import { MASKED_GUIDANCE_LAYER_OBJECT_GROUP_NAME } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { MASKED_GUIDANCE_LAYER_OBJECT_GROUP_NAME } from 'features/controlLayers/store/regionalPromptsSlice'; import Konva from 'konva'; import type { Layer as KonvaLayerType } from 'konva/lib/Layer'; import type { IRect } from 'konva/lib/types'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/util/getLayerBlobs.ts b/invokeai/frontend/web/src/features/controlLayers/util/getLayerBlobs.ts similarity index 94% rename from invokeai/frontend/web/src/features/regionalPrompts/util/getLayerBlobs.ts rename to invokeai/frontend/web/src/features/controlLayers/util/getLayerBlobs.ts index 723d2611fd..783fdee513 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/util/getLayerBlobs.ts +++ b/invokeai/frontend/web/src/features/controlLayers/util/getLayerBlobs.ts @@ -1,8 +1,8 @@ import { getStore } from 'app/store/nanostores/store'; import openBase64ImageInTab from 'common/util/openBase64ImageInTab'; import { blobToDataURL } from 'features/canvas/util/blobToDataURL'; -import { isMaskedGuidanceLayer, MASKED_GUIDANCE_LAYER_NAME } from 'features/regionalPrompts/store/regionalPromptsSlice'; -import { renderers } from 'features/regionalPrompts/util/renderers'; +import { isMaskedGuidanceLayer, MASKED_GUIDANCE_LAYER_NAME } from 'features/controlLayers/store/regionalPromptsSlice'; +import { renderers } from 'features/controlLayers/util/renderers'; import Konva from 'konva'; import { assert } from 'tsafe'; diff --git a/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts b/invokeai/frontend/web/src/features/controlLayers/util/renderers.ts similarity index 98% rename from invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts rename to invokeai/frontend/web/src/features/controlLayers/util/renderers.ts index 2e437728b5..c64baa211c 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/util/renderers.ts +++ b/invokeai/frontend/web/src/features/controlLayers/util/renderers.ts @@ -1,6 +1,6 @@ import { getStore } from 'app/store/nanostores/store'; import { rgbaColorToString, rgbColorToString } from 'features/canvas/util/colorToString'; -import { getScaledFlooredCursorPosition } from 'features/regionalPrompts/hooks/mouseEventHooks'; +import { getScaledFlooredCursorPosition } from 'features/controlLayers/hooks/mouseEventHooks'; import { $tool, BACKGROUND_LAYER_ID, @@ -24,7 +24,7 @@ import { TOOL_PREVIEW_BRUSH_GROUP_ID, TOOL_PREVIEW_LAYER_ID, TOOL_PREVIEW_RECT_ID, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import type { ControlAdapterLayer, Layer, @@ -32,8 +32,8 @@ import type { Tool, VectorMaskLine, VectorMaskRect, -} from 'features/regionalPrompts/store/types'; -import { getLayerBboxFast, getLayerBboxPixels } from 'features/regionalPrompts/util/bbox'; +} from 'features/controlLayers/store/types'; +import { getLayerBboxFast, getLayerBboxPixels } from 'features/controlLayers/util/bbox'; import Konva from 'konva'; import type { IRect, Vector2d } from 'konva/lib/types'; import { debounce } from 'lodash-es'; diff --git a/invokeai/frontend/web/src/features/metadata/util/recallers.ts b/invokeai/frontend/web/src/features/metadata/util/recallers.ts index fd0d8c9a33..fbf72ef98f 100644 --- a/invokeai/frontend/web/src/features/metadata/util/recallers.ts +++ b/invokeai/frontend/web/src/features/metadata/util/recallers.ts @@ -5,6 +5,14 @@ import { ipAdaptersReset, t2iAdaptersReset, } from 'features/controlAdapters/store/controlAdaptersSlice'; +import { + heightChanged, + negativePrompt2Changed, + negativePromptChanged, + positivePrompt2Changed, + positivePromptChanged, + widthChanged, +} from 'features/controlLayers/store/regionalPromptsSlice'; import { setHrfEnabled, setHrfMethod, setHrfStrength } from 'features/hrf/store/hrfSlice'; import type { LoRA } from 'features/lora/store/loraSlice'; import { loraRecalled, lorasReset } from 'features/lora/store/loraSlice'; @@ -47,14 +55,6 @@ import type { ParameterVAEModel, ParameterWidth, } from 'features/parameters/types/parameterSchemas'; -import { - heightChanged, - negativePrompt2Changed, - negativePromptChanged, - positivePrompt2Changed, - positivePromptChanged, - widthChanged, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; import { refinerModelChanged, setRefinerCFGScale, diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addControlNetToLinearGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addControlNetToLinearGraph.ts index ac3c7ba670..90898a0852 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addControlNetToLinearGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addControlNetToLinearGraph.ts @@ -1,8 +1,8 @@ import type { RootState } from 'app/store/store'; import { selectValidControlNets } from 'features/controlAdapters/store/controlAdaptersSlice'; import type { ControlAdapterProcessorType, ControlNetConfig } from 'features/controlAdapters/store/types'; +import { isControlAdapterLayer } from 'features/controlLayers/store/regionalPromptsSlice'; import type { ImageField } from 'features/nodes/types/common'; -import { isControlAdapterLayer } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { differenceWith, intersectionWith } from 'lodash-es'; import type { diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addIPAdapterToLinearGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addIPAdapterToLinearGraph.ts index 12e942ed59..6373c87eb5 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addIPAdapterToLinearGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addIPAdapterToLinearGraph.ts @@ -1,8 +1,8 @@ import type { RootState } from 'app/store/store'; import { selectValidIPAdapters } from 'features/controlAdapters/store/controlAdaptersSlice'; import type { IPAdapterConfig } from 'features/controlAdapters/store/types'; +import { isIPAdapterLayer, isMaskedGuidanceLayer } from 'features/controlLayers/store/regionalPromptsSlice'; import type { ImageField } from 'features/nodes/types/common'; -import { isIPAdapterLayer, isMaskedGuidanceLayer } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { differenceWith, intersectionWith } from 'lodash-es'; import type { diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addRegionalPromptsToGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addRegionalPromptsToGraph.ts index 82725d8ace..5c581ad24e 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addRegionalPromptsToGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addRegionalPromptsToGraph.ts @@ -1,6 +1,8 @@ import { getStore } from 'app/store/nanostores/store'; import type { RootState } from 'app/store/store'; import { selectAllIPAdapters } from 'features/controlAdapters/store/controlAdaptersSlice'; +import { isMaskedGuidanceLayer } from 'features/controlLayers/store/regionalPromptsSlice'; +import { getRegionalPromptLayerBlobs } from 'features/controlLayers/util/getLayerBlobs'; import { IP_ADAPTER_COLLECT, NEGATIVE_CONDITIONING, @@ -13,8 +15,6 @@ import { PROMPT_REGION_POSITIVE_COND_INVERTED_PREFIX, PROMPT_REGION_POSITIVE_COND_PREFIX, } from 'features/nodes/util/graph/constants'; -import { isMaskedGuidanceLayer } from 'features/regionalPrompts/store/regionalPromptsSlice'; -import { getRegionalPromptLayerBlobs } from 'features/regionalPrompts/util/getLayerBlobs'; import { size } from 'lodash-es'; import { imagesApi } from 'services/api/endpoints/images'; import type { CollectInvocation, Edge, IPAdapterInvocation, NonNullableGraph, S } from 'services/api/types'; diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/addT2IAdapterToLinearGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/addT2IAdapterToLinearGraph.ts index 5fd168205f..9006ed8b83 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/addT2IAdapterToLinearGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/addT2IAdapterToLinearGraph.ts @@ -1,8 +1,8 @@ import type { RootState } from 'app/store/store'; import { selectValidT2IAdapters } from 'features/controlAdapters/store/controlAdaptersSlice'; import type { ControlAdapterProcessorType, T2IAdapterConfig } from 'features/controlAdapters/store/types'; +import { isControlAdapterLayer } from 'features/controlLayers/store/regionalPromptsSlice'; import type { ImageField } from 'features/nodes/types/common'; -import { isControlAdapterLayer } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { differenceWith, intersectionWith } from 'lodash-es'; import type { diff --git a/invokeai/frontend/web/src/features/parameters/components/Core/ParamNegativePrompt.tsx b/invokeai/frontend/web/src/features/parameters/components/Core/ParamNegativePrompt.tsx index 077bdca108..ccfb6f7c72 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Core/ParamNegativePrompt.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Core/ParamNegativePrompt.tsx @@ -1,10 +1,10 @@ import { Box, Textarea } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; +import { negativePromptChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { PromptOverlayButtonWrapper } from 'features/parameters/components/Prompts/PromptOverlayButtonWrapper'; import { AddPromptTriggerButton } from 'features/prompt/AddPromptTriggerButton'; import { PromptPopover } from 'features/prompt/PromptPopover'; import { usePrompt } from 'features/prompt/usePrompt'; -import { negativePromptChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { memo, useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx b/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx index 90b6ae3093..4f6e66e50a 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Core/ParamPositivePrompt.tsx @@ -1,11 +1,11 @@ import { Box, Textarea } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; +import { positivePromptChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { ShowDynamicPromptsPreviewButton } from 'features/dynamicPrompts/components/ShowDynamicPromptsPreviewButton'; import { PromptOverlayButtonWrapper } from 'features/parameters/components/Prompts/PromptOverlayButtonWrapper'; import { AddPromptTriggerButton } from 'features/prompt/AddPromptTriggerButton'; import { PromptPopover } from 'features/prompt/PromptPopover'; import { usePrompt } from 'features/prompt/usePrompt'; -import { positivePromptChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { SDXLConcatButton } from 'features/sdxl/components/SDXLPrompts/SDXLConcatButton'; import { memo, useCallback, useRef } from 'react'; import type { HotkeyCallback } from 'react-hotkeys-hook'; diff --git a/invokeai/frontend/web/src/features/parameters/components/ImageSize/AspectRatioCanvasPreview.tsx b/invokeai/frontend/web/src/features/parameters/components/ImageSize/AspectRatioCanvasPreview.tsx index 6584cb14c9..00fa10c0c5 100644 --- a/invokeai/frontend/web/src/features/parameters/components/ImageSize/AspectRatioCanvasPreview.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/ImageSize/AspectRatioCanvasPreview.tsx @@ -1,5 +1,5 @@ import { Flex } from '@invoke-ai/ui-library'; -import { StageComponent } from 'features/regionalPrompts/components/StageComponent'; +import { StageComponent } from 'features/controlLayers/components/StageComponent'; import { memo } from 'react'; export const AspectRatioCanvasPreview = memo(() => { diff --git a/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx b/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx index e020782aa1..351589a949 100644 --- a/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx +++ b/invokeai/frontend/web/src/features/queue/components/QueueButtonTooltip.tsx @@ -2,9 +2,9 @@ import { Divider, Flex, ListItem, Text, UnorderedList } from '@invoke-ai/ui-libr import { createSelector } from '@reduxjs/toolkit'; import { useAppSelector } from 'app/store/storeHooks'; import { useIsReadyToEnqueue } from 'common/hooks/useIsReadyToEnqueue'; +import { selectRegionalPromptsSlice } from 'features/controlLayers/store/regionalPromptsSlice'; import { selectDynamicPromptsSlice } from 'features/dynamicPrompts/store/dynamicPromptsSlice'; import { getShouldProcessPrompt } from 'features/dynamicPrompts/util/getShouldProcessPrompt'; -import { selectRegionalPromptsSlice } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { memo, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { useEnqueueBatchMutation } from 'services/api/endpoints/queue'; diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLNegativeStylePrompt.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLNegativeStylePrompt.tsx index 51347c769d..6104642b62 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLNegativeStylePrompt.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLNegativeStylePrompt.tsx @@ -1,10 +1,10 @@ import { Box, Textarea } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; +import { negativePrompt2Changed } from 'features/controlLayers/store/regionalPromptsSlice'; import { PromptOverlayButtonWrapper } from 'features/parameters/components/Prompts/PromptOverlayButtonWrapper'; import { AddPromptTriggerButton } from 'features/prompt/AddPromptTriggerButton'; import { PromptPopover } from 'features/prompt/PromptPopover'; import { usePrompt } from 'features/prompt/usePrompt'; -import { negativePrompt2Changed } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { memo, useCallback, useRef } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLPositiveStylePrompt.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLPositiveStylePrompt.tsx index cdff420b47..d14d42a3ce 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLPositiveStylePrompt.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/ParamSDXLPositiveStylePrompt.tsx @@ -1,10 +1,10 @@ import { Box, Textarea } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; +import { positivePrompt2Changed } from 'features/controlLayers/store/regionalPromptsSlice'; import { PromptOverlayButtonWrapper } from 'features/parameters/components/Prompts/PromptOverlayButtonWrapper'; import { AddPromptTriggerButton } from 'features/prompt/AddPromptTriggerButton'; import { PromptPopover } from 'features/prompt/PromptPopover'; import { usePrompt } from 'features/prompt/usePrompt'; -import { positivePrompt2Changed } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { memo, useCallback, useRef } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/SDXLConcatButton.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/SDXLConcatButton.tsx index b25698cc1d..436749428b 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/SDXLConcatButton.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLPrompts/SDXLConcatButton.tsx @@ -1,6 +1,6 @@ import { IconButton, Tooltip } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import { shouldConcatPromptsChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; +import { shouldConcatPromptsChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { memo, useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { PiLinkSimpleBold, PiLinkSimpleBreakBold } from 'react-icons/pi'; diff --git a/invokeai/frontend/web/src/features/settingsAccordions/components/ControlSettingsAccordion/ControlSettingsAccordion.tsx b/invokeai/frontend/web/src/features/settingsAccordions/components/ControlSettingsAccordion/ControlSettingsAccordion.tsx index b6e1b179b3..2de6d9de00 100644 --- a/invokeai/frontend/web/src/features/settingsAccordions/components/ControlSettingsAccordion/ControlSettingsAccordion.tsx +++ b/invokeai/frontend/web/src/features/settingsAccordions/components/ControlSettingsAccordion/ControlSettingsAccordion.tsx @@ -16,7 +16,7 @@ import { import { selectAllControlAdapterIds, selectRegionalPromptsSlice, -} from 'features/regionalPrompts/store/regionalPromptsSlice'; +} from 'features/controlLayers/store/regionalPromptsSlice'; import { useStandaloneAccordionToggle } from 'features/settingsAccordions/hooks/useStandaloneAccordionToggle'; import { useFeatureStatus } from 'features/system/hooks/useFeatureStatus'; import { Fragment, memo } from 'react'; diff --git a/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSettingsAccordion.tsx b/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSettingsAccordion.tsx index 30f7f4b0ac..6f30d5110a 100644 --- a/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSettingsAccordion.tsx +++ b/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSettingsAccordion.tsx @@ -3,6 +3,7 @@ import { Expander, Flex, FormControlGroup, StandaloneAccordion } from '@invoke-a import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; import { useAppSelector } from 'app/store/storeHooks'; import { selectCanvasSlice } from 'features/canvas/store/canvasSlice'; +import { selectRegionalPromptsSlice } from 'features/controlLayers/store/regionalPromptsSlice'; import { HrfSettings } from 'features/hrf/components/HrfSettings'; import { selectHrfSlice } from 'features/hrf/store/hrfSlice'; import ParamScaleBeforeProcessing from 'features/parameters/components/Canvas/InfillAndScaling/ParamScaleBeforeProcessing'; @@ -14,7 +15,6 @@ import { ParamSeedNumberInput } from 'features/parameters/components/Seed/ParamS import { ParamSeedRandomize } from 'features/parameters/components/Seed/ParamSeedRandomize'; import { ParamSeedShuffle } from 'features/parameters/components/Seed/ParamSeedShuffle'; import { selectGenerationSlice } from 'features/parameters/store/generationSlice'; -import { selectRegionalPromptsSlice } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { useExpanderToggle } from 'features/settingsAccordions/hooks/useExpanderToggle'; import { useStandaloneAccordionToggle } from 'features/settingsAccordions/hooks/useStandaloneAccordionToggle'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; diff --git a/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSizeLinear.tsx b/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSizeLinear.tsx index 3a00496ec9..6ca9988f67 100644 --- a/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSizeLinear.tsx +++ b/invokeai/frontend/web/src/features/settingsAccordions/components/ImageSettingsAccordion/ImageSizeLinear.tsx @@ -1,11 +1,11 @@ import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; +import { aspectRatioChanged, heightChanged, widthChanged } from 'features/controlLayers/store/regionalPromptsSlice'; import { ParamHeight } from 'features/parameters/components/Core/ParamHeight'; import { ParamWidth } from 'features/parameters/components/Core/ParamWidth'; import { AspectRatioCanvasPreview } from 'features/parameters/components/ImageSize/AspectRatioCanvasPreview'; import { AspectRatioIconPreview } from 'features/parameters/components/ImageSize/AspectRatioIconPreview'; import { ImageSize } from 'features/parameters/components/ImageSize/ImageSize'; import type { AspectRatioState } from 'features/parameters/components/ImageSize/types'; -import { aspectRatioChanged, heightChanged, widthChanged } from 'features/regionalPrompts/store/regionalPromptsSlice'; import { activeTabNameSelector } from 'features/ui/store/uiSelectors'; import { memo, useCallback } from 'react'; diff --git a/invokeai/frontend/web/src/features/ui/components/ParametersPanelTextToImage.tsx b/invokeai/frontend/web/src/features/ui/components/ParametersPanelTextToImage.tsx index d8a4a6fec4..0adf65d0bb 100644 --- a/invokeai/frontend/web/src/features/ui/components/ParametersPanelTextToImage.tsx +++ b/invokeai/frontend/web/src/features/ui/components/ParametersPanelTextToImage.tsx @@ -1,10 +1,10 @@ import { Box, Flex, Tab, TabList, TabPanel, TabPanels, Tabs } from '@invoke-ai/ui-library'; import { useAppSelector } from 'app/store/storeHooks'; import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants'; +import { RegionalPromptsPanelContent } from 'features/controlLayers/components/RegionalPromptsPanelContent'; +import { useRegionalControlTitle } from 'features/controlLayers/hooks/useRegionalControlTitle'; import { Prompts } from 'features/parameters/components/Prompts/Prompts'; import QueueControls from 'features/queue/components/QueueControls'; -import { RegionalPromptsPanelContent } from 'features/regionalPrompts/components/RegionalPromptsPanelContent'; -import { useRegionalControlTitle } from 'features/regionalPrompts/hooks/useRegionalControlTitle'; import { SDXLPrompts } from 'features/sdxl/components/SDXLPrompts/SDXLPrompts'; import { AdvancedSettingsAccordion } from 'features/settingsAccordions/components/AdvancedSettingsAccordion/AdvancedSettingsAccordion'; import { CompositingSettingsAccordion } from 'features/settingsAccordions/components/CompositingSettingsAccordion/CompositingSettingsAccordion'; diff --git a/invokeai/frontend/web/src/features/ui/components/tabs/TextToImageTab.tsx b/invokeai/frontend/web/src/features/ui/components/tabs/TextToImageTab.tsx index 082445fbb3..fc8694e06d 100644 --- a/invokeai/frontend/web/src/features/ui/components/tabs/TextToImageTab.tsx +++ b/invokeai/frontend/web/src/features/ui/components/tabs/TextToImageTab.tsx @@ -1,7 +1,7 @@ import { Box, Tab, TabList, TabPanel, TabPanels, Tabs } from '@invoke-ai/ui-library'; +import { RegionalPromptsEditor } from 'features/controlLayers/components/RegionalPromptsEditor'; +import { useRegionalControlTitle } from 'features/controlLayers/hooks/useRegionalControlTitle'; import CurrentImageDisplay from 'features/gallery/components/CurrentImage/CurrentImageDisplay'; -import { RegionalPromptsEditor } from 'features/regionalPrompts/components/RegionalPromptsEditor'; -import { useRegionalControlTitle } from 'features/regionalPrompts/hooks/useRegionalControlTitle'; import { memo } from 'react'; import { useTranslation } from 'react-i18next';