@weirdfingers/boards 0.4.0 → 0.5.0

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.
@@ -118,13 +118,20 @@ interface BoardHook {
118
118
  revokeShareLink: (linkId: string) => Promise<void>;
119
119
  }
120
120
 
121
- export function useBoard(boardId: string): BoardHook {
121
+ export function useBoard(
122
+ boardId: string,
123
+ options?: { limit?: number; offset?: number }
124
+ ): BoardHook {
122
125
  const { user } = useAuth();
123
126
 
124
127
  // Query for board data
125
128
  const [{ data, fetching, error }, reexecuteQuery] = useQuery({
126
129
  query: GET_BOARD,
127
- variables: { id: boardId },
130
+ variables: {
131
+ id: boardId,
132
+ limit: options?.limit ?? 100, // Default to 100 generations
133
+ offset: options?.offset ?? 0,
134
+ },
128
135
  pause: !boardId,
129
136
  requestPolicy: "cache-and-network", // Always fetch fresh data while showing cached data
130
137
  });
package/src/index.ts CHANGED
@@ -11,6 +11,10 @@ export { NoAuthProvider } from "./auth/providers/none"; // Only no-auth included
11
11
  export { useApiConfig } from "./config/ApiConfigContext";
12
12
  export type { ApiConfig } from "./config/ApiConfigContext";
13
13
 
14
+ // Generator selection context
15
+ export { GeneratorSelectionProvider, useGeneratorSelection } from "./config/GeneratorSelectionContext";
16
+ export type { GeneratorInfo, GeneratorSelectionContextValue, ArtifactSlotInfo, Artifact } from "./config/GeneratorSelectionContext";
17
+
14
18
  // GraphQL exports
15
19
  export { createGraphQLClient } from "./graphql/client";
16
20
  export * from "./graphql/operations";