@rslsp1/fa-app-tools 2.0.20 → 2.0.21

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 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.20";
617
+ declare const LIB_VERSION = "2.0.21";
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.20";
617
+ declare const LIB_VERSION = "2.0.21";
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
@@ -4161,26 +4161,25 @@ function EventMonitor({ events, confirmedEventKeys, galleryItems, imageUploadSta
4161
4161
  "lokal"
4162
4162
  ] })
4163
4163
  ] }),
4164
- isImageEvent && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 3 }, children: [
4164
+ isImageEvent && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 3, flexWrap: "wrap" }, children: [
4165
4165
  uploadStatus === "done" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 9, color: "#4ade80", display: "flex", alignItems: "center", gap: 2 }, children: [
4166
4166
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "cloud_done" }),
4167
- "Bild auf HF"
4167
+ "Upload \u2713"
4168
4168
  ] }),
4169
4169
  uploadStatus === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 9, color: "#60a5fa", display: "flex", alignItems: "center", gap: 2 }, children: [
4170
4170
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "cloud_upload" }),
4171
- "Bild l\xE4dt\u2026"
4171
+ "l\xE4dt hoch\u2026"
4172
4172
  ] }),
4173
4173
  uploadStatus === "failed" && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 9, color: "#f87171", display: "flex", alignItems: "center", gap: 2 }, children: [
4174
4174
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "cloud_off" }),
4175
- "Bild-Upload fehlgeschlagen"
4175
+ "Upload fehlgeschlagen"
4176
4176
  ] }),
4177
- !uploadStatus && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { style: { fontSize: 9, color: "rgba(255,255,255,0.2)" }, children: "Bild-Upload unbekannt (anderes Ger\xE4t?)" }),
4178
- galleryItem?.base64 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 9, color: "#4ade80", marginLeft: 6, display: "flex", alignItems: "center", gap: 2 }, children: [
4177
+ galleryItem?.base64 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 9, color: "#4ade80", display: "flex", alignItems: "center", gap: 2 }, children: [
4179
4178
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "photo" }),
4180
- "lokal vorhanden"
4181
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 9, color: "#f87171", marginLeft: 6, display: "flex", alignItems: "center", gap: 2 }, children: [
4179
+ uploadStatus ? "lokal" : "von HF geladen"
4180
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 9, color: "#f87171", display: "flex", alignItems: "center", gap: 2 }, children: [
4182
4181
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "broken_image" }),
4183
- "kein lokales Bild"
4182
+ uploadStatus === "failed" ? "Binary nicht auf HF" : "wird geladen\u2026"
4184
4183
  ] })
4185
4184
  ] }),
