@rslsp1/fa-app-tools 1.1.3 → 1.2.1

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
@@ -52,6 +52,51 @@ interface SyncDiff {
52
52
  localOnly: Generation[];
53
53
  serverOnly: Generation[];
54
54
  }
55
+ interface LabFrame {
56
+ id: string;
57
+ base64: string;
58
+ mediaId?: string;
59
+ seed?: number;
60
+ model?: string;
61
+ aspectRatio?: string;
62
+ width?: number;
63
+ height?: number;
64
+ source?: 'generated' | 'flow-gallery' | 'zip-import' | 'db-library';
65
+ }
66
+ interface LabItem {
67
+ id: string;
68
+ prompt: string;
69
+ label?: string;
70
+ tags?: string[];
71
+ frames: LabFrame[];
72
+ }
73
+ interface SelectedLabImage {
74
+ item: LabItem;
75
+ frame: LabFrame;
76
+ label: string;
77
+ roleForPrompt?: string;
78
+ roleForImage?: string;
79
+ sendToPromptAI: boolean;
80
+ sendToImageGen: boolean;
81
+ }
82
+ interface LabServices {
83
+ availableItems: LabItem[];
84
+ recentItems: LabItem[];
85
+ onItemUsed: (item: LabItem) => void;
86
+ generateText: (text: string, options?: {
87
+ images?: {
88
+ base64: string;
89
+ mimeType: string;
90
+ }[];
91
+ systemInstruction?: string;
92
+ }) => Promise<string>;
93
+ generateImage: (options: Record<string, any>) => Promise<{
94
+ base64: string;
95
+ mediaId?: string;
96
+ }>;
97
+ saveResult?: (item: LabItem) => Promise<void>;
98
+ workspaceTags?: WorkspaceTags;
99
+ }
55
100
 
56
101
  /**
57
102
  * Hook für die Tastaturnavigation im Detailview.
@@ -74,7 +119,7 @@ declare function injectXMPMetadata(base64: string, prompt: string, seed?: number
74
119
  /**
75
120
  * Vollständiger Export: JSON + MD + Bilder (mit XMP Meta)
76
121
  */
77
- declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any, workspaceTags?: any): Promise<{
122
+ declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any, workspaceTags?: any, recentLabItemIds?: string[]): Promise<{
78
123
  base64: string;
79
124
  }>;
80
125
  declare function importProjectFromZip(file: File): Promise<any>;
@@ -127,7 +172,10 @@ declare function createFlowServices(Flow: FlowSdk): {
127
172
  base64: string;
128
173
  mediaId: string;
129
174
  }>;
130
- generateText: (hierarchyText: string, mode?: "literal" | "creative" | "scan", images?: FlowSdkImage[]) => Promise<string>;
175
+ generateText: (text: string, options?: {
176
+ images?: FlowSdkImage[];
177
+ systemInstruction?: string;
178
+ }) => Promise<string>;
131
179
  };
132
180
  declare function interpretSdkError(err: any): Error;
133
181
 
@@ -241,10 +289,13 @@ interface AvatarArchitectAppProps {
241
289
  base64: string;
242
290
  mediaId?: string;
243
291
  }>;
244
- onGeneratePrompt: (text: string, mode?: string, images?: {
245
- base64: string;
246
- mimeType: string;
247
- }[]) => Promise<string>;
292
+ onGeneratePrompt: (text: string, options?: {
293
+ images?: {
294
+ base64: string;
295
+ mimeType: string;
296
+ }[];
297
+ systemInstruction?: string;
298
+ }) => Promise<string>;
248
299
  onDownload: (base64: string, mimeType: string, filename: string) => Promise<void>;
249
300
  onSelectMedia: () => Promise<MediaItem[]>;
250
301
  buildInfo?: string;
@@ -308,6 +359,92 @@ interface ProjectSyncTabProps {
308
359
  }
309
360
  declare const ProjectSyncTab: React.FC<ProjectSyncTabProps>;
310
361
 
