@assistant-ui/react-native 0.1.15 → 0.1.17
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/README.md +35 -12
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/context/AssistantContext.d.ts +2 -2
- package/dist/context/AssistantContext.js +2 -2
- package/dist/context/providers/AttachmentByIndexProvider.d.ts +2 -2
- package/dist/context/providers/AttachmentByIndexProvider.js +2 -2
- package/dist/context/providers/RuntimeAdapterProvider.d.ts +2 -2
- package/dist/context/providers/RuntimeAdapterProvider.js +2 -2
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts +2 -2
- package/dist/context/providers/ThreadListItemRuntimeProvider.js +2 -2
- package/dist/index.d.ts +20 -38
- package/dist/index.js +19 -39
- package/dist/internal.d.ts +3 -4
- package/dist/internal.js +2 -3
- package/dist/primitives/actionBar/ActionBarCopy.d.ts +18 -8
- package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarCopy.js +17 -8
- package/dist/primitives/actionBar/ActionBarCopy.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.d.ts +13 -5
- package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.js +14 -5
- package/dist/primitives/actionBar/ActionBarEdit.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts +14 -7
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js +13 -5
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts +14 -7
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js +13 -5
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.d.ts +13 -5
- package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.js +14 -5
- package/dist/primitives/actionBar/ActionBarReload.js.map +1 -1
- package/dist/primitives/actionBar.d.ts +12 -5
- package/dist/primitives/actionBar.d.ts.map +1 -1
- package/dist/primitives/actionBar.js +17 -5
- package/dist/primitives/actionBar.js.map +1 -1
- package/dist/primitives/attachment/AttachmentName.d.ts +8 -4
- package/dist/primitives/attachment/AttachmentName.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentName.js +12 -5
- package/dist/primitives/attachment/AttachmentName.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.d.ts +12 -5
- package/dist/primitives/attachment/AttachmentRemove.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.js +15 -8
- package/dist/primitives/attachment/AttachmentRemove.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRoot.d.ts +12 -5
- package/dist/primitives/attachment/AttachmentRoot.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentRoot.js +10 -3
- package/dist/primitives/attachment/AttachmentRoot.js.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.d.ts +8 -4
- package/dist/primitives/attachment/AttachmentThumb.d.ts.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.js +15 -8
- package/dist/primitives/attachment/AttachmentThumb.js.map +1 -1
- package/dist/primitives/attachment.d.ts +11 -4
- package/dist/primitives/attachment.d.ts.map +1 -1
- package/dist/primitives/attachment.js +15 -4
- package/dist/primitives/attachment.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts +7 -3
- package/dist/primitives/branchPicker/BranchPickerCount.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerCount.js +12 -5
- package/dist/primitives/branchPicker/BranchPickerCount.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts +13 -5
- package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.js +14 -5
- package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts +7 -3
- package/dist/primitives/branchPicker/BranchPickerNumber.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNumber.js +12 -5
- package/dist/primitives/branchPicker/BranchPickerNumber.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts +13 -5
- package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.js +14 -5
- package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
- package/dist/primitives/branchPicker.d.ts +11 -4
- package/dist/primitives/branchPicker.d.ts.map +1 -1
- package/dist/primitives/branchPicker.js +15 -4
- package/dist/primitives/branchPicker.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts +12 -5
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js +17 -10
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts +12 -5
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.js +10 -3
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.js.map +1 -1
- package/dist/primitives/chainOfThought.d.ts +10 -3
- package/dist/primitives/chainOfThought.d.ts.map +1 -1
- package/dist/primitives/chainOfThought.js +13 -3
- package/dist/primitives/chainOfThought.js.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.d.ts +13 -5
- package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.js +19 -11
- package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.d.ts +18 -14
- package/dist/primitives/composer/ComposerAttachments.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerAttachments.js +7 -3
- package/dist/primitives/composer/ComposerAttachments.js.map +1 -1
- package/dist/primitives/composer/ComposerCancel.d.ts +13 -5
- package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerCancel.js +14 -5
- package/dist/primitives/composer/ComposerCancel.js.map +1 -1
- package/dist/primitives/composer/ComposerIf.d.ts +2 -2
- package/dist/primitives/composer/ComposerIf.js +2 -2
- package/dist/primitives/composer/ComposerInput.d.ts +20 -10
- package/dist/primitives/composer/ComposerInput.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +46 -40
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerRoot.d.ts +12 -5
- package/dist/primitives/composer/ComposerRoot.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerRoot.js +10 -3
- package/dist/primitives/composer/ComposerRoot.js.map +1 -1
- package/dist/primitives/composer/ComposerSend.d.ts +13 -5
- package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerSend.js +14 -5
- package/dist/primitives/composer/ComposerSend.js.map +1 -1
- package/dist/primitives/composer.d.ts +14 -7
- package/dist/primitives/composer.d.ts.map +1 -1
- package/dist/primitives/composer.js +22 -7
- package/dist/primitives/composer.js.map +1 -1
- package/dist/primitives/error/ErrorMessage.d.ts +14 -7
- package/dist/primitives/error/ErrorMessage.d.ts.map +1 -1
- package/dist/primitives/error/ErrorMessage.js +13 -7
- package/dist/primitives/error/ErrorMessage.js.map +1 -1
- package/dist/primitives/error/ErrorRoot.d.ts +14 -7
- package/dist/primitives/error/ErrorRoot.d.ts.map +1 -1
- package/dist/primitives/error/ErrorRoot.js +12 -7
- package/dist/primitives/error/ErrorRoot.js.map +1 -1
- package/dist/primitives/error/index.d.ts +9 -2
- package/dist/primitives/error/index.d.ts.map +1 -1
- package/dist/primitives/error/index.js +11 -2
- package/dist/primitives/error/index.js.map +1 -1
- package/dist/primitives/message/MessageAttachments.d.ts +13 -9
- package/dist/primitives/message/MessageAttachments.d.ts.map +1 -1
- package/dist/primitives/message/MessageAttachments.js +7 -3
- package/dist/primitives/message/MessageAttachments.js.map +1 -1
- package/dist/primitives/message/MessageContent.d.ts +58 -47
- package/dist/primitives/message/MessageContent.d.ts.map +1 -1
- package/dist/primitives/message/MessageContent.js +84 -63
- package/dist/primitives/message/MessageContent.js.map +1 -1
- package/dist/primitives/message/MessageIf.d.ts +18 -8
- package/dist/primitives/message/MessageIf.d.ts.map +1 -1
- package/dist/primitives/message/MessageIf.js +20 -21
- package/dist/primitives/message/MessageIf.js.map +1 -1
- package/dist/primitives/message/MessageParts.d.ts +9 -6
- package/dist/primitives/message/MessageParts.d.ts.map +1 -1
- package/dist/primitives/message/MessageParts.js +32 -35
- package/dist/primitives/message/MessageParts.js.map +1 -1
- package/dist/primitives/message/MessageRoot.d.ts +12 -5
- package/dist/primitives/message/MessageRoot.d.ts.map +1 -1
- package/dist/primitives/message/MessageRoot.js +10 -3
- package/dist/primitives/message/MessageRoot.js.map +1 -1
- package/dist/primitives/message.d.ts +13 -6
- package/dist/primitives/message.d.ts.map +1 -1
- package/dist/primitives/message.js +21 -6
- package/dist/primitives/message.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionDescription.d.ts +12 -5
- package/dist/primitives/suggestion/SuggestionDescription.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionDescription.js +12 -5
- package/dist/primitives/suggestion/SuggestionDescription.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionTitle.d.ts +12 -5
- package/dist/primitives/suggestion/SuggestionTitle.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTitle.js +12 -5
- package/dist/primitives/suggestion/SuggestionTitle.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts +26 -16
- package/dist/primitives/suggestion/SuggestionTrigger.d.ts.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.js +18 -10
- package/dist/primitives/suggestion/SuggestionTrigger.js.map +1 -1
- package/dist/primitives/suggestion.d.ts +10 -3
- package/dist/primitives/suggestion.d.ts.map +1 -1
- package/dist/primitives/suggestion.js +13 -3
- package/dist/primitives/suggestion.js.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.d.ts +10 -4
- package/dist/primitives/thread/ThreadEmpty.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadEmpty.js +8 -6
- package/dist/primitives/thread/ThreadEmpty.js.map +1 -1
- package/dist/primitives/thread/ThreadIf.d.ts +14 -6
- package/dist/primitives/thread/ThreadIf.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadIf.js +14 -13
- package/dist/primitives/thread/ThreadIf.js.map +1 -1
- package/dist/primitives/thread/ThreadMessages.d.ts +40 -23
- package/dist/primitives/thread/ThreadMessages.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadMessages.js +53 -55
- package/dist/primitives/thread/ThreadMessages.js.map +1 -1
- package/dist/primitives/thread/ThreadRoot.d.ts +12 -5
- package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadRoot.js +10 -3
- package/dist/primitives/thread/ThreadRoot.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.d.ts +28 -18
- package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.js +18 -9
- package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
- package/dist/primitives/thread.d.ts +13 -7
- package/dist/primitives/thread.d.ts.map +1 -1
- package/dist/primitives/thread.js +21 -7
- package/dist/primitives/thread.js.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.d.ts +15 -8
- package/dist/primitives/threadList/ThreadListItems.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.js +19 -10
- package/dist/primitives/threadList/ThreadListItems.js.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.d.ts +12 -5
- package/dist/primitives/threadList/ThreadListNew.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.js +13 -5
- package/dist/primitives/threadList/ThreadListNew.js.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.d.ts +12 -5
- package/dist/primitives/threadList/ThreadListRoot.d.ts.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.js +10 -3
- package/dist/primitives/threadList/ThreadListRoot.js.map +1 -1
- package/dist/primitives/threadList.d.ts +10 -3
- package/dist/primitives/threadList.d.ts.map +1 -1
- package/dist/primitives/threadList.js +13 -3
- package/dist/primitives/threadList.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts +12 -5
- package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.js +13 -5
- package/dist/primitives/threadListItem/ThreadListItemArchive.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts +12 -5
- package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.js +13 -5
- package/dist/primitives/threadListItem/ThreadListItemDelete.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts +12 -5
- package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.js +10 -3
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts +12 -5
- package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js +13 -5
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts +12 -5
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js +13 -5
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js.map +1 -1
- package/dist/primitives/threadListItem.d.ts +13 -6
- package/dist/primitives/threadListItem.d.ts.map +1 -1
- package/dist/primitives/threadListItem.js +19 -6
- package/dist/primitives/threadListItem.js.map +1 -1
- package/dist/runtimes/RemoteThreadListHookInstanceManager.d.ts +2 -2
- package/dist/runtimes/RemoteThreadListHookInstanceManager.js +2 -2
- package/dist/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts +2 -2
- package/dist/runtimes/RemoteThreadListThreadListRuntimeCore.js +2 -2
- package/dist/runtimes/useLocalRuntime.d.ts +2 -2
- package/dist/runtimes/useLocalRuntime.js +2 -2
- package/dist/runtimes/useRemoteThreadListRuntime.d.ts +2 -2
- package/dist/runtimes/useRemoteThreadListRuntime.js +2 -2
- package/package.json +9 -9
- package/src/index.ts +1 -0
- package/src/primitives/thread/ThreadMessages.tsx +63 -9
- package/dist/context/AssistantContext.d.ts.map +0 -1
- package/dist/context/AssistantContext.js.map +0 -1
- package/dist/context/providers/AttachmentByIndexProvider.d.ts.map +0 -1
- package/dist/context/providers/AttachmentByIndexProvider.js.map +0 -1
- package/dist/context/providers/RuntimeAdapterProvider.d.ts.map +0 -1
- package/dist/context/providers/RuntimeAdapterProvider.js.map +0 -1
- package/dist/context/providers/ThreadListItemRuntimeProvider.d.ts.map +0 -1
- package/dist/context/providers/ThreadListItemRuntimeProvider.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal.d.ts.map +0 -1
- package/dist/internal.js.map +0 -1
- package/dist/primitives/composer/ComposerIf.d.ts.map +0 -1
- package/dist/primitives/composer/ComposerIf.js.map +0 -1
- package/dist/runtimes/RemoteThreadListHookInstanceManager.d.ts.map +0 -1
- package/dist/runtimes/RemoteThreadListHookInstanceManager.js.map +0 -1
- package/dist/runtimes/RemoteThreadListThreadListRuntimeCore.d.ts.map +0 -1
- package/dist/runtimes/RemoteThreadListThreadListRuntimeCore.js.map +0 -1
- package/dist/runtimes/useLocalRuntime.d.ts.map +0 -1
- package/dist/runtimes/useLocalRuntime.js.map +0 -1
- package/dist/runtimes/useRemoteThreadListRuntime.d.ts.map +0 -1
- package/dist/runtimes/useRemoteThreadListRuntime.js.map +0 -1
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { BranchPickerPrevious, BranchPickerPreviousProps } from "./branchPicker/BranchPickerPrevious.js";
|
|
2
|
+
import { BranchPickerNext, BranchPickerNextProps } from "./branchPicker/BranchPickerNext.js";
|
|
3
|
+
import { BranchPickerNumber, BranchPickerNumberProps } from "./branchPicker/BranchPickerNumber.js";
|
|
4
|
+
import { BranchPickerCount, BranchPickerCountProps } from "./branchPicker/BranchPickerCount.js";
|
|
5
|
+
|
|
6
|
+
//#region src/primitives/branchPicker.d.ts
|
|
7
|
+
declare namespace branchPicker_d_exports {
|
|
8
|
+
export { BranchPickerCount as Count, BranchPickerCountProps as CountProps, BranchPickerNext as Next, BranchPickerNextProps as NextProps, BranchPickerNumber as Number, BranchPickerNumberProps as NumberProps, BranchPickerPrevious as Previous, BranchPickerPreviousProps as PreviousProps };
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { BranchPickerCount as Count, type BranchPickerCountProps as CountProps, BranchPickerNext as Next, type BranchPickerNextProps as NextProps, BranchPickerNumber as Number, type BranchPickerNumberProps as NumberProps, BranchPickerPrevious as Previous, type BranchPickerPreviousProps as PreviousProps, branchPicker_d_exports };
|
|
5
12
|
//# sourceMappingURL=branchPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branchPicker.d.ts","
|
|
1
|
+
{"version":3,"file":"branchPicker.d.ts","names":[],"sources":["../../src/primitives/branchPicker.ts"],"mappings":""}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { BranchPickerPrevious } from "./branchPicker/BranchPickerPrevious.js";
|
|
3
|
+
import { BranchPickerNext } from "./branchPicker/BranchPickerNext.js";
|
|
4
|
+
import { BranchPickerNumber } from "./branchPicker/BranchPickerNumber.js";
|
|
5
|
+
import { BranchPickerCount } from "./branchPicker/BranchPickerCount.js";
|
|
6
|
+
//#region src/primitives/branchPicker.ts
|
|
7
|
+
var branchPicker_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
Count: () => BranchPickerCount,
|
|
9
|
+
Next: () => BranchPickerNext,
|
|
10
|
+
Number: () => BranchPickerNumber,
|
|
11
|
+
Previous: () => BranchPickerPrevious
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, branchPicker_exports };
|
|
15
|
+
|
|
5
16
|
//# sourceMappingURL=branchPicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branchPicker.js","
|
|
1
|
+
{"version":3,"file":"branchPicker.js","names":[],"sources":["../../src/primitives/branchPicker.ts"],"sourcesContent":["export {\n BranchPickerPrevious as Previous,\n type BranchPickerPreviousProps as PreviousProps,\n} from \"./branchPicker/BranchPickerPrevious\";\nexport {\n BranchPickerNext as Next,\n type BranchPickerNextProps as NextProps,\n} from \"./branchPicker/BranchPickerNext\";\nexport {\n BranchPickerNumber as Number,\n type BranchPickerNumberProps as NumberProps,\n} from \"./branchPicker/BranchPickerNumber\";\nexport {\n BranchPickerCount as Count,\n type BranchPickerCountProps as CountProps,\n} from \"./branchPicker/BranchPickerCount\";\n"],"mappings":""}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { PressableProps } from "react-native";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts
|
|
5
|
+
type ChainOfThoughtAccordionTriggerProps = Omit<PressableProps, "onPress"> & {
|
|
6
|
+
children: ReactNode;
|
|
5
7
|
};
|
|
6
|
-
|
|
8
|
+
declare const ChainOfThoughtAccordionTrigger: ({
|
|
9
|
+
children,
|
|
10
|
+
...pressableProps
|
|
11
|
+
}: ChainOfThoughtAccordionTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ChainOfThoughtAccordionTrigger, ChainOfThoughtAccordionTriggerProps };
|
|
7
14
|
//# sourceMappingURL=ChainOfThoughtAccordionTrigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainOfThoughtAccordionTrigger.d.ts","
|
|
1
|
+
{"version":3,"file":"ChainOfThoughtAccordionTrigger.d.ts","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx"],"mappings":";;;;KAIY,mCAAA,GAAsC,IAAA,CAChD,cAAA;EAGA,QAAA,EAAU,SAAA;AAAA;AAAA,cAGC,8BAAA;EAAkC,QAAA;EAAA,GAAA;AAAA,GAG5C,mCAAmC,iCAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCallback } from "react";
|
|
1
|
+
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
3
2
|
import { Pressable } from "react-native";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback } from "react";
|
|
5
|
+
//#region src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx
|
|
6
|
+
const ChainOfThoughtAccordionTrigger = ({ children, ...pressableProps }) => {
|
|
7
|
+
const aui = useAui();
|
|
8
|
+
const collapsed = useAuiState((s) => s.chainOfThought.collapsed);
|
|
9
|
+
return /* @__PURE__ */ jsx(Pressable, {
|
|
10
|
+
onPress: useCallback(() => {
|
|
11
|
+
aui.chainOfThought().setCollapsed(!collapsed);
|
|
12
|
+
}, [aui, collapsed]),
|
|
13
|
+
...pressableProps,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
12
16
|
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ChainOfThoughtAccordionTrigger };
|
|
19
|
+
|
|
13
20
|
//# sourceMappingURL=ChainOfThoughtAccordionTrigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainOfThoughtAccordionTrigger.js","
|
|
1
|
+
{"version":3,"file":"ChainOfThoughtAccordionTrigger.js","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx"],"sourcesContent":["import { useCallback, type ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useAuiState, useAui } from \"@assistant-ui/store\";\n\nexport type ChainOfThoughtAccordionTriggerProps = Omit<\n PressableProps,\n \"onPress\"\n> & {\n children: ReactNode;\n};\n\nexport const ChainOfThoughtAccordionTrigger = ({\n children,\n ...pressableProps\n}: ChainOfThoughtAccordionTriggerProps) => {\n const aui = useAui();\n const collapsed = useAuiState((s) => s.chainOfThought.collapsed);\n\n const onPress = useCallback(() => {\n aui.chainOfThought().setCollapsed(!collapsed);\n }, [aui, collapsed]);\n\n return (\n <Pressable onPress={onPress} {...pressableProps}>\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAWA,MAAa,kCAAkC,EAC7C,UACA,GAAG,qBACsC;CACzC,MAAM,MAAM,OAAO;CACnB,MAAM,YAAY,aAAa,MAAM,EAAE,eAAe,SAAS;CAM/D,OACE,oBAAC,WAAD;EAAW,SALG,kBAAkB;GAChC,IAAI,eAAe,EAAE,aAAa,CAAC,SAAS;EAC9C,GAAG,CAAC,KAAK,SAAS,CAGU;EAAG,GAAI;EAC9B;CACQ,CAAA;AAEf"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ViewProps } from "react-native";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/chainOfThought/ChainOfThoughtRoot.d.ts
|
|
5
|
+
type ChainOfThoughtRootProps = ViewProps & {
|
|
6
|
+
children: ReactNode;
|
|
5
7
|
};
|
|
6
|
-
|
|
8
|
+
declare const ChainOfThoughtRoot: ({
|
|
9
|
+
children,
|
|
10
|
+
...viewProps
|
|
11
|
+
}: ChainOfThoughtRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ChainOfThoughtRoot, ChainOfThoughtRootProps };
|
|
7
14
|
//# sourceMappingURL=ChainOfThoughtRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainOfThoughtRoot.d.ts","
|
|
1
|
+
{"version":3,"file":"ChainOfThoughtRoot.d.ts","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtRoot.tsx"],"mappings":";;;;KAGY,uBAAA,GAA0B,SAAA;EACpC,QAAA,EAAU,SAAS;AAAA;AAAA,cAGR,kBAAA;EAAsB,QAAA;EAAA,GAAA;AAAA,GAGhC,uBAAuB,iCAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { View } from "react-native";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/primitives/chainOfThought/ChainOfThoughtRoot.tsx
|
|
4
|
+
const ChainOfThoughtRoot = ({ children, ...viewProps }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(View, {
|
|
6
|
+
...viewProps,
|
|
7
|
+
children
|
|
8
|
+
});
|
|
5
9
|
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ChainOfThoughtRoot };
|
|
12
|
+
|
|
6
13
|
//# sourceMappingURL=ChainOfThoughtRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainOfThoughtRoot.js","
|
|
1
|
+
{"version":3,"file":"ChainOfThoughtRoot.js","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ChainOfThoughtRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ChainOfThoughtRoot = ({\n children,\n ...viewProps\n}: ChainOfThoughtRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;AAOA,MAAa,sBAAsB,EACjC,UACA,GAAG,gBAC0B;CAC7B,OAAO,oBAAC,MAAD;EAAM,GAAI;EAAY;CAAe,CAAA;AAC9C"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ChainOfThoughtRoot, ChainOfThoughtRootProps } from "./chainOfThought/ChainOfThoughtRoot.js";
|
|
2
|
+
import { ChainOfThoughtAccordionTrigger, ChainOfThoughtAccordionTriggerProps } from "./chainOfThought/ChainOfThoughtAccordionTrigger.js";
|
|
3
|
+
import { ChainOfThoughtPrimitiveParts as Parts } from "@assistant-ui/core/react";
|
|
4
|
+
|
|
5
|
+
//#region src/primitives/chainOfThought.d.ts
|
|
6
|
+
declare namespace chainOfThought_d_exports {
|
|
7
|
+
export { ChainOfThoughtAccordionTrigger as AccordionTrigger, ChainOfThoughtAccordionTriggerProps as AccordionTriggerProps, Parts, ChainOfThoughtRoot as Root, ChainOfThoughtRootProps as RootProps };
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ChainOfThoughtAccordionTrigger as AccordionTrigger, type ChainOfThoughtAccordionTriggerProps as AccordionTriggerProps, Parts, ChainOfThoughtRoot as Root, type ChainOfThoughtRootProps as RootProps, chainOfThought_d_exports };
|
|
4
11
|
//# sourceMappingURL=chainOfThought.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chainOfThought.d.ts","
|
|
1
|
+
{"version":3,"file":"chainOfThought.d.ts","names":[],"sources":["../../src/primitives/chainOfThought.ts"],"mappings":""}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ChainOfThoughtRoot } from "./chainOfThought/ChainOfThoughtRoot.js";
|
|
3
|
+
import { ChainOfThoughtAccordionTrigger } from "./chainOfThought/ChainOfThoughtAccordionTrigger.js";
|
|
4
|
+
import { ChainOfThoughtPrimitiveParts as Parts } from "@assistant-ui/core/react";
|
|
5
|
+
//#region src/primitives/chainOfThought.ts
|
|
6
|
+
var chainOfThought_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
AccordionTrigger: () => ChainOfThoughtAccordionTrigger,
|
|
8
|
+
Parts: () => Parts,
|
|
9
|
+
Root: () => ChainOfThoughtRoot
|
|
10
|
+
});
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ChainOfThoughtAccordionTrigger as AccordionTrigger, Parts, ChainOfThoughtRoot as Root, chainOfThought_exports };
|
|
13
|
+
|
|
4
14
|
//# sourceMappingURL=chainOfThought.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chainOfThought.js","
|
|
1
|
+
{"version":3,"file":"chainOfThought.js","names":[],"sources":["../../src/primitives/chainOfThought.ts"],"sourcesContent":["export {\n ChainOfThoughtRoot as Root,\n type ChainOfThoughtRootProps as RootProps,\n} from \"./chainOfThought/ChainOfThoughtRoot\";\nexport {\n ChainOfThoughtAccordionTrigger as AccordionTrigger,\n type ChainOfThoughtAccordionTriggerProps as AccordionTriggerProps,\n} from \"./chainOfThought/ChainOfThoughtAccordionTrigger\";\nexport { ChainOfThoughtPrimitiveParts as Parts } from \"@assistant-ui/core/react\";\n"],"mappings":""}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { PressableProps } from "react-native";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/composer/ComposerAddAttachment.d.ts
|
|
5
|
+
type ComposerAddAttachmentProps = Omit<PressableProps, "onPress"> & {
|
|
6
|
+
children: ReactNode;
|
|
5
7
|
};
|
|
6
8
|
/**
|
|
7
9
|
* A button that triggers the attachment adding flow.
|
|
@@ -10,5 +12,11 @@ export type ComposerAddAttachmentProps = Omit<PressableProps, "onPress"> & {
|
|
|
10
12
|
* This component calls `useComposerAddAttachment()` from `@assistant-ui/core/react`.
|
|
11
13
|
* You must handle the file selection in your own component using the returned `addAttachment` callback.
|
|
12
14
|
*/
|
|
13
|
-
|
|
15
|
+
declare const ComposerAddAttachment: ({
|
|
16
|
+
children,
|
|
17
|
+
disabled: disabledProp,
|
|
18
|
+
...pressableProps
|
|
19
|
+
}: ComposerAddAttachmentProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ComposerAddAttachment, ComposerAddAttachmentProps };
|
|
14
22
|
//# sourceMappingURL=ComposerAddAttachment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerAddAttachment.d.ts","
|
|
1
|
+
{"version":3,"file":"ComposerAddAttachment.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerAddAttachment.tsx"],"mappings":";;;;KAIY,0BAAA,GAA6B,IAAA,CAAK,cAAA;EAC5C,QAAA,EAAU,SAAA;AAAA;;;;;;;;cAUC,qBAAA;EAAyB,QAAA;EAAA,QAAA,EAAA,YAAA;EAAA,GAAA;AAAA,GAInC,0BAAA,iCAA0B,GAAA,CAAA,OAAA"}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Pressable } from "react-native";
|
|
3
1
|
import { useComposerAddAttachment } from "@assistant-ui/core/react";
|
|
2
|
+
import { Pressable } from "react-native";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/primitives/composer/ComposerAddAttachment.tsx
|
|
4
5
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
* A button that triggers the attachment adding flow.
|
|
7
|
+
*
|
|
8
|
+
* Note: The actual file picker implementation is platform-specific.
|
|
9
|
+
* This component calls `useComposerAddAttachment()` from `@assistant-ui/core/react`.
|
|
10
|
+
* You must handle the file selection in your own component using the returned `addAttachment` callback.
|
|
11
|
+
*/
|
|
12
|
+
const ComposerAddAttachment = ({ children, disabled: disabledProp, ...pressableProps }) => {
|
|
13
|
+
const { disabled } = useComposerAddAttachment();
|
|
14
|
+
return /* @__PURE__ */ jsx(Pressable, {
|
|
15
|
+
disabled: disabledProp ?? disabled,
|
|
16
|
+
...pressableProps,
|
|
17
|
+
children
|
|
18
|
+
});
|
|
14
19
|
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ComposerAddAttachment };
|
|
22
|
+
|
|
15
23
|
//# sourceMappingURL=ComposerAddAttachment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerAddAttachment.js","
|
|
1
|
+
{"version":3,"file":"ComposerAddAttachment.js","names":[],"sources":["../../../src/primitives/composer/ComposerAddAttachment.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerAddAttachment } from \"@assistant-ui/core/react\";\n\nexport type ComposerAddAttachmentProps = Omit<PressableProps, \"onPress\"> & {\n children: ReactNode;\n};\n\n/**\n * A button that triggers the attachment adding flow.\n *\n * Note: The actual file picker implementation is platform-specific.\n * This component calls `useComposerAddAttachment()` from `@assistant-ui/core/react`.\n * You must handle the file selection in your own component using the returned `addAttachment` callback.\n */\nexport const ComposerAddAttachment = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: ComposerAddAttachmentProps) => {\n const { disabled } = useComposerAddAttachment();\n\n return (\n <Pressable disabled={disabledProp ?? disabled} {...pressableProps}>\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;;;;;;AAeA,MAAa,yBAAyB,EACpC,UACA,UAAU,cACV,GAAG,qBAC6B;CAChC,MAAM,EAAE,aAAa,yBAAyB;CAE9C,OACE,oBAAC,WAAD;EAAW,UAAU,gBAAgB;EAAU,GAAI;EAChD;CACQ,CAAA;AAEf"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments } from "@assistant-ui/core/react";
|
|
2
|
+
import { ComponentType } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/composer/ComposerAttachments.d.ts
|
|
5
|
+
type AttachmentComponents = {
|
|
6
|
+
Image?: ComponentType | undefined;
|
|
7
|
+
Document?: ComponentType | undefined;
|
|
8
|
+
File?: ComponentType | undefined;
|
|
9
|
+
Attachment?: ComponentType | undefined;
|
|
8
10
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
type ComposerAttachmentsProps = {
|
|
12
|
+
components: AttachmentComponents | undefined;
|
|
11
13
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
type ComposerAttachmentByIndexProps = {
|
|
15
|
+
index: number;
|
|
16
|
+
components?: AttachmentComponents | undefined;
|
|
15
17
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
declare const ComposerAttachmentByIndex: import("react").FC<ComposerPrimitiveAttachmentByIndex.Props>;
|
|
19
|
+
declare const ComposerAttachments: import("react").FC<ComposerPrimitiveAttachments.Props>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { AttachmentComponents, ComposerAttachmentByIndex, ComposerAttachmentByIndexProps, ComposerAttachments, ComposerAttachmentsProps };
|
|
18
22
|
//# sourceMappingURL=ComposerAttachments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerAttachments.d.ts","
|
|
1
|
+
{"version":3,"file":"ComposerAttachments.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerAttachments.tsx"],"mappings":";;;;KAMY,oBAAA;EACV,KAAA,GAAQ,aAAA;EACR,QAAA,GAAW,aAAA;EACX,IAAA,GAAO,aAAA;EACP,UAAA,GAAa,aAAA;AAAA;AAAA,KAGH,wBAAA;EACV,UAAA,EAAY,oBAAoB;AAAA;AAAA,KAGtB,8BAAA;EACV,KAAA;EACA,UAAA,GAAa,oBAAoB;AAAA;AAAA,cAGtB,yBAAA,kBAAyB,EAAA,CAAA,kCAAA,CAAA,KAAA;AAAA,cAEzB,mBAAA,kBAAmB,EAAA,CAAA,4BAAA,CAAA,KAAA"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ComposerPrimitiveAttachmentByIndex, ComposerPrimitiveAttachments } from "@assistant-ui/core/react";
|
|
2
|
+
//#region src/primitives/composer/ComposerAttachments.tsx
|
|
3
|
+
const ComposerAttachmentByIndex = ComposerPrimitiveAttachmentByIndex;
|
|
4
|
+
const ComposerAttachments = ComposerPrimitiveAttachments;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ComposerAttachmentByIndex, ComposerAttachments };
|
|
7
|
+
|
|
4
8
|
//# sourceMappingURL=ComposerAttachments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerAttachments.js","
|
|
1
|
+
{"version":3,"file":"ComposerAttachments.js","names":[],"sources":["../../../src/primitives/composer/ComposerAttachments.tsx"],"sourcesContent":["import type { ComponentType } from \"react\";\nimport {\n ComposerPrimitiveAttachments,\n ComposerPrimitiveAttachmentByIndex,\n} from \"@assistant-ui/core/react\";\n\nexport type AttachmentComponents = {\n Image?: ComponentType | undefined;\n Document?: ComponentType | undefined;\n File?: ComponentType | undefined;\n Attachment?: ComponentType | undefined;\n};\n\nexport type ComposerAttachmentsProps = {\n components: AttachmentComponents | undefined;\n};\n\nexport type ComposerAttachmentByIndexProps = {\n index: number;\n components?: AttachmentComponents | undefined;\n};\n\nexport const ComposerAttachmentByIndex = ComposerPrimitiveAttachmentByIndex;\n\nexport const ComposerAttachments = ComposerPrimitiveAttachments;\n"],"mappings":";;AAsBA,MAAa,4BAA4B;AAEzC,MAAa,sBAAsB"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { PressableProps } from "react-native";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/primitives/composer/ComposerCancel.d.ts
|
|
5
|
+
type ComposerCancelProps = Omit<PressableProps, "onPress"> & {
|
|
6
|
+
children: ReactNode;
|
|
5
7
|
};
|
|
6
|
-
|
|
8
|
+
declare const ComposerCancel: ({
|
|
9
|
+
children,
|
|
10
|
+
disabled,
|
|
11
|
+
...pressableProps
|
|
12
|
+
}: ComposerCancelProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ComposerCancel, ComposerCancelProps };
|
|
7
15
|
//# sourceMappingURL=ComposerCancel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerCancel.d.ts","
|
|
1
|
+
{"version":3,"file":"ComposerCancel.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerCancel.tsx"],"mappings":";;;;KAIY,mBAAA,GAAsB,IAAA,CAAK,cAAA;EACrC,QAAA,EAAU,SAAA;AAAA;AAAA,cAGC,cAAA;EAAkB,QAAA;EAAA,QAAA;EAAA,GAAA;AAAA,GAI5B,mBAAA,iCAAmB,GAAA,CAAA,OAAA"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Pressable } from "react-native";
|
|
3
1
|
import { useComposerCancel } from "@assistant-ui/core/react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { Pressable } from "react-native";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/primitives/composer/ComposerCancel.tsx
|
|
5
|
+
const ComposerCancel = ({ children, disabled, ...pressableProps }) => {
|
|
6
|
+
const { cancel, disabled: hookDisabled } = useComposerCancel();
|
|
7
|
+
return /* @__PURE__ */ jsx(Pressable, {
|
|
8
|
+
onPress: cancel,
|
|
9
|
+
disabled: disabled ?? hookDisabled,
|
|
10
|
+
...pressableProps,
|
|
11
|
+
children
|
|
12
|
+
});
|
|
7
13
|
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ComposerCancel };
|
|
16
|
+
|
|
8
17
|
//# sourceMappingURL=ComposerCancel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerCancel.js","
|
|
1
|
+
{"version":3,"file":"ComposerCancel.js","names":[],"sources":["../../../src/primitives/composer/ComposerCancel.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerCancel } from \"@assistant-ui/core/react\";\n\nexport type ComposerCancelProps = Omit<PressableProps, \"onPress\"> & {\n children: ReactNode;\n};\n\nexport const ComposerCancel = ({\n children,\n disabled,\n ...pressableProps\n}: ComposerCancelProps) => {\n const { cancel, disabled: hookDisabled } = useComposerCancel();\n\n return (\n <Pressable\n onPress={cancel}\n disabled={disabled ?? hookDisabled}\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;AAQA,MAAa,kBAAkB,EAC7B,UACA,UACA,GAAG,qBACsB;CACzB,MAAM,EAAE,QAAQ,UAAU,iBAAiB,kBAAkB;CAE7D,OACE,oBAAC,WAAD;EACE,SAAS;EACT,UAAU,YAAY;EACtB,GAAI;EAEH;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ComposerPrimitiveIf as ComposerIf } from "@assistant-ui/core/react";
|
|
2
|
+
export { ComposerIf };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ComposerPrimitiveIf as ComposerIf } from "@assistant-ui/core/react";
|
|
2
|
+
export { ComposerIf };
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { TextInputProps } from "react-native";
|
|
2
|
+
|
|
3
|
+
//#region src/primitives/composer/ComposerInput.d.ts
|
|
4
|
+
type ComposerInputProps = Omit<TextInputProps, "value" | "onChangeText"> & {
|
|
5
|
+
/**
|
|
6
|
+
* Controls how the Enter key submits messages (web only).
|
|
7
|
+
* - "enter": Plain Enter submits (Shift+Enter for newline)
|
|
8
|
+
* - "none": Enter inserts newline (no keyboard submission)
|
|
9
|
+
* @default "enter"
|
|
10
|
+
*/
|
|
11
|
+
submitMode?: "enter" | "none";
|
|
10
12
|
};
|
|
11
|
-
|
|
13
|
+
declare const ComposerInput: ({
|
|
14
|
+
submitMode,
|
|
15
|
+
onKeyPress: onKeyPressProp,
|
|
16
|
+
numberOfLines,
|
|
17
|
+
style,
|
|
18
|
+
...props
|
|
19
|
+
}: ComposerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ComposerInput, ComposerInputProps };
|
|
12
22
|
//# sourceMappingURL=ComposerInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerInput.d.ts","
|
|
1
|
+
{"version":3,"file":"ComposerInput.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerInput.tsx"],"mappings":";;;KAUY,kBAAA,GAAqB,IAAI,CACnC,cAAA;;AADF;;;;;EAUE,UAAA;AAAA;AAAA,cAeW,aAAA;EAAiB,UAAA;EAAA,UAAA,EAAA,cAAA;EAAA,aAAA;EAAA,KAAA;EAAA,GAAA;AAAA,GAM3B,kBAAA,iCAAkB,GAAA,CAAA,OAAA"}
|
|
@@ -1,45 +1,51 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useEffect, useRef } from "react";
|
|
3
|
-
import { Platform, TextInput, } from "react-native";
|
|
4
1
|
import { useAui, useAuiState } from "@assistant-ui/store";
|
|
2
|
+
import { Platform, TextInput } from "react-native";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
5
|
+
//#region src/primitives/composer/ComposerInput.tsx
|
|
5
6
|
const adjustWebTextareaHeight = (ref) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (el.rows !== 1)
|
|
14
|
-
el.rows = 1;
|
|
15
|
-
el.style.overflow = "hidden";
|
|
16
|
-
el.style.height = "auto";
|
|
17
|
-
el.style.height = `${el.scrollHeight}px`;
|
|
7
|
+
if (Platform.OS !== "web") return;
|
|
8
|
+
const el = ref.current;
|
|
9
|
+
if (!el) return;
|
|
10
|
+
if (el.rows !== 1) el.rows = 1;
|
|
11
|
+
el.style.overflow = "hidden";
|
|
12
|
+
el.style.height = "auto";
|
|
13
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
18
14
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
15
|
+
const ComposerInput = ({ submitMode = "enter", onKeyPress: onKeyPressProp, numberOfLines, style, ...props }) => {
|
|
16
|
+
const aui = useAui();
|
|
17
|
+
const text = useAuiState((s) => s.composer.text);
|
|
18
|
+
const inputRef = useRef(null);
|
|
19
|
+
const onChangeText = useCallback((value) => {
|
|
20
|
+
aui.composer().setText(value);
|
|
21
|
+
}, [aui]);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
adjustWebTextareaHeight(inputRef);
|
|
24
|
+
}, [text]);
|
|
25
|
+
return /* @__PURE__ */ jsx(TextInput, {
|
|
26
|
+
ref: inputRef,
|
|
27
|
+
value: text,
|
|
28
|
+
onChangeText,
|
|
29
|
+
onKeyPress: useCallback((e) => {
|
|
30
|
+
onKeyPressProp?.(e);
|
|
31
|
+
if (Platform.OS !== "web") return;
|
|
32
|
+
if (submitMode !== "enter") return;
|
|
33
|
+
const nativeEvent = e.nativeEvent;
|
|
34
|
+
if (nativeEvent.key === "Enter" && !nativeEvent.shiftKey) {
|
|
35
|
+
e.preventDefault?.();
|
|
36
|
+
aui.composer().send();
|
|
37
|
+
}
|
|
38
|
+
}, [
|
|
39
|
+
aui,
|
|
40
|
+
submitMode,
|
|
41
|
+
onKeyPressProp
|
|
42
|
+
]),
|
|
43
|
+
numberOfLines: numberOfLines ?? (Platform.OS === "web" ? 1 : void 0),
|
|
44
|
+
style,
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
44
47
|
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { ComposerInput };
|
|
50
|
+
|
|
45
51
|
//# sourceMappingURL=ComposerInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerInput.js","
|
|
1
|
+
{"version":3,"file":"ComposerInput.js","names":[],"sources":["../../../src/primitives/composer/ComposerInput.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\nimport {\n Platform,\n TextInput,\n type NativeSyntheticEvent,\n type TextInputKeyPressEventData,\n type TextInputProps,\n} from \"react-native\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport type ComposerInputProps = Omit<\n TextInputProps,\n \"value\" | \"onChangeText\"\n> & {\n /**\n * Controls how the Enter key submits messages (web only).\n * - \"enter\": Plain Enter submits (Shift+Enter for newline)\n * - \"none\": Enter inserts newline (no keyboard submission)\n * @default \"enter\"\n */\n submitMode?: \"enter\" | \"none\";\n};\n\nconst adjustWebTextareaHeight = (ref: React.RefObject<TextInput | null>) => {\n if (Platform.OS !== \"web\") return;\n // On web, the TextInput ref IS the DOM element\n const el = ref.current as unknown as HTMLTextAreaElement | null;\n if (!el) return;\n // Ensure rows=1 so scrollHeight reflects actual content\n if (el.rows !== 1) el.rows = 1;\n el.style.overflow = \"hidden\";\n el.style.height = \"auto\";\n el.style.height = `${el.scrollHeight}px`;\n};\n\nexport const ComposerInput = ({\n submitMode = \"enter\",\n onKeyPress: onKeyPressProp,\n numberOfLines,\n style,\n ...props\n}: ComposerInputProps) => {\n const aui = useAui();\n const text = useAuiState((s) => s.composer.text);\n const inputRef = useRef<TextInput>(null);\n\n const onChangeText = useCallback(\n (value: string) => {\n aui.composer().setText(value);\n },\n [aui],\n );\n\n // Auto-resize textarea on web when text changes\n useEffect(() => {\n void text; // trigger re-run when text changes\n adjustWebTextareaHeight(inputRef);\n }, [text]);\n\n const onKeyPress = useCallback(\n (e: NativeSyntheticEvent<TextInputKeyPressEventData>) => {\n onKeyPressProp?.(e);\n\n if (Platform.OS !== \"web\") return;\n if (submitMode !== \"enter\") return;\n\n const nativeEvent = e.nativeEvent as TextInputKeyPressEventData & {\n shiftKey?: boolean;\n };\n if (nativeEvent.key === \"Enter\" && !nativeEvent.shiftKey) {\n (e as unknown as Event).preventDefault?.();\n aui.composer().send();\n }\n },\n [aui, submitMode, onKeyPressProp],\n );\n\n return (\n <TextInput\n ref={inputRef}\n value={text}\n onChangeText={onChangeText}\n onKeyPress={onKeyPress}\n numberOfLines={numberOfLines ?? (Platform.OS === \"web\" ? 1 : undefined)}\n style={style}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;AAuBA,MAAM,2BAA2B,QAA2C;CAC1E,IAAI,SAAS,OAAO,OAAO;CAE3B,MAAM,KAAK,IAAI;CACf,IAAI,CAAC,IAAI;CAET,IAAI,GAAG,SAAS,GAAG,GAAG,OAAO;CAC7B,GAAG,MAAM,WAAW;CACpB,GAAG,MAAM,SAAS;CAClB,GAAG,MAAM,SAAS,GAAG,GAAG,aAAa;AACvC;AAEA,MAAa,iBAAiB,EAC5B,aAAa,SACb,YAAY,gBACZ,eACA,OACA,GAAG,YACqB;CACxB,MAAM,MAAM,OAAO;CACnB,MAAM,OAAO,aAAa,MAAM,EAAE,SAAS,IAAI;CAC/C,MAAM,WAAW,OAAkB,IAAI;CAEvC,MAAM,eAAe,aAClB,UAAkB;EACjB,IAAI,SAAS,EAAE,QAAQ,KAAK;CAC9B,GACA,CAAC,GAAG,CACN;CAGA,gBAAgB;EAEd,wBAAwB,QAAQ;CAClC,GAAG,CAAC,IAAI,CAAC;CAoBT,OACE,oBAAC,WAAD;EACE,KAAK;EACL,OAAO;EACO;EACd,YAvBe,aAChB,MAAwD;GACvD,iBAAiB,CAAC;GAElB,IAAI,SAAS,OAAO,OAAO;GAC3B,IAAI,eAAe,SAAS;GAE5B,MAAM,cAAc,EAAE;GAGtB,IAAI,YAAY,QAAQ,WAAW,CAAC,YAAY,UAAU;IACxD,EAAwB,iBAAiB;IACzC,IAAI,SAAS,EAAE,KAAK;GACtB;EACF,GACA;GAAC;GAAK;GAAY;EAAc,CAQT;EACrB,eAAe,kBAAkB,SAAS,OAAO,QAAQ,IAAI,KAAA;EACtD;EACP,GAAI;CACL,CAAA;AAEL"}
|