formatting

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-05 16:45:45 -03:00
commit 2fcc8296d2
67 changed files with 227 additions and 226 deletions

View file

@ -118,7 +118,7 @@ export default function App() {
const removeAlert = (id: string) => {
setAlertsList((prevAlertsList) =>
prevAlertsList.filter((alert) => alert.id !== id)
prevAlertsList.filter((alert) => alert.id !== id),
);
};

View file

@ -59,7 +59,7 @@ export default function ParameterComponent({
}, [data.id, position, updateNodeInternals]);
const [enabled, setEnabled] = useState(
data.node.template[name]?.value ?? false
data.node.template[name]?.value ?? false,
);
useEffect(() => {}, [closePopUp, data.node.template]);
@ -101,7 +101,7 @@ export default function ParameterComponent({
<span
key={getRandomKeyByssmm()}
className={classNames(
i > 0 ? "items-center flex mt-3" : "items-center flex"
i > 0 ? "items-center flex mt-3" : "items-center flex",
)}
>
<div
@ -183,7 +183,7 @@ export default function ParameterComponent({
}
className={classNames(
left ? "-ml-0.5 " : "-mr-0.5 ",
"w-3 h-3 rounded-full border-2 bg-white dark:bg-gray-800"
"w-3 h-3 rounded-full border-2 bg-white dark:bg-gray-800",
)}
style={{
borderColor: color,

View file

@ -82,7 +82,7 @@ export default function GenericNode({
<div
className={classNames(
selected ? "border border-ring" : "border dark:border-gray-700",
"prompt-node relative flex w-96 flex-col justify-center rounded-lg bg-white dark:bg-gray-900"
"prompt-node relative flex w-96 flex-col justify-center rounded-lg bg-white dark:bg-gray-900",
)}
>
<div className="flex w-full items-center justify-between gap-8 rounded-t-lg border-b bg-muted p-4 dark:border-b-gray-700 dark:bg-gray-800 dark:text-white ">
@ -132,7 +132,7 @@ export default function GenericNode({
validationStatus && validationStatus.valid
? "w-4 h-4 rounded-full bg-green-500 opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200",
)}
></div>
<div
@ -140,7 +140,7 @@ export default function GenericNode({
validationStatus && !validationStatus.valid
? "w-4 h-4 rounded-full bg-red-500 opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200",
)}
></div>
<div
@ -148,7 +148,7 @@ export default function GenericNode({
!validationStatus || isBuilding
? "w-4 h-4 rounded-full bg-yellow-500 opacity-100"
: "w-4 h-4 rounded-full bg-gray-500 opacity-0 hidden animate-spin",
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200"
"absolute w-4 hover:text-gray-500 hover:dark:text-gray-300 transition-all ease-in-out duration-200",
)}
></div>
</div>
@ -217,7 +217,7 @@ export default function GenericNode({
<div
className={classNames(
Object.keys(data.node.template).length < 1 ? "hidden" : "",
"flex w-full justify-center"
"flex w-full justify-center",
)}
>
{" "}

View file

@ -18,7 +18,7 @@ export default function AccordionComponent({
open = [],
}: AccordionComponentType) {
const [value, setValue] = useState(
open.length == 0 ? "" : getOpenAccordion()
open.length == 0 ? "" : getOpenAccordion(),
);
function getOpenAccordion() {

View file

@ -34,7 +34,7 @@ export default function ExtraSidebar() {
item.href.split("/")[2] === current[4]
? "bg-muted text-gray-900"
: "bg-white text-gray-600 hover:bg-muted hover:text-gray-900",
"group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md"
"group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md",
)}
>
<item.icon
@ -42,7 +42,7 @@ export default function ExtraSidebar() {
item.href.split("/")[2] === current[4]
? "text-gray-500"
: "text-gray-400 group-hover:text-gray-500",
"mr-3 flex-shrink-0 h-6 w-6"
"mr-3 flex-shrink-0 h-6 w-6",
)}
/>
{item.name}
@ -61,7 +61,7 @@ export default function ExtraSidebar() {
item.href.split("/")[2] === current[4]
? "bg-muted text-gray-900"
: "bg-white text-gray-600 hover:bg-muted hover:text-gray-900",
"group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none focus:ring-1 focus:ring-indigo-500"
"group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none focus:ring-1 focus:ring-indigo-500",
)}
>
<item.icon
@ -74,7 +74,7 @@ export default function ExtraSidebar() {
open
? "text-gray-400 rotate-90"
: "text-gray-300",
"ml-3 h-5 w-5 flex-shrink-0 transition-rotate duration-150 ease-in-out group-hover:text-gray-400"
"ml-3 h-5 w-5 flex-shrink-0 transition-rotate duration-150 ease-in-out group-hover:text-gray-400",
)}
viewBox="0 0 20 20"
aria-hidden="true"
@ -94,7 +94,7 @@ export default function ExtraSidebar() {
subItem.href.split("/")[3] === current[5]
? "bg-muted text-gray-900"
: "bg-white text-gray-600 hover:bg-muted hover:text-gray-900",
"group flex w-full items-center rounded-md py-2 pl-11 pr-2 text-sm font-medium"
"group flex w-full items-center rounded-md py-2 pl-11 pr-2 text-sm font-medium",
)}
>
{subItem.name}
@ -104,7 +104,7 @@ export default function ExtraSidebar() {
</>
)}
</Disclosure>
)
),
)}
</nav>
</div>

View file

@ -38,7 +38,7 @@ const TooltipReact: FC<TooltipProps> = ({
content={content}
className={classNames(
"!bg-white !text-xs !font-normal !text-gray-700 !shadow-md !opacity-100 z-[9999]",
className
className,
)}
place={position}
clickable={clickable}

View file

@ -126,7 +126,7 @@ export default function BuildTrigger({
async function enforceMinimumLoadingTime(
startTime: number,
minimumLoadingTime: number
minimumLoadingTime: number,
) {
const elapsedTime = Date.now() - startTime;
const remainingTime = minimumLoadingTime - elapsedTime;

View file

@ -45,7 +45,7 @@ export default function Chat({ flow }: ChatType) {
useEffect(() => {
const prevNodes = prevNodesRef.current;
const currentNodes = nodes.map(
(node: NodeType) => node.data.node.template.value
(node: NodeType) => node.data.node.template.value,
);
if (

View file

@ -13,7 +13,7 @@ export default function CodeAreaComponent({
editNode = false,
}: TextAreaComponentType) {
const [myValue, setMyValue] = useState(
typeof value == "string" ? value : JSON.stringify(value)
typeof value == "string" ? value : JSON.stringify(value),
);
const { openPopUp } = useContext(PopUpContext);
useEffect(() => {
@ -43,7 +43,7 @@ export default function CodeAreaComponent({
setMyValue(t);
onChange(t);
}}
/>
/>,
);
}}
className={
@ -67,7 +67,7 @@ export default function CodeAreaComponent({
setMyValue(t);
onChange(t);
}}
/>
/>,
);
}}
>

View file

@ -18,7 +18,7 @@ export default function Dropdown({
const { closePopUp } = useContext(PopUpContext);
let [internalValue, setInternalValue] = useState(
value === "" || !value ? "Choose an option" : value
value === "" || !value ? "Choose an option" : value,
);
useEffect(() => {
@ -71,7 +71,7 @@ export default function Dropdown({
editNode
? "z-10 mt-1 max-h-60 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm w-[215px]"
: "nowheel z-10 mt-1 max-h-60 w-full overflow-auto overflow-y rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm ",
apiModal ? "w-[250px] mb-2" : "absolute"
apiModal ? "w-[250px] mb-2" : "absolute",
)}
>
{options.map((option, id) => (
@ -84,7 +84,7 @@ export default function Dropdown({
: "",
editNode
? "relative cursor-default select-none py-0.5 pl-3 pr-12 dark:text-gray-300 dark:bg-gray-800"
: "relative cursor-default select-none py-2 pl-3 pr-9 dark:text-gray-300 dark:bg-gray-800"
: "relative cursor-default select-none py-2 pl-3 pr-9 dark:text-gray-300 dark:bg-gray-800",
)
}
value={option}
@ -94,7 +94,7 @@ export default function Dropdown({
<span
className={classNames(
selected ? "font-semibold" : "font-normal",
"block truncate "
"block truncate ",
)}
>
{option}
@ -104,7 +104,7 @@ export default function Dropdown({
<span
className={classNames(
active ? "text-white dark:text-black" : "",
"absolute inset-y-0 right-0 flex items-center pr-4"
"absolute inset-y-0 right-0 flex items-center pr-4",
)}
>
<Check

View file

@ -128,7 +128,7 @@ export default function Header() {
<AlertDropdown />
</div>
<div className="h-screen w-screen fixed top-0 left-0"></div>
</>
</>,
);
}}
>

View file

@ -53,7 +53,7 @@ export default function InputComponent({
? "border-1 block w-full pt-0.5 pb-0.5 form-input dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600 rounded-md border-gray-300 shadow-sm sm:text-sm text-center" +
INPUT_STYLE
: "ring-offset-gray-200" + INPUT_STYLE,
password && editNode ? "pr-8" : "pr-3"
password && editNode ? "pr-8" : "pr-3",
)}
placeholder={password && editNode ? "Key" : "Type something..."}
onChange={(e) => {
@ -66,7 +66,7 @@ export default function InputComponent({
className={classNames(
editNode
? "absolute inset-y-0 right-0 pr-2 items-center text-gray-600"
: "absolute inset-y-0 right-0 items-center px-4 text-gray-600"
: "absolute inset-y-0 right-0 items-center px-4 text-gray-600",
)}
onClick={() => {
setPwdVisible(!pwdVisible);
@ -83,7 +83,7 @@ export default function InputComponent({
className={classNames(
editNode
? "w-5 h-5 absolute bottom-0.5 right-2"
: "w-5 h-5 absolute bottom-2 right-3"
: "w-5 h-5 absolute bottom-2 right-3",
)}
>
<path
@ -102,7 +102,7 @@ export default function InputComponent({
className={classNames(
editNode
? "w-5 h-5 absolute bottom-0.5 right-2"
: "w-5 h-5 absolute bottom-2 right-3"
: "w-5 h-5 absolute bottom-2 right-3",
)}
>
<path

View file

@ -44,7 +44,7 @@ export default function PromptAreaComponent({
setMyValue(t);
onChange(t);
}}
/>
/>,
);
}}
className={
@ -70,7 +70,7 @@ export default function PromptAreaComponent({
setMyValue(t);
onChange(t);
}}
/>
/>,
);
}}
>

View file

@ -47,7 +47,7 @@ export default function TextAreaComponent({
setMyValue(t);
onChange(t);
}}
/>
/>,
);
}}
className={
@ -73,7 +73,7 @@ export default function TextAreaComponent({
setMyValue(t);
onChange(t);
}}
/>
/>,
);
}}
>

View file

@ -22,7 +22,7 @@ export default function ToggleComponent({
}}
className={classNames(
enabled ? "bg-primary" : "bg-gray-200",
"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-1 focus:ring-primary focus:ring-offset-1"
"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-1 focus:ring-primary focus:ring-offset-1",
)}
>
<span className="sr-only">Use setting</span>
@ -32,7 +32,7 @@ export default function ToggleComponent({
"pointer-events-none relative inline-block h-5 w-5 transform rounded-full shadow ring-0 transition duration-200 ease-in-out",
disabled
? "bg-gray-200 dark:bg-gray-600"
: "bg-white dark:bg-gray-800"
: "bg-white dark:bg-gray-800",
)}
>
<span
@ -40,7 +40,7 @@ export default function ToggleComponent({
enabled
? "opacity-0 ease-out duration-100"
: "opacity-100 ease-in duration-200",
"absolute inset-0 flex h-full w-full items-center justify-center transition-opacity"
"absolute inset-0 flex h-full w-full items-center justify-center transition-opacity",
)}
aria-hidden="true"
></span>
@ -49,7 +49,7 @@ export default function ToggleComponent({
enabled
? "opacity-100 ease-in duration-200"
: "opacity-0 ease-out duration-100",
"absolute inset-0 flex h-full w-full items-center justify-center transition-opacity"
"absolute inset-0 flex h-full w-full items-center justify-center transition-opacity",
)}
aria-hidden="true"
></span>

View file

@ -28,7 +28,7 @@ const AccordionTrigger = React.forwardRef<
ref={ref}
className={cn(
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
className
className,
)}
{...props}
>
@ -47,7 +47,7 @@ const AccordionContent = React.forwardRef<
ref={ref}
className={cn(
"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
className
className,
)}
{...props}
>

View file

@ -19,7 +19,7 @@ const badgeVariants = cva(
defaultVariants: {
variant: "default",
},
}
},
);
export interface BadgeProps

View file

@ -30,7 +30,7 @@ const buttonVariants = cva(
variant: "default",
size: "default",
},
}
},
);
export interface ButtonProps
@ -49,7 +49,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
{...props}
/>
);
}
},
);
Button.displayName = "Button";

View file

@ -9,7 +9,7 @@ const Card = React.forwardRef<
ref={ref}
className={cn(
"rounded-lg flex flex-col justify-between border bg-card text-card-foreground shadow-sm hover:shadow-lg transition-all",
className
className,
)}
{...props}
/>
@ -36,7 +36,7 @@ const CardTitle = React.forwardRef<
ref={ref}
className={cn(
"text-base font-semibold leading-tight tracking-tight",
className
className,
)}
{...props}
/>

View file

@ -13,7 +13,7 @@ const Checkbox = React.forwardRef<
ref={ref}
className={cn(
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
className
className,
)}
{...props}
>

Some files were not shown because too many files have changed in this diff Show more