@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
|
@@ -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 { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
@@ -15,8 +16,8 @@ import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
|
15
16
|
*
|
|
16
17
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
|
|
17
18
|
*/
|
|
18
|
-
function AvatarRoot({ className
|
|
19
|
-
const classes = ["avatar"
|
|
19
|
+
function AvatarRoot({ className, size = "md", ref, ...props }) {
|
|
20
|
+
const classes = mergeBaseClassName(["avatar"].filter(Boolean).join(" "), className);
|
|
20
21
|
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
21
22
|
ref,
|
|
22
23
|
"data-slot": "avatar",
|
|
@@ -28,8 +29,8 @@ function AvatarRoot({ className = "", size = "default", ref, ...props }) {
|
|
|
28
29
|
/**
|
|
29
30
|
* Displays the avatar image. Renders an `<img>` element.
|
|
30
31
|
*/
|
|
31
|
-
function AvatarImage({ className
|
|
32
|
-
const classes = ["avatar__image"
|
|
32
|
+
function AvatarImage({ className, ref, ...props }) {
|
|
33
|
+
const classes = mergeBaseClassName(["avatar__image"].filter(Boolean).join(" "), className);
|
|
33
34
|
return /* @__PURE__ */ jsx(Avatar$1.Image, {
|
|
34
35
|
ref,
|
|
35
36
|
"data-slot": "avatar-image",
|
|
@@ -41,8 +42,8 @@ function AvatarImage({ className = "", ref, ...props }) {
|
|
|
41
42
|
* Displays when the image fails to load or isn't provided.
|
|
42
43
|
* Typically contains initials or an icon. Renders a `<span>` element.
|
|
43
44
|
*/
|
|
44
|
-
function AvatarFallback({ className
|
|
45
|
-
const classes = ["avatar__fallback"
|
|
45
|
+
function AvatarFallback({ className, ref, ...props }) {
|
|
46
|
+
const classes = mergeBaseClassName(["avatar__fallback"].filter(Boolean).join(" "), className);
|
|
46
47
|
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
47
48
|
ref,
|
|
48
49
|
"data-slot": "avatar-fallback",
|
|
@@ -50,27 +51,27 @@ function AvatarFallback({ className = "", ref, ...props }) {
|
|
|
50
51
|
...props
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
function AvatarGroup({ className
|
|
54
|
+
function AvatarGroup({ className, ref, ...props }) {
|
|
54
55
|
return /* @__PURE__ */ jsx("div", {
|
|
55
56
|
ref,
|
|
56
57
|
"data-slot": "avatar-group",
|
|
57
|
-
className: ["avatar-group"
|
|
58
|
+
className: mergeBaseClassName(["avatar-group"].filter(Boolean).join(" "), className),
|
|
58
59
|
...props
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
|
-
function AvatarGroupCount({ className
|
|
62
|
+
function AvatarGroupCount({ className, ref, ...props }) {
|
|
62
63
|
return /* @__PURE__ */ jsx("div", {
|
|
63
64
|
ref,
|
|
64
65
|
"data-slot": "avatar-group-count",
|
|
65
|
-
className: ["avatar-group__count"
|
|
66
|
+
className: mergeBaseClassName(["avatar-group__count"].filter(Boolean).join(" "), className),
|
|
66
67
|
...props
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
|
-
function AvatarBadge({ className
|
|
70
|
+
function AvatarBadge({ className, ref, ...props }) {
|
|
70
71
|
return /* @__PURE__ */ jsx("span", {
|
|
71
72
|
ref,
|
|
72
73
|
"data-slot": "avatar-badge",
|
|
73
|
-
className: ["avatar__badge"
|
|
74
|
+
className: mergeBaseClassName(["avatar__badge"].filter(Boolean).join(" "), className),
|
|
74
75
|
...props
|
|
75
76
|
});
|
|
76
77
|
}
|
package/dist/components/Badge.js
CHANGED
|
@@ -43,6 +43,7 @@ function mergeSlottedBadgeProps(childProps, badgeProps) {
|
|
|
43
43
|
mergedProps.ref = mergeRefs(childProps.ref, badgeProps.ref);
|
|
44
44
|
mergedProps["data-slot"] = "badge";
|
|
45
45
|
mergedProps["data-variant"] = badgeProps["data-variant"];
|
|
46
|
+
mergedProps["data-size"] = badgeProps["data-size"];
|
|
46
47
|
return mergedProps;
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
@@ -71,12 +72,14 @@ function Badge({ variant = "normal", color, size = "md", className, render, chil
|
|
|
71
72
|
className: classes,
|
|
72
73
|
"data-slot": "badge",
|
|
73
74
|
"data-variant": badgeVariant,
|
|
75
|
+
"data-size": size,
|
|
74
76
|
children
|
|
75
77
|
}));
|
|
76
78
|
return /* @__PURE__ */ jsx("span", {
|
|
77
79
|
ref,
|
|
78
80
|
"data-slot": "badge",
|
|
79
81
|
"data-variant": badgeVariant,
|
|
82
|
+
"data-size": size,
|
|
80
83
|
className: classes,
|
|
81
84
|
...props,
|
|
82
85
|
children
|
|
@@ -1,7 +1,8 @@
|
|
|
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, O as MaximizeIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Dialog } from "./Dialog.js";
|
|
5
|
+
import { TransitionSurface } from "./TransitionSurface.js";
|
|
5
6
|
import { Badge } from "./Badge.js";
|
|
6
7
|
import * as React from "react";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -41,7 +42,15 @@ function EndedState({ title, detail }) {
|
|
|
41
42
|
*/
|
|
42
43
|
function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, ...props }) {
|
|
43
44
|
const [expired, setExpired] = React.useState(() => receivedAt !== void 0 && receivedAt + source.expiresInMs <= Date.now());
|
|
44
|
-
const [
|
|
45
|
+
const [reportedFrameState, setReportedFrameState] = React.useState(() => ({
|
|
46
|
+
url: source.url,
|
|
47
|
+
value: "loading"
|
|
48
|
+
}));
|
|
49
|
+
if (reportedFrameState.url !== source.url) setReportedFrameState({
|
|
50
|
+
url: source.url,
|
|
51
|
+
value: "loading"
|
|
52
|
+
});
|
|
53
|
+
const frameState = reportedFrameState.url === source.url ? reportedFrameState.value : "loading";
|
|
45
54
|
React.useEffect(() => {
|
|
46
55
|
const remaining = (receivedAt ?? Date.now()) + source.expiresInMs - Date.now();
|
|
47
56
|
if (remaining <= 0) {
|
|
@@ -57,14 +66,15 @@ function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, .
|
|
|
57
66
|
source.targetId,
|
|
58
67
|
source.url
|
|
59
68
|
]);
|
|
60
|
-
React.useEffect(() => {
|
|
61
|
-
setFrameState("loading");
|
|
62
|
-
}, [source.url]);
|
|
63
69
|
React.useEffect(() => {
|
|
64
70
|
if (frameState !== "loading") return;
|
|
65
|
-
const
|
|
71
|
+
const url = source.url;
|
|
72
|
+
const timer = setTimeout(() => setReportedFrameState({
|
|
73
|
+
url,
|
|
74
|
+
value: "failed"
|
|
75
|
+
}), FRAME_LOAD_TIMEOUT_MS);
|
|
66
76
|
return () => clearTimeout(timer);
|
|
67
|
-
}, [frameState]);
|
|
77
|
+
}, [frameState, source.url]);
|
|
68
78
|
const failed = frameState === "failed";
|
|
69
79
|
const live = !expired && !failed;
|
|
70
80
|
const frameTitle = pageTitle ? `Live browser view — ${pageTitle}` : "Live browser view";
|
|
@@ -83,9 +93,12 @@ function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, .
|
|
|
83
93
|
src: source.url,
|
|
84
94
|
title: frameTitle,
|
|
85
95
|
allow: "clipboard-read; clipboard-write",
|
|
86
|
-
onLoad: () =>
|
|
87
|
-
|
|
88
|
-
|
|
96
|
+
onLoad: () => setReportedFrameState({
|
|
97
|
+
url: source.url,
|
|
98
|
+
value: "ready"
|
|
99
|
+
})
|
|
100
|
+
}, source.url),
|
|
101
|
+
frameState === "loading" ? /* @__PURE__ */ jsxs(TransitionSurface, {
|
|
89
102
|
className: "browser-live-view__state",
|
|
90
103
|
role: "status",
|
|
91
104
|
children: [/* @__PURE__ */ jsx(SpinnerIcon, { className: "browser-live-view__state-spinner" }), "Connecting live view…"]
|
|
@@ -98,10 +111,12 @@ function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, .
|
|
|
98
111
|
...props,
|
|
99
112
|
className: cx("browser-live-view", className),
|
|
100
113
|
"data-expired": expired || failed || void 0,
|
|
114
|
+
"data-frame-state": frameState,
|
|
101
115
|
children: [view, /* @__PURE__ */ jsxs(Dialog.Root, { children: [/* @__PURE__ */ jsx(Dialog.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
102
116
|
variant: "ghost",
|
|
103
117
|
color: "neutral",
|
|
104
|
-
size: "
|
|
118
|
+
size: "sm",
|
|
119
|
+
iconOnly: true,
|
|
105
120
|
className: "browser-live-view__expand",
|
|
106
121
|
"aria-label": "Expand browser view",
|
|
107
122
|
children: /* @__PURE__ */ jsx(MaximizeIcon, {})
|
|
@@ -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 { L as PauseIcon, z as PlayIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Slider } from "./Slider.js";
|
|
5
5
|
import * as React from "react";
|
|
@@ -154,7 +154,8 @@ function BrowserReplay({ className, events, autoPlay, ref, ...props }) {
|
|
|
154
154
|
/* @__PURE__ */ jsx(Button, {
|
|
155
155
|
variant: "ghost",
|
|
156
156
|
color: "neutral",
|
|
157
|
-
size: "
|
|
157
|
+
size: "sm",
|
|
158
|
+
iconOnly: true,
|
|
158
159
|
className: "browser-replay__toggle",
|
|
159
160
|
"aria-label": isPlaying ? "Pause replay" : "Play replay",
|
|
160
161
|
disabled,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { $ as XIcon, G as SpinnerIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
+
import { Tabs } from "./Tabs.js";
|
|
4
5
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
5
6
|
import { WebPreview, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl } from "./WebPreview.js";
|
|
6
7
|
import * as React from "react";
|
|
@@ -35,76 +36,68 @@ function BrowserRunPanelState({ children, role, tone = "neutral" }) {
|
|
|
35
36
|
* data and calls app-provided refresh/close callbacks.
|
|
36
37
|
*/
|
|
37
38
|
function BrowserRunPanel({ liveView, onRefresh, onCloseSession, loading, error, label = "Browser", empty = "No live browser session", fallback, className, ref, ...props }) {
|
|
38
|
-
const [
|
|
39
|
+
const [requestedTargetId, setRequestedTargetId] = React.useState();
|
|
39
40
|
const [receivedAt, setReceivedAt] = React.useState(() => Date.now());
|
|
40
|
-
const tabRefs = React.useRef(/* @__PURE__ */ new Map());
|
|
41
|
-
const tabListId = React.useId();
|
|
42
41
|
React.useEffect(() => {
|
|
43
42
|
if (liveView) setReceivedAt(Date.now());
|
|
44
43
|
}, [liveView]);
|
|
45
44
|
const targets = liveView?.targets ?? [];
|
|
46
|
-
const target = pickTarget(targets,
|
|
45
|
+
const target = pickTarget(targets, requestedTargetId);
|
|
47
46
|
const pageUrl = target?.pageUrl ?? "";
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
const body = target && liveView ? /* @__PURE__ */ jsx(BrowserLiveView, {
|
|
48
|
+
source: {
|
|
49
|
+
url: target.url,
|
|
50
|
+
targetId: target.targetId,
|
|
51
|
+
expiresInMs: liveView.expiresInMs
|
|
52
|
+
},
|
|
53
|
+
receivedAt,
|
|
54
|
+
pageTitle: target.title ?? target.pageUrl,
|
|
55
|
+
fallback,
|
|
56
|
+
className: "browser-run-panel__live-view"
|
|
57
|
+
}) : loading ? /* @__PURE__ */ jsxs(BrowserRunPanelState, {
|
|
58
|
+
role: "status",
|
|
59
|
+
children: [/* @__PURE__ */ jsx(SpinnerIcon, { className: "browser-run-panel__spinner" }), "Loading browser session"]
|
|
60
|
+
}) : /* @__PURE__ */ jsx(BrowserRunPanelState, { children: empty });
|
|
61
|
+
const bodyProps = {
|
|
62
|
+
className: "web-preview__body browser-run-panel__body",
|
|
63
|
+
"aria-busy": loading || void 0
|
|
65
64
|
};
|
|
66
|
-
return /* @__PURE__ */ jsxs(
|
|
67
|
-
ref,
|
|
65
|
+
return /* @__PURE__ */ jsxs(Tabs.Root, {
|
|
68
66
|
className: cx("browser-run-panel", className),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
value: target?.targetId ?? null,
|
|
68
|
+
onValueChange: (value) => {
|
|
69
|
+
if (typeof value === "string") setRequestedTargetId(value);
|
|
70
|
+
},
|
|
71
|
+
render: /* @__PURE__ */ jsx(WebPreview, {
|
|
72
|
+
ref,
|
|
73
|
+
url: pageUrl,
|
|
74
|
+
role: "region",
|
|
75
|
+
"aria-label": typeof label === "string" ? label : "Browser",
|
|
76
|
+
...props
|
|
77
|
+
}),
|
|
73
78
|
children: [
|
|
74
|
-
targets.length > 1 ? /* @__PURE__ */ jsx(WebPreviewNavigation, { children: /* @__PURE__ */
|
|
75
|
-
id: tabListId,
|
|
79
|
+
targets.length > 1 ? /* @__PURE__ */ jsx(WebPreviewNavigation, { children: /* @__PURE__ */ jsxs(Tabs.List, {
|
|
76
80
|
className: "browser-run-panel__tabs",
|
|
77
|
-
role: "tablist",
|
|
78
81
|
"aria-label": "Open browser pages",
|
|
79
|
-
|
|
80
|
-
children: targets.map((candidate) => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (node) tabRefs.current.set(candidate.targetId, node);
|
|
85
|
-
else tabRefs.current.delete(candidate.targetId);
|
|
86
|
-
},
|
|
82
|
+
activateOnFocus: true,
|
|
83
|
+
children: [targets.map((candidate) => /* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
84
|
+
value: candidate.targetId,
|
|
85
|
+
className: "browser-run-panel__tab",
|
|
86
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
87
87
|
type: "button",
|
|
88
88
|
variant: "ghost",
|
|
89
89
|
color: "neutral",
|
|
90
|
-
size: "sm"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"aria-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
children:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
children: targetGlyph(candidate)
|
|
102
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
103
|
-
className: "browser-run-panel__tab-title",
|
|
104
|
-
children: targetLabel(candidate)
|
|
105
|
-
})]
|
|
106
|
-
}, candidate.targetId);
|
|
107
|
-
})
|
|
90
|
+
size: "sm"
|
|
91
|
+
}),
|
|
92
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
93
|
+
className: "browser-run-panel__tab-glyph",
|
|
94
|
+
"aria-hidden": "true",
|
|
95
|
+
children: targetGlyph(candidate)
|
|
96
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
97
|
+
className: "browser-run-panel__tab-title",
|
|
98
|
+
children: targetLabel(candidate)
|
|
99
|
+
})]
|
|
100
|
+
}, candidate.targetId)), /* @__PURE__ */ jsx(Tabs.Indicator, {})]
|
|
108
101
|
}) }) : null,
|
|
109
102
|
/* @__PURE__ */ jsxs(WebPreviewNavigation, {
|
|
110
103
|
className: "browser-run-panel__address-bar",
|
|
@@ -131,26 +124,13 @@ function BrowserRunPanel({ liveView, onRefresh, onCloseSession, loading, error,
|
|
|
131
124
|
tone: "danger",
|
|
132
125
|
children: error
|
|
133
126
|
}) : null,
|
|
134
|
-
/* @__PURE__ */ jsx(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
children:
|
|
141
|
-
source: {
|
|
142
|
-
url: target.url,
|
|
143
|
-
targetId: target.targetId,
|
|
144
|
-
expiresInMs: liveView.expiresInMs
|
|
145
|
-
},
|
|
146
|
-
receivedAt,
|
|
147
|
-
pageTitle: target.title ?? target.pageUrl,
|
|
148
|
-
fallback,
|
|
149
|
-
className: "browser-run-panel__live-view"
|
|
150
|
-
}) : loading ? /* @__PURE__ */ jsxs(BrowserRunPanelState, {
|
|
151
|
-
role: "status",
|
|
152
|
-
children: [/* @__PURE__ */ jsx(SpinnerIcon, { className: "browser-run-panel__spinner" }), "Loading browser session"]
|
|
153
|
-
}) : /* @__PURE__ */ jsx(BrowserRunPanelState, { children: empty })
|
|
127
|
+
targets.length > 1 && target ? /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
128
|
+
...bodyProps,
|
|
129
|
+
value: target.targetId,
|
|
130
|
+
children: body
|
|
131
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
132
|
+
...bodyProps,
|
|
133
|
+
children: body
|
|
154
134
|
})
|
|
155
135
|
]
|
|
156
136
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-DLGzHsjc.js";
|
|
2
2
|
export { Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, ButtonVariantsOptions, buttonVariants };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
4
|
//#region src/components/Button.tsx
|
|
4
|
-
function buttonVariants({ variant = "normal", color = "primary", size = "
|
|
5
|
+
function buttonVariants({ variant = "normal", color = "primary", size = "sm", className } = {}) {
|
|
5
6
|
return [
|
|
6
7
|
"button",
|
|
7
8
|
`button--${variant ?? "normal"}`,
|
|
8
9
|
`button--${color ?? "primary"}`,
|
|
9
|
-
`button--${size ?? "
|
|
10
|
+
`button--${size ?? "sm"}`,
|
|
10
11
|
className
|
|
11
12
|
].filter(Boolean).join(" ");
|
|
12
13
|
}
|
|
@@ -23,27 +24,24 @@ function buttonVariants({ variant = "normal", color = "primary", size = "md", cl
|
|
|
23
24
|
* <Button color="primary">Save changes</Button>
|
|
24
25
|
* <Button color="destructive">Delete account</Button>
|
|
25
26
|
* <Button variant="outline">Cancel</Button>
|
|
26
|
-
* <Button variant="ghost" size="
|
|
27
|
+
* <Button variant="ghost" size="sm" iconOnly aria-label="Search"><SearchIcon /></Button>
|
|
27
28
|
* ```
|
|
28
29
|
*
|
|
29
30
|
* @see {@link https://base-ui.com/react/components/button | Base UI Button}
|
|
30
31
|
*/
|
|
31
|
-
function Button({ variant = "normal", color = "primary", size = "
|
|
32
|
+
function Button({ variant = "normal", color = "primary", size = "sm", iconOnly = false, className, nativeButton, ref, ...props }) {
|
|
33
|
+
const classes = mergeBaseClassName(buttonVariants({
|
|
34
|
+
variant,
|
|
35
|
+
color,
|
|
36
|
+
size
|
|
37
|
+
}), className);
|
|
38
|
+
const resolvedNativeButton = nativeButton ?? props.render == null;
|
|
32
39
|
return /* @__PURE__ */ jsx(Button$1, {
|
|
33
40
|
ref,
|
|
34
41
|
"data-slot": "button",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
size,
|
|
39
|
-
className: className(state)
|
|
40
|
-
}) : buttonVariants({
|
|
41
|
-
variant,
|
|
42
|
-
color,
|
|
43
|
-
size,
|
|
44
|
-
className
|
|
45
|
-
}),
|
|
46
|
-
nativeButton: nativeButton ?? props.render == null,
|
|
42
|
+
"data-icon-only": iconOnly ? "" : void 0,
|
|
43
|
+
className: classes,
|
|
44
|
+
nativeButton: resolvedNativeButton,
|
|
47
45
|
...props
|
|
48
46
|
});
|
|
49
47
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
3
|
|
|
3
4
|
//#region src/components/Card.d.ts
|
|
4
5
|
/**
|
|
@@ -14,8 +15,8 @@ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
14
15
|
size?: "default" | "sm";
|
|
15
16
|
}
|
|
16
17
|
interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
17
|
-
interface CardTitleProps extends
|
|
18
|
-
interface CardDescriptionProps extends
|
|
18
|
+
interface CardTitleProps extends useRender.ComponentProps<"div"> {}
|
|
19
|
+
interface CardDescriptionProps extends useRender.ComponentProps<"div"> {}
|
|
19
20
|
interface CardActionProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
20
21
|
interface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
21
22
|
interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
@@ -53,18 +54,16 @@ declare function CardHeader({
|
|
|
53
54
|
}): React.JSX.Element;
|
|
54
55
|
declare function CardTitle({
|
|
55
56
|
className,
|
|
57
|
+
render,
|
|
56
58
|
ref,
|
|
57
59
|
...props
|
|
58
|
-
}: CardTitleProps
|
|
59
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
60
|
-
}): React.JSX.Element;
|
|
60
|
+
}: CardTitleProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
61
61
|
declare function CardDescription({
|
|
62
62
|
className,
|
|
63
|
+
render,
|
|
63
64
|
ref,
|
|
64
65
|
...props
|
|
65
|
-
}: CardDescriptionProps
|
|
66
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
67
|
-
}): React.JSX.Element;
|
|
66
|
+
}: CardDescriptionProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
68
67
|
declare function CardAction({
|
|
69
68
|
className,
|
|
70
69
|
ref,
|
package/dist/components/Card.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
4
|
//#region src/components/Card.tsx
|
|
4
5
|
/**
|
|
5
6
|
* A container component that provides consistent styling and elevation.
|
|
@@ -38,20 +39,28 @@ function CardHeader({ className = "", ref, ...props }) {
|
|
|
38
39
|
...props
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
|
-
function CardTitle({ className = "", ref, ...props }) {
|
|
42
|
-
return
|
|
42
|
+
function CardTitle({ className = "", render, ref, ...props }) {
|
|
43
|
+
return useRender({
|
|
44
|
+
defaultTagName: "div",
|
|
45
|
+
render,
|
|
43
46
|
ref,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
props: {
|
|
48
|
+
...props,
|
|
49
|
+
"data-slot": "card-title",
|
|
50
|
+
className: ["card__title", className].filter(Boolean).join(" ")
|
|
51
|
+
}
|
|
47
52
|
});
|
|
48
53
|
}
|
|
49
|
-
function CardDescription({ className = "", ref, ...props }) {
|
|
50
|
-
return
|
|
54
|
+
function CardDescription({ className = "", render, ref, ...props }) {
|
|
55
|
+
return useRender({
|
|
56
|
+
defaultTagName: "div",
|
|
57
|
+
render,
|
|
51
58
|
ref,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
props: {
|
|
60
|
+
...props,
|
|
61
|
+
"data-slot": "card-description",
|
|
62
|
+
className: ["card__description", className].filter(Boolean).join(" ")
|
|
63
|
+
}
|
|
55
64
|
});
|
|
56
65
|
}
|
|
57
66
|
function CardAction({ className = "", ref, ...props }) {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { Collapsible } from "
|
|
2
|
-
import {
|
|
1
|
+
import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
|
|
2
|
+
import { E as IconProps } from "../icons-CYXmvKlJ.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ChainOfThought.d.ts
|
|
6
|
-
interface ChainOfThoughtProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
6
|
+
interface ChainOfThoughtProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {}
|
|
9
7
|
/**
|
|
10
8
|
* A collapsible display of an AI's step-by-step reasoning trace. Compose
|
|
11
9
|
* ChainOfThoughtHeader with ChainOfThoughtContent, then nest
|
|
@@ -38,9 +36,7 @@ declare function ChainOfThought({
|
|
|
38
36
|
}: ChainOfThoughtProps & {
|
|
39
37
|
ref?: React.Ref<HTMLDivElement>;
|
|
40
38
|
}): React.JSX.Element;
|
|
41
|
-
interface ChainOfThoughtHeaderProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "
|
|
42
|
-
className?: string;
|
|
43
|
-
}
|
|
39
|
+
interface ChainOfThoughtHeaderProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> {}
|
|
44
40
|
/**
|
|
45
41
|
* Clickable header row that toggles the reasoning trace.
|
|
46
42
|
*/
|
|
@@ -52,9 +48,7 @@ declare function ChainOfThoughtHeader({
|
|
|
52
48
|
}: ChainOfThoughtHeaderProps & {
|
|
53
49
|
ref?: React.Ref<HTMLButtonElement>;
|
|
54
50
|
}): React.JSX.Element;
|
|
55
|
-
interface ChainOfThoughtContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "
|
|
56
|
-
className?: string;
|
|
57
|
-
}
|
|
51
|
+
interface ChainOfThoughtContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "unstyled"> {}
|
|
58
52
|
/**
|
|
59
53
|
* Collapsible panel containing step rows.
|
|
60
54
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
1
2
|
import { Collapsible } from "./Collapsible.js";
|
|
2
|
-
import {
|
|
3
|
-
import { B as SpinnerIcon, l as ChevronRightIcon, o as CheckIcon, p as DotIcon } from "../icons-CpfUer49.js";
|
|
3
|
+
import { G as SpinnerIcon, f as ChevronRightIcon, g as DotIcon, l as CheckIcon } from "../icons-CQJ-aMnI.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ChainOfThought.tsx
|
|
@@ -34,6 +34,7 @@ function ChainOfThought({ className, ref, ...props }) {
|
|
|
34
34
|
ref,
|
|
35
35
|
className: cx("chain-of-thought", className),
|
|
36
36
|
...props,
|
|
37
|
+
"data-recipe": "disclosure-stack",
|
|
37
38
|
unstyled: true
|
|
38
39
|
});
|
|
39
40
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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 } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { u as ModelSelectorLogo } from "../ModelSelector-
|
|
4
|
+
import { u as ModelSelectorLogo } from "../ModelSelector-Cqw_qrUG.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ChatGptSignInScreen.tsx
|
|
@@ -16,9 +16,6 @@ function ChatGptSignInScreen({ busy = false, error = false, label = "Sign in wit
|
|
|
16
16
|
onPointerLeave?.(event);
|
|
17
17
|
delete event.currentTarget.dataset.pointerActive;
|
|
18
18
|
};
|
|
19
|
-
const handleButtonPointerMove = (event) => {
|
|
20
|
-
setPointerPosition(event.currentTarget, event, "chatgpt-sign-in-button");
|
|
21
|
-
};
|
|
22
19
|
return /* @__PURE__ */ jsx("main", {
|
|
23
20
|
ref,
|
|
24
21
|
className: cx("chatgpt-sign-in", className),
|
|
@@ -42,12 +39,12 @@ function ChatGptSignInScreen({ busy = false, error = false, label = "Sign in wit
|
|
|
42
39
|
type: "button",
|
|
43
40
|
variant: "normal",
|
|
44
41
|
color: error ? "destructive" : "primary",
|
|
45
|
-
size: "
|
|
42
|
+
size: "sm",
|
|
46
43
|
className: "chatgpt-sign-in__button",
|
|
47
44
|
"data-busy": busy ? "true" : void 0,
|
|
48
45
|
disabled: busy,
|
|
49
46
|
onClick: onSignIn,
|
|
50
|
-
onPointerMove:
|
|
47
|
+
onPointerMove: handleSignInButtonPointerMove,
|
|
51
48
|
children: [/* @__PURE__ */ jsx("span", {
|
|
52
49
|
className: "chatgpt-sign-in__button-icon",
|
|
53
50
|
children: busy ? /* @__PURE__ */ jsx(SpinnerIcon, { size: 16 }) : /* @__PURE__ */ jsx(ModelSelectorLogo, {
|
|
@@ -62,6 +59,9 @@ function ChatGptSignInScreen({ busy = false, error = false, label = "Sign in wit
|
|
|
62
59
|
})
|
|
63
60
|
});
|
|
64
61
|
}
|
|
62
|
+
function handleSignInButtonPointerMove(event) {
|
|
63
|
+
setPointerPosition(event.currentTarget, event, "chatgpt-sign-in-button");
|
|
64
|
+
}
|
|
65
65
|
function setPointerPosition(element, event, name) {
|
|
66
66
|
const rect = element.getBoundingClientRect();
|
|
67
67
|
if (rect.width === 0 || rect.height === 0) return;
|
|
@@ -5,10 +5,7 @@ import { Checkbox as Checkbox$1, CheckboxRootProps } from "@base-ui/react/checkb
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Checkbox component.
|
|
7
7
|
*/
|
|
8
|
-
interface CheckboxProps extends
|
|
9
|
-
/** Additional CSS class names */
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
8
|
+
interface CheckboxProps extends CheckboxRootProps {}
|
|
12
9
|
/**
|
|
13
10
|
* An accessible checkbox component with custom styling.
|
|
14
11
|
*
|
|
@@ -33,6 +30,7 @@ declare function CheckboxRoot({
|
|
|
33
30
|
}): React.JSX.Element;
|
|
34
31
|
declare function CheckboxIndicator({
|
|
35
32
|
children,
|
|
33
|
+
className,
|
|
36
34
|
...props
|
|
37
35
|
}: Checkbox$1.Indicator.Props): React.JSX.Element;
|
|
38
36
|
declare const Checkbox: {
|