@rslsp1/fa-app-tools 1.0.2 → 1.0.3

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
@@ -1,4 +1,4 @@
1
- import React, { RefObject } from 'react';
1
+ import React, { RefObject, ReactNode } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { Node, Edge } from '@xyflow/react';
4
4
 
@@ -7,6 +7,8 @@ declare function useOnClickOutside(ref: RefObject<HTMLElement | null>, handler:
7
7
  interface TagOption {
8
8
  label: string;
9
9
  value: string;
10
+ is_user_created?: boolean;
11
+ is_deleted?: boolean;
10
12
  }
11
13
  interface WorkspaceTags {
12
14
  by_category: Record<string, TagOption[]>;
@@ -40,6 +42,16 @@ interface ProjectSettings {
40
42
  seed: number;
41
43
  seedMode: 'random' | 'fixed';
42
44
  }
45
+ interface ProjectMeta {
46
+ id: string;
47
+ name: string;
48
+ saved_at: string;
49
+ size: number;
50
+ }
51
+ interface SyncDiff {
52
+ localOnly: Generation[];
53
+ serverOnly: Generation[];
54
+ }
43
55
 
44
56
  /**
45
57
  * Hook für die Tastaturnavigation im Detailview.
@@ -62,7 +74,7 @@ declare function injectXMPMetadata(base64: string, prompt: string, seed?: number
62
74
  /**
63
75
  * Vollständiger Export: JSON + MD + Bilder (mit XMP Meta)
64
76
  */
65
- declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any): Promise<{
77
+ declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any, workspaceTags?: any): Promise<{
66
78
  base64: string;
67
79
  }>;
68
80
  declare function importProjectFromZip(file: File): Promise<any>;
@@ -71,7 +83,12 @@ declare function buildGenerationPrompt(hierarchyText: string, mode?: 'literal' |
71
83
  declare function buildFallbackPrompt(hierarchyText: string): string;
72
84
  declare function cleanAiResponse(text: string): string;
73
85
  declare function buildImageGenerationOptions(prompt: string, aspectRatio: string, model: string, referenceMediaId?: string): Record<string, any>;
74
- declare function buildPromptTabPayload(selectedValues: string[], instructions: string, treeText?: string): string;
86
+ interface SelectedTag {
87
+ label: string;
88
+ value: string;
89
+ category: string;
90
+ }
91
+ declare function buildPromptTabPayload(selectedTags: SelectedTag[], instructions: string, rules: string, treeText?: string): string;
75
92
  declare function parsePromptResponse(raw: string): {
76
93
  prompt: string;
77
94
  feedback: string | null;
@@ -142,9 +159,7 @@ declare const InspectPanel: React.FC<InspectPanelProps>;
142
159
 
143
160
  interface SetupPanelProps {
144
161
  onWorkspaceImport: (file: File) => void;
145
- onProjectExport: () => void;
146
- onProjectImport: (file: File) => void;
147
- projectActionState: 'idle' | 'working' | 'working-full' | 'done' | 'error';
162
+ buildInfo?: string;
148
163
  }
149
164
  declare const SetupPanel: React.FC<SetupPanelProps>;
150
165
 
@@ -193,15 +208,65 @@ interface AvatarArchitectAppProps {
193
208
  onGeneratePrompt: (text: string) => Promise<string>;
194
209
  onDownload: (base64: string, mimeType: string, filename: string) => Promise<void>;
195
210
  onSelectMedia: () => Promise<MediaItem[]>;
211
+ buildInfo?: string;
212
+ onFetchServerProjects?: () => Promise<ProjectMeta[]>;
213
+ onServerSave?: (zipBase64: string, name: string) => Promise<ProjectMeta>;
214
+ onServerLoad?: (id: string) => Promise<File>;
215
+ onServerDelete?: (id: string) => Promise<void>;
196
216
  }
197
- declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
217
+ declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
218
+
219
+ interface CollapsibleCardProps {
220
+ title: string;
221
+ icon?: ReactNode;
222
+ actions?: ReactNode;
223
+ children: ReactNode;
224
+ defaultOpen?: boolean;
225
+ collapsible?: boolean;
226
+ className?: string;
227
+ }
228
+ declare const CollapsibleCard: React.FC<CollapsibleCardProps>;
198
229
 
199
230
  interface PromptTabProps {
200
231
  workspaceTags: WorkspaceTags;
201
- onGenerate: (selectedValues: string[], instructions: string) => Promise<void>;
232
+ onGenerate: (selectedTags: SelectedTag[], instructions: string, rules: string) => Promise<void>;
202
233
  isGenerating: boolean;
203
234
  feedback: string | null;
235
+ promptResult?: string | null;
236
+ lastPayload?: string | null;
237
+ onGenerateImage?: (prompt: string) => void;
238
+ isGeneratingImage?: boolean;
239
+ onRandom?: () => void;
240
+ onTokenize?: () => void;
241
+ isTokenizing?: boolean;
242
+ onScanImage?: (file: File) => void;
243
+ isScanning?: boolean;
244
+ onExpand?: () => void;
245
+ isExpanding?: boolean;
246
+ onTagCreate?: (tag: SelectedTag & {
247
+ is_user_created: true;
248
+ }) => void;
249
+ onTagUpdate?: (originalLabel: string, originalCategory: string, updates: {
250
+ label: string;
251
+ value: string;
252
+ }) => void;
253
+ onTagDelete?: (label: string, category: string) => void;
204
254
  }
205
255
  declare const PromptTab: React.FC<PromptTabProps>;
206
256
 
207
- export { AvatarArchitectApp, type AvatarArchitectAppProps, CompactDropdown, type ExtractedCharacter, FaToolsBadge, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectSettings, PromptTab, SectionLabel, SetupPanel, type TagOption, type WorkspaceTags, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildPromptTabPayload, cleanAiResponse, exportProjectToZip, formatTreeToMarkdown, getFormattedTimestamp, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };
257
+ interface ProjectSyncTabProps {
258
+ onProjectExport?: () => Promise<void>;
259
+ onProjectImport?: (file: File) => Promise<void>;
260
+ onWorkspaceImport?: (file: File) => void;
261
+ projectActionState?: 'idle' | 'working' | 'working-full' | 'done' | 'error';
262
+ serverProjects?: ProjectMeta[];
263
+ onServerSave?: (name?: string) => Promise<void>;
264
+ onServerLoad?: (id: string) => void;
265
+ onServerDelete?: (id: string) => void;
266
+ onRefreshServerProjects?: () => Promise<void>;
267
+ onComputeSyncDiff?: () => Promise<SyncDiff>;
268
+ onExecuteSync?: (selectedLocalIds: string[]) => Promise<void>;
269
+ }
270
+ declare const ProjectSyncTab: React.FC<ProjectSyncTabProps>;
271
+
272
+ export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, 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, exportProjectToZip, formatTreeToMarkdown, getFormattedTimestamp, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React, { RefObject } from 'react';
1
+ import React, { RefObject, ReactNode } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { Node, Edge } from '@xyflow/react';
4
4
 
@@ -7,6 +7,8 @@ declare function useOnClickOutside(ref: RefObject<HTMLElement | null>, handler:
7
7
  interface TagOption {
8
8
  label: string;
9
9
  value: string;
10
+ is_user_created?: boolean;
11
+ is_deleted?: boolean;
10
12
  }
11
13
  interface WorkspaceTags {
12
14
  by_category: Record<string, TagOption[]>;
@@ -40,6 +42,16 @@ interface ProjectSettings {
40
42
  seed: number;
41
43
  seedMode: 'random' | 'fixed';
42
44
  }
45
+ interface ProjectMeta {
46
+ id: string;
47
+ name: string;
48
+ saved_at: string;
49
+ size: number;
50
+ }
51
+ interface SyncDiff {
52
+ localOnly: Generation[];
53
+ serverOnly: Generation[];
54
+ }
43
55
 
44
56
  /**
45
57
  * Hook für die Tastaturnavigation im Detailview.
@@ -62,7 +74,7 @@ declare function injectXMPMetadata(base64: string, prompt: string, seed?: number
62
74
  /**
63
75
  * Vollständiger Export: JSON + MD + Bilder (mit XMP Meta)
64
76
  */
65
- declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any): Promise<{
77
+ declare function exportProjectToZip(nodes: any[], edges: any[], history: any[], galleryItems: any[], settings: any, workspaceTags?: any): Promise<{
66
78
  base64: string;
67
79
  }>;
68
80
  declare function importProjectFromZip(file: File): Promise<any>;
@@ -71,7 +83,12 @@ declare function buildGenerationPrompt(hierarchyText: string, mode?: 'literal' |
71
83
  declare function buildFallbackPrompt(hierarchyText: string): string;
72
84
  declare function cleanAiResponse(text: string): string;
73
85
  declare function buildImageGenerationOptions(prompt: string, aspectRatio: string, model: string, referenceMediaId?: string): Record<string, any>;
74
- declare function buildPromptTabPayload(selectedValues: string[], instructions: string, treeText?: string): string;
86
+ interface SelectedTag {
87
+ label: string;
88
+ value: string;
89
+ category: string;
90
+ }
91
+ declare function buildPromptTabPayload(selectedTags: SelectedTag[], instructions: string, rules: string, treeText?: string): string;
75
92
  declare function parsePromptResponse(raw: string): {
76
93
  prompt: string;
77
94
  feedback: string | null;
@@ -142,9 +159,7 @@ declare const InspectPanel: React.FC<InspectPanelProps>;
142
159
 
143
160
  interface SetupPanelProps {
144
161
  onWorkspaceImport: (file: File) => void;
145
- onProjectExport: () => void;
146
- onProjectImport: (file: File) => void;
147
- projectActionState: 'idle' | 'working' | 'working-full' | 'done' | 'error';
162
+ buildInfo?: string;
148
163
  }
149
164
  declare const SetupPanel: React.FC<SetupPanelProps>;
150
165
 
@@ -193,15 +208,65 @@ interface AvatarArchitectAppProps {
193
208
  onGeneratePrompt: (text: string) => Promise<string>;
194
209
  onDownload: (base64: string, mimeType: string, filename: string) => Promise<void>;
195
210
  onSelectMedia: () => Promise<MediaItem[]>;
211
+ buildInfo?: string;
212
+ onFetchServerProjects?: () => Promise<ProjectMeta[]>;
213
+ onServerSave?: (zipBase64: string, name: string) => Promise<ProjectMeta>;
214
+ onServerLoad?: (id: string) => Promise<File>;
215
+ onServerDelete?: (id: string) => Promise<void>;
196
216
  }
197
- declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
217
+ declare function AvatarArchitectApp({ onGenerateImage, onGeneratePrompt, onDownload, onSelectMedia, buildInfo, onFetchServerProjects, onServerSave, onServerLoad, onServerDelete }: AvatarArchitectAppProps): react_jsx_runtime.JSX.Element;
218
+
219
+ interface CollapsibleCardProps {
220
+ title: string;
221
+ icon?: ReactNode;
222
+ actions?: ReactNode;
223
+ children: ReactNode;
224
+ defaultOpen?: boolean;
225
+ collapsible?: boolean;
226
+ className?: string;
227
+ }
228
+ declare const CollapsibleCard: React.FC<CollapsibleCardProps>;
198
229
 
199
230
  interface PromptTabProps {
200
231
  workspaceTags: WorkspaceTags;
201
- onGenerate: (selectedValues: string[], instructions: string) => Promise<void>;
232
+ onGenerate: (selectedTags: SelectedTag[], instructions: string, rules: string) => Promise<void>;
202
233
  isGenerating: boolean;
203
234
  feedback: string | null;
235
+ promptResult?: string | null;
236
+ lastPayload?: string | null;
237
+ onGenerateImage?: (prompt: string) => void;
238
+ isGeneratingImage?: boolean;
239
+ onRandom?: () => void;
240
+ onTokenize?: () => void;
241
+ isTokenizing?: boolean;
242
+ onScanImage?: (file: File) => void;
243
+ isScanning?: boolean;
244
+ onExpand?: () => void;
245
+ isExpanding?: boolean;
246
+ onTagCreate?: (tag: SelectedTag & {
247
+ is_user_created: true;
248
+ }) => void;
249
+ onTagUpdate?: (originalLabel: string, originalCategory: string, updates: {
250
+ label: string;
251
+ value: string;
252
+ }) => void;
253
+ onTagDelete?: (label: string, category: string) => void;
204
254
  }
205
255
  declare const PromptTab: React.FC<PromptTabProps>;
206
256
 
207
- export { AvatarArchitectApp, type AvatarArchitectAppProps, CompactDropdown, type ExtractedCharacter, FaToolsBadge, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, ListView, type MediaItem, MediaLibrary, PillButton, type ProjectSettings, PromptTab, SectionLabel, SetupPanel, type TagOption, type WorkspaceTags, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildPromptTabPayload, cleanAiResponse, exportProjectToZip, formatTreeToMarkdown, getFormattedTimestamp, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };
257
+ interface ProjectSyncTabProps {
258
+ onProjectExport?: () => Promise<void>;
259
+ onProjectImport?: (file: File) => Promise<void>;
260
+ onWorkspaceImport?: (file: File) => void;
261
+ projectActionState?: 'idle' | 'working' | 'working-full' | 'done' | 'error';
262
+ serverProjects?: ProjectMeta[];
263
+ onServerSave?: (name?: string) => Promise<void>;
264
+ onServerLoad?: (id: string) => void;
265
+ onServerDelete?: (id: string) => void;
266
+ onRefreshServerProjects?: () => Promise<void>;
267
+ onComputeSyncDiff?: () => Promise<SyncDiff>;
268
+ onExecuteSync?: (selectedLocalIds: string[]) => Promise<void>;
269
+ }
270
+ declare const ProjectSyncTab: React.FC<ProjectSyncTabProps>;
271
+
272
+ export { AvatarArchitectApp, type AvatarArchitectAppProps, CollapsibleCard, CompactDropdown, type ExtractedCharacter, FaToolsBadge, GLOBAL_STYLES, type Generation, HistoryPanel, InspectPanel, 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, exportProjectToZip, formatTreeToMarkdown, getFormattedTimestamp, importProjectFromZip, injectXMPMetadata, interpretSdkError, parsePromptFile, parsePromptResponse, useKeyboardNavigation, useOnClickOutside };