@mcp-b/react-components 0.41.0 → 0.42.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.
Files changed (114) hide show
  1. package/dist/{ThinkChatActivity-DyGHj01E.d.ts → ThinkChatActivity-CsDql-ER.d.ts} +3 -0
  2. package/dist/{WorkspaceFileView-D0yFwoDr.js → WorkspaceFileView-DwdXiKku.js} +15 -20
  3. package/dist/components/agents-sdk/AgentActivity.js +3 -2
  4. package/dist/components/agents-sdk/AgentChat.js +1 -0
  5. package/dist/components/agents-sdk/BrowserRunPanel.js +2 -1
  6. package/dist/components/agents-sdk/ManagerOffice.d.ts +39 -27
  7. package/dist/components/agents-sdk/ManagerOffice.js +80 -44
  8. package/dist/components/agents-sdk/McpPluginCatalog.js +4 -2
  9. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  10. package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
  11. package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
  12. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  13. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  14. package/dist/components/agents-sdk/ThinkChatActivity.js +19 -5
  15. package/dist/components/agents-sdk/ThinkChatToolPanels.js +6 -2
  16. package/dist/components/agents-sdk/ThinkExecutionDetail.js +3 -1
  17. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -0
  18. package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -88
  19. package/dist/components/agents-sdk/ThinkFullApp.js +75 -124
  20. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
  21. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
  22. package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
  23. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +7 -6
  24. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +57 -65
  25. package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -1
  26. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -1
  27. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  28. package/dist/components/ai-sdk/MessageScroller.js +2 -1
  29. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -0
  30. package/dist/components/ai-sdk/PromptInput.js +20 -14
  31. package/dist/components/extension/ChatGptSignInScreen.js +1 -0
  32. package/dist/components/foundations/ToggleGroup.d.ts +79 -1
  33. package/dist/components/foundations/ToggleGroup.js +1 -1
  34. package/dist/components/foundations/Toolbar.d.ts +151 -1
  35. package/dist/components/general-purpose/AppFrame.js +1 -0
  36. package/dist/components/general-purpose/AppTopBar.d.ts +96 -1
  37. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  38. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  39. package/dist/components/general-purpose/ResizableSidePanel.d.ts +8 -0
  40. package/dist/components/general-purpose/ResizableSidePanel.js +3 -2
  41. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +59 -49
  42. package/dist/components/general-purpose/ResponsiveSidebarShell.js +74 -74
  43. package/dist/components/general-purpose/WebPreview.d.ts +3 -0
  44. package/dist/components/general-purpose/WebPreview.js +2 -2
  45. package/dist/components/nanites/AgentToolDetail.js +4 -3
  46. package/dist/styles/accordion.css +1 -0
  47. package/dist/styles/action-guide.css +8 -7
  48. package/dist/styles/activity-header.css +13 -39
  49. package/dist/styles/activity.css +40 -55
  50. package/dist/styles/agent-attention.css +14 -14
  51. package/dist/styles/agent-chat.css +62 -45
  52. package/dist/styles/agent-connection.css +10 -4
  53. package/dist/styles/agent-tool-detail.css +4 -4
  54. package/dist/styles/alert-dialog.css +4 -4
  55. package/dist/styles/app-frame.css +1 -3
  56. package/dist/styles/app-top-bar.css +5 -9
  57. package/dist/styles/approval.css +1 -0
  58. package/dist/styles/artifact.css +6 -6
  59. package/dist/styles/attachment-preview.css +5 -4
  60. package/dist/styles/browser-replay.css +6 -6
  61. package/dist/styles/browser-run-panel.css +1 -0
  62. package/dist/styles/button.css +15 -6
  63. package/dist/styles/card.css +5 -5
  64. package/dist/styles/chatgpt-sign-in-screen.css +1 -1
  65. package/dist/styles/code-block.css +14 -13
  66. package/dist/styles/codex-model-selector.css +2 -0
  67. package/dist/styles/collapsible.css +1 -0
  68. package/dist/styles/commit.css +6 -6
  69. package/dist/styles/context.css +9 -9
  70. package/dist/styles/conversation-tab-picker.css +1 -1
  71. package/dist/styles/conversation.css +6 -8
  72. package/dist/styles/dialog.css +4 -4
  73. package/dist/styles/empty-state.css +3 -3
  74. package/dist/styles/environment-variables.css +9 -9
  75. package/dist/styles/field.css +2 -1
  76. package/dist/styles/fieldset.css +2 -2
  77. package/dist/styles/index.css +3 -3
  78. package/dist/styles/manager-office.css +23 -29
  79. package/dist/styles/mcp-plugin-catalog.css +11 -10
  80. package/dist/styles/mcp-server-picker.css +3 -3
  81. package/dist/styles/message-scroller.css +9 -11
  82. package/dist/styles/message.css +43 -20
  83. package/dist/styles/navigation-menu.css +1 -0
  84. package/dist/styles/plan.css +13 -12
  85. package/dist/styles/pricing-page.css +26 -23
  86. package/dist/styles/prompt-input.css +18 -5
  87. package/dist/styles/queue.css +1 -0
  88. package/dist/styles/reasoning.css +1 -9
  89. package/dist/styles/recipes.css +28 -1
  90. package/dist/styles/responsive-sidebar-shell.css +44 -16
  91. package/dist/styles/separator.css +5 -5
  92. package/dist/styles/sources.css +4 -4
  93. package/dist/styles/stepper.css +1 -0
  94. package/dist/styles/streamdown.css +31 -21
  95. package/dist/styles/tabs.css +1 -0
  96. package/dist/styles/task.css +5 -17
  97. package/dist/styles/terminal.css +10 -10
  98. package/dist/styles/test-results.css +6 -6
  99. package/dist/styles/think-execution-status.css +2 -2
  100. package/dist/styles/think-execution-workbench.css +12 -15
  101. package/dist/styles/think-full-app.css +26 -64
  102. package/dist/styles/think-routine-library.css +26 -55
  103. package/dist/styles/think-thread-picker.css +9 -9
  104. package/dist/styles/utilities.css +33 -0
  105. package/dist/styles/web-preview.css +20 -19
  106. package/dist/styles/workspace-explorer.css +18 -21
  107. package/dist/styles/workspace-mount-manager.css +2 -2
  108. package/dist/utils/favicon.d.ts +6 -1
  109. package/dist/utils/favicon.js +18 -1
  110. package/package.json +2 -2
  111. package/dist/AppTopBar-ZdgmB_Lu.d.ts +0 -97
  112. package/dist/ToggleGroup-BrQZOQn_.d.ts +0 -80
  113. package/dist/Toolbar-CBOseBQr.d.ts +0 -152
  114. package/dist/{ThinkChat-BES_3Mb-.js → ThinkChat-DkA4Wr71.js} +1 -1