311
- declare const LIB_VERSION = "1.1.3";
362
+ interface TagManagerPanelProps {
363
+ workspaceTags: WorkspaceTags;
364
+ onTagCreate: (tag: {
365
+ label: string;
366
+ value: string;
367
+ category: string;
368
+ is_user_created: true;
369
+ }) => void;
370
+ onTagUpdate: (originalLabel: string, originalCategory: string, updates: {
371
+ label: string;
372
+ value: string;
373
+ }) => void;
374
+ onTagDelete: (label: string, category: string) => void;
375
+ onTagReorder: (category: string, reorderedTags: TagOption[]) => void;
376
+ onTagMove: (label: string, value: string, fromCategory: string, toCategory: string) => void;
377
+ }
378
+ declare function TagManagerPanel({ workspaceTags, onTagCreate, onTagUpdate, onTagDelete, onTagReorder, onTagMove }: TagManagerPanelProps): react_jsx_runtime.JSX.Element;
379
+
380
+ interface LabsTabProps {
381
+ services: LabServices;
382
+ onResult?: (item: LabItem) => void;
383
+ }
384
+ declare const LabsTab: React.FC<LabsTabProps>;
385
+
386
+ interface LabRemixProps {
387
+ services: LabServices;
388
+ onResult?: (item: LabItem) => void;
389
+ }
390
+ declare const LabRemix: React.FC<LabRemixProps>;
391
+
392
+ interface LabBlendProps {
393
+ services: LabServices;
394
+ onResult?: (item: LabItem) => void;
395
+ }
396
+ declare const LabBlend: React.FC<LabBlendProps>;
397
+
398
+ interface LabCompareProps {
399
+ services: LabServices;
400
+ onResult?: (item: LabItem) => void;
401
+ }
402
+ declare const LabCompare: React.FC<LabCompareProps>;
403
+
404
+ interface LabLoopProps {
405
+ services: LabServices;
406
+ onResult?: (item: LabItem) => void;
407
+ }
408
+ declare const LabLoop: React.FC<LabLoopProps>;
409
+
410
+ interface LabImagePickerProps {
411
+ availableItems: LabItem[];
412
+ recentItems: LabItem[];
413
+ onSelect: (item: LabItem, frame: LabFrame) => void;
414
+ onClose: () => void;
415
+ title?: string;
416
+ }
417
+ declare const LabImagePicker: React.FC<LabImagePickerProps>;
418
+
419
+ declare function groupGenerationsToLabItems(generations: Generation[]): LabItem[];
420
+ declare function frameToGeneration(frame: LabFrame, item: LabItem): Generation;
421
+ declare function buildScanInstruction(): {
422
+ text: string;
423
+ systemInstruction: string;
424
+ };
425
+ declare function buildRemixInstruction(images: SelectedLabImage[], userInstruction: string, currentPrompt: string): {
426
+ text: string;
427
+ systemInstruction: string;
428
+ };
429
+ declare function buildBlendInstruction(images: SelectedLabImage[], userInstruction: string): {
430
+ text: string;
431
+ systemInstruction: string;
432
+ };
433
+ declare function buildCompareInstruction(images: SelectedLabImage[], userInstruction: string): {
434
+ text: string;
435
+ systemInstruction: string;
436
+ };
437
+ declare function buildLoopInstruction(rounds: Array<{
438
+ prompt: string;
439
+ instruction: string;
440
+ images: SelectedLabImage[];
441
+ }>, newInstruction: string): {
442
+ text: string;
443
+ systemInstruction: string;
444
+ };
445
+ declare function autoLabel(index: number): string;
446
+ declare function buildReferenceImageMediaIds(images: SelectedLabImage[]): string[];
447
+
448
+ declare const LIB_VERSION = "1.2.1";
312
449
 
313
- export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, LIB_VERSION, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedTag, SetupPanel, type SyncDiff, type TagOption, type WorkspaceTags, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildPromptTabPayload, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, getFormattedTimestamp, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };
450
+ 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
@@ -52,6 +52,51 @@ interface SyncDiff {
52
52
  localOnly: Generation[];
53
53
  serverOnly: Generation[];
54
54
  }
