@mcp-b/react-components 0.17.0 → 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-CRuMi1Pb.d.ts → AgentChat-ClxViuUM.d.ts} +1 -20
- package/dist/{Button-FX_hpqxm.d.ts → Button-DLGzHsjc.d.ts} +13 -7
- package/dist/{CodeBlock-Co1noLbC.js → CodeBlock-Bfp5PAg3.js} +9 -6
- package/dist/{CodeBlock-Dnpr88ZQ.d.ts → CodeBlock-gV4kZeCI.d.ts} +2 -9
- package/dist/{FileTree-B7bBsUyU.js → FileTree-3zYtrddG.js} +42 -16
- package/dist/{Message-C4eYRogZ.js → Message-BXtmfc9Q.js} +13 -20
- package/dist/{ModelSelector-BNrZlY_Y.js → ModelSelector-Cqw_qrUG.js} +15 -22
- package/dist/{PromptInput-OLfXPuHM.d.ts → PromptInput-Bdh9pqlo.d.ts} +4 -6
- package/dist/{Select-CwSqP07Y.d.ts → Select-B_13gg_J.d.ts} +2 -2
- package/dist/{Tabs-9zddXDQo.d.ts → Tabs-ColWK-XA.d.ts} +10 -2
- package/dist/{ThinkChat-DInElus-.js → ThinkChat-15EhfvYJ.js} +84 -61
- package/dist/{ThinkChatActivity-BgesTfZ4.d.ts → ThinkChatActivity-Bzot45kX.d.ts} +4 -7
- package/dist/{ThinkChatActivitySummary-BPmu9a-c.d.ts → ThinkChatActivitySummary-D1xOrNrq.d.ts} +1 -1
- package/dist/{Toggle-DaXpe1Lc.d.ts → Toggle-JKZ43D5S.d.ts} +1 -1
- package/dist/{ToggleGroup-yseEWkOC.d.ts → ToggleGroup-DNd6cDJZ.d.ts} +2 -2
- package/dist/Workspace-Jez8ffUj.d.ts +274 -0
- package/dist/{WorkspaceExplorer-sZewzT2O.d.ts → WorkspaceExplorer-B9dQWNVK.d.ts} +2 -2
- package/dist/{WorkspaceFile-C8UzuSH4.d.ts → WorkspaceFile-CzyHnESE.d.ts} +1 -1
- package/dist/{WorkspaceFileView-DNdGAEiX.js → WorkspaceFileView-C68Ub8S8.js} +120 -127
- package/dist/{WorkspaceLink-B1ykV1dS.js → WorkspaceLink-BYYeTQLf.js} +6 -27
- package/dist/{WorkspaceLink-DK1DWMHe.d.ts → WorkspaceLink-O-EBKUJ8.d.ts} +6 -9
- package/dist/{class-names-Bk-QLWWI.js → class-names-BiMDVpUo.js} +4 -1
- package/dist/components/Accordion.js +7 -2
- 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 +1 -1
- package/dist/components/AgentAttention.js +1 -1
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +94 -62
- package/dist/components/AgentChatMessageEditor.js +2 -2
- package/dist/components/AgentChatTurnError.js +2 -2
- package/dist/components/AgentConnection.js +3 -3
- package/dist/components/AgentMessageParts.js +1 -1
- package/dist/components/AgentToolDetail.d.ts +6 -4
- package/dist/components/AgentToolDetail.js +12 -10
- package/dist/components/AlertDialog.js +1 -1
- package/dist/components/AppTopBar.d.ts +24 -7
- package/dist/components/AppTopBar.js +32 -8
- package/dist/components/Approval.js +4 -4
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +6 -4
- package/dist/components/Autocomplete.js +1 -1
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Avatar.js +2 -2
- 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 +5 -5
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +14 -11
- package/dist/components/Card.d.ts +7 -8
- package/dist/components/Card.js +19 -10
- package/dist/components/ChainOfThought.d.ts +1 -1
- package/dist/components/ChainOfThought.js +2 -2
- package/dist/components/ChatGptSignInScreen.js +8 -8
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/CheckboxGroup.js +1 -1
- package/dist/components/Checkpoint.js +2 -2
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.js +2 -2
- package/dist/components/Collapsible.js +2 -2
- package/dist/components/Combobox.js +1 -1
- package/dist/components/Commit.d.ts +1 -1
- package/dist/components/Commit.js +3 -3
- package/dist/components/Context.js +1 -1
- package/dist/components/ContextMenu.js +2 -2
- package/dist/components/Conversation.d.ts +1 -1
- package/dist/components/Conversation.js +5 -4
- package/dist/components/DescriptionListParts.js +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +3 -3
- package/dist/components/Field.js +5 -2
- package/dist/components/Fieldset.js +1 -1
- package/dist/components/FileTree.d.ts +6 -0
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Form.js +1 -1
- 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.js +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Marker.js +1 -1
- package/dist/components/McpConnectionRequest.js +2 -2
- package/dist/components/McpServerPicker.js +2 -2
- package/dist/components/MediaPreviewCard.d.ts +103 -0
- package/dist/components/MediaPreviewCard.js +193 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/Menubar.js +2 -2
- package/dist/components/Message.d.ts +4 -1
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +5 -4
- package/dist/components/Meter.js +1 -1
- package/dist/components/ModelSelector.d.ts +4 -3
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.js +1 -1
- package/dist/components/NumberField.js +1 -1
- package/dist/components/Plan.js +2 -2
- package/dist/components/Popover.js +1 -1
- package/dist/components/PreviewCard.js +1 -1
- 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 +4 -3
- package/dist/components/PricingUsageCalculator.js +2 -2
- package/dist/components/Progress.js +1 -1
- package/dist/components/PromptInput.d.ts +1 -1
- package/dist/components/PromptInput.js +33 -20
- package/dist/components/Queue.d.ts +1 -1
- package/dist/components/Queue.js +2 -3
- package/dist/components/RadioGroup.js +1 -1
- package/dist/components/Reasoning.js +3 -6
- package/dist/components/ResizableSidePanel.js +1 -1
- package/dist/components/ResponsiveSidebarShell.js +16 -10
- package/dist/components/ScrollArea.js +2 -1
- 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 +5 -6
- package/dist/components/Separator.js +1 -1
- package/dist/components/Slider.js +1 -1
- package/dist/components/Sources.js +2 -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 -4
- package/dist/components/SubagentRunSelector.d.ts +8 -12
- package/dist/components/SubagentRunSelector.js +17 -20
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.js +4 -5
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +12 -3
- package/dist/components/Task.js +2 -2
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +5 -4
- package/dist/components/TestResults.js +10 -6
- package/dist/components/Textarea.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +33 -20
- package/dist/components/ThinkChat.js +4 -4
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +8 -10
- package/dist/components/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/ThinkChatActivitySummary.js +7 -3
- package/dist/components/ThinkChatToolPanels.js +26 -16
- 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 +36 -35
- package/dist/components/ThinkFullApp.js +156 -109
- package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/ThinkFullAppViewSwitch.js +1 -1
- package/dist/components/ThinkRecoveryNotice.js +18 -12
- package/dist/components/ThinkRoutineBrowser.d.ts +17 -9
- package/dist/components/ThinkRoutineBrowser.js +33 -40
- 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 +24 -31
- package/dist/components/ThinkRoutineLibrary.js +57 -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/Toast.js +1 -1
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +9 -7
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +15 -13
- package/dist/components/ToolInvocation.js +1 -1
- package/dist/components/Toolbar.js +1 -1
- package/dist/components/Tooltip.d.ts +8 -1
- package/dist/components/Tooltip.js +11 -2
- package/dist/components/TransitionSurface.d.ts +27 -0
- package/dist/components/TransitionSurface.js +20 -0
- package/dist/components/WebPreview.d.ts +5 -5
- package/dist/components/WebPreview.js +68 -54
- package/dist/components/Workspace.d.ts +2 -2
- package/dist/components/Workspace.js +358 -328
- package/dist/components/WorkspaceBrowser.d.ts +4 -7
- package/dist/components/WorkspaceBrowser.js +15 -25
- package/dist/components/WorkspaceExplorer.d.ts +5 -5
- 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-CQx3LQAC.d.ts → copy-button-D7aAYA-2.d.ts} +1 -1
- package/dist/{copy-button-cYsJBauI.js → copy-button-DeK6KXEV.js} +3 -2
- package/dist/{icons--FqCZEc3.js → icons-CQJ-aMnI.js} +6 -3
- package/dist/{icons-DpUqY8Mp.d.ts → icons-CYXmvKlJ.d.ts} +17 -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 +2 -0
- package/dist/styles/agent-chat.css +14 -22
- package/dist/styles/alert-dialog.css +16 -18
- package/dist/styles/app-top-bar.css +17 -9
- package/dist/styles/approval.css +11 -6
- package/dist/styles/artifact.css +6 -6
- 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 +8 -4
- package/dist/styles/button.css +36 -33
- package/dist/styles/card.css +5 -6
- package/dist/styles/chain-of-thought.css +22 -16
- package/dist/styles/checkbox.css +18 -5
- package/dist/styles/codex-model-selector.css +3 -7
- package/dist/styles/collapsible.css +10 -10
- package/dist/styles/combobox.css +3 -2
- package/dist/styles/commit.css +19 -18
- package/dist/styles/composition-motion.css +83 -0
- package/dist/styles/context-menu.css +3 -3
- package/dist/styles/context.css +11 -10
- package/dist/styles/conversation.css +18 -23
- package/dist/styles/dialog.css +15 -15
- package/dist/styles/field.css +32 -12
- package/dist/styles/file-tree.css +69 -9
- package/dist/styles/form.css +1 -1
- package/dist/styles/index.css +5 -0
- package/dist/styles/input.css +2 -2
- package/dist/styles/marker.css +14 -13
- package/dist/styles/mcp-server-picker.css +20 -17
- package/dist/styles/media-preview-card.css +160 -0
- package/dist/styles/menu.css +11 -11
- package/dist/styles/menubar.css +12 -11
- package/dist/styles/message.css +27 -21
- package/dist/styles/meter.css +2 -2
- package/dist/styles/model-selector.css +16 -14
- 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 +5 -0
- package/dist/styles/popover.css +15 -16
- package/dist/styles/preview-card.css +2 -32
- package/dist/styles/progress.css +8 -3
- package/dist/styles/prompt-input.css +75 -75
- 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 +109 -37
- package/dist/styles/resizable-side-panel.css +4 -10
- package/dist/styles/responsive-sidebar-shell.css +16 -15
- 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 -3
- package/dist/styles/stepper.css +36 -26
- package/dist/styles/subagent-run.css +1 -1
- package/dist/styles/switch.css +32 -29
- package/dist/styles/tabs.css +79 -23
- package/dist/styles/task.css +13 -9
- package/dist/styles/test-results.css +29 -23
- 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 +45 -68
- package/dist/styles/think-routine-library.css +43 -24
- package/dist/styles/think-thread-picker.css +193 -51
- package/dist/styles/toast.css +48 -27
- 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/workspace-explorer.css +99 -44
- package/dist/summarize-tool-input-CqTcGRYy.js +15 -0
- 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/package.json +13 -7
- package/dist/Workspace-C9RFoxcu.d.ts +0 -62
- package/dist/summarize-tool-input-BUJsENSn.js +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "../Button-
|
|
1
|
+
import { r as ButtonProps } from "../Button-DLGzHsjc.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
4
4
|
|
|
@@ -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 { n as ArrowDownIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -41,7 +41,7 @@ function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
|
|
|
41
41
|
...props
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
function MessageScrollerButton({ className, children, color = "neutral", direction = "end", render, size = "
|
|
44
|
+
function MessageScrollerButton({ className, children, color = "neutral", direction = "end", render, size = "sm", variant = "normal", ...props }) {
|
|
45
45
|
return /* @__PURE__ */ jsx(MessageScroller$1.Button, {
|
|
46
46
|
"data-slot": "message-scroller-button",
|
|
47
47
|
direction,
|
|
@@ -49,7 +49,8 @@ function MessageScrollerButton({ className, children, color = "neutral", directi
|
|
|
49
49
|
render: render ?? /* @__PURE__ */ jsx(Button, {
|
|
50
50
|
color,
|
|
51
51
|
size,
|
|
52
|
-
variant
|
|
52
|
+
variant,
|
|
53
|
+
iconOnly: true
|
|
53
54
|
}),
|
|
54
55
|
...props,
|
|
55
56
|
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ArrowDownIcon, {}), /* @__PURE__ */ jsx("span", {
|
package/dist/components/Meter.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { r as ButtonProps } from "../Button-
|
|
1
|
+
import { r as ButtonProps } from "../Button-DLGzHsjc.js";
|
|
2
|
+
import { DialogProps } from "./Dialog.js";
|
|
2
3
|
import { SeparatorProps } from "./Separator.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import Cloudflare from "cloudflare";
|
|
@@ -54,8 +55,8 @@ interface ModelSelectorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
54
55
|
open?: boolean;
|
|
55
56
|
/** Initial dialog open state for uncontrolled usage. */
|
|
56
57
|
defaultOpen?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
onOpenChange?:
|
|
58
|
+
/** Receives Base UI's full open-change event details. */
|
|
59
|
+
onOpenChange?: DialogProps["onOpenChange"];
|
|
59
60
|
/** Additional class names for layout only; do not restyle dialog internals from apps. */
|
|
60
61
|
className?: string;
|
|
61
62
|
/** Trigger, content, search input, grouped list, and items. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as getCloudflareModelProvider, a as ModelSelectorEmpty, b as normalizeCloudflareModelSelectorModels, c as ModelSelectorItem, d as ModelSelectorLogoGroup, f as ModelSelectorName, g as formatCloudflareModelProvider, h as ModelSelectorTrigger, i as ModelSelectorDialog, l as ModelSelectorList, m as ModelSelectorShortcut, n as ModelSelector, o as ModelSelectorGroup, p as ModelSelectorSeparator, r as ModelSelectorContent, s as ModelSelectorInput, t as CloudflareModelSelector, u as ModelSelectorLogo, v as isCloudflareRunnableModelId, x as readCloudflareModelId, y as listCloudflareModelSelectorOptions } from "../ModelSelector-
|
|
1
|
+
import { _ as getCloudflareModelProvider, a as ModelSelectorEmpty, b as normalizeCloudflareModelSelectorModels, c as ModelSelectorItem, d as ModelSelectorLogoGroup, f as ModelSelectorName, g as formatCloudflareModelProvider, h as ModelSelectorTrigger, i as ModelSelectorDialog, l as ModelSelectorList, m as ModelSelectorShortcut, n as ModelSelector, o as ModelSelectorGroup, p as ModelSelectorSeparator, r as ModelSelectorContent, s as ModelSelectorInput, t as CloudflareModelSelector, u as ModelSelectorLogo, v as isCloudflareRunnableModelId, x as readCloudflareModelId, y as listCloudflareModelSelectorOptions } from "../ModelSelector-Cqw_qrUG.js";
|
|
2
2
|
export { CloudflareModelSelector, ModelSelector, ModelSelectorContent, ModelSelectorDialog, ModelSelectorEmpty, ModelSelectorGroup, ModelSelectorInput, ModelSelectorItem, ModelSelectorList, ModelSelectorLogo, ModelSelectorLogoGroup, ModelSelectorName, ModelSelectorSeparator, ModelSelectorShortcut, ModelSelectorTrigger, formatCloudflareModelProvider, getCloudflareModelProvider, isCloudflareRunnableModelId, listCloudflareModelSelectorOptions, normalizeCloudflareModelSelectorModels, readCloudflareModelId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { NumberField as NumberField$1 } from "@base-ui/react/number-field";
|
package/dist/components/Plan.js
CHANGED
|
@@ -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 DotIcon, i as ArrowRightIcon, l as CheckIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Plan.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { PreviewCard as PreviewCard$1 } from "@base-ui/react/preview-card";
|
|
@@ -7,6 +7,7 @@ import { PricingUsageCalculator } from "./PricingUsageCalculator.js";
|
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/PricingPage.tsx
|
|
10
|
+
const EMPTY_USAGE_TIERS = [];
|
|
10
11
|
/**
|
|
11
12
|
* A comprehensive pricing page component that demonstrates all pricing-related
|
|
12
13
|
* components working together.
|
|
@@ -28,7 +29,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
28
29
|
* />
|
|
29
30
|
* ```
|
|
30
31
|
*/
|
|
31
|
-
function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, faq, showUsageCalculator = false, usageTiers =
|
|
32
|
+
function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, faq, showUsageCalculator = false, usageTiers = EMPTY_USAGE_TIERS, maxUsage = 1e5, usageUnit = "API calls", onSelectPlan, onConfirmUpgrade, className = "", billingToggleVariant, productIds, currentProductId, isSubscribed = false, checkoutUrl = "/api/checkout", switchPlanUrl = "/api/switch-plan", portalUrl = "/api/portal", isLoggedIn = false, loginUrl = "/auth/login", hasPolarAccount = false, onCheckout, onSwitchPlan, onPortalRedirect }) {
|
|
32
33
|
const [billingPeriod, setBillingPeriod] = React.useState("monthly");
|
|
33
34
|
const [selectedPlan, setSelectedPlan] = React.useState(null);
|
|
34
35
|
const [confirmDialogOpen, setConfirmDialogOpen] = React.useState(false);
|
|
@@ -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 { E as InfoIcon, M as MinusIcon, l as CheckIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { Separator } from "./Separator.js";
|
|
@@ -94,7 +94,8 @@ function PricingPlanCard({ plan, billingPeriod, action = "select", onSelect, cla
|
|
|
94
94
|
render: /* @__PURE__ */ jsx(Button, {
|
|
95
95
|
variant: "ghost",
|
|
96
96
|
color: "neutral",
|
|
97
|
-
size: "
|
|
97
|
+
size: "sm",
|
|
98
|
+
iconOnly: true,
|
|
98
99
|
"aria-label": `More information about ${feature.name}`
|
|
99
100
|
}),
|
|
100
101
|
children: /* @__PURE__ */ jsx(InfoIcon, { size: 14 })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Separator } from "./Separator.js";
|
|
3
3
|
import { Progress } from "./Progress.js";
|
|
4
4
|
import { Slider } from "./Slider.js";
|
|
@@ -9,7 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
//#region src/components/PricingUsageCalculator.tsx
|
|
10
10
|
/** Self-contained usage estimator composed from Card, Slider, Progress, and Separator. */
|
|
11
11
|
function PricingUsageCalculator({ usageTiers, maxUsage = 1e5, usageUnit = "API calls", defaultUsage = 5e4, className }) {
|
|
12
|
-
const [usage, setUsage] = React.useState(Math.min(defaultUsage, maxUsage));
|
|
12
|
+
const [usage, setUsage] = React.useState(() => Math.min(defaultUsage, maxUsage));
|
|
13
13
|
return /* @__PURE__ */ jsxs(Card, {
|
|
14
14
|
className: cx("pricing-page__calculator", className),
|
|
15
15
|
children: [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, At as PromptInputTabProps, B as PromptInputCommandItemProps, Bt as getApprovalRequestId, C as PromptInputBodyProps, Ct as PromptInputTab, D as PromptInputCommand, Dt as PromptInputTabItemProps, E as PromptInputButtonTooltip, Et as PromptInputTabItem, F as PromptInputCommandGroupLabelProps, Ft as PromptInputTools, G as PromptInputCommandSeparatorProps, Gt as useProviderAttachments, H as PromptInputCommandListProps, Ht as getPendingToolApprovals, I as PromptInputCommandGroupProps, It as PromptInputToolsProps, J as PromptInputContextItem, K as PromptInputCommandTrigger, L as PromptInputCommandInput, Lt as PromptInputTooltipConfig, M as PromptInputCommandEmptyProps, Mt as PromptInputTabsListProps, N as PromptInputCommandGroup, Nt as PromptInputTextarea, O as PromptInputCommandComposer, Ot as PromptInputTabLabel, P as PromptInputCommandGroupLabel, Pt as PromptInputTextareaProps, Q as PromptInputDictation, R as PromptInputCommandInputProps, Rt as TextInputContext, S as PromptInputBody, St as PromptInputSubmitProps, T as PromptInputButtonProps, Tt as PromptInputTabBodyProps, U as PromptInputCommandProps, Ut as usePromptInputAttachments, V as PromptInputCommandList, Vt as getApprovalStateKey, W as PromptInputCommandSeparator, Wt as usePromptInputController, X as PromptInputContextSelectorProps, Y as PromptInputContextSelector, Z as PromptInputControllerProps, _ as PromptInputApprovalProps, _t as PromptInputReferences, a as PromptInputActionAddAttachmentsProps, at as PromptInputHoverCardContent, b as PromptInputAttachments, bt as PromptInputSelectProps, c as PromptInputActionMenu, ct as PromptInputHoverCardTrigger, d as PromptInputActionMenuItem, dt as PromptInputPermissionSelector, et as PromptInputFooter, f as PromptInputActionMenuItemProps, ft as PromptInputPermissionSelectorProps, g as PromptInputApproval, gt as PromptInputReference, h as PromptInputActionMenuTriggerProps, ht as PromptInputProviderProps, i as PromptInputActionAddAttachments, it as PromptInputHoverCard, j as PromptInputCommandEmpty, jt as PromptInputTabsList, k as PromptInputCommandComposerProps, kt as PromptInputTabLabelProps, l as PromptInputActionMenuContent, lt as PromptInputHoverCardTriggerProps, m as PromptInputActionMenuTrigger, mt as PromptInputProvider, n as PermissionMode, nt as PromptInputHeader, o as PromptInputActionAddScreenshot, ot as PromptInputHoverCardContentProps, p as PromptInputActionMenuProps, pt as PromptInputProps, q as PromptInputContextAction, r as PromptInput, rt as PromptInputHeaderProps, s as PromptInputActionAddScreenshotProps, st as PromptInputHoverCardProps, t as AttachmentsContext, tt as PromptInputFooterProps, u as PromptInputActionMenuContentProps, ut as PromptInputMessage, v as PromptInputAttachment, vt as PromptInputReferencesProps, w as PromptInputButton, wt as PromptInputTabBody, x as PromptInputAttachmentsProps, xt as PromptInputSubmit, y as PromptInputAttachmentProps, yt as PromptInputSelect, z as PromptInputCommandItem, zt as TooltipSide } from "../PromptInput-
|
|
1
|
+
import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, At as PromptInputTabProps, B as PromptInputCommandItemProps, Bt as getApprovalRequestId, C as PromptInputBodyProps, Ct as PromptInputTab, D as PromptInputCommand, Dt as PromptInputTabItemProps, E as PromptInputButtonTooltip, Et as PromptInputTabItem, F as PromptInputCommandGroupLabelProps, Ft as PromptInputTools, G as PromptInputCommandSeparatorProps, Gt as useProviderAttachments, H as PromptInputCommandListProps, Ht as getPendingToolApprovals, I as PromptInputCommandGroupProps, It as PromptInputToolsProps, J as PromptInputContextItem, K as PromptInputCommandTrigger, L as PromptInputCommandInput, Lt as PromptInputTooltipConfig, M as PromptInputCommandEmptyProps, Mt as PromptInputTabsListProps, N as PromptInputCommandGroup, Nt as PromptInputTextarea, O as PromptInputCommandComposer, Ot as PromptInputTabLabel, P as PromptInputCommandGroupLabel, Pt as PromptInputTextareaProps, Q as PromptInputDictation, R as PromptInputCommandInputProps, Rt as TextInputContext, S as PromptInputBody, St as PromptInputSubmitProps, T as PromptInputButtonProps, Tt as PromptInputTabBodyProps, U as PromptInputCommandProps, Ut as usePromptInputAttachments, V as PromptInputCommandList, Vt as getApprovalStateKey, W as PromptInputCommandSeparator, Wt as usePromptInputController, X as PromptInputContextSelectorProps, Y as PromptInputContextSelector, Z as PromptInputControllerProps, _ as PromptInputApprovalProps, _t as PromptInputReferences, a as PromptInputActionAddAttachmentsProps, at as PromptInputHoverCardContent, b as PromptInputAttachments, bt as PromptInputSelectProps, c as PromptInputActionMenu, ct as PromptInputHoverCardTrigger, d as PromptInputActionMenuItem, dt as PromptInputPermissionSelector, et as PromptInputFooter, f as PromptInputActionMenuItemProps, ft as PromptInputPermissionSelectorProps, g as PromptInputApproval, gt as PromptInputReference, h as PromptInputActionMenuTriggerProps, ht as PromptInputProviderProps, i as PromptInputActionAddAttachments, it as PromptInputHoverCard, j as PromptInputCommandEmpty, jt as PromptInputTabsList, k as PromptInputCommandComposerProps, kt as PromptInputTabLabelProps, l as PromptInputActionMenuContent, lt as PromptInputHoverCardTriggerProps, m as PromptInputActionMenuTrigger, mt as PromptInputProvider, n as PermissionMode, nt as PromptInputHeader, o as PromptInputActionAddScreenshot, ot as PromptInputHoverCardContentProps, p as PromptInputActionMenuProps, pt as PromptInputProps, q as PromptInputContextAction, r as PromptInput, rt as PromptInputHeaderProps, s as PromptInputActionAddScreenshotProps, st as PromptInputHoverCardProps, t as AttachmentsContext, tt as PromptInputFooterProps, u as PromptInputActionMenuContentProps, ut as PromptInputMessage, v as PromptInputAttachment, vt as PromptInputReferencesProps, w as PromptInputButton, wt as PromptInputTabBody, x as PromptInputAttachmentsProps, xt as PromptInputSubmit, y as PromptInputAttachmentProps, yt as PromptInputSelect, z as PromptInputCommandItem, zt as TooltipSide } from "../PromptInput-Bdh9pqlo.js";
|
|
2
2
|
export { AttachmentsContext, PermissionMode, PromptInput, PromptInputActionAddAttachments, PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuContentProps, PromptInputActionMenuItem, PromptInputActionMenuItemProps, PromptInputActionMenuProps, PromptInputActionMenuTrigger, PromptInputActionMenuTriggerProps, PromptInputApproval, PromptInputApprovalProps, PromptInputAttachment, PromptInputAttachmentProps, PromptInputAttachments, PromptInputAttachmentsProps, PromptInputBody, PromptInputBodyProps, PromptInputButton, PromptInputButtonProps, PromptInputButtonTooltip, PromptInputCommand, PromptInputCommandComposer, PromptInputCommandComposerProps, PromptInputCommandDefinition, PromptInputCommandEmpty, PromptInputCommandEmptyProps, PromptInputCommandGroup, PromptInputCommandGroupLabel, PromptInputCommandGroupLabelProps, PromptInputCommandGroupProps, PromptInputCommandInput, PromptInputCommandInputProps, PromptInputCommandItem, PromptInputCommandItemProps, PromptInputCommandList, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparator, PromptInputCommandSeparatorProps, PromptInputCommandTrigger, PromptInputContextAction, PromptInputContextItem, PromptInputContextSelector, PromptInputContextSelectorProps, PromptInputControllerProps, PromptInputDictation, PromptInputDictationProps, PromptInputFooter, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, PromptInputReference, PromptInputReferences, PromptInputReferencesProps, PromptInputSelect, PromptInputSelectProps, PromptInputSubmit, PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, PromptInputTabBodyProps, PromptInputTabItem, PromptInputTabItemProps, PromptInputTabLabel, PromptInputTabLabelProps, PromptInputTabProps, PromptInputTabsList, PromptInputTabsListProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, PromptInputTooltipConfig, TextInputContext, TooltipSide, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as mergeBaseClassName, t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { $ as XIcon, B as PlusIcon, G as SpinnerIcon, I as PaperclipIcon, K as SquareIcon, N as MonitorIcon, Q as WrenchIcon, S as FolderIcon, Z as WarningIcon, a as ArrowUpIcon, j as MicrophoneIcon, l as CheckIcon, q as StopIcon, u as ChevronDownIcon, x as FileIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { t as AttachmentPreview } from "../attachment-preview-DIs50Q0h.js";
|
|
@@ -41,7 +41,9 @@ function PromptInputProvider({ initialInput = "", children }) {
|
|
|
41
41
|
const fileInputRef = React.useRef(null);
|
|
42
42
|
const openRef = React.useRef(() => {});
|
|
43
43
|
const attachmentsRef = React.useRef(attachmentFiles);
|
|
44
|
-
|
|
44
|
+
React.useEffect(() => {
|
|
45
|
+
attachmentsRef.current = attachmentFiles;
|
|
46
|
+
}, [attachmentFiles]);
|
|
45
47
|
React.useEffect(() => () => {
|
|
46
48
|
revokeFileUrls(attachmentsRef.current);
|
|
47
49
|
}, []);
|
|
@@ -131,7 +133,9 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
|
|
|
131
133
|
const [localFiles, setLocalFiles] = React.useState([]);
|
|
132
134
|
const files = controller?.attachments.files ?? localFiles;
|
|
133
135
|
const filesRef = React.useRef(files);
|
|
134
|
-
|
|
136
|
+
React.useEffect(() => {
|
|
137
|
+
filesRef.current = files;
|
|
138
|
+
}, [files]);
|
|
135
139
|
React.useImperativeHandle(ref, () => formRef.current, []);
|
|
136
140
|
React.useEffect(() => () => {
|
|
137
141
|
if (!usingProvider) revokeFileUrls(filesRef.current);
|
|
@@ -174,6 +178,7 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
|
|
|
174
178
|
maxFiles,
|
|
175
179
|
onError
|
|
176
180
|
]);
|
|
181
|
+
const addDroppedFiles = React.useEffectEvent(add);
|
|
177
182
|
const remove = React.useCallback((attachmentId) => {
|
|
178
183
|
if (controller) {
|
|
179
184
|
controller.attachments.remove(attachmentId);
|
|
@@ -213,7 +218,7 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
|
|
|
213
218
|
const onDrop = (event) => {
|
|
214
219
|
const dragEvent = event;
|
|
215
220
|
if (dragEvent.dataTransfer?.types.includes("Files")) dragEvent.preventDefault();
|
|
216
|
-
if (dragEvent.dataTransfer?.files?.length)
|
|
221
|
+
if (dragEvent.dataTransfer?.files?.length) addDroppedFiles(dragEvent.dataTransfer.files);
|
|
217
222
|
};
|
|
218
223
|
target.addEventListener("dragover", onDragOver);
|
|
219
224
|
target.addEventListener("drop", onDrop);
|
|
@@ -221,7 +226,7 @@ function PromptInput({ className, accept, multiple, globalDrop, syncHiddenInput,
|
|
|
221
226
|
target.removeEventListener("dragover", onDragOver);
|
|
222
227
|
target.removeEventListener("drop", onDrop);
|
|
223
228
|
};
|
|
224
|
-
}, [
|
|
229
|
+
}, [globalDrop]);
|
|
225
230
|
const attachmentsCtx = React.useMemo(() => ({
|
|
226
231
|
add,
|
|
227
232
|
clear: clearAttachments,
|
|
@@ -373,7 +378,7 @@ function PromptInputTextarea({ className, placeholder = "How can I help?", rows
|
|
|
373
378
|
const controller = useOptionalPromptInputController();
|
|
374
379
|
const attachments = usePromptInputAttachments();
|
|
375
380
|
const innerRef = React.useRef(null);
|
|
376
|
-
const
|
|
381
|
+
const isComposingRef = React.useRef(false);
|
|
377
382
|
React.useImperativeHandle(ref, () => innerRef.current, []);
|
|
378
383
|
const resize = React.useCallback(() => {
|
|
379
384
|
const el = innerRef.current;
|
|
@@ -406,17 +411,17 @@ function PromptInputTextarea({ className, placeholder = "How can I help?", rows
|
|
|
406
411
|
placeholder,
|
|
407
412
|
rows,
|
|
408
413
|
onCompositionEnd: (event) => {
|
|
409
|
-
|
|
414
|
+
isComposingRef.current = false;
|
|
410
415
|
onCompositionEnd?.(event);
|
|
411
416
|
},
|
|
412
417
|
onCompositionStart: (event) => {
|
|
413
|
-
|
|
418
|
+
isComposingRef.current = true;
|
|
414
419
|
onCompositionStart?.(event);
|
|
415
420
|
},
|
|
416
421
|
onKeyDown: (event) => {
|
|
417
422
|
onKeyDown?.(event);
|
|
418
423
|
if (event.defaultPrevented) return;
|
|
419
|
-
if (event.key === "Enter" && !event.shiftKey && !
|
|
424
|
+
if (event.key === "Enter" && !event.shiftKey && !isComposingRef.current && !event.nativeEvent.isComposing) {
|
|
420
425
|
event.preventDefault();
|
|
421
426
|
event.currentTarget.form?.requestSubmit();
|
|
422
427
|
}
|
|
@@ -448,8 +453,10 @@ function PromptInputTextarea({ className, placeholder = "How can I help?", rows
|
|
|
448
453
|
...controlledProps
|
|
449
454
|
});
|
|
450
455
|
}
|
|
451
|
-
function PromptInputButton({ className, tooltip, variant = "ghost", color = "neutral", size, children, "aria-label": ariaLabel, ref, ...props }) {
|
|
452
|
-
const
|
|
456
|
+
function PromptInputButton({ className, tooltip, variant = "ghost", color = "neutral", size, iconOnly, children, "aria-label": ariaLabel, ref, ...props }) {
|
|
457
|
+
const childCount = React.Children.count(children);
|
|
458
|
+
const resolvedSize = size ?? "sm";
|
|
459
|
+
const resolvedIconOnly = iconOnly ?? childCount <= 1;
|
|
453
460
|
const tooltipConfig = typeof tooltip === "string" ? { content: tooltip } : tooltip;
|
|
454
461
|
const fallbackLabel = ariaLabel ?? (typeof tooltipConfig?.content === "string" ? tooltipConfig.content : void 0);
|
|
455
462
|
const hasResponsiveLabel = Boolean(tooltipConfig && React.Children.count(children) > 1);
|
|
@@ -459,6 +466,7 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
|
|
|
459
466
|
variant,
|
|
460
467
|
color,
|
|
461
468
|
size: resolvedSize,
|
|
469
|
+
iconOnly: resolvedIconOnly,
|
|
462
470
|
className: cx("prompt-input__button", className),
|
|
463
471
|
"aria-label": fallbackLabel,
|
|
464
472
|
"data-responsive-label": hasResponsiveLabel || void 0,
|
|
@@ -593,7 +601,8 @@ function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ..
|
|
|
593
601
|
type: "button",
|
|
594
602
|
variant: "normal",
|
|
595
603
|
color: "neutral",
|
|
596
|
-
size: "
|
|
604
|
+
size: "sm",
|
|
605
|
+
iconOnly: true,
|
|
597
606
|
"aria-label": "Stop dictation",
|
|
598
607
|
onClick: () => voice.stop(),
|
|
599
608
|
children: /* @__PURE__ */ jsx(SquareIcon, { size: 12 })
|
|
@@ -602,7 +611,8 @@ function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ..
|
|
|
602
611
|
className: "prompt-input__recording-button",
|
|
603
612
|
type: "button",
|
|
604
613
|
color: "primary",
|
|
605
|
-
size: "
|
|
614
|
+
size: "sm",
|
|
615
|
+
iconOnly: true,
|
|
606
616
|
"aria-label": "Stop dictation and send",
|
|
607
617
|
onClick: () => {
|
|
608
618
|
submitAfterStopRef.current = true;
|
|
@@ -631,7 +641,9 @@ function PromptInputRecordingWaveform({ active, level }) {
|
|
|
631
641
|
const containerRef = React.useRef(null);
|
|
632
642
|
const historyRef = React.useRef([]);
|
|
633
643
|
const levelRef = React.useRef(level);
|
|
634
|
-
|
|
644
|
+
React.useEffect(() => {
|
|
645
|
+
levelRef.current = level;
|
|
646
|
+
}, [level]);
|
|
635
647
|
React.useEffect(() => {
|
|
636
648
|
const canvas = canvasRef.current;
|
|
637
649
|
const container = containerRef.current;
|
|
@@ -792,7 +804,7 @@ function PromptInputPermissionSelector({ value, onValueChange, question = "How s
|
|
|
792
804
|
const trigger = /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
793
805
|
unstyled: true,
|
|
794
806
|
render: /* @__PURE__ */ jsxs(PromptInputButton, {
|
|
795
|
-
size: "
|
|
807
|
+
size: "sm",
|
|
796
808
|
className: "prompt-input__permissions-trigger",
|
|
797
809
|
"data-mode": value,
|
|
798
810
|
"aria-label": selected.label,
|
|
@@ -843,9 +855,9 @@ function PromptInputPermissionSelector({ value, onValueChange, question = "How s
|
|
|
843
855
|
})
|
|
844
856
|
}) }) })] });
|
|
845
857
|
}
|
|
846
|
-
function PromptInputSubmit({ className, status = "ready", onStop, variant = "normal", color = "primary", size = "
|
|
858
|
+
function PromptInputSubmit({ className, status = "ready", onStop, variant = "normal", color = "primary", size = "sm", onClick, children, label, hasContent = false, ref, ...props }) {
|
|
847
859
|
const isBusy = status === "submitted" || status === "streaming";
|
|
848
|
-
const isQueueing = isBusy &&
|
|
860
|
+
const isQueueing = isBusy && hasContent;
|
|
849
861
|
const isStopping = isBusy && !isQueueing;
|
|
850
862
|
const resolvedLabel = label ?? (isQueueing ? "Queue message" : defaultSubmitLabel(status));
|
|
851
863
|
return /* @__PURE__ */ jsx(Button, {
|
|
@@ -854,6 +866,7 @@ function PromptInputSubmit({ className, status = "ready", onStop, variant = "nor
|
|
|
854
866
|
variant,
|
|
855
867
|
color,
|
|
856
868
|
size,
|
|
869
|
+
iconOnly: true,
|
|
857
870
|
className: cx("prompt-input__submit", className),
|
|
858
871
|
"data-status": status,
|
|
859
872
|
"aria-label": resolvedLabel,
|
|
@@ -1140,7 +1153,7 @@ function PromptInputReferences({ references, onRemove, className, ref, ...props
|
|
|
1140
1153
|
type: "button",
|
|
1141
1154
|
variant: "ghost",
|
|
1142
1155
|
color: "primary",
|
|
1143
|
-
size: "
|
|
1156
|
+
size: "sm",
|
|
1144
1157
|
className: "prompt-input__reference",
|
|
1145
1158
|
"aria-label": `Remove ${reference.label}`,
|
|
1146
1159
|
onClick: () => onRemove(reference),
|
|
@@ -1169,7 +1182,7 @@ function PromptInputContextSelector({ items, value, onValueChange, categoryLabel
|
|
|
1169
1182
|
const trigger = /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
1170
1183
|
unstyled: true,
|
|
1171
1184
|
render: /* @__PURE__ */ jsxs(PromptInputButton, {
|
|
1172
|
-
size: "
|
|
1185
|
+
size: "sm",
|
|
1173
1186
|
className: "prompt-input__context-trigger",
|
|
1174
1187
|
"aria-label": `${categoryLabel}: ${fullLabel}`,
|
|
1175
1188
|
"data-unavailable": !selected || selected.unavailable || void 0,
|
package/dist/components/Queue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "./Collapsible.js";
|
|
3
|
-
import {
|
|
3
|
+
import { f as ChevronRightIcon, g as DotIcon, l as CheckIcon, x as FileIcon } from "../icons-CQJ-aMnI.js";
|
|
4
4
|
import { Button } from "./Button.js";
|
|
5
5
|
import { Badge } from "./Badge.js";
|
|
6
6
|
import { ScrollArea } from "./ScrollArea.js";
|
|
@@ -90,7 +90,6 @@ function QueueSectionLabel({ className, children, count, label, icon, ref, ...pr
|
|
|
90
90
|
children !== void 0 && count !== void 0 ? /* @__PURE__ */ jsx(Badge, {
|
|
91
91
|
color: "neutral",
|
|
92
92
|
size: "sm",
|
|
93
|
-
className: "queue__section-count",
|
|
94
93
|
children: count
|
|
95
94
|
}) : null
|
|
96
95
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Collapsible } from "./Collapsible.js";
|
|
3
|
-
import {
|
|
3
|
+
import { G as SpinnerIcon } from "../icons-CQJ-aMnI.js";
|
|
4
4
|
import { ActivityContent, ActivityText, ActivityTrigger } from "./Activity.js";
|
|
5
|
-
import { f as MessageResponse } from "../Message-
|
|
5
|
+
import { f as MessageResponse } from "../Message-BXtmfc9Q.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/Reasoning.tsx
|
|
@@ -50,9 +50,6 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
|
|
|
50
50
|
isControlled,
|
|
51
51
|
onOpenChange
|
|
52
52
|
]);
|
|
53
|
-
React.useEffect(() => {
|
|
54
|
-
if (duration !== void 0) setInternalDuration(duration);
|
|
55
|
-
}, [duration]);
|
|
56
53
|
React.useEffect(() => {
|
|
57
54
|
if (isStreaming) {
|
|
58
55
|
hasEverStreamedRef.current = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName, t as cx } from "../class-names-
|
|
1
|
+
import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Separator } from "./Separator.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -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 { W as SidebarIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
|
|
5
5
|
import { AppTopBar } from "./AppTopBar.js";
|
|
@@ -40,21 +40,27 @@ function ResponsiveSidebarShell({ sidebar, topBar, sidebarLabel, sidebarOpen, de
|
|
|
40
40
|
});
|
|
41
41
|
const toggleLabel = `${sidebarLabel.charAt(0).toUpperCase()}${sidebarLabel.slice(1)}`;
|
|
42
42
|
const toggleTooltip = `${isSidebarOpen ? "Hide" : "Show"} ${sidebarLabel}`;
|
|
43
|
+
const updateSidebar = React.useCallback((update, restoreFocus) => {
|
|
44
|
+
update();
|
|
45
|
+
if (restoreFocus) queueMicrotask(restoreFocus);
|
|
46
|
+
}, []);
|
|
43
47
|
const closeSidebar = React.useCallback(() => {
|
|
44
|
-
setSidebarOpen(false);
|
|
45
|
-
|
|
46
|
-
}, [setSidebarOpen]);
|
|
48
|
+
updateSidebar(() => setSidebarOpen(false), () => mainRef.current?.focus({ preventScroll: true }));
|
|
49
|
+
}, [setSidebarOpen, updateSidebar]);
|
|
47
50
|
const closeSidebarOnCompact = React.useCallback(() => {
|
|
48
51
|
if (rootRef.current && isCompactSidebar(rootRef.current)) closeSidebar();
|
|
49
52
|
}, [closeSidebar]);
|
|
50
53
|
const toggleSidebar = React.useCallback((trigger) => {
|
|
51
54
|
if (trigger) openerRef.current = trigger;
|
|
52
|
-
setSidebarOpen(!isSidebarOpen);
|
|
53
|
-
}, [
|
|
55
|
+
updateSidebar(() => setSidebarOpen(!isSidebarOpen));
|
|
56
|
+
}, [
|
|
57
|
+
isSidebarOpen,
|
|
58
|
+
setSidebarOpen,
|
|
59
|
+
updateSidebar
|
|
60
|
+
]);
|
|
54
61
|
const dismissSidebar = React.useCallback(() => {
|
|
55
|
-
setSidebarOpen(false);
|
|
56
|
-
|
|
57
|
-
}, [setSidebarOpen]);
|
|
62
|
+
updateSidebar(() => setSidebarOpen(false), () => openerRef.current?.focus({ preventScroll: true }));
|
|
63
|
+
}, [setSidebarOpen, updateSidebar]);
|
|
58
64
|
const sidebarContent = typeof sidebar === "function" ? sidebar({
|
|
59
65
|
closeSidebar,
|
|
60
66
|
closeSidebarOnCompact
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as mergeBaseClassName } from "../class-names-
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
|
|
@@ -77,6 +77,7 @@ function ScrollAreaCorner({ className, ref, ...props }) {
|
|
|
77
77
|
const classes = mergeBaseClassName(["scroll-area__corner"].filter(Boolean).join(" "), className);
|
|
78
78
|
return /* @__PURE__ */ jsx(ScrollArea$1.Corner, {
|
|
79
79
|
ref,
|
|
80
|
+
"data-slot": "scroll-area-corner",
|
|
80
81
|
className: classes,
|
|
81
82
|
...props
|
|
82
83
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FieldControlProps, FieldLabelProps, FieldRootProps } from "./Field.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/SearchField.d.ts
|
|
5
|
+
interface SearchFieldRootProps extends FieldRootProps {}
|
|
6
|
+
interface SearchFieldLabelProps extends FieldLabelProps {}
|
|
7
|
+
interface SearchFieldControlProps extends Omit<FieldControlProps, "type"> {}
|
|
8
|
+
/**
|
|
9
|
+
* Field root for a labelled search input. Product-specific sizing can be
|
|
10
|
+
* applied through the shared field recipe variables without rebuilding the
|
|
11
|
+
* search icon anatomy.
|
|
12
|
+
*/
|
|
13
|
+
declare function SearchFieldRoot({
|
|
14
|
+
className,
|
|
15
|
+
ref,
|
|
16
|
+
...props
|
|
17
|
+
}: SearchFieldRootProps & {
|
|
18
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
/** Label associated with the search control through the underlying Field. */
|
|
21
|
+
declare function SearchFieldLabel({
|
|
22
|
+
className,
|
|
23
|
+
ref,
|
|
24
|
+
...props
|
|
25
|
+
}: SearchFieldLabelProps & {
|
|
26
|
+
ref?: React.Ref<HTMLLabelElement>;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
/** Search input with the design-system search icon and logical inset. */
|
|
29
|
+
declare function SearchFieldControl({
|
|
30
|
+
className,
|
|
31
|
+
ref,
|
|
32
|
+
...props
|
|
33
|
+
}: SearchFieldControlProps & {
|
|
34
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
35
|
+
}): React.JSX.Element;
|
|
36
|
+
/** Composable, accessible search field with stable anatomy slots. */
|
|
37
|
+
declare const SearchField: {
|
|
38
|
+
Root: typeof SearchFieldRoot;
|
|
39
|
+
Label: typeof SearchFieldLabel;
|
|
40
|
+
Control: typeof SearchFieldControl;
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { SearchField, SearchFieldControlProps, SearchFieldLabelProps, SearchFieldRootProps };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { U as SearchIcon } from "../icons-CQJ-aMnI.js";
|
|
3
|
+
import { Field } from "./Field.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/SearchField.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Field root for a labelled search input. Product-specific sizing can be
|
|
8
|
+
* applied through the shared field recipe variables without rebuilding the
|
|
9
|
+
* search icon anatomy.
|
|
10
|
+
*/
|
|
11
|
+
function SearchFieldRoot({ className, ref, ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Field.Root, {
|
|
13
|
+
ref,
|
|
14
|
+
"data-slot": "search-field",
|
|
15
|
+
className: mergeBaseClassName("search-field", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/** Label associated with the search control through the underlying Field. */
|
|
20
|
+
function SearchFieldLabel({ className, ref, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(Field.Label, {
|
|
22
|
+
ref,
|
|
23
|
+
"data-slot": "search-field-label",
|
|
24
|
+
className: mergeBaseClassName("search-field__label", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Search input with the design-system search icon and logical inset. */
|
|
29
|
+
function SearchFieldControl({ className, ref, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
31
|
+
"data-slot": "search-field-control",
|
|
32
|
+
className: "search-field__control",
|
|
33
|
+
children: [/* @__PURE__ */ jsx(SearchIcon, {
|
|
34
|
+
"data-slot": "search-field-icon",
|
|
35
|
+
className: "search-field__icon",
|
|
36
|
+
"aria-hidden": "true"
|
|
37
|
+
}), /* @__PURE__ */ jsx(Field.Control, {
|
|
38
|
+
ref,
|
|
39
|
+
type: "search",
|
|
40
|
+
className: mergeBaseClassName("search-field__input", className),
|
|
41
|
+
...props
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** Composable, accessible search field with stable anatomy slots. */
|
|
46
|
+
const SearchField = {
|
|
47
|
+
Root: SearchFieldRoot,
|
|
48
|
+
Label: SearchFieldLabel,
|
|
49
|
+
Control: SearchFieldControl
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { SearchField };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, f as SelectPortalProps, g as SelectScrollUpArrowProps, h as SelectScrollDownArrowProps, i as SelectGroupProps, l as SelectLabelProps, m as SelectProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectPositionerProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectListProps, v as SelectTriggerProps, y as SelectValueProps } from "../Select-
|
|
1
|
+
import { _ as SelectSeparatorProps, a as SelectIconProps, c as SelectItemTextProps, d as SelectPopupProps, f as SelectPortalProps, g as SelectScrollUpArrowProps, h as SelectScrollDownArrowProps, i as SelectGroupProps, l as SelectLabelProps, m as SelectProps, n as SelectBackdropProps, o as SelectItemIndicatorProps, p as SelectPositionerProps, r as SelectGroupLabelProps, s as SelectItemProps, t as Select, u as SelectListProps, v as SelectTriggerProps, y as SelectValueProps } from "../Select-B_13gg_J.js";
|
|
2
2
|
export { Select, SelectBackdropProps, SelectGroupLabelProps, SelectGroupProps, SelectIconProps, SelectItemIndicatorProps, SelectItemProps, SelectItemTextProps, SelectLabelProps, SelectListProps, SelectPopupProps, SelectPortalProps, SelectPositionerProps, SelectProps, SelectScrollDownArrowProps, SelectScrollUpArrowProps, SelectSeparatorProps, SelectTriggerProps, SelectValueProps };
|