@mcp-b/react-components 0.42.0 → 0.43.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 (50) hide show
  1. package/dist/{AgentChat-DVr2giwD.d.ts → AgentChat-Bibfj7u1.d.ts} +1 -1
  2. package/dist/{AgentChatStartScreen-CO49yepa.d.ts → AgentChatStartScreen-Bkv7Avni.d.ts} +6 -0
  3. package/dist/McpPluginCatalog-mbGw8FTu.d.ts +92 -0
  4. package/dist/ResponsiveSidebarShell-DOXd5T-d.d.ts +111 -0
  5. package/dist/SetupChecklist-H1JRCIIe.js +77 -0
  6. package/dist/{ThinkChatActivity-CsDql-ER.d.ts → ThinkChatActivity-CgvmTXXB.d.ts} +1 -1
  7. package/dist/Workspace-F3raHdYV.d.ts +140 -0
  8. package/dist/{WorkspaceFileView-DwdXiKku.js → WorkspaceFileView-DWMKxX_u.js} +0 -1
  9. package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
  10. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  11. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -91
  12. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  13. package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
  14. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  15. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  16. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  17. package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
  18. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  19. package/dist/components/agents-sdk/ThinkFullApp.d.ts +20 -6
  20. package/dist/components/agents-sdk/ThinkFullApp.js +6 -5
  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 +4 -3
  24. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +17 -31
  25. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +173 -0
  26. package/dist/components/agents-sdk/ThinkSidepanel.js +656 -0
  27. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +4 -5
  28. package/dist/components/agents-sdk/ThinkThreadPicker.js +6 -6
  29. package/dist/components/agents-sdk/Workspace.d.ts +1 -139
  30. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  31. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  32. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
  33. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  34. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  35. package/dist/components/ai-sdk/AgentChatStartScreen.js +5 -2
  36. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  37. package/dist/components/foundations/ToggleGroup.js +1 -1
  38. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  39. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  40. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -104
  41. package/dist/components/general-purpose/ResponsiveSidebarShell.js +2 -2
  42. package/dist/components/general-purpose/SetupChecklist.js +1 -76
  43. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  44. package/dist/components/nanites/AgentToolDetail.js +3 -3
  45. package/dist/styles/agent-chat.css +20 -15
  46. package/dist/styles/index.css +1 -0
  47. package/dist/styles/responsive-sidebar-shell.css +12 -9
  48. package/dist/styles/think-sidepanel.css +74 -0
  49. package/package.json +2 -2
  50. package/dist/{ThinkChat-DkA4Wr71.js → ThinkChat-BES_3Mb-.js} +1 -1
@@ -4,9 +4,10 @@ import { Button, buttonVariants } from "../foundations/Button.js";
4
4
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
5
5
  import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
6
6
  import { ScrollArea } from "../foundations/ScrollArea.js";
7
- import { AlertDialog } from "../foundations/AlertDialog.js";
8
7
  import { EmptyState } from "../foundations/EmptyState.js";
8
+ import { LinkButton } from "../foundations/LinkButton.js";
9
9
  import { SearchField } from "../foundations/SearchField.js";
10
+ import { AlertDialog } from "../foundations/AlertDialog.js";
10
11
  import * as React from "react";
11
12
  import { jsx, jsxs } from "react/jsx-runtime";
12
13
  //#region src/components/agents-sdk/ThinkThreadPicker.tsx
@@ -108,7 +109,7 @@ function ThinkThreadStatusIndicators({ summary, className }) {
108
109
  * notes beside the parent Think agent because
109
110
  * `listThreads()`/`createThread()`/`deleteThread()` are app-owned.
110
111
  */
111
- function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onSelect, onDelete, className, title = "Recents", "aria-label": ariaLabel = "Threads", ref, ...props }) {
112
+ function ThinkThreadPicker({ threads, renderThreadLink, createThreadLink, onSelect, onDelete, className, title = "Recents", "aria-label": ariaLabel = "Threads", ref, ...props }) {
112
113
  const statusSummary = summarizeThinkThreads(threads);
113
114
  const [query, setQuery] = React.useState("");
114
115
  const [deleteOpen, setDeleteOpen] = React.useState(false);
@@ -258,16 +259,15 @@ function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onSelect, onDe
258
259
  })]
259
260
  })
260
261
  }),
