mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 04:00:09 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
15
package/@stackframe/react/dist/esm/components/elements/form-warning.js
vendored
Normal file
15
package/@stackframe/react/dist/esm/components/elements/form-warning.js
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/components/elements/form-warning.tsx
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
function FormWarningText({ text }) {
|
||||
if (!text) {
|
||||
return null;
|
||||
}
|
||||
return /* @__PURE__ */ jsx("div", { className: "text-red-500 text-sm mt-1", children: text });
|
||||
}
|
||||
export {
|
||||
FormWarningText
|
||||
};
|
||||
//# sourceMappingURL=form-warning.js.map
|
||||
1
package/@stackframe/react/dist/esm/components/elements/form-warning.js.map
vendored
Normal file
1
package/@stackframe/react/dist/esm/components/elements/form-warning.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components/elements/form-warning.tsx"],"sourcesContent":["'use client';\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\n\nexport function FormWarningText({ text }: { text?: string }) {\n if (!text) {\n return null;\n }\n return (\n <div className=\"text-red-500 text-sm mt-1\">\n {text}\n </div>\n );\n}\n"],"mappings":";;;AAYI;AALG,SAAS,gBAAgB,EAAE,KAAK,GAAsB;AAC3D,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SACE,oBAAC,SAAI,WAAU,6BACZ,gBACH;AAEJ;","names":[]}
|
||||
51
package/@stackframe/react/dist/esm/components/elements/maybe-full-page.js
vendored
Normal file
51
package/@stackframe/react/dist/esm/components/elements/maybe-full-page.js
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/components/elements/maybe-full-page.tsx
|
||||
import { useId } from "react";
|
||||
import { SsrScript } from "./ssr-layout-effect";
|
||||
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
||||
function MaybeFullPage({
|
||||
children,
|
||||
fullPage
|
||||
}) {
|
||||
const uniqueId = useId();
|
||||
const id = `stack-full-page-container-${uniqueId}`;
|
||||
const scriptString = `(([id]) => {
|
||||
const el = document.getElementById(id);
|
||||
if (!el) {
|
||||
// component is not full page
|
||||
return;
|
||||
}
|
||||
const offset = el.getBoundingClientRect().top + document.documentElement.scrollTop;
|
||||
el.style.minHeight = \`calc(100vh - \${offset}px)\`;
|
||||
})(${JSON.stringify([id])})`;
|
||||
if (fullPage) {
|
||||
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
||||
/* @__PURE__ */ jsx(
|
||||
"div",
|
||||
{
|
||||
suppressHydrationWarning: true,
|
||||
id,
|
||||
style: {
|
||||
minHeight: "100vh",
|
||||
alignSelf: "stretch",
|
||||
flexGrow: 1,
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center"
|
||||
},
|
||||
className: "stack-scope",
|
||||
children
|
||||
}
|
||||
),
|
||||
/* @__PURE__ */ jsx(SsrScript, { script: scriptString })
|
||||
] });
|
||||
} else {
|
||||
return /* @__PURE__ */ jsx(Fragment, { children });
|
||||
}
|
||||
}
|
||||
export {
|
||||
MaybeFullPage
|
||||
};
|
||||
//# sourceMappingURL=maybe-full-page.js.map
|
||||
1
package/@stackframe/react/dist/esm/components/elements/maybe-full-page.js.map
vendored
Normal file
1
package/@stackframe/react/dist/esm/components/elements/maybe-full-page.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components/elements/maybe-full-page.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\n\nimport React, { useId } from \"react\";\nimport { SsrScript } from \"./ssr-layout-effect\";\n\nexport function MaybeFullPage({\n children,\n fullPage,\n}: {\n children: React.ReactNode,\n fullPage: boolean,\n size?: number,\n containerClassName?: string,\n}) {\n const uniqueId = useId();\n const id = `stack-full-page-container-${uniqueId}`;\n\n const scriptString = `(([id]) => {\n const el = document.getElementById(id);\n if (!el) {\n // component is not full page\n return;\n }\n const offset = el.getBoundingClientRect().top + document.documentElement.scrollTop;\n el.style.minHeight = \\`calc(100vh - \\${offset}px)\\`;\n })(${JSON.stringify([id])})`;\n\n if (fullPage) {\n return (\n <>\n <div\n suppressHydrationWarning\n id={id}\n style={{\n minHeight: '100vh',\n alignSelf: 'stretch',\n flexGrow: 1,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n }}\n className=\"stack-scope\"\n >\n {children}\n </div>\n <SsrScript script={scriptString} />\n </>\n );\n } else {\n return <>\n {children}\n </>;\n }\n\n}\n"],"mappings":";;;AAOA,SAAgB,aAAa;AAC7B,SAAS,iBAAiB;AA0BpB,mBACE,KADF;AAxBC,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AACF,GAKG;AACD,QAAM,WAAW,MAAM;AACvB,QAAM,KAAK,6BAA6B,QAAQ;AAEhD,QAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQhB,KAAK,UAAU,CAAC,EAAE,CAAC,CAAC;AAEzB,MAAI,UAAU;AACZ,WACE,iCACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,0BAAwB;AAAA,UACxB;AAAA,UACA,OAAO;AAAA,YACL,WAAW;AAAA,YACX,WAAW;AAAA,YACX,UAAU;AAAA,YACV,SAAS;AAAA,YACT,gBAAgB;AAAA,YAChB,YAAY;AAAA,UACd;AAAA,UACA,WAAU;AAAA,UAET;AAAA;AAAA,MACH;AAAA,MACA,oBAAC,aAAU,QAAQ,cAAc;AAAA,OACnC;AAAA,EAEJ,OAAO;AACL,WAAO,gCACJ,UACH;AAAA,EACF;AAEF;","names":[]}
|
||||
17
package/@stackframe/react/dist/esm/components/elements/separator-with-text.js
vendored
Normal file
17
package/@stackframe/react/dist/esm/components/elements/separator-with-text.js
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/components/elements/separator-with-text.tsx
|
||||
import { Separator } from "@stackframe/stack-ui";
|
||||
import { jsx, jsxs } from "react/jsx-runtime";
|
||||
function SeparatorWithText({ text }) {
|
||||
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center my-6 stack-scope", children: [
|
||||
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(Separator, {}) }),
|
||||
/* @__PURE__ */ jsx("div", { className: "mx-2 text-sm text-zinc-500", children: text }),
|
||||
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(Separator, {}) })
|
||||
] });
|
||||
}
|
||||
export {
|
||||
SeparatorWithText
|
||||
};
|
||||
//# sourceMappingURL=separator-with-text.js.map
|
||||
1
package/@stackframe/react/dist/esm/components/elements/separator-with-text.js.map
vendored
Normal file
1
package/@stackframe/react/dist/esm/components/elements/separator-with-text.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components/elements/separator-with-text.tsx"],"sourcesContent":["'use client';\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\n\nimport { Separator } from \"@stackframe/stack-ui\";\n\nexport function SeparatorWithText({ text }: { text: string }) {\n return (\n <div className=\"flex items-center justify-center my-6 stack-scope\">\n <div className=\"flex-1\">\n <Separator />\n </div>\n <div className=\"mx-2 text-sm text-zinc-500\">{text}</div>\n <div className=\"flex-1\">\n <Separator />\n </div>\n </div>\n );\n}\n"],"mappings":";;;AAOA,SAAS,iBAAiB;AAItB,SAEI,KAFJ;AAFG,SAAS,kBAAkB,EAAE,KAAK,GAAqB;AAC5D,SACE,qBAAC,SAAI,WAAU,qDACb;AAAA,wBAAC,SAAI,WAAU,UACb,8BAAC,aAAU,GACb;AAAA,IACA,oBAAC,SAAI,WAAU,8BAA8B,gBAAK;AAAA,IAClD,oBAAC,SAAI,WAAU,UACb,8BAAC,aAAU,GACb;AAAA,KACF;AAEJ;","names":[]}
|
||||
95
package/@stackframe/react/dist/esm/components/elements/sidebar-layout.js
vendored
Normal file
95
package/@stackframe/react/dist/esm/components/elements/sidebar-layout.js
vendored
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/components/elements/sidebar-layout.tsx
|
||||
import { useHash } from "@stackframe/stack-shared/dist/hooks/use-hash";
|
||||
import { Button, Typography, cn } from "@stackframe/stack-ui";
|
||||
import { XIcon } from "lucide-react";
|
||||
import { useStackApp } from "../..";
|
||||
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
||||
function SidebarLayout(props) {
|
||||
const hash = useHash();
|
||||
const selectedIndex = props.items.findIndex((item) => item.id && item.id === hash);
|
||||
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
||||
/* @__PURE__ */ jsx("div", { className: cn("hidden sm:flex stack-scope h-full", props.className), children: /* @__PURE__ */ jsx(DesktopLayout, { items: props.items, title: props.title, selectedIndex }) }),
|
||||
/* @__PURE__ */ jsx("div", { className: cn("sm:hidden stack-scope h-full", props.className), children: /* @__PURE__ */ jsx(MobileLayout, { items: props.items, title: props.title, selectedIndex }) })
|
||||
] });
|
||||
}
|
||||
function Items(props) {
|
||||
const app = useStackApp();
|
||||
const navigate = app.useNavigate();
|
||||
const activeItemIndex = props.selectedIndex === -1 ? 0 : props.selectedIndex;
|
||||
return props.items.map((item, index) => item.type === "item" ? /* @__PURE__ */ jsxs(
|
||||
Button,
|
||||
{
|
||||
variant: "ghost",
|
||||
size: "sm",
|
||||
className: cn(
|
||||
activeItemIndex === index && "sm:bg-muted",
|
||||
"justify-start text-md text-zinc-800 dark:text-zinc-300 px-2 text-left"
|
||||
),
|
||||
onClick: () => {
|
||||
if (item.id) {
|
||||
navigate("#" + item.id);
|
||||
}
|
||||
},
|
||||
children: [
|
||||
item.icon,
|
||||
item.title
|
||||
]
|
||||
},
|
||||
index
|
||||
) : /* @__PURE__ */ jsx(Typography, { children: item.title }, index));
|
||||
}
|
||||
function DesktopLayout(props) {
|
||||
const selectedItem = props.items[props.selectedIndex === -1 ? 0 : props.selectedIndex];
|
||||
return /* @__PURE__ */ jsxs("div", { className: "stack-scope flex w-full h-full max-w-full relative", children: [
|
||||
/* @__PURE__ */ jsxs("div", { className: "flex max-w-[200px] min-w-[200px] border-r flex-col items-stretch gap-2 p-2 overflow-y-auto", children: [
|
||||
props.title && /* @__PURE__ */ jsx("div", { className: "mb-2 ml-2", children: /* @__PURE__ */ jsx(Typography, { type: "h2", className: "text-lg font-semibold text-zinc-800 dark:text-zinc-300", children: props.title }) }),
|
||||
/* @__PURE__ */ jsx(Items, { items: props.items, selectedIndex: props.selectedIndex })
|
||||
] }),
|
||||
/* @__PURE__ */ jsx("div", { className: "flex-1 w-0 flex justify-center gap-4 py-2 px-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col max-w-[800px] w-[800px]", children: [
|
||||
/* @__PURE__ */ jsxs("div", { className: "mt-4 mb-6", children: [
|
||||
/* @__PURE__ */ jsx(Typography, { type: "h4", className: "font-semibold", children: selectedItem.title }),
|
||||
selectedItem.description && /* @__PURE__ */ jsx(Typography, { variant: "secondary", type: "label", children: selectedItem.description })
|
||||
] }),
|
||||
/* @__PURE__ */ jsx("div", { className: "flex-1", children: selectedItem.content })
|
||||
] }) })
|
||||
] });
|
||||
}
|
||||
function MobileLayout(props) {
|
||||
const selectedItem = props.items[props.selectedIndex];
|
||||
const app = useStackApp();
|
||||
const navigate = app.useNavigate();
|
||||
if (props.selectedIndex === -1) {
|
||||
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 p-2", children: [
|
||||
props.title && /* @__PURE__ */ jsx("div", { className: "mb-2 ml-2", children: /* @__PURE__ */ jsx(Typography, { type: "h2", className: "text-lg font-semibold text-zinc-800 dark:text-zinc-300", children: props.title }) }),
|
||||
/* @__PURE__ */ jsx(Items, { items: props.items, selectedIndex: props.selectedIndex })
|
||||
] });
|
||||
} else {
|
||||
return /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-4 py-2 px-4", children: [
|
||||
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
||||
/* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
|
||||
/* @__PURE__ */ jsx(Typography, { type: "h4", className: "font-semibold", children: selectedItem.title }),
|
||||
/* @__PURE__ */ jsx(
|
||||
Button,
|
||||
{
|
||||
variant: "ghost",
|
||||
size: "icon",
|
||||
onClick: () => {
|
||||
navigate("#");
|
||||
},
|
||||
children: /* @__PURE__ */ jsx(XIcon, { className: "h-5 w-5" })
|
||||
}
|
||||
)
|
||||
] }),
|
||||
selectedItem.description && /* @__PURE__ */ jsx(Typography, { variant: "secondary", type: "label", children: selectedItem.description })
|
||||
] }),
|
||||
/* @__PURE__ */ jsx("div", { className: "flex-1", children: selectedItem.content })
|
||||
] });
|
||||
}
|
||||
}
|
||||
export {
|
||||
SidebarLayout
|
||||
};
|
||||
//# sourceMappingURL=sidebar-layout.js.map
|
||||
1
package/@stackframe/react/dist/esm/components/elements/sidebar-layout.js.map
vendored
Normal file
1
package/@stackframe/react/dist/esm/components/elements/sidebar-layout.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
23
package/@stackframe/react/dist/esm/components/elements/ssr-layout-effect.js
vendored
Normal file
23
package/@stackframe/react/dist/esm/components/elements/ssr-layout-effect.js
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"use client";
|
||||
"use client";
|
||||
|
||||
// src/components/elements/ssr-layout-effect.tsx
|
||||
import { useLayoutEffect } from "react";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
function SsrScript(props) {
|
||||
useLayoutEffect(() => {
|
||||
(0, eval)(props.script);
|
||||
}, []);
|
||||
return /* @__PURE__ */ jsx(
|
||||
"script",
|
||||
{
|
||||
suppressHydrationWarning: true,
|
||||
nonce: props.nonce,
|
||||
dangerouslySetInnerHTML: { __html: props.script }
|
||||
}
|
||||
);
|
||||
}
|
||||
export {
|
||||
SsrScript
|
||||
};
|
||||
//# sourceMappingURL=ssr-layout-effect.js.map
|
||||
1
package/@stackframe/react/dist/esm/components/elements/ssr-layout-effect.js.map
vendored
Normal file
1
package/@stackframe/react/dist/esm/components/elements/ssr-layout-effect.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components/elements/ssr-layout-effect.tsx"],"sourcesContent":["\"use client\";\n\n\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\nimport { useLayoutEffect } from \"react\";\n\nexport function SsrScript(props: { script: string, nonce?: string }) {\n useLayoutEffect(() => {\n // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense\n // As a workaround, we run the script in the <script> tag again after the first render\n // Note that we do an indirect eval as described here: https://esbuild.github.io/content-types/#direct-eval\n (0, eval)(props.script);\n }, []);\n\n return (\n <script\n suppressHydrationWarning // the transpiler is setup differently for client/server targets, so if `script` was generated with Function.toString they will differ\n nonce={props.nonce}\n dangerouslySetInnerHTML={{ __html: props.script }}\n />\n );\n}\n"],"mappings":";;;AAMA,SAAS,uBAAuB;AAW5B;AATG,SAAS,UAAU,OAA2C;AACnE,kBAAgB,MAAM;AAIpB,KAAC,GAAG,MAAM,MAAM,MAAM;AAAA,EACxB,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC,0BAAwB;AAAA,MACxB,OAAO,MAAM;AAAA,MACb,yBAAyB,EAAE,QAAQ,MAAM,OAAO;AAAA;AAAA,EAClD;AAEJ;","names":[]}
|
||||
16
package/@stackframe/react/dist/esm/components/elements/user-avatar.js
vendored
Normal file
16
package/@stackframe/react/dist/esm/components/elements/user-avatar.js
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// src/components/elements/user-avatar.tsx
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@stackframe/stack-ui";
|
||||
import { UserRound } from "lucide-react";
|
||||
import { jsx, jsxs } from "react/jsx-runtime";
|
||||
var defaultSize = 34;
|
||||
function UserAvatar(props) {
|
||||
const user = props.user;
|
||||
return /* @__PURE__ */ jsxs(Avatar, { style: { height: props.size || defaultSize, width: props.size || defaultSize }, className: props.border ? "border" : "", children: [
|
||||
/* @__PURE__ */ jsx(AvatarImage, { src: user?.profileImageUrl || "" }),
|
||||
/* @__PURE__ */ jsx(AvatarFallback, { children: user ? /* @__PURE__ */ jsx("div", { className: "font-medium", style: { fontSize: (props.size || defaultSize) * 0.4 }, children: (user.displayName || user.primaryEmail)?.slice(0, 2).toUpperCase() }) : /* @__PURE__ */ jsx(UserRound, { className: "text-zinc-500", size: (props.size || defaultSize) * 0.6 }) })
|
||||
] });
|
||||
}
|
||||
export {
|
||||
UserAvatar
|
||||
};
|
||||
//# sourceMappingURL=user-avatar.js.map
|
||||
1
package/@stackframe/react/dist/esm/components/elements/user-avatar.js.map
vendored
Normal file
1
package/@stackframe/react/dist/esm/components/elements/user-avatar.js.map
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components/elements/user-avatar.tsx"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\nimport { Avatar, AvatarFallback, AvatarImage } from \"@stackframe/stack-ui\";\nimport { UserRound } from \"lucide-react\";\n\nconst defaultSize = 34;\n\nexport function UserAvatar(props: {\n size?: number,\n user?: {\n profileImageUrl?: string | null,\n displayName?: string | null,\n primaryEmail?: string | null,\n } | null,\n border?: boolean,\n}) {\n const user = props.user;\n return (\n <Avatar style={{ height: props.size || defaultSize, width: props.size || defaultSize }} className={props.border ? 'border' : ''}>\n <AvatarImage src={user?.profileImageUrl || ''} />\n <AvatarFallback>\n {user ?\n <div className='font-medium' style={{ fontSize: (props.size || defaultSize) * 0.4 }}>\n {(user.displayName || user.primaryEmail)?.slice(0, 2).toUpperCase()}\n </div> :\n <UserRound className=\"text-zinc-500\" size={(props.size || defaultSize) * 0.6} />}\n </AvatarFallback>\n </Avatar>\n );\n}\n"],"mappings":";AAIA,SAAS,QAAQ,gBAAgB,mBAAmB;AACpD,SAAS,iBAAiB;AAetB,SACE,KADF;AAbJ,IAAM,cAAc;AAEb,SAAS,WAAW,OAQxB;AACD,QAAM,OAAO,MAAM;AACnB,SACE,qBAAC,UAAO,OAAO,EAAE,QAAQ,MAAM,QAAQ,aAAa,OAAO,MAAM,QAAQ,YAAY,GAAG,WAAW,MAAM,SAAS,WAAW,IAC3H;AAAA,wBAAC,eAAY,KAAK,MAAM,mBAAmB,IAAI;AAAA,IAC/C,oBAAC,kBACE,iBACC,oBAAC,SAAI,WAAU,eAAc,OAAO,EAAE,WAAW,MAAM,QAAQ,eAAe,IAAI,GAC9E,gBAAK,eAAe,KAAK,eAAe,MAAM,GAAG,CAAC,EAAE,YAAY,GACpE,IACA,oBAAC,aAAU,WAAU,iBAAgB,OAAO,MAAM,QAAQ,eAAe,KAAK,GAClF;AAAA,KACF;AAEJ;","names":[]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue