@assistant-ui/react-native 0.1.43 → 0.1.44
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/context/AssistantContext.d.ts +2 -2
- package/dist/context/AssistantContext.d.ts.map +1 -0
- package/dist/context/providers/AttachmentByIndexProvider.d.ts +2 -2
- package/dist/context/providers/AttachmentByIndexProvider.d.ts.map +1 -0
- package/dist/context/providers/RuntimeAdapterProvider.d.ts +2 -2
- package/dist/context/providers/RuntimeAdapterProvider.d.ts.map +1 -0
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts +2 -2
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts.map +1 -0
- package/dist/index.d.ts +54 -23
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -4
- package/dist/internal.d.ts +4 -3
- package/dist/internal.d.ts.map +1 -0
- package/dist/primitives/actionBar/ActionBarCopy.d.ts +7 -9
- package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.d.ts +5 -7
- package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts +6 -8
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +28 -20
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts +6 -8
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +28 -20
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.d.ts +5 -7
- package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts +7 -9
- package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts +7 -9
- package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +1 -1
- package/dist/primitives/actionBar.d.ts +7 -12
- package/dist/primitives/actionBar.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentName.d.ts +2 -4
- package/dist/primitives/attachment/AttachmentName.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.d.ts +2 -4
- package/dist/primitives/attachment/AttachmentRemove.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRoot.d.ts +3 -5
- package/dist/primitives/attachment/AttachmentRoot.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.d.ts +2 -4
- package/dist/primitives/attachment/AttachmentThumb.d.ts.map +1 -1
- package/dist/primitives/attachment.d.ts +4 -9
- package/dist/primitives/attachment.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts +1 -3
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts +5 -7
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts +1 -3
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts +5 -7
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
- package/dist/primitives/branchPicker.d.ts +4 -9
- package/dist/primitives/branchPicker.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts +2 -4
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts +3 -5
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts.map +1 -1
- package/dist/primitives/chainOfThought.d.ts +3 -8
- package/dist/primitives/chainOfThought.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.d.ts +2 -4
- package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.d.ts +1 -3
- package/dist/primitives/composer/ComposerAttachments.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerCancel.d.ts +2 -4
- package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerIf.d.ts +2 -2
- package/dist/primitives/composer/ComposerIf.d.ts.map +1 -0
- package/dist/primitives/composer/ComposerInput.d.ts +8 -10
- package/dist/primitives/composer/ComposerInput.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +1 -1
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerQueue.d.ts +2 -2
- package/dist/primitives/composer/ComposerQueue.d.ts.map +1 -0
- package/dist/primitives/composer/ComposerQuote.d.ts +3 -5
- package/dist/primitives/composer/ComposerQuote.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerQuoteDismiss.d.ts +2 -4
- package/dist/primitives/composer/ComposerQuoteDismiss.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerQuoteText.d.ts +3 -5
- package/dist/primitives/composer/ComposerQuoteText.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerRoot.d.ts +3 -5
- package/dist/primitives/composer/ComposerRoot.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerSend.d.ts +2 -4
- package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
- package/dist/primitives/composer.d.ts +11 -16
- package/dist/primitives/composer.d.ts.map +1 -1
- package/dist/primitives/error/ErrorMessage.d.ts +5 -7
- package/dist/primitives/error/ErrorMessage.d.ts.map +1 -1
- package/dist/primitives/error/ErrorRoot.d.ts +5 -7
- package/dist/primitives/error/ErrorRoot.d.ts.map +1 -1
- package/dist/primitives/error/index.d.ts +2 -7
- package/dist/primitives/error/index.d.ts.map +1 -1
- package/dist/primitives/message/MessageAttachments.d.ts +1 -3
- package/dist/primitives/message/MessageAttachments.d.ts.map +1 -1
- package/dist/primitives/message/MessageContent.d.ts +46 -47
- package/dist/primitives/message/MessageContent.d.ts.map +1 -1
- package/dist/primitives/message/MessageContent.js +27 -21
- package/dist/primitives/message/MessageContent.js.map +1 -1
- package/dist/primitives/message/MessageIf.d.ts +7 -9
- package/dist/primitives/message/MessageIf.d.ts.map +1 -1
- package/dist/primitives/message/MessageParts.d.ts +4 -6
- package/dist/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/primitives/message/MessageRoot.d.ts +3 -5
- package/dist/primitives/message/MessageRoot.d.ts.map +1 -1
- package/dist/primitives/message.d.ts +6 -11
- package/dist/primitives/message.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartImage.d.ts +4 -6
- package/dist/primitives/messagePart/MessagePartImage.d.ts.map +1 -1
- package/dist/primitives/messagePart/MessagePartInProgress.d.ts +2 -2
- package/dist/primitives/messagePart/MessagePartInProgress.d.ts.map +1 -0
- package/dist/primitives/messagePart/MessagePartText.d.ts +4 -6
- package/dist/primitives/messagePart/MessagePartText.d.ts.map +1 -1
- package/dist/primitives/messagePart.d.ts +4 -9
- package/dist/primitives/messagePart.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemRemove.d.ts +2 -4
- package/dist/primitives/queueItem/QueueItemRemove.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemSteer.d.ts +2 -4
- package/dist/primitives/queueItem/QueueItemSteer.d.ts.map +1 -1
- package/dist/primitives/queueItem/QueueItemText.d.ts +3 -5
- package/dist/primitives/queueItem/QueueItemText.d.ts.map +1 -1
- package/dist/primitives/queueItem.d.ts +3 -8
- package/dist/primitives/queueItem.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionDescription.d.ts +3 -5
- package/dist/primitives/suggestion/SuggestionDescription.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTitle.d.ts +3 -5
- package/dist/primitives/suggestion/SuggestionTitle.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts +13 -15
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.js +1 -1
- package/dist/primitives/suggestion.d.ts +3 -8
- package/dist/primitives/suggestion.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.d.ts +2 -4
- package/dist/primitives/thread/ThreadEmpty.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadIf.d.ts +4 -6
- package/dist/primitives/thread/ThreadIf.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadMessages.d.ts +37 -37
- package/dist/primitives/thread/ThreadMessages.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadMessages.js +70 -58
- package/dist/primitives/thread/ThreadMessages.js.map +1 -1
- package/dist/primitives/thread/ThreadRoot.d.ts +3 -5
- package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.d.ts +15 -17
- package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
- package/dist/primitives/thread.d.ts +8 -11
- package/dist/primitives/thread.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.d.ts +6 -8
- package/dist/primitives/threadList/ThreadListItems.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.js +1 -1
- package/dist/primitives/threadList/ThreadListNew.d.ts +5 -7
- package/dist/primitives/threadList/ThreadListNew.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.js +21 -17
- package/dist/primitives/threadList/ThreadListNew.js.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.d.ts +3 -5
- package/dist/primitives/threadList/ThreadListRoot.d.ts.map +1 -1
- package/dist/primitives/threadList.d.ts +3 -8
- package/dist/primitives/threadList.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts +2 -4
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts +2 -4
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts +3 -5
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts +5 -7
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js +21 -17
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts +2 -4
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem.d.ts +6 -11
- package/dist/primitives/threadListItem.d.ts.map +1 -1
- package/dist/runtimes/useLocalRuntime.d.ts +2 -2
- package/dist/runtimes/useLocalRuntime.d.ts.map +1 -0
- package/dist/runtimes/useRemoteThreadListRuntime.d.ts +2 -2
- package/dist/runtimes/useRemoteThreadListRuntime.d.ts.map +1 -0
- package/package.json +7 -7
- package/src/index.ts +90 -1
- package/src/primitives/actionBar/ActionBar.test.tsx +76 -0
- package/src/primitives/actionBar/ActionBarFeedbackNegative.tsx +4 -1
- package/src/primitives/actionBar/ActionBarFeedbackPositive.tsx +4 -1
- package/src/primitives/composer/ComposerInput.test.tsx +17 -1
- package/src/primitives/composer/ComposerInput.tsx +6 -1
- package/src/primitives/message/MessageContent.test.tsx +64 -3
- package/src/primitives/message/MessageContent.tsx +5 -3
- package/src/primitives/thread/ThreadMessages.test.tsx +111 -5
- package/src/primitives/thread/ThreadMessages.tsx +41 -11
- package/src/primitives/threadList/ThreadListNew.test.tsx +35 -8
- package/src/primitives/threadList/ThreadListNew.tsx +4 -1
- package/src/primitives/threadListItem/ThreadListItemTrigger.test.tsx +32 -6
- package/src/primitives/threadListItem/ThreadListItemTrigger.tsx +4 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/primitives/queueItem/QueueItemText.d.ts
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type TextProps } from "react-native";
|
|
4
3
|
export type QueueItemTextProps = TextProps & {
|
|
5
|
-
|
|
4
|
+
children?: ReactNode;
|
|
6
5
|
};
|
|
7
6
|
export declare const QueueItemText: ({ children, ...textProps }: QueueItemTextProps) => import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=QueueItemText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueItemText.d.ts","
|
|
1
|
+
{"version":3,"file":"QueueItemText.d.ts","sourceRoot":"","sources":["../../../src/primitives/queueItem/QueueItemText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,4BAG3B,kBAAkB,gCAUpB,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare namespace queueItem_d_exports {
|
|
5
|
-
export { QueueItemRemove as Remove, QueueItemRemoveProps as RemoveProps, QueueItemSteer as Steer, QueueItemSteerProps as SteerProps, QueueItemText as Text, QueueItemTextProps as TextProps };
|
|
6
|
-
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { QueueItemRemove as Remove, type QueueItemRemoveProps as RemoveProps, QueueItemSteer as Steer, type QueueItemSteerProps as SteerProps, QueueItemText as Text, type QueueItemTextProps as TextProps, queueItem_d_exports };
|
|
1
|
+
export { QueueItemText as Text, type QueueItemTextProps as TextProps, } from "./queueItem/QueueItemText.js";
|
|
2
|
+
export { QueueItemRemove as Remove, type QueueItemRemoveProps as RemoveProps, } from "./queueItem/QueueItemRemove.js";
|
|
3
|
+
export { QueueItemSteer as Steer, type QueueItemSteerProps as SteerProps, } from "./queueItem/QueueItemSteer.js";
|
|
9
4
|
//# sourceMappingURL=queueItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueItem.d.ts","
|
|
1
|
+
{"version":3,"file":"queueItem.d.ts","sourceRoot":"","sources":["../../src/primitives/queueItem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,IAAI,EACrB,KAAK,kBAAkB,IAAI,SAAS,GACrC,qCAAkC;AACnC,OAAO,EACL,eAAe,IAAI,MAAM,EACzB,KAAK,oBAAoB,IAAI,WAAW,GACzC,uCAAoC;AACrC,OAAO,EACL,cAAc,IAAI,KAAK,EACvB,KAAK,mBAAmB,IAAI,UAAU,GACvC,sCAAmC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/primitives/suggestion/SuggestionDescription.d.ts
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type TextProps } from "react-native";
|
|
4
3
|
export type SuggestionDescriptionProps = TextProps & {
|
|
5
|
-
|
|
4
|
+
children?: ReactNode;
|
|
6
5
|
};
|
|
7
6
|
export declare const SuggestionDescription: ({ children, ...textProps }: SuggestionDescriptionProps) => import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=SuggestionDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionDescription.d.ts","
|
|
1
|
+
{"version":3,"file":"SuggestionDescription.d.ts","sourceRoot":"","sources":["../../../src/primitives/suggestion/SuggestionDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG;IACnD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,4BAGnC,0BAA0B,gCAI5B,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/primitives/suggestion/SuggestionTitle.d.ts
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type TextProps } from "react-native";
|
|
4
3
|
export type SuggestionTitleProps = TextProps & {
|
|
5
|
-
|
|
4
|
+
children?: ReactNode;
|
|
6
5
|
};
|
|
7
6
|
export declare const SuggestionTitle: ({ children, ...textProps }: SuggestionTitleProps) => import("react").JSX.Element;
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=SuggestionTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionTitle.d.ts","
|
|
1
|
+
{"version":3,"file":"SuggestionTitle.d.ts","sourceRoot":"","sources":["../../../src/primitives/suggestion/SuggestionTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG;IAC7C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,4BAG7B,oBAAoB,gCAItB,CAAC"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import { PressableProps } from "react-native";
|
|
2
|
-
//#region src/primitives/suggestion/SuggestionTrigger.d.ts
|
|
1
|
+
import { type PressableProps } from "react-native";
|
|
3
2
|
export type SuggestionTriggerProps = Omit<PressableProps, "onPress" | "children"> & {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
children: PressableProps["children"];
|
|
4
|
+
/**
|
|
5
|
+
* When true, automatically sends the message.
|
|
6
|
+
* When false, replaces or appends the composer text with the suggestion.
|
|
7
|
+
*/
|
|
8
|
+
send?: boolean | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to clear the composer. When send is false, determines if composer
|
|
11
|
+
* text is replaced (true) or appended (false).
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
clearComposer?: boolean | undefined;
|
|
16
15
|
};
|
|
17
16
|
export declare const SuggestionTrigger: ({ children, send, clearComposer, disabled: disabledProp, ...pressableProps }: SuggestionTriggerProps) => import("react").JSX.Element;
|
|
18
|
-
//#endregion
|
|
19
17
|
//# sourceMappingURL=SuggestionTrigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionTrigger.d.ts","
|
|
1
|
+
{"version":3,"file":"SuggestionTrigger.d.ts","sourceRoot":"","sources":["../../../src/primitives/suggestion/SuggestionTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9D,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,cAAc,EACd,SAAS,GAAG,UAAU,CACvB,GAAG;IACF,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;IACrC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,8EAM/B,sBAAsB,gCAkBxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAuiState } from "@assistant-ui/store";
|
|
2
1
|
import { useSuggestionTrigger } from "@assistant-ui/core/react";
|
|
2
|
+
import { useAuiState } from "@assistant-ui/store";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { Pressable } from "react-native";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare namespace suggestion_d_exports {
|
|
5
|
-
export { SuggestionDescription as Description, SuggestionDescriptionProps as DescriptionProps, SuggestionTitle as Title, SuggestionTitleProps as TitleProps, SuggestionTrigger as Trigger, SuggestionTriggerProps as TriggerProps };
|
|
6
|
-
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { SuggestionDescription as Description, type SuggestionDescriptionProps as DescriptionProps, SuggestionTitle as Title, type SuggestionTitleProps as TitleProps, SuggestionTrigger as Trigger, type SuggestionTriggerProps as TriggerProps, suggestion_d_exports };
|
|
1
|
+
export { SuggestionTitle as Title, type SuggestionTitleProps as TitleProps, } from "./suggestion/SuggestionTitle.js";
|
|
2
|
+
export { SuggestionDescription as Description, type SuggestionDescriptionProps as DescriptionProps, } from "./suggestion/SuggestionDescription.js";
|
|
3
|
+
export { SuggestionTrigger as Trigger, type SuggestionTriggerProps as TriggerProps, } from "./suggestion/SuggestionTrigger.js";
|
|
9
4
|
//# sourceMappingURL=suggestion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.d.ts","
|
|
1
|
+
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../src/primitives/suggestion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,IAAI,KAAK,EACxB,KAAK,oBAAoB,IAAI,UAAU,GACxC,wCAAqC;AACtC,OAAO,EACL,qBAAqB,IAAI,WAAW,EACpC,KAAK,0BAA0B,IAAI,gBAAgB,GACpD,8CAA2C;AAC5C,OAAO,EACL,iBAAiB,IAAI,OAAO,EAC5B,KAAK,sBAAsB,IAAI,YAAY,GAC5C,0CAAuC"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
//#region src/primitives/thread/ThreadEmpty.d.ts
|
|
1
|
+
import type { ReactNode } from "react";
|
|
3
2
|
export type ThreadEmptyProps = {
|
|
4
|
-
|
|
3
|
+
children: ReactNode;
|
|
5
4
|
};
|
|
6
5
|
/**
|
|
7
6
|
* @deprecated Use `<AuiIf condition={(s) => s.thread.isEmpty} />` instead.
|
|
8
7
|
*/
|
|
9
8
|
export declare const ThreadEmpty: ({ children }: ThreadEmptyProps) => import("react").JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=ThreadEmpty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadEmpty.d.ts","
|
|
1
|
+
{"version":3,"file":"ThreadEmpty.d.ts","sourceRoot":"","sources":["../../../src/primitives/thread/ThreadEmpty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,cAAc,gBAAgB,gCAEzD,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
//#region src/primitives/thread/ThreadIf.d.ts
|
|
1
|
+
import type { ReactNode } from "react";
|
|
3
2
|
export type ThreadIfProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
empty?: boolean | undefined;
|
|
5
|
+
running?: boolean | undefined;
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
9
8
|
* @deprecated Use `<AuiIf condition={(s) => s.thread...} />` instead.
|
|
10
9
|
*/
|
|
11
10
|
export declare const ThreadIf: ({ children, empty, running }: ThreadIfProps) => import("react").JSX.Element | null;
|
|
12
|
-
//#endregion
|
|
13
11
|
//# sourceMappingURL=ThreadIf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadIf.d.ts","
|
|
1
|
+
{"version":3,"file":"ThreadIf.d.ts","sourceRoot":"","sources":["../../../src/primitives/thread/ThreadIf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,8BAA8B,aAAa,uCAOnE,CAAC"}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FlatList, FlatListProps } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
import { FlatList, type FlatListProps } from "react-native";
|
|
3
|
+
import type { ThreadMessage } from "@assistant-ui/core";
|
|
4
|
+
import type { MessageState } from "@assistant-ui/core/store";
|
|
5
5
|
type MessageComponents = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
Message: ComponentType;
|
|
7
|
+
EditComposer?: ComponentType | undefined;
|
|
8
|
+
UserEditComposer?: ComponentType | undefined;
|
|
9
|
+
AssistantEditComposer?: ComponentType | undefined;
|
|
10
|
+
SystemEditComposer?: ComponentType | undefined;
|
|
11
|
+
UserMessage?: ComponentType | undefined;
|
|
12
|
+
AssistantMessage?: ComponentType | undefined;
|
|
13
|
+
SystemMessage?: ComponentType | undefined;
|
|
14
14
|
} | {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
Message?: ComponentType | undefined;
|
|
16
|
+
EditComposer?: ComponentType | undefined;
|
|
17
|
+
UserEditComposer?: ComponentType | undefined;
|
|
18
|
+
AssistantEditComposer?: ComponentType | undefined;
|
|
19
|
+
SystemEditComposer?: ComponentType | undefined;
|
|
20
|
+
UserMessage: ComponentType;
|
|
21
|
+
AssistantMessage: ComponentType;
|
|
22
|
+
SystemMessage?: ComponentType | undefined;
|
|
23
23
|
};
|
|
24
24
|
type MessagesContent = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/** @deprecated Use the children render function instead. */
|
|
26
|
+
components: MessageComponents;
|
|
27
|
+
children?: never;
|
|
28
28
|
} | {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
children: (value: {
|
|
30
|
+
message: MessageState;
|
|
31
|
+
}) => ReactNode;
|
|
32
|
+
components?: never;
|
|
33
33
|
};
|
|
34
34
|
export type ThreadMessagesFlatListProps = Omit<FlatListProps<ThreadMessage>, "data" | "renderItem" | "children"> & MessagesContent & {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
autoScroll?: boolean | undefined;
|
|
36
|
+
scrollToBottomOnRunStart?: boolean | undefined;
|
|
37
|
+
scrollToBottomOnInitialize?: boolean | undefined;
|
|
38
|
+
scrollToBottomOnThreadSwitch?: boolean | undefined;
|
|
39
|
+
history?: {
|
|
40
|
+
hasMore: boolean;
|
|
41
|
+
isLoadingMore: boolean;
|
|
42
|
+
loadMore: () => void;
|
|
43
|
+
} | undefined;
|
|
44
44
|
};
|
|
45
45
|
/** @deprecated Use ThreadMessagesFlatListProps instead. */
|
|
46
46
|
export type ThreadMessagesProps = ThreadMessagesFlatListProps;
|
|
47
47
|
export declare const ThreadMessagesFlatList: import("react").ForwardRefExoticComponent<ThreadMessagesFlatListProps & import("react").RefAttributes<FlatList<ThreadMessage>>>;
|
|
48
48
|
/** @deprecated Use ThreadPrimitive.MessagesFlatList instead. */
|
|
49
49
|
export declare const ThreadMessages: import("react").ForwardRefExoticComponent<ThreadMessagesFlatListProps & import("react").RefAttributes<FlatList<ThreadMessage>>>;
|
|
50
|
-
|
|
50
|
+
export {};
|
|
51
51
|
//# sourceMappingURL=ThreadMessages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadMessages.d.ts","
|
|
1
|
+
{"version":3,"file":"ThreadMessages.d.ts","sourceRoot":"","sources":["../../../src/primitives/thread/ThreadMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGlB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAInB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQ7D,KAAK,iBAAiB,GAClB;IACE,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACzC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7C,qBAAqB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAClD,kBAAkB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC/C,WAAW,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACxC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7C,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CAC3C,GACD;IACE,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACzC,gBAAgB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7C,qBAAqB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAClD,kBAAkB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC/C,WAAW,EAAE,aAAa,CAAC;IAC3B,gBAAgB,EAAE,aAAa,CAAC;IAChC,aAAa,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEN,KAAK,eAAe,GAChB;IACE,4DAA4D;IAC5D,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,GACD;IACE,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,KAAK,SAAS,CAAC;IAC1D,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAEN,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,aAAa,CAAC,aAAa,CAAC,EAC5B,MAAM,GAAG,YAAY,GAAG,UAAU,CACnC,GACC,eAAe,GAAG;IAChB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,wBAAwB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,0BAA0B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjD,4BAA4B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnD,OAAO,CAAC,EACJ;QACE,OAAO,EAAE,OAAO,CAAC;QACjB,aAAa,EAAE,OAAO,CAAC;QACvB,QAAQ,EAAE,MAAM,IAAI,CAAC;KACtB,GACD,SAAS,CAAC;CACf,CAAC;AAEJ,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAiX9D,eAAO,MAAM,sBAAsB,iIAiIlC,CAAC;AAGF,gEAAgE;AAChE,eAAO,MAAM,cAAc,iIAuB1B,CAAC"}
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
import { RenderChildrenWithAccessor, useAuiEvent, useAuiState } from "@assistant-ui/store";
|
|
2
1
|
import { MessageByIndexProvider } from "@assistant-ui/core/react";
|
|
2
|
+
import { RenderChildrenWithAccessor, useAuiEvent, useAuiState } from "@assistant-ui/store";
|
|
3
3
|
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
4
4
|
import { FlatList } from "react-native";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { forwardRef, memo, useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
6
|
+
import { forwardRef, memo, useCallback, useEffect, useRef } from "@assistant-ui/tap/react-shim";
|
|
7
7
|
//#region src/primitives/thread/ThreadMessages.tsx
|
|
8
8
|
const DEFAULT_SYSTEM_MESSAGE = () => null;
|
|
9
9
|
const AT_BOTTOM_THRESHOLD = 4;
|
|
10
|
+
const useHistoryLoad = (history, onStartReached) => {
|
|
11
|
+
const loadRequestedRef = useRef(false);
|
|
12
|
+
const hasMore = history?.hasMore ?? false;
|
|
13
|
+
const isLoadingMore = history?.isLoadingMore ?? false;
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
loadRequestedRef.current = isLoadingMore;
|
|
16
|
+
});
|
|
17
|
+
const handleStartReached = useCallback((info) => {
|
|
18
|
+
onStartReached?.(info);
|
|
19
|
+
if (loadRequestedRef.current) return;
|
|
20
|
+
loadRequestedRef.current = true;
|
|
21
|
+
try {
|
|
22
|
+
history?.loadMore();
|
|
23
|
+
} catch (error) {
|
|
24
|
+
loadRequestedRef.current = false;
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}, [history, onStartReached]);
|
|
28
|
+
return {
|
|
29
|
+
canLoadMore: hasMore && !isLoadingMore,
|
|
30
|
+
handleStartReached
|
|
31
|
+
};
|
|
32
|
+
};
|
|
10
33
|
const getComponent = (components, role, isEditing) => {
|
|
11
34
|
switch (role) {
|
|
12
35
|
case "user": if (isEditing) return components.UserEditComposer ?? components.EditComposer ?? components.UserMessage ?? components.Message;
|
|
@@ -300,7 +323,7 @@ const useThreadMessagesFlatListAutoScroll = (t0) => {
|
|
|
300
323
|
return t16;
|
|
301
324
|
};
|
|
302
325
|
const ThreadMessagesFlatList = forwardRef((t0, forwardedRef) => {
|
|
303
|
-
const $ = c(
|
|
326
|
+
const $ = c(58);
|
|
304
327
|
let autoScroll;
|
|
305
328
|
let children;
|
|
306
329
|
let components;
|
|
@@ -425,27 +448,16 @@ const ThreadMessagesFlatList = forwardRef((t0, forwardedRef) => {
|
|
|
425
448
|
$[34] = t6;
|
|
426
449
|
} else t6 = $[34];
|
|
427
450
|
const handleContentSizeChange = t6;
|
|
428
|
-
const canLoadMore = history
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
$[35] = history;
|
|
436
|
-
$[36] = onStartReached;
|
|
437
|
-
$[37] = t7;
|
|
438
|
-
} else t7 = $[37];
|
|
439
|
-
const handleStartReached = t7;
|
|
440
|
-
const t8 = messages;
|
|
451
|
+
const { canLoadMore, handleStartReached } = useHistoryLoad(history, onStartReached);
|
|
452
|
+
const t7 = messages;
|
|
453
|
+
let t8;
|
|
454
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
455
|
+
t8 = { minIndexForVisible: 0 };
|
|
456
|
+
$[35] = t8;
|
|
457
|
+
} else t8 = $[35];
|
|
441
458
|
let t9;
|
|
442
|
-
if ($[38]
|
|
443
|
-
t9 =
|
|
444
|
-
$[38] = t9;
|
|
445
|
-
} else t9 = $[38];
|
|
446
|
-
let t10;
|
|
447
|
-
if ($[39] !== handleContentSizeChange || $[40] !== handleLayout || $[41] !== handleScroll || $[42] !== onContentSizeChange || $[43] !== onLayout || $[44] !== onScroll || $[45] !== scrollEventThrottle || $[46] !== scrollTracking) {
|
|
448
|
-
t10 = scrollTracking ? {
|
|
459
|
+
if ($[36] !== handleContentSizeChange || $[37] !== handleLayout || $[38] !== handleScroll || $[39] !== onContentSizeChange || $[40] !== onLayout || $[41] !== onScroll || $[42] !== scrollEventThrottle || $[43] !== scrollTracking) {
|
|
460
|
+
t9 = scrollTracking ? {
|
|
449
461
|
onContentSizeChange: handleContentSizeChange,
|
|
450
462
|
onLayout: handleLayout,
|
|
451
463
|
onScroll: handleScroll,
|
|
@@ -456,53 +468,53 @@ const ThreadMessagesFlatList = forwardRef((t0, forwardedRef) => {
|
|
|
456
468
|
...onScroll && { onScroll },
|
|
457
469
|
...scrollEventThrottle !== void 0 && { scrollEventThrottle }
|
|
458
470
|
};
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
$[
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
468
|
-
} else
|
|
469
|
-
let
|
|
470
|
-
if ($[
|
|
471
|
-
|
|
471
|
+
$[36] = handleContentSizeChange;
|
|
472
|
+
$[37] = handleLayout;
|
|
473
|
+
$[38] = handleScroll;
|
|
474
|
+
$[39] = onContentSizeChange;
|
|
475
|
+
$[40] = onLayout;
|
|
476
|
+
$[41] = onScroll;
|
|
477
|
+
$[42] = scrollEventThrottle;
|
|
478
|
+
$[43] = scrollTracking;
|
|
479
|
+
$[44] = t9;
|
|
480
|
+
} else t9 = $[44];
|
|
481
|
+
let t10;
|
|
482
|
+
if ($[45] !== canLoadMore || $[46] !== handleStartReached || $[47] !== history || $[48] !== onStartReached || $[49] !== onStartReachedThreshold) {
|
|
483
|
+
t10 = history ? {
|
|
472
484
|
...canLoadMore ? { onStartReached: handleStartReached } : onStartReached ? { onStartReached } : {},
|
|
473
485
|
onStartReachedThreshold: onStartReachedThreshold ?? 1
|
|
474
486
|
} : {
|
|
475
487
|
...onStartReached && { onStartReached },
|
|
476
488
|
...onStartReachedThreshold !== void 0 && { onStartReachedThreshold }
|
|
477
489
|
};
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
} else
|
|
485
|
-
let
|
|
486
|
-
if ($[
|
|
487
|
-
|
|
490
|
+
$[45] = canLoadMore;
|
|
491
|
+
$[46] = handleStartReached;
|
|
492
|
+
$[47] = history;
|
|
493
|
+
$[48] = onStartReached;
|
|
494
|
+
$[49] = onStartReachedThreshold;
|
|
495
|
+
$[50] = t10;
|
|
496
|
+
} else t10 = $[50];
|
|
497
|
+
let t11;
|
|
498
|
+
if ($[51] !== flatListProps || $[52] !== renderItem || $[53] !== setFlatListRef || $[54] !== t10 || $[55] !== t7 || $[56] !== t9) {
|
|
499
|
+
t11 = /* @__PURE__ */ jsx(FlatList, {
|
|
488
500
|
ref: setFlatListRef,
|
|
489
|
-
data:
|
|
501
|
+
data: t7,
|
|
490
502
|
renderItem,
|
|
491
503
|
keyExtractor,
|
|
492
|
-
maintainVisibleContentPosition:
|
|
504
|
+
maintainVisibleContentPosition: t8,
|
|
505
|
+
...t9,
|
|
493
506
|
...t10,
|
|
494
|
-
...t11,
|
|
495
507
|
...flatListProps
|
|
496
508
|
});
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
} else
|
|
505
|
-
return
|
|
509
|
+
$[51] = flatListProps;
|
|
510
|
+
$[52] = renderItem;
|
|
511
|
+
$[53] = setFlatListRef;
|
|
512
|
+
$[54] = t10;
|
|
513
|
+
$[55] = t7;
|
|
514
|
+
$[56] = t9;
|
|
515
|
+
$[57] = t11;
|
|
516
|
+
} else t11 = $[57];
|
|
517
|
+
return t11;
|
|
506
518
|
});
|
|
507
519
|
ThreadMessagesFlatList.displayName = "ThreadPrimitive.MessagesFlatList";
|
|
508
520
|
/** @deprecated Use ThreadPrimitive.MessagesFlatList instead. */
|