261
- onCreate ? /* @__PURE__ */ jsx("div", {
262
+ createThreadLink ? /* @__PURE__ */ jsx("div", {
262
263
  className: "think-thread-picker__footer",
263
- children: /* @__PURE__ */ jsxs(Button, {
264
+ children: /* @__PURE__ */ jsxs(LinkButton, {
264
265
  ref: createButtonRef,
265
- type: "button",
266
266
  variant: "normal",
267
267
  color: "neutral",
268
268
  size: "sm",
269
269
  className: "think-thread-picker__create",
270
- onClick: () => void onCreate(),
270
+ render: createThreadLink,
271
271
  children: [/* @__PURE__ */ jsx(PlusIcon, {}), /* @__PURE__ */ jsx("span", { children: "New thread" })]
272
272
  })
273
273
  }) : null,
@@ -1,140 +1,2 @@
1
- import { a as WorkspaceMediaInfo, i as WorkspaceFileState, r as WorkspaceFileAssetResolver, t as WorkspaceFileAsset } from "../../WorkspaceFile-BLaFmMrt.js";
2
- import { DataTag, QueryKey, UnusedSkipTokenOptions } from "@tanstack/react-query";
3
- import { WorkspaceLike } from "@cloudflare/think";
4
- import { FileInfo, Workspace } from "@cloudflare/shell";
5
-
6
- //#region src/components/agents-sdk/Workspace.d.ts
7
- /** Workspace summary, as returned by `Workspace.getWorkspaceInfo()` upstream. */
8
- type WorkspaceInfo = Awaited<ReturnType<Workspace["getWorkspaceInfo"]>>;
9
- /** Whole upstream workspace shapes, accepted without narrowing or mirroring. */
10
- type WorkspaceSource = Workspace | WorkspaceLike;
11
- interface UseWorkspaceOptions {
12
- /** Must be referentially stable (memoize in the app). */
13
- source: WorkspaceSource;
14
- /**
15
- * Stable, non-secret identity for the endpoint/account/tenant/workspace
16
- * behind `source`. Change it whenever that backing workspace changes.
17
- */
18
- sourceKey: string;
19
- /** Root directory to list first. Defaults to "/". */
20
- root?: string;
21
- /** Route-owned selected file path. */
22
- selectedPath: string | null;
23
- /** Called when a non-link browser asks the app to select a file. */
24
- onSelectedPathChange?: (path: string | null) => void;
25
- /**
26
- * Optional host adapter called before text/binary reads. Return `null` for
27
- * ordinary text files and prefer signed/range-friendly URLs for large media.
28
- * The configured root scopes navigation; hosts must enforce authorization
29
- * atomically when resolving assets across a trust boundary.
30
- * Keep this resolver semantically stable for a given `sourceKey`; function
31
- * identity is intentionally excluded from serializable query keys.
32
- */
33
- resolveFileAsset?: WorkspaceFileAssetResolver;
34
- /** Maximum size for the built-in buffered-byte fallback. Defaults to 32 MiB. */
35
- maxInlineAssetBytes?: number;
36
- }
37
- interface WorkspaceState {
38
- root: string;
39
- /** Loaded directory listings, keyed by directory path. */
40
- entriesByDirectory: Readonly<Record<string, readonly FileInfo[]>>;
41
- /** Every loaded entry, keyed by its path. */
42
- entryByPath: ReadonlyMap<string, FileInfo>;
43
- expandedPaths: ReadonlySet<string>;
44
- /** Update expansion; newly expanded directories load lazily. */
45
- setExpandedPaths: (next: Set<string>) => void;
46
- selectedPath: string | null;
47
- /** Ask the route owner to select a file. */
48
- selectFile: (path: string | null) => void;
49
- /** The selected file once its read settles; null while loading. */
50
- selectedFile: WorkspaceFileState | null;
51
- /** Initial root/info load or explicit refresh in flight. */
52
- isLoading: boolean;
53
- /** Directory and file paths with a query in flight. */
54
- loadingPaths: ReadonlySet<string>;
55
- /** Root/directory listing failure. Per-file read errors live on the file state. */
56
- error: string | null;
57
- /** Workspace summary, when the source provides `getWorkspaceInfo`. */
58
- info: WorkspaceInfo | null;
59
- /** Reload the root, every expanded directory, and the selected file. */
60
- refresh: () => void;
61
- }
62
- interface WorkspaceFileReadTarget {
63
- requestedPath: string;
64
- readPath: string;
65
- info: FileInfo;
66
- media: WorkspaceMediaInfo | null;
67
- }
68
- interface WorkspaceResolvedAsset {
69
- asset: WorkspaceFileAsset;
70
- media: WorkspaceMediaInfo;
71
- }
72
- type WorkspaceQueryOptions<TData, TQueryKey extends QueryKey> = UnusedSkipTokenOptions<TData, Error, TData, TQueryKey> & {
73
- queryKey: DataTag<TQueryKey, TData, Error>;
74
- };
75
- /**
76
- * Source/root prefix for cache inspection, cancellation, or removal.
77
- * Do not broadly invalidate this prefix: active file queries must refresh in
78
- * stat → resolver → content order. Use a resource option key or `refresh()`.
79
- */
80
- declare function workspaceQueryKey(sourceKey: string, root: string): readonly ["workspace", string, string];
81
- type WorkspaceQueryKey = ReturnType<typeof workspaceQueryKey>;
82
- /** Directory-listing prefix for targeted cache invalidation. */
83
- declare function workspaceDirectoryQueryPrefix(sourceKey: string, root: string): readonly ["workspace", string, string, "directory"];
84
- /** Exact directory-listing key shared by query options and live hosts. */
85
- declare function workspaceDirectoryQueryKey(sourceKey: string, root: string, path: string): readonly ["workspace", string, string, "directory", string];
86
- type WorkspaceDirectoryQueryKey = ReturnType<typeof workspaceDirectoryQueryKey>;
87
- declare function workspaceFileQueryKey(sourceKey: string, root: string, requestedPath: string): readonly ["workspace", string, string, "file", string];
88
- type WorkspaceFileQueryKey = ReturnType<typeof workspaceFileQueryKey>;
89
- declare function workspaceFileVersion(target: WorkspaceFileReadTarget): {
90
- readonly path: string;
91
- readonly name: string;
92
- readonly type: import("@cloudflare/shell").EntryType;
93
- readonly mimeType: string;
94
- readonly size: number;
95
- readonly createdAt: number;
96
- readonly updatedAt: number;
97
- readonly target: string | null;
98
- };
99
- type WorkspaceFileVersion = ReturnType<typeof workspaceFileVersion>;
100
- type WorkspaceDirectoryQueryOptions = WorkspaceQueryOptions<readonly FileInfo[], WorkspaceDirectoryQueryKey>;
101
- type WorkspaceInfoQueryKey = readonly [...WorkspaceQueryKey, "info"];
102
- type WorkspaceInfoQueryOptions = WorkspaceQueryOptions<WorkspaceInfo | null, WorkspaceInfoQueryKey>;
103
- type WorkspaceFileStatQueryKey = readonly [...WorkspaceFileQueryKey, "stat"];
104
- type WorkspaceFileStatQueryOptions = WorkspaceQueryOptions<WorkspaceFileReadTarget, WorkspaceFileStatQueryKey>;
105
- type WorkspaceFileAssetQueryKey = readonly [...WorkspaceFileQueryKey, "asset", WorkspaceFileVersion];
106
- type WorkspaceFileAssetQueryOptions = WorkspaceQueryOptions<WorkspaceResolvedAsset | null, WorkspaceFileAssetQueryKey>;
107
- type WorkspaceTextFileQueryKey = readonly [...WorkspaceFileQueryKey, "text", WorkspaceFileVersion];
108
- type WorkspaceTextFileQueryOptions = WorkspaceQueryOptions<string | null, WorkspaceTextFileQueryKey>;
109
- type WorkspaceBinaryFileQueryKey = readonly [...WorkspaceFileQueryKey, "bytes", WorkspaceFileVersion, {
110
- readonly maxInlineAssetBytes: number;
111
- }];
112
- type WorkspaceBinaryFileQueryOptions = WorkspaceQueryOptions<WorkspaceResolvedAsset | null, WorkspaceBinaryFileQueryKey>;
113
- /** Shared directory options for workspace components and route loaders. */
114
- declare function workspaceDirectoryQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, path: string): WorkspaceDirectoryQueryOptions;
115
- /** Shared workspace-summary options for workspace components and route loaders. */
116
- declare function workspaceInfoQueryOptions(source: WorkspaceSource, sourceKey: string, root: string): WorkspaceInfoQueryOptions;
117
- /** Re-stat and validate a requested path before any resolver or file read. */
118
- declare function workspaceFileStatQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, requestedPath: string): WorkspaceFileStatQueryOptions;
119
- /** Optional host asset resolution, scoped to the current stat result. */
120
- declare function workspaceFileAssetQueryOptions(sourceKey: string, root: string, target: WorkspaceFileReadTarget, resolveFileAsset: WorkspaceFileAssetResolver): WorkspaceFileAssetQueryOptions;
121
- /** Cached text read options, scoped to the validated stat result. */
122
- declare function workspaceTextFileQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, target: WorkspaceFileReadTarget): WorkspaceTextFileQueryOptions;
123
- /** Active-file-only buffered asset options, scoped to the validated stat result. */
124
- declare function workspaceBinaryFileQueryOptions(source: WorkspaceSource, sourceKey: string, root: string, target: WorkspaceFileReadTarget, maxInlineAssetBytes: number): WorkspaceBinaryFileQueryOptions;
125
- /**
126
- * Headless state for browsing a Think workspace. TanStack Query owns remote
127
- * directory, metadata, resolver, text, and byte lifecycles; the route owns
128
- * selection, while this hook only keeps local tree expansion state.
129
- */
130
- declare function useWorkspace({
131
- source,
132
- sourceKey,
133
- root,
134
- selectedPath,
135
- onSelectedPathChange,
136
- resolveFileAsset,
137
- maxInlineAssetBytes
138
- }: UseWorkspaceOptions): WorkspaceState;
139
- //#endregion
1
+ import { A as workspaceQueryKey, C as workspaceBinaryFileQueryOptions, D as workspaceFileAssetQueryOptions, E as workspaceDirectoryQueryPrefix, O as workspaceFileStatQueryOptions, S as useWorkspace, T as workspaceDirectoryQueryOptions, _ as WorkspaceResolvedAsset, a as WorkspaceDirectoryQueryOptions, b as WorkspaceTextFileQueryKey, c as WorkspaceFileQueryKey, d as WorkspaceFileStatQueryOptions, f as WorkspaceFileVersion, g as WorkspaceQueryKey, h as WorkspaceInfoQueryOptions, i as WorkspaceDirectoryQueryKey, j as workspaceTextFileQueryOptions, k as workspaceInfoQueryOptions, l as WorkspaceFileReadTarget, m as WorkspaceInfoQueryKey, n as WorkspaceBinaryFileQueryKey, o as WorkspaceFileAssetQueryKey, p as WorkspaceInfo, r as WorkspaceBinaryFileQueryOptions, s as WorkspaceFileAssetQueryOptions, t as UseWorkspaceOptions, u as WorkspaceFileStatQueryKey, v as WorkspaceSource, w as workspaceDirectoryQueryKey, x as WorkspaceTextFileQueryOptions, y as WorkspaceState } from "../../Workspace-F3raHdYV.js";
140
2
  export { UseWorkspaceOptions, WorkspaceBinaryFileQueryKey, WorkspaceBinaryFileQueryOptions, WorkspaceDirectoryQueryKey, WorkspaceDirectoryQueryOptions, WorkspaceFileAssetQueryKey, WorkspaceFileAssetQueryOptions, WorkspaceFileQueryKey, WorkspaceFileReadTarget, WorkspaceFileStatQueryKey, WorkspaceFileStatQueryOptions, WorkspaceFileVersion, WorkspaceInfo, WorkspaceInfoQueryKey, WorkspaceInfoQueryOptions, WorkspaceQueryKey, WorkspaceResolvedAsset, WorkspaceSource, WorkspaceState, WorkspaceTextFileQueryKey, WorkspaceTextFileQueryOptions, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
@@ -1,4 +1,4 @@
1
- import { WorkspaceState } from "./Workspace.js";
1
+ import { y as WorkspaceState } from "../../Workspace-F3raHdYV.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/agents-sdk/WorkspaceBrowser.d.ts
@@ -1,5 +1,5 @@
1
1
  import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
- import { WorkspaceState } from "./Workspace.js";
2
+ import { y as WorkspaceState } from "../../Workspace-F3raHdYV.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/agents-sdk/WorkspaceExplorer.d.ts
@@ -2,7 +2,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
3
3
  import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DtH66bAY.js";
4
4
  import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
5
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-DwdXiKku.js";
5
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-DWMKxX_u.js";
6
6
  import * as React from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/agents-sdk/WorkspaceExplorer.tsx
@@ -70,12 +70,12 @@ function WorkspaceExplorerContent({ workspace, navigation, className, title = "W
70
70
  const surface = explorerRef.current;
71
71
  const target = [...surface?.querySelectorAll(".file-tree__node") ?? []].find((candidate) => candidate.dataset.workspacePath === pending.path);
72
72
  if (target) {
73
- target.focus();
73
+ target.focus({ preventScroll: true });
74
74
  pendingTreeFocusRef.current = null;
75
75
  return;
76
76
  }
77
77
  if (isLoading || ancestors.some((path) => loadingPaths.has(path))) return;
78
- (surface?.querySelector(".file-tree__node") ?? surface?.querySelector("[data-workspace-browser-focus-target]"))?.focus();
78
+ (surface?.querySelector(".file-tree__node") ?? surface?.querySelector("[data-workspace-browser-focus-target]"))?.focus({ preventScroll: true });
79
79
  pendingTreeFocusRef.current = null;
80
80
  }, [
81
81
  entriesByDirectory,
@@ -1,2 +1,2 @@
1
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-DwdXiKku.js";
1
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-DWMKxX_u.js";
2
2
  export { WorkspaceFileView };
@@ -1,2 +1,2 @@
1
- import { a as AgentChatStarterList, i as AgentChatStarterItem, n as AgentChatStartScreenProps, o as AgentChatStarterListProps, r as AgentChatStarter, s as AgentChatStarterProps, t as AgentChatStartScreen } from "../../AgentChatStartScreen-CO49yepa.js";
1
+ import { a as AgentChatStarterList, i as AgentChatStarterItem, n as AgentChatStartScreenProps, o as AgentChatStarterListProps, r as AgentChatStarter, s as AgentChatStarterProps, t as AgentChatStartScreen } from "../../AgentChatStartScreen-Bkv7Avni.js";
2
2
  export { AgentChatStartScreen, AgentChatStartScreenProps, AgentChatStarter, AgentChatStarterItem, AgentChatStarterList, AgentChatStarterListProps, AgentChatStarterProps };
@@ -13,7 +13,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
13
13
  * the same live composer moves from the center of the empty view to the pinned
14
14
  * transcript position after the first message.
15
15
  */
16
- function AgentChatStartScreen({ heading = "What should we work on?", composer, composerTray, starters, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
16
+ function AgentChatStartScreen({ heading = "What should we work on?", composer, composerTray, lead, starters, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }) {
17
17
  const headingId = React.useId();
18
18
  return /* @__PURE__ */ jsx("section", {
19
19
  "data-slot": "agent-chat-start-screen",
@@ -37,7 +37,10 @@ function AgentChatStartScreen({ heading = "What should we work on?", composer, c
37
37
  children: composerTray
38
38
  }) : null]
39
39
  })]
40
- }), starters?.items.length ? /* @__PURE__ */ jsx("div", {
40
+ }), lead ? /* @__PURE__ */ jsx("div", {
41
+ className: "agent-chat-start-screen__lead",
42
+ children: lead
43
+ }) : starters?.items.length ? /* @__PURE__ */ jsx("div", {
41
44
  className: "agent-chat-start-screen__starters",
42
45
  children: /* @__PURE__ */ jsx(AgentChatStarterList, { ...starters })
43
46
  }) : null]
@@ -1,7 +1,7 @@
1
1
  import { r as ToggleVariantsOptions } from "../../Toggle-DLrIf5YH.js";
2
2
  import * as React from "react";
3
- import { Toggle } from "@base-ui/react/toggle";
4
3
  import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
4
+ import { Toggle } from "@base-ui/react/toggle";
5
5
 
6
6
  //#region src/components/foundations/ToggleGroup.d.ts
7
7
  type ToggleGroupSize = ToggleVariantsOptions["size"];
@@ -3,8 +3,8 @@ import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
3
3
  import { toggleVariants } from "./Toggle.js";
4
4
  import * as React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { Toggle } from "@base-ui/react/toggle";
7
6
  import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
7
+ import { Toggle } from "@base-ui/react/toggle";
8
8
  //#region src/components/foundations/ToggleGroup.tsx
9
9
  /**
10
10
  * Tracks the pressed item's box so the segmented thumb can slide to it instead
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { Switch } from "../foundations/Switch.js";
3
2
  import { ToggleGroup } from "../foundations/ToggleGroup.js";
3
+ import { Switch } from "../foundations/Switch.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/general-purpose/PricingBillingToggle.tsx
6
6
  /** Controlled billing-period selector composed from the shared Switch or ToggleGroup. */
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { Separator } from "../foundations/Separator.js";
3
3
  import { Card } from "../foundations/Card.js";
4
- import { Progress } from "../foundations/Progress.js";
5
4
  import { Slider } from "../foundations/Slider.js";
5
+ import { Progress } from "../foundations/Progress.js";
6
6
  import { formatPricingUsage, getUsagePrice } from "./Pricing.js";
7
7
  import * as React from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,105 +1,2 @@
1
- import * as React from "react";
2
-
3
- //#region src/components/general-purpose/ResponsiveSidebarShell.d.ts
4
- interface ResponsiveSidebarShellControls {
5
- /** Close the sidebar and move focus to the main content. */
6
- closeSidebar: () => void;
7
- /** Close only when the shell is currently using its compact drawer layout. */
8
- closeSidebarOnCompact: () => void;
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
- }
55
- interface ResponsiveSidebarShellProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "title"> {
56
- /**
57
- * Navigation or other secondary surface shown beside the selected content.
58
- * Omit for a shell that is only a bar row over content — the app bar then
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.
63
- */
64
- sidebar?: React.ReactNode | ((controls: ResponsiveSidebarShellControls) => React.ReactNode);
65
- /** Main content. */
66
- children?: React.ReactNode;
67
- /** Short noun used by the toggle and resize control, such as “threads” or “schedules”. */
68
- sidebarLabel?: string;
69
- /** Initial desktop sidebar width in CSS pixels. */
70
- defaultSidebarWidth?: number;
71
- /** Shell-owned application bar composed from slots. */
72
- bar?: ResponsiveSidebarShellBar;
73
- /**
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.
76
- */
77
- error?: React.ReactNode;
78
- /** Accessible name for the mobile peek target that returns to the main content. */
79
- showMainLabel?: string;
80
- }
81
- /**
82
- * The one application shell: responsive master-detail with a resizable desktop
83
- * sidebar, a compact floating drawer that leaves the main content in place as
84
- * a dismiss target, and a shell-owned application bar composed from slots.
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.
88
- */
89
- declare function ResponsiveSidebarShell({
90
- sidebar,
91
- sidebarLabel,
92
- defaultSidebarWidth,
93
- bar,
94
- error,
95
- showMainLabel,
96
- className,
97
- children,
98
- ref,
99
- style,
100
- ...props
101
- }: ResponsiveSidebarShellProps & {
102
- ref?: React.Ref<HTMLDivElement>;
103
- }): React.JSX.Element;
104
- //#endregion
1
+ import { a as ResponsiveSidebarShellProps, i as ResponsiveSidebarShellControls, n as ResponsiveSidebarShell, r as ResponsiveSidebarShellBar, t as AppBarSlots } from "../../ResponsiveSidebarShell-DOXd5T-d.js";
105
2
  export { AppBarSlots, ResponsiveSidebarShell, ResponsiveSidebarShellBar, ResponsiveSidebarShellControls, ResponsiveSidebarShellProps };
@@ -84,7 +84,7 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", defaultSide
84
84
  }) : sidebar;
