format code

This commit is contained in:
anovazzi1 2023-07-14 15:19:52 -03:00
commit 2f1b675122
34 changed files with 38 additions and 72 deletions

View file

@ -3,25 +3,24 @@ import { nodeIconsLucide, svgIcons } from "../../utils";
export function IconFromLucide({ name }: IconProps): JSX.Element {
const TargetIcon = nodeIconsLucide[name];
return (
<TargetIcon />
);
return <TargetIcon />;
}
export function IconFromSvg({ name }: IconProps): JSX.Element {
const TargetSvg = svgIcons[name];
return (
<TargetSvg />
);
return <TargetSvg />;
}
export default function IconComponent({ method, name }: IconComponentProps): JSX.Element {
export default function IconComponent({
method,
name,
}: IconComponentProps): JSX.Element {
switch (method) {
case 'SVG':
return <IconFromSvg name={ name } />
case 'LUCIDE':
return <IconFromLucide name={ name } />
case "SVG":
return <IconFromSvg name={name} />;
case "LUCIDE":
return <IconFromLucide name={name} />;
default:
return
return;
}
}

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgAirbyte = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgAnthropic = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgAnthropicBox = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgAzLogo = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgBing = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgChroma = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgCohere = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgEvernoteIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgFacebookMessengerLogo2020 = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgGitbookSvgrepoCom = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgGoogle = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgHfLogo = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgIfixitSeeklogocom = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgMetaIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgMidjourneyEmblem = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgMongodbIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgNotionLogo = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgOpenAi = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgPineconeLogo = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgPowerPoint = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgQDrant = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgReadthedocsioIcon = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" {...props}>
<path

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgSearxLogo = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgSerper = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgSlackIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgVertexAi = (props) => (
<svg viewBox="0 0 32 32" width="1em" height="1em" {...props}>
<path

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgWeaviate = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgWikipedia = (props) => (
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" {...props}>
<defs>

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgWolfram = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgWord = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgYCombinatorLogo = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -1,4 +1,3 @@
import * as React from "react";
const SvgSupabaseIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"

View file

@ -20,66 +20,65 @@ import {
Wand2,
Wrench,
} from "lucide-react";
import { ComponentType, SVGProps } from "react";
import { Connection, Edge, Node, ReactFlowInstance } from "reactflow";
import { twMerge } from "tailwind-merge";
import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "./flow_constants";
import { AirbyteIcon } from "./icons/Airbyte";
import { AnthropicIcon } from "./icons/Anthropic";
import { BingIcon } from "./icons/Bing";
import { ChromaIcon } from "./icons/ChromaIcon";
import { CohereIcon } from "./icons/Cohere";
import { EvernoteIcon } from "./icons/Evernote";
import { FBIcon } from "./icons/FacebookMessenger";
import { GitBookIcon } from "./icons/GitBook";
import { GoogleIcon } from "./icons/Google";
import { HuggingFaceIcon } from "./icons/HuggingFace";
import { IFixIcon } from "./icons/IFixIt";
import { MetaIcon } from "./icons/Meta";
import { MidjourneyIcon } from "./icons/Midjorney";
import { MongoDBIcon } from "./icons/MongoDB";
import { NotionIcon } from "./icons/Notion";
import { OpenAiIcon } from "./icons/OpenAi";
import { PineconeIcon } from "./icons/Pinecone";
import { QDrantIcon } from "./icons/QDrant";
import { SearxIcon } from "./icons/Searx";
import { SlackIcon } from "./icons/Slack";
import { VertexAIIcon } from "./icons/VertexAI";
import { HackerNewsIcon } from "./icons/hackerNews";
import { SupabaseIcon } from "./icons/supabase";
import { APITemplateType } from "./types/api";
import { IVarHighlightType } from "./types/components";
import { FlowType, NodeType } from "./types/flow";
import SvgAirbyte from "./icons/Airbyte/Airbyte";
import { AnthropicIcon } from "./icons/Anthropic";
import SvgAnthropicBox from "./icons/Anthropic/AnthropicBox";
import { BingIcon } from "./icons/Bing";
import SvgBing from "./icons/Bing/Bing";
import { ChromaIcon } from "./icons/ChromaIcon";
import SvgChroma from "./icons/ChromaIcon/Chroma";
import { CohereIcon } from "./icons/Cohere";
import SvgCohere from "./icons/Cohere/Cohere";
import { EvernoteIcon } from "./icons/Evernote";
import SvgEvernoteIcon from "./icons/Evernote/EvernoteIcon";
import { FBIcon } from "./icons/FacebookMessenger";
import SvgFacebookMessengerLogo2020 from "./icons/FacebookMessenger/FacebookMessengerLogo2020";
import { GitBookIcon } from "./icons/GitBook";
import SvgGitbookSvgrepoCom from "./icons/GitBook/GitbookSvgrepoCom";
import { GoogleIcon } from "./icons/Google";
import SvgGoogle from "./icons/Google/Google";
import SvgYCombinatorLogo from "./icons/hackerNews/YCombinatorLogo";
import { HuggingFaceIcon } from "./icons/HuggingFace";
import SvgHfLogo from "./icons/HuggingFace/HfLogo";
import { IFixIcon } from "./icons/IFixIt";
import SvgIfixitSeeklogocom from "./icons/IFixIt/IfixitSeeklogoCom";
import { MetaIcon } from "./icons/Meta";
import SvgMetaIcon from "./icons/Meta/MetaIcon";
import { MidjourneyIcon } from "./icons/Midjorney";
import SvgMidjourneyEmblem from "./icons/Midjorney/MidjourneyEmblem";
import { MongoDBIcon } from "./icons/MongoDB";
import SvgMongodbIcon from "./icons/MongoDB/MongodbIcon";
import { NotionIcon } from "./icons/Notion";
import SvgNotionLogo from "./icons/Notion/NotionLogo";
import { OpenAiIcon } from "./icons/OpenAi";
import SvgOpenAi from "./icons/OpenAi/OpenAi";
import { PineconeIcon } from "./icons/Pinecone";
import SvgPineconeLogo from "./icons/Pinecone/PineconeLogo";
import SvgPowerPoint from "./icons/PowerPoint/PowerPoint";
import { QDrantIcon } from "./icons/QDrant";
import SvgQDrant from "./icons/QDrant/QDrant";
import SvgReadthedocsioIcon from "./icons/ReadTheDocs/ReadthedocsioIcon";
import { SearxIcon } from "./icons/Searx";
import SvgSearxLogo from "./icons/Searx/SearxLogo";
import SvgSerper from "./icons/Serper/Serper";
import { SlackIcon } from "./icons/Slack";
import SvgSlackIcon from "./icons/Slack/SlackIcon";
import SvgSupabaseIcon from "./icons/supabase/SupabaseIcon";
import { VertexAIIcon } from "./icons/VertexAI";
import SvgVertexAi from "./icons/VertexAI/VertexAi";
import SvgWeaviate from "./icons/Weaviate/Weaviate";
import SvgWikipedia from "./icons/Wikipedia/Wikipedia";
import SvgWolfram from "./icons/Wolfram/Wolfram";
import SvgWord from "./icons/Word/Word";
import { HackerNewsIcon } from "./icons/hackerNews";
import SvgYCombinatorLogo from "./icons/hackerNews/YCombinatorLogo";
import { SupabaseIcon } from "./icons/supabase";
import SvgSupabaseIcon from "./icons/supabase/SupabaseIcon";
import { APITemplateType } from "./types/api";
import { IVarHighlightType } from "./types/components";
import { FlowType, NodeType } from "./types/flow";
export function classNames(...classes: Array<string>) {
return classes.filter(Boolean).join(" ");