@mcp-b/react-components 0.12.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-CRmsKg9B.d.ts → AgentChat-Br6tKEl8.d.ts} +29 -5
- 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-BLhnNnRK.d.ts → Menu-Bgu-ufb5.d.ts} +26 -65
- package/dist/{ModelSelector-BB-xB-Es.js → ModelSelector-DVgVBdvw.js} +7 -7
- package/dist/{PromptInput-IyM6ZETj.d.ts → PromptInput-p5KmOmt1.d.ts} +302 -46
- 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-B3wYahor.js → ThinkChat-7DQ2CogF.js} +34 -2
- package/dist/{ThinkChatActivity-F4KFPcJA.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +1 -1
- 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 +304 -116
- package/dist/components/AgentConnection.js +2 -2
- 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 +10 -18
- package/dist/components/BrowserLiveView.js +26 -36
- package/dist/components/BrowserReplay.js +4 -4
- package/dist/components/BrowserRunPanel.js +1 -1
- 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 +23 -28
- package/dist/components/CodexModelSelector.js +116 -94
- 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 +5 -5
- package/dist/components/Commit.js +6 -6
- 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 +1 -1
- package/dist/components/Conversation.js +1 -1
- package/dist/components/Dialog.d.ts +38 -30
- package/dist/components/Dialog.js +46 -34
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +5 -5
- 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/McpServerPicker.js +21 -19
- package/dist/components/Menu.d.ts +2 -2
- package/dist/components/Menu.js +39 -49
- package/dist/components/Menubar.d.ts +16 -52
- package/dist/components/Menubar.js +44 -56
- package/dist/components/Message.d.ts +1 -1
- package/dist/components/Message.js +6 -6
- 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 +1 -1
- 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 +139 -54
- package/dist/components/Queue.d.ts +7 -7
- 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 +10 -6
- 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 +1 -1
- 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 +9 -2
- package/dist/components/ThinkChat.js +1 -1
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +1 -1
- package/dist/components/ThinkChatToolPanels.js +8 -8
- package/dist/components/ThinkExecutionWorkbench.js +28 -28
- package/dist/components/ThinkFullApp.js +8 -8
- package/dist/components/ThinkThreadPicker.js +1 -1
- package/dist/components/ThinkThreadShell.js +5 -5
- 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 +6 -6
- 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/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 +45 -4
- 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 +5 -5
- 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 +33 -44
- 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 +8 -1
- 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 +5 -5
- 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 +86 -8
- package/dist/styles/meter.css +4 -20
- package/dist/styles/model-selector.css +13 -13
- 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 +95 -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 +9 -9
- 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 +23 -23
- package/dist/styles/think-full-app.css +12 -20
- package/dist/styles/think-resize-handle.css +2 -2
- package/dist/styles/think-thread-picker.css +19 -10
- package/dist/styles/think-thread-shell.css +7 -7
- 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 +14 -13
- 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/icons-CbjtbIJK.d.ts +0 -51
- package/dist/icons-D2Q5n5C1.js +0 -291
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as RefreshIcon, E as PauseIcon, I as TerminalIcon, N as SpinnerIcon, a as CheckIcon, f as EllipsisIcon, h as FileIcon, t as ArrowDownIcon, y as InfoIcon, z as XIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "./Activity.js";
|
|
4
4
|
import { Button } from "./Button.js";
|
|
5
|
-
import { Tooltip
|
|
6
|
-
import {
|
|
5
|
+
import { Tooltip } from "./Tooltip.js";
|
|
6
|
+
import { Menu } from "./Menu.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/ThinkExecutionWorkbench.tsx
|
|
@@ -30,18 +30,18 @@ function getErrorMessage(error) {
|
|
|
30
30
|
return error instanceof Error ? error.message : String(error);
|
|
31
31
|
}
|
|
32
32
|
function TooltipIcon({ children, className, label, status, tone }) {
|
|
33
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
33
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx("span", {
|
|
34
34
|
"aria-label": label,
|
|
35
35
|
className: cx("think-execution-workbench__icon", className),
|
|
36
36
|
"data-status": status,
|
|
37
37
|
"data-tone": tone,
|
|
38
38
|
role: "img",
|
|
39
39
|
children
|
|
40
|
-
}) }), /* @__PURE__ */ jsx(
|
|
40
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
41
41
|
side: "top",
|
|
42
42
|
sideOffset: 6,
|
|
43
|
-
children: label
|
|
44
|
-
})] });
|
|
43
|
+
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: label })
|
|
44
|
+
}) })] });
|
|
45
45
|
}
|
|
46
46
|
function runId(run) {
|
|
47
47
|
return run.kind === "submission" ? run.record.submissionId : run.record.workflowId;
|
|
@@ -177,7 +177,7 @@ function RunDetail({ run }) {
|
|
|
177
177
|
function RunActions({ busy, onAction, run, source }) {
|
|
178
178
|
const id = runId(run);
|
|
179
179
|
const action = (key, callback) => () => onAction(key, callback);
|
|
180
|
-
return /* @__PURE__ */ jsxs(
|
|
180
|
+
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
181
181
|
unstyled: true,
|
|
182
182
|
render: /* @__PURE__ */ jsx(Button, {
|
|
183
183
|
type: "button",
|
|
@@ -189,61 +189,61 @@ function RunActions({ busy, onAction, run, source }) {
|
|
|
189
189
|
disabled: busy,
|
|
190
190
|
children: /* @__PURE__ */ jsx(EllipsisIcon, {})
|
|
191
191
|
})
|
|
192
|
-
}) }), /* @__PURE__ */ jsx(
|
|
192
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
193
193
|
side: "top",
|
|
194
194
|
sideOffset: 6,
|
|
195
|
-
children: "Run actions"
|
|
196
|
-
})] }), /* @__PURE__ */ jsx(
|
|
195
|
+
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: "Run actions" })
|
|
196
|
+
}) })] }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
197
197
|
align: "end",
|
|
198
|
-
children: run.kind === "submission" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
199
|
-
isSubmissionCancelable(run.record.status) ? /* @__PURE__ */ jsx(
|
|
198
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, { children: run.kind === "submission" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
199
|
+
isSubmissionCancelable(run.record.status) ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
200
200
|
disabled: busy,
|
|
201
201
|
onClick: action(`cancel-submission:${id}`, () => source.cancelSubmission(id)),
|
|
202
202
|
children: "Cancel"
|
|
203
203
|
}) : null,
|
|
204
|
-
/* @__PURE__ */ jsx(
|
|
205
|
-
/* @__PURE__ */ jsx(
|
|
204
|
+
/* @__PURE__ */ jsx(Menu.Separator, {}),
|
|
205
|
+
/* @__PURE__ */ jsx(Menu.Item, {
|
|
206
206
|
disabled: busy,
|
|
207
207
|
variant: "destructive",
|
|
208
208
|
onClick: action(`delete-submission:${id}`, () => source.deleteSubmission(id)),
|
|
209
209
|
children: "Delete"
|
|
210
210
|
})
|
|
211
211
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
212
|
-
/* @__PURE__ */ jsx(
|
|
212
|
+
/* @__PURE__ */ jsx(Menu.Item, {
|
|
213
213
|
disabled: busy,
|
|
214
214
|
onClick: action(`sync-workflow:${id}`, () => source.getWorkflowStatus(run.record.workflowName, id)),
|
|
215
215
|
children: "Refresh status"
|
|
216
216
|
}),
|
|
217
|
-
runStatus(run) === "running" ? /* @__PURE__ */ jsx(
|
|
217
|
+
runStatus(run) === "running" ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
218
218
|
disabled: busy,
|
|
219
219
|
onClick: action(`pause-workflow:${id}`, () => source.pauseWorkflow(id)),
|
|
220
220
|
children: "Pause"
|
|
221
221
|
}) : null,
|
|
222
|
-
runStatus(run) === "paused" ? /* @__PURE__ */ jsx(
|
|
222
|
+
runStatus(run) === "paused" ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
223
223
|
disabled: busy,
|
|
224
224
|
onClick: action(`resume-workflow:${id}`, () => source.resumeWorkflow(id)),
|
|
225
225
|
children: "Resume"
|
|
226
226
|
}) : null,
|
|
227
|
-
isWorkflowTerminal(run.record.status) ? /* @__PURE__ */ jsx(
|
|
227
|
+
isWorkflowTerminal(run.record.status) ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
228
228
|
disabled: busy,
|
|
229
229
|
onClick: action(`restart-workflow:${id}`, () => source.restartWorkflow(id)),
|
|
230
230
|
children: "Restart"
|
|
231
231
|
}) : null,
|
|
232
|
-
runStatus(run) === "running" ? /* @__PURE__ */ jsx(
|
|
232
|
+
runStatus(run) === "running" ? /* @__PURE__ */ jsx(Menu.Item, {
|
|
233
233
|
disabled: busy,
|
|
234
234
|
variant: "destructive",
|
|
235
235
|
onClick: action(`terminate-workflow:${id}`, () => source.terminateWorkflow(id)),
|
|
236
236
|
children: "Terminate"
|
|
237
237
|
}) : null,
|
|
238
|
-
/* @__PURE__ */ jsx(
|
|
239
|
-
/* @__PURE__ */ jsx(
|
|
238
|
+
/* @__PURE__ */ jsx(Menu.Separator, {}),
|
|
239
|
+
/* @__PURE__ */ jsx(Menu.Item, {
|
|
240
240
|
disabled: busy,
|
|
241
241
|
variant: "destructive",
|
|
242
242
|
onClick: action(`delete-workflow:${id}`, () => source.deleteWorkflow(id)),
|
|
243
243
|
children: "Delete"
|
|
244
244
|
})
|
|
245
|
-
] })
|
|
246
|
-
})] });
|
|
245
|
+
] }) })
|
|
246
|
+
}) })] });
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
* Unified execution history for native Think submissions and Agents workflows.
|
|
@@ -383,7 +383,7 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
383
383
|
className: "think-execution-workbench__title",
|
|
384
384
|
children: title
|
|
385
385
|
})]
|
|
386
|
-
}), /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
386
|
+
}), /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
387
387
|
type: "button",
|
|
388
388
|
variant: "ghost",
|
|
389
389
|
color: "neutral",
|
|
@@ -393,11 +393,11 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
|
|
|
393
393
|
disabled: busyAction !== null,
|
|
394
394
|
onClick: () => void refresh(),
|
|
395
395
|
children: /* @__PURE__ */ jsx(RefreshIcon, {})
|
|
396
|
-
}) }), /* @__PURE__ */ jsx(
|
|
396
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
397
397
|
side: "bottom",
|
|
398
398
|
sideOffset: 6,
|
|
399
|
-
children: "Refresh runs"
|
|
400
|
-
})] })]
|
|
399
|
+
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: "Refresh runs" })
|
|
400
|
+
}) })] })]
|
|
401
401
|
}),
|
|
402
402
|
error ? /* @__PURE__ */ jsx("div", {
|
|
403
403
|
className: "think-execution-workbench__error",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { I as TerminalIcon, h as FileIcon, n as ArrowLeftIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Separator } from "./Separator.js";
|
|
4
4
|
import { Button } from "./Button.js";
|
|
5
|
-
import { Tooltip
|
|
6
|
-
import { ToggleGroup
|
|
7
|
-
import { o as useThinkPendingApprovals, s as resolveThinkApprovalProps, t as ThinkChat } from "../ThinkChat-
|
|
5
|
+
import { Tooltip } from "./Tooltip.js";
|
|
6
|
+
import { ToggleGroup } from "./ToggleGroup.js";
|
|
7
|
+
import { o as useThinkPendingApprovals, s as resolveThinkApprovalProps, t as ThinkChat } from "../ThinkChat-7DQ2CogF.js";
|
|
8
8
|
import { WorkspaceExplorer, useWorkspace } from "./WorkspaceExplorer.js";
|
|
9
9
|
import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
|
|
10
10
|
import { ThinkThreadShell } from "./ThinkThreadShell.js";
|
|
@@ -57,20 +57,20 @@ function WorkspacePanel({ source, root }) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
function WorkbenchViewItem({ children, label, value }) {
|
|
60
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
60
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(ToggleGroup.Item, {
|
|
61
61
|
type: "button",
|
|
62
62
|
className: "think-full-app__workbench-view-item",
|
|
63
63
|
value,
|
|
64
64
|
"aria-label": label,
|
|
65
65
|
children
|
|
66
|
-
}) }), /* @__PURE__ */ jsx(
|
|
66
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
67
67
|
side: "bottom",
|
|
68
68
|
sideOffset: 6,
|
|
69
|
-
children: /* @__PURE__ */ jsx(
|
|
69
|
+
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: label })
|
|
70
70
|
}) })] });
|
|
71
71
|
}
|
|
72
72
|
function WorkbenchViewSwitch({ panels, value, onValueChange }) {
|
|
73
|
-
return /* @__PURE__ */ jsx(ToggleGroup, {
|
|
73
|
+
return /* @__PURE__ */ jsx(ToggleGroup.Root, {
|
|
74
74
|
className: "think-full-app__workbench-view-switch",
|
|
75
75
|
size: "sm",
|
|
76
76
|
value: [value],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as SpinnerIcon, k as PlusIcon, u as DotIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { ScrollArea } from "./ScrollArea.js";
|
|
5
5
|
import "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { M as SidebarIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Separator } from "./Separator.js";
|
|
4
4
|
import { Button } from "./Button.js";
|
|
5
|
-
import { Tooltip
|
|
5
|
+
import { Tooltip } from "./Tooltip.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/ThinkThreadShell.tsx
|
|
@@ -75,7 +75,7 @@ function ThinkThreadShell({ sidebar, sidebarOpen, defaultSidebarOpen, onSidebarO
|
|
|
75
75
|
"aria-label": "Thread controls",
|
|
76
76
|
children: /* @__PURE__ */ jsx("div", {
|
|
77
77
|
className: "think-thread-shell__panel-toggle",
|
|
78
|
-
children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
78
|
+
children: /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
79
79
|
type: "button",
|
|
80
80
|
variant: "ghost",
|
|
81
81
|
color: "neutral",
|
|
@@ -87,10 +87,10 @@ function ThinkThreadShell({ sidebar, sidebarOpen, defaultSidebarOpen, onSidebarO
|
|
|
87
87
|
"data-selected": isSidebarOpen,
|
|
88
88
|
onClick: () => setSidebarOpen(!isSidebarOpen),
|
|
89
89
|
children: /* @__PURE__ */ jsx(SidebarIcon, {})
|
|
90
|
-
}) }), /* @__PURE__ */ jsx(
|
|
90
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
91
91
|
side: "bottom",
|
|
92
92
|
sideOffset: 6,
|
|
93
|
-
children: /* @__PURE__ */ jsx(
|
|
93
|
+
children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: toggleLabel })
|
|
94
94
|
}) })] })
|
|
95
95
|
})
|
|
96
96
|
}),
|
package/dist/components/Toast.js
CHANGED
|
@@ -25,6 +25,7 @@ function ToastViewport({ className = "", ref, ...props }) {
|
|
|
25
25
|
const classes = ["toast__viewport", className].filter(Boolean).join(" ");
|
|
26
26
|
return /* @__PURE__ */ jsx(Toast$1.Viewport, {
|
|
27
27
|
ref,
|
|
28
|
+
"data-slot": "toast-viewport",
|
|
28
29
|
className: classes,
|
|
29
30
|
...props
|
|
30
31
|
});
|
|
@@ -36,6 +37,7 @@ function ToastRoot({ className = "", ref, ...props }) {
|
|
|
36
37
|
const classes = ["toast", className].filter(Boolean).join(" ");
|
|
37
38
|
return /* @__PURE__ */ jsx(Toast$1.Root, {
|
|
38
39
|
ref,
|
|
40
|
+
"data-slot": "toast",
|
|
39
41
|
className: classes,
|
|
40
42
|
...props
|
|
41
43
|
});
|
|
@@ -47,6 +49,7 @@ function ToastContent({ className = "", ref, ...props }) {
|
|
|
47
49
|
const classes = ["toast__content", className].filter(Boolean).join(" ");
|
|
48
50
|
return /* @__PURE__ */ jsx(Toast$1.Content, {
|
|
49
51
|
ref,
|
|
52
|
+
"data-slot": "toast-content",
|
|
50
53
|
className: classes,
|
|
51
54
|
...props
|
|
52
55
|
});
|
|
@@ -58,6 +61,7 @@ function ToastTitle({ className = "", ref, ...props }) {
|
|
|
58
61
|
const classes = ["toast__title", className].filter(Boolean).join(" ");
|
|
59
62
|
return /* @__PURE__ */ jsx(Toast$1.Title, {
|
|
60
63
|
ref,
|
|
64
|
+
"data-slot": "toast-title",
|
|
61
65
|
className: classes,
|
|
62
66
|
...props
|
|
63
67
|
});
|
|
@@ -69,6 +73,7 @@ function ToastDescription({ className = "", ref, ...props }) {
|
|
|
69
73
|
const classes = ["toast__description", className].filter(Boolean).join(" ");
|
|
70
74
|
return /* @__PURE__ */ jsx(Toast$1.Description, {
|
|
71
75
|
ref,
|
|
76
|
+
"data-slot": "toast-description",
|
|
72
77
|
className: classes,
|
|
73
78
|
...props
|
|
74
79
|
});
|
|
@@ -80,6 +85,7 @@ function ToastAction({ className = "", ref, ...props }) {
|
|
|
80
85
|
const classes = ["toast__action", className].filter(Boolean).join(" ");
|
|
81
86
|
return /* @__PURE__ */ jsx(Toast$1.Action, {
|
|
82
87
|
ref,
|
|
88
|
+
"data-slot": "toast-action",
|
|
83
89
|
className: classes,
|
|
84
90
|
...props
|
|
85
91
|
});
|
|
@@ -91,6 +97,7 @@ function ToastClose({ className = "", ref, ...props }) {
|
|
|
91
97
|
const classes = ["toast__close", className].filter(Boolean).join(" ");
|
|
92
98
|
return /* @__PURE__ */ jsx(Toast$1.Close, {
|
|
93
99
|
ref,
|
|
100
|
+
"data-slot": "toast-close",
|
|
94
101
|
className: classes,
|
|
95
102
|
...props
|
|
96
103
|
});
|
|
@@ -41,7 +41,7 @@ interface ToggleGroupItemProps extends Omit<React.ComponentPropsWithRef<typeof T
|
|
|
41
41
|
*
|
|
42
42
|
* @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group}
|
|
43
43
|
*/
|
|
44
|
-
declare function
|
|
44
|
+
declare function ToggleGroupRoot({
|
|
45
45
|
size,
|
|
46
46
|
spacing,
|
|
47
47
|
variant,
|
|
@@ -65,5 +65,9 @@ declare function ToggleGroupItem({
|
|
|
65
65
|
}: ToggleGroupItemProps & {
|
|
66
66
|
ref?: React.Ref<HTMLButtonElement>;
|
|
67
67
|
}): React.JSX.Element;
|
|
68
|
+
declare const ToggleGroup: {
|
|
69
|
+
Root: typeof ToggleGroupRoot;
|
|
70
|
+
Item: typeof ToggleGroupItem;
|
|
71
|
+
};
|
|
68
72
|
//#endregion
|
|
69
|
-
export { ToggleGroup,
|
|
73
|
+
export { ToggleGroup, ToggleGroupItemProps, ToggleGroupProps };
|
|
@@ -37,7 +37,7 @@ function normalizeSize(size) {
|
|
|
37
37
|
*
|
|
38
38
|
* @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group}
|
|
39
39
|
*/
|
|
40
|
-
function
|
|
40
|
+
function ToggleGroupRoot({ size = "md", spacing = 0, variant = "default", className = "", children, style, ref, ...props }) {
|
|
41
41
|
const normalizedSize = normalizeSize(size);
|
|
42
42
|
const gap = `${spacing * .25}rem`;
|
|
43
43
|
const groupStyle = typeof style === "function" ? (state) => ({
|
|
@@ -95,5 +95,9 @@ function ToggleGroupItem({ className = "", variant, size, ref, ...props }) {
|
|
|
95
95
|
...props
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
+
const ToggleGroup = {
|
|
99
|
+
Root: ToggleGroupRoot,
|
|
100
|
+
Item: ToggleGroupItem
|
|
101
|
+
};
|
|
98
102
|
//#endregion
|
|
99
|
-
export { ToggleGroup
|
|
103
|
+
export { ToggleGroup };
|
|
@@ -21,6 +21,7 @@ function ToolbarRoot({ className = "", ref, ...props }) {
|
|
|
21
21
|
const classes = ["toolbar", className].filter(Boolean).join(" ");
|
|
22
22
|
return /* @__PURE__ */ jsx(Toolbar$1.Root, {
|
|
23
23
|
ref,
|
|
24
|
+
"data-slot": "toolbar",
|
|
24
25
|
className: classes,
|
|
25
26
|
...props
|
|
26
27
|
});
|
|
@@ -32,6 +33,7 @@ function ToolbarButton({ className = "", ref, ...props }) {
|
|
|
32
33
|
const classes = ["toolbar__button", className].filter(Boolean).join(" ");
|
|
33
34
|
return /* @__PURE__ */ jsx(Toolbar$1.Button, {
|
|
34
35
|
ref,
|
|
36
|
+
"data-slot": "toolbar-button",
|
|
35
37
|
className: classes,
|
|
36
38
|
...props
|
|
37
39
|
});
|
|
@@ -43,6 +45,7 @@ function ToolbarLink({ className = "", ref, ...props }) {
|
|
|
43
45
|
const classes = ["toolbar__link", className].filter(Boolean).join(" ");
|
|
44
46
|
return /* @__PURE__ */ jsx(Toolbar$1.Link, {
|
|
45
47
|
ref,
|
|
48
|
+
"data-slot": "toolbar-link",
|
|
46
49
|
className: classes,
|
|
47
50
|
...props
|
|
48
51
|
});
|
|
@@ -54,6 +57,7 @@ function ToolbarGroup({ className = "", ref, ...props }) {
|
|
|
54
57
|
const classes = ["toolbar__group", className].filter(Boolean).join(" ");
|
|
55
58
|
return /* @__PURE__ */ jsx(Toolbar$1.Group, {
|
|
56
59
|
ref,
|
|
60
|
+
"data-slot": "toolbar-group",
|
|
57
61
|
className: classes,
|
|
58
62
|
...props
|
|
59
63
|
});
|
|
@@ -65,6 +69,7 @@ function ToolbarSeparator({ className = "", ref, ...props }) {
|
|
|
65
69
|
const classes = ["toolbar__separator", className].filter(Boolean).join(" ");
|
|
66
70
|
return /* @__PURE__ */ jsx(Toolbar$1.Separator, {
|
|
67
71
|
ref,
|
|
72
|
+
"data-slot": "toolbar-separator",
|
|
68
73
|
className: classes,
|
|
69
74
|
...props
|
|
70
75
|
});
|
|
@@ -76,6 +81,7 @@ function ToolbarInput({ className = "", ref, ...props }) {
|
|
|
76
81
|
const classes = ["toolbar__input", className].filter(Boolean).join(" ");
|
|
77
82
|
return /* @__PURE__ */ jsx(Toolbar$1.Input, {
|
|
78
83
|
ref,
|
|
84
|
+
"data-slot": "toolbar-input",
|
|
79
85
|
className: classes,
|
|
80
86
|
...props
|
|
81
87
|
});
|
|
@@ -12,11 +12,8 @@ interface TooltipProviderProps extends Tooltip$1.Provider.Props {
|
|
|
12
12
|
interface TooltipPopupProps extends Omit<Tooltip$1.Popup.Props, "className"> {
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
16
|
-
|
|
17
|
-
sideOffset?: TooltipPositionerProps["sideOffset"];
|
|
18
|
-
align?: TooltipPositionerProps["align"];
|
|
19
|
-
alignOffset?: TooltipPositionerProps["alignOffset"];
|
|
15
|
+
interface TooltipViewportProps extends Omit<Tooltip$1.Viewport.Props, "className"> {
|
|
16
|
+
className?: string;
|
|
20
17
|
}
|
|
21
18
|
interface TooltipArrowProps extends Omit<Tooltip$1.Arrow.Props, "className"> {
|
|
22
19
|
className?: string;
|
|
@@ -26,32 +23,29 @@ interface TooltipArrowProps extends Omit<Tooltip$1.Arrow.Props, "className"> {
|
|
|
26
23
|
*
|
|
27
24
|
* @example
|
|
28
25
|
* ```tsx
|
|
29
|
-
* <Tooltip>
|
|
30
|
-
* <
|
|
26
|
+
* <Tooltip.Root>
|
|
27
|
+
* <Tooltip.Trigger>
|
|
31
28
|
* <Button>Hover me</Button>
|
|
32
|
-
* </
|
|
33
|
-
* <
|
|
34
|
-
* <
|
|
35
|
-
* <
|
|
36
|
-
* <
|
|
29
|
+
* </Tooltip.Trigger>
|
|
30
|
+
* <Tooltip.Portal>
|
|
31
|
+
* <Tooltip.Positioner>
|
|
32
|
+
* <Tooltip.Popup>
|
|
33
|
+
* <Tooltip.Arrow />
|
|
37
34
|
* Helpful information
|
|
38
|
-
* </
|
|
39
|
-
* </
|
|
40
|
-
* </
|
|
41
|
-
* </Tooltip>
|
|
35
|
+
* </Tooltip.Popup>
|
|
36
|
+
* </Tooltip.Positioner>
|
|
37
|
+
* </Tooltip.Portal>
|
|
38
|
+
* </Tooltip.Root>
|
|
42
39
|
* ```
|
|
43
40
|
*
|
|
44
41
|
* @see {@link https://base-ui.com/react/components/tooltip | Base UI Tooltip}
|
|
45
42
|
*/
|
|
46
|
-
declare const Tooltip: <Payload>(props: Tooltip$1.Root.Props<Payload>) => import("react/jsx-runtime").JSX.Element;
|
|
47
43
|
declare function TooltipProvider({
|
|
48
44
|
delayDuration,
|
|
49
45
|
delay,
|
|
50
46
|
...props
|
|
51
47
|
}: TooltipProviderProps): React.JSX.Element;
|
|
52
48
|
declare function TooltipTrigger(props: TooltipTriggerProps): React.JSX.Element;
|
|
53
|
-
declare const TooltipPortal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
-
declare const TooltipPositioner: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
49
|
declare function TooltipPopup({
|
|
56
50
|
className,
|
|
57
51
|
ref,
|
|
@@ -59,15 +53,16 @@ declare function TooltipPopup({
|
|
|
59
53
|
}: TooltipPopupProps & {
|
|
60
54
|
ref?: React.Ref<HTMLDivElement>;
|
|
61
55
|
}): React.JSX.Element;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Transition container for content that changes as a tooltip moves between
|
|
58
|
+
* triggers. Pair the adaptive classes from `base-ui-motion.css` with the
|
|
59
|
+
* positioner, popup, and this viewport when that behavior is needed.
|
|
60
|
+
*/
|
|
61
|
+
declare function TooltipViewport({
|
|
62
|
+
className,
|
|
68
63
|
ref,
|
|
69
64
|
...props
|
|
70
|
-
}:
|
|
65
|
+
}: TooltipViewportProps & {
|
|
71
66
|
ref?: React.Ref<HTMLDivElement>;
|
|
72
67
|
}): React.JSX.Element;
|
|
73
68
|
declare function TooltipArrow({
|
|
@@ -77,5 +72,19 @@ declare function TooltipArrow({
|
|
|
77
72
|
}: TooltipArrowProps & {
|
|
78
73
|
ref?: React.Ref<HTMLDivElement>;
|
|
79
74
|
}): React.JSX.Element;
|
|
75
|
+
/**
|
|
76
|
+
* An accessible tooltip assembled from explicit Base UI parts.
|
|
77
|
+
*/
|
|
78
|
+
declare const Tooltip: {
|
|
79
|
+
createHandle: typeof Tooltip$1.createHandle;
|
|
80
|
+
Root: <Payload>(props: Tooltip$1.Root.Props<Payload>) => import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
Provider: typeof TooltipProvider;
|
|
82
|
+
Trigger: typeof TooltipTrigger;
|
|
83
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
Positioner: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").TooltipPositionerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
Popup: typeof TooltipPopup;
|
|
86
|
+
Viewport: typeof TooltipViewport;
|
|
87
|
+
Arrow: typeof TooltipArrow;
|
|
88
|
+
};
|
|
80
89
|
//#endregion
|
|
81
|
-
export { Tooltip,
|
|
90
|
+
export { Tooltip, TooltipArrowProps, TooltipPopupProps, TooltipPortalProps, TooltipPositionerProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps, TooltipViewportProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import { jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
4
4
|
//#region src/components/Tooltip.tsx
|
|
5
5
|
/**
|
|
@@ -7,24 +7,23 @@ import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
|
-
* <Tooltip>
|
|
11
|
-
* <
|
|
10
|
+
* <Tooltip.Root>
|
|
11
|
+
* <Tooltip.Trigger>
|
|
12
12
|
* <Button>Hover me</Button>
|
|
13
|
-
* </
|
|
14
|
-
* <
|
|
15
|
-
* <
|
|
16
|
-
* <
|
|
17
|
-
* <
|
|
13
|
+
* </Tooltip.Trigger>
|
|
14
|
+
* <Tooltip.Portal>
|
|
15
|
+
* <Tooltip.Positioner>
|
|
16
|
+
* <Tooltip.Popup>
|
|
17
|
+
* <Tooltip.Arrow />
|
|
18
18
|
* Helpful information
|
|
19
|
-
* </
|
|
20
|
-
* </
|
|
21
|
-
* </
|
|
22
|
-
* </Tooltip>
|
|
19
|
+
* </Tooltip.Popup>
|
|
20
|
+
* </Tooltip.Positioner>
|
|
21
|
+
* </Tooltip.Portal>
|
|
22
|
+
* </Tooltip.Root>
|
|
23
23
|
* ```
|
|
24
24
|
*
|
|
25
25
|
* @see {@link https://base-ui.com/react/components/tooltip | Base UI Tooltip}
|
|
26
26
|
*/
|
|
27
|
-
const Tooltip = Tooltip$1.Root;
|
|
28
27
|
function TooltipProvider({ delayDuration = 0, delay, ...props }) {
|
|
29
28
|
return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
|
|
30
29
|
delay: delay ?? delayDuration,
|
|
@@ -37,10 +36,12 @@ function TooltipTrigger(props) {
|
|
|
37
36
|
...props
|
|
38
37
|
});
|
|
39
38
|
}
|
|
40
|
-
const TooltipPortal = Tooltip$1.Portal;
|
|
41
|
-
const TooltipPositioner = Tooltip$1.Positioner;
|
|
42
39
|
function TooltipPopup({ className = "", ref, ...props }) {
|
|
43
|
-
const classes = [
|
|
40
|
+
const classes = [
|
|
41
|
+
"tooltip__popup",
|
|
42
|
+
"base-ui-popup",
|
|
43
|
+
className
|
|
44
|
+
].filter(Boolean).join(" ");
|
|
44
45
|
return /* @__PURE__ */ jsx(Tooltip$1.Popup, {
|
|
45
46
|
ref,
|
|
46
47
|
"data-slot": "tooltip-content",
|
|
@@ -48,18 +49,19 @@ function TooltipPopup({ className = "", ref, ...props }) {
|
|
|
48
49
|
...props
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Transition container for content that changes as a tooltip moves between
|
|
54
|
+
* triggers. Pair the adaptive classes from `base-ui-motion.css` with the
|
|
55
|
+
* positioner, popup, and this viewport when that behavior is needed.
|
|
56
|
+
*/
|
|
57
|
+
function TooltipViewport({ className = "", ref, ...props }) {
|
|
58
|
+
const classes = ["tooltip__viewport", className].filter(Boolean).join(" ");
|
|
59
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Viewport, {
|
|
60
|
+
ref,
|
|
61
|
+
"data-slot": "tooltip-viewport",
|
|
62
|
+
className: classes,
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
63
65
|
}
|
|
64
66
|
function TooltipArrow({ className = "", ref, ...props }) {
|
|
65
67
|
const classes = ["tooltip__arrow", className].filter(Boolean).join(" ");
|
|
@@ -70,5 +72,19 @@ function TooltipArrow({ className = "", ref, ...props }) {
|
|
|
70
72
|
...props
|
|
71
73
|
});
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* An accessible tooltip assembled from explicit Base UI parts.
|
|
77
|
+
*/
|
|
78
|
+
const Tooltip = {
|
|
79
|
+
createHandle: Tooltip$1.createHandle,
|
|
80
|
+
Root: Tooltip$1.Root,
|
|
81
|
+
Provider: TooltipProvider,
|
|
82
|
+
Trigger: TooltipTrigger,
|
|
83
|
+
Portal: Tooltip$1.Portal,
|
|
84
|
+
Positioner: Tooltip$1.Positioner,
|
|
85
|
+
Popup: TooltipPopup,
|
|
86
|
+
Viewport: TooltipViewport,
|
|
87
|
+
Arrow: TooltipArrow
|
|
88
|
+
};
|
|
73
89
|
//#endregion
|
|
74
|
-
export { Tooltip
|
|
90
|
+
export { Tooltip };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as RefreshIcon, n as ArrowLeftIcon, o as ChevronDownIcon, r as ArrowRightIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Tooltip
|
|
4
|
+
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { Badge } from "./Badge.js";
|
|
6
6
|
import { Input } from "./Input.js";
|
|
7
7
|
import { ScrollArea } from "./ScrollArea.js";
|
|
@@ -172,7 +172,7 @@ function WebPreviewNavigationButton({ className, action, label, tooltip, childre
|
|
|
172
172
|
children: children ?? def?.icon
|
|
173
173
|
});
|
|
174
174
|
if (!resolvedLabel) return button;
|
|
175
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
175
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: resolvedLabel }) }) })] });
|
|
176
176
|
}
|
|
177
177
|
function WebPreviewUrl({ className, placeholder = "Enter URL…", value, onChange, onKeyDown, ref, ...props }) {
|
|
178
178
|
const { url, setUrl } = useWebPreviewContext();
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { A as CodeBlockLanguage } from "../CodeBlock-
|
|
1
|
+
import { A as CodeBlockLanguage } from "../CodeBlock-DUh9WOGo.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { WorkspaceLike } from "@cloudflare/think/tools/workspace";
|
|
4
3
|
import { FileInfo, Workspace } from "@cloudflare/shell";
|
|
5
4
|
|
|
6
5
|
//#region src/components/WorkspaceExplorer.d.ts
|
|
7
6
|
/** Workspace summary, as returned by `Workspace.getWorkspaceInfo()` upstream. */
|
|
8
7
|
type WorkspaceInfo = Awaited<ReturnType<Workspace["getWorkspaceInfo"]>>;
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* `Workspace` — and ignores the rest.
|
|
9
|
+
* What the explorer actually calls: `readDir` and `readFile`, plus
|
|
10
|
+
* `getWorkspaceInfo` for the header's file-count chip when available. A full
|
|
11
|
+
* `Workspace` from `@cloudflare/shell`, Think's `WorkspaceLike`, or any
|
|
12
|
+
* cross-DO RPC proxy exposing these methods satisfies it.
|
|
15
13
|
*/
|
|
16
|
-
type WorkspaceSource = Workspace |
|
|
14
|
+
type WorkspaceSource = Pick<Workspace, "readDir" | "readFile"> & Partial<Pick<Workspace, "getWorkspaceInfo">>;
|
|
17
15
|
interface UseWorkspaceOptions {
|
|
18
16
|
/** Must be referentially stable (memoize in the app) — a new source resets the workspace. */
|
|
19
17
|
source: WorkspaceSource;
|