@rslsp1/fa-app-tools 2.0.12 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +790 -346
- package/dist/index.mjs +771 -327
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1537,7 +1537,7 @@ function ListView({ nodes, edges, onNodeChange, onAddChild, onDeleteNode, onMove
|
|
|
1537
1537
|
}
|
|
1538
1538
|
|
|
1539
1539
|
// src/components/AvatarArchitectApp.tsx
|
|
1540
|
-
var
|
|
1540
|
+
var import_react23 = require("react");
|
|
1541
1541
|
|
|
1542
1542
|
// src/components/PromptTab.tsx
|
|
1543
1543
|
var import_react12 = require("react");
|
|
@@ -2764,7 +2764,7 @@ function useHFState(token, namespace) {
|
|
|
2764
2764
|
const id = setInterval(pollNew, POLL_INTERVAL_MS);
|
|
2765
2765
|
return () => clearInterval(id);
|
|
2766
2766
|
}, [token, namespace, pollNew]);
|
|
2767
|
-
const
|
|
2767
|
+
const writeEvent2 = (0, import_react14.useCallback)(async (type, payload) => {
|
|
2768
2768
|
const prevTs = lastEventTs ? [lastEventTs] : [state?.meta.consolidatedAt ?? 0];
|
|
2769
2769
|
console.log("[HF] writeEvent called:", { type, namespace, tokenOk: !!token, prevTs });
|
|
2770
2770
|
await pollNew();
|
|
@@ -2799,7 +2799,7 @@ function useHFState(token, namespace) {
|
|
|
2799
2799
|
pendingBufferCount,
|
|
2800
2800
|
eventCount,
|
|
2801
2801
|
forks,
|
|
2802
|
-
writeEvent,
|
|
2802
|
+
writeEvent: writeEvent2,
|
|
2803
2803
|
refresh: loadFull,
|
|
2804
2804
|
lastEventTs,
|
|
2805
2805
|
allEvents: allEventsRef.current,
|
|
@@ -3886,10 +3886,449 @@ function TagManagerPanel({ workspaceTags, onTagCreate, onTagUpdate, onTagDelete,
|
|
|
3886
3886
|
] });
|
|
3887
3887
|
}
|
|
3888
3888
|
|
|
3889
|
-
// src/components/
|
|
3889
|
+
// src/components/HFTestTab.tsx
|
|
3890
|
+
var import_react22 = require("react");
|
|
3890
3891
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3892
|
+
var HF_BASE2 = "https://huggingface.co";
|
|
3893
|
+
var HF_REPO2 = "RolandSch/fa-app-state";
|
|
3894
|
+
var TEST_DIR = "test";
|
|
3895
|
+
async function doFetch(label, url, init = {}) {
|
|
3896
|
+
const rawHeaders = init.headers || {};
|
|
3897
|
+
const sanitized = Object.fromEntries(
|
|
3898
|
+
Object.entries(rawHeaders).map(
|
|
3899
|
+
([k, v]) => k.toLowerCase() === "authorization" ? [k, v.replace(/Bearer\s+\S+/, (m) => "Bearer " + m.slice(7, 14) + "***")] : [k, v]
|
|
3900
|
+
)
|
|
3901
|
+
);
|
|
3902
|
+
const s = {
|
|
3903
|
+
label,
|
|
3904
|
+
method: init.method || "GET",
|
|
3905
|
+
url,
|
|
3906
|
+
reqHeaders: sanitized,
|
|
3907
|
+
reqBody: init.body ? typeof init.body === "string" ? init.body.length > 800 ? init.body.slice(0, 800) + "\n\u2026[truncated]" : init.body : "[binary data]" : void 0
|
|
3908
|
+
};
|
|
3909
|
+
const t0 = Date.now();
|
|
3910
|
+
try {
|
|
3911
|
+
const r = await fetch(url, init);
|
|
3912
|
+
s.durationMs = Date.now() - t0;
|
|
3913
|
+
s.resStatus = r.status;
|
|
3914
|
+
s.resStatusText = r.statusText;
|
|
3915
|
+
const body = await r.text().catch(() => "");
|
|
3916
|
+
s.resBody = body.length > 3e3 ? body.slice(0, 3e3) + "\n\u2026[truncated]" : body;
|
|
3917
|
+
s.ok = r.ok;
|
|
3918
|
+
} catch (e) {
|
|
3919
|
+
s.durationMs = Date.now() - t0;
|
|
3920
|
+
s.error = String(e?.message ?? e);
|
|
3921
|
+
s.ok = false;
|
|
3922
|
+
}
|
|
3923
|
+
return s;
|
|
3924
|
+
}
|
|
3925
|
+
function toBase64(bytes) {
|
|
3926
|
+
let bin = "";
|
|
3927
|
+
bytes.forEach((b) => bin += String.fromCharCode(b));
|
|
3928
|
+
return btoa(bin);
|
|
3929
|
+
}
|
|
3930
|
+
async function sha256hex(bytes) {
|
|
3931
|
+
const buf = await crypto.subtle.digest("SHA-256", bytes);
|
|
3932
|
+
return Array.from(new Uint8Array(buf)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
3933
|
+
}
|
|
3934
|
+
function b64ToBytes(b64) {
|
|
3935
|
+
const raw = b64.includes(",") ? b64.split(",")[1] : b64;
|
|
3936
|
+
const bin = atob(raw);
|
|
3937
|
+
const bytes = new Uint8Array(bin.length);
|
|
3938
|
+
for (let i = 0; i < bin.length; i++) bytes[i] = bin.charCodeAt(i);
|
|
3939
|
+
return bytes;
|
|
3940
|
+
}
|
|
3941
|
+
function rawB64(dataUrl) {
|
|
3942
|
+
return dataUrl.includes(",") ? dataUrl.split(",")[1] : dataUrl;
|
|
3943
|
+
}
|
|
3944
|
+
async function uploadDirect(token, path, b64content) {
|
|
3945
|
+
const ndjson = [
|
|
3946
|
+
JSON.stringify({ key: "header", value: { summary: `HF Test: upload ${path}`, description: "" } }),
|
|
3947
|
+
JSON.stringify({ key: "file", value: { path, encoding: "base64", content: b64content } })
|
|
3948
|
+
].join("\n");
|
|
3949
|
+
return [await doFetch(
|
|
3950
|
+
"POST commit (direct, kein LFS)",
|
|
3951
|
+
`${HF_BASE2}/api/datasets/${HF_REPO2}/commit/main`,
|
|
3952
|
+
{ method: "POST", headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/x-ndjson" }, body: ndjson }
|
|
3953
|
+
)];
|
|
3954
|
+
}
|
|
3955
|
+
async function uploadLFS(token, path, bytes) {
|
|
3956
|
+
const oid = await sha256hex(bytes);
|
|
3957
|
+
const size = bytes.length;
|
|
3958
|
+
const sample = toBase64(bytes.slice(0, 512));
|
|
3959
|
+
const steps = [];
|
|
3960
|
+
const pre = await doFetch("Preupload (LFS-URL anfordern)", `${HF_BASE2}/api/datasets/${HF_REPO2}/preupload/main`, {
|
|
3961
|
+
method: "POST",
|
|
3962
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
|
3963
|
+
body: JSON.stringify({ files: [{ path, size, sample }] })
|
|
3964
|
+
});
|
|
3965
|
+
steps.push(pre);
|
|
3966
|
+
if (!pre.ok) return steps;
|
|
3967
|
+
let fi;
|
|
3968
|
+
try {
|
|
3969
|
+
fi = JSON.parse(pre.resBody || "{}").files?.[0];
|
|
3970
|
+
} catch {
|
|
3971
|
+
}
|
|
3972
|
+
if (!fi) {
|
|
3973
|
+
steps.push({ label: "Parse", method: "-", url: "-", reqHeaders: {}, resBody: "Kein files[0] in preupload response", ok: false });
|
|
3974
|
+
return steps;
|
|
3975
|
+
}
|
|
3976
|
+
if (fi.uploadMode === "lfs" && fi.uploadUrl) {
|
|
3977
|
+
const up = await doFetch("PUT to LFS upload URL", fi.uploadUrl, {
|
|
3978
|
+
method: "PUT",
|
|
3979
|
+
headers: { "Content-Type": "application/octet-stream", ...fi.header || {} },
|
|
3980
|
+
body: bytes
|
|
3981
|
+
});
|
|
3982
|
+
steps.push(up);
|
|
3983
|
+
if (!up.ok) return steps;
|
|
3984
|
+
if (fi.verifyUrl) {
|
|
3985
|
+
const ver = await doFetch("POST LFS verify", fi.verifyUrl, {
|
|
3986
|
+
method: "POST",
|
|
3987
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", ...fi.verifyHeader || {} },
|
|
3988
|
+
body: JSON.stringify({ oid, size })
|
|
3989
|
+
});
|
|
3990
|
+
steps.push(ver);
|
|
3991
|
+
if (!ver.ok) return steps;
|
|
3992
|
+
}
|
|
3993
|
+
} else {
|
|
3994
|
+
steps.push({ label: "Info", method: "-", url: "-", reqHeaders: {}, resBody: `uploadMode="${fi.uploadMode}" \xB7 uploadUrl: ${fi.uploadUrl ? "ja" : "nein"} \u2192 ${!fi.uploadUrl ? "bereits in LFS (Deduplizierung)" : "kein LFS n\xF6tig"}`, ok: true });
|
|
3995
|
+
}
|
|
3996
|
+
const ndjson = [
|
|
3997
|
+
JSON.stringify({ key: "header", value: { summary: `HF Test: LFS commit ${path}`, description: "" } }),
|
|
3998
|
+
JSON.stringify({ key: "lfsFile", value: { path, algo: "sha256", oid, size } })
|
|
3999
|
+
].join("\n");
|
|
4000
|
+
steps.push(await doFetch("Commit (lfsFile reference)", `${HF_BASE2}/api/datasets/${HF_REPO2}/commit/main`, {
|
|
4001
|
+
method: "POST",
|
|
4002
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/x-ndjson" },
|
|
4003
|
+
body: ndjson
|
|
4004
|
+
}));
|
|
4005
|
+
return steps;
|
|
4006
|
+
}
|
|
4007
|
+
async function uploadViaHubLib(token, path, bytes, mimeType) {
|
|
4008
|
+
const s = { label: "uploadFile() via @huggingface/hub", method: "import()+call", url: "@huggingface/hub", reqHeaders: {} };
|
|
4009
|
+
const t0 = Date.now();
|
|
4010
|
+
try {
|
|
4011
|
+
const { uploadFile } = await import(
|
|
4012
|
+
/* @vite-ignore */
|
|
4013
|
+
"@huggingface/hub"
|
|
4014
|
+
);
|
|
4015
|
+
await uploadFile({
|
|
4016
|
+
repo: { type: "dataset", name: HF_REPO2 },
|
|
4017
|
+
credentials: { accessToken: token },
|
|
4018
|
+
file: { path, content: new Blob([bytes], { type: mimeType }) },
|
|
4019
|
+
branch: "main",
|
|
4020
|
+
commitTitle: `HF Test: hub lib upload ${path}`
|
|
4021
|
+
});
|
|
4022
|
+
s.durationMs = Date.now() - t0;
|
|
4023
|
+
s.resBody = "SUCCESS";
|
|
4024
|
+
s.ok = true;
|
|
4025
|
+
} catch (e) {
|
|
4026
|
+
s.durationMs = Date.now() - t0;
|
|
4027
|
+
s.error = String(e?.message ?? e);
|
|
4028
|
+
s.ok = false;
|
|
4029
|
+
}
|
|
4030
|
+
return [s];
|
|
4031
|
+
}
|
|
4032
|
+
async function uploadViaCdnLib(token, path, bytes, mimeType) {
|
|
4033
|
+
const s = { label: "uploadFile() via esm.sh/@huggingface/hub", method: "import()+call", url: "https://esm.sh/@huggingface/hub", reqHeaders: {} };
|
|
4034
|
+
const t0 = Date.now();
|
|
4035
|
+
try {
|
|
4036
|
+
const { uploadFile } = await import(
|
|
4037
|
+
/* @vite-ignore */
|
|
4038
|
+
"https://esm.sh/@huggingface/hub"
|
|
4039
|
+
);
|
|
4040
|
+
await uploadFile({
|
|
4041
|
+
repo: { type: "dataset", name: HF_REPO2 },
|
|
4042
|
+
credentials: { accessToken: token },
|
|
4043
|
+
file: { path, content: new Blob([bytes], { type: mimeType }) },
|
|
4044
|
+
branch: "main",
|
|
4045
|
+
commitTitle: `HF Test: CDN hub lib upload ${path}`
|
|
4046
|
+
});
|
|
4047
|
+
s.durationMs = Date.now() - t0;
|
|
4048
|
+
s.resBody = "SUCCESS";
|
|
4049
|
+
s.ok = true;
|
|
4050
|
+
} catch (e) {
|
|
4051
|
+
s.durationMs = Date.now() - t0;
|
|
4052
|
+
s.error = String(e?.message ?? e);
|
|
4053
|
+
s.ok = false;
|
|
4054
|
+
}
|
|
4055
|
+
return [s];
|
|
4056
|
+
}
|
|
4057
|
+
async function writeEvent(token, namespace) {
|
|
4058
|
+
const ns = namespace.endsWith("/") ? namespace : namespace ? namespace + "/" : "";
|
|
4059
|
+
const ts = Date.now();
|
|
4060
|
+
const uuid = crypto.randomUUID().slice(0, 8);
|
|
4061
|
+
const isoTs = new Date(ts).toISOString().replace(/:/g, "-").replace(".", "-");
|
|
4062
|
+
const eventPath = `${ns}${TEST_DIR}/events/${isoTs}_${uuid}.json`;
|
|
4063
|
+
const event = JSON.stringify({ v: { major: 1, minor: 0 }, type: "probe", ts, prevTs: [], clientId: "hf-test-tab", payload: { test: true } }, null, 2);
|
|
4064
|
+
const b64 = toBase64(new TextEncoder().encode(event));
|
|
4065
|
+
const ndjson = [
|
|
4066
|
+
JSON.stringify({ key: "header", value: { summary: "HF Test: write event", description: "" } }),
|
|
4067
|
+
JSON.stringify({ key: "file", value: { path: eventPath, encoding: "base64", content: b64 } })
|
|
4068
|
+
].join("\n");
|
|
4069
|
+
return [await doFetch(
|
|
4070
|
+
`Event \u2192 ${eventPath}`,
|
|
4071
|
+
`${HF_BASE2}/api/datasets/${HF_REPO2}/commit/main`,
|
|
4072
|
+
{ method: "POST", headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/x-ndjson" }, body: ndjson }
|
|
4073
|
+
)];
|
|
4074
|
+
}
|
|
4075
|
+
function tryFmt(s) {
|
|
4076
|
+
try {
|
|
4077
|
+
return JSON.stringify(JSON.parse(s), null, 2);
|
|
4078
|
+
} catch {
|
|
4079
|
+
return s;
|
|
4080
|
+
}
|
|
4081
|
+
}
|
|
4082
|
+
function CopyBtn({ text }) {
|
|
4083
|
+
const [done, setDone] = (0, import_react22.useState)(false);
|
|
4084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
4085
|
+
"button",
|
|
4086
|
+
{
|
|
4087
|
+
onClick: () => {
|
|
4088
|
+
navigator.clipboard?.writeText(text).catch(() => {
|
|
4089
|
+
});
|
|
4090
|
+
setDone(true);
|
|
4091
|
+
setTimeout(() => setDone(false), 1500);
|
|
4092
|
+
},
|
|
4093
|
+
style: { background: "none", border: "1px solid rgba(255,255,255,0.15)", borderRadius: 5, color: done ? "#4ade80" : "rgba(255,255,255,0.45)", fontSize: 10, padding: "3px 8px", cursor: "pointer", fontFamily: "inherit", display: "flex", alignItems: "center", gap: 3 },
|
|
4094
|
+
children: [
|
|
4095
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: done ? "check" : "content_copy" }),
|
|
4096
|
+
done ? "Kopiert" : "Copy"
|
|
4097
|
+
]
|
|
4098
|
+
}
|
|
4099
|
+
);
|
|
4100
|
+
}
|
|
4101
|
+
function StepView({ step }) {
|
|
4102
|
+
const isSpecial = step.method === "-" || step.method === "import()" || step.method === "import()+call";
|
|
4103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginBottom: 6, background: "rgba(0,0,0,0.3)", borderRadius: 7, padding: "7px 9px", border: `1px solid ${step.ok === false ? "rgba(248,113,113,0.2)" : "rgba(255,255,255,0.05)"}` }, children: [
|
|
4104
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 4 }, children: [
|
|
4105
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: { fontSize: 11, fontWeight: 700, color: step.ok === false ? "#f87171" : "#4ade80" }, children: step.ok === false ? "\u2717" : "\u2713" }),
|
|
4106
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: { fontSize: 11, fontWeight: 600, color: "rgba(255,255,255,0.7)", flex: 1 }, children: step.label }),
|
|
4107
|
+
step.durationMs !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.3)" }, children: [
|
|
4108
|
+
step.durationMs,
|
|
4109
|
+
"ms"
|
|
4110
|
+
] }),
|
|
4111
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CopyBtn, { text: JSON.stringify(step, null, 2) })
|
|
4112
|
+
] }),
|
|
4113
|
+
!isSpecial && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginBottom: 5 }, children: [
|
|
4114
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { fontSize: 10, color: "rgba(255,255,255,0.25)", marginBottom: 2 }, children: [
|
|
4115
|
+
"\u2192 ",
|
|
4116
|
+
step.method,
|
|
4117
|
+
" ",
|
|
4118
|
+
step.url
|
|
4119
|
+
] }),
|
|
4120
|
+
Object.keys(step.reqHeaders).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("pre", { style: { fontSize: 9, color: "rgba(255,255,255,0.35)", margin: "2px 0", padding: "3px 5px", background: "rgba(255,255,255,0.03)", borderRadius: 3, whiteSpace: "pre-wrap", wordBreak: "break-all", maxHeight: 60, overflow: "auto" }, children: Object.entries(step.reqHeaders).map(([k, v]) => `${k}: ${v}`).join("\n") }),
|
|
4121
|
+
step.reqBody && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("pre", { style: { fontSize: 9, color: "rgba(255,255,255,0.35)", margin: "2px 0", padding: "3px 5px", background: "rgba(255,255,255,0.03)", borderRadius: 3, whiteSpace: "pre-wrap", wordBreak: "break-all", maxHeight: 80, overflow: "auto" }, children: step.reqBody })
|
|
4122
|
+
] }),
|
|
4123
|
+
step.error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("pre", { style: { fontSize: 11, color: "#f87171", margin: 0, padding: "3px 5px", background: "rgba(248,113,113,0.05)", borderRadius: 3, whiteSpace: "pre-wrap", wordBreak: "break-all" }, children: step.error }),
|
|
4124
|
+
!step.error && (step.resStatus !== void 0 || step.resBody) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
4125
|
+
step.resStatus !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { fontSize: 11, fontWeight: 700, color: (step.resStatus || 0) < 300 ? "#4ade80" : "#f87171", marginBottom: 3 }, children: [
|
|
4126
|
+
"\u2190 ",
|
|
4127
|
+
step.resStatus,
|
|
4128
|
+
" ",
|
|
4129
|
+
step.resStatusText
|
|
4130
|
+
] }),
|
|
4131
|
+
step.resBody && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("pre", { style: { fontSize: 9, color: "rgba(255,255,255,0.55)", margin: 0, padding: "3px 5px", background: "rgba(255,255,255,0.03)", borderRadius: 3, whiteSpace: "pre-wrap", wordBreak: "break-all", maxHeight: 180, overflow: "auto" }, children: tryFmt(step.resBody) })
|
|
4132
|
+
] })
|
|
4133
|
+
] });
|
|
4134
|
+
}
|
|
4135
|
+
function TestCard({
|
|
4136
|
+
id,
|
|
4137
|
+
label,
|
|
4138
|
+
icon,
|
|
4139
|
+
desc,
|
|
4140
|
+
disabled,
|
|
4141
|
+
state,
|
|
4142
|
+
onRun,
|
|
4143
|
+
expanded,
|
|
4144
|
+
onToggle
|
|
4145
|
+
}) {
|
|
4146
|
+
const hasResult = state && state.status !== "idle";
|
|
4147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginBottom: 8, background: "rgba(255,255,255,0.03)", borderRadius: 10, border: `1px solid ${state?.status === "ok" ? "rgba(74,222,128,0.15)" : state?.status === "error" ? "rgba(248,113,113,0.15)" : "rgba(255,255,255,0.07)"}`, overflow: "hidden" }, children: [
|
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8, padding: "9px 10px" }, children: [
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 18, color: state?.status === "ok" ? "#4ade80" : state?.status === "error" ? "#f87171" : state?.status === "running" ? "#60a5fa" : "rgba(255,255,255,0.35)", flexShrink: 0 }, children: state?.status === "ok" ? "check_circle" : state?.status === "error" ? "error" : state?.status === "running" ? "hourglass_top" : icon }),
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
4151
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 13, fontWeight: 700, color: "#fff" }, children: label }),
|
|
4152
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 10, color: "rgba(255,255,255,0.3)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: desc })
|
|
4153
|
+
] }),
|
|
4154
|
+
hasResult && state?.status !== "running" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("button", { onClick: onToggle, style: { background: "none", border: "none", color: "rgba(255,255,255,0.3)", cursor: "pointer", padding: 2, lineHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: expanded ? "expand_less" : "expand_more" }) }),
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4156
|
+
"button",
|
|
4157
|
+
{
|
|
4158
|
+
onClick: onRun,
|
|
4159
|
+
disabled,
|
|
4160
|
+
style: { background: disabled ? "transparent" : "#0284c7", border: "1px solid rgba(255,255,255,0.1)", borderRadius: 6, color: "#fff", fontSize: 11, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.05em", padding: "5px 10px", cursor: disabled ? "default" : "pointer", opacity: disabled ? 0.35 : 1, fontFamily: "inherit", flexShrink: 0 },
|
|
4161
|
+
children: state?.status === "running" ? "\u2026" : "Run"
|
|
4162
|
+
}
|
|
4163
|
+
)
|
|
4164
|
+
] }),
|
|
4165
|
+
hasResult && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { borderTop: "1px solid rgba(255,255,255,0.05)" }, children: [
|
|
4166
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { padding: "4px 10px 5px", display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
4167
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: { fontSize: 11, fontWeight: 700, color: state.status === "ok" ? "#4ade80" : "#f87171" }, children: state.status === "ok" ? "\u2713 OK" : state.status === "running" ? "\u2026" : "\u2717 Fehler" }),
|
|
4168
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.3)" }, children: [
|
|
4169
|
+
state.totalMs,
|
|
4170
|
+
"ms \xB7 ",
|
|
4171
|
+
state.steps.length,
|
|
4172
|
+
" Step",
|
|
4173
|
+
state.steps.length !== 1 ? "s" : ""
|
|
4174
|
+
] }),
|
|
4175
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { flex: 1 } }),
|
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CopyBtn, { text: JSON.stringify(state, null, 2) })
|
|
4177
|
+
] }),
|
|
4178
|
+
expanded && state.steps.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { padding: "0 10px 4px" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StepView, { step }) }, i))
|
|
4179
|
+
] })
|
|
4180
|
+
] });
|
|
4181
|
+
}
|
|
4182
|
+
function HFTestTab({ token, namespace, galleryItems }) {
|
|
4183
|
+
const [selected, setSelected] = (0, import_react22.useState)(null);
|
|
4184
|
+
const [results, setResults] = (0, import_react22.useState)({});
|
|
4185
|
+
const [expanded, setExpanded] = (0, import_react22.useState)({});
|
|
4186
|
+
const withResults = galleryItems.filter((g) => g.base64 && g.status === "done");
|
|
4187
|
+
const setRunning = (id) => setResults((r) => ({ ...r, [id]: { status: "running", steps: [], totalMs: 0 } }));
|
|
4188
|
+
const setDone = (id, steps, t0) => {
|
|
4189
|
+
const ok = steps.length > 0 && steps.every((s) => s.ok !== false);
|
|
4190
|
+
setResults((r) => ({ ...r, [id]: { status: ok ? "ok" : "error", steps, totalMs: Date.now() - t0 } }));
|
|
4191
|
+
setExpanded((e) => ({ ...e, [id]: true }));
|
|
4192
|
+
};
|
|
4193
|
+
const run = async (id) => {
|
|
4194
|
+
const isImgTest = id !== "event";
|
|
4195
|
+
if (isImgTest && !selected?.base64) return;
|
|
4196
|
+
setRunning(id);
|
|
4197
|
+
const t0 = Date.now();
|
|
4198
|
+
let steps = [];
|
|
4199
|
+
try {
|
|
4200
|
+
if (isImgTest) {
|
|
4201
|
+
const bytes = b64ToBytes(selected.base64);
|
|
4202
|
+
const imgPath = `${TEST_DIR}/${selected.id}.jpg`;
|
|
4203
|
+
switch (id) {
|
|
4204
|
+
case "img-direct":
|
|
4205
|
+
steps = await uploadDirect(token, imgPath, rawB64(selected.base64));
|
|
4206
|
+
break;
|
|
4207
|
+
case "img-lfs":
|
|
4208
|
+
steps = await uploadLFS(token, imgPath, bytes);
|
|
4209
|
+
break;
|
|
4210
|
+
case "img-hub":
|
|
4211
|
+
steps = await uploadViaHubLib(token, imgPath, bytes, "image/jpeg");
|
|
4212
|
+
break;
|
|
4213
|
+
case "img-cdn":
|
|
4214
|
+
steps = await uploadViaCdnLib(token, imgPath, bytes, "image/jpeg");
|
|
4215
|
+
break;
|
|
4216
|
+
}
|
|
4217
|
+
} else {
|
|
4218
|
+
steps = await writeEvent(token, namespace);
|
|
4219
|
+
}
|
|
4220
|
+
} catch (e) {
|
|
4221
|
+
steps = [{ label: "Unexpected error", method: "-", url: "-", reqHeaders: {}, error: String(e?.message ?? e), ok: false }];
|
|
4222
|
+
}
|
|
4223
|
+
setDone(id, steps, t0);
|
|
4224
|
+
};
|
|
4225
|
+
const noToken = !token;
|
|
4226
|
+
const noImg = !selected;
|
|
4227
|
+
const imgTests = [
|
|
4228
|
+
{ id: "img-direct", label: "Upload Direct", icon: "upload_file", desc: "POST commit + file+base64 (kein LFS)" },
|
|
4229
|
+
{ id: "img-lfs", label: "Upload LFS", icon: "cloud_upload", desc: "preupload \u2192 PUT LFS \u2192 verify \u2192 commit" },
|
|
4230
|
+
{ id: "img-hub", label: "Upload hub lib", icon: "package_2", desc: "uploadFile() via @huggingface/hub" },
|
|
4231
|
+
{ id: "img-cdn", label: "Upload CDN lib", icon: "language", desc: "uploadFile() via esm.sh hub lib" }
|
|
4232
|
+
];
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", flexDirection: "column", height: "100%", overflowY: "auto", padding: "12px 10px 80px", boxSizing: "border-box", fontFamily: "inherit" }, children: [
|
|
4234
|
+
noToken && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { marginBottom: 10, padding: "8px 12px", background: "rgba(248,113,113,0.08)", borderRadius: 8, border: "1px solid rgba(248,113,113,0.2)", fontSize: 12, color: "#f87171" }, children: "Kein HF-Token geladen \u2014 bitte zuerst Token im Sync-Tab eingeben." }),
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginBottom: 14 }, children: [
|
|
4236
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { fontSize: 10, fontWeight: 700, color: "rgba(255,255,255,0.3)", textTransform: "uppercase", letterSpacing: "0.08em", marginBottom: 8 }, children: [
|
|
4237
|
+
"Bild ausw\xE4hlen (",
|
|
4238
|
+
withResults.length,
|
|
4239
|
+
" verf\xFCgbar)"
|
|
4240
|
+
] }),
|
|
4241
|
+
withResults.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 12, color: "rgba(255,255,255,0.3)", fontStyle: "italic" }, children: "Noch keine Bilder in der Galerie. Generiere zuerst ein Bild oder lade von HF." }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 6 }, children: withResults.slice(0, 12).map((g) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4242
|
+
"button",
|
|
4243
|
+
{
|
|
4244
|
+
onClick: () => setSelected(g),
|
|
4245
|
+
style: { padding: 0, border: `2px solid ${selected?.id === g.id ? "#0284c7" : "transparent"}`, borderRadius: 6, cursor: "pointer", overflow: "hidden", background: "none", lineHeight: 0 },
|
|
4246
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4247
|
+
"img",
|
|
4248
|
+
{
|
|
4249
|
+
src: g.base64,
|
|
4250
|
+
alt: g.prompt || g.id,
|
|
4251
|
+
style: { width: "100%", aspectRatio: "1", objectFit: "cover", display: "block", borderRadius: 4 }
|
|
4252
|
+
}
|
|
4253
|
+
)
|
|
4254
|
+
},
|
|
4255
|
+
g.id
|
|
4256
|
+
)) }),
|
|
4257
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginTop: 10, display: "flex", gap: 10, alignItems: "flex-start" }, children: [
|
|
4258
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4259
|
+
"img",
|
|
4260
|
+
{
|
|
4261
|
+
src: selected.base64,
|
|
4262
|
+
style: { width: 80, height: 80, objectFit: "cover", borderRadius: 8, border: "1px solid rgba(255,255,255,0.1)", flexShrink: 0 }
|
|
4263
|
+
}
|
|
4264
|
+
),
|
|
4265
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
4266
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 11, fontWeight: 700, color: "rgba(255,255,255,0.7)", marginBottom: 2 }, children: "Ausgew\xE4hlt" }),
|
|
4267
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { fontSize: 10, color: "rgba(255,255,255,0.3)", wordBreak: "break-all" }, children: [
|
|
4268
|
+
"ID: ",
|
|
4269
|
+
selected.id
|
|
4270
|
+
] }),
|
|
4271
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { fontSize: 10, color: "rgba(255,255,255,0.3)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", marginTop: 2 }, children: [
|
|
4272
|
+
"Ziel: test/",
|
|
4273
|
+
selected.id,
|
|
4274
|
+
".jpg"
|
|
4275
|
+
] }),
|
|
4276
|
+
selected.prompt && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 10, color: "rgba(255,255,255,0.25)", marginTop: 2, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: selected.prompt })
|
|
4277
|
+
] })
|
|
4278
|
+
] })
|
|
4279
|
+
] }),
|
|
4280
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { marginBottom: 18 }, children: [
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { fontSize: 10, fontWeight: 700, color: "rgba(255,255,255,0.3)", textTransform: "uppercase", letterSpacing: "0.1em", marginBottom: 8, borderBottom: "1px solid rgba(255,255,255,0.06)", paddingBottom: 4 }, children: [
|
|
4282
|
+
"Bild hochladen \u2192 test/",
|
|
4283
|
+
"{",
|
|
4284
|
+
"id",
|
|
4285
|
+
"}",
|
|
4286
|
+
".jpg"
|
|
4287
|
+
] }),
|
|
4288
|
+
imgTests.map((t) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4289
|
+
TestCard,
|
|
4290
|
+
{
|
|
4291
|
+
id: t.id,
|
|
4292
|
+
label: t.label,
|
|
4293
|
+
icon: t.icon,
|
|
4294
|
+
desc: t.desc,
|
|
4295
|
+
disabled: noToken || noImg || results[t.id]?.status === "running",
|
|
4296
|
+
state: results[t.id],
|
|
4297
|
+
onRun: () => run(t.id),
|
|
4298
|
+
expanded: !!expanded[t.id],
|
|
4299
|
+
onToggle: () => setExpanded((e) => ({ ...e, [t.id]: !e[t.id] }))
|
|
4300
|
+
},
|
|
4301
|
+
t.id
|
|
4302
|
+
))
|
|
4303
|
+
] }),
|
|
4304
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
4305
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { fontSize: 10, fontWeight: 700, color: "rgba(255,255,255,0.3)", textTransform: "uppercase", letterSpacing: "0.1em", marginBottom: 8, borderBottom: "1px solid rgba(255,255,255,0.06)", paddingBottom: 4 }, children: [
|
|
4306
|
+
"Event schreiben \u2192 ",
|
|
4307
|
+
namespace || "(kein namespace)",
|
|
4308
|
+
"test/events/"
|
|
4309
|
+
] }),
|
|
4310
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
4311
|
+
TestCard,
|
|
4312
|
+
{
|
|
4313
|
+
id: "event",
|
|
4314
|
+
label: "Write Event",
|
|
4315
|
+
icon: "bolt",
|
|
4316
|
+
desc: "Kleines JSON-Event hochladen (direct commit)",
|
|
4317
|
+
disabled: noToken || results["event"]?.status === "running",
|
|
4318
|
+
state: results["event"],
|
|
4319
|
+
onRun: () => run("event"),
|
|
4320
|
+
expanded: !!expanded["event"],
|
|
4321
|
+
onToggle: () => setExpanded((e) => ({ ...e, event: !e.event }))
|
|
4322
|
+
}
|
|
4323
|
+
)
|
|
4324
|
+
] })
|
|
4325
|
+
] });
|
|
4326
|
+
}
|
|
4327
|
+
|
|
4328
|
+
// src/components/AvatarArchitectApp.tsx
|
|
4329
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3891
4330
|
function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }) {
|
|
3892
|
-
(0,
|
|
4331
|
+
(0, import_react23.useEffect)(() => {
|
|
3893
4332
|
const id = "flow-styles";
|
|
3894
4333
|
if (!document.getElementById(id)) {
|
|
3895
4334
|
const style = document.createElement("style");
|
|
@@ -3898,19 +4337,19 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3898
4337
|
document.head.appendChild(style);
|
|
3899
4338
|
}
|
|
3900
4339
|
}, []);
|
|
3901
|
-
const [showStart, setShowStart] = (0,
|
|
3902
|
-
const [layoutChoice, setLayoutChoice] = (0,
|
|
4340
|
+
const [showStart, setShowStart] = (0, import_react23.useState)(true);
|
|
4341
|
+
const [layoutChoice, setLayoutChoice] = (0, import_react23.useState)(() => {
|
|
3903
4342
|
try {
|
|
3904
4343
|
return localStorage.getItem("aa-layout") || null;
|
|
3905
4344
|
} catch {
|
|
3906
4345
|
return null;
|
|
3907
4346
|
}
|
|
3908
4347
|
});
|
|
3909
|
-
const [projectLoaded, setProjectLoaded] = (0,
|
|
3910
|
-
const [hfToken, setHfToken] = (0,
|
|
3911
|
-
const [hfTokenInput, setHfTokenInput] = (0,
|
|
3912
|
-
const [isLoadingFromHF, setIsLoadingFromHF] = (0,
|
|
3913
|
-
const [hfNamespaceLocal, setHfNamespaceLocal] = (0,
|
|
4348
|
+
const [projectLoaded, setProjectLoaded] = (0, import_react23.useState)(false);
|
|
4349
|
+
const [hfToken, setHfToken] = (0, import_react23.useState)(initialHfToken || "");
|
|
4350
|
+
const [hfTokenInput, setHfTokenInput] = (0, import_react23.useState)(initialHfToken || "");
|
|
4351
|
+
const [isLoadingFromHF, setIsLoadingFromHF] = (0, import_react23.useState)(false);
|
|
4352
|
+
const [hfNamespaceLocal, setHfNamespaceLocal] = (0, import_react23.useState)(() => {
|
|
3914
4353
|
try {
|
|
3915
4354
|
const stored = localStorage.getItem("aa-hf-namespace");
|
|
3916
4355
|
if (stored !== null) return stored;
|
|
@@ -3919,8 +4358,8 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3919
4358
|
return "";
|
|
3920
4359
|
}
|
|
3921
4360
|
});
|
|
3922
|
-
const [hfNamespaceFromServer, setHfNamespaceFromServer] = (0,
|
|
3923
|
-
(0,
|
|
4361
|
+
const [hfNamespaceFromServer, setHfNamespaceFromServer] = (0, import_react23.useState)(null);
|
|
4362
|
+
(0, import_react23.useEffect)(() => {
|
|
3924
4363
|
if (hfNamespace !== void 0) return;
|
|
3925
4364
|
const backendUrl = typeof window !== "undefined" ? window.BACKEND_URL || window.location.origin : null;
|
|
3926
4365
|
if (!backendUrl) return;
|
|
@@ -3939,27 +4378,27 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3939
4378
|
refresh: refreshHF,
|
|
3940
4379
|
hasStateZip
|
|
3941
4380
|
} = useHFState(hfToken, effectiveNamespace);
|
|
3942
|
-
const [bootstrapLog, setBootstrapLog] = (0,
|
|
3943
|
-
const [isBootstrapping, setIsBootstrapping] = (0,
|
|
3944
|
-
const syncTopSlot = /* @__PURE__ */ (0,
|
|
3945
|
-
pendingBufferCount > 0 && /* @__PURE__ */ (0,
|
|
4381
|
+
const [bootstrapLog, setBootstrapLog] = (0, import_react23.useState)([]);
|
|
4382
|
+
const [isBootstrapping, setIsBootstrapping] = (0, import_react23.useState)(false);
|
|
4383
|
+
const syncTopSlot = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
4384
|
+
pendingBufferCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { background: "linear-gradient(90deg,#f59e0b,#ef4444)", padding: "4px 10px", fontSize: 11, color: "#fff", borderRadius: 4, marginBottom: 4 }, children: [
|
|
3946
4385
|
pendingBufferCount,
|
|
3947
4386
|
" \xC4nderung",
|
|
3948
4387
|
pendingBufferCount > 1 ? "en" : "",
|
|
3949
4388
|
" lokal \u2014 bei Flow-Reload verloren wenn nicht synchronisiert"
|
|
3950
4389
|
] }),
|
|
3951
|
-
eventCount > 100 && /* @__PURE__ */ (0,
|
|
4390
|
+
eventCount > 100 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { background: "#dc2626", color: "#fff", padding: "5px 10px", borderRadius: 4, marginBottom: 4, fontWeight: 600, fontSize: 11 }, children: [
|
|
3952
4391
|
"\u26A0 ",
|
|
3953
4392
|
eventCount,
|
|
3954
4393
|
" Events nicht konsolidiert \u2014 Konsolidierung dringend empfohlen"
|
|
3955
4394
|
] }),
|
|
3956
|
-
eventCount > 50 && eventCount <= 100 && /* @__PURE__ */ (0,
|
|
4395
|
+
eventCount > 50 && eventCount <= 100 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { background: "#44403c", color: "#a8a29e", padding: "4px 10px", borderRadius: 4, marginBottom: 4, fontSize: 11 }, children: [
|
|
3957
4396
|
eventCount,
|
|
3958
4397
|
" Events seit letzter Konsolidierung \u2014 Konsolidierung empfohlen"
|
|
3959
4398
|
] }),
|
|
3960
|
-
hfToken && !hasStateZip && !isHfRefreshing && /* @__PURE__ */ (0,
|
|
3961
|
-
/* @__PURE__ */ (0,
|
|
3962
|
-
/* @__PURE__ */ (0,
|
|
4399
|
+
hfToken && !hasStateZip && !isHfRefreshing && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { background: "#1c1917", border: "1px solid #44403c", borderRadius: 6, padding: "10px 12px" }, children: [
|
|
4400
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { fontSize: 12, color: "#a8a29e", marginBottom: 6 }, children: effectiveNamespace ? `Kein State-Snapshot in HF (${effectiveNamespace}) \u2014 aus Legacy-Daten (tags.json + metadata.json) migrieren?` : "Namespace wird geladen\u2026" }),
|
|
4401
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3963
4402
|
"button",
|
|
3964
4403
|
{
|
|
3965
4404
|
disabled: isBootstrapping || !effectiveNamespace,
|
|
@@ -3980,10 +4419,10 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3980
4419
|
children: isBootstrapping ? "Migriere\u2026" : "Legacy-Migration starten"
|
|
3981
4420
|
}
|
|
3982
4421
|
),
|
|
3983
|
-
bootstrapLog.length > 0 && /* @__PURE__ */ (0,
|
|
4422
|
+
bootstrapLog.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { marginTop: 6, fontFamily: "monospace", fontSize: 10, color: "#78716c", lineHeight: 1.6 }, children: bootstrapLog.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: l }, i)) })
|
|
3984
4423
|
] })
|
|
3985
4424
|
] });
|
|
3986
|
-
const wsInputRef = (0,
|
|
4425
|
+
const wsInputRef = (0, import_react23.useRef)(null);
|
|
3987
4426
|
const startApp = (choice) => {
|
|
3988
4427
|
try {
|
|
3989
4428
|
localStorage.setItem("aa-layout", choice);
|
|
@@ -3992,16 +4431,16 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3992
4431
|
setLayoutChoice(choice);
|
|
3993
4432
|
setShowStart(false);
|
|
3994
4433
|
};
|
|
3995
|
-
const [nodes, setNodes] = (0,
|
|
3996
|
-
const [edges, setEdges] = (0,
|
|
3997
|
-
const [history, setHistory] = (0,
|
|
3998
|
-
const [galleryItems, setGalleryItems] = (0,
|
|
3999
|
-
const galleryItemsRef = (0,
|
|
4000
|
-
(0,
|
|
4434
|
+
const [nodes, setNodes] = (0, import_react23.useState)([{ id: "1", type: "custom", position: { x: 0, y: 0 }, data: { label: "Fine Art Project", placeholder: "Name..." } }]);
|
|
4435
|
+
const [edges, setEdges] = (0, import_react23.useState)([]);
|
|
4436
|
+
const [history, setHistory] = (0, import_react23.useState)([]);
|
|
4437
|
+
const [galleryItems, setGalleryItems] = (0, import_react23.useState)([]);
|
|
4438
|
+
const galleryItemsRef = (0, import_react23.useRef)([]);
|
|
4439
|
+
(0, import_react23.useEffect)(() => {
|
|
4001
4440
|
galleryItemsRef.current = galleryItems;
|
|
4002
4441
|
}, [galleryItems]);
|
|
4003
|
-
const hfImageNotFoundRef = (0,
|
|
4004
|
-
(0,
|
|
4442
|
+
const hfImageNotFoundRef = (0, import_react23.useRef)(/* @__PURE__ */ new Set());
|
|
4443
|
+
(0, import_react23.useEffect)(() => {
|
|
4005
4444
|
if (!hfState) return;
|
|
4006
4445
|
if (hfState.tags?.by_category) setWorkspaceTags(hfState.tags);
|
|
4007
4446
|
const hfIds = new Set(hfState.metadata.map((m) => m.id));
|
|
@@ -4040,62 +4479,62 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4040
4479
|
});
|
|
4041
4480
|
}
|
|
4042
4481
|
}, [hfState]);
|
|
4043
|
-
const [activePrompt, setActivePrompt] = (0,
|
|
4044
|
-
const [isSynthesizing, setIsSynthesizing] = (0,
|
|
4045
|
-
const [activeGenerationsCount, setActiveGenerationsCount] = (0,
|
|
4046
|
-
const [currentResult, setCurrentResult] = (0,
|
|
4047
|
-
const [focusedNodeId, setFocusedNodeId] = (0,
|
|
4048
|
-
const [leftTab, setLeftTab] = (0,
|
|
4049
|
-
const [promptFeedback, setPromptFeedback] = (0,
|
|
4050
|
-
const [lastPromptPayload, setLastPromptPayload] = (0,
|
|
4051
|
-
const [isPromptTabGenerating, setIsPromptTabGenerating] = (0,
|
|
4052
|
-
const [activeTab, setActiveTab] = (0,
|
|
4053
|
-
const [mobileTab, setMobileTab] = (0,
|
|
4054
|
-
const [middlePanel, setMiddlePanel] = (0,
|
|
4055
|
-
const [recentLabItems, setRecentLabItems] = (0,
|
|
4056
|
-
const [aspectRatio, setAspectRatio] = (0,
|
|
4057
|
-
const [selectedModel, setSelectedModel] = (0,
|
|
4058
|
-
const [seed, setSeed] = (0,
|
|
4059
|
-
const [seedMode, setSeedMode] = (0,
|
|
4060
|
-
const [isLeftCollapsed, setIsLeftCollapsed] = (0,
|
|
4061
|
-
const [isRightCollapsed, setIsRightCollapsed] = (0,
|
|
4062
|
-
const [leftPanelWidth, setLeftPanelWidth] = (0,
|
|
4482
|
+
const [activePrompt, setActivePrompt] = (0, import_react23.useState)("");
|
|
4483
|
+
const [isSynthesizing, setIsSynthesizing] = (0, import_react23.useState)(false);
|
|
4484
|
+
const [activeGenerationsCount, setActiveGenerationsCount] = (0, import_react23.useState)(0);
|
|
4485
|
+
const [currentResult, setCurrentResult] = (0, import_react23.useState)(null);
|
|
4486
|
+
const [focusedNodeId, setFocusedNodeId] = (0, import_react23.useState)(null);
|
|
4487
|
+
const [leftTab, setLeftTab] = (0, import_react23.useState)("prompt");
|
|
4488
|
+
const [promptFeedback, setPromptFeedback] = (0, import_react23.useState)(null);
|
|
4489
|
+
const [lastPromptPayload, setLastPromptPayload] = (0, import_react23.useState)(null);
|
|
4490
|
+
const [isPromptTabGenerating, setIsPromptTabGenerating] = (0, import_react23.useState)(false);
|
|
4491
|
+
const [activeTab, setActiveTab] = (0, import_react23.useState)("history");
|
|
4492
|
+
const [mobileTab, setMobileTab] = (0, import_react23.useState)("stage");
|
|
4493
|
+
const [middlePanel, setMiddlePanel] = (0, import_react23.useState)("stage");
|
|
4494
|
+
const [recentLabItems, setRecentLabItems] = (0, import_react23.useState)([]);
|
|
4495
|
+
const [aspectRatio, setAspectRatio] = (0, import_react23.useState)("1:1");
|
|
4496
|
+
const [selectedModel, setSelectedModel] = (0, import_react23.useState)("\u{1F34C} Nano Banana Pro");
|
|
4497
|
+
const [seed, setSeed] = (0, import_react23.useState)(Math.floor(Math.random() * 1e6));
|
|
4498
|
+
const [seedMode, setSeedMode] = (0, import_react23.useState)("random");
|
|
4499
|
+
const [isLeftCollapsed, setIsLeftCollapsed] = (0, import_react23.useState)(false);
|
|
4500
|
+
const [isRightCollapsed, setIsRightCollapsed] = (0, import_react23.useState)(false);
|
|
4501
|
+
const [leftPanelWidth, setLeftPanelWidth] = (0, import_react23.useState)(() => {
|
|
4063
4502
|
try {
|
|
4064
4503
|
return parseInt(localStorage.getItem("aa-left-width") || "260", 10);
|
|
4065
4504
|
} catch {
|
|
4066
4505
|
return 260;
|
|
4067
4506
|
}
|
|
4068
4507
|
});
|
|
4069
|
-
const [rightPanelWidth, setRightPanelWidth] = (0,
|
|
4508
|
+
const [rightPanelWidth, setRightPanelWidth] = (0, import_react23.useState)(() => {
|
|
4070
4509
|
try {
|
|
4071
4510
|
return parseInt(localStorage.getItem("aa-right-width") || "320", 10);
|
|
4072
4511
|
} catch {
|
|
4073
4512
|
return 320;
|
|
4074
4513
|
}
|
|
4075
4514
|
});
|
|
4076
|
-
const [isPromptCollapsed, setIsPromptCollapsed] = (0,
|
|
4077
|
-
const [projectActionState, setProjectActionState] = (0,
|
|
4078
|
-
const syncServerDataRef = (0,
|
|
4079
|
-
const [workspaceTags, setWorkspaceTags] = (0,
|
|
4080
|
-
const [serverProjects, setServerProjects] = (0,
|
|
4081
|
-
const [isLoadingFromServer, setIsLoadingFromServer] = (0,
|
|
4082
|
-
const [highContrast, setHighContrast] = (0,
|
|
4515
|
+
const [isPromptCollapsed, setIsPromptCollapsed] = (0, import_react23.useState)(false);
|
|
4516
|
+
const [projectActionState, setProjectActionState] = (0, import_react23.useState)("idle");
|
|
4517
|
+
const syncServerDataRef = (0, import_react23.useRef)(null);
|
|
4518
|
+
const [workspaceTags, setWorkspaceTags] = (0, import_react23.useState)(null);
|
|
4519
|
+
const [serverProjects, setServerProjects] = (0, import_react23.useState)([]);
|
|
4520
|
+
const [isLoadingFromServer, setIsLoadingFromServer] = (0, import_react23.useState)(false);
|
|
4521
|
+
const [highContrast, setHighContrast] = (0, import_react23.useState)(() => {
|
|
4083
4522
|
try {
|
|
4084
4523
|
return localStorage.getItem("aa-contrast") === "high";
|
|
4085
4524
|
} catch {
|
|
4086
4525
|
return false;
|
|
4087
4526
|
}
|
|
4088
4527
|
});
|
|
4089
|
-
const [activeReferenceId, setActiveReferenceId] = (0,
|
|
4090
|
-
const [activeReferenceThumbnail, setActiveReferenceThumbnail] = (0,
|
|
4091
|
-
const [isScanningImage, setIsScanningImage] = (0,
|
|
4092
|
-
const [touchStartX, setTouchStartX] = (0,
|
|
4093
|
-
const [isFullscreen, setIsFullscreen] = (0,
|
|
4094
|
-
const [zoomScale, setZoomScale] = (0,
|
|
4095
|
-
const [zoomOffset, setZoomOffset] = (0,
|
|
4096
|
-
const lastPinchDist = (0,
|
|
4097
|
-
const lastTapTime = (0,
|
|
4098
|
-
const dragStart = (0,
|
|
4528
|
+
const [activeReferenceId, setActiveReferenceId] = (0, import_react23.useState)(null);
|
|
4529
|
+
const [activeReferenceThumbnail, setActiveReferenceThumbnail] = (0, import_react23.useState)(null);
|
|
4530
|
+
const [isScanningImage, setIsScanningImage] = (0, import_react23.useState)(false);
|
|
4531
|
+
const [touchStartX, setTouchStartX] = (0, import_react23.useState)(null);
|
|
4532
|
+
const [isFullscreen, setIsFullscreen] = (0, import_react23.useState)(false);
|
|
4533
|
+
const [zoomScale, setZoomScale] = (0, import_react23.useState)(1);
|
|
4534
|
+
const [zoomOffset, setZoomOffset] = (0, import_react23.useState)({ x: 0, y: 0 });
|
|
4535
|
+
const lastPinchDist = (0, import_react23.useRef)(null);
|
|
4536
|
+
const lastTapTime = (0, import_react23.useRef)(0);
|
|
4537
|
+
const dragStart = (0, import_react23.useRef)(null);
|
|
4099
4538
|
const openFullscreen = () => {
|
|
4100
4539
|
setIsFullscreen(true);
|
|
4101
4540
|
setZoomScale(1);
|
|
@@ -4158,7 +4597,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4158
4597
|
setActiveReferenceId(null);
|
|
4159
4598
|
setActiveReferenceThumbnail(null);
|
|
4160
4599
|
};
|
|
4161
|
-
const labServices = (0,
|
|
4600
|
+
const labServices = (0, import_react23.useMemo)(() => {
|
|
4162
4601
|
const available = groupGenerationsToLabItems([...galleryItems, ...history]);
|
|
4163
4602
|
return {
|
|
4164
4603
|
availableItems: available,
|
|
@@ -4238,17 +4677,17 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4238
4677
|
setIsScanningImage(false);
|
|
4239
4678
|
}
|
|
4240
4679
|
};
|
|
4241
|
-
const currentIndex = (0,
|
|
4242
|
-
const goToPrev = (0,
|
|
4680
|
+
const currentIndex = (0, import_react23.useMemo)(() => history.findIndex((h) => h.id === currentResult?.id), [history, currentResult]);
|
|
4681
|
+
const goToPrev = (0, import_react23.useCallback)(() => {
|
|
4243
4682
|
if (currentIndex > 0) setCurrentResult(history[currentIndex - 1]);
|
|
4244
4683
|
}, [currentIndex, history]);
|
|
4245
|
-
const goToNext = (0,
|
|
4684
|
+
const goToNext = (0, import_react23.useCallback)(() => {
|
|
4246
4685
|
if (currentIndex < history.length - 1) setCurrentResult(history[currentIndex + 1]);
|
|
4247
4686
|
}, [currentIndex, history]);
|
|
4248
4687
|
const hcStyle = highContrast ? { filter: "brightness(1.6) contrast(1.05)" } : void 0;
|
|
4249
4688
|
const isGenerating = activeGenerationsCount > 0;
|
|
4250
4689
|
useKeyboardNavigation(history, currentResult, setCurrentResult);
|
|
4251
|
-
const getSubtreeFormat = (0,
|
|
4690
|
+
const getSubtreeFormat = (0, import_react23.useCallback)((nodeId, depth = 0) => {
|
|
4252
4691
|
const node = nodes.find((n) => n.id === nodeId);
|
|
4253
4692
|
if (!node) return "";
|
|
4254
4693
|
const childrenIds = edges.filter((e) => e.source === nodeId).map((e) => e.target);
|
|
@@ -4256,7 +4695,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4256
4695
|
return `${indent}- ${node.data.label || "(unbenannt)"}
|
|
4257
4696
|
` + childrenIds.map((id) => getSubtreeFormat(id, depth + 1)).join("");
|
|
4258
4697
|
}, [nodes, edges]);
|
|
4259
|
-
const activePath = (0,
|
|
4698
|
+
const activePath = (0, import_react23.useMemo)(() => {
|
|
4260
4699
|
if (!focusedNodeId) return /* @__PURE__ */ new Set();
|
|
4261
4700
|
const path = /* @__PURE__ */ new Set([focusedNodeId]);
|
|
4262
4701
|
let currId = focusedNodeId;
|
|
@@ -4600,7 +5039,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4600
5039
|
setTimeout(() => setProjectActionState("idle"), 4e3);
|
|
4601
5040
|
}
|
|
4602
5041
|
};
|
|
4603
|
-
(0,
|
|
5042
|
+
(0, import_react23.useEffect)(() => {
|
|
4604
5043
|
if (activeTab === "setup" || activeTab === "sync") fetchServerProjects();
|
|
4605
5044
|
}, [activeTab]);
|
|
4606
5045
|
const mergeWorkspaceTags = (local, remote) => {
|
|
@@ -4624,7 +5063,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4624
5063
|
};
|
|
4625
5064
|
if (isFullscreen && currentResult?.base64) {
|
|
4626
5065
|
const fsBase64 = currentResult.base64.startsWith("data:") ? currentResult.base64 : `data:image/png;base64,${currentResult.base64}`;
|
|
4627
|
-
return /* @__PURE__ */ (0,
|
|
5066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4628
5067
|
"div",
|
|
4629
5068
|
{
|
|
4630
5069
|
className: "fixed inset-0 bg-black z-50 flex items-center justify-center overflow-hidden touch-none",
|
|
@@ -4632,7 +5071,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4632
5071
|
onTouchMove: handleFsTouchMove,
|
|
4633
5072
|
onTouchEnd: handleFsTouchEnd,
|
|
4634
5073
|
children: [
|
|
4635
|
-
/* @__PURE__ */ (0,
|
|
5074
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4636
5075
|
"img",
|
|
4637
5076
|
{
|
|
4638
5077
|
src: fsBase64,
|
|
@@ -4649,77 +5088,77 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4649
5088
|
}
|
|
4650
5089
|
}
|
|
4651
5090
|
),
|
|
4652
|
-
/* @__PURE__ */ (0,
|
|
4653
|
-
zoomScale > 1 && /* @__PURE__ */ (0,
|
|
5091
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: closeFullscreen, className: "absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[22px]", children: "close" }) }),
|
|
5092
|
+
zoomScale > 1 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => {
|
|
4654
5093
|
setZoomScale(1);
|
|
4655
5094
|
setZoomOffset({ x: 0, y: 0 });
|
|
4656
|
-
}, className: "absolute top-4 left-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ (0,
|
|
4657
|
-
history.length > 1 && /* @__PURE__ */ (0,
|
|
4658
|
-
/* @__PURE__ */ (0,
|
|
5095
|
+
}, className: "absolute top-4 left-4 w-10 h-10 flex items-center justify-center rounded-full bg-black/70 border border-white/20 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "zoom_out_map" }) }),
|
|
5096
|
+
history.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5097
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => {
|
|
4659
5098
|
if (currentIndex > 0) setCurrentResult(history[currentIndex - 1]);
|
|
4660
|
-
}, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ (0,
|
|
4661
|
-
/* @__PURE__ */ (0,
|
|
5099
|
+
}, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
|
|
5100
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => {
|
|
4662
5101
|
if (currentIndex < history.length - 1) setCurrentResult(history[currentIndex + 1]);
|
|
4663
|
-
}, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ (0,
|
|
4664
|
-
/* @__PURE__ */ (0,
|
|
5102
|
+
}, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
|
|
5103
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "absolute bottom-6 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
|
|
4665
5104
|
currentIndex + 1,
|
|
4666
5105
|
" / ",
|
|
4667
5106
|
history.length
|
|
4668
5107
|
] })
|
|
4669
5108
|
] }),
|
|
4670
|
-
zoomScale === 1 && /* @__PURE__ */ (0,
|
|
5109
|
+
zoomScale === 1 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute bottom-6 right-4 text-[9px] text-white/20 font-mono", children: "Pinch zum Zoomen \xB7 Doppeltipp 2.5\xD7" })
|
|
4671
5110
|
]
|
|
4672
5111
|
}
|
|
4673
5112
|
);
|
|
4674
5113
|
}
|
|
4675
5114
|
if (showStart) {
|
|
4676
|
-
return /* @__PURE__ */ (0,
|
|
4677
|
-
/* @__PURE__ */ (0,
|
|
5115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "fixed inset-0 bg-[#0e0e0e] flex flex-col items-center justify-center p-6", style: { gap: 28, ...hcStyle }, children: [
|
|
5116
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { ref: wsInputRef, type: "file", accept: ".zip", className: "hidden", onChange: (e) => {
|
|
4678
5117
|
const f = e.target.files?.[0];
|
|
4679
5118
|
if (f) handleProjectImport(f);
|
|
4680
5119
|
e.target.value = "";
|
|
4681
5120
|
} }),
|
|
4682
|
-
/* @__PURE__ */ (0,
|
|
4683
|
-
/* @__PURE__ */ (0,
|
|
4684
|
-
/* @__PURE__ */ (0,
|
|
4685
|
-
/* @__PURE__ */ (0,
|
|
5121
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-1", children: [
|
|
5122
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-white/15 text-[44px]", children: "palette" }),
|
|
5123
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/25 text-[10px] font-bold uppercase tracking-[0.25em]", children: "Avatar Architect" }),
|
|
5124
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: "text-white text-[13px] font-mono", children: [
|
|
4686
5125
|
"v",
|
|
4687
5126
|
LIB_VERSION
|
|
4688
5127
|
] })
|
|
4689
5128
|
] }),
|
|
4690
|
-
/* @__PURE__ */ (0,
|
|
5129
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4691
5130
|
"button",
|
|
4692
5131
|
{
|
|
4693
5132
|
onClick: toggleContrast,
|
|
4694
5133
|
className: "flex items-center gap-3 px-5 py-3 rounded-2xl border transition-colors",
|
|
4695
5134
|
style: { borderColor: highContrast ? "rgba(255,255,255,0.3)" : "rgba(255,255,255,0.08)", background: highContrast ? "rgba(255,255,255,0.08)" : "transparent" },
|
|
4696
5135
|
children: [
|
|
4697
|
-
/* @__PURE__ */ (0,
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
4699
|
-
/* @__PURE__ */ (0,
|
|
4700
|
-
/* @__PURE__ */ (0,
|
|
5136
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[22px]", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.35)" }, children: highContrast ? "light_mode" : "dark_mode" }),
|
|
5137
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-start", children: [
|
|
5138
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[13px] font-bold", style: { color: highContrast ? "#fff" : "rgba(255,255,255,0.5)" }, children: highContrast ? "Hoher Kontrast" : "Normaler Kontrast" }),
|
|
5139
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[10px]", style: { color: "rgba(255,255,255,0.25)" }, children: "Tippen zum Umschalten" })
|
|
4701
5140
|
] })
|
|
4702
5141
|
]
|
|
4703
5142
|
}
|
|
4704
5143
|
),
|
|
4705
|
-
/* @__PURE__ */ (0,
|
|
4706
|
-
/* @__PURE__ */ (0,
|
|
5144
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
|
|
5145
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4707
5146
|
"button",
|
|
4708
5147
|
{
|
|
4709
5148
|
onClick: () => wsInputRef.current?.click(),
|
|
4710
5149
|
className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform",
|
|
4711
5150
|
style: { height: 56, background: projectLoaded ? "#16a34a" : "#0284c7" },
|
|
4712
5151
|
children: [
|
|
4713
|
-
/* @__PURE__ */ (0,
|
|
5152
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[22px]", children: projectLoaded ? "check_circle" : "folder_zip" }),
|
|
4714
5153
|
projectLoaded ? "Projekt geladen \u2713" : "Projekt laden (.zip)"
|
|
4715
5154
|
]
|
|
4716
5155
|
}
|
|
4717
5156
|
),
|
|
4718
|
-
!projectLoaded && /* @__PURE__ */ (0,
|
|
5157
|
+
!projectLoaded && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/20 text-[10px] text-center", children: "Baum, Bilder und Einstellungen wiederherstellen" })
|
|
4719
5158
|
] }),
|
|
4720
|
-
/* @__PURE__ */ (0,
|
|
4721
|
-
!initialHfToken && /* @__PURE__ */ (0,
|
|
4722
|
-
/* @__PURE__ */ (0,
|
|
5159
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
|
|
5160
|
+
!initialHfToken && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex gap-2 w-full", children: [
|
|
5161
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4723
5162
|
"input",
|
|
4724
5163
|
{
|
|
4725
5164
|
type: "password",
|
|
@@ -4735,7 +5174,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4735
5174
|
style: { height: 44, background: "rgba(255,255,255,0.05)", border: "1px solid rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.7)" }
|
|
4736
5175
|
}
|
|
4737
5176
|
),
|
|
4738
|
-
hfTokenInput.trim() && /* @__PURE__ */ (0,
|
|
5177
|
+
hfTokenInput.trim() && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4739
5178
|
"button",
|
|
4740
5179
|
{
|
|
4741
5180
|
type: "button",
|
|
@@ -4746,7 +5185,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4746
5185
|
}
|
|
4747
5186
|
)
|
|
4748
5187
|
] }),
|
|
4749
|
-
hfToken && /* @__PURE__ */ (0,
|
|
5188
|
+
hfToken && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4750
5189
|
"button",
|
|
4751
5190
|
{
|
|
4752
5191
|
disabled: isLoadingFromHF,
|
|
@@ -4768,15 +5207,15 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4768
5207
|
className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform disabled:opacity-50",
|
|
4769
5208
|
style: { height: 56, background: "#f59e0b" },
|
|
4770
5209
|
children: [
|
|
4771
|
-
/* @__PURE__ */ (0,
|
|
5210
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromHF ? " animate-spin" : ""}`, children: isLoadingFromHF ? "sync" : "cloud_download" }),
|
|
4772
5211
|
isLoadingFromHF ? "Laden\u2026" : "Von HF laden"
|
|
4773
5212
|
]
|
|
4774
5213
|
}
|
|
4775
5214
|
),
|
|
4776
|
-
hfToken && /* @__PURE__ */ (0,
|
|
5215
|
+
hfToken && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand von Hugging Face laden" })
|
|
4777
5216
|
] }),
|
|
4778
|
-
onFetchServerProjects && /* @__PURE__ */ (0,
|
|
4779
|
-
/* @__PURE__ */ (0,
|
|
5217
|
+
onFetchServerProjects && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
|
|
5218
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4780
5219
|
"button",
|
|
4781
5220
|
{
|
|
4782
5221
|
disabled: isLoadingFromServer,
|
|
@@ -4797,39 +5236,39 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4797
5236
|
className: "w-full flex items-center justify-center gap-3 rounded-2xl font-bold text-[14px] uppercase tracking-wide text-white active:scale-95 transition-transform disabled:opacity-50",
|
|
4798
5237
|
style: { height: 56, background: "#7c3aed" },
|
|
4799
5238
|
children: [
|
|
4800
|
-
/* @__PURE__ */ (0,
|
|
5239
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: `material-symbols-outlined text-[22px]${isLoadingFromServer ? " animate-spin" : ""}`, children: isLoadingFromServer ? "sync" : "cloud_download" }),
|
|
4801
5240
|
isLoadingFromServer ? "Laden\u2026" : "Vom Server laden"
|
|
4802
5241
|
]
|
|
4803
5242
|
}
|
|
4804
5243
|
),
|
|
4805
|
-
/* @__PURE__ */ (0,
|
|
5244
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/20 text-[10px] text-center", children: "Letzten Stand vom Server wiederherstellen" })
|
|
4806
5245
|
] }),
|
|
4807
|
-
/* @__PURE__ */ (0,
|
|
4808
|
-
/* @__PURE__ */ (0,
|
|
4809
|
-
/* @__PURE__ */ (0,
|
|
5246
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
|
|
5247
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold", children: "Layout w\xE4hlen & starten" }),
|
|
5248
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "grid grid-cols-2 gap-2 w-full", children: [
|
|
4810
5249
|
{ id: "mobile", icon: "smartphone", label: "Mobile" },
|
|
4811
5250
|
{ id: "mobile-desktop", icon: "phonelink", label: "Mobile+" },
|
|
4812
5251
|
{ id: "desktop", icon: "desktop_windows", label: "Desktop" },
|
|
4813
5252
|
{ id: "tablet-landscape", icon: "tablet", label: "Landscape" }
|
|
4814
|
-
].map((opt) => /* @__PURE__ */ (0,
|
|
5253
|
+
].map((opt) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4815
5254
|
"button",
|
|
4816
5255
|
{
|
|
4817
5256
|
onClick: () => startApp(opt.id),
|
|
4818
5257
|
className: "flex flex-col items-center gap-2 py-4 rounded-2xl border transition-colors",
|
|
4819
5258
|
style: { borderColor: layoutChoice === opt.id ? "rgba(255,255,255,0.35)" : "rgba(255,255,255,0.08)", background: layoutChoice === opt.id ? "rgba(255,255,255,0.07)" : "transparent" },
|
|
4820
5259
|
children: [
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4822
|
-
/* @__PURE__ */ (0,
|
|
5260
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[24px]", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.icon }),
|
|
5261
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[11px] font-bold", style: { color: layoutChoice === opt.id ? "#fff" : "rgba(255,255,255,0.4)" }, children: opt.label })
|
|
4823
5262
|
]
|
|
4824
5263
|
},
|
|
4825
5264
|
opt.id
|
|
4826
5265
|
)) }),
|
|
4827
|
-
layoutChoice === "mobile-desktop" && /* @__PURE__ */ (0,
|
|
4828
|
-
layoutChoice === "tablet-landscape" && /* @__PURE__ */ (0,
|
|
5266
|
+
layoutChoice === "mobile-desktop" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/20 text-[9px] text-center", children: "Mobil-Layout skaliert f\xFCr Desktop-Modus" }),
|
|
5267
|
+
layoutChoice === "tablet-landscape" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/20 text-[9px] text-center", children: "2-Spalten-Layout f\xFCr Landscape-Tablet im Desktop-Mode" })
|
|
4829
5268
|
] }),
|
|
4830
|
-
!hfNamespace && !hfNamespaceFromServer && /* @__PURE__ */ (0,
|
|
4831
|
-
/* @__PURE__ */ (0,
|
|
4832
|
-
["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"].map((ns, i) => /* @__PURE__ */ (0,
|
|
5269
|
+
!hfNamespace && !hfNamespaceFromServer && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-3 w-full max-w-[280px]", children: [
|
|
5270
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-white/25 text-[10px] uppercase tracking-widest font-bold", children: "State:" }),
|
|
5271
|
+
["app.art-by-rolands.de/", "dev-app.art-by-rolands.de/"].map((ns, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4833
5272
|
"button",
|
|
4834
5273
|
{
|
|
4835
5274
|
onClick: () => {
|
|
@@ -4856,21 +5295,21 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4856
5295
|
const mdScale = mdMode ? window.innerWidth / 430 : 1;
|
|
4857
5296
|
const mdW = mdMode ? 430 : void 0;
|
|
4858
5297
|
const mdH = mdMode ? Math.ceil(window.innerHeight / mdScale) : void 0;
|
|
4859
|
-
const mobileRoot = /* @__PURE__ */ (0,
|
|
5298
|
+
const mobileRoot = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col bg-[#0e0e0e] text-white overflow-hidden", style: {
|
|
4860
5299
|
width: mdMode ? mdW : "100vw",
|
|
4861
5300
|
height: mdMode ? mdH : "100dvh",
|
|
4862
5301
|
transform: mdMode ? `scale(${mdScale})` : void 0,
|
|
4863
5302
|
transformOrigin: mdMode ? "top left" : void 0,
|
|
4864
5303
|
...hcStyle || {}
|
|
4865
5304
|
}, children: [
|
|
4866
|
-
mobileTab === "labs" && /* @__PURE__ */ (0,
|
|
5305
|
+
mobileTab === "labs" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LabsTab, { services: labServices, onResult: (item) => {
|
|
4867
5306
|
const frame = item.frames[0];
|
|
4868
5307
|
if (frame?.base64) {
|
|
4869
5308
|
setCurrentResult(frameToGeneration(frame, item));
|
|
4870
5309
|
setMobileTab("stage");
|
|
4871
5310
|
}
|
|
4872
5311
|
} }) }),
|
|
4873
|
-
mobileTab === "tags" && workspaceTags && /* @__PURE__ */ (0,
|
|
5312
|
+
mobileTab === "tags" && workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col flex-1 min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4874
5313
|
TagManagerPanel,
|
|
4875
5314
|
{
|
|
4876
5315
|
workspaceTags,
|
|
@@ -4881,21 +5320,21 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4881
5320
|
onTagMove: handleTagMove
|
|
4882
5321
|
}
|
|
4883
5322
|
) }),
|
|
4884
|
-
mobileTab === "stage" && /* @__PURE__ */ (0,
|
|
4885
|
-
/* @__PURE__ */ (0,
|
|
4886
|
-
/* @__PURE__ */ (0,
|
|
4887
|
-
/* @__PURE__ */ (0,
|
|
4888
|
-
/* @__PURE__ */ (0,
|
|
4889
|
-
activeReferenceThumbnail ? /* @__PURE__ */ (0,
|
|
4890
|
-
/* @__PURE__ */ (0,
|
|
4891
|
-
/* @__PURE__ */ (0,
|
|
4892
|
-
/* @__PURE__ */ (0,
|
|
4893
|
-
] }) : /* @__PURE__ */ (0,
|
|
4894
|
-
/* @__PURE__ */ (0,
|
|
4895
|
-
/* @__PURE__ */ (0,
|
|
5323
|
+
mobileTab === "stage" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col flex-1 min-h-0", children: [
|
|
5324
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2 px-3 border-b border-white/5 bg-black/30 shrink-0", style: { height: 52 }, children: [
|
|
5325
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
|
|
5326
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
|
|
5327
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-1" }),
|
|
5328
|
+
activeReferenceThumbnail ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden mr-2", style: { height: 28 }, children: [
|
|
5329
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
|
|
5330
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
|
|
5331
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 active:text-white/80 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
|
|
5332
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: handleSelectReference, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "add_photo_alternate" }) }),
|
|
5333
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: toggleContrast, className: "text-white/20 active:text-white/60 transition-colors mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: highContrast ? "light_mode" : "dark_mode" }) }),
|
|
5334
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setShowStart(true), className: "text-white/20 active:text-white/60 transition-colors mr-1", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "desktop_windows" }) })
|
|
4896
5335
|
] }),
|
|
4897
|
-
/* @__PURE__ */ (0,
|
|
4898
|
-
/* @__PURE__ */ (0,
|
|
5336
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "px-3 pt-3 pb-2 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `relative rounded-xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4899
5338
|
"textarea",
|
|
4900
5339
|
{
|
|
4901
5340
|
value: activePrompt,
|
|
@@ -4905,26 +5344,26 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4905
5344
|
placeholder: "Prompt eingeben..."
|
|
4906
5345
|
}
|
|
4907
5346
|
),
|
|
4908
|
-
activePrompt && !isSynthesizing && /* @__PURE__ */ (0,
|
|
5347
|
+
activePrompt && !isSynthesizing && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center text-white/20 active:text-white transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[18px]", children: "close" }) })
|
|
4909
5348
|
] }) }),
|
|
4910
|
-
/* @__PURE__ */ (0,
|
|
5349
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "px-3 pb-3 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4911
5350
|
"button",
|
|
4912
5351
|
{
|
|
4913
5352
|
onClick: () => handleGenerateImage(),
|
|
4914
5353
|
disabled: !activePrompt.trim() || isGenerating,
|
|
4915
5354
|
className: "w-full flex items-center justify-center gap-2 rounded-xl font-bold text-[14px] uppercase tracking-wide transition-all disabled:opacity-30 active:scale-95",
|
|
4916
5355
|
style: { height: 48, background: activePrompt.trim() && !isGenerating ? "#0284c7" : void 0, border: "1px solid rgba(255,255,255,0.1)" },
|
|
4917
|
-
children: isGenerating ? /* @__PURE__ */ (0,
|
|
4918
|
-
/* @__PURE__ */ (0,
|
|
4919
|
-
/* @__PURE__ */ (0,
|
|
4920
|
-
] }) : /* @__PURE__ */ (0,
|
|
4921
|
-
/* @__PURE__ */ (0,
|
|
4922
|
-
/* @__PURE__ */ (0,
|
|
5356
|
+
children: isGenerating ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5357
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-4 h-4 border-t-2 border-white rounded-full animate-spin" }),
|
|
5358
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Generiere..." })
|
|
5359
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5360
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "bolt" }),
|
|
5361
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Generieren" })
|
|
4923
5362
|
] })
|
|
4924
5363
|
}
|
|
4925
5364
|
) }),
|
|
4926
|
-
/* @__PURE__ */ (0,
|
|
4927
|
-
/* @__PURE__ */ (0,
|
|
5365
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 min-h-0 px-3 pb-3 flex flex-col", children: [
|
|
5366
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4928
5367
|
"div",
|
|
4929
5368
|
{
|
|
4930
5369
|
className: "w-full rounded-2xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center",
|
|
@@ -4938,25 +5377,25 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4938
5377
|
setTouchStartX(null);
|
|
4939
5378
|
},
|
|
4940
5379
|
children: [
|
|
4941
|
-
currentResult?.status === "processing" && /* @__PURE__ */ (0,
|
|
4942
|
-
/* @__PURE__ */ (0,
|
|
4943
|
-
/* @__PURE__ */ (0,
|
|
5380
|
+
currentResult?.status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
5381
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-10 h-10 border-t-2 border-white rounded-full animate-spin" }),
|
|
5382
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[11px] text-white/40 uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
|
|
4944
5383
|
] }),
|
|
4945
|
-
currentResult?.status === "error" && /* @__PURE__ */ (0,
|
|
4946
|
-
/* @__PURE__ */ (0,
|
|
4947
|
-
/* @__PURE__ */ (0,
|
|
4948
|
-
/* @__PURE__ */ (0,
|
|
5384
|
+
currentResult?.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "p-6 text-center flex flex-col items-center gap-3", children: [
|
|
5385
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-red-400 text-[36px]", children: "warning" }),
|
|
5386
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-white/50 text-[13px]", children: currentResult.error?.message }),
|
|
5387
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => handleGenerateImage(currentResult.prompt), className: "px-4 py-2 rounded-lg border border-white/20 text-[13px] text-white/70 active:bg-white/10", children: "Erneut versuchen" })
|
|
4949
5388
|
] }),
|
|
4950
|
-
currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ (0,
|
|
4951
|
-
!currentResult && /* @__PURE__ */ (0,
|
|
4952
|
-
/* @__PURE__ */ (0,
|
|
4953
|
-
/* @__PURE__ */ (0,
|
|
5389
|
+
currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: currentResult.base64, className: "w-full h-full object-contain" }),
|
|
5390
|
+
!currentResult && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
|
|
5391
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[64px]", children: "palette" }),
|
|
5392
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[11px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
|
|
4954
5393
|
] }),
|
|
4955
|
-
currentResult?.status === "done" && /* @__PURE__ */ (0,
|
|
4956
|
-
history.length > 1 && currentResult && /* @__PURE__ */ (0,
|
|
4957
|
-
/* @__PURE__ */ (0,
|
|
4958
|
-
/* @__PURE__ */ (0,
|
|
4959
|
-
/* @__PURE__ */ (0,
|
|
5394
|
+
currentResult?.status === "done" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: openFullscreen, className: "absolute top-2 right-2 w-8 h-8 flex items-center justify-center rounded-full bg-black/60 border border-white/10 z-10", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[18px]", children: "fullscreen" }) }),
|
|
5395
|
+
history.length > 1 && currentResult && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5396
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: goToPrev, disabled: currentIndex <= 0, className: "absolute left-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_left" }) }),
|
|
5397
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, className: "absolute right-2 top-1/2 -translate-y-1/2 w-10 h-10 flex items-center justify-center rounded-full bg-black/60 border border-white/10 disabled:opacity-0 transition-opacity", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[22px]", children: "chevron_right" }) }),
|
|
5398
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 bg-black/60 rounded-full px-3 py-0.5 text-[10px] text-white/40 font-mono", children: [
|
|
4960
5399
|
currentIndex + 1,
|
|
4961
5400
|
" / ",
|
|
4962
5401
|
history.length
|
|
@@ -4965,33 +5404,33 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4965
5404
|
]
|
|
4966
5405
|
}
|
|
4967
5406
|
),
|
|
4968
|
-
currentResult?.status === "done" && /* @__PURE__ */ (0,
|
|
4969
|
-
/* @__PURE__ */ (0,
|
|
4970
|
-
/* @__PURE__ */ (0,
|
|
4971
|
-
/* @__PURE__ */ (0,
|
|
5407
|
+
currentResult?.status === "done" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex gap-2 mt-3", children: [
|
|
5408
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
|
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "replay" }),
|
|
5410
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[12px] text-white/60", children: "Prompt" })
|
|
4972
5411
|
] }),
|
|
4973
|
-
/* @__PURE__ */ (0,
|
|
4974
|
-
/* @__PURE__ */ (0,
|
|
4975
|
-
/* @__PURE__ */ (0,
|
|
5412
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => handleGenerateImage(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl bg-white/10 active:bg-white/15 transition-colors", style: { height: 44 }, children: [
|
|
5413
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[18px] text-white/80", children: "auto_fix_high" }),
|
|
5414
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[12px] text-white/80 font-bold", children: "Referenz" })
|
|
4976
5415
|
] }),
|
|
4977
|
-
/* @__PURE__ */ (0,
|
|
4978
|
-
/* @__PURE__ */ (0,
|
|
4979
|
-
/* @__PURE__ */ (0,
|
|
5416
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: handleDownloadSingle, className: "flex-1 flex items-center justify-center gap-1.5 rounded-xl border border-white/10 bg-white/5 active:bg-white/10 transition-colors", style: { height: 44 }, children: [
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[18px] text-white/60", children: "download" }),
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[12px] text-white/60", children: "Laden" })
|
|
4980
5419
|
] })
|
|
4981
5420
|
] })
|
|
4982
5421
|
] })
|
|
4983
5422
|
] }),
|
|
4984
|
-
mobileTab === "browse" && /* @__PURE__ */ (0,
|
|
4985
|
-
/* @__PURE__ */ (0,
|
|
4986
|
-
["history", "gallery", "inspect"].map((tab) => /* @__PURE__ */ (0,
|
|
4987
|
-
hfToken && /* @__PURE__ */ (0,
|
|
5423
|
+
mobileTab === "browse" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col flex-1 min-h-0", children: [
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
|
|
5425
|
+
["history", "gallery", "inspect"].map((tab) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setActiveTab(tab), className: `flex-1 flex items-center justify-center gap-1.5 transition-colors text-[11px] font-bold uppercase tracking-wide ${activeTab === tab ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : "info" }) }, tab)),
|
|
5426
|
+
hfToken && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-12 flex items-center justify-center text-white/20 active:text-white transition-colors disabled:opacity-30", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: `material-symbols-outlined text-[20px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) })
|
|
4988
5427
|
] }),
|
|
4989
|
-
/* @__PURE__ */ (0,
|
|
4990
|
-
activeTab === "history" && /* @__PURE__ */ (0,
|
|
5428
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 overflow-hidden relative", children: [
|
|
5429
|
+
activeTab === "history" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: (g) => {
|
|
4991
5430
|
setCurrentResult(g);
|
|
4992
5431
|
setMobileTab("stage");
|
|
4993
5432
|
}, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)) }),
|
|
4994
|
-
activeTab === "gallery" && /* @__PURE__ */ (0,
|
|
5433
|
+
activeTab === "gallery" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4995
5434
|
MediaLibrary,
|
|
4996
5435
|
{
|
|
4997
5436
|
items: galleryItems,
|
|
@@ -5011,39 +5450,43 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5011
5450
|
}
|
|
5012
5451
|
}
|
|
5013
5452
|
),
|
|
5014
|
-
activeTab === "inspect" && /* @__PURE__ */ (0,
|
|
5453
|
+
activeTab === "inspect" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InspectPanel, { currentResult, history, onSelect: (g) => {
|
|
5015
5454
|
setCurrentResult(g);
|
|
5016
5455
|
} })
|
|
5017
5456
|
] })
|
|
5018
5457
|
] }),
|
|
5019
|
-
/* @__PURE__ */ (0,
|
|
5020
|
-
/* @__PURE__ */ (0,
|
|
5021
|
-
workspaceTags && /* @__PURE__ */ (0,
|
|
5458
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: mobileTab === "tools" ? "flex" : "none" }, className: "flex flex-col flex-1 min-h-0", children: [
|
|
5459
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex border-b border-white/5 shrink-0", style: { height: 52 }, children: [
|
|
5460
|
+
workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => {
|
|
5022
5461
|
setLeftTab("prompt");
|
|
5023
5462
|
if (activeTab === "setup" || activeTab === "sync") setActiveTab("history");
|
|
5024
5463
|
}, className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
|
|
5025
|
-
/* @__PURE__ */ (0,
|
|
5464
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "auto_fix_high" }),
|
|
5026
5465
|
"Prompt"
|
|
5027
5466
|
] }),
|
|
5028
|
-
/* @__PURE__ */ (0,
|
|
5467
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => {
|
|
5029
5468
|
setLeftTab("hierarchy");
|
|
5030
5469
|
if (activeTab === "setup" || activeTab === "sync") setActiveTab("history");
|
|
5031
5470
|
}, className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
|
|
5032
|
-
/* @__PURE__ */ (0,
|
|
5471
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "account_tree" }),
|
|
5033
5472
|
"Hierarchie"
|
|
5034
5473
|
] }),
|
|
5035
|
-
/* @__PURE__ */ (0,
|
|
5036
|
-
/* @__PURE__ */ (0,
|
|
5474
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setActiveTab("setup"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "setup" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
|
|
5475
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "settings" }),
|
|
5037
5476
|
"Setup"
|
|
5038
5477
|
] }),
|
|
5039
|
-
/* @__PURE__ */ (0,
|
|
5040
|
-
/* @__PURE__ */ (0,
|
|
5478
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setActiveTab("sync"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "sync" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
|
|
5479
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "cloud_sync" }),
|
|
5041
5480
|
"Sync"
|
|
5042
5481
|
] }),
|
|
5043
|
-
|
|
5482
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setActiveTab("hftest"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "hftest" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: [
|
|
5483
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "biotech" }),
|
|
5484
|
+
"HF"
|
|
5485
|
+
] }),
|
|
5486
|
+
workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
|
|
5044
5487
|
] }),
|
|
5045
|
-
/* @__PURE__ */ (0,
|
|
5046
|
-
leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" && /* @__PURE__ */ (0,
|
|
5488
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 overflow-hidden relative", children: [
|
|
5489
|
+
leftTab === "hierarchy" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute inset-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5047
5490
|
ListView,
|
|
5048
5491
|
{
|
|
5049
5492
|
nodes,
|
|
@@ -5074,12 +5517,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5074
5517
|
isGeneratingNodeId: (id) => isSynthesizing && focusedNodeId === id
|
|
5075
5518
|
}
|
|
5076
5519
|
) }),
|
|
5077
|
-
workspaceTags && /* @__PURE__ */ (0,
|
|
5520
|
+
workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { display: leftTab === "prompt" && activeTab !== "setup" && activeTab !== "sync" && activeTab !== "hftest" ? "flex" : "none" }, className: "absolute inset-0 flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => {
|
|
5078
5521
|
handleGenerateImage(prompt);
|
|
5079
5522
|
setMobileTab("stage");
|
|
5080
5523
|
}, onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage }) }),
|
|
5081
|
-
activeTab === "setup" && /* @__PURE__ */ (0,
|
|
5082
|
-
activeTab === "sync" && /* @__PURE__ */ (0,
|
|
5524
|
+
activeTab === "setup" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo }),
|
|
5525
|
+
activeTab === "sync" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5083
5526
|
ProjectSyncTab,
|
|
5084
5527
|
{
|
|
5085
5528
|
topSlot: syncTopSlot,
|
|
@@ -5103,7 +5546,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5103
5546
|
onHfInitialSync: hfToken ? handleHfInitialSync : void 0
|
|
5104
5547
|
}
|
|
5105
5548
|
),
|
|
5106
|
-
activeTab === "tags" && workspaceTags && /* @__PURE__ */ (0,
|
|
5549
|
+
activeTab === "tags" && workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5107
5550
|
TagManagerPanel,
|
|
5108
5551
|
{
|
|
5109
5552
|
workspaceTags,
|
|
@@ -5113,22 +5556,23 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5113
5556
|
onTagReorder: handleTagReorder,
|
|
5114
5557
|
onTagMove: handleTagMove
|
|
5115
5558
|
}
|
|
5116
|
-
)
|
|
5559
|
+
),
|
|
5560
|
+
activeTab === "hftest" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute inset-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(HFTestTab, { token: hfToken, namespace: effectiveNamespace, galleryItems }) })
|
|
5117
5561
|
] })
|
|
5118
5562
|
] }),
|
|
5119
|
-
/* @__PURE__ */ (0,
|
|
5563
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex border-t border-white/10 bg-black shrink-0", style: { height: 56, paddingBottom: "env(safe-area-inset-bottom, 0px)" }, children: [
|
|
5120
5564
|
{ id: "tools", icon: "auto_fix_high", label: "Prompt" },
|
|
5121
5565
|
{ id: "stage", icon: "palette", label: "Stage" },
|
|
5122
5566
|
{ id: "labs", icon: "science", label: "Labs" },
|
|
5123
5567
|
...workspaceTags ? [{ id: "tags", icon: "label", label: "Tags" }] : [],
|
|
5124
5568
|
{ id: "browse", icon: "photo_library", label: "Galerie" }
|
|
5125
|
-
].map((tab) => /* @__PURE__ */ (0,
|
|
5126
|
-
/* @__PURE__ */ (0,
|
|
5127
|
-
/* @__PURE__ */ (0,
|
|
5569
|
+
].map((tab) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setMobileTab(tab.id), className: `flex-1 flex flex-col items-center justify-center gap-0.5 transition-colors ${mobileTab === tab.id ? "text-white" : "text-white/30"}`, children: [
|
|
5570
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[24px]", children: tab.icon }),
|
|
5571
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wide", children: tab.label })
|
|
5128
5572
|
] }, tab.id)) })
|
|
5129
5573
|
] });
|
|
5130
5574
|
if (mdMode) {
|
|
5131
|
-
return /* @__PURE__ */ (0,
|
|
5575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { position: "fixed", inset: 0, overflow: "hidden", background: "#0e0e0e" }, children: mobileRoot });
|
|
5132
5576
|
}
|
|
5133
5577
|
return mobileRoot;
|
|
5134
5578
|
}
|
|
@@ -5136,17 +5580,17 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5136
5580
|
const tlScale = Math.min(window.innerWidth / 920, window.innerHeight / 520);
|
|
5137
5581
|
const tlW = 920;
|
|
5138
5582
|
const tlH = 520;
|
|
5139
|
-
return /* @__PURE__ */ (0,
|
|
5140
|
-
/* @__PURE__ */ (0,
|
|
5141
|
-
/* @__PURE__ */ (0,
|
|
5142
|
-
/* @__PURE__ */ (0,
|
|
5143
|
-
/* @__PURE__ */ (0,
|
|
5144
|
-
/* @__PURE__ */ (0,
|
|
5145
|
-
/* @__PURE__ */ (0,
|
|
5146
|
-
/* @__PURE__ */ (0,
|
|
5583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { position: "fixed", inset: 0, background: "#0e0e0e", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden", ...hcStyle || {} }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { width: tlW, height: tlH, transform: `scale(${tlScale})`, transformOrigin: "center center", display: "flex", flexDirection: "row", color: "#fff", overflow: "hidden", borderRadius: 0 }, children: [
|
|
5584
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { width: 320, height: tlH, display: "flex", flexDirection: "column", borderRight: "1px solid rgba(255,255,255,0.05)", background: "#000", flexShrink: 0 }, children: [
|
|
5585
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { height: 52, borderBottom: "1px solid rgba(255,255,255,0.05)", display: "flex", alignItems: "center", gap: 8, padding: "0 12px", flexShrink: 0 }, children: [
|
|
5586
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
|
|
5587
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] }),
|
|
5588
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { flex: 1 } }),
|
|
5589
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: toggleContrast, style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: highContrast ? "light_mode" : "dark_mode" }) }),
|
|
5590
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setShowStart(true), style: { color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 4, lineHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "apps" }) })
|
|
5147
5591
|
] }),
|
|
5148
|
-
/* @__PURE__ */ (0,
|
|
5149
|
-
/* @__PURE__ */ (0,
|
|
5592
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { padding: "12px 12px 8px", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { position: "relative", borderRadius: 12, border: `1px solid ${isSynthesizing ? "rgba(255,255,255,0.2)" : "rgba(255,255,255,0.1)"}`, background: "rgba(255,255,255,0.05)" }, children: [
|
|
5593
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5150
5594
|
"textarea",
|
|
5151
5595
|
{
|
|
5152
5596
|
value: activePrompt,
|
|
@@ -5155,27 +5599,27 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5155
5599
|
placeholder: "Prompt eingeben..."
|
|
5156
5600
|
}
|
|
5157
5601
|
),
|
|
5158
|
-
activePrompt && /* @__PURE__ */ (0,
|
|
5602
|
+
activePrompt && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setActivePrompt(""), style: { position: "absolute", top: 6, right: 6, width: 22, height: 22, display: "flex", alignItems: "center", justifyContent: "center", color: "rgba(255,255,255,0.2)", background: "none", border: "none", cursor: "pointer", padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 15 }, children: "close" }) })
|
|
5159
5603
|
] }) }),
|
|
5160
|
-
/* @__PURE__ */ (0,
|
|
5604
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { padding: "0 12px 10px", flexShrink: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5161
5605
|
"button",
|
|
5162
5606
|
{
|
|
5163
5607
|
onClick: () => handleGenerateImage(),
|
|
5164
5608
|
disabled: !activePrompt.trim() || isGenerating,
|
|
5165
5609
|
style: { width: "100%", height: 42, display: "flex", alignItems: "center", justifyContent: "center", gap: 8, borderRadius: 10, fontWeight: "bold", fontSize: 13, textTransform: "uppercase", letterSpacing: "0.05em", border: "1px solid rgba(255,255,255,0.1)", background: activePrompt.trim() && !isGenerating ? "#0284c7" : "transparent", color: "#fff", cursor: activePrompt.trim() && !isGenerating ? "pointer" : "default", opacity: !activePrompt.trim() || isGenerating ? 0.3 : 1, fontFamily: "inherit", transition: "background 0.2s" },
|
|
5166
|
-
children: isGenerating ? /* @__PURE__ */ (0,
|
|
5167
|
-
/* @__PURE__ */ (0,
|
|
5168
|
-
/* @__PURE__ */ (0,
|
|
5169
|
-
] }) : /* @__PURE__ */ (0,
|
|
5170
|
-
/* @__PURE__ */ (0,
|
|
5171
|
-
/* @__PURE__ */ (0,
|
|
5610
|
+
children: isGenerating ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5611
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { width: 14, height: 14, borderTop: "2px solid #fff", borderRadius: "50%", animation: "spin 1s linear infinite" } }),
|
|
5612
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Generiere..." })
|
|
5613
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5614
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "bolt" }),
|
|
5615
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Generieren" })
|
|
5172
5616
|
] })
|
|
5173
5617
|
}
|
|
5174
5618
|
) }),
|
|
5175
|
-
/* @__PURE__ */ (0,
|
|
5619
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { flex: 1, overflow: "hidden", position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: setCurrentResult, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)) }) })
|
|
5176
5620
|
] }),
|
|
5177
|
-
/* @__PURE__ */ (0,
|
|
5178
|
-
/* @__PURE__ */ (0,
|
|
5621
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { flex: 1, height: tlH, display: "flex", flexDirection: "column", background: "#0b0b0b" }, children: [
|
|
5622
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5179
5623
|
"div",
|
|
5180
5624
|
{
|
|
5181
5625
|
style: { flex: 1, padding: 16, display: "flex", alignItems: "center", justifyContent: "center", position: "relative" },
|
|
@@ -5187,26 +5631,26 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5187
5631
|
else if (dx > 50) goToPrev();
|
|
5188
5632
|
setTouchStartX(null);
|
|
5189
5633
|
},
|
|
5190
|
-
children: /* @__PURE__ */ (0,
|
|
5191
|
-
currentResult?.status === "processing" && /* @__PURE__ */ (0,
|
|
5192
|
-
/* @__PURE__ */ (0,
|
|
5193
|
-
/* @__PURE__ */ (0,
|
|
5634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { height: "100%", width: "100%", borderRadius: 20, border: "1px solid rgba(255,255,255,0.05)", background: "rgba(0,0,0,0.4)", position: "relative", overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "center" }, children: [
|
|
5635
|
+
currentResult?.status === "processing" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12 }, children: [
|
|
5636
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { width: 36, height: 36, borderTop: "2px solid #fff", borderRadius: "50%", animation: "spin 1s linear infinite" } }),
|
|
5637
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { fontSize: 10, color: "rgba(255,255,255,0.4)", textTransform: "uppercase", fontWeight: "bold", letterSpacing: "0.15em" }, children: "Erstelle Bild..." })
|
|
5194
5638
|
] }),
|
|
5195
|
-
currentResult?.status === "error" && /* @__PURE__ */ (0,
|
|
5196
|
-
/* @__PURE__ */ (0,
|
|
5197
|
-
/* @__PURE__ */ (0,
|
|
5198
|
-
/* @__PURE__ */ (0,
|
|
5639
|
+
currentResult?.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { padding: 24, textAlign: "center", display: "flex", flexDirection: "column", alignItems: "center", gap: 12 }, children: [
|
|
5640
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 32, color: "#f87171" }, children: "warning" }),
|
|
5641
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.5)", margin: 0 }, children: currentResult.error?.message }),
|
|
5642
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => handleGenerateImage(currentResult.prompt), style: { padding: "8px 16px", borderRadius: 8, border: "1px solid rgba(255,255,255,0.2)", fontSize: 11, color: "rgba(255,255,255,0.7)", background: "none", cursor: "pointer", fontFamily: "inherit" }, children: "Erneut versuchen" })
|
|
5199
5643
|
] }),
|
|
5200
|
-
currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ (0,
|
|
5201
|
-
!currentResult && /* @__PURE__ */ (0,
|
|
5202
|
-
/* @__PURE__ */ (0,
|
|
5203
|
-
/* @__PURE__ */ (0,
|
|
5644
|
+
currentResult?.status === "done" && currentResult.base64 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: currentResult.base64, style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } }),
|
|
5645
|
+
!currentResult && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 8, opacity: 0.1 }, children: [
|
|
5646
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 64 }, children: "palette" }),
|
|
5647
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { fontSize: 11, fontWeight: "bold", textTransform: "uppercase", letterSpacing: "0.2em" }, children: "Avatar Architect" })
|
|
5204
5648
|
] }),
|
|
5205
|
-
currentResult?.status === "done" && /* @__PURE__ */ (0,
|
|
5206
|
-
history.length > 1 && currentResult && /* @__PURE__ */ (0,
|
|
5207
|
-
/* @__PURE__ */ (0,
|
|
5208
|
-
/* @__PURE__ */ (0,
|
|
5209
|
-
/* @__PURE__ */ (0,
|
|
5649
|
+
currentResult?.status === "done" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: openFullscreen, style: { position: "absolute", top: 8, right: 8, width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 18 }, children: "fullscreen" }) }),
|
|
5650
|
+
history.length > 1 && currentResult && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
5651
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: goToPrev, disabled: currentIndex <= 0, style: { position: "absolute", left: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex <= 0 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_left" }) }),
|
|
5652
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: goToNext, disabled: currentIndex >= history.length - 1, style: { position: "absolute", right: 8, top: "50%", transform: "translateY(-50%)", width: 36, height: 36, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "50%", background: "rgba(0,0,0,0.6)", border: "1px solid rgba(255,255,255,0.1)", cursor: "pointer", color: "#fff", opacity: currentIndex >= history.length - 1 ? 0 : 1, transition: "opacity 0.2s" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 20 }, children: "chevron_right" }) }),
|
|
5653
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { position: "absolute", bottom: 8, left: "50%", transform: "translateX(-50%)", background: "rgba(0,0,0,0.6)", borderRadius: 999, padding: "2px 12px", fontSize: 10, color: "rgba(255,255,255,0.4)", fontFamily: "monospace" }, children: [
|
|
5210
5654
|
currentIndex + 1,
|
|
5211
5655
|
" / ",
|
|
5212
5656
|
history.length
|
|
@@ -5215,42 +5659,42 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5215
5659
|
] })
|
|
5216
5660
|
}
|
|
5217
5661
|
),
|
|
5218
|
-
currentResult?.status === "done" && /* @__PURE__ */ (0,
|
|
5219
|
-
/* @__PURE__ */ (0,
|
|
5220
|
-
/* @__PURE__ */ (0,
|
|
5221
|
-
/* @__PURE__ */ (0,
|
|
5662
|
+
currentResult?.status === "done" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { padding: "0 16px 16px", display: "flex", gap: 8, flexShrink: 0 }, children: [
|
|
5663
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setActivePrompt(currentResult.prompt || ""), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
|
|
5664
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "replay" }),
|
|
5665
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Prompt" })
|
|
5222
5666
|
] }),
|
|
5223
|
-
/* @__PURE__ */ (0,
|
|
5224
|
-
/* @__PURE__ */ (0,
|
|
5225
|
-
/* @__PURE__ */ (0,
|
|
5667
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => handleGenerateImage(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "none", background: "rgba(255,255,255,0.1)", color: "rgba(255,255,255,0.8)", fontSize: 11, fontWeight: "bold", cursor: "pointer", fontFamily: "inherit" }, children: [
|
|
5668
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "auto_fix_high" }),
|
|
5669
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Referenz" })
|
|
5226
5670
|
] }),
|
|
5227
|
-
/* @__PURE__ */ (0,
|
|
5228
|
-
/* @__PURE__ */ (0,
|
|
5229
|
-
/* @__PURE__ */ (0,
|
|
5671
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: handleDownloadSingle, style: { flex: 1, height: 40, display: "flex", alignItems: "center", justifyContent: "center", gap: 6, borderRadius: 10, border: "1px solid rgba(255,255,255,0.1)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.6)", fontSize: 11, cursor: "pointer", fontFamily: "inherit" }, children: [
|
|
5672
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 16 }, children: "download" }),
|
|
5673
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Laden" })
|
|
5230
5674
|
] })
|
|
5231
5675
|
] })
|
|
5232
5676
|
] })
|
|
5233
5677
|
] }) });
|
|
5234
5678
|
}
|
|
5235
|
-
return /* @__PURE__ */ (0,
|
|
5236
|
-
/* @__PURE__ */ (0,
|
|
5237
|
-
/* @__PURE__ */ (0,
|
|
5238
|
-
/* @__PURE__ */ (0,
|
|
5239
|
-
!isLeftCollapsed && /* @__PURE__ */ (0,
|
|
5240
|
-
workspaceTags && /* @__PURE__ */ (0,
|
|
5241
|
-
/* @__PURE__ */ (0,
|
|
5679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex h-screen w-screen bg-[#0e0e0e] text-white overflow-hidden", style: hcStyle, children: [
|
|
5680
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute top-2 right-2 z-50", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setShowStart(true), className: "text-white/10 hover:text-white/30 transition-colors text-[10px]", children: "\u21C4" }) }),
|
|
5681
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col border-r border-white/5 overflow-hidden relative bg-black/10 shrink-0", style: { width: isLeftCollapsed ? 48 : leftPanelWidth, transition: "none" }, children: [
|
|
5682
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "h-14 border-b border-white/5 flex items-center justify-between shrink-0 px-1", children: [
|
|
5683
|
+
!isLeftCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-1 gap-1", children: [
|
|
5684
|
+
workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setLeftTab("prompt"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "prompt" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
|
|
5685
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[14px]", children: "auto_fix_high" }),
|
|
5242
5686
|
"Prompt"
|
|
5243
5687
|
] }),
|
|
5244
|
-
/* @__PURE__ */ (0,
|
|
5245
|
-
/* @__PURE__ */ (0,
|
|
5688
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: () => setLeftTab("hierarchy"), className: `flex-1 flex items-center justify-center gap-1 h-8 rounded-lg text-[8px] font-bold uppercase tracking-wide transition-colors ${leftTab === "hierarchy" ? "bg-white/10 text-white" : "text-white/30 hover:text-white/60"}`, children: [
|
|
5689
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[14px]", children: "account_tree" }),
|
|
5246
5690
|
"Hierarchie"
|
|
5247
5691
|
] }),
|
|
5248
|
-
workspaceTags && /* @__PURE__ */ (0,
|
|
5692
|
+
workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setActiveTab("tags"), className: `flex-1 flex items-center justify-center gap-1.5 text-[11px] font-bold uppercase tracking-wide transition-colors ${activeTab === "tags" ? "text-white border-b-2 border-white" : "text-white/30"}`, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: "label" }) })
|
|
5249
5693
|
] }),
|
|
5250
|
-
/* @__PURE__ */ (0,
|
|
5694
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setIsLeftCollapsed(!isLeftCollapsed), className: "material-symbols-outlined text-[18px] text-white/40 hover:text-white transition-all w-10 flex items-center justify-center", children: isLeftCollapsed ? "chevron_right" : "chevron_left" })
|
|
5251
5695
|
] }),
|
|
5252
|
-
!isLeftCollapsed && /* @__PURE__ */ (0,
|
|
5253
|
-
activeTab === "tags" && workspaceTags && /* @__PURE__ */ (0,
|
|
5696
|
+
!isLeftCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 overflow-hidden relative", children: [
|
|
5697
|
+
activeTab === "tags" && workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5254
5698
|
TagManagerPanel,
|
|
5255
5699
|
{
|
|
5256
5700
|
workspaceTags,
|
|
@@ -5261,11 +5705,11 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5261
5705
|
onTagMove: handleTagMove
|
|
5262
5706
|
}
|
|
5263
5707
|
),
|
|
5264
|
-
activeTab === "tags" && !workspaceTags && /* @__PURE__ */ (0,
|
|
5265
|
-
/* @__PURE__ */ (0,
|
|
5266
|
-
/* @__PURE__ */ (0,
|
|
5708
|
+
activeTab === "tags" && !workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
5709
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
|
|
5710
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
|
|
5267
5711
|
] }) }),
|
|
5268
|
-
leftTab === "hierarchy" && activeTab !== "tags" && /* @__PURE__ */ (0,
|
|
5712
|
+
leftTab === "hierarchy" && activeTab !== "tags" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute inset-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5269
5713
|
ListView,
|
|
5270
5714
|
{
|
|
5271
5715
|
nodes,
|
|
@@ -5290,18 +5734,18 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5290
5734
|
isGeneratingNodeId: (id) => isSynthesizing && focusedNodeId === id
|
|
5291
5735
|
}
|
|
5292
5736
|
) }),
|
|
5293
|
-
leftTab === "prompt" && workspaceTags && activeTab !== "tags" && /* @__PURE__ */ (0,
|
|
5737
|
+
leftTab === "prompt" && workspaceTags && activeTab !== "tags" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PromptTab, { workspaceTags, onGenerate: handlePromptTabGenerate, isGenerating: isPromptTabGenerating, feedback: promptFeedback, promptResult: activePrompt || null, lastPayload: lastPromptPayload, onGenerateImage: (prompt) => handleGenerateImage(prompt), onTagCreate: handleTagCreate, onTagUpdate: handleTagUpdate, onTagDelete: handleTagDelete, onScanImage: handleScanImage, isScanning: isScanningImage })
|
|
5294
5738
|
] })
|
|
5295
5739
|
] }),
|
|
5296
|
-
!isLeftCollapsed && /* @__PURE__ */ (0,
|
|
5297
|
-
/* @__PURE__ */ (0,
|
|
5298
|
-
/* @__PURE__ */ (0,
|
|
5299
|
-
/* @__PURE__ */ (0,
|
|
5300
|
-
/* @__PURE__ */ (0,
|
|
5301
|
-
/* @__PURE__ */ (0,
|
|
5740
|
+
!isLeftCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { onMouseDown: startLeftResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
|
|
5741
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 flex flex-col bg-[#0b0b0b] overflow-hidden", children: [
|
|
5742
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "h-14 border-b border-white/5 flex items-center px-4 gap-2 justify-between shrink-0 bg-black/20", children: [
|
|
5743
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
5744
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompactDropdown, { value: aspectRatio, onChange: setAspectRatio, options: [{ label: "1:1", value: "1:1" }, { label: "16:9", value: "16:9" }, { label: "9:16", value: "9:16" }] }),
|
|
5745
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompactDropdown, { value: selectedModel, onChange: setSelectedModel, options: [{ value: "\u{1F34C} Nano Banana Pro", label: "\u{1F34C} Nano Banana Pro" }, { value: "\u{1F34C} Nano Banana 2", label: "\u{1F34C} Nano Banana 2" }, { value: "Imagen 4", label: "Imagen 4" }] })
|
|
5302
5746
|
] }),
|
|
5303
|
-
/* @__PURE__ */ (0,
|
|
5304
|
-
/* @__PURE__ */ (0,
|
|
5747
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1 mx-auto", children: [
|
|
5748
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5305
5749
|
"button",
|
|
5306
5750
|
{
|
|
5307
5751
|
onClick: () => setMiddlePanel("stage"),
|
|
@@ -5309,7 +5753,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5309
5753
|
children: "Stage"
|
|
5310
5754
|
}
|
|
5311
5755
|
),
|
|
5312
|
-
/* @__PURE__ */ (0,
|
|
5756
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5313
5757
|
"button",
|
|
5314
5758
|
{
|
|
5315
5759
|
onClick: () => setMiddlePanel("labs"),
|
|
@@ -5318,68 +5762,68 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5318
5762
|
}
|
|
5319
5763
|
)
|
|
5320
5764
|
] }),
|
|
5321
|
-
/* @__PURE__ */ (0,
|
|
5322
|
-
activeReferenceThumbnail ? /* @__PURE__ */ (0,
|
|
5323
|
-
/* @__PURE__ */ (0,
|
|
5324
|
-
/* @__PURE__ */ (0,
|
|
5325
|
-
/* @__PURE__ */ (0,
|
|
5326
|
-
] }) : /* @__PURE__ */ (0,
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5765
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5766
|
+
activeReferenceThumbnail ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1 rounded-lg border border-white/20 bg-white/5 overflow-hidden", style: { height: 28 }, children: [
|
|
5767
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: activeReferenceThumbnail, className: "h-full aspect-square object-cover" }),
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[10px] text-white/60 font-bold uppercase tracking-wide px-1", children: "Ref" }),
|
|
5769
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: clearReference, className: "w-6 h-full flex items-center justify-center text-white/30 hover:text-white/80 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
|
|
5770
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("button", { onClick: handleSelectReference, className: "flex items-center gap-1 h-7 px-2 rounded-lg border border-white/10 text-white/30 hover:text-white/60 hover:border-white/20 transition-colors text-[10px] font-bold uppercase tracking-wide", children: [
|
|
5771
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[14px]", children: "add_photo_alternate" }),
|
|
5772
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: "Ref" })
|
|
5329
5773
|
] }),
|
|
5330
|
-
/* @__PURE__ */ (0,
|
|
5331
|
-
/* @__PURE__ */ (0,
|
|
5774
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setIsPromptCollapsed(!isPromptCollapsed), className: "text-white/40 hover:text-white transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined", children: isPromptCollapsed ? "expand_more" : "expand_less" }) }),
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PillButton, { variant: "solid", icon: "bolt", loading: isGenerating, disabled: !activePrompt.trim(), onClick: () => handleGenerateImage(), children: "Generieren" })
|
|
5332
5776
|
] })
|
|
5333
5777
|
] }),
|
|
5334
|
-
/* @__PURE__ */ (0,
|
|
5335
|
-
!isPromptCollapsed && /* @__PURE__ */ (0,
|
|
5336
|
-
/* @__PURE__ */ (0,
|
|
5337
|
-
activePrompt && !isSynthesizing && /* @__PURE__ */ (0,
|
|
5778
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 flex flex-col overflow-hidden relative", children: [
|
|
5779
|
+
!isPromptCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "px-6 py-4 border-b border-white/5 bg-black/10 overflow-hidden shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `relative min-h-[60px] p-4 rounded-2xl border transition-all ${isSynthesizing ? "prompt-loading" : "bg-white/5 border-white/10"}`, children: [
|
|
5780
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("textarea", { value: activePrompt, onChange: (e) => setActivePrompt(e.target.value), className: "w-full bg-transparent border-none outline-none text-[12px] leading-relaxed text-white/80 resize-none h-20 dark-scrollbar", placeholder: "W\xE4hle einen Knoten oder tippe einen Prompt..." }),
|
|
5781
|
+
activePrompt && !isSynthesizing && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setActivePrompt(""), className: "absolute top-2 right-2 w-6 h-6 rounded-full bg-white/5 hover:bg-white/10 flex items-center justify-center transition-colors text-white/20 hover:text-white", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[14px]", children: "close" }) })
|
|
5338
5782
|
] }) }),
|
|
5339
|
-
middlePanel === "labs" ? /* @__PURE__ */ (0,
|
|
5783
|
+
middlePanel === "labs" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LabsTab, { services: labServices, onResult: (item) => {
|
|
5340
5784
|
const frame = item.frames[0];
|
|
5341
5785
|
if (frame?.base64) setCurrentResult(frameToGeneration(frame, item));
|
|
5342
|
-
} }) }) : /* @__PURE__ */ (0,
|
|
5343
|
-
isGenerating && currentResult?.status === "done" && /* @__PURE__ */ (0,
|
|
5344
|
-
/* @__PURE__ */ (0,
|
|
5345
|
-
/* @__PURE__ */ (0,
|
|
5786
|
+
} }) }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-1 p-6 overflow-hidden flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "h-full w-full max-w-4xl aspect-square rounded-3xl border border-white/5 bg-black/40 relative overflow-hidden flex items-center justify-center group shadow-2xl", children: [
|
|
5787
|
+
isGenerating && currentResult?.status === "done" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "absolute top-6 right-6 z-30 bg-black/60 backdrop-blur-md px-4 py-2 rounded-full border border-white/10 flex items-center gap-3", children: [
|
|
5788
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-3 h-3 border-t-2 border-white rounded-full animate-spin" }),
|
|
5789
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[10px] text-white/60 uppercase font-bold tracking-widest", children: "Neue Referenz..." })
|
|
5346
5790
|
] }),
|
|
5347
|
-
currentResult ? currentResult.status === "processing" ? /* @__PURE__ */ (0,
|
|
5348
|
-
/* @__PURE__ */ (0,
|
|
5349
|
-
/* @__PURE__ */ (0,
|
|
5350
|
-
] }) : currentResult.status === "error" ? /* @__PURE__ */ (0,
|
|
5351
|
-
/* @__PURE__ */ (0,
|
|
5352
|
-
/* @__PURE__ */ (0,
|
|
5353
|
-
/* @__PURE__ */ (0,
|
|
5354
|
-
/* @__PURE__ */ (0,
|
|
5791
|
+
currentResult ? currentResult.status === "processing" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
|
|
5792
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-10 h-10 border-t-2 border-white rounded-full animate-spin" }),
|
|
5793
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[10px] text-white/40 uppercase font-bold tracking-widest", children: "Erstelle Bild..." })
|
|
5794
|
+
] }) : currentResult.status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "p-10 text-center flex flex-col items-center gap-5 max-w-md", children: [
|
|
5795
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-red-500 text-[32px]", children: "warning" }) }),
|
|
5796
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
5797
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h3", { className: "text-[11px] font-bold uppercase tracking-widest text-red-400", children: "Generierungsfehler" }),
|
|
5798
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-white/60 text-[12px] leading-relaxed", children: currentResult.error?.message })
|
|
5355
5799
|
] }),
|
|
5356
|
-
/* @__PURE__ */ (0,
|
|
5357
|
-
] }) : /* @__PURE__ */ (0,
|
|
5358
|
-
/* @__PURE__ */ (0,
|
|
5359
|
-
/* @__PURE__ */ (0,
|
|
5360
|
-
/* @__PURE__ */ (0,
|
|
5361
|
-
/* @__PURE__ */ (0,
|
|
5362
|
-
/* @__PURE__ */ (0,
|
|
5800
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PillButton, { variant: "outline", icon: "refresh", onClick: () => handleGenerateImage(currentResult.prompt), children: "Erneut versuchen" })
|
|
5801
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "h-full w-full relative flex items-center justify-center", children: [
|
|
5802
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: currentResult.base64, className: "max-h-full max-w-full object-contain rounded-xl shadow-2xl" }),
|
|
5803
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "absolute bottom-6 flex gap-2 opacity-0 group-hover:opacity-100 transition-all translate-y-4 group-hover:translate-y-0 z-20", children: [
|
|
5804
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PillButton, { variant: "outline", icon: "replay", onClick: () => setActivePrompt(currentResult.prompt || ""), children: "Prompt" }),
|
|
5805
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PillButton, { variant: "solid", icon: "auto_fix_high", onClick: () => handleGenerateImage(currentResult.prompt || activePrompt, currentResult.mediaId, void 0, { silent: true }), children: "Referenz" }),
|
|
5806
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(PillButton, { variant: "outline", icon: "download", onClick: handleDownloadSingle, children: "Speichern" })
|
|
5363
5807
|
] })
|
|
5364
|
-
] }) : /* @__PURE__ */ (0,
|
|
5365
|
-
/* @__PURE__ */ (0,
|
|
5366
|
-
/* @__PURE__ */ (0,
|
|
5808
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center gap-2 opacity-10", children: [
|
|
5809
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[100px]", children: "palette" }),
|
|
5810
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-[12px] font-bold uppercase tracking-[0.2em]", children: "Avatar Architect" })
|
|
5367
5811
|
] })
|
|
5368
5812
|
] }) })
|
|
5369
5813
|
] })
|
|
5370
5814
|
] }),
|
|
5371
|
-
!isRightCollapsed && /* @__PURE__ */ (0,
|
|
5372
|
-
/* @__PURE__ */ (0,
|
|
5373
|
-
/* @__PURE__ */ (0,
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5815
|
+
!isRightCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { onMouseDown: startRightResize, className: "w-1 shrink-0 cursor-col-resize hover:bg-white/20 active:bg-white/30 transition-colors", style: { background: "transparent" } }),
|
|
5816
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col border-l border-white/5 bg-[#0e0e0e] shrink-0", style: { width: isRightCollapsed ? 60 : rightPanelWidth, transition: "none" }, children: [
|
|
5817
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex border-b border-white/5 h-14 shrink-0 overflow-hidden", children: [
|
|
5818
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-1", children: ["history", "gallery", "inspect", "setup", "sync", "tags"].map((tab) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => {
|
|
5375
5819
|
setActiveTab(tab);
|
|
5376
5820
|
setIsRightCollapsed(false);
|
|
5377
|
-
}, className: `flex-1 flex items-center justify-center relative transition-colors ${activeTab === tab ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ (0,
|
|
5378
|
-
hfToken && /* @__PURE__ */ (0,
|
|
5379
|
-
/* @__PURE__ */ (0,
|
|
5821
|
+
}, className: `flex-1 flex items-center justify-center relative transition-colors ${activeTab === tab ? "text-white" : "text-white/20"}`, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[20px]", children: tab === "history" ? "history" : tab === "gallery" ? "photo_library" : tab === "inspect" ? "info" : tab === "setup" ? "settings" : tab === "sync" ? "cloud_sync" : "label" }) }, tab)) }),
|
|
5822
|
+
hfToken && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => refreshHF(), disabled: isHfRefreshing, className: "w-10 flex items-center justify-center text-white/20 hover:text-white/60 transition-colors disabled:opacity-30", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: `material-symbols-outlined text-[18px]${isHfRefreshing ? " animate-spin" : ""}`, children: "sync" }) }),
|
|
5823
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setIsRightCollapsed(!isRightCollapsed), className: "w-10 flex items-center justify-center text-white/20 hover:text-white", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[18px]", children: isRightCollapsed ? "chevron_left" : "chevron_right" }) })
|
|
5380
5824
|
] }),
|
|
5381
|
-
!isRightCollapsed && /* @__PURE__ */ (0,
|
|
5382
|
-
activeTab === "tags" && workspaceTags && /* @__PURE__ */ (0,
|
|
5825
|
+
!isRightCollapsed && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex-1 overflow-hidden relative", children: [
|
|
5826
|
+
activeTab === "tags" && workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5383
5827
|
TagManagerPanel,
|
|
5384
5828
|
{
|
|
5385
5829
|
workspaceTags,
|
|
@@ -5390,12 +5834,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5390
5834
|
onTagMove: handleTagMove
|
|
5391
5835
|
}
|
|
5392
5836
|
),
|
|
5393
|
-
activeTab === "tags" && !workspaceTags && /* @__PURE__ */ (0,
|
|
5394
|
-
/* @__PURE__ */ (0,
|
|
5395
|
-
/* @__PURE__ */ (0,
|
|
5837
|
+
activeTab === "tags" && !workspaceTags && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex items-center justify-center h-full p-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
5838
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "material-symbols-outlined text-[40px] text-white/10 block mb-3", children: "label_off" }),
|
|
5839
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-[11px] text-white/20", children: "Erst Workspace importieren um Tags zu verwalten." })
|
|
5396
5840
|
] }) }),
|
|
5397
|
-
activeTab === "history" && /* @__PURE__ */ (0,
|
|
5398
|
-
activeTab === "gallery" && /* @__PURE__ */ (0,
|
|
5841
|
+
activeTab === "history" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(HistoryPanel, { history, currentResultId: currentResult?.id || null, onSelect: setCurrentResult, onDelete: (id) => setHistory((h) => h.filter((x) => x.id !== id)) }),
|
|
5842
|
+
activeTab === "gallery" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5399
5843
|
MediaLibrary,
|
|
5400
5844
|
{
|
|
5401
5845
|
items: galleryItems,
|
|
@@ -5409,9 +5853,9 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5409
5853
|
onGenerateReference: (item) => handleGenerateImage(item.prompt || activePrompt, item.mediaId, void 0, { silent: true })
|
|
5410
5854
|
}
|
|
5411
5855
|
),
|
|
5412
|
-
activeTab === "inspect" && /* @__PURE__ */ (0,
|
|
5413
|
-
activeTab === "setup" && /* @__PURE__ */ (0,
|
|
5414
|
-
activeTab === "sync" && /* @__PURE__ */ (0,
|
|
5856
|
+
activeTab === "inspect" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InspectPanel, { currentResult, history, onSelect: setCurrentResult }),
|
|
5857
|
+
activeTab === "setup" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SetupPanel, { onWorkspaceImport: handleWorkspaceImport, buildInfo }),
|
|
5858
|
+
activeTab === "sync" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5415
5859
|
ProjectSyncTab,
|
|
5416
5860
|
{
|
|
5417
5861
|
topSlot: syncTopSlot,
|
|
@@ -5441,8 +5885,8 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
5441
5885
|
}
|
|
5442
5886
|
|
|
5443
5887
|
// src/components/FaApp.tsx
|
|
5444
|
-
var
|
|
5445
|
-
var
|
|
5888
|
+
var import_react24 = require("react");
|
|
5889
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
5446
5890
|
function FaApp({
|
|
5447
5891
|
onGenerateImage,
|
|
5448
5892
|
onGeneratePrompt,
|
|
@@ -5461,8 +5905,8 @@ function FaApp({
|
|
|
5461
5905
|
onServerDelete,
|
|
5462
5906
|
buildInfo
|
|
5463
5907
|
}) {
|
|
5464
|
-
const [hfNamespace, setHfNamespace] = (0,
|
|
5465
|
-
(0,
|
|
5908
|
+
const [hfNamespace, setHfNamespace] = (0, import_react24.useState)(void 0);
|
|
5909
|
+
(0, import_react24.useEffect)(() => {
|
|
5466
5910
|
if (!serverBaseUrl) return;
|
|
5467
5911
|
fetch(`${serverBaseUrl}/api/status`).then((r) => r.json()).then((d) => {
|
|
5468
5912
|
if (typeof d.hfNamespace === "string") setHfNamespace(d.hfNamespace);
|
|
@@ -5473,7 +5917,7 @@ function FaApp({
|
|
|
5473
5917
|
const result = await onGeneratePrompt(text, options);
|
|
5474
5918
|
return result.text;
|
|
5475
5919
|
};
|
|
5476
|
-
return /* @__PURE__ */ (0,
|
|
5920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5477
5921
|
AvatarArchitectApp,
|
|
5478
5922
|
{
|
|
5479
5923
|
onGenerateImage,
|
|
@@ -5495,7 +5939,7 @@ function FaApp({
|
|
|
5495
5939
|
// src/index.ts
|
|
5496
5940
|
init_hfStateService();
|
|
5497
5941
|
init_hfStateService();
|
|
5498
|
-
var LIB_VERSION = "2.0.
|
|
5942
|
+
var LIB_VERSION = "2.0.13";
|
|
5499
5943
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5500
5944
|
0 && (module.exports = {
|
|
5501
5945
|
AvatarArchitectApp,
|