4186
4185
  /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { fontSize: 9, color: "rgba(255,255,255,0.25)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: payloadPreview })
@@ -4511,12 +4510,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
4511
4510
  setGalleryItems((prev) => {
4512
4511
  const localOnly = prev.filter((g) => !hfIds.has(g.id));
4513
4512
  const merged = skeletons.map((s) => prev.find((g) => g.id === s.id) ?? s);
4514
- return [...localOnly, ...merged];
4513
+ return [...localOnly, ...merged].sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
4515
4514
  });
4516
4515
  setHistory((prev) => {
4517
4516
  const localOnly = prev.filter((g) => !hfIds.has(g.id));
4518
4517
  const merged = skeletons.map((s) => prev.find((g) => g.id === s.id) ?? s);
4519
- return [...localOnly, ...merged];
4518
+ return [...localOnly, ...merged].sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
4520
4519
  });
4521
4520
  const COOLDOWN_MS = 5 * 60 * 1e3;
4522
4521
  for (const entry of hfState.metadata) {
@@ -6008,7 +6007,7 @@ function FaApp({
6008
6007
  // src/index.ts
6009
6008
  init_hfStateService();
6010
6009
  init_hfStateService();
6011
- var LIB_VERSION = "2.0.20";
6010
+ var LIB_VERSION = "2.0.21";
6012
6011
  // Annotate the CommonJS export names for ESM import in node:
6013
6012
  0 && (module.exports = {
6014
6013
  AvatarArchitectApp,
package/dist/index.mjs CHANGED
@@ -3492,26 +3492,25 @@ function EventMonitor({ events, confirmedEventKeys, galleryItems, imageUploadSta
3492
3492
  "lokal"
3493
3493
  ] })
3494
3494
  ] }),
3495
- isImageEvent && /* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 3 }, children: [
3495
+ isImageEvent && /* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 3, flexWrap: "wrap" }, children: [
3496
3496
  uploadStatus === "done" && /* @__PURE__ */ jsxs18("span", { style: { fontSize: 9, color: "#4ade80", display: "flex", alignItems: "center", gap: 2 }, children: [
3497
3497
  /* @__PURE__ */ jsx20("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "cloud_done" }),
3498
- "Bild auf HF"
3498
+ "Upload \u2713"
3499
3499
  ] }),
3500
3500
  uploadStatus === "uploading" && /* @__PURE__ */ jsxs18("span", { style: { fontSize: 9, color: "#60a5fa", display: "flex", alignItems: "center", gap: 2 }, children: [
3501
3501
  /* @__PURE__ */ jsx20("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "cloud_upload" }),
3502
- "Bild l\xE4dt\u2026"
3502
+ "l\xE4dt hoch\u2026"
3503
3503
  ] }),
3504
3504
  uploadStatus === "failed" && /* @__PURE__ */ jsxs18("span", { style: { fontSize: 9, color: "#f87171", display: "flex", alignItems: "center", gap: 2 }, children: [
3505
3505
  /* @__PURE__ */ jsx20("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "cloud_off" }),
3506
- "Bild-Upload fehlgeschlagen"
3506
+ "Upload fehlgeschlagen"
3507
3507
  ] }),
3508
- !uploadStatus && /* @__PURE__ */ jsx20("span", { style: { fontSize: 9, color: "rgba(255,255,255,0.2)" }, children: "Bild-Upload unbekannt (anderes Ger\xE4t?)" }),
3509
- galleryItem?.base64 ? /* @__PURE__ */ jsxs18("span", { style: { fontSize: 9, color: "#4ade80", marginLeft: 6, display: "flex", alignItems: "center", gap: 2 }, children: [
3508
+ galleryItem?.base64 ? /* @__PURE__ */ jsxs18("span", { style: { fontSize: 9, color: "#4ade80", display: "flex", alignItems: "center", gap: 2 }, children: [
3510
3509
  /* @__PURE__ */ jsx20("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "photo" }),
3511
- "lokal vorhanden"
3512
- ] }) : /* @__PURE__ */ jsxs18("span", { style: { fontSize: 9, color: "#f87171", marginLeft: 6, display: "flex", alignItems: "center", gap: 2 }, children: [
3510
+ uploadStatus ? "lokal" : "von HF geladen"
3511
+ ] }) : /* @__PURE__ */ jsxs18("span", { style: { fontSize: 9, color: "#f87171", display: "flex", alignItems: "center", gap: 2 }, children: [
3513
3512
  /* @__PURE__ */ jsx20("span", { className: "material-symbols-outlined", style: { fontSize: 11 }, children: "broken_image" }),
3514
- "kein lokales Bild"
3513
+ uploadStatus === "failed" ? "Binary nicht auf HF" : "wird geladen\u2026"
3515
3514
  ] })
3516
3515
  ] }),
3517
3516
  /* @__PURE__ */ jsx20("div", { style: { fontSize: 9, color: "rgba(255,255,255,0.25)", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: payloadPreview })
@@ -3842,12 +3841,12 @@ function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onS
3842
3841
  setGalleryItems((prev) => {
3843
3842
  const localOnly = prev.filter((g) => !hfIds.has(g.id));
3844
3843
  const merged = skeletons.map((s) => prev.find((g) => g.id === s.id) ?? s);
3845
- return [...localOnly, ...merged];
3844
+ return [...localOnly, ...merged].sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
3846
3845
  });
3847
3846
  setHistory((prev) => {
3848
3847
  const localOnly = prev.filter((g) => !hfIds.has(g.id));
3849
3848
  const merged = skeletons.map((s) => prev.find((g) => g.id === s.id) ?? s);
3850
- return [...localOnly, ...merged];
3849
+ return [...localOnly, ...merged].sort((a, b) => (b.timestamp ?? 0) - (a.timestamp ?? 0));
3851
3850
  });
3852
3851
  const COOLDOWN_MS = 5 * 60 * 1e3;
3853
3852
  for (const entry of hfState.metadata) {
@@ -5337,7 +5336,7 @@ function FaApp({
5337
5336
  }
5338
5337
 
5339
5338
  // src/index.ts
5340
- var LIB_VERSION = "2.0.20";
5339
+ var LIB_VERSION = "2.0.21";
5341
5340
  export {
5342
5341
  AvatarArchitectApp,
5343
5342
  CollapsibleCard,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rslsp1/fa-app-tools",
3
- "version": "2.0.20",
3
+ "version": "2.0.21",
4
4
  "description": "Shared tools and hooks for Fine Art flow apps",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",