@rslsp1/fa-app-tools 2.0.68 → 2.0.72

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
@@ -261,9 +261,124 @@ interface InspectPanelProps {
261
261
  }
262
262
  declare const InspectPanel: React__default.FC<InspectPanelProps>;
263
263
 
264
+ interface TagBaseUser {
265
+ id: number;
266
+ username: string;
267
+ active_context_id?: number;
268
+ }
269
+ interface TagBaseContext {
270
+ id: number;
271
+ name: string;
272
+ label: string;
273
+ owner_id: number;
274
+ }
275
+ interface TagBaseTagEntry {
276
+ id: number;
277
+ context_id: number;
278
+ category: string;
279
+ label: string;
280
+ value: string;
281
+ ord: number;
282
+ }
283
+ interface TagBaseMeta {
284
+ version: number;
285
+ generatedAt: number | string;
286
+ }
287
+ interface TagBase {
288
+ users: TagBaseUser[];
289
+ contexts: TagBaseContext[];
290
+ tags: TagBaseTagEntry[];
291
+ meta: TagBaseMeta;
292
+ }
293
+ interface TagBaseEventVersion {
294
+ major: number;
295
+ minor: number;
296
+ }
297
+ declare const CURRENT_TAG_EVENT_VERSION: TagBaseEventVersion;
298
+ interface TagCreatedPayload {
299
+ context_id: number;
300
+ category: string;
301
+ label: string;
302
+ value: string;
303
+ ord: number;
304
+ }
305
+ interface TagUpdatedDelta {
306
+ label?: string;
307
+ value?: string;
308
+ category?: string;
309
+ ord?: number;
310
+ enabled?: 0 | 1;
311
+ }
312
+ interface TagUpdatedPayload {
313
+ id: number;
314
+ delta: TagUpdatedDelta;
315
+ }
316
+ interface TagBaseEventBase {
317
+ v: TagBaseEventVersion;
318
+ ts: number;
319
+ clientId: string;
320
+ baseVersion: number;
321
+ userId: number;
322
+ }
323
+ interface TagCreatedEvent extends TagBaseEventBase {
324
+ type: 'tag_created';
325
+ payload: TagCreatedPayload;
326
+ }
327
+ interface TagUpdatedEvent extends TagBaseEventBase {
328
+ type: 'tag_updated';
329
+ payload: TagUpdatedPayload;
330
+ }
331
+ type TagBaseEvent = TagCreatedEvent | TagUpdatedEvent;
332
+ declare function loadTagBase(namespace: string, token: string): Promise<TagBase | null>;
333
+ declare function writeTagEvent(namespace: string, token: string, event: TagBaseEvent): Promise<void>;
334
+ declare function createTagCreatedEvent(baseVersion: number, userId: number, payload: TagCreatedPayload): TagCreatedEvent;
335
+ declare function createTagUpdatedEvent(baseVersion: number, userId: number, id: number, delta: TagUpdatedDelta): TagUpdatedEvent;
336
+ interface TagBaseTagOption {
337
+ id: number | null;
338
+ label: string;
339
+ value: string;
340
+ category: string;
341
+ ord: number;
342
+ pending?: boolean;
343
+ }
344
+ interface TagBaseWorkspaceTags {
345
+ by_category: Record<string, TagBaseTagOption[]>;
346
+ all: TagBaseTagOption[];
347
+ }
348
+ declare function deriveTagBaseWorkspaceTags(tags: TagBaseTagEntry[], contextId: number, pending?: TagBaseTagOption[]): TagBaseWorkspaceTags;
349
+ interface SelectionValidation {
350
+ valid: boolean;
351
+ reason: string | null;
352
+ }
353
+ declare function validateTagBaseSelection(base: TagBase, userId: number | null, contextId: number | null): SelectionValidation;
354
+
355
+ interface TagBaseSectionProps {
356
+ tagBase: TagBase | null;
357
+ isLoading: boolean;
358
+ error: string | null;
359
+ needsPicker: boolean;
360
+ pickerMessage: string | null;
361
+ selectedUserId: number | null;
362
+ selectedContextId: number | null;
363
+ selectUser: (userId: number) => void;
364
+ selectContext: (contextId: number) => void;
365
+ resetSelection: () => void;
366
+ workspaceTags: TagBaseWorkspaceTags;
367
+ categories: string[];
368
+ createTag: (payload: {
369
+ category: string;
370
+ label: string;
371
+ value: string;
372
+ }) => Promise<void>;
373
+ updateTag: (id: number, delta: TagUpdatedDelta) => Promise<void>;
374
+ refresh: () => Promise<void>;
375
+ }
376
+ declare function TagBaseSection(props: TagBaseSectionProps): React__default.JSX.Element;
377
+
264
378
  interface SetupPanelProps {
265
379
  onWorkspaceImport: (file: File) => void;
266
380
  buildInfo?: string;
381
+ tagBase?: TagBaseSectionProps;
267
382
  }
268
383
  declare const SetupPanel: React__default.FC<SetupPanelProps>;
269
384
 
@@ -645,6 +760,29 @@ declare function findTips(dag: Dag): number[];
645
760
  declare function findForks(dag: Dag): DagFork[];
646
761
  declare function topoSort(events: HFEvent[]): HFEvent[];
647
762
 
648
- declare const LIB_VERSION = "2.0.68";
763
+ interface UseTagBaseResult {
764
+ tagBase: TagBase | null;
765
+ isLoading: boolean;
766
+ error: string | null;
767
+ selectedUserId: number | null;
768
+ selectedContextId: number | null;
769
+ needsPicker: boolean;
770
+ pickerMessage: string | null;
771
+ selectUser: (userId: number) => void;
772
+ selectContext: (contextId: number) => void;
773
+ resetSelection: () => void;
774
+ workspaceTags: TagBaseWorkspaceTags;
775
+ categories: string[];
776
+ refresh: () => Promise<void>;
777
+ createTag: (payload: {
778
+ category: string;
779
+ label: string;
780
+ value: string;
781
+ }) => Promise<void>;
782
+ updateTag: (id: number, delta: TagUpdatedDelta) => Promise<void>;
783
+ }
784
+ declare function useTagBase(token: string, namespace: string): UseTagBaseResult;
785
+
786
+ declare const LIB_VERSION = "2.0.72";
649
787
 
650
- 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 };
788
+ export { AvatarArchitectApp, type AvatarArchitectAppProps, CURRENT_TAG_EVENT_VERSION, 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, type SelectionValidation, ServerTab, SetupPanel, type SyncDiff, type TagBase, type TagBaseContext, type TagBaseEvent, type TagBaseMeta, TagBaseSection, type TagBaseSectionProps, type TagBaseTagEntry, type TagBaseTagOption, type TagBaseUser, type TagBaseWorkspaceTags, type TagCreatedEvent, type TagCreatedPayload, TagManagerPanel, type TagOption, type TagUpdatedDelta, type TagUpdatedEvent, type TagUpdatedPayload, type TagUpsertedPayload, type UseTagBaseResult, type WorkspaceTags, applyEvent, applyEvents, autoLabel, buildBlendInstruction, buildCompareInstruction, buildDag, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, createTagCreatedEvent, createTagUpdatedEvent, deriveTagBaseWorkspaceTags, exportProjectToZip, findForks, findTips, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, getSessionClientId, groupGenerationsToLabItems, hfBatchArchive, hfBootstrapFromLegacy, hfDeleteProject, hfDownloadProject, hfListDir, hfListProjects, hfLoadImageAsBase64, hfUploadImage, hfUploadProjectForm, hfUploadSmallFile, importProjectFromZip, injectXMPMetadata, interpretSdkError, loadHFState, loadPendingEvents, loadTagBase, parsePromptFile, parsePromptResponse, setHFToken, topoSort, tsFromEventPath, useHFState, useKeyboardNavigation, useOnClickOutside, useTagBase, validateTagBaseSelection, writeHFEvent, writeTagEvent };
package/dist/index.d.ts CHANGED
@@ -261,9 +261,124 @@ interface InspectPanelProps {
261
261
  }
262
262
  declare const InspectPanel: React__default.FC<InspectPanelProps>;
263
263
 
264
+ interface TagBaseUser {
265
+ id: number;
266
+ username: string;
267
+ active_context_id?: number;
268
+ }
269
+ interface TagBaseContext {
270
+ id: number;
271
+ name: string;
272
+ label: string;
273
+ owner_id: number;
274
+ }
275
+ interface TagBaseTagEntry {
276
+ id: number;
277
+ context_id: number;
278
+ category: string;
279
+ label: string;
280
+ value: string;
281
+ ord: number;
282
+ }
283
+ interface TagBaseMeta {
284
+ version: number;
285
+ generatedAt: number | string;
286
+ }
287
+ interface TagBase {
288
+ users: TagBaseUser[];
289
+ contexts: TagBaseContext[];
290
+ tags: TagBaseTagEntry[];
291
+ meta: TagBaseMeta;
292
+ }
293
+ interface TagBaseEventVersion {
294
+ major: number;
295
+ minor: number;
296
+ }
297
+ declare const CURRENT_TAG_EVENT_VERSION: TagBaseEventVersion;
298
+ interface TagCreatedPayload {
299
+ context_id: number;
300
+ category: string;
301
+ label: string;
302
+ value: string;
303
+ ord: number;
304
+ }
305
+ interface TagUpdatedDelta {
306
+ label?: string;
307
+ value?: string;
308
+ category?: string;
309
+ ord?: number;
310
+ enabled?: 0 | 1;
311
+ }
312
+ interface TagUpdatedPayload {
313
+ id: number;
314
+ delta: TagUpdatedDelta;
315
+ }
316
+ interface TagBaseEventBase {
317
+ v: TagBaseEventVersion;
318
+ ts: number;
319
+ clientId: string;
320
+ baseVersion: number;
321
+ userId: number;
322
+ }
323
+ interface TagCreatedEvent extends TagBaseEventBase {
324
+ type: 'tag_created';
325
+ payload: TagCreatedPayload;
326
+ }
327
+ interface TagUpdatedEvent extends TagBaseEventBase {
328
+ type: 'tag_updated';
329
+ payload: TagUpdatedPayload;
330
+ }
331
+ type TagBaseEvent = TagCreatedEvent | TagUpdatedEvent;
332
+ declare function loadTagBase(namespace: string, token: string): Promise<TagBase | null>;
333
+ declare function writeTagEvent(namespace: string, token: string, event: TagBaseEvent): Promise<void>;
334
+ declare function createTagCreatedEvent(baseVersion: number, userId: number, payload: TagCreatedPayload): TagCreatedEvent;
335
+ declare function createTagUpdatedEvent(baseVersion: number, userId: number, id: number, delta: TagUpdatedDelta): TagUpdatedEvent;
336
+ interface TagBaseTagOption {
337
+ id: number | null;
338
+ label: string;
339
+ value: string;
340
+ category: string;
341
+ ord: number;
342
+ pending?: boolean;
343
+ }
344
+ interface TagBaseWorkspaceTags {
345
+ by_category: Record<string, TagBaseTagOption[]>;
346
+ all: TagBaseTagOption[];
347
+ }
348
+ declare function deriveTagBaseWorkspaceTags(tags: TagBaseTagEntry[], contextId: number, pending?: TagBaseTagOption[]): TagBaseWorkspaceTags;
349
+ interface SelectionValidation {
350
+ valid: boolean;
351
+ reason: string | null;
352
+ }
353
+ declare function validateTagBaseSelection(base: TagBase, userId: number | null, contextId: number | null): SelectionValidation;
354
+
355
+ interface TagBaseSectionProps {
356
+ tagBase: TagBase | null;
357
+ isLoading: boolean;
358
+ error: string | null;
359
+ needsPicker: boolean;
360
+ pickerMessage: string | null;
361
+ selectedUserId: number | null;
362
+ selectedContextId: number | null;
363
+ selectUser: (userId: number) => void;
364
+ selectContext: (contextId: number) => void;
365
+ resetSelection: () => void;
366
+ workspaceTags: TagBaseWorkspaceTags;
367
+ categories: string[];
368
+ createTag: (payload: {
369
+ category: string;
370
+ label: string;
371
+ value: string;
372
+ }) => Promise<void>;
373
+ updateTag: (id: number, delta: TagUpdatedDelta) => Promise<void>;
374
+ refresh: () => Promise<void>;
375
+ }
376
+ declare function TagBaseSection(props: TagBaseSectionProps): React__default.JSX.Element;
377
+
264
378
  interface SetupPanelProps {
265
379
  onWorkspaceImport: (file: File) => void;
266
380
  buildInfo?: string;
381
+ tagBase?: TagBaseSectionProps;
267
382
  }
268
383
  declare const SetupPanel: React__default.FC<SetupPanelProps>;
269
384
 
@@ -645,6 +760,29 @@ declare function findTips(dag: Dag): number[];
645
760
  declare function findForks(dag: Dag): DagFork[];
646
761
  declare function topoSort(events: HFEvent[]): HFEvent[];
647
762
 
648
- declare const LIB_VERSION = "2.0.68";
763
+ interface UseTagBaseResult {
764
+ tagBase: TagBase | null;
765
+ isLoading: boolean;
766
+ error: string | null;
767
+ selectedUserId: number | null;
768
+ selectedContextId: number | null;
769
+ needsPicker: boolean;
770
+ pickerMessage: string | null;
771
+ selectUser: (userId: number) => void;
772
+ selectContext: (contextId: number) => void;
773
+ resetSelection: () => void;
774
+ workspaceTags: TagBaseWorkspaceTags;
775
+ categories: string[];
776
+ refresh: () => Promise<void>;
777
+ createTag: (payload: {
778
+ category: string;
779
+ label: string;
780
+ value: string;
781
+ }) => Promise<void>;
782
+ updateTag: (id: number, delta: TagUpdatedDelta) => Promise<void>;
783
+ }
784
+ declare function useTagBase(token: string, namespace: string): UseTagBaseResult;
785
+
786
+ declare const LIB_VERSION = "2.0.72";
649
787
 
650
- 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 };
788
+ export { AvatarArchitectApp, type AvatarArchitectAppProps, CURRENT_TAG_EVENT_VERSION, 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, type SelectionValidation, ServerTab, SetupPanel, type SyncDiff, type TagBase, type TagBaseContext, type TagBaseEvent, type TagBaseMeta, TagBaseSection, type TagBaseSectionProps, type TagBaseTagEntry, type TagBaseTagOption, type TagBaseUser, type TagBaseWorkspaceTags, type TagCreatedEvent, type TagCreatedPayload, TagManagerPanel, type TagOption, type TagUpdatedDelta, type TagUpdatedEvent, type TagUpdatedPayload, type TagUpsertedPayload, type UseTagBaseResult, type WorkspaceTags, applyEvent, applyEvents, autoLabel, buildBlendInstruction, buildCompareInstruction, buildDag, buildFallbackPrompt, buildGenerationPrompt, buildImageGenerationOptions, buildLoopInstruction, buildPromptTabPayload, buildReferenceImageMediaIds, buildRemixInstruction, buildScanInstruction, cleanAiResponse, createFlowServices, createTagCreatedEvent, createTagUpdatedEvent, deriveTagBaseWorkspaceTags, exportProjectToZip, findForks, findTips, formatTreeToMarkdown, frameToGeneration, getFormattedTimestamp, getHFToken, getSessionClientId, groupGenerationsToLabItems, hfBatchArchive, hfBootstrapFromLegacy, hfDeleteProject, hfDownloadProject, hfListDir, hfListProjects, hfLoadImageAsBase64, hfUploadImage, hfUploadProjectForm, hfUploadSmallFile, importProjectFromZip, injectXMPMetadata, interpretSdkError, loadHFState, loadPendingEvents, loadTagBase, parsePromptFile, parsePromptResponse, setHFToken, topoSort, tsFromEventPath, useHFState, useKeyboardNavigation, useOnClickOutside, useTagBase, validateTagBaseSelection, writeHFEvent, writeTagEvent };