85
85
  const hasAppLeading = bar?.back != null || bar?.leading != null;
86
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);
87
+ const hasTopBar = !bar?.hidden && (hasSidebar || bar?.back != null || bar?.leading != null || bar?.compactLeading != null || bar?.title != null || bar?.actions != null || bar?.primary != null);
88
88
  const compactLeadingMode = hasTitleTrigger ? "trigger" : !hasAppLeading && bar?.compactLeading != null ? "custom" : void 0;
89
89
  return /* @__PURE__ */ jsx("div", {
90
90
  ref: mergeRefs(rootRef, ref),
@@ -167,7 +167,7 @@ function ResponsiveSidebarShell({ sidebar, sidebarLabel = "sidebar", defaultSide
167
167
  children: [bar?.compactTitleTrigger, /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
168
168
  }) : null]
169
169
  }) : null,
170
- bar?.actions != null ? /* @__PURE__ */ jsx(AppTopBar.Trailing, { children: bar.actions }) : null
170
+ bar?.actions != null || bar?.primary != null ? /* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [bar.actions, bar.primary] }) : null
171
171
  ]
172
172
  }) : null,
173
173
  error != null ? /* @__PURE__ */ jsxs("div", {
@@ -1,77 +1,2 @@
1
- import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
2
- import { $ as WarningIcon, B as PlusIcon, d as CheckIcon, f as ChevronDownIcon } from "../../icons-CVFSeTJn.js";
3
- import { Button } from "../foundations/Button.js";
4
- import { Menu } from "../foundations/Menu.js";
5
- import * as React from "react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- //#region src/components/_internal/MenuDisclosureGroup.tsx
8
- /**
9
- * A menu-native disclosure: its trigger stays in the menu roving-focus model,
10
- * while its rows mount only after the user expands the section.
11
- */
12
- function MenuDisclosureGroup({ children, className, defaultOpen = false, label, triggerClassName, ...props }) {
13
- const [open, setOpen] = React.useState(defaultOpen);
14
- return /* @__PURE__ */ jsxs(Menu.Group, {
15
- className: mergeBaseClassName("menu-disclosure-group", className),
16
- ...props,
17
- children: [/* @__PURE__ */ jsxs(Menu.Item, {
18
- "aria-expanded": open,
19
- className: mergeBaseClassName("menu-disclosure-group__trigger", triggerClassName),
20
- closeOnClick: false,
21
- onClick: () => setOpen((current) => !current),
22
- children: [/* @__PURE__ */ jsx("span", {
23
- className: "sigvelo-truncate-grow",
24
- children: label
25
- }), /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
26
- }), open ? /* @__PURE__ */ jsx("div", {
27
- className: "menu-disclosure-group__items",
28
- children
29
- }) : null]
30
- });
31
- }
32
- //#endregion
33
- //#region src/components/general-purpose/SetupChecklist.tsx
34
- /** Checklist rows for any Menu surface (composer plus menu, tray menu). */
35
- function SetupChecklistGroup({ label, entries, defaultOpen = false, onSelect }) {
36
- return /* @__PURE__ */ jsx(MenuDisclosureGroup, {
37
- label,
38
- defaultOpen,
39
- children: entries.map((entry) => /* @__PURE__ */ jsxs(Menu.Item, {
40
- "aria-label": `${entry.name}, ${entry.complete ? "complete" : "not set up"}`,
41
- onClick: () => onSelect(entry.id),
42
- children: [
43
- entry.icon,
44
- /* @__PURE__ */ jsx("span", {
45
- className: "sigvelo-truncate-grow",
46
- children: entry.description
47
- }),
48
- entry.complete ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(PlusIcon, { "aria-hidden": "true" })
49
- ]
50
- }, entry.id))
51
- });
52
- }
53
- /** Progress-aware tray trigger opening the checklist in its own menu. */
54
- function SetupChecklistAction({ actionLabel, label, entries, onSelect }) {
55
- const completed = entries.filter((entry) => entry.complete).length;
56
- return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsxs(Button, {
57
- type: "button",
58
- variant: "ghost",
59
- color: "neutral",
60
- size: "md",
61
- "aria-label": `${actionLabel} — ${completed} of ${entries.length} set up`,
62
- render: /* @__PURE__ */ jsx(Menu.Trigger, { unstyled: true }),
63
- children: [completed === entries.length ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: actionLabel })]
64
- }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
65
- side: "bottom",
66
- align: "start",
67
- sideOffset: 4,
68
- children: /* @__PURE__ */ jsx(Menu.Popup, { children: /* @__PURE__ */ jsx(SetupChecklistGroup, {
69
- defaultOpen: true,
70
- label,
71
- entries,
72
- onSelect
73
- }) })
74
- }) })] });
75
- }
76
- //#endregion
1
+ import { n as SetupChecklistGroup, t as SetupChecklistAction } from "../../SetupChecklist-H1JRCIIe.js";
77
2
  export { SetupChecklistAction, SetupChecklistGroup };
