@mcp-b/react-components 0.49.0 → 0.49.1
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/{AgentChatQueue-C_Jaw3Ia.d.ts → AgentChatQueue-v5890eA1.d.ts} +1 -1
- package/dist/{FileTree-H8mMg4rV.js → FileTree-DruTQ-oa.js} +19 -8
- package/dist/{Menu-yb6QXWA3.d.ts → Menu-CgfUZhZd.d.ts} +1 -1
- package/dist/{PromptInput-C4Mofitz.d.ts → PromptInput-4kCz3T9P.d.ts} +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +2 -2
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +5 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -0
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/foundations/ContextMenu.d.ts +10 -23
- package/dist/components/foundations/ContextMenu.js +2 -1
- package/dist/components/foundations/Dialog.d.ts +1 -1
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menubar.d.ts +1 -1
- package/dist/components/foundations/PreviewCard.d.ts +1 -1
- package/dist/components/foundations/Tooltip.d.ts +1 -1
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/styles/accessibility.css +20 -0
- package/dist/styles/agent-chat.css +1 -1
- package/dist/styles/base.css +0 -8
- package/dist/styles/codex-model-selector.css +4 -0
- package/dist/styles/color-contrast.test.ts +212 -0
- package/dist/styles/file-tree.css +5 -1
- package/dist/styles/manager-office.css +5 -5
- package/dist/styles/responsive-sidebar-shell.css +1 -1
- package/dist/utils/codex-model-catalog.d.ts +25 -6
- package/dist/utils/codex-model-catalog.js +22 -5
- package/package.json +3 -3
|
@@ -18,7 +18,7 @@ function useFileTreeContext() {
|
|
|
18
18
|
* WAI-ARIA Tree Pattern.
|
|
19
19
|
*/
|
|
20
20
|
function useFileTreeNav({ expanded, selectedPath, onSelect, onExpandedChange }) {
|
|
21
|
-
const [focusedPath, setFocusedPath] = React.useState(
|
|
21
|
+
const [focusedPath, setFocusedPath] = React.useState(selectedPath);
|
|
22
22
|
const setFolderExpanded = React.useCallback((path, nextExpanded) => {
|
|
23
23
|
const next = new Set(expanded);
|
|
24
24
|
if (nextExpanded) next.add(path);
|
|
@@ -31,6 +31,7 @@ function useFileTreeNav({ expanded, selectedPath, onSelect, onExpandedChange })
|
|
|
31
31
|
const handleKeyDown = React.useCallback((event, path, kind) => {
|
|
32
32
|
const nodes = getVisibleFileTreeNodes(event.currentTarget.closest("[role=\"tree\"]"));
|
|
33
33
|
const currentIndex = nodes.indexOf(event.currentTarget);
|
|
34
|
+
const currentItem = event.currentTarget.closest("[role=\"treeitem\"]");
|
|
34
35
|
const focusAt = (index) => nodes[index]?.focus();
|
|
35
36
|
switch (event.key) {
|
|
36
37
|
case "ArrowDown":
|
|
@@ -44,13 +45,18 @@ function useFileTreeNav({ expanded, selectedPath, onSelect, onExpandedChange })
|
|
|
44
45
|
case "ArrowRight":
|
|
45
46
|
if (kind !== "folder") return;
|
|
46
47
|
event.preventDefault();
|
|
47
|
-
if (expanded.has(path))
|
|
48
|
-
|
|
48
|
+
if (expanded.has(path)) {
|
|
49
|
+
const child = nodes[currentIndex + 1];
|
|
50
|
+
if (child && currentItem?.contains(child)) child.focus();
|
|
51
|
+
} else setFolderExpanded(path, true);
|
|
49
52
|
break;
|
|
50
53
|
case "ArrowLeft":
|
|
51
|
-
if (kind !== "folder" || !expanded.has(path)) return;
|
|
52
54
|
event.preventDefault();
|
|
53
|
-
setFolderExpanded(path, false);
|
|
55
|
+
if (kind === "folder" && expanded.has(path)) setFolderExpanded(path, false);
|
|
56
|
+
else {
|
|
57
|
+
const parentItem = currentItem?.parentElement?.closest("[role=\"treeitem\"]");
|
|
58
|
+
nodes.find((node) => node.closest("[role=\"treeitem\"]") === parentItem)?.focus();
|
|
59
|
+
}
|
|
54
60
|
break;
|
|
55
61
|
case "Enter":
|
|
56
62
|
case " ":
|
|
@@ -128,13 +134,18 @@ function FileTree({ appearance = "contained", className, "aria-label": ariaLabel
|
|
|
128
134
|
});
|
|
129
135
|
const treeRef = React.useRef(null);
|
|
130
136
|
React.useLayoutEffect(() => {
|
|
131
|
-
const
|
|
137
|
+
const allNodes = [...treeRef.current?.querySelectorAll(".file-tree__node") ?? []].filter((node) => node.closest("[role=\"tree\"]") === treeRef.current);
|
|
138
|
+
const nodes = allNodes.filter((node) => !node.closest(".file-tree__group[data-collapsed]"));
|
|
132
139
|
if (nodes.length === 0) return;
|
|
133
140
|
if (nodes.some((node) => node.dataset.workspacePath === ctx.focusedPath)) return;
|
|
134
|
-
const
|
|
135
|
-
|
|
141
|
+
const previousNode = allNodes.find((node) => node.dataset.workspacePath === ctx.focusedPath);
|
|
142
|
+
const nextNode = nodes.findLast((node) => previousNode ? node.closest("[role=\"treeitem\"]")?.contains(previousNode) : false) ?? nodes[0];
|
|
143
|
+
const nextPath = nextNode?.dataset.workspacePath;
|
|
144
|
+
if (nextPath) ctx.onFocus(nextPath);
|
|
145
|
+
if (previousNode === document.activeElement) nextNode?.focus();
|
|
136
146
|
}, [
|
|
137
147
|
children,
|
|
148
|
+
currentExpanded,
|
|
138
149
|
ctx.focusedPath,
|
|
139
150
|
ctx.onFocus
|
|
140
151
|
]);
|
|
@@ -281,7 +281,7 @@ declare function MenuSubmenuTrigger({
|
|
|
281
281
|
*/
|
|
282
282
|
declare const Menu$1: {
|
|
283
283
|
createHandle: typeof Menu.createHandle;
|
|
284
|
-
Root: <Payload>(props: Menu.Root.Props<Payload>) =>
|
|
284
|
+
Root: <Payload>(props: Menu.Root.Props<Payload>) => React.JSX.Element;
|
|
285
285
|
Trigger: typeof MenuTrigger;
|
|
286
286
|
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
287
287
|
Positioner: typeof MenuPositioner;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as MenuProps, s as MenuItemProps, t as Menu } from "./Menu-
|
|
1
|
+
import { d as MenuProps, s as MenuItemProps, t as Menu } from "./Menu-CgfUZhZd.js";
|
|
2
2
|
import { a as TabsListProps, n as TabProps, t as TabPanelProps } from "./Tabs-Ptrbaynh.js";
|
|
3
3
|
import { r as ButtonProps } from "./Button-DjONW5UW.js";
|
|
4
4
|
import * as React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as PromptInputCommandDefinition, J as PromptInputMessage, r as PromptInput, vt as PromptInputTray } from "../../PromptInput-
|
|
2
|
-
import { r as AgentChatQueuedPrompt } from "../../AgentChatQueue-
|
|
1
|
+
import { D as PromptInputCommandDefinition, J as PromptInputMessage, r as PromptInput, vt as PromptInputTray } from "../../PromptInput-4kCz3T9P.js";
|
|
2
|
+
import { r as AgentChatQueuedPrompt } from "../../AgentChatQueue-v5890eA1.js";
|
|
3
3
|
import { AgentMessageRenderPartContext } from "../ai-sdk/AgentMessageParts.js";
|
|
4
4
|
import { i as MessageActions } from "../../Message-DyaTBiV7.js";
|
|
5
5
|
import { t as VirtualMessageScrollAnchor } from "../../MessageScrollerVirtual-D4afYwVB.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as useOptionalAgentChatQueue, n as AgentChatQueueProviderProps, r as AgentChatQueuedPrompt, t as AgentChatQueueProvider } from "../../AgentChatQueue-
|
|
1
|
+
import { i as useOptionalAgentChatQueue, n as AgentChatQueueProviderProps, r as AgentChatQueuedPrompt, t as AgentChatQueueProvider } from "../../AgentChatQueue-v5890eA1.js";
|
|
2
2
|
export { AgentChatQueueProvider, AgentChatQueueProviderProps, AgentChatQueuedPrompt, useOptionalAgentChatQueue };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as PromptInputMessage } from "../../PromptInput-
|
|
1
|
+
import { J as PromptInputMessage } from "../../PromptInput-4kCz3T9P.js";
|
|
2
2
|
import { n as AgentToolRunValue } from "../../AgentToolRunsContext-GMe_hSnD.js";
|
|
3
3
|
import { ThinkThreadItem } from "./ThinkThreadPicker.js";
|
|
4
4
|
import * as React from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as MenuItemProps, t as Menu } from "../../Menu-
|
|
1
|
+
import { s as MenuItemProps, t as Menu } from "../../Menu-CgfUZhZd.js";
|
|
2
2
|
import { McpServerCard } from "../../utils/mcp-server-catalog.js";
|
|
3
3
|
import { McpConnectorFormProps } from "./McpConnectorForm.js";
|
|
4
4
|
import { DialogProps } from "../foundations/Dialog.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as PromptInputCommandDefinition } from "../../PromptInput-
|
|
1
|
+
import { D as PromptInputCommandDefinition } from "../../PromptInput-4kCz3T9P.js";
|
|
2
2
|
import { ConversationTabPickerItem } from "../extension/ConversationTabPicker.js";
|
|
3
3
|
import { MCPServersState } from "agents";
|
|
4
4
|
import { SkillDescriptor } from "agents/skills";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as PromptInputMessage } from "../../PromptInput-
|
|
1
|
+
import { J as PromptInputMessage } from "../../PromptInput-4kCz3T9P.js";
|
|
2
2
|
import { AgentMessageRenderPartContext } from "../ai-sdk/AgentMessageParts.js";
|
|
3
3
|
import { AgentChatMessageContentProps, AgentChatRootProps } from "./AgentChat.js";
|
|
4
4
|
import { UseSessionCompactionResult } from "./SessionCompaction.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchField } from "../foundations/SearchField.js";
|
|
2
|
-
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-
|
|
2
|
+
import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-DruTQ-oa.js";
|
|
3
3
|
import { WorkspaceHeader } from "./WorkspaceHeader.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -66,7 +66,11 @@ function AgentChatMessageEditor({ message, originalText, onCancel, onSubmit, onS
|
|
|
66
66
|
onCancel();
|
|
67
67
|
}
|
|
68
68
|
}),
|
|
69
|
-
|
|
69
|
+
/* @__PURE__ */ jsx(Field.Error, {
|
|
70
|
+
match: Boolean(error),
|
|
71
|
+
role: "alert",
|
|
72
|
+
children: error
|
|
73
|
+
})
|
|
70
74
|
]
|
|
71
75
|
}), /* @__PURE__ */ jsxs("div", {
|
|
72
76
|
"data-slot": "message-edit-actions",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as ButtonProps } from "../../Button-DjONW5UW.js";
|
|
2
|
-
import { vt as PromptInputTray } from "../../PromptInput-
|
|
2
|
+
import { vt as PromptInputTray } from "../../PromptInput-4kCz3T9P.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
|
|
@@ -67,6 +67,7 @@ function VirtualMessageScroller({ items, getItemKey, renderItem, estimateSize =
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
const virtualizer = useVirtualizer({
|
|
70
|
+
useFlushSync: false,
|
|
70
71
|
count: items.length,
|
|
71
72
|
getScrollElement: () => viewportRef.current,
|
|
72
73
|
estimateSize: () => estimateSize,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PromptInputProviderProps, A as PromptInputContextItem, B as PromptInputHeader, C as PromptInputButtonProps, Ct as composerLinksToReferences, D as PromptInputCommandDefinition, E as PromptInputCommandComposerProps, F as PromptInputDictationProps, G as PromptInputHoverCardProps, H as PromptInputHoverCard, I as PromptInputFooter, J as PromptInputMessage, K as PromptInputHoverCardTrigger, L as PromptInputFooterEnd, M as PromptInputContextSelectorProps, N as PromptInputControllerProps, O as PromptInputCommandTrigger, P as PromptInputDictation, Q as PromptInputProvider, R as PromptInputFooterEndProps, S as PromptInputButton, St as TooltipSide, T as PromptInputCommandComposer, Tt as usePromptInputController, U as PromptInputHoverCardContent, V as PromptInputHeaderProps, W as PromptInputHoverCardContentProps, X as PromptInputPermissionSelectorProps, Y as PromptInputPermissionSelector, Z as PromptInputProps, _ as PromptInputAttachmentProps, _t as PromptInputTooltipConfig, a as PromptInputActionAddAttachmentsProps, at as PromptInputTabBodyProps, b as PromptInputBody, bt as PromptInputVoiceInput, c as PromptInputActionMenu, ct as PromptInputTabLabel, d as PromptInputActionMenuItem, dt as PromptInputTabsList, et as PromptInputReference, f as PromptInputActionMenuItemProps, ft as PromptInputTabsListProps, g as PromptInputAttachment, gt as PromptInputToolsProps, h as PromptInputActionMenuTriggerProps, ht as PromptInputTools, i as PromptInputActionAddAttachments, it as PromptInputTabBody, j as PromptInputContextSelector, k as PromptInputContextAction, l as PromptInputActionMenuContent, lt as PromptInputTabLabelProps, m as PromptInputActionMenuTrigger, mt as PromptInputTextareaProps, n as PermissionMode, nt as PromptInputSubmitProps, o as PromptInputActionAddScreenshot, ot as PromptInputTabItem, p as PromptInputActionMenuProps, pt as PromptInputTextarea, q as PromptInputHoverCardTriggerProps, r as PromptInput, rt as PromptInputTab, s as PromptInputActionAddScreenshotProps, st as PromptInputTabItemProps, t as AttachmentsContext, tt as PromptInputSubmit, u as PromptInputActionMenuContentProps, ut as PromptInputTabProps, v as PromptInputAttachments, vt as PromptInputTray, w as PromptInputButtonTooltip, wt as usePromptInputAttachments, x as PromptInputBodyProps, xt as TextInputContext, y as PromptInputAttachmentsProps, yt as PromptInputTrayProps, z as PromptInputFooterProps } from "../../PromptInput-
|
|
1
|
+
import { $ as PromptInputProviderProps, A as PromptInputContextItem, B as PromptInputHeader, C as PromptInputButtonProps, Ct as composerLinksToReferences, D as PromptInputCommandDefinition, E as PromptInputCommandComposerProps, F as PromptInputDictationProps, G as PromptInputHoverCardProps, H as PromptInputHoverCard, I as PromptInputFooter, J as PromptInputMessage, K as PromptInputHoverCardTrigger, L as PromptInputFooterEnd, M as PromptInputContextSelectorProps, N as PromptInputControllerProps, O as PromptInputCommandTrigger, P as PromptInputDictation, Q as PromptInputProvider, R as PromptInputFooterEndProps, S as PromptInputButton, St as TooltipSide, T as PromptInputCommandComposer, Tt as usePromptInputController, U as PromptInputHoverCardContent, V as PromptInputHeaderProps, W as PromptInputHoverCardContentProps, X as PromptInputPermissionSelectorProps, Y as PromptInputPermissionSelector, Z as PromptInputProps, _ as PromptInputAttachmentProps, _t as PromptInputTooltipConfig, a as PromptInputActionAddAttachmentsProps, at as PromptInputTabBodyProps, b as PromptInputBody, bt as PromptInputVoiceInput, c as PromptInputActionMenu, ct as PromptInputTabLabel, d as PromptInputActionMenuItem, dt as PromptInputTabsList, et as PromptInputReference, f as PromptInputActionMenuItemProps, ft as PromptInputTabsListProps, g as PromptInputAttachment, gt as PromptInputToolsProps, h as PromptInputActionMenuTriggerProps, ht as PromptInputTools, i as PromptInputActionAddAttachments, it as PromptInputTabBody, j as PromptInputContextSelector, k as PromptInputContextAction, l as PromptInputActionMenuContent, lt as PromptInputTabLabelProps, m as PromptInputActionMenuTrigger, mt as PromptInputTextareaProps, n as PermissionMode, nt as PromptInputSubmitProps, o as PromptInputActionAddScreenshot, ot as PromptInputTabItem, p as PromptInputActionMenuProps, pt as PromptInputTextarea, q as PromptInputHoverCardTriggerProps, r as PromptInput, rt as PromptInputTab, s as PromptInputActionAddScreenshotProps, st as PromptInputTabItemProps, t as AttachmentsContext, tt as PromptInputSubmit, u as PromptInputActionMenuContentProps, ut as PromptInputTabProps, v as PromptInputAttachments, vt as PromptInputTray, w as PromptInputButtonTooltip, wt as usePromptInputAttachments, x as PromptInputBodyProps, xt as TextInputContext, y as PromptInputAttachmentsProps, yt as PromptInputTrayProps, z as PromptInputFooterProps } from "../../PromptInput-4kCz3T9P.js";
|
|
2
2
|
export { AttachmentsContext, PermissionMode, PromptInput, PromptInputActionAddAttachments, PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuContentProps, PromptInputActionMenuItem, PromptInputActionMenuItemProps, PromptInputActionMenuProps, PromptInputActionMenuTrigger, PromptInputActionMenuTriggerProps, PromptInputAttachment, PromptInputAttachmentProps, PromptInputAttachments, PromptInputAttachmentsProps, PromptInputBody, PromptInputBodyProps, PromptInputButton, PromptInputButtonProps, PromptInputButtonTooltip, PromptInputCommandComposer, PromptInputCommandComposerProps, PromptInputCommandDefinition, PromptInputCommandTrigger, PromptInputContextAction, PromptInputContextItem, PromptInputContextSelector, PromptInputContextSelectorProps, PromptInputControllerProps, PromptInputDictation, PromptInputDictationProps, PromptInputFooter, PromptInputFooterEnd, PromptInputFooterEndProps, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, PromptInputReference, PromptInputSubmit, PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, PromptInputTabBodyProps, PromptInputTabItem, PromptInputTabItemProps, PromptInputTabLabel, PromptInputTabLabelProps, PromptInputTabProps, PromptInputTabsList, PromptInputTabsListProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, PromptInputTooltipConfig, PromptInputTray, PromptInputTrayProps, PromptInputVoiceInput, TextInputContext, TooltipSide, composerLinksToReferences, usePromptInputAttachments, usePromptInputController };
|
|
@@ -22,7 +22,7 @@ function CodexModelSelector({ models, selectedModelId = null, onSelectModel, sel
|
|
|
22
22
|
const selectedEffort = effortOptions.find((option) => option.reasoningEffort === selectedEffortId);
|
|
23
23
|
const selectedSpeed = speedOptions.find((option) => option.id === selectedSpeedId);
|
|
24
24
|
const selectedModelLabel = selectedModel?.displayName ?? "Select model";
|
|
25
|
-
const compactModelLabel = selectedModelLabel.replace(/^GPT-([
|
|
25
|
+
const compactModelLabel = selectedModelLabel.replace(/^GPT-([^\s-]+).*$/i, "$1");
|
|
26
26
|
const selectedEffortLabel = selectedEffort ? formatSettingLabel(selectedEffort.reasoningEffort) : void 0;
|
|
27
27
|
const selectedSettingsLabel = selectedEffortLabel ? `${selectedModelLabel} · ${selectedEffortLabel}` : selectedModelLabel;
|
|
28
28
|
function handleSelectModel(modelId) {
|
|
@@ -5,7 +5,15 @@ import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for the ContextMenu.Root component.
|
|
7
7
|
*/
|
|
8
|
-
interface ContextMenuProps extends ContextMenu$1.Root.Props {
|
|
8
|
+
interface ContextMenuProps extends ContextMenu$1.Root.Props {
|
|
9
|
+
/** Trigger and popup composition rendered within the context menu. */
|
|
10
|
+
children?: ContextMenu$1.Root.Props["children"];
|
|
11
|
+
/**
|
|
12
|
+
* Has no effect on context menus.
|
|
13
|
+
* @deprecated This upstream prop has no effect on Context Menu.
|
|
14
|
+
*/
|
|
15
|
+
closeParentOnEsc?: ContextMenu$1.Root.Props["closeParentOnEsc"];
|
|
16
|
+
}
|
|
9
17
|
/**
|
|
10
18
|
* Props for the ContextMenu.Trigger component.
|
|
11
19
|
*/
|
|
@@ -45,27 +53,6 @@ interface ContextMenuSubmenuRootProps extends ContextMenu$1.SubmenuRoot.Props {}
|
|
|
45
53
|
interface ContextMenuSubmenuTriggerProps extends React.ComponentPropsWithRef<typeof ContextMenu$1.SubmenuTrigger> {
|
|
46
54
|
inset?: boolean;
|
|
47
55
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Root component that manages context menu state.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```tsx
|
|
53
|
-
* <ContextMenu.Root>
|
|
54
|
-
* <ContextMenu.Trigger>Right click here</ContextMenu.Trigger>
|
|
55
|
-
* <ContextMenu.Portal>
|
|
56
|
-
* <ContextMenu.Positioner>
|
|
57
|
-
* <ContextMenu.Popup>
|
|
58
|
-
* <ContextMenu.Item>Cut</ContextMenu.Item>
|
|
59
|
-
* <ContextMenu.Item>Copy</ContextMenu.Item>
|
|
60
|
-
* <ContextMenu.Item>Paste</ContextMenu.Item>
|
|
61
|
-
* </ContextMenu.Popup>
|
|
62
|
-
* </ContextMenu.Positioner>
|
|
63
|
-
* </ContextMenu.Portal>
|
|
64
|
-
* </ContextMenu.Root>
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
* @see {@link https://base-ui.com/react/components/context-menu | Base UI ContextMenu}
|
|
68
|
-
*/
|
|
69
56
|
/** Interactive area that activates the menu on right-click or long-press. */
|
|
70
57
|
declare function ContextMenuTrigger({
|
|
71
58
|
className,
|
|
@@ -183,7 +170,7 @@ declare function ContextMenuSubmenuTrigger({
|
|
|
183
170
|
* @see {@link https://base-ui.com/react/components/context-menu | Base UI ContextMenu}
|
|
184
171
|
*/
|
|
185
172
|
declare const ContextMenu: {
|
|
186
|
-
Root:
|
|
173
|
+
Root: (props: ContextMenuProps) => React.JSX.Element;
|
|
187
174
|
Trigger: typeof ContextMenuTrigger;
|
|
188
175
|
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
189
176
|
Positioner: typeof ContextMenuPositioner;
|
|
@@ -25,6 +25,7 @@ import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
|
|
|
25
25
|
*
|
|
26
26
|
* @see {@link https://base-ui.com/react/components/context-menu | Base UI ContextMenu}
|
|
27
27
|
*/
|
|
28
|
+
const ContextMenuRoot = ContextMenu$1.Root;
|
|
28
29
|
/** Interactive area that activates the menu on right-click or long-press. */
|
|
29
30
|
function ContextMenuTrigger({ className, ref, ...props }) {
|
|
30
31
|
const classes = mergeBaseClassName("context-menu__trigger", className);
|
|
@@ -195,7 +196,7 @@ function ContextMenuSubmenuTrigger({ className, inset, ref, ...props }) {
|
|
|
195
196
|
* @see {@link https://base-ui.com/react/components/context-menu | Base UI ContextMenu}
|
|
196
197
|
*/
|
|
197
198
|
const ContextMenu = {
|
|
198
|
-
Root:
|
|
199
|
+
Root: ContextMenuRoot,
|
|
199
200
|
Trigger: ContextMenuTrigger,
|
|
200
201
|
Portal: ContextMenu$1.Portal,
|
|
201
202
|
Positioner: ContextMenuPositioner,
|
|
@@ -90,7 +90,7 @@ declare function DialogClose({
|
|
|
90
90
|
...props
|
|
91
91
|
}: DialogCloseProps): React.JSX.Element;
|
|
92
92
|
declare const Dialog: {
|
|
93
|
-
Root:
|
|
93
|
+
Root: <Payload>(props: Dialog$1.Root.Props<Payload>) => React.JSX.Element;
|
|
94
94
|
Trigger: typeof DialogTrigger;
|
|
95
95
|
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
96
96
|
Backdrop: typeof DialogBackdrop;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as MenuSubmenuRootProps, a as MenuGroupLabelProps, b as MenuViewportProps, c as MenuPopupProps, d as MenuProps, f as MenuRadioGroupProps, g as MenuShortcutProps, h as MenuSeparatorProps, i as MenuCheckboxItemProps, l as MenuPortalProps, m as MenuRadioItemProps, n as MenuArrowProps, o as MenuGroupProps, p as MenuRadioItemIndicatorProps, r as MenuCheckboxItemIndicatorProps, s as MenuItemProps, t as Menu, u as MenuPositionerProps, v as MenuSubmenuTriggerProps, y as MenuTriggerProps } from "../../Menu-
|
|
1
|
+
import { _ as MenuSubmenuRootProps, a as MenuGroupLabelProps, b as MenuViewportProps, c as MenuPopupProps, d as MenuProps, f as MenuRadioGroupProps, g as MenuShortcutProps, h as MenuSeparatorProps, i as MenuCheckboxItemProps, l as MenuPortalProps, m as MenuRadioItemProps, n as MenuArrowProps, o as MenuGroupProps, p as MenuRadioItemIndicatorProps, r as MenuCheckboxItemIndicatorProps, s as MenuItemProps, t as Menu, u as MenuPositionerProps, v as MenuSubmenuTriggerProps, y as MenuTriggerProps } from "../../Menu-CgfUZhZd.js";
|
|
2
2
|
export { Menu, MenuArrowProps, MenuCheckboxItemIndicatorProps, MenuCheckboxItemProps, MenuGroupLabelProps, MenuGroupProps, MenuItemProps, MenuPopupProps, MenuPortalProps, MenuPositionerProps, MenuProps, MenuRadioGroupProps, MenuRadioItemIndicatorProps, MenuRadioItemProps, MenuSeparatorProps, MenuShortcutProps, MenuSubmenuRootProps, MenuSubmenuTriggerProps, MenuTriggerProps, MenuViewportProps };
|
|
@@ -225,7 +225,7 @@ declare function MenubarSubmenuTrigger({
|
|
|
225
225
|
*/
|
|
226
226
|
declare const Menubar: {
|
|
227
227
|
Root: typeof MenubarRoot;
|
|
228
|
-
Menu: <Payload>(props: Menu.Root.Props<Payload>) =>
|
|
228
|
+
Menu: <Payload>(props: Menu.Root.Props<Payload>) => React.JSX.Element;
|
|
229
229
|
Trigger: typeof MenubarTrigger;
|
|
230
230
|
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
231
231
|
Positioner: typeof MenubarPositioner;
|
|
@@ -142,7 +142,7 @@ declare function PreviewCardArrow({
|
|
|
142
142
|
*/
|
|
143
143
|
declare const PreviewCard: {
|
|
144
144
|
createHandle: typeof PreviewCard$1.createHandle;
|
|
145
|
-
Root: <Payload>(props: PreviewCard$1.Root.Props<Payload>) =>
|
|
145
|
+
Root: <Payload>(props: PreviewCard$1.Root.Props<Payload>) => React.JSX.Element;
|
|
146
146
|
Trigger: typeof PreviewCardTrigger;
|
|
147
147
|
Portal: typeof PreviewCardPortal;
|
|
148
148
|
Backdrop: typeof PreviewCardBackdrop;
|
|
@@ -80,7 +80,7 @@ declare function TooltipArrow({
|
|
|
80
80
|
*/
|
|
81
81
|
declare const Tooltip: {
|
|
82
82
|
createHandle: typeof Tooltip$1.createHandle;
|
|
83
|
-
Root: <Payload>(props: Tooltip$1.Root.Props<Payload>) =>
|
|
83
|
+
Root: <Payload>(props: Tooltip$1.Root.Props<Payload>) => React.JSX.Element;
|
|
84
84
|
Provider: typeof TooltipProvider;
|
|
85
85
|
Trigger: typeof TooltipTrigger;
|
|
86
86
|
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FileTreeIcon, i as FileTreeFolder, n as FileTreeActions, o as FileTreeName, r as FileTreeFile, t as FileTree } from "../../FileTree-
|
|
1
|
+
import { a as FileTreeIcon, i as FileTreeFolder, n as FileTreeActions, o as FileTreeName, r as FileTreeFile, t as FileTree } from "../../FileTree-DruTQ-oa.js";
|
|
2
2
|
export { FileTree, FileTreeActions, FileTreeFile, FileTreeFolder, FileTreeIcon, FileTreeName };
|
|
@@ -11,4 +11,24 @@
|
|
|
11
11
|
border-color: GrayText;
|
|
12
12
|
color: GrayText;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
:where([data-slot="meter-track"], [data-slot="progress-track"], [data-slot="slider-track"]) {
|
|
16
|
+
background-color: Canvas;
|
|
17
|
+
outline: var(--sigvelo-border-width) solid CanvasText;
|
|
18
|
+
outline-offset: calc(-1 * var(--sigvelo-border-width));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(
|
|
22
|
+
[data-slot="meter-indicator"],
|
|
23
|
+
[data-slot="progress-indicator"],
|
|
24
|
+
[data-slot="slider-indicator"]
|
|
25
|
+
) {
|
|
26
|
+
background-color: Highlight;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Base UI focuses the hidden range input inside the visible thumb. */
|
|
30
|
+
.slider__thumb:has(:focus-visible) {
|
|
31
|
+
outline: var(--sigvelo-focus-ring-forced);
|
|
32
|
+
outline-offset: var(--sigvelo-focus-offset);
|
|
33
|
+
}
|
|
14
34
|
}
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
|
|
564
564
|
.agent-chat-start-screen__composer-tray:has(> :nth-child(3):last-child) {
|
|
565
565
|
display: grid;
|
|
566
|
-
grid-template-columns: repeat(3,
|
|
566
|
+
grid-template-columns: repeat(3, var(--sigvelo-layout-track-fill));
|
|
567
567
|
}
|
|
568
568
|
|
|
569
569
|
.agent-chat-start-screen__composer-tray:has(> :nth-child(3):last-child) > .button {
|
package/dist/styles/base.css
CHANGED
|
@@ -192,11 +192,3 @@ textarea {
|
|
|
192
192
|
.tabular-nums {
|
|
193
193
|
font-variant-numeric: tabular-nums;
|
|
194
194
|
}
|
|
195
|
-
|
|
196
|
-
@media (prefers-contrast: more) {
|
|
197
|
-
:root {
|
|
198
|
-
--sigvelo-color-neutral-border-muted: var(--sigvelo-color-neutral-600);
|
|
199
|
-
--sigvelo-color-neutral-border-subtle: var(--sigvelo-color-neutral-500);
|
|
200
|
-
--sigvelo-color-neutral-bg-subtle: var(--sigvelo-color-neutral-200);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
@@ -164,6 +164,10 @@
|
|
|
164
164
|
line-height: var(--sigvelo-leading-compact);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
.codex-model-selector__option[data-highlighted] .codex-model-selector__option-description {
|
|
168
|
+
color: inherit;
|
|
169
|
+
}
|
|
170
|
+
|
|
167
171
|
.codex-model-selector__option-indicator {
|
|
168
172
|
order: 2;
|
|
169
173
|
margin-inline-start: auto;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { expect, test } from "vitest";
|
|
2
|
+
import { cdp, page } from "vitest/browser";
|
|
3
|
+
import { act, createElement } from "react";
|
|
4
|
+
import { createRoot } from "react-dom/client";
|
|
5
|
+
import { FileTree, FileTreeFile, FileTreeFolder } from "../components/general-purpose/FileTree.js";
|
|
6
|
+
import presetsCss from "../../../design-tokens/src/color-presets.css?raw";
|
|
7
|
+
import "./index.css";
|
|
8
|
+
|
|
9
|
+
const presets = [
|
|
10
|
+
"",
|
|
11
|
+
...new Set([...presetsCss.matchAll(/data-preset="([^"]+)"/g)].map((m) => m[1])),
|
|
12
|
+
];
|
|
13
|
+
const colorPrefix = "--sigvelo-color-";
|
|
14
|
+
|
|
15
|
+
function luminance(channels: Uint8ClampedArray) {
|
|
16
|
+
return [0.2126, 0.7152, 0.0722].reduce((sum, weight, index) => {
|
|
17
|
+
const channel = channels[index] / 255;
|
|
18
|
+
return (
|
|
19
|
+
sum + weight * (channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4)
|
|
20
|
+
);
|
|
21
|
+
}, 0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function contrastRatio(
|
|
25
|
+
context: CanvasRenderingContext2D,
|
|
26
|
+
foreground: string,
|
|
27
|
+
background: string,
|
|
28
|
+
surface: string,
|
|
29
|
+
) {
|
|
30
|
+
context.fillStyle = surface;
|
|
31
|
+
context.fillRect(0, 0, 1, 1);
|
|
32
|
+
context.fillStyle = background;
|
|
33
|
+
context.fillRect(0, 0, 1, 1);
|
|
34
|
+
const backgroundLuminance = luminance(context.getImageData(0, 0, 1, 1).data);
|
|
35
|
+
context.fillStyle = foreground;
|
|
36
|
+
context.fillRect(0, 0, 1, 1);
|
|
37
|
+
const foregroundLuminance = luminance(context.getImageData(0, 0, 1, 1).data);
|
|
38
|
+
return (
|
|
39
|
+
(Math.max(backgroundLuminance, foregroundLuminance) + 0.05) /
|
|
40
|
+
(Math.min(backgroundLuminance, foregroundLuminance) + 0.05)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
test.each(["light", "dark"])("semantic color pairs stay readable in %s mode", async (theme) => {
|
|
45
|
+
const root = document.documentElement;
|
|
46
|
+
const probe = document.createElement("div");
|
|
47
|
+
const canvas = document.createElement("canvas");
|
|
48
|
+
canvas.width = canvas.height = 1;
|
|
49
|
+
const context = canvas.getContext("2d");
|
|
50
|
+
if (!context) throw new Error("Contrast checks require a canvas context");
|
|
51
|
+
document.body.append(probe);
|
|
52
|
+
root.dataset.theme = theme;
|
|
53
|
+
|
|
54
|
+
try {
|
|
55
|
+
for (const preset of presets) {
|
|
56
|
+
if (preset) root.dataset.preset = preset;
|
|
57
|
+
else delete root.dataset.preset;
|
|
58
|
+
|
|
59
|
+
for (const family of ["primary", "neutral", "success", "warning", "danger"]) {
|
|
60
|
+
const pairs = [
|
|
61
|
+
[`${family}-bg`, `${family}-text-on-bg`],
|
|
62
|
+
[`${family}-bg-subtle`, `${family}-text-on-subtle`],
|
|
63
|
+
[`${family}-bg-strong`, `${family}-text-on-strong`],
|
|
64
|
+
["surface", `${family}-text`],
|
|
65
|
+
];
|
|
66
|
+
if (family === "primary" || family === "danger") {
|
|
67
|
+
pairs.push(
|
|
68
|
+
[`${family}-bg-hover`, `${family}-text-on-bg`],
|
|
69
|
+
[`${family}-bg-press`, `${family}-text-on-bg`],
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
for (const [background, foreground] of pairs) {
|
|
74
|
+
probe.style.cssText = `background: var(${colorPrefix}${background}); color: var(${colorPrefix}${foreground}); border-color: var(--sigvelo-color-surface)`;
|
|
75
|
+
const style = getComputedStyle(probe);
|
|
76
|
+
const ratio = contrastRatio(
|
|
77
|
+
context,
|
|
78
|
+
style.color,
|
|
79
|
+
style.backgroundColor,
|
|
80
|
+
style.borderColor,
|
|
81
|
+
);
|
|
82
|
+
expect(
|
|
83
|
+
ratio,
|
|
84
|
+
`${preset || "default"}: ${foreground} on ${background}`,
|
|
85
|
+
).toBeGreaterThanOrEqual(4.5);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
delete root.dataset.preset;
|
|
91
|
+
probe.style.backgroundColor = "var(--sigvelo-color-neutral-bg-subtle)";
|
|
92
|
+
await cdp().send("Emulation.setEmulatedMedia", {
|
|
93
|
+
features: [{ name: "prefers-contrast", value: "no-preference" }],
|
|
94
|
+
});
|
|
95
|
+
const background = getComputedStyle(probe).backgroundColor;
|
|
96
|
+
await cdp().send("Emulation.setEmulatedMedia", {
|
|
97
|
+
features: [{ name: "prefers-contrast", value: "more" }],
|
|
98
|
+
});
|
|
99
|
+
expect(getComputedStyle(probe).backgroundColor).toBe(background);
|
|
100
|
+
} finally {
|
|
101
|
+
probe.remove();
|
|
102
|
+
delete root.dataset.theme;
|
|
103
|
+
delete root.dataset.preset;
|
|
104
|
+
await cdp().send("Emulation.setEmulatedMedia", { features: [] });
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test.each(["light", "dark"])("selected FileTree rows stay readable in %s mode", async (theme) => {
|
|
109
|
+
const root = document.documentElement;
|
|
110
|
+
const fixture = document.createElement("div");
|
|
111
|
+
const canvas = document.createElement("canvas");
|
|
112
|
+
canvas.width = canvas.height = 1;
|
|
113
|
+
const context = canvas.getContext("2d");
|
|
114
|
+
if (!context) throw new Error("Contrast checks require a canvas context");
|
|
115
|
+
document.body.append(fixture);
|
|
116
|
+
const reactRoot = createRoot(fixture);
|
|
117
|
+
act(() =>
|
|
118
|
+
reactRoot.render(
|
|
119
|
+
createElement(
|
|
120
|
+
"div",
|
|
121
|
+
null,
|
|
122
|
+
createElement(
|
|
123
|
+
FileTree,
|
|
124
|
+
{ selectedPath: "src" },
|
|
125
|
+
createElement(FileTreeFolder, { path: "src", name: "Source" }),
|
|
126
|
+
),
|
|
127
|
+
createElement(
|
|
128
|
+
FileTree,
|
|
129
|
+
{ selectedPath: "index.ts" },
|
|
130
|
+
createElement(FileTreeFile, { path: "index.ts", name: "index.ts" }),
|
|
131
|
+
),
|
|
132
|
+
),
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
root.dataset.theme = theme;
|
|
136
|
+
|
|
137
|
+
try {
|
|
138
|
+
const nodes = fixture.querySelectorAll<HTMLElement>(".file-tree__node[data-selected]");
|
|
139
|
+
expect(nodes).toHaveLength(2);
|
|
140
|
+
for (const node of nodes) {
|
|
141
|
+
for (const hovered of [false, true]) {
|
|
142
|
+
if (hovered) await page.elementLocator(node).hover();
|
|
143
|
+
else await page.elementLocator(node).unhover();
|
|
144
|
+
expect(node.matches(":hover")).toBe(hovered);
|
|
145
|
+
for (const preset of presets) {
|
|
146
|
+
if (preset) root.dataset.preset = preset;
|
|
147
|
+
else delete root.dataset.preset;
|
|
148
|
+
for (const animation of node.getAnimations()) animation.finish();
|
|
149
|
+
const style = getComputedStyle(node);
|
|
150
|
+
const surface = getComputedStyle(fixture.querySelector(".file-tree")!).backgroundColor;
|
|
151
|
+
expect(
|
|
152
|
+
contrastRatio(context, style.color, style.backgroundColor, surface),
|
|
153
|
+
`${preset || "default"}: ${node.textContent}, hover=${hovered}`,
|
|
154
|
+
).toBeGreaterThanOrEqual(4.5);
|
|
155
|
+
for (const icon of node.querySelectorAll(".file-tree__icon, .file-tree__chevron")) {
|
|
156
|
+
expect(
|
|
157
|
+
contrastRatio(context, getComputedStyle(icon).color, style.backgroundColor, surface),
|
|
158
|
+
`${preset || "default"}: ${node.textContent} icon, hover=${hovered}`,
|
|
159
|
+
).toBeGreaterThanOrEqual(3);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
} finally {
|
|
165
|
+
act(() => reactRoot.unmount());
|
|
166
|
+
fixture.remove();
|
|
167
|
+
delete root.dataset.theme;
|
|
168
|
+
delete root.dataset.preset;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
test("forced colors preserve scalar indicators and slider keyboard focus", async () => {
|
|
173
|
+
const fixture = document.createElement("div");
|
|
174
|
+
fixture.className = "progress--destructive";
|
|
175
|
+
document.body.append(fixture);
|
|
176
|
+
try {
|
|
177
|
+
await cdp().send("Emulation.setEmulatedMedia", {
|
|
178
|
+
features: [{ name: "forced-colors", value: "active" }],
|
|
179
|
+
});
|
|
180
|
+
const systemColor = document.createElement("div");
|
|
181
|
+
systemColor.style.backgroundColor = "Highlight";
|
|
182
|
+
fixture.append(systemColor);
|
|
183
|
+
|
|
184
|
+
for (const name of ["meter", "progress", "slider"]) {
|
|
185
|
+
const track = document.createElement("div");
|
|
186
|
+
const indicator = document.createElement("div");
|
|
187
|
+
track.className = `${name}__track`;
|
|
188
|
+
track.dataset.slot = `${name}-track`;
|
|
189
|
+
indicator.className = `${name}__indicator`;
|
|
190
|
+
indicator.dataset.slot = `${name}-indicator`;
|
|
191
|
+
track.append(indicator);
|
|
192
|
+
fixture.append(track);
|
|
193
|
+
expect(getComputedStyle(track).outlineStyle, name).toBe("solid");
|
|
194
|
+
expect(getComputedStyle(indicator).backgroundColor, name).toBe(
|
|
195
|
+
getComputedStyle(systemColor).backgroundColor,
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const thumb = document.createElement("div");
|
|
200
|
+
thumb.className = "slider__thumb";
|
|
201
|
+
const range = document.createElement("input");
|
|
202
|
+
range.type = "range";
|
|
203
|
+
thumb.append(range);
|
|
204
|
+
fixture.append(thumb);
|
|
205
|
+
range.focus();
|
|
206
|
+
expect(range.matches(":focus-visible")).toBe(true);
|
|
207
|
+
expect(getComputedStyle(thumb).outlineStyle).toBe("solid");
|
|
208
|
+
} finally {
|
|
209
|
+
fixture.remove();
|
|
210
|
+
await cdp().send("Emulation.setEmulatedMedia", { features: [] });
|
|
211
|
+
}
|
|
212
|
+
});
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
|
|
111
111
|
.file-tree__node[data-selected] {
|
|
112
112
|
background-color: var(--sigvelo-color-primary-bg-subtle);
|
|
113
|
-
color: var(--sigvelo-color-primary-text);
|
|
113
|
+
color: var(--sigvelo-color-primary-text-on-subtle);
|
|
114
114
|
font-weight: var(--sigvelo-font-weight-semibold);
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -157,6 +157,10 @@
|
|
|
157
157
|
color: var(--sigvelo-color-primary-text);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
.file-tree__node[data-selected] :is(.file-tree__icon, .file-tree__chevron) {
|
|
161
|
+
color: inherit;
|
|
162
|
+
}
|
|
163
|
+
|
|
160
164
|
.file-tree__actions {
|
|
161
165
|
display: inline-flex;
|
|
162
166
|
align-items: center;
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
--manager-office-face: 2.625rem;
|
|
117
117
|
|
|
118
118
|
display: grid;
|
|
119
|
-
grid-template-columns:
|
|
120
|
-
grid-template-rows: auto
|
|
119
|
+
grid-template-columns: var(--sigvelo-layout-track-fill) auto;
|
|
120
|
+
grid-template-rows: auto var(--sigvelo-layout-track-fill);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.manager-office__sidebar[data-layout="chat"] .manager-office__sidebar-heading {
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
min-block-size: var(--sigvelo-density-compact-control-height);
|
|
212
212
|
padding: var(--sigvelo-spacing-1-5) var(--sigvelo-spacing-2);
|
|
213
213
|
display: grid;
|
|
214
|
-
grid-template-columns:
|
|
214
|
+
grid-template-columns: var(--sigvelo-layout-track-fill) auto;
|
|
215
215
|
align-items: center;
|
|
216
216
|
gap: var(--sigvelo-spacing-2);
|
|
217
217
|
border: var(--sigvelo-border-style) var(--sigvelo-border-width)
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
padding-block: 0;
|
|
296
296
|
padding-inline: var(--sigvelo-spacing-2);
|
|
297
297
|
display: grid;
|
|
298
|
-
grid-template-columns: var(--manager-office-face)
|
|
298
|
+
grid-template-columns: var(--manager-office-face) var(--sigvelo-layout-track-fill);
|
|
299
299
|
align-items: center;
|
|
300
300
|
gap: var(--sigvelo-spacing-1-5);
|
|
301
301
|
border-radius: var(--sigvelo-radius-md);
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
.manager-office__employee-header {
|
|
550
550
|
min-inline-size: 0;
|
|
551
551
|
display: grid;
|
|
552
|
-
grid-template-columns: auto
|
|
552
|
+
grid-template-columns: auto var(--sigvelo-layout-track-fill);
|
|
553
553
|
align-items: start;
|
|
554
554
|
gap: var(--sigvelo-spacing-3);
|
|
555
555
|
padding-block: var(--sigvelo-spacing-1);
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
.responsive-sidebar-shell[data-sidebar-toggle-placement="sidebar"]
|
|
50
50
|
.responsive-sidebar-shell__sidebar {
|
|
51
51
|
display: grid;
|
|
52
|
-
grid-template-rows: auto
|
|
52
|
+
grid-template-rows: auto var(--sigvelo-layout-track-fill);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.responsive-sidebar-shell__sidebar-leading {
|
|
@@ -52,18 +52,37 @@ type CodexModelListResponse = {
|
|
|
52
52
|
data: CodexModel[]; /** Opaque cursor for the next `model/list` request. */
|
|
53
53
|
nextCursor: string | null;
|
|
54
54
|
};
|
|
55
|
-
/**
|
|
56
|
-
declare const CODEX_MODEL_IDS: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.2"];
|
|
55
|
+
/** Known visible model ids from upstream Codex and its desktop catalog. */
|
|
56
|
+
declare const CODEX_MODEL_IDS: readonly ["gpt-6-astra", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.2"];
|
|
57
57
|
type CodexModelId = (typeof CODEX_MODEL_IDS)[number];
|
|
58
58
|
/** Preserves literal ids and capability values for checked-in Codex catalogs. */
|
|
59
59
|
declare function defineCodexModels<const Models extends readonly CodexModel[]>(models: Models): Models;
|
|
60
60
|
/**
|
|
61
|
-
* Checked-in snapshot of
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* availability differs by account and rollout.
|
|
61
|
+
* Checked-in snapshot of Codex's upstream and desktop model catalogs.
|
|
62
|
+
* Display data for hosts without a live `model/list`; runtime account catalogs
|
|
63
|
+
* remain authoritative because availability differs by account and rollout.
|
|
65
64
|
*/
|
|
66
65
|
declare const CHECKED_IN_CODEX_MODELS: readonly [{
|
|
66
|
+
readonly id: "gpt-6-astra";
|
|
67
|
+
readonly model: "gpt-6-astra";
|
|
68
|
+
readonly displayName: "GPT-6 Astra";
|
|
69
|
+
readonly description: "Our most capable model for complex, demanding work.";
|
|
70
|
+
readonly supportedReasoningEfforts: [...CodexReasoningEffortOption[], CodexReasoningEffortOption, {
|
|
71
|
+
readonly reasoningEffort: "ultra";
|
|
72
|
+
readonly description: "Maximum reasoning with automatic task delegation";
|
|
73
|
+
}];
|
|
74
|
+
readonly defaultReasoningEffort: "medium";
|
|
75
|
+
readonly isDefault: false;
|
|
76
|
+
readonly upgrade: null;
|
|
77
|
+
readonly upgradeInfo: null;
|
|
78
|
+
readonly availabilityNux: null;
|
|
79
|
+
readonly hidden: boolean;
|
|
80
|
+
readonly inputModalities: ("text" | "image")[];
|
|
81
|
+
readonly supportsPersonality: boolean;
|
|
82
|
+
readonly additionalSpeedTiers: never[];
|
|
83
|
+
readonly serviceTiers: never[];
|
|
84
|
+
readonly defaultServiceTier: null;
|
|
85
|
+
}, {
|
|
67
86
|
readonly id: "gpt-5.6-sol";
|
|
68
87
|
readonly model: "gpt-5.6-sol";
|
|
69
88
|
readonly displayName: "GPT-5.6-Sol";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/utils/codex-model-catalog.ts
|
|
2
|
-
/**
|
|
2
|
+
/** Known visible model ids from upstream Codex and its desktop catalog. */
|
|
3
3
|
const CODEX_MODEL_IDS = [
|
|
4
|
+
"gpt-6-astra",
|
|
4
5
|
"gpt-5.6-sol",
|
|
5
6
|
"gpt-5.6-terra",
|
|
6
7
|
"gpt-5.6-luna",
|
|
@@ -47,12 +48,28 @@ const checkedInModelMetadata = {
|
|
|
47
48
|
defaultServiceTier: null
|
|
48
49
|
};
|
|
49
50
|
/**
|
|
50
|
-
* Checked-in snapshot of
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* availability differs by account and rollout.
|
|
51
|
+
* Checked-in snapshot of Codex's upstream and desktop model catalogs.
|
|
52
|
+
* Display data for hosts without a live `model/list`; runtime account catalogs
|
|
53
|
+
* remain authoritative because availability differs by account and rollout.
|
|
54
54
|
*/
|
|
55
55
|
const CHECKED_IN_CODEX_MODELS = defineCodexModels([
|
|
56
|
+
{
|
|
57
|
+
...checkedInModelMetadata,
|
|
58
|
+
id: "gpt-6-astra",
|
|
59
|
+
model: "gpt-6-astra",
|
|
60
|
+
displayName: "GPT-6 Astra",
|
|
61
|
+
description: "Our most capable model for complex, demanding work.",
|
|
62
|
+
supportedReasoningEfforts: [
|
|
63
|
+
...standardReasoningEfforts,
|
|
64
|
+
maxReasoningEffort,
|
|
65
|
+
{
|
|
66
|
+
reasoningEffort: "ultra",
|
|
67
|
+
description: "Maximum reasoning with automatic task delegation"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
defaultReasoningEffort: "medium",
|
|
71
|
+
isDefault: false
|
|
72
|
+
},
|
|
56
73
|
{
|
|
57
74
|
...checkedInModelMetadata,
|
|
58
75
|
id: "gpt-5.6-sol",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/react-components",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.1",
|
|
4
4
|
"description": "MCP-B React components built on Base UI and shared design tokens, including Cloudflare Think chat primitives.",
|
|
5
5
|
"homepage": "https://design-system.sigvelo.com",
|
|
6
6
|
"bugs": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@base-ui/react": "~1.
|
|
41
|
+
"@base-ui/react": "~1.8.0",
|
|
42
42
|
"@rrweb/replay": "^2.1.1",
|
|
43
43
|
"@shadcn/react": "^0.2.1",
|
|
44
44
|
"@streamdown/cjk": "^1.0.3",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"streamdown": "^2.5.0",
|
|
55
55
|
"unist-util-visit": "^5.1.0",
|
|
56
56
|
"yet-another-react-lightbox": "^3.32.2",
|
|
57
|
-
"@mcp-b/design-tokens": "0.49.
|
|
57
|
+
"@mcp-b/design-tokens": "0.49.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@ai-sdk/react": "^3.0.249",
|