mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
chore(ui): lint
This commit is contained in:
@@ -84,12 +84,6 @@ export type WorkflowV3 = z.infer<typeof zWorkflowV3>;
|
||||
// #endregion
|
||||
|
||||
// #region Workflow Builder
|
||||
export const elements: Record<string, FormElement> = {};
|
||||
|
||||
export const addElement = (element: FormElement) => {
|
||||
elements[element.id] = element;
|
||||
};
|
||||
|
||||
const zElementId = z.string().trim().min(1);
|
||||
export type ElementId = z.infer<typeof zElementId>;
|
||||
|
||||
@@ -123,11 +117,6 @@ export const buildNodeField = (
|
||||
};
|
||||
return element;
|
||||
};
|
||||
const _nodeField = (...args: Parameters<typeof buildNodeField>): NodeFieldElement => {
|
||||
const element = buildNodeField(...args);
|
||||
addElement(element);
|
||||
return element;
|
||||
};
|
||||
|
||||
const HEADING_TYPE = 'heading';
|
||||
export const HEADING_CLASS_NAME = getPrefixedId(HEADING_TYPE, '-');
|
||||
@@ -156,11 +145,6 @@ export const buildHeading = (
|
||||
};
|
||||
return element;
|
||||
};
|
||||
const _heading = (...args: Parameters<typeof buildHeading>): HeadingElement => {
|
||||
const element = buildHeading(...args);
|
||||
addElement(element);
|
||||
return element;
|
||||
};
|
||||
|
||||
const TEXT_TYPE = 'text';
|
||||
export const TEXT_CLASS_NAME = getPrefixedId(TEXT_TYPE, '-');
|
||||
@@ -189,11 +173,6 @@ export const buildText = (
|
||||
};
|
||||
return element;
|
||||
};
|
||||
const _text = (...args: Parameters<typeof buildText>): TextElement => {
|
||||
const element = buildText(...args);
|
||||
addElement(element);
|
||||
return element;
|
||||
};
|
||||
|
||||
const DIVIDER_TYPE = 'divider';
|
||||
export const DIVIDER_CLASS_NAME = getPrefixedId(DIVIDER_TYPE, '-');
|
||||
@@ -210,11 +189,6 @@ export const buildDivider = (parentId?: NodeFieldElement['parentId']): DividerEl
|
||||
};
|
||||
return element;
|
||||
};
|
||||
const _divider = (...args: Parameters<typeof buildDivider>): DividerElement => {
|
||||
const element = buildDivider(...args);
|
||||
addElement(element);
|
||||
return element;
|
||||
};
|
||||
|
||||
const CONTAINER_TYPE = 'container';
|
||||
export const CONTAINER_CLASS_NAME = getPrefixedId(CONTAINER_TYPE, '-');
|
||||
@@ -243,11 +217,6 @@ export const buildContainer = (
|
||||
};
|
||||
return element;
|
||||
};
|
||||
export const _container = (...args: Parameters<typeof buildContainer>): ContainerElement => {
|
||||
const element = buildContainer(...args);
|
||||
addElement(element);
|
||||
return element;
|
||||
};
|
||||
|
||||
const zFormElement = z.union([zContainerElement, zNodeFieldElement, zHeadingElement, zTextElement, zDividerElement]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user