sunpeak 0.20.35 → 0.20.36

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.
Files changed (40) hide show
  1. package/bin/commands/inspect.mjs +16 -14
  2. package/bin/commands/test-init.mjs +57 -44
  3. package/bin/lib/test/test-fixtures.d.mts +9 -1
  4. package/bin/lib/test/test-fixtures.mjs +25 -7
  5. package/dist/chatgpt/index.cjs +1 -1
  6. package/dist/chatgpt/index.js +1 -1
  7. package/dist/claude/index.cjs +1 -1
  8. package/dist/claude/index.js +1 -1
  9. package/dist/embed.css +1 -1
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/inspector/app-types.d.ts +6 -4
  13. package/dist/inspector/index.cjs +1 -1
  14. package/dist/inspector/index.js +1 -1
  15. package/dist/inspector/inspector.d.ts +5 -4
  16. package/dist/inspector/simple-sidebar.d.ts +20 -6
  17. package/dist/inspector/use-inspector-state.d.ts +4 -0
  18. package/dist/{inspector-DQ_vv1wj.cjs → inspector-BNWla95w.cjs} +291 -145
  19. package/dist/{inspector-DQ_vv1wj.cjs.map → inspector-BNWla95w.cjs.map} +1 -1
  20. package/dist/{inspector-D0TWNx_T.js → inspector-CiuT_2yA.js} +291 -145
  21. package/dist/{inspector-D0TWNx_T.js.map → inspector-CiuT_2yA.js.map} +1 -1
  22. package/dist/style.css +6 -24
  23. package/package.json +1 -1
  24. package/template/dist/albums/albums.html +1 -1
  25. package/template/dist/albums/albums.json +1 -1
  26. package/template/dist/carousel/carousel.html +1 -1
  27. package/template/dist/carousel/carousel.json +1 -1
  28. package/template/dist/map/map.html +1 -1
  29. package/template/dist/map/map.json +1 -1
  30. package/template/dist/review/review.html +1 -1
  31. package/template/dist/review/review.json +1 -1
  32. package/template/tests/e2e/visual.spec.ts +0 -8
  33. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-chatgpt-darwin.png +0 -0
  34. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-chatgpt-linux.png +0 -0
  35. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-claude-darwin.png +0 -0
  36. package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-claude-linux.png +0 -0
  37. package/template/tests/e2e/visual.spec.ts-snapshots/albums-page-light-chatgpt-darwin.png +0 -0
  38. package/template/tests/e2e/visual.spec.ts-snapshots/albums-page-light-chatgpt-linux.png +0 -0
  39. package/template/tests/e2e/visual.spec.ts-snapshots/albums-page-light-claude-darwin.png +0 -0
  40. package/template/tests/e2e/visual.spec.ts-snapshots/albums-page-light-claude-linux.png +0 -0
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../chunk-Cek0wNdY.cjs");
3
- const require_inspector = require("../inspector-DQ_vv1wj.cjs");
3
+ const require_inspector = require("../inspector-BNWla95w.cjs");
4
4
  const require_inspector_url = require("../inspector-url-BxScdDag.cjs");
5
5
  const require_discovery = require("../discovery-31_n0zcu.cjs");
6
6
  //#region src/inspector/index.ts
@@ -1,5 +1,5 @@
1
1
  import { Ct as __exportAll } from "../protocol-bhrz2H_E.js";
2
- import { S as registerHostShell, _ as extractResourceCSP, a as SidebarCollapsibleControl, b as getHostShell, c as SidebarSelect, d as SimpleSidebar, f as ThemeProvider, g as IframeResource, h as useInspectorState, i as SidebarCheckbox, l as SidebarTextarea, m as useMcpConnection, n as flattenAppToSimulations, o as SidebarControl, p as useThemeContext, r as resolveServerToolResult, s as SidebarInput, t as Inspector, u as SidebarToggle, v as McpAppHost, x as getRegisteredHosts, y as SCREEN_WIDTHS } from "../inspector-D0TWNx_T.js";
2
+ import { S as registerHostShell, _ as extractResourceCSP, a as SidebarCollapsibleControl, b as getHostShell, c as SidebarSelect, d as SimpleSidebar, f as ThemeProvider, g as IframeResource, h as useInspectorState, i as SidebarCheckbox, l as SidebarTextarea, m as useMcpConnection, n as flattenAppToSimulations, o as SidebarControl, p as useThemeContext, r as resolveServerToolResult, s as SidebarInput, t as Inspector, u as SidebarToggle, v as McpAppHost, x as getRegisteredHosts, y as SCREEN_WIDTHS } from "../inspector-CiuT_2yA.js";
3
3
  import { t as createInspectorUrl } from "../inspector-url-xUMGbWis.js";
4
4
  import { c as toPascalCase, i as findResourceKey, n as extractSimulationKey, r as findResourceDirs, s as getComponentName, t as extractResourceKey } from "../discovery-DOVner--.js";
5
5
  //#region src/inspector/index.ts
@@ -70,10 +70,11 @@ export interface InspectorProps {
70
70
  /**
71
71
  * Hierarchical input for embedding: an MCP App with its resources, tools,
72
72
  * and saved simulations. Mirrors the MCP App data model — resources are
73
- * keyed by URI, and each tool's `_meta.openai.outputTemplate` selects the
74
- * resource it renders. The Inspector flattens this internally; pass the
75
- * shape you already have from `listTools` + `listResources` + your fixture
76
- * store and the component renders it. See `InspectorApp`.
73
+ * keyed by URI, UI tools link to resources with `_meta.openai.outputTemplate`,
74
+ * and backend-only tools can be selected, called, and inspected without
75
+ * rendering an iframe. The Inspector flattens this internally; pass the shape
76
+ * you already have from `listTools` + `listResources` + your fixture store
77
+ * and the component renders it. See `InspectorApp`.
77
78
  *
78
79
  * Mutually exclusive with `simulations`. When both are provided, `app`
79
80
  * wins — `simulations` stays for back-compat with the CLI codepath.
@@ -2,6 +2,11 @@ import * as React from 'react';
2
2
  interface SimpleSidebarProps {
3
3
  children: React.ReactNode;
4
4
  controls: React.ReactNode;
5
+ rightControls?: React.ReactNode;
6
+ sidebarWidth?: number;
7
+ rightSidebarWidth?: number;
8
+ onSidebarWidthChange?: (width: number) => void;
9
+ onRightSidebarWidthChange?: (width: number) => void;
5
10
  /** Optional element rendered above the sidebar controls. */
6
11
  headerRight?: React.ReactNode;
7
12
  /**
@@ -17,33 +22,40 @@ interface SimpleSidebarProps {
17
22
  */
18
23
  fillParent?: boolean;
19
24
  }
20
- export declare function SimpleSidebar({ children, controls, headerRight, rootRef, fillParent, }: SimpleSidebarProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare const DEFAULT_SIDEBAR_WIDTH = 260;
26
+ export declare function SimpleSidebar({ children, controls, rightControls, sidebarWidth, rightSidebarWidth, onSidebarWidthChange, onRightSidebarWidthChange, headerRight, rootRef, fillParent, }: SimpleSidebarProps): import("react/jsx-runtime").JSX.Element;
21
27
  interface HelpIconProps {
22
28
  tooltip: string;
23
29
  docsPath: string;
30
+ placement?: 'left' | 'right';
24
31
  }
25
- export declare function HelpIcon({ tooltip, docsPath }: HelpIconProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function HelpIcon({ tooltip, docsPath, placement }: HelpIconProps): import("react/jsx-runtime").JSX.Element;
26
33
  interface SidebarControlProps {
27
34
  label: React.ReactNode;
28
35
  children: React.ReactNode;
29
36
  /** Short tooltip shown on hover of the help icon */
30
37
  tooltip?: string;
38
+ tooltipPlacement?: 'left' | 'right';
31
39
  /** Docs path appended to https://sunpeak.ai/docs/ */
32
40
  docsPath?: string;
33
41
  'data-testid'?: string;
34
42
  }
35
- export declare function SidebarControl({ label, children, tooltip, docsPath, 'data-testid': testId, }: SidebarControlProps): import("react/jsx-runtime").JSX.Element;
43
+ export declare function SidebarControl({ label, children, tooltip, tooltipPlacement, docsPath, 'data-testid': testId, }: SidebarControlProps): import("react/jsx-runtime").JSX.Element;
36
44
  interface SidebarCollapsibleControlProps {
37
45
  label: string;
38
46
  children: React.ReactNode;
39
47
  defaultCollapsed?: boolean;
48
+ className?: string;
49
+ contentClassName?: string;
50
+ style?: React.CSSProperties;
40
51
  /** Short tooltip shown on hover of the help icon */
41
52
  tooltip?: string;
53
+ tooltipPlacement?: 'left' | 'right';
42
54
  /** Docs path appended to https://sunpeak.ai/docs/ */
43
55
  docsPath?: string;
44
56
  'data-testid'?: string;
45
57
  }
46
- export declare function SidebarCollapsibleControl({ label, children, defaultCollapsed, tooltip, docsPath, 'data-testid': testId, }: SidebarCollapsibleControlProps): import("react/jsx-runtime").JSX.Element;
58
+ export declare function SidebarCollapsibleControl({ label, children, defaultCollapsed, className, contentClassName, style, tooltip, tooltipPlacement, docsPath, 'data-testid': testId, }: SidebarCollapsibleControlProps): import("react/jsx-runtime").JSX.Element;
47
59
  interface SidebarSelectProps {
48
60
  value: string;
49
61
  onChange: (value: string) => void;
@@ -71,10 +83,11 @@ interface SidebarCheckboxProps {
71
83
  label: string;
72
84
  /** Short tooltip shown on hover of the help icon */
73
85
  tooltip?: string;
86
+ tooltipPlacement?: 'left' | 'right';
74
87
  /** Docs path appended to https://sunpeak.ai/docs/ */
75
88
  docsPath?: string;
76
89
  }
77
- export declare function SidebarCheckbox({ checked, onChange, label, tooltip, docsPath, }: SidebarCheckboxProps): import("react/jsx-runtime").JSX.Element;
90
+ export declare function SidebarCheckbox({ checked, onChange, label, tooltip, tooltipPlacement, docsPath, }: SidebarCheckboxProps): import("react/jsx-runtime").JSX.Element;
78
91
  interface SidebarTextareaProps {
79
92
  value: string;
80
93
  onChange: (value: string) => void;
@@ -82,10 +95,11 @@ interface SidebarTextareaProps {
82
95
  onBlur?: () => void;
83
96
  placeholder?: string;
84
97
  maxRows?: number;
98
+ fill?: boolean;
85
99
  error?: string;
86
100
  'data-testid'?: string;
87
101
  }
88
- export declare function SidebarTextarea({ value, onChange, onFocus, onBlur, placeholder, maxRows, error, 'data-testid': testId, }: SidebarTextareaProps): import("react/jsx-runtime").JSX.Element;
102
+ export declare function SidebarTextarea({ value, onChange, onFocus, onBlur, placeholder, maxRows, fill, error, 'data-testid': testId, }: SidebarTextareaProps): import("react/jsx-runtime").JSX.Element;
89
103
  interface SidebarToggleProps {
90
104
  value: string;
91
105
  onChange: (value: string) => void;
@@ -23,6 +23,10 @@ export interface InspectorState {
23
23
  setActiveHost: (host: HostId) => void;
24
24
  screenWidth: ScreenWidth;
25
25
  setScreenWidth: (width: ScreenWidth) => void;
26
+ sidebarWidth: number;
27
+ setSidebarWidth: (width: number) => void;
28
+ rightSidebarWidth: number;
29
+ setRightSidebarWidth: (width: number) => void;
26
30
  theme: McpUiTheme;
27
31
  setTheme: (theme: McpUiTheme) => void;
28
32
  displayMode: McpUiDisplayMode;