@@ -1,6 +1,6 @@
1
1
  import { N as MonitorIcon, P as MoonIcon, Y as SunIcon } from "../../icons-CVFSeTJn.js";
2
- import { Radio, RadioGroup } from "../foundations/RadioGroup.js";
3
2
  import { useTheme } from "../foundations/ThemeProvider.js";
3
+ import { Radio, RadioGroup } from "../foundations/RadioGroup.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/general-purpose/ThemeModeControl.tsx
6
6
  const modes = [
@@ -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 { NaniteMark } from "./NaniteScene.js";
6
- import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
7
5
  import { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress } from "../agents-sdk/SubagentRunDetails.js";
8
- import { t as ThinkChat } from "../../ThinkChat-DkA4Wr71.js";
6
+ import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
7
+ import { NaniteMark } from "./NaniteScene.js";
8
+ import { t as ThinkChat } from "../../ThinkChat-BES_3Mb-.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";
@@ -93,6 +93,7 @@
93
93
  );
94
94
 
95
95
  display: grid;
96
+ align-content: start;
96
97
  grid-template-rows: var(--sigvelo-layout-track-fill) auto var(--sigvelo-layout-track-fill);
97
98
  inline-size: min(
98
99
  100%,
@@ -109,6 +110,7 @@
109
110
  .agent-chat-start-screen__primary {
110
111
  grid-row: 2;
111
112
  display: grid;
113
+ align-content: start;
112
114
  gap: var(--sigvelo-spacing-6);
113
115
  min-inline-size: 0;
114
116
  }
@@ -126,6 +128,7 @@
126
128
 
127
129
  .agent-chat-start-screen__composer {
128
130
  display: grid;
131
+ align-content: start;
129
132
  min-inline-size: 0;
130
133
  }
131
134
 
@@ -153,9 +156,15 @@
153
156
  }
