@rslsp1/fa-app-tools 2.0.30 → 2.0.48

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.
@@ -279,30 +279,39 @@ async function hfUploadImage(base64, id, token, mimeType = "image/jpeg") {
279
279
  commitTitle: `Add image ${id}`
280
280
  });
281
281
  }
282
- async function hfLoadImageAsBase64(id, token, namespace) {
283
- const paths = [`images/${id}`];
284
- if (namespace) paths.push(`${namespace}images/${id}`);
285
- for (const basePath of paths) {
286
- for (const ext of ["jpg", "png"]) {
287
- try {
288
- const res = await fetch(
289
- `${HF_BASE}/datasets/${HF_REPO}/resolve/main/${basePath}.${ext}?download=true`,
290
- { headers: { Authorization: `Bearer ${token}` } }
291
- );
292
- if (!res.ok) continue;
293
- const blob = await res.blob();
294
- return new Promise((resolve, reject) => {
295
- const reader = new FileReader();
296
- reader.onload = () => resolve(reader.result.split(",")[1]);
297
- reader.onerror = reject;
298
- reader.readAsDataURL(blob);
299
- });
300
- } catch {
301
- continue;
282
+ async function hfLoadImageAsBase64(id, token, namespace, filename, on404, mimeType, hasThumb) {
283
+ const fetchBase64 = async (repoPath) => {
284
+ try {
285
+ const res = await fetch(
286
+ `${HF_BASE}/datasets/${HF_REPO}/resolve/main/${repoPath}?download=true`,
287
+ { headers: { Authorization: `Bearer ${token}` } }
288
+ );
289
+ if (!res.ok) {
290
+ if (on404 && on404()) return "ABORT";
291
+ return null;
302
292
  }
293
+ const blob = await res.blob();
294
+ return new Promise((resolve, reject) => {
295
+ const reader = new FileReader();
296
+ reader.onload = () => resolve(reader.result.split(",")[1]);
297
+ reader.onerror = reject;
298
+ reader.readAsDataURL(blob);
299
+ });
300
+ } catch {
301
+ return null;
303
302
  }
303
+ };
304
+ if (filename) {
305
+ if (hasThumb) {
306
+ const thumb = await fetchBase64(`thumbs/${filename}`);
307
+ if (thumb && thumb !== "ABORT") return thumb;
308
+ }
309
+ const result2 = await fetchBase64(`images/${filename}`);
310
+ return result2 === "ABORT" ? null : result2;
304
311
  }
305
- return null;
312
+ const ext = mimeType === "image/png" ? "png" : "jpg";
313
+ const result = await fetchBase64(`images/${id}.${ext}`);
314
+ return result === "ABORT" ? null : result;
306
315
  }
307
316
 
308
317
  export {
@@ -24,7 +24,7 @@ import {
24
24
  setHFToken,
25
25
  tsFromEventPath,
26
26
  writeHFEvent
27
- } from "./chunk-UCEQOGPT.mjs";
27
+ } from "./chunk-TTJTQP43.mjs";
28
28
  export {
29
29
  HF_TOKEN_KEY,
30
30
  getHFToken,
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import React, { RefObject, ReactNode } from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as React from 'react';
2
+ import React__default, { RefObject, ReactNode } from 'react';
3
3
  import { Node, Edge } from '@xyflow/react';
4
4
 
5
5
  declare function useOnClickOutside(ref: RefObject<HTMLElement | null>, handler: (e: MouseEvent | TouchEvent) => void): void;
@@ -20,6 +20,7 @@ interface Generation {
20
20
  id: string;
21
21
  nodeId: string;
22
22
  base64?: string;
23
+ fullBase64?: string;
23
24
  mediaId?: string;
24
25
  prompt?: string;
25
26
  hierarchy?: string;
@@ -35,6 +36,10 @@ interface Generation {
35
36
  details?: string;
36
37
  };
37
38
  selectedForExport?: boolean;
39
+ filename?: string;
40
+ hasThumb?: boolean;
41
+ mimeType?: string;
42
+ titleTs?: number;
38
43
  }
39
44
  interface ProjectSettings {
40
45
  aspectRatio: string;
@@ -106,6 +111,9 @@ interface HFMetadataEntry {
106
111
  timestamp: number;
107
112
  mimeType: string;
108
113
  size?: number;
114
+ filename?: string;
115
+ hasThumb?: boolean;
116
+ titleTs?: number;
109
117
  }
110
118
 
111
119
  /**
@@ -205,21 +213,21 @@ declare function parsePromptFile(text: string): ExtractedCharacter[];
205
213
  */
206
214
  declare function formatTreeToMarkdown(nodes: any[], edges: any[]): string;
207
215
 
208
- declare function FaToolsBadge(): react_jsx_runtime.JSX.Element;
216
+ declare function FaToolsBadge(): React__default.JSX.Element;
209
217
 
210
218
  interface PillButtonProps {
211
219
  icon?: string;
212
- children: React.ReactNode;
220
+ children: React__default.ReactNode;
213
221
  variant?: 'filled' | 'outline' | 'solid' | 'danger' | 'ghost';
214
222
  onClick?: () => void;
215
223
  disabled?: boolean;
216
224
  loading?: boolean;
217
225
  className?: string;
218
226
  }
219
- declare const PillButton: React.FC<PillButtonProps>;
227
+ declare const PillButton: React__default.FC<PillButtonProps>;
220
228
 
221
- declare const SectionLabel: React.FC<{
222
- children: React.ReactNode;
229
+ declare const SectionLabel: React__default.FC<{
230
+ children: React__default.ReactNode;
223
231
  }>;
224
232
 
225
233
  interface CompactDropdownProps {
@@ -232,7 +240,7 @@ interface CompactDropdownProps {
232
240
  onChange: (val: string) => void;
233
241
  className?: string;
234
242
  }
235
- declare const CompactDropdown: React.FC<CompactDropdownProps>;
243
+ declare const CompactDropdown: React__default.FC<CompactDropdownProps>;
236
244
 
237
245
  interface HistoryPanelProps {
238
246
  history: Generation[];
@@ -240,7 +248,7 @@ interface HistoryPanelProps {
240
248
  onSelect: (gen: Generation) => void;
241
249
  onDelete: (id: string) => void;
242
250
  }
243
- declare const HistoryPanel: React.FC<HistoryPanelProps>;
251
+ declare const HistoryPanel: React__default.FC<HistoryPanelProps>;
244
252
 
245
253
  interface InspectPanelProps {
246
254
  currentResult: Generation | null;
@@ -249,13 +257,13 @@ interface InspectPanelProps {
249
257
  workspaceTags?: WorkspaceTags | null;
250
258
  onTagToggle?: (tagName: string) => void;
251
259
  }
252
- declare const InspectPanel: React.FC<InspectPanelProps>;
260
+ declare const InspectPanel: React__default.FC<InspectPanelProps>;
253
261
 
254
262
  interface SetupPanelProps {
255
263
  onWorkspaceImport: (file: File) => void;
256
264
  buildInfo?: string;
257
265
  }
258
- declare const SetupPanel: React.FC<SetupPanelProps>;
266
+ declare const SetupPanel: React__default.FC<SetupPanelProps>;
259
267
 
260
268
  interface MediaLibraryProps {
261
269
  items: Generation[];
@@ -266,7 +274,7 @@ interface MediaLibraryProps {
266
274
  onBatchDownload?: () => void;
267
275
  onGenerateReference?: (item: Generation) => void;
268
276
  }
269
- declare const MediaLibrary: React.FC<MediaLibraryProps>;
277
+ declare const MediaLibrary: React__default.FC<MediaLibraryProps>;
270
278
 
271
279
  interface ListViewProps {
272
280
  nodes: Node[];
@@ -286,7 +294,7 @@ interface ListViewProps {
286
294
  onGenerateSubtree?: (id: string) => void;
287
295
  isGeneratingNodeId: (id: string) => boolean;
288
296
  }
289
- declare function ListView({ nodes, edges, onNodeChange, onAddChild, onDeleteNode, onMoveNode, onIndentNode, onOutdentNode, onAddSibling, focusedNodeId, onFocus, activePath, onGenerate, onGenerateBranch, onGenerateSubtree, isGeneratingNodeId }: ListViewProps): react_jsx_runtime.JSX.Element;
297
+ declare function ListView({ nodes, edges, onNodeChange, onAddChild, onDeleteNode, onMoveNode, onIndentNode, onOutdentNode, onAddSibling, focusedNodeId, onFocus, activePath, onGenerate, onGenerateBranch, onGenerateSubtree, isGeneratingNodeId }: ListViewProps): React__default.JSX.Element;
290
298
 
291
299
  interface MediaItem {
292
300
  base64: string;
@@ -312,12 +320,13 @@ interface AvatarArchitectAppProps {
312
320
  initialHfToken?: string;
313
321
  hfNamespace?: string;
314
322
  allowDevNamespace?: boolean;
323
+ serverBaseUrl?: string;
315
324
  onFetchServerProjects?: () => Promise<ProjectMeta[]>;
316
325
  onServerSave?: (zipBase64: string, name: string) => Promise<ProjectMeta>;
317
326
  onServerLoad?: (id: string) => Promise<File>;
318
327
  onServerDelete?: (id: string) => Promise<void>;
319
328
  }
320
- declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
329
+ declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): React__default.JSX.Element;
321
330
 
322
331
  interface FaAppProps {
323
332
  onGenerateImage: (params: Record<string, any>) => Promise<{
@@ -357,7 +366,7 @@ interface FaAppProps {
357
366
  onServerDelete?: (id: string) => Promise<void>;
358
367
  buildInfo?: string;
359
368
  }
360
- declare function FaApp({ onGenerateImage, onGeneratePrompt, onGenerateVideo: _onGenerateVideo, onDownload, onSelectMedia, onFlowSave: _onFlowSave, onFlowUpload: _onFlowUpload, onFlowMediaUpload: _onFlowMediaUpload, libToken, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete, buildInfo, }: FaAppProps): react_jsx_runtime.JSX.Element;
369
+ declare function FaApp({ onGenerateImage, onGeneratePrompt, onGenerateVideo: _onGenerateVideo, onDownload, onSelectMedia, onFlowSave: _onFlowSave, onFlowUpload: _onFlowUpload, onFlowMediaUpload: _onFlowMediaUpload, libToken, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete, buildInfo, }: FaAppProps): React.JSX.Element;
361
370
 
362
371
  interface CollapsibleCardProps {
363
372
  title: string;
@@ -368,7 +377,7 @@ interface CollapsibleCardProps {
368
377
  collapsible?: boolean;
369
378
  className?: string;
370
379
  }
371
- declare const CollapsibleCard: React.FC<CollapsibleCardProps>;
380
+ declare const CollapsibleCard: React__default.FC<CollapsibleCardProps>;
372
381
 
373
382
  interface PromptTabProps {
374
383
  workspaceTags: WorkspaceTags;
@@ -395,10 +404,10 @@ interface PromptTabProps {
395
404
  }) => void;
396
405
  onTagDelete?: (label: string, category: string) => void;
397
406
  }
398
- declare const PromptTab: React.FC<PromptTabProps>;
407
+ declare const PromptTab: React__default.FC<PromptTabProps>;
399
408
 
400
409
  interface ProjectSyncTabProps {
401
- topSlot?: React.ReactNode;
410
+ topSlot?: React__default.ReactNode;
402
411
  onProjectExport?: () => Promise<void>;
403
412
  onProjectImport?: (file: File) => Promise<void>;
404
413
  onWorkspaceImport?: (file: File) => void;
@@ -415,7 +424,7 @@ interface ProjectSyncTabProps {
415
424
  onProjectExportBase64?: () => Promise<string>;
416
425
  onHfInitialSync?: (onProgress: (done: number, total: number) => void) => Promise<void>;
417
426
  }
418
- declare const ProjectSyncTab: React.FC<ProjectSyncTabProps>;
427
+ declare const ProjectSyncTab: React__default.FC<ProjectSyncTabProps>;
419
428
 
420
429
  interface TagManagerPanelProps {
421
430
  workspaceTags: WorkspaceTags;
@@ -433,7 +442,7 @@ interface TagManagerPanelProps {
433
442
  onTagReorder: (category: string, reorderedTags: TagOption[]) => void;
434
443
  onTagMove: (label: string, value: string, fromCategory: string, toCategory: string) => void;
435
444
  }
436
- declare function TagManagerPanel({ workspaceTags, onTagCreate, onTagUpdate, onTagDelete, onTagReorder, onTagMove }: TagManagerPanelProps): react_jsx_runtime.JSX.Element;
445
+ declare function TagManagerPanel({ workspaceTags, onTagCreate, onTagUpdate, onTagDelete, onTagReorder, onTagMove }: TagManagerPanelProps): React__default.JSX.Element;
437
446
 
438
447
  interface LabsTabProps {
439
448
  services: LabServices;
@@ -443,31 +452,31 @@ interface LabsTabProps {
443
452
  /** Optional: resolve a mediaId to a playable video URL */
444
453
  resolveVideoUrl?: (mediaId: string) => string;
445
454
  }
446
- declare const LabsTab: React.FC<LabsTabProps>;
455
+ declare const LabsTab: React__default.FC<LabsTabProps>;
447
456
 
448
457
  interface LabRemixProps {
449
458
  services: LabServices;
450
459
  onResult?: (item: LabItem) => void;
451
460
  }
452
- declare const LabRemix: React.FC<LabRemixProps>;
461
+ declare const LabRemix: React__default.FC<LabRemixProps>;
453
462
 
454
463
  interface LabBlendProps {
455
464
  services: LabServices;
456
465
  onResult?: (item: LabItem) => void;
457
466
  }
458
- declare const LabBlend: React.FC<LabBlendProps>;
467
+ declare const LabBlend: React__default.FC<LabBlendProps>;
459
468
 
460
469
  interface LabCompareProps {
461
470
  services: LabServices;
462
471
  onResult?: (item: LabItem) => void;
463
472
  }
464
- declare const LabCompare: React.FC<LabCompareProps>;
473
+ declare const LabCompare: React__default.FC<LabCompareProps>;
465
474
 
466
475
  interface LabLoopProps {
467
476
  services: LabServices;
468
477
  onResult?: (item: LabItem) => void;
469
478
  }
470
- declare const LabLoop: React.FC<LabLoopProps>;
479
+ declare const LabLoop: React__default.FC<LabLoopProps>;
471
480
 
472
481
  interface LabFrameExtractorProps {
473
482
  /** Pre-filtered video items from the host app */
@@ -477,7 +486,7 @@ interface LabFrameExtractorProps {
477
486
  /** Host-provided function to resolve a mediaId to a playable video URL */
478
487
  resolveVideoUrl: (mediaId: string) => string;
479
488
  }
480
- declare const LabFrameExtractor: React.FC<LabFrameExtractorProps>;
489
+ declare const LabFrameExtractor: React__default.FC<LabFrameExtractorProps>;
481
490
 
482
491
  interface LabImagePickerProps {
483
492
  availableItems: LabItem[];
@@ -486,7 +495,7 @@ interface LabImagePickerProps {
486
495
  onClose: () => void;
487
496
  title?: string;
488
497
  }
489
- declare const LabImagePicker: React.FC<LabImagePickerProps>;
498
+ declare const LabImagePicker: React__default.FC<LabImagePickerProps>;
490
499
 
491
500
  declare function groupGenerationsToLabItems(generations: Generation[]): LabItem[];
492
501
  declare function frameToGeneration(frame: LabFrame, item: LabItem): Generation;
@@ -589,17 +598,11 @@ declare function hfDownloadProject(path: string, token: string): Promise<File>;
589
598
  declare function hfUploadProjectForm(_zipBase64: string, _name: string, _token: string): Promise<HFProjectMeta>;
590
599
  declare function hfDeleteProject(path: string, token: string): Promise<void>;
591
600
  declare function hfUploadImage(base64: string, id: string, token: string, mimeType?: string): Promise<void>;
592
- declare function hfLoadImageAsBase64(id: string, token: string, namespace?: string): Promise<string | null>;
593
-
594
- type FaServerEnv = 'prod' | 'dev';
595
- declare function faServerGet<T>(path: string, env?: FaServerEnv, token?: string): Promise<T>;
596
- declare function faServerPost<T>(path: string, body: unknown, env?: FaServerEnv, token?: string): Promise<T>;
597
- declare function faServerPut<T>(path: string, body: unknown, env?: FaServerEnv, token?: string): Promise<T>;
598
- declare function faServerDelete<T>(path: string, env?: FaServerEnv, token?: string): Promise<T>;
601
+ declare function hfLoadImageAsBase64(id: string, token: string, namespace?: string, filename?: string, on404?: () => boolean, mimeType?: string, hasThumb?: boolean): Promise<string | null>;
599
602
 
600
- declare function ServerTab({ hfToken }: {
601
- hfToken?: string;
602
- }): react_jsx_runtime.JSX.Element;
603
+ declare function ServerTab({ serverBaseUrl }: {
604
+ serverBaseUrl?: string;
605
+ }): React.JSX.Element | null;
603
606
 
604
607
  interface HFStateResult {
605
608
  state: HFStateSnapshot | null;
@@ -638,6 +641,6 @@ declare function findTips(dag: Dag): number[];
638
641
  declare function findForks(dag: Dag): DagFork[];
639
642
  declare function topoSort(events: HFEvent[]): HFEvent[];
640
643
 
641
- declare const LIB_VERSION = "2.0.30";
644
+ declare const LIB_VERSION = "2.0.48";
642
645
 
643
- export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type DagFork, type ExtractedCharacter, FaApp, type FaAppProps, type FaServerEnv, 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, LabFrameExtractor, type LabFrameExtractorProps, 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, ServerTab, 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, faServerDelete, faServerGet, faServerPost, faServerPut, 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 };
646
+ 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, LabFrameExtractor, type LabFrameExtractorProps, 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, ServerTab, 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
@@ -1,5 +1,5 @@
1
- import React, { RefObject, ReactNode } from 'react';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as React from 'react';
2
+ import React__default, { RefObject, ReactNode } from 'react';
3
3
  import { Node, Edge } from '@xyflow/react';
4
4
 
5
5
  declare function useOnClickOutside(ref: RefObject<HTMLElement | null>, handler: (e: MouseEvent | TouchEvent) => void): void;
@@ -20,6 +20,7 @@ interface Generation {
20
20
  id: string;
21
21
  nodeId: string;
22
22
  base64?: string;
23
+ fullBase64?: string;
23
24
  mediaId?: string;
24
25
  prompt?: string;
25
26
  hierarchy?: string;
@@ -35,6 +36,10 @@ interface Generation {
35
36
  details?: string;
36
37
  };
37
38
  selectedForExport?: boolean;
39
+ filename?: string;
40
+ hasThumb?: boolean;
41
+ mimeType?: string;
42
+ titleTs?: number;
38
43
  }
39
44
  interface ProjectSettings {
40
45
  aspectRatio: string;
@@ -106,6 +111,9 @@ interface HFMetadataEntry {
106
111
  timestamp: number;
107
112
  mimeType: string;
108
113
  size?: number;
114
+ filename?: string;
115
+ hasThumb?: boolean;
116
+ titleTs?: number;
109
117
  }
110
118
 
111
119
  /**
@@ -205,21 +213,21 @@ declare function parsePromptFile(text: string): ExtractedCharacter[];
205
213
  */
206
214
  declare function formatTreeToMarkdown(nodes: any[], edges: any[]): string;
207
215
 
208
- declare function FaToolsBadge(): react_jsx_runtime.JSX.Element;
216
+ declare function FaToolsBadge(): React__default.JSX.Element;
209
217
 
210
218
  interface PillButtonProps {
211
219
  icon?: string;
212
- children: React.ReactNode;
220
+ children: React__default.ReactNode;
213
221
  variant?: 'filled' | 'outline' | 'solid' | 'danger' | 'ghost';
214
222
  onClick?: () => void;
215
223
  disabled?: boolean;
216
224
  loading?: boolean;
217
225
  className?: string;
218
226
  }
219
- declare const PillButton: React.FC<PillButtonProps>;
227
+ declare const PillButton: React__default.FC<PillButtonProps>;
220
228
 
221
- declare const SectionLabel: React.FC<{
222
- children: React.ReactNode;
229
+ declare const SectionLabel: React__default.FC<{
230
+ children: React__default.ReactNode;
223
231
  }>;
224
232
 
225
233
  interface CompactDropdownProps {
@@ -232,7 +240,7 @@ interface CompactDropdownProps {
232
240
  onChange: (val: string) => void;
233
241
  className?: string;
234
242
  }
235
- declare const CompactDropdown: React.FC<CompactDropdownProps>;
243
+ declare const CompactDropdown: React__default.FC<CompactDropdownProps>;
236
244
 
237
245
  interface HistoryPanelProps {
238
246
  history: Generation[];
@@ -240,7 +248,7 @@ interface HistoryPanelProps {
240
248
  onSelect: (gen: Generation) => void;
241
249
  onDelete: (id: string) => void;
242
250
  }
243
- declare const HistoryPanel: React.FC<HistoryPanelProps>;
251
+ declare const HistoryPanel: React__default.FC<HistoryPanelProps>;
244
252
 
245
253
  interface InspectPanelProps {
246
254
  currentResult: Generation | null;
@@ -249,13 +257,13 @@ interface InspectPanelProps {
249
257
  workspaceTags?: WorkspaceTags | null;
250
258
  onTagToggle?: (tagName: string) => void;
251
259
  }
252
- declare const InspectPanel: React.FC<InspectPanelProps>;
260
+ declare const InspectPanel: React__default.FC<InspectPanelProps>;
253
261
 
254
262
  interface SetupPanelProps {
255
263
  onWorkspaceImport: (file: File) => void;
256
264
  buildInfo?: string;
257
265
  }
258
- declare const SetupPanel: React.FC<SetupPanelProps>;
266
+ declare const SetupPanel: React__default.FC<SetupPanelProps>;
259
267
 
260
268
  interface MediaLibraryProps {
261
269
  items: Generation[];
@@ -266,7 +274,7 @@ interface MediaLibraryProps {
266
274
  onBatchDownload?: () => void;
267
275
  onGenerateReference?: (item: Generation) => void;
268
276
  }
269
- declare const MediaLibrary: React.FC<MediaLibraryProps>;
277
+ declare const MediaLibrary: React__default.FC<MediaLibraryProps>;
270
278
 
271
279
  interface ListViewProps {
272
280
  nodes: Node[];
@@ -286,7 +294,7 @@ interface ListViewProps {
286
294
  onGenerateSubtree?: (id: string) => void;
287
295
  isGeneratingNodeId: (id: string) => boolean;
288
296
  }
289
- declare function ListView({ nodes, edges, onNodeChange, onAddChild, onDeleteNode, onMoveNode, onIndentNode, onOutdentNode, onAddSibling, focusedNodeId, onFocus, activePath, onGenerate, onGenerateBranch, onGenerateSubtree, isGeneratingNodeId }: ListViewProps): react_jsx_runtime.JSX.Element;
297
+ declare function ListView({ nodes, edges, onNodeChange, onAddChild, onDeleteNode, onMoveNode, onIndentNode, onOutdentNode, onAddSibling, focusedNodeId, onFocus, activePath, onGenerate, onGenerateBranch, onGenerateSubtree, isGeneratingNodeId }: ListViewProps): React__default.JSX.Element;
290
298
 
291
299
  interface MediaItem {
292
300
  base64: string;
@@ -312,12 +320,13 @@ interface AvatarArchitectAppProps {
312
320
  initialHfToken?: string;
313
321
  hfNamespace?: string;
314
322
  allowDevNamespace?: boolean;
323
+ serverBaseUrl?: string;
315
324
  onFetchServerProjects?: () => Promise<ProjectMeta[]>;
316
325
  onServerSave?: (zipBase64: string, name: string) => Promise<ProjectMeta>;
317
326
  onServerLoad?: (id: string) => Promise<File>;
318
327
  onServerDelete?: (id: string) => Promise<void>;
319
328
  }
320
- declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
329
+ declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, initialHfToken, hfNamespace, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): React__default.JSX.Element;
321
330
 
322
331
  interface FaAppProps {
323
332
  onGenerateImage: (params: Record<string, any>) => Promise<{
@@ -357,7 +366,7 @@ interface FaAppProps {
357
366
  onServerDelete?: (id: string) => Promise<void>;
358
367
  buildInfo?: string;
359
368
  }
360
- declare function FaApp({ onGenerateImage, onGeneratePrompt, onGenerateVideo: _onGenerateVideo, onDownload, onSelectMedia, onFlowSave: _onFlowSave, onFlowUpload: _onFlowUpload, onFlowMediaUpload: _onFlowMediaUpload, libToken, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete, buildInfo, }: FaAppProps): react_jsx_runtime.JSX.Element;
369
+ declare function FaApp({ onGenerateImage, onGeneratePrompt, onGenerateVideo: _onGenerateVideo, onDownload, onSelectMedia, onFlowSave: _onFlowSave, onFlowUpload: _onFlowUpload, onFlowMediaUpload: _onFlowMediaUpload, libToken, allowDevNamespace, serverBaseUrl, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete, buildInfo, }: FaAppProps): React.JSX.Element;
361
370
 
362
371
  interface CollapsibleCardProps {
363
372
  title: string;
@@ -368,7 +377,7 @@ interface CollapsibleCardProps {
368
377
  collapsible?: boolean;
369
378
  className?: string;
370
379
  }
371
- declare const CollapsibleCard: React.FC<CollapsibleCardProps>;
380
+ declare const CollapsibleCard: React__default.FC<CollapsibleCardProps>;
372
381
 
373
382
  interface PromptTabProps {
374
383
  workspaceTags: WorkspaceTags;
@@ -395,10 +404,10 @@ interface PromptTabProps {
395
404
  }) => void;
396
405
  onTagDelete?: (label: string, category: string) => void;
397
406
  }
398
- declare const PromptTab: React.FC<PromptTabProps>;
407
+ declare const PromptTab: React__default.FC<PromptTabProps>;
399
408
 
400
409
  interface ProjectSyncTabProps {
401
- topSlot?: React.ReactNode;
410
+ topSlot?: React__default.ReactNode;
402
411
  onProjectExport?: () => Promise<void>;
403
412
  onProjectImport?: (file: File) => Promise<void>;
404
413
  onWorkspaceImport?: (file: File) => void;
@@ -415,7 +424,7 @@ interface ProjectSyncTabProps {
415
424
  onProjectExportBase64?: () => Promise<string>;
416
425
  onHfInitialSync?: (onProgress: (done: number, total: number) => void) => Promise<void>;
417
426
  }
418
- declare const ProjectSyncTab: React.FC<ProjectSyncTabProps>;
427
+ declare const ProjectSyncTab: React__default.FC<ProjectSyncTabProps>;
419
428
 
420
429
  interface TagManagerPanelProps {
421
430
  workspaceTags: WorkspaceTags;
@@ -433,7 +442,7 @@ interface TagManagerPanelProps {
433
442
  onTagReorder: (category: string, reorderedTags: TagOption[]) => void;
434
443
  onTagMove: (label: string, value: string, fromCategory: string, toCategory: string) => void;
435
444
  }
436
- declare function TagManagerPanel({ workspaceTags, onTagCreate, onTagUpdate, onTagDelete, onTagReorder, onTagMove }: TagManagerPanelProps): react_jsx_runtime.JSX.Element;
445
+ declare function TagManagerPanel({ workspaceTags, onTagCreate, onTagUpdate, onTagDelete, onTagReorder, onTagMove }: TagManagerPanelProps): React__default.JSX.Element;
437
446
 
438
447
  interface LabsTabProps {
439
448
  services: LabServices;
@@ -443,31 +452,31 @@ interface LabsTabProps {
443
452
  /** Optional: resolve a mediaId to a playable video URL */
444
453
  resolveVideoUrl?: (mediaId: string) => string;
445
454
  }
446
- declare const LabsTab: React.FC<LabsTabProps>;
455
+ declare const LabsTab: React__default.FC<LabsTabProps>;
447
456
 
448
457
  interface LabRemixProps {
449
458
  services: LabServices;
450
459
  onResult?: (item: LabItem) => void;
451
460
  }
452
- declare const LabRemix: React.FC<LabRemixProps>;
461
+ declare const LabRemix: React__default.FC<LabRemixProps>;
453
462
 
454
463
  interface LabBlendProps {
455
464
  services: LabServices;
456
465
  onResult?: (item: LabItem) => void;
457
466
  }
458
- declare const LabBlend: React.FC<LabBlendProps>;
467
+ declare const LabBlend: React__default.FC<LabBlendProps>;
459
468
 
460
469
  interface LabCompareProps {
461
470
  services: LabServices;
462
471
  onResult?: (item: LabItem) => void;
463
472
  }
464
- declare const LabCompare: React.FC<LabCompareProps>;
473
+ declare const LabCompare: React__default.FC<LabCompareProps>;
465
474
 
466
475
  interface LabLoopProps {
467
476
  services: LabServices;
468
477
  onResult?: (item: LabItem) => void;
469
478
  }
470
- declare const LabLoop: React.FC<LabLoopProps>;
479
+ declare const LabLoop: React__default.FC<LabLoopProps>;
471
480
 
472
481
  interface LabFrameExtractorProps {
473
482
  /** Pre-filtered video items from the host app */
@@ -477,7 +486,7 @@ interface LabFrameExtractorProps {
477
486
  /** Host-provided function to resolve a mediaId to a playable video URL */
478
487
  resolveVideoUrl: (mediaId: string) => string;
479
488
  }
480
- declare const LabFrameExtractor: React.FC<LabFrameExtractorProps>;
489
+ declare const LabFrameExtractor: React__default.FC<LabFrameExtractorProps>;
481
490
 
482
491
  interface LabImagePickerProps {
483
492
  availableItems: LabItem[];
@@ -486,7 +495,7 @@ interface LabImagePickerProps {
486
495
  onClose: () => void;
487
496
  title?: string;
488
497
  }
489
- declare const LabImagePicker: React.FC<LabImagePickerProps>;
498
+ declare const LabImagePicker: React__default.FC<LabImagePickerProps>;
490
499
 
491
500
  declare function groupGenerationsToLabItems(generations: Generation[]): LabItem[];
492
501
  declare function frameToGeneration(frame: LabFrame, item: LabItem): Generation;
@@ -589,17 +598,11 @@ declare function hfDownloadProject(path: string, token: string): Promise<File>;
589
598
  declare function hfUploadProjectForm(_zipBase64: string, _name: string, _token: string): Promise<HFProjectMeta>;
590
599
  declare function hfDeleteProject(path: string, token: string): Promise<void>;
591
600
  declare function hfUploadImage(base64: string, id: string, token: string, mimeType?: string): Promise<void>;
592
- declare function hfLoadImageAsBase64(id: string, token: string, namespace?: string): Promise<string | null>;
593
-
594
- type FaServerEnv = 'prod' | 'dev';
595
- declare function faServerGet<T>(path: string, env?: FaServerEnv, token?: string): Promise<T>;
596
- declare function faServerPost<T>(path: string, body: unknown, env?: FaServerEnv, token?: string): Promise<T>;
597
- declare function faServerPut<T>(path: string, body: unknown, env?: FaServerEnv, token?: string): Promise<T>;
598
- declare function faServerDelete<T>(path: string, env?: FaServerEnv, token?: string): Promise<T>;
601
+ declare function hfLoadImageAsBase64(id: string, token: string, namespace?: string, filename?: string, on404?: () => boolean, mimeType?: string, hasThumb?: boolean): Promise<string | null>;
599
602
 
600
- declare function ServerTab({ hfToken }: {
601
- hfToken?: string;
602
- }): react_jsx_runtime.JSX.Element;
603
+ declare function ServerTab({ serverBaseUrl }: {
604
+ serverBaseUrl?: string;
605
+ }): React.JSX.Element | null;
603
606
 
604
607
  interface HFStateResult {
605
608
  state: HFStateSnapshot | null;
@@ -638,6 +641,6 @@ declare function findTips(dag: Dag): number[];
638
641
  declare function findForks(dag: Dag): DagFork[];
639
642
  declare function topoSort(events: HFEvent[]): HFEvent[];
640
643
 
641
- declare const LIB_VERSION = "2.0.30";
644
+ declare const LIB_VERSION = "2.0.48";
642
645
 
643
- export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type DagFork, type ExtractedCharacter, FaApp, type FaAppProps, type FaServerEnv, 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, LabFrameExtractor, type LabFrameExtractorProps, 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, ServerTab, 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, faServerDelete, faServerGet, faServerPost, faServerPut, 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 };
646
+ 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, LabFrameExtractor, type LabFrameExtractorProps, 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, ServerTab, 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 };