55
+ interface LabFrame {
56
+ id: string;
57
+ base64: string;
58
+ mediaId?: string;
59
+ seed?: number;
60
+ model?: string;
61
+ aspectRatio?: string;
62
+ width?: number;
63
+ height?: number;
64
+ source?: 'generated' | 'flow-gallery' | 'zip-import' | 'db-library';
65
+ }
66
+ interface LabItem {
67
+ id: string;
68
+ prompt: string;
69
+ label?: string;
70
+ tags?: string[];
71
+ frames: LabFrame[];
72
+ }
73
+ interface SelectedLabImage {
74
+ item: LabItem;
75
+ frame: LabFrame;
76
+ label: string;
77
+ roleForPrompt?: string;
78
+ roleForImage?: string;
79
+ sendToPromptAI: boolean;
80
+ sendToImageGen: boolean;
81
+ }
82
+ interface LabServices {
83
+ availableItems: LabItem[];
84
+ recentItems: LabItem[];
85
+ onItemUsed: (item: LabItem) => void;
86
+ generateText: (text: string, options?: {
87
+ images?: {
88
+ base64: string;
89
+ mimeType: string;
90
+ }[];
91
+ systemInstruction?: string;
92
+ }) => Promise<string>;
93
+ generateImage: (options: Record<string, any>) => Promise<{
94
+ base64: string;
95
+ mediaId?: string;
96
+ }>;
97
+ saveResult?: (item: LabItem) => Promise<void>;
98
+ workspaceTags?: WorkspaceTags;
99
+ }
55
100
 
56
101
  /**
57
102
  * Hook für die Tastaturnavigation im Detailview.
@@ -74,7 +119,7 @@ declare function injectXMPMetadata(base64: string, prompt: string, seed?: number
74
119
  /**
75
120
  * Vollständiger Export: JSON + MD + Bilder (mit XMP Meta)
76
121
  */
77
- declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any, workspaceTags?: any): Promise<{
122
+ declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any, workspaceTags?: any, recentLabItemIds?: string[]): Promise<{
78
123
  base64: string;
79
124
  }>;
80
125
  declare function importProjectFromZip(file: File): Promise<any>;
@@ -127,7 +172,10 @@ declare function createFlowServices(Flow: FlowSdk): {
127
172
  base64: string;
128
173
  mediaId: string;
129
174
  }>;
130
- generateText: (hierarchyText: string, mode?: "literal" | "creative" | "scan", images?: FlowSdkImage[]) => Promise<string>;
175
+ generateText: (text: string, options?: {
176
+ images?: FlowSdkImage[];
177
+ systemInstruction?: string;
178
+ }) => Promise<string>;
131
179
  };
132
180
  declare function interpretSdkError(err: any): Error;
133
181
 
@@ -241,10 +289,13 @@ interface AvatarArchitectAppProps {
241
289
  base64: string;
242
290
  mediaId?: string;
243
291
  }>;
244
- onGeneratePrompt: (text: string, mode?: string, images?: {
245
- base64: string;
246
- mimeType: string;
247
- }[]) => Promise<string>;
292
+ onGeneratePrompt: (text: string, options?: {
293
+ images?: {
294
+ base64: string;
295
+ mimeType: string;
296
+ }[];
297
+ systemInstruction?: string;
298
+ }) => Promise<string>;
248
299
  onDownload: (base64: string, mimeType: string, filename: string) => Promise<void>;
249
300
  onSelectMedia: () => Promise<MediaItem[]>;
250
301
  buildInfo?: string;
@@ -308,6 +359,92 @@ interface ProjectSyncTabProps {
308
359
  }
309
360
  declare const ProjectSyncTab: React.FC<ProjectSyncTabProps>;
310
361
 
