@mcp-b/react-components 0.11.0 → 0.13.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.
- package/dist/{AgentChat-B9LD_WF1.d.ts → AgentChat-Br6tKEl8.d.ts} +38 -10
- package/dist/{BrowserLiveView-ZktFZiMD.d.ts → BrowserLiveView-BV5qgFgI.d.ts} +11 -10
- package/dist/{BrowserReplay-6G-mnwcn.d.ts → BrowserReplay-xWvRjRAC.d.ts} +2 -1
- package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
- package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
- package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
- package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
- package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
- package/dist/{Menu-B5vDqZe_.d.ts → Menu-Bgu-ufb5.d.ts} +29 -65
- package/dist/{ModelSelector-DXtpcRmT.js → ModelSelector-DVgVBdvw.js} +23 -20
- package/dist/{PromptInput-D6-G24p7.d.ts → PromptInput-p5KmOmt1.d.ts} +313 -89
- package/dist/Select-Dl_vF_Bt.d.ts +213 -0
- package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
- package/dist/ThinkChat-7DQ2CogF.js +222 -0
- package/dist/{ThinkChatActivity-B2UD95My.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +4 -4
- package/dist/ThinkChatContext-C3Eb1Xpi.d.ts +16 -0
- package/dist/{ThinkChatToolParts-DnUiZgCC.d.ts → ThinkChatToolParts-Cv4o7j6F.d.ts} +13 -5
- package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
- package/dist/components/Accordion.d.ts +17 -6
- package/dist/components/Accordion.js +23 -36
- package/dist/components/Activity.d.ts +5 -5
- package/dist/components/Activity.js +9 -9
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +354 -132
- package/dist/components/AgentConnection.js +6 -22
- package/dist/components/AlertDialog.d.ts +40 -32
- package/dist/components/AlertDialog.js +46 -39
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +5 -5
- package/dist/components/Autocomplete.js +10 -2
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Avatar.js +3 -3
- package/dist/components/Badge.d.ts +11 -14
- package/dist/components/Badge.js +11 -33
- package/dist/components/BrowserLiveView.d.ts +1 -1
- package/dist/components/BrowserLiveView.js +39 -45
- package/dist/components/BrowserReplay.d.ts +1 -1
- package/dist/components/BrowserReplay.js +4 -4
- package/dist/components/BrowserRunPanel.js +91 -55
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Button.js +7 -30
- package/dist/components/ChainOfThought.d.ts +5 -5
- package/dist/components/ChainOfThought.js +8 -5
- package/dist/components/ChatGptSignInScreen.js +3 -3
- package/dist/components/Checkbox.d.ts +10 -2
- package/dist/components/Checkbox.js +13 -6
- package/dist/components/CheckboxGroup.d.ts +6 -6
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +58 -0
- package/dist/components/CodexModelSelector.js +170 -0
- package/dist/components/Collapsible.d.ts +2 -4
- package/dist/components/Collapsible.js +9 -7
- package/dist/components/Combobox.d.ts +2 -2
- package/dist/components/Combobox.js +20 -22
- package/dist/components/Commit.d.ts +6 -6
- package/dist/components/Commit.js +14 -26
- package/dist/components/Context.js +5 -1
- package/dist/components/ContextMenu.d.ts +20 -72
- package/dist/components/ContextMenu.js +46 -56
- package/dist/components/Conversation.d.ts +3 -7
- package/dist/components/Conversation.js +3 -4
- package/dist/components/Dialog.d.ts +38 -30
- package/dist/components/Dialog.js +46 -34
- package/dist/components/EnvironmentVariables.d.ts +2 -7
- package/dist/components/EnvironmentVariables.js +13 -36
- package/dist/components/Field.d.ts +3 -3
- package/dist/components/Field.js +7 -8
- package/dist/components/Fieldset.d.ts +2 -2
- package/dist/components/Fieldset.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Label.d.ts +1 -1
- package/dist/components/Label.js +1 -1
- package/dist/components/Marker.js +1 -15
- package/dist/components/McpServerPicker.d.ts +31 -6
- package/dist/components/McpServerPicker.js +136 -72
- package/dist/components/Menu.d.ts +2 -2
- package/dist/components/Menu.js +41 -51
- package/dist/components/Menubar.d.ts +16 -52
- package/dist/components/Menubar.js +44 -56
- package/dist/components/Message.d.ts +4 -3
- package/dist/components/Message.js +16 -9
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/Meter.js +5 -0
- package/dist/components/ModelSelector.d.ts +12 -9
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +3 -14
- package/dist/components/NavigationMenu.js +22 -38
- package/dist/components/NumberField.js +6 -0
- package/dist/components/Popover.d.ts +21 -44
- package/dist/components/Popover.js +33 -23
- package/dist/components/PreviewCard.d.ts +20 -18
- package/dist/components/PreviewCard.js +30 -20
- package/dist/components/PricingPage.js +30 -29
- package/dist/components/Progress.d.ts +7 -3
- package/dist/components/Progress.js +9 -4
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +184 -148
- package/dist/components/Queue.d.ts +8 -19
- package/dist/components/Queue.js +6 -6
- package/dist/components/RadioGroup.d.ts +10 -9
- package/dist/components/RadioGroup.js +8 -9
- package/dist/components/Reasoning.d.ts +4 -4
- package/dist/components/Reasoning.js +12 -21
- package/dist/components/ScrollArea.d.ts +2 -9
- package/dist/components/ScrollArea.js +5 -23
- package/dist/components/Select.d.ts +2 -2
- package/dist/components/Select.js +100 -134
- package/dist/components/Slider.d.ts +10 -7
- package/dist/components/Slider.js +12 -11
- package/dist/components/Sources.d.ts +4 -4
- package/dist/components/Sources.js +8 -5
- package/dist/components/Stepper.js +2 -8
- package/dist/components/Switch.d.ts +6 -3
- package/dist/components/Switch.js +7 -4
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Task.d.ts +4 -4
- package/dist/components/Task.js +10 -6
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +5 -5
- package/dist/components/TestResults.d.ts +4 -4
- package/dist/components/TestResults.js +5 -5
- package/dist/components/ThinkChat.d.ts +37 -30
- package/dist/components/ThinkChat.js +1 -152
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +4 -11
- package/dist/components/ThinkChatContext.d.ts +2 -2
- package/dist/components/ThinkChatContext.js +9 -2
- package/dist/components/ThinkChatToolPanels.d.ts +1 -1
- package/dist/components/ThinkChatToolPanels.js +27 -15
- package/dist/components/ThinkChatToolParts.d.ts +1 -1
- package/dist/components/ThinkExecutionWorkbench.d.ts +10 -7
- package/dist/components/ThinkExecutionWorkbench.js +382 -359
- package/dist/components/ThinkFullApp.d.ts +16 -13
- package/dist/components/ThinkFullApp.js +35 -25
- package/dist/components/ThinkThreadPicker.d.ts +1 -31
- package/dist/components/ThinkThreadPicker.js +32 -171
- package/dist/components/ThinkThreadShell.d.ts +35 -0
- package/dist/components/ThinkThreadShell.js +146 -0
- package/dist/components/Toast.js +7 -0
- package/dist/components/ToggleGroup.d.ts +6 -2
- package/dist/components/ToggleGroup.js +6 -2
- package/dist/components/Toolbar.js +6 -0
- package/dist/components/Tooltip.d.ts +36 -27
- package/dist/components/Tooltip.js +45 -29
- package/dist/components/WebPreview.d.ts +1 -1
- package/dist/components/WebPreview.js +3 -3
- package/dist/components/WorkspaceExplorer.d.ts +6 -8
- package/dist/components/WorkspaceExplorer.js +9 -7
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
- package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
- package/dist/icons-Ba9THQKz.js +64 -0
- package/dist/icons-CUCz_Sft.d.ts +210 -0
- package/dist/merge-refs-DF_7w2x_.js +18 -0
- package/dist/styles/accessibility.css +14 -0
- package/dist/styles/accordion.css +21 -61
- package/dist/styles/activity.css +23 -58
- package/dist/styles/agent-chat.css +49 -5
- package/dist/styles/agent-connection.css +8 -10
- package/dist/styles/alert-dialog.css +20 -26
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +1 -1
- package/dist/styles/autocomplete.css +5 -170
- package/dist/styles/avatar.css +8 -8
- package/dist/styles/badge.css +8 -10
- package/dist/styles/base-ui-motion.css +176 -0
- package/dist/styles/base.css +19 -25
- package/dist/styles/browser-live-view.css +7 -7
- package/dist/styles/browser-replay.css +5 -5
- package/dist/styles/browser-run-panel.css +59 -112
- package/dist/styles/button.css +48 -43
- package/dist/styles/card.css +3 -5
- package/dist/styles/chain-of-thought.css +14 -70
- package/dist/styles/chatgpt-sign-in-screen.css +3 -3
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +3 -7
- package/dist/styles/code-block.css +10 -10
- package/dist/styles/codex-model-selector.css +186 -0
- package/dist/styles/collapsible.css +11 -27
- package/dist/styles/combobox.css +3 -149
- package/dist/styles/commit.css +19 -35
- package/dist/styles/context-menu.css +1 -77
- package/dist/styles/context.css +12 -12
- package/dist/styles/conversation.css +7 -7
- package/dist/styles/dialog.css +34 -55
- package/dist/styles/environment-variables.css +10 -10
- package/dist/styles/field.css +16 -58
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/file-tree.css +7 -9
- package/dist/styles/index.css +12 -2
- package/dist/styles/input.css +1 -51
- package/dist/styles/label.css +2 -2
- package/dist/styles/marker.css +2 -4
- package/dist/styles/mcp-server-picker.css +66 -19
- package/dist/styles/menu.css +6 -153
- package/dist/styles/menubar.css +6 -105
- package/dist/styles/message-scroller.css +1 -1
- package/dist/styles/message.css +87 -9
- package/dist/styles/meter.css +4 -20
- package/dist/styles/model-selector.css +32 -20
- package/dist/styles/navigation-menu.css +14 -54
- package/dist/styles/number-field.css +8 -23
- package/dist/styles/popover.css +13 -68
- package/dist/styles/preview-card.css +5 -46
- package/dist/styles/pricing-page.css +43 -43
- package/dist/styles/progress.css +7 -16
- package/dist/styles/prompt-input.css +100 -44
- package/dist/styles/queue.css +12 -28
- package/dist/styles/radio.css +4 -8
- package/dist/styles/reasoning.css +3 -62
- package/dist/styles/recipes.css +475 -0
- package/dist/styles/select.css +7 -103
- package/dist/styles/shell.css +3 -3
- package/dist/styles/slider.css +5 -7
- package/dist/styles/sources.css +9 -66
- package/dist/styles/stepper.css +16 -14
- package/dist/styles/streamdown.css +11 -57
- package/dist/styles/switch.css +4 -7
- package/dist/styles/tabs.css +7 -8
- package/dist/styles/task.css +13 -42
- package/dist/styles/terminal.css +7 -7
- package/dist/styles/test-results.css +21 -37
- package/dist/styles/think-execution-workbench.css +337 -0
- package/dist/styles/think-full-app.css +27 -410
- package/dist/styles/think-resize-handle.css +33 -0
- package/dist/styles/think-thread-picker.css +18 -247
- package/dist/styles/think-thread-shell.css +219 -0
- package/dist/styles/toast.css +14 -25
- package/dist/styles/toggle-group.css +16 -14
- package/dist/styles/toggle.css +14 -15
- package/dist/styles/toolbar.css +13 -25
- package/dist/styles/tooltip.css +6 -16
- package/dist/styles/web-preview.css +15 -15
- package/dist/styles/workspace-explorer.css +21 -14
- package/dist/summarize-tool-input-BUJsENSn.js +12 -0
- package/dist/utils/codex-model-catalog.d.ts +142 -0
- package/dist/utils/codex-model-catalog.js +112 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +8 -2
- package/dist/Select-CRsKCJ9x.d.ts +0 -200
- package/dist/ThinkChatContext-BLAAb8J5.d.ts +0 -28
- package/dist/components/McpServerConnections.d.ts +0 -41
- package/dist/components/McpServerConnections.js +0 -188
- package/dist/components/useStickToBottom.d.ts +0 -33
- package/dist/components/useStickToBottom.js +0 -107
- package/dist/icons-CbjtbIJK.d.ts +0 -51
- package/dist/icons-D2Q5n5C1.js +0 -291
- package/dist/styles/mcp-server-connections.css +0 -145
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { E as PauseIcon, O as PlayIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Slider
|
|
4
|
+
import { Slider } from "./Slider.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Replayer } from "@rrweb/replay";
|
|
@@ -161,7 +161,7 @@ function BrowserReplay({ className, events, autoPlay, ref, ...props }) {
|
|
|
161
161
|
onClick: handlePlayPause,
|
|
162
162
|
children: isPlaying ? /* @__PURE__ */ jsx(PauseIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
|
|
163
163
|
}),
|
|
164
|
-
/* @__PURE__ */ jsx(Slider, {
|
|
164
|
+
/* @__PURE__ */ jsx(Slider.Root, {
|
|
165
165
|
className: "browser-replay__scrubber",
|
|
166
166
|
min: 0,
|
|
167
167
|
max: Math.max(duration, 1),
|
|
@@ -169,7 +169,7 @@ function BrowserReplay({ className, events, autoPlay, ref, ...props }) {
|
|
|
169
169
|
value: Math.min(currentTime, duration),
|
|
170
170
|
disabled,
|
|
171
171
|
onValueChange: handleScrub,
|
|
172
|
-
children: /* @__PURE__ */ jsx(
|
|
172
|
+
children: /* @__PURE__ */ jsx(Slider.Control, { children: /* @__PURE__ */ jsxs(Slider.Track, { children: [/* @__PURE__ */ jsx(Slider.Indicator, {}), /* @__PURE__ */ jsx(Slider.Thumb, { "aria-label": "Replay position" })] }) })
|
|
173
173
|
}),
|
|
174
174
|
/* @__PURE__ */ jsxs("span", {
|
|
175
175
|
className: "browser-replay__time",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as SpinnerIcon, z as XIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
5
|
+
import { WebPreview, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl } from "./WebPreview.js";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/BrowserRunPanel.tsx
|
|
@@ -12,12 +13,15 @@ function isInspectablePage(target) {
|
|
|
12
13
|
function targetLabel(target) {
|
|
13
14
|
return target.title || target.pageUrl || target.targetId;
|
|
14
15
|
}
|
|
16
|
+
function targetGlyph(target) {
|
|
17
|
+
return (target.title || target.pageUrl || target.targetId).trim().charAt(0).toUpperCase() || "•";
|
|
18
|
+
}
|
|
15
19
|
function pickTarget(targets, targetId) {
|
|
16
20
|
return (targetId ? targets.find((target) => target.targetId === targetId) : void 0) ?? targets.find(isInspectablePage) ?? targets[0];
|
|
17
21
|
}
|
|
18
22
|
function BrowserRunPanelState({ children, role, tone = "neutral" }) {
|
|
19
23
|
return /* @__PURE__ */ jsx("div", {
|
|
20
|
-
className: "browser-run-panel__state",
|
|
24
|
+
className: "web-preview__body--empty browser-run-panel__state",
|
|
21
25
|
"data-tone": tone,
|
|
22
26
|
role: role ?? (tone === "danger" ? "alert" : void 0),
|
|
23
27
|
children
|
|
@@ -33,84 +37,116 @@ function BrowserRunPanelState({ children, role, tone = "neutral" }) {
|
|
|
33
37
|
function BrowserRunPanel({ liveView, onRefresh, onCloseSession, loading, error, label = "Browser", empty = "No live browser session", fallback, className, ref, ...props }) {
|
|
34
38
|
const [selectedTargetId, setSelectedTargetId] = React.useState();
|
|
35
39
|
const [receivedAt, setReceivedAt] = React.useState(() => Date.now());
|
|
40
|
+
const tabRefs = React.useRef(/* @__PURE__ */ new Map());
|
|
41
|
+
const tabListId = React.useId();
|
|
36
42
|
React.useEffect(() => {
|
|
37
43
|
if (liveView) setReceivedAt(Date.now());
|
|
38
44
|
}, [liveView]);
|
|
39
45
|
const targets = liveView?.targets ?? [];
|
|
40
46
|
const target = pickTarget(targets, selectedTargetId);
|
|
41
|
-
const
|
|
42
|
-
|
|
47
|
+
const pageUrl = target?.pageUrl ?? "";
|
|
48
|
+
const selectTarget = React.useCallback((nextTarget) => {
|
|
49
|
+
setSelectedTargetId(nextTarget.targetId);
|
|
50
|
+
}, []);
|
|
51
|
+
const handleTabListKeyDown = (event) => {
|
|
52
|
+
const currentIndex = targets.findIndex((candidate) => candidate.targetId === target?.targetId);
|
|
53
|
+
if (currentIndex < 0) return;
|
|
54
|
+
let nextIndex;
|
|
55
|
+
if (event.key === "ArrowRight") nextIndex = (currentIndex + 1) % targets.length;
|
|
56
|
+
if (event.key === "ArrowLeft") nextIndex = (currentIndex - 1 + targets.length) % targets.length;
|
|
57
|
+
if (event.key === "Home") nextIndex = 0;
|
|
58
|
+
if (event.key === "End") nextIndex = targets.length - 1;
|
|
59
|
+
if (nextIndex === void 0) return;
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
const nextTarget = targets[nextIndex];
|
|
62
|
+
if (!nextTarget) return;
|
|
63
|
+
selectTarget(nextTarget);
|
|
64
|
+
tabRefs.current.get(nextTarget.targetId)?.focus();
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsxs(WebPreview, {
|
|
43
67
|
ref,
|
|
44
68
|
className: cx("browser-run-panel", className),
|
|
69
|
+
url: pageUrl,
|
|
70
|
+
role: "region",
|
|
45
71
|
"aria-label": typeof label === "string" ? label : "Browser",
|
|
46
72
|
...props,
|
|
47
73
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})]
|
|
62
|
-
})]
|
|
63
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
64
|
-
className: "browser-run-panel__actions",
|
|
65
|
-
children: [onRefresh ? /* @__PURE__ */ jsx(Button, {
|
|
74
|
+
targets.length > 1 ? /* @__PURE__ */ jsx(WebPreviewNavigation, { children: /* @__PURE__ */ jsx("div", {
|
|
75
|
+
id: tabListId,
|
|
76
|
+
className: "browser-run-panel__tabs",
|
|
77
|
+
role: "tablist",
|
|
78
|
+
"aria-label": "Open browser pages",
|
|
79
|
+
onKeyDown: handleTabListKeyDown,
|
|
80
|
+
children: targets.map((candidate) => {
|
|
81
|
+
const selected = candidate.targetId === target?.targetId;
|
|
82
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
83
|
+
ref: (node) => {
|
|
84
|
+
if (node) tabRefs.current.set(candidate.targetId, node);
|
|
85
|
+
else tabRefs.current.delete(candidate.targetId);
|
|
86
|
+
},
|
|
66
87
|
type: "button",
|
|
67
88
|
variant: "ghost",
|
|
68
89
|
color: "neutral",
|
|
69
|
-
size: "
|
|
70
|
-
|
|
90
|
+
size: "sm",
|
|
91
|
+
className: "browser-run-panel__tab",
|
|
92
|
+
role: "tab",
|
|
93
|
+
id: `${tabListId}-${candidate.targetId}`,
|
|
94
|
+
"aria-selected": selected,
|
|
95
|
+
"aria-controls": `${tabListId}-panel`,
|
|
96
|
+
tabIndex: selected ? 0 : -1,
|
|
97
|
+
onClick: () => selectTarget(candidate),
|
|
98
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
99
|
+
className: "browser-run-panel__tab-glyph",
|
|
100
|
+
"aria-hidden": "true",
|
|
101
|
+
children: targetGlyph(candidate)
|
|
102
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
103
|
+
className: "browser-run-panel__tab-title",
|
|
104
|
+
children: targetLabel(candidate)
|
|
105
|
+
})]
|
|
106
|
+
}, candidate.targetId);
|
|
107
|
+
})
|
|
108
|
+
}) }) : null,
|
|
109
|
+
/* @__PURE__ */ jsxs(WebPreviewNavigation, {
|
|
110
|
+
className: "browser-run-panel__address-bar",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ jsx(WebPreviewUrl, {
|
|
113
|
+
"aria-label": "Browser page URL",
|
|
114
|
+
placeholder: "Waiting for browser session",
|
|
115
|
+
readOnly: true
|
|
116
|
+
}),
|
|
117
|
+
onRefresh ? /* @__PURE__ */ jsx(WebPreviewNavigationButton, {
|
|
118
|
+
action: "reload",
|
|
119
|
+
label: "Refresh browser view",
|
|
71
120
|
disabled: loading,
|
|
72
|
-
onClick: () => void onRefresh()
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
variant: "ghost",
|
|
77
|
-
color: "neutral",
|
|
78
|
-
size: "icon-sm",
|
|
79
|
-
"aria-label": "Close browser session",
|
|
121
|
+
onClick: () => void onRefresh()
|
|
122
|
+
}) : null,
|
|
123
|
+
onCloseSession ? /* @__PURE__ */ jsx(WebPreviewNavigationButton, {
|
|
124
|
+
label: "Close browser session",
|
|
80
125
|
onClick: () => void onCloseSession(),
|
|
81
126
|
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
82
|
-
}) : null
|
|
83
|
-
|
|
127
|
+
}) : null
|
|
128
|
+
]
|
|
84
129
|
}),
|
|
85
|
-
targets.length > 1 ? /* @__PURE__ */ jsx("div", {
|
|
86
|
-
className: "browser-run-panel__targets",
|
|
87
|
-
"aria-label": "Browser tabs",
|
|
88
|
-
children: targets.map((candidate) => /* @__PURE__ */ jsxs("button", {
|
|
89
|
-
type: "button",
|
|
90
|
-
className: "browser-run-panel__target",
|
|
91
|
-
"aria-pressed": candidate.targetId === target?.targetId,
|
|
92
|
-
onClick: () => setSelectedTargetId(candidate.targetId),
|
|
93
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
94
|
-
className: "browser-run-panel__target-title",
|
|
95
|
-
children: targetLabel(candidate)
|
|
96
|
-
}), candidate.pageUrl ? /* @__PURE__ */ jsx("span", {
|
|
97
|
-
className: "browser-run-panel__target-url",
|
|
98
|
-
children: candidate.pageUrl
|
|
99
|
-
}) : null]
|
|
100
|
-
}, candidate.targetId))
|
|
101
|
-
}) : null,
|
|
102
130
|
error ? /* @__PURE__ */ jsx(BrowserRunPanelState, {
|
|
103
131
|
tone: "danger",
|
|
104
132
|
children: error
|
|
105
133
|
}) : null,
|
|
106
134
|
/* @__PURE__ */ jsx("div", {
|
|
107
|
-
|
|
135
|
+
id: `${tabListId}-panel`,
|
|
136
|
+
className: "web-preview__body browser-run-panel__body",
|
|
137
|
+
role: targets.length > 1 ? "tabpanel" : void 0,
|
|
138
|
+
"aria-labelledby": targets.length > 1 && target ? `${tabListId}-${target.targetId}` : void 0,
|
|
108
139
|
"aria-busy": loading || void 0,
|
|
109
140
|
children: target && liveView ? /* @__PURE__ */ jsx(BrowserLiveView, {
|
|
110
|
-
|
|
111
|
-
|
|
141
|
+
source: {
|
|
142
|
+
url: target.url,
|
|
143
|
+
targetId: target.targetId,
|
|
144
|
+
expiresInMs: liveView.expiresInMs
|
|
145
|
+
},
|
|
146
|
+
receivedAt,
|
|
112
147
|
pageTitle: target.title ?? target.pageUrl,
|
|
113
|
-
fallback
|
|
148
|
+
fallback,
|
|
149
|
+
className: "browser-run-panel__live-view"
|
|
114
150
|
}) : loading ? /* @__PURE__ */ jsxs(BrowserRunPanelState, {
|
|
115
151
|
role: "status",
|
|
116
152
|
children: [/* @__PURE__ */ jsx(SpinnerIcon, { className: "browser-run-panel__spinner" }), "Loading browser session"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ButtonVariant,
|
|
2
|
-
export { Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, ButtonVariantsOptions,
|
|
1
|
+
import { a as ButtonVariant, i as ButtonSize, n as ButtonColor, o as ButtonVariantsOptions, r as ButtonProps, s as buttonVariants, t as Button } from "../Button-FX_hpqxm.js";
|
|
2
|
+
export { Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, ButtonVariantsOptions, buttonVariants };
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
3
|
//#region src/components/Button.tsx
|
|
4
|
-
|
|
5
|
-
default: ["normal", "primary"],
|
|
6
|
-
destructive: ["normal", "destructive"],
|
|
7
|
-
outline: ["outline", "neutral"],
|
|
8
|
-
secondary: ["normal", "neutral"],
|
|
9
|
-
ghost: ["ghost", "neutral"],
|
|
10
|
-
link: ["link", "primary"]
|
|
11
|
-
};
|
|
12
|
-
const SHADCN_BUTTON_SIZE = {
|
|
13
|
-
default: "md",
|
|
14
|
-
xs: "xs",
|
|
15
|
-
sm: "sm",
|
|
16
|
-
lg: "lg",
|
|
17
|
-
icon: "icon",
|
|
18
|
-
"icon-xs": "icon-xs",
|
|
19
|
-
"icon-sm": "icon-sm",
|
|
20
|
-
"icon-lg": "icon-lg"
|
|
21
|
-
};
|
|
22
|
-
function buttonVariants({ variant = "default", color, size = "default", className } = {}) {
|
|
23
|
-
const buttonVariant = variant ?? "default";
|
|
24
|
-
const mapped = buttonVariant === "normal" || buttonVariant === "outline" || buttonVariant === "ghost" || buttonVariant === "link" ? [buttonVariant, color ?? "primary"] : SHADCN_BUTTON_VARIANT[buttonVariant];
|
|
25
|
-
const requestedSize = size ?? "default";
|
|
26
|
-
const buttonSize = requestedSize === "default" ? "md" : SHADCN_BUTTON_SIZE[requestedSize] ?? requestedSize;
|
|
4
|
+
function buttonVariants({ variant = "normal", color = "primary", size = "md", className } = {}) {
|
|
27
5
|
return [
|
|
28
6
|
"button",
|
|
29
|
-
`button--${
|
|
30
|
-
`button--${color ??
|
|
31
|
-
`button--${
|
|
7
|
+
`button--${variant ?? "normal"}`,
|
|
8
|
+
`button--${color ?? "primary"}`,
|
|
9
|
+
`button--${size ?? "md"}`,
|
|
32
10
|
className
|
|
33
11
|
].filter(Boolean).join(" ");
|
|
34
12
|
}
|
|
@@ -37,8 +15,8 @@ function buttonVariants({ variant = "default", color, size = "default", classNam
|
|
|
37
15
|
*
|
|
38
16
|
* Separates visual style (`variant`) from color intent (`color`) for
|
|
39
17
|
* maximum flexibility. Supports keyboard navigation, focus management, and
|
|
40
|
-
* accessibility out of the box.
|
|
41
|
-
*
|
|
18
|
+
* accessibility out of the box. Styling uses the design system's canonical
|
|
19
|
+
* visual variant, semantic color, and size axes.
|
|
42
20
|
*
|
|
43
21
|
* @example
|
|
44
22
|
* ```tsx
|
|
@@ -49,9 +27,8 @@ function buttonVariants({ variant = "default", color, size = "default", classNam
|
|
|
49
27
|
* ```
|
|
50
28
|
*
|
|
51
29
|
* @see {@link https://base-ui.com/react/components/button | Base UI Button}
|
|
52
|
-
* @see {@link https://ui.shadcn.com/docs/components/base/button | shadcn/ui Button}
|
|
53
30
|
*/
|
|
54
|
-
function Button({ variant = "
|
|
31
|
+
function Button({ variant = "normal", color = "primary", size = "md", className, nativeButton, ref, ...props }) {
|
|
55
32
|
return /* @__PURE__ */ jsx(Button$1, {
|
|
56
33
|
ref,
|
|
57
34
|
"data-slot": "button",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as IconProps } from "../icons-
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
|
+
import { v as IconProps } from "../icons-CUCz_Sft.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ChainOfThought.d.ts
|
|
6
|
-
interface ChainOfThoughtProps extends Omit<
|
|
6
|
+
interface ChainOfThoughtProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
@@ -38,7 +38,7 @@ declare function ChainOfThought({
|
|
|
38
38
|
}: ChainOfThoughtProps & {
|
|
39
39
|
ref?: React.Ref<HTMLDivElement>;
|
|
40
40
|
}): React.JSX.Element;
|
|
41
|
-
interface ChainOfThoughtHeaderProps extends Omit<
|
|
41
|
+
interface ChainOfThoughtHeaderProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
|
|
42
42
|
className?: string;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -52,7 +52,7 @@ declare function ChainOfThoughtHeader({
|
|
|
52
52
|
}: ChainOfThoughtHeaderProps & {
|
|
53
53
|
ref?: React.Ref<HTMLButtonElement>;
|
|
54
54
|
}): React.JSX.Element;
|
|
55
|
-
interface ChainOfThoughtContentProps extends Omit<
|
|
55
|
+
interface ChainOfThoughtContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
|
|
56
56
|
className?: string;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
2
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
3
|
-
import {
|
|
3
|
+
import { N as SpinnerIcon, a as CheckIcon, c as ChevronRightIcon, u as DotIcon } from "../icons-Ba9THQKz.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ChainOfThought.tsx
|
|
@@ -30,7 +30,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
function ChainOfThought({ className, ref, ...props }) {
|
|
33
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
+
return /* @__PURE__ */ jsx(Collapsible.Root, {
|
|
34
34
|
ref,
|
|
35
35
|
className: cx("chain-of-thought", className),
|
|
36
36
|
...props,
|
|
@@ -41,12 +41,14 @@ function ChainOfThought({ className, ref, ...props }) {
|
|
|
41
41
|
* Clickable header row that toggles the reasoning trace.
|
|
42
42
|
*/
|
|
43
43
|
function ChainOfThoughtHeader({ className, children = "Chain of Thought", ref, ...props }) {
|
|
44
|
-
return /* @__PURE__ */ jsxs(
|
|
44
|
+
return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
45
45
|
ref,
|
|
46
|
+
"data-slot": "chain-of-thought-trigger",
|
|
46
47
|
className: cx("chain-of-thought__header", className),
|
|
47
48
|
...props,
|
|
48
49
|
unstyled: true,
|
|
49
50
|
children: [/* @__PURE__ */ jsx("span", {
|
|
51
|
+
"data-slot": "chain-of-thought-trigger-icon",
|
|
50
52
|
className: "chain-of-thought__header-icon",
|
|
51
53
|
"aria-hidden": "true",
|
|
52
54
|
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
@@ -60,8 +62,9 @@ function ChainOfThoughtHeader({ className, children = "Chain of Thought", ref, .
|
|
|
60
62
|
* Collapsible panel containing step rows.
|
|
61
63
|
*/
|
|
62
64
|
function ChainOfThoughtContent({ className, children, ref, ...props }) {
|
|
63
|
-
return /* @__PURE__ */ jsx(
|
|
65
|
+
return /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
64
66
|
ref,
|
|
67
|
+
"data-slot": "chain-of-thought-content",
|
|
65
68
|
className: cx("chain-of-thought__content", className),
|
|
66
69
|
...props,
|
|
67
70
|
unstyled: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as SpinnerIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { u as ModelSelectorLogo } from "../ModelSelector-
|
|
4
|
+
import { u as ModelSelectorLogo } from "../ModelSelector-DVgVBdvw.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ChatGptSignInScreen.tsx
|
|
@@ -40,7 +40,7 @@ function ChatGptSignInScreen({ busy = false, error = false, label = "Sign in wit
|
|
|
40
40
|
] })]
|
|
41
41
|
}), /* @__PURE__ */ jsxs(Button, {
|
|
42
42
|
type: "button",
|
|
43
|
-
variant: "
|
|
43
|
+
variant: "normal",
|
|
44
44
|
color: error ? "destructive" : "primary",
|
|
45
45
|
size: "lg",
|
|
46
46
|
className: "chatgpt-sign-in__button",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { CheckboxRootProps } from "@base-ui/react/checkbox";
|
|
2
|
+
import { Checkbox as Checkbox$1, CheckboxRootProps } from "@base-ui/react/checkbox";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Checkbox.d.ts
|
|
5
5
|
/**
|
|
@@ -24,12 +24,20 @@ interface CheckboxProps extends Omit<CheckboxRootProps, "className"> {
|
|
|
24
24
|
*
|
|
25
25
|
* @see {@link https://base-ui.com/react/components/checkbox | Base UI Checkbox}
|
|
26
26
|
*/
|
|
27
|
-
declare function
|
|
27
|
+
declare function CheckboxRoot({
|
|
28
28
|
className,
|
|
29
29
|
ref,
|
|
30
30
|
...props
|
|
31
31
|
}: CheckboxProps & {
|
|
32
32
|
ref?: React.Ref<HTMLButtonElement>;
|
|
33
33
|
}): React.JSX.Element;
|
|
34
|
+
declare function CheckboxIndicator({
|
|
35
|
+
children,
|
|
36
|
+
...props
|
|
37
|
+
}: Checkbox$1.Indicator.Props): React.JSX.Element;
|
|
38
|
+
declare const Checkbox: {
|
|
39
|
+
Root: typeof CheckboxRoot;
|
|
40
|
+
Indicator: typeof CheckboxIndicator;
|
|
41
|
+
};
|
|
34
42
|
//#endregion
|
|
35
43
|
export { Checkbox, CheckboxProps };
|
|
@@ -29,19 +29,26 @@ function CheckIcon(props) {
|
|
|
29
29
|
*
|
|
30
30
|
* @see {@link https://base-ui.com/react/components/checkbox | Base UI Checkbox}
|
|
31
31
|
*/
|
|
32
|
-
function
|
|
32
|
+
function CheckboxRoot({ className = "", ref, ...props }) {
|
|
33
33
|
const classes = ["checkbox", className].filter(Boolean).join(" ");
|
|
34
34
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
35
35
|
ref,
|
|
36
36
|
"data-slot": "checkbox",
|
|
37
37
|
className: classes,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function CheckboxIndicator({ children, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
43
|
+
"data-slot": "checkbox-indicator",
|
|
44
|
+
className: "checkbox__indicator",
|
|
38
45
|
...props,
|
|
39
|
-
children: /* @__PURE__ */ jsx(
|
|
40
|
-
"data-slot": "checkbox-indicator",
|
|
41
|
-
className: "checkbox__indicator",
|
|
42
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
43
|
-
})
|
|
46
|
+
children: children ?? /* @__PURE__ */ jsx(CheckIcon, {})
|
|
44
47
|
});
|
|
45
48
|
}
|
|
49
|
+
const Checkbox = {
|
|
50
|
+
Root: CheckboxRoot,
|
|
51
|
+
Indicator: CheckboxIndicator
|
|
52
|
+
};
|
|
46
53
|
//#endregion
|
|
47
54
|
export { Checkbox };
|
|
@@ -18,11 +18,11 @@ interface CheckboxGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof
|
|
|
18
18
|
* // Basic usage
|
|
19
19
|
* <CheckboxGroup defaultValue={['option1']}>
|
|
20
20
|
* <label>
|
|
21
|
-
* <Checkbox name="option1"
|
|
21
|
+
* <Checkbox.Root name="option1" ><Checkbox.Indicator /></Checkbox.Root>
|
|
22
22
|
* Option 1
|
|
23
23
|
* </label>
|
|
24
24
|
* <label>
|
|
25
|
-
* <Checkbox name="option2"
|
|
25
|
+
* <Checkbox.Root name="option2" ><Checkbox.Indicator /></Checkbox.Root>
|
|
26
26
|
* Option 2
|
|
27
27
|
* </label>
|
|
28
28
|
* </CheckboxGroup>
|
|
@@ -35,11 +35,11 @@ interface CheckboxGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof
|
|
|
35
35
|
*
|
|
36
36
|
* <CheckboxGroup value={values} onValueChange={setValues}>
|
|
37
37
|
* <label>
|
|
38
|
-
* <Checkbox name="email"
|
|
38
|
+
* <Checkbox.Root name="email" ><Checkbox.Indicator /></Checkbox.Root>
|
|
39
39
|
* Email notifications
|
|
40
40
|
* </label>
|
|
41
41
|
* <label>
|
|
42
|
-
* <Checkbox name="sms"
|
|
42
|
+
* <Checkbox.Root name="sms" ><Checkbox.Indicator /></Checkbox.Root>
|
|
43
43
|
* SMS notifications
|
|
44
44
|
* </label>
|
|
45
45
|
* </CheckboxGroup>
|
|
@@ -52,11 +52,11 @@ interface CheckboxGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof
|
|
|
52
52
|
* <Fieldset.Legend>Notifications</Fieldset.Legend>
|
|
53
53
|
* <CheckboxGroup defaultValue={['updates']}>
|
|
54
54
|
* <label>
|
|
55
|
-
* <Checkbox name="updates"
|
|
55
|
+
* <Checkbox.Root name="updates" ><Checkbox.Indicator /></Checkbox.Root>
|
|
56
56
|
* Product updates
|
|
57
57
|
* </label>
|
|
58
58
|
* <label>
|
|
59
|
-
* <Checkbox name="newsletter"
|
|
59
|
+
* <Checkbox.Root name="newsletter" ><Checkbox.Indicator /></Checkbox.Root>
|
|
60
60
|
* Newsletter
|
|
61
61
|
* </label>
|
|
62
62
|
* </CheckboxGroup>
|
|
@@ -11,11 +11,11 @@ import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group"
|
|
|
11
11
|
* // Basic usage
|
|
12
12
|
* <CheckboxGroup defaultValue={['option1']}>
|
|
13
13
|
* <label>
|
|
14
|
-
* <Checkbox name="option1"
|
|
14
|
+
* <Checkbox.Root name="option1" ><Checkbox.Indicator /></Checkbox.Root>
|
|
15
15
|
* Option 1
|
|
16
16
|
* </label>
|
|
17
17
|
* <label>
|
|
18
|
-
* <Checkbox name="option2"
|
|
18
|
+
* <Checkbox.Root name="option2" ><Checkbox.Indicator /></Checkbox.Root>
|
|
19
19
|
* Option 2
|
|
20
20
|
* </label>
|
|
21
21
|
* </CheckboxGroup>
|
|
@@ -28,11 +28,11 @@ import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group"
|
|
|
28
28
|
*
|
|
29
29
|
* <CheckboxGroup value={values} onValueChange={setValues}>
|
|
30
30
|
* <label>
|
|
31
|
-
* <Checkbox name="email"
|
|
31
|
+
* <Checkbox.Root name="email" ><Checkbox.Indicator /></Checkbox.Root>
|
|
32
32
|
* Email notifications
|
|
33
33
|
* </label>
|
|
34
34
|
* <label>
|
|
35
|
-
* <Checkbox name="sms"
|
|
35
|
+
* <Checkbox.Root name="sms" ><Checkbox.Indicator /></Checkbox.Root>
|
|
36
36
|
* SMS notifications
|
|
37
37
|
* </label>
|
|
38
38
|
* </CheckboxGroup>
|
|
@@ -45,11 +45,11 @@ import { CheckboxGroup as CheckboxGroup$1 } from "@base-ui/react/checkbox-group"
|
|
|
45
45
|
* <Fieldset.Legend>Notifications</Fieldset.Legend>
|
|
46
46
|
* <CheckboxGroup defaultValue={['updates']}>
|
|
47
47
|
* <label>
|
|
48
|
-
* <Checkbox name="updates"
|
|
48
|
+
* <Checkbox.Root name="updates" ><Checkbox.Indicator /></Checkbox.Root>
|
|
49
49
|
* Product updates
|
|
50
50
|
* </label>
|
|
51
51
|
* <label>
|
|
52
|
-
* <Checkbox name="newsletter"
|
|
52
|
+
* <Checkbox.Root name="newsletter" ><Checkbox.Indicator /></Checkbox.Root>
|
|
53
53
|
* Newsletter
|
|
54
54
|
* </label>
|
|
55
55
|
* </CheckboxGroup>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as CodeBlockLanguage, C as CodeBlockLanguageSelectorValueProps, D as TokenizedCode, E as CodeBlockTitleProps, O as highlightCode, S as CodeBlockLanguageSelectorValue, T as CodeBlockTitle, _ as CodeBlockLanguageSelectorItem, a as CodeBlockContainerProps, b as CodeBlockLanguageSelectorTrigger, c as CodeBlockCopyButton, d as CodeBlockFilenameProps, f as CodeBlockHeader, g as CodeBlockLanguageSelectorContentProps, h as CodeBlockLanguageSelectorContent, i as CodeBlockContainer, k as CODE_BLOCK_LANGUAGES, l as CodeBlockCopyButtonProps, m as CodeBlockLanguageSelector, n as CodeBlockActions, o as CodeBlockContent, p as CodeBlockHeaderProps, r as CodeBlockActionsProps, s as CodeBlockContentProps, t as CodeBlock, u as CodeBlockFilename, v as CodeBlockLanguageSelectorItemProps, w as CodeBlockProps, x as CodeBlockLanguageSelectorTriggerProps, y as CodeBlockLanguageSelectorProps } from "../CodeBlock-
|
|
1
|
+
import { A as CodeBlockLanguage, C as CodeBlockLanguageSelectorValueProps, D as TokenizedCode, E as CodeBlockTitleProps, O as highlightCode, S as CodeBlockLanguageSelectorValue, T as CodeBlockTitle, _ as CodeBlockLanguageSelectorItem, a as CodeBlockContainerProps, b as CodeBlockLanguageSelectorTrigger, c as CodeBlockCopyButton, d as CodeBlockFilenameProps, f as CodeBlockHeader, g as CodeBlockLanguageSelectorContentProps, h as CodeBlockLanguageSelectorContent, i as CodeBlockContainer, k as CODE_BLOCK_LANGUAGES, l as CodeBlockCopyButtonProps, m as CodeBlockLanguageSelector, n as CodeBlockActions, o as CodeBlockContent, p as CodeBlockHeaderProps, r as CodeBlockActionsProps, s as CodeBlockContentProps, t as CodeBlock, u as CodeBlockFilename, v as CodeBlockLanguageSelectorItemProps, w as CodeBlockProps, x as CodeBlockLanguageSelectorTriggerProps, y as CodeBlockLanguageSelectorProps } from "../CodeBlock-DUh9WOGo.js";
|
|
2
2
|
export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockActionsProps, CodeBlockContainer, CodeBlockContainerProps, CodeBlockContent, CodeBlockContentProps, CodeBlockCopyButton, CodeBlockCopyButtonProps, CodeBlockFilename, CodeBlockFilenameProps, CodeBlockHeader, CodeBlockHeaderProps, type CodeBlockLanguage, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorContentProps, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorItemProps, CodeBlockLanguageSelectorProps, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorTriggerProps, CodeBlockLanguageSelectorValue, CodeBlockLanguageSelectorValueProps, CodeBlockProps, CodeBlockTitle, CodeBlockTitleProps, TokenizedCode, highlightCode };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, h as CODE_BLOCK_LANGUAGES, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as highlightCode, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../CodeBlock-
|
|
1
|
+
import { a as CodeBlockCopyButton, c as CodeBlockLanguageSelector, d as CodeBlockLanguageSelectorTrigger, f as CodeBlockLanguageSelectorValue, h as CODE_BLOCK_LANGUAGES, i as CodeBlockContent, l as CodeBlockLanguageSelectorContent, m as highlightCode, n as CodeBlockActions, o as CodeBlockFilename, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock, u as CodeBlockLanguageSelectorItem } from "../CodeBlock-BUFXG8HW.js";
|
|
2
2
|
export { CODE_BLOCK_LANGUAGES, CodeBlock, CodeBlockActions, CodeBlockContainer, CodeBlockContent, CodeBlockCopyButton, CodeBlockFilename, CodeBlockHeader, CodeBlockLanguageSelector, CodeBlockLanguageSelectorContent, CodeBlockLanguageSelectorItem, CodeBlockLanguageSelectorTrigger, CodeBlockLanguageSelectorValue, CodeBlockTitle, highlightCode };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { d as MenuProps } from "../Menu-Bgu-ufb5.js";
|
|
2
|
+
import { CodexModel } from "../utils/codex-model-catalog.js";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/CodexModelSelector.d.ts
|
|
6
|
+
type ModelId<ModelT extends CodexModel> = ModelT["id"];
|
|
7
|
+
type ReasoningEffort<ModelT extends CodexModel> = ModelT["supportedReasoningEfforts"][number]["reasoningEffort"];
|
|
8
|
+
type ServiceTier<ModelT extends CodexModel> = ModelT["serviceTiers"][number]["id"];
|
|
9
|
+
interface CodexModelSelectorProps<ModelT extends CodexModel = CodexModel> {
|
|
10
|
+
/** Whole Codex app-server `model/list` entries allowed for this account. */
|
|
11
|
+
readonly models: readonly ModelT[];
|
|
12
|
+
/** Current Codex catalog id. Use the selected entry's `model` field for inference. */
|
|
13
|
+
readonly selectedModelId?: ModelId<ModelT> | null;
|
|
14
|
+
/** Called only with an id from the supplied Codex catalog. */
|
|
15
|
+
readonly onSelectModel: (modelId: ModelId<ModelT>) => void;
|
|
16
|
+
/** Current reasoning effort advertised by the selected model. */
|
|
17
|
+
readonly selectedEffortId?: ReasoningEffort<ModelT> | null;
|
|
18
|
+
readonly onSelectEffort?: (effortId: ReasoningEffort<ModelT>) => void;
|
|
19
|
+
/** Current service tier advertised by the selected model. */
|
|
20
|
+
readonly selectedSpeedId?: ServiceTier<ModelT> | null;
|
|
21
|
+
readonly onSelectSpeed?: (speedId: ServiceTier<ModelT> | null) => void;
|
|
22
|
+
/** Restores all values to the consuming app's preferred defaults. */
|
|
23
|
+
readonly onReset?: () => void;
|
|
24
|
+
readonly disabled?: boolean;
|
|
25
|
+
readonly className?: string;
|
|
26
|
+
/** Controlled menu open state. */
|
|
27
|
+
readonly open?: boolean;
|
|
28
|
+
/** Initial menu state for uncontrolled usage. */
|
|
29
|
+
readonly defaultOpen?: boolean;
|
|
30
|
+
/** Receives Base UI's full open-change event details. */
|
|
31
|
+
readonly onOpenChange?: MenuProps["onOpenChange"];
|
|
32
|
+
readonly "aria-label"?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A compact Codex-style response settings picker: model, reasoning effort,
|
|
36
|
+
* response speed, and reset are kept in one cascading menu.
|
|
37
|
+
*
|
|
38
|
+
* The consuming app supplies every selectable value. This component only
|
|
39
|
+
* renders those values and never guesses model ids or account entitlements.
|
|
40
|
+
*/
|
|
41
|
+
declare function CodexModelSelector<ModelT extends CodexModel>({
|
|
42
|
+
models,
|
|
43
|
+
selectedModelId,
|
|
44
|
+
onSelectModel,
|
|
45
|
+
selectedEffortId,
|
|
46
|
+
onSelectEffort,
|
|
47
|
+
selectedSpeedId,
|
|
48
|
+
onSelectSpeed,
|
|
49
|
+
onReset,
|
|
50
|
+
disabled,
|
|
51
|
+
className,
|
|
52
|
+
open,
|
|
53
|
+
defaultOpen,
|
|
54
|
+
onOpenChange,
|
|
55
|
+
"aria-label": ariaLabel
|
|
56
|
+
}: CodexModelSelectorProps<ModelT>): React.JSX.Element;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { CodexModelSelector, CodexModelSelectorProps };
|