@rslsp1/fa-app-tools 2.0.21 → 2.0.22
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 +8 -3
- package/dist/index.mjs +8 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -614,6 +614,6 @@ declare function findTips(dag: Dag): number[];
|
|
|
614
614
|
declare function findForks(dag: Dag): DagFork[];
|
|
615
615
|
declare function topoSort(events: HFEvent[]): HFEvent[];
|
|
616
616
|
|
|
617
|
-
declare const LIB_VERSION = "2.0.
|
|
617
|
+
declare const LIB_VERSION = "2.0.22";
|
|
618
618
|
|
|
619
619
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type DagFork, type ExtractedCharacter, FaApp, type FaAppProps, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFEvent, type HFEventVersion, type HFFileInfo$1 as HFFileInfo, type HFMetadataEntry, type HFStateMeta, type HFStateResult, type HFStateSnapshot, HistoryPanel, type ImageAddedPayload, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, type MetadataUpdatedPayload, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type TagUpsertedPayload, type WorkspaceTags, applyEvent, applyEvents, autoLabel, buildBlendInstruction, buildCompareInstruction, buildDag, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, findForks, findTips, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, getSessionClientId, groupGenerationsToLabItems, hfBatchArchive, hfBootstrapFromLegacy, hfDeleteProject, hfDownloadProject, hfListDir, hfListProjects, hfLoadImageAsBase64, hfUploadImage, hfUploadProjectForm, hfUploadSmallFile, importProjectFromZip, injectXMPMetadata, interpretSdkError, loadHFState, loadPendingEvents, parsePromptFile, parsePromptResponse, setHFToken, topoSort, tsFromEventPath, useHFState, useKeyboardNavigation, useOnClickOutside, writeHFEvent };
|
package/dist/index.d.ts
CHANGED
|
@@ -614,6 +614,6 @@ declare function findTips(dag: Dag): number[];
|
|
|
614
614
|
declare function findForks(dag: Dag): DagFork[];
|
|
615
615
|
declare function topoSort(events: HFEvent[]): HFEvent[];
|
|
616
616
|
|
|
617
|
-
declare const LIB_VERSION = "2.0.
|
|
617
|
+
declare const LIB_VERSION = "2.0.22";
|
|
618
618
|
|
|
619
619
|
export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type DagFork, type ExtractedCharacter, FaApp, type FaAppProps, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, type HFEvent, type HFEventVersion, type HFFileInfo$1 as HFFileInfo, type HFMetadataEntry, type HFStateMeta, type HFStateResult, type HFStateSnapshot, HistoryPanel, type ImageAddedPayload, InspectPanel, LIB_VERSION, LabBlend, LabCompare, type LabFrame, LabImagePicker, type LabItem, LabLoop, LabRemix, type LabServices, LabsTab, ListView, type MediaItem, MediaLibrary, type MetadataUpdatedPayload, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedLabImage, type SelectedTag, SetupPanel, type SyncDiff, TagManagerPanel, type TagOption, type TagUpsertedPayload, type WorkspaceTags, applyEvent, applyEvents, autoLabel, buildBlendInstruction, buildCompareInstruction, buildDag, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, exportProjectToZip, findForks, findTips, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, getSessionClientId, groupGenerationsToLabItems, hfBatchArchive, hfBootstrapFromLegacy, hfDeleteProject, hfDownloadProject, hfListDir, hfListProjects, hfLoadImageAsBase64, hfUploadImage, hfUploadProjectForm, hfUploadSmallFile, importProjectFromZip, injectXMPMetadata, interpretSdkError, loadHFState, loadPendingEvents, parsePromptFile, parsePromptResponse, setHFToken, topoSort, tsFromEventPath, useHFState, useKeyboardNavigation, useOnClickOutside, writeHFEvent };
|
package/dist/index.js
CHANGED
|
@@ -1341,7 +1341,10 @@ var MediaLibrary = ({ items, onImport, onDelete, onSelect, onToggleSelection, on
|
|
|
1341
1341
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[10px] italic", children: "Importiere Assets aus deinem Projekt." })
|
|
1342
1342
|
] })
|
|
1343
1343
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2 gap-3 pb-10", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react9.motion.div, { initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, className: `relative aspect-square group/item rounded-xl overflow-hidden border transition-all bg-white/5 cursor-pointer shadow-lg ${item.selectedForExport ? "border-blue-500 shadow-[0_0_15px_rgba(59,130,246,0.2)]" : "border-white/10 opacity-70 hover:opacity-100"}`, onClick: () => onSelect?.(item), children: [
|
|
1344
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.
|
|
1344
|
+
item.status === "processing" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-full h-full flex flex-col items-center justify-center gap-2 bg-black/40", children: [
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-6 h-6 border-t-2 border-white rounded-full animate-spin" }),
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-[8px] text-white/40 uppercase font-bold tracking-widest", children: "Generiere\u2026" })
|
|
1347
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: item.base64 ? item.base64.startsWith("data:") ? item.base64 : `data:image/png;base64,${item.base64}` : "", className: "w-full h-full object-cover transition-transform duration-500 group-hover/item:scale-110", alt: item.prompt }),
|
|
1345
1348
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: `absolute top-2 left-2 w-5 h-5 rounded-md border flex items-center justify-center transition-all z-30 pointer-events-auto ${item.selectedForExport ? "bg-blue-500 border-blue-400" : "bg-black/60 border-white/20"}`, onClick: (e) => {
|
|
1346
1349
|
e.stopPropagation();
|
|
1347
1350
|
onToggleSelection?.(item.id);
|
|
@@ -4771,13 +4774,14 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4771
4774
|
const activeSeed = seedMode === "random" ? Math.floor(Math.random() * 1e9) : seed;
|
|
4772
4775
|
const newGen = { id: genId, nodeId: overrideNodeId || focusedNodeId || "1", status: "processing", timestamp: Date.now(), prompt: promptToUse, seed: activeSeed, model: selectedModel, tags: [], type: "generation" };
|
|
4773
4776
|
setHistory((prev) => [newGen, ...prev]);
|
|
4777
|
+
setGalleryItems((prev) => [newGen, ...prev]);
|
|
4774
4778
|
if (!options.silent) setCurrentResult(newGen);
|
|
4775
4779
|
if (seedMode === "random") setSeed(activeSeed);
|
|
4776
4780
|
try {
|
|
4777
4781
|
const { base64, mediaId } = await onGenerateImage(buildImageGenerationOptions(promptToUse, aspectRatio, selectedModel, useReferenceId ?? activeReferenceId ?? void 0));
|
|
4778
4782
|
const finishedGen = { ...newGen, status: "done", base64: `data:image/png;base64,${base64}`, mediaId };
|
|
4779
4783
|
setHistory((prev) => prev.map((g) => g.id === genId ? finishedGen : g));
|
|
4780
|
-
setGalleryItems((prev) =>
|
|
4784
|
+
setGalleryItems((prev) => prev.map((g) => g.id === genId ? finishedGen : g));
|
|
4781
4785
|
setCurrentResult((prev) => {
|
|
4782
4786
|
if (!prev) return finishedGen;
|
|
4783
4787
|
if (prev.id === genId || !options.silent) return finishedGen;
|
|
@@ -4807,6 +4811,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4807
4811
|
} catch (err) {
|
|
4808
4812
|
const errorGen = { ...newGen, status: "error", error: { message: err.message || "Unbekannter Fehler", details: err.toString() } };
|
|
4809
4813
|
setHistory((prev) => prev.map((g) => g.id === genId ? errorGen : g));
|
|
4814
|
+
setGalleryItems((prev) => prev.filter((g) => g.id !== genId));
|
|
4810
4815
|
if (!options.silent || currentResult?.id === genId) setCurrentResult(errorGen);
|
|
4811
4816
|
} finally {
|
|
4812
4817
|
setActiveGenerationsCount((prev) => Math.max(0, prev - 1));
|
|
@@ -6007,7 +6012,7 @@ function FaApp({
|
|
|
6007
6012
|
// src/index.ts
|
|
6008
6013
|
init_hfStateService();
|
|
6009
6014
|
init_hfStateService();
|
|
6010
|
-
var LIB_VERSION = "2.0.
|
|
6015
|
+
var LIB_VERSION = "2.0.22";
|
|
6011
6016
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6012
6017
|
0 && (module.exports = {
|
|
6013
6018
|
AvatarArchitectApp,
|
package/dist/index.mjs
CHANGED
|
@@ -681,7 +681,10 @@ var MediaLibrary = ({ items, onImport, onDelete, onSelect, onToggleSelection, on
|
|
|
681
681
|
/* @__PURE__ */ jsx8("p", { className: "text-[10px] italic", children: "Importiere Assets aus deinem Projekt." })
|
|
682
682
|
] })
|
|
683
683
|
] }) : /* @__PURE__ */ jsx8("div", { className: "grid grid-cols-2 gap-3 pb-10", children: items.map((item) => /* @__PURE__ */ jsxs6(motion4.div, { initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, className: `relative aspect-square group/item rounded-xl overflow-hidden border transition-all bg-white/5 cursor-pointer shadow-lg ${item.selectedForExport ? "border-blue-500 shadow-[0_0_15px_rgba(59,130,246,0.2)]" : "border-white/10 opacity-70 hover:opacity-100"}`, onClick: () => onSelect?.(item), children: [
|
|
684
|
-
|
|
684
|
+
item.status === "processing" ? /* @__PURE__ */ jsxs6("div", { className: "w-full h-full flex flex-col items-center justify-center gap-2 bg-black/40", children: [
|
|
685
|
+
/* @__PURE__ */ jsx8("div", { className: "w-6 h-6 border-t-2 border-white rounded-full animate-spin" }),
|
|
686
|
+
/* @__PURE__ */ jsx8("span", { className: "text-[8px] text-white/40 uppercase font-bold tracking-widest", children: "Generiere\u2026" })
|
|
687
|
+
] }) : /* @__PURE__ */ jsx8("img", { src: item.base64 ? item.base64.startsWith("data:") ? item.base64 : `data:image/png;base64,${item.base64}` : "", className: "w-full h-full object-cover transition-transform duration-500 group-hover/item:scale-110", alt: item.prompt }),
|
|
685
688
|
/* @__PURE__ */ jsx8("button", { type: "button", className: `absolute top-2 left-2 w-5 h-5 rounded-md border flex items-center justify-center transition-all z-30 pointer-events-auto ${item.selectedForExport ? "bg-blue-500 border-blue-400" : "bg-black/60 border-white/20"}`, onClick: (e) => {
|
|
686
689
|
e.stopPropagation();
|
|
687
690
|
onToggleSelection?.(item.id);
|
|
@@ -4102,13 +4105,14 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4102
4105
|
const activeSeed = seedMode === "random" ? Math.floor(Math.random() * 1e9) : seed;
|
|
4103
4106
|
const newGen = { id: genId, nodeId: overrideNodeId || focusedNodeId || "1", status: "processing", timestamp: Date.now(), prompt: promptToUse, seed: activeSeed, model: selectedModel, tags: [], type: "generation" };
|
|
4104
4107
|
setHistory((prev) => [newGen, ...prev]);
|
|
4108
|
+
setGalleryItems((prev) => [newGen, ...prev]);
|
|
4105
4109
|
if (!options.silent) setCurrentResult(newGen);
|
|
4106
4110
|
if (seedMode === "random") setSeed(activeSeed);
|
|
4107
4111
|
try {
|
|
4108
4112
|
const { base64, mediaId } = await onGenerateImage(buildImageGenerationOptions(promptToUse, aspectRatio, selectedModel, useReferenceId ?? activeReferenceId ?? void 0));
|
|
4109
4113
|
const finishedGen = { ...newGen, status: "done", base64: `data:image/png;base64,${base64}`, mediaId };
|
|
4110
4114
|
setHistory((prev) => prev.map((g) => g.id === genId ? finishedGen : g));
|
|
4111
|
-
setGalleryItems((prev) =>
|
|
4115
|
+
setGalleryItems((prev) => prev.map((g) => g.id === genId ? finishedGen : g));
|
|
4112
4116
|
setCurrentResult((prev) => {
|
|
4113
4117
|
if (!prev) return finishedGen;
|
|
4114
4118
|
if (prev.id === genId || !options.silent) return finishedGen;
|
|
@@ -4138,6 +4142,7 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
|
|
|
4138
4142
|
} catch (err) {
|
|
4139
4143
|
const errorGen = { ...newGen, status: "error", error: { message: err.message || "Unbekannter Fehler", details: err.toString() } };
|
|
4140
4144
|
setHistory((prev) => prev.map((g) => g.id === genId ? errorGen : g));
|
|
4145
|
+
setGalleryItems((prev) => prev.filter((g) => g.id !== genId));
|
|
4141
4146
|
if (!options.silent || currentResult?.id === genId) setCurrentResult(errorGen);
|
|
4142
4147
|
} finally {
|
|
4143
4148
|
setActiveGenerationsCount((prev) => Math.max(0, prev - 1));
|
|
@@ -5336,7 +5341,7 @@ function FaApp({
|
|
|
5336
5341
|
}
|
|
5337
5342
|
|
|
5338
5343
|
// src/index.ts
|
|
5339
|
-
var LIB_VERSION = "2.0.
|
|
5344
|
+
var LIB_VERSION = "2.0.22";
|
|
5340
5345
|
export {
|
|
5341
5346
|
AvatarArchitectApp,
|
|
5342
5347
|
CollapsibleCard,
|