@mcp-b/react-components 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AgentChat-CRmsKg9B.d.ts → AgentChat-Br6tKEl8.d.ts} +29 -5
- package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
- package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
- package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
- package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
- package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
- package/dist/{Menu-BLhnNnRK.d.ts → Menu-Bgu-ufb5.d.ts} +26 -65
- package/dist/{ModelSelector-BB-xB-Es.js → ModelSelector-DVgVBdvw.js} +7 -7
- package/dist/{PromptInput-IyM6ZETj.d.ts → PromptInput-p5KmOmt1.d.ts} +302 -46
- package/dist/Select-Dl_vF_Bt.d.ts +213 -0
- package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
- package/dist/{ThinkChat-B3wYahor.js → ThinkChat-7DQ2CogF.js} +34 -2
- package/dist/{ThinkChatActivity-F4KFPcJA.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +1 -1
- package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
- package/dist/components/Accordion.d.ts +17 -6
- package/dist/components/Accordion.js +23 -36
- package/dist/components/Activity.d.ts +5 -5
- package/dist/components/Activity.js +9 -9
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +304 -116
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AlertDialog.d.ts +40 -32
- package/dist/components/AlertDialog.js +46 -39
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +5 -5
- package/dist/components/Autocomplete.js +10 -2
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Avatar.js +3 -3
- package/dist/components/Badge.d.ts +11 -14
- package/dist/components/Badge.js +10 -18
- package/dist/components/BrowserLiveView.js +26 -36
- package/dist/components/BrowserReplay.js +4 -4
- package/dist/components/BrowserRunPanel.js +1 -1
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Button.js +7 -30
- package/dist/components/ChainOfThought.d.ts +5 -5
- package/dist/components/ChainOfThought.js +8 -5
- package/dist/components/ChatGptSignInScreen.js +3 -3
- package/dist/components/Checkbox.d.ts +10 -2
- package/dist/components/Checkbox.js +13 -6
- package/dist/components/CheckboxGroup.d.ts +6 -6
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +23 -28
- package/dist/components/CodexModelSelector.js +116 -94
- package/dist/components/Collapsible.d.ts +2 -4
- package/dist/components/Collapsible.js +9 -7
- package/dist/components/Combobox.d.ts +2 -2
- package/dist/components/Combobox.js +20 -22
- package/dist/components/Commit.d.ts +5 -5
- package/dist/components/Commit.js +6 -6
- package/dist/components/Context.js +5 -1
- package/dist/components/ContextMenu.d.ts +20 -72
- package/dist/components/ContextMenu.js +46 -56
- package/dist/components/Conversation.d.ts +1 -1
- package/dist/components/Conversation.js +1 -1
- package/dist/components/Dialog.d.ts +38 -30
- package/dist/components/Dialog.js +46 -34
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +5 -5
- package/dist/components/Field.d.ts +3 -3
- package/dist/components/Field.js +7 -8
- package/dist/components/Fieldset.d.ts +2 -2
- package/dist/components/Fieldset.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Label.d.ts +1 -1
- package/dist/components/Label.js +1 -1
- package/dist/components/McpServerPicker.js +21 -19
- package/dist/components/Menu.d.ts +2 -2
- package/dist/components/Menu.js +39 -49
- package/dist/components/Menubar.d.ts +16 -52
- package/dist/components/Menubar.js +44 -56
- package/dist/components/Message.d.ts +1 -1
- package/dist/components/Message.js +6 -6
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/Meter.js +5 -0
- package/dist/components/ModelSelector.d.ts +1 -1
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +3 -14
- package/dist/components/NavigationMenu.js +22 -38
- package/dist/components/NumberField.js +6 -0
- package/dist/components/Popover.d.ts +21 -44
- package/dist/components/Popover.js +33 -23
- package/dist/components/PreviewCard.d.ts +20 -18
- package/dist/components/PreviewCard.js +30 -20
- package/dist/components/PricingPage.js +30 -29
- package/dist/components/Progress.d.ts +7 -3
- package/dist/components/Progress.js +9 -4
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +139 -54
- package/dist/components/Queue.d.ts +7 -7
- package/dist/components/Queue.js +6 -6
- package/dist/components/RadioGroup.d.ts +10 -9
- package/dist/components/RadioGroup.js +8 -9
- package/dist/components/Reasoning.d.ts +4 -4
- package/dist/components/Reasoning.js +10 -6
- package/dist/components/ScrollArea.d.ts +2 -9
- package/dist/components/ScrollArea.js +5 -23
- package/dist/components/Select.d.ts +2 -2
- package/dist/components/Select.js +100 -134
- package/dist/components/Slider.d.ts +10 -7
- package/dist/components/Slider.js +12 -11
- package/dist/components/Sources.d.ts +4 -4
- package/dist/components/Sources.js +8 -5
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Switch.d.ts +6 -3
- package/dist/components/Switch.js +7 -4
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Task.d.ts +4 -4
- package/dist/components/Task.js +10 -6
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +5 -5
- package/dist/components/TestResults.d.ts +4 -4
- package/dist/components/TestResults.js +5 -5
- package/dist/components/ThinkChat.d.ts +9 -2
- package/dist/components/ThinkChat.js +1 -1
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +1 -1
- package/dist/components/ThinkChatToolPanels.js +8 -8
- package/dist/components/ThinkExecutionWorkbench.js +28 -28
- package/dist/components/ThinkFullApp.js +8 -8
- package/dist/components/ThinkThreadPicker.js +1 -1
- package/dist/components/ThinkThreadShell.js +5 -5
- package/dist/components/Toast.js +7 -0
- package/dist/components/ToggleGroup.d.ts +6 -2
- package/dist/components/ToggleGroup.js +6 -2
- package/dist/components/Toolbar.js +6 -0
- package/dist/components/Tooltip.d.ts +36 -27
- package/dist/components/Tooltip.js +45 -29
- package/dist/components/WebPreview.d.ts +1 -1
- package/dist/components/WebPreview.js +3 -3
- package/dist/components/WorkspaceExplorer.d.ts +6 -8
- package/dist/components/WorkspaceExplorer.js +6 -6
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
- package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
- package/dist/icons-Ba9THQKz.js +64 -0
- package/dist/icons-CUCz_Sft.d.ts +210 -0
- package/dist/styles/accessibility.css +14 -0
- package/dist/styles/accordion.css +21 -61
- package/dist/styles/activity.css +23 -58
- package/dist/styles/agent-chat.css +45 -4
- package/dist/styles/agent-connection.css +8 -10
- package/dist/styles/alert-dialog.css +20 -26
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +1 -1
- package/dist/styles/autocomplete.css +5 -170
- package/dist/styles/avatar.css +8 -8
- package/dist/styles/badge.css +8 -10
- package/dist/styles/base-ui-motion.css +176 -0
- package/dist/styles/base.css +19 -25
- package/dist/styles/browser-live-view.css +7 -7
- package/dist/styles/browser-replay.css +5 -5
- package/dist/styles/browser-run-panel.css +5 -5
- package/dist/styles/button.css +48 -43
- package/dist/styles/card.css +3 -5
- package/dist/styles/chain-of-thought.css +14 -70
- package/dist/styles/chatgpt-sign-in-screen.css +3 -3
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +3 -7
- package/dist/styles/code-block.css +10 -10
- package/dist/styles/codex-model-selector.css +33 -44
- package/dist/styles/collapsible.css +11 -27
- package/dist/styles/combobox.css +3 -149
- package/dist/styles/commit.css +19 -35
- package/dist/styles/context-menu.css +1 -77
- package/dist/styles/context.css +12 -12
- package/dist/styles/conversation.css +7 -7
- package/dist/styles/dialog.css +34 -55
- package/dist/styles/environment-variables.css +10 -10
- package/dist/styles/field.css +16 -58
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/file-tree.css +7 -9
- package/dist/styles/index.css +8 -1
- package/dist/styles/input.css +1 -51
- package/dist/styles/label.css +2 -2
- package/dist/styles/marker.css +2 -4
- package/dist/styles/mcp-server-picker.css +5 -5
- package/dist/styles/menu.css +6 -153
- package/dist/styles/menubar.css +6 -105
- package/dist/styles/message-scroller.css +1 -1
- package/dist/styles/message.css +86 -8
- package/dist/styles/meter.css +4 -20
- package/dist/styles/model-selector.css +13 -13
- package/dist/styles/navigation-menu.css +14 -54
- package/dist/styles/number-field.css +8 -23
- package/dist/styles/popover.css +13 -68
- package/dist/styles/preview-card.css +5 -46
- package/dist/styles/pricing-page.css +43 -43
- package/dist/styles/progress.css +7 -16
- package/dist/styles/prompt-input.css +95 -44
- package/dist/styles/queue.css +12 -28
- package/dist/styles/radio.css +4 -8
- package/dist/styles/reasoning.css +3 -62
- package/dist/styles/recipes.css +475 -0
- package/dist/styles/select.css +7 -103
- package/dist/styles/shell.css +3 -3
- package/dist/styles/slider.css +5 -7
- package/dist/styles/sources.css +9 -66
- package/dist/styles/stepper.css +16 -14
- package/dist/styles/streamdown.css +9 -9
- package/dist/styles/switch.css +4 -7
- package/dist/styles/tabs.css +7 -8
- package/dist/styles/task.css +13 -42
- package/dist/styles/terminal.css +7 -7
- package/dist/styles/test-results.css +21 -37
- package/dist/styles/think-execution-workbench.css +23 -23
- package/dist/styles/think-full-app.css +12 -20
- package/dist/styles/think-resize-handle.css +2 -2
- package/dist/styles/think-thread-picker.css +19 -10
- package/dist/styles/think-thread-shell.css +7 -7
- package/dist/styles/toast.css +14 -25
- package/dist/styles/toggle-group.css +16 -14
- package/dist/styles/toggle.css +14 -15
- package/dist/styles/toolbar.css +13 -25
- package/dist/styles/tooltip.css +6 -16
- package/dist/styles/web-preview.css +15 -15
- package/dist/styles/workspace-explorer.css +14 -13
- package/dist/utils/codex-model-catalog.d.ts +142 -0
- package/dist/utils/codex-model-catalog.js +112 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +8 -2
- package/dist/Select-CRsKCJ9x.d.ts +0 -200
- package/dist/icons-CbjtbIJK.d.ts +0 -51
- package/dist/icons-D2Q5n5C1.js +0 -291
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Accordion
|
|
1
|
+
import { Accordion } from "./Accordion.js";
|
|
2
2
|
import { Separator } from "./Separator.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Tooltip
|
|
5
|
-
import { AlertDialog
|
|
4
|
+
import { Tooltip } from "./Tooltip.js";
|
|
5
|
+
import { AlertDialog } from "./AlertDialog.js";
|
|
6
6
|
import { Badge } from "./Badge.js";
|
|
7
|
-
import { Slider
|
|
7
|
+
import { Slider } from "./Slider.js";
|
|
8
8
|
import { Card } from "./Card.js";
|
|
9
9
|
import { Checkbox } from "./Checkbox.js";
|
|
10
|
-
import { Switch
|
|
10
|
+
import { Switch } from "./Switch.js";
|
|
11
11
|
import { Label } from "./Label.js";
|
|
12
|
-
import { ToggleGroup
|
|
13
|
-
import { Progress
|
|
12
|
+
import { ToggleGroup } from "./ToggleGroup.js";
|
|
13
|
+
import { Progress } from "./Progress.js";
|
|
14
14
|
import * as React from "react";
|
|
15
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
//#region src/components/PricingPage.tsx
|
|
@@ -226,11 +226,12 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
226
226
|
className: "pricing-page__billing-toggle",
|
|
227
227
|
children: [!billingToggleVariant && /* @__PURE__ */ jsxs("div", {
|
|
228
228
|
className: "pricing-page__toggle-options",
|
|
229
|
-
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
229
|
+
children: [/* @__PURE__ */ jsx(Checkbox.Root, {
|
|
230
230
|
checked: useSwitchToggle,
|
|
231
231
|
onCheckedChange: (checked) => setUseSwitchToggle(!!checked),
|
|
232
232
|
id: "toggle-type",
|
|
233
|
-
"aria-label": "Use switch style"
|
|
233
|
+
"aria-label": "Use switch style",
|
|
234
|
+
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {})
|
|
234
235
|
}), /* @__PURE__ */ jsx(Label, {
|
|
235
236
|
htmlFor: "toggle-type",
|
|
236
237
|
style: { fontSize: "0.75rem" },
|
|
@@ -243,11 +244,11 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
243
244
|
className: `pricing-page__period-label ${!isYearly ? "pricing-page__period-label--active" : ""}`,
|
|
244
245
|
children: "Monthly"
|
|
245
246
|
}),
|
|
246
|
-
/* @__PURE__ */ jsx(Switch, {
|
|
247
|
+
/* @__PURE__ */ jsx(Switch.Root, {
|
|
247
248
|
checked: isYearly,
|
|
248
249
|
onCheckedChange: (checked) => setBillingPeriod(checked ? "yearly" : "monthly"),
|
|
249
250
|
"aria-label": "Toggle yearly billing",
|
|
250
|
-
children: /* @__PURE__ */ jsx(
|
|
251
|
+
children: /* @__PURE__ */ jsx(Switch.Thumb, {})
|
|
251
252
|
}),
|
|
252
253
|
/* @__PURE__ */ jsxs("span", {
|
|
253
254
|
className: `pricing-page__period-label ${isYearly ? "pricing-page__period-label--active" : ""}`,
|
|
@@ -263,13 +264,13 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
263
264
|
})]
|
|
264
265
|
})
|
|
265
266
|
]
|
|
266
|
-
}) : /* @__PURE__ */ jsxs(ToggleGroup, {
|
|
267
|
+
}) : /* @__PURE__ */ jsxs(ToggleGroup.Root, {
|
|
267
268
|
value: [billingPeriod],
|
|
268
269
|
onValueChange: (v) => v.length > 0 && setBillingPeriod(v[0]),
|
|
269
|
-
children: [/* @__PURE__ */ jsx(
|
|
270
|
+
children: [/* @__PURE__ */ jsx(ToggleGroup.Item, {
|
|
270
271
|
value: "monthly",
|
|
271
272
|
children: "Monthly"
|
|
272
|
-
}), /* @__PURE__ */ jsxs(
|
|
273
|
+
}), /* @__PURE__ */ jsxs(ToggleGroup.Item, {
|
|
273
274
|
value: "yearly",
|
|
274
275
|
children: ["Yearly", /* @__PURE__ */ jsxs(Badge, {
|
|
275
276
|
color: "success",
|
|
@@ -356,11 +357,11 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
356
357
|
]
|
|
357
358
|
})]
|
|
358
359
|
}),
|
|
359
|
-
feature.tooltip && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
360
|
+
feature.tooltip && /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
360
361
|
className: "pricing-page__feature-info",
|
|
361
362
|
"aria-label": `More information about ${feature.name}`,
|
|
362
363
|
children: /* @__PURE__ */ jsx(InfoIcon, {})
|
|
363
|
-
}), /* @__PURE__ */ jsx(
|
|
364
|
+
}), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: feature.tooltip }) }) })] })
|
|
364
365
|
]
|
|
365
366
|
}, index))
|
|
366
367
|
})
|
|
@@ -378,7 +379,7 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
378
379
|
className: "pricing-page__calculator-description",
|
|
379
380
|
children: ["Adjust the slider to see pricing based on your expected ", usageUnit]
|
|
380
381
|
}),
|
|
381
|
-
/* @__PURE__ */ jsxs(Slider, {
|
|
382
|
+
/* @__PURE__ */ jsxs(Slider.Root, {
|
|
382
383
|
value: usage,
|
|
383
384
|
onValueChange: (v) => setUsage(Array.isArray(v) ? v[0] : v),
|
|
384
385
|
min: 0,
|
|
@@ -393,7 +394,7 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
393
394
|
children: formatNumber(usage)
|
|
394
395
|
})]
|
|
395
396
|
}),
|
|
396
|
-
/* @__PURE__ */ jsx(
|
|
397
|
+
/* @__PURE__ */ jsx(Slider.Control, { children: /* @__PURE__ */ jsxs(Slider.Track, { children: [/* @__PURE__ */ jsx(Slider.Indicator, {}), /* @__PURE__ */ jsx(Slider.Thumb, { "aria-label": `Monthly ${usageUnit}` })] }) }),
|
|
397
398
|
/* @__PURE__ */ jsxs("div", {
|
|
398
399
|
className: "pricing-page__calculator-range",
|
|
399
400
|
children: [/* @__PURE__ */ jsx("span", { children: "0" }), /* @__PURE__ */ jsx("span", { children: formatNumber(maxUsage) })]
|
|
@@ -436,11 +437,11 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
436
437
|
"/mo"
|
|
437
438
|
]
|
|
438
439
|
})]
|
|
439
|
-
}), /* @__PURE__ */ jsx(Progress, {
|
|
440
|
+
}), /* @__PURE__ */ jsx(Progress.Root, {
|
|
440
441
|
"aria-label": `Progress toward ${tier.label}`,
|
|
441
442
|
value: isActive ? 100 : tier.limit > 0 ? usage / tier.limit * 100 : 0,
|
|
442
443
|
color: isActive ? "success" : "primary",
|
|
443
|
-
children: /* @__PURE__ */ jsx(
|
|
444
|
+
children: /* @__PURE__ */ jsx(Progress.Track, { children: /* @__PURE__ */ jsx(Progress.Indicator, {}) })
|
|
444
445
|
})]
|
|
445
446
|
}, index);
|
|
446
447
|
})
|
|
@@ -452,20 +453,20 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
452
453
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
453
454
|
className: "pricing-page__faq-title",
|
|
454
455
|
children: "Frequently Asked Questions"
|
|
455
|
-
}), /* @__PURE__ */ jsx(Accordion, {
|
|
456
|
+
}), /* @__PURE__ */ jsx(Accordion.Root, {
|
|
456
457
|
className: "pricing-page__faq-accordion",
|
|
457
|
-
children: faq.map((item, index) => /* @__PURE__ */ jsxs(
|
|
458
|
+
children: faq.map((item, index) => /* @__PURE__ */ jsxs(Accordion.Item, {
|
|
458
459
|
value: `faq-${index}`,
|
|
459
|
-
children: [/* @__PURE__ */ jsx(
|
|
460
|
+
children: [/* @__PURE__ */ jsx(Accordion.Header, { children: /* @__PURE__ */ jsx(Accordion.Trigger, { children: item.question }) }), /* @__PURE__ */ jsx(Accordion.Panel, { children: /* @__PURE__ */ jsx("p", { children: item.answer }) })]
|
|
460
461
|
}, index))
|
|
461
462
|
})]
|
|
462
463
|
}),
|
|
463
|
-
/* @__PURE__ */ jsx(AlertDialog, {
|
|
464
|
+
/* @__PURE__ */ jsx(AlertDialog.Root, {
|
|
464
465
|
open: confirmDialogOpen,
|
|
465
466
|
onOpenChange: setConfirmDialogOpen,
|
|
466
|
-
children: /* @__PURE__ */ jsxs(
|
|
467
|
-
/* @__PURE__ */ jsx(
|
|
468
|
-
/* @__PURE__ */ jsx(
|
|
467
|
+
children: /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [/* @__PURE__ */ jsx(AlertDialog.Backdrop, {}), /* @__PURE__ */ jsx(AlertDialog.Viewport, { children: /* @__PURE__ */ jsxs(AlertDialog.Popup, { children: [
|
|
468
|
+
/* @__PURE__ */ jsx(AlertDialog.Title, { children: isSubscribed && selectedPlan ? `${getSwitchDirection(selectedPlan) === "upgrade" ? "Upgrade" : getSwitchDirection(selectedPlan) === "downgrade" ? "Downgrade" : "Switch"} to ${selectedPlan.name}?` : `Subscribe to ${selectedPlan?.name}?` }),
|
|
469
|
+
/* @__PURE__ */ jsx(AlertDialog.Description, { children: isSubscribed && selectedPlan ? getSwitchDirection(selectedPlan) === "downgrade" ? `You'll be downgraded to the ${selectedPlan.name} plan. A prorated credit will be applied to your next invoice.` : `You'll be upgraded to the ${selectedPlan.name} plan. The prorated difference will be added to your next invoice.` : `You're about to subscribe to the ${selectedPlan?.name} plan at $${selectedPlan ? getPrice(selectedPlan) : 0}/month${isYearly ? " (billed yearly)" : ""}.` }),
|
|
469
470
|
selectedPlan && /* @__PURE__ */ jsxs("div", {
|
|
470
471
|
className: "pricing-page__confirm-summary",
|
|
471
472
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -487,7 +488,7 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
487
488
|
}),
|
|
488
489
|
/* @__PURE__ */ jsxs("div", {
|
|
489
490
|
className: "pricing-page__confirm-actions",
|
|
490
|
-
children: [/* @__PURE__ */ jsx(
|
|
491
|
+
children: [/* @__PURE__ */ jsx(AlertDialog.Close, {
|
|
491
492
|
disabled: switching,
|
|
492
493
|
children: "Cancel"
|
|
493
494
|
}), /* @__PURE__ */ jsx(Button, {
|
|
@@ -497,7 +498,7 @@ function PricingPage({ title = "Simple, transparent pricing", subtitle, plans, f
|
|
|
497
498
|
children: switching ? "Switching…" : isSubscribed && selectedPlan ? `Confirm ${getSwitchDirection(selectedPlan) === "upgrade" ? "Upgrade" : getSwitchDirection(selectedPlan) === "downgrade" ? "Downgrade" : "Switch"}` : "Confirm"
|
|
498
499
|
})]
|
|
499
500
|
})
|
|
500
|
-
] })] })
|
|
501
|
+
] }) })] })
|
|
501
502
|
})
|
|
502
503
|
]
|
|
503
504
|
});
|
|
@@ -31,10 +31,9 @@ interface ProgressIndicatorProps extends Omit<React.ComponentPropsWithRef<typeof
|
|
|
31
31
|
*
|
|
32
32
|
* @see {@link https://base-ui.com/react/components/progress | Base UI Progress}
|
|
33
33
|
*/
|
|
34
|
-
declare function
|
|
34
|
+
declare function ProgressRoot({
|
|
35
35
|
color,
|
|
36
36
|
className,
|
|
37
|
-
children,
|
|
38
37
|
ref,
|
|
39
38
|
...props
|
|
40
39
|
}: ProgressProps & {
|
|
@@ -54,5 +53,10 @@ declare function ProgressIndicator({
|
|
|
54
53
|
}: ProgressIndicatorProps & {
|
|
55
54
|
ref?: React.Ref<HTMLDivElement>;
|
|
56
55
|
}): React.JSX.Element;
|
|
56
|
+
declare const Progress: {
|
|
57
|
+
Root: typeof ProgressRoot;
|
|
58
|
+
Track: typeof ProgressTrack;
|
|
59
|
+
Indicator: typeof ProgressIndicator;
|
|
60
|
+
};
|
|
57
61
|
//#endregion
|
|
58
|
-
export { Progress, ProgressColor,
|
|
62
|
+
export { Progress, ProgressColor, ProgressIndicatorProps, ProgressProps, ProgressTrackProps };
|
|
@@ -16,7 +16,7 @@ import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
|
16
16
|
*
|
|
17
17
|
* @see {@link https://base-ui.com/react/components/progress | Base UI Progress}
|
|
18
18
|
*/
|
|
19
|
-
function
|
|
19
|
+
function ProgressRoot({ color = "primary", className = "", ref, ...props }) {
|
|
20
20
|
const classes = [
|
|
21
21
|
"progress",
|
|
22
22
|
`progress--${color}`,
|
|
@@ -26,14 +26,14 @@ function Progress({ color = "primary", className = "", children, ref, ...props }
|
|
|
26
26
|
ref,
|
|
27
27
|
"data-slot": "progress",
|
|
28
28
|
className: classes,
|
|
29
|
-
...props
|
|
30
|
-
children: children ?? /* @__PURE__ */ jsx(ProgressTrack, { children: /* @__PURE__ */ jsx(ProgressIndicator, {}) })
|
|
29
|
+
...props
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
32
|
function ProgressTrack({ className = "", ref, ...props }) {
|
|
34
33
|
const classes = ["progress__track", className].filter(Boolean).join(" ");
|
|
35
34
|
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
36
35
|
ref,
|
|
36
|
+
"data-slot": "progress-track",
|
|
37
37
|
className: classes,
|
|
38
38
|
...props
|
|
39
39
|
});
|
|
@@ -47,5 +47,10 @@ function ProgressIndicator({ className = "", ref, ...props }) {
|
|
|
47
47
|
...props
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
+
const Progress = {
|
|
51
|
+
Root: ProgressRoot,
|
|
52
|
+
Track: ProgressTrack,
|
|
53
|
+
Indicator: ProgressIndicator
|
|
54
|
+
};
|
|
50
55
|
//#endregion
|
|
51
|
-
export { Progress
|
|
56
|
+
export { Progress };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { AttachmentsContext, PendingToolApproval, 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, PromptInputCommandEmpty, PromptInputCommandEmptyProps, PromptInputCommandGroup, PromptInputCommandGroupProps, PromptInputCommandInput, PromptInputCommandInputProps, PromptInputCommandItem, PromptInputCommandItemProps, PromptInputCommandList, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparator, PromptInputCommandSeparatorProps, PromptInputControllerProps, PromptInputFooter, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, PromptInputSelect,
|
|
1
|
+
import { $ as PromptInputHoverCardTrigger, A as PromptInputCommandEmptyProps, At as getPendingToolApprovals, B as PromptInputCommandSeparator, C as PromptInputBody, Ct as PromptInputTools, D as PromptInputButtonTooltip, Dt as TooltipSide, E as PromptInputButtonProps, Et as TextInputContext, F as PromptInputCommandItem, G as PromptInputFooter, H as PromptInputControllerProps, I as PromptInputCommandItemProps, J as PromptInputHeaderProps, K as PromptInputFooterProps, L as PromptInputCommandList, M as PromptInputCommandGroupProps, Mt as usePromptInputController, N as PromptInputCommandInput, Nt as useProviderAttachments, O as PromptInputCommand, Ot as getApprovalRequestId, P as PromptInputCommandInputProps, Q as PromptInputHoverCardProps, R as PromptInputCommandListProps, S as PromptInputAttachmentsProps, St as PromptInputTextareaProps, T as PromptInputButton, Tt as PromptInputTooltipConfig, U as PromptInputDictation, V as PromptInputCommandSeparatorProps, W as PromptInputDictationProps, X as PromptInputHoverCardContent, Y as PromptInputHoverCard, Z as PromptInputHoverCardContentProps, _ as PromptInputApproval, _t as PromptInputTabLabelProps, a as PromptInputActionAddAttachments, at as PromptInputProvider, b as PromptInputAttachmentProps, bt as PromptInputTabsListProps, c as PromptInputActionAddScreenshotProps, ct as PromptInputSelectProps, d as PromptInputActionMenuContentProps, dt as PromptInputTab, et as PromptInputHoverCardTriggerProps, f as PromptInputActionMenuItem, ft as PromptInputTabBody, g as PromptInputActionMenuTriggerProps, gt as PromptInputTabLabel, h as PromptInputActionMenuTrigger, ht as PromptInputTabItemProps, i as PromptInput, it as PromptInputProps, j as PromptInputCommandGroup, jt as usePromptInputAttachments, k as PromptInputCommandEmpty, kt as getApprovalStateKey, l as PromptInputActionMenu, lt as PromptInputSubmit, m as PromptInputActionMenuProps, mt as PromptInputTabItem, n as PendingToolApproval, nt as PromptInputPermissionSelector, o as PromptInputActionAddAttachmentsProps, ot as PromptInputProviderProps, p as PromptInputActionMenuItemProps, pt as PromptInputTabBodyProps, q as PromptInputHeader, r as PermissionMode, rt as PromptInputPermissionSelectorProps, s as PromptInputActionAddScreenshot, st as PromptInputSelect, t as AttachmentsContext, tt as PromptInputMessage, u as PromptInputActionMenuContent, ut as PromptInputSubmitProps, v as PromptInputApprovalProps, vt as PromptInputTabProps, w as PromptInputBodyProps, wt as PromptInputToolsProps, x as PromptInputAttachments, xt as PromptInputTextarea, y as PromptInputAttachment, yt as PromptInputTabsList, z as PromptInputCommandProps } from "../PromptInput-p5KmOmt1.js";
|
|
2
|
+
export { AttachmentsContext, PendingToolApproval, 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, PromptInputCommandEmpty, PromptInputCommandEmptyProps, PromptInputCommandGroup, PromptInputCommandGroupProps, PromptInputCommandInput, PromptInputCommandInputProps, PromptInputCommandItem, PromptInputCommandItemProps, PromptInputCommandList, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparator, PromptInputCommandSeparatorProps, PromptInputControllerProps, PromptInputDictation, PromptInputDictationProps, PromptInputFooter, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, 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,12 +1,12 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { D as PencilIcon, F as StopIcon, L as WarningIcon, N as SpinnerIcon, P as SquareIcon, S as MicrophoneIcon, T as PaperclipIcon, h as FileIcon, i as ArrowUpIcon, k as PlusIcon, o as ChevronDownIcon, w as MonitorIcon, z as XIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Tooltip
|
|
5
|
-
import { t as AttachmentPreview } from "../attachment-preview-
|
|
6
|
-
import { Combobox
|
|
7
|
-
import {
|
|
8
|
-
import { Select
|
|
9
|
-
import {
|
|
4
|
+
import { Tooltip } from "./Tooltip.js";
|
|
5
|
+
import { t as AttachmentPreview } from "../attachment-preview-DIs50Q0h.js";
|
|
6
|
+
import { Combobox } from "./Combobox.js";
|
|
7
|
+
import { Menu } from "./Menu.js";
|
|
8
|
+
import { Select } from "./Select.js";
|
|
9
|
+
import { Tabs } from "./Tabs.js";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { getToolApproval, getToolInput, getToolOutput } from "@cloudflare/think/react";
|
|
@@ -462,10 +462,10 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
|
|
|
462
462
|
children
|
|
463
463
|
});
|
|
464
464
|
if (!tooltipConfig) return button;
|
|
465
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
465
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
466
466
|
side: tooltipConfig.side,
|
|
467
467
|
sideOffset: 6,
|
|
468
|
-
children: /* @__PURE__ */ jsxs(
|
|
468
|
+
children: /* @__PURE__ */ jsxs(Tooltip.Popup, { children: [/* @__PURE__ */ jsx("span", {
|
|
469
469
|
className: "prompt-input__tooltip-content",
|
|
470
470
|
children: tooltipConfig.content
|
|
471
471
|
}), tooltipConfig.shortcut ? /* @__PURE__ */ jsx("kbd", {
|
|
@@ -474,11 +474,86 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
|
|
|
474
474
|
}) : null] })
|
|
475
475
|
}) })] });
|
|
476
476
|
}
|
|
477
|
+
/**
|
|
478
|
+
* Voice-dictation control for PromptInput. Final upstream transcripts are
|
|
479
|
+
* appended to the composer while interim text remains ephemeral.
|
|
480
|
+
*/
|
|
481
|
+
function PromptInputDictation({ voice, className, disabled, ref, ...props }) {
|
|
482
|
+
const controller = useOptionalPromptInputController();
|
|
483
|
+
const buttonRef = React.useRef(null);
|
|
484
|
+
const committedTranscriptRef = React.useRef("");
|
|
485
|
+
const [isStarting, setIsStarting] = React.useState(false);
|
|
486
|
+
const [startError, setStartError] = React.useState(null);
|
|
487
|
+
React.useImperativeHandle(ref, () => buttonRef.current, []);
|
|
488
|
+
React.useEffect(() => {
|
|
489
|
+
const transcript = voice.transcript;
|
|
490
|
+
if (!transcript) return;
|
|
491
|
+
const previous = committedTranscriptRef.current;
|
|
492
|
+
const addition = transcript.startsWith(previous) ? transcript.slice(previous.length).trim() : transcript.trim();
|
|
493
|
+
committedTranscriptRef.current = transcript;
|
|
494
|
+
if (!addition) return;
|
|
495
|
+
if (controller) {
|
|
496
|
+
controller.textInput.setInput(appendDictationTranscript(controller.textInput.value, addition));
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
const textarea = buttonRef.current?.form?.querySelector("textarea[data-prompt-input-textarea=\"true\"]");
|
|
500
|
+
if (!textarea) return;
|
|
501
|
+
textarea.value = appendDictationTranscript(textarea.value, addition);
|
|
502
|
+
textarea.dispatchEvent(new Event("input", { bubbles: true }));
|
|
503
|
+
}, [controller, voice.transcript]);
|
|
504
|
+
const error = startError ?? voice.error;
|
|
505
|
+
const listening = voice.isListening;
|
|
506
|
+
const label = listening ? "Stop dictation" : error ? "Retry dictation" : "Start dictation";
|
|
507
|
+
const status = error ? `Dictation failed: ${error}` : listening ? voice.interimTranscript ? "Listening. Speech detected." : "Listening for speech." : isStarting ? "Starting dictation." : "";
|
|
508
|
+
const level = Math.min(Math.max(voice.audioLevel, 0), 1);
|
|
509
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PromptInputButton, {
|
|
510
|
+
ref: buttonRef,
|
|
511
|
+
className: cx("prompt-input__dictation", className),
|
|
512
|
+
tooltip: {
|
|
513
|
+
content: label,
|
|
514
|
+
side: "top"
|
|
515
|
+
},
|
|
516
|
+
"aria-label": label,
|
|
517
|
+
"aria-pressed": listening,
|
|
518
|
+
"data-error": error ? "true" : void 0,
|
|
519
|
+
"data-listening": listening ? "true" : void 0,
|
|
520
|
+
"data-starting": isStarting ? "true" : void 0,
|
|
521
|
+
disabled: disabled || isStarting,
|
|
522
|
+
onClick: () => {
|
|
523
|
+
setStartError(null);
|
|
524
|
+
if (listening) {
|
|
525
|
+
voice.stop();
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
setIsStarting(true);
|
|
529
|
+
voice.start().catch((reason) => {
|
|
530
|
+
setStartError(reason instanceof Error ? reason.message : String(reason));
|
|
531
|
+
}).finally(() => setIsStarting(false));
|
|
532
|
+
},
|
|
533
|
+
...props,
|
|
534
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
535
|
+
className: "prompt-input__dictation-icon",
|
|
536
|
+
style: { "--prompt-input-dictation-level": level },
|
|
537
|
+
"aria-hidden": "true",
|
|
538
|
+
children: isStarting ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : listening ? /* @__PURE__ */ jsx(StopIcon, {}) : /* @__PURE__ */ jsx(MicrophoneIcon, {})
|
|
539
|
+
})
|
|
540
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
541
|
+
className: "prompt-input__dictation-status",
|
|
542
|
+
role: "status",
|
|
543
|
+
"aria-live": "polite",
|
|
544
|
+
"aria-atomic": "true",
|
|
545
|
+
children: status
|
|
546
|
+
})] });
|
|
547
|
+
}
|
|
548
|
+
function appendDictationTranscript(current, transcript) {
|
|
549
|
+
if (!current) return transcript;
|
|
550
|
+
return `${current}${/\s$/u.test(current) ? "" : " "}${transcript}`;
|
|
551
|
+
}
|
|
477
552
|
function PromptInputActionMenu(props) {
|
|
478
|
-
return /* @__PURE__ */ jsx(
|
|
553
|
+
return /* @__PURE__ */ jsx(Menu.Root, { ...props });
|
|
479
554
|
}
|
|
480
555
|
function PromptInputActionMenuTrigger({ className, children, ...props }) {
|
|
481
|
-
return /* @__PURE__ */ jsx(
|
|
556
|
+
return /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
482
557
|
unstyled: true,
|
|
483
558
|
render: /* @__PURE__ */ jsx(PromptInputButton, {
|
|
484
559
|
className: cx("prompt-input__action-menu-trigger", className),
|
|
@@ -487,16 +562,30 @@ function PromptInputActionMenuTrigger({ className, children, ...props }) {
|
|
|
487
562
|
})
|
|
488
563
|
});
|
|
489
564
|
}
|
|
490
|
-
function PromptInputActionMenuContent({ className, children, tabIndex = 0, ...props }) {
|
|
491
|
-
return /* @__PURE__ */ jsx(
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
565
|
+
function PromptInputActionMenuContent({ anchor, positionMethod, side, sideOffset = 4, align, alignOffset, collisionBoundary, collisionPadding, sticky, arrowPadding, disableAnchorTracking, collisionAvoidance, className, children, tabIndex = 0, ...props }) {
|
|
566
|
+
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
567
|
+
anchor,
|
|
568
|
+
positionMethod,
|
|
569
|
+
side,
|
|
570
|
+
sideOffset,
|
|
571
|
+
align,
|
|
572
|
+
alignOffset,
|
|
573
|
+
collisionBoundary,
|
|
574
|
+
collisionPadding,
|
|
575
|
+
sticky,
|
|
576
|
+
arrowPadding,
|
|
577
|
+
disableAnchorTracking,
|
|
578
|
+
collisionAvoidance,
|
|
579
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
580
|
+
tabIndex,
|
|
581
|
+
className: cx("prompt-input__action-menu", className),
|
|
582
|
+
...props,
|
|
583
|
+
children
|
|
584
|
+
})
|
|
585
|
+
}) });
|
|
497
586
|
}
|
|
498
587
|
function PromptInputActionMenuItem({ className, ...props }) {
|
|
499
|
-
return /* @__PURE__ */ jsx(
|
|
588
|
+
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
500
589
|
className: cx("prompt-input__action-menu-item", className),
|
|
501
590
|
...props
|
|
502
591
|
});
|
|
@@ -545,28 +634,32 @@ const PERMISSION_MODES = [{
|
|
|
545
634
|
* whoever owns the approvals (`AgentChat` wires both ends).
|
|
546
635
|
*/
|
|
547
636
|
function PromptInputPermissionSelector({ value, onValueChange, question = "How should agent actions be approved?" }) {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
"
|
|
558
|
-
children:
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
637
|
+
const selected = PERMISSION_MODES.find((mode) => mode.value === value) ?? PERMISSION_MODES[0];
|
|
638
|
+
return /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(Menu.Trigger, {
|
|
639
|
+
unstyled: true,
|
|
640
|
+
render: /* @__PURE__ */ jsxs(PromptInputButton, {
|
|
641
|
+
size: "xs",
|
|
642
|
+
className: "prompt-input__permissions-trigger",
|
|
643
|
+
"data-mode": value,
|
|
644
|
+
"aria-label": selected.label,
|
|
645
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
646
|
+
className: "prompt-input__permissions-current",
|
|
647
|
+
children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs("span", {
|
|
648
|
+
className: "prompt-input__permissions-current-option",
|
|
649
|
+
"data-active": mode.value === value || void 0,
|
|
650
|
+
children: [mode.value === "bypass" ? /* @__PURE__ */ jsx(WarningIcon, { size: 14 }) : null, mode.label]
|
|
651
|
+
}, mode.value))
|
|
652
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12 })]
|
|
653
|
+
})
|
|
654
|
+
}), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsxs(Menu.Popup, {
|
|
562
655
|
className: "prompt-input__permissions-menu",
|
|
563
656
|
children: [/* @__PURE__ */ jsx("div", {
|
|
564
657
|
className: "prompt-input__permissions-question",
|
|
565
658
|
children: question
|
|
566
|
-
}), /* @__PURE__ */ jsx(
|
|
659
|
+
}), /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
567
660
|
value,
|
|
568
661
|
onValueChange: (mode) => onValueChange(mode),
|
|
569
|
-
children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs(
|
|
662
|
+
children: PERMISSION_MODES.map((mode) => /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
570
663
|
value: mode.value,
|
|
571
664
|
closeOnClick: true,
|
|
572
665
|
className: "prompt-input__permissions-option",
|
|
@@ -579,7 +672,7 @@ function PromptInputPermissionSelector({ value, onValueChange, question = "How s
|
|
|
579
672
|
className: "prompt-input__permissions-option-description",
|
|
580
673
|
children: mode.description
|
|
581
674
|
})]
|
|
582
|
-
}), /* @__PURE__ */ jsx(
|
|
675
|
+
}), /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { className: "prompt-input__permissions-check" })]
|
|
583
676
|
}, mode.value))
|
|
584
677
|
})]
|
|
585
678
|
}) }) })] });
|
|
@@ -832,14 +925,6 @@ function PromptInputApproval({ part, approval: durableApproval, onRespond, think
|
|
|
832
925
|
});
|
|
833
926
|
}
|
|
834
927
|
const PromptInputSelect = Select;
|
|
835
|
-
function PromptInputSelectTrigger(props) {
|
|
836
|
-
return /* @__PURE__ */ jsx(SelectTrigger, { ...props });
|
|
837
|
-
}
|
|
838
|
-
function PromptInputSelectContent(props) {
|
|
839
|
-
return /* @__PURE__ */ jsx(SelectPortal, { children: /* @__PURE__ */ jsx(SelectPositioner, { children: /* @__PURE__ */ jsx(SelectContent, { ...props }) }) });
|
|
840
|
-
}
|
|
841
|
-
const PromptInputSelectItem = SelectItem;
|
|
842
|
-
const PromptInputSelectValue = SelectValue;
|
|
843
928
|
const PromptInputHoverCardContext = React.createContext(null);
|
|
844
929
|
function PromptInputHoverCard({ openDelay = 0, closeDelay = 0, className, children, ref, ...props }) {
|
|
845
930
|
const [open, setOpen] = React.useState(false);
|
|
@@ -896,9 +981,9 @@ function PromptInputHoverCardContent({ className, ref, ...props }) {
|
|
|
896
981
|
...props
|
|
897
982
|
});
|
|
898
983
|
}
|
|
899
|
-
const PromptInputTabsList =
|
|
900
|
-
const PromptInputTab = Tab;
|
|
901
|
-
const PromptInputTabBody =
|
|
984
|
+
const PromptInputTabsList = Tabs.List;
|
|
985
|
+
const PromptInputTab = Tabs.Tab;
|
|
986
|
+
const PromptInputTabBody = Tabs.Panel;
|
|
902
987
|
function PromptInputTabLabel({ className, ref, ...props }) {
|
|
903
988
|
return /* @__PURE__ */ jsx("h3", {
|
|
904
989
|
ref,
|
|
@@ -914,18 +999,18 @@ function PromptInputTabItem({ className, ref, ...props }) {
|
|
|
914
999
|
});
|
|
915
1000
|
}
|
|
916
1001
|
const PromptInputCommand = Combobox;
|
|
917
|
-
const PromptInputCommandInput =
|
|
1002
|
+
const PromptInputCommandInput = Combobox.Input;
|
|
918
1003
|
function PromptInputCommandList({ className, ref, ...props }) {
|
|
919
|
-
return /* @__PURE__ */ jsx(
|
|
1004
|
+
return /* @__PURE__ */ jsx(Combobox.List, {
|
|
920
1005
|
ref,
|
|
921
1006
|
className: cx("prompt-input__command-list", className),
|
|
922
1007
|
...props
|
|
923
1008
|
});
|
|
924
1009
|
}
|
|
925
|
-
const PromptInputCommandEmpty =
|
|
926
|
-
const PromptInputCommandGroup =
|
|
927
|
-
const PromptInputCommandItem =
|
|
928
|
-
const PromptInputCommandSeparator =
|
|
1010
|
+
const PromptInputCommandEmpty = Combobox.Empty;
|
|
1011
|
+
const PromptInputCommandGroup = Combobox.Group;
|
|
1012
|
+
const PromptInputCommandItem = Combobox.Item;
|
|
1013
|
+
const PromptInputCommandSeparator = Combobox.Separator;
|
|
929
1014
|
function defaultSubmitIcon(status) {
|
|
930
1015
|
switch (status) {
|
|
931
1016
|
case "submitted": return /* @__PURE__ */ jsx(SpinnerIcon, { className: "prompt-input__submit-spinner" });
|
|
@@ -1017,4 +1102,4 @@ function createId() {
|
|
|
1017
1102
|
return globalThis.crypto?.randomUUID?.() ?? `prompt-input-${Date.now()}-${Math.random()}`;
|
|
1018
1103
|
}
|
|
1019
1104
|
//#endregion
|
|
1020
|
-
export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputApproval, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputPermissionSelector, PromptInputProvider, PromptInputSelect,
|
|
1105
|
+
export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputApproval, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputDictation, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputPermissionSelector, PromptInputProvider, PromptInputSelect, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as ButtonProps } from "../Button-
|
|
3
|
-
import {
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
|
+
import { r as ButtonProps } from "../Button-FX_hpqxm.js";
|
|
3
|
+
import { ScrollArea } from "./ScrollArea.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Queue.d.ts
|
|
@@ -61,7 +61,7 @@ declare function Queue({
|
|
|
61
61
|
}: QueueProps & {
|
|
62
62
|
ref?: React.Ref<HTMLDivElement>;
|
|
63
63
|
}): React.JSX.Element;
|
|
64
|
-
interface QueueSectionProps extends Omit<
|
|
64
|
+
interface QueueSectionProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
|
|
65
65
|
className?: string;
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
@@ -76,7 +76,7 @@ declare function QueueSection({
|
|
|
76
76
|
}: QueueSectionProps & {
|
|
77
77
|
ref?: React.Ref<HTMLDivElement>;
|
|
78
78
|
}): React.JSX.Element;
|
|
79
|
-
interface QueueSectionTriggerProps extends Omit<
|
|
79
|
+
interface QueueSectionTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
|
|
80
80
|
className?: string;
|
|
81
81
|
}
|
|
82
82
|
declare function QueueSectionTrigger({
|
|
@@ -104,7 +104,7 @@ declare function QueueSectionLabel({
|
|
|
104
104
|
}: QueueSectionLabelProps & {
|
|
105
105
|
ref?: React.Ref<HTMLSpanElement>;
|
|
106
106
|
}): React.JSX.Element;
|
|
107
|
-
interface QueueListProps extends Omit<
|
|
107
|
+
interface QueueListProps extends Omit<React.ComponentProps<typeof ScrollArea.Root>, "className"> {
|
|
108
108
|
className?: string;
|
|
109
109
|
}
|
|
110
110
|
declare function QueueList({
|
|
@@ -115,7 +115,7 @@ declare function QueueList({
|
|
|
115
115
|
}: QueueListProps & {
|
|
116
116
|
ref?: React.Ref<HTMLDivElement>;
|
|
117
117
|
}): React.JSX.Element;
|
|
118
|
-
interface QueueSectionContentProps extends Omit<
|
|
118
|
+
interface QueueSectionContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
|
|
119
119
|
className?: string;
|
|
120
120
|
}
|
|
121
121
|
declare function QueueSectionContent({
|
package/dist/components/Queue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
2
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
3
|
-
import { a as CheckIcon, c as ChevronRightIcon, h as FileIcon, u as DotIcon } from "../icons-
|
|
3
|
+
import { a as CheckIcon, c as ChevronRightIcon, h as FileIcon, u as DotIcon } from "../icons-Ba9THQKz.js";
|
|
4
4
|
import { Button } from "./Button.js";
|
|
5
5
|
import { Badge } from "./Badge.js";
|
|
6
6
|
import { ScrollArea } from "./ScrollArea.js";
|
|
@@ -57,7 +57,7 @@ function Queue({ className, children, ref, ...props }) {
|
|
|
57
57
|
* of QueueItem children.
|
|
58
58
|
*/
|
|
59
59
|
function QueueSection({ className, defaultOpen = true, ref, ...props }) {
|
|
60
|
-
return /* @__PURE__ */ jsx(
|
|
60
|
+
return /* @__PURE__ */ jsx(Collapsible.Root, {
|
|
61
61
|
ref,
|
|
62
62
|
className: cx("queue__section", className),
|
|
63
63
|
defaultOpen,
|
|
@@ -66,7 +66,7 @@ function QueueSection({ className, defaultOpen = true, ref, ...props }) {
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
function QueueSectionTrigger({ className, children, ref, ...props }) {
|
|
69
|
-
return /* @__PURE__ */ jsxs(
|
|
69
|
+
return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
70
70
|
ref,
|
|
71
71
|
className: cx("queue__section-trigger", className),
|
|
72
72
|
...props,
|
|
@@ -97,7 +97,7 @@ function QueueSectionLabel({ className, children, count, label, icon, ref, ...pr
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
function QueueList({ className, children, ref, ...props }) {
|
|
100
|
-
return /* @__PURE__ */ jsxs(ScrollArea, {
|
|
100
|
+
return /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
101
101
|
ref,
|
|
102
102
|
className: cx("queue__list", className),
|
|
103
103
|
...props,
|
|
@@ -117,7 +117,7 @@ function QueueList({ className, children, ref, ...props }) {
|
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
function QueueSectionContent({ className, ref, ...props }) {
|
|
120
|
-
return /* @__PURE__ */ jsx(
|
|
120
|
+
return /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
121
121
|
ref,
|
|
122
122
|
className: cx("queue__section-content", className),
|
|
123
123
|
...props,
|