@mcp-b/react-components 0.16.1 → 0.18.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/{AgentActivity-BNUNrP9O.d.ts → AgentActivity-D2SHSGFX.d.ts} +1 -1
- package/dist/{AgentChat-CrlpbvQJ.d.ts → AgentChat-ClxViuUM.d.ts} +4 -29
- package/dist/AgentMessageParts-CyD2UB3V.d.ts +46 -0
- package/dist/AgentToolRunsContext-BVe4stgw.d.ts +21 -0
- package/dist/{Button-FX_hpqxm.d.ts → Button-DLGzHsjc.d.ts} +13 -7
- package/dist/{CodeBlock-BmB4Xaqq.js → CodeBlock-Bfp5PAg3.js} +9 -6
- package/dist/{CodeBlock-BRajW4QU.d.ts → CodeBlock-gV4kZeCI.d.ts} +2 -9
- package/dist/Collapsible-N64ASIQr.d.ts +119 -0
- package/dist/{Combobox-B9Fcd6q-.d.ts → Combobox-CYc37s5l.d.ts} +11 -33
- package/dist/{FileTree-CkVbIMWV.js → FileTree-3zYtrddG.js} +46 -20
- package/dist/{Menu-Bgu-ufb5.d.ts → Menu-L6MZm-7N.d.ts} +15 -56
- package/dist/{Message-BkMdE3bS.js → Message-BXtmfc9Q.js} +13 -20
- package/dist/{ModelSelector-SlJNgwKY.js → ModelSelector-Cqw_qrUG.js} +18 -25
- package/dist/{PromptInput-BWTuXMOD.d.ts → PromptInput-Bdh9pqlo.d.ts} +41 -71
- package/dist/{ResponsiveSidebarShell-Dd9DCcBT.d.ts → ResponsiveSidebarShell-CsAh4NyL.d.ts} +1 -0
- package/dist/{Select-BeEsefzh.d.ts → Select-B_13gg_J.d.ts} +16 -44
- package/dist/{Tabs-3Zc4tb9D.d.ts → Tabs-ColWK-XA.d.ts} +14 -20
- package/dist/{ThinkChat-CzC-zNGA.js → ThinkChat-15EhfvYJ.js} +123 -73
- package/dist/{ThinkChatActivity-BFQnb2ct.d.ts → ThinkChatActivity-Bzot45kX.d.ts} +9 -4
- package/dist/{ThinkChatActivitySummary-BPmu9a-c.d.ts → ThinkChatActivitySummary-D1xOrNrq.d.ts} +1 -1
- package/dist/{ThinkChatContext-C3Eb1Xpi.d.ts → ThinkChatContext-DrsZqdaO.d.ts} +1 -1
- package/dist/ThinkRecoveryNotice-DFIcG9UX.d.ts +19 -0
- package/dist/{Toggle-CAAlNl-M.d.ts → Toggle-JKZ43D5S.d.ts} +2 -2
- package/dist/{ToggleGroup-8hPv-b69.d.ts → ToggleGroup-DNd6cDJZ.d.ts} +4 -5
- package/dist/Workspace-Jez8ffUj.d.ts +274 -0
- package/dist/WorkspaceExplorer-B9dQWNVK.d.ts +32 -0
- package/dist/{WorkspaceFile-DOZkPwzu.d.ts → WorkspaceFile-CzyHnESE.d.ts} +1 -1
- package/dist/{WorkspaceFileView-rSN_yT0L.js → WorkspaceFileView-C68Ub8S8.js} +121 -128
- package/dist/{WorkspaceLink-DIPbXrUM.js → WorkspaceLink-BYYeTQLf.js} +20 -55
- package/dist/{WorkspaceLink-DK1DWMHe.d.ts → WorkspaceLink-O-EBKUJ8.d.ts} +6 -9
- package/dist/class-names-BiMDVpUo.js +14 -0
- package/dist/components/Accordion.d.ts +5 -15
- package/dist/components/Accordion.js +16 -10
- package/dist/components/Activity.d.ts +5 -10
- package/dist/components/Activity.js +2 -2
- package/dist/components/AgentActivity.d.ts +1 -1
- package/dist/components/AgentActivity.js +4 -5
- package/dist/components/AgentActivityPreview.d.ts +9 -9
- package/dist/components/AgentActivityPreview.js +8 -12
- package/dist/components/AgentAttention.d.ts +2 -2
- package/dist/components/AgentAttention.js +1 -1
- package/dist/components/AgentChat.d.ts +2 -2
- package/dist/components/AgentChat.js +113 -218
- package/dist/components/AgentChatMessageEditor.js +3 -3
- package/dist/components/AgentChatTurnError.js +2 -2
- package/dist/components/AgentConnection.js +4 -4
- package/dist/components/AgentMessageParts.d.ts +2 -0
- package/dist/components/AgentMessageParts.js +119 -0
- package/dist/components/AgentToolDetail.d.ts +57 -0
- package/dist/components/AgentToolDetail.js +100 -0
- package/dist/components/AgentToolRunsContext.d.ts +2 -0
- package/dist/components/AgentToolRunsContext.js +16 -0
- package/dist/components/AlertDialog.d.ts +7 -19
- package/dist/components/AlertDialog.js +21 -32
- package/dist/components/AppTopBar.d.ts +28 -8
- package/dist/components/AppTopBar.js +36 -12
- package/dist/components/Approval.d.ts +102 -0
- package/dist/components/Approval.js +227 -0
- package/dist/components/Artifact.d.ts +3 -5
- package/dist/components/Artifact.js +7 -5
- package/dist/components/Autocomplete.d.ts +11 -33
- package/dist/components/Autocomplete.js +23 -30
- package/dist/components/Avatar.d.ts +4 -12
- package/dist/components/Avatar.js +13 -12
- package/dist/components/Badge.js +3 -0
- package/dist/components/BrowserLiveView.js +27 -12
- package/dist/components/BrowserReplay.js +4 -3
- package/dist/components/BrowserRunPanel.js +58 -78
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +14 -16
- package/dist/components/Card.d.ts +7 -8
- package/dist/components/Card.js +19 -10
- package/dist/components/ChainOfThought.d.ts +5 -11
- package/dist/components/ChainOfThought.js +3 -2
- package/dist/components/ChatGptSignInScreen.js +8 -8
- package/dist/components/Checkbox.d.ts +2 -4
- package/dist/components/Checkbox.js +6 -5
- package/dist/components/CheckboxGroup.d.ts +1 -3
- package/dist/components/CheckboxGroup.js +15 -14
- package/dist/components/Checkpoint.d.ts +64 -0
- package/dist/components/Checkpoint.js +63 -0
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +1 -1
- package/dist/components/CodexModelSelector.js +2 -2
- package/dist/components/Collapsible.d.ts +1 -124
- package/dist/components/Collapsible.js +7 -10
- package/dist/components/Combobox.d.ts +1 -1
- package/dist/components/Combobox.js +23 -30
- package/dist/components/Commit.d.ts +5 -11
- package/dist/components/Commit.js +6 -5
- package/dist/components/Context.js +1 -1
- package/dist/components/ContextMenu.d.ts +21 -37
- package/dist/components/ContextMenu.js +34 -51
- package/dist/components/Conversation.d.ts +3 -5
- package/dist/components/Conversation.js +5 -4
- package/dist/components/DescriptionListParts.js +1 -1
- package/dist/components/Dialog.d.ts +6 -17
- package/dist/components/Dialog.js +17 -24
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +4 -3
- package/dist/components/Field.d.ts +17 -20
- package/dist/components/Field.js +20 -17
- package/dist/components/Fieldset.d.ts +2 -7
- package/dist/components/Fieldset.js +7 -6
- package/dist/components/FileTree.d.ts +6 -0
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Form.d.ts +1 -4
- package/dist/components/Form.js +3 -2
- package/dist/components/GithubMotionMark.js +1 -1
- package/dist/components/IconButton.d.ts +2 -3
- package/dist/components/IconButton.js +2 -1
- package/dist/components/InlineCitation.d.ts +66 -0
- package/dist/components/InlineCitation.js +142 -0
- package/dist/components/Input.d.ts +1 -4
- package/dist/components/Input.js +3 -2
- package/dist/components/Marker.js +1 -1
- package/dist/components/McpConnectionRequest.js +2 -2
- package/dist/components/McpServerPicker.d.ts +1 -1
- package/dist/components/McpServerPicker.js +6 -5
- package/dist/components/MediaPreviewCard.d.ts +103 -0
- package/dist/components/MediaPreviewCard.js +193 -0
- package/dist/components/Menu.d.ts +1 -1
- package/dist/components/Menu.js +33 -52
- package/dist/components/Menubar.d.ts +22 -43
- package/dist/components/Menubar.js +36 -53
- package/dist/components/Message.d.ts +7 -7
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +2 -2
- package/dist/components/MessageScroller.js +6 -5
- package/dist/components/Meter.d.ts +5 -20
- package/dist/components/Meter.js +11 -10
- package/dist/components/ModelSelector.d.ts +6 -9
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +11 -33
- package/dist/components/NavigationMenu.js +23 -30
- package/dist/components/NumberField.d.ts +6 -24
- package/dist/components/NumberField.js +13 -12
- package/dist/components/Plan.d.ts +103 -0
- package/dist/components/Plan.js +113 -0
- package/dist/components/Popover.d.ts +9 -36
- package/dist/components/Popover.js +23 -34
- package/dist/components/PreviewCard.d.ts +6 -24
- package/dist/components/PreviewCard.js +13 -24
- package/dist/components/PricingBillingToggle.js +1 -1
- package/dist/components/PricingFAQ.js +1 -1
- package/dist/components/PricingPage.js +2 -1
- package/dist/components/PricingPlanCard.js +5 -4
- package/dist/components/PricingUsageCalculator.js +3 -3
- package/dist/components/Progress.d.ts +3 -8
- package/dist/components/Progress.js +7 -10
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +83 -218
- package/dist/components/Queue.d.ts +7 -17
- package/dist/components/Queue.js +2 -3
- package/dist/components/RadioGroup.d.ts +3 -8
- package/dist/components/RadioGroup.js +7 -10
- package/dist/components/Reasoning.d.ts +4 -8
- package/dist/components/Reasoning.js +3 -6
- package/dist/components/ResizableSidePanel.js +2 -2
- package/dist/components/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/ResponsiveSidebarShell.js +18 -11
- package/dist/components/ScrollArea.d.ts +5 -20
- package/dist/components/ScrollArea.js +12 -10
- package/dist/components/SearchField.d.ts +43 -0
- package/dist/components/SearchField.js +52 -0
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.js +33 -57
- package/dist/components/Separator.d.ts +1 -5
- package/dist/components/Separator.js +3 -6
- package/dist/components/Slider.d.ts +6 -19
- package/dist/components/Slider.js +15 -14
- package/dist/components/Sources.d.ts +4 -9
- package/dist/components/Sources.js +3 -2
- package/dist/components/Stepper.js +16 -9
- package/dist/components/SubagentRunDetails.js +1 -1
- package/dist/components/SubagentRunIndicator.js +2 -2
- package/dist/components/SubagentRunList.d.ts +3 -5
- package/dist/components/SubagentRunList.js +3 -5
- package/dist/components/SubagentRunSelector.d.ts +9 -22
- package/dist/components/SubagentRunSelector.js +29 -31
- package/dist/components/Switch.d.ts +4 -7
- package/dist/components/Switch.js +6 -10
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +21 -18
- package/dist/components/Task.d.ts +4 -9
- package/dist/components/Task.js +4 -3
- package/dist/components/Terminal.d.ts +3 -4
- package/dist/components/Terminal.js +5 -4
- package/dist/components/TestResults.d.ts +4 -9
- package/dist/components/TestResults.js +11 -6
- package/dist/components/Textarea.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +45 -22
- package/dist/components/ThinkChat.js +7 -5
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +24 -7
- package/dist/components/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/ThinkChatActivitySummary.js +7 -3
- package/dist/components/ThinkChatContext.d.ts +1 -1
- package/dist/components/ThinkChatToolPanels.js +27 -17
- package/dist/components/ThinkExecutionDetail.js +2 -2
- package/dist/components/ThinkExecutionStatus.js +2 -2
- package/dist/components/ThinkExecutionWorkbench.d.ts +30 -8
- package/dist/components/ThinkExecutionWorkbench.js +70 -134
- package/dist/components/ThinkFullApp.d.ts +40 -15
- package/dist/components/ThinkFullApp.js +193 -117
- package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/ThinkFullAppViewSwitch.js +2 -2
- package/dist/components/ThinkPendingApproval.d.ts +60 -0
- package/dist/components/ThinkPendingApproval.js +99 -0
- package/dist/components/ThinkRecoveryNotice.d.ts +2 -0
- package/dist/components/ThinkRecoveryNotice.js +46 -0
- package/dist/components/ThinkRoutine.js +1 -0
- package/dist/components/ThinkRoutineBrowser.d.ts +17 -9
- package/dist/components/ThinkRoutineBrowser.js +37 -44
- package/dist/components/ThinkRoutineDetail.d.ts +5 -2
- package/dist/components/ThinkRoutineDetail.js +4 -4
- package/dist/components/ThinkRoutineForm.d.ts +3 -2
- package/dist/components/ThinkRoutineForm.js +11 -10
- package/dist/components/ThinkRoutineLibrary.d.ts +27 -25
- package/dist/components/ThinkRoutineLibrary.js +104 -80
- package/dist/components/ThinkRoutineRuns.d.ts +3 -2
- package/dist/components/ThinkRoutineRuns.js +31 -24
- package/dist/components/ThinkThreadPicker.d.ts +17 -11
- package/dist/components/ThinkThreadPicker.js +163 -39
- package/dist/components/ThinkThreadShell.d.ts +1 -1
- package/dist/components/Toast.d.ts +7 -28
- package/dist/components/Toast.js +15 -14
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +10 -8
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +21 -26
- package/dist/components/ToolApproval.d.ts +28 -0
- package/dist/components/ToolApproval.js +35 -0
- package/dist/components/ToolInvocation.d.ts +26 -0
- package/dist/components/ToolInvocation.js +72 -0
- package/dist/components/Toolbar.d.ts +6 -24
- package/dist/components/Toolbar.js +13 -12
- package/dist/components/Tooltip.d.ts +11 -10
- package/dist/components/Tooltip.js +17 -11
- package/dist/components/TransitionSurface.d.ts +27 -0
- package/dist/components/TransitionSurface.js +20 -0
- package/dist/components/WebPreview.d.ts +6 -7
- package/dist/components/WebPreview.js +70 -55
- package/dist/components/Workspace.d.ts +2 -2
- package/dist/components/Workspace.js +361 -346
- package/dist/components/WorkspaceBrowser.d.ts +4 -7
- package/dist/components/WorkspaceBrowser.js +16 -26
- package/dist/components/WorkspaceExplorer.d.ts +5 -33
- package/dist/components/WorkspaceExplorer.js +19 -32
- package/dist/components/WorkspaceFile.d.ts +1 -1
- package/dist/components/WorkspaceFileView.d.ts +14 -2
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.d.ts +0 -8
- package/dist/components/WorkspaceHeader.js +3 -15
- package/dist/components/WorkspaceLink.d.ts +1 -1
- package/dist/components/WorkspaceLink.js +1 -1
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-DtPMgN7e.d.ts → copy-button-D7aAYA-2.d.ts} +2 -3
- package/dist/{copy-button-Dejn5heL.js → copy-button-DeK6KXEV.js} +3 -2
- package/dist/{icons-CpfUer49.js → icons-CQJ-aMnI.js} +7 -3
- package/dist/{icons-GQd1xF4e.d.ts → icons-CYXmvKlJ.d.ts} +22 -2
- package/dist/navigation-link-Cob7KBlM.js +19 -0
- package/dist/styles/accordion.css +4 -19
- package/dist/styles/activity.css +48 -56
- package/dist/styles/agent-activity-preview.css +6 -0
- package/dist/styles/agent-chat.css +14 -63
- package/dist/styles/agent-connection.css +0 -12
- package/dist/styles/agent-tool-detail.css +54 -0
- package/dist/styles/alert-dialog.css +16 -18
- package/dist/styles/app-top-bar.css +17 -9
- package/dist/styles/approval.css +177 -0
- package/dist/styles/artifact.css +6 -18
- package/dist/styles/autocomplete.css +2 -1
- package/dist/styles/avatar.css +35 -30
- package/dist/styles/badge.css +10 -10
- package/dist/styles/base-ui-motion.css +94 -39
- package/dist/styles/browser-control-overlay.css +0 -1
- package/dist/styles/browser-live-view.css +39 -22
- package/dist/styles/browser-replay.css +1 -1
- package/dist/styles/browser-run-panel.css +13 -6
- package/dist/styles/button.css +36 -33
- package/dist/styles/card.css +5 -6
- package/dist/styles/chain-of-thought.css +22 -24
- package/dist/styles/checkbox.css +18 -5
- package/dist/styles/checkpoint.css +58 -0
- package/dist/styles/codex-model-selector.css +3 -7
- package/dist/styles/collapsible.css +10 -10
- package/dist/styles/combobox.css +4 -3
- package/dist/styles/commit.css +19 -39
- package/dist/styles/composition-motion.css +83 -0
- package/dist/styles/context-menu.css +3 -11
- package/dist/styles/context.css +11 -10
- package/dist/styles/conversation.css +18 -23
- package/dist/styles/dialog.css +15 -15
- package/dist/styles/environment-variables.css +0 -13
- package/dist/styles/field.css +32 -12
- package/dist/styles/file-tree.css +66 -22
- package/dist/styles/form.css +1 -1
- package/dist/styles/index.css +13 -4
- package/dist/styles/inline-citation.css +107 -0
- package/dist/styles/input.css +2 -2
- package/dist/styles/marker.css +14 -13
- package/dist/styles/mcp-server-picker.css +20 -47
- package/dist/styles/media-preview-card.css +160 -0
- package/dist/styles/menu.css +11 -40
- package/dist/styles/menubar.css +12 -19
- package/dist/styles/message-scroller.css +0 -12
- package/dist/styles/message.css +25 -31
- package/dist/styles/meter.css +2 -2
- package/dist/styles/model-selector.css +16 -34
- package/dist/styles/motion-reduction.css +29 -0
- package/dist/styles/navigation-menu.css +14 -30
- package/dist/styles/number-field.css +22 -4
- package/dist/styles/plan.css +132 -0
- package/dist/styles/popover.css +15 -52
- package/dist/styles/preview-card.css +2 -32
- package/dist/styles/progress.css +8 -3
- package/dist/styles/prompt-input.css +76 -269
- package/dist/styles/queue.css +48 -32
- package/dist/styles/radio.css +19 -12
- package/dist/styles/reasoning.css +2 -1
- package/dist/styles/recipes.css +207 -26
- package/dist/styles/resizable-side-panel.css +4 -10
- package/dist/styles/responsive-sidebar-shell.css +32 -34
- package/dist/styles/scroll-area.css +32 -15
- package/dist/styles/search-field.css +21 -0
- package/dist/styles/select.css +19 -12
- package/dist/styles/slider.css +25 -29
- package/dist/styles/sources.css +3 -11
- package/dist/styles/stepper.css +36 -26
- package/dist/styles/subagent-run.css +13 -71
- package/dist/styles/switch.css +32 -29
- package/dist/styles/tabs.css +79 -23
- package/dist/styles/task.css +11 -23
- package/dist/styles/test-results.css +29 -36
- package/dist/styles/theme-mode-control.css +8 -0
- package/dist/styles/think-execution-workbench.css +18 -15
- package/dist/styles/think-full-app.css +51 -100
- package/dist/styles/think-routine-library.css +51 -40
- package/dist/styles/think-thread-picker.css +207 -50
- package/dist/styles/toast.css +48 -34
- package/dist/styles/toggle-group.css +2 -36
- package/dist/styles/toggle.css +29 -5
- package/dist/styles/toolbar.css +25 -27
- package/dist/styles/tooltip.css +2 -32
- package/dist/styles/transition-surface.css +55 -0
- package/dist/styles/utilities.css +31 -0
- package/dist/styles/web-preview.css +0 -21
- package/dist/styles/workspace-explorer.css +104 -99
- package/dist/summarize-tool-input-CqTcGRYy.js +15 -0
- package/dist/think-agent-Cip5KAPj.d.ts +7 -0
- package/dist/utils/codex-model-catalog.d.ts +4 -4
- package/dist/utils/mcp-server-catalog.d.ts +132 -0
- package/dist/utils/mcp-server-catalog.js +90 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/workspace-path-L_KmjRjq.js +26 -0
- package/package.json +14 -9
- package/dist/Workspace-D39LxGvP.d.ts +0 -62
- package/dist/class-names-9UtZwb0J.js +0 -12
- package/dist/components/AppFrame.d.ts +0 -24
- package/dist/components/AppFrame.js +0 -25
- package/dist/components/Shell.d.ts +0 -163
- package/dist/components/Shell.js +0 -137
- package/dist/components/SubagentRun.d.ts +0 -86
- package/dist/components/SubagentRun.js +0 -108
- package/dist/styles/app-frame.css +0 -15
- package/dist/styles/shell.css +0 -122
- package/dist/summarize-tool-input-BUJsENSn.js +0 -12
package/dist/components/Field.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
1
2
|
import "react";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { Field as Field$1 } from "@base-ui/react/field";
|
|
@@ -17,12 +18,8 @@ import { Field as Field$1 } from "@base-ui/react/field";
|
|
|
17
18
|
*
|
|
18
19
|
* @see {@link https://base-ui.com/react/components/field | Base UI Field}
|
|
19
20
|
*/
|
|
20
|
-
function FieldRoot({ className
|
|
21
|
-
const classes = [
|
|
22
|
-
"field",
|
|
23
|
-
orientation !== "vertical" && `field--${orientation}`,
|
|
24
|
-
className
|
|
25
|
-
].filter(Boolean).join(" ");
|
|
21
|
+
function FieldRoot({ className, orientation = "vertical", ref, ...props }) {
|
|
22
|
+
const classes = mergeBaseClassName(["field", orientation !== "vertical" && `field--${orientation}`].filter(Boolean).join(" "), className);
|
|
26
23
|
return /* @__PURE__ */ jsx(Field$1.Root, {
|
|
27
24
|
ref,
|
|
28
25
|
role: "group",
|
|
@@ -44,8 +41,8 @@ function FieldRoot({ className = "", orientation = "vertical", ref, ...props })
|
|
|
44
41
|
* </Field.Root>
|
|
45
42
|
* ```
|
|
46
43
|
*/
|
|
47
|
-
function FieldLabel({ className
|
|
48
|
-
const classes =
|
|
44
|
+
function FieldLabel({ className, ref, ...props }) {
|
|
45
|
+
const classes = mergeBaseClassName("field__label", className);
|
|
49
46
|
return /* @__PURE__ */ jsx(Field$1.Label, {
|
|
50
47
|
ref,
|
|
51
48
|
"data-slot": "field-label",
|
|
@@ -66,8 +63,8 @@ function FieldLabel({ className = "", ref, ...props }) {
|
|
|
66
63
|
* <Field.Control render={<Textarea />} />
|
|
67
64
|
* ```
|
|
68
65
|
*/
|
|
69
|
-
function FieldControl({ className
|
|
70
|
-
const classes =
|
|
66
|
+
function FieldControl({ className, ref, ...props }) {
|
|
67
|
+
const classes = mergeBaseClassName("field__control", className);
|
|
71
68
|
return /* @__PURE__ */ jsx(Field$1.Control, {
|
|
72
69
|
ref,
|
|
73
70
|
"data-slot": "field-control",
|
|
@@ -88,8 +85,8 @@ function FieldControl({ className = "", ref, ...props }) {
|
|
|
88
85
|
* </Field.Root>
|
|
89
86
|
* ```
|
|
90
87
|
*/
|
|
91
|
-
function FieldDescription({ className
|
|
92
|
-
const classes =
|
|
88
|
+
function FieldDescription({ className, ref, ...props }) {
|
|
89
|
+
const classes = mergeBaseClassName("field__description", className);
|
|
93
90
|
return /* @__PURE__ */ jsx(Field$1.Description, {
|
|
94
91
|
ref,
|
|
95
92
|
"data-slot": "field-description",
|
|
@@ -120,16 +117,21 @@ function FieldDescription({ className = "", ref, ...props }) {
|
|
|
120
117
|
* - `rangeUnderflow` - Number is less than `min`
|
|
121
118
|
* - `rangeOverflow` - Number is greater than `max`
|
|
122
119
|
*/
|
|
123
|
-
function FieldError({ className
|
|
124
|
-
const classes =
|
|
125
|
-
|
|
120
|
+
function FieldError({ className, children, ref, ...props }) {
|
|
121
|
+
const classes = mergeBaseClassName("field__error", className);
|
|
122
|
+
return /* @__PURE__ */ jsx(Field$1.Error, {
|
|
126
123
|
ref,
|
|
127
124
|
"data-slot": "field-error",
|
|
128
125
|
className: classes,
|
|
129
126
|
...props,
|
|
130
127
|
children
|
|
131
128
|
});
|
|
132
|
-
|
|
129
|
+
}
|
|
130
|
+
function FieldErrors({ className = "", errors, children, ref, ...props }) {
|
|
131
|
+
const messages = [...new Set(errors.flatMap((error) => {
|
|
132
|
+
const message = typeof error === "string" ? error : error?.message;
|
|
133
|
+
return message ? [message] : [];
|
|
134
|
+
}))];
|
|
133
135
|
const content = children ?? (messages.length === 1 ? messages[0] : messages.length > 1 ? /* @__PURE__ */ jsx("ul", {
|
|
134
136
|
className: "field__error-list",
|
|
135
137
|
children: messages.map((message) => /* @__PURE__ */ jsx("li", { children: message }, message))
|
|
@@ -139,7 +141,7 @@ function FieldError({ className = "", errors, children, ref, ...props }) {
|
|
|
139
141
|
ref,
|
|
140
142
|
role: "alert",
|
|
141
143
|
"data-slot": "field-error",
|
|
142
|
-
className:
|
|
144
|
+
className: cx("field__error", className),
|
|
143
145
|
...props,
|
|
144
146
|
children: content
|
|
145
147
|
});
|
|
@@ -260,6 +262,7 @@ const Field = {
|
|
|
260
262
|
Control: FieldControl,
|
|
261
263
|
Description: FieldDescription,
|
|
262
264
|
Error: FieldError,
|
|
265
|
+
Errors: FieldErrors,
|
|
263
266
|
Item: Field$1.Item,
|
|
264
267
|
Validity: Field$1.Validity,
|
|
265
268
|
Set: FieldSet,
|
|
@@ -5,19 +5,14 @@ import { Fieldset as Fieldset$1 } from "@base-ui/react/fieldset";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Fieldset.Root component.
|
|
7
7
|
*/
|
|
8
|
-
interface FieldsetRootProps extends
|
|
9
|
-
/** Additional CSS class names */
|
|
10
|
-
className?: string;
|
|
8
|
+
interface FieldsetRootProps extends React.ComponentPropsWithoutRef<typeof Fieldset$1.Root> {
|
|
11
9
|
/** Visual treatment for the field group. */
|
|
12
10
|
variant?: "outlined" | "plain";
|
|
13
11
|
}
|
|
14
12
|
/**
|
|
15
13
|
* Props for the Fieldset.Legend component.
|
|
16
14
|
*/
|
|
17
|
-
interface FieldsetLegendProps extends
|
|
18
|
-
/** Additional CSS class names */
|
|
19
|
-
className?: string;
|
|
20
|
-
}
|
|
15
|
+
interface FieldsetLegendProps extends React.ComponentPropsWithoutRef<typeof Fieldset$1.Legend> {}
|
|
21
16
|
interface FieldsetDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {}
|
|
22
17
|
/**
|
|
23
18
|
* Groups the fieldset legend and associated fields.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
1
2
|
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Fieldset as Fieldset$1 } from "@base-ui/react/fieldset";
|
|
@@ -19,8 +20,8 @@ import { Fieldset as Fieldset$1 } from "@base-ui/react/fieldset";
|
|
|
19
20
|
*
|
|
20
21
|
* @see {@link https://base-ui.com/react/components/fieldset | Base UI Fieldset}
|
|
21
22
|
*/
|
|
22
|
-
function FieldsetRoot({ className
|
|
23
|
-
const classes = ["fieldset"
|
|
23
|
+
function FieldsetRoot({ className, ref, variant = "outlined", ...props }) {
|
|
24
|
+
const classes = mergeBaseClassName(["fieldset"].filter(Boolean).join(" "), className);
|
|
24
25
|
return /* @__PURE__ */ jsx(Fieldset$1.Root, {
|
|
25
26
|
ref,
|
|
26
27
|
className: classes,
|
|
@@ -32,18 +33,18 @@ function FieldsetRoot({ className = "", ref, variant = "outlined", ...props }) {
|
|
|
32
33
|
* Accessible label for the fieldset, automatically associated with it.
|
|
33
34
|
* Renders a `<div>` element (styled as legend).
|
|
34
35
|
*/
|
|
35
|
-
function FieldsetLegend({ className
|
|
36
|
-
const classes = ["fieldset__legend"
|
|
36
|
+
function FieldsetLegend({ className, ref, ...props }) {
|
|
37
|
+
const classes = mergeBaseClassName(["fieldset__legend"].filter(Boolean).join(" "), className);
|
|
37
38
|
return /* @__PURE__ */ jsx(Fieldset$1.Legend, {
|
|
38
39
|
ref,
|
|
39
40
|
className: classes,
|
|
40
41
|
...props
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
|
-
function FieldsetDescription({ className
|
|
44
|
+
function FieldsetDescription({ className, ref, ...props }) {
|
|
44
45
|
return /* @__PURE__ */ jsx("p", {
|
|
45
46
|
ref,
|
|
46
|
-
className: ["fieldset__description"
|
|
47
|
+
className: mergeBaseClassName(["fieldset__description"].filter(Boolean).join(" "), className),
|
|
47
48
|
...props
|
|
48
49
|
});
|
|
49
50
|
}
|
|
@@ -2,6 +2,8 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
//#region src/components/FileTree.d.ts
|
|
4
4
|
interface FileTreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
5
|
+
/** Visual treatment for the tree container. Plain trees inherit their surrounding canvas. */
|
|
6
|
+
appearance?: "contained" | "plain";
|
|
5
7
|
/** Set of folder paths that should be expanded. Controlled mode. */
|
|
6
8
|
expanded?: Set<string>;
|
|
7
9
|
/** Initial set of expanded folder paths. Uncontrolled mode. */
|
|
@@ -33,6 +35,7 @@ interface FileTreeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSe
|
|
|
33
35
|
* ```
|
|
34
36
|
*/
|
|
35
37
|
declare function FileTree({
|
|
38
|
+
appearance,
|
|
36
39
|
className,
|
|
37
40
|
"aria-label": ariaLabel,
|
|
38
41
|
expanded,
|
|
@@ -70,6 +73,8 @@ interface FileTreeFileProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
70
73
|
name: string;
|
|
71
74
|
/** Optional custom icon; defaults to a generic file icon. */
|
|
72
75
|
icon?: React.ReactNode;
|
|
76
|
+
/** App-owned anchor or router Link when selecting the file navigates. */
|
|
77
|
+
render?: React.ReactElement;
|
|
73
78
|
/** Depth level, auto-set by parent folder. */
|
|
74
79
|
level?: number;
|
|
75
80
|
}
|
|
@@ -78,6 +83,7 @@ declare function FileTreeFile({
|
|
|
78
83
|
path,
|
|
79
84
|
name,
|
|
80
85
|
icon,
|
|
86
|
+
render,
|
|
81
87
|
level,
|
|
82
88
|
ref,
|
|
83
89
|
...props
|
|
@@ -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-3zYtrddG.js";
|
|
2
2
|
export { FileTree, FileTreeActions, FileTreeFile, FileTreeFolder, FileTreeIcon, FileTreeName };
|
|
@@ -5,10 +5,7 @@ import { Form as Form$1 } from "@base-ui/react/form";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Form component.
|
|
7
7
|
*/
|
|
8
|
-
interface FormProps extends
|
|
9
|
-
/** Additional CSS class names */
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
8
|
+
interface FormProps extends React.ComponentPropsWithoutRef<typeof Form$1> {}
|
|
12
9
|
/**
|
|
13
10
|
* A form component that provides consolidated error handling and validation
|
|
14
11
|
* for form controls. Works seamlessly with the Field component.
|
package/dist/components/Form.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
1
2
|
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Form as Form$1 } from "@base-ui/react/form";
|
|
@@ -76,11 +77,11 @@ import { Form as Form$1 } from "@base-ui/react/form";
|
|
|
76
77
|
*
|
|
77
78
|
* @see {@link https://base-ui.com/react/components/form | Base UI Form}
|
|
78
79
|
*/
|
|
79
|
-
function Form({ className
|
|
80
|
+
function Form({ className, ref, ...props }) {
|
|
80
81
|
return /* @__PURE__ */ jsx(Form$1, {
|
|
81
82
|
ref,
|
|
82
83
|
"data-slot": "form",
|
|
83
|
-
className: ["form"
|
|
84
|
+
className: mergeBaseClassName(["form"].filter(Boolean).join(" "), className),
|
|
84
85
|
...props
|
|
85
86
|
});
|
|
86
87
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { i as ButtonSize, r as ButtonProps } from "../Button-
|
|
1
|
+
import { i as ButtonSize, r as ButtonProps } from "../Button-DLGzHsjc.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/IconButton.d.ts
|
|
5
|
-
type IconButtonSize = Extract<ButtonSize, "icon" | "icon-xs" | "icon-sm" | "icon-lg">;
|
|
6
5
|
interface IconButtonProps extends Omit<ButtonProps, "aria-label" | "children" | "size"> {
|
|
7
6
|
/** Decorative icon rendered inside the square button. */
|
|
8
7
|
children: React.ReactNode;
|
|
@@ -13,7 +12,7 @@ interface IconButtonProps extends Omit<ButtonProps, "aria-label" | "children" |
|
|
|
13
12
|
/** Preferred side for the tooltip. */
|
|
14
13
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
15
14
|
/** Square button size. */
|
|
16
|
-
size?:
|
|
15
|
+
size?: ButtonSize;
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
18
|
* A square, icon-only button with a required accessible name and matching
|
|
@@ -8,11 +8,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* tooltip. Use text buttons for actions whose consequence an icon cannot make
|
|
9
9
|
* clear on its own.
|
|
10
10
|
*/
|
|
11
|
-
function IconButton({ children, label, size = "
|
|
11
|
+
function IconButton({ children, label, size = "sm", tooltip = label, tooltipSide = "top", type = "button", ...props }) {
|
|
12
12
|
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
13
13
|
render: /* @__PURE__ */ jsx(Button, {
|
|
14
14
|
type,
|
|
15
15
|
size,
|
|
16
|
+
iconOnly: true,
|
|
16
17
|
"aria-label": label,
|
|
17
18
|
...props
|
|
18
19
|
}),
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { SourceDocumentUIPart, SourceUrlUIPart } from "ai";
|
|
3
|
+
|
|
4
|
+
//#region src/components/InlineCitation.d.ts
|
|
5
|
+
interface InlineCitationProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
6
|
+
/** Claim text and citations placed beside it by the consuming application. */
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Keeps claim text and an app-placed citation in one inline presentation group.
|
|
11
|
+
*
|
|
12
|
+
* AI SDK source parts do not include text offsets. The app must place this
|
|
13
|
+
* component beside the claim it supports; this component never parses message
|
|
14
|
+
* text or guesses an anchor position.
|
|
15
|
+
*
|
|
16
|
+
* @see ../../node_modules/ai/src/ui/ui-messages.ts (`SourceUrlUIPart`,
|
|
17
|
+
* `SourceDocumentUIPart`)
|
|
18
|
+
* @see https://elements.ai-sdk.dev/components/inline-citation
|
|
19
|
+
*/
|
|
20
|
+
declare function InlineCitation({
|
|
21
|
+
className,
|
|
22
|
+
ref,
|
|
23
|
+
...props
|
|
24
|
+
}: InlineCitationProps & {
|
|
25
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
interface InlineCitationTextProps extends React.ComponentPropsWithoutRef<"span"> {}
|
|
28
|
+
/** Claim text whose citation is placed by the consuming app. */
|
|
29
|
+
declare function InlineCitationText({
|
|
30
|
+
className,
|
|
31
|
+
ref,
|
|
32
|
+
...props
|
|
33
|
+
}: InlineCitationTextProps & {
|
|
34
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
35
|
+
}): React.JSX.Element;
|
|
36
|
+
interface InlineCitationCardProps extends React.ComponentPropsWithoutRef<"div"> {}
|
|
37
|
+
/** Compact presentation container for citation details inside an existing overlay. */
|
|
38
|
+
declare function InlineCitationCard({
|
|
39
|
+
className,
|
|
40
|
+
ref,
|
|
41
|
+
...props
|
|
42
|
+
}: InlineCitationCardProps & {
|
|
43
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
44
|
+
}): React.JSX.Element;
|
|
45
|
+
interface InlineCitationSourceProps extends Omit<React.ComponentPropsWithoutRef<"span">, "children"> {
|
|
46
|
+
/** The complete AI SDK source part. It is consumed directly without normalization. */
|
|
47
|
+
source: SourceUrlUIPart | SourceDocumentUIPart;
|
|
48
|
+
/** Optional presentation-owned citation number. It is not part of the source model. */
|
|
49
|
+
index?: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Adapts a whole AI SDK URL or document source part to an inline citation.
|
|
53
|
+
* URL sources use a safe external link and PreviewCard. Document sources have
|
|
54
|
+
* no URL, so they use a Popover button and never fabricate a download target.
|
|
55
|
+
*/
|
|
56
|
+
declare function InlineCitationSource({
|
|
57
|
+
source,
|
|
58
|
+
index,
|
|
59
|
+
className,
|
|
60
|
+
ref,
|
|
61
|
+
...props
|
|
62
|
+
}: InlineCitationSourceProps & {
|
|
63
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
64
|
+
}): React.JSX.Element;
|
|
65
|
+
//#endregion
|
|
66
|
+
export { InlineCitation, InlineCitationCard, InlineCitationCardProps, InlineCitationProps, InlineCitationSource, InlineCitationSourceProps, InlineCitationText, InlineCitationTextProps };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { Popover } from "./Popover.js";
|
|
3
|
+
import { PreviewCard } from "./PreviewCard.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/InlineCitation.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Keeps claim text and an app-placed citation in one inline presentation group.
|
|
9
|
+
*
|
|
10
|
+
* AI SDK source parts do not include text offsets. The app must place this
|
|
11
|
+
* component beside the claim it supports; this component never parses message
|
|
12
|
+
* text or guesses an anchor position.
|
|
13
|
+
*
|
|
14
|
+
* @see ../../node_modules/ai/src/ui/ui-messages.ts (`SourceUrlUIPart`,
|
|
15
|
+
* `SourceDocumentUIPart`)
|
|
16
|
+
* @see https://elements.ai-sdk.dev/components/inline-citation
|
|
17
|
+
*/
|
|
18
|
+
function InlineCitation({ className, ref, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("span", {
|
|
20
|
+
ref,
|
|
21
|
+
"data-slot": "inline-citation",
|
|
22
|
+
className: cx("inline-citation", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** Claim text whose citation is placed by the consuming app. */
|
|
27
|
+
function InlineCitationText({ className, ref, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("span", {
|
|
29
|
+
ref,
|
|
30
|
+
"data-slot": "inline-citation-text",
|
|
31
|
+
className: cx("inline-citation__text", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Compact presentation container for citation details inside an existing overlay. */
|
|
36
|
+
function InlineCitationCard({ className, ref, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx("div", {
|
|
38
|
+
ref,
|
|
39
|
+
"data-slot": "inline-citation-card",
|
|
40
|
+
className: cx("inline-citation__card", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Adapts a whole AI SDK URL or document source part to an inline citation.
|
|
46
|
+
* URL sources use a safe external link and PreviewCard. Document sources have
|
|
47
|
+
* no URL, so they use a Popover button and never fabricate a download target.
|
|
48
|
+
*/
|
|
49
|
+
function InlineCitationSource({ source, index, className, ref, ...props }) {
|
|
50
|
+
const visibleLabel = index == null ? defaultLabel(source) : `[${index}]`;
|
|
51
|
+
const accessibleName = `${visibleLabel}: ${source.title || visibleLabel}`;
|
|
52
|
+
if (source.type === "source-url") {
|
|
53
|
+
const href = safeSourceUrl(source.url);
|
|
54
|
+
if (href) return /* @__PURE__ */ jsx("span", {
|
|
55
|
+
ref,
|
|
56
|
+
className: cx("inline-citation__source", className),
|
|
57
|
+
...props,
|
|
58
|
+
"data-slot": "inline-citation-source",
|
|
59
|
+
"data-source-id": source.sourceId,
|
|
60
|
+
"data-source-type": source.type,
|
|
61
|
+
children: /* @__PURE__ */ jsxs(PreviewCard.Root, { children: [/* @__PURE__ */ jsx(PreviewCard.Trigger, {
|
|
62
|
+
delay: 0,
|
|
63
|
+
closeDelay: 0,
|
|
64
|
+
href,
|
|
65
|
+
target: "_blank",
|
|
66
|
+
rel: "noreferrer",
|
|
67
|
+
className: "inline-citation__trigger",
|
|
68
|
+
"aria-label": `${accessibleName} (opens in a new tab)`,
|
|
69
|
+
children: visibleLabel
|
|
70
|
+
}), /* @__PURE__ */ jsx(PreviewCard.Portal, { children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
|
|
71
|
+
sideOffset: 8,
|
|
72
|
+
children: /* @__PURE__ */ jsx(PreviewCard.Popup, {
|
|
73
|
+
className: "inline-citation__popup",
|
|
74
|
+
children: /* @__PURE__ */ jsx(CitationDetails, { source })
|
|
75
|
+
})
|
|
76
|
+
}) })] })
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return /* @__PURE__ */ jsx("span", {
|
|
80
|
+
ref,
|
|
81
|
+
className: cx("inline-citation__source", className),
|
|
82
|
+
...props,
|
|
83
|
+
"data-slot": "inline-citation-source",
|
|
84
|
+
"data-source-id": source.sourceId,
|
|
85
|
+
"data-source-type": source.type,
|
|
86
|
+
children: /* @__PURE__ */ jsxs(Popover.Root, { children: [/* @__PURE__ */ jsx(Popover.Trigger, {
|
|
87
|
+
className: "inline-citation__trigger",
|
|
88
|
+
"aria-label": accessibleName,
|
|
89
|
+
children: visibleLabel
|
|
90
|
+
}), /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
91
|
+
sideOffset: 8,
|
|
92
|
+
children: /* @__PURE__ */ jsx(Popover.Popup, {
|
|
93
|
+
className: "inline-citation__popup",
|
|
94
|
+
children: /* @__PURE__ */ jsx(CitationDetails, {
|
|
95
|
+
source,
|
|
96
|
+
titlePart: "popover"
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
}) })] })
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function CitationDetails({ source, titlePart }) {
|
|
103
|
+
const title = source.title || defaultLabel(source);
|
|
104
|
+
return /* @__PURE__ */ jsxs(InlineCitationCard, { children: [
|
|
105
|
+
titlePart ? /* @__PURE__ */ jsx(Popover.Title, {
|
|
106
|
+
className: "inline-citation__title",
|
|
107
|
+
children: title
|
|
108
|
+
}) : /* @__PURE__ */ jsx("strong", {
|
|
109
|
+
className: "inline-citation__title",
|
|
110
|
+
children: title
|
|
111
|
+
}),
|
|
112
|
+
source.type === "source-url" ? /* @__PURE__ */ jsx("span", {
|
|
113
|
+
className: "inline-citation__location",
|
|
114
|
+
children: source.url
|
|
115
|
+
}) : /* @__PURE__ */ jsxs("span", {
|
|
116
|
+
className: "inline-citation__metadata",
|
|
117
|
+
children: [source.filename ? /* @__PURE__ */ jsx("span", { children: source.filename }) : null, /* @__PURE__ */ jsx("span", { children: source.mediaType })]
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ jsxs("span", {
|
|
120
|
+
className: "inline-citation__id",
|
|
121
|
+
children: ["Source ID: ", source.sourceId]
|
|
122
|
+
})
|
|
123
|
+
] });
|
|
124
|
+
}
|
|
125
|
+
function defaultLabel(source) {
|
|
126
|
+
if (source.type === "source-document") return "Document";
|
|
127
|
+
try {
|
|
128
|
+
return new URL(source.url).hostname.replace(/^www\./, "") || "Source";
|
|
129
|
+
} catch {
|
|
130
|
+
return "Source";
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function safeSourceUrl(value) {
|
|
134
|
+
try {
|
|
135
|
+
const parsed = new URL(value);
|
|
136
|
+
return parsed.protocol === "https:" || parsed.protocol === "http:" ? parsed.href : null;
|
|
137
|
+
} catch {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
export { InlineCitation, InlineCitationCard, InlineCitationSource, InlineCitationText };
|
|
@@ -5,10 +5,7 @@ import { InputProps as InputProps$1 } from "@base-ui/react/input";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Input component.
|
|
7
7
|
*/
|
|
8
|
-
interface InputProps extends
|
|
9
|
-
/** Additional CSS class names */
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
8
|
+
interface InputProps extends InputProps$1 {}
|
|
12
9
|
/**
|
|
13
10
|
* An accessible text input component with consistent styling.
|
|
14
11
|
*
|
package/dist/components/Input.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
1
2
|
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
@@ -15,11 +16,11 @@ import { Input as Input$1 } from "@base-ui/react/input";
|
|
|
15
16
|
*
|
|
16
17
|
* @see {@link https://base-ui.com/react/components/input | Base UI Input}
|
|
17
18
|
*/
|
|
18
|
-
function Input({ className
|
|
19
|
+
function Input({ className, ref, ...props }) {
|
|
19
20
|
return /* @__PURE__ */ jsx(Input$1, {
|
|
20
21
|
ref,
|
|
21
22
|
"data-slot": "input",
|
|
22
|
-
className: ["input"
|
|
23
|
+
className: mergeBaseClassName(["input"].filter(Boolean).join(" "), className),
|
|
23
24
|
...props
|
|
24
25
|
});
|
|
25
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { G as SpinnerIcon, Z as WarningIcon, k as McpIcon, l as CheckIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "./AgentAttention.js";
|
|
5
5
|
import { getMcpServerEntry, getMcpServerRuntimeState } from "../utils/mcp-server-catalog.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as MenuItemProps, t as Menu } from "../Menu-
|
|
1
|
+
import { s as MenuItemProps, t as Menu } from "../Menu-L6MZm-7N.js";
|
|
2
2
|
import { McpServerCard } from "../utils/mcp-server-catalog.js";
|
|
3
3
|
import { McpConnectorFormProps } from "./AgentConnection.js";
|
|
4
4
|
import { DialogProps } from "./Dialog.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { G as SpinnerIcon, M as MinusIcon, Z as WarningIcon, l as CheckIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { buttonVariants } from "./Button.js";
|
|
4
4
|
import { Dialog } from "./Dialog.js";
|
|
5
5
|
import { Menu } from "./Menu.js";
|
|
@@ -63,6 +63,7 @@ function McpServerPicker({ servers, onConnect, mcp, onDisconnect, sideOffset = 1
|
|
|
63
63
|
align: "start",
|
|
64
64
|
className: "mcp-server-picker__popup",
|
|
65
65
|
collisionPadding: 8,
|
|
66
|
+
"data-recipe": "wide-scroll-picker",
|
|
66
67
|
side: "top",
|
|
67
68
|
sideOffset,
|
|
68
69
|
children: /* @__PURE__ */ jsx(McpServerPickerItems, {
|
|
@@ -111,7 +112,7 @@ function McpServerPickerItems({ servers, onConnect, mcp, onDisconnect }) {
|
|
|
111
112
|
}
|
|
112
113
|
function McpServerPickerGroup({ label, children, className, ...props }) {
|
|
113
114
|
return /* @__PURE__ */ jsxs(Menu.Group, {
|
|
114
|
-
className:
|
|
115
|
+
className: mergeBaseClassName("mcp-server-picker__group", className),
|
|
115
116
|
...props,
|
|
116
117
|
children: [/* @__PURE__ */ jsx(Menu.GroupLabel, {
|
|
117
118
|
className: "mcp-server-picker__group-label",
|
|
@@ -121,7 +122,7 @@ function McpServerPickerGroup({ label, children, className, ...props }) {
|
|
|
121
122
|
}
|
|
122
123
|
function McpServerPickerAction({ icon, label, description, className, ...props }) {
|
|
123
124
|
return /* @__PURE__ */ jsxs(Menu.Item, {
|
|
124
|
-
className:
|
|
125
|
+
className: mergeBaseClassName("mcp-server-picker__row mcp-server-picker__custom-action", className),
|
|
125
126
|
...props,
|
|
126
127
|
children: [/* @__PURE__ */ jsx("span", {
|
|
127
128
|
className: "mcp-server-picker__icon",
|
|
@@ -202,7 +203,7 @@ function McpServerPickerRow({ row, onConnect, onDisconnect, pendingAction }) {
|
|
|
202
203
|
onClick: pendingAction !== null ? void 0 : () => void onDisconnect(connectedServerId),
|
|
203
204
|
title: disconnectLabel,
|
|
204
205
|
children: [/* @__PURE__ */ jsx(MinusIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
205
|
-
className: "mcp-server-picker__status-label",
|
|
206
|
+
className: "mcp-server-picker__status-label sigvelo-visually-hidden",
|
|
206
207
|
children: disconnectLabel
|
|
207
208
|
})]
|
|
208
209
|
}) : null]
|