@rslsp1/fa-app-tools 1.3.6 → 1.3.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.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -3
- package/dist/index.mjs +30 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -479,6 +479,6 @@ declare function hfLoadMetadata(token: string): Promise<any[]>;
|
|
|
479
479
|
declare function hfUploadImage(base64: string, id: string, token: string, mimeType?: string): Promise<void>;
|
|
480
480
|
declare function hfLoadImageAsBase64(id: string, token: string): Promise<string | null>;
|
|
481
481
|
|
|
482
|
-
declare const LIB_VERSION = "1.3.
|
|
482
|
+
declare const LIB_VERSION = "1.3.8";
|
|
483
483
|
|
|
484
484
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFMetadataEntry, 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, getHFToken, groupGenerationsToLabItems, hfDeleteProject, hfDownloadProject, hfListProjects, hfLoadImageAsBase64, hfLoadMetadata, hfLoadTags, hfSaveMetadata, hfSaveTags, hfUploadImage, hfUploadProjectForm, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, setHFToken, useKeyboardNavigation, useOnClickOutside };
|
package/dist/index.d.ts
CHANGED
|
@@ -479,6 +479,6 @@ declare function hfLoadMetadata(token: string): Promise<any[]>;
|
|
|
479
479
|
declare function hfUploadImage(base64: string, id: string, token: string, mimeType?: string): Promise<void>;
|
|
480
480
|
declare function hfLoadImageAsBase64(id: string, token: string): Promise<string | null>;
|
|
481
481
|
|
|
482
|
-
declare const LIB_VERSION = "1.3.
|
|
482
|
+
declare const LIB_VERSION = "1.3.8";
|
|
483
483
|
|
|
484
484
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFMetadataEntry, 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, getHFToken, groupGenerationsToLabItems, hfDeleteProject, hfDownloadProject, hfListProjects, hfLoadImageAsBase64, hfLoadMetadata, hfLoadTags, hfSaveMetadata, hfSaveTags, hfUploadImage, hfUploadProjectForm, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, setHFToken, useKeyboardNavigation, useOnClickOutside };
|
package/dist/index.js
CHANGED
|
@@ -4030,8 +4030,35 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4030
4030
|
if (tags?.by_category) setWorkspaceTags(tags);
|
|
4031
4031
|
}).catch(() => {
|
|
4032
4032
|
});
|
|
4033
|
-
hfLoadMetadata(hfToken).then((entries) => {
|
|
4034
|
-
if (Array.isArray(entries)
|
|
4033
|
+
hfLoadMetadata(hfToken).then(async (entries) => {
|
|
4034
|
+
if (!Array.isArray(entries) || entries.length === 0) return;
|
|
4035
|
+
setHfMetadata(entries);
|
|
4036
|
+
const skeletons = entries.map((e) => ({
|
|
4037
|
+
id: e.id,
|
|
4038
|
+
nodeId: e.id,
|
|
4039
|
+
prompt: e.prompt,
|
|
4040
|
+
seed: e.seed,
|
|
4041
|
+
model: e.model,
|
|
4042
|
+
tags: e.tags || [],
|
|
4043
|
+
timestamp: e.timestamp,
|
|
4044
|
+
status: "done"
|
|
4045
|
+
}));
|
|
4046
|
+
setGalleryItems(skeletons);
|
|
4047
|
+
setHistory(skeletons);
|
|
4048
|
+
if (skeletons.length > 0) setCurrentResult(skeletons[0]);
|
|
4049
|
+
for (const entry of entries) {
|
|
4050
|
+
hfLoadImageAsBase64(entry.id, hfToken).then((b64) => {
|
|
4051
|
+
if (!b64) return;
|
|
4052
|
+
const prefix = `data:${entry.mimeType || "image/jpeg"};base64,`;
|
|
4053
|
+
setGalleryItems((prev) => prev.map(
|
|
4054
|
+
(g) => g.id === entry.id ? { ...g, base64: prefix + b64 } : g
|
|
4055
|
+
));
|
|
4056
|
+
setHistory((prev) => prev.map(
|
|
4057
|
+
(g) => g.id === entry.id ? { ...g, base64: prefix + b64 } : g
|
|
4058
|
+
));
|
|
4059
|
+
}).catch(() => {
|
|
4060
|
+
});
|
|
4061
|
+
}
|
|
4035
4062
|
}).catch(() => {
|
|
4036
4063
|
});
|
|
4037
4064
|
}, [hfToken]);
|
|
@@ -4838,7 +4865,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4838
4865
|
|
|
4839
4866
|
// src/index.ts
|
|
4840
4867
|
init_hfStateService();
|
|
4841
|
-
var LIB_VERSION = "1.3.
|
|
4868
|
+
var LIB_VERSION = "1.3.8";
|
|
4842
4869
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4843
4870
|
0 && (module.exports = {
|
|
4844
4871
|
AvatarArchitectApp,
|
package/dist/index.mjs
CHANGED
|
@@ -3473,8 +3473,35 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
3473
3473
|
if (tags?.by_category) setWorkspaceTags(tags);
|
|
3474
3474
|
}).catch(() => {
|
|
3475
3475
|
});
|
|
3476
|
-
hfLoadMetadata(hfToken).then((entries) => {
|
|
3477
|
-
if (Array.isArray(entries)
|
|
3476
|
+
hfLoadMetadata(hfToken).then(async (entries) => {
|
|
3477
|
+
if (!Array.isArray(entries) || entries.length === 0) return;
|
|
3478
|
+
setHfMetadata(entries);
|
|
3479
|
+
const skeletons = entries.map((e) => ({
|
|
3480
|
+
id: e.id,
|
|
3481
|
+
nodeId: e.id,
|
|
3482
|
+
prompt: e.prompt,
|
|
3483
|
+
seed: e.seed,
|
|
3484
|
+
model: e.model,
|
|
3485
|
+
tags: e.tags || [],
|
|
3486
|
+
timestamp: e.timestamp,
|
|
3487
|
+
status: "done"
|
|
3488
|
+
}));
|
|
3489
|
+
setGalleryItems(skeletons);
|
|
3490
|
+
setHistory(skeletons);
|
|
3491
|
+
if (skeletons.length > 0) setCurrentResult(skeletons[0]);
|
|
3492
|
+
for (const entry of entries) {
|
|
3493
|
+
hfLoadImageAsBase64(entry.id, hfToken).then((b64) => {
|
|
3494
|
+
if (!b64) return;
|
|
3495
|
+
const prefix = `data:${entry.mimeType || "image/jpeg"};base64,`;
|
|
3496
|
+
setGalleryItems((prev) => prev.map(
|
|
3497
|
+
(g) => g.id === entry.id ? { ...g, base64: prefix + b64 } : g
|
|
3498
|
+
));
|
|
3499
|
+
setHistory((prev) => prev.map(
|
|
3500
|
+
(g) => g.id === entry.id ? { ...g, base64: prefix + b64 } : g
|
|
3501
|
+
));
|
|
3502
|
+
}).catch(() => {
|
|
3503
|
+
});
|
|
3504
|
+
}
|
|
3478
3505
|
}).catch(() => {
|
|
3479
3506
|
});
|
|
3480
3507
|
}, [hfToken]);
|
|
@@ -4280,7 +4307,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4280
4307
|
}
|
|
4281
4308
|
|
|
4282
4309
|
// src/index.ts
|
|
4283
|
-
var LIB_VERSION = "1.3.
|
|
4310
|
+
var LIB_VERSION = "1.3.8";
|
|
4284
4311
|
export {
|
|
4285
4312
|
AvatarArchitectApp,
|
|
4286
4313
|
CollapsibleCard,
|