sunpeak 0.5.9 → 0.5.10

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/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  [![CI](https://img.shields.io/github/actions/workflow/status/Sunpeak-AI/sunpeak/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/Sunpeak-AI/sunpeak/actions)
14
14
  [![License](https://img.shields.io/npm/l/sunpeak.svg?style=flat-square)](https://github.com/Sunpeak-AI/sunpeak/blob/main/LICENSE)
15
15
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.6-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org/)
16
- [![React](https://img.shields.io/badge/React-18%20%7C%2019-blue?style=flat-square&logo=react)](https://reactjs.org/)
16
+ [![React](https://img.shields.io/badge/React-19-blue?style=flat-square&logo=react)](https://reactjs.org/)
17
17
 
18
18
  The MCP App SDK.
19
19
 
@@ -40,8 +40,15 @@ declare class MockOpenAI implements OpenAiAPI, OpenAiGlobals {
40
40
  notifyIntrinsicHeight(height: number): void;
41
41
  setWidgetState(state: Record<string, unknown>): Promise<void>;
42
42
  setTheme(theme: Theme): void;
43
+ setUserAgent(userAgent: OpenAiGlobals['userAgent']): void;
44
+ setLocale(locale: string): void;
45
+ setMaxHeight(maxHeight: number): void;
43
46
  setDisplayMode(displayMode: DisplayMode): void;
47
+ setSafeArea(safeArea: OpenAiGlobals['safeArea']): void;
48
+ setView(view: View | null): void;
49
+ setToolInput(toolInput: Record<string, unknown>): void;
44
50
  setToolOutput(toolOutput: Record<string, unknown> | null): void;
51
+ setToolResponseMetadata(toolResponseMetadata: Record<string, unknown> | null): void;
45
52
  setWidgetStateExternal(widgetState: Record<string, unknown> | null): void;
46
53
  emitUpdate(globals: Partial<OpenAiGlobals>): void;
47
54
  }
@@ -9,6 +9,12 @@ interface SidebarControlProps {
9
9
  children: React.ReactNode;
10
10
  }
11
11
  export declare function SidebarControl({ label, children }: SidebarControlProps): import("react/jsx-runtime").JSX.Element;
12
+ interface SidebarCollapsibleControlProps {
13
+ label: string;
14
+ children: React.ReactNode;
15
+ defaultCollapsed?: boolean;
16
+ }
17
+ export declare function SidebarCollapsibleControl({ label, children, defaultCollapsed, }: SidebarCollapsibleControlProps): import("react/jsx-runtime").JSX.Element;
12
18
  interface SidebarSelectProps {
13
19
  value: string;
14
20
  onChange: (value: string) => void;
@@ -19,4 +25,36 @@ interface SidebarSelectProps {
19
25
  placeholder?: string;
20
26
  }
21
27
  export declare function SidebarSelect({ value, onChange, options, placeholder }: SidebarSelectProps): import("react/jsx-runtime").JSX.Element;
28
+ interface SidebarInputProps {
29
+ value: string;
30
+ onChange: (value: string) => void;
31
+ placeholder?: string;
32
+ type?: 'text' | 'number';
33
+ }
34
+ export declare function SidebarInput({ value, onChange, placeholder, type }: SidebarInputProps): import("react/jsx-runtime").JSX.Element;
35
+ interface SidebarCheckboxProps {
36
+ checked: boolean;
37
+ onChange: (checked: boolean) => void;
38
+ label: string;
39
+ }
40
+ export declare function SidebarCheckbox({ checked, onChange, label }: SidebarCheckboxProps): import("react/jsx-runtime").JSX.Element;
41
+ interface SidebarTextareaProps {
42
+ value: string;
43
+ onChange: (value: string) => void;
44
+ onFocus?: () => void;
45
+ onBlur?: () => void;
46
+ placeholder?: string;
47
+ rows?: number;
48
+ error?: string;
49
+ }
50
+ export declare function SidebarTextarea({ value, onChange, onFocus, onBlur, placeholder, rows, error, }: SidebarTextareaProps): import("react/jsx-runtime").JSX.Element;
51
+ interface SidebarToggleProps {
52
+ value: string;
53
+ onChange: (value: string) => void;
54
+ options: Array<{
55
+ value: string;
56
+ label: string;
57
+ }>;
58
+ }
59
+ export declare function SidebarToggle({ value, onChange, options }: SidebarToggleProps): import("react/jsx-runtime").JSX.Element;
22
60
  export {};