devnonla-ui 0.14.0 → 0.15.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/package.json +2 -2
- package/src/blob-shape/BlobShape.tsx +337 -0
- package/src/button/ButtonCopy.tsx +2 -2
- package/src/chat/AgentChatbox.tsx +1 -1
- package/src/chat/AgentPanel.tsx +1 -1
- package/src/chat/chatMessageList.tsx +5 -3
- package/src/chat/chatRhythm.ts +8 -0
- package/src/chat/common/createAgentSseSession.ts +9 -3
- package/src/chat/common/sse.ts +290 -122
- package/src/chat/common/useAgentStream.ts +1 -1
- package/src/chat/index.ts +2 -2
- package/src/chat/message-ui/ChatAgentMessage.tsx +4 -3
- package/src/chat/message-ui/ChatError.tsx +5 -4
- package/src/chat/message-ui/ChatInput.tsx +5 -5
- package/src/chat/message-ui/ChatMarkdown.tsx +36 -2
- package/src/chat/message-ui/ChatThinking.tsx +8 -7
- package/src/chat/message-ui/ChatUserMessage.tsx +4 -4
- package/src/chat/tool-ui/BackgroundTaskToolUI.tsx +7 -6
- package/src/chat/tool-ui/BackgroundTasksBar.tsx +7 -7
- package/src/chat/tool-ui/CallAgentToolUI.tsx +14 -13
- package/src/chat/tool-ui/ChatToolCall.tsx +13 -12
- package/src/chat/tool-ui/GetCurrentTimeToolUI.tsx +7 -6
- package/src/chat/tool-ui/ReadSkillToolUI.tsx +10 -9
- package/src/chat/tool-ui/RunJsToolUI.tsx +8 -7
- package/src/chat/tool-ui/ToolUiTrailing.tsx +3 -3
- package/src/chat/tool-ui/WebFetchToolUI.tsx +10 -9
- package/src/codeblock/CodeBlock.tsx +1 -1
- package/src/desktop/DesktopIcon.tsx +3 -4
- package/src/icon/Icon.tsx +21 -0
- package/src/icon/glyphs.ts +35 -0
- package/src/index.ts +6 -20
- package/src/input/EditableInput.tsx +2 -2
- package/src/markdown-editor/MarkdownEditor.tsx +4 -4
- package/src/markdown-editor/MarkdownPreview.tsx +4 -4
- package/src/markdown-editor/MarkdownTable.tsx +48 -11
- package/src/markdown-editor/MarkdownViewer.tsx +25 -28
- package/src/markdown-editor/MermaidBlock.tsx +4 -4
- package/src/markdown-editor/ReactCodeFrame.tsx +2 -2
- package/src/markdown-editor/ReactCodeSandbox.tsx +2 -2
- package/src/markdown-editor/markdownScale.ts +65 -131
- package/src/menu/Menu.tsx +2 -2
- package/src/pagination/Pagination.tsx +4 -4
- package/src/scroll/OverlayScroll.tsx +13 -5
- package/src/sidebar/Sidebar.tsx +5 -5
- package/src/styles.css +36 -16
- package/src/tabs/Tabs.tsx +75 -13
- package/src/theme-switcher/ThemeSwitcher.tsx +6 -6
- package/src/typography/Typography.tsx +4 -4
- package/src/icon/SolarIcon.tsx +0 -39
- package/src/icon/solar.ts +0 -172
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "../../icon/Icon";
|
|
3
3
|
import { cn } from "../../lib/cn";
|
|
4
4
|
|
|
5
5
|
const MAX_HEIGHT = 150;
|
|
@@ -29,7 +29,7 @@ export function ChatUserMessage({ content, className }: ChatUserMessageProps) {
|
|
|
29
29
|
return (
|
|
30
30
|
<div
|
|
31
31
|
className={cn(
|
|
32
|
-
"nonla-chat-user relative isolate mx-4 mt-
|
|
32
|
+
"nonla-chat-user relative isolate mx-4 mt-8 mb-3 overflow-hidden rounded-xl border border-solid border-(--nonla-input) bg-muted-strong px-3 py-1.5",
|
|
33
33
|
"[.light:not(.dark)_&]:bg-sidebar [.light_.nonla-ui:not(.dark)_&]:bg-sidebar",
|
|
34
34
|
className,
|
|
35
35
|
)}
|
|
@@ -37,7 +37,7 @@ export function ChatUserMessage({ content, className }: ChatUserMessageProps) {
|
|
|
37
37
|
<div
|
|
38
38
|
ref={contentRef}
|
|
39
39
|
className={cn(
|
|
40
|
-
"overflow-hidden text-
|
|
40
|
+
"overflow-hidden text-base text-foreground whitespace-pre-wrap wrap-break-word",
|
|
41
41
|
collapsed && "mask-[linear-gradient(to_bottom,#000_calc(100%-1.75rem),transparent)]",
|
|
42
42
|
)}
|
|
43
43
|
style={{ maxHeight: collapsed ? MAX_HEIGHT : undefined }}
|
|
@@ -55,7 +55,7 @@ export function ChatUserMessage({ content, className }: ChatUserMessageProps) {
|
|
|
55
55
|
}}
|
|
56
56
|
className="flex w-full cursor-pointer items-center justify-center border-0 bg-transparent pt-1 text-muted-foreground hover:text-foreground"
|
|
57
57
|
>
|
|
58
|
-
<
|
|
58
|
+
<Icon name="arrow-down" size={12} className={cn("transition-transform duration-200", isExpanded && "rotate-180")} />
|
|
59
59
|
</button>
|
|
60
60
|
) : null}
|
|
61
61
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { Shimmer } from "../../shimmer/Shimmer";
|
|
3
3
|
import { Spin } from "../../spin/Spin";
|
|
4
|
+
import { chatRowClass, chatToolLineClass } from "../chatRhythm";
|
|
4
5
|
import { formatBgElapsed, parseBgTaskRef } from "../common/bgTasks";
|
|
5
6
|
import { formatToolName, timestampMs } from "../common/utils";
|
|
6
7
|
import { ToolUiBadge } from "./ToolUiBadge";
|
|
@@ -17,16 +18,16 @@ export function BackgroundTaskToolUI({ msg, assistantLabel = "Assistant", assist
|
|
|
17
18
|
}, []);
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
|
-
<div className=
|
|
21
|
+
<div className={`${chatRowClass} animate-fadeIn`}>
|
|
21
22
|
<ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
|
|
22
|
-
<div className="px-4
|
|
23
|
-
<div className=
|
|
23
|
+
<div className="px-4">
|
|
24
|
+
<div className={chatToolLineClass}>
|
|
24
25
|
<Spin variant="agent" size="small" className="shrink-0" />
|
|
25
|
-
<Shimmer className="min-w-0 truncate
|
|
26
|
+
<Shimmer className="min-w-0 truncate font-medium text-muted-foreground">
|
|
26
27
|
{label}
|
|
27
|
-
<span className="
|
|
28
|
+
<span className="text-muted-foreground [-webkit-text-fill-color:currentcolor]"> in background</span>
|
|
28
29
|
</Shimmer>
|
|
29
|
-
<span className="shrink-0
|
|
30
|
+
<span className="shrink-0 tabular-nums text-tertiary-foreground">{formatBgElapsed(timestampMs(msg.timestamp), now)}</span>
|
|
30
31
|
</div>
|
|
31
32
|
</div>
|
|
32
33
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "../../icon/Icon";
|
|
3
3
|
import { cn } from "../../lib/cn";
|
|
4
4
|
import { Modal } from "../../modal/Modal";
|
|
5
5
|
import { Popconfirm } from "../../popconfirm/Popconfirm";
|
|
@@ -27,7 +27,7 @@ function TaskLogsModal({
|
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
29
|
<Modal open={open} onCancel={onClose} footer={null} title={task ? formatToolName(task.toolName) : "Logs"} width={560}>
|
|
30
|
-
<pre ref={preRef} className="m-0 max-h-[50vh] overflow-auto rounded-md border border-border-secondary bg-muted px-3 py-2 font-mono text-
|
|
30
|
+
<pre ref={preRef} className="m-0 max-h-[50vh] overflow-auto rounded-md border border-border-secondary bg-muted px-3 py-2 font-mono text-sm leading-relaxed whitespace-pre-wrap break-all text-foreground">
|
|
31
31
|
{logs || "Waiting for output…"}
|
|
32
32
|
</pre>
|
|
33
33
|
</Modal>
|
|
@@ -51,12 +51,12 @@ function TaskRow({
|
|
|
51
51
|
<div className="flex items-center gap-1 px-1.5 py-0.5">
|
|
52
52
|
<button type="button" onClick={onLogs} title="Logs" aria-label={`Logs ${formatToolName(task.toolName)}`} className="flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-1 py-[3px] text-left transition-colors hover:bg-muted">
|
|
53
53
|
<Spin variant="agent" size="small" className="shrink-0" />
|
|
54
|
-
<span className="min-w-0 flex-1 truncate text-
|
|
55
|
-
<span className="shrink-0 text-
|
|
54
|
+
<span className="min-w-0 flex-1 truncate text-sm font-medium text-foreground">{formatToolName(task.toolName)}</span>
|
|
55
|
+
<span className="shrink-0 text-sm tabular-nums text-tertiary-foreground">{formatBgElapsed(task.startedAt, now)}</span>
|
|
56
56
|
</button>
|
|
57
57
|
<Popconfirm title={`Stop ${formatToolName(task.toolName)}?`} okText="Stop" okType="danger" onConfirm={onCancel} getPopupContainer={() => document.body}>
|
|
58
58
|
<button type="button" disabled={cancelling} title="Stop" aria-label={`Stop ${formatToolName(task.toolName)}`} className="inline-flex size-5 shrink-0 items-center justify-center rounded cursor-pointer text-destructive transition-colors hover:bg-destructive/10 disabled:opacity-40">
|
|
59
|
-
<
|
|
59
|
+
<Icon name="stop" size={10} />
|
|
60
60
|
</button>
|
|
61
61
|
</Popconfirm>
|
|
62
62
|
</div>
|
|
@@ -119,8 +119,8 @@ export function BackgroundTasksBar({ children, tasks = [], cancellingIds, onCanc
|
|
|
119
119
|
{tasks.length > 0 ? (
|
|
120
120
|
<div className="absolute inset-x-6 bottom-[calc(100%)] z-20 overflow-hidden rounded-t-lg border-x border-t border-border">
|
|
121
121
|
<div className={cn("flex h-7.5 items-center gap-1 px-1", open && "border-b border-border-secondary")}>
|
|
122
|
-
<button type="button" onClick={() => setOpen((v) => !v)} className="flex min-w-0 flex-1 cursor-pointer font-medium items-center gap-1 rounded-md px-1.5 py-1 text-
|
|
123
|
-
<
|
|
122
|
+
<button type="button" onClick={() => setOpen((v) => !v)} className="flex min-w-0 flex-1 cursor-pointer font-medium items-center gap-1 rounded-md px-1.5 py-1 text-sm text-muted-foreground/90 transition-colors hover:text-foreground" aria-expanded={open} aria-label={label}>
|
|
123
|
+
<Icon name="arrow-down" size={13} className={cn("shrink-0 transition-transform duration-150", !open && "-rotate-90")} />
|
|
124
124
|
<span className="truncate">{label}</span>
|
|
125
125
|
</button>
|
|
126
126
|
</div>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ReactNode, useEffect, useRef, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "../../icon/Icon";
|
|
3
3
|
import { cn } from "../../lib/cn";
|
|
4
4
|
import { Shimmer } from "../../shimmer/Shimmer";
|
|
5
5
|
import { Spin } from "../../spin/Spin";
|
|
6
|
+
import { chatRowBoxClass, chatRowClass } from "../chatRhythm";
|
|
6
7
|
import { formatBgElapsed, parseBgTaskRef } from "../common/bgTasks";
|
|
7
8
|
import { parseJsonObject, prettyJson, timestampMs } from "../common/utils";
|
|
8
9
|
import { ChatMarkdown } from "../message-ui/ChatMarkdown";
|
|
@@ -62,7 +63,7 @@ function AgentTurn({
|
|
|
62
63
|
<div className={cn("flex items-start gap-2", align === "end" && "flex-row-reverse")}>
|
|
63
64
|
<AgentAvatar name={name} className="mt-0.5 shrink-0" />
|
|
64
65
|
<div className={cn("flex min-w-0 flex-1 flex-col gap-0.5", align === "end" ? "items-end" : "items-start")}>
|
|
65
|
-
<span className="select-none text-
|
|
66
|
+
<span className="select-none text-sm font-medium text-tertiary-foreground">{name}</span>
|
|
66
67
|
<div className="w-fit max-w-[92%]">{children}</div>
|
|
67
68
|
</div>
|
|
68
69
|
</div>
|
|
@@ -85,7 +86,7 @@ function ExpandableBody({ children, className }: { children: ReactNode; classNam
|
|
|
85
86
|
{children}
|
|
86
87
|
</div>
|
|
87
88
|
{overflows ? (
|
|
88
|
-
<button type="button" onClick={() => setExpanded((v) => !v)} className="mt-1 cursor-pointer border-0 bg-transparent p-0 text-
|
|
89
|
+
<button type="button" onClick={() => setExpanded((v) => !v)} className="mt-1 cursor-pointer border-0 bg-transparent p-0 text-sm text-tertiary-foreground hover:text-foreground">
|
|
89
90
|
{expanded ? "Show less" : "Show more"}
|
|
90
91
|
</button>
|
|
91
92
|
) : null}
|
|
@@ -118,19 +119,19 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
|
|
|
118
119
|
const statusLabel = failed && !awaitingReply ? (parsed?.error ?? "Call failed") : null;
|
|
119
120
|
|
|
120
121
|
return (
|
|
121
|
-
<div className=
|
|
122
|
+
<div className={`${chatRowClass} animate-fadeIn`}>
|
|
122
123
|
<ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
|
|
123
|
-
<div className=
|
|
124
|
+
<div className={chatRowBoxClass}>
|
|
124
125
|
<div className={cn("overflow-hidden rounded-xl border bg-card", failed ? "border-destructive/35" : "border-border")}>
|
|
125
126
|
<div className="flex items-center gap-2 border-b border-border-secondary px-3 py-2">
|
|
126
127
|
{calling ? (
|
|
127
128
|
<Spin variant="agent" size="small" className="shrink-0" />
|
|
128
129
|
) : (
|
|
129
|
-
<
|
|
130
|
+
<Icon name="dialog" size={13} className="shrink-0 text-muted-foreground" />
|
|
130
131
|
)}
|
|
131
|
-
<Shimmer active={calling} className="min-w-0 flex-1 truncate text-
|
|
132
|
-
{bgRunning ? <span className="text-
|
|
133
|
-
{statusLabel ? <span className="max-w-40 truncate text-
|
|
132
|
+
<Shimmer active={calling} className="min-w-0 flex-1 truncate text-sm font-medium text-foreground">Calling {calleeName}</Shimmer>
|
|
133
|
+
{bgRunning ? <span className="text-sm tabular-nums text-muted-foreground">{formatBgElapsed(timestampMs(msg.timestamp), now)}</span> : null}
|
|
134
|
+
{statusLabel ? <span className="max-w-40 truncate text-sm italic text-destructive">{statusLabel}</span> : null}
|
|
134
135
|
<ToolUiTrailing failed={failed && !awaitingReply} />
|
|
135
136
|
</div>
|
|
136
137
|
|
|
@@ -139,7 +140,7 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
|
|
|
139
140
|
{composing || hasRequest ? (
|
|
140
141
|
<AgentTurn name={assistantLabel} align="end">
|
|
141
142
|
<div className="nonla-chat-user rounded-2xl rounded-tr-sm border border-solid border-(--nonla-input) bg-muted-strong px-3 py-2 text-left [.light:not(.dark)_&]:bg-sidebar [.light_.nonla-ui:not(.dark)_&]:bg-sidebar">
|
|
142
|
-
{composing ? <TypingDots /> : <p className="m-0 text-
|
|
143
|
+
{composing ? <TypingDots /> : <p className="m-0 text-sm leading-[1.55] whitespace-pre-wrap text-foreground">{requestMessage}</p>}
|
|
143
144
|
</div>
|
|
144
145
|
</AgentTurn>
|
|
145
146
|
) : null}
|
|
@@ -150,17 +151,17 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
|
|
|
150
151
|
{awaitingReply ? (
|
|
151
152
|
<div className="flex items-center gap-1.5 py-0.5">
|
|
152
153
|
<ChatSpinner />
|
|
153
|
-
<span className="text-
|
|
154
|
+
<span className="text-sm italic text-muted-foreground">Replying…</span>
|
|
154
155
|
</div>
|
|
155
156
|
) : failed ? (
|
|
156
|
-
<p className="m-0 text-
|
|
157
|
+
<p className="m-0 text-sm leading-[1.55] text-destructive">{parsed?.error ?? "Agent call failed"}</p>
|
|
157
158
|
) : parsed ? (
|
|
158
159
|
<ExpandableBody>
|
|
159
160
|
<ChatMarkdown content={parsed.response ?? "(no response)"} />
|
|
160
161
|
</ExpandableBody>
|
|
161
162
|
) : (
|
|
162
163
|
<ExpandableBody>
|
|
163
|
-
<pre className="m-0 font-mono text-
|
|
164
|
+
<pre className="m-0 font-mono text-sm leading-normal break-all whitespace-pre-wrap text-muted-foreground">{prettyJson(msg.toolOutput)}</pre>
|
|
164
165
|
</ExpandableBody>
|
|
165
166
|
)}
|
|
166
167
|
</div>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ReactNode, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "../../icon/Icon";
|
|
3
3
|
import { cn } from "../../lib/cn";
|
|
4
4
|
import { Shimmer } from "../../shimmer/Shimmer";
|
|
5
|
+
import { chatRowClass, chatToolLineClass } from "../chatRhythm";
|
|
5
6
|
import { formatToolName, hasMeaningfulInput, prettyJson } from "../common/utils";
|
|
6
7
|
import { ToolUiTrailing } from "./ToolUiTrailing";
|
|
7
8
|
|
|
@@ -28,39 +29,39 @@ export function ChatToolCall({ toolName = "Tool", label, toolInput, toolOutput,
|
|
|
28
29
|
const [open, setOpen] = useState(defaultOpen);
|
|
29
30
|
const displayLabel = label ?? formatToolName(toolName);
|
|
30
31
|
|
|
31
|
-
const identityIcon = icon ?? <
|
|
32
|
+
const identityIcon = icon ?? <Icon name="code" size={13} className="shrink-0 text-muted-foreground" />;
|
|
32
33
|
|
|
33
34
|
const header = (
|
|
34
35
|
<>
|
|
35
36
|
{identityIcon}
|
|
36
37
|
<span className="flex min-w-0 items-center gap-1">
|
|
37
|
-
<Shimmer active={running} className={cn("min-w-0 truncate text-left
|
|
38
|
-
<ToolUiTrailing failed={hasError} chevron={expandable} chevronClassName={cn("group-hover:opacity-100", open && "opacity-100 rotate-90")} />
|
|
38
|
+
<Shimmer active={running} className={cn("min-w-0 truncate text-left font-medium", !running && "text-muted-foreground")}>{displayLabel}</Shimmer>
|
|
39
|
+
<ToolUiTrailing failed={hasError} chevron={expandable} chevronClassName={cn("text-muted-foreground group-hover:opacity-100", open && "opacity-100 rotate-90")} />
|
|
39
40
|
</span>
|
|
40
41
|
</>
|
|
41
42
|
);
|
|
42
43
|
|
|
43
44
|
return (
|
|
44
|
-
<div className={cn("nonla-chat-tool
|
|
45
|
-
<div className="px-4
|
|
45
|
+
<div className={cn("nonla-chat-tool", chatRowClass, className)}>
|
|
46
|
+
<div className="px-4">
|
|
46
47
|
{expandable ? (
|
|
47
|
-
<button type="button" onClick={() => setOpen((v) => !v)} className="group
|
|
48
|
+
<button type="button" onClick={() => setOpen((v) => !v)} className={cn(chatToolLineClass, "group w-full cursor-pointer border-0 bg-transparent outline-none")}>
|
|
48
49
|
{header}
|
|
49
50
|
</button>
|
|
50
51
|
) : (
|
|
51
|
-
<div className="
|
|
52
|
+
<div className={cn(chatToolLineClass, "w-full")}>{header}</div>
|
|
52
53
|
)}
|
|
53
54
|
|
|
54
55
|
{open && expandable ? (
|
|
55
|
-
<div className="mt-1.5 mb-1 overflow-hidden rounded-lg border border-
|
|
56
|
-
{hasInput ? <pre className="m-0 max-h-27.5 overflow-y-auto
|
|
56
|
+
<div className={cn("mt-1.5 mb-1 overflow-hidden rounded-lg border font-mono text-sm", hasError ? "border-destructive/35 bg-destructive/6" : "border-border bg-card")}>
|
|
57
|
+
{hasInput ? <pre className="m-0 max-h-27.5 overflow-y-auto px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65] text-muted-foreground">{prettyJson(toolInput)}</pre> : null}
|
|
57
58
|
{running ? (
|
|
58
|
-
<div className="
|
|
59
|
+
<div className={cn("px-3 py-1.5 text-muted-foreground", hasInput && "border-t border-border")}>
|
|
59
60
|
<Shimmer className="italic">Running…</Shimmer>
|
|
60
61
|
</div>
|
|
61
62
|
) : null}
|
|
62
63
|
{!isPending ? (
|
|
63
|
-
<pre className={cn("m-0 max-h-75 overflow-y-auto
|
|
64
|
+
<pre className={cn("m-0 max-h-75 overflow-y-auto px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65]", hasInput && "border-t", hasError ? "border-destructive/35 text-destructive" : "border-border text-muted-foreground")}>
|
|
64
65
|
{hasOutput ? prettyJson(toolOutput) : typeof toolError === "string" ? toolError : "Tool execution failed"}
|
|
65
66
|
</pre>
|
|
66
67
|
) : null}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Icon } from "../../icon/Icon";
|
|
2
2
|
import { Shimmer } from "../../shimmer/Shimmer";
|
|
3
|
+
import { chatRowClass, chatToolLineClass } from "../chatRhythm";
|
|
3
4
|
import { parseJsonObject } from "../common/utils";
|
|
4
5
|
import { ToolUiBadge } from "./ToolUiBadge";
|
|
5
6
|
import { ToolUiTrailing } from "./ToolUiTrailing";
|
|
@@ -36,12 +37,12 @@ export function GetCurrentTimeToolUI({ msg, assistantLabel = "Assistant", assist
|
|
|
36
37
|
const label = formatLabel(output?.iso, output?.timezone, output?.time);
|
|
37
38
|
|
|
38
39
|
return (
|
|
39
|
-
<div className=
|
|
40
|
+
<div className={`${chatRowClass} animate-fadeIn`}>
|
|
40
41
|
<ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
|
|
41
|
-
<div className="px-4
|
|
42
|
-
<div className=
|
|
43
|
-
<
|
|
44
|
-
<Shimmer active={running} className="truncate
|
|
42
|
+
<div className="px-4">
|
|
43
|
+
<div className={chatToolLineClass}>
|
|
44
|
+
<Icon name="clock" size={13} className="shrink-0 text-muted-foreground" />
|
|
45
|
+
<Shimmer active={running} className="truncate font-medium tabular-nums text-muted-foreground">{hasError ? "Failed to get time" : running ? "Getting time…" : label}</Shimmer>
|
|
45
46
|
<ToolUiTrailing failed={hasError} />
|
|
46
47
|
</div>
|
|
47
48
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Icon } from "../../icon/Icon";
|
|
2
2
|
import { cn } from "../../lib/cn";
|
|
3
3
|
import { Shimmer } from "../../shimmer/Shimmer";
|
|
4
|
+
import { chatRowClass, chatToolLineClass } from "../chatRhythm";
|
|
4
5
|
import { parseJsonObject } from "../common/utils";
|
|
5
6
|
import { ToolUiBadge } from "./ToolUiBadge";
|
|
6
7
|
import { ToolUiTrailing } from "./ToolUiTrailing";
|
|
@@ -51,25 +52,25 @@ export function ReadSkillToolUI({ msg, assistantLabel = "Assistant", assistantCo
|
|
|
51
52
|
})();
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
|
-
<div className=
|
|
55
|
+
<div className={`${chatRowClass} animate-fadeIn`}>
|
|
55
56
|
<ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
|
|
56
|
-
<details className="group/readskill px-4
|
|
57
|
-
<summary className="
|
|
58
|
-
<
|
|
57
|
+
<details className="group/readskill px-4" style={{ overflowAnchor: "none" }}>
|
|
58
|
+
<summary className={cn(chatToolLineClass, "cursor-pointer list-none select-none [&::-webkit-details-marker]:hidden")}>
|
|
59
|
+
<Icon name={reference ? "document" : "book"} size={13} className="shrink-0 text-muted-foreground" />
|
|
59
60
|
<Shimmer active={running} className="min-w-0 truncate font-medium text-muted-foreground">
|
|
60
61
|
{verb}
|
|
61
|
-
{targetLabel ? <span className="
|
|
62
|
+
{targetLabel ? <span className="text-tertiary-foreground"> {targetLabel}</span> : null}
|
|
62
63
|
</Shimmer>
|
|
63
64
|
<ToolUiTrailing failed={failed} chevron chevronClassName="group-hover/readskill:opacity-100 group-open/readskill:opacity-100 group-open/readskill:rotate-90" />
|
|
64
65
|
</summary>
|
|
65
66
|
{body ? (
|
|
66
|
-
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-
|
|
67
|
+
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-sm font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-border bg-card text-muted-foreground")}>{body}</pre>
|
|
67
68
|
) : null}
|
|
68
69
|
{!running && !reference && available.length > 0 ? (
|
|
69
70
|
<div className="mt-0.5 mb-1 flex flex-wrap items-center gap-1">
|
|
70
|
-
<span className="text-
|
|
71
|
+
<span className="text-sm font-medium tracking-wide text-quaternary-foreground uppercase">Refs</span>
|
|
71
72
|
{available.map((name) => (
|
|
72
|
-
<span key={name} className="inline-flex max-w-full items-center rounded-md border border-border-secondary bg-muted/40 px-1.5 py-0.5 font-mono text-
|
|
73
|
+
<span key={name} className="inline-flex max-w-full items-center rounded-md border border-border-secondary bg-muted/40 px-1.5 py-0.5 font-mono text-sm leading-[1.4] text-tertiary-foreground">
|
|
73
74
|
{skillName ? `${skillName} / ${name}` : name}
|
|
74
75
|
</span>
|
|
75
76
|
))}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CodeBlock } from "../../codeblock/CodeBlock";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "../../icon/Icon";
|
|
3
3
|
import { cn } from "../../lib/cn";
|
|
4
4
|
import { Shimmer } from "../../shimmer/Shimmer";
|
|
5
|
+
import { chatRowClass, chatToolLineClass } from "../chatRhythm";
|
|
5
6
|
import { parseBgTaskRef } from "../common/bgTasks";
|
|
6
7
|
import { parseJsonObject, prettyJson } from "../common/utils";
|
|
7
8
|
import { ChatSpinner } from "../message-ui/ChatSpinner";
|
|
@@ -45,7 +46,7 @@ function SandboxOutput({
|
|
|
45
46
|
}) {
|
|
46
47
|
if (running) {
|
|
47
48
|
return (
|
|
48
|
-
<div className="flex items-center gap-2 border-t border-border px-3 py-2 text-
|
|
49
|
+
<div className="flex items-center gap-2 border-t border-border px-3 py-2 text-sm text-muted-foreground">
|
|
49
50
|
<ChatSpinner />
|
|
50
51
|
<Shimmer>Running…</Shimmer>
|
|
51
52
|
</div>
|
|
@@ -53,7 +54,7 @@ function SandboxOutput({
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
return (
|
|
56
|
-
<div className={cn("max-h-40 overflow-y-auto border-t px-3 py-2 font-mono text-
|
|
57
|
+
<div className={cn("max-h-40 overflow-y-auto border-t px-3 py-2 font-mono text-sm leading-[1.65]", failed ? "border-destructive/35 bg-destructive/6" : "border-border")}>
|
|
57
58
|
{consoleOut ? <pre className="m-0 whitespace-pre-wrap break-all text-tertiary-foreground">{consoleOut}</pre> : null}
|
|
58
59
|
{failed ? (
|
|
59
60
|
<pre className={cn("m-0 whitespace-pre-wrap break-all text-destructive", consoleOut && "mt-1")}>{resultText(result)}</pre>
|
|
@@ -83,11 +84,11 @@ export function RunJsToolUI({ msg, assistantLabel = "Assistant", assistantColor,
|
|
|
83
84
|
const verb = failed ? "JS failed" : running ? "Running JS" : "Ran JS";
|
|
84
85
|
|
|
85
86
|
return (
|
|
86
|
-
<div className=
|
|
87
|
+
<div className={`${chatRowClass} animate-fadeIn`}>
|
|
87
88
|
<ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
|
|
88
|
-
<details className="group/runjs px-4
|
|
89
|
-
<summary className="
|
|
90
|
-
<
|
|
89
|
+
<details className="group/runjs px-4" style={{ overflowAnchor: "none" }}>
|
|
90
|
+
<summary className={cn(chatToolLineClass, "cursor-pointer list-none select-none [&::-webkit-details-marker]:hidden")}>
|
|
91
|
+
<Icon name="code" size={13} className="shrink-0 text-muted-foreground" />
|
|
91
92
|
<Shimmer active={running} className="min-w-0 truncate font-medium text-muted-foreground">{verb}</Shimmer>
|
|
92
93
|
<ToolUiTrailing running={running} failed={failed} chevron chevronClassName="group-hover/runjs:opacity-100 group-open/runjs:opacity-100 group-open/runjs:rotate-90" />
|
|
93
94
|
</summary>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Icon } from "../../icon/Icon";
|
|
2
2
|
import { cn } from "../../lib/cn";
|
|
3
3
|
import { ChatSpinner } from "../message-ui/ChatSpinner";
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ export function ToolUiTrailing({
|
|
|
14
14
|
chevronClassName?: string;
|
|
15
15
|
}) {
|
|
16
16
|
if (running) return <ChatSpinner />;
|
|
17
|
-
if (failed) return <
|
|
17
|
+
if (failed) return <Icon name="error" size={13} className="shrink-0 text-destructive" />;
|
|
18
18
|
if (!chevron) return null;
|
|
19
|
-
return <
|
|
19
|
+
return <Icon name="arrow-right" size={12} className={cn("shrink-0 opacity-0 transition-[opacity,transform] duration-150", chevronClassName)} />;
|
|
20
20
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Icon } from "../../icon/Icon";
|
|
2
2
|
import { cn } from "../../lib/cn";
|
|
3
3
|
import { Shimmer } from "../../shimmer/Shimmer";
|
|
4
|
+
import { chatRowClass, chatToolLineClass } from "../chatRhythm";
|
|
4
5
|
import { parseJsonObject } from "../common/utils";
|
|
5
6
|
import { ToolUiBadge } from "./ToolUiBadge";
|
|
6
7
|
import { ToolUiTrailing } from "./ToolUiTrailing";
|
|
@@ -37,25 +38,25 @@ export function WebFetchToolUI({ msg, assistantLabel = "Assistant", assistantCol
|
|
|
37
38
|
|
|
38
39
|
const header = (
|
|
39
40
|
<>
|
|
40
|
-
<
|
|
41
|
+
<Icon name="globe" size={13} className="shrink-0 text-muted-foreground" />
|
|
41
42
|
<Shimmer active={running} className="min-w-0 truncate font-medium text-muted-foreground">
|
|
42
|
-
{verb} <span className="
|
|
43
|
+
{verb} <span className="text-tertiary-foreground">{url}</span>
|
|
43
44
|
</Shimmer>
|
|
44
45
|
<ToolUiTrailing failed={failed} chevron={expandable} chevronClassName="group-hover/webfetch:opacity-100 group-open/webfetch:opacity-100 group-open/webfetch:rotate-90" />
|
|
45
46
|
</>
|
|
46
47
|
);
|
|
47
48
|
|
|
48
49
|
return (
|
|
49
|
-
<div className=
|
|
50
|
+
<div className={`${chatRowClass} animate-fadeIn`}>
|
|
50
51
|
<ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
|
|
51
52
|
{expandable ? (
|
|
52
|
-
<details className="group/webfetch px-4
|
|
53
|
-
<summary className="
|
|
54
|
-
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-
|
|
53
|
+
<details className="group/webfetch px-4" style={{ overflowAnchor: "none" }}>
|
|
54
|
+
<summary className={cn(chatToolLineClass, "cursor-pointer list-none select-none [&::-webkit-details-marker]:hidden")}>{header}</summary>
|
|
55
|
+
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-sm font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-border bg-card text-muted-foreground")}>{body}</pre>
|
|
55
56
|
</details>
|
|
56
57
|
) : (
|
|
57
|
-
<div className="px-4
|
|
58
|
-
<div className=
|
|
58
|
+
<div className="px-4">
|
|
59
|
+
<div className={chatToolLineClass}>{header}</div>
|
|
59
60
|
</div>
|
|
60
61
|
)}
|
|
61
62
|
</div>
|
|
@@ -54,7 +54,7 @@ export function CodeBlock({ code, language, title, lineNumbers = false, wordWrap
|
|
|
54
54
|
|
|
55
55
|
<OverlayScroll
|
|
56
56
|
autoHeight
|
|
57
|
-
className="nonla-codeblock-body nonla-codeblock-well min-w-0 bg-card font-mono text-(length:--md-code-size,
|
|
57
|
+
className="nonla-codeblock-body nonla-codeblock-well min-w-0 bg-card font-mono text-(length:--md-code-size,var(--nonla-mono-text-size)) leading-(--md-code-leading,calc(var(--nonla-mono-text-size)*1.6)) max-h-96"
|
|
58
58
|
innerClassName={wordWrap ? undefined : "overflow-x-auto"}
|
|
59
59
|
>
|
|
60
60
|
<pre className={cn("nonla-codeblock-pre m-0 whitespace-pre break-normal", lineNumbers && "nonla-codeblock-lines", wordWrap && "whitespace-pre-wrap wrap-break-word")}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef, type ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "../icon/Icon";
|
|
3
3
|
|
|
4
4
|
const iconButtonClass =
|
|
5
5
|
"group w-[96px] flex flex-col items-center gap-0.5 py-2 px-0 rounded-md border-none cursor-pointer select-none outline-none bg-transparent focus-visible:outline-2 focus-visible:outline-brand motion-safe:transition-transform motion-safe:hover:-translate-y-0.5 motion-safe:active:scale-[0.98]";
|
|
@@ -10,16 +10,15 @@ export const DesktopIcon = forwardRef<
|
|
|
10
10
|
HTMLButtonElement,
|
|
11
11
|
{
|
|
12
12
|
label: string;
|
|
13
|
-
icon?: string;
|
|
14
13
|
media?: ReactNode;
|
|
15
14
|
active?: boolean;
|
|
16
15
|
onCard?: boolean;
|
|
17
16
|
onClick?: () => void;
|
|
18
17
|
}
|
|
19
|
-
>(function DesktopIcon({ label,
|
|
18
|
+
>(function DesktopIcon({ label, media, active = false, onCard = false, onClick }, ref) {
|
|
20
19
|
return (
|
|
21
20
|
<button ref={ref} type="button" title={label} aria-label={label} aria-current={active ? "true" : undefined} dir="ltr" onClick={onClick} className={iconButtonClass}>
|
|
22
|
-
{media ?? <
|
|
21
|
+
{media ?? <Icon name="stars" size={32} />}
|
|
23
22
|
<span className={`${labelClass} ${onCard ? "text-foreground" : "text-white [text-shadow:0_1px_2px_rgba(0,0,0,0.85)]"}`}>{label}</span>
|
|
24
23
|
</button>
|
|
25
24
|
);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cn } from "../lib/cn";
|
|
2
|
+
import { ICON_GLYPHS, type IconName } from "./glyphs";
|
|
3
|
+
|
|
4
|
+
export type { IconName };
|
|
5
|
+
|
|
6
|
+
export function isIconName(value: unknown): value is IconName {
|
|
7
|
+
return typeof value === "string" && value in ICON_GLYPHS;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Icon({ name, size = 16, className }: { name: IconName; size?: number; className?: string }) {
|
|
11
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">${ICON_GLYPHS[name]}</svg>`;
|
|
12
|
+
return (
|
|
13
|
+
<span
|
|
14
|
+
aria-hidden
|
|
15
|
+
className={cn("inline-flex shrink-0 select-none text-current pointer-events-none [&_svg]:size-full", className)}
|
|
16
|
+
style={{ width: size, height: size }}
|
|
17
|
+
// biome-ignore lint/security/noDangerouslySetInnerHtml: glyph markup is a fixed set shipped with the library
|
|
18
|
+
dangerouslySetInnerHTML={{ __html: svg }}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Glyphs from the Solar icon set by 480 Design, CC BY 4.0. https://creativecommons.org/licenses/by/4.0/ */
|
|
2
|
+
export const ICON_GLYPHS = {
|
|
3
|
+
"add": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M4 12L20 12\"/><path d=\"M12 4L12 20\"/></g>",
|
|
4
|
+
"arrow-down": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M19 9L12 15L5 9\"/>",
|
|
5
|
+
"arrow-left": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M15 5L9 12L15 19\"/>",
|
|
6
|
+
"arrow-right": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M9 5L15 12L9 19\"/>",
|
|
7
|
+
"arrow-up": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M12 20L12 4M6 10L12 4L18 10\"/>",
|
|
8
|
+
"book": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M4 8C4 5.17157 4 3.75736 4.87868 2.87868C5.75736 2 7.17157 2 10 2H14C16.8284 2 18.2426 2 19.1213 2.87868C20 3.75736 20 5.17157 20 8V16C20 18.8284 20 20.2426 19.1213 21.1213C18.2426 22 16.8284 22 14 22H10C7.17157 22 5.75736 22 4.87868 21.1213C4 20.2426 4 18.8284 4 16V8Z\"/><path d=\"M19.8978 16H7.89778C6.96781 16 6.50282 16 6.12132 16.1022C5.08604 16.3796 4.2774 17.1883 4 18.2235\"/><path d=\"M8 7H16\"/><path d=\"M8 10.5H13\"/></g>",
|
|
9
|
+
"check": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M5 13L9 17L19 7\"/>",
|
|
10
|
+
"chevrons-left": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M13 19L7 12L13 5\"/><path d=\"M17 19L11 12L17 5\"/></g>",
|
|
11
|
+
"chevrons-right": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M11 19L17 12L11 5\"/><path d=\"M7 19L13 12L7 5\"/></g>",
|
|
12
|
+
"clock": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path stroke-linejoin=\"round\" d=\"M12 8V12L14.5 14.5\"/></g>",
|
|
13
|
+
"close": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M19 5L5 19\"/><path d=\"M19 19L5 5\"/></g>",
|
|
14
|
+
"code": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M15.5 9L15.6716 9.17157C17.0049 10.5049 17.6716 11.1716 17.6716 12C17.6716 12.8284 17.0049 13.4951 15.6716 14.8284L15.5 15\"/><path d=\"M13.2939 7.17041L11.9998 12L10.7058 16.8297\"/><path d=\"M8.50019 9L8.32861 9.17157C6.99528 10.5049 6.32861 11.1716 6.32861 12C6.32861 12.8284 6.99528 13.4951 8.32861 14.8284L8.50019 15\"/><path d=\"M2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12Z\"/></g>",
|
|
15
|
+
"copy": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M6 11C6 8.17157 6 6.75736 6.87868 5.87868C7.75736 5 9.17157 5 12 5H15C17.8284 5 19.2426 5 20.1213 5.87868C21 6.75736 21 8.17157 21 11V16C21 18.8284 21 20.2426 20.1213 21.1213C19.2426 22 17.8284 22 15 22H12C9.17157 22 7.75736 22 6.87868 21.1213C6 20.2426 6 18.8284 6 16V11Z\"/><path d=\"M6 19C4.34315 19 3 17.6569 3 16V10C3 6.22876 3 4.34315 4.17157 3.17157C5.34315 2 7.22876 2 11 2H15C16.6569 2 18 3.34315 18 5\"/></g>",
|
|
16
|
+
"dialog": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M16.09 6.58944C15.1281 6 13.8187 6 11.2 6H8.8C6.18126 6 4.87188 6 3.91001 6.58944C3.37178 6.91927 2.91926 7.37179 2.58944 7.91001C2 8.8719 2 10.1813 2 12.8V13.6C2 15.4638 2 16.3957 2.30448 17.1308C2.71046 18.1109 3.48915 18.8896 4.46927 19.2956C4.93479 19.4884 5.47923 19.5591 6.28931 19.585C7.15324 19.6126 7.58521 19.6264 7.91637 19.8223C8.24753 20.0182 8.45544 20.3695 8.8712 21.0719L8.87121 21.0719L9.13064 21.5102C9.51718 22.1633 10.4828 22.1633 10.8693 21.5102L11.1288 21.0719C11.5445 20.3695 11.7524 20.0182 12.0836 19.8223C12.4148 19.6264 12.8467 19.6126 13.7107 19.585C14.5208 19.5591 15.0652 19.4884 15.5307 19.2956C16.5108 18.8896 17.2895 18.1109 17.6955 17.1308C18 16.3957 18 15.4638 18 13.6V12.8C18 10.1813 18 8.8719 17.4106 7.91001C17.0807 7.37179 16.6282 6.91927 16.09 6.58944Z\"/><path d=\"M7.0332 6C7.08481 5.00787 7.2165 4.33902 7.55255 3.79064C7.86176 3.28605 8.28599 2.86181 8.79058 2.5526C9.69234 2 10.9199 2 13.3749 2H15.6249C18.08 2 19.3076 2 20.2093 2.5526C20.7139 2.86181 21.1381 3.28605 21.4473 3.79064C21.9999 4.6924 21.9999 5.91994 21.9999 8.37503V9.12503C21.9999 10.8723 21.9999 11.746 21.7145 12.4351C21.3339 13.354 20.6039 14.084 19.685 14.4646C19.2527 14.6437 18.7477 14.7104 18 14.7352\"/><path stroke-linejoin=\"round\" d=\"M6.50928 13H6.51828M10 13H10.009M13.491 13H13.5\"/></g>",
|
|
17
|
+
"document": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M3 10C3 6.22876 3 4.34315 4.17157 3.17157C5.34315 2 7.22876 2 11 2H13C16.7712 2 18.6569 2 19.8284 3.17157C21 4.34315 21 6.22876 21 10V14C21 17.7712 21 19.6569 19.8284 20.8284C18.6569 22 16.7712 22 13 22H11C7.22876 22 5.34315 22 4.17157 20.8284C3 19.6569 3 17.7712 3 14V10Z\"/><path d=\"M8 12H16\"/><path d=\"M8 8H16\"/><path d=\"M8 16H13\"/></g>",
|
|
18
|
+
"download": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M17 9.00195C19.175 9.01406 20.3529 9.11051 21.1213 9.8789C22 10.7576 22 12.1718 22 15.0002V16.0002C22 18.8286 22 20.2429 21.1213 21.1215C20.2426 22.0002 18.8284 22.0002 16 22.0002H8C5.17157 22.0002 3.75736 22.0002 2.87868 21.1215C2 20.2429 2 18.8286 2 16.0002L2 15.0002C2 12.1718 2 10.7576 2.87868 9.87889C3.64706 9.11051 4.82497 9.01406 7 9.00195\"/><path stroke-linejoin=\"round\" d=\"M12 2L12 15M15 11.5L12 15L9 11.5\"/></g>",
|
|
19
|
+
"eraser": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M13.7713 17.314L6.68596 10.2287M11.4096 5.50506C13.0796 3.83502 13.9146 3 14.9522 3C15.9899 3 16.8249 3.83502 18.4949 5.50506C20.165 7.1751 21 8.01012 21 9.04776C21 10.0854 20.165 10.9204 18.4949 12.5904L12.5904 18.4949C10.9204 20.165 10.0854 21 9.04776 21C8.01012 21 7.1751 20.165 5.50506 18.4949C3.83502 16.8249 3 15.9899 3 14.9522C3 13.9146 3.83502 13.0796 5.50506 11.4096L11.4096 5.50506Z\"/><path d=\"M9 21H21\"/></g>",
|
|
20
|
+
"error": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 7V13\"/><path stroke-linejoin=\"round\" d=\"M12 16H12.0001\"/></g>",
|
|
21
|
+
"eye": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M3.27489 15.2957C2.42496 14.1915 2 13.6394 2 12C2 10.3606 2.42496 9.80853 3.27489 8.70433C4.97196 6.49956 7.81811 4 12 4C16.1819 4 19.028 6.49956 20.7251 8.70433C21.575 9.80853 22 10.3606 22 12C22 13.6394 21.575 14.1915 20.7251 15.2957C19.028 17.5004 16.1819 20 12 20C7.81811 20 4.97196 17.5004 3.27489 15.2957Z\"/><path d=\"M15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12Z\"/></g>",
|
|
22
|
+
"globe": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><ellipse cx=\"12\" cy=\"12\" rx=\"4\" ry=\"10\"/><path d=\"M2 12H22\"/></g>",
|
|
23
|
+
"maximize": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M9 15L2 22M2 16.1429V22H7.85714\"/><path d=\"M15 9L22 2M22 7.85714V2H16.1429\"/></g>",
|
|
24
|
+
"minimize": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M2 22L9 15M9 20.8571V15H3.14286\"/><path d=\"M22 2L15 9M15 3.14286V9H20.8571\"/></g>",
|
|
25
|
+
"monitor": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M2 10C2 6.22876 2 4.34315 3.17157 3.17157C4.34315 2 6.22876 2 10 2H14C17.7712 2 19.6569 2 20.8284 3.17157C22 4.34315 22 6.22876 22 10V11C22 13.8284 22 15.2426 21.1213 16.1213C20.2426 17 18.8284 17 16 17H8C5.17157 17 3.75736 17 2.87868 16.1213C2 15.2426 2 13.8284 2 11V10Z\"/><path d=\"M16 22H8\"/><path d=\"M12 17L12 22\"/><path d=\"M22 13H2\"/></g>",
|
|
26
|
+
"moon": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" d=\"M12 22C17.5228 22 22 17.5228 22 12C22 11.5373 21.3065 11.4608 21.0672 11.8568C19.9289 13.7406 17.8615 15 15.5 15C11.9101 15 9 12.0899 9 8.5C9 6.13845 10.2594 4.07105 12.1432 2.93276C12.5392 2.69347 12.4627 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z\"/>",
|
|
27
|
+
"pen": "<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\" d=\"M14.3601 4.07866L15.2869 3.15178C16.8226 1.61607 19.3125 1.61607 20.8482 3.15178C22.3839 4.68748 22.3839 7.17735 20.8482 8.71306L19.9213 9.63993M14.3601 4.07866C14.3601 4.07866 14.4759 6.04828 16.2138 7.78618C17.9517 9.52407 19.9213 9.63993 19.9213 9.63993M19.9213 9.63993L11.4001 18.1612C10.8229 18.7383 10.5344 19.0269 10.2162 19.2751C9.84082 19.5679 9.43469 19.8189 9.00498 20.0237C8.6407 20.1973 8.25352 20.3263 7.47918 20.5844L4.19792 21.6782L3.39584 21.9456C3.01478 22.0726 2.59466 21.9734 2.31063 21.6894C2.0266 21.4053 1.92743 20.9852 2.05445 20.6042L2.32181 19.8021L3.41556 16.5208C3.67368 15.7465 3.80273 15.3593 3.97634 14.995C4.18114 14.5653 4.43213 14.1592 4.7249 13.7838C4.97308 13.4656 5.26166 13.1771 5.83882 12.5999L14.3601 4.07866M4.19792 21.6782L2.32181 19.8021\"/>",
|
|
28
|
+
"shield-check": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M3 10.4167C3 7.21907 3 5.62028 3.37752 5.08241C3.75503 4.54454 5.25832 4.02996 8.26491 3.00079L8.83772 2.80472C10.405 2.26824 11.1886 2 12 2C12.8114 2 13.595 2.26824 15.1623 2.80472L15.7351 3.00079C18.7417 4.02996 20.245 4.54454 20.6225 5.08241C21 5.62028 21 7.21907 21 10.4167C21 10.8996 21 11.4234 21 11.9914C21 17.6294 16.761 20.3655 14.1014 21.5273C13.38 21.8424 13.0193 22 12 22C10.9807 22 10.62 21.8424 9.89856 21.5273C7.23896 20.3655 3 17.6294 3 11.9914C3 11.4234 3 10.8996 3 10.4167Z\"/><path stroke-linejoin=\"round\" d=\"M9.5 12.4L10.9286 14L14.5 10\"/></g>",
|
|
29
|
+
"stars": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><path d=\"M8.03339 3.65784C8.37932 2.78072 9.62068 2.78072 9.96661 3.65785L11.0386 6.37599C11.1442 6.64378 11.3562 6.85576 11.624 6.96137L14.3422 8.03339C15.2193 8.37932 15.2193 9.62068 14.3422 9.96661L11.624 11.0386C11.3562 11.1442 11.1442 11.3562 11.0386 11.624L9.96661 14.3422C9.62067 15.2193 8.37932 15.2193 8.03339 14.3422L6.96137 11.624C6.85575 11.3562 6.64378 11.1442 6.37599 11.0386L3.65784 9.96661C2.78072 9.62067 2.78072 8.37932 3.65785 8.03339L6.37599 6.96137C6.64378 6.85575 6.85576 6.64378 6.96137 6.37599L8.03339 3.65784Z\"/><path d=\"M16.4885 13.3481C16.6715 12.884 17.3285 12.884 17.5115 13.3481L18.3121 15.3781C18.368 15.5198 18.4802 15.632 18.6219 15.6879L20.6519 16.4885C21.116 16.6715 21.116 17.3285 20.6519 17.5115L18.6219 18.3121C18.4802 18.368 18.368 18.4802 18.3121 18.6219L17.5115 20.6519C17.3285 21.116 16.6715 21.116 16.4885 20.6519L15.6879 18.6219C15.632 18.4802 15.5198 18.368 15.3781 18.3121L13.3481 17.5115C12.884 17.3285 12.884 16.6715 13.3481 16.4885L15.3781 15.6879C15.5198 15.632 15.632 15.5198 15.6879 15.3781L16.4885 13.3481Z\"/></g>",
|
|
30
|
+
"stop": "<path fill=\"currentColor\" d=\"M2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12Z\"/>",
|
|
31
|
+
"sun": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"6\"/><path d=\"M12 2V3\"/><path d=\"M12 21V22\"/><path d=\"M22 12L21 12\"/><path d=\"M3 12L2 12\"/><path d=\"M19.0708 4.92969L18.678 5.32252\"/><path d=\"M5.32178 18.6777L4.92894 19.0706\"/><path d=\"M19.0708 19.0703L18.678 18.6775\"/><path d=\"M5.32178 5.32227L4.92894 4.92943\"/></g>",
|
|
32
|
+
"transfer": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M20 10L4 10L9.5 4\"/><path d=\"M4 14L20 14L14.5 20\"/></g>",
|
|
33
|
+
} as const;
|
|
34
|
+
|
|
35
|
+
export type IconName = keyof typeof ICON_GLYPHS;
|