mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-29 12:10:24 +00:00
Initial commit of eigent-main
This commit is contained in:
commit
723df5a03e
1144 changed files with 103478 additions and 0 deletions
|
|
@ -0,0 +1,87 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/components-page/account-settings/settings/delete-account-section.tsx
|
||||
var delete_account_section_exports = {};
|
||||
__export(delete_account_section_exports, {
|
||||
DeleteAccountSection: () => DeleteAccountSection
|
||||
});
|
||||
module.exports = __toCommonJS(delete_account_section_exports);
|
||||
var import_stack_ui = require("@stackframe/stack-ui");
|
||||
var import_react = require("react");
|
||||
var import_hooks = require("../../../lib/hooks");
|
||||
var import_translations = require("../../../lib/translations");
|
||||
var import_section = require("../section");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
function DeleteAccountSection() {
|
||||
const { t } = (0, import_translations.useTranslation)();
|
||||
const user = (0, import_hooks.useUser)({ or: "redirect" });
|
||||
const app = (0, import_hooks.useStackApp)();
|
||||
const project = app.useProject();
|
||||
const [deleting, setDeleting] = (0, import_react.useState)(false);
|
||||
if (!project.config.clientUserDeletionEnabled) {
|
||||
return null;
|
||||
}
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_section.Section,
|
||||
{
|
||||
title: t("Delete Account"),
|
||||
description: t("Permanently remove your account and all associated data"),
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "stack-scope flex flex-col items-stretch", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stack_ui.Accordion, { type: "single", collapsible: true, className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stack_ui.AccordionItem, { value: "item-1", children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stack_ui.AccordionTrigger, { children: t("Danger zone") }),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stack_ui.AccordionContent, { children: !deleting ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_stack_ui.Button,
|
||||
{
|
||||
variant: "destructive",
|
||||
onClick: () => setDeleting(true),
|
||||
children: t("Delete account")
|
||||
}
|
||||
) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stack_ui.Typography, { variant: "destructive", children: t("Are you sure you want to delete your account? This action is IRREVERSIBLE and will delete ALL associated data.") }),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-2", children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_stack_ui.Button,
|
||||
{
|
||||
variant: "destructive",
|
||||
onClick: async () => {
|
||||
await user.delete();
|
||||
await app.redirectToHome();
|
||||
},
|
||||
children: t("Delete Account")
|
||||
}
|
||||
),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_stack_ui.Button,
|
||||
{
|
||||
variant: "secondary",
|
||||
onClick: () => setDeleting(false),
|
||||
children: t("Cancel")
|
||||
}
|
||||
)
|
||||
] })
|
||||
] }) })
|
||||
] }) }) })
|
||||
}
|
||||
);
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
DeleteAccountSection
|
||||
});
|
||||
//# sourceMappingURL=delete-account-section.js.map
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components-page/account-settings/settings/delete-account-section.tsx"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Button, Typography } from \"@stackframe/stack-ui\";\nimport { useState } from \"react\";\nimport { useStackApp, useUser } from \"../../../lib/hooks\";\nimport { useTranslation } from \"../../../lib/translations\";\nimport { Section } from \"../section\";\n\nexport function DeleteAccountSection() {\n const { t } = useTranslation();\n const user = useUser({ or: 'redirect' });\n const app = useStackApp();\n const project = app.useProject();\n const [deleting, setDeleting] = useState(false);\n if (!project.config.clientUserDeletionEnabled) {\n return null;\n }\n\n return (\n <Section\n title={t(\"Delete Account\")}\n description={t(\"Permanently remove your account and all associated data\")}\n >\n <div className='stack-scope flex flex-col items-stretch'>\n <Accordion type=\"single\" collapsible className=\"w-full\">\n <AccordionItem value=\"item-1\">\n <AccordionTrigger>{t(\"Danger zone\")}</AccordionTrigger>\n <AccordionContent>\n {!deleting ? (\n <div>\n <Button\n variant='destructive'\n onClick={() => setDeleting(true)}\n >\n {t(\"Delete account\")}\n </Button>\n </div>\n ) : (\n <div className='flex flex-col gap-2'>\n <Typography variant='destructive'>\n {t(\"Are you sure you want to delete your account? This action is IRREVERSIBLE and will delete ALL associated data.\")}\n </Typography>\n <div className='flex gap-2'>\n <Button\n variant='destructive'\n onClick={async () => {\n await user.delete();\n await app.redirectToHome();\n }}\n >\n {t(\"Delete Account\")}\n </Button>\n <Button\n variant='secondary'\n onClick={() => setDeleting(false)}\n >\n {t(\"Cancel\")}\n </Button>\n </div>\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AAA;AAAA,gBACC,SAAQ;AAAA,gBACR,SAAS,MAAM,YAAY,KAAK;AAAA,gBAE/B,YAAE,QAAQ;AAAA;AAAA,YACb;AAAA,aACF;AAAA,WACF,GAEJ;AAAA,SACF,GACF,GACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
||||
40
package/@stackframe/react/dist/components-page/account-settings/settings/settings-page.js
vendored
Normal file
40
package/@stackframe/react/dist/components-page/account-settings/settings/settings-page.js
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/components-page/account-settings/settings/settings-page.tsx
|
||||
var settings_page_exports = {};
|
||||
__export(settings_page_exports, {
|
||||
SettingsPage: () => SettingsPage
|
||||
});
|
||||
module.exports = __toCommonJS(settings_page_exports);
|
||||
var import_page_layout = require("../page-layout");
|
||||
var import_delete_account_section = require("./delete-account-section");
|
||||
var import_sign_out_section = require("./sign-out-section");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
function SettingsPage() {
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_page_layout.PageLayout, { children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_delete_account_section.DeleteAccountSection, {}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sign_out_section.SignOutSection, {})
|
||||
] });
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
SettingsPage
|
||||
});
|
||||
//# sourceMappingURL=settings-page.js.map
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components-page/account-settings/settings/settings-page.tsx"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\nimport { PageLayout } from \"../page-layout\";\nimport { DeleteAccountSection } from \"./delete-account-section\";\nimport { SignOutSection } from \"./sign-out-section\";\n\n\nexport function SettingsPage() {\n return (\n <PageLayout>\n <DeleteAccountSection />\n <SignOutSection />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,yBAA2B;AAC3B,oCAAqC;AACrC,8BAA+B;AAK3B;AAFG,SAAS,eAAe;AAC7B,SACE,6CAAC,iCACC;AAAA,gDAAC,sDAAqB;AAAA,IACtB,4CAAC,0CAAe;AAAA,KAClB;AAEJ;","names":[]}
|
||||
54
package/@stackframe/react/dist/components-page/account-settings/settings/sign-out-section.js
vendored
Normal file
54
package/@stackframe/react/dist/components-page/account-settings/settings/sign-out-section.js
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/components-page/account-settings/settings/sign-out-section.tsx
|
||||
var sign_out_section_exports = {};
|
||||
__export(sign_out_section_exports, {
|
||||
SignOutSection: () => SignOutSection
|
||||
});
|
||||
module.exports = __toCommonJS(sign_out_section_exports);
|
||||
var import_stack_ui = require("@stackframe/stack-ui");
|
||||
var import_hooks = require("../../../lib/hooks");
|
||||
var import_translations = require("../../../lib/translations");
|
||||
var import_section = require("../section");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
function SignOutSection() {
|
||||
const { t } = (0, import_translations.useTranslation)();
|
||||
const user = (0, import_hooks.useUser)({ or: "throw" });
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_section.Section,
|
||||
{
|
||||
title: t("Sign out"),
|
||||
description: t("End your current session"),
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_stack_ui.Button,
|
||||
{
|
||||
variant: "secondary",
|
||||
onClick: () => user.signOut(),
|
||||
children: t("Sign out")
|
||||
}
|
||||
) })
|
||||
}
|
||||
);
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
SignOutSection
|
||||
});
|
||||
//# sourceMappingURL=sign-out-section.js.map
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["../../../../src/components-page/account-settings/settings/sign-out-section.tsx"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY\n//===========================================\nimport { Button } from \"@stackframe/stack-ui\";\nimport { useUser } from \"../../../lib/hooks\";\nimport { useTranslation } from \"../../../lib/translations\";\nimport { Section } from \"../section\";\n\nexport function SignOutSection() {\n const { t } = useTranslation();\n const user = useUser({ or: \"throw\" });\n\n return (\n <Section\n title={t(\"Sign out\")}\n description={t(\"End your current session\")}\n >\n <div>\n <Button\n variant='secondary'\n onClick={() => user.signOut()}\n >\n {t(\"Sign out\")}\n </Button>\n </div>\n </Section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,sBAAuB;AACvB,mBAAwB;AACxB,0BAA+B;AAC/B,qBAAwB;AAYhB;AAVD,SAAS,iBAAiB;AAC/B,QAAM,EAAE,EAAE,QAAI,oCAAe;AAC7B,QAAM,WAAO,sBAAQ,EAAE,IAAI,QAAQ,CAAC;AAEpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,EAAE,UAAU;AAAA,MACnB,aAAa,EAAE,0BAA0B;AAAA,MAEzC,sDAAC,SACC;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM,KAAK,QAAQ;AAAA,UAE3B,YAAE,UAAU;AAAA;AAAA,MACf,GACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue