@mcp-b/react-components 0.41.0 → 0.42.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/{ThinkChatActivity-DyGHj01E.d.ts → ThinkChatActivity-CsDql-ER.d.ts} +3 -0
- package/dist/{WorkspaceFileView-D0yFwoDr.js → WorkspaceFileView-DwdXiKku.js} +15 -20
- package/dist/components/agents-sdk/AgentActivity.js +3 -2
- package/dist/components/agents-sdk/AgentChat.js +1 -0
- package/dist/components/agents-sdk/BrowserRunPanel.js +2 -1
- package/dist/components/agents-sdk/ManagerOffice.d.ts +39 -27
- package/dist/components/agents-sdk/ManagerOffice.js +80 -44
- package/dist/components/agents-sdk/McpPluginCatalog.js +4 -2
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +19 -5
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +6 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +3 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +1 -0
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -88
- package/dist/components/agents-sdk/ThinkFullApp.js +75 -124
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +7 -6
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +57 -65
- package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +2 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -0
- package/dist/components/ai-sdk/PromptInput.js +20 -14
- package/dist/components/extension/ChatGptSignInScreen.js +1 -0
- package/dist/components/foundations/ToggleGroup.d.ts +79 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/Toolbar.d.ts +151 -1
- package/dist/components/general-purpose/AppFrame.js +1 -0
- package/dist/components/general-purpose/AppTopBar.d.ts +96 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
- package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
- package/dist/components/general-purpose/ResizableSidePanel.d.ts +8 -0
- package/dist/components/general-purpose/ResizableSidePanel.js +3 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +59 -49
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +74 -74
- package/dist/components/general-purpose/WebPreview.d.ts +3 -0
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentToolDetail.js +4 -3
- package/dist/styles/accordion.css +1 -0
- package/dist/styles/action-guide.css +8 -7
- package/dist/styles/activity-header.css +13 -39
- package/dist/styles/activity.css +40 -55
- package/dist/styles/agent-attention.css +14 -14
- package/dist/styles/agent-chat.css +62 -45
- package/dist/styles/agent-connection.css +10 -4
- package/dist/styles/agent-tool-detail.css +4 -4
- package/dist/styles/alert-dialog.css +4 -4
- package/dist/styles/app-frame.css +1 -3
- package/dist/styles/app-top-bar.css +5 -9
- package/dist/styles/approval.css +1 -0
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +5 -4
- package/dist/styles/browser-replay.css +6 -6
- package/dist/styles/browser-run-panel.css +1 -0
- package/dist/styles/button.css +15 -6
- package/dist/styles/card.css +5 -5
- package/dist/styles/chatgpt-sign-in-screen.css +1 -1
- package/dist/styles/code-block.css +14 -13
- package/dist/styles/codex-model-selector.css +2 -0
- package/dist/styles/collapsible.css +1 -0
- package/dist/styles/commit.css +6 -6
- package/dist/styles/context.css +9 -9
- package/dist/styles/conversation-tab-picker.css +1 -1
- package/dist/styles/conversation.css +6 -8
- package/dist/styles/dialog.css +4 -4
- package/dist/styles/empty-state.css +3 -3
- package/dist/styles/environment-variables.css +9 -9
- package/dist/styles/field.css +2 -1
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/index.css +3 -3
- package/dist/styles/manager-office.css +23 -29
- package/dist/styles/mcp-plugin-catalog.css +11 -10
- package/dist/styles/mcp-server-picker.css +3 -3
- package/dist/styles/message-scroller.css +9 -11
- package/dist/styles/message.css +43 -20
- package/dist/styles/navigation-menu.css +1 -0
- package/dist/styles/plan.css +13 -12
- package/dist/styles/pricing-page.css +26 -23
- package/dist/styles/prompt-input.css +18 -5
- package/dist/styles/queue.css +1 -0
- package/dist/styles/reasoning.css +1 -9
- package/dist/styles/recipes.css +28 -1
- package/dist/styles/responsive-sidebar-shell.css +44 -16
- package/dist/styles/separator.css +5 -5
- package/dist/styles/sources.css +4 -4
- package/dist/styles/stepper.css +1 -0
- package/dist/styles/streamdown.css +31 -21
- package/dist/styles/tabs.css +1 -0
- package/dist/styles/task.css +5 -17
- package/dist/styles/terminal.css +10 -10
- package/dist/styles/test-results.css +6 -6
- package/dist/styles/think-execution-status.css +2 -2
- package/dist/styles/think-execution-workbench.css +12 -15
- package/dist/styles/think-full-app.css +26 -64
- package/dist/styles/think-routine-library.css +26 -55
- package/dist/styles/think-thread-picker.css +9 -9
- package/dist/styles/utilities.css +33 -0
- package/dist/styles/web-preview.css +20 -19
- package/dist/styles/workspace-explorer.css +18 -21
- package/dist/styles/workspace-mount-manager.css +2 -2
- package/dist/utils/favicon.d.ts +6 -1
- package/dist/utils/favicon.js +18 -1
- package/package.json +2 -2
- package/dist/AppTopBar-ZdgmB_Lu.d.ts +0 -97
- package/dist/ToggleGroup-BrQZOQn_.d.ts +0 -80
- package/dist/Toolbar-CBOseBQr.d.ts +0 -152
- package/dist/{ThinkChat-BES_3Mb-.js → ThinkChat-DkA4Wr71.js} +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { K as SpinnerIcon, y as EllipsisIcon, z as PlayIcon } from "../../icons-CVFSeTJn.js";
|
|
3
3
|
import { buttonVariants } from "../foundations/Button.js";
|
|
4
4
|
import { Menu } from "../foundations/Menu.js";
|
|
5
5
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
6
6
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
7
|
+
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
7
8
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
9
10
|
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
10
|
-
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
11
11
|
import { ThinkRoutineBrowser } from "./ThinkRoutineBrowser.js";
|
|
12
12
|
import { ThinkRoutineDetail } from "./ThinkRoutineDetail.js";
|
|
13
13
|
import * as React from "react";
|
|
@@ -83,7 +83,7 @@ function RoutineTopBarActions({ appBarActions, busy, onDelete, editLink, onRun,
|
|
|
83
83
|
* and `ThinkRoutineRuns`; consumers compose `ThinkRoutineForm` in their create
|
|
84
84
|
* route and may also use these surfaces independently.
|
|
85
85
|
*/
|
|
86
|
-
function ThinkRoutineLibrary({
|
|
86
|
+
function ThinkRoutineLibrary({ bar, className, createRoutineLink, error: catalogError, onDeleteRoutine, onRoutineEnabledChange, onRunRoutine, renderEditRoutineLink, renderRoutineLink, renderRoutineDetail, renderRunLink, ref, routines, selectedRoutineId, showOwner = true, ...props }) {
|
|
87
87
|
const [busy, setBusy] = React.useState(false);
|
|
88
88
|
const [announcement, setAnnouncement] = React.useState("");
|
|
89
89
|
const [actionError, setActionError] = React.useState(null);
|
|
@@ -108,73 +108,65 @@ function ThinkRoutineLibrary({ appBarActions, appBarLeading, className, createRo
|
|
|
108
108
|
renderRunLink: renderRunLink ? (run) => renderRunLink(selectedRoutine, run) : void 0,
|
|
109
109
|
onEnabledChange: onRoutineEnabledChange ? (enabled) => void perform(() => onRoutineEnabledChange(selectedRoutine, enabled), `${selectedRoutine.name} ${enabled ? "activated" : "paused"}.`) : void 0
|
|
110
110
|
} : void 0;
|
|
111
|
-
return /* @__PURE__ */ jsxs(
|
|
111
|
+
return /* @__PURE__ */ jsxs(ResponsiveSidebarShell, {
|
|
112
112
|
ref,
|
|
113
113
|
className: cx("think-routine-library", className),
|
|
114
114
|
...props,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
children: detailProps ? /* @__PURE__ */ jsx(React.Fragment, { children: renderRoutineDetail ? renderRoutineDetail({
|
|
151
|
-
...detailProps,
|
|
152
|
-
defaultDetail: /* @__PURE__ */ jsx(ThinkRoutineDetail, {
|
|
153
|
-
...detailProps,
|
|
154
|
-
showOwner
|
|
155
|
-
})
|
|
156
|
-
}) : /* @__PURE__ */ jsx(ThinkRoutineDetail, {
|
|
157
|
-
...detailProps,
|
|
158
|
-
showOwner
|
|
159
|
-
}) }, detailProps.routine.id) : /* @__PURE__ */ jsx(EmptyState, {
|
|
160
|
-
className: "think-routine-library__empty-detail",
|
|
161
|
-
title: selectedRoutineId ? "Schedule unavailable" : routines.length ? "Select a schedule" : "No schedules yet",
|
|
162
|
-
description: routines.length ? "Select an available schedule." : "Create a schedule to run recurring Think prompts.",
|
|
163
|
-
children: !routines.length && createRoutineLink ? /* @__PURE__ */ jsx(NavigationLink, {
|
|
164
|
-
render: createRoutineLink,
|
|
165
|
-
className: buttonVariants({ color: "primary" }),
|
|
166
|
-
children: "Create schedule"
|
|
167
|
-
}) : null
|
|
168
|
-
})
|
|
115
|
+
sidebarLabel: "schedules",
|
|
116
|
+
showMainLabel: "Show selected schedule",
|
|
117
|
+
error: catalogError || actionError || void 0,
|
|
118
|
+
bar: {
|
|
119
|
+
...bar,
|
|
120
|
+
label: "Schedule controls",
|
|
121
|
+
title: bar?.title ?? selectedRoutine?.name ?? "Schedules",
|
|
122
|
+
compactTitleTrigger: selectedRoutine ? /* @__PURE__ */ jsx("span", { children: selectedRoutine.name }) : void 0,
|
|
123
|
+
actions: /* @__PURE__ */ jsx(RoutineTopBarActions, {
|
|
124
|
+
appBarActions: bar?.actions,
|
|
125
|
+
busy,
|
|
126
|
+
routineName: selectedRoutine?.name ?? "schedule",
|
|
127
|
+
editLink: selectedRoutine && renderEditRoutineLink ? renderEditRoutineLink(selectedRoutine) : void 0,
|
|
128
|
+
onRun: selectedRoutine && onRunRoutine ? () => void perform(() => onRunRoutine(selectedRoutine), `Started ${selectedRoutine.name}.`) : void 0,
|
|
129
|
+
onDelete: selectedRoutine && onDeleteRoutine ? () => void perform(() => onDeleteRoutine(selectedRoutine), `Deleted ${selectedRoutine.name}.`) : void 0
|
|
130
|
+
})
|
|
131
|
+
},
|
|
132
|
+
sidebar: ({ closeSidebarOnCompact }) => /* @__PURE__ */ jsx(ThinkRoutineBrowser, {
|
|
133
|
+
routines,
|
|
134
|
+
selectedRoutineId,
|
|
135
|
+
showOwner,
|
|
136
|
+
renderRoutineLink,
|
|
137
|
+
createRoutineLink,
|
|
138
|
+
onRoutineLinkClick: (event) => {
|
|
139
|
+
if (!isPlainPrimaryLinkActivation(event)) return;
|
|
140
|
+
closeSidebarOnCompact();
|
|
141
|
+
}
|
|
142
|
+
}),
|
|
143
|
+
children: [/* @__PURE__ */ jsx("main", {
|
|
144
|
+
className: "think-routine-library__main",
|
|
145
|
+
children: detailProps ? /* @__PURE__ */ jsx(React.Fragment, { children: renderRoutineDetail ? renderRoutineDetail({
|
|
146
|
+
...detailProps,
|
|
147
|
+
defaultDetail: /* @__PURE__ */ jsx(ThinkRoutineDetail, {
|
|
148
|
+
...detailProps,
|
|
149
|
+
showOwner
|
|
169
150
|
})
|
|
170
|
-
}),
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
151
|
+
}) : /* @__PURE__ */ jsx(ThinkRoutineDetail, {
|
|
152
|
+
...detailProps,
|
|
153
|
+
showOwner
|
|
154
|
+
}) }, detailProps.routine.id) : /* @__PURE__ */ jsx(EmptyState, {
|
|
155
|
+
className: "think-routine-library__empty-detail",
|
|
156
|
+
title: selectedRoutineId ? "Schedule unavailable" : routines.length ? "Select a schedule" : "No schedules yet",
|
|
157
|
+
description: routines.length ? "Select an available schedule." : "Create a schedule to run recurring Think prompts.",
|
|
158
|
+
children: !routines.length && createRoutineLink ? /* @__PURE__ */ jsx(NavigationLink, {
|
|
159
|
+
render: createRoutineLink,
|
|
160
|
+
className: buttonVariants({ color: "primary" }),
|
|
161
|
+
children: "Create schedule"
|
|
162
|
+
}) : null
|
|
176
163
|
})
|
|
177
|
-
|
|
164
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
165
|
+
className: "think-routine-library__status sigvelo-visually-hidden",
|
|
166
|
+
role: "status",
|
|
167
|
+
"aria-atomic": "true",
|
|
168
|
+
children: announcement
|
|
169
|
+
})]
|
|
178
170
|
});
|
|
179
171
|
}
|
|
180
172
|
//#endregion
|
|
@@ -4,9 +4,9 @@ import { Button, buttonVariants } from "../foundations/Button.js";
|
|
|
4
4
|
import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
|
|
5
5
|
import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
6
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
7
|
+
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
7
8
|
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
9
|
import { SearchField } from "../foundations/SearchField.js";
|
|
9
|
-
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/agents-sdk/ThinkThreadPicker.tsx
|
|
@@ -156,6 +156,7 @@ function ThinkThreadPicker({ threads, renderThreadLink, onCreate, onSelect, onDe
|
|
|
156
156
|
ref,
|
|
157
157
|
className: cx("think-thread-picker", className),
|
|
158
158
|
...props,
|
|
159
|
+
"data-recipe": "fill-host",
|
|
159
160
|
children: [
|
|
160
161
|
/* @__PURE__ */ jsxs("header", {
|
|
161
162
|
className: "think-thread-picker__header",
|
|
@@ -2,7 +2,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
|
2
2
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
3
3
|
import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DtH66bAY.js";
|
|
4
4
|
import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
|
|
5
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
5
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-DwdXiKku.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/agents-sdk/WorkspaceExplorer.tsx
|
|
@@ -89,6 +89,7 @@ function WorkspaceExplorerContent({ workspace, navigation, className, title = "W
|
|
|
89
89
|
return /* @__PURE__ */ jsx("div", {
|
|
90
90
|
ref: mergeRefs(explorerRef, ref),
|
|
91
91
|
className: cx("workspace-explorer", className),
|
|
92
|
+
"data-recipe": "fill-host",
|
|
92
93
|
...props,
|
|
93
94
|
children: fileDestination ? /* @__PURE__ */ jsx(WorkspaceNavigationProvider, {
|
|
94
95
|
root: workspace.root,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WorkspaceFileView } from "../../WorkspaceFileView-
|
|
1
|
+
import { t as WorkspaceFileView } from "../../WorkspaceFileView-DwdXiKku.js";
|
|
2
2
|
export { WorkspaceFileView };
|
|
@@ -17,7 +17,8 @@ function MessageScroller({ className, ...props }) {
|
|
|
17
17
|
return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
|
|
18
18
|
"data-slot": messageScrollerContract.root.slot,
|
|
19
19
|
className: cx(messageScrollerContract.root.className, className),
|
|
20
|
-
...props
|
|
20
|
+
...props,
|
|
21
|
+
"data-recipe": "fill-host"
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
function MessageScrollerViewport({ "aria-label": ariaLabel = messageScrollerContract.viewport.ariaLabel, className, role = messageScrollerContract.viewport.role, tabIndex = messageScrollerContract.viewport.tabIndex, ...props }) {
|
|
@@ -77,6 +77,7 @@ function VirtualMessageScroller({ items, getItemKey, renderItem, estimateSize =
|
|
|
77
77
|
"data-slot": messageScrollerContract.root.slot,
|
|
78
78
|
className: cx(messageScrollerContract.root.className, className),
|
|
79
79
|
...props,
|
|
80
|
+
"data-recipe": "fill-host",
|
|
80
81
|
children: [/* @__PURE__ */ jsx("div", {
|
|
81
82
|
ref: viewportRef,
|
|
82
83
|
"aria-label": messageScrollerContract.viewport.ariaLabel,
|
|
@@ -26,21 +26,17 @@ function useAttachmentStore() {
|
|
|
26
26
|
revokeFileUrls(filesRef.current);
|
|
27
27
|
}, []);
|
|
28
28
|
const add = React.useCallback((incomingFiles) => {
|
|
29
|
-
const incoming = Array.from(incomingFiles);
|
|
30
|
-
setFiles((current) => [...current, ...incoming
|
|
29
|
+
const incoming = Array.from(incomingFiles).map(fileToPart);
|
|
30
|
+
setFiles((current) => [...current, ...incoming]);
|
|
31
31
|
}, []);
|
|
32
32
|
const remove = React.useCallback((id) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return current.filter((file) => file.id !== id);
|
|
37
|
-
});
|
|
33
|
+
const found = filesRef.current.find((file) => file.id === id);
|
|
34
|
+
if (found) revokeFileObjectUrl(found);
|
|
35
|
+
setFiles((current) => current.filter((file) => file.id !== id));
|
|
38
36
|
}, []);
|
|
39
37
|
const clear = React.useCallback(() => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return [];
|
|
43
|
-
});
|
|
38
|
+
revokeFileUrls(filesRef.current);
|
|
39
|
+
setFiles([]);
|
|
44
40
|
}, []);
|
|
45
41
|
return React.useMemo(() => ({
|
|
46
42
|
add,
|
|
@@ -1207,17 +1203,27 @@ function defaultSubmitLabel(status) {
|
|
|
1207
1203
|
default: return "Send message";
|
|
1208
1204
|
}
|
|
1209
1205
|
}
|
|
1206
|
+
const fileObjectUrls = /* @__PURE__ */ new WeakMap();
|
|
1210
1207
|
function fileToPart(file) {
|
|
1211
|
-
|
|
1208
|
+
const objectUrl = URL.createObjectURL(file);
|
|
1209
|
+
const part = {
|
|
1212
1210
|
id: createId(),
|
|
1213
1211
|
type: "file",
|
|
1214
1212
|
filename: file.name,
|
|
1215
1213
|
mediaType: file.type,
|
|
1216
|
-
url:
|
|
1214
|
+
url: objectUrl
|
|
1217
1215
|
};
|
|
1216
|
+
fileObjectUrls.set(part, objectUrl);
|
|
1217
|
+
return part;
|
|
1218
|
+
}
|
|
1219
|
+
function revokeFileObjectUrl(file) {
|
|
1220
|
+
const objectUrl = fileObjectUrls.get(file) ?? (file.url.startsWith("blob:") ? file.url : void 0);
|
|
1221
|
+
if (!objectUrl) return;
|
|
1222
|
+
fileObjectUrls.delete(file);
|
|
1223
|
+
URL.revokeObjectURL(objectUrl);
|
|
1218
1224
|
}
|
|
1219
1225
|
function revokeFileUrls(files) {
|
|
1220
|
-
for (const file of files)
|
|
1226
|
+
for (const file of files) revokeFileObjectUrl(file);
|
|
1221
1227
|
}
|
|
1222
1228
|
async function resolveSubmittedFile(file) {
|
|
1223
1229
|
const { id: _id, ...part } = file;
|
|
@@ -23,6 +23,7 @@ function ChatGptSignInScreen({ busy = false, control, error, label = "Sign in wi
|
|
|
23
23
|
onPointerLeave: handlePointerLeave,
|
|
24
24
|
onPointerMove: handlePointerMove,
|
|
25
25
|
...props,
|
|
26
|
+
"data-recipe": "fill-host",
|
|
26
27
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
27
28
|
className: "chatgpt-sign-in__panel",
|
|
28
29
|
children: [
|
|
@@ -1,2 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as ToggleVariantsOptions } from "../../Toggle-DLrIf5YH.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Toggle } from "@base-ui/react/toggle";
|
|
4
|
+
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
5
|
+
|
|
6
|
+
//#region src/components/foundations/ToggleGroup.d.ts
|
|
7
|
+
type ToggleGroupSize = ToggleVariantsOptions["size"];
|
|
8
|
+
type ToggleGroupProps<Value extends string = string> = ToggleGroup$1.Props<Value> & {
|
|
9
|
+
variant?: ToggleVariantsOptions["variant"];
|
|
10
|
+
/**
|
|
11
|
+
* The size of the toggle group.
|
|
12
|
+
* @default 'md'
|
|
13
|
+
*/
|
|
14
|
+
size?: ToggleGroupSize;
|
|
15
|
+
spacing?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Draws one shared thumb that slides between segments rather than lighting up
|
|
18
|
+
* each item's own background. This is the permission-mode / view-switch
|
|
19
|
+
* control; it is a presentation of this group, not a separate component.
|
|
20
|
+
*
|
|
21
|
+
* Only meaningful for single selection — a sliding thumb cannot be in two
|
|
22
|
+
* places, so a `multiple` group ignores it.
|
|
23
|
+
*/
|
|
24
|
+
segmented?: boolean;
|
|
25
|
+
};
|
|
26
|
+
interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle>, Omit<ToggleVariantsOptions, "className"> {}
|
|
27
|
+
/**
|
|
28
|
+
* A toggle group component for selecting one or multiple options.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // Single selection (defaultValue is an array)
|
|
33
|
+
* <ToggleGroup.Root defaultValue={["center"]}>
|
|
34
|
+
* <ToggleGroup.Item value="left">Left</ToggleGroup.Item>
|
|
35
|
+
* <ToggleGroup.Item value="center">Center</ToggleGroup.Item>
|
|
36
|
+
* <ToggleGroup.Item value="right">Right</ToggleGroup.Item>
|
|
37
|
+
* </ToggleGroup.Root>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* // Multiple selection
|
|
43
|
+
* <ToggleGroup.Root multiple defaultValue={["bold", "italic"]}>
|
|
44
|
+
* <ToggleGroup.Item value="bold">Bold</ToggleGroup.Item>
|
|
45
|
+
* <ToggleGroup.Item value="italic">Italic</ToggleGroup.Item>
|
|
46
|
+
* <ToggleGroup.Item value="underline">Underline</ToggleGroup.Item>
|
|
47
|
+
* </ToggleGroup.Root>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group}
|
|
51
|
+
*/
|
|
52
|
+
declare function ToggleGroupRoot<Value extends string>({
|
|
53
|
+
size,
|
|
54
|
+
spacing,
|
|
55
|
+
segmented,
|
|
56
|
+
variant,
|
|
57
|
+
className,
|
|
58
|
+
children,
|
|
59
|
+
style,
|
|
60
|
+
ref,
|
|
61
|
+
...props
|
|
62
|
+
}: ToggleGroupProps<Value>): React.JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* A single toggle item within a ToggleGroup.
|
|
65
|
+
*/
|
|
66
|
+
declare function ToggleGroupItem({
|
|
67
|
+
className,
|
|
68
|
+
variant,
|
|
69
|
+
size,
|
|
70
|
+
ref,
|
|
71
|
+
...props
|
|
72
|
+
}: ToggleGroupItemProps & {
|
|
73
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
74
|
+
}): React.JSX.Element;
|
|
75
|
+
declare const ToggleGroup: {
|
|
76
|
+
Root: typeof ToggleGroupRoot;
|
|
77
|
+
Item: typeof ToggleGroupItem;
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
2
80
|
export { ToggleGroup, ToggleGroupItemProps, ToggleGroupProps };
|
|
@@ -3,8 +3,8 @@ import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
|
3
3
|
import { toggleVariants } from "./Toggle.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
7
6
|
import { Toggle } from "@base-ui/react/toggle";
|
|
7
|
+
import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
|
|
8
8
|
//#region src/components/foundations/ToggleGroup.tsx
|
|
9
9
|
/**
|
|
10
10
|
* Tracks the pressed item's box so the segmented thumb can slide to it instead
|
|
@@ -1,2 +1,152 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Toolbar as Toolbar$1 } from "@base-ui/react/toolbar";
|
|
3
|
+
|
|
4
|
+
//#region src/components/foundations/Toolbar.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Toolbar.Root component.
|
|
7
|
+
*/
|
|
8
|
+
interface ToolbarRootProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Root> {}
|
|
9
|
+
/**
|
|
10
|
+
* Props for the Toolbar.Button component.
|
|
11
|
+
*/
|
|
12
|
+
interface ToolbarButtonProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Button> {
|
|
13
|
+
/** Skip the default Button chrome when a composed control owns its visuals. */
|
|
14
|
+
unstyled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Props for the Toolbar.Link component.
|
|
18
|
+
*/
|
|
19
|
+
interface ToolbarLinkProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Link> {
|
|
20
|
+
/** Skip the default Button chrome when a composed link owns its visuals. */
|
|
21
|
+
unstyled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for the Toolbar.Group component.
|
|
25
|
+
*/
|
|
26
|
+
interface ToolbarGroupProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Group> {}
|
|
27
|
+
/**
|
|
28
|
+
* Props for the Toolbar.Separator component.
|
|
29
|
+
*/
|
|
30
|
+
interface ToolbarSeparatorProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Separator> {}
|
|
31
|
+
/**
|
|
32
|
+
* Props for the Toolbar.Input component.
|
|
33
|
+
*/
|
|
34
|
+
interface ToolbarInputProps extends React.ComponentPropsWithoutRef<typeof Toolbar$1.Input> {}
|
|
35
|
+
/**
|
|
36
|
+
* Container for grouping toolbar buttons and controls.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <Toolbar.Root>
|
|
41
|
+
* <Toolbar.Button>Bold</Toolbar.Button>
|
|
42
|
+
* <Toolbar.Button>Italic</Toolbar.Button>
|
|
43
|
+
* <Toolbar.Separator />
|
|
44
|
+
* <Toolbar.Button>Align Left</Toolbar.Button>
|
|
45
|
+
* </Toolbar.Root>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar}
|
|
49
|
+
*/
|
|
50
|
+
declare function ToolbarRoot({
|
|
51
|
+
className,
|
|
52
|
+
ref,
|
|
53
|
+
...props
|
|
54
|
+
}: ToolbarRootProps & {
|
|
55
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
56
|
+
}): React.JSX.Element;
|
|
57
|
+
/**
|
|
58
|
+
* A clickable button within the toolbar.
|
|
59
|
+
*/
|
|
60
|
+
declare function ToolbarButton({
|
|
61
|
+
unstyled,
|
|
62
|
+
className,
|
|
63
|
+
ref,
|
|
64
|
+
...props
|
|
65
|
+
}: ToolbarButtonProps & {
|
|
66
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
67
|
+
}): React.JSX.Element;
|
|
68
|
+
/**
|
|
69
|
+
* A link element within the toolbar.
|
|
70
|
+
*/
|
|
71
|
+
declare function ToolbarLink({
|
|
72
|
+
unstyled,
|
|
73
|
+
className,
|
|
74
|
+
ref,
|
|
75
|
+
...props
|
|
76
|
+
}: ToolbarLinkProps & {
|
|
77
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
78
|
+
}): React.JSX.Element;
|
|
79
|
+
/**
|
|
80
|
+
* Groups toolbar items together.
|
|
81
|
+
*/
|
|
82
|
+
declare function ToolbarGroup({
|
|
83
|
+
className,
|
|
84
|
+
ref,
|
|
85
|
+
...props
|
|
86
|
+
}: ToolbarGroupProps & {
|
|
87
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
88
|
+
}): React.JSX.Element;
|
|
89
|
+
/**
|
|
90
|
+
* Visual separator between toolbar sections.
|
|
91
|
+
*/
|
|
92
|
+
declare function ToolbarSeparator({
|
|
93
|
+
className,
|
|
94
|
+
ref,
|
|
95
|
+
...props
|
|
96
|
+
}: ToolbarSeparatorProps & {
|
|
97
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
98
|
+
}): React.JSX.Element;
|
|
99
|
+
/**
|
|
100
|
+
* Input element within the toolbar.
|
|
101
|
+
*/
|
|
102
|
+
declare function ToolbarInput({
|
|
103
|
+
className,
|
|
104
|
+
ref,
|
|
105
|
+
...props
|
|
106
|
+
}: ToolbarInputProps & {
|
|
107
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
108
|
+
}): React.JSX.Element;
|
|
109
|
+
/**
|
|
110
|
+
* A container for grouping buttons and controls.
|
|
111
|
+
* Provides keyboard navigation between items.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```tsx
|
|
115
|
+
* // Text formatting toolbar
|
|
116
|
+
* <Toolbar.Root>
|
|
117
|
+
* <Toolbar.Group>
|
|
118
|
+
* <Toolbar.Button>Bold</Toolbar.Button>
|
|
119
|
+
* <Toolbar.Button>Italic</Toolbar.Button>
|
|
120
|
+
* <Toolbar.Button>Underline</Toolbar.Button>
|
|
121
|
+
* </Toolbar.Group>
|
|
122
|
+
* <Toolbar.Separator />
|
|
123
|
+
* <Toolbar.Group>
|
|
124
|
+
* <Toolbar.Button>Left</Toolbar.Button>
|
|
125
|
+
* <Toolbar.Button>Center</Toolbar.Button>
|
|
126
|
+
* <Toolbar.Button>Right</Toolbar.Button>
|
|
127
|
+
* </Toolbar.Group>
|
|
128
|
+
* </Toolbar.Root>
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```tsx
|
|
133
|
+
* // Vertical toolbar
|
|
134
|
+
* <Toolbar.Root orientation="vertical">
|
|
135
|
+
* <Toolbar.Button>Item 1</Toolbar.Button>
|
|
136
|
+
* <Toolbar.Button>Item 2</Toolbar.Button>
|
|
137
|
+
* <Toolbar.Button>Item 3</Toolbar.Button>
|
|
138
|
+
* </Toolbar.Root>
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar}
|
|
142
|
+
*/
|
|
143
|
+
declare const Toolbar: {
|
|
144
|
+
Root: typeof ToolbarRoot;
|
|
145
|
+
Button: typeof ToolbarButton;
|
|
146
|
+
Link: typeof ToolbarLink;
|
|
147
|
+
Group: typeof ToolbarGroup;
|
|
148
|
+
Separator: typeof ToolbarSeparator;
|
|
149
|
+
Input: typeof ToolbarInput;
|
|
150
|
+
};
|
|
151
|
+
//#endregion
|
|
2
152
|
export { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarInputProps, ToolbarLinkProps, ToolbarRootProps, ToolbarSeparatorProps };
|
|
@@ -1,2 +1,97 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarLinkProps } from "../foundations/Toolbar.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
|
|
5
|
+
//#region src/components/general-purpose/AppTopBar.d.ts
|
|
6
|
+
interface AppTopBarRootProps extends React.ComponentPropsWithoutRef<typeof Toolbar.Root> {
|
|
7
|
+
/** Accessible name describing the controls in this application bar. */
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
/**
|
|
10
|
+
* Where the title sits. An application bar centres it between the control
|
|
11
|
+
* groups; a panel header labels its leading edge instead.
|
|
12
|
+
*/
|
|
13
|
+
titleAlign?: "center" | "start";
|
|
14
|
+
}
|
|
15
|
+
interface AppTopBarGroupProps extends ToolbarGroupProps {}
|
|
16
|
+
interface AppTopBarTitleProps extends useRender.ComponentProps<"div"> {}
|
|
17
|
+
interface AppTopBarButtonProps extends Omit<ToolbarButtonProps, "aria-label"> {
|
|
18
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
19
|
+
/** Accessible name and default tooltip text for the icon-only control. */
|
|
20
|
+
label: string;
|
|
21
|
+
/** Tooltip text when it should differ from the accessible name. */
|
|
22
|
+
tooltip?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
interface AppTopBarLinkProps extends Omit<ToolbarLinkProps, "aria-label"> {
|
|
25
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
26
|
+
/** Accessible name and default tooltip text for the icon-only link. */
|
|
27
|
+
label: string;
|
|
28
|
+
/** Tooltip text when it should differ from the accessible name. */
|
|
29
|
+
tooltip?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
interface AppTopBarControlProps extends ToolbarButtonProps {
|
|
32
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Stable application-level toolbar with composable leading, title, and trailing
|
|
36
|
+
* slots. Descendant buttons share Base UI's roving focus and tooltip provider.
|
|
37
|
+
*/
|
|
38
|
+
declare function AppTopBarRoot({
|
|
39
|
+
children,
|
|
40
|
+
className,
|
|
41
|
+
titleAlign,
|
|
42
|
+
...props
|
|
43
|
+
}: AppTopBarRootProps): React.JSX.Element;
|
|
44
|
+
declare function AppTopBarLeading({
|
|
45
|
+
className,
|
|
46
|
+
...props
|
|
47
|
+
}: AppTopBarGroupProps): React.JSX.Element;
|
|
48
|
+
declare function AppTopBarTitle({
|
|
49
|
+
className,
|
|
50
|
+
render,
|
|
51
|
+
ref,
|
|
52
|
+
...props
|
|
53
|
+
}: AppTopBarTitleProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
54
|
+
declare function AppTopBarTrailing({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: AppTopBarGroupProps): React.JSX.Element;
|
|
58
|
+
declare function AppTopBarControl({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}: AppTopBarControlProps): React.JSX.Element;
|
|
62
|
+
declare function AppTopBarButton({
|
|
63
|
+
children,
|
|
64
|
+
className,
|
|
65
|
+
disabled,
|
|
66
|
+
label,
|
|
67
|
+
render,
|
|
68
|
+
tooltip,
|
|
69
|
+
...props
|
|
70
|
+
}: AppTopBarButtonProps): React.JSX.Element;
|
|
71
|
+
declare function AppTopBarLink({
|
|
72
|
+
children,
|
|
73
|
+
className,
|
|
74
|
+
label,
|
|
75
|
+
render,
|
|
76
|
+
tooltip,
|
|
77
|
+
...props
|
|
78
|
+
}: AppTopBarLinkProps): React.JSX.Element;
|
|
79
|
+
/**
|
|
80
|
+
* Composable application top bar with stable leading, title, and trailing
|
|
81
|
+
* slots. Icon controls use shared Toolbar roving focus and coordinated Tooltip
|
|
82
|
+
* behavior; their fixed slots do not resize when state icons change. Render an
|
|
83
|
+
* existing behavior-rich button through `Control` to retain those toolbar
|
|
84
|
+
* semantics without rebuilding the control. Use `Link` for navigation so an
|
|
85
|
+
* `href` or router-provided link keeps native link semantics.
|
|
86
|
+
*/
|
|
87
|
+
declare const AppTopBar: {
|
|
88
|
+
Root: typeof AppTopBarRoot;
|
|
89
|
+
Leading: typeof AppTopBarLeading;
|
|
90
|
+
Title: typeof AppTopBarTitle;
|
|
91
|
+
Trailing: typeof AppTopBarTrailing;
|
|
92
|
+
Control: typeof AppTopBarControl;
|
|
93
|
+
Button: typeof AppTopBarButton;
|
|
94
|
+
Link: typeof AppTopBarLink;
|
|
95
|
+
};
|
|
96
|
+
//#endregion
|
|
2
97
|
export { AppTopBar, AppTopBarButtonProps, AppTopBarControlProps, AppTopBarGroupProps, AppTopBarLinkProps, AppTopBarRootProps, AppTopBarTitleProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
3
2
|
import { Switch } from "../foundations/Switch.js";
|
|
3
|
+
import { ToggleGroup } from "../foundations/ToggleGroup.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/general-purpose/PricingBillingToggle.tsx
|
|
6
6
|
/** Controlled billing-period selector composed from the shared Switch or ToggleGroup. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
2
|
import { Separator } from "../foundations/Separator.js";
|
|
3
3
|
import { Card } from "../foundations/Card.js";
|
|
4
|
-
import { Slider } from "../foundations/Slider.js";
|
|
5
4
|
import { Progress } from "../foundations/Progress.js";
|
|
5
|
+
import { Slider } from "../foundations/Slider.js";
|
|
6
6
|
import { formatPricingUsage, getUsagePrice } from "./Pricing.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|