@rslsp1/fa-app-tools 1.2.6 → 1.2.8
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.
|
@@ -65,6 +65,14 @@ async function hfUploadProject(zipBase64, name, token) {
|
|
|
65
65
|
body: bytes
|
|
66
66
|
});
|
|
67
67
|
if (!uploadRes.ok) throw new Error(`HF LFS upload failed: ${uploadRes.status}`);
|
|
68
|
+
if (fileInfo.verifyUrl) {
|
|
69
|
+
const verifyRes = await fetch(fileInfo.verifyUrl, {
|
|
70
|
+
method: "POST",
|
|
71
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", ...fileInfo.verifyHeader || {} },
|
|
72
|
+
body: JSON.stringify({ oid, size })
|
|
73
|
+
});
|
|
74
|
+
if (!verifyRes.ok) throw new Error(`HF LFS verify failed: ${verifyRes.status}`);
|
|
75
|
+
}
|
|
68
76
|
}
|
|
69
77
|
const commitRes = await fetch(`${HF_BASE}/api/datasets/${HF_REPO}/commit/main`, {
|
|
70
78
|
method: "POST",
|
package/dist/index.d.mts
CHANGED
|
@@ -448,6 +448,6 @@ declare function buildLoopInstruction(rounds: Array<{
|
|
|
448
448
|
declare function autoLabel(index: number): string;
|
|
449
449
|
declare function buildReferenceImageMediaIds(images: SelectedLabImage[]): string[];
|
|
450
450
|
|
|
451
|
-
declare const LIB_VERSION = "1.2.
|
|
451
|
+
declare const LIB_VERSION = "1.2.8";
|
|
452
452
|
|
|
453
453
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type WorkspaceTags, autoLabel, buildBlendInstruction, buildCompareInstruction, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, groupGenerationsToLabItems, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };
|
package/dist/index.d.ts
CHANGED
|
@@ -448,6 +448,6 @@ declare function buildLoopInstruction(rounds: Array<{
|
|
|
448
448
|
declare function autoLabel(index: number): string;
|
|
449
449
|
declare function buildReferenceImageMediaIds(images: SelectedLabImage[]): string[];
|
|
450
450
|
|
|
451
|
-
declare const LIB_VERSION = "1.2.
|
|
451
|
+
declare const LIB_VERSION = "1.2.8";
|
|
452
452
|
|
|
453
453
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type WorkspaceTags, autoLabel, buildBlendInstruction, buildCompareInstruction, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, groupGenerationsToLabItems, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };
|
package/dist/index.js
CHANGED
|
@@ -333,6 +333,14 @@ async function hfUploadProject(zipBase64, name, token) {
|
|
|
333
333
|
body: bytes
|
|
334
334
|
});
|
|
335
335
|
if (!uploadRes.ok) throw new Error(`HF LFS upload failed: ${uploadRes.status}`);
|
|
336
|
+
if (fileInfo.verifyUrl) {
|
|
337
|
+
const verifyRes = await fetch(fileInfo.verifyUrl, {
|
|
338
|
+
method: "POST",
|
|
339
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json", ...fileInfo.verifyHeader || {} },
|
|
340
|
+
body: JSON.stringify({ oid, size })
|
|
341
|
+
});
|
|
342
|
+
if (!verifyRes.ok) throw new Error(`HF LFS verify failed: ${verifyRes.status}`);
|
|
343
|
+
}
|
|
336
344
|
}
|
|
337
345
|
const commitRes = await fetch(`${HF_BASE}/api/datasets/${HF_REPO}/commit/main`, {
|
|
338
346
|
method: "POST",
|
|
@@ -3886,29 +3894,42 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3886
3894
|
!projectLoaded && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-white/20 text-[10px] text-center", children: "Baum, Bilder und Einstellungen wiederherstellen" })
|
|
3887
3895
|
] }),
|
|
3888
3896
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
|
|
3889
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
{
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3898
|
+
"form",
|
|
3899
|
+
{
|
|
3900
|
+
onSubmit: (e) => {
|
|
3901
|
+
e.preventDefault();
|
|
3902
|
+
if (hfTokenInput.trim()) setHfToken(hfTokenInput.trim());
|
|
3903
|
+
},
|
|
3904
|
+
className: "flex gap-2 w-full",
|
|
3905
|
+
autoComplete: "on",
|
|
3906
|
+
children: [
|
|
3907
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { type: "text", name: "username", value: "hf-token", readOnly: true, autoComplete: "username", className: "hidden" }),
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3909
|
+
"input",
|
|
3910
|
+
{
|
|
3911
|
+
type: "password",
|
|
3912
|
+
name: "password",
|
|
3913
|
+
autoComplete: "current-password",
|
|
3914
|
+
value: hfTokenInput,
|
|
3915
|
+
onChange: (e) => setHfTokenInput(e.target.value),
|
|
3916
|
+
placeholder: "HF Token (hf_\u2026)",
|
|
3917
|
+
className: "flex-1 rounded-xl px-3 text-[11px] font-mono outline-none",
|
|
3918
|
+
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)" }
|
|
3919
|
+
}
|
|
3920
|
+
),
|
|
3921
|
+
hfTokenInput.trim() && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3922
|
+
"button",
|
|
3923
|
+
{
|
|
3924
|
+
type: "submit",
|
|
3925
|
+
className: "px-3 rounded-xl text-[11px] font-bold text-white",
|
|
3926
|
+
style: { background: "#f59e0b", height: 44 },
|
|
3927
|
+
children: "OK"
|
|
3928
|
+
}
|
|
3929
|
+
)
|
|
3930
|
+
]
|
|
3931
|
+
}
|
|
3932
|
+
),
|
|
3912
3933
|
hfToken && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3913
3934
|
"button",
|
|
3914
3935
|
{
|
|
@@ -4234,7 +4255,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4234
4255
|
hfToken: hfToken || void 0,
|
|
4235
4256
|
onHfLoad: (f) => handleProjectImport(f),
|
|
4236
4257
|
onProjectExportBase64: async () => {
|
|
4237
|
-
const { base64 } = await
|
|
4258
|
+
const { base64 } = await exportProjectToZip(nodes, edges, history, galleryItems, { aspectRatio, selectedModel, seed, seedMode }, workspaceTags, recentLabItems.map((i) => i.id));
|
|
4238
4259
|
return base64;
|
|
4239
4260
|
}
|
|
4240
4261
|
}
|
|
@@ -4574,7 +4595,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4574
4595
|
}
|
|
4575
4596
|
|
|
4576
4597
|
// src/index.ts
|
|
4577
|
-
var LIB_VERSION = "1.2.
|
|
4598
|
+
var LIB_VERSION = "1.2.8";
|
|
4578
4599
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4579
4600
|
0 && (module.exports = {
|
|
4580
4601
|
AvatarArchitectApp,
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
hfDeleteProject,
|
|
8
8
|
hfListProjects,
|
|
9
9
|
hfUploadProject
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2I37YSKP.mjs";
|
|
11
11
|
|
|
12
12
|
// src/hooks/useOnClickOutside.ts
|
|
13
13
|
import { useEffect } from "react";
|
|
@@ -1547,7 +1547,7 @@ var ProjectSyncTab = ({
|
|
|
1547
1547
|
{
|
|
1548
1548
|
onClick: async () => {
|
|
1549
1549
|
try {
|
|
1550
|
-
const { hfDownloadProject } = await import("./hfStateService-
|
|
1550
|
+
const { hfDownloadProject } = await import("./hfStateService-MSRZPNB2.mjs");
|
|
1551
1551
|
const file = await hfDownloadProject(p.path, hfToken);
|
|
1552
1552
|
onHfLoad(file);
|
|
1553
1553
|
} catch (e) {
|
|
@@ -3464,29 +3464,42 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3464
3464
|
!projectLoaded && /* @__PURE__ */ jsx20("span", { className: "text-white/20 text-[10px] text-center", children: "Baum, Bilder und Einstellungen wiederherstellen" })
|
|
3465
3465
|
] }),
|
|
3466
3466
|
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center gap-2 w-full max-w-[280px]", children: [
|
|
3467
|
-
/* @__PURE__ */ jsxs18(
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
{
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3467
|
+
/* @__PURE__ */ jsxs18(
|
|
3468
|
+
"form",
|
|
3469
|
+
{
|
|
3470
|
+
onSubmit: (e) => {
|
|
3471
|
+
e.preventDefault();
|
|
3472
|
+
if (hfTokenInput.trim()) setHfToken(hfTokenInput.trim());
|
|
3473
|
+
},
|
|
3474
|
+
className: "flex gap-2 w-full",
|
|
3475
|
+
autoComplete: "on",
|
|
3476
|
+
children: [
|
|
3477
|
+
/* @__PURE__ */ jsx20("input", { type: "text", name: "username", value: "hf-token", readOnly: true, autoComplete: "username", className: "hidden" }),
|
|
3478
|
+
/* @__PURE__ */ jsx20(
|
|
3479
|
+
"input",
|
|
3480
|
+
{
|
|
3481
|
+
type: "password",
|
|
3482
|
+
name: "password",
|
|
3483
|
+
autoComplete: "current-password",
|
|
3484
|
+
value: hfTokenInput,
|
|
3485
|
+
onChange: (e) => setHfTokenInput(e.target.value),
|
|
3486
|
+
placeholder: "HF Token (hf_\u2026)",
|
|
3487
|
+
className: "flex-1 rounded-xl px-3 text-[11px] font-mono outline-none",
|
|
3488
|
+
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)" }
|
|
3489
|
+
}
|
|
3490
|
+
),
|
|
3491
|
+
hfTokenInput.trim() && /* @__PURE__ */ jsx20(
|
|
3492
|
+
"button",
|
|
3493
|
+
{
|
|
3494
|
+
type: "submit",
|
|
3495
|
+
className: "px-3 rounded-xl text-[11px] font-bold text-white",
|
|
3496
|
+
style: { background: "#f59e0b", height: 44 },
|
|
3497
|
+
children: "OK"
|
|
3498
|
+
}
|
|
3499
|
+
)
|
|
3500
|
+
]
|
|
3501
|
+
}
|
|
3502
|
+
),
|
|
3490
3503
|
hfToken && /* @__PURE__ */ jsxs18(
|
|
3491
3504
|
"button",
|
|
3492
3505
|
{
|
|
@@ -3494,7 +3507,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3494
3507
|
onClick: async () => {
|
|
3495
3508
|
setIsLoadingFromHF(true);
|
|
3496
3509
|
try {
|
|
3497
|
-
const { hfListProjects: hfListProjects2, hfDownloadProject } = await import("./hfStateService-
|
|
3510
|
+
const { hfListProjects: hfListProjects2, hfDownloadProject } = await import("./hfStateService-MSRZPNB2.mjs");
|
|
3498
3511
|
const projects = await hfListProjects2(hfToken);
|
|
3499
3512
|
if (projects.length > 0) {
|
|
3500
3513
|
const file = await hfDownloadProject(projects[0].path, hfToken);
|
|
@@ -3812,7 +3825,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3812
3825
|
hfToken: hfToken || void 0,
|
|
3813
3826
|
onHfLoad: (f) => handleProjectImport(f),
|
|
3814
3827
|
onProjectExportBase64: async () => {
|
|
3815
|
-
const { base64 } = await
|
|
3828
|
+
const { base64 } = await exportProjectToZip(nodes, edges, history, galleryItems, { aspectRatio, selectedModel, seed, seedMode }, workspaceTags, recentLabItems.map((i) => i.id));
|
|
3816
3829
|
return base64;
|
|
3817
3830
|
}
|
|
3818
3831
|
}
|
|
@@ -4152,7 +4165,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4152
4165
|
}
|
|
4153
4166
|
|
|
4154
4167
|
// src/index.ts
|
|
4155
|
-
var LIB_VERSION = "1.2.
|
|
4168
|
+
var LIB_VERSION = "1.2.8";
|
|
4156
4169
|
export {
|
|
4157
4170
|
AvatarArchitectApp,
|
|
4158
4171
|
CollapsibleCard,
|