@@ -22,6 +22,13 @@ interface ResizableSidePanelRootProps extends React.HTMLAttributes<HTMLDivElemen
22
22
  collapseThreshold?: number;
23
23
  /** Called once pointer resizing crosses `collapseThreshold`. */
24
24
  onCollapse?: () => void;
25
+ /**
26
+ * Consumer-owned custom property mirroring the panel size, e.g.
27
+ * `--my-app-conversation-size`. Nested roots each write the shared
28
+ * `--resizable-side-panel-size` too, where the nearest writer wins; a named
29
+ * variable frees consumer stylesheets from that proximity rule.
30
+ */
31
+ sizeVariable?: `--${string}`;
25
32
  }
26
33
  interface ResizableSidePanelHandleProps extends Omit<SeparatorProps, "aria-label" | "aria-orientation" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "decorative" | "orientation"> {}
27
34
  /**
@@ -41,6 +48,7 @@ declare function ResizableSidePanelRoot({
41
48
  onCollapse,
42
49
  ref,
43
50
  side,
51
+ sizeVariable,
44
52
  style,
45
53
  ...props
46
54
  }: ResizableSidePanelRootProps & {
@@ -14,7 +14,7 @@ function panelSizeDelta(physicalDelta, side, direction) {
14
14
  * Shared sizing seam for a logical start- or end-side panel. Consumers retain
15
15
  * ownership of panel placement, visibility, compact behavior, and top bars.
16
16
  */
