format code
This commit is contained in:
parent
7d2f853630
commit
2f1b675122
34 changed files with 38 additions and 72 deletions
|
|
@ -3,25 +3,24 @@ import { nodeIconsLucide, svgIcons } from "../../utils";
|
||||||
|
|
||||||
export function IconFromLucide({ name }: IconProps): JSX.Element {
|
export function IconFromLucide({ name }: IconProps): JSX.Element {
|
||||||
const TargetIcon = nodeIconsLucide[name];
|
const TargetIcon = nodeIconsLucide[name];
|
||||||
return (
|
return <TargetIcon />;
|
||||||
<TargetIcon />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function IconFromSvg({ name }: IconProps): JSX.Element {
|
export function IconFromSvg({ name }: IconProps): JSX.Element {
|
||||||
const TargetSvg = svgIcons[name];
|
const TargetSvg = svgIcons[name];
|
||||||
return (
|
return <TargetSvg />;
|
||||||
<TargetSvg />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function IconComponent({ method, name }: IconComponentProps): JSX.Element {
|
export default function IconComponent({
|
||||||
|
method,
|
||||||
|
name,
|
||||||
|
}: IconComponentProps): JSX.Element {
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case 'SVG':
|
case "SVG":
|
||||||
return <IconFromSvg name={ name } />
|
return <IconFromSvg name={name} />;
|
||||||
case 'LUCIDE':
|
case "LUCIDE":
|
||||||
return <IconFromLucide name={ name } />
|
return <IconFromLucide name={name} />;
|
||||||
default:
|
default:
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgAirbyte = (props) => (
|
const SvgAirbyte = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgAnthropic = (props) => (
|
const SvgAnthropic = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgAnthropicBox = (props) => (
|
const SvgAnthropicBox = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgAzLogo = (props) => (
|
const SvgAzLogo = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgBing = (props) => (
|
const SvgBing = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgChroma = (props) => (
|
const SvgChroma = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgCohere = (props) => (
|
const SvgCohere = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgEvernoteIcon = (props) => (
|
const SvgEvernoteIcon = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgFacebookMessengerLogo2020 = (props) => (
|
const SvgFacebookMessengerLogo2020 = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgGitbookSvgrepoCom = (props) => (
|
const SvgGitbookSvgrepoCom = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgGoogle = (props) => (
|
const SvgGoogle = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgHfLogo = (props) => (
|
const SvgHfLogo = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgIfixitSeeklogocom = (props) => (
|
const SvgIfixitSeeklogocom = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgMetaIcon = (props) => (
|
const SvgMetaIcon = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgMidjourneyEmblem = (props) => (
|
const SvgMidjourneyEmblem = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgMongodbIcon = (props) => (
|
const SvgMongodbIcon = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgNotionLogo = (props) => (
|
const SvgNotionLogo = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgOpenAi = (props) => (
|
const SvgOpenAi = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgPineconeLogo = (props) => (
|
const SvgPineconeLogo = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgPowerPoint = (props) => (
|
const SvgPowerPoint = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgQDrant = (props) => (
|
const SvgQDrant = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgReadthedocsioIcon = (props) => (
|
const SvgReadthedocsioIcon = (props) => (
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" {...props}>
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" {...props}>
|
||||||
<path
|
<path
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgSearxLogo = (props) => (
|
const SvgSearxLogo = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgSerper = (props) => (
|
const SvgSerper = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgSlackIcon = (props) => (
|
const SvgSlackIcon = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgVertexAi = (props) => (
|
const SvgVertexAi = (props) => (
|
||||||
<svg viewBox="0 0 32 32" width="1em" height="1em" {...props}>
|
<svg viewBox="0 0 32 32" width="1em" height="1em" {...props}>
|
||||||
<path
|
<path
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgWeaviate = (props) => (
|
const SvgWeaviate = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgWikipedia = (props) => (
|
const SvgWikipedia = (props) => (
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" {...props}>
|
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" {...props}>
|
||||||
<defs>
|
<defs>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgWolfram = (props) => (
|
const SvgWolfram = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgWord = (props) => (
|
const SvgWord = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgYCombinatorLogo = (props) => (
|
const SvgYCombinatorLogo = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import * as React from "react";
|
|
||||||
const SvgSupabaseIcon = (props) => (
|
const SvgSupabaseIcon = (props) => (
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
|
|
||||||
|
|
@ -20,66 +20,65 @@ import {
|
||||||
Wand2,
|
Wand2,
|
||||||
Wrench,
|
Wrench,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { ComponentType, SVGProps } from "react";
|
|
||||||
import { Connection, Edge, Node, ReactFlowInstance } from "reactflow";
|
import { Connection, Edge, Node, ReactFlowInstance } from "reactflow";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "./flow_constants";
|
import { ADJECTIVES, DESCRIPTIONS, NOUNS } from "./flow_constants";
|
||||||
import { AirbyteIcon } from "./icons/Airbyte";
|
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 SvgAirbyte from "./icons/Airbyte/Airbyte";
|
||||||
|
import { AnthropicIcon } from "./icons/Anthropic";
|
||||||
import SvgAnthropicBox from "./icons/Anthropic/AnthropicBox";
|
import SvgAnthropicBox from "./icons/Anthropic/AnthropicBox";
|
||||||
|
import { BingIcon } from "./icons/Bing";
|
||||||
import SvgBing from "./icons/Bing/Bing";
|
import SvgBing from "./icons/Bing/Bing";
|
||||||
|
import { ChromaIcon } from "./icons/ChromaIcon";
|
||||||
import SvgChroma from "./icons/ChromaIcon/Chroma";
|
import SvgChroma from "./icons/ChromaIcon/Chroma";
|
||||||
|
import { CohereIcon } from "./icons/Cohere";
|
||||||
import SvgCohere from "./icons/Cohere/Cohere";
|
import SvgCohere from "./icons/Cohere/Cohere";
|
||||||
|
import { EvernoteIcon } from "./icons/Evernote";
|
||||||
import SvgEvernoteIcon from "./icons/Evernote/EvernoteIcon";
|
import SvgEvernoteIcon from "./icons/Evernote/EvernoteIcon";
|
||||||
|
import { FBIcon } from "./icons/FacebookMessenger";
|
||||||
import SvgFacebookMessengerLogo2020 from "./icons/FacebookMessenger/FacebookMessengerLogo2020";
|
import SvgFacebookMessengerLogo2020 from "./icons/FacebookMessenger/FacebookMessengerLogo2020";
|
||||||
|
import { GitBookIcon } from "./icons/GitBook";
|
||||||
import SvgGitbookSvgrepoCom from "./icons/GitBook/GitbookSvgrepoCom";
|
import SvgGitbookSvgrepoCom from "./icons/GitBook/GitbookSvgrepoCom";
|
||||||
|
import { GoogleIcon } from "./icons/Google";
|
||||||
import SvgGoogle from "./icons/Google/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 SvgHfLogo from "./icons/HuggingFace/HfLogo";
|
||||||
|
import { IFixIcon } from "./icons/IFixIt";
|
||||||
import SvgIfixitSeeklogocom from "./icons/IFixIt/IfixitSeeklogoCom";
|
import SvgIfixitSeeklogocom from "./icons/IFixIt/IfixitSeeklogoCom";
|
||||||
|
import { MetaIcon } from "./icons/Meta";
|
||||||
import SvgMetaIcon from "./icons/Meta/MetaIcon";
|
import SvgMetaIcon from "./icons/Meta/MetaIcon";
|
||||||
|
import { MidjourneyIcon } from "./icons/Midjorney";
|
||||||
import SvgMidjourneyEmblem from "./icons/Midjorney/MidjourneyEmblem";
|
import SvgMidjourneyEmblem from "./icons/Midjorney/MidjourneyEmblem";
|
||||||
|
import { MongoDBIcon } from "./icons/MongoDB";
|
||||||
import SvgMongodbIcon from "./icons/MongoDB/MongodbIcon";
|
import SvgMongodbIcon from "./icons/MongoDB/MongodbIcon";
|
||||||
|
import { NotionIcon } from "./icons/Notion";
|
||||||
import SvgNotionLogo from "./icons/Notion/NotionLogo";
|
import SvgNotionLogo from "./icons/Notion/NotionLogo";
|
||||||
|
import { OpenAiIcon } from "./icons/OpenAi";
|
||||||
import SvgOpenAi from "./icons/OpenAi/OpenAi";
|
import SvgOpenAi from "./icons/OpenAi/OpenAi";
|
||||||
|
import { PineconeIcon } from "./icons/Pinecone";
|
||||||
import SvgPineconeLogo from "./icons/Pinecone/PineconeLogo";
|
import SvgPineconeLogo from "./icons/Pinecone/PineconeLogo";
|
||||||
import SvgPowerPoint from "./icons/PowerPoint/PowerPoint";
|
import SvgPowerPoint from "./icons/PowerPoint/PowerPoint";
|
||||||
|
import { QDrantIcon } from "./icons/QDrant";
|
||||||
import SvgQDrant from "./icons/QDrant/QDrant";
|
import SvgQDrant from "./icons/QDrant/QDrant";
|
||||||
import SvgReadthedocsioIcon from "./icons/ReadTheDocs/ReadthedocsioIcon";
|
import SvgReadthedocsioIcon from "./icons/ReadTheDocs/ReadthedocsioIcon";
|
||||||
|
import { SearxIcon } from "./icons/Searx";
|
||||||
import SvgSearxLogo from "./icons/Searx/SearxLogo";
|
import SvgSearxLogo from "./icons/Searx/SearxLogo";
|
||||||
import SvgSerper from "./icons/Serper/Serper";
|
import SvgSerper from "./icons/Serper/Serper";
|
||||||
|
import { SlackIcon } from "./icons/Slack";
|
||||||
import SvgSlackIcon from "./icons/Slack/SlackIcon";
|
import SvgSlackIcon from "./icons/Slack/SlackIcon";
|
||||||
import SvgSupabaseIcon from "./icons/supabase/SupabaseIcon";
|
import { VertexAIIcon } from "./icons/VertexAI";
|
||||||
import SvgVertexAi from "./icons/VertexAI/VertexAi";
|
import SvgVertexAi from "./icons/VertexAI/VertexAi";
|
||||||
import SvgWeaviate from "./icons/Weaviate/Weaviate";
|
import SvgWeaviate from "./icons/Weaviate/Weaviate";
|
||||||
import SvgWikipedia from "./icons/Wikipedia/Wikipedia";
|
import SvgWikipedia from "./icons/Wikipedia/Wikipedia";
|
||||||
import SvgWolfram from "./icons/Wolfram/Wolfram";
|
import SvgWolfram from "./icons/Wolfram/Wolfram";
|
||||||
import SvgWord from "./icons/Word/Word";
|
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>) {
|
export function classNames(...classes: Array<string>) {
|
||||||
return classes.filter(Boolean).join(" ");
|
return classes.filter(Boolean).join(" ");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue