@parallelworks/ui 0.85.0 → 0.86.1
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/ai/components/AllocationSelector.d.ts +1 -1
- package/dist/ai/components/AllocationSelector.js +5 -3
- package/dist/ai/components/ChatMessage.js +6 -0
- package/dist/ai/core/ChatProvider.js +16 -5
- package/dist/ai/types.d.ts +2 -0
- package/dist/components/RunStatusIcon.js +14 -17
- package/dist/components/StatusBadge.d.ts +10 -1
- package/dist/components/StatusBadge.js +27 -15
- package/dist/components/StatusIcons.d.ts +2 -0
- package/dist/components/StatusIcons.js +5 -3
- package/dist/icons.d.ts +14 -1
- package/dist/icons.js +104 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BoundSetting } from '../types.js';
|
|
2
2
|
/** Which allocation an organization model bills, with its spend so far. Shows
|
|
3
|
-
* only for an organization model, and picks the first allocation
|
|
3
|
+
* only for an organization model, and picks the first allocation it can charge. */
|
|
4
4
|
export default function AllocationSelector({ model, allocation, }?: {
|
|
5
5
|
/** The model a session owns, which decides whether it bills an allocation. */
|
|
6
6
|
model?: string | null | undefined;
|
|
@@ -14,7 +14,7 @@ var dollars = new Intl.NumberFormat(void 0, {
|
|
|
14
14
|
});
|
|
15
15
|
var money = (amount) => dollars.format(amount);
|
|
16
16
|
/** Which allocation an organization model bills, with its spend so far. Shows
|
|
17
|
-
* only for an organization model, and picks the first allocation
|
|
17
|
+
* only for an organization model, and picks the first allocation it can charge. */
|
|
18
18
|
function AllocationSelector({ model, allocation } = {}) {
|
|
19
19
|
const chat = useChat();
|
|
20
20
|
const t = useChatConfig().strings.allocationPicker;
|
|
@@ -25,7 +25,7 @@ function AllocationSelector({ model, allocation } = {}) {
|
|
|
25
25
|
const isOrgProvider = isOrgModel(selectedProvider);
|
|
26
26
|
const allocationsAdapter = adapter.allocations;
|
|
27
27
|
const { data: allocations } = useSWR(isOrgProvider && allocationsAdapter ? ["ai-chat-allocations"] : null, () => allocationsAdapter?.list());
|
|
28
|
-
const first = allocations?.
|
|
28
|
+
const first = allocations?.find((a) => !a.disabled);
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
if (bound) return;
|
|
31
31
|
if (!isOrgProvider) {
|
|
@@ -46,7 +46,9 @@ function AllocationSelector({ model, allocation } = {}) {
|
|
|
46
46
|
"aria-label": t.choose,
|
|
47
47
|
items: allocations.map((a) => ({
|
|
48
48
|
value: a.name,
|
|
49
|
-
label: a.name
|
|
49
|
+
label: a.name,
|
|
50
|
+
description: a.description,
|
|
51
|
+
disabled: a.disabled
|
|
50
52
|
})),
|
|
51
53
|
value: selectedAllocation,
|
|
52
54
|
disabled: !!allocation?.disabled,
|
|
@@ -121,6 +121,12 @@ function ChatMessage({ message, allMessages, isStreaming = false, latest = false
|
|
|
121
121
|
isStreaming,
|
|
122
122
|
onApprovalAnswer: approvalAnswer
|
|
123
123
|
}),
|
|
124
|
+
hasError && /* @__PURE__ */ jsx(Callout, {
|
|
125
|
+
tone: "error",
|
|
126
|
+
size: "sm",
|
|
127
|
+
className: "mt-2",
|
|
128
|
+
children: message.error
|
|
129
|
+
}),
|
|
124
130
|
isStreaming && !isUser && /* @__PURE__ */ jsx("div", {
|
|
125
131
|
"aria-hidden": true,
|
|
126
132
|
className: "mt-2 h-7"
|
|
@@ -312,7 +312,7 @@ function ChatProvider({ adapter, currentUser, navigation, activeConversationId =
|
|
|
312
312
|
state.currentConversation,
|
|
313
313
|
navigation
|
|
314
314
|
]);
|
|
315
|
-
const streamReply = useCallback(async (targetConversationId, request, parentId, onFailure, routePart) => {
|
|
315
|
+
const streamReply = useCallback(async (targetConversationId, request, parentId, onFailure, routePart, onAccepted) => {
|
|
316
316
|
backgroundStreamsRef.current.set(targetConversationId, {
|
|
317
317
|
content: "",
|
|
318
318
|
reasoning: "",
|
|
@@ -335,7 +335,10 @@ function ChatProvider({ adapter, currentUser, navigation, activeConversationId =
|
|
|
335
335
|
let thinkingStart = null;
|
|
336
336
|
let thinkingEnd = null;
|
|
337
337
|
const markStreamStart = () => {
|
|
338
|
-
if (thinkingStart === null)
|
|
338
|
+
if (thinkingStart === null) {
|
|
339
|
+
thinkingStart = Date.now();
|
|
340
|
+
onAccepted?.();
|
|
341
|
+
}
|
|
339
342
|
};
|
|
340
343
|
let liveParts = [];
|
|
341
344
|
let liveText = "";
|
|
@@ -637,7 +640,8 @@ function ChatProvider({ adapter, currentUser, navigation, activeConversationId =
|
|
|
637
640
|
isSendingRef.current = true;
|
|
638
641
|
const targetConversationId = conversation.id;
|
|
639
642
|
const t = resolvedConfig.strings.agentTranscript;
|
|
640
|
-
|
|
643
|
+
const askedParts = paused.parts ?? [];
|
|
644
|
+
let pausedParts = askedParts;
|
|
641
645
|
const updatePaused = (updates) => dispatch({
|
|
642
646
|
type: "UPDATE_MESSAGE",
|
|
643
647
|
messageId: paused.id,
|
|
@@ -648,6 +652,7 @@ function ChatProvider({ adapter, currentUser, navigation, activeConversationId =
|
|
|
648
652
|
pausedParts = applyPartDelta(pausedParts, delta);
|
|
649
653
|
updatePaused({ parts: pausedParts });
|
|
650
654
|
};
|
|
655
|
+
if (paused.error) updatePaused({ error: null });
|
|
651
656
|
applyToPaused({
|
|
652
657
|
type: "approval_resolved",
|
|
653
658
|
id: approvalId,
|
|
@@ -677,8 +682,9 @@ function ChatProvider({ adapter, currentUser, navigation, activeConversationId =
|
|
|
677
682
|
}
|
|
678
683
|
streamingToConversationRef.current = targetConversationId;
|
|
679
684
|
startStreaming(targetConversationId);
|
|
685
|
+
let accepted = false;
|
|
680
686
|
try {
|
|
681
|
-
await streamReply(targetConversationId, {
|
|
687
|
+
if (await streamReply(targetConversationId, {
|
|
682
688
|
model: modelString,
|
|
683
689
|
messages: historyMessages(conversation.messages.slice(0, pausedAt + 1), state.selectedProvider),
|
|
684
690
|
conversationId: targetConversationId,
|
|
@@ -698,7 +704,12 @@ function ChatProvider({ adapter, currentUser, navigation, activeConversationId =
|
|
|
698
704
|
if (delta.type !== "tool_end" || delta.id !== approvalId) return false;
|
|
699
705
|
applyToPaused(delta);
|
|
700
706
|
return true;
|
|
701
|
-
})
|
|
707
|
+
}, () => {
|
|
708
|
+
accepted = true;
|
|
709
|
+
}) === "failed" && !accepted) {
|
|
710
|
+
pausedParts = askedParts;
|
|
711
|
+
updatePaused({ parts: askedParts });
|
|
712
|
+
}
|
|
702
713
|
} finally {
|
|
703
714
|
isSendingRef.current = false;
|
|
704
715
|
}
|
package/dist/ai/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CancelFilledIcon, FailFilledIcon, NotRunningIcon, PendingRingIcon, RunningRingIcon, SkipIcon, SuccessFilledIcon, WarningFilledIcon } from "../icons.js";
|
|
3
3
|
import { toneIcon } from "./tone.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import { useStrings } from "./Provider.js";
|
|
@@ -8,33 +8,31 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
var looks = {
|
|
9
9
|
pending: {
|
|
10
10
|
tone: "muted",
|
|
11
|
-
icon:
|
|
11
|
+
icon: PendingRingIcon
|
|
12
12
|
},
|
|
13
13
|
started: {
|
|
14
14
|
tone: "info",
|
|
15
|
-
icon:
|
|
16
|
-
spin: true
|
|
15
|
+
icon: RunningRingIcon
|
|
17
16
|
},
|
|
18
17
|
running: {
|
|
19
18
|
tone: "info",
|
|
20
|
-
icon:
|
|
21
|
-
spin: true
|
|
19
|
+
icon: RunningRingIcon
|
|
22
20
|
},
|
|
23
21
|
completed: {
|
|
24
22
|
tone: "success",
|
|
25
|
-
icon:
|
|
23
|
+
icon: SuccessFilledIcon
|
|
26
24
|
},
|
|
27
25
|
warning: {
|
|
28
26
|
tone: "warning",
|
|
29
|
-
icon:
|
|
27
|
+
icon: WarningFilledIcon
|
|
30
28
|
},
|
|
31
29
|
failed: {
|
|
32
30
|
tone: "error",
|
|
33
|
-
icon:
|
|
31
|
+
icon: FailFilledIcon
|
|
34
32
|
},
|
|
35
33
|
error: {
|
|
36
34
|
tone: "error",
|
|
37
|
-
icon:
|
|
35
|
+
icon: FailFilledIcon
|
|
38
36
|
},
|
|
39
37
|
skipped: {
|
|
40
38
|
tone: "muted",
|
|
@@ -46,21 +44,20 @@ var looks = {
|
|
|
46
44
|
},
|
|
47
45
|
canceled: {
|
|
48
46
|
tone: "info",
|
|
49
|
-
icon:
|
|
47
|
+
icon: CancelFilledIcon
|
|
50
48
|
},
|
|
51
49
|
faulted: {
|
|
52
50
|
tone: "error",
|
|
53
|
-
icon:
|
|
54
|
-
spin: true
|
|
51
|
+
icon: RunningRingIcon
|
|
55
52
|
},
|
|
56
53
|
canceling: {
|
|
57
54
|
tone: "info",
|
|
58
|
-
icon:
|
|
59
|
-
spin: true
|
|
55
|
+
icon: RunningRingIcon
|
|
60
56
|
},
|
|
61
57
|
"": {
|
|
62
58
|
tone: "muted",
|
|
63
|
-
icon: NotRunningIcon
|
|
59
|
+
icon: NotRunningIcon,
|
|
60
|
+
faint: true
|
|
64
61
|
}
|
|
65
62
|
};
|
|
66
63
|
/** The tone a run status reads in, so a badge that says the status in words matches the
|
|
@@ -86,7 +83,7 @@ function RunStatusIcon({ status, label: ownLabel, tooltip = false, className, ..
|
|
|
86
83
|
className: cx("flex h-2 items-center", toneIcon[look.tone], className),
|
|
87
84
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
88
85
|
"aria-hidden": "true",
|
|
89
|
-
className: cx(look.
|
|
86
|
+
className: cx(look.faint && "opacity-55")
|
|
90
87
|
})
|
|
91
88
|
});
|
|
92
89
|
return tooltip && label ? /* @__PURE__ */ jsx(Tooltip, {
|
|
@@ -72,10 +72,19 @@ export declare function CountBadge({ count, max, variant, emphasis, size, label,
|
|
|
72
72
|
/** Any other span attribute and the ref reach its element, so it can be a Tooltip's or a popover's
|
|
73
73
|
* direct child. */
|
|
74
74
|
export interface StatusDotProps extends Omit<ComponentPropsWithRef<'span'>, 'children' | 'className'> {
|
|
75
|
+
/** The status's tone. */
|
|
75
76
|
variant?: BadgeVariant | undefined;
|
|
77
|
+
/** A ping that ripples out from the dot, for something under way; still for reduced motion. */
|
|
76
78
|
pulse?: boolean | undefined;
|
|
79
|
+
/** The dot's width and height in pixels, without its halo; 8 by default. */
|
|
77
80
|
size?: number | undefined;
|
|
81
|
+
/** Takes the text's color with no halo, for a dot on a solid fill, where the tone would
|
|
82
|
+
* vanish into it. */
|
|
83
|
+
current?: boolean | undefined;
|
|
78
84
|
className?: string | undefined;
|
|
79
85
|
}
|
|
80
|
-
|
|
86
|
+
/** A status's dot in its tone with a soft halo, for a status that stands beside its words
|
|
87
|
+
* without a badge, such as "running" in a list's cell. A badge's own dot is this one. Name
|
|
88
|
+
* the status in words beside it; the dot alone is only seen. */
|
|
89
|
+
export declare function StatusDot({ variant, pulse, size, current, className, style, ...rest }: StatusDotProps): import("react").JSX.Element;
|
|
81
90
|
export {};
|
|
@@ -33,6 +33,15 @@ var dotFill = {
|
|
|
33
33
|
...toneFill,
|
|
34
34
|
accent: "bg-(--theme-accent)"
|
|
35
35
|
};
|
|
36
|
+
var dotHalo = {
|
|
37
|
+
default: "ring-2 ring-(--theme-app)/22",
|
|
38
|
+
success: "ring-2 ring-(--theme-success)/22",
|
|
39
|
+
warning: "ring-2 ring-(--theme-warning)/22",
|
|
40
|
+
error: "ring-2 ring-(--theme-error)/22",
|
|
41
|
+
info: "ring-2 ring-(--theme-info)/22",
|
|
42
|
+
muted: "ring-2 ring-(--theme-muted-text-color)/22",
|
|
43
|
+
accent: "ring-2 ring-(--theme-accent)/22"
|
|
44
|
+
};
|
|
36
45
|
var sizeClasses = {
|
|
37
46
|
sm: "gap-1 py-px text-[10px] leading-3.5",
|
|
38
47
|
md: "gap-1.5 py-0.5 text-[11px] leading-4"
|
|
@@ -58,23 +67,21 @@ function statusTextClass(variant) {
|
|
|
58
67
|
}
|
|
59
68
|
/** A short status or label in a tone, such as "Running" or "Preview". */
|
|
60
69
|
function StatusBadge({ children, variant = "default", emphasis = "soft", shape = "pill", caps = false, truncate = false, pulse = false, dot = false, size = "sm", render, className, ref, ...rest }) {
|
|
61
|
-
const indicator = emphasis === "solid" ? "bg-current" : dotFill[variant];
|
|
62
70
|
return useRender({
|
|
63
71
|
render: render ?? /* @__PURE__ */ jsx("span", {}),
|
|
64
72
|
ref,
|
|
65
73
|
props: mergeProps(rest, {
|
|
66
74
|
className: cx("inline-flex items-center border font-medium no-underline", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-focus)", sizeClasses[size], padClasses[shape][size], shapeClasses[shape], caps && "uppercase tracking-wider", truncate && "min-w-0 max-w-full", emphasisClasses[emphasis][variant], className),
|
|
67
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
] })
|
|
75
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [(pulse || dot) && /* @__PURE__ */ jsx(StatusDot, {
|
|
76
|
+
variant,
|
|
77
|
+
pulse,
|
|
78
|
+
size: pulse ? 8 : 6,
|
|
79
|
+
current: emphasis === "solid",
|
|
80
|
+
className: "shrink-0"
|
|
81
|
+
}), truncate ? /* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: "min-w-0 truncate",
|
|
83
|
+
children
|
|
84
|
+
}) : children] })
|
|
78
85
|
})
|
|
79
86
|
});
|
|
80
87
|
}
|
|
@@ -99,8 +106,13 @@ function CountBadge({ count, max = 99, variant = "accent", emphasis = "solid", s
|
|
|
99
106
|
})]
|
|
100
107
|
});
|
|
101
108
|
}
|
|
102
|
-
|
|
109
|
+
/** A status's dot in its tone with a soft halo, for a status that stands beside its words
|
|
110
|
+
* without a badge, such as "running" in a list's cell. A badge's own dot is this one. Name
|
|
111
|
+
* the status in words beside it; the dot alone is only seen. */
|
|
112
|
+
function StatusDot({ variant = "default", pulse = false, size = 8, current = false, className, style, ...rest }) {
|
|
113
|
+
const fill = current ? "bg-current" : dotFill[variant];
|
|
103
114
|
return /* @__PURE__ */ jsxs("span", {
|
|
115
|
+
"aria-hidden": "true",
|
|
104
116
|
...rest,
|
|
105
117
|
className: cx("relative inline-flex", className),
|
|
106
118
|
style: {
|
|
@@ -108,8 +120,8 @@ function StatusDot({ variant = "default", pulse = false, size = 8, className, st
|
|
|
108
120
|
width: size,
|
|
109
121
|
height: size
|
|
110
122
|
},
|
|
111
|
-
children: [pulse && /* @__PURE__ */ jsx("span", { className: cx("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 motion-reduce:hidden",
|
|
112
|
-
className: cx("relative inline-flex rounded-full",
|
|
123
|
+
children: [pulse && /* @__PURE__ */ jsx("span", { className: cx("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 motion-reduce:hidden", fill) }), /* @__PURE__ */ jsx("span", {
|
|
124
|
+
className: cx("relative inline-flex rounded-full", fill, !current && dotHalo[variant]),
|
|
113
125
|
style: {
|
|
114
126
|
width: size,
|
|
115
127
|
height: size
|
|
@@ -2,6 +2,8 @@ interface IBaseCheckmarkProps {
|
|
|
2
2
|
className?: string;
|
|
3
3
|
colored?: boolean;
|
|
4
4
|
}
|
|
5
|
+
/** Something done: a solid disc in the success tone with a check cut out of it. */
|
|
5
6
|
export declare function SuccessCheckmark({ className, colored }: IBaseCheckmarkProps): import("react").JSX.Element;
|
|
7
|
+
/** Something failed: a solid disc in the error tone with an x cut out of it. */
|
|
6
8
|
export declare function ErrorCheckmark({ className, colored }: IBaseCheckmarkProps): import("react").JSX.Element;
|
|
7
9
|
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
|
-
import {
|
|
2
|
+
import { FailFilledIcon, SuccessFilledIcon } from "../icons.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/StatusIcons.tsx
|
|
5
|
+
/** Something done: a solid disc in the success tone with a check cut out of it. */
|
|
5
6
|
function SuccessCheckmark({ className, colored = true }) {
|
|
6
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
+
return /* @__PURE__ */ jsx(SuccessFilledIcon, { className: cx(colored && "text-(--theme-success)", className) });
|
|
7
8
|
}
|
|
9
|
+
/** Something failed: a solid disc in the error tone with an x cut out of it. */
|
|
8
10
|
function ErrorCheckmark({ className, colored = true }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
+
return /* @__PURE__ */ jsx(FailFilledIcon, { className: cx(colored && "text-(--theme-error)", className) });
|
|
10
12
|
}
|
|
11
13
|
//#endregion
|
|
12
14
|
export { ErrorCheckmark, SuccessCheckmark };
|
package/dist/icons.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode, type SVGProps } from 'react';
|
|
2
2
|
export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
|
|
3
3
|
/** Width and height; the text's size by default. */
|
|
4
4
|
size?: string | number | undefined;
|
|
@@ -284,6 +284,19 @@ export declare const WorkspaceMountIcon: IconType;
|
|
|
284
284
|
export declare const ZipIcon: IconType;
|
|
285
285
|
export declare const ZoomInIcon: IconType;
|
|
286
286
|
export declare const ZoomOutIcon: IconType;
|
|
287
|
+
/** Done: a solid disc with a check cut out of it. */
|
|
288
|
+
export declare const SuccessFilledIcon: IconType;
|
|
289
|
+
/** Failed: a solid disc with an x cut out of it. */
|
|
290
|
+
export declare const FailFilledIcon: IconType;
|
|
291
|
+
/** Canceled: a solid disc with a dash cut out of it. */
|
|
292
|
+
export declare const CancelFilledIcon: IconType;
|
|
293
|
+
/** Done with problems: a solid triangle with an exclamation mark cut out of it. */
|
|
294
|
+
export declare const WarningFilledIcon: IconType;
|
|
295
|
+
/** Under way: a faint track, a quarter arc that turns around it and a center dot that breathes.
|
|
296
|
+
* Both hold still for a reader who asks for reduced motion. */
|
|
297
|
+
export declare function RunningRingIcon({ children, color, ...props }: IconProps): import("react").JSX.Element;
|
|
298
|
+
/** Waiting to start: a dashed ring, eight even dashes around it. */
|
|
299
|
+
export declare const PendingRingIcon: IconType;
|
|
287
300
|
export { ErrorCheckmark, SuccessCheckmark } from './components/StatusIcons.js';
|
|
288
301
|
/** @deprecated Renamed NamespaceIcon, which says what it means. */
|
|
289
302
|
export declare const KubernetesNamespaceIcon: IconType;
|
package/dist/icons.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ErrorCheckmark, SuccessCheckmark } from "./components/StatusIcons.js";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
//#region src/icons.tsx
|
|
4
5
|
var STROKE_WIDTH = 1.5;
|
|
@@ -306,6 +307,108 @@ var WorkspaceMountIcon = /* @__PURE__ */ drawn("M2 4.5A1.5 1.5 0 0 1 3.5 3h2.6l1
|
|
|
306
307
|
var ZipIcon = /* @__PURE__ */ drawn("M9.5 1.75h-5a1 1 0 0 0-1 1v10.5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V4.75ZM9.5 1.75v3h3M6.5 4h.01M6.5 6.5h.01M6.5 8.75v1.25M6.5 12.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z");
|
|
307
308
|
var ZoomInIcon = /* @__PURE__ */ drawn("M7 12A5 5 0 1 0 7 2a5 5 0 0 0 0 10ZM14 14l-3.5-3.5M7 5v4M5 7h4");
|
|
308
309
|
var ZoomOutIcon = /* @__PURE__ */ drawn("M7 12A5 5 0 1 0 7 2a5 5 0 0 0 0 10ZM14 14l-3.5-3.5M5 7h4");
|
|
310
|
+
var DISC = "M8 14.75A6.75 6.75 0 1 0 8 1.25a6.75 6.75 0 0 0 0 13.5Z";
|
|
311
|
+
var TRIANGLE = "M7.13 1.9a1 1 0 0 1 1.74 0l6.1 10.6a1 1 0 0 1-.87 1.5H1.9a1 1 0 0 1-.87-1.5Z";
|
|
312
|
+
var KNOCKOUT_WIDTH = 1.6;
|
|
313
|
+
/** The `svg` every status icon shares: the 16px grid at the text's size, hidden from assistive
|
|
314
|
+
* technology unless a title or label names it. */
|
|
315
|
+
function StatusSvg({ title, children, size = "1em", color = "currentColor", strokeWidth = STROKE_WIDTH, ...props }) {
|
|
316
|
+
const named = Boolean(title || props["aria-label"] || props["aria-labelledby"]);
|
|
317
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
318
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
319
|
+
viewBox: "0 0 16 16",
|
|
320
|
+
width: size,
|
|
321
|
+
height: size,
|
|
322
|
+
fill: "none",
|
|
323
|
+
stroke: color,
|
|
324
|
+
strokeWidth,
|
|
325
|
+
strokeLinecap: "round",
|
|
326
|
+
strokeLinejoin: "round",
|
|
327
|
+
...named ? { role: "img" } : { "aria-hidden": true },
|
|
328
|
+
...props,
|
|
329
|
+
children: [title && /* @__PURE__ */ jsx("title", { children: title }), children]
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
/** A solid `shape` with `mark` cut out of it. The mask's id is the instance's own, so two on a
|
|
333
|
+
* page never borrow each other's. */
|
|
334
|
+
function knockedOut(shape, mark) {
|
|
335
|
+
function Icon({ children, color = "currentColor", ...props }) {
|
|
336
|
+
const id = `status-mask-${useId().replace(/[^\w-]/g, "")}`;
|
|
337
|
+
return /* @__PURE__ */ jsxs(StatusSvg, {
|
|
338
|
+
color,
|
|
339
|
+
"data-status-icon": "filled",
|
|
340
|
+
...props,
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ jsxs("mask", {
|
|
343
|
+
id,
|
|
344
|
+
maskUnits: "userSpaceOnUse",
|
|
345
|
+
x: "0",
|
|
346
|
+
y: "0",
|
|
347
|
+
width: "16",
|
|
348
|
+
height: "16",
|
|
349
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
350
|
+
width: "16",
|
|
351
|
+
height: "16",
|
|
352
|
+
fill: "#fff",
|
|
353
|
+
stroke: "none"
|
|
354
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
355
|
+
d: mark,
|
|
356
|
+
stroke: "#000",
|
|
357
|
+
strokeWidth: KNOCKOUT_WIDTH
|
|
358
|
+
})]
|
|
359
|
+
}),
|
|
360
|
+
/* @__PURE__ */ jsx("path", {
|
|
361
|
+
d: shape,
|
|
362
|
+
fill: color,
|
|
363
|
+
stroke: "none",
|
|
364
|
+
mask: `url(#${id})`
|
|
365
|
+
}),
|
|
366
|
+
children
|
|
367
|
+
]
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
return Icon;
|
|
371
|
+
}
|
|
372
|
+
/** Done: a solid disc with a check cut out of it. */
|
|
373
|
+
var SuccessFilledIcon = /* @__PURE__ */ knockedOut(DISC, "M5.25 8.25 7 10l3.5-4");
|
|
374
|
+
/** Failed: a solid disc with an x cut out of it. */
|
|
375
|
+
var FailFilledIcon = /* @__PURE__ */ knockedOut(DISC, "M6 6l4 4M10 6l-4 4");
|
|
376
|
+
/** Canceled: a solid disc with a dash cut out of it. */
|
|
377
|
+
var CancelFilledIcon = /* @__PURE__ */ knockedOut(DISC, "M5.5 8h5");
|
|
378
|
+
/** Done with problems: a solid triangle with an exclamation mark cut out of it. */
|
|
379
|
+
var WarningFilledIcon = /* @__PURE__ */ knockedOut(TRIANGLE, "M8 6v3M8 11.4h.01");
|
|
380
|
+
/** Under way: a faint track, a quarter arc that turns around it and a center dot that breathes.
|
|
381
|
+
* Both hold still for a reader who asks for reduced motion. */
|
|
382
|
+
function RunningRingIcon({ children, color = "currentColor", ...props }) {
|
|
383
|
+
return /* @__PURE__ */ jsxs(StatusSvg, {
|
|
384
|
+
color,
|
|
385
|
+
"data-status-icon": "ring",
|
|
386
|
+
...props,
|
|
387
|
+
children: [
|
|
388
|
+
/* @__PURE__ */ jsx("circle", {
|
|
389
|
+
cx: "8",
|
|
390
|
+
cy: "8",
|
|
391
|
+
r: "6",
|
|
392
|
+
opacity: "0.25"
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ jsx("path", {
|
|
395
|
+
d: "M8 2a6 6 0 0 1 6 6",
|
|
396
|
+
className: "origin-center [transform-box:view-box] motion-safe:animate-[spin_1.6s_linear_infinite]"
|
|
397
|
+
}),
|
|
398
|
+
/* @__PURE__ */ jsx("circle", {
|
|
399
|
+
cx: "8",
|
|
400
|
+
cy: "8",
|
|
401
|
+
r: "2.6",
|
|
402
|
+
fill: color,
|
|
403
|
+
stroke: "none",
|
|
404
|
+
className: "motion-safe:animate-pulse"
|
|
405
|
+
}),
|
|
406
|
+
children
|
|
407
|
+
]
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
/** Waiting to start: a dashed ring, eight even dashes around it. */
|
|
411
|
+
var PendingRingIcon = /* @__PURE__ */ drawn("M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12Z", { strokeDasharray: "2.2 2.5124" });
|
|
309
412
|
/** @deprecated Renamed NamespaceIcon, which says what it means. */
|
|
310
413
|
var KubernetesNamespaceIcon = NamespaceIcon;
|
|
311
414
|
/** @deprecated Renamed CommandShellIcon, which says what it means. */
|
|
@@ -313,4 +416,4 @@ var PowershellIcon = CommandShellIcon;
|
|
|
313
416
|
/** @deprecated Renamed QuickActionIcon, which says what it means. */
|
|
314
417
|
var ZapIcon = QuickActionIcon;
|
|
315
418
|
//#endregion
|
|
316
|
-
export { APIIcon, AccessIcon, AddAllocationIcon, AddIcon, AddProjectIcon, AddUserIcon, AgentIcon, AiProviderIcon, AllocationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArticleIcon, AttachmentIcon, AuthenticationIcon, BannerIcon, BillingIcon, BranchIcon, BriefcaseIcon, BucketIcon, BuildWorkflowIcon, CalendarIcon, CancelIcon, CelebrateIcon, CertificateIcon, ChangesRequestedIcon, ChartIcon, ChatIcon, CheckIcon, ChevronDoubleDownIcon, ChevronDoubleUpIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClipboardCheckIcon, ClockIcon, CloseIcon, CloudIcon, CloudNetworkIcon, ClusterIcon, CodeIcon, CollapseIcon, ColumnsIcon, CommandShellIcon, CommentIcon, CommitIcon, ComputeIcon, ConfigIcon, ConnectIcon, ContractIcon, CopyIcon, CustomizeIcon, DefaultIcon, DefinitionIcon, DeprovisionIcon, DesktopIcon, DestroyIcon, DeviceIcon, DirectoryIcon, DirectorySyncIcon, DisableCostIcon, DisableUserIcon, DisconnectIcon, DiskIcon, DisplayIcon, DownloadIcon, DragHandleIcon, DuplicateIcon, EditIcon, EditorIcon, EducationIcon, EnableCostIcon, EnableUserIcon, EndpointIcon, ErrorCheckmark, ErrorIcon, EventsIcon, ExpandIcon, ExpandVerticalIcon, ExpiredIcon, ExpiringIcon, ExpressionIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FailIcon, FavoriteIcon, FavoriteOutlineIcon, FeaturedIcon, FileIcon, FileTextIcon, FilesIcon, FilesystemIcon, FilterClearIcon, FilterIcon, FlaggedIcon, FlaskIcon, FolderIcon, FolderOpenIcon, FolderTreeIcon, ForbiddenIcon, ForkIcon, GearsIcon, GlobeIcon, GovernmentIcon, GraphIcon, GridIcon, HealthMonitoringIcon, HelpIcon, HistoryIcon, HomeIcon, IdCardIcon, ImageIcon, ImpersonateIcon, InboxIcon, IndexIcon, InfoIcon, InfrastructureLayersIcon, InputFormIcon, InstallIcon, InstanceIcon, InstanceTypeIcon, IpAddressIcon, IssueIcon, JobIcon, JsonIcon, KeyIcon, KeyboardIcon, KubernetesNamespaceIcon, LanguageIcon, LegalIcon, LibraryIcon, LicenseIcon, LinkIcon, ListViewIcon, LoadingIcon, LockIcon, LogsIcon, MFAIcon, MachineImageIcon, MailFailedIcon, MailIcon, MailVerifiedIcon, MapPinIcon, MarketplaceIcon, MatrixIcon, MegaphoneIcon, MigrationIcon, MinimizeIcon, MinusIcon, MlIcon, MoneyIcon, MoonIcon, MoreIcon, MusicIcon, MuteIcon, NamespaceIcon, NavigationIcon, NetworkInterfaceIcon, NetworkShareIcon, NewChatIcon, NodeIcon, NotRunningIcon, NotebookIcon, NotificationIcon, OnboardingIcon, OpenInNewGraphIcon, OrganizationIcon, OwnerIcon, PartnerIcon, PasswordIcon, PauseIcon, PdfIcon, PendingIcon, PhoneIcon, PieChartIcon, PinFilledIcon, PinIcon, PowerIcon, PowershellIcon, PreviewIcon, PrintIcon, ProjectIcon, ProvisionIcon, PublishIcon, PullRequestIcon, QRCodeIcon, QueueIcon, QuickActionIcon, QuotaIcon, RedoIcon, RefreshIcon, ReleaseIcon, RemoveIcon, RemoveUserIcon, RenameIcon, RenewIcon, ReportIcon, RepositoryIcon, ResetIcon, ResetLayoutIcon, ResourceGroupIcon, ResourceIcon, RestartIcon, RestoreIcon, RetryIcon, RevokeIcon, RoleIcon, RollbackIcon, RunWorkflowIcon, RunningIcon, RunsIcon, SaveIcon, SchedulerIcon, ScriptIcon, SearchIcon, SendIcon, ServiceIcon, SessionIcon, SettingsIcon, ShareIcon, SharedIcon, ShieldIcon, ShieldOffIcon, ShrinkIcon, SidebarCloseIcon, SidebarIcon, SidebarOpenIcon, SignInIcon, SignOutIcon, SkipIcon, SnapshotIcon, SortDownIcon, SortUnsortedIcon, SortUpIcon, SparklesIcon, SplitIcon, SpreadsheetIcon, StartIcon, StopIcon, StorageIcon, SubdomainIcon, SuccessCheckmark, SuccessIcon, SummaryIcon, SunIcon, SupportIcon, SwapIcon, TagIcon, TerminalIcon, ThinkingIcon, TodoIcon, TokenIcon, ToolsIcon, TrashIcon, TunnelIcon, UndoIcon, UnfavoriteIcon, UnlinkIcon, UnmuteIcon, UnsplitIcon, UploadIcon, UserIcon, UserWorkspaceIcon, UsersIcon, VariableIcon, VerifiedIcon, VideoIcon, WarningIcon, WebhookIcon, WorkerIcon, WorkflowIcon, WorkloadIcon, WorkspaceMountIcon, ZapIcon, ZipIcon, ZoomInIcon, ZoomOutIcon };
|
|
419
|
+
export { APIIcon, AccessIcon, AddAllocationIcon, AddIcon, AddProjectIcon, AddUserIcon, AgentIcon, AiProviderIcon, AllocationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArticleIcon, AttachmentIcon, AuthenticationIcon, BannerIcon, BillingIcon, BranchIcon, BriefcaseIcon, BucketIcon, BuildWorkflowIcon, CalendarIcon, CancelFilledIcon, CancelIcon, CelebrateIcon, CertificateIcon, ChangesRequestedIcon, ChartIcon, ChatIcon, CheckIcon, ChevronDoubleDownIcon, ChevronDoubleUpIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClipboardCheckIcon, ClockIcon, CloseIcon, CloudIcon, CloudNetworkIcon, ClusterIcon, CodeIcon, CollapseIcon, ColumnsIcon, CommandShellIcon, CommentIcon, CommitIcon, ComputeIcon, ConfigIcon, ConnectIcon, ContractIcon, CopyIcon, CustomizeIcon, DefaultIcon, DefinitionIcon, DeprovisionIcon, DesktopIcon, DestroyIcon, DeviceIcon, DirectoryIcon, DirectorySyncIcon, DisableCostIcon, DisableUserIcon, DisconnectIcon, DiskIcon, DisplayIcon, DownloadIcon, DragHandleIcon, DuplicateIcon, EditIcon, EditorIcon, EducationIcon, EnableCostIcon, EnableUserIcon, EndpointIcon, ErrorCheckmark, ErrorIcon, EventsIcon, ExpandIcon, ExpandVerticalIcon, ExpiredIcon, ExpiringIcon, ExpressionIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FailFilledIcon, FailIcon, FavoriteIcon, FavoriteOutlineIcon, FeaturedIcon, FileIcon, FileTextIcon, FilesIcon, FilesystemIcon, FilterClearIcon, FilterIcon, FlaggedIcon, FlaskIcon, FolderIcon, FolderOpenIcon, FolderTreeIcon, ForbiddenIcon, ForkIcon, GearsIcon, GlobeIcon, GovernmentIcon, GraphIcon, GridIcon, HealthMonitoringIcon, HelpIcon, HistoryIcon, HomeIcon, IdCardIcon, ImageIcon, ImpersonateIcon, InboxIcon, IndexIcon, InfoIcon, InfrastructureLayersIcon, InputFormIcon, InstallIcon, InstanceIcon, InstanceTypeIcon, IpAddressIcon, IssueIcon, JobIcon, JsonIcon, KeyIcon, KeyboardIcon, KubernetesNamespaceIcon, LanguageIcon, LegalIcon, LibraryIcon, LicenseIcon, LinkIcon, ListViewIcon, LoadingIcon, LockIcon, LogsIcon, MFAIcon, MachineImageIcon, MailFailedIcon, MailIcon, MailVerifiedIcon, MapPinIcon, MarketplaceIcon, MatrixIcon, MegaphoneIcon, MigrationIcon, MinimizeIcon, MinusIcon, MlIcon, MoneyIcon, MoonIcon, MoreIcon, MusicIcon, MuteIcon, NamespaceIcon, NavigationIcon, NetworkInterfaceIcon, NetworkShareIcon, NewChatIcon, NodeIcon, NotRunningIcon, NotebookIcon, NotificationIcon, OnboardingIcon, OpenInNewGraphIcon, OrganizationIcon, OwnerIcon, PartnerIcon, PasswordIcon, PauseIcon, PdfIcon, PendingIcon, PendingRingIcon, PhoneIcon, PieChartIcon, PinFilledIcon, PinIcon, PowerIcon, PowershellIcon, PreviewIcon, PrintIcon, ProjectIcon, ProvisionIcon, PublishIcon, PullRequestIcon, QRCodeIcon, QueueIcon, QuickActionIcon, QuotaIcon, RedoIcon, RefreshIcon, ReleaseIcon, RemoveIcon, RemoveUserIcon, RenameIcon, RenewIcon, ReportIcon, RepositoryIcon, ResetIcon, ResetLayoutIcon, ResourceGroupIcon, ResourceIcon, RestartIcon, RestoreIcon, RetryIcon, RevokeIcon, RoleIcon, RollbackIcon, RunWorkflowIcon, RunningIcon, RunningRingIcon, RunsIcon, SaveIcon, SchedulerIcon, ScriptIcon, SearchIcon, SendIcon, ServiceIcon, SessionIcon, SettingsIcon, ShareIcon, SharedIcon, ShieldIcon, ShieldOffIcon, ShrinkIcon, SidebarCloseIcon, SidebarIcon, SidebarOpenIcon, SignInIcon, SignOutIcon, SkipIcon, SnapshotIcon, SortDownIcon, SortUnsortedIcon, SortUpIcon, SparklesIcon, SplitIcon, SpreadsheetIcon, StartIcon, StopIcon, StorageIcon, SubdomainIcon, SuccessCheckmark, SuccessFilledIcon, SuccessIcon, SummaryIcon, SunIcon, SupportIcon, SwapIcon, TagIcon, TerminalIcon, ThinkingIcon, TodoIcon, TokenIcon, ToolsIcon, TrashIcon, TunnelIcon, UndoIcon, UnfavoriteIcon, UnlinkIcon, UnmuteIcon, UnsplitIcon, UploadIcon, UserIcon, UserWorkspaceIcon, UsersIcon, VariableIcon, VerifiedIcon, VideoIcon, WarningFilledIcon, WarningIcon, WebhookIcon, WorkerIcon, WorkflowIcon, WorkloadIcon, WorkspaceMountIcon, ZapIcon, ZipIcon, ZoomInIcon, ZoomOutIcon };
|