154
157
 
155
158
  /* The first-turn utility tray owns its buttons' treatment so every host gets
156
- the same quiet look without per-app classes. Space-between seats one action
157
- per slot — left, middle, right. */
159
+ the same quiet look without per-app classes. Hug the actions — a short
160
+ viewport (Storybook addons, a short side panel) used to stretch this into
161
+ a vacant slab. Space-between only when there are three slots to fill. */
158
162
  .agent-chat-start-screen__composer-tray {
163
+ align-self: start;
164
+ justify-content: start;
165
+ }
166
+
167
+ .agent-chat-start-screen__composer-tray:has(> :nth-child(3):last-child) {
159
168
  justify-content: space-between;
160
169
  }
161
170
 
@@ -194,7 +203,8 @@
194
203
  white-space: nowrap;
195
204
  }
196
205
 
197
- .agent-chat-start-screen__starters {
206
+ .agent-chat-start-screen__starters,
207
+ .agent-chat-start-screen__lead {
198
208
  grid-row: 3;
199
209
  align-self: start;
200
210
  min-inline-size: 0;
@@ -332,7 +342,8 @@
332
342
  * need to.
333
343
  */
334
344
  .agent-chat-start-screen__heading,
335
- .agent-chat-start-screen__starters {
345
+ .agent-chat-start-screen__starters,
346
+ .agent-chat-start-screen__lead {
336
347
  transition:
337
348
  opacity var(--sigvelo-motion-duration-disclosure) var(--sigvelo-ease-snappy),
338
349
  translate var(--sigvelo-motion-duration-disclosure) var(--sigvelo-ease-snappy),
@@ -348,7 +359,9 @@
348
359
  /* Starters are buttons, so fading them is not enough — invisible controls that
349
360
  still take a click or a Tab stop are worse than visible ones. */
350
361
  .agent-chat-start-screen__content:has(textarea:not(:placeholder-shown))
351
- .agent-chat-start-screen__starters {
362
+ .agent-chat-start-screen__starters,
363
+ .agent-chat-start-screen__content:has(textarea:not(:placeholder-shown))
364
+ .agent-chat-start-screen__lead {
352
365
  visibility: hidden;
353
366
  opacity: 0;
354
367
  }
@@ -594,15 +607,6 @@
594
607
  }
595
608
  }
596
609
 
597
- /* Side-panel widths: tray labels yield to the icons; each action keeps its
598
- accessible name. */
599
- /* Local wrap. Not --sigvelo-layout-break-compact. */
600
- @container agent-chat (inline-size <= 30rem) {
601
- .agent-chat-start-screen__composer-tray > .button > span:not(.app-icon-stack) {
602
- display: none;
603
- }
604
- }
605
-
606
610
  @media (max-height: 40rem) {
607
611
  .agent-chat-start-screen__content {
608
612
  --agent-chat-start-screen-padding-block: var(--sigvelo-spacing-5);
@@ -614,7 +618,8 @@
614
618
  grid-row: 1;
615
619
  }
616
620
 
617
- .agent-chat-start-screen__starters {
621
+ .agent-chat-start-screen__starters,
622
+ .agent-chat-start-screen__lead {
618
623
  grid-row: 2;
619
624
  }
620
625
  }
@@ -122,6 +122,7 @@
122
122
  @import "./think-execution-workbench.css" layer(components);
123
123
  @import "./think-full-app.css" layer(components);
124
124
  @import "./think-routine-library.css" layer(components);
125
+ @import "./think-sidepanel.css" layer(components);
125
126
  @import "./think-thread-picker.css" layer(components);
126
127
  @import "./web-preview.css" layer(components);
127
128
  @import "./workspace-explorer.css" layer(components);