@superxd-studio/adptr 0.5.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/GENERATIVE.md +101 -0
- package/INTERACTIONS.md +51 -0
- package/LICENSE +21 -0
- package/README.md +57 -0
- package/REUSE.md +170 -0
- package/REVIEW.md +68 -0
- package/THIRD-PARTY-NOTICES.md +28 -0
- package/ai-sdk/index.js +96 -0
- package/assets/ibm-plex-mono-cyrillic-400-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-cyrillic-500-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-cyrillic-ext-400-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-cyrillic-ext-500-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-latin-ext-400-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-latin-ext-500-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-vietnamese-400-normal.woff2 +0 -0
- package/assets/ibm-plex-mono-vietnamese-500-normal.woff2 +0 -0
- package/assets/instrument-sans-latin-ext-wght-normal.woff2 +0 -0
- package/assets/instrument-sans-latin-wght-normal.woff2 +0 -0
- package/assistant-ui/index.js +139 -0
- package/chunks/callout-DKMHSnjc.js +342 -0
- package/chunks/canvas-BJ15-XxE.js +598 -0
- package/chunks/controller-Cfpg0C7v.js +180 -0
- package/chunks/core-BCqVRLUy.js +312 -0
- package/chunks/text-field-BLtoaZFn.js +41 -0
- package/chunks/types-BGF7r1my.js +115 -0
- package/chunks/ui-9DyNsYXY.js +967 -0
- package/core/index.js +4 -0
- package/custom/index.js +64 -0
- package/examples/ai-sdk-backend/package.json +11 -0
- package/examples/ai-sdk-backend/server.mjs +316 -0
- package/examples/custom-backend/copy.mjs +7 -0
- package/examples/custom-backend/server.mjs +118 -0
- package/examples/generative/specs.json +2094 -0
- package/examples/review-backend/copy.mjs +27 -0
- package/examples/review-backend/package.json +11 -0
- package/examples/review-backend/server.mjs +276 -0
- package/examples/web-ai-sdk/index.html +12 -0
- package/examples/web-ai-sdk/package.json +21 -0
- package/examples/web-ai-sdk/src/copy.ts +1 -0
- package/examples/web-ai-sdk/src/main.tsx +64 -0
- package/examples/web-ai-sdk/tsconfig.json +13 -0
- package/examples/web-generative/index.html +12 -0
- package/examples/web-generative/package.json +23 -0
- package/examples/web-generative/src/copy.ts +42 -0
- package/examples/web-generative/src/main.tsx +74 -0
- package/examples/web-generative/tsconfig.json +14 -0
- package/examples/web-independent/index.html +12 -0
- package/examples/web-independent/package.json +20 -0
- package/examples/web-independent/src/main.tsx +32 -0
- package/examples/web-independent/tsconfig.json +14 -0
- package/examples/web-interactions/index.html +12 -0
- package/examples/web-interactions/package.json +21 -0
- package/examples/web-interactions/src/copy.ts +215 -0
- package/examples/web-interactions/src/examples.tsx +628 -0
- package/examples/web-interactions/src/main.tsx +116 -0
- package/examples/web-interactions/tsconfig.json +14 -0
- package/examples/web-review/index.html +12 -0
- package/examples/web-review/package.json +20 -0
- package/examples/web-review/src/main.tsx +59 -0
- package/examples/web-review/tsconfig.json +14 -0
- package/fonts.css +117 -0
- package/generative/index.js +1560 -0
- package/interactions/index.js +1591 -0
- package/langgraph-review/index.js +36 -0
- package/licenses/ai-sdk.txt +13 -0
- package/licenses/assistant-ui-generative.txt +21 -0
- package/licenses/assistant-ui.txt +23 -0
- package/licenses/ibm-plex-mono.txt +93 -0
- package/licenses/instrument-sans.txt +93 -0
- package/licenses/internationalized-date.txt +201 -0
- package/licenses/langgraph.txt +21 -0
- package/licenses/lucide.txt +43 -0
- package/licenses/react-markdown.txt +21 -0
- package/licenses/remark-gfm.txt +22 -0
- package/licenses/zod.txt +21 -0
- package/package.json +138 -0
- package/review/index.js +31 -0
- package/source/components/avatar.tsx +50 -0
- package/source/components/button.tsx +155 -0
- package/source/components/callout.tsx +65 -0
- package/source/components/canvas/connector.tsx +14 -0
- package/source/components/canvas/copy.ts +34 -0
- package/source/components/canvas/index.tsx +257 -0
- package/source/components/canvas/recorder.ts +36 -0
- package/source/components/date-time-field.tsx +77 -0
- package/source/components/flow-motion.tsx +109 -0
- package/source/components/icons.tsx +275 -0
- package/source/components/responsive-overlay.tsx +91 -0
- package/source/components/scenario-picker/copy.ts +5 -0
- package/source/components/scenario-picker/index.tsx +142 -0
- package/source/components/scroll-area.tsx +59 -0
- package/source/components/search-picker.tsx +127 -0
- package/source/components/segmented-control.tsx +123 -0
- package/source/components/skeleton.tsx +11 -0
- package/source/components/spinner.tsx +19 -0
- package/source/components/superxd-arrow.tsx +22 -0
- package/source/components/switch.tsx +45 -0
- package/source/components/text-field.tsx +81 -0
- package/source/components/thinking.tsx +16 -0
- package/source/components/ui/copy.ts +12 -0
- package/source/components/ui/display.tsx +276 -0
- package/source/components/ui/navigation.tsx +346 -0
- package/source/components/ui/portal-theme.tsx +28 -0
- package/source/components/ui/selection.tsx +336 -0
- package/source/lib/cn.ts +23 -0
- package/source/reusable/ai-sdk/index.ts +114 -0
- package/source/reusable/assistant-ui/index.tsx +266 -0
- package/source/reusable/core/attachments.ts +163 -0
- package/source/reusable/core/index.ts +417 -0
- package/source/reusable/custom/index.ts +90 -0
- package/source/reusable/generative/actions.ts +188 -0
- package/source/reusable/generative/copy.ts +47 -0
- package/source/reusable/generative/data.tsx +126 -0
- package/source/reusable/generative/index.tsx +517 -0
- package/source/reusable/generative/schema.ts +327 -0
- package/source/reusable/generative/timeline.tsx +214 -0
- package/source/reusable/generative/vocabulary.tsx +847 -0
- package/source/reusable/interactions/agent.ts +259 -0
- package/source/reusable/interactions/artifact.ts +236 -0
- package/source/reusable/interactions/context.tsx +38 -0
- package/source/reusable/interactions/copy.ts +117 -0
- package/source/reusable/interactions/feedback.ts +73 -0
- package/source/reusable/interactions/index.ts +11 -0
- package/source/reusable/interactions/presentation.tsx +483 -0
- package/source/reusable/interactions/store.ts +74 -0
- package/source/reusable/interactions/threads.ts +126 -0
- package/source/reusable/interactions/web.tsx +574 -0
- package/source/reusable/langgraph-review/index.ts +73 -0
- package/source/reusable/review/controller.ts +263 -0
- package/source/reusable/review/index.ts +47 -0
- package/source/reusable/review/types.ts +189 -0
- package/source/reusable/ui/index.ts +25 -0
- package/source/reusable/uploads/index.ts +48 -0
- package/source/reusable/web/attachments/copy.ts +23 -0
- package/source/reusable/web/attachments/index.tsx +233 -0
- package/source/reusable/web/copy.ts +22 -0
- package/source/reusable/web/index.tsx +470 -0
- package/source/reusable/web/message/copy.ts +26 -0
- package/source/reusable/web/message/index.tsx +388 -0
- package/source/reusable/web/message/streaming.ts +64 -0
- package/source/reusable/web/message/styles.css +21 -0
- package/source/reusable/web/review/copy.ts +78 -0
- package/source/reusable/web/review/flow.ts +24 -0
- package/source/reusable/web/review/index.tsx +506 -0
- package/source/reusable/web/styles.ts +2 -0
- package/source/styles/library.css +612 -0
- package/source/styles/theme.css +228 -0
- package/styles.css +3 -0
- package/styles.d.ts +1 -0
- package/types/components/avatar.d.ts +14 -0
- package/types/components/button.d.ts +36 -0
- package/types/components/callout.d.ts +19 -0
- package/types/components/canvas/connector.d.ts +2 -0
- package/types/components/canvas/copy.d.ts +34 -0
- package/types/components/canvas/index.d.ts +33 -0
- package/types/components/canvas/recorder.d.ts +10 -0
- package/types/components/date-time-field.d.ts +11 -0
- package/types/components/flow-motion.d.ts +38 -0
- package/types/components/icons.d.ts +138 -0
- package/types/components/responsive-overlay.d.ts +15 -0
- package/types/components/scenario-picker/copy.d.ts +5 -0
- package/types/components/scenario-picker/index.d.ts +14 -0
- package/types/components/scroll-area.d.ts +14 -0
- package/types/components/search-picker.d.ts +27 -0
- package/types/components/segmented-control.d.ts +23 -0
- package/types/components/skeleton.d.ts +4 -0
- package/types/components/spinner.d.ts +4 -0
- package/types/components/superxd-arrow.d.ts +5 -0
- package/types/components/switch.d.ts +8 -0
- package/types/components/text-field.d.ts +19 -0
- package/types/components/thinking.d.ts +8 -0
- package/types/components/ui/copy.d.ts +12 -0
- package/types/components/ui/display.d.ts +50 -0
- package/types/components/ui/navigation.d.ts +63 -0
- package/types/components/ui/portal-theme.d.ts +8 -0
- package/types/components/ui/selection.d.ts +37 -0
- package/types/lib/cn.d.ts +3 -0
- package/types/reusable/ai-sdk/index.d.ts +15 -0
- package/types/reusable/assistant-ui/index.d.ts +12 -0
- package/types/reusable/core/attachments.d.ts +54 -0
- package/types/reusable/core/index.d.ts +107 -0
- package/types/reusable/custom/index.d.ts +14 -0
- package/types/reusable/generative/actions.d.ts +45 -0
- package/types/reusable/generative/copy.d.ts +48 -0
- package/types/reusable/generative/data.d.ts +4 -0
- package/types/reusable/generative/index.d.ts +30 -0
- package/types/reusable/generative/schema.d.ts +303 -0
- package/types/reusable/generative/timeline.d.ts +21 -0
- package/types/reusable/generative/vocabulary.d.ts +34 -0
- package/types/reusable/interactions/agent.d.ts +98 -0
- package/types/reusable/interactions/artifact.d.ts +118 -0
- package/types/reusable/interactions/context.d.ts +130 -0
- package/types/reusable/interactions/copy.d.ts +115 -0
- package/types/reusable/interactions/feedback.d.ts +34 -0
- package/types/reusable/interactions/index.d.ts +10 -0
- package/types/reusable/interactions/presentation.d.ts +97 -0
- package/types/reusable/interactions/store.d.ts +29 -0
- package/types/reusable/interactions/threads.d.ts +38 -0
- package/types/reusable/interactions/web.d.ts +22 -0
- package/types/reusable/langgraph-review/index.d.ts +5 -0
- package/types/reusable/review/controller.d.ts +52 -0
- package/types/reusable/review/index.d.ts +12 -0
- package/types/reusable/review/types.d.ts +61 -0
- package/types/reusable/ui/index.d.ts +19 -0
- package/types/reusable/uploads/index.d.ts +11 -0
- package/types/reusable/web/attachments/copy.d.ts +25 -0
- package/types/reusable/web/attachments/index.d.ts +24 -0
- package/types/reusable/web/copy.d.ts +24 -0
- package/types/reusable/web/index.d.ts +41 -0
- package/types/reusable/web/message/copy.d.ts +27 -0
- package/types/reusable/web/message/index.d.ts +56 -0
- package/types/reusable/web/message/streaming.d.ts +27 -0
- package/types/reusable/web/review/copy.d.ts +72 -0
- package/types/reusable/web/review/flow.d.ts +3 -0
- package/types/reusable/web/review/index.d.ts +38 -0
- package/types/reusable/web/styles.d.ts +2 -0
- package/ui/index.js +4 -0
- package/uploads/index.js +34 -0
- package/web/index.js +931 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
export type IconProps = Omit<SVGProps<SVGSVGElement>, "children">;
|
|
3
|
+
export declare const IconClock: {
|
|
4
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const IconVideo: {
|
|
8
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const IconGlobe: {
|
|
12
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const IconCalendar: {
|
|
16
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const IconCalendarPlus: {
|
|
20
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const IconGrid: {
|
|
24
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const IconColumns: {
|
|
28
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const IconChevronLeft: {
|
|
32
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const IconChevronRight: {
|
|
36
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const IconChevronDown: {
|
|
40
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const IconArrowUp: {
|
|
44
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const IconDownload: {
|
|
48
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const IconArrowDown: {
|
|
52
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
55
|
+
export declare const IconSquare: {
|
|
56
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
59
|
+
export declare const IconCopy: {
|
|
60
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const IconEdit: {
|
|
64
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
65
|
+
displayName: string;
|
|
66
|
+
};
|
|
67
|
+
export declare const IconCheck: {
|
|
68
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
69
|
+
displayName: string;
|
|
70
|
+
};
|
|
71
|
+
export declare const IconX: {
|
|
72
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
export declare const IconPaperclip: {
|
|
76
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
77
|
+
displayName: string;
|
|
78
|
+
};
|
|
79
|
+
export declare const IconFile: {
|
|
80
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
export declare const IconArrowLeft: {
|
|
84
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
87
|
+
export declare const IconInfo: {
|
|
88
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
91
|
+
export declare const IconAlert: {
|
|
92
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
93
|
+
displayName: string;
|
|
94
|
+
};
|
|
95
|
+
export declare const IconCircleCheck: {
|
|
96
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
97
|
+
displayName: string;
|
|
98
|
+
};
|
|
99
|
+
export declare const IconCircleAlert: {
|
|
100
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
101
|
+
displayName: string;
|
|
102
|
+
};
|
|
103
|
+
export declare const IconHourglass: {
|
|
104
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
105
|
+
displayName: string;
|
|
106
|
+
};
|
|
107
|
+
export declare const IconMapPin: {
|
|
108
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
109
|
+
displayName: string;
|
|
110
|
+
};
|
|
111
|
+
export declare const IconSearch: {
|
|
112
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
113
|
+
displayName: string;
|
|
114
|
+
};
|
|
115
|
+
export declare const IconRotate: {
|
|
116
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
117
|
+
displayName: string;
|
|
118
|
+
};
|
|
119
|
+
export declare const IconUser: {
|
|
120
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
121
|
+
displayName: string;
|
|
122
|
+
};
|
|
123
|
+
export declare const IconMail: {
|
|
124
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
125
|
+
displayName: string;
|
|
126
|
+
};
|
|
127
|
+
export declare const IconPlus: {
|
|
128
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
129
|
+
displayName: string;
|
|
130
|
+
};
|
|
131
|
+
export declare const IconSun: {
|
|
132
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
133
|
+
displayName: string;
|
|
134
|
+
};
|
|
135
|
+
export declare const IconMoon: {
|
|
136
|
+
({ className, ...props }: IconProps): import("react").JSX.Element;
|
|
137
|
+
displayName: string;
|
|
138
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from "react";
|
|
2
|
+
/** Shared by anchored content and its read-only canvas presentation. */
|
|
3
|
+
export declare const overlaySurfaceClassName = "flex min-h-0 flex-col overflow-hidden bg-surface text-fg shadow-dialog";
|
|
4
|
+
export interface ResponsiveOverlayProps {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
/** Keep an in-flight mutation visible until the adapter reports its result. */
|
|
10
|
+
isDismissDisabled?: boolean;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/** The same contextual content, anchored on desktop and in a bottom drawer on phones. */
|
|
15
|
+
export declare function ResponsiveOverlay({ isOpen, onOpenChange, triggerRef, "aria-label": label, isDismissDisabled, children, className, }: ResponsiveOverlayProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ScenarioOption<K extends string> {
|
|
2
|
+
id: K;
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Chooses demo conditions. The demo owner controls resetting and request cleanup. */
|
|
8
|
+
export declare function ScenarioPicker<K extends string>({ label, value, onChange, options, isDisabled, }: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: K;
|
|
11
|
+
onChange: (value: K) => void;
|
|
12
|
+
options: ScenarioOption<K>[];
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface ScrollAreaProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Label for keyboard users when the area scrolls (it becomes focusable). */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Scroll to this position (in pixels) when it first appears or changes. */
|
|
8
|
+
scrollTo?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A scrolling box whose edges fade when there's more to see, so a list cut
|
|
12
|
+
* off by the edge reads as "keep scrolling" rather than "broken".
|
|
13
|
+
*/
|
|
14
|
+
export declare function ScrollArea({ children, className, label, scrollTo }: ScrollAreaProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface PickerItem {
|
|
3
|
+
id: string;
|
|
4
|
+
/** What's shown and searched. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** A quieter second line or right-hand detail, also searched. */
|
|
7
|
+
detail?: string;
|
|
8
|
+
/** Extra words to match when searching (not shown). */
|
|
9
|
+
keywords?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SearchPickerProps {
|
|
12
|
+
/** What's being chosen, for screen readers ("Time zone"). */
|
|
13
|
+
label: string;
|
|
14
|
+
items: PickerItem[];
|
|
15
|
+
value: string;
|
|
16
|
+
onChange: (id: string) => void;
|
|
17
|
+
/** The content of the trigger button. */
|
|
18
|
+
trigger: ReactNode;
|
|
19
|
+
searchPlaceholder?: string;
|
|
20
|
+
emptyMessage?: string;
|
|
21
|
+
triggerClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A button that opens a searchable list, for long lists like time zones.
|
|
25
|
+
* Typing filters the list; arrow keys and Enter choose; Escape closes.
|
|
26
|
+
*/
|
|
27
|
+
export declare function SearchPicker({ label, items, value, onChange, trigger, searchPlaceholder, emptyMessage, triggerClassName, }: SearchPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface SegmentedOption<K extends string> {
|
|
3
|
+
id: K;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
/** Required when the label is only an icon. */
|
|
7
|
+
"aria-label"?: string;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface SegmentedControlProps<K extends string> {
|
|
11
|
+
/** What the choice is about, for screen readers ("Meeting length"). */
|
|
12
|
+
label: string;
|
|
13
|
+
options: SegmentedOption<K>[];
|
|
14
|
+
value: K;
|
|
15
|
+
onChange: (value: K) => void;
|
|
16
|
+
size?: "sm" | "md";
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* One choice from a few options, shown side by side: 12h or 24h, 15, 30 or
|
|
21
|
+
* 60 minutes, month, week or columns. Arrow keys move between options.
|
|
22
|
+
*/
|
|
23
|
+
export declare function SegmentedControl<K extends string>({ label, options, value, onChange, size, className, }: SegmentedControlProps<K>): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type SwitchProps as AriaSwitchProps } from "react-aria-components";
|
|
3
|
+
export interface SwitchProps extends Omit<AriaSwitchProps, "children"> {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** An immediately applied on/off setting, with a persistent label in both positions. */
|
|
8
|
+
export declare function Switch({ label, description, className, ...props }: SwitchProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type TextFieldProps as AriaTextFieldProps } from "react-aria-components";
|
|
3
|
+
export interface TextFieldProps extends Omit<AriaTextFieldProps, "children"> {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
/** The problem with the current value. Shows the field as invalid when set. */
|
|
7
|
+
error?: ReactNode;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Adds "(optional)" after the label. Required fields stay unmarked. */
|
|
10
|
+
optional?: boolean;
|
|
11
|
+
multiline?: boolean;
|
|
12
|
+
rows?: number;
|
|
13
|
+
inputClassName?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A labelled text box with an optional description and an error message.
|
|
17
|
+
* The error is linked to the input for screen readers.
|
|
18
|
+
*/
|
|
19
|
+
export declare function TextField({ label, description, error, placeholder, optional, multiline, rows, className, inputClassName, ...props }: TextFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuperXD's thinking mark: a 3×3 pixel matrix lighting in a spiral, for waits of unknown
|
|
3
|
+
* length (an AI preparing an answer). About the height of a line of text. Decorative: say
|
|
4
|
+
* what's happening in words beside it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Thinking({ className }: {
|
|
7
|
+
className?: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const uiCopy: {
|
|
2
|
+
readonly choose: "Choose an option";
|
|
3
|
+
readonly empty: "No options available.";
|
|
4
|
+
readonly close: "Close";
|
|
5
|
+
readonly previous: "Previous page";
|
|
6
|
+
readonly next: "Next page";
|
|
7
|
+
readonly page: (page: number, total: number) => string;
|
|
8
|
+
readonly sort: (label: string) => string;
|
|
9
|
+
readonly noRows: "No rows to show.";
|
|
10
|
+
readonly dismiss: "Dismiss notification";
|
|
11
|
+
readonly notifications: "Notifications";
|
|
12
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type ReactNode, type HTMLAttributes } from "react";
|
|
2
|
+
import { UNSTABLE_ToastQueue as ToastQueue, type ProgressBarProps, type SeparatorProps, type SortDescriptor, type Selection } from "react-aria-components";
|
|
3
|
+
export declare function Card({ children, className, ...props }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
4
|
+
export type BadgeTone = "neutral" | "info" | "success" | "attention" | "error";
|
|
5
|
+
export declare function Badge({ children, tone }: {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
tone?: BadgeTone;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export declare function Progress({ label, className, ...props }: Omit<ProgressBarProps, "children"> & {
|
|
10
|
+
label: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export declare function Separator({ className, ...props }: SeparatorProps): import("react").JSX.Element;
|
|
13
|
+
export declare function AspectRatio({ ratio, children, className, }: {
|
|
14
|
+
ratio?: number;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function KeyboardHint({ children }: {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export interface DataColumn {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
sortable?: boolean;
|
|
25
|
+
isRowHeader?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface DataRow {
|
|
28
|
+
id: string;
|
|
29
|
+
values: Readonly<Record<string, string | number>>;
|
|
30
|
+
}
|
|
31
|
+
export declare function sortRows(rows: readonly DataRow[], sort?: SortDescriptor): DataRow[];
|
|
32
|
+
/** Local sorting and selection. Server pagination and virtualisation belong to the host. */
|
|
33
|
+
export declare function DataTable({ label, columns, rows, empty, selectionMode, selectedKeys, onSelectionChange, }: {
|
|
34
|
+
label: string;
|
|
35
|
+
columns: readonly DataColumn[];
|
|
36
|
+
rows: readonly DataRow[];
|
|
37
|
+
empty?: string;
|
|
38
|
+
selectionMode?: "none" | "single" | "multiple";
|
|
39
|
+
selectedKeys?: Selection;
|
|
40
|
+
onSelectionChange?: (keys: Selection) => void;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
export interface Notification {
|
|
43
|
+
title: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function createNotificationQueue(): ToastQueue<Notification>;
|
|
47
|
+
export declare function ToastRegion({ queue, label, }: {
|
|
48
|
+
queue: ToastQueue<Notification>;
|
|
49
|
+
label?: string;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type DisclosureGroupProps, type TabsProps, type TooltipTriggerComponentProps } from "react-aria-components";
|
|
3
|
+
export interface MenuCommand {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
isDestructive?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function Menu({ label, items, onAction, isDisabled, }: {
|
|
11
|
+
label: string;
|
|
12
|
+
items: readonly MenuCommand[];
|
|
13
|
+
onAction: (id: string) => void;
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export interface DisclosureItem {
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
content: ReactNode;
|
|
20
|
+
isDisabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function Accordion({ label, items, className, ...props }: Omit<DisclosureGroupProps, "children"> & {
|
|
23
|
+
label: string;
|
|
24
|
+
items: readonly DisclosureItem[];
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
export interface ContentTab {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
content: ReactNode;
|
|
30
|
+
isDisabled?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function Tabs({ label, items, className, ...props }: Omit<TabsProps, "children"> & {
|
|
33
|
+
label: string;
|
|
34
|
+
items: readonly ContentTab[];
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
export declare function Tooltip({ children, content, ...props }: Omit<TooltipTriggerComponentProps, "children"> & {
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
content: ReactNode;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
/** A labelled, controlled modal. The host can prevent dismissal while a mutation settles. */
|
|
41
|
+
export declare function ModalDialog({ title, children, isOpen, onOpenChange, isDismissDisabled, trigger, }: {
|
|
42
|
+
title: string;
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
isOpen: boolean;
|
|
45
|
+
onOpenChange: (open: boolean) => void;
|
|
46
|
+
isDismissDisabled?: boolean;
|
|
47
|
+
trigger: ReactNode;
|
|
48
|
+
}): import("react").JSX.Element;
|
|
49
|
+
export declare function Pagination({ label, page, total, onChange, isDisabled, }: {
|
|
50
|
+
label: string;
|
|
51
|
+
page: number;
|
|
52
|
+
total: number;
|
|
53
|
+
onChange: (page: number) => void;
|
|
54
|
+
isDisabled?: boolean;
|
|
55
|
+
}): import("react").JSX.Element;
|
|
56
|
+
export declare function Breadcrumbs({ label, items, }: {
|
|
57
|
+
label: string;
|
|
58
|
+
items: readonly {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
href?: string;
|
|
62
|
+
}[];
|
|
63
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode, type CSSProperties } from "react";
|
|
2
|
+
/** Portals leave scoped preview/host themes. Copy their computed variables at the trigger. */
|
|
3
|
+
export declare function PortalTheme({ children, }: {
|
|
4
|
+
children: (theme: {
|
|
5
|
+
className: string;
|
|
6
|
+
style: CSSProperties;
|
|
7
|
+
}) => ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type CheckboxProps, type CheckboxGroupProps, type RadioGroupProps, type SelectProps, type SliderProps, type ToggleButtonProps, type FormProps } from "react-aria-components";
|
|
3
|
+
import { type TextFieldProps } from "../text-field";
|
|
4
|
+
export interface Choice {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function Checkbox({ label, description, className, ...props }: Omit<CheckboxProps, "children"> & {
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
export declare function CheckboxGroup({ label, description, error, options, className, ...props }: Omit<CheckboxGroupProps, "children"> & {
|
|
15
|
+
label: ReactNode;
|
|
16
|
+
description?: ReactNode;
|
|
17
|
+
error?: ReactNode;
|
|
18
|
+
options: readonly Choice[];
|
|
19
|
+
}): import("react").JSX.Element;
|
|
20
|
+
export declare function RadioGroup({ label, description, error, options, className, ...props }: Omit<RadioGroupProps, "children"> & {
|
|
21
|
+
label: ReactNode;
|
|
22
|
+
description?: ReactNode;
|
|
23
|
+
error?: ReactNode;
|
|
24
|
+
options: readonly Choice[];
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
export declare function Select({ label, description, error, options, className, placeholder, ...props }: Omit<SelectProps<Choice>, "children" | "items"> & {
|
|
27
|
+
label: ReactNode;
|
|
28
|
+
description?: ReactNode;
|
|
29
|
+
error?: ReactNode;
|
|
30
|
+
options: readonly Choice[];
|
|
31
|
+
}): import("react").JSX.Element;
|
|
32
|
+
export declare function Slider({ label, className, ...props }: Omit<SliderProps, "children"> & {
|
|
33
|
+
label: ReactNode;
|
|
34
|
+
}): import("react").JSX.Element;
|
|
35
|
+
export declare function Toggle({ className, ...props }: ToggleButtonProps): import("react").JSX.Element;
|
|
36
|
+
export declare function TextField(props: TextFieldProps): import("react").JSX.Element;
|
|
37
|
+
export declare function Form({ className, children, validationBehavior, ...props }: FormProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ChatAdapter } from "../core/index.js";
|
|
2
|
+
export interface AiSdkChatOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
/** Opt into editing, regeneration and versions. Restart is controlled separately by retry. */
|
|
5
|
+
conversationActions?: boolean;
|
|
6
|
+
/** Allow Restart as a new run. Defaults to true; disable for endpoints without replay safety. */
|
|
7
|
+
retry?: boolean;
|
|
8
|
+
/** Stable conversation identity; requestId remains a distinct per-run identifier. */
|
|
9
|
+
chatId?: string;
|
|
10
|
+
headers?: () => HeadersInit | Promise<HeadersInit>;
|
|
11
|
+
credentials?: RequestCredentials;
|
|
12
|
+
fetch?: typeof globalThis.fetch;
|
|
13
|
+
}
|
|
14
|
+
/** SDK owns protocol parsing only; SuperXD or the host owns the conversation. */
|
|
15
|
+
export declare function createAiSdkChatAdapter(options: AiSdkChatOptions): ChatAdapter;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ChatActions, type ChatAdapter, type ChatSnapshot } from "../core/index.js";
|
|
3
|
+
/** Optional bridge. assistant-ui alone owns state; there is no mirrored controller. */
|
|
4
|
+
type Projection = {
|
|
5
|
+
snapshot: ChatSnapshot;
|
|
6
|
+
actions: ChatActions;
|
|
7
|
+
};
|
|
8
|
+
export declare function AssistantChat({ adapter, children, }: {
|
|
9
|
+
adapter: ChatAdapter;
|
|
10
|
+
children: (chat: Projection) => ReactNode;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type ChatFile } from "./index.js";
|
|
2
|
+
export interface UploadSource<Data> {
|
|
3
|
+
readonly id?: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly mediaType: string;
|
|
6
|
+
readonly size: number;
|
|
7
|
+
readonly data: Data;
|
|
8
|
+
}
|
|
9
|
+
export interface UploadAdapter<Data> {
|
|
10
|
+
upload(source: UploadSource<Data>, signal: AbortSignal): Promise<ChatFile>;
|
|
11
|
+
/** Release a removed draft file. Transferred transcript references must stay valid. */
|
|
12
|
+
release?(file: ChatFile): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface UploadPolicy {
|
|
15
|
+
readonly maxFiles: number;
|
|
16
|
+
readonly maxBytes: number;
|
|
17
|
+
readonly mediaTypes: readonly string[];
|
|
18
|
+
}
|
|
19
|
+
export type AttachmentIssue = "type" | "size" | "count" | "failed";
|
|
20
|
+
export interface AttachmentItem {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly mediaType: string;
|
|
24
|
+
readonly size: number;
|
|
25
|
+
readonly status: "uploading" | "ready" | "error" | "cancelled" | "rejected";
|
|
26
|
+
readonly file?: ChatFile;
|
|
27
|
+
readonly issue?: AttachmentIssue;
|
|
28
|
+
}
|
|
29
|
+
export interface AttachmentSnapshot {
|
|
30
|
+
readonly items: readonly AttachmentItem[];
|
|
31
|
+
readonly issue?: AttachmentIssue;
|
|
32
|
+
}
|
|
33
|
+
/** Upload state is separate from transcript state; no browser assumptions or second chat owner. */
|
|
34
|
+
export declare class AttachmentController<Data> {
|
|
35
|
+
private readonly adapter;
|
|
36
|
+
readonly policy: UploadPolicy;
|
|
37
|
+
private readonly id;
|
|
38
|
+
private snapshot;
|
|
39
|
+
private readonly listeners;
|
|
40
|
+
private readonly sources;
|
|
41
|
+
private readonly active;
|
|
42
|
+
constructor(adapter: UploadAdapter<Data>, policy: UploadPolicy, id: () => string);
|
|
43
|
+
getSnapshot: () => AttachmentSnapshot;
|
|
44
|
+
subscribe: (listener: () => void) => () => boolean;
|
|
45
|
+
private publish;
|
|
46
|
+
add: (inputs: readonly UploadSource<Data>[]) => void;
|
|
47
|
+
cancel: (id: string) => void;
|
|
48
|
+
remove: (id: string) => void;
|
|
49
|
+
retry: (id: string) => void;
|
|
50
|
+
/** Call only after send accepts: files now belong to the transcript, not the draft. */
|
|
51
|
+
transfer: () => void;
|
|
52
|
+
dispose: () => void;
|
|
53
|
+
private begin;
|
|
54
|
+
}
|