@sciol/xyzen 0.1.14 → 0.1.17

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/app/App.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export interface XyzenProps {
2
2
  backendUrl?: string;
3
+ showThemeToggle?: boolean;
4
+ showLlmProvider?: boolean;
3
5
  }
4
- export declare function Xyzen({ backendUrl }: XyzenProps): import("react/jsx-runtime").JSX.Element | null;
6
+ export declare function Xyzen({ backendUrl, showThemeToggle, showLlmProvider, }: XyzenProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,23 @@
1
+ import { LoadingKey } from '../../store/slices/loadingSlice';
2
+ interface LoadingOverlayProps {
3
+ loadingKey: LoadingKey | string;
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ spinnerSize?: "sm" | "md" | "lg";
7
+ overlay?: boolean;
8
+ }
9
+ export declare function LoadingOverlay({ loadingKey, children, className, spinnerSize, overlay, }: LoadingOverlayProps): import("react/jsx-runtime").JSX.Element;
10
+ interface InlineLoadingProps {
11
+ loadingKey: LoadingKey | string;
12
+ loadingText?: string;
13
+ children: React.ReactNode;
14
+ spinnerSize?: "sm" | "md" | "lg";
15
+ }
16
+ export declare function InlineLoading({ loadingKey, loadingText, children, spinnerSize, }: InlineLoadingProps): import("react/jsx-runtime").JSX.Element;
17
+ interface LoadingButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
18
+ loadingKey?: LoadingKey | string;
19
+ loading?: boolean;
20
+ children: React.ReactNode;
21
+ }
22
+ export declare function LoadingButton({ loadingKey, loading: externalLoading, children, disabled, className, ...props }: LoadingButtonProps): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -1 +1,6 @@
1
- export declare function LoadingSpinner(): import("react/jsx-runtime").JSX.Element;
1
+ interface LoadingSpinnerProps {
2
+ size?: "sm" | "md" | "lg";
3
+ className?: string;
4
+ }
5
+ export declare function LoadingSpinner({ size, className, }: LoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,6 +1,7 @@
1
1
  export * from './agentSlice';
2
2
  export * from './authSlice';
3
3
  export * from './chatSlice';
4
+ export * from './loadingSlice';
4
5
  export * from './mcpSlice';
5
6
  export * from './providerSlice';
6
7
  export * from './uiSlice';
@@ -0,0 +1,28 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { XyzenState } from '../types';
3
+ export interface LoadingSlice {
4
+ loadingStates: Record<string, boolean>;
5
+ setLoading: (key: string, loading: boolean) => void;
6
+ getLoading: (key: string) => boolean;
7
+ clearAllLoading: () => void;
8
+ }
9
+ export declare const createLoadingSlice: StateCreator<XyzenState, [
10
+ ["zustand/immer", never]
11
+ ], [
12
+ ], LoadingSlice>;
13
+ export declare const LoadingKeys: {
14
+ readonly CHAT_HISTORY: "chatHistory";
15
+ readonly AGENTS_LIST: "agentsList";
16
+ readonly TOPIC_MESSAGES: "topicMessages";
17
+ readonly USER_AUTH: "userAuth";
18
+ readonly CREATE_SESSION: "createSession";
19
+ readonly UPDATE_TOPIC: "updateTopic";
20
+ readonly AGENT_CREATE: "agentCreate";
21
+ readonly AGENT_UPDATE: "agentUpdate";
22
+ readonly AGENT_DELETE: "agentDelete";
23
+ readonly MCP_SERVERS: "mcpServers";
24
+ readonly MCP_SERVER_CREATE: "mcpServerCreate";
25
+ readonly MCP_SERVER_UPDATE: "mcpServerUpdate";
26
+ readonly MCP_SERVER_DELETE: "mcpServerDelete";
27
+ };
28
+ export type LoadingKey = (typeof LoadingKeys)[keyof typeof LoadingKeys];
@@ -3,7 +3,6 @@ import { StateCreator } from 'zustand';
3
3
  import { XyzenState } from '../types';
4
4
  export interface McpSlice {
5
5
  mcpServers: McpServer[];
6
- mcpServersLoading: boolean;
7
6
  fetchMcpServers: () => Promise<void>;
8
7
  addMcpServer: (server: McpServerCreate) => Promise<void>;
9
8
  editMcpServer: (id: string, server: Partial<McpServerCreate>) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import { AgentSlice, AuthSlice, ChatSlice, McpSlice, ProviderSlice, UiSlice } from './slices';
1
+ import { AgentSlice, AuthSlice, ChatSlice, LoadingSlice, McpSlice, ProviderSlice, UiSlice } from './slices';
2
2
  export interface Message {
3
3
  id: string;
4
4
  content: string;
@@ -41,4 +41,4 @@ export interface SessionResponse {
41
41
  user_id: string;
42
42
  topics: TopicResponse[];
43
43
  }
44
- export type XyzenState = UiSlice & ChatSlice & AgentSlice & McpSlice & ProviderSlice & AuthSlice;
44
+ export type XyzenState = UiSlice & ChatSlice & AgentSlice & McpSlice & ProviderSlice & AuthSlice & LoadingSlice;
@@ -9,6 +9,6 @@ export interface McpServer {
9
9
  name: string;
10
10
  description?: string;
11
11
  }[];
12
- user_id?: string;
12
+ user_id: string;
13
13
  }
14
- export type McpServerCreate = Omit<McpServer, "id" | "status" | "tools">;
14
+ export type McpServerCreate = Omit<McpServer, "id" | "status" | "tools" | "user_id">;