@rslsp1/fa-app-tools 1.2.7 → 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",
@@ -6,7 +6,7 @@ import {
6
6
  hfListProjects,
7
7
  hfUploadProject,
8
8
  setHFToken
9
- } from "./chunk-3GEDIA7J.mjs";
9
+ } from "./chunk-2I37YSKP.mjs";
10
10
  export {
11
11
  HF_TOKEN_KEY,
12
12
  getHFToken,
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.7";
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.7";
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)("div", { className: "flex gap-2 w-full", children: [
3890
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3891
- "input",
3892
- {
3893
- type: "password",
3894
- value: hfTokenInput,
3895
- onChange: (e) => setHfTokenInput(e.target.value),
3896
- onKeyDown: (e) => e.key === "Enter" && hfTokenInput.trim() && setHfToken(hfTokenInput.trim()),
3897
- placeholder: "HF Token (hf_\u2026)",
3898
- className: "flex-1 rounded-xl px-3 text-[11px] font-mono outline-none",
3899
- 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)" }
3900
- }
3901
- ),
3902
- hfTokenInput.trim() && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3903
- "button",
3904
- {
3905
- onClick: () => setHfToken(hfTokenInput.trim()),
3906
- className: "px-3 rounded-xl text-[11px] font-bold text-white",
3907
- style: { background: "#f59e0b", height: 44 },
3908
- children: "OK"
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
  {
@@ -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.7";
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-3GEDIA7J.mjs";
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-MQ33VAMR.mjs");
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("div", { className: "flex gap-2 w-full", children: [
3468
- /* @__PURE__ */ jsx20(
3469
- "input",
3470
- {
3471
- type: "password",
3472
- value: hfTokenInput,
3473
- onChange: (e) => setHfTokenInput(e.target.value),
3474
- onKeyDown: (e) => e.key === "Enter" && hfTokenInput.trim() && setHfToken(hfTokenInput.trim()),
3475
- placeholder: "HF Token (hf_\u2026)",
3476
- className: "flex-1 rounded-xl px-3 text-[11px] font-mono outline-none",
3477
- 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)" }
3478
- }
3479
- ),
3480
- hfTokenInput.trim() && /* @__PURE__ */ jsx20(
3481
- "button",
3482
- {
3483
- onClick: () => setHfToken(hfTokenInput.trim()),
3484
- className: "px-3 rounded-xl text-[11px] font-bold text-white",
3485
- style: { background: "#f59e0b", height: 44 },
3486
- children: "OK"
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-MQ33VAMR.mjs");
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);
@@ -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.7";
4168
+ var LIB_VERSION = "1.2.8";
4156
4169
  export {
4157
4170
  AvatarArchitectApp,
4158
4171
  CollapsibleCard,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rslsp1/fa-app-tools",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Shared tools and hooks for Fine Art flow apps",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",