@rslsp1/fa-app-tools 1.3.6 → 1.3.7
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 +25 -3
- package/dist/index.mjs +25 -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.7";
|
|
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.7";
|
|
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,30 @@ 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
|
+
for (const entry of entries) {
|
|
4048
|
+
hfLoadImageAsBase64(entry.id, hfToken).then((b64) => {
|
|
4049
|
+
if (!b64) return;
|
|
4050
|
+
const prefix = `data:${entry.mimeType || "image/jpeg"};base64,`;
|
|
4051
|
+
setGalleryItems((prev) => prev.map(
|
|
4052
|
+
(g) => g.id === entry.id ? { ...g, base64: prefix + b64 } : g
|
|
4053
|
+
));
|
|
4054
|
+
}).catch(() => {
|
|
4055
|
+
});
|
|
4056
|
+
}
|
|
4035
4057
|
}).catch(() => {
|
|
4036
4058
|
});
|
|
4037
4059
|
}, [hfToken]);
|
|
@@ -4838,7 +4860,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4838
4860
|
|
|
4839
4861
|
// src/index.ts
|
|
4840
4862
|
init_hfStateService();
|
|
4841
|
-
var LIB_VERSION = "1.3.
|
|
4863
|
+
var LIB_VERSION = "1.3.7";
|
|
4842
4864
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4843
4865
|
0 && (module.exports = {
|
|
4844
4866
|
AvatarArchitectApp,
|
package/dist/index.mjs
CHANGED
|
@@ -3473,8 +3473,30 @@ 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
|
+
for (const entry of entries) {
|
|
3491
|
+
hfLoadImageAsBase64(entry.id, hfToken).then((b64) => {
|
|
3492
|
+
if (!b64) return;
|
|
3493
|
+
const prefix = `data:${entry.mimeType || "image/jpeg"};base64,`;
|
|
3494
|
+
setGalleryItems((prev) => prev.map(
|
|
3495
|
+
(g) => g.id === entry.id ? { ...g, base64: prefix + b64 } : g
|
|
3496
|
+
));
|
|
3497
|
+
}).catch(() => {
|
|
3498
|
+
});
|
|
3499
|
+
}
|
|
3478
3500
|
}).catch(() => {
|
|
3479
3501
|
});
|
|
3480
3502
|
}, [hfToken]);
|
|
@@ -4280,7 +4302,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4280
4302
|
}
|
|
4281
4303
|
|
|
4282
4304
|
// src/index.ts
|
|
4283
|
-
var LIB_VERSION = "1.3.
|
|
4305
|
+
var LIB_VERSION = "1.3.7";
|
|
4284
4306
|
export {
|
|
4285
4307
|
AvatarArchitectApp,
|
|
4286
4308
|
CollapsibleCard,
|