@mcp-b/react-components 0.1.1 → 0.1.2
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/Button-QCM8ZKgR.d.ts +98 -0
- package/dist/CodeBlock-CttHhWcb.js +356 -0
- package/dist/CodeBlock-V6pgafSS.d.ts +174 -0
- package/dist/Select-CRsKCJ9x.d.ts +200 -0
- package/dist/class-names-9UtZwb0J.js +12 -0
- package/dist/components/Accordion.d.ts +81 -0
- package/dist/components/Accordion.js +97 -0
- package/dist/components/AgentConnection.d.ts +69 -0
- package/dist/components/AgentConnection.js +176 -0
- package/dist/components/AlertDialog.d.ts +148 -0
- package/dist/components/AlertDialog.js +141 -0
- package/dist/components/Artifact.d.ts +128 -0
- package/dist/components/Artifact.js +115 -0
- package/dist/components/Autocomplete.d.ts +186 -0
- package/dist/components/Autocomplete.js +186 -0
- package/dist/components/Avatar.d.ts +134 -0
- package/dist/components/Avatar.js +118 -0
- package/dist/components/Badge.d.ts +68 -0
- package/dist/components/Badge.js +108 -0
- package/dist/components/Button.d.ts +2 -0
- package/dist/components/Button.js +73 -0
- package/dist/components/Card.d.ts +87 -0
- package/dist/components/Card.js +81 -0
- package/dist/components/ChainOfThought.d.ts +153 -0
- package/dist/components/ChainOfThought.js +157 -0
- package/dist/components/Checkbox.d.ts +35 -0
- package/dist/components/Checkbox.js +47 -0
- package/dist/components/CheckboxGroup.d.ts +76 -0
- package/dist/components/CheckboxGroup.js +69 -0
- package/dist/components/CodeBlock.d.ts +2 -0
- package/dist/components/CodeBlock.js +2 -0
- package/dist/components/Collapsible.d.ts +127 -0
- package/dist/components/Collapsible.js +103 -0
- package/dist/components/Combobox.d.ts +177 -0
- package/dist/components/Combobox.js +179 -0
- package/dist/components/Commit.d.ts +265 -0
- package/dist/components/Commit.js +282 -0
- package/dist/components/Context.d.ts +129 -0
- package/dist/components/Context.js +309 -0
- package/dist/components/ContextMenu.d.ts +282 -0
- package/dist/components/ContextMenu.js +270 -0
- package/dist/components/Conversation.d.ts +166 -0
- package/dist/components/Conversation.js +202 -0
- package/dist/components/Dialog.d.ts +120 -0
- package/dist/components/Dialog.js +114 -0
- package/dist/components/EnvironmentVariables.d.ts +176 -0
- package/dist/components/EnvironmentVariables.js +221 -0
- package/dist/components/Field.d.ts +281 -0
- package/dist/components/Field.js +274 -0
- package/dist/components/Fieldset.d.ts +93 -0
- package/dist/components/Fieldset.js +81 -0
- package/dist/components/FileTree.d.ts +116 -0
- package/dist/components/FileTree.js +310 -0
- package/dist/components/Form.d.ts +94 -0
- package/dist/components/Form.js +88 -0
- package/dist/components/GithubMotionMark.d.ts +13 -0
- package/dist/components/GithubMotionMark.js +23 -0
- package/dist/components/Input.d.ts +33 -0
- package/dist/components/Input.js +27 -0
- package/dist/components/Label.d.ts +44 -0
- package/dist/components/Label.js +41 -0
- package/dist/components/Menu.d.ts +395 -0
- package/dist/components/Menu.js +338 -0
- package/dist/components/Menubar.d.ts +331 -0
- package/dist/components/Menubar.js +299 -0
- package/dist/components/Message.d.ts +216 -0
- package/dist/components/Message.js +245 -0
- package/dist/components/Meter.d.ts +151 -0
- package/dist/components/Meter.js +121 -0
- package/dist/components/ModelSelector.d.ts +198 -0
- package/dist/components/ModelSelector.js +306 -0
- package/dist/components/NaniteScene.d.ts +33 -0
- package/dist/components/NaniteScene.js +405 -0
- package/dist/components/NavigationMenu.d.ts +256 -0
- package/dist/components/NavigationMenu.js +228 -0
- package/dist/components/NumberField.d.ts +159 -0
- package/dist/components/NumberField.js +123 -0
- package/dist/components/Popover.d.ts +278 -0
- package/dist/components/Popover.js +245 -0
- package/dist/components/PreviewCard.d.ts +156 -0
- package/dist/components/PreviewCard.js +156 -0
- package/dist/components/PricingPage.d.ts +209 -0
- package/dist/components/PricingPage.js +506 -0
- package/dist/components/Progress.d.ts +58 -0
- package/dist/components/Progress.js +51 -0
- package/dist/components/PromptInput.d.ts +399 -0
- package/dist/components/PromptInput.js +737 -0
- package/dist/components/Queue.d.ts +241 -0
- package/dist/components/Queue.js +225 -0
- package/dist/components/RadioGroup.d.ts +78 -0
- package/dist/components/RadioGroup.js +72 -0
- package/dist/components/Reasoning.d.ts +88 -0
- package/dist/components/Reasoning.js +187 -0
- package/dist/components/ScrollArea.d.ts +160 -0
- package/dist/components/ScrollArea.js +145 -0
- package/dist/components/Select.d.ts +2 -0
- package/dist/components/Select.js +260 -0
- package/dist/components/Separator.d.ts +45 -0
- package/dist/components/Separator.js +40 -0
- package/dist/components/Shell.d.ts +163 -0
- package/dist/components/Shell.js +137 -0
- package/dist/components/Slider.d.ts +120 -0
- package/dist/components/Slider.js +115 -0
- package/dist/components/Sources.d.ts +91 -0
- package/dist/components/Sources.js +121 -0
- package/dist/components/Stepper.d.ts +190 -0
- package/dist/components/Stepper.js +315 -0
- package/dist/components/Switch.d.ts +57 -0
- package/dist/components/Switch.js +55 -0
- package/dist/components/Tabs.d.ts +84 -0
- package/dist/components/Tabs.js +78 -0
- package/dist/components/Task.d.ts +100 -0
- package/dist/components/Task.js +120 -0
- package/dist/components/Terminal.d.ts +118 -0
- package/dist/components/Terminal.js +234 -0
- package/dist/components/TestResults.d.ts +236 -0
- package/dist/components/TestResults.js +346 -0
- package/dist/components/Toast.d.ts +192 -0
- package/dist/components/Toast.js +163 -0
- package/dist/components/Toggle.d.ts +69 -0
- package/dist/components/Toggle.js +66 -0
- package/dist/components/ToggleGroup.d.ts +69 -0
- package/dist/components/ToggleGroup.js +99 -0
- package/dist/components/Tool.d.ts +119 -0
- package/dist/components/Tool.js +192 -0
- package/dist/components/Toolbar.d.ts +162 -0
- package/dist/components/Toolbar.js +126 -0
- package/dist/components/Tooltip.d.ts +81 -0
- package/dist/components/Tooltip.js +74 -0
- package/dist/components/WebPreview.d.ts +143 -0
- package/dist/components/WebPreview.js +280 -0
- package/dist/components/useStickToBottom.d.ts +30 -0
- package/dist/components/useStickToBottom.js +95 -0
- package/dist/copy-button-BIATcZWZ.d.ts +16 -0
- package/dist/copy-button-BNgclDrO.js +43 -0
- package/dist/icons-BsWc8g4E.js +221 -0
- package/dist/styles/accordion.css +10 -10
- package/dist/styles/agent-connection.css +18 -17
- package/dist/styles/alert-dialog.css +48 -29
- package/dist/styles/artifact.css +10 -10
- package/dist/styles/autocomplete.css +25 -24
- package/dist/styles/avatar.css +96 -6
- package/dist/styles/badge.css +78 -14
- package/dist/styles/base.css +9 -9
- package/dist/styles/button.css +57 -38
- package/dist/styles/card.css +57 -10
- package/dist/styles/chain-of-thought.css +47 -33
- package/dist/styles/checkbox.css +24 -10
- package/dist/styles/code-block.css +22 -15
- package/dist/styles/collapsible.css +14 -12
- package/dist/styles/combobox.css +26 -25
- package/dist/styles/commit.css +49 -24
- package/dist/styles/context-menu.css +70 -16
- package/dist/styles/context.css +15 -15
- package/dist/styles/conversation.css +12 -12
- package/dist/styles/dialog.css +52 -16
- package/dist/styles/environment-variables.css +19 -19
- package/dist/styles/field.css +184 -22
- package/dist/styles/fieldset.css +5 -4
- package/dist/styles/file-tree.css +17 -17
- package/dist/styles/index.css.d.ts +1 -0
- package/dist/styles/input.css +45 -11
- package/dist/styles/label.css +21 -4
- package/dist/styles/menu.css +55 -32
- package/dist/styles/menubar.css +80 -28
- package/dist/styles/message.css +22 -13
- package/dist/styles/meter.css +8 -8
- package/dist/styles/model-selector.css +33 -21
- package/dist/styles/navigation-menu.css +26 -24
- package/dist/styles/number-field.css +20 -18
- package/dist/styles/popover.css +38 -28
- package/dist/styles/preview-card.css +15 -13
- package/dist/styles/pricing-page.css +53 -53
- package/dist/styles/progress.css +7 -7
- package/dist/styles/prompt-input.css +73 -24
- package/dist/styles/queue.css +58 -32
- package/dist/styles/radio.css +26 -11
- package/dist/styles/reasoning.css +15 -11
- package/dist/styles/scroll-area.css +6 -6
- package/dist/styles/scrollbars.css +4 -4
- package/dist/styles/select.css +84 -25
- package/dist/styles/separator.css +1 -1
- package/dist/styles/shell.css +21 -20
- package/dist/styles/slider.css +35 -11
- package/dist/styles/sources.css +20 -20
- package/dist/styles/stepper.css +22 -22
- package/dist/styles/switch.css +29 -13
- package/dist/styles/tabs.css +23 -16
- package/dist/styles/task.css +27 -23
- package/dist/styles/terminal.css +16 -13
- package/dist/styles/test-results.css +79 -32
- package/dist/styles/toast.css +26 -25
- package/dist/styles/toggle-group.css +12 -12
- package/dist/styles/toggle.css +29 -11
- package/dist/styles/tool.css +54 -32
- package/dist/styles/toolbar.css +30 -28
- package/dist/styles/tooltip.css +10 -8
- package/dist/styles/web-preview.css +37 -21
- package/dist/utils/structured-code.d.ts +10 -0
- package/dist/utils/structured-code.js +81 -0
- package/package.json +16 -7
- package/dist/index.d.ts +0 -7236
- package/dist/index.js +0 -8945
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { n as ArrowLeftIcon, r as ArrowRightIcon, s as ChevronDownIcon, x as RefreshIcon } from "../icons-BsWc8g4E.js";
|
|
2
|
+
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
3
|
+
import { Button } from "./Button.js";
|
|
4
|
+
import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./Tooltip.js";
|
|
5
|
+
import { Badge } from "./Badge.js";
|
|
6
|
+
import { Input } from "./Input.js";
|
|
7
|
+
import { ScrollArea } from "./ScrollArea.js";
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/WebPreview.tsx
|
|
11
|
+
const WebPreviewContext = React.createContext(null);
|
|
12
|
+
function useWebPreviewContext() {
|
|
13
|
+
const ctx = React.useContext(WebPreviewContext);
|
|
14
|
+
if (!ctx) throw new Error("WebPreview subcomponents must be used inside <WebPreview>.");
|
|
15
|
+
return ctx;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* An iframe preview with a navigation bar, URL input, and optional console
|
|
19
|
+
* panel. Tracks browsing history internally so back/forward buttons work
|
|
20
|
+
* without depending on the iframe's own history.
|
|
21
|
+
*
|
|
22
|
+
* Built internally for agent/browser preview surfaces. Use it to display a
|
|
23
|
+
* known URL with local navigation controls. Do not use it for trusted app
|
|
24
|
+
* embedding that needs custom iframe permissions; add those explicitly here.
|
|
25
|
+
*
|
|
26
|
+
* Sigvelo changes: composes Button, Input, ScrollArea, Tooltip, and Badge;
|
|
27
|
+
* keeps a conservative sandbox; maps navigation and console UI to Sigvelo CSS
|
|
28
|
+
* tokens.
|
|
29
|
+
*
|
|
30
|
+
* The iframe has a fixed title and sandbox. Navigation buttons provide
|
|
31
|
+
* accessible labels and tooltips. Add new permissions or console behaviors
|
|
32
|
+
* here when multiple apps need them.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <WebPreview defaultUrl="https://example.com">
|
|
37
|
+
* <WebPreviewNavigation>
|
|
38
|
+
* <WebPreviewNavigationButton action="back" />
|
|
39
|
+
* <WebPreviewNavigationButton action="forward" />
|
|
40
|
+
* <WebPreviewNavigationButton action="reload" />
|
|
41
|
+
* <WebPreviewUrl />
|
|
42
|
+
* </WebPreviewNavigation>
|
|
43
|
+
* <WebPreviewBody />
|
|
44
|
+
* <WebPreviewConsole logs={logs} />
|
|
45
|
+
* </WebPreview>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
function WebPreview({ className, defaultUrl = "", url: controlledUrl, onUrlChange, children, ref, ...props }) {
|
|
49
|
+
const initialUrl = controlledUrl ?? defaultUrl;
|
|
50
|
+
const [history, setHistory] = React.useState(() => initialUrl ? [initialUrl] : []);
|
|
51
|
+
const [index, setIndex] = React.useState(initialUrl ? 0 : -1);
|
|
52
|
+
const [reloadToken, setReloadToken] = React.useState(0);
|
|
53
|
+
const [consoleOpen, setConsoleOpen] = React.useState(false);
|
|
54
|
+
const url = index >= 0 ? history[index] ?? "" : "";
|
|
55
|
+
const onUrlChangeRef = React.useRef(onUrlChange);
|
|
56
|
+
onUrlChangeRef.current = onUrlChange;
|
|
57
|
+
const historyRef = React.useRef(history);
|
|
58
|
+
historyRef.current = history;
|
|
59
|
+
const indexRef = React.useRef(index);
|
|
60
|
+
indexRef.current = index;
|
|
61
|
+
const prevControlledUrlRef = React.useRef(controlledUrl);
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
if (controlledUrl === void 0) return;
|
|
64
|
+
if (controlledUrl === prevControlledUrlRef.current) return;
|
|
65
|
+
prevControlledUrlRef.current = controlledUrl;
|
|
66
|
+
if (!controlledUrl) {
|
|
67
|
+
setHistory([]);
|
|
68
|
+
setIndex(-1);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const currentHistory = historyRef.current;
|
|
72
|
+
const currentIndex = indexRef.current;
|
|
73
|
+
if (currentIndex >= 0 && currentHistory[currentIndex] === controlledUrl) return;
|
|
74
|
+
setHistory([...currentHistory.slice(0, currentIndex + 1), controlledUrl]);
|
|
75
|
+
setIndex(currentIndex + 1);
|
|
76
|
+
}, [controlledUrl]);
|
|
77
|
+
const setUrl = React.useCallback((next) => {
|
|
78
|
+
setHistory((prev) => [...prev.slice(0, index + 1), next]);
|
|
79
|
+
setIndex((prev) => prev + 1);
|
|
80
|
+
onUrlChangeRef.current?.(next);
|
|
81
|
+
}, [index]);
|
|
82
|
+
const goBack = React.useCallback(() => {
|
|
83
|
+
setIndex((prev) => Math.max(0, prev - 1));
|
|
84
|
+
}, []);
|
|
85
|
+
const goForward = React.useCallback(() => {
|
|
86
|
+
setIndex((prev) => Math.min(history.length - 1, prev + 1));
|
|
87
|
+
}, [history.length]);
|
|
88
|
+
const reload = React.useCallback(() => {
|
|
89
|
+
setReloadToken((n) => n + 1);
|
|
90
|
+
}, []);
|
|
91
|
+
const prevIndexRef = React.useRef(index);
|
|
92
|
+
React.useEffect(() => {
|
|
93
|
+
if (index === prevIndexRef.current) return;
|
|
94
|
+
prevIndexRef.current = index;
|
|
95
|
+
if (index >= 0) onUrlChangeRef.current?.(history[index] ?? "");
|
|
96
|
+
}, [index, history]);
|
|
97
|
+
const ctxValue = React.useMemo(() => ({
|
|
98
|
+
url,
|
|
99
|
+
setUrl,
|
|
100
|
+
consoleOpen,
|
|
101
|
+
setConsoleOpen,
|
|
102
|
+
canGoBack: index > 0,
|
|
103
|
+
canGoForward: index >= 0 && index < history.length - 1,
|
|
104
|
+
goBack,
|
|
105
|
+
goForward,
|
|
106
|
+
reload,
|
|
107
|
+
reloadToken
|
|
108
|
+
}), [
|
|
109
|
+
url,
|
|
110
|
+
setUrl,
|
|
111
|
+
consoleOpen,
|
|
112
|
+
index,
|
|
113
|
+
history.length,
|
|
114
|
+
goBack,
|
|
115
|
+
goForward,
|
|
116
|
+
reload,
|
|
117
|
+
reloadToken
|
|
118
|
+
]);
|
|
119
|
+
return /* @__PURE__ */ jsx(WebPreviewContext.Provider, {
|
|
120
|
+
value: ctxValue,
|
|
121
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
122
|
+
ref,
|
|
123
|
+
className: cx("web-preview", className),
|
|
124
|
+
...props,
|
|
125
|
+
children
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function WebPreviewNavigation({ className, children, ref, ...props }) {
|
|
130
|
+
return /* @__PURE__ */ jsx("div", {
|
|
131
|
+
ref,
|
|
132
|
+
className: cx("web-preview__nav", className),
|
|
133
|
+
...props,
|
|
134
|
+
children
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function WebPreviewNavigationButton({ className, action, label, tooltip, children, onClick, ...props }) {
|
|
138
|
+
const { canGoBack, canGoForward, goBack, goForward, reload } = useWebPreviewContext();
|
|
139
|
+
const def = action ? {
|
|
140
|
+
back: {
|
|
141
|
+
label: "Back",
|
|
142
|
+
icon: /* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
143
|
+
disabled: !canGoBack,
|
|
144
|
+
onAction: goBack
|
|
145
|
+
},
|
|
146
|
+
forward: {
|
|
147
|
+
label: "Forward",
|
|
148
|
+
icon: /* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
149
|
+
disabled: !canGoForward,
|
|
150
|
+
onAction: goForward
|
|
151
|
+
},
|
|
152
|
+
reload: {
|
|
153
|
+
label: "Reload",
|
|
154
|
+
icon: /* @__PURE__ */ jsx(RefreshIcon, {}),
|
|
155
|
+
disabled: false,
|
|
156
|
+
onAction: reload
|
|
157
|
+
}
|
|
158
|
+
}[action] : null;
|
|
159
|
+
const resolvedLabel = label ?? tooltip ?? def?.label;
|
|
160
|
+
const handleClick = (e) => {
|
|
161
|
+
def?.onAction();
|
|
162
|
+
onClick?.(e);
|
|
163
|
+
};
|
|
164
|
+
const button = /* @__PURE__ */ jsx(Button, {
|
|
165
|
+
variant: "ghost",
|
|
166
|
+
size: "icon",
|
|
167
|
+
"aria-label": resolvedLabel,
|
|
168
|
+
disabled: def?.disabled,
|
|
169
|
+
className: cx("web-preview__nav-button", action && `web-preview__nav-button--${action}`, className),
|
|
170
|
+
...props,
|
|
171
|
+
onClick: handleClick,
|
|
172
|
+
children: children ?? def?.icon
|
|
173
|
+
});
|
|
174
|
+
if (!resolvedLabel) return button;
|
|
175
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: button }), /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, { children: /* @__PURE__ */ jsx(TooltipPopup, { children: resolvedLabel }) }) })] });
|
|
176
|
+
}
|
|
177
|
+
function WebPreviewUrl({ className, placeholder = "Enter URL…", value, onChange, onKeyDown, ref, ...props }) {
|
|
178
|
+
const { url, setUrl } = useWebPreviewContext();
|
|
179
|
+
const [draft, setDraft] = React.useState(url);
|
|
180
|
+
const inputValue = value ?? draft;
|
|
181
|
+
React.useEffect(() => {
|
|
182
|
+
setDraft(url);
|
|
183
|
+
}, [url]);
|
|
184
|
+
return /* @__PURE__ */ jsx("form", {
|
|
185
|
+
className: "web-preview__url-form",
|
|
186
|
+
onSubmit: (e) => {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
const next = Array.isArray(inputValue) ? inputValue[0] : String(inputValue ?? "");
|
|
189
|
+
if (next) setUrl(next);
|
|
190
|
+
},
|
|
191
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
192
|
+
ref,
|
|
193
|
+
type: "text",
|
|
194
|
+
value: inputValue,
|
|
195
|
+
onChange: (e) => {
|
|
196
|
+
setDraft(e.target.value);
|
|
197
|
+
onChange?.(e);
|
|
198
|
+
},
|
|
199
|
+
onKeyDown: (e) => {
|
|
200
|
+
onKeyDown?.(e);
|
|
201
|
+
if (!e.defaultPrevented && e.key === "Enter") setUrl(e.currentTarget.value);
|
|
202
|
+
},
|
|
203
|
+
placeholder,
|
|
204
|
+
className: cx("web-preview__url", className),
|
|
205
|
+
...props
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function WebPreviewBody({ className, loading, src, ref, interactive = true, ...props }) {
|
|
210
|
+
const { url, reloadToken } = useWebPreviewContext();
|
|
211
|
+
const effectiveSrc = src ?? url;
|
|
212
|
+
const iframeSrc = effectiveSrc ? `${effectiveSrc}${reloadToken ? `#reload-${reloadToken}` : ""}` : void 0;
|
|
213
|
+
if (!iframeSrc) return /* @__PURE__ */ jsx("div", {
|
|
214
|
+
className: cx("web-preview__body", "web-preview__body--empty", className),
|
|
215
|
+
children: loading ?? "Enter a URL above to preview a site."
|
|
216
|
+
});
|
|
217
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("iframe", {
|
|
218
|
+
ref,
|
|
219
|
+
src: iframeSrc,
|
|
220
|
+
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-presentation",
|
|
221
|
+
title: "Web preview",
|
|
222
|
+
className: cx("web-preview__body", !interactive && "web-preview__body--readonly", className),
|
|
223
|
+
...props
|
|
224
|
+
}, iframeSrc), loading] });
|
|
225
|
+
}
|
|
226
|
+
const LEVEL_COLOR = {
|
|
227
|
+
log: "neutral",
|
|
228
|
+
info: "primary",
|
|
229
|
+
warn: "warning",
|
|
230
|
+
error: "destructive"
|
|
231
|
+
};
|
|
232
|
+
function WebPreviewConsole({ className, logs = [], children, ref, ...props }) {
|
|
233
|
+
const { consoleOpen, setConsoleOpen } = useWebPreviewContext();
|
|
234
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
235
|
+
ref,
|
|
236
|
+
className: cx("web-preview__console", className),
|
|
237
|
+
...props,
|
|
238
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
239
|
+
type: "button",
|
|
240
|
+
className: "web-preview__console-header",
|
|
241
|
+
"aria-expanded": consoleOpen,
|
|
242
|
+
onClick: () => setConsoleOpen(!consoleOpen),
|
|
243
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Console" }), /* @__PURE__ */ jsx(ChevronDownIcon, { "aria-hidden": "true" })]
|
|
244
|
+
}), consoleOpen ? /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
245
|
+
className: "web-preview__console-scroll",
|
|
246
|
+
children: [/* @__PURE__ */ jsxs(ScrollArea.Viewport, {
|
|
247
|
+
className: "web-preview__console-viewport",
|
|
248
|
+
children: [/* @__PURE__ */ jsx("ul", {
|
|
249
|
+
className: "web-preview__console-list",
|
|
250
|
+
children: logs.length === 0 ? /* @__PURE__ */ jsx("li", {
|
|
251
|
+
className: "web-preview__console-empty",
|
|
252
|
+
children: "No console output"
|
|
253
|
+
}) : logs.map((log, i) => /* @__PURE__ */ jsxs("li", {
|
|
254
|
+
className: cx("web-preview__console-item", `web-preview__console-item--${log.level}`),
|
|
255
|
+
children: [
|
|
256
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
257
|
+
color: LEVEL_COLOR[log.level],
|
|
258
|
+
size: "sm",
|
|
259
|
+
children: log.level
|
|
260
|
+
}),
|
|
261
|
+
/* @__PURE__ */ jsx("span", {
|
|
262
|
+
className: "web-preview__console-message",
|
|
263
|
+
children: log.message
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ jsx("span", {
|
|
266
|
+
className: "web-preview__console-time",
|
|
267
|
+
children: log.timestamp.toLocaleTimeString()
|
|
268
|
+
})
|
|
269
|
+
]
|
|
270
|
+
}, i))
|
|
271
|
+
}), children]
|
|
272
|
+
}), /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
273
|
+
orientation: "vertical",
|
|
274
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {})
|
|
275
|
+
})]
|
|
276
|
+
}) : null]
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
//#endregion
|
|
280
|
+
export { WebPreview, WebPreviewBody, WebPreviewConsole, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/components/useStickToBottom.d.ts
|
|
2
|
+
interface UseStickToBottomOptions {
|
|
3
|
+
/**
|
|
4
|
+
* How close to the bottom (in pixels) still counts as "at bottom" for the
|
|
5
|
+
* sticky behavior. Larger values keep the viewport pinned through small
|
|
6
|
+
* scroll jitter.
|
|
7
|
+
*/
|
|
8
|
+
slackPx?: number;
|
|
9
|
+
}
|
|
10
|
+
interface UseStickToBottomResult {
|
|
11
|
+
/** Attach to the scrolling element. */
|
|
12
|
+
viewportRef: (element: HTMLElement | null) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Attach to the element whose size determines whether the viewport
|
|
15
|
+
* overflows. Typically the immediate child of the viewport.
|
|
16
|
+
*/
|
|
17
|
+
contentRef: (element: HTMLElement | null) => void;
|
|
18
|
+
/** True while the viewport is pinned within `slackPx` of the bottom. */
|
|
19
|
+
isAtBottom: boolean;
|
|
20
|
+
/** Imperatively scroll the viewport to its bottom. */
|
|
21
|
+
scrollToBottom: (behavior?: ScrollBehavior) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pin a scrollable viewport to the bottom as its content grows, unless the
|
|
25
|
+
* user has scrolled up. Used by the conversation log and the workspace code
|
|
26
|
+
* inspector to keep streaming output in view without fighting user intent.
|
|
27
|
+
*/
|
|
28
|
+
declare function useStickToBottom(options?: UseStickToBottomOptions): UseStickToBottomResult;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { UseStickToBottomOptions, UseStickToBottomResult, useStickToBottom };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/components/useStickToBottom.ts
|
|
3
|
+
const DEFAULT_STICK_SLACK_PX = 160;
|
|
4
|
+
/**
|
|
5
|
+
* Pin a scrollable viewport to the bottom as its content grows, unless the
|
|
6
|
+
* user has scrolled up. Used by the conversation log and the workspace code
|
|
7
|
+
* inspector to keep streaming output in view without fighting user intent.
|
|
8
|
+
*/
|
|
9
|
+
function useStickToBottom(options = {}) {
|
|
10
|
+
const slackPx = options.slackPx ?? DEFAULT_STICK_SLACK_PX;
|
|
11
|
+
const viewportElementRef = React.useRef(null);
|
|
12
|
+
const contentElementRef = React.useRef(null);
|
|
13
|
+
const [viewportElement, setViewportElement] = React.useState(null);
|
|
14
|
+
const [contentElement, setContentElement] = React.useState(null);
|
|
15
|
+
const [isAtBottom, setIsAtBottom] = React.useState(true);
|
|
16
|
+
const isAtBottomRef = React.useRef(true);
|
|
17
|
+
const didInitialScrollRef = React.useRef(false);
|
|
18
|
+
const viewportRef = React.useCallback((element) => {
|
|
19
|
+
viewportElementRef.current = element;
|
|
20
|
+
setViewportElement((prev) => prev === element ? prev : element);
|
|
21
|
+
}, []);
|
|
22
|
+
const contentRef = React.useCallback((element) => {
|
|
23
|
+
contentElementRef.current = element;
|
|
24
|
+
setContentElement((prev) => prev === element ? prev : element);
|
|
25
|
+
}, []);
|
|
26
|
+
React.useLayoutEffect(() => {
|
|
27
|
+
const el = viewportElement;
|
|
28
|
+
const observed = contentElement ?? el?.firstElementChild;
|
|
29
|
+
if (!el || !observed) return;
|
|
30
|
+
if (!didInitialScrollRef.current) {
|
|
31
|
+
el.scrollTo({
|
|
32
|
+
top: el.scrollHeight,
|
|
33
|
+
behavior: "auto"
|
|
34
|
+
});
|
|
35
|
+
didInitialScrollRef.current = true;
|
|
36
|
+
}
|
|
37
|
+
const readIsAtBottom = () => el.scrollHeight - el.scrollTop - el.clientHeight < slackPx;
|
|
38
|
+
const updateIsAtBottom = () => {
|
|
39
|
+
const next = readIsAtBottom();
|
|
40
|
+
if (isAtBottomRef.current === next) return;
|
|
41
|
+
isAtBottomRef.current = next;
|
|
42
|
+
setIsAtBottom(next);
|
|
43
|
+
};
|
|
44
|
+
let resizeFrameId = null;
|
|
45
|
+
const flushResize = () => {
|
|
46
|
+
resizeFrameId = null;
|
|
47
|
+
if (!isAtBottomRef.current) {
|
|
48
|
+
updateIsAtBottom();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
el.scrollTo({
|
|
52
|
+
top: el.scrollHeight,
|
|
53
|
+
behavior: "auto"
|
|
54
|
+
});
|
|
55
|
+
updateIsAtBottom();
|
|
56
|
+
};
|
|
57
|
+
const scheduleResize = () => {
|
|
58
|
+
if (resizeFrameId !== null) return;
|
|
59
|
+
resizeFrameId = window.requestAnimationFrame(flushResize);
|
|
60
|
+
};
|
|
61
|
+
const handleScroll = () => {
|
|
62
|
+
updateIsAtBottom();
|
|
63
|
+
};
|
|
64
|
+
handleScroll();
|
|
65
|
+
el.addEventListener("scroll", handleScroll, { passive: true });
|
|
66
|
+
const observer = new ResizeObserver(() => {
|
|
67
|
+
scheduleResize();
|
|
68
|
+
});
|
|
69
|
+
observer.observe(observed);
|
|
70
|
+
return () => {
|
|
71
|
+
if (resizeFrameId !== null) window.cancelAnimationFrame(resizeFrameId);
|
|
72
|
+
el.removeEventListener("scroll", handleScroll);
|
|
73
|
+
observer.disconnect();
|
|
74
|
+
};
|
|
75
|
+
}, [
|
|
76
|
+
contentElement,
|
|
77
|
+
viewportElement,
|
|
78
|
+
slackPx
|
|
79
|
+
]);
|
|
80
|
+
return {
|
|
81
|
+
viewportRef,
|
|
82
|
+
contentRef,
|
|
83
|
+
isAtBottom,
|
|
84
|
+
scrollToBottom: React.useCallback((behavior = "smooth") => {
|
|
85
|
+
const el = viewportElementRef.current;
|
|
86
|
+
if (!el) return;
|
|
87
|
+
el.scrollTo({
|
|
88
|
+
top: el.scrollHeight,
|
|
89
|
+
behavior
|
|
90
|
+
});
|
|
91
|
+
}, [])
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { useStickToBottom };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { r as ButtonProps } from "./Button-QCM8ZKgR.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/_internal/copy-button.d.ts
|
|
5
|
+
interface CopyButtonProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color" | "className" | "onClick" | "onError"> {
|
|
6
|
+
className?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
text: string;
|
|
9
|
+
timeout?: number;
|
|
10
|
+
stopPropagation?: boolean;
|
|
11
|
+
onCopy?: () => void;
|
|
12
|
+
onError?: (error: Error) => void;
|
|
13
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { CopyButtonProps as t };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { l as CopyIcon, o as CheckIcon } from "./icons-BsWc8g4E.js";
|
|
2
|
+
import { Button } from "./components/Button.js";
|
|
3
|
+
import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./components/Tooltip.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/_internal/copy-button.tsx
|
|
7
|
+
function CopyButton({ label, text, timeout = 1500, stopPropagation = false, onCopy, onError, onClick, ...props }) {
|
|
8
|
+
const [copied, setCopied] = React.useState(false);
|
|
9
|
+
const timeoutRef = React.useRef(null);
|
|
10
|
+
React.useEffect(() => () => {
|
|
11
|
+
if (timeoutRef.current !== null) window.clearTimeout(timeoutRef.current);
|
|
12
|
+
}, []);
|
|
13
|
+
const handleClick = React.useCallback(async (event) => {
|
|
14
|
+
if (stopPropagation) event.stopPropagation();
|
|
15
|
+
try {
|
|
16
|
+
await navigator.clipboard.writeText(text);
|
|
17
|
+
setCopied(true);
|
|
18
|
+
onCopy?.();
|
|
19
|
+
if (timeoutRef.current !== null) window.clearTimeout(timeoutRef.current);
|
|
20
|
+
timeoutRef.current = window.setTimeout(() => setCopied(false), timeout);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
onError?.(error);
|
|
23
|
+
}
|
|
24
|
+
onClick?.(event);
|
|
25
|
+
}, [
|
|
26
|
+
onClick,
|
|
27
|
+
onCopy,
|
|
28
|
+
onError,
|
|
29
|
+
stopPropagation,
|
|
30
|
+
text,
|
|
31
|
+
timeout
|
|
32
|
+
]);
|
|
33
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
size: "icon",
|
|
36
|
+
"aria-label": label,
|
|
37
|
+
...props,
|
|
38
|
+
onClick: handleClick,
|
|
39
|
+
children: copied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyIcon, {})
|
|
40
|
+
}) }), /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, { children: /* @__PURE__ */ jsx(TooltipPopup, { children: copied ? "Copied" : label }) }) })] });
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { CopyButton as t };
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/_internal/icons.tsx
|
|
4
|
+
function Icon({ children, size = 16, strokeWidth = 1.75, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
6
|
+
width: size,
|
|
7
|
+
height: size,
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
fill: "none",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
strokeWidth,
|
|
12
|
+
strokeLinecap: "round",
|
|
13
|
+
strokeLinejoin: "round",
|
|
14
|
+
"aria-hidden": "true",
|
|
15
|
+
focusable: "false",
|
|
16
|
+
...props,
|
|
17
|
+
children
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const ChevronRightIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
21
|
+
...props,
|
|
22
|
+
children: /* @__PURE__ */ jsx("path", { d: "M6 3.5L10.5 8L6 12.5" })
|
|
23
|
+
});
|
|
24
|
+
const ChevronDownIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
25
|
+
...props,
|
|
26
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3.5 6L8 10.5L12.5 6" })
|
|
27
|
+
});
|
|
28
|
+
const BrainIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
29
|
+
viewBox: "0 0 24 24",
|
|
30
|
+
...props,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx("path", { d: "M12 18V5" }),
|
|
33
|
+
/* @__PURE__ */ jsx("path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4" }),
|
|
34
|
+
/* @__PURE__ */ jsx("path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }),
|
|
35
|
+
/* @__PURE__ */ jsx("path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77" }),
|
|
36
|
+
/* @__PURE__ */ jsx("path", { d: "M18 18a4 4 0 0 0 2-7.464" }),
|
|
37
|
+
/* @__PURE__ */ jsx("path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }),
|
|
38
|
+
/* @__PURE__ */ jsx("path", { d: "M6 18a4 4 0 0 1-2-7.464" }),
|
|
39
|
+
/* @__PURE__ */ jsx("path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77" })
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
const CheckIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
43
|
+
...props,
|
|
44
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 8.5L6.5 12L13 4.5" })
|
|
45
|
+
});
|
|
46
|
+
const XIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
47
|
+
...props,
|
|
48
|
+
children: /* @__PURE__ */ jsx("path", { d: "M4 4L12 12M12 4L4 12" })
|
|
49
|
+
});
|
|
50
|
+
const CopyIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
51
|
+
...props,
|
|
52
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
53
|
+
x: "5",
|
|
54
|
+
y: "5",
|
|
55
|
+
width: "8",
|
|
56
|
+
height: "8",
|
|
57
|
+
rx: "1.5"
|
|
58
|
+
}), /* @__PURE__ */ jsx("path", { d: "M11 5V4a1.5 1.5 0 0 0-1.5-1.5h-5A1.5 1.5 0 0 0 3 4v5A1.5 1.5 0 0 0 4.5 10.5H5" })]
|
|
59
|
+
});
|
|
60
|
+
const EyeIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
61
|
+
...props,
|
|
62
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M1.5 8S4 3 8 3s6.5 5 6.5 5-2.5 5-6.5 5S1.5 8 1.5 8Z" }), /* @__PURE__ */ jsx("circle", {
|
|
63
|
+
cx: "8",
|
|
64
|
+
cy: "8",
|
|
65
|
+
r: "2"
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
const EyeOffIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
69
|
+
...props,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx("path", { d: "M2 2l12 12" }),
|
|
72
|
+
/* @__PURE__ */ jsx("path", { d: "M6.5 4A7.5 7.5 0 0 1 8 3.75c4 0 6.5 5 6.5 5a13 13 0 0 1-1.75 2.5" }),
|
|
73
|
+
/* @__PURE__ */ jsx("path", { d: "M9.85 10.08A2 2 0 0 1 6.08 6.15" }),
|
|
74
|
+
/* @__PURE__ */ jsx("path", { d: "M4.5 5.5C2.5 7 1.5 8 1.5 8s2.5 5 6.5 5c.8 0 1.55-.15 2.25-.42" })
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
const FolderIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
78
|
+
...props,
|
|
79
|
+
children: /* @__PURE__ */ jsx("path", { d: "M1.5 4A1.5 1.5 0 0 1 3 2.5h3l1.5 1.5H13A1.5 1.5 0 0 1 14.5 5.5v6A1.5 1.5 0 0 1 13 13H3a1.5 1.5 0 0 1-1.5-1.5V4Z" })
|
|
80
|
+
});
|
|
81
|
+
const FolderOpenIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
82
|
+
...props,
|
|
83
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M1.5 11.5v-7A1.5 1.5 0 0 1 3 3h3l1.5 1.5H13A1.5 1.5 0 0 1 14.5 6v1" }), /* @__PURE__ */ jsx("path", { d: "M1.5 11.5 3.5 7H15l-2 4.5H1.5Z" })]
|
|
84
|
+
});
|
|
85
|
+
const FileIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
86
|
+
...props,
|
|
87
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M9 1.5H4A1.5 1.5 0 0 0 2.5 3v10A1.5 1.5 0 0 0 4 14.5h8A1.5 1.5 0 0 0 13.5 13V6L9 1.5Z" }), /* @__PURE__ */ jsx("path", { d: "M9 1.5V6h4.5" })]
|
|
88
|
+
});
|
|
89
|
+
const PlusIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
90
|
+
...props,
|
|
91
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 3v10M3 8h10" })
|
|
92
|
+
});
|
|
93
|
+
const SquareIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
94
|
+
...props,
|
|
95
|
+
children: /* @__PURE__ */ jsx("rect", {
|
|
96
|
+
x: "3.5",
|
|
97
|
+
y: "3.5",
|
|
98
|
+
width: "9",
|
|
99
|
+
height: "9",
|
|
100
|
+
rx: "1"
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
const ArrowLeftIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
104
|
+
...props,
|
|
105
|
+
children: /* @__PURE__ */ jsx("path", { d: "M13 8H3M7 4L3 8l4 4" })
|
|
106
|
+
});
|
|
107
|
+
const ArrowRightIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
108
|
+
...props,
|
|
109
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 8h10M9 4l4 4-4 4" })
|
|
110
|
+
});
|
|
111
|
+
const ArrowDownIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
112
|
+
...props,
|
|
113
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 3v10M4 9l4 4 4-4" })
|
|
114
|
+
});
|
|
115
|
+
const ArrowUpIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
116
|
+
...props,
|
|
117
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M4 7l4-4 4 4" })
|
|
118
|
+
});
|
|
119
|
+
const DownloadIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
120
|
+
...props,
|
|
121
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M8 2v8M4 7l4 4 4-4" }), /* @__PURE__ */ jsx("path", { d: "M2.5 13.5h11" })]
|
|
122
|
+
});
|
|
123
|
+
const RefreshIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
124
|
+
...props,
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx("path", { d: "M13.5 3v3h-3" }),
|
|
127
|
+
/* @__PURE__ */ jsx("path", { d: "M2.5 13v-3h3" }),
|
|
128
|
+
/* @__PURE__ */ jsx("path", { d: "M3.5 7a5 5 0 0 1 8.5-2L13.5 6" }),
|
|
129
|
+
/* @__PURE__ */ jsx("path", { d: "M12.5 9a5 5 0 0 1-8.5 2L2.5 10" })
|
|
130
|
+
]
|
|
131
|
+
});
|
|
132
|
+
const DotIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
133
|
+
...props,
|
|
134
|
+
children: /* @__PURE__ */ jsx("circle", {
|
|
135
|
+
cx: "8",
|
|
136
|
+
cy: "8",
|
|
137
|
+
r: "2.5",
|
|
138
|
+
fill: "currentColor",
|
|
139
|
+
stroke: "none"
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
const SpinnerIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
143
|
+
...props,
|
|
144
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 1.5A6.5 6.5 0 1 1 1.5 8" })
|
|
145
|
+
});
|
|
146
|
+
const SearchIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
147
|
+
...props,
|
|
148
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
149
|
+
cx: "7",
|
|
150
|
+
cy: "7",
|
|
151
|
+
r: "4.5"
|
|
152
|
+
}), /* @__PURE__ */ jsx("path", { d: "M13.5 13.5 10.5 10.5" })]
|
|
153
|
+
});
|
|
154
|
+
const TerminalIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
155
|
+
...props,
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ jsx("rect", {
|
|
158
|
+
x: "1.5",
|
|
159
|
+
y: "2.5",
|
|
160
|
+
width: "13",
|
|
161
|
+
height: "11",
|
|
162
|
+
rx: "1.5"
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ jsx("path", { d: "M4 6l2 2-2 2" }),
|
|
165
|
+
/* @__PURE__ */ jsx("path", { d: "M8.5 10h3" })
|
|
166
|
+
]
|
|
167
|
+
});
|
|
168
|
+
const LinkIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
169
|
+
...props,
|
|
170
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M7 9a2.5 2.5 0 0 0 3.5 0l2-2a2.5 2.5 0 0 0-3.5-3.5L8 4.5" }), /* @__PURE__ */ jsx("path", { d: "M9 7a2.5 2.5 0 0 0-3.5 0l-2 2a2.5 2.5 0 0 0 3.5 3.5L8 11.5" })]
|
|
171
|
+
});
|
|
172
|
+
const WarningIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
173
|
+
...props,
|
|
174
|
+
children: [
|
|
175
|
+
/* @__PURE__ */ jsx("path", { d: "M7.13 2.4 1.3 12a1 1 0 0 0 .87 1.5h11.66a1 1 0 0 0 .87-1.5L8.87 2.4a1 1 0 0 0-1.74 0Z" }),
|
|
176
|
+
/* @__PURE__ */ jsx("path", { d: "M8 6v3.5" }),
|
|
177
|
+
/* @__PURE__ */ jsx("path", { d: "M8 11.5v.01" })
|
|
178
|
+
]
|
|
179
|
+
});
|
|
180
|
+
const WrenchIcon = (props) => /* @__PURE__ */ jsx(Icon, {
|
|
181
|
+
viewBox: "0 0 24 24",
|
|
182
|
+
...props,
|
|
183
|
+
children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" })
|
|
184
|
+
});
|
|
185
|
+
const ImageIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
186
|
+
viewBox: "0 0 24 24",
|
|
187
|
+
...props,
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsx("rect", {
|
|
190
|
+
width: "18",
|
|
191
|
+
height: "18",
|
|
192
|
+
x: "3",
|
|
193
|
+
y: "3",
|
|
194
|
+
rx: "2",
|
|
195
|
+
ry: "2"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ jsx("circle", {
|
|
198
|
+
cx: "9",
|
|
199
|
+
cy: "9",
|
|
200
|
+
r: "2"
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ jsx("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
|
|
203
|
+
]
|
|
204
|
+
});
|
|
205
|
+
const MonitorIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
|
|
206
|
+
viewBox: "0 0 24 24",
|
|
207
|
+
...props,
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ jsx("rect", {
|
|
210
|
+
width: "20",
|
|
211
|
+
height: "14",
|
|
212
|
+
x: "2",
|
|
213
|
+
y: "3",
|
|
214
|
+
rx: "2"
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ jsx("path", { d: "M8 21h8" }),
|
|
217
|
+
/* @__PURE__ */ jsx("path", { d: "M12 17v4" })
|
|
218
|
+
]
|
|
219
|
+
});
|
|
220
|
+
//#endregion
|
|
221
|
+
export { SpinnerIcon as C, WrenchIcon as D, WarningIcon as E, XIcon as O, SearchIcon as S, TerminalIcon as T, ImageIcon as _, BrainIcon as a, PlusIcon as b, ChevronRightIcon as c, DownloadIcon as d, EyeIcon as f, FolderOpenIcon as g, FolderIcon as h, ArrowUpIcon as i, CopyIcon as l, FileIcon as m, ArrowLeftIcon as n, CheckIcon as o, EyeOffIcon as p, ArrowRightIcon as r, ChevronDownIcon as s, ArrowDownIcon as t, DotIcon as u, LinkIcon as v, SquareIcon as w, RefreshIcon as x, MonitorIcon as y };
|