diff --git a/invokeai/frontend/web/src/common/hooks/useChakraThemeTokens.ts b/invokeai/frontend/web/src/common/hooks/useChakraThemeTokens.ts deleted file mode 100644 index 93345f6a4c..0000000000 --- a/invokeai/frontend/web/src/common/hooks/useChakraThemeTokens.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { useToken } from '@invoke-ai/ui-library'; - -export const useChakraThemeTokens = () => { - const [ - base50, - base100, - base150, - base200, - base250, - base300, - base350, - base400, - base450, - base500, - base550, - base600, - base650, - base700, - base750, - base800, - base850, - base900, - base950, - accent50, - accent100, - accent150, - accent200, - accent250, - accent300, - accent350, - accent400, - accent450, - accent500, - accent550, - accent600, - accent650, - accent700, - accent750, - accent800, - accent850, - accent900, - accent950, - baseAlpha50, - baseAlpha100, - baseAlpha150, - baseAlpha200, - baseAlpha250, - baseAlpha300, - baseAlpha350, - baseAlpha400, - baseAlpha450, - baseAlpha500, - baseAlpha550, - baseAlpha600, - baseAlpha650, - baseAlpha700, - baseAlpha750, - baseAlpha800, - baseAlpha850, - baseAlpha900, - baseAlpha950, - accentAlpha50, - accentAlpha100, - accentAlpha150, - accentAlpha200, - accentAlpha250, - accentAlpha300, - accentAlpha350, - accentAlpha400, - accentAlpha450, - accentAlpha500, - accentAlpha550, - accentAlpha600, - accentAlpha650, - accentAlpha700, - accentAlpha750, - accentAlpha800, - accentAlpha850, - accentAlpha900, - accentAlpha950, - ] = useToken('colors', [ - 'base.50', - 'base.100', - 'base.150', - 'base.200', - 'base.250', - 'base.300', - 'base.350', - 'base.400', - 'base.450', - 'base.500', - 'base.550', - 'base.600', - 'base.650', - 'base.700', - 'base.750', - 'base.800', - 'base.850', - 'base.900', - 'base.950', - 'accent.50', - 'accent.100', - 'accent.150', - 'accent.200', - 'accent.250', - 'accent.300', - 'accent.350', - 'accent.400', - 'accent.450', - 'accent.500', - 'accent.550', - 'accent.600', - 'accent.650', - 'accent.700', - 'accent.750', - 'accent.800', - 'accent.850', - 'accent.900', - 'accent.950', - 'baseAlpha.50', - 'baseAlpha.100', - 'baseAlpha.150', - 'baseAlpha.200', - 'baseAlpha.250', - 'baseAlpha.300', - 'baseAlpha.350', - 'baseAlpha.400', - 'baseAlpha.450', - 'baseAlpha.500', - 'baseAlpha.550', - 'baseAlpha.600', - 'baseAlpha.650', - 'baseAlpha.700', - 'baseAlpha.750', - 'baseAlpha.800', - 'baseAlpha.850', - 'baseAlpha.900', - 'baseAlpha.950', - 'accentAlpha.50', - 'accentAlpha.100', - 'accentAlpha.150', - 'accentAlpha.200', - 'accentAlpha.250', - 'accentAlpha.300', - 'accentAlpha.350', - 'accentAlpha.400', - 'accentAlpha.450', - 'accentAlpha.500', - 'accentAlpha.550', - 'accentAlpha.600', - 'accentAlpha.650', - 'accentAlpha.700', - 'accentAlpha.750', - 'accentAlpha.800', - 'accentAlpha.850', - 'accentAlpha.900', - 'accentAlpha.950', - ]); - - return { - base50, - base100, - base150, - base200, - base250, - base300, - base350, - base400, - base450, - base500, - base550, - base600, - base650, - base700, - base750, - base800, - base850, - base900, - base950, - accent50, - accent100, - accent150, - accent200, - accent250, - accent300, - accent350, - accent400, - accent450, - accent500, - accent550, - accent600, - accent650, - accent700, - accent750, - accent800, - accent850, - accent900, - accent950, - baseAlpha50, - baseAlpha100, - baseAlpha150, - baseAlpha200, - baseAlpha250, - baseAlpha300, - baseAlpha350, - baseAlpha400, - baseAlpha450, - baseAlpha500, - baseAlpha550, - baseAlpha600, - baseAlpha650, - baseAlpha700, - baseAlpha750, - baseAlpha800, - baseAlpha850, - baseAlpha900, - baseAlpha950, - accentAlpha50, - accentAlpha100, - accentAlpha150, - accentAlpha200, - accentAlpha250, - accentAlpha300, - accentAlpha350, - accentAlpha400, - accentAlpha450, - accentAlpha500, - accentAlpha550, - accentAlpha600, - accentAlpha650, - accentAlpha700, - accentAlpha750, - accentAlpha800, - accentAlpha850, - accentAlpha900, - accentAlpha950, - }; -}; diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Notes/NotesNode.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Notes/NotesNode.tsx index 2ce7249025..9b93c57f07 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Notes/NotesNode.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Notes/NotesNode.tsx @@ -1,5 +1,5 @@ import { Box, Flex, Textarea } from '@invoke-ai/ui-library'; -import type { Node,NodeProps } from '@xyflow/react'; +import type { Node, NodeProps } from '@xyflow/react'; import { useAppDispatch } from 'app/store/storeHooks'; import NodeCollapseButton from 'features/nodes/components/flow/nodes/common/NodeCollapseButton'; import NodeTitle from 'features/nodes/components/flow/nodes/common/NodeTitle'; diff --git a/invokeai/frontend/web/src/features/nodes/hooks/useNode.ts b/invokeai/frontend/web/src/features/nodes/hooks/useNode.ts deleted file mode 100644 index b86acca4a6..0000000000 --- a/invokeai/frontend/web/src/features/nodes/hooks/useNode.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Node } from '@xyflow/react'; -import { createMemoizedSelector } from 'app/store/createMemoizedSelector'; -import { useAppSelector } from 'app/store/storeHooks'; -import { selectNode, selectNodesSlice } from 'features/nodes/store/selectors'; -import { useMemo } from 'react'; - -export const useNode = (nodeId: string): Node => { - const selector = useMemo( - () => - createMemoizedSelector(selectNodesSlice, (nodes) => { - return selectNode(nodes, nodeId); - }), - [nodeId] - ); - - const node = useAppSelector(selector); - - return node; -}; diff --git a/invokeai/frontend/web/src/features/nodes/store/types.ts b/invokeai/frontend/web/src/features/nodes/store/types.ts index 6db8dfd4e4..bc961bf5d5 100644 --- a/invokeai/frontend/web/src/features/nodes/store/types.ts +++ b/invokeai/frontend/web/src/features/nodes/store/types.ts @@ -5,12 +5,7 @@ import type { FieldOutputTemplate, StatefulFieldValue, } from 'features/nodes/types/field'; -import type { - AnyEdge, - AnyNode, - InvocationTemplate, - NodeExecutionState, -} from 'features/nodes/types/invocation'; +import type { AnyEdge, AnyNode, InvocationTemplate, NodeExecutionState } from 'features/nodes/types/invocation'; import type { WorkflowV3 } from 'features/nodes/types/workflow'; import type { SQLiteDirection, WorkflowRecordOrderBy } from 'services/api/types'; diff --git a/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.ts b/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.ts index bba9d5b1e0..9fb2795ae8 100644 --- a/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.ts +++ b/invokeai/frontend/web/src/features/nodes/store/util/getCollectItemType.ts @@ -1,6 +1,6 @@ import type { Templates } from 'features/nodes/store/types'; import type { FieldType } from 'features/nodes/types/field'; -import type { AnyNode, AnyEdge } from 'features/nodes/types/invocation'; +import type { AnyEdge, AnyNode } from 'features/nodes/types/invocation'; /** * Given a collect node, return the type of the items it collects. The graph is traversed to find the first node and diff --git a/invokeai/frontend/web/src/features/nodes/store/util/getFirstValidConnection.ts b/invokeai/frontend/web/src/features/nodes/store/util/getFirstValidConnection.ts index d38f1f1a0d..2a88e2078a 100644 --- a/invokeai/frontend/web/src/features/nodes/store/util/getFirstValidConnection.ts +++ b/invokeai/frontend/web/src/features/nodes/store/util/getFirstValidConnection.ts @@ -2,7 +2,7 @@ import type { Connection } from '@xyflow/react'; import type { Templates } from 'features/nodes/store/types'; import { validateConnection } from 'features/nodes/store/util/validateConnection'; import type { FieldInputTemplate, FieldOutputTemplate } from 'features/nodes/types/field'; -import type { AnyEdge,AnyNode } from 'features/nodes/types/invocation'; +import type { AnyEdge, AnyNode } from 'features/nodes/types/invocation'; import { map } from 'lodash-es'; /** diff --git a/invokeai/frontend/web/src/features/queue/store/readiness.ts b/invokeai/frontend/web/src/features/queue/store/readiness.ts index 5eea303295..ff3026e651 100644 --- a/invokeai/frontend/web/src/features/queue/store/readiness.ts +++ b/invokeai/frontend/web/src/features/queue/store/readiness.ts @@ -41,7 +41,7 @@ import { validateNumberFieldCollectionValue, validateStringFieldCollectionValue, } from 'features/nodes/types/fieldValidators'; -import type { InvocationNode, AnyEdge } from 'features/nodes/types/invocation'; +import type { AnyEdge, InvocationNode } from 'features/nodes/types/invocation'; import { isBatchNode, isExecutableNode, isInvocationNode } from 'features/nodes/types/invocation'; import type { UpscaleState } from 'features/parameters/store/upscaleSlice'; import { selectUpscaleSlice } from 'features/parameters/store/upscaleSlice';