311
- declare const LIB_VERSION = "1.1.3";
362
+ interface TagManagerPanelProps {
363
+ workspaceTags: WorkspaceTags;
364
+ onTagCreate: (tag: {
365
+ label: string;
366
+ value: string;
367
+ category: string;
368
+ is_user_created: true;
369
+ }) => void;
370
+ onTagUpdate: (originalLabel: string, originalCategory: string, updates: {
371
+ label: string;
372
+ value: string;
373
+ }) => void;
374
+ onTagDelete: (label: string, category: string) => void;
375
+ onTagReorder: (category: string, reorderedTags: TagOption[]) => void;
376
+ onTagMove: (label: string, value: string, fromCategory: string, toCategory: string) => void;
377
+ }
378
+ declare function TagManagerPanel({ workspaceTags, onTagCreate, onTagUpdate, onTagDelete, onTagReorder, onTagMove }: TagManagerPanelProps): react_jsx_runtime.JSX.Element;
379
+
380
+ interface LabsTabProps {
381
+ services: LabServices;
382
+ onResult?: (item: LabItem) => void;
383
+ }
384
+ declare const LabsTab: React.FC<LabsTabProps>;
385
+
386
+ interface LabRemixProps {
387
+ services: LabServices;
388
+ onResult?: (item: LabItem) => void;
389
+ }
390
+ declare const LabRemix: React.FC<LabRemixProps>;
391
+
392
+ interface LabBlendProps {
393
+ services: LabServices;
394
+ onResult?: (item: LabItem) => void;
395
+ }
396
+ declare const LabBlend: React.FC<LabBlendProps>;
397
+
398
+ interface LabCompareProps {
399
+ services: LabServices;
400
+ onResult?: (item: LabItem) => void;
401
+ }
402
+ declare const LabCompare: React.FC<LabCompareProps>;
403
+
404
+ interface LabLoopProps {
405
+ services: LabServices;
406
+ onResult?: (item: LabItem) => void;
407
+ }
408
+ declare const LabLoop: React.FC<LabLoopProps>;
409
+
410
+ interface LabImagePickerProps {
411
+ availableItems: LabItem[];
412
+ recentItems: LabItem[];
413
+ onSelect: (item: LabItem, frame: LabFrame) => void;
414
+ onClose: () => void;
415
+ title?: string;
416
+ }
417
+ declare const LabImagePicker: React.FC<LabImagePickerProps>;
418
+
419
+ declare function groupGenerationsToLabItems(generations: Generation[]): LabItem[];
420
+ declare function frameToGeneration(frame: LabFrame, item: LabItem): Generation;
421
+ declare function buildScanInstruction(): {
422
+ text: string;
423
+ systemInstruction: string;
424
+ };
425
+ declare function buildRemixInstruction(images: SelectedLabImage[], userInstruction: string, currentPrompt: string): {
426
+ text: string;
427
+ systemInstruction: string;
428
+ };
429
+ declare function buildBlendInstruction(images: SelectedLabImage[], userInstruction: string): {
430
+ text: string;
431
+ systemInstruction: string;
432
+ };
433
+ declare function buildCompareInstruction(images: SelectedLabImage[], userInstruction: string): {
434
+ text: string;
435
+ systemInstruction: string;
436
+ };
437
+ declare function buildLoopInstruction(rounds: Array<{
438
+ prompt: string;
439
+ instruction: string;
440
+ images: SelectedLabImage[];
441
+ }>, newInstruction: string): {
442
+ text: string;
443
+ systemInstruction: string;
444
+ };
445
+ declare function autoLabel(index: number): string;
446
+ declare function buildReferenceImageMediaIds(images: SelectedLabImage[]): string[];
447
+
448
+ declare const LIB_VERSION = "1.2.1";
312
449
 
313
- export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, type FlowSdk, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, LIB_VERSION, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectMeta, type ProjectSettings, ProjectSyncTab, PromptTab, SectionLabel, type SelectedTag, SetupPanel, type SyncDiff, type TagOption, type WorkspaceTags, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildPromptTabPayload, cleanAiResponse, createFlowServices, exportProjectToZip, formatTreeToMarkdown, getFormattedTimestamp, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };
450
+ 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 };