devnonla-ui 0.1.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/LICENSE +21 -0
- package/README.md +140 -0
- package/package.json +66 -0
- package/src/alert/Alert.tsx +109 -0
- package/src/app/App.tsx +36 -0
- package/src/button/Button.tsx +278 -0
- package/src/button/ButtonCopy.tsx +60 -0
- package/src/calendar/Calendar.tsx +133 -0
- package/src/chat/AgentPanel.tsx +203 -0
- package/src/chat/common/bgTasks.ts +41 -0
- package/src/chat/common/sse.ts +156 -0
- package/src/chat/common/types.ts +43 -0
- package/src/chat/common/useAgentStream.ts +351 -0
- package/src/chat/common/utils.ts +73 -0
- package/src/chat/index.ts +56 -0
- package/src/chat/message-ui/ChatAgentMessage.tsx +29 -0
- package/src/chat/message-ui/ChatError.tsx +24 -0
- package/src/chat/message-ui/ChatInput.tsx +162 -0
- package/src/chat/message-ui/ChatMarkdown.tsx +128 -0
- package/src/chat/message-ui/ChatMarkdownTable.tsx +45 -0
- package/src/chat/message-ui/ChatSpinner.tsx +5 -0
- package/src/chat/message-ui/ChatThinking.tsx +61 -0
- package/src/chat/message-ui/ChatUserMessage.tsx +72 -0
- package/src/chat/message-ui/ChatWelcome.tsx +70 -0
- package/src/chat/message-ui/MermaidBlock.tsx +266 -0
- package/src/chat/message-ui/mermaidFence.ts +55 -0
- package/src/chat/message-ui/sanitizeMermaid.ts +135 -0
- package/src/chat/tool-ui/BackgroundTaskToolUI.tsx +36 -0
- package/src/chat/tool-ui/BackgroundTasksBar.tsx +152 -0
- package/src/chat/tool-ui/CallAgentToolUI.tsx +168 -0
- package/src/chat/tool-ui/ChatToolCall.tsx +77 -0
- package/src/chat/tool-ui/GetCurrentTimeToolUI.tsx +49 -0
- package/src/chat/tool-ui/ReadSkillToolUI.tsx +80 -0
- package/src/chat/tool-ui/RunJsToolUI.tsx +106 -0
- package/src/chat/tool-ui/ToolUiBadge.tsx +10 -0
- package/src/chat/tool-ui/ToolUiTrailing.tsx +24 -0
- package/src/chat/tool-ui/WebFetchToolUI.tsx +53 -0
- package/src/chat/tool-ui/registry.ts +29 -0
- package/src/chat/tool-ui/types.ts +22 -0
- package/src/checkbox/Checkbox.tsx +50 -0
- package/src/codeblock/CodeBlock.tsx +76 -0
- package/src/codeblock/highlight.ts +159 -0
- package/src/colorpicker/ColorPicker.tsx +45 -0
- package/src/datepicker/DatePicker.tsx +481 -0
- package/src/desktop/DesktopHeader.tsx +92 -0
- package/src/desktop/DesktopIcon.tsx +34 -0
- package/src/desktop/DesktopStage.tsx +6 -0
- package/src/desktop/DesktopWindow.tsx +504 -0
- package/src/desktop/MeadowDesktop.tsx +15 -0
- package/src/desktop/MeadowShell.tsx +12 -0
- package/src/desktop/MeadowWallpaper.tsx +5 -0
- package/src/desktop/assets/desktop-meadow.jpg +0 -0
- package/src/desktop/assets.d.ts +9 -0
- package/src/desktop/surface.ts +1 -0
- package/src/drawer/Drawer.tsx +125 -0
- package/src/dropdown/ContextMenu.tsx +97 -0
- package/src/dropdown/Dropdown.tsx +139 -0
- package/src/dropdown/menuClasses.ts +9 -0
- package/src/empty/Empty.tsx +47 -0
- package/src/form/Form.tsx +95 -0
- package/src/form/FormItem.tsx +145 -0
- package/src/form/common/context.ts +13 -0
- package/src/form/common/enum.ts +20 -0
- package/src/form/common/rules.ts +68 -0
- package/src/form/common/types.ts +169 -0
- package/src/form/index.ts +35 -0
- package/src/form/partials/FormItemHelps.tsx +31 -0
- package/src/form/variants/FieldCheckbox.tsx +20 -0
- package/src/form/variants/FieldColor.tsx +63 -0
- package/src/form/variants/FieldDateTime.tsx +25 -0
- package/src/form/variants/FieldHidden.tsx +9 -0
- package/src/form/variants/FieldInput.tsx +24 -0
- package/src/form/variants/FieldNumber.tsx +28 -0
- package/src/form/variants/FieldObject.tsx +29 -0
- package/src/form/variants/FieldRadio.tsx +40 -0
- package/src/form/variants/FieldRepeater.tsx +62 -0
- package/src/form/variants/FieldRepeaterItem.tsx +64 -0
- package/src/form/variants/FieldSelect.tsx +27 -0
- package/src/form/variants/FieldSelectMultiple.tsx +32 -0
- package/src/form/variants/FieldSelectRemote.tsx +66 -0
- package/src/form/variants/FieldSwitch.tsx +17 -0
- package/src/form/variants/FieldTextarea.tsx +25 -0
- package/src/form/variants/FieldTime.tsx +25 -0
- package/src/form-layout/FormLayout.tsx +74 -0
- package/src/icon/FluentIcon.tsx +28 -0
- package/src/icon/fluent.ts +75 -0
- package/src/index.ts +214 -0
- package/src/input/Input.tsx +371 -0
- package/src/input/SearchInput.tsx +73 -0
- package/src/lib/cn.ts +6 -0
- package/src/lib/placement.ts +44 -0
- package/src/lib/sizes.ts +117 -0
- package/src/lib/surface.ts +8 -0
- package/src/menu/Menu.tsx +98 -0
- package/src/message/message.tsx +214 -0
- package/src/modal/Modal.tsx +277 -0
- package/src/pagination/Pagination.tsx +103 -0
- package/src/popconfirm/Popconfirm.tsx +134 -0
- package/src/popover/Popover.tsx +116 -0
- package/src/scroll/OverlayScroll.tsx +141 -0
- package/src/segmented/Segmented.tsx +67 -0
- package/src/select/Select.tsx +319 -0
- package/src/skeleton/Skeleton.tsx +47 -0
- package/src/spin/Spin.tsx +160 -0
- package/src/styles.css +897 -0
- package/src/switch/Switch.tsx +58 -0
- package/src/table/Table.tsx +387 -0
- package/src/tag/Tag.tsx +109 -0
- package/src/theme.ts +131 -0
- package/src/timepicker/TimePicker.tsx +751 -0
- package/src/tooltip/Tooltip.tsx +59 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import type { ControllerRenderProps, FieldValues } from "react-hook-form";
|
|
3
|
+
import { Select } from "../../select/Select";
|
|
4
|
+
import { useFormExtra } from "../common/context";
|
|
5
|
+
import type { ISelectItemProps } from "../common/types";
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
field: ControllerRenderProps<FieldValues, string>;
|
|
9
|
+
endpoint: string;
|
|
10
|
+
keyProp: string;
|
|
11
|
+
labelProp: string;
|
|
12
|
+
dataProp?: string;
|
|
13
|
+
status?: "error" | "warning";
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function FieldSelectRemote({ field, endpoint, keyProp, labelProp, dataProp, status }: Props) {
|
|
17
|
+
const { fetcher } = useFormExtra();
|
|
18
|
+
const [loading, setLoading] = useState(false);
|
|
19
|
+
const [choices, setChoices] = useState<ISelectItemProps[]>([]);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
let cancelled = false;
|
|
23
|
+
const load = async () => {
|
|
24
|
+
if (!endpoint || !fetcher) return;
|
|
25
|
+
setLoading(true);
|
|
26
|
+
try {
|
|
27
|
+
const rs = await fetcher(endpoint);
|
|
28
|
+
if (cancelled) return;
|
|
29
|
+
const arr = dataProp && rs && typeof rs === "object" ? (rs as Record<string, unknown>)[dataProp] : rs;
|
|
30
|
+
if (Array.isArray(arr)) {
|
|
31
|
+
setChoices(
|
|
32
|
+
arr.map((item) => {
|
|
33
|
+
const row = item as Record<string, unknown>;
|
|
34
|
+
return {
|
|
35
|
+
value: row[keyProp ?? "key"] as string | number,
|
|
36
|
+
label: String(row[labelProp ?? "label"] ?? ""),
|
|
37
|
+
};
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
} catch (err) {
|
|
42
|
+
console.error("[nonla-ui Form] select_remote fetch failed:", err);
|
|
43
|
+
} finally {
|
|
44
|
+
if (!cancelled) setLoading(false);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
void load();
|
|
48
|
+
return () => {
|
|
49
|
+
cancelled = true;
|
|
50
|
+
};
|
|
51
|
+
}, [endpoint, keyProp, labelProp, dataProp, fetcher]);
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<Select
|
|
55
|
+
className="w-full"
|
|
56
|
+
value={field.value == null || field.value === "" ? null : (field.value as string | number)}
|
|
57
|
+
onChange={(v) => field.onChange(v)}
|
|
58
|
+
placeholder={loading ? "Loading..." : "Select..."}
|
|
59
|
+
disabled={loading && choices.length === 0}
|
|
60
|
+
allowClear
|
|
61
|
+
showSearch
|
|
62
|
+
status={status}
|
|
63
|
+
options={choices.map((c) => ({ label: c.label, value: c.value }))}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ControllerRenderProps, FieldValues } from "react-hook-form";
|
|
2
|
+
import { Switch } from "../../switch/Switch";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
field: ControllerRenderProps<FieldValues, string>;
|
|
6
|
+
options?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export function FieldSwitch({ field, options }: Props) {
|
|
10
|
+
return (
|
|
11
|
+
<Switch
|
|
12
|
+
checked={Boolean(field.value)}
|
|
13
|
+
onChange={(checked) => field.onChange(checked)}
|
|
14
|
+
disabled={options?.disabled as boolean | undefined}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ControllerRenderProps, FieldValues } from "react-hook-form";
|
|
2
|
+
import { Input } from "../../input/Input";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
field: ControllerRenderProps<FieldValues, string>;
|
|
6
|
+
options?: Record<string, unknown>;
|
|
7
|
+
status?: "error" | "warning";
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export function FieldTextarea({ field, options, status }: Props) {
|
|
11
|
+
const { value, onChange, onBlur, name, ref } = field;
|
|
12
|
+
return (
|
|
13
|
+
<Input.TextArea
|
|
14
|
+
className="w-full"
|
|
15
|
+
name={name}
|
|
16
|
+
ref={ref as never}
|
|
17
|
+
onBlur={onBlur}
|
|
18
|
+
value={value == null ? "" : String(value)}
|
|
19
|
+
onChange={(e) => onChange(e.target.value)}
|
|
20
|
+
status={status}
|
|
21
|
+
rows={4}
|
|
22
|
+
{...(options as object)}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ControllerRenderProps, FieldValues } from "react-hook-form";
|
|
2
|
+
import { TimePicker } from "../../timepicker/TimePicker";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
field: ControllerRenderProps<FieldValues, string>;
|
|
6
|
+
options?: Record<string, unknown>;
|
|
7
|
+
status?: "error" | "warning";
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export function FieldTime({ field, options, status }: Props) {
|
|
11
|
+
const opts = options ?? {};
|
|
12
|
+
return (
|
|
13
|
+
<TimePicker
|
|
14
|
+
className="w-full"
|
|
15
|
+
value={(field.value as string | Date | null) ?? null}
|
|
16
|
+
onChange={(time) => field.onChange(time)}
|
|
17
|
+
placeholder={(opts.placeholder as string) ?? "Select time"}
|
|
18
|
+
status={status}
|
|
19
|
+
format={opts.format as "HH:mm" | "HH:mm:ss" | undefined}
|
|
20
|
+
use12Hours={opts.use12Hours as boolean | undefined}
|
|
21
|
+
allowClear={opts.allowClear !== false}
|
|
22
|
+
disabled={opts.disabled as boolean | undefined}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
|
|
4
|
+
export type FormLayoutProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
/** antd Form layout — only vertical is used in this app. */
|
|
6
|
+
layout?: "horizontal" | "vertical" | "inline";
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
function FormRoot({ layout = "vertical", className, children, ...rest }: FormLayoutProps) {
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
className={cn(
|
|
14
|
+
layout === "inline" ? "flex flex-row flex-wrap items-end gap-3" : "flex flex-col gap-4",
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
data-layout={layout}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type FormLayoutItemProps = {
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
/** antd `extra` — help text under the control. */
|
|
29
|
+
extra?: ReactNode;
|
|
30
|
+
help?: ReactNode;
|
|
31
|
+
validateStatus?: "success" | "warning" | "error" | "validating";
|
|
32
|
+
layout?: "horizontal" | "vertical";
|
|
33
|
+
className?: string;
|
|
34
|
+
children?: ReactNode;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
function FormItem({
|
|
38
|
+
label,
|
|
39
|
+
required,
|
|
40
|
+
extra,
|
|
41
|
+
help,
|
|
42
|
+
validateStatus,
|
|
43
|
+
layout = "vertical",
|
|
44
|
+
className,
|
|
45
|
+
children,
|
|
46
|
+
}: FormLayoutItemProps) {
|
|
47
|
+
const error = validateStatus === "error";
|
|
48
|
+
return (
|
|
49
|
+
<div
|
|
50
|
+
className={cn(
|
|
51
|
+
layout === "horizontal" ? "flex flex-row items-start gap-3" : "flex flex-col gap-1.5",
|
|
52
|
+
className,
|
|
53
|
+
)}
|
|
54
|
+
>
|
|
55
|
+
{label != null && label !== false ? (
|
|
56
|
+
<label className={cn("text-sm text-foreground", layout === "horizontal" && "pt-1.5 shrink-0")}>
|
|
57
|
+
{label}
|
|
58
|
+
{required ? <span className="ml-1 text-destructive">*</span> : null}
|
|
59
|
+
</label>
|
|
60
|
+
) : null}
|
|
61
|
+
<div className="min-w-0 flex-1">
|
|
62
|
+
{children}
|
|
63
|
+
{extra != null && extra !== "" ? <div className="mt-1 pl-2.75 text-xs leading-snug text-muted-foreground">{extra}</div> : null}
|
|
64
|
+
{help != null && help !== "" ? (
|
|
65
|
+
<div className={cn("mt-1 pl-2.75 text-xs leading-snug", error ? "text-destructive" : "text-muted-foreground")}>{help}</div>
|
|
66
|
+
) : null}
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Layout-only Form (antd Form / Form.Item drop-in). Schema forms use `SchemaForm`. */
|
|
73
|
+
export const Form = Object.assign(FormRoot, { Item: FormItem });
|
|
74
|
+
export { FormItem };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
import { ensureFluentIcons, getFluentImgSrc } from "./fluent";
|
|
4
|
+
|
|
5
|
+
export function FluentIcon({ name, size = 16, className }: { name: string; size?: number; className?: string }) {
|
|
6
|
+
const [src, setSrc] = useState<string | null>(() => getFluentImgSrc(name));
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const cached = getFluentImgSrc(name);
|
|
10
|
+
if (cached) {
|
|
11
|
+
setSrc(cached);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
let cancelled = false;
|
|
15
|
+
void ensureFluentIcons().then(() => {
|
|
16
|
+
if (!cancelled) setSrc(getFluentImgSrc(name));
|
|
17
|
+
});
|
|
18
|
+
return () => {
|
|
19
|
+
cancelled = true;
|
|
20
|
+
};
|
|
21
|
+
}, [name]);
|
|
22
|
+
|
|
23
|
+
if (!src) {
|
|
24
|
+
return <span aria-hidden className={cn("inline-block shrink-0", className)} style={{ width: size, height: size }} />;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return <img src={src} alt="" width={size} height={size} draggable={false} className={cn("shrink-0 select-none pointer-events-none", className)} />;
|
|
28
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export const ICON_PREFIX = "fluent-color";
|
|
2
|
+
export const DEFAULT_ICON_NAME = "bot-24";
|
|
3
|
+
export const DEFAULT_TOOL_ICON = `${ICON_PREFIX}:${DEFAULT_ICON_NAME}`;
|
|
4
|
+
|
|
5
|
+
const SIZE_SUFFIX = /-24$/;
|
|
6
|
+
|
|
7
|
+
type IconifyIcon = { body: string; width?: number; height?: number };
|
|
8
|
+
type IconifyPack = {
|
|
9
|
+
icons?: Record<string, IconifyIcon>;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let memoryNames: string[] | null = null;
|
|
15
|
+
const svgByName = new Map<string, string>();
|
|
16
|
+
const imgSrcByName = new Map<string, string>();
|
|
17
|
+
let inflight: Promise<string[]> | null = null;
|
|
18
|
+
|
|
19
|
+
function hydrate(pack: IconifyPack): string[] {
|
|
20
|
+
const defaultW = pack.width ?? 24;
|
|
21
|
+
const defaultH = pack.height ?? 24;
|
|
22
|
+
const names: string[] = [];
|
|
23
|
+
for (const [name, icon] of Object.entries(pack.icons ?? {})) {
|
|
24
|
+
if (!SIZE_SUFFIX.test(name) || !icon?.body) continue;
|
|
25
|
+
const w = icon.width ?? defaultW;
|
|
26
|
+
const h = icon.height ?? defaultH;
|
|
27
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 ${w} ${h}">${icon.body}</svg>`;
|
|
28
|
+
svgByName.set(name, svg);
|
|
29
|
+
names.push(name);
|
|
30
|
+
}
|
|
31
|
+
memoryNames = names;
|
|
32
|
+
return names;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Loads the vendored Fluent Color pack (code-split). No network. */
|
|
36
|
+
export function ensureFluentIcons(): Promise<string[]> {
|
|
37
|
+
if (memoryNames) return Promise.resolve(memoryNames);
|
|
38
|
+
if (inflight) return inflight;
|
|
39
|
+
inflight = import("@iconify-json/fluent-color/icons.json")
|
|
40
|
+
.then((mod) => hydrate((mod.default ?? mod) as IconifyPack))
|
|
41
|
+
.finally(() => {
|
|
42
|
+
inflight = null;
|
|
43
|
+
});
|
|
44
|
+
return inflight;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function getIconNames(): string[] {
|
|
48
|
+
return memoryNames ?? [];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function getFluentImgSrc(name: string): string | null {
|
|
52
|
+
const hit = imgSrcByName.get(name);
|
|
53
|
+
if (hit) return hit;
|
|
54
|
+
const svg = svgByName.get(name);
|
|
55
|
+
if (!svg) return null;
|
|
56
|
+
const src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
|
|
57
|
+
imgSrcByName.set(name, src);
|
|
58
|
+
return src;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function isSvgIcon(value?: string | null): boolean {
|
|
62
|
+
return !!value && value.trimStart().startsWith("<svg");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function isFluentIcon(value?: string | null): boolean {
|
|
66
|
+
return !!value && value.startsWith(`${ICON_PREFIX}:`);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function fluentIconName(value: string): string {
|
|
70
|
+
return value.slice(ICON_PREFIX.length + 1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function fluentIconRef(name: string): string {
|
|
74
|
+
return `${ICON_PREFIX}:${name}`;
|
|
75
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
export { App, useAppConfig } from "./app/App";
|
|
2
|
+
export type { AppProps, NonlaAppConfig } from "./app/App";
|
|
3
|
+
|
|
4
|
+
export { Button } from "./button/Button";
|
|
5
|
+
export type { ButtonProps, ButtonGroupProps, ButtonType, ButtonSize, ButtonColor, ButtonVariant } from "./button/Button";
|
|
6
|
+
export { ButtonCopy } from "./button/ButtonCopy";
|
|
7
|
+
export type { ButtonCopyProps } from "./button/ButtonCopy";
|
|
8
|
+
|
|
9
|
+
export { Input, TextArea, InputNumber } from "./input/Input";
|
|
10
|
+
export type { InputProps, TextAreaProps, InputNumberProps, InputSize, TextAreaRef, PasswordProps } from "./input/Input";
|
|
11
|
+
export { SearchInput } from "./input/SearchInput";
|
|
12
|
+
export type { SearchInputProps } from "./input/SearchInput";
|
|
13
|
+
/** antd `InputRef` compatibility — native input element. */
|
|
14
|
+
export type InputRef = HTMLInputElement;
|
|
15
|
+
|
|
16
|
+
export { Select, SelectOption } from "./select/Select";
|
|
17
|
+
export type { SelectProps, SelectOptionConfig, SelectValue } from "./select/Select";
|
|
18
|
+
|
|
19
|
+
export { Switch } from "./switch/Switch";
|
|
20
|
+
export type { SwitchProps, SwitchVariant } from "./switch/Switch";
|
|
21
|
+
|
|
22
|
+
export { Checkbox } from "./checkbox/Checkbox";
|
|
23
|
+
export type { CheckboxProps } from "./checkbox/Checkbox";
|
|
24
|
+
|
|
25
|
+
export { ColorPicker } from "./colorpicker/ColorPicker";
|
|
26
|
+
export type { ColorPickerProps } from "./colorpicker/ColorPicker";
|
|
27
|
+
|
|
28
|
+
export { Tooltip } from "./tooltip/Tooltip";
|
|
29
|
+
export type { TooltipProps, TooltipPlacement } from "./tooltip/Tooltip";
|
|
30
|
+
|
|
31
|
+
export { Modal } from "./modal/Modal";
|
|
32
|
+
export type { ModalProps, ModalConfirmProps } from "./modal/Modal";
|
|
33
|
+
|
|
34
|
+
export { message } from "./message/message";
|
|
35
|
+
export type { MessageType, MessageConfig } from "./message/message";
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
SchemaForm,
|
|
39
|
+
FormSchema,
|
|
40
|
+
FormItem,
|
|
41
|
+
EFormItemType,
|
|
42
|
+
hydrateRules,
|
|
43
|
+
fieldNameOf,
|
|
44
|
+
isRuleRequired,
|
|
45
|
+
} from "./form";
|
|
46
|
+
export type {
|
|
47
|
+
SchemaFormProps,
|
|
48
|
+
FormItemProps,
|
|
49
|
+
FormFetcher,
|
|
50
|
+
TForm,
|
|
51
|
+
TFormItemProps,
|
|
52
|
+
TFormRule,
|
|
53
|
+
TRuleValueMessage,
|
|
54
|
+
ISelectItemProps,
|
|
55
|
+
IFormItemHelpProps,
|
|
56
|
+
} from "./form";
|
|
57
|
+
|
|
58
|
+
/** Layout-only Form + Form.Item (antd drop-in for labeled fields). */
|
|
59
|
+
export { Form } from "./form-layout/FormLayout";
|
|
60
|
+
export type { FormLayoutProps, FormLayoutItemProps } from "./form-layout/FormLayout";
|
|
61
|
+
|
|
62
|
+
export { Alert } from "./alert/Alert";
|
|
63
|
+
export type { AlertProps, AlertType } from "./alert/Alert";
|
|
64
|
+
|
|
65
|
+
export { Popover } from "./popover/Popover";
|
|
66
|
+
export type { PopoverProps } from "./popover/Popover";
|
|
67
|
+
|
|
68
|
+
export { Dropdown } from "./dropdown/Dropdown";
|
|
69
|
+
export type { DropdownProps, MenuItemType, MenuProps } from "./dropdown/Dropdown";
|
|
70
|
+
|
|
71
|
+
export { ContextMenu } from "./dropdown/ContextMenu";
|
|
72
|
+
export type { ContextMenuProps } from "./dropdown/ContextMenu";
|
|
73
|
+
|
|
74
|
+
export { Popconfirm } from "./popconfirm/Popconfirm";
|
|
75
|
+
export type { PopconfirmProps } from "./popconfirm/Popconfirm";
|
|
76
|
+
|
|
77
|
+
export { Drawer } from "./drawer/Drawer";
|
|
78
|
+
export type { DrawerProps, DrawerPlacement } from "./drawer/Drawer";
|
|
79
|
+
|
|
80
|
+
export { Table } from "./table/Table";
|
|
81
|
+
export type {
|
|
82
|
+
TableProps,
|
|
83
|
+
ColumnType,
|
|
84
|
+
ColumnsType,
|
|
85
|
+
TablePaginationConfig,
|
|
86
|
+
TableRowSelection,
|
|
87
|
+
SortOrder,
|
|
88
|
+
} from "./table/Table";
|
|
89
|
+
|
|
90
|
+
export { Tag } from "./tag/Tag";
|
|
91
|
+
export type { TagProps, TagVariant } from "./tag/Tag";
|
|
92
|
+
|
|
93
|
+
export { Pagination } from "./pagination/Pagination";
|
|
94
|
+
export type { PaginationProps, PaginationItemType } from "./pagination/Pagination";
|
|
95
|
+
|
|
96
|
+
export { Empty } from "./empty/Empty";
|
|
97
|
+
export type { EmptyProps } from "./empty/Empty";
|
|
98
|
+
|
|
99
|
+
export { Spin } from "./spin/Spin";
|
|
100
|
+
export type { SpinProps, SpinVariant } from "./spin/Spin";
|
|
101
|
+
|
|
102
|
+
export { Skeleton } from "./skeleton/Skeleton";
|
|
103
|
+
export type { SkeletonProps } from "./skeleton/Skeleton";
|
|
104
|
+
|
|
105
|
+
export { Segmented } from "./segmented/Segmented";
|
|
106
|
+
export type { SegmentedProps, SegmentedOption } from "./segmented/Segmented";
|
|
107
|
+
|
|
108
|
+
export { DatePicker, RangePicker } from "./datepicker/DatePicker";
|
|
109
|
+
export type { DatePickerProps, RangePickerProps, RangeValue } from "./datepicker/DatePicker";
|
|
110
|
+
|
|
111
|
+
export { TimePicker } from "./timepicker/TimePicker";
|
|
112
|
+
export type { TimePickerProps, TimeValue } from "./timepicker/TimePicker";
|
|
113
|
+
|
|
114
|
+
export { Calendar } from "./calendar/Calendar";
|
|
115
|
+
export type { CalendarProps } from "./calendar/Calendar";
|
|
116
|
+
|
|
117
|
+
export { CodeBlock, CodeBlockCopyButton } from "./codeblock/CodeBlock";
|
|
118
|
+
export type { CodeBlockProps, CodeBlockCopyButtonProps } from "./codeblock/CodeBlock";
|
|
119
|
+
|
|
120
|
+
export { OverlayScroll } from "./scroll/OverlayScroll";
|
|
121
|
+
export type { OverlayScrollProps, OverlayScrollVisibility } from "./scroll/OverlayScroll";
|
|
122
|
+
|
|
123
|
+
export {
|
|
124
|
+
ChatThinking,
|
|
125
|
+
ChatUserMessage,
|
|
126
|
+
ChatAgentMessage,
|
|
127
|
+
ChatError,
|
|
128
|
+
ChatToolCall,
|
|
129
|
+
ChatInput,
|
|
130
|
+
ChatWelcome,
|
|
131
|
+
ChatSpinner,
|
|
132
|
+
ChatMarkdown,
|
|
133
|
+
createChatMarkdownComponents,
|
|
134
|
+
chatMarkdownComponents,
|
|
135
|
+
chatMarkdownClass,
|
|
136
|
+
chatBodyClass,
|
|
137
|
+
MermaidBlock,
|
|
138
|
+
AgentPanel,
|
|
139
|
+
useAgentStream,
|
|
140
|
+
buildAgentHistory,
|
|
141
|
+
parseSseStream,
|
|
142
|
+
formatToolName,
|
|
143
|
+
prettyJson,
|
|
144
|
+
isCallAgentToolName,
|
|
145
|
+
parseCallAgentToolTargetId,
|
|
146
|
+
parseBgTaskRef,
|
|
147
|
+
formatBgElapsed,
|
|
148
|
+
resolveToolUI,
|
|
149
|
+
CallAgentToolUI,
|
|
150
|
+
WebFetchToolUI,
|
|
151
|
+
GetCurrentTimeToolUI,
|
|
152
|
+
ReadSkillToolUI,
|
|
153
|
+
RunJsToolUI,
|
|
154
|
+
BackgroundTaskToolUI,
|
|
155
|
+
BackgroundTasksBar,
|
|
156
|
+
ToolUiTrailing,
|
|
157
|
+
} from "./chat";
|
|
158
|
+
export type {
|
|
159
|
+
ChatThinkingProps,
|
|
160
|
+
ChatUserMessageProps,
|
|
161
|
+
ChatAgentMessageProps,
|
|
162
|
+
ChatErrorProps,
|
|
163
|
+
ChatToolCallProps,
|
|
164
|
+
ChatInputProps,
|
|
165
|
+
ChatWelcomeProps,
|
|
166
|
+
ChatMarkdownProps,
|
|
167
|
+
ChatMarkdownStreamState,
|
|
168
|
+
MermaidBlockProps,
|
|
169
|
+
AgentPanelProps,
|
|
170
|
+
AgentMessage,
|
|
171
|
+
AgentMessageRole,
|
|
172
|
+
AgentHistoryMessage,
|
|
173
|
+
AgentStreamRequest,
|
|
174
|
+
AgentPanelEndpoint,
|
|
175
|
+
AgentToolAction,
|
|
176
|
+
ToolUIProps,
|
|
177
|
+
ChatToolMessage,
|
|
178
|
+
ChatBgTask,
|
|
179
|
+
BackgroundTasksBarProps,
|
|
180
|
+
} from "./chat";
|
|
181
|
+
|
|
182
|
+
export { cn } from "./lib/cn";
|
|
183
|
+
export { glassSurfaceClass, glassOverlayClass, meadowSurfaceClass } from "./lib/surface";
|
|
184
|
+
export { CONTROL_SIZES, normalizeSize, getSizeTokens, controlHeightVar, controlRadiusVar, controlStatusClass } from "./lib/sizes";
|
|
185
|
+
export type { ControlSize, CanonicalSize, ControlSizeTokens } from "./lib/sizes";
|
|
186
|
+
export { placementToRadix } from "./lib/placement";
|
|
187
|
+
export type { PopperPlacement } from "./lib/placement";
|
|
188
|
+
export { NONLA_THEME_KNOBS, NONLA_THEME_KEYS, applyNonlaTheme } from "./theme";
|
|
189
|
+
export type { NonlaThemeKnob, NonlaThemeKnobName, NonlaThemeColorName, NonlaThemeColors, NonlaThemeConfig } from "./theme";
|
|
190
|
+
|
|
191
|
+
export { FluentIcon } from "./icon/FluentIcon";
|
|
192
|
+
export {
|
|
193
|
+
ICON_PREFIX,
|
|
194
|
+
DEFAULT_ICON_NAME,
|
|
195
|
+
DEFAULT_TOOL_ICON,
|
|
196
|
+
ensureFluentIcons,
|
|
197
|
+
getIconNames,
|
|
198
|
+
getFluentImgSrc,
|
|
199
|
+
isSvgIcon,
|
|
200
|
+
isFluentIcon,
|
|
201
|
+
fluentIconName,
|
|
202
|
+
fluentIconRef,
|
|
203
|
+
} from "./icon/fluent";
|
|
204
|
+
|
|
205
|
+
export { DesktopStage } from "./desktop/DesktopStage";
|
|
206
|
+
export { MeadowWallpaper } from "./desktop/MeadowWallpaper";
|
|
207
|
+
export { MeadowDesktop } from "./desktop/MeadowDesktop";
|
|
208
|
+
export { MeadowShell } from "./desktop/MeadowShell";
|
|
209
|
+
export { DesktopHeader, DesktopBarButton, DesktopBarItem, DesktopBarDivider } from "./desktop/DesktopHeader";
|
|
210
|
+
export { DesktopIcon } from "./desktop/DesktopIcon";
|
|
211
|
+
export { DesktopWindow, WindowHeader } from "./desktop/DesktopWindow";
|
|
212
|
+
|
|
213
|
+
export { Menu, MenuTrigger, MenuItem, MenuAction, MenuDivider } from "./menu/Menu";
|
|
214
|
+
export type { MenuRootProps, MenuTriggerProps, MenuItemProps } from "./menu/Menu";
|