@plaisolutions/react 0.5.0 → 0.5.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/index.d.ts +42 -42
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatStatus, ChatStatus as ChatStatus$1, ChatTransport, DatasourceReadModel, DatasourceToolResultMetadata, DocumentMetadata, FileUploadState, FileUploadState as FileUploadState$1, FileUploadStatus, FolderReadModel, MediaFile, MessageRating, PlaiChatError, PlaiChatError as PlaiChatError$1, PlaiSseEvent, PlaiSseEvent as PlaiSseEvent$1, RateMessageInput, RateMessageInput as RateMessageInput$1, ResourceReadModel, ResourceReadModel as ResourceReadModel$1, SendMessageDocument, SendMessageInput, SendMessageInput as SendMessageInput$1, TranscribeAudioFn, TranscribeAudioFn as TranscribeAudioFn$1, UIAgentInvocationToolCallPart, UIBrowserToolCallPart, UIExternalDatasourceToolCallPart, UIFirecrawlSearchToolCallPart, UIHttpRequestToolCallPart, UIMcpToolCallPart, UIMessage, UIMessage as UIMessage$1, UIMessagePart, UIOfficeDocumentsToolCallPart, UIPerplexityToolCallPart, UIToolCallPart, UIWorkflowDispatchToolCallPart, UploadFileFn, UploadFileFn as UploadFileFn$1, UploadFileOptions, UploadFileProgress, Usage, Usage as Usage$1 } from "@plaisolutions/client";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react0 from "react";
|
|
3
3
|
import { ButtonHTMLAttributes, DialogHTMLAttributes, HTMLAttributes, PropsWithChildren, ReactNode, SVGProps } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/use-chat.d.ts
|
|
@@ -37,7 +37,7 @@ declare function Message({
|
|
|
37
37
|
align,
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: MessageProps):
|
|
40
|
+
}: MessageProps): react0.JSX.Element;
|
|
41
41
|
type MessageAvatarProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
42
42
|
src: string;
|
|
43
43
|
fallback: string;
|
|
@@ -51,22 +51,22 @@ declare function MessageAvatar({
|
|
|
51
51
|
className,
|
|
52
52
|
imageClassName,
|
|
53
53
|
...props
|
|
54
|
-
}: MessageAvatarProps):
|
|
54
|
+
}: MessageAvatarProps): react0.JSX.Element;
|
|
55
55
|
type MessageContentProps = HTMLAttributes<HTMLDivElement>;
|
|
56
56
|
declare function MessageContent({
|
|
57
57
|
className,
|
|
58
58
|
...props
|
|
59
|
-
}: MessageContentProps):
|
|
59
|
+
}: MessageContentProps): react0.JSX.Element;
|
|
60
60
|
type MessageHeaderProps = HTMLAttributes<HTMLElement>;
|
|
61
61
|
declare function MessageHeader({
|
|
62
62
|
className,
|
|
63
63
|
...props
|
|
64
|
-
}: MessageHeaderProps):
|
|
64
|
+
}: MessageHeaderProps): react0.JSX.Element;
|
|
65
65
|
type MessageFooterProps = HTMLAttributes<HTMLElement>;
|
|
66
66
|
declare function MessageFooter({
|
|
67
67
|
className,
|
|
68
68
|
...props
|
|
69
|
-
}: MessageFooterProps):
|
|
69
|
+
}: MessageFooterProps): react0.JSX.Element;
|
|
70
70
|
type MessagePartsProps = HTMLAttributes<HTMLDivElement> & {
|
|
71
71
|
message: UIMessage$1;
|
|
72
72
|
collapseThreshold?: number;
|
|
@@ -99,7 +99,7 @@ declare function MessageParts({
|
|
|
99
99
|
readLessLabel,
|
|
100
100
|
className,
|
|
101
101
|
...props
|
|
102
|
-
}: MessagePartsProps):
|
|
102
|
+
}: MessagePartsProps): react0.JSX.Element;
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region src/components/datasource-tool-result-card.d.ts
|
|
105
105
|
type DatasourceToolResultCardProps = {
|
|
@@ -107,7 +107,7 @@ type DatasourceToolResultCardProps = {
|
|
|
107
107
|
description: string;
|
|
108
108
|
type: string;
|
|
109
109
|
};
|
|
110
|
-
declare function DatasourceToolResultCard(props: DatasourceToolResultCardProps):
|
|
110
|
+
declare function DatasourceToolResultCard(props: DatasourceToolResultCardProps): react0.JSX.Element;
|
|
111
111
|
//#endregion
|
|
112
112
|
//#region src/components/clipboard.d.ts
|
|
113
113
|
type ClipboardState = {
|
|
@@ -134,7 +134,7 @@ declare function Clipboard({
|
|
|
134
134
|
onClick,
|
|
135
135
|
type,
|
|
136
136
|
...props
|
|
137
|
-
}: ClipboardProps):
|
|
137
|
+
}: ClipboardProps): react0.JSX.Element;
|
|
138
138
|
//#endregion
|
|
139
139
|
//#region src/components/thumbs.d.ts
|
|
140
140
|
type ThumbButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
@@ -149,7 +149,7 @@ type ThumbUpProps = Omit<ThumbButtonProps, "icon" | "label" | "onClick"> & {
|
|
|
149
149
|
declare function ThumbUp({
|
|
150
150
|
label,
|
|
151
151
|
...props
|
|
152
|
-
}: ThumbUpProps):
|
|
152
|
+
}: ThumbUpProps): react0.JSX.Element;
|
|
153
153
|
type ThumbDownProps = Omit<ThumbButtonProps, "icon" | "label" | "onClick"> & {
|
|
154
154
|
label?: string;
|
|
155
155
|
onClick: ThumbClickHandler;
|
|
@@ -157,7 +157,7 @@ type ThumbDownProps = Omit<ThumbButtonProps, "icon" | "label" | "onClick"> & {
|
|
|
157
157
|
declare function ThumbDown({
|
|
158
158
|
label,
|
|
159
159
|
...props
|
|
160
|
-
}: ThumbDownProps):
|
|
160
|
+
}: ThumbDownProps): react0.JSX.Element;
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/components/resource-card.d.ts
|
|
163
163
|
type ResourceCardProps = {
|
|
@@ -167,7 +167,7 @@ type ResourceCardProps = {
|
|
|
167
167
|
description?: string;
|
|
168
168
|
url: string | null;
|
|
169
169
|
};
|
|
170
|
-
declare function ResourceCard(props: ResourceCardProps):
|
|
170
|
+
declare function ResourceCard(props: ResourceCardProps): react0.JSX.Element;
|
|
171
171
|
//#endregion
|
|
172
172
|
//#region src/components/datasource-folder-card.d.ts
|
|
173
173
|
type DatasourceFolderCardProps = {
|
|
@@ -185,7 +185,7 @@ declare function DatasourceFolderCard({
|
|
|
185
185
|
type,
|
|
186
186
|
url,
|
|
187
187
|
resources
|
|
188
|
-
}: DatasourceFolderCardProps):
|
|
188
|
+
}: DatasourceFolderCardProps): react0.JSX.Element;
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region src/components/datasource-tool-resources.d.ts
|
|
191
191
|
type DatasourceToolResourcesProps = {
|
|
@@ -197,7 +197,7 @@ declare function DatasourceToolResources({
|
|
|
197
197
|
resources,
|
|
198
198
|
locale,
|
|
199
199
|
className
|
|
200
|
-
}: DatasourceToolResourcesProps):
|
|
200
|
+
}: DatasourceToolResourcesProps): react0.JSX.Element;
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/components/opengraph.d.ts
|
|
203
203
|
type OpenGraphField = "title" | "description" | "url" | "image" | "type";
|
|
@@ -242,36 +242,36 @@ declare function Sheet({
|
|
|
242
242
|
open: controlledOpen,
|
|
243
243
|
defaultOpen,
|
|
244
244
|
onOpenChange
|
|
245
|
-
}: SheetProps):
|
|
246
|
-
declare const SheetTrigger:
|
|
247
|
-
declare const SheetClose:
|
|
248
|
-
declare const SheetContent:
|
|
245
|
+
}: SheetProps): react0.JSX.Element;
|
|
246
|
+
declare const SheetTrigger: react0.ForwardRefExoticComponent<SheetTriggerProps & react0.RefAttributes<HTMLButtonElement>>;
|
|
247
|
+
declare const SheetClose: react0.ForwardRefExoticComponent<SheetCloseProps & react0.RefAttributes<HTMLButtonElement>>;
|
|
248
|
+
declare const SheetContent: react0.ForwardRefExoticComponent<Omit<DialogHTMLAttributes<HTMLDialogElement>, "open"> & {
|
|
249
249
|
side?: "top" | "right" | "bottom" | "left";
|
|
250
250
|
showCloseButton?: boolean;
|
|
251
251
|
closeLabel?: string;
|
|
252
|
-
} &
|
|
253
|
-
declare const SheetHeader:
|
|
254
|
-
declare const SheetFooter:
|
|
255
|
-
declare const SheetTitle:
|
|
256
|
-
declare const SheetDescription:
|
|
252
|
+
} & react0.RefAttributes<HTMLDialogElement>>;
|
|
253
|
+
declare const SheetHeader: react0.ForwardRefExoticComponent<SheetHeaderProps & react0.RefAttributes<HTMLDivElement>>;
|
|
254
|
+
declare const SheetFooter: react0.ForwardRefExoticComponent<SheetFooterProps & react0.RefAttributes<HTMLDivElement>>;
|
|
255
|
+
declare const SheetTitle: react0.ForwardRefExoticComponent<SheetTitleProps & react0.RefAttributes<HTMLHeadingElement>>;
|
|
256
|
+
declare const SheetDescription: react0.ForwardRefExoticComponent<SheetDescriptionProps & react0.RefAttributes<HTMLParagraphElement>>;
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region src/components/icons/arrow.d.ts
|
|
259
|
-
declare function ArrowUp(props: SVGProps<SVGSVGElement>):
|
|
259
|
+
declare function ArrowUp(props: SVGProps<SVGSVGElement>): react0.JSX.Element;
|
|
260
260
|
//#endregion
|
|
261
261
|
//#region src/components/icons/loader.d.ts
|
|
262
|
-
declare function Loader(props: SVGProps<SVGSVGElement>):
|
|
262
|
+
declare function Loader(props: SVGProps<SVGSVGElement>): react0.JSX.Element;
|
|
263
263
|
//#endregion
|
|
264
264
|
//#region src/components/icons/microphone.d.ts
|
|
265
|
-
declare function Microphone(props: SVGProps<SVGSVGElement>):
|
|
265
|
+
declare function Microphone(props: SVGProps<SVGSVGElement>): react0.JSX.Element;
|
|
266
266
|
//#endregion
|
|
267
267
|
//#region src/components/icons/paperclip.d.ts
|
|
268
|
-
declare function Paperclip(props: SVGProps<SVGSVGElement>):
|
|
268
|
+
declare function Paperclip(props: SVGProps<SVGSVGElement>): react0.JSX.Element;
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/components/icons/stop.d.ts
|
|
271
|
-
declare function Stop(props: SVGProps<SVGSVGElement>):
|
|
271
|
+
declare function Stop(props: SVGProps<SVGSVGElement>): react0.JSX.Element;
|
|
272
272
|
//#endregion
|
|
273
273
|
//#region src/components/icons/x.d.ts
|
|
274
|
-
declare function X(props: SVGProps<SVGSVGElement>):
|
|
274
|
+
declare function X(props: SVGProps<SVGSVGElement>): react0.JSX.Element;
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region src/components/prompt-form/file-attachments.d.ts
|
|
277
277
|
declare const PROMPT_FORM_FILE_ACCEPT = "image/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx";
|
|
@@ -291,7 +291,7 @@ declare function PromptFormIconButton({
|
|
|
291
291
|
className,
|
|
292
292
|
type,
|
|
293
293
|
...props
|
|
294
|
-
}: PromptFormIconButtonProps):
|
|
294
|
+
}: PromptFormIconButtonProps): react0.JSX.Element;
|
|
295
295
|
type PromptFormSubmitInput = {
|
|
296
296
|
text: string;
|
|
297
297
|
enabledTools?: string[];
|
|
@@ -367,7 +367,7 @@ declare function PromptForm({
|
|
|
367
367
|
rightSlot,
|
|
368
368
|
submitOnEnter,
|
|
369
369
|
onTextareaKeyDown
|
|
370
|
-
}: PromptFormProps):
|
|
370
|
+
}: PromptFormProps): react0.JSX.Element;
|
|
371
371
|
//#endregion
|
|
372
372
|
//#region src/components/prompt-form/prompt-form-attach-button.d.ts
|
|
373
373
|
type PromptFormAttachButtonProps = {
|
|
@@ -383,7 +383,7 @@ declare function PromptFormAttachButton({
|
|
|
383
383
|
disabled,
|
|
384
384
|
label,
|
|
385
385
|
...props
|
|
386
|
-
}: PromptFormAttachButtonProps):
|
|
386
|
+
}: PromptFormAttachButtonProps): react0.JSX.Element;
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/components/speech-to-text-toggle/transcribe-audio.d.ts
|
|
389
389
|
declare function dummyTranscribeAudio(_audio: Blob, signal?: AbortSignal): Promise<string>;
|
|
@@ -407,7 +407,7 @@ declare function SpeechToTextToggle({
|
|
|
407
407
|
loadingLabel,
|
|
408
408
|
className,
|
|
409
409
|
...props
|
|
410
|
-
}: SpeechToTextToggleProps):
|
|
410
|
+
}: SpeechToTextToggleProps): react0.JSX.Element;
|
|
411
411
|
//#endregion
|
|
412
412
|
//#region src/components/tool-result-card.d.ts
|
|
413
413
|
type ToolResultCardProps = {
|
|
@@ -423,7 +423,7 @@ declare function ToolResultCard({
|
|
|
423
423
|
detailsOpen,
|
|
424
424
|
locale,
|
|
425
425
|
onOpenAgentThread
|
|
426
|
-
}: ToolResultCardProps):
|
|
426
|
+
}: ToolResultCardProps): react0.JSX.Element;
|
|
427
427
|
//#endregion
|
|
428
428
|
//#region src/components/tool-result-agent-invocation-card.d.ts
|
|
429
429
|
type ToolResultAgentInvocationCardProps = {
|
|
@@ -435,7 +435,7 @@ declare function ToolResultAgentInvocationCard({
|
|
|
435
435
|
part,
|
|
436
436
|
className,
|
|
437
437
|
onOpenThread
|
|
438
|
-
}: ToolResultAgentInvocationCardProps):
|
|
438
|
+
}: ToolResultAgentInvocationCardProps): react0.JSX.Element;
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region src/components/tool-result-browser-card.d.ts
|
|
441
441
|
type ToolResultBrowserCardProps = {
|
|
@@ -445,7 +445,7 @@ type ToolResultBrowserCardProps = {
|
|
|
445
445
|
declare function ToolResultBrowserCard({
|
|
446
446
|
part,
|
|
447
447
|
className
|
|
448
|
-
}: ToolResultBrowserCardProps):
|
|
448
|
+
}: ToolResultBrowserCardProps): react0.JSX.Element;
|
|
449
449
|
//#endregion
|
|
450
450
|
//#region src/components/tool-result-external-datasource-card.d.ts
|
|
451
451
|
type ToolResultExternalDatasourceCardProps = {
|
|
@@ -455,7 +455,7 @@ type ToolResultExternalDatasourceCardProps = {
|
|
|
455
455
|
declare function ToolResultExternalDatasourceCard({
|
|
456
456
|
part,
|
|
457
457
|
className
|
|
458
|
-
}: ToolResultExternalDatasourceCardProps):
|
|
458
|
+
}: ToolResultExternalDatasourceCardProps): react0.JSX.Element;
|
|
459
459
|
//#endregion
|
|
460
460
|
//#region src/components/tool-result-http-request-card.d.ts
|
|
461
461
|
type ToolResultHttpRequestCardProps = {
|
|
@@ -465,7 +465,7 @@ type ToolResultHttpRequestCardProps = {
|
|
|
465
465
|
declare function ToolResultHttpRequestCard({
|
|
466
466
|
part,
|
|
467
467
|
className
|
|
468
|
-
}: ToolResultHttpRequestCardProps):
|
|
468
|
+
}: ToolResultHttpRequestCardProps): react0.JSX.Element;
|
|
469
469
|
//#endregion
|
|
470
470
|
//#region src/components/tool-result-mcp-card.d.ts
|
|
471
471
|
type ToolResultMcpCardProps = {
|
|
@@ -475,7 +475,7 @@ type ToolResultMcpCardProps = {
|
|
|
475
475
|
declare function ToolResultMcpCard({
|
|
476
476
|
part,
|
|
477
477
|
className
|
|
478
|
-
}: ToolResultMcpCardProps):
|
|
478
|
+
}: ToolResultMcpCardProps): react0.JSX.Element;
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region src/components/tool-result-office-documents-card.d.ts
|
|
481
481
|
type ToolResultOfficeDocumentsCardProps = {
|
|
@@ -485,7 +485,7 @@ type ToolResultOfficeDocumentsCardProps = {
|
|
|
485
485
|
declare function ToolResultOfficeDocumentsCard({
|
|
486
486
|
part,
|
|
487
487
|
className
|
|
488
|
-
}: ToolResultOfficeDocumentsCardProps):
|
|
488
|
+
}: ToolResultOfficeDocumentsCardProps): react0.JSX.Element;
|
|
489
489
|
//#endregion
|
|
490
490
|
//#region src/components/tool-result-web-search-card.d.ts
|
|
491
491
|
type ToolResultWebSearchCardProps = {
|
|
@@ -495,7 +495,7 @@ type ToolResultWebSearchCardProps = {
|
|
|
495
495
|
declare function ToolResultWebSearchCard({
|
|
496
496
|
part,
|
|
497
497
|
className
|
|
498
|
-
}: ToolResultWebSearchCardProps):
|
|
498
|
+
}: ToolResultWebSearchCardProps): react0.JSX.Element;
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region src/components/tool-result-workflow-dispatch-card.d.ts
|
|
501
501
|
type ToolResultWorkflowDispatchCardProps = {
|
|
@@ -505,7 +505,7 @@ type ToolResultWorkflowDispatchCardProps = {
|
|
|
505
505
|
declare function ToolResultWorkflowDispatchCard({
|
|
506
506
|
part,
|
|
507
507
|
className
|
|
508
|
-
}: ToolResultWorkflowDispatchCardProps):
|
|
508
|
+
}: ToolResultWorkflowDispatchCardProps): react0.JSX.Element;
|
|
509
509
|
//#endregion
|
|
510
510
|
export { ArrowUp, type ChatStatus, Clipboard, type ClipboardProps, type ClipboardState, DatasourceFolderCard, type DatasourceFolderCardProps, type DatasourceReadModel, DatasourceToolResources, type DatasourceToolResourcesProps, DatasourceToolResultCard, type DatasourceToolResultCardProps, type DatasourceToolResultMetadata, type DocumentMetadata, type FileUploadState, type FileUploadStatus, type FolderReadModel, type InvalidPromptFormFile, Loader, type LocalizedOpenGraph, type MediaFile, Message, MessageAvatar, type MessageAvatarProps, MessageContent, type MessageContentProps, MessageFooter, type MessageFooterProps, MessageHeader, type MessageHeaderProps, MessageParts, type MessagePartsProps, type MessageProps, type MessageRating, Microphone, type OpenGraphContainer, type OpenGraphField, type OpenGraphTranslation, PROMPT_FORM_FILE_ACCEPT, Paperclip, type PlaiChatError, type PlaiSseEvent, PromptForm, PromptFormAttachButton, type PromptFormAttachButtonProps, PromptFormIconButton, type PromptFormIconButtonProps, type PromptFormProps, type PromptFormSubmitInput, type RateMessageInput, ResourceCard, type ResourceCardProps, type ResourceReadModel, type SendMessageDocument, type SendMessageInput, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, SpeechToTextToggle, type SpeechToTextToggleProps, Stop, ThumbDown, type ThumbDownProps, ThumbUp, type ThumbUpProps, ToolResultAgentInvocationCard, type ToolResultAgentInvocationCardProps, ToolResultBrowserCard, type ToolResultBrowserCardProps, ToolResultCard, type ToolResultCardProps, ToolResultExternalDatasourceCard, type ToolResultExternalDatasourceCardProps, ToolResultHttpRequestCard, type ToolResultHttpRequestCardProps, ToolResultMcpCard, type ToolResultMcpCardProps, ToolResultOfficeDocumentsCard, type ToolResultOfficeDocumentsCardProps, ToolResultWebSearchCard, type ToolResultWebSearchCardProps, ToolResultWorkflowDispatchCard, type ToolResultWorkflowDispatchCardProps, type TranscribeAudioFn, type UIMessage, type UploadFileFn, type UploadFileOptions, type UploadFileProgress, type Usage, type UseChatOptions, type UseChatResult, X, dummyTranscribeAudio, getLocalizedOpenGraphValue, getResourceDescription, getResourceIcon, getResourceOpenGraphImage, getResourceOpenGraphType, getResourceTitle, getResourceType, getResourceUrl, isAllowedPromptFormFile, partitionPromptFormFiles, useChat };
|
|
511
511
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaisolutions/react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"lucide-react": "^1.24.0",
|
|
27
|
-
"@plaisolutions/client": "0.
|
|
27
|
+
"@plaisolutions/client": "0.6.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": ">=18"
|