17
- function ResizableSidePanelRoot({ children, className, collapseThreshold, defaultSize, keyboardStep = 24, label, maxSize, minSize, onSizeChange, onCollapse, ref, side = "start", style, ...props }) {
17
+ function ResizableSidePanelRoot({ children, className, collapseThreshold, defaultSize, keyboardStep = 24, label, maxSize, minSize, onSizeChange, onCollapse, ref, side = "start", sizeVariable, style, ...props }) {
18
18
  const [size, setInnerSize] = React.useState(() => clamp(defaultSize, minSize, maxSize));
19
19
  const cleanupResizeRef = React.useRef(null);
20
20
  const setSize = React.useCallback((nextSize) => {
@@ -92,7 +92,8 @@ function ResizableSidePanelRoot({ children, className, collapseThreshold, defaul
92
92
  ]);
93
93
  const rootStyle = {
94
94
  ...style,
95
- "--resizable-side-panel-size": `${size}px`
95
+ "--resizable-side-panel-size": `${size}px`,
96
+ ...sizeVariable ? { [sizeVariable]: `${size}px` } : {}
96
97
  };
97
98
  return /* @__PURE__ */ jsx(ResizableSidePanelContext.Provider, {
98
99
  value: context,
@@ -1,4 +1,3 @@
1
- import { t as AppTopBar } from "../../AppTopBar-ZdgmB_Lu.js";
2
1
  import * as React from "react";
3
2
 
4
3
  //#region src/components/general-purpose/ResponsiveSidebarShell.d.ts
@@ -8,56 +7,74 @@ interface ResponsiveSidebarShellControls {
8
7
  /** Close only when the shell is currently using its compact drawer layout. */
9
8
  closeSidebarOnCompact: () => void;
10
9
  }
10
+ /**
11
+ * Bar slot content shared by every shell-owning surface's `bar` prop, so an
12
+ * app writes one shape whether it is configuring ThinkFullApp, the routine
13
+ * library, or the shell directly.
14
+ */
15
+ interface AppBarSlots {
16
+ /**
17
+ * App-owned route element rendered as a labelled back control. Back owns
18
+ * the leading slot the same way `leading` does: the shell's own sidebar
19
+ * toggle stands down and compact sidebars stay reachable through
20
+ * `compactTitleTrigger`.
21
+ */
22
+ back?: {
23
+ label: string;
24
+ link: React.ReactElement;
25
+ };
26
+ /** App-owned leading navigation that owns the leading slot at every width. */
27
+ leading?: React.ReactNode;
28
+ /** Compact-only navigation that replaces the drawer trigger without hiding the wide rail toggle. */
29
+ compactLeading?: React.ReactNode;
30
+ /** Bar title content. Hidden at compact widths when `compactTitleTrigger` stands in. */
31
+ title?: React.ReactNode;
32
+ /** Content placed in the bar's trailing group. */
33
+ actions?: React.ReactNode;
34
+ }
35
+ interface ResponsiveSidebarShellBar extends AppBarSlots {
36
+ /** Element the bar title renders into, e.g. `<h1 id={…}/>` for a labelled page. */
37
+ titleRender?: React.ReactElement<Record<string, unknown>>;
38
+ /**
39
+ * Label content for a compact-width drawer trigger that replaces the plain
40
+ * title and the icon toggle: the title itself becomes the control that opens
41
+ * the sidebar. The shell renders the button and the disclosure chevron.
42
+ */
43
+ compactTitleTrigger?: React.ReactNode;
44
+ /** Accessible name for the bar toolbar. Defaults to "Application controls". */
45
+ label?: string;
46
+ /** Class for the bar root, the owning surface's styling hook. */
47
+ className?: string;
48
+ /**
49
+ * No bar row at all — for content that brings its own application bar.
50
+ * Distinct from passing no slots: an empty shell with a sidebar still shows
51
+ * a bar carrying the toggle.
52
+ */
53
+ hidden?: boolean;
54
+ }
11
55
  interface ResponsiveSidebarShellProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "title"> {
12
56
  /**
13
57
  * Navigation or other secondary surface shown beside the selected content.
14
58
  * Omit for a shell that is only a bar row over content — the app bar then
15
59
  * has one mount point whether or not a sidebar exists.
60
+ *
61
+ * Open/closed is shell-internal: it is ephemeral presentation state, not a
62
+ * route, so no host controls it and no resize ever writes into a router.
16
63
  */
17
64
  sidebar?: React.ReactNode | ((controls: ResponsiveSidebarShellControls) => React.ReactNode);
18
65
  /** Main content. */
19
66
  children?: React.ReactNode;
20
67
  /** Short noun used by the toggle and resize control, such as “threads” or “schedules”. */
21
68
  sidebarLabel?: string;
22
- /** Whether the sidebar is open. Omit for internal state. */
23
- sidebarOpen?: boolean;
24
- /** Initial sidebar state when `sidebarOpen` is uncontrolled. */
25
- defaultSidebarOpen?: boolean;
26
69
  /** Initial desktop sidebar width in CSS pixels. */
27
70
  defaultSidebarWidth?: number;
28
- /** Called when the sidebar is opened or closed. */
29
- onSidebarOpenChange?: (open: boolean) => void;
30
- /**
31
- * No bar row at all — for content that brings its own application bar.
32
- * Distinct from passing no slots: an empty shell with a sidebar still shows
33
- * a bar carrying the toggle.
34
- */
35
- topBarHidden?: boolean;
36
- /** Props for the shell-owned bar root: `aria-label`, `className`, data hooks. */
37
- topBarProps?: React.ComponentProps<typeof AppTopBar.Root> & {
38
- [dataAttribute: `data-${string}`]: string | undefined;
39
- };
40
- /**
41
- * App-owned leading navigation. When present it owns the single leading
42
- * slot instead of sitting beside a second shell toggle; wide sidebars use
43
- * their responsive default and compact sidebars remain available through
44
- * `compactTitleTrigger`.
45
- */
46
- topBarLeading?: React.ReactNode;
47
- /** Compact-only navigation that replaces the drawer trigger without hiding the wide rail toggle. */
48
- compactTopBarLeading?: React.ReactNode;
49
- /** Bar title content. Hidden at compact widths when `compactTitleTrigger` stands in. */
50
- topBarTitle?: React.ReactNode;
51
- /** Element the bar title renders into, e.g. `<h1 id={…}/>` for a labelled page. */
52
- topBarTitleRender?: React.ReactElement<Record<string, unknown>>;
53
- /** Content placed in the bar's trailing group. */
54
- topBarTrailing?: React.ReactNode;
71
+ /** Shell-owned application bar composed from slots. */
72
+ bar?: ResponsiveSidebarShellBar;
55
73
  /**
56
- * Label content for a compact-width drawer trigger that replaces the plain
57
- * title and the icon toggle: the title itself becomes the control that opens
58
- * the sidebar. The shell renders the button and the disclosure chevron.
74
+ * Host-owned error shown in the main column above the content, without
75
+ * replacing it. The shell renders the alert anatomy; pass the message.
59
76
  */
60
- compactTitleTrigger?: React.ReactNode;
77
+ error?: React.ReactNode;
61
78
  /** Accessible name for the mobile peek target that returns to the main content. */
62
79
  showMainLabel?: string;
63
80
  }
@@ -65,23 +82,16 @@ interface ResponsiveSidebarShellProps extends Omit<React.HTMLAttributes<HTMLDivE
65
82
  * The one application shell: responsive master-detail with a resizable desktop
66
83
  * sidebar, a compact floating drawer that leaves the main content in place as
67
84
  * a dismiss target, and a shell-owned application bar composed from slots.
68
- * The root exposes `data-sidebar-open="true" | "false"` as its public styling hook.
85
+ * The root exposes `data-sidebar-open="true" | "false"` as its public styling
86
+ * hook, and its container name `responsive-sidebar-shell` is public contract:
87
+ * surfaces that compose the shell size themselves against it.
69
88
  */
70
89
  declare function ResponsiveSidebarShell({
71
90
  sidebar,
72
91
  sidebarLabel,
73
- sidebarOpen,
74
- defaultSidebarOpen,
75
92
  defaultSidebarWidth,
76
- onSidebarOpenChange,
77
- topBarHidden,
78
- topBarProps,
79
- topBarLeading,
80
- compactTopBarLeading,
81
- topBarTitle,
82
- topBarTitleRender,
83
- topBarTrailing,
84
- compactTitleTrigger,
93
+ bar,
94
+ error,
85
95
  showMainLabel,
86
96
  className,
87
97
  children,
@@ -92,4 +102,4 @@ declare function ResponsiveSidebarShell({
92
102
  ref?: React.Ref<HTMLDivElement>;
93
103
  }): React.JSX.Element;
94
104
  //#endregion
95
- export { ResponsiveSidebarShell, ResponsiveSidebarShellControls, ResponsiveSidebarShellProps };
105
+ export { AppBarSlots, ResponsiveSidebarShell, ResponsiveSidebarShellBar, ResponsiveSidebarShellControls, ResponsiveSidebarShellProps };
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { W as SidebarIcon, f as ChevronDownIcon } from "../../icons-CVFSeTJn.js";
2
+ import { $ as WarningIcon, W as SidebarIcon, f as ChevronDownIcon, r as ArrowLeftIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { t as capitalize } from "../../format-DB2mX9DA.js";
5
5
  import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
@@ -8,22 +8,13 @@ import { ResizableSidePanel } from "./ResizableSidePanel.js";
8
8
  import * as React from "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/components/general-purpose/ResponsiveSidebarShell.tsx
11
+ /** Matches --sigvelo-layout-sidebar (16rem). */
11
12
  const sidebarDefaultWidth = 256;
12
13
  const sidebarMinWidth = 224;
13
14
  const sidebarMaxWidth = 384;
14
15
  const sidebarKeyboardStep = 24;
16
+ /** Matches --sigvelo-layout-break-compact. */
15
17
  const compactSidebarWidthRem = 56;
16
- function useControllableSidebar({ sidebarOpen, defaultSidebarOpen, onSidebarOpenChange }) {
17
- const [innerOpen, setInnerOpen] = React.useState(defaultSidebarOpen ?? true);
18
- return [
19
- sidebarOpen ?? innerOpen,
20
- React.useCallback((next) => {
21
- if (sidebarOpen === void 0) setInnerOpen(next);
22
- onSidebarOpenChange?.(next);
23
- }, [sidebarOpen, onSidebarOpenChange]),
24
- setInnerOpen
25
- ];
26
- }
27
18
  function isCompactSidebar(root) {
28
19
  const rootFontSize = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
29
20
  return root.offsetWidth <= compactSidebarWidthRem * rootFontSize;
@@ -32,21 +23,18 @@ function isCompactSidebar(root) {
32
23
  * The one application shell: responsive master-detail with a resizable desktop
33
24
  * sidebar, a compact floating drawer that leaves the main content in place as
34
25
  * a dismiss target, and a shell-owned application bar composed from slots.
35
- * The root exposes `data-sidebar-open="true" | "false"` as its public styling hook.
26
+ * The root exposes `data-sidebar-open="true" | "false"` as its public styling
27
+ * hook, and its container name `responsive-sidebar-shell` is public contract:
28
+ * surfaces that compose the shell size themselves against it.
36
29
  */
37
- function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen, defaultSidebarOpen, defaultSidebarWidth = sidebarDefaultWidth, onSidebarOpenChange, topBarHidden = false, topBarProps, topBarLeading, compactTopBarLeading, topBarTitle, topBarTitleRender, topBarTrailing, compactTitleTrigger, showMainLabel = "Show main content", className, children, ref, style, ...props }) {
30
+ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", defaultSidebarWidth = sidebarDefaultWidth, bar, error, showMainLabel = "Show main content", className, children, ref, style, ...props }) {
38
31
  const sidebarId = React.useId();
39
32
  const rootRef = React.useRef(null);
40
33
  const mainRef = React.useRef(null);
41
34
  const openerRef = React.useRef(null);
42
35
  const compactRef = React.useRef(null);
43
36
  const restoreSidebarOnWideRef = React.useRef(true);
44
- const [isSidebarOpen, setSidebarOpen, primeSidebarOpen] = useControllableSidebar({
45
- sidebarOpen,
46
- defaultSidebarOpen,
47
- onSidebarOpenChange
48
- });
49
- const wantsBuiltInDefault = sidebarOpen === void 0 && defaultSidebarOpen === void 0;
37
+ const [isSidebarOpen, setSidebarOpen] = React.useState(true);
50
38
  React.useLayoutEffect(() => {
51
39
  const root = rootRef.current;
52
40
  if (!root) return;
@@ -56,7 +44,7 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
56
44
  const wasCompact = compactRef.current;
57
45
  compactRef.current = compact;
58
46
  if (wasCompact === null) {
59
- if (wantsBuiltInDefault && compact) primeSidebarOpen(false);
47
+ if (compact) setSidebarOpen(false);
60
48
  return;
61
49
  }
62
50
  if (!wasCompact && compact) {
@@ -69,12 +57,7 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
69
57
  const observer = new ResizeObserver(syncLayout);
70
58
  observer.observe(root);
71
59
  return () => observer.disconnect();
72
- }, [
73
- isSidebarOpen,
74
- primeSidebarOpen,
75
- setSidebarOpen,
76
- wantsBuiltInDefault
77
- ]);
60
+ }, [isSidebarOpen]);
78
61
  const hasSidebar = sidebar != null;
79
62
  const toggleLabel = capitalize(sidebarLabel);
80
63
  const toggleTooltip = `${isSidebarOpen ? "Hide" : "Show"} ${sidebarLabel}`;
@@ -84,40 +67,29 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
84
67
  }, []);
85
68
  const closeSidebar = React.useCallback(() => {
86
69
  updateSidebar(() => setSidebarOpen(false), () => mainRef.current?.focus({ preventScroll: true }));
87
- }, [setSidebarOpen, updateSidebar]);
70
+ }, [updateSidebar]);
88
71
  const closeSidebarOnCompact = React.useCallback(() => {
89
72
  if (rootRef.current && isCompactSidebar(rootRef.current)) closeSidebar();
90
73
  }, [closeSidebar]);
91
74
  const toggleSidebar = React.useCallback((trigger) => {
92
75
  if (trigger) openerRef.current = trigger;
93
76
  updateSidebar(() => setSidebarOpen(!isSidebarOpen));
94
- }, [
95
- isSidebarOpen,
96
- setSidebarOpen,
97
- updateSidebar
98
- ]);
77
+ }, [isSidebarOpen, updateSidebar]);
99
78
  const dismissSidebar = React.useCallback(() => {
100
79
  updateSidebar(() => setSidebarOpen(false), () => openerRef.current?.focus({ preventScroll: true }));
101
- }, [setSidebarOpen, updateSidebar]);
80
+ }, [updateSidebar]);
102
81
  const sidebarContent = typeof sidebar === "function" ? sidebar({
103
82
  closeSidebar,
104
83
  closeSidebarOnCompact
105
84
  }) : sidebar;
106
- const hasTitleTrigger = hasSidebar && compactTitleTrigger != null && compactTopBarLeading == null;
107
- const renderSidebarToggle = (className) => hasSidebar ? /* @__PURE__ */ jsx(AppTopBar.Button, {
108
- className: cx("responsive-sidebar-shell__toggle", className),
109
- label: toggleLabel,
110
- tooltip: toggleTooltip,
111
- type: "button",
112
- "aria-controls": sidebarId,
113
- "aria-expanded": isSidebarOpen,
114
- onClick: (event) => toggleSidebar(event.currentTarget),
115
- children: /* @__PURE__ */ jsx(SidebarIcon, {})
116
- }) : null;
117
- const hasTopBar = !topBarHidden && (hasSidebar || topBarLeading != null || compactTopBarLeading != null || topBarTitle != null || topBarTrailing != null || topBarProps != null);
85
+ const hasAppLeading = bar?.back != null || bar?.leading != null;
86
+ const hasTitleTrigger = hasSidebar && bar?.compactTitleTrigger != null && bar?.compactLeading == null;
87
+ const hasTopBar = !bar?.hidden && (hasSidebar || bar?.back != null || bar?.leading != null || bar?.compactLeading != null || bar?.title != null || bar?.actions != null);
88
+ const compactLeadingMode = hasTitleTrigger ? "trigger" : !hasAppLeading && bar?.compactLeading != null ? "custom" : void 0;
118
89
  return /* @__PURE__ */ jsx("div", {
119
90
  ref: mergeRefs(rootRef, ref),
120
91
  className: cx("responsive-sidebar-shell", className),
92
+ "data-recipe": "fill-host",
121
93
  style,
122
94
  ...props,
123
95
  "data-sidebar-open": hasSidebar && isSidebarOpen ? "true" : "false",
@@ -132,6 +104,7 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
132
104
  className: "responsive-sidebar-shell__frame",
133
105
  label: sidebarLabel,
134
106
  side: "start",
107
+ sizeVariable: "--responsive-sidebar-shell-sidebar-size",
135
108
  defaultSize: defaultSidebarWidth,
136
109
  minSize: sidebarMinWidth,
137
110
  maxSize: sidebarMaxWidth,
@@ -149,34 +122,61 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", sidebarOpen
149
122
  ref: mainRef,
150
123
  className: "responsive-sidebar-shell__main",
151
124
  tabIndex: -1,
152
- children: [hasTopBar ? /* @__PURE__ */ jsxs(AppTopBar.Root, {
153
- "aria-label": "Application controls",
154
- ...topBarProps,
155
- children: [
156
- hasSidebar || topBarLeading != null || compactTopBarLeading != null ? /* @__PURE__ */ jsxs(AppTopBar.Leading, { children: [topBarLeading ?? renderSidebarToggle(hasTitleTrigger ? "responsive-sidebar-shell__toggle--replaced-by-title" : compactTopBarLeading != null ? "responsive-sidebar-shell__toggle--replaced-by-compact-leading" : void 0), topBarLeading == null && compactTopBarLeading != null ? /* @__PURE__ */ jsx("span", {
157
- className: "responsive-sidebar-shell__compact-leading",
158
- children: compactTopBarLeading
159
- }) : null] }) : null,
160
- topBarTitle != null || hasTitleTrigger ? /* @__PURE__ */ jsxs(AppTopBar.Title, {
161
- render: topBarTitleRender,
162
- children: [topBarTitle != null ? /* @__PURE__ */ jsx("span", {
163
- className: cx("responsive-sidebar-shell__title-text", hasTitleTrigger && "responsive-sidebar-shell__title-text--replaced-by-trigger"),
164
- children: topBarTitle
165
- }) : null, hasTitleTrigger ? /* @__PURE__ */ jsxs(Button, {
166
- type: "button",
167
- variant: "ghost",
168
- color: "neutral",
169
- size: "sm",
170
- className: "responsive-sidebar-shell__title-trigger",
171
- "aria-controls": sidebarId,
172
- "aria-expanded": isSidebarOpen,
173
- onClick: (event) => toggleSidebar(event.currentTarget),
174
- children: [compactTitleTrigger, /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
175
- }) : null]
176
- }) : null,
177
- topBarTrailing != null ? /* @__PURE__ */ jsx(AppTopBar.Trailing, { children: topBarTrailing }) : null
178
- ]
179
- }) : null, children]
125
+ children: [
126
+ hasTopBar ? /* @__PURE__ */ jsxs(AppTopBar.Root, {
127
+ "aria-label": bar?.label ?? "Application controls",
128
+ className: bar?.className,
129
+ "data-compact-leading": compactLeadingMode,
130
+ children: [
131
+ hasSidebar || hasAppLeading || bar?.compactLeading != null ? /* @__PURE__ */ jsxs(AppTopBar.Leading, { children: [
132
+ bar?.back ? /* @__PURE__ */ jsx(AppTopBar.Link, {
133
+ label: bar.back.label,
134
+ render: bar.back.link,
135
+ children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
136
+ }) : null,
137
+ bar?.leading,
138
+ !hasAppLeading && hasSidebar ? /* @__PURE__ */ jsx(AppTopBar.Button, {
139
+ className: "responsive-sidebar-shell__toggle",
140
+ label: toggleLabel,
141
+ tooltip: toggleTooltip,
142
+ type: "button",
143
+ "aria-controls": sidebarId,
144
+ "aria-expanded": isSidebarOpen,
145
+ onClick: (event) => toggleSidebar(event.currentTarget),
146
+ children: /* @__PURE__ */ jsx(SidebarIcon, {})
147
+ }) : null,
148
+ compactLeadingMode === "custom" ? /* @__PURE__ */ jsx("span", {
149
+ className: "responsive-sidebar-shell__compact-leading",
150
+ children: bar?.compactLeading
151
+ }) : null
152
+ ] }) : null,
153
+ bar?.title != null || hasTitleTrigger ? /* @__PURE__ */ jsxs(AppTopBar.Title, {
154
+ render: bar?.titleRender,
155
+ children: [bar?.title != null ? /* @__PURE__ */ jsx("span", {
156
+ className: "responsive-sidebar-shell__title-text",
157
+ children: bar.title
158
+ }) : null, hasTitleTrigger ? /* @__PURE__ */ jsxs(Button, {
159
+ type: "button",
160
+ variant: "ghost",
161
+ color: "neutral",
162
+ size: "sm",
163
+ className: "responsive-sidebar-shell__title-trigger",
164
+ "aria-controls": sidebarId,
165
+ "aria-expanded": isSidebarOpen,
166
+ onClick: (event) => toggleSidebar(event.currentTarget),
167
+ children: [bar?.compactTitleTrigger, /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
168
+ }) : null]
169
+ }) : null,
170
+ bar?.actions != null ? /* @__PURE__ */ jsx(AppTopBar.Trailing, { children: bar.actions }) : null
171
+ ]
172
+ }) : null,
173
+ error != null ? /* @__PURE__ */ jsxs("div", {
174
+ className: "responsive-sidebar-shell__error",
175
+ role: "alert",
176
+ children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: error })]
177
+ }) : null,
178
+ children
179
+ ]
180
180
  }),
