@weirdfingers/boards 0.5.3 → 0.6.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 +148 -7
- package/dist/index.d.ts +148 -7
- package/dist/index.js +307 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +292 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/graphql/operations.ts +103 -6
- package/src/hooks/useLineage.ts +210 -0
- package/src/hooks/useUpload.ts +175 -0
- package/src/index.ts +27 -2
package/dist/index.d.mts
CHANGED
|
@@ -368,12 +368,18 @@ declare function createGraphQLClient({ url, subscriptionUrl, auth, tenantId, }:
|
|
|
368
368
|
declare const USER_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
369
369
|
declare const BOARD_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
370
370
|
declare const GENERATION_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
371
|
+
declare const ARTIFACT_LINEAGE_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
372
|
+
declare const ANCESTRY_NODE_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
373
|
+
declare const DESCENDANT_NODE_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
371
374
|
declare const GET_CURRENT_USER: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
372
375
|
declare const GET_BOARDS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
373
376
|
declare const GET_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
374
377
|
declare const GET_GENERATORS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
375
378
|
declare const GET_GENERATIONS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
376
379
|
declare const GET_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
380
|
+
declare const GET_ANCESTRY: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
381
|
+
declare const GET_DESCENDANTS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
382
|
+
declare const GET_INPUT_ARTIFACTS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
377
383
|
declare const CREATE_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
378
384
|
declare const UPDATE_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
379
385
|
declare const DELETE_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
@@ -383,6 +389,7 @@ declare const REMOVE_BOARD_MEMBER: urql.TypedDocumentNode<any, urql.AnyVariables
|
|
|
383
389
|
declare const CREATE_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
384
390
|
declare const CANCEL_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
385
391
|
declare const RETRY_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
392
|
+
declare const UPLOAD_ARTIFACT_FROM_URL: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
386
393
|
interface CreateBoardInput {
|
|
387
394
|
title: string;
|
|
388
395
|
description?: string;
|
|
@@ -404,6 +411,14 @@ interface CreateGenerationInput {
|
|
|
404
411
|
inputParams: Record<string, unknown>;
|
|
405
412
|
metadata?: Record<string, unknown>;
|
|
406
413
|
}
|
|
414
|
+
interface UploadArtifactInput {
|
|
415
|
+
boardId: string;
|
|
416
|
+
artifactType: ArtifactType;
|
|
417
|
+
fileUrl?: string;
|
|
418
|
+
originalFilename?: string;
|
|
419
|
+
userDescription?: string;
|
|
420
|
+
parentGenerationId?: string;
|
|
421
|
+
}
|
|
407
422
|
declare enum BoardRole {
|
|
408
423
|
VIEWER = "VIEWER",
|
|
409
424
|
EDITOR = "EDITOR",
|
|
@@ -417,12 +432,12 @@ declare enum GenerationStatus {
|
|
|
417
432
|
CANCELLED = "CANCELLED"
|
|
418
433
|
}
|
|
419
434
|
declare enum ArtifactType {
|
|
420
|
-
IMAGE = "
|
|
421
|
-
VIDEO = "
|
|
422
|
-
AUDIO = "
|
|
423
|
-
TEXT = "
|
|
424
|
-
LORA = "
|
|
425
|
-
MODEL = "
|
|
435
|
+
IMAGE = "IMAGE",
|
|
436
|
+
VIDEO = "VIDEO",
|
|
437
|
+
AUDIO = "AUDIO",
|
|
438
|
+
TEXT = "TEXT",
|
|
439
|
+
LORA = "LORA",
|
|
440
|
+
MODEL = "MODEL"
|
|
426
441
|
}
|
|
427
442
|
|
|
428
443
|
/**
|
|
@@ -662,6 +677,132 @@ interface GeneratorsHook {
|
|
|
662
677
|
}
|
|
663
678
|
declare function useGenerators(options?: UseGeneratorsOptions): GeneratorsHook;
|
|
664
679
|
|
|
680
|
+
/**
|
|
681
|
+
* Hook for uploading artifacts (images, videos, audio, text).
|
|
682
|
+
*/
|
|
683
|
+
|
|
684
|
+
interface UploadRequest {
|
|
685
|
+
boardId: string;
|
|
686
|
+
artifactType: ArtifactType;
|
|
687
|
+
source: File | string;
|
|
688
|
+
userDescription?: string;
|
|
689
|
+
parentGenerationId?: string;
|
|
690
|
+
}
|
|
691
|
+
interface UploadResult {
|
|
692
|
+
id: string;
|
|
693
|
+
storageUrl: string;
|
|
694
|
+
thumbnailUrl?: string;
|
|
695
|
+
status: "completed" | "failed";
|
|
696
|
+
artifactType: ArtifactType;
|
|
697
|
+
generatorName: string;
|
|
698
|
+
}
|
|
699
|
+
interface UploadHook {
|
|
700
|
+
upload: (request: UploadRequest) => Promise<UploadResult>;
|
|
701
|
+
isUploading: boolean;
|
|
702
|
+
progress: number;
|
|
703
|
+
error: Error | null;
|
|
704
|
+
}
|
|
705
|
+
declare function useUpload(): UploadHook;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Hook for accessing generation lineage (ancestry and descendants).
|
|
709
|
+
*/
|
|
710
|
+
interface ArtifactLineage {
|
|
711
|
+
generationId: string;
|
|
712
|
+
role: string;
|
|
713
|
+
artifactType: string;
|
|
714
|
+
}
|
|
715
|
+
interface AncestryNode {
|
|
716
|
+
generation: {
|
|
717
|
+
id: string;
|
|
718
|
+
generatorName: string;
|
|
719
|
+
artifactType: string;
|
|
720
|
+
status: string;
|
|
721
|
+
storageUrl?: string;
|
|
722
|
+
thumbnailUrl?: string;
|
|
723
|
+
createdAt: string;
|
|
724
|
+
[key: string]: unknown;
|
|
725
|
+
};
|
|
726
|
+
depth: number;
|
|
727
|
+
role: string | null;
|
|
728
|
+
parents: AncestryNode[];
|
|
729
|
+
}
|
|
730
|
+
interface DescendantNode {
|
|
731
|
+
generation: {
|
|
732
|
+
id: string;
|
|
733
|
+
generatorName: string;
|
|
734
|
+
artifactType: string;
|
|
735
|
+
status: string;
|
|
736
|
+
storageUrl?: string;
|
|
737
|
+
thumbnailUrl?: string;
|
|
738
|
+
createdAt: string;
|
|
739
|
+
[key: string]: unknown;
|
|
740
|
+
};
|
|
741
|
+
depth: number;
|
|
742
|
+
role: string | null;
|
|
743
|
+
children: DescendantNode[];
|
|
744
|
+
}
|
|
745
|
+
interface UseAncestryOptions {
|
|
746
|
+
maxDepth?: number;
|
|
747
|
+
pause?: boolean;
|
|
748
|
+
}
|
|
749
|
+
interface UseAncestryHook {
|
|
750
|
+
ancestry: AncestryNode | null;
|
|
751
|
+
loading: boolean;
|
|
752
|
+
error: Error | null;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Hook for fetching the ancestry tree of a generation.
|
|
756
|
+
* @param generationId - The ID of the generation to fetch ancestry for
|
|
757
|
+
* @param options - Optional configuration (maxDepth, pause)
|
|
758
|
+
*/
|
|
759
|
+
declare function useAncestry(generationId: string, options?: UseAncestryOptions): UseAncestryHook;
|
|
760
|
+
interface UseDescendantsOptions {
|
|
761
|
+
maxDepth?: number;
|
|
762
|
+
pause?: boolean;
|
|
763
|
+
}
|
|
764
|
+
interface UseDescendantsHook {
|
|
765
|
+
descendants: DescendantNode | null;
|
|
766
|
+
loading: boolean;
|
|
767
|
+
error: Error | null;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Hook for fetching the descendants tree of a generation.
|
|
771
|
+
* @param generationId - The ID of the generation to fetch descendants for
|
|
772
|
+
* @param options - Optional configuration (maxDepth, pause)
|
|
773
|
+
*/
|
|
774
|
+
declare function useDescendants(generationId: string, options?: UseDescendantsOptions): UseDescendantsHook;
|
|
775
|
+
interface UseInputArtifactsOptions {
|
|
776
|
+
pause?: boolean;
|
|
777
|
+
}
|
|
778
|
+
interface UseInputArtifactsHook {
|
|
779
|
+
inputArtifacts: ArtifactLineage[];
|
|
780
|
+
loading: boolean;
|
|
781
|
+
error: Error | null;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Hook for fetching the input artifacts of a generation.
|
|
785
|
+
* @param generationId - The ID of the generation to fetch input artifacts for
|
|
786
|
+
* @param options - Optional configuration (pause)
|
|
787
|
+
*/
|
|
788
|
+
declare function useInputArtifacts(generationId: string, options?: UseInputArtifactsOptions): UseInputArtifactsHook;
|
|
789
|
+
/**
|
|
790
|
+
* Combined hook for fetching both ancestry and descendants.
|
|
791
|
+
* Useful for lineage explorer pages that show both trees.
|
|
792
|
+
*/
|
|
793
|
+
interface UseLineageOptions {
|
|
794
|
+
maxDepth?: number;
|
|
795
|
+
pause?: boolean;
|
|
796
|
+
}
|
|
797
|
+
interface UseLineageHook {
|
|
798
|
+
ancestry: AncestryNode | null;
|
|
799
|
+
descendants: DescendantNode | null;
|
|
800
|
+
inputArtifacts: ArtifactLineage[];
|
|
801
|
+
loading: boolean;
|
|
802
|
+
error: Error | null;
|
|
803
|
+
}
|
|
804
|
+
declare function useLineage(generationId: string, options?: UseLineageOptions): UseLineageHook;
|
|
805
|
+
|
|
665
806
|
/**
|
|
666
807
|
* Utilities for parsing generator JSON Schemas into structured data
|
|
667
808
|
* suitable for dynamic UI generation.
|
|
@@ -766,4 +907,4 @@ declare function BoardsProvider({ children, apiUrl, graphqlUrl, subscriptionUrl,
|
|
|
766
907
|
|
|
767
908
|
declare const VERSION = "0.1.0";
|
|
768
909
|
|
|
769
|
-
export { ADD_BOARD_MEMBER, type ApiConfig, type Artifact$1 as Artifact, type ArtifactSlot, type ArtifactSlotInfo, ArtifactType, type AuthContextValue, AuthProvider, type AuthProviderConfig, type AuthState$1 as AuthState, BOARD_FRAGMENT, BaseAuthProvider, BoardRole, BoardsProvider, CANCEL_GENERATION, CREATE_BOARD, CREATE_GENERATION, type CreateBoardInput, type CreateGenerationInput, DELETE_BOARD, type DropdownField, GENERATION_FRAGMENT, GET_BOARD, GET_BOARDS, GET_CURRENT_USER, GET_GENERATION, GET_GENERATIONS, GET_GENERATORS, GenerationStatus, type Generator, type GeneratorInfo, type GeneratorSelectionContextValue, GeneratorSelectionProvider, NoAuthProvider, type NumberInputField, type ParsedGeneratorSchema, type PromptField, REMOVE_BOARD_MEMBER, RETRY_GENERATION, type SettingsField, type SignInOptions, type SliderField, type TextInputField, UPDATE_BOARD, UPDATE_BOARD_MEMBER_ROLE, USER_FRAGMENT, type UpdateBoardInput, type User$1 as User, VERSION, createGraphQLClient, getArtifactType, isArtifactReference, parseArtifactSlot, parseGeneratorSchema, parseSettingsField, useApiConfig, useAuth, useAuthOptional, useBoard, useBoards, useGeneration, useGeneratorSelection, useGenerators };
|
|
910
|
+
export { ADD_BOARD_MEMBER, ANCESTRY_NODE_FRAGMENT, ARTIFACT_LINEAGE_FRAGMENT, type AncestryNode, type ApiConfig, type Artifact$1 as Artifact, type ArtifactLineage, type ArtifactSlot, type ArtifactSlotInfo, ArtifactType, type AuthContextValue, AuthProvider, type AuthProviderConfig, type AuthState$1 as AuthState, BOARD_FRAGMENT, BaseAuthProvider, BoardRole, BoardsProvider, CANCEL_GENERATION, CREATE_BOARD, CREATE_GENERATION, type CreateBoardInput, type CreateGenerationInput, DELETE_BOARD, DESCENDANT_NODE_FRAGMENT, type DescendantNode, type DropdownField, GENERATION_FRAGMENT, GET_ANCESTRY, GET_BOARD, GET_BOARDS, GET_CURRENT_USER, GET_DESCENDANTS, GET_GENERATION, GET_GENERATIONS, GET_GENERATORS, GET_INPUT_ARTIFACTS, GenerationStatus, type Generator, type GeneratorInfo, type GeneratorSelectionContextValue, GeneratorSelectionProvider, NoAuthProvider, type NumberInputField, type ParsedGeneratorSchema, type PromptField, REMOVE_BOARD_MEMBER, RETRY_GENERATION, type SettingsField, type SignInOptions, type SliderField, type TextInputField, UPDATE_BOARD, UPDATE_BOARD_MEMBER_ROLE, UPLOAD_ARTIFACT_FROM_URL, USER_FRAGMENT, type UpdateBoardInput, type UploadArtifactInput, type UploadHook, type UploadRequest, type UploadResult, type User$1 as User, VERSION, createGraphQLClient, getArtifactType, isArtifactReference, parseArtifactSlot, parseGeneratorSchema, parseSettingsField, useAncestry, useApiConfig, useAuth, useAuthOptional, useBoard, useBoards, useDescendants, useGeneration, useGeneratorSelection, useGenerators, useInputArtifacts, useLineage, useUpload };
|
package/dist/index.d.ts
CHANGED
|
@@ -368,12 +368,18 @@ declare function createGraphQLClient({ url, subscriptionUrl, auth, tenantId, }:
|
|
|
368
368
|
declare const USER_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
369
369
|
declare const BOARD_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
370
370
|
declare const GENERATION_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
371
|
+
declare const ARTIFACT_LINEAGE_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
372
|
+
declare const ANCESTRY_NODE_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
373
|
+
declare const DESCENDANT_NODE_FRAGMENT: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
371
374
|
declare const GET_CURRENT_USER: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
372
375
|
declare const GET_BOARDS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
373
376
|
declare const GET_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
374
377
|
declare const GET_GENERATORS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
375
378
|
declare const GET_GENERATIONS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
376
379
|
declare const GET_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
380
|
+
declare const GET_ANCESTRY: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
381
|
+
declare const GET_DESCENDANTS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
382
|
+
declare const GET_INPUT_ARTIFACTS: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
377
383
|
declare const CREATE_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
378
384
|
declare const UPDATE_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
379
385
|
declare const DELETE_BOARD: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
@@ -383,6 +389,7 @@ declare const REMOVE_BOARD_MEMBER: urql.TypedDocumentNode<any, urql.AnyVariables
|
|
|
383
389
|
declare const CREATE_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
384
390
|
declare const CANCEL_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
385
391
|
declare const RETRY_GENERATION: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
392
|
+
declare const UPLOAD_ARTIFACT_FROM_URL: urql.TypedDocumentNode<any, urql.AnyVariables>;
|
|
386
393
|
interface CreateBoardInput {
|
|
387
394
|
title: string;
|
|
388
395
|
description?: string;
|
|
@@ -404,6 +411,14 @@ interface CreateGenerationInput {
|
|
|
404
411
|
inputParams: Record<string, unknown>;
|
|
405
412
|
metadata?: Record<string, unknown>;
|
|
406
413
|
}
|
|
414
|
+
interface UploadArtifactInput {
|
|
415
|
+
boardId: string;
|
|
416
|
+
artifactType: ArtifactType;
|
|
417
|
+
fileUrl?: string;
|
|
418
|
+
originalFilename?: string;
|
|
419
|
+
userDescription?: string;
|
|
420
|
+
parentGenerationId?: string;
|
|
421
|
+
}
|
|
407
422
|
declare enum BoardRole {
|
|
408
423
|
VIEWER = "VIEWER",
|
|
409
424
|
EDITOR = "EDITOR",
|
|
@@ -417,12 +432,12 @@ declare enum GenerationStatus {
|
|
|
417
432
|
CANCELLED = "CANCELLED"
|
|
418
433
|
}
|
|
419
434
|
declare enum ArtifactType {
|
|
420
|
-
IMAGE = "
|
|
421
|
-
VIDEO = "
|
|
422
|
-
AUDIO = "
|
|
423
|
-
TEXT = "
|
|
424
|
-
LORA = "
|
|
425
|
-
MODEL = "
|
|
435
|
+
IMAGE = "IMAGE",
|
|
436
|
+
VIDEO = "VIDEO",
|
|
437
|
+
AUDIO = "AUDIO",
|
|
438
|
+
TEXT = "TEXT",
|
|
439
|
+
LORA = "LORA",
|
|
440
|
+
MODEL = "MODEL"
|
|
426
441
|
}
|
|
427
442
|
|
|
428
443
|
/**
|
|
@@ -662,6 +677,132 @@ interface GeneratorsHook {
|
|
|
662
677
|
}
|
|
663
678
|
declare function useGenerators(options?: UseGeneratorsOptions): GeneratorsHook;
|
|
664
679
|
|
|
680
|
+
/**
|
|
681
|
+
* Hook for uploading artifacts (images, videos, audio, text).
|
|
682
|
+
*/
|
|
683
|
+
|
|
684
|
+
interface UploadRequest {
|
|
685
|
+
boardId: string;
|
|
686
|
+
artifactType: ArtifactType;
|
|
687
|
+
source: File | string;
|
|
688
|
+
userDescription?: string;
|
|
689
|
+
parentGenerationId?: string;
|
|
690
|
+
}
|
|
691
|
+
interface UploadResult {
|
|
692
|
+
id: string;
|
|
693
|
+
storageUrl: string;
|
|
694
|
+
thumbnailUrl?: string;
|
|
695
|
+
status: "completed" | "failed";
|
|
696
|
+
artifactType: ArtifactType;
|
|
697
|
+
generatorName: string;
|
|
698
|
+
}
|
|
699
|
+
interface UploadHook {
|
|
700
|
+
upload: (request: UploadRequest) => Promise<UploadResult>;
|
|
701
|
+
isUploading: boolean;
|
|
702
|
+
progress: number;
|
|
703
|
+
error: Error | null;
|
|
704
|
+
}
|
|
705
|
+
declare function useUpload(): UploadHook;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Hook for accessing generation lineage (ancestry and descendants).
|
|
709
|
+
*/
|
|
710
|
+
interface ArtifactLineage {
|
|
711
|
+
generationId: string;
|
|
712
|
+
role: string;
|
|
713
|
+
artifactType: string;
|
|
714
|
+
}
|
|
715
|
+
interface AncestryNode {
|
|
716
|
+
generation: {
|
|
717
|
+
id: string;
|
|
718
|
+
generatorName: string;
|
|
719
|
+
artifactType: string;
|
|
720
|
+
status: string;
|
|
721
|
+
storageUrl?: string;
|
|
722
|
+
thumbnailUrl?: string;
|
|
723
|
+
createdAt: string;
|
|
724
|
+
[key: string]: unknown;
|
|
725
|
+
};
|
|
726
|
+
depth: number;
|
|
727
|
+
role: string | null;
|
|
728
|
+
parents: AncestryNode[];
|
|
729
|
+
}
|
|
730
|
+
interface DescendantNode {
|
|
731
|
+
generation: {
|
|
732
|
+
id: string;
|
|
733
|
+
generatorName: string;
|
|
734
|
+
artifactType: string;
|
|
735
|
+
status: string;
|
|
736
|
+
storageUrl?: string;
|
|
737
|
+
thumbnailUrl?: string;
|
|
738
|
+
createdAt: string;
|
|
739
|
+
[key: string]: unknown;
|
|
740
|
+
};
|
|
741
|
+
depth: number;
|
|
742
|
+
role: string | null;
|
|
743
|
+
children: DescendantNode[];
|
|
744
|
+
}
|
|
745
|
+
interface UseAncestryOptions {
|
|
746
|
+
maxDepth?: number;
|
|
747
|
+
pause?: boolean;
|
|
748
|
+
}
|
|
749
|
+
interface UseAncestryHook {
|
|
750
|
+
ancestry: AncestryNode | null;
|
|
751
|
+
loading: boolean;
|
|
752
|
+
error: Error | null;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Hook for fetching the ancestry tree of a generation.
|
|
756
|
+
* @param generationId - The ID of the generation to fetch ancestry for
|
|
757
|
+
* @param options - Optional configuration (maxDepth, pause)
|
|
758
|
+
*/
|
|
759
|
+
declare function useAncestry(generationId: string, options?: UseAncestryOptions): UseAncestryHook;
|
|
760
|
+
interface UseDescendantsOptions {
|
|
761
|
+
maxDepth?: number;
|
|
762
|
+
pause?: boolean;
|
|
763
|
+
}
|
|
764
|
+
interface UseDescendantsHook {
|
|
765
|
+
descendants: DescendantNode | null;
|
|
766
|
+
loading: boolean;
|
|
767
|
+
error: Error | null;
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Hook for fetching the descendants tree of a generation.
|
|
771
|
+
* @param generationId - The ID of the generation to fetch descendants for
|
|
772
|
+
* @param options - Optional configuration (maxDepth, pause)
|
|
773
|
+
*/
|
|
774
|
+
declare function useDescendants(generationId: string, options?: UseDescendantsOptions): UseDescendantsHook;
|
|
775
|
+
interface UseInputArtifactsOptions {
|
|
776
|
+
pause?: boolean;
|
|
777
|
+
}
|
|
778
|
+
interface UseInputArtifactsHook {
|
|
779
|
+
inputArtifacts: ArtifactLineage[];
|
|
780
|
+
loading: boolean;
|
|
781
|
+
error: Error | null;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Hook for fetching the input artifacts of a generation.
|
|
785
|
+
* @param generationId - The ID of the generation to fetch input artifacts for
|
|
786
|
+
* @param options - Optional configuration (pause)
|
|
787
|
+
*/
|
|
788
|
+
declare function useInputArtifacts(generationId: string, options?: UseInputArtifactsOptions): UseInputArtifactsHook;
|
|
789
|
+
/**
|
|
790
|
+
* Combined hook for fetching both ancestry and descendants.
|
|
791
|
+
* Useful for lineage explorer pages that show both trees.
|
|
792
|
+
*/
|
|
793
|
+
interface UseLineageOptions {
|
|
794
|
+
maxDepth?: number;
|
|
795
|
+
pause?: boolean;
|
|
796
|
+
}
|
|
797
|
+
interface UseLineageHook {
|
|
798
|
+
ancestry: AncestryNode | null;
|
|
799
|
+
descendants: DescendantNode | null;
|
|
800
|
+
inputArtifacts: ArtifactLineage[];
|
|
801
|
+
loading: boolean;
|
|
802
|
+
error: Error | null;
|
|
803
|
+
}
|
|
804
|
+
declare function useLineage(generationId: string, options?: UseLineageOptions): UseLineageHook;
|
|
805
|
+
|
|
665
806
|
/**
|
|
666
807
|
* Utilities for parsing generator JSON Schemas into structured data
|
|
667
808
|
* suitable for dynamic UI generation.
|
|
@@ -766,4 +907,4 @@ declare function BoardsProvider({ children, apiUrl, graphqlUrl, subscriptionUrl,
|
|
|
766
907
|
|
|
767
908
|
declare const VERSION = "0.1.0";
|
|
768
909
|
|
|
769
|
-
export { ADD_BOARD_MEMBER, type ApiConfig, type Artifact$1 as Artifact, type ArtifactSlot, type ArtifactSlotInfo, ArtifactType, type AuthContextValue, AuthProvider, type AuthProviderConfig, type AuthState$1 as AuthState, BOARD_FRAGMENT, BaseAuthProvider, BoardRole, BoardsProvider, CANCEL_GENERATION, CREATE_BOARD, CREATE_GENERATION, type CreateBoardInput, type CreateGenerationInput, DELETE_BOARD, type DropdownField, GENERATION_FRAGMENT, GET_BOARD, GET_BOARDS, GET_CURRENT_USER, GET_GENERATION, GET_GENERATIONS, GET_GENERATORS, GenerationStatus, type Generator, type GeneratorInfo, type GeneratorSelectionContextValue, GeneratorSelectionProvider, NoAuthProvider, type NumberInputField, type ParsedGeneratorSchema, type PromptField, REMOVE_BOARD_MEMBER, RETRY_GENERATION, type SettingsField, type SignInOptions, type SliderField, type TextInputField, UPDATE_BOARD, UPDATE_BOARD_MEMBER_ROLE, USER_FRAGMENT, type UpdateBoardInput, type User$1 as User, VERSION, createGraphQLClient, getArtifactType, isArtifactReference, parseArtifactSlot, parseGeneratorSchema, parseSettingsField, useApiConfig, useAuth, useAuthOptional, useBoard, useBoards, useGeneration, useGeneratorSelection, useGenerators };
|
|
910
|
+
export { ADD_BOARD_MEMBER, ANCESTRY_NODE_FRAGMENT, ARTIFACT_LINEAGE_FRAGMENT, type AncestryNode, type ApiConfig, type Artifact$1 as Artifact, type ArtifactLineage, type ArtifactSlot, type ArtifactSlotInfo, ArtifactType, type AuthContextValue, AuthProvider, type AuthProviderConfig, type AuthState$1 as AuthState, BOARD_FRAGMENT, BaseAuthProvider, BoardRole, BoardsProvider, CANCEL_GENERATION, CREATE_BOARD, CREATE_GENERATION, type CreateBoardInput, type CreateGenerationInput, DELETE_BOARD, DESCENDANT_NODE_FRAGMENT, type DescendantNode, type DropdownField, GENERATION_FRAGMENT, GET_ANCESTRY, GET_BOARD, GET_BOARDS, GET_CURRENT_USER, GET_DESCENDANTS, GET_GENERATION, GET_GENERATIONS, GET_GENERATORS, GET_INPUT_ARTIFACTS, GenerationStatus, type Generator, type GeneratorInfo, type GeneratorSelectionContextValue, GeneratorSelectionProvider, NoAuthProvider, type NumberInputField, type ParsedGeneratorSchema, type PromptField, REMOVE_BOARD_MEMBER, RETRY_GENERATION, type SettingsField, type SignInOptions, type SliderField, type TextInputField, UPDATE_BOARD, UPDATE_BOARD_MEMBER_ROLE, UPLOAD_ARTIFACT_FROM_URL, USER_FRAGMENT, type UpdateBoardInput, type UploadArtifactInput, type UploadHook, type UploadRequest, type UploadResult, type User$1 as User, VERSION, createGraphQLClient, getArtifactType, isArtifactReference, parseArtifactSlot, parseGeneratorSchema, parseSettingsField, useAncestry, useApiConfig, useAuth, useAuthOptional, useBoard, useBoards, useDescendants, useGeneration, useGeneratorSelection, useGenerators, useInputArtifacts, useLineage, useUpload };
|