181
181
  hasSidebar && isSidebarOpen ? /* @__PURE__ */ jsx(Button, {
182
182
  type: "button",
@@ -25,6 +25,8 @@ interface WebPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
25
25
  className?: string;
26
26
  /** Navigation, body, and optional console slots. */
27
27
  children?: React.ReactNode;
28
+ /** Extra recipes composed with the framed-panel contract. */
29
+ "data-recipe"?: string;
28
30
  }
29
31
  /**
30
32
  * An iframe preview with a navigation bar, URL input, and optional console
@@ -64,6 +66,7 @@ declare function WebPreview({
64
66
  onUrlChange,
65
67
  children,
66
68
  ref,
69
+ "data-recipe": recipe,
67
70
  ...props
68
71
  }: WebPreviewProps & {
69
72
  ref?: React.Ref<HTMLDivElement>;
@@ -44,7 +44,7 @@ function useWebPreviewContext() {
44
44
  * </WebPreview>
45
45
  * ```
46
46
  */
47
- function WebPreview({ className, defaultUrl = "", url: controlledUrl, onUrlChange, children, ref, ...props }) {
47
+ function WebPreview({ className, defaultUrl = "", url: controlledUrl, onUrlChange, children, ref, "data-recipe": recipe, ...props }) {
48
48
  const [navigation, setNavigation] = React.useState(() => ({
49
49
  history: defaultUrl ? [defaultUrl] : [],
50
50
  index: defaultUrl ? 0 : -1
@@ -126,7 +126,7 @@ function WebPreview({ className, defaultUrl = "", url: controlledUrl, onUrlChang
126
126
  ref,
127
127
  className: cx("web-preview", className),
128
128
  ...props,
129
- "data-recipe": "framed-panel",
129
+ "data-recipe": cx("framed-panel", recipe),
130
130
  children
131
131
  })
132
132
  });
@@ -2,10 +2,10 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { r as ArrowLeftIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { TransitionSurface } from "../foundations/TransitionSurface.js";
4
4
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
5
- import { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress } from "../agents-sdk/SubagentRunDetails.js";
6
- import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
7
5
  import { NaniteMark } from "./NaniteScene.js";
8
- import { t as ThinkChat } from "../../ThinkChat-BES_3Mb-.js";
6
+ import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
7
+ import { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress } from "../agents-sdk/SubagentRunDetails.js";
8
+ import { t as ThinkChat } from "../../ThinkChat-DkA4Wr71.js";
9
9
  import * as React from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  import { useAgentChat } from "@cloudflare/think/react";
@@ -29,6 +29,7 @@ function AgentToolDetail({ actions, backLink, chat, className, messages, ref, ru
29
29
  "data-slot": "agent-tool-detail",
30
30
  className: cx("agent-tool-detail", className),
31
31
  ...props,
32
+ "data-recipe": "fill-host",
32
33
  children: [
33
34
  /* @__PURE__ */ jsxs(AppTopBar.Root, {
34
35
  titleAlign: "start",
@@ -62,6 +62,7 @@
62
62
  }
63
63
 
64
64
  .accordion__panel > * {
65
+ /* Disclosure content, not --sigvelo-layout-stack. */
65
66
  padding-block-end: var(--sigvelo-spacing-4);
66
67
  padding-inline: var(--sigvelo-recipe-control-padding-inline);
67
68
  }
@@ -3,13 +3,13 @@
3
3
  display: grid;
4
4
  gap: var(--sigvelo-spacing-8);
5
5
  inline-size: 100%;
6
- padding: var(--sigvelo-spacing-2) var(--sigvelo-spacing-2) var(--sigvelo-spacing-8);
6
+ padding: var(--sigvelo-layout-cluster) var(--sigvelo-layout-gutter) var(--sigvelo-spacing-8);
7
7
  color: var(--sigvelo-color-text);
8
8
  }
9
9
 
10
10
  .action-guide__header {
11
11
  display: grid;
12
- gap: var(--sigvelo-spacing-4);
12
+ gap: var(--sigvelo-layout-stack);
13
13
  }
14
14
 
15
15
  .action-guide__title,
@@ -32,13 +32,13 @@
32
32
 
33
33
  .action-guide__section {
34
34
  display: grid;
35
- gap: var(--sigvelo-spacing-4);
35
+ gap: var(--sigvelo-layout-stack);
36
36
  }
37
37
 
38
38
  .action-guide__list {
39
39
  display: grid;
40
- grid-template-columns: minmax(0, 1fr);
41
- gap: var(--sigvelo-spacing-3);
40
+ grid-template-columns: var(--sigvelo-layout-track-fill);
41
+ gap: var(--sigvelo-layout-gutter);
42
42
  margin: 0;
43
43
  padding: 0;
44
44
  list-style: none;
@@ -115,9 +115,10 @@
115
115
  border-radius: var(--sigvelo-radius-lg);
116
116
  }
117
117
 
118
- @container action-guide (width > 30rem) {
118
+ /* Local wrap. Not --sigvelo-layout-break-compact. */
119
+ @container action-guide (inline-size > 30rem) {
119
120
  .action-guide__list[data-layout="cards"] {
120
- grid-template-columns: repeat(2, minmax(0, 1fr));
121
+ grid-template-columns: repeat(2, var(--sigvelo-layout-track-fill));
121
122
  }
122
123
  }
123
124
 
@@ -1,58 +1,32 @@
1
1
  .activity__header {
2
2
  display: flex;
3
- width: 100%;
4
- min-width: 0;
3
+ inline-size: 100%;
4
+ min-inline-size: 0;
5
5
  align-items: center;
6
6
  gap: var(--sigvelo-spacing-1-5);
7
- color: color-mix(in oklab, var(--sigvelo-color-text-muted), transparent 20%);
7
+ color: inherit;
8
8
  font-family: inherit;
9
- font-size: var(--sigvelo-text-compact);
10
- font-weight: var(--sigvelo-font-weight-semibold);
9
+ font-size: var(--sigvelo-text-prose);
10
+ font-weight: var(--sigvelo-font-weight-normal);
11
+ line-height: var(--sigvelo-text-prose-leading);
11
12
  text-align: start;
12
13
  }
13
14
 
14
- /*
15
- * The action holds its content width and the detail absorbs whatever is left,
16
- * so the two shrink in the right order: a long path loses its tail while
17
- * "Reading" stays legible. Basis 0 on the detail is what makes it the flexible
18
- * one; the trailing affordance stays adjacent until the width is exhausted.
19
- *
20
- * With no detail present the action is the only flexible item, so a settled
21
- * summary sentence still truncates rather than inflating its owner.
22
- */
15
+ /* Action keeps its content width; the detail takes the leftover track. */
23
16
  .activity__header-action {
24
17
  flex: 0 1 auto;
25
- min-width: 0;
26
- max-width: max-content;
27
- overflow: hidden;
28
- color: var(--sigvelo-color-text);
29
- text-overflow: ellipsis;
30
- white-space: nowrap;
18
+ min-inline-size: 0;
19
+ color: inherit;
20
+ overflow-wrap: anywhere;
31
21
  }
32
22
 
33
- /*
34
- * The target of the action — a path, a command, a query. Muted, because in a
35
- * column of activity lines the verb is what the reader scans for.
36
- *
37
- * Faded rather than ellipsed: this is data, and a trailing "…" reads as part of
38
- * the value it is truncating.
39
- *
40
- * The fade is unconditional because it does not need a condition. Growing to
41
- * fill the free space means the box is wider than short text, so the gradient
42
- * lands on empty space and only bites once the text actually reaches the edge.
43
- */
23
+ /* Path, command, or query. Muted so the verb stays the scan target. */
44
24
  .activity__header-detail {
45
25
  flex: 1 1 0;
46
- min-width: 0;
47
- overflow: hidden;
26
+ min-inline-size: 0;
48
27
  color: var(--sigvelo-color-text-muted);
49
28
  font-weight: var(--sigvelo-font-weight-normal);
50
- white-space: nowrap;
51
- mask-image: linear-gradient(
52
- to right,
53
- #000 calc(100% - var(--sigvelo-spacing-4)),
54
- transparent 100%
55
- );
29
+ overflow-wrap: anywhere;
56
30
  }
57
31
 
58
32
  .activity__item-icon {