@assistant-ui/react-native 0.1.38 → 0.1.39
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 +2 -2
- package/dist/index.js +2 -2
- package/dist/primitives/actionBar/ActionBarCopy.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarEdit.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackNegative.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarFeedbackPositive.js.map +1 -1
- package/dist/primitives/actionBar/ActionBarReload.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRemove.js.map +1 -1
- package/dist/primitives/attachment/AttachmentRoot.js.map +1 -1
- package/dist/primitives/attachment/AttachmentThumb.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerNext.js.map +1 -1
- package/dist/primitives/branchPicker/BranchPickerPrevious.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.js.map +1 -1
- package/dist/primitives/chainOfThought/ChainOfThoughtRoot.js.map +1 -1
- package/dist/primitives/composer/ComposerAddAttachment.js.map +1 -1
- package/dist/primitives/composer/ComposerCancel.js.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +2 -0
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerQuote.js.map +1 -1
- package/dist/primitives/composer/ComposerQuoteDismiss.js.map +1 -1
- package/dist/primitives/composer/ComposerQuoteText.js.map +1 -1
- package/dist/primitives/composer/ComposerRoot.js.map +1 -1
- package/dist/primitives/composer/ComposerSend.js.map +1 -1
- package/dist/primitives/error/ErrorMessage.js.map +1 -1
- package/dist/primitives/error/ErrorRoot.js.map +1 -1
- package/dist/primitives/message/MessageParts.js.map +1 -1
- package/dist/primitives/message/MessageRoot.js.map +1 -1
- package/dist/primitives/queueItem/QueueItemRemove.js.map +1 -1
- package/dist/primitives/queueItem/QueueItemSteer.js.map +1 -1
- package/dist/primitives/queueItem/QueueItemText.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionDescription.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionTitle.js.map +1 -1
- package/dist/primitives/suggestion/SuggestionTrigger.js.map +1 -1
- package/dist/primitives/thread/ThreadMessages.js.map +1 -1
- package/dist/primitives/thread/ThreadRoot.js.map +1 -1
- package/dist/primitives/thread/ThreadSuggestion.js.map +1 -1
- package/dist/primitives/threadList/ThreadListItems.js.map +1 -1
- package/dist/primitives/threadList/ThreadListNew.js.map +1 -1
- package/dist/primitives/threadList/ThreadListRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemArchive.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemDelete.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
- package/dist/primitives/threadListItem/ThreadListItemUnarchive.js.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +3 -0
- package/src/primitives/composer/ComposerInput.test.tsx +47 -1
- package/src/primitives/composer/ComposerInput.tsx +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ import { threadListItem_d_exports } from "./primitives/threadListItem.js";
|
|
|
14
14
|
import { chainOfThought_d_exports } from "./primitives/chainOfThought.js";
|
|
15
15
|
import { suggestion_d_exports } from "./primitives/suggestion.js";
|
|
16
16
|
import { index_d_exports } from "./primitives/error/index.js";
|
|
17
|
-
import { AppendMessage, AssistantRuntime, Attachment, AttachmentAdapter, AttachmentRuntime, ChatModelAdapter, ChatModelRunOptions, ChatModelRunResult, CompleteAttachment, ComposerRuntime, CompositeAttachmentAdapter, CreateAttachment, DataMessagePart, EditComposerRuntime, ExportedMessageRepository, ExportedMessageRepositoryItem, FeedbackAdapter, FileMessagePart, ImageMessagePart, InMemoryThreadListAdapter, LanguageModelConfig, LanguageModelV1CallSettings, MessageRole, MessageRuntime, MessageStatus, ModelContext, ModelContextProvider, ModelContextRegistry, ModelContextRegistryInstructionHandle, ModelContextRegistryProviderHandle, ModelContextRegistryToolHandle, PendingAttachment, RealtimeVoiceAdapter, ReasoningMessagePart, RemoteThreadListAdapter, RemoteThreadListOptions, RemoteThreadListProviderComponent, RespondToToolApprovalOptions, RunConfig, RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SourceMessagePart, SuggestionAdapter, TextMessagePart, ThreadAssistantMessage, ThreadAssistantMessagePart, ThreadComposerRuntime, ThreadHistoryAdapter, ThreadListItemRuntime, ThreadListRuntime, ThreadMessage, ThreadMessageLike, ThreadRuntime, ThreadSystemMessage, ThreadUserMessage, ThreadUserMessagePart, ToolApprovalOption, ToolApprovalOptionKind, ToolApprovalResponse, ToolCallMessagePart, ToolCallTiming, ToolModelContentPart, Unstable_AudioMessagePart, Unstable_InteractableSnapshotEntry, Unstable_InteractableVersion, Unsubscribe, VoiceSessionControls, VoiceSessionHelpers, createVoiceSession, fromThreadMessageLike, generateId, mergeModelContexts, tool, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions } from "@assistant-ui/core";
|
|
17
|
+
import { AppendMessage, AssistantRuntime, Attachment, AttachmentAdapter, AttachmentRuntime, ChatModelAdapter, ChatModelRunOptions, ChatModelRunResult, CompleteAttachment, ComposerRuntime, CompositeAttachmentAdapter, CreateAttachment, CreateSuggestionAdapterOptions, DataMessagePart, EditComposerRuntime, ExportedMessageRepository, ExportedMessageRepositoryItem, FeedbackAdapter, FileMessagePart, ImageMessagePart, InMemoryThreadListAdapter, LanguageModelConfig, LanguageModelV1CallSettings, MessageRole, MessageRuntime, MessageStatus, ModelContext, ModelContextProvider, ModelContextRegistry, ModelContextRegistryInstructionHandle, ModelContextRegistryProviderHandle, ModelContextRegistryToolHandle, PendingAttachment, RealtimeVoiceAdapter, ReasoningMessagePart, RemoteThreadListAdapter, RemoteThreadListOptions, RemoteThreadListProviderComponent, RespondToToolApprovalOptions, RunConfig, RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SourceMessagePart, SuggestionAdapter, SuggestionAdapterGenerateOptions, TextMessagePart, ThreadAssistantMessage, ThreadAssistantMessagePart, ThreadComposerRuntime, ThreadHistoryAdapter, ThreadListItemRuntime, ThreadListRuntime, ThreadMessage, ThreadMessageLike, ThreadRuntime, ThreadSystemMessage, ThreadUserMessage, ThreadUserMessagePart, ToolApprovalOption, ToolApprovalOptionKind, ToolApprovalResponse, ToolCallMessagePart, ToolCallTiming, ToolModelContentPart, Unstable_AudioMessagePart, Unstable_InteractableSnapshotEntry, Unstable_InteractableVersion, Unsubscribe, VoiceSessionControls, VoiceSessionHelpers, createSuggestionAdapter, createVoiceSession, fromThreadMessageLike, generateId, mergeModelContexts, tool, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions } from "@assistant-ui/core";
|
|
18
18
|
import { AssistantClient, AssistantEventCallback, AssistantEventName, AssistantEventPayload, AssistantEventScope, AssistantEventSelector, AssistantState, AuiConfig, AuiIf, AuiProvider, useAui, useAuiEvent, useAuiState } from "@assistant-ui/store";
|
|
19
19
|
import { AssistantContextConfig, AssistantDataUI, AssistantDataUIProps, AssistantInteractableProps, AssistantTool, AssistantToolProps, AssistantToolUI, AssistantToolUIProps, ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ComposerAttachmentByIndexProvider, DataMessagePartComponent, DataMessagePartProps, DataRenderers, EmptyMessagePartComponent, EmptyMessagePartProps, FileMessagePartComponent, FileMessagePartProps, GroupByContext, ImageMessagePartComponent, ImageMessagePartProps, Interactables, McpToolkitDefinition, McpToolkitEntry, McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, PartByIndexProvider, ProviderToolConfig, ReasoningGroupComponent, ReasoningGroupProps, ReasoningMessagePartComponent, ReasoningMessagePartProps, RuntimeAdapterProvider, RuntimeAdapters, SourceMessagePartComponent, SourceMessagePartProps, SuggestionByIndexProvider, TextMessagePartComponent, TextMessagePartProps, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemRuntimeProvider, ToolArgsStatus, ToolCallMessagePartComponent, ToolCallMessagePartProps, ToolCallText, ToolDefinition, Toolkit, ToolkitDefinition, ToolkitDefinitionEntry, Tools, Unstable_AudioMessagePartComponent, Unstable_AudioMessagePartProps, Unstable_InferInteractableState, Unstable_InteractableConfig, Unstable_InteractableDefinition, Unstable_InteractablePersistedState, Unstable_InteractablePersistenceAdapter, Unstable_InteractablePersistenceStatus, Unstable_InteractableRegistration, Unstable_InteractableStateSchema, Unstable_InteractableToolConfig, Unstable_InteractableToolRenderProps, Unstable_InteractableVersionInfo, Unstable_InteractablesClientSchema, Unstable_InteractablesConfig, Unstable_InteractablesMethods, Unstable_InteractablesState, defineMcpToolkit, defineToolkit, externalTool, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, providerTool, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useInlineRender, useInteractableState, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume } from "@assistant-ui/core/react";
|
|
20
20
|
import { AttachmentState, ChainOfThoughtClient, ComposerState, MessageState, ModelContext as ModelContextClient, QueueItemState, SuggestionConfig, Suggestions, ThreadListItemState, ThreadState, ThreadsState } from "@assistant-ui/core/store";
|
|
21
21
|
import { Tool } from "assistant-stream";
|
|
22
|
-
export { actionBar_d_exports as ActionBarPrimitive, type AppendMessage, type AssistantClient, type AssistantContextConfig, type AssistantDataUI, type AssistantDataUIProps, type AssistantEventCallback, type AssistantEventName, type AssistantEventPayload, type AssistantEventScope, type AssistantEventSelector, type AssistantInteractableProps, type AssistantRuntime, AssistantRuntimeProvider, type AssistantState, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type Attachment, type AttachmentAdapter, attachment_d_exports as AttachmentPrimitive, type AttachmentRuntime, type AttachmentState, AuiConfig, AuiIf, AuiProvider, branchPicker_d_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_d_exports as ChainOfThoughtPrimitive, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type CompleteAttachment, ComposerAttachmentByIndexProvider, composer_d_exports as ComposerPrimitive, type ComposerRuntime, type ComposerState, CompositeAttachmentAdapter, type CreateAttachment, type DataMessagePart, type DataMessagePartComponent, type DataMessagePartProps, DataRenderers, type EditComposerRuntime, type EmptyMessagePartComponent, type EmptyMessagePartProps, index_d_exports as ErrorPrimitive, ExportedMessageRepository, type ExportedMessageRepositoryItem, type FeedbackAdapter, type FileMessagePart, type FileMessagePartComponent, type FileMessagePartProps, type GroupByContext, type ImageMessagePart, type ImageMessagePartComponent, type ImageMessagePartProps, InMemoryThreadListAdapter, Interactables, type LanguageModelConfig, type LanguageModelV1CallSettings, type LocalRuntimeOptions, type McpToolkitDefinition, type McpToolkitEntry, type McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_d_exports as MessagePrimitive, type MessageRole, type MessageRuntime, type MessageState, type MessageStatus, type ModelContext, ModelContextClient, type ModelContextProvider, ModelContextRegistry, type ModelContextRegistryInstructionHandle, type ModelContextRegistryProviderHandle, type ModelContextRegistryToolHandle, PartByIndexProvider, type PendingAttachment, type ProviderToolConfig, queueItem_d_exports as QueueItemPrimitive, type QueueItemState, type RealtimeVoiceAdapter, type ReasoningGroupComponent, type ReasoningGroupProps, type ReasoningMessagePart, type ReasoningMessagePartComponent, type ReasoningMessagePartProps, type RemoteThreadListAdapter, type RemoteThreadListOptions, type RemoteThreadListProviderComponent, type RespondToToolApprovalOptions, type RunConfig, RuntimeAdapterProvider, type RuntimeAdapters, type RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, type SourceMessagePart, type SourceMessagePartComponent, type SourceMessagePartProps, type SuggestionAdapter, SuggestionByIndexProvider, type SuggestionConfig, suggestion_d_exports as SuggestionPrimitive, Suggestions, type TextMessagePart, type TextMessagePartComponent, type TextMessagePartProps, TextMessagePartProvider, type ThreadAssistantMessage, type ThreadAssistantMessagePart, type ThreadComposerRuntime, type ThreadHistoryAdapter, ThreadListItemByIndexProvider, threadListItem_d_exports as ThreadListItemPrimitive, type ThreadListItemRuntime, ThreadListItemRuntimeProvider, type ThreadListItemState, threadList_d_exports as ThreadListPrimitive, type ThreadListRuntime, type ThreadMessage, type ThreadMessageLike, thread_d_exports as ThreadPrimitive, type ThreadRuntime, type ThreadState, type ThreadSystemMessage, type ThreadUserMessage, type ThreadUserMessagePart, type ThreadsState, type Tool, type ToolApprovalOption, type ToolApprovalOptionKind, type ToolApprovalResponse, type ToolArgsStatus, type ToolCallMessagePart, type ToolCallMessagePartComponent, type ToolCallMessagePartProps, type ToolCallText, type ToolCallTiming, type ToolDefinition, type ToolModelContentPart, type Toolkit, type ToolkitDefinition, type ToolkitDefinitionEntry, Tools, type Unstable_AudioMessagePart, type Unstable_AudioMessagePartComponent, type Unstable_AudioMessagePartProps, type Unstable_InferInteractableState, type Unstable_InteractableConfig, type Unstable_InteractableDefinition, type Unstable_InteractablePersistedState, type Unstable_InteractablePersistenceAdapter, type Unstable_InteractablePersistenceStatus, type Unstable_InteractableRegistration, type Unstable_InteractableSnapshotEntry, type Unstable_InteractableStateSchema, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, type Unstable_InteractableVersion, type Unstable_InteractableVersionInfo, type Unstable_InteractablesClientSchema, type Unstable_InteractablesConfig, type Unstable_InteractablesMethods, type Unstable_InteractablesState, type Unsubscribe, type VoiceSessionControls, type VoiceSessionHelpers, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
|
22
|
+
export { actionBar_d_exports as ActionBarPrimitive, type AppendMessage, type AssistantClient, type AssistantContextConfig, type AssistantDataUI, type AssistantDataUIProps, type AssistantEventCallback, type AssistantEventName, type AssistantEventPayload, type AssistantEventScope, type AssistantEventSelector, type AssistantInteractableProps, type AssistantRuntime, AssistantRuntimeProvider, type AssistantState, type AssistantTool, type AssistantToolProps, type AssistantToolUI, type AssistantToolUIProps, type Attachment, type AttachmentAdapter, attachment_d_exports as AttachmentPrimitive, type AttachmentRuntime, type AttachmentState, AuiConfig, AuiIf, AuiProvider, branchPicker_d_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_d_exports as ChainOfThoughtPrimitive, type ChatModelAdapter, type ChatModelRunOptions, type ChatModelRunResult, type CompleteAttachment, ComposerAttachmentByIndexProvider, composer_d_exports as ComposerPrimitive, type ComposerRuntime, type ComposerState, CompositeAttachmentAdapter, type CreateAttachment, type CreateSuggestionAdapterOptions, type DataMessagePart, type DataMessagePartComponent, type DataMessagePartProps, DataRenderers, type EditComposerRuntime, type EmptyMessagePartComponent, type EmptyMessagePartProps, index_d_exports as ErrorPrimitive, ExportedMessageRepository, type ExportedMessageRepositoryItem, type FeedbackAdapter, type FileMessagePart, type FileMessagePartComponent, type FileMessagePartProps, type GroupByContext, type ImageMessagePart, type ImageMessagePartComponent, type ImageMessagePartProps, InMemoryThreadListAdapter, Interactables, type LanguageModelConfig, type LanguageModelV1CallSettings, type LocalRuntimeOptions, type McpToolkitDefinition, type McpToolkitEntry, type McpToolkitToolConfig, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_d_exports as MessagePrimitive, type MessageRole, type MessageRuntime, type MessageState, type MessageStatus, type ModelContext, ModelContextClient, type ModelContextProvider, ModelContextRegistry, type ModelContextRegistryInstructionHandle, type ModelContextRegistryProviderHandle, type ModelContextRegistryToolHandle, PartByIndexProvider, type PendingAttachment, type ProviderToolConfig, queueItem_d_exports as QueueItemPrimitive, type QueueItemState, type RealtimeVoiceAdapter, type ReasoningGroupComponent, type ReasoningGroupProps, type ReasoningMessagePart, type ReasoningMessagePartComponent, type ReasoningMessagePartProps, type RemoteThreadListAdapter, type RemoteThreadListOptions, type RemoteThreadListProviderComponent, type RespondToToolApprovalOptions, type RunConfig, RuntimeAdapterProvider, type RuntimeAdapters, type RuntimeCapabilities, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, type SourceMessagePart, type SourceMessagePartComponent, type SourceMessagePartProps, type SuggestionAdapter, type SuggestionAdapterGenerateOptions, SuggestionByIndexProvider, type SuggestionConfig, suggestion_d_exports as SuggestionPrimitive, Suggestions, type TextMessagePart, type TextMessagePartComponent, type TextMessagePartProps, TextMessagePartProvider, type ThreadAssistantMessage, type ThreadAssistantMessagePart, type ThreadComposerRuntime, type ThreadHistoryAdapter, ThreadListItemByIndexProvider, threadListItem_d_exports as ThreadListItemPrimitive, type ThreadListItemRuntime, ThreadListItemRuntimeProvider, type ThreadListItemState, threadList_d_exports as ThreadListPrimitive, type ThreadListRuntime, type ThreadMessage, type ThreadMessageLike, thread_d_exports as ThreadPrimitive, type ThreadRuntime, type ThreadState, type ThreadSystemMessage, type ThreadUserMessage, type ThreadUserMessagePart, type ThreadsState, type Tool, type ToolApprovalOption, type ToolApprovalOptionKind, type ToolApprovalResponse, type ToolArgsStatus, type ToolCallMessagePart, type ToolCallMessagePartComponent, type ToolCallMessagePartProps, type ToolCallText, type ToolCallTiming, type ToolDefinition, type ToolModelContentPart, type Toolkit, type ToolkitDefinition, type ToolkitDefinitionEntry, Tools, type Unstable_AudioMessagePart, type Unstable_AudioMessagePartComponent, type Unstable_AudioMessagePartProps, type Unstable_InferInteractableState, type Unstable_InteractableConfig, type Unstable_InteractableDefinition, type Unstable_InteractablePersistedState, type Unstable_InteractablePersistenceAdapter, type Unstable_InteractablePersistenceStatus, type Unstable_InteractableRegistration, type Unstable_InteractableSnapshotEntry, type Unstable_InteractableStateSchema, type Unstable_InteractableToolConfig, type Unstable_InteractableToolRenderProps, type Unstable_InteractableVersion, type Unstable_InteractableVersionInfo, type Unstable_InteractablesClientSchema, type Unstable_InteractablesConfig, type Unstable_InteractablesMethods, type Unstable_InteractablesState, type Unsubscribe, type VoiceSessionControls, type VoiceSessionHelpers, createSuggestionAdapter, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
package/dist/index.js
CHANGED
|
@@ -13,8 +13,8 @@ import { threadListItem_exports } from "./primitives/threadListItem.js";
|
|
|
13
13
|
import { chainOfThought_exports } from "./primitives/chainOfThought.js";
|
|
14
14
|
import { suggestion_exports } from "./primitives/suggestion.js";
|
|
15
15
|
import { error_exports } from "./primitives/error/index.js";
|
|
16
|
-
import { CompositeAttachmentAdapter, ExportedMessageRepository, InMemoryThreadListAdapter, ModelContextRegistry, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, createVoiceSession, fromThreadMessageLike, generateId, mergeModelContexts, tool, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions } from "@assistant-ui/core";
|
|
16
|
+
import { CompositeAttachmentAdapter, ExportedMessageRepository, InMemoryThreadListAdapter, ModelContextRegistry, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, createSuggestionAdapter, createVoiceSession, fromThreadMessageLike, generateId, mergeModelContexts, tool, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions } from "@assistant-ui/core";
|
|
17
17
|
import { AuiConfig, AuiIf, AuiProvider, useAui, useAuiEvent, useAuiState } from "@assistant-ui/store";
|
|
18
18
|
import { ChainOfThoughtByIndicesProvider, ChainOfThoughtPartByIndexProvider, ComposerAttachmentByIndexProvider, DataRenderers, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, PartByIndexProvider, RuntimeAdapterProvider, SuggestionByIndexProvider, TextMessagePartProvider, ThreadListItemByIndexProvider, ThreadListItemRuntimeProvider, Tools, defineMcpToolkit, defineToolkit, externalTool, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, providerTool, stubTool, unstable_Interactables, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAuiToolOverrides, useInlineRender, useInteractableState, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume } from "@assistant-ui/core/react";
|
|
19
19
|
import { ChainOfThoughtClient, ModelContext as ModelContextClient, Suggestions } from "@assistant-ui/core/store";
|
|
20
|
-
export { actionBar_exports as ActionBarPrimitive, AssistantRuntimeProvider, attachment_exports as AttachmentPrimitive, AuiConfig, AuiIf, AuiProvider, branchPicker_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_exports as ChainOfThoughtPrimitive, ComposerAttachmentByIndexProvider, composer_exports as ComposerPrimitive, CompositeAttachmentAdapter, DataRenderers, error_exports as ErrorPrimitive, ExportedMessageRepository, InMemoryThreadListAdapter, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_exports as MessagePrimitive, ModelContextClient, ModelContextRegistry, PartByIndexProvider, queueItem_exports as QueueItemPrimitive, RuntimeAdapterProvider, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SuggestionByIndexProvider, suggestion_exports as SuggestionPrimitive, Suggestions, TextMessagePartProvider, ThreadListItemByIndexProvider, threadListItem_exports as ThreadListItemPrimitive, ThreadListItemRuntimeProvider, threadList_exports as ThreadListPrimitive, thread_exports as ThreadPrimitive, Tools, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
|
20
|
+
export { actionBar_exports as ActionBarPrimitive, AssistantRuntimeProvider, attachment_exports as AttachmentPrimitive, AuiConfig, AuiIf, AuiProvider, branchPicker_exports as BranchPickerPrimitive, ChainOfThoughtByIndicesProvider, ChainOfThoughtClient, ChainOfThoughtPartByIndexProvider, chainOfThought_exports as ChainOfThoughtPrimitive, ComposerAttachmentByIndexProvider, composer_exports as ComposerPrimitive, CompositeAttachmentAdapter, DataRenderers, error_exports as ErrorPrimitive, ExportedMessageRepository, InMemoryThreadListAdapter, Interactables, MessageAttachmentByIndexProvider, MessageByIndexProvider, message_exports as MessagePrimitive, ModelContextClient, ModelContextRegistry, PartByIndexProvider, queueItem_exports as QueueItemPrimitive, RuntimeAdapterProvider, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, SuggestionByIndexProvider, suggestion_exports as SuggestionPrimitive, Suggestions, TextMessagePartProvider, ThreadListItemByIndexProvider, threadListItem_exports as ThreadListItemPrimitive, ThreadListItemRuntimeProvider, threadList_exports as ThreadListPrimitive, thread_exports as ThreadPrimitive, Tools, createSuggestionAdapter, createVoiceSession, defineMcpToolkit, defineToolkit, externalTool, fromThreadMessageLike, generateId, groupPartByType, hitl, hitlTool, humanTool, makeAssistantDataUI, makeAssistantTool, makeAssistantToolUI, mergeModelContexts, providerTool, stubTool, tool, unstable_Interactables, unstable_formatInteractableSnapshot, unstable_getInteractableSnapshots, unstable_getInteractableVersions, unstable_interactableTool, unstable_useInteractable, unstable_useInteractableState, unstable_useInteractableVersions, unstable_useThreadMessageIds, useAssistantContext, useAssistantDataUI, useAssistantInstructions, useAssistantInteractable, useAssistantTool, useAssistantToolUI, useAui, useAuiEvent, useAuiState, useAuiToolOverrides, useInlineRender, useInteractableState, useLocalRuntime, useRemoteThreadListRuntime, useRuntimeAdapters, useToolArgsStatus, useVoiceControls, useVoiceState, useVoiceVolume };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarCopy.js","names":["ReactNode","Pressable","PressableProps","useActionBarCopy","UseActionBarCopyOptions","ActionBarCopyProps","Omit","children","props","isCopied","ActionBarCopy","t0","$","_c","copiedDuration","copyToClipboard","disabledProp","pressableProps","disabled","t1","copy","t2","t3","t4"],"sources":["../../../src/primitives/actionBar/ActionBarCopy.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport {\n useActionBarCopy,\n type UseActionBarCopyOptions,\n} from \"@assistant-ui/core/react\";\n\nexport type ActionBarCopyProps = Omit<PressableProps, \"onPress\" | \"children\"> &\n UseActionBarCopyOptions & {\n children: ReactNode | ((props: { isCopied: boolean }) => ReactNode);\n };\n\nexport const ActionBarCopy = ({\n children,\n disabled: disabledProp,\n copiedDuration,\n copyToClipboard,\n ...pressableProps\n}: ActionBarCopyProps) => {\n const { copy, disabled, isCopied } = useActionBarCopy({\n copiedDuration,\n copyToClipboard,\n });\n\n return (\n <Pressable\n onPress={copy}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {typeof children === \"function\" ? children({ isCopied }) : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAYA,MAAaU,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAAW,UAAAF,cAAAF,gBAAAC,
|
|
1
|
+
{"version":3,"file":"ActionBarCopy.js","names":["ReactNode","Pressable","PressableProps","useActionBarCopy","UseActionBarCopyOptions","ActionBarCopyProps","Omit","children","props","isCopied","ActionBarCopy","t0","$","_c","copiedDuration","copyToClipboard","disabledProp","pressableProps","disabled","t1","copy","t2","t3","t4"],"sources":["../../../src/primitives/actionBar/ActionBarCopy.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport {\n useActionBarCopy,\n type UseActionBarCopyOptions,\n} from \"@assistant-ui/core/react\";\n\nexport type ActionBarCopyProps = Omit<PressableProps, \"onPress\" | \"children\"> &\n UseActionBarCopyOptions & {\n children: ReactNode | ((props: { isCopied: boolean }) => ReactNode);\n };\n\nexport const ActionBarCopy = ({\n children,\n disabled: disabledProp,\n copiedDuration,\n copyToClipboard,\n ...pressableProps\n}: ActionBarCopyProps) => {\n const { copy, disabled, isCopied } = useActionBarCopy({\n copiedDuration,\n copyToClipboard,\n });\n\n return (\n <Pressable\n onPress={copy}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {typeof children === \"function\" ? children({ isCopied }) : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAYA,MAAaU,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAAW,UAAAF,cAAAF,gBAAAC,iBAAA,GAAAE,kBAAAN;EAMTC,EAAA,KAAAD;EAAAC,EAAA,KAAAL;EAAAK,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAA;EAAAV,WAAAK,EAAA;EAAAE,iBAAAF,EAAA;EAAAG,kBAAAH,EAAA;EAAAI,eAAAJ,EAAA;EAAAK,iBAAAL,EAAA;CAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAE,kBAAAF,EAAA,OAAAG,iBAAA;EACmCI,KAAA;GAAAL;GAAAC;EAGtD;EAACH,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAHD,MAAA,EAAAQ,MAAAF,UAAAT,aAAqCN,iBAAiBgB,EAGrD;CAKa,MAAAE,KAAAL,gBAAAE;CAAwB,IAAAI;CAAA,IAAAV,EAAA,OAAAL,YAAAK,EAAA,QAAAH,UAAA;EAIjCa,KAAA,OAAOf,aAAa,aAAaA,SAAS,EAAAE,SAAW,CAAY,IAAjEF;EAAkEK,EAAA,KAAAL;EAAAK,EAAA,MAAAH;EAAAG,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,QAAAQ,QAAAR,EAAA,QAAAK,kBAAAL,EAAA,QAAAS,MAAAT,EAAA,QAAAU,IAAA;EANrEC,KAAA,oBAAC,WAAD;GACWH,SAAAA;GACC,UAAAC;GACQ,mBAAA;GAAQ,GACtBJ;GAEHK,UAAAA;EANO,CAAA;EAOEV,EAAA,MAAAQ;EAAAR,EAAA,MAAAK;EAAAL,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAPZW;AAOY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarEdit.js","names":["Pressable","PressableProps","useActionBarEdit","ActionBarEditProps","Omit","children","ActionBarEdit","t0","$","_c","disabledProp","pressableProps","disabled","edit","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarEdit.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarEdit } from \"@assistant-ui/core/react\";\n\nexport type ActionBarEditProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ActionBarEdit = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: ActionBarEditProps) => {\n const { edit, disabled } = useActionBarEdit();\n\n return (\n <Pressable\n onPress={edit}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,
|
|
1
|
+
{"version":3,"file":"ActionBarEdit.js","names":["Pressable","PressableProps","useActionBarEdit","ActionBarEditProps","Omit","children","ActionBarEdit","t0","$","_c","disabledProp","pressableProps","disabled","edit","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarEdit.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarEdit } from \"@assistant-ui/core/react\";\n\nexport type ActionBarEditProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ActionBarEdit = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: ActionBarEditProps) => {\n const { edit, disabled } = useActionBarEdit();\n\n return (\n <Pressable\n onPress={edit}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,cAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAN,WAAAG,EAAA;EAAAE,eAAAF,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CACnB,MAAA,EAAAK,MAAAD,aAA2BV,iBAAiB;CAK9B,MAAAY,KAAAJ,gBAAAE;CAAwB,IAAAG;CAAA,IAAAP,EAAA,OAAAH,YAAAG,EAAA,OAAAK,QAAAL,EAAA,OAAAG,kBAAAH,EAAA,OAAAM,IAAA;EAFpCC,KAAA,oBAAC,WAAD;GACWF,SAAAA;GACC,UAAAC;GACQ,mBAAA;GAAQ,GACtBH;GAEHN;EANO,CAAA;EAOEG,EAAA,KAAAH;EAAAG,EAAA,KAAAK;EAAAL,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAPZO;AAOY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarFeedbackNegative.js","names":["ReactNode","Pressable","PressableProps","useActionBarFeedbackNegative","ActionBarFeedbackNegativeProps","Omit","children","props","isSubmitted","ActionBarFeedbackNegative","t0","$","_c","pressableProps","submit","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackNegative.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarFeedbackNegative } from \"@assistant-ui/core/react\";\n\nexport type ActionBarFeedbackNegativeProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: ReactNode | ((props: { isSubmitted: boolean }) => ReactNode);\n};\n\nexport const ActionBarFeedbackNegative = ({\n children,\n ...pressableProps\n}: ActionBarFeedbackNegativeProps) => {\n const { submit, isSubmitted } = useActionBarFeedbackNegative();\n\n return (\n <Pressable onPress={submit} accessibilityRole=\"button\" {...pressableProps}>\n {typeof children === \"function\" ? children({ isSubmitted }) : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAWA,MAAaS,6BAA4BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,
|
|
1
|
+
{"version":3,"file":"ActionBarFeedbackNegative.js","names":["ReactNode","Pressable","PressableProps","useActionBarFeedbackNegative","ActionBarFeedbackNegativeProps","Omit","children","props","isSubmitted","ActionBarFeedbackNegative","t0","$","_c","pressableProps","submit","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackNegative.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarFeedbackNegative } from \"@assistant-ui/core/react\";\n\nexport type ActionBarFeedbackNegativeProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: ReactNode | ((props: { isSubmitted: boolean }) => ReactNode);\n};\n\nexport const ActionBarFeedbackNegative = ({\n children,\n ...pressableProps\n}: ActionBarFeedbackNegativeProps) => {\n const { submit, isSubmitted } = useActionBarFeedbackNegative();\n\n return (\n <Pressable onPress={submit} accessibilityRole=\"button\" {...pressableProps}>\n {typeof children === \"function\" ? children({ isSubmitted }) : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAWA,MAAaS,6BAA4BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAA,GAAAO,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAL;EAAAK,EAAA,KAAAE;CAAA,OAAA;EAAAP,WAAAK,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CAC/B,MAAA,EAAAG,QAAAN,gBAAgCL,6BAA6B;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAL,YAAAK,EAAA,OAAAH,aAAA;EAI1DO,KAAA,OAAOT,aAAa,aAAaA,SAAS,EAAAE,YAAc,CAAY,IAApEF;EAAqEK,EAAA,KAAAL;EAAAK,EAAA,KAAAH;EAAAG,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAE,kBAAAF,EAAA,OAAAG,UAAAH,EAAA,OAAAI,IAAA;EADxEC,KAAA,oBAAC,WAAD;GAAoBF,SAAAA;GAA0B,mBAAA;GAAQ,GAAKD;GACxDE,UAAAA;EADO,CAAA;EAEEJ,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFZK;AAEY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarFeedbackPositive.js","names":["ReactNode","Pressable","PressableProps","useActionBarFeedbackPositive","ActionBarFeedbackPositiveProps","Omit","children","props","isSubmitted","ActionBarFeedbackPositive","t0","$","_c","pressableProps","submit","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackPositive.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarFeedbackPositive } from \"@assistant-ui/core/react\";\n\nexport type ActionBarFeedbackPositiveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: ReactNode | ((props: { isSubmitted: boolean }) => ReactNode);\n};\n\nexport const ActionBarFeedbackPositive = ({\n children,\n ...pressableProps\n}: ActionBarFeedbackPositiveProps) => {\n const { submit, isSubmitted } = useActionBarFeedbackPositive();\n\n return (\n <Pressable onPress={submit} accessibilityRole=\"button\" {...pressableProps}>\n {typeof children === \"function\" ? children({ isSubmitted }) : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAWA,MAAaS,6BAA4BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,
|
|
1
|
+
{"version":3,"file":"ActionBarFeedbackPositive.js","names":["ReactNode","Pressable","PressableProps","useActionBarFeedbackPositive","ActionBarFeedbackPositiveProps","Omit","children","props","isSubmitted","ActionBarFeedbackPositive","t0","$","_c","pressableProps","submit","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarFeedbackPositive.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarFeedbackPositive } from \"@assistant-ui/core/react\";\n\nexport type ActionBarFeedbackPositiveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: ReactNode | ((props: { isSubmitted: boolean }) => ReactNode);\n};\n\nexport const ActionBarFeedbackPositive = ({\n children,\n ...pressableProps\n}: ActionBarFeedbackPositiveProps) => {\n const { submit, isSubmitted } = useActionBarFeedbackPositive();\n\n return (\n <Pressable onPress={submit} accessibilityRole=\"button\" {...pressableProps}>\n {typeof children === \"function\" ? children({ isSubmitted }) : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAWA,MAAaS,6BAA4BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAA,GAAAO,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAL;EAAAK,EAAA,KAAAE;CAAA,OAAA;EAAAP,WAAAK,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CAC/B,MAAA,EAAAG,QAAAN,gBAAgCL,6BAA6B;CAAE,IAAAY;CAAA,IAAAJ,EAAA,OAAAL,YAAAK,EAAA,OAAAH,aAAA;EAI1DO,KAAA,OAAOT,aAAa,aAAaA,SAAS,EAAAE,YAAc,CAAY,IAApEF;EAAqEK,EAAA,KAAAL;EAAAK,EAAA,KAAAH;EAAAG,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAE,kBAAAF,EAAA,OAAAG,UAAAH,EAAA,OAAAI,IAAA;EADxEC,KAAA,oBAAC,WAAD;GAAoBF,SAAAA;GAA0B,mBAAA;GAAQ,GAAKD;GACxDE,UAAAA;EADO,CAAA;EAEEJ,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFZK;AAEY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarReload.js","names":["Pressable","PressableProps","useActionBarReload","ActionBarReloadProps","Omit","children","ActionBarReload","t0","$","_c","disabledProp","pressableProps","disabled","reload","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarReload.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarReload } from \"@assistant-ui/core/react\";\n\nexport type ActionBarReloadProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ActionBarReload = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: ActionBarReloadProps) => {\n const { reload, disabled } = useActionBarReload();\n\n return (\n <Pressable\n onPress={reload}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,
|
|
1
|
+
{"version":3,"file":"ActionBarReload.js","names":["Pressable","PressableProps","useActionBarReload","ActionBarReloadProps","Omit","children","ActionBarReload","t0","$","_c","disabledProp","pressableProps","disabled","reload","t1","t2"],"sources":["../../../src/primitives/actionBar/ActionBarReload.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useActionBarReload } from \"@assistant-ui/core/react\";\n\nexport type ActionBarReloadProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ActionBarReload = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: ActionBarReloadProps) => {\n const { reload, disabled } = useActionBarReload();\n\n return (\n <Pressable\n onPress={reload}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,cAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAN,WAAAG,EAAA;EAAAE,eAAAF,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CACrB,MAAA,EAAAK,QAAAD,aAA6BV,mBAAmB;CAKlC,MAAAY,KAAAJ,gBAAAE;CAAwB,IAAAG;CAAA,IAAAP,EAAA,OAAAH,YAAAG,EAAA,OAAAG,kBAAAH,EAAA,OAAAK,UAAAL,EAAA,OAAAM,IAAA;EAFpCC,KAAA,oBAAC,WAAD;GACWF,SAAAA;GACC,UAAAC;GACQ,mBAAA;GAAQ,GACtBH;GAEHN;EANO,CAAA;EAOEG,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAPZO;AAOY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentRemove.js","names":["useCallback","Pressable","PressableProps","useAui","AttachmentRemoveProps","Omit","children","AttachmentRemove","t0","$","_c","pressableProps","aui","t1","attachment","remove","handleRemove","t2"],"sources":["../../../src/primitives/attachment/AttachmentRemove.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\n\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type AttachmentRemoveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const AttachmentRemove = ({\n children,\n ...pressableProps\n}: AttachmentRemoveProps) => {\n const aui = useAui();\n\n const handleRemove = useCallback(() => {\n aui.attachment.remove();\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleRemove}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAYA,MAAaO,oBAAmBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"AttachmentRemove.js","names":["useCallback","Pressable","PressableProps","useAui","AttachmentRemoveProps","Omit","children","AttachmentRemove","t0","$","_c","pressableProps","aui","t1","attachment","remove","handleRemove","t2"],"sources":["../../../src/primitives/attachment/AttachmentRemove.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\n\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type AttachmentRemoveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const AttachmentRemove = ({\n children,\n ...pressableProps\n}: AttachmentRemoveProps) => {\n const aui = useAui();\n\n const handleRemove = useCallback(() => {\n aui.attachment.remove();\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleRemove}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAYA,MAAaO,oBAAmBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CACtB,MAAAG,MAAYT,OAAO;CAAE,IAAAU;CAAA,IAAAJ,EAAA,OAAAG,IAAAE,YAAA;EAEYD,WAAA;GAC/BD,IAAGE,WAAWC,OAAQ;EAAC;EACxBN,EAAA,KAAAG,IAAAE;EAAAL,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAFD,MAAAO,eAAqBH;CAEX,IAAAI;CAAA,IAAAR,EAAA,OAAAH,YAAAG,EAAA,OAAAO,gBAAAP,EAAA,OAAAE,gBAAA;EAGRM,KAAA,oBAAC,WAAD;GACWD,SAAAA;GACS,mBAAA;GAAQ,GACtBL;GAEHL;EALO,CAAA;EAMEG,EAAA,KAAAH;EAAAG,EAAA,KAAAO;EAAAP,EAAA,KAAAE;EAAAF,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANZQ;AAMY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentRoot.js","names":["ReactNode","View","ViewProps","AttachmentRootProps","children","AttachmentRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/attachment/AttachmentRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type AttachmentRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const AttachmentRoot = ({\n children,\n ...viewProps\n}: AttachmentRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"AttachmentRoot.js","names":["ReactNode","View","ViewProps","AttachmentRootProps","children","AttachmentRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/attachment/AttachmentRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type AttachmentRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const AttachmentRoot = ({\n children,\n ...viewProps\n}: AttachmentRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EACbC,KAAA,oBAAC,MAAD;GAAK,GAAKD;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAtCG;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentThumb.js","names":["FC","Text","TextProps","useAuiState","AttachmentThumbProps","AttachmentThumb","t0","$","_c","children","textProps","label","_temp","t1","t2","s","name","attachment","dot","lastIndexOf","length","slice","type"],"sources":["../../../src/primitives/attachment/AttachmentThumb.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type AttachmentThumbProps = TextProps;\n\nexport const AttachmentThumb: FC<AttachmentThumbProps> = ({\n children,\n ...textProps\n}) => {\n const label = useAuiState((s) => {\n const name = s.attachment.name;\n const dot = name.lastIndexOf(\".\");\n if (dot > 0 && dot < name.length - 1) {\n return `.${name.slice(dot + 1)}`;\n }\n return s.attachment.type;\n });\n return <Text {...textProps}>{children ?? label}</Text>;\n};\n"],"mappings":";;;;;AAMA,MAAaK,mBAA4CC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAG,
|
|
1
|
+
{"version":3,"file":"AttachmentThumb.js","names":["FC","Text","TextProps","useAuiState","AttachmentThumbProps","AttachmentThumb","t0","$","_c","children","textProps","label","_temp","t1","t2","s","name","attachment","dot","lastIndexOf","length","slice","type"],"sources":["../../../src/primitives/attachment/AttachmentThumb.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type AttachmentThumbProps = TextProps;\n\nexport const AttachmentThumb: FC<AttachmentThumbProps> = ({\n children,\n ...textProps\n}) => {\n const label = useAuiState((s) => {\n const name = s.attachment.name;\n const dot = name.lastIndexOf(\".\");\n if (dot > 0 && dot < name.length - 1) {\n return `.${name.slice(dot + 1)}`;\n }\n return s.attachment.type;\n });\n return <Text {...textProps}>{children ?? label}</Text>;\n};\n"],"mappings":";;;;;AAMA,MAAaK,mBAA4CC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAG,UAAA,GAAAC,aAAAJ;EAGzDC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAD,WAAAF,EAAA;EAAAG,YAAAH,EAAA;CAAA;CACC,MAAAI,QAAcR,YAAYS,KAOzB;CAC4B,MAAAC,KAAAJ,YAAAE;CAAiB,IAAAG;CAAA,IAAAP,EAAA,OAAAM,MAAAN,EAAA,OAAAG,WAAA;EAAvCI,KAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAYG,UAAAA;EAAjB,CAAA;EAA0CN,EAAA,KAAAM;EAAAN,EAAA,KAAAG;EAAAH,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAA/CO;AAA+C;AAZC,SAAAF,MAAAG,GAAA;CAKrD,MAAAC,OAAaD,EAACE,WAAWD;CACzB,MAAAE,MAAYF,KAAIG,YAAa,GAAG;CAChC,IAAID,MAAM,KAAKA,MAAMF,KAAII,SAAU,GAAC,OAC3B,IAAIJ,KAAIK,MAAOH,MAAM,CAAC;CAC9B,OACMH,EAACE,WAAWK;AAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BranchPickerNext.js","names":["Pressable","PressableProps","useBranchPickerNext","BranchPickerNextProps","Omit","children","BranchPickerNext","t0","$","_c","disabledProp","pressableProps","disabled","next","t1","t2"],"sources":["../../../src/primitives/branchPicker/BranchPickerNext.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useBranchPickerNext } from \"@assistant-ui/core/react\";\n\nexport type BranchPickerNextProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const BranchPickerNext = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: BranchPickerNextProps) => {\n const { next, disabled } = useBranchPickerNext();\n\n return (\n <Pressable\n onPress={next}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,oBAAmBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,
|
|
1
|
+
{"version":3,"file":"BranchPickerNext.js","names":["Pressable","PressableProps","useBranchPickerNext","BranchPickerNextProps","Omit","children","BranchPickerNext","t0","$","_c","disabledProp","pressableProps","disabled","next","t1","t2"],"sources":["../../../src/primitives/branchPicker/BranchPickerNext.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useBranchPickerNext } from \"@assistant-ui/core/react\";\n\nexport type BranchPickerNextProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const BranchPickerNext = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: BranchPickerNextProps) => {\n const { next, disabled } = useBranchPickerNext();\n\n return (\n <Pressable\n onPress={next}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,oBAAmBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,cAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAN,WAAAG,EAAA;EAAAE,eAAAF,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CACtB,MAAA,EAAAK,MAAAD,aAA2BV,oBAAoB;CAKjC,MAAAY,KAAAJ,gBAAAE;CAAwB,IAAAG;CAAA,IAAAP,EAAA,OAAAH,YAAAG,EAAA,OAAAK,QAAAL,EAAA,OAAAG,kBAAAH,EAAA,OAAAM,IAAA;EAFpCC,KAAA,oBAAC,WAAD;GACWF,SAAAA;GACC,UAAAC;GACQ,mBAAA;GAAQ,GACtBH;GAEHN;EANO,CAAA;EAOEG,EAAA,KAAAH;EAAAG,EAAA,KAAAK;EAAAL,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAPZO;AAOY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BranchPickerPrevious.js","names":["Pressable","PressableProps","useBranchPickerPrevious","BranchPickerPreviousProps","Omit","children","BranchPickerPrevious","t0","$","_c","disabledProp","pressableProps","disabled","previous","t1","t2"],"sources":["../../../src/primitives/branchPicker/BranchPickerPrevious.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useBranchPickerPrevious } from \"@assistant-ui/core/react\";\n\nexport type BranchPickerPreviousProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const BranchPickerPrevious = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: BranchPickerPreviousProps) => {\n const { previous, disabled } = useBranchPickerPrevious();\n\n return (\n <Pressable\n onPress={previous}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,wBAAuBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,
|
|
1
|
+
{"version":3,"file":"BranchPickerPrevious.js","names":["Pressable","PressableProps","useBranchPickerPrevious","BranchPickerPreviousProps","Omit","children","BranchPickerPrevious","t0","$","_c","disabledProp","pressableProps","disabled","previous","t1","t2"],"sources":["../../../src/primitives/branchPicker/BranchPickerPrevious.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useBranchPickerPrevious } from \"@assistant-ui/core/react\";\n\nexport type BranchPickerPreviousProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const BranchPickerPrevious = ({\n children,\n disabled: disabledProp,\n ...pressableProps\n}: BranchPickerPreviousProps) => {\n const { previous, disabled } = useBranchPickerPrevious();\n\n return (\n <Pressable\n onPress={previous}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,wBAAuBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,cAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAN,WAAAG,EAAA;EAAAE,eAAAF,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CAC1B,MAAA,EAAAK,UAAAD,aAA+BV,wBAAwB;CAKzC,MAAAY,KAAAJ,gBAAAE;CAAwB,IAAAG;CAAA,IAAAP,EAAA,OAAAH,YAAAG,EAAA,OAAAG,kBAAAH,EAAA,OAAAK,YAAAL,EAAA,OAAAM,IAAA;EAFpCC,KAAA,oBAAC,WAAD;GACWF,SAAAA;GACC,UAAAC;GACQ,mBAAA;GAAQ,GACtBH;GAEHN;EANO,CAAA;EAOEG,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAPZO;AAOY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainOfThoughtAccordionTrigger.js","names":["useCallback","Pressable","PressableProps","useAuiState","useAui","ChainOfThoughtAccordionTriggerProps","Omit","children","ChainOfThoughtAccordionTrigger","t0","$","_c","pressableProps","aui","collapsed","_temp","t1","chainOfThought","setCollapsed","onPress","t2","s"],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx"],"sourcesContent":["import { useCallback } 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\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\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} accessibilityRole=\"button\" {...pressableProps}>\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaQ,kCAAiCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ChainOfThoughtAccordionTrigger.js","names":["useCallback","Pressable","PressableProps","useAuiState","useAui","ChainOfThoughtAccordionTriggerProps","Omit","children","ChainOfThoughtAccordionTrigger","t0","$","_c","pressableProps","aui","collapsed","_temp","t1","chainOfThought","setCollapsed","onPress","t2","s"],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.tsx"],"sourcesContent":["import { useCallback } 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\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\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} accessibilityRole=\"button\" {...pressableProps}>\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaQ,kCAAiCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CACpC,MAAAG,MAAYT,OAAO;CACnB,MAAAU,YAAkBX,YAAYY,KAAiC;CAAE,IAAAC;CAAA,IAAAN,EAAA,OAAAG,IAAAI,kBAAAP,EAAA,OAAAI,WAAA;EAErCE,WAAA;GAC1BH,IAAGI,eAAeC,aAAc,CAACJ,SAAS;EAAC;EAC5CJ,EAAA,KAAAG,IAAAI;EAAAP,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAFD,MAAAS,UAAgBH;CAEK,IAAAI;CAAA,IAAAV,EAAA,OAAAH,YAAAG,EAAA,OAAAS,WAAAT,EAAA,OAAAE,gBAAA;EAGnBQ,KAAA,oBAAC,WAAD;GAAoBD;GAA2B,mBAAA;GAAQ,GAAKP;GACzDL;EADO,CAAA;EAEEG,EAAA,KAAAH;EAAAG,EAAA,KAAAS;EAAAT,EAAA,KAAAE;EAAAF,EAAA,KAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAFZU;AAEY;AAd8B,SAAAL,MAAAM,GAAA;CAAA,OAKPA,EAACJ,eAAeH;AAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainOfThoughtRoot.js","names":["ReactNode","View","ViewProps","ChainOfThoughtRootProps","children","ChainOfThoughtRoot","t0","$","_c","viewProps","t1"],"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,MAAaK,sBAAqBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ChainOfThoughtRoot.js","names":["ReactNode","View","ViewProps","ChainOfThoughtRootProps","children","ChainOfThoughtRoot","t0","$","_c","viewProps","t1"],"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,MAAaK,sBAAqBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EACjBC,KAAA,oBAAC,MAAD;GAAK,GAAKD;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAtCG;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerAddAttachment.js","names":["Pressable","PressableProps","useComposerAddAttachment","ComposerAddAttachmentProps","Omit","children","ComposerAddAttachment","t0","$","_c","disabledProp","pressableProps","disabled","t1","t2"],"sources":["../../../src/primitives/composer/ComposerAddAttachment.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerAddAttachment } from \"@assistant-ui/core/react\";\n\nexport type ComposerAddAttachmentProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\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\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAaM,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,
|
|
1
|
+
{"version":3,"file":"ComposerAddAttachment.js","names":["Pressable","PressableProps","useComposerAddAttachment","ComposerAddAttachmentProps","Omit","children","ComposerAddAttachment","t0","$","_c","disabledProp","pressableProps","disabled","t1","t2"],"sources":["../../../src/primitives/composer/ComposerAddAttachment.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerAddAttachment } from \"@assistant-ui/core/react\";\n\nexport type ComposerAddAttachmentProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\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\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAaM,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAO,UAAAF,cAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAN,WAAAG,EAAA;EAAAE,eAAAF,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CAC3B,MAAA,EAAAI,aAAqBV,yBAAyB;CAIhC,MAAAW,KAAAH,gBAAAE;CAAwB,IAAAE;CAAA,IAAAN,EAAA,OAAAH,YAAAG,EAAA,OAAAG,kBAAAH,EAAA,OAAAK,IAAA;EADpCC,KAAA,oBAAC,WAAD;GACY,UAAAD;GACQ,mBAAA;GAAQ,GACtBF;GAEHN;EALO,CAAA;EAMEG,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OANZM;AAMY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerCancel.js","names":["Pressable","PressableProps","useComposerCancel","ComposerCancelProps","Omit","children","ComposerCancel","t0","$","_c","disabled","pressableProps","cancel","hookDisabled","t1","t2"],"sources":["../../../src/primitives/composer/ComposerCancel.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerCancel } from \"@assistant-ui/core/react\";\n\nexport type ComposerCancelProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\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 accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAK,
|
|
1
|
+
{"version":3,"file":"ComposerCancel.js","names":["Pressable","PressableProps","useComposerCancel","ComposerCancelProps","Omit","children","ComposerCancel","t0","$","_c","disabled","pressableProps","cancel","hookDisabled","t1","t2"],"sources":["../../../src/primitives/composer/ComposerCancel.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerCancel } from \"@assistant-ui/core/react\";\n\nexport type ComposerCancelProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\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 accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAK,UAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAN,WAAAG,EAAA;EAAAE,WAAAF,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CACpB,MAAA,EAAAI,QAAAF,UAAAG,iBAA2CX,kBAAkB;CAK/C,MAAAY,KAAAJ,YAAAG;CAAwB,IAAAE;CAAA,IAAAP,EAAA,OAAAI,UAAAJ,EAAA,OAAAH,YAAAG,EAAA,OAAAG,kBAAAH,EAAA,OAAAM,IAAA;EAFpCC,KAAA,oBAAC,WAAD;GACWH,SAAAA;GACC,UAAAE;GACQ,mBAAA;GAAQ,GACtBH;GAEHN;EANO,CAAA;EAOEG,EAAA,KAAAI;EAAAJ,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAPZO;AAOY"}
|
|
@@ -92,6 +92,8 @@ const ComposerInput = (t0) => {
|
|
|
92
92
|
const nativeEvent = e.nativeEvent;
|
|
93
93
|
if (nativeEvent.isComposing || nativeEvent.keyCode === 229) return;
|
|
94
94
|
if (nativeEvent.key === "Enter" && !nativeEvent.shiftKey) {
|
|
95
|
+
const threadState = aui.thread.getState();
|
|
96
|
+
if (threadState.isRunning && !threadState.capabilities.queue) return;
|
|
95
97
|
e.preventDefault?.();
|
|
96
98
|
aui.composer.send();
|
|
97
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerInput.js","names":["useCallback","useEffect","useRef","Platform","TextInput","TextInputProps","useAui","useAuiState","flushTapSync","TextInputInstance","React","ComponentRef","TextInputKeyPressEvent","Parameters","NonNullable","ComposerInputProps","Omit","submitMode","getWebTextareaMaxHeight","el","HTMLTextAreaElement","computedMaxHeight","globalThis","getComputedStyle","maxHeight","parsedComputedMaxHeight","Number","parseFloat","isFinite","inlineMaxHeight","style","adjustWebTextareaHeight","ref","RefObject","OS","current","rows","overflowX","overflowY","height","scrollHeight","needsScrollbar","nextHeight","Math","min","ComposerInput","t0","$","_c","numberOfLines","onKeyPressProp","props","t1","onKeyPress","undefined","aui","text","_temp","inputRef","t2","value","composer","setText","onChangeText","t3","Symbol","for","t4","t5","e","isDefaultPrevented","nativeEvent","shiftKey","isComposing","keyCode","key","Event","preventDefault","send","t6","t7","s"],"sources":["../../../src/primitives/composer/ComposerInput.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\nimport { Platform, TextInput, type TextInputProps } from \"react-native\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\nimport { flushTapSync } from \"@assistant-ui/tap\";\n\ntype TextInputInstance = React.ComponentRef<typeof TextInput>;\ntype TextInputKeyPressEvent = Parameters<\n NonNullable<TextInputProps[\"onKeyPress\"]>\n>[0];\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 getWebTextareaMaxHeight = (el: HTMLTextAreaElement) => {\n const computedMaxHeight = globalThis.getComputedStyle?.(el).maxHeight;\n const parsedComputedMaxHeight = Number.parseFloat(computedMaxHeight ?? \"\");\n if (Number.isFinite(parsedComputedMaxHeight)) return parsedComputedMaxHeight;\n\n const inlineMaxHeight = Number.parseFloat(el.style.maxHeight);\n return Number.isFinite(inlineMaxHeight) ? inlineMaxHeight : null;\n};\n\nconst adjustWebTextareaHeight = (\n ref: React.RefObject<TextInputInstance | null>,\n) => {\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\n el.style.overflowX = \"hidden\";\n el.style.overflowY = \"hidden\";\n el.style.height = \"auto\";\n\n const scrollHeight = el.scrollHeight;\n const maxHeight = getWebTextareaMaxHeight(el);\n const needsScrollbar = maxHeight !== null && scrollHeight > maxHeight;\n const nextHeight =\n maxHeight === null ? scrollHeight : Math.min(scrollHeight, maxHeight);\n\n el.style.overflowY = needsScrollbar ? \"auto\" : \"hidden\";\n el.style.height = `${nextHeight}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<TextInputInstance>(null);\n\n const onChangeText = useCallback(\n (value: string) => {\n if (Platform.OS === \"web\") {\n // Keep the controlled value in sync mid-IME so react-dom does not reset the textarea to a stale value\n flushTapSync(() => {\n aui.composer.setText(value);\n });\n return;\n }\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: TextInputKeyPressEvent) => {\n onKeyPressProp?.(e);\n if (e.isDefaultPrevented()) return;\n\n if (Platform.OS !== \"web\") return;\n if (submitMode !== \"enter\") return;\n\n const nativeEvent =\n e.nativeEvent as TextInputKeyPressEvent[\"nativeEvent\"] & {\n shiftKey?: boolean;\n isComposing?: boolean;\n keyCode?: number;\n };\n // react-native-web forwards the raw DOM keydown before its own composition guard, so re-check it here (mirrors isEventComposing)\n if (nativeEvent.isComposing || nativeEvent.keyCode === 229) return;\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,MAAMkB,2BAA2BC,OAA4B;CAC3D,MAAME,oBAAoBC,WAAWC,mBAAmBJ,EAAE,CAAC,CAACK;CAC5D,MAAMC,0BAA0BC,OAAOC,WAAWN,qBAAqB,EAAE;CACzE,IAAIK,OAAOE,SAASH,uBAAuB,GAAG,OAAOA;CAErD,MAAMI,kBAAkBH,OAAOC,WAAWR,GAAGW,MAAMN,SAAS;CAC5D,OAAOE,OAAOE,SAASC,eAAe,IAAIA,kBAAkB;AAC9D;AAEA,MAAME,2BACJC,QACG;CACH,IAAI7B,SAAS+B,OAAO,OAAO;CAE3B,MAAMf,KAAKa,IAAIG;CACf,IAAI,CAAChB,IAAI;CAET,IAAIA,GAAGiB,SAAS,GAAGjB,GAAGiB,OAAO;CAE7BjB,GAAGW,MAAMO,YAAY;CACrBlB,GAAGW,MAAMQ,YAAY;CACrBnB,GAAGW,MAAMS,SAAS;CAElB,MAAMC,eAAerB,GAAGqB;CACxB,MAAMhB,YAAYN,wBAAwBC,EAAE;CAC5C,MAAMsB,iBAAiBjB,cAAc,QAAQgB,eAAehB;CAC5D,MAAMkB,aACJlB,cAAc,OAAOgB,eAAeG,KAAKC,IAAIJ,cAAchB,SAAS;CAEtEL,GAAGW,MAAMQ,YAAYG,iBAAiB,SAAS;CAC/CtB,GAAGW,MAAMS,SAAS,GAAGG,WAAU;AACjC;AAEA,MAAaG,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAArB;CAAA,IAAAsB;CAAA,IAAAL,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAA7B,YAAAmC,IAAAC,YAAAH,gBAAAD,eAAAnB,
|
|
1
|
+
{"version":3,"file":"ComposerInput.js","names":["useCallback","useEffect","useRef","Platform","TextInput","TextInputProps","useAui","useAuiState","flushTapSync","TextInputInstance","React","ComponentRef","TextInputKeyPressEvent","Parameters","NonNullable","ComposerInputProps","Omit","submitMode","getWebTextareaMaxHeight","el","HTMLTextAreaElement","computedMaxHeight","globalThis","getComputedStyle","maxHeight","parsedComputedMaxHeight","Number","parseFloat","isFinite","inlineMaxHeight","style","adjustWebTextareaHeight","ref","RefObject","OS","current","rows","overflowX","overflowY","height","scrollHeight","needsScrollbar","nextHeight","Math","min","ComposerInput","t0","$","_c","numberOfLines","onKeyPressProp","props","t1","onKeyPress","undefined","aui","text","_temp","inputRef","t2","value","composer","setText","onChangeText","t3","Symbol","for","t4","t5","e","isDefaultPrevented","nativeEvent","shiftKey","isComposing","keyCode","key","threadState","thread","getState","isRunning","capabilities","queue","Event","preventDefault","send","t6","t7","s"],"sources":["../../../src/primitives/composer/ComposerInput.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef } from \"react\";\nimport { Platform, TextInput, type TextInputProps } from \"react-native\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\nimport { flushTapSync } from \"@assistant-ui/tap\";\n\ntype TextInputInstance = React.ComponentRef<typeof TextInput>;\ntype TextInputKeyPressEvent = Parameters<\n NonNullable<TextInputProps[\"onKeyPress\"]>\n>[0];\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 getWebTextareaMaxHeight = (el: HTMLTextAreaElement) => {\n const computedMaxHeight = globalThis.getComputedStyle?.(el).maxHeight;\n const parsedComputedMaxHeight = Number.parseFloat(computedMaxHeight ?? \"\");\n if (Number.isFinite(parsedComputedMaxHeight)) return parsedComputedMaxHeight;\n\n const inlineMaxHeight = Number.parseFloat(el.style.maxHeight);\n return Number.isFinite(inlineMaxHeight) ? inlineMaxHeight : null;\n};\n\nconst adjustWebTextareaHeight = (\n ref: React.RefObject<TextInputInstance | null>,\n) => {\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\n el.style.overflowX = \"hidden\";\n el.style.overflowY = \"hidden\";\n el.style.height = \"auto\";\n\n const scrollHeight = el.scrollHeight;\n const maxHeight = getWebTextareaMaxHeight(el);\n const needsScrollbar = maxHeight !== null && scrollHeight > maxHeight;\n const nextHeight =\n maxHeight === null ? scrollHeight : Math.min(scrollHeight, maxHeight);\n\n el.style.overflowY = needsScrollbar ? \"auto\" : \"hidden\";\n el.style.height = `${nextHeight}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<TextInputInstance>(null);\n\n const onChangeText = useCallback(\n (value: string) => {\n if (Platform.OS === \"web\") {\n // Keep the controlled value in sync mid-IME so react-dom does not reset the textarea to a stale value\n flushTapSync(() => {\n aui.composer.setText(value);\n });\n return;\n }\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: TextInputKeyPressEvent) => {\n onKeyPressProp?.(e);\n if (e.isDefaultPrevented()) return;\n\n if (Platform.OS !== \"web\") return;\n if (submitMode !== \"enter\") return;\n\n const nativeEvent =\n e.nativeEvent as TextInputKeyPressEvent[\"nativeEvent\"] & {\n shiftKey?: boolean;\n isComposing?: boolean;\n keyCode?: number;\n };\n // react-native-web forwards the raw DOM keydown before its own composition guard, so re-check it here (mirrors isEventComposing)\n if (nativeEvent.isComposing || nativeEvent.keyCode === 229) return;\n if (nativeEvent.key === \"Enter\" && !nativeEvent.shiftKey) {\n const threadState = aui.thread.getState();\n if (threadState.isRunning && !threadState.capabilities.queue) return;\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={onKey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AAO;GAE1B,MAAAsD,cACEF,EAACE;GAMH,IAAIA,YAAWE,eAAgBF,YAAWG,YAAa,KAAG;GAC1D,IAAIH,YAAWI,QAAS,WAApB,CAAgCJ,YAAWC,UAAS;IACtD,MAAAI,cAAoBrB,IAAGsB,OAAOC,SAAU;IACxC,IAAIF,YAAWG,aAAX,CAA0BH,YAAWI,aAAaC,OAAM;IAC5D,EAAsBE,iBAAmB;IACzC5B,IAAGM,SAASuB,KAAM;GAAC;EACpB;EACFrC,EAAA,MAAAQ;EAAAR,EAAA,MAAAG;EAAAH,EAAA,MAAA9B;EAAA8B,EAAA,MAAAqB;CAAA,OAAAA,KAAArB,EAAA;CAtBH,MAAAM,aAAmBe;CAgCA,MAAAiB,KAAApC,kBAAkB9C,SAAQ+B,OAAQ,QAAhB,IAAAoB,KAAAA;CAAsC,IAAAgC;CAAA,IAAAvC,EAAA,QAAAgB,gBAAAhB,EAAA,QAAAM,cAAAN,EAAA,QAAAI,SAAAJ,EAAA,QAAAjB,SAAAiB,EAAA,QAAAsC,MAAAtC,EAAA,QAAAS,MAAA;EALzE8B,KAAA,oBAAC,WAAD;GACO5B,KAAAA;GACEF,OAAAA;GACOO;GACFV;GACG,eAAAgC;GACRvD;GAAK,GACRqB;EAAK,CAAA;EACTJ,EAAA,MAAAgB;EAAAhB,EAAA,MAAAM;EAAAN,EAAA,MAAAI;EAAAJ,EAAA,MAAAjB;EAAAiB,EAAA,MAAAsC;EAAAtC,EAAA,MAAAS;EAAAT,EAAA,MAAAuC;CAAA,OAAAA,KAAAvC,EAAA;CAAA,OARFuC;AAQE;AAlEuB,SAAA7B,MAAA8B,GAAA;CAAA,OAQKA,EAAC1B,SAASL;AAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerQuote.js","names":["ReactNode","View","ViewProps","useAuiState","ComposerQuoteProps","children","ComposerQuote","t0","$","_c","viewProps","hasQuote","_temp","t1","s","composer","quote","undefined"],"sources":["../../../src/primitives/composer/ComposerQuote.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type ComposerQuoteProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ComposerQuote = ({\n children,\n ...viewProps\n}: ComposerQuoteProps) => {\n const hasQuote = useAuiState((s) => s.composer.quote !== undefined);\n if (!hasQuote) return null;\n\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ComposerQuote.js","names":["ReactNode","View","ViewProps","useAuiState","ComposerQuoteProps","children","ComposerQuote","t0","$","_c","viewProps","hasQuote","_temp","t1","s","composer","quote","undefined"],"sources":["../../../src/primitives/composer/ComposerQuote.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type ComposerQuoteProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ComposerQuote = ({\n children,\n ...viewProps\n}: ComposerQuoteProps) => {\n const hasQuote = useAuiState((s) => s.composer.quote !== undefined);\n if (!hasQuote) return null;\n\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAEnB,IAAI,CADaL,YAAYS,KACxBD,GAAQ,OAAS;CAAK,IAAAE;CAAA,IAAAL,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EAEpBG,KAAA,oBAAC,MAAD;GAAK,GAAKH;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAAtCK;AAAsC;AAPlB,SAAAD,MAAAE,GAAA;CAAA,OAISA,EAACC,SAASC,UAAWC,KAAAA;AAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerQuoteDismiss.js","names":["useCallback","Pressable","PressableProps","useAui","ComposerQuoteDismissProps","Omit","children","ComposerQuoteDismiss","t0","$","_c","pressableProps","aui","t1","composer","setQuote","undefined","handleDismiss","t2"],"sources":["../../../src/primitives/composer/ComposerQuoteDismiss.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type ComposerQuoteDismissProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ComposerQuoteDismiss = ({\n children,\n ...pressableProps\n}: ComposerQuoteDismissProps) => {\n const aui = useAui();\n\n const handleDismiss = useCallback(() => {\n aui.composer.setQuote(undefined);\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleDismiss}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaO,wBAAuBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ComposerQuoteDismiss.js","names":["useCallback","Pressable","PressableProps","useAui","ComposerQuoteDismissProps","Omit","children","ComposerQuoteDismiss","t0","$","_c","pressableProps","aui","t1","composer","setQuote","undefined","handleDismiss","t2"],"sources":["../../../src/primitives/composer/ComposerQuoteDismiss.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type ComposerQuoteDismissProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ComposerQuoteDismiss = ({\n children,\n ...pressableProps\n}: ComposerQuoteDismissProps) => {\n const aui = useAui();\n\n const handleDismiss = useCallback(() => {\n aui.composer.setQuote(undefined);\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleDismiss}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaO,wBAAuBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CAC1B,MAAAG,MAAYT,OAAO;CAAE,IAAAU;CAAA,IAAAJ,EAAA,OAAAG,IAAAE,UAAA;EAEaD,WAAA;GAChCD,IAAGE,SAASC,SAAUC,KAAAA,CAAS;EAAC;EACjCP,EAAA,KAAAG,IAAAE;EAAAL,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAFD,MAAAQ,gBAAsBJ;CAEZ,IAAAK;CAAA,IAAAT,EAAA,OAAAH,YAAAG,EAAA,OAAAQ,iBAAAR,EAAA,OAAAE,gBAAA;EAGRO,KAAA,oBAAC,WAAD;GACWD,SAAAA;GACS,mBAAA;GAAQ,GACtBN;GAEHL;EALO,CAAA;EAMEG,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;EAAAR,EAAA,KAAAE;EAAAF,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OANZS;AAMY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerQuoteText.js","names":["ReactNode","Text","TextProps","useAuiState","ComposerQuoteTextProps","children","ComposerQuoteText","t0","$","_c","textProps","text","_temp","undefined","t1","t2","s","composer","quote"],"sources":["../../../src/primitives/composer/ComposerQuoteText.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type ComposerQuoteTextProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const ComposerQuoteText = ({\n children,\n ...textProps\n}: ComposerQuoteTextProps) => {\n const text = useAuiState((s) => s.composer.quote?.text);\n if (text === undefined) return null;\n\n return <Text {...textProps}>{children ?? text}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,qBAAoBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ComposerQuoteText.js","names":["ReactNode","Text","TextProps","useAuiState","ComposerQuoteTextProps","children","ComposerQuoteText","t0","$","_c","textProps","text","_temp","undefined","t1","t2","s","composer","quote"],"sources":["../../../src/primitives/composer/ComposerQuoteText.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type ComposerQuoteTextProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const ComposerQuoteText = ({\n children,\n ...textProps\n}: ComposerQuoteTextProps) => {\n const text = useAuiState((s) => s.composer.quote?.text);\n if (text === undefined) return null;\n\n return <Text {...textProps}>{children ?? text}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,qBAAoBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CACvB,MAAAG,OAAaR,YAAYS,KAA6B;CACtD,IAAID,SAASE,KAAAA,GAAS,OAAS;CAEF,MAAAC,KAAAT,YAAAM;CAAgB,IAAAI;CAAA,IAAAP,EAAA,OAAAM,MAAAN,EAAA,OAAAE,WAAA;EAAtCK,KAAA,oBAAC,MAAD;GAAK,GAAKL;GAAYI,UAAAA;EAAjB,CAAA;EAAyCN,EAAA,KAAAM;EAAAN,EAAA,KAAAE;EAAAF,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAA9CO;AAA8C;AAPtB,SAAAH,MAAAI,GAAA;CAAA,OAICA,EAACC,SAASC,OAAYP;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerRoot.js","names":["ReactNode","View","ViewProps","ComposerRootProps","children","ComposerRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/composer/ComposerRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ComposerRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ComposerRoot = ({ children, ...viewProps }: ComposerRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,gBAAeC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ComposerRoot.js","names":["ReactNode","View","ViewProps","ComposerRootProps","children","ComposerRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/composer/ComposerRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ComposerRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ComposerRoot = ({ children, ...viewProps }: ComposerRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,gBAAeC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAA6CC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EACjEC,KAAA,oBAAC,MAAD;GAAK,GAAKD;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAtCG;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerSend.js","names":["Pressable","PressableProps","useComposerSend","ComposerSendProps","Omit","children","ComposerSend","t0","$","_c","disabled","pressableProps","send","hookDisabled","t1","t2","t3"],"sources":["../../../src/primitives/composer/ComposerSend.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerSend } from \"@assistant-ui/core/react\";\n\nexport type ComposerSendProps = Omit<PressableProps, \"onPress\" | \"children\"> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ComposerSend = ({\n children,\n disabled,\n ...pressableProps\n}: ComposerSendProps) => {\n const { send, disabled: hookDisabled } = useComposerSend();\n\n return (\n <Pressable\n onPress={() => send()}\n disabled={disabled ?? hookDisabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAOA,MAAaM,gBAAeC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAK,
|
|
1
|
+
{"version":3,"file":"ComposerSend.js","names":["Pressable","PressableProps","useComposerSend","ComposerSendProps","Omit","children","ComposerSend","t0","$","_c","disabled","pressableProps","send","hookDisabled","t1","t2","t3"],"sources":["../../../src/primitives/composer/ComposerSend.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useComposerSend } from \"@assistant-ui/core/react\";\n\nexport type ComposerSendProps = Omit<PressableProps, \"onPress\" | \"children\"> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ComposerSend = ({\n children,\n disabled,\n ...pressableProps\n}: ComposerSendProps) => {\n const { send, disabled: hookDisabled } = useComposerSend();\n\n return (\n <Pressable\n onPress={() => send()}\n disabled={disabled ?? hookDisabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAOA,MAAaM,gBAAeC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAC;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAAK,UAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAA;EAAAN,WAAAG,EAAA;EAAAE,WAAAF,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CAClB,MAAA,EAAAI,MAAAF,UAAAG,iBAAyCX,gBAAgB;CAAE,IAAAY;CAAA,IAAAN,EAAA,OAAAI,MAAA;EAI9CE,WAAMF,KAAK;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CACX,MAAAO,KAAAL,YAAAG;CAAwB,IAAAG;CAAA,IAAAR,EAAA,OAAAH,YAAAG,EAAA,OAAAG,kBAAAH,EAAA,OAAAM,MAAAN,EAAA,OAAAO,IAAA;EAFpCC,KAAA,oBAAC,WAAD;GACW,SAAAF;GACC,UAAAC;GACQ,mBAAA;GAAQ,GACtBJ;GAEHN;EANO,CAAA;EAOEG,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAPZQ;AAOY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorMessage.js","names":["ReactNode","Text","TextProps","useMessageError","ErrorMessageProps","children","ErrorMessage","t0","$","_c","textProps","error","undefined","t1","String","t2","displayName"],"sources":["../../../src/primitives/error/ErrorMessage.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useMessageError } from \"@assistant-ui/core/react\";\n\nexport type ErrorMessageProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const ErrorMessage = ({ children, ...textProps }: ErrorMessageProps) => {\n const error = useMessageError();\n\n if (error === undefined) return null;\n\n return <Text {...textProps}>{children ?? String(error)}</Text>;\n};\n\nErrorMessage.displayName = \"ErrorPrimitive.Message\";\n"],"mappings":";;;;;AAQA,MAAaM,gBAAeC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ErrorMessage.js","names":["ReactNode","Text","TextProps","useMessageError","ErrorMessageProps","children","ErrorMessage","t0","$","_c","textProps","error","undefined","t1","String","t2","displayName"],"sources":["../../../src/primitives/error/ErrorMessage.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useMessageError } from \"@assistant-ui/core/react\";\n\nexport type ErrorMessageProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const ErrorMessage = ({ children, ...textProps }: ErrorMessageProps) => {\n const error = useMessageError();\n\n if (error === undefined) return null;\n\n return <Text {...textProps}>{children ?? String(error)}</Text>;\n};\n\nErrorMessage.displayName = \"ErrorPrimitive.Message\";\n"],"mappings":";;;;;AAQA,MAAaM,gBAAeC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAA6CC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CACxE,MAAAG,QAAcR,gBAAgB;CAE9B,IAAIQ,UAAUC,KAAAA,GAAS,OAAS;CAEH,MAAAC,KAAAR,YAAYS,OAAOH,KAAK;CAAC,IAAAI;CAAA,IAAAP,EAAA,OAAAK,MAAAL,EAAA,OAAAE,WAAA;EAA/CK,KAAA,oBAAC,MAAD;GAAK,GAAKL;GAAYG,UAAAA;EAAjB,CAAA;EAAkDL,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAAvDO;AAAuD;AAGhET,aAAaU,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorRoot.js","names":["ReactNode","View","ViewProps","useMessageError","ErrorRootProps","children","ErrorRoot","t0","$","_c","viewProps","error","undefined","t1","displayName"],"sources":["../../../src/primitives/error/ErrorRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\nimport { useMessageError } from \"@assistant-ui/core/react\";\n\nexport type ErrorRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ErrorRoot = ({ children, ...viewProps }: ErrorRootProps) => {\n const error = useMessageError();\n if (error === undefined) return null;\n\n return <View {...viewProps}>{children}</View>;\n};\n\nErrorRoot.displayName = \"ErrorPrimitive.Root\";\n"],"mappings":";;;;;AAQA,MAAaM,aAAYC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ErrorRoot.js","names":["ReactNode","View","ViewProps","useMessageError","ErrorRootProps","children","ErrorRoot","t0","$","_c","viewProps","error","undefined","t1","displayName"],"sources":["../../../src/primitives/error/ErrorRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\nimport { useMessageError } from \"@assistant-ui/core/react\";\n\nexport type ErrorRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ErrorRoot = ({ children, ...viewProps }: ErrorRootProps) => {\n const error = useMessageError();\n if (error === undefined) return null;\n\n return <View {...viewProps}>{children}</View>;\n};\n\nErrorRoot.displayName = \"ErrorPrimitive.Root\";\n"],"mappings":";;;;;AAQA,MAAaM,aAAYC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAA0CC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAElE,IADcL,gBACVQ,MAAUC,KAAAA,GAAS,OAAS;CAAK,IAAAC;CAAA,IAAAL,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EAE9BG,KAAA,oBAAC,MAAD;GAAK,GAAKH;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAAtCK;AAAsC;AAG/CP,UAAUQ,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageParts.js","names":["FC","Text","MessagePrimitiveParts","MessagePrimitivePartsBase","MessagePartComponent","MessagePartComponentBase","MessagePrimitivePartByIndex","MessagePrimitivePartByIndexBase","messagePartsDefaultComponents","rnDefaultComponents","text","Props","props","$","_c","t0","children","components","rest","Image","Reasoning","Source","File","Unstable_Audio","ChainOfThought","tools","data","ToolGroup","ReasoningGroup","Empty","Quote","merged","t1","t2","displayName"],"sources":["../../../src/primitives/message/MessageParts.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text } from \"react-native\";\nimport {\n MessagePrimitiveParts as MessagePrimitivePartsBase,\n MessagePartComponent as MessagePartComponentBase,\n MessagePrimitivePartByIndex as MessagePrimitivePartByIndexBase,\n messagePartsDefaultComponents,\n} from \"@assistant-ui/core/react\";\n\nconst rnDefaultComponents = {\n ...messagePartsDefaultComponents,\n Text: ({ text }: { text: string }) => <Text>{text}</Text>,\n} satisfies MessagePrimitiveParts.Props[\"components\"];\n\nexport namespace MessagePrimitiveParts {\n export type Props = MessagePrimitivePartsBase.Props;\n}\n\n/**\n * Renders the parts of a message with React Native-specific default components.\n */\nexport const MessagePrimitiveParts: FC<MessagePrimitiveParts.Props> = (\n props,\n) => {\n if (\"children\" in props) {\n return (\n <MessagePrimitivePartsBase>{props.children}</MessagePrimitivePartsBase>\n );\n }\n\n const { components, ...rest } = props;\n const merged = components\n ? {\n Text: components.Text ?? rnDefaultComponents.Text,\n Image: components.Image ?? messagePartsDefaultComponents.Image,\n Reasoning:\n components.Reasoning ?? messagePartsDefaultComponents.Reasoning,\n Source: components.Source ?? messagePartsDefaultComponents.Source,\n File: components.File ?? messagePartsDefaultComponents.File,\n Unstable_Audio:\n components.Unstable_Audio ??\n messagePartsDefaultComponents.Unstable_Audio,\n ...(\"ChainOfThought\" in components\n ? { ChainOfThought: components.ChainOfThought }\n : {\n tools: components.tools,\n data: components.data,\n ToolGroup:\n components.ToolGroup ?? messagePartsDefaultComponents.ToolGroup,\n ReasoningGroup:\n components.ReasoningGroup ??\n messagePartsDefaultComponents.ReasoningGroup,\n }),\n Empty: components.Empty,\n Quote: components.Quote,\n }\n : rnDefaultComponents;\n\n return <MessagePrimitivePartsBase components={merged as any} {...rest} />;\n};\n\nMessagePrimitiveParts.displayName = \"MessagePrimitive.Parts\";\n\nexport {\n MessagePartComponentBase as MessagePartComponent,\n MessagePrimitivePartByIndexBase as MessagePrimitivePartByIndex,\n};\n"],"mappings":";;;;;AASA,MAAMS,sBAAsB;CAC1B,GAAGD;CACHP,OAAO,EAAES,WAA6B,oBAAC,MAAD,EAAA,UAAOA,KAAW,CAAA;AAC1D;;;;AASA,MAAaR,yBAAyDU,UAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAGpE,IAAI,cAAcF,OAAK;EAAA,IAAAG;EAAA,IAAAF,EAAA,OAAAD,MAAAI,UAAA;GAEnBD,KAAA,oBAAC,yBAAD,EAAA,UAA4BH,MAAKI,SAAP,CAAA;GAA6CH,EAAA,KAAAD,MAAAI;GAAAH,EAAA,KAAAE;EAAA,OAAAA,KAAAF,EAAA;EAAA,OAAvEE;CAAuE;CAE1E,IAAAE;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAD,OAAA;EAED,CAAA,CAAAK,
|
|
1
|
+
{"version":3,"file":"MessageParts.js","names":["FC","Text","MessagePrimitiveParts","MessagePrimitivePartsBase","MessagePartComponent","MessagePartComponentBase","MessagePrimitivePartByIndex","MessagePrimitivePartByIndexBase","messagePartsDefaultComponents","rnDefaultComponents","text","Props","props","$","_c","t0","children","components","rest","Image","Reasoning","Source","File","Unstable_Audio","ChainOfThought","tools","data","ToolGroup","ReasoningGroup","Empty","Quote","merged","t1","t2","displayName"],"sources":["../../../src/primitives/message/MessageParts.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { Text } from \"react-native\";\nimport {\n MessagePrimitiveParts as MessagePrimitivePartsBase,\n MessagePartComponent as MessagePartComponentBase,\n MessagePrimitivePartByIndex as MessagePrimitivePartByIndexBase,\n messagePartsDefaultComponents,\n} from \"@assistant-ui/core/react\";\n\nconst rnDefaultComponents = {\n ...messagePartsDefaultComponents,\n Text: ({ text }: { text: string }) => <Text>{text}</Text>,\n} satisfies MessagePrimitiveParts.Props[\"components\"];\n\nexport namespace MessagePrimitiveParts {\n export type Props = MessagePrimitivePartsBase.Props;\n}\n\n/**\n * Renders the parts of a message with React Native-specific default components.\n */\nexport const MessagePrimitiveParts: FC<MessagePrimitiveParts.Props> = (\n props,\n) => {\n if (\"children\" in props) {\n return (\n <MessagePrimitivePartsBase>{props.children}</MessagePrimitivePartsBase>\n );\n }\n\n const { components, ...rest } = props;\n const merged = components\n ? {\n Text: components.Text ?? rnDefaultComponents.Text,\n Image: components.Image ?? messagePartsDefaultComponents.Image,\n Reasoning:\n components.Reasoning ?? messagePartsDefaultComponents.Reasoning,\n Source: components.Source ?? messagePartsDefaultComponents.Source,\n File: components.File ?? messagePartsDefaultComponents.File,\n Unstable_Audio:\n components.Unstable_Audio ??\n messagePartsDefaultComponents.Unstable_Audio,\n ...(\"ChainOfThought\" in components\n ? { ChainOfThought: components.ChainOfThought }\n : {\n tools: components.tools,\n data: components.data,\n ToolGroup:\n components.ToolGroup ?? messagePartsDefaultComponents.ToolGroup,\n ReasoningGroup:\n components.ReasoningGroup ??\n messagePartsDefaultComponents.ReasoningGroup,\n }),\n Empty: components.Empty,\n Quote: components.Quote,\n }\n : rnDefaultComponents;\n\n return <MessagePrimitivePartsBase components={merged as any} {...rest} />;\n};\n\nMessagePrimitiveParts.displayName = \"MessagePrimitive.Parts\";\n\nexport {\n MessagePartComponentBase as MessagePartComponent,\n MessagePrimitivePartByIndexBase as MessagePrimitivePartByIndex,\n};\n"],"mappings":";;;;;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AAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAEuB,MAAAmB,KAAAD;CAAa,IAAAE;CAAA,IAAApB,EAAA,OAAAK,QAAAL,EAAA,OAAAmB,IAAA;EAApDC,KAAA,oBAAC,yBAAD;GAAuC,YAAAD;GAAa,GAAMd;EAAI,CAAA;EAAIL,EAAA,KAAAK;EAAAL,EAAA,KAAAmB;EAAAnB,EAAA,KAAAoB;CAAA,OAAAA,KAAApB,EAAA;CAAA,OAAlEoB;AAAkE;AAG3E/B,sBAAsBgC,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageRoot.js","names":["ReactNode","View","ViewProps","MessageRootProps","children","MessageRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/message/MessageRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type MessageRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const MessageRoot = ({ children, ...viewProps }: MessageRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,eAAcC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"MessageRoot.js","names":["ReactNode","View","ViewProps","MessageRootProps","children","MessageRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/message/MessageRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type MessageRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const MessageRoot = ({ children, ...viewProps }: MessageRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,eAAcC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAA4CC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EAC/DC,KAAA,oBAAC,MAAD;GAAK,GAAKD;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAtCG;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueItemRemove.js","names":["useCallback","Pressable","PressableProps","useAui","QueueItemRemoveProps","Omit","children","QueueItemRemove","t0","$","_c","pressableProps","aui","t1","queueItem","remove","handleRemove","t2"],"sources":["../../../src/primitives/queueItem/QueueItemRemove.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type QueueItemRemoveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const QueueItemRemove = ({\n children,\n ...pressableProps\n}: QueueItemRemoveProps) => {\n const aui = useAui();\n\n const handleRemove = useCallback(() => {\n aui.queueItem.remove();\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleRemove}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaO,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"QueueItemRemove.js","names":["useCallback","Pressable","PressableProps","useAui","QueueItemRemoveProps","Omit","children","QueueItemRemove","t0","$","_c","pressableProps","aui","t1","queueItem","remove","handleRemove","t2"],"sources":["../../../src/primitives/queueItem/QueueItemRemove.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type QueueItemRemoveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const QueueItemRemove = ({\n children,\n ...pressableProps\n}: QueueItemRemoveProps) => {\n const aui = useAui();\n\n const handleRemove = useCallback(() => {\n aui.queueItem.remove();\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleRemove}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaO,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CACrB,MAAAG,MAAYT,OAAO;CAAE,IAAAU;CAAA,IAAAJ,EAAA,OAAAG,IAAAE,WAAA;EAEYD,WAAA;GAC/BD,IAAGE,UAAUC,OAAQ;EAAC;EACvBN,EAAA,KAAAG,IAAAE;EAAAL,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAFD,MAAAO,eAAqBH;CAEX,IAAAI;CAAA,IAAAR,EAAA,OAAAH,YAAAG,EAAA,OAAAO,gBAAAP,EAAA,OAAAE,gBAAA;EAGRM,KAAA,oBAAC,WAAD;GACWD,SAAAA;GACS,mBAAA;GAAQ,GACtBL;GAEHL;EALO,CAAA;EAMEG,EAAA,KAAAH;EAAAG,EAAA,KAAAO;EAAAP,EAAA,KAAAE;EAAAF,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANZQ;AAMY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueItemSteer.js","names":["useCallback","Pressable","PressableProps","useAui","QueueItemSteerProps","Omit","children","QueueItemSteer","t0","$","_c","pressableProps","aui","t1","queueItem","steer","handleSteer","t2"],"sources":["../../../src/primitives/queueItem/QueueItemSteer.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type QueueItemSteerProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const QueueItemSteer = ({\n children,\n ...pressableProps\n}: QueueItemSteerProps) => {\n const aui = useAui();\n\n const handleSteer = useCallback(() => {\n aui.queueItem.steer();\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleSteer}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaO,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"QueueItemSteer.js","names":["useCallback","Pressable","PressableProps","useAui","QueueItemSteerProps","Omit","children","QueueItemSteer","t0","$","_c","pressableProps","aui","t1","queueItem","steer","handleSteer","t2"],"sources":["../../../src/primitives/queueItem/QueueItemSteer.tsx"],"sourcesContent":["import { useCallback } from \"react\";\nimport { Pressable, type PressableProps } from \"react-native\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport type QueueItemSteerProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const QueueItemSteer = ({\n children,\n ...pressableProps\n}: QueueItemSteerProps) => {\n const aui = useAui();\n\n const handleSteer = useCallback(() => {\n aui.queueItem.steer();\n }, [aui]);\n\n return (\n <Pressable\n onPress={handleSteer}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAWA,MAAaO,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CACpB,MAAAG,MAAYT,OAAO;CAAE,IAAAU;CAAA,IAAAJ,EAAA,OAAAG,IAAAE,WAAA;EAEWD,WAAA;GAC9BD,IAAGE,UAAUC,MAAO;EAAC;EACtBN,EAAA,KAAAG,IAAAE;EAAAL,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAFD,MAAAO,cAAoBH;CAEV,IAAAI;CAAA,IAAAR,EAAA,OAAAH,YAAAG,EAAA,OAAAO,eAAAP,EAAA,OAAAE,gBAAA;EAGRM,KAAA,oBAAC,WAAD;GACWD,SAAAA;GACS,mBAAA;GAAQ,GACtBL;GAEHL;EALO,CAAA;EAMEG,EAAA,KAAAH;EAAAG,EAAA,KAAAO;EAAAP,EAAA,KAAAE;EAAAF,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANZQ;AAMY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueItemText.js","names":["ReactNode","Text","TextProps","useAuiState","QueueItemTextProps","children","QueueItemText","t0","$","_c","textProps","text","_temp3","t1","t2","_temp","part","type","_temp2","part_0","s","queueItem","parts","filter","map","join"],"sources":["../../../src/primitives/queueItem/QueueItemText.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type QueueItemTextProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const QueueItemText = ({\n children,\n ...textProps\n}: QueueItemTextProps) => {\n const text = useAuiState((s) =>\n // hosts on the pre-parts adapter shape may omit the field at runtime\n (s.queueItem.parts ?? [])\n .filter((part) => part.type === \"text\")\n .map((part) => part.text)\n .join(\"\\n\\n\"),\n );\n\n return <Text {...textProps}>{children ?? text}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"QueueItemText.js","names":["ReactNode","Text","TextProps","useAuiState","QueueItemTextProps","children","QueueItemText","t0","$","_c","textProps","text","_temp3","t1","t2","_temp","part","type","_temp2","part_0","s","queueItem","parts","filter","map","join"],"sources":["../../../src/primitives/queueItem/QueueItemText.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type QueueItemTextProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const QueueItemText = ({\n children,\n ...textProps\n}: QueueItemTextProps) => {\n const text = useAuiState((s) =>\n // hosts on the pre-parts adapter shape may omit the field at runtime\n (s.queueItem.parts ?? [])\n .filter((part) => part.type === \"text\")\n .map((part) => part.text)\n .join(\"\\n\\n\"),\n );\n\n return <Text {...textProps}>{children ?? text}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CACnB,MAAAG,OAAaR,YAAYS,MAMzB;CAE6B,MAAAC,KAAAR,YAAAM;CAAgB,IAAAG;CAAA,IAAAN,EAAA,OAAAK,MAAAL,EAAA,OAAAE,WAAA;EAAtCI,KAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAYG,UAAAA;EAAjB,CAAA;EAAyCL,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAA9CM;AAA8C;AAZ1B,SAAAC,MAAAC,MAAA;CAAA,OAOLA,KAAIC,SAAU;AAAM;AAPf,SAAAC,OAAAC,QAAA;CAAA,OAQRH,OAAIL;AAAK;AARD,SAAAC,OAAAQ,GAAA;CAAA,QAMxBA,EAACC,UAAUC,SAAX,CAAA,EAAA,CAAuBC,OACdR,KAA8B,CAAC,CAAAS,IAClCN,MAAmB,CAAC,CAAAO,KACnB,MAAM;AAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionDescription.js","names":["ReactNode","Text","TextProps","useAuiState","SuggestionDescriptionProps","children","SuggestionDescription","t0","$","_c","textProps","label","_temp","t1","t2","s","suggestion"],"sources":["../../../src/primitives/suggestion/SuggestionDescription.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type SuggestionDescriptionProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const SuggestionDescription = ({\n children,\n ...textProps\n}: SuggestionDescriptionProps) => {\n const label = useAuiState((s) => s.suggestion.label);\n\n return <Text {...textProps}>{children ?? label}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"SuggestionDescription.js","names":["ReactNode","Text","TextProps","useAuiState","SuggestionDescriptionProps","children","SuggestionDescription","t0","$","_c","textProps","label","_temp","t1","t2","s","suggestion"],"sources":["../../../src/primitives/suggestion/SuggestionDescription.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type SuggestionDescriptionProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const SuggestionDescription = ({\n children,\n ...textProps\n}: SuggestionDescriptionProps) => {\n const label = useAuiState((s) => s.suggestion.label);\n\n return <Text {...textProps}>{children ?? label}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAC3B,MAAAG,QAAcR,YAAYS,KAAyB;CAEtB,MAAAC,KAAAR,YAAAM;CAAiB,IAAAG;CAAA,IAAAN,EAAA,OAAAK,MAAAL,EAAA,OAAAE,WAAA;EAAvCI,KAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAYG,UAAAA;EAAjB,CAAA;EAA0CL,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAA/CM;AAA+C;AANnB,SAAAF,MAAAG,GAAA;CAAA,OAIFA,EAACC,WAAWL;AAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionTitle.js","names":["ReactNode","Text","TextProps","useAuiState","SuggestionTitleProps","children","SuggestionTitle","t0","$","_c","textProps","title","_temp","t1","t2","s","suggestion"],"sources":["../../../src/primitives/suggestion/SuggestionTitle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type SuggestionTitleProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const SuggestionTitle = ({\n children,\n ...textProps\n}: SuggestionTitleProps) => {\n const title = useAuiState((s) => s.suggestion.title);\n\n return <Text {...textProps}>{children ?? title}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"SuggestionTitle.js","names":["ReactNode","Text","TextProps","useAuiState","SuggestionTitleProps","children","SuggestionTitle","t0","$","_c","textProps","title","_temp","t1","t2","s","suggestion"],"sources":["../../../src/primitives/suggestion/SuggestionTitle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Text, type TextProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport type SuggestionTitleProps = TextProps & {\n children?: ReactNode;\n};\n\nexport const SuggestionTitle = ({\n children,\n ...textProps\n}: SuggestionTitleProps) => {\n const title = useAuiState((s) => s.suggestion.title);\n\n return <Text {...textProps}>{children ?? title}</Text>;\n};\n"],"mappings":";;;;;AAQA,MAAaM,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CACrB,MAAAG,QAAcR,YAAYS,KAAyB;CAEtB,MAAAC,KAAAR,YAAAM;CAAiB,IAAAG;CAAA,IAAAN,EAAA,OAAAK,MAAAL,EAAA,OAAAE,WAAA;EAAvCI,KAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAYG,UAAAA;EAAjB,CAAA;EAA0CL,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAA/CM;AAA+C;AANzB,SAAAF,MAAAG,GAAA;CAAA,OAIIA,EAACC,WAAWL;AAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuggestionTrigger.js","names":["Pressable","PressableProps","useAuiState","useSuggestionTrigger","SuggestionTriggerProps","Omit","children","send","clearComposer","SuggestionTrigger","t0","$","_c","disabledProp","pressableProps","t1","disabled","undefined","prompt","_temp","t2","trigger","t3","t4","s","suggestion"],"sources":["../../../src/primitives/suggestion/SuggestionTrigger.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { useSuggestionTrigger } from \"@assistant-ui/core/react\";\n\nexport type SuggestionTriggerProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n /**\n * When true, automatically sends the message.\n * When false, replaces or appends the composer text with the suggestion.\n */\n send?: boolean | undefined;\n /**\n * Whether to clear the composer. When send is false, determines if composer\n * text is replaced (true) or appended (false).\n * @default true\n */\n clearComposer?: boolean | undefined;\n};\n\nexport const SuggestionTrigger = ({\n children,\n send,\n clearComposer = true,\n disabled: disabledProp,\n ...pressableProps\n}: SuggestionTriggerProps) => {\n const prompt = useAuiState((s) => s.suggestion.prompt);\n const { trigger, disabled } = useSuggestionTrigger({\n prompt,\n send,\n clearComposer,\n });\n\n return (\n <Pressable\n onPress={trigger}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAsBA,MAAaS,qBAAoBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAQ;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAAC,MAAAC,eAAAO,IAAAC,UAAAH,
|
|
1
|
+
{"version":3,"file":"SuggestionTrigger.js","names":["Pressable","PressableProps","useAuiState","useSuggestionTrigger","SuggestionTriggerProps","Omit","children","send","clearComposer","SuggestionTrigger","t0","$","_c","disabledProp","pressableProps","t1","disabled","undefined","prompt","_temp","t2","trigger","t3","t4","s","suggestion"],"sources":["../../../src/primitives/suggestion/SuggestionTrigger.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { useSuggestionTrigger } from \"@assistant-ui/core/react\";\n\nexport type SuggestionTriggerProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n /**\n * When true, automatically sends the message.\n * When false, replaces or appends the composer text with the suggestion.\n */\n send?: boolean | undefined;\n /**\n * Whether to clear the composer. When send is false, determines if composer\n * text is replaced (true) or appended (false).\n * @default true\n */\n clearComposer?: boolean | undefined;\n};\n\nexport const SuggestionTrigger = ({\n children,\n send,\n clearComposer = true,\n disabled: disabledProp,\n ...pressableProps\n}: SuggestionTriggerProps) => {\n const prompt = useAuiState((s) => s.suggestion.prompt);\n const { trigger, disabled } = useSuggestionTrigger({\n prompt,\n send,\n clearComposer,\n });\n\n return (\n <Pressable\n onPress={trigger}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAsBA,MAAaS,qBAAoBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAC;CA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@@
|
|
|
1
|
-
{"version":3,"file":"ThreadMessages.js","names":["ComponentType","FC","ForwardedRef","ReactNode","RefObject","forwardRef","memo","useCallback","useEffect","useRef","FlatList","FlatListProps","LayoutChangeEvent","NativeScrollEvent","NativeSyntheticEvent","MessageState","ThreadMessage","RenderChildrenWithAccessor","useAuiEvent","useAuiState","MessageByIndexProvider","MessageComponents","Message","EditComposer","UserEditComposer","AssistantEditComposer","SystemEditComposer","UserMessage","AssistantMessage","SystemMessage","MessagesContent","components","children","value","message","ThreadMessagesFlatListProps","Omit","autoScroll","scrollToBottomOnRunStart","scrollToBottomOnInitialize","scrollToBottomOnThreadSwitch","ThreadMessagesProps","DEFAULT_SYSTEM_MESSAGE","AT_BOTTOM_THRESHOLD","getComponent","role","isEditing","_exhaustiveCheck","Error","ThreadMessageComponent","t0","$","_c","_temp","_temp2","t1","Component","t2","ThreadMessageByIndex","index","prev","next","displayName","ThreadMessageByChildren","aui","thread","getState","getItem","setForwardedRef","ref","T","current","useComposedFlatListRef","forwardedRef","flatListRef","node","setFlatListRef","const","useThreadMessagesFlatListAutoScroll","hasMessages","t3","t4","undefined","t5","Symbol","for","contentHeight","viewportHeight","scrollY","metricsRef","isAtBottomRef","lastScrollEventYRef","initializeScrollRequestedRef","pendingScrollToBottomRef","t6","updateIsAtBottom","t7","animated","contentHeight_0","viewportHeight_0","Math","max","scrollToEnd","scrollToBottom","t8","event","wasAtBottom","previousViewportHeight","viewportHeight_1","nativeEvent","layout","height","pending","handleLayout","t9","event_0","contentOffset","contentSize","layoutMeasurement","previousEventY","wasPinnedToBottom","y","upwardMove","handleScroll","t10","_width","metrics","previousContentHeight","wasAtBottom_0","pendingScroll","handleContentSizeChange","t11","t12","t13","t14","t15","ThreadMessagesFlatList","flatListProps","onContentSizeChange","onLayout","onScroll","scrollEventThrottle","messages","_temp3","length","handleAutoScrollContentSizeChange","handleAutoScrollLayout","handleAutoScrollScroll","renderItem","keyExtractor","_temp4","scrollTracking","width","ThreadMessages","props","s","s_0","composer","item","id"],"sources":["../../../src/primitives/thread/ThreadMessages.tsx"],"sourcesContent":["import {\n type ComponentType,\n type FC,\n type ForwardedRef,\n type ReactNode,\n type RefObject,\n forwardRef,\n memo,\n useCallback,\n useEffect,\n useRef,\n} from \"react\";\nimport {\n FlatList,\n type FlatListProps,\n type LayoutChangeEvent,\n type NativeScrollEvent,\n type NativeSyntheticEvent,\n} from \"react-native\";\nimport type { MessageState, ThreadMessage } from \"@assistant-ui/core\";\nimport {\n RenderChildrenWithAccessor,\n useAuiEvent,\n useAuiState,\n} from \"@assistant-ui/store\";\nimport { MessageByIndexProvider } from \"@assistant-ui/core/react\";\n\ntype MessageComponents =\n | {\n Message: ComponentType;\n EditComposer?: ComponentType | undefined;\n UserEditComposer?: ComponentType | undefined;\n AssistantEditComposer?: ComponentType | undefined;\n SystemEditComposer?: ComponentType | undefined;\n UserMessage?: ComponentType | undefined;\n AssistantMessage?: ComponentType | undefined;\n SystemMessage?: ComponentType | undefined;\n }\n | {\n Message?: ComponentType | undefined;\n EditComposer?: ComponentType | undefined;\n UserEditComposer?: ComponentType | undefined;\n AssistantEditComposer?: ComponentType | undefined;\n SystemEditComposer?: ComponentType | undefined;\n UserMessage: ComponentType;\n AssistantMessage: ComponentType;\n SystemMessage?: ComponentType | undefined;\n };\n\ntype MessagesContent =\n | {\n /** @deprecated Use the children render function instead. */\n components: MessageComponents;\n children?: never;\n }\n | {\n children: (value: { message: MessageState }) => ReactNode;\n components?: never;\n };\n\nexport type ThreadMessagesFlatListProps = Omit<\n FlatListProps<ThreadMessage>,\n \"data\" | \"renderItem\" | \"children\"\n> &\n MessagesContent & {\n autoScroll?: boolean | undefined;\n scrollToBottomOnRunStart?: boolean | undefined;\n scrollToBottomOnInitialize?: boolean | undefined;\n scrollToBottomOnThreadSwitch?: boolean | undefined;\n };\n\n/** @deprecated Use ThreadMessagesFlatListProps instead. */\nexport type ThreadMessagesProps = ThreadMessagesFlatListProps;\n\nconst DEFAULT_SYSTEM_MESSAGE = () => null;\nconst AT_BOTTOM_THRESHOLD = 4;\n\nconst getComponent = (\n components: MessageComponents,\n role: ThreadMessage[\"role\"],\n isEditing: boolean,\n) => {\n switch (role) {\n case \"user\":\n if (isEditing) {\n return (\n components.UserEditComposer ??\n components.EditComposer ??\n components.UserMessage ??\n (components.Message as ComponentType)\n );\n } else {\n return components.UserMessage ?? (components.Message as ComponentType);\n }\n case \"assistant\":\n if (isEditing) {\n return (\n components.AssistantEditComposer ??\n components.EditComposer ??\n components.AssistantMessage ??\n (components.Message as ComponentType)\n );\n } else {\n return (\n components.AssistantMessage ?? (components.Message as ComponentType)\n );\n }\n case \"system\":\n if (isEditing) {\n return (\n components.SystemEditComposer ??\n components.EditComposer ??\n components.SystemMessage ??\n (components.Message as ComponentType) ??\n DEFAULT_SYSTEM_MESSAGE\n );\n } else {\n return (\n components.SystemMessage ??\n (components.Message as ComponentType) ??\n DEFAULT_SYSTEM_MESSAGE\n );\n }\n default: {\n const _exhaustiveCheck: never = role;\n throw new Error(`Unknown message role: ${_exhaustiveCheck}`);\n }\n }\n};\n\nconst ThreadMessageComponent: FC<{ components: MessageComponents }> = ({\n components,\n}) => {\n const role = useAuiState((s) => s.message.role);\n const isEditing = useAuiState((s) => s.message.composer.isEditing);\n const Component = getComponent(components, role, isEditing);\n\n return <Component />;\n};\n\nconst ThreadMessageByIndex = memo(\n ({ index, components }: { index: number; components: MessageComponents }) => {\n return (\n <MessageByIndexProvider index={index}>\n <ThreadMessageComponent components={components} />\n </MessageByIndexProvider>\n );\n },\n (prev, next) =>\n prev.index === next.index && prev.components === next.components,\n);\nThreadMessageByIndex.displayName = \"ThreadPrimitive.MessageByIndex\";\n\nconst ThreadMessageByChildren = memo(\n ({\n index,\n children,\n }: {\n index: number;\n children: (value: { message: MessageState }) => ReactNode;\n }) => {\n return (\n <MessageByIndexProvider index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.thread.message({ index }).getState()}\n >\n {(getItem) =>\n children({\n get message() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </MessageByIndexProvider>\n );\n },\n (prev, next) => prev.index === next.index && prev.children === next.children,\n);\nThreadMessageByChildren.displayName = \"ThreadPrimitive.MessageByChildren\";\n\nconst setForwardedRef = <T,>(ref: ForwardedRef<T>, value: T | null) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nconst useComposedFlatListRef = (\n forwardedRef: ForwardedRef<FlatList<ThreadMessage>>,\n) => {\n const flatListRef = useRef<FlatList<ThreadMessage> | null>(null);\n\n const setFlatListRef = useCallback(\n (node: FlatList<ThreadMessage> | null) => {\n flatListRef.current = node;\n setForwardedRef(forwardedRef, node);\n },\n [forwardedRef],\n );\n\n return [flatListRef, setFlatListRef] as const;\n};\n\nconst useThreadMessagesFlatListAutoScroll = ({\n flatListRef,\n hasMessages,\n autoScroll = true,\n scrollToBottomOnRunStart = true,\n scrollToBottomOnInitialize = true,\n scrollToBottomOnThreadSwitch = true,\n}: {\n flatListRef: RefObject<FlatList<ThreadMessage> | null>;\n hasMessages: boolean;\n autoScroll?: boolean | undefined;\n scrollToBottomOnRunStart?: boolean | undefined;\n scrollToBottomOnInitialize?: boolean | undefined;\n scrollToBottomOnThreadSwitch?: boolean | undefined;\n}) => {\n const metricsRef = useRef({\n contentHeight: 0,\n viewportHeight: 0,\n scrollY: 0,\n });\n const isAtBottomRef = useRef(true);\n const lastScrollEventYRef = useRef(0);\n const initializeScrollRequestedRef = useRef(false);\n const pendingScrollToBottomRef = useRef<false | { animated: boolean }>(false);\n\n const updateIsAtBottom = useCallback(() => {\n const { contentHeight, scrollY, viewportHeight } = metricsRef.current;\n isAtBottomRef.current =\n contentHeight <= viewportHeight ||\n contentHeight - scrollY - viewportHeight <= AT_BOTTOM_THRESHOLD;\n }, []);\n\n // Commanding a scroll records the intended position immediately; the\n // native scroll echo is bridged and throttled, so waiting for it lets a\n // fast stream observe stale metrics and drop out of following.\n const scrollToBottom = useCallback(\n (animated: boolean) => {\n const { contentHeight, viewportHeight } = metricsRef.current;\n metricsRef.current.scrollY = Math.max(0, contentHeight - viewportHeight);\n isAtBottomRef.current = true;\n flatListRef.current?.scrollToEnd({ animated });\n },\n [flatListRef],\n );\n\n const handleLayout = useCallback(\n (event: LayoutChangeEvent) => {\n const wasAtBottom = isAtBottomRef.current;\n const previousViewportHeight = metricsRef.current.viewportHeight;\n const viewportHeight = event.nativeEvent.layout.height;\n metricsRef.current.viewportHeight = viewportHeight;\n updateIsAtBottom();\n if (!wasAtBottom) return;\n // Layout changes are never user gestures, so they must not unpin. Past\n // the first measurement, a viewport change while pinned re-commands the\n // bottom position, since no content-size event follows a bare keyboard\n // open or close.\n if (\n autoScroll &&\n previousViewportHeight !== 0 &&\n viewportHeight !== previousViewportHeight\n ) {\n const pending = pendingScrollToBottomRef.current;\n scrollToBottom(pending ? pending.animated : false);\n } else {\n isAtBottomRef.current = true;\n }\n },\n [autoScroll, scrollToBottom, updateIsAtBottom],\n );\n\n const handleScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n const { contentOffset, contentSize, layoutMeasurement } =\n event.nativeEvent;\n const previousEventY = lastScrollEventYRef.current;\n const wasPinnedToBottom = isAtBottomRef.current;\n lastScrollEventYRef.current = contentOffset.y;\n metricsRef.current = {\n contentHeight: contentSize.height,\n viewportHeight: layoutMeasurement.height,\n scrollY: contentOffset.y,\n };\n updateIsAtBottom();\n const upwardMove = contentOffset.y < previousEventY;\n // Only a deliberate upward move unpins or cancels a pending scroll.\n // Gestures are detected echo-to-echo because a commanded scroll\n // optimistically moves the tracked position ahead of its ascending\n // animation echoes, and those echoes must not unpin mid-flight.\n if (wasPinnedToBottom && !upwardMove) {\n isAtBottomRef.current = true;\n }\n if (!isAtBottomRef.current && upwardMove) {\n pendingScrollToBottomRef.current = false;\n }\n },\n [updateIsAtBottom],\n );\n\n const handleContentSizeChange = useCallback(\n (_width: number, height: number) => {\n const metrics = metricsRef.current;\n const previousContentHeight = metrics.contentHeight;\n const wasAtBottom = isAtBottomRef.current;\n metrics.contentHeight = height;\n updateIsAtBottom();\n\n // FlatList.scrollToEnd is a no-op before the list has measured, so the\n // initialize and thread-switch scrolls land on the next content-size\n // event, once real metrics exist.\n const pendingScroll = pendingScrollToBottomRef.current;\n if (pendingScroll) {\n pendingScrollToBottomRef.current = false;\n scrollToBottom(pendingScroll.animated);\n return;\n }\n\n if (!autoScroll) return;\n if (!wasAtBottom) return;\n if (previousContentHeight === 0) return;\n if (height <= previousContentHeight) return;\n\n scrollToBottom(false);\n },\n [autoScroll, scrollToBottom, updateIsAtBottom],\n );\n\n useEffect(() => {\n if (!scrollToBottomOnInitialize) return;\n if (!hasMessages) {\n initializeScrollRequestedRef.current = false;\n return;\n }\n if (initializeScrollRequestedRef.current) return;\n\n initializeScrollRequestedRef.current = true;\n pendingScrollToBottomRef.current = { animated: false };\n scrollToBottom(false);\n }, [hasMessages, scrollToBottom, scrollToBottomOnInitialize]);\n\n useAuiEvent(\"thread.runStart\", () => {\n if (!scrollToBottomOnRunStart) return;\n pendingScrollToBottomRef.current = { animated: true };\n scrollToBottom(true);\n });\n\n useAuiEvent(\"threads.selectionChanged\", () => {\n if (!scrollToBottomOnThreadSwitch) return;\n initializeScrollRequestedRef.current = false;\n lastScrollEventYRef.current = 0;\n pendingScrollToBottomRef.current = { animated: false };\n scrollToBottom(false);\n });\n\n return {\n handleLayout,\n handleScroll,\n handleContentSizeChange,\n };\n};\n\nexport const ThreadMessagesFlatList = forwardRef<\n FlatList<ThreadMessage>,\n ThreadMessagesFlatListProps\n>(\n (\n {\n autoScroll,\n components,\n children,\n onContentSizeChange,\n onLayout,\n onScroll,\n scrollEventThrottle,\n scrollToBottomOnInitialize,\n scrollToBottomOnRunStart,\n scrollToBottomOnThreadSwitch,\n ...flatListProps\n },\n forwardedRef,\n ) => {\n const messages = useAuiState((s) => s.thread.messages);\n const [flatListRef, setFlatListRef] = useComposedFlatListRef(forwardedRef);\n const {\n handleContentSizeChange: handleAutoScrollContentSizeChange,\n handleLayout: handleAutoScrollLayout,\n handleScroll: handleAutoScrollScroll,\n } = useThreadMessagesFlatListAutoScroll({\n flatListRef,\n hasMessages: messages.length > 0,\n autoScroll,\n scrollToBottomOnInitialize,\n scrollToBottomOnRunStart,\n scrollToBottomOnThreadSwitch,\n });\n\n const renderItem = useCallback(\n ({ index }: { item: ThreadMessage; index: number }) => {\n if (children) {\n return (\n <ThreadMessageByChildren index={index}>\n {children}\n </ThreadMessageByChildren>\n );\n }\n return <ThreadMessageByIndex index={index} components={components!} />;\n },\n [components, children],\n );\n\n const keyExtractor = useCallback((item: ThreadMessage) => item.id, []);\n\n const scrollTracking =\n (autoScroll ?? true) ||\n (scrollToBottomOnInitialize ?? true) ||\n (scrollToBottomOnRunStart ?? true) ||\n (scrollToBottomOnThreadSwitch ?? true);\n\n const handleLayout = useCallback(\n (event: LayoutChangeEvent) => {\n handleAutoScrollLayout(event);\n onLayout?.(event);\n },\n [handleAutoScrollLayout, onLayout],\n );\n\n const handleScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n handleAutoScrollScroll(event);\n onScroll?.(event);\n },\n [handleAutoScrollScroll, onScroll],\n );\n\n const handleContentSizeChange = useCallback(\n (width: number, height: number) => {\n handleAutoScrollContentSizeChange(width, height);\n onContentSizeChange?.(width, height);\n },\n [handleAutoScrollContentSizeChange, onContentSizeChange],\n );\n\n return (\n <FlatList\n ref={setFlatListRef}\n data={messages as unknown as ThreadMessage[]}\n renderItem={renderItem}\n keyExtractor={keyExtractor}\n {...(scrollTracking\n ? {\n onContentSizeChange: handleContentSizeChange,\n onLayout: handleLayout,\n onScroll: handleScroll,\n scrollEventThrottle: scrollEventThrottle ?? 16,\n }\n : {\n ...(onContentSizeChange && { onContentSizeChange }),\n ...(onLayout && { onLayout }),\n ...(onScroll && { onScroll }),\n ...(scrollEventThrottle !== undefined && { scrollEventThrottle }),\n })}\n {...flatListProps}\n />\n );\n },\n);\nThreadMessagesFlatList.displayName = \"ThreadPrimitive.MessagesFlatList\";\n\n/** @deprecated Use ThreadPrimitive.MessagesFlatList instead. */\nexport const ThreadMessages = forwardRef<\n FlatList<ThreadMessage>,\n ThreadMessagesProps\n>(\n (\n {\n autoScroll = false,\n scrollToBottomOnInitialize = false,\n scrollToBottomOnRunStart = false,\n scrollToBottomOnThreadSwitch = false,\n ...props\n },\n ref,\n ) => (\n <ThreadMessagesFlatList\n ref={ref}\n autoScroll={autoScroll}\n scrollToBottomOnInitialize={scrollToBottomOnInitialize}\n scrollToBottomOnRunStart={scrollToBottomOnRunStart}\n scrollToBottomOnThreadSwitch={scrollToBottomOnThreadSwitch}\n {...props}\n />\n ),\n);\nThreadMessages.displayName = \"ThreadPrimitive.Messages\";\n"],"mappings":";;;;;;;AA0EA,MAAM0C,+BAA+B;AACrC,MAAMC,sBAAsB;AAE5B,MAAMC,gBACJb,YACAc,MACAC,cACG;CACH,QAAQD,MAAR;EACE,KAAK,QACH,IAAIC,WACF,OACEf,WAAWP,oBACXO,WAAWR,gBACXQ,WAAWJ,eACVI,WAAWT;OAGd,OAAOS,WAAWJ,eAAgBI,WAAWT;EAEjD,KAAK,aACH,IAAIwB,WACF,OACEf,WAAWN,yBACXM,WAAWR,gBACXQ,WAAWH,oBACVG,WAAWT;OAGd,OACES,WAAWH,oBAAqBG,WAAWT;EAGjD,KAAK,UACH,IAAIwB,WACF,OACEf,WAAWL,sBACXK,WAAWR,gBACXQ,WAAWF,iBACVE,WAAWT,WACZoB;OAGF,OACEX,WAAWF,iBACVE,WAAWT,WACZoB;EAGN,SAEE,MAAM,IAAIM,MAAM,yBAAyBD,MAAkB;CAE/D;AACF;AAEA,MAAME,0BAAgEC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAArB,eAAAmB;CAGrE,MAAAL,OAAa1B,YAAYkC,KAAqB;CAC9C,MAAAP,YAAkB3B,YAAYmC,MAAmC;CAAE,IAAAC;CAAA,IA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;AAAG"}
|
|
1
|
+
{"version":3,"file":"ThreadMessages.js","names":["ComponentType","FC","ForwardedRef","ReactNode","RefObject","forwardRef","memo","useCallback","useEffect","useRef","FlatList","FlatListProps","LayoutChangeEvent","NativeScrollEvent","NativeSyntheticEvent","MessageState","ThreadMessage","RenderChildrenWithAccessor","useAuiEvent","useAuiState","MessageByIndexProvider","MessageComponents","Message","EditComposer","UserEditComposer","AssistantEditComposer","SystemEditComposer","UserMessage","AssistantMessage","SystemMessage","MessagesContent","components","children","value","message","ThreadMessagesFlatListProps","Omit","autoScroll","scrollToBottomOnRunStart","scrollToBottomOnInitialize","scrollToBottomOnThreadSwitch","ThreadMessagesProps","DEFAULT_SYSTEM_MESSAGE","AT_BOTTOM_THRESHOLD","getComponent","role","isEditing","_exhaustiveCheck","Error","ThreadMessageComponent","t0","$","_c","_temp","_temp2","t1","Component","t2","ThreadMessageByIndex","index","prev","next","displayName","ThreadMessageByChildren","aui","thread","getState","getItem","setForwardedRef","ref","T","current","useComposedFlatListRef","forwardedRef","flatListRef","node","setFlatListRef","const","useThreadMessagesFlatListAutoScroll","hasMessages","t3","t4","undefined","t5","Symbol","for","contentHeight","viewportHeight","scrollY","metricsRef","isAtBottomRef","lastScrollEventYRef","initializeScrollRequestedRef","pendingScrollToBottomRef","t6","updateIsAtBottom","t7","animated","contentHeight_0","viewportHeight_0","Math","max","scrollToEnd","scrollToBottom","t8","event","wasAtBottom","previousViewportHeight","viewportHeight_1","nativeEvent","layout","height","pending","handleLayout","t9","event_0","contentOffset","contentSize","layoutMeasurement","previousEventY","wasPinnedToBottom","y","upwardMove","handleScroll","t10","_width","metrics","previousContentHeight","wasAtBottom_0","pendingScroll","handleContentSizeChange","t11","t12","t13","t14","t15","ThreadMessagesFlatList","flatListProps","onContentSizeChange","onLayout","onScroll","scrollEventThrottle","messages","_temp3","length","handleAutoScrollContentSizeChange","handleAutoScrollLayout","handleAutoScrollScroll","renderItem","keyExtractor","_temp4","scrollTracking","width","ThreadMessages","props","s","s_0","composer","item","id"],"sources":["../../../src/primitives/thread/ThreadMessages.tsx"],"sourcesContent":["import {\n type ComponentType,\n type FC,\n type ForwardedRef,\n type ReactNode,\n type RefObject,\n forwardRef,\n memo,\n useCallback,\n useEffect,\n useRef,\n} from \"react\";\nimport {\n FlatList,\n type FlatListProps,\n type LayoutChangeEvent,\n type NativeScrollEvent,\n type NativeSyntheticEvent,\n} from \"react-native\";\nimport type { MessageState, ThreadMessage } from \"@assistant-ui/core\";\nimport {\n RenderChildrenWithAccessor,\n useAuiEvent,\n useAuiState,\n} from \"@assistant-ui/store\";\nimport { MessageByIndexProvider } from \"@assistant-ui/core/react\";\n\ntype MessageComponents =\n | {\n Message: ComponentType;\n EditComposer?: ComponentType | undefined;\n UserEditComposer?: ComponentType | undefined;\n AssistantEditComposer?: ComponentType | undefined;\n SystemEditComposer?: ComponentType | undefined;\n UserMessage?: ComponentType | undefined;\n AssistantMessage?: ComponentType | undefined;\n SystemMessage?: ComponentType | undefined;\n }\n | {\n Message?: ComponentType | undefined;\n EditComposer?: ComponentType | undefined;\n UserEditComposer?: ComponentType | undefined;\n AssistantEditComposer?: ComponentType | undefined;\n SystemEditComposer?: ComponentType | undefined;\n UserMessage: ComponentType;\n AssistantMessage: ComponentType;\n SystemMessage?: ComponentType | undefined;\n };\n\ntype MessagesContent =\n | {\n /** @deprecated Use the children render function instead. */\n components: MessageComponents;\n children?: never;\n }\n | {\n children: (value: { message: MessageState }) => ReactNode;\n components?: never;\n };\n\nexport type ThreadMessagesFlatListProps = Omit<\n FlatListProps<ThreadMessage>,\n \"data\" | \"renderItem\" | \"children\"\n> &\n MessagesContent & {\n autoScroll?: boolean | undefined;\n scrollToBottomOnRunStart?: boolean | undefined;\n scrollToBottomOnInitialize?: boolean | undefined;\n scrollToBottomOnThreadSwitch?: boolean | undefined;\n };\n\n/** @deprecated Use ThreadMessagesFlatListProps instead. */\nexport type ThreadMessagesProps = ThreadMessagesFlatListProps;\n\nconst DEFAULT_SYSTEM_MESSAGE = () => null;\nconst AT_BOTTOM_THRESHOLD = 4;\n\nconst getComponent = (\n components: MessageComponents,\n role: ThreadMessage[\"role\"],\n isEditing: boolean,\n) => {\n switch (role) {\n case \"user\":\n if (isEditing) {\n return (\n components.UserEditComposer ??\n components.EditComposer ??\n components.UserMessage ??\n (components.Message as ComponentType)\n );\n } else {\n return components.UserMessage ?? (components.Message as ComponentType);\n }\n case \"assistant\":\n if (isEditing) {\n return (\n components.AssistantEditComposer ??\n components.EditComposer ??\n components.AssistantMessage ??\n (components.Message as ComponentType)\n );\n } else {\n return (\n components.AssistantMessage ?? (components.Message as ComponentType)\n );\n }\n case \"system\":\n if (isEditing) {\n return (\n components.SystemEditComposer ??\n components.EditComposer ??\n components.SystemMessage ??\n (components.Message as ComponentType) ??\n DEFAULT_SYSTEM_MESSAGE\n );\n } else {\n return (\n components.SystemMessage ??\n (components.Message as ComponentType) ??\n DEFAULT_SYSTEM_MESSAGE\n );\n }\n default: {\n const _exhaustiveCheck: never = role;\n throw new Error(`Unknown message role: ${_exhaustiveCheck}`);\n }\n }\n};\n\nconst ThreadMessageComponent: FC<{ components: MessageComponents }> = ({\n components,\n}) => {\n const role = useAuiState((s) => s.message.role);\n const isEditing = useAuiState((s) => s.message.composer.isEditing);\n const Component = getComponent(components, role, isEditing);\n\n return <Component />;\n};\n\nconst ThreadMessageByIndex = memo(\n ({ index, components }: { index: number; components: MessageComponents }) => {\n return (\n <MessageByIndexProvider index={index}>\n <ThreadMessageComponent components={components} />\n </MessageByIndexProvider>\n );\n },\n (prev, next) =>\n prev.index === next.index && prev.components === next.components,\n);\nThreadMessageByIndex.displayName = \"ThreadPrimitive.MessageByIndex\";\n\nconst ThreadMessageByChildren = memo(\n ({\n index,\n children,\n }: {\n index: number;\n children: (value: { message: MessageState }) => ReactNode;\n }) => {\n return (\n <MessageByIndexProvider index={index}>\n <RenderChildrenWithAccessor\n getItemState={(aui) => aui.thread.message({ index }).getState()}\n >\n {(getItem) =>\n children({\n get message() {\n return getItem();\n },\n })\n }\n </RenderChildrenWithAccessor>\n </MessageByIndexProvider>\n );\n },\n (prev, next) => prev.index === next.index && prev.children === next.children,\n);\nThreadMessageByChildren.displayName = \"ThreadPrimitive.MessageByChildren\";\n\nconst setForwardedRef = <T,>(ref: ForwardedRef<T>, value: T | null) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n};\n\nconst useComposedFlatListRef = (\n forwardedRef: ForwardedRef<FlatList<ThreadMessage>>,\n) => {\n const flatListRef = useRef<FlatList<ThreadMessage> | null>(null);\n\n const setFlatListRef = useCallback(\n (node: FlatList<ThreadMessage> | null) => {\n flatListRef.current = node;\n setForwardedRef(forwardedRef, node);\n },\n [forwardedRef],\n );\n\n return [flatListRef, setFlatListRef] as const;\n};\n\nconst useThreadMessagesFlatListAutoScroll = ({\n flatListRef,\n hasMessages,\n autoScroll = true,\n scrollToBottomOnRunStart = true,\n scrollToBottomOnInitialize = true,\n scrollToBottomOnThreadSwitch = true,\n}: {\n flatListRef: RefObject<FlatList<ThreadMessage> | null>;\n hasMessages: boolean;\n autoScroll?: boolean | undefined;\n scrollToBottomOnRunStart?: boolean | undefined;\n scrollToBottomOnInitialize?: boolean | undefined;\n scrollToBottomOnThreadSwitch?: boolean | undefined;\n}) => {\n const metricsRef = useRef({\n contentHeight: 0,\n viewportHeight: 0,\n scrollY: 0,\n });\n const isAtBottomRef = useRef(true);\n const lastScrollEventYRef = useRef(0);\n const initializeScrollRequestedRef = useRef(false);\n const pendingScrollToBottomRef = useRef<false | { animated: boolean }>(false);\n\n const updateIsAtBottom = useCallback(() => {\n const { contentHeight, scrollY, viewportHeight } = metricsRef.current;\n isAtBottomRef.current =\n contentHeight <= viewportHeight ||\n contentHeight - scrollY - viewportHeight <= AT_BOTTOM_THRESHOLD;\n }, []);\n\n // Commanding a scroll records the intended position immediately; the\n // native scroll echo is bridged and throttled, so waiting for it lets a\n // fast stream observe stale metrics and drop out of following.\n const scrollToBottom = useCallback(\n (animated: boolean) => {\n const { contentHeight, viewportHeight } = metricsRef.current;\n metricsRef.current.scrollY = Math.max(0, contentHeight - viewportHeight);\n isAtBottomRef.current = true;\n flatListRef.current?.scrollToEnd({ animated });\n },\n [flatListRef],\n );\n\n const handleLayout = useCallback(\n (event: LayoutChangeEvent) => {\n const wasAtBottom = isAtBottomRef.current;\n const previousViewportHeight = metricsRef.current.viewportHeight;\n const viewportHeight = event.nativeEvent.layout.height;\n metricsRef.current.viewportHeight = viewportHeight;\n updateIsAtBottom();\n if (!wasAtBottom) return;\n // Layout changes are never user gestures, so they must not unpin. Past\n // the first measurement, a viewport change while pinned re-commands the\n // bottom position, since no content-size event follows a bare keyboard\n // open or close.\n if (\n autoScroll &&\n previousViewportHeight !== 0 &&\n viewportHeight !== previousViewportHeight\n ) {\n const pending = pendingScrollToBottomRef.current;\n scrollToBottom(pending ? pending.animated : false);\n } else {\n isAtBottomRef.current = true;\n }\n },\n [autoScroll, scrollToBottom, updateIsAtBottom],\n );\n\n const handleScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n const { contentOffset, contentSize, layoutMeasurement } =\n event.nativeEvent;\n const previousEventY = lastScrollEventYRef.current;\n const wasPinnedToBottom = isAtBottomRef.current;\n lastScrollEventYRef.current = contentOffset.y;\n metricsRef.current = {\n contentHeight: contentSize.height,\n viewportHeight: layoutMeasurement.height,\n scrollY: contentOffset.y,\n };\n updateIsAtBottom();\n const upwardMove = contentOffset.y < previousEventY;\n // Only a deliberate upward move unpins or cancels a pending scroll.\n // Gestures are detected echo-to-echo because a commanded scroll\n // optimistically moves the tracked position ahead of its ascending\n // animation echoes, and those echoes must not unpin mid-flight.\n if (wasPinnedToBottom && !upwardMove) {\n isAtBottomRef.current = true;\n }\n if (!isAtBottomRef.current && upwardMove) {\n pendingScrollToBottomRef.current = false;\n }\n },\n [updateIsAtBottom],\n );\n\n const handleContentSizeChange = useCallback(\n (_width: number, height: number) => {\n const metrics = metricsRef.current;\n const previousContentHeight = metrics.contentHeight;\n const wasAtBottom = isAtBottomRef.current;\n metrics.contentHeight = height;\n updateIsAtBottom();\n\n // FlatList.scrollToEnd is a no-op before the list has measured, so the\n // initialize and thread-switch scrolls land on the next content-size\n // event, once real metrics exist.\n const pendingScroll = pendingScrollToBottomRef.current;\n if (pendingScroll) {\n pendingScrollToBottomRef.current = false;\n scrollToBottom(pendingScroll.animated);\n return;\n }\n\n if (!autoScroll) return;\n if (!wasAtBottom) return;\n if (previousContentHeight === 0) return;\n if (height <= previousContentHeight) return;\n\n scrollToBottom(false);\n },\n [autoScroll, scrollToBottom, updateIsAtBottom],\n );\n\n useEffect(() => {\n if (!scrollToBottomOnInitialize) return;\n if (!hasMessages) {\n initializeScrollRequestedRef.current = false;\n return;\n }\n if (initializeScrollRequestedRef.current) return;\n\n initializeScrollRequestedRef.current = true;\n pendingScrollToBottomRef.current = { animated: false };\n scrollToBottom(false);\n }, [hasMessages, scrollToBottom, scrollToBottomOnInitialize]);\n\n useAuiEvent(\"thread.runStart\", () => {\n if (!scrollToBottomOnRunStart) return;\n pendingScrollToBottomRef.current = { animated: true };\n scrollToBottom(true);\n });\n\n useAuiEvent(\"threads.selectionChanged\", () => {\n if (!scrollToBottomOnThreadSwitch) return;\n initializeScrollRequestedRef.current = false;\n lastScrollEventYRef.current = 0;\n pendingScrollToBottomRef.current = { animated: false };\n scrollToBottom(false);\n });\n\n return {\n handleLayout,\n handleScroll,\n handleContentSizeChange,\n };\n};\n\nexport const ThreadMessagesFlatList = forwardRef<\n FlatList<ThreadMessage>,\n ThreadMessagesFlatListProps\n>(\n (\n {\n autoScroll,\n components,\n children,\n onContentSizeChange,\n onLayout,\n onScroll,\n scrollEventThrottle,\n scrollToBottomOnInitialize,\n scrollToBottomOnRunStart,\n scrollToBottomOnThreadSwitch,\n ...flatListProps\n },\n forwardedRef,\n ) => {\n const messages = useAuiState((s) => s.thread.messages);\n const [flatListRef, setFlatListRef] = useComposedFlatListRef(forwardedRef);\n const {\n handleContentSizeChange: handleAutoScrollContentSizeChange,\n handleLayout: handleAutoScrollLayout,\n handleScroll: handleAutoScrollScroll,\n } = useThreadMessagesFlatListAutoScroll({\n flatListRef,\n hasMessages: messages.length > 0,\n autoScroll,\n scrollToBottomOnInitialize,\n scrollToBottomOnRunStart,\n scrollToBottomOnThreadSwitch,\n });\n\n const renderItem = useCallback(\n ({ index }: { item: ThreadMessage; index: number }) => {\n if (children) {\n return (\n <ThreadMessageByChildren index={index}>\n {children}\n </ThreadMessageByChildren>\n );\n }\n return <ThreadMessageByIndex index={index} components={components!} />;\n },\n [components, children],\n );\n\n const keyExtractor = useCallback((item: ThreadMessage) => item.id, []);\n\n const scrollTracking =\n (autoScroll ?? true) ||\n (scrollToBottomOnInitialize ?? true) ||\n (scrollToBottomOnRunStart ?? true) ||\n (scrollToBottomOnThreadSwitch ?? true);\n\n const handleLayout = useCallback(\n (event: LayoutChangeEvent) => {\n handleAutoScrollLayout(event);\n onLayout?.(event);\n },\n [handleAutoScrollLayout, onLayout],\n );\n\n const handleScroll = useCallback(\n (event: NativeSyntheticEvent<NativeScrollEvent>) => {\n handleAutoScrollScroll(event);\n onScroll?.(event);\n },\n [handleAutoScrollScroll, onScroll],\n );\n\n const handleContentSizeChange = useCallback(\n (width: number, height: number) => {\n handleAutoScrollContentSizeChange(width, height);\n onContentSizeChange?.(width, height);\n },\n [handleAutoScrollContentSizeChange, onContentSizeChange],\n );\n\n return (\n <FlatList\n ref={setFlatListRef}\n data={messages as unknown as ThreadMessage[]}\n renderItem={renderItem}\n keyExtractor={keyExtractor}\n {...(scrollTracking\n ? {\n onContentSizeChange: handleContentSizeChange,\n onLayout: handleLayout,\n onScroll: handleScroll,\n scrollEventThrottle: scrollEventThrottle ?? 16,\n }\n : {\n ...(onContentSizeChange && { onContentSizeChange }),\n ...(onLayout && { onLayout }),\n ...(onScroll && { onScroll }),\n ...(scrollEventThrottle !== undefined && { scrollEventThrottle }),\n })}\n {...flatListProps}\n />\n );\n },\n);\nThreadMessagesFlatList.displayName = \"ThreadPrimitive.MessagesFlatList\";\n\n/** @deprecated Use ThreadPrimitive.MessagesFlatList instead. */\nexport const ThreadMessages = forwardRef<\n FlatList<ThreadMessage>,\n ThreadMessagesProps\n>(\n (\n {\n autoScroll = false,\n scrollToBottomOnInitialize = false,\n scrollToBottomOnRunStart = false,\n scrollToBottomOnThreadSwitch = false,\n ...props\n },\n ref,\n ) => (\n <ThreadMessagesFlatList\n ref={ref}\n autoScroll={autoScroll}\n scrollToBottomOnInitialize={scrollToBottomOnInitialize}\n scrollToBottomOnRunStart={scrollToBottomOnRunStart}\n scrollToBottomOnThreadSwitch={scrollToBottomOnThreadSwitch}\n {...props}\n />\n ),\n);\nThreadMessages.displayName = \"ThreadPrimitive.Messages\";\n"],"mappings":";;;;;;;AA0EA,MAAM0C,+BAA+B;AACrC,MAAMC,sBAAsB;AAE5B,MAAMC,gBACJb,YACAc,MACAC,cACG;CACH,QAAQD,MAAR;EACE,KAAK,QACH,IAAIC,WACF,OACEf,WAAWP,oBACXO,WAAWR,gBACXQ,WAAWJ,eACVI,WAAWT;OAGd,OAAOS,WAAWJ,eAAgBI,WAAWT;EAEjD,KAAK,aACH,IAAIwB,WACF,OACEf,WAAWN,yBACXM,WAAWR,gBACXQ,WAAWH,oBACVG,WAAWT;OAGd,OACES,WAAWH,oBAAqBG,WAAWT;EAGjD,KAAK,UACH,IAAIwB,WACF,OACEf,WAAWL,sBACXK,WAAWR,gBACXQ,WAAWF,iBACVE,WAAWT,WACZoB;OAGF,OACEX,WAAWF,iBACVE,WAAWT,WACZoB;EAGN,SAEE,MAAM,IAAIM,MAAM,yBAAyBD,MAAkB;CAE/D;AACF;AAEA,MAAME,0BAAgEC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAArB,eAAAmB;CAGrE,MAAAL,OAAa1B,YAAYkC,KAAqB;CAC9C,MAAAP,YAAkB3B,YAAYmC,MAAmC;CAAE,IAAAC;CAAA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OA6C4DA,KAAIC;AAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadRoot.js","names":["ReactNode","View","ViewProps","ThreadRootProps","children","ThreadRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/thread/ThreadRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ThreadRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ThreadRoot = ({ children, ...viewProps }: ThreadRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,cAAaC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ThreadRoot.js","names":["ReactNode","View","ViewProps","ThreadRootProps","children","ThreadRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/thread/ThreadRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ThreadRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ThreadRoot = ({ children, ...viewProps }: ThreadRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,cAAaC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAA2CC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EAC7DC,KAAA,oBAAC,MAAD;GAAK,GAAKD;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAtCG;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadSuggestion.js","names":["Pressable","PressableProps","useSuggestionTrigger","ThreadSuggestionProps","Omit","children","prompt","send","clearComposer","ThreadSuggestion","t0","$","_c","disabledProp","pressableProps","t1","disabled","undefined","t2","trigger","t3","t4"],"sources":["../../../src/primitives/thread/ThreadSuggestion.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useSuggestionTrigger } from \"@assistant-ui/core/react\";\n\nexport type ThreadSuggestionProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n /** The suggestion prompt. */\n prompt: string;\n /**\n * When true, automatically sends the message.\n * When false, replaces or appends the composer text with the suggestion.\n */\n send?: boolean | undefined;\n /**\n * Whether to clear the composer. When send is false, determines if composer\n * text is replaced (true) or appended (false).\n * @default true\n */\n clearComposer?: boolean | undefined;\n};\n\nexport const ThreadSuggestion = ({\n children,\n prompt,\n send,\n clearComposer = true,\n disabled: disabledProp,\n ...pressableProps\n}: ThreadSuggestionProps) => {\n const { trigger, disabled } = useSuggestionTrigger({\n prompt,\n send,\n clearComposer,\n });\n\n return (\n <Pressable\n onPress={trigger}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAaS,oBAAmBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAP;CAAA,IAAAQ;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAC;CAAA,IAAAQ;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAL,UAAAC,QAAAC,MAAAC,eAAAO,IAAAC,UAAAH,
|
|
1
|
+
{"version":3,"file":"ThreadSuggestion.js","names":["Pressable","PressableProps","useSuggestionTrigger","ThreadSuggestionProps","Omit","children","prompt","send","clearComposer","ThreadSuggestion","t0","$","_c","disabledProp","pressableProps","t1","disabled","undefined","t2","trigger","t3","t4"],"sources":["../../../src/primitives/thread/ThreadSuggestion.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useSuggestionTrigger } from \"@assistant-ui/core/react\";\n\nexport type ThreadSuggestionProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n /** The suggestion prompt. */\n prompt: string;\n /**\n * When true, automatically sends the message.\n * When false, replaces or appends the composer text with the suggestion.\n */\n send?: boolean | undefined;\n /**\n * Whether to clear the composer. When send is false, determines if composer\n * text is replaced (true) or appended (false).\n * @default true\n */\n clearComposer?: boolean | undefined;\n};\n\nexport const ThreadSuggestion = ({\n children,\n prompt,\n send,\n clearComposer = true,\n disabled: disabledProp,\n ...pressableProps\n}: ThreadSuggestionProps) => {\n const { trigger, disabled } = useSuggestionTrigger({\n prompt,\n send,\n clearComposer,\n });\n\n return (\n <Pressable\n onPress={trigger}\n disabled={disabledProp ?? disabled}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAaS,oBAAmBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAP;CAAA,IAAAQ;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAC;CAAA,IAAAQ;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAL,UAAAC,QAAAC,MAAAC,eAAAO,IAAAC,UAAAH,cAAA,GAAAC,kBAAAJ;EAOTC,EAAA,KAAAD;EAAAC,EAAA,KAAAN;EAAAM,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAI;CAAA,OAAA;EAAAV,WAAAM,EAAA;EAAAE,eAAAF,EAAA;EAAAG,iBAAAH,EAAA;EAAAL,SAAAK,EAAA;EAAAJ,OAAAI,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAHtB,MAAAH,gBAAAO,OAAAE,KAAAA,IAAA,OAAAF;CAAoB,IAAAG;CAAA,IAAAP,EAAA,OAAAH,iBAAAG,EAAA,OAAAL,UAAAK,EAAA,OAAAJ,MAAA;EAI+BW,KAAA;GAAAZ;GAAAC;GAAAC;EAInD;EAACG,EAAA,KAAAH;EAAAG,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAJD,MAAA,EAAAQ,SAAAH,aAA8Bd,qBAAqBgB,EAIlD;CAKa,MAAAE,KAAAP,gBAAAG;CAAwB,IAAAK;CAAA,IAAAV,EAAA,QAAAN,YAAAM,EAAA,QAAAG,kBAAAH,EAAA,QAAAS,MAAAT,EAAA,QAAAQ,SAAA;EAFpCE,KAAA,oBAAC,WAAD;GACWF,SAAAA;GACC,UAAAC;GACQ,mBAAA;GAAQ,GACtBN;GAEHT;EANO,CAAA;EAOEM,EAAA,MAAAN;EAAAM,EAAA,MAAAG;EAAAH,EAAA,MAAAS;EAAAT,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAPZU;AAOY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItems.js","names":["ReactElement","useCallback","FlatList","FlatListProps","useAuiState","ThreadListItemByIndexProvider","ThreadListItemsProps","Omit","renderItem","props","threadId","index","ThreadListItems","t0","$","_c","flatListProps","threadIds","_temp","t1","t2","item","renderFlatListItem","keyExtractor","_temp2","t3","s","threads","item_0"],"sources":["../../../src/primitives/threadList/ThreadListItems.tsx"],"sourcesContent":["import { type ReactElement, useCallback } from \"react\";\nimport { FlatList, type FlatListProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { ThreadListItemByIndexProvider } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemsProps = Omit<\n FlatListProps<string>,\n \"data\" | \"renderItem\"\n> & {\n renderItem: (props: { threadId: string; index: number }) => ReactElement;\n};\n\nexport const ThreadListItems = ({\n renderItem,\n ...flatListProps\n}: ThreadListItemsProps) => {\n const threadIds = useAuiState((s) => s.threads.threadIds);\n\n const renderFlatListItem = useCallback(\n ({ item, index }: { item: string; index: number }) => {\n return (\n <ThreadListItemByIndexProvider index={index} archived={false}>\n {renderItem({ threadId: item, index })}\n </ThreadListItemByIndexProvider>\n );\n },\n [renderItem],\n );\n\n const keyExtractor = useCallback((item: string) => item, []);\n\n return (\n <FlatList\n data={threadIds as string[]}\n renderItem={renderFlatListItem}\n keyExtractor={keyExtractor}\n {...flatListProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAYA,MAAaY,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAM,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAL,
|
|
1
|
+
{"version":3,"file":"ThreadListItems.js","names":["ReactElement","useCallback","FlatList","FlatListProps","useAuiState","ThreadListItemByIndexProvider","ThreadListItemsProps","Omit","renderItem","props","threadId","index","ThreadListItems","t0","$","_c","flatListProps","threadIds","_temp","t1","t2","item","renderFlatListItem","keyExtractor","_temp2","t3","s","threads","item_0"],"sources":["../../../src/primitives/threadList/ThreadListItems.tsx"],"sourcesContent":["import { type ReactElement, useCallback } from \"react\";\nimport { FlatList, type FlatListProps } from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { ThreadListItemByIndexProvider } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemsProps = Omit<\n FlatListProps<string>,\n \"data\" | \"renderItem\"\n> & {\n renderItem: (props: { threadId: string; index: number }) => ReactElement;\n};\n\nexport const ThreadListItems = ({\n renderItem,\n ...flatListProps\n}: ThreadListItemsProps) => {\n const threadIds = useAuiState((s) => s.threads.threadIds);\n\n const renderFlatListItem = useCallback(\n ({ item, index }: { item: string; index: number }) => {\n return (\n <ThreadListItemByIndexProvider index={index} archived={false}>\n {renderItem({ threadId: item, index })}\n </ThreadListItemByIndexProvider>\n );\n },\n [renderItem],\n );\n\n const keyExtractor = useCallback((item: string) => item, []);\n\n return (\n <FlatList\n data={threadIds as string[]}\n renderItem={renderFlatListItem}\n keyExtractor={keyExtractor}\n {...flatListProps}\n />\n );\n};\n"],"mappings":";;;;;;;AAYA,MAAaY,mBAAkBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAR;CAAA,IAAAM,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAL,YAAA,GAAAQ,iBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAN;CAAA,OAAA;EAAAQ,gBAAAF,EAAA;EAAAN,aAAAM,EAAA;CAAA;CACrB,MAAAG,YAAkBb,YAAYc,KAA0B;CAAE,IAAAC;CAAA,IAAAL,EAAA,OAAAN,YAAA;EAGxDW,MAAAC,OAAA;GAAC,MAAA,EAAAC,MAAAV,UAAAS;GAAgD,OAE7C,oBAAC,+BAAD;IAAsCT;IAAiB,UAAA;IACpDH,UAAAA,WAAW;KAAAE,UAAYW;KAAIV;IAAQ,CAAC;GADT,CAAA;EAEE;EAEnCG,EAAA,KAAAN;EAAAM,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAPH,MAAAQ,qBAA2BH;CAW3B,MAAAI,eAAqBC;CAIX,MAAAJ,KAAAH;CAAqB,IAAAQ;CAAA,IAAAX,EAAA,OAAAE,iBAAAF,EAAA,OAAAQ,sBAAAR,EAAA,OAAAM,IAAA;EAD7BK,KAAA,oBAAC,UAAD;GACQ,MAAAL;GACME,YAAAA;GACEC;GAAY,GACtBP;EAAa,CAAA;EACjBF,EAAA,KAAAE;EAAAF,EAAA,KAAAQ;EAAAR,EAAA,KAAAM;EAAAN,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OALFW;AAKE;AAzByB,SAAAP,MAAAQ,GAAA;CAAA,OAIQA,EAACC,QAAQV;AAAU;AAJ3B,SAAAO,OAAAI,QAAA;CAAA,OAiBsBP;AAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListNew.js","names":["ReactNode","Pressable","PressableProps","PressableStateCallbackType","useAuiState","useThreadListNew","ThreadListNewProps","Omit","children","state","isActive","ThreadListNew","t0","$","_c","accessibilityState","pressableProps","_temp","switchToNewThread","t1","selected","t2","t3","s","threads","newThreadId","mainThreadId"],"sources":["../../../src/primitives/threadList/ThreadListNew.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport {\n Pressable,\n type PressableProps,\n type PressableStateCallbackType,\n} from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { useThreadListNew } from \"@assistant-ui/core/react\";\n\nexport type ThreadListNewProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children:\n | ReactNode\n | ((\n state: PressableStateCallbackType & { isActive: boolean },\n ) => ReactNode);\n};\n\nexport const ThreadListNew = ({\n children,\n accessibilityState,\n ...pressableProps\n}: ThreadListNewProps) => {\n const isActive = useAuiState(\n (s) => s.threads.newThreadId === s.threads.mainThreadId,\n );\n const { switchToNewThread } = useThreadListNew();\n\n return (\n <Pressable\n onPress={switchToNewThread}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: isActive, ...accessibilityState }}\n {...pressableProps}\n >\n {typeof children === \"function\"\n ? (state) => children({ ...state, isActive })\n : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAoBA,MAAaW,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAQ;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAAO,
|
|
1
|
+
{"version":3,"file":"ThreadListNew.js","names":["ReactNode","Pressable","PressableProps","PressableStateCallbackType","useAuiState","useThreadListNew","ThreadListNewProps","Omit","children","state","isActive","ThreadListNew","t0","$","_c","accessibilityState","pressableProps","_temp","switchToNewThread","t1","selected","t2","t3","s","threads","newThreadId","mainThreadId"],"sources":["../../../src/primitives/threadList/ThreadListNew.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport {\n Pressable,\n type PressableProps,\n type PressableStateCallbackType,\n} from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { useThreadListNew } from \"@assistant-ui/core/react\";\n\nexport type ThreadListNewProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children:\n | ReactNode\n | ((\n state: PressableStateCallbackType & { isActive: boolean },\n ) => ReactNode);\n};\n\nexport const ThreadListNew = ({\n children,\n accessibilityState,\n ...pressableProps\n}: ThreadListNewProps) => {\n const isActive = useAuiState(\n (s) => s.threads.newThreadId === s.threads.mainThreadId,\n );\n const { switchToNewThread } = useThreadListNew();\n\n return (\n <Pressable\n onPress={switchToNewThread}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: isActive, ...accessibilityState }}\n {...pressableProps}\n >\n {typeof children === \"function\"\n ? (state) => children({ ...state, isActive })\n : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAoBA,MAAaW,iBAAgBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAQ;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAAO,oBAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAL;EAAAK,EAAA,KAAAG;CAAA,OAAA;EAAAD,qBAAAF,EAAA;EAAAL,WAAAK,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CACnB,MAAAH,WAAiBN,YACfa,KACF;CACA,MAAA,EAAAC,sBAA8Bb,iBAAiB;CAAE,IAAAc;CAAA,IAAAN,EAAA,OAAAE,sBAAAF,EAAA,OAAAH,UAAA;EAMzBS,KAAA;GAAAC,UAAYV;GAAQ,GAAKK;EAAmB;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAH;EAAAG,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAL,YAAAK,EAAA,OAAAH,UAAA;EAGhEW,KAAA,OAAOb,aAAa,cAApBC,UACcD,SAAS;GAAA,GAAKC;GAAKC;EAAW,CAAC,IAD7CF;EAEWK,EAAA,KAAAL;EAAAK,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAG,kBAAAH,EAAA,QAAAK,qBAAAL,EAAA,QAAAM,MAAAN,EAAA,QAAAQ,IAAA;EARdC,KAAA,oBAAC,WAAD;GACWJ,SAAAA;GACS,mBAAA;GACE,oBAAAC;GAA6C,GAC7DH;GAEHK,UAAAA;EANO,CAAA;EASER,EAAA,MAAAG;EAAAH,EAAA,MAAAK;EAAAL,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OATZS;AASY;AApBa,SAAAL,MAAAM,GAAA;CAAA,OAMlBA,EAACC,QAAQC,gBAAiBF,EAACC,QAAQE;AAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListRoot.js","names":["ReactNode","View","ViewProps","ThreadListRootProps","children","ThreadListRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/threadList/ThreadListRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ThreadListRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ThreadListRoot = ({\n children,\n ...viewProps\n}: ThreadListRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ThreadListRoot.js","names":["ReactNode","View","ViewProps","ThreadListRootProps","children","ThreadListRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/threadList/ThreadListRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ThreadListRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ThreadListRoot = ({\n children,\n ...viewProps\n}: ThreadListRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,kBAAiBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EACbC,KAAA,oBAAC,MAAD;GAAK,GAAKD;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAtCG;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItemArchive.js","names":["Pressable","PressableProps","useThreadListItemArchive","ThreadListItemArchiveProps","Omit","children","ThreadListItemArchive","t0","$","_c","pressableProps","archive","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemArchive.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useThreadListItemArchive } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemArchiveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ThreadListItemArchive = ({\n children,\n ...pressableProps\n}: ThreadListItemArchiveProps) => {\n const { archive } = useThreadListItemArchive();\n\n return (\n <Pressable onPress={archive} accessibilityRole=\"button\" {...pressableProps}>\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ThreadListItemArchive.js","names":["Pressable","PressableProps","useThreadListItemArchive","ThreadListItemArchiveProps","Omit","children","ThreadListItemArchive","t0","$","_c","pressableProps","archive","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemArchive.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useThreadListItemArchive } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemArchiveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ThreadListItemArchive = ({\n children,\n ...pressableProps\n}: ThreadListItemArchiveProps) => {\n const { archive } = useThreadListItemArchive();\n\n return (\n <Pressable onPress={archive} accessibilityRole=\"button\" {...pressableProps}>\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CAC3B,MAAA,EAAAG,YAAoBT,yBAAyB;CAAE,IAAAU;CAAA,IAAAJ,EAAA,OAAAG,WAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,gBAAA;EAG7CE,KAAA,oBAAC,WAAD;GAAoBD,SAAAA;GAA2B,mBAAA;GAAQ,GAAKD;GACzDL;EADO,CAAA;EAEEG,EAAA,KAAAG;EAAAH,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OAFZI;AAEY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItemDelete.js","names":["Pressable","PressableProps","useThreadListItemDelete","ThreadListItemDeleteProps","Omit","children","ThreadListItemDelete","t0","$","_c","pressableProps","delete","deleteThread","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemDelete.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useThreadListItemDelete } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemDeleteProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ThreadListItemDelete = ({\n children,\n ...pressableProps\n}: ThreadListItemDeleteProps) => {\n const { delete: deleteThread } = useThreadListItemDelete();\n\n return (\n <Pressable\n onPress={deleteThread}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,wBAAuBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ThreadListItemDelete.js","names":["Pressable","PressableProps","useThreadListItemDelete","ThreadListItemDeleteProps","Omit","children","ThreadListItemDelete","t0","$","_c","pressableProps","delete","deleteThread","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemDelete.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useThreadListItemDelete } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemDeleteProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ThreadListItemDelete = ({\n children,\n ...pressableProps\n}: ThreadListItemDeleteProps) => {\n const { delete: deleteThread } = useThreadListItemDelete();\n\n return (\n <Pressable\n onPress={deleteThread}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,wBAAuBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CAC1B,MAAA,EAAAG,QAAAC,iBAAiCV,wBAAwB;CAAE,IAAAW;CAAA,IAAAL,EAAA,OAAAH,YAAAG,EAAA,OAAAI,gBAAAJ,EAAA,OAAAE,gBAAA;EAGzDG,KAAA,oBAAC,WAAD;GACWD,SAAAA;GACS,mBAAA;GAAQ,GACtBF;GAEHL;EALO,CAAA;EAMEG,EAAA,KAAAH;EAAAG,EAAA,KAAAI;EAAAJ,EAAA,KAAAE;EAAAF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OANZK;AAMY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItemRoot.js","names":["ReactNode","View","ViewProps","ThreadListItemRootProps","children","ThreadListItemRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ThreadListItemRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ThreadListItemRoot = ({\n children,\n ...viewProps\n}: ThreadListItemRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,sBAAqBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ThreadListItemRoot.js","names":["ReactNode","View","ViewProps","ThreadListItemRootProps","children","ThreadListItemRoot","t0","$","_c","viewProps","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemRoot.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { View, type ViewProps } from \"react-native\";\n\nexport type ThreadListItemRootProps = ViewProps & {\n children: ReactNode;\n};\n\nexport const ThreadListItemRoot = ({\n children,\n ...viewProps\n}: ThreadListItemRootProps) => {\n return <View {...viewProps}>{children}</View>;\n};\n"],"mappings":";;;;AAOA,MAAaK,sBAAqBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,aAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,YAAAF,EAAA;CAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAAH,YAAAG,EAAA,OAAAE,WAAA;EACjBC,KAAA,oBAAC,MAAD;GAAK,GAAKD;GAAYL;EAAjB,CAAA;EAAiCG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAtCG;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItemTrigger.js","names":["ReactNode","Pressable","PressableProps","PressableStateCallbackType","useAuiState","useThreadListItemTrigger","ThreadListItemTriggerProps","Omit","children","state","isActive","ThreadListItemTrigger","t0","$","_c","accessibilityState","pressableProps","_temp","switchTo","t1","selected","t2","t3","s","threads","mainThreadId","threadListItem","id"],"sources":["../../../src/primitives/threadListItem/ThreadListItemTrigger.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport {\n Pressable,\n type PressableProps,\n type PressableStateCallbackType,\n} from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { useThreadListItemTrigger } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemTriggerProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children:\n | ReactNode\n | ((\n state: PressableStateCallbackType & { isActive: boolean },\n ) => ReactNode);\n};\n\nexport const ThreadListItemTrigger = ({\n children,\n accessibilityState,\n ...pressableProps\n}: ThreadListItemTriggerProps) => {\n const isActive = useAuiState(\n (s) => s.threads.mainThreadId === s.threadListItem.id,\n );\n const { switchTo } = useThreadListItemTrigger();\n\n return (\n <Pressable\n onPress={switchTo}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: isActive, ...accessibilityState }}\n {...pressableProps}\n >\n {typeof children === \"function\"\n ? (state) => children({ ...state, isActive })\n : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAoBA,MAAaW,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAQ;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAAO,
|
|
1
|
+
{"version":3,"file":"ThreadListItemTrigger.js","names":["ReactNode","Pressable","PressableProps","PressableStateCallbackType","useAuiState","useThreadListItemTrigger","ThreadListItemTriggerProps","Omit","children","state","isActive","ThreadListItemTrigger","t0","$","_c","accessibilityState","pressableProps","_temp","switchTo","t1","selected","t2","t3","s","threads","mainThreadId","threadListItem","id"],"sources":["../../../src/primitives/threadListItem/ThreadListItemTrigger.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport {\n Pressable,\n type PressableProps,\n type PressableStateCallbackType,\n} from \"react-native\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { useThreadListItemTrigger } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemTriggerProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children:\n | ReactNode\n | ((\n state: PressableStateCallbackType & { isActive: boolean },\n ) => ReactNode);\n};\n\nexport const ThreadListItemTrigger = ({\n children,\n accessibilityState,\n ...pressableProps\n}: ThreadListItemTriggerProps) => {\n const isActive = useAuiState(\n (s) => s.threads.mainThreadId === s.threadListItem.id,\n );\n const { switchTo } = useThreadListItemTrigger();\n\n return (\n <Pressable\n onPress={switchTo}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: isActive, ...accessibilityState }}\n {...pressableProps}\n >\n {typeof children === \"function\"\n ? (state) => children({ ...state, isActive })\n : children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;;AAoBA,MAAaW,yBAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAQ;CAAA,IAAAH,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAJ,UAAAO,oBAAA,GAAAC,kBAAAJ;EAITC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAL;EAAAK,EAAA,KAAAG;CAAA,OAAA;EAAAD,qBAAAF,EAAA;EAAAL,WAAAK,EAAA;EAAAG,iBAAAH,EAAA;CAAA;CAC3B,MAAAH,WAAiBN,YACfa,KACF;CACA,MAAA,EAAAC,aAAqBb,yBAAyB;CAAE,IAAAc;CAAA,IAAAN,EAAA,OAAAE,sBAAAF,EAAA,OAAAH,UAAA;EAMxBS,KAAA;GAAAC,UAAYV;GAAQ,GAAKK;EAAmB;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAH;EAAAG,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAL,YAAAK,EAAA,OAAAH,UAAA;EAGhEW,KAAA,OAAOb,aAAa,cAApBC,UACcD,SAAS;GAAA,GAAKC;GAAKC;EAAW,CAAC,IAD7CF;EAEWK,EAAA,KAAAL;EAAAK,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAG,kBAAAH,EAAA,QAAAK,YAAAL,EAAA,QAAAM,MAAAN,EAAA,QAAAQ,IAAA;EARdC,KAAA,oBAAC,WAAD;GACWJ,SAAAA;GACS,mBAAA;GACE,oBAAAC;GAA6C,GAC7DH;GAEHK,UAAAA;EANO,CAAA;EASER,EAAA,MAAAG;EAAAH,EAAA,MAAAK;EAAAL,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OATZS;AASY;AApBqB,SAAAL,MAAAM,GAAA;CAAA,OAM1BA,EAACC,QAAQC,iBAAkBF,EAACG,eAAeC;AAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadListItemUnarchive.js","names":["Pressable","PressableProps","useThreadListItemUnarchive","ThreadListItemUnarchiveProps","Omit","children","ThreadListItemUnarchive","t0","$","_c","pressableProps","unarchive","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemUnarchive.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useThreadListItemUnarchive } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemUnarchiveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ThreadListItemUnarchive = ({\n children,\n ...pressableProps\n}: ThreadListItemUnarchiveProps) => {\n const { unarchive } = useThreadListItemUnarchive();\n\n return (\n <Pressable\n onPress={unarchive}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,2BAA0BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,
|
|
1
|
+
{"version":3,"file":"ThreadListItemUnarchive.js","names":["Pressable","PressableProps","useThreadListItemUnarchive","ThreadListItemUnarchiveProps","Omit","children","ThreadListItemUnarchive","t0","$","_c","pressableProps","unarchive","t1"],"sources":["../../../src/primitives/threadListItem/ThreadListItemUnarchive.tsx"],"sourcesContent":["import { Pressable, type PressableProps } from \"react-native\";\nimport { useThreadListItemUnarchive } from \"@assistant-ui/core/react\";\n\nexport type ThreadListItemUnarchiveProps = Omit<\n PressableProps,\n \"onPress\" | \"children\"\n> & {\n children: PressableProps[\"children\"];\n};\n\nexport const ThreadListItemUnarchive = ({\n children,\n ...pressableProps\n}: ThreadListItemUnarchiveProps) => {\n const { unarchive } = useThreadListItemUnarchive();\n\n return (\n <Pressable\n onPress={unarchive}\n accessibilityRole=\"button\"\n {...pressableProps}\n >\n {children}\n </Pressable>\n );\n};\n"],"mappings":";;;;;AAUA,MAAaM,2BAA0BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAF,UAAA,GAAAK,kBAAAH;EAGTC,EAAA,KAAAD;EAAAC,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,WAAAG,EAAA;EAAAE,iBAAAF,EAAA;CAAA;CAC7B,MAAA,EAAAG,cAAsBT,2BAA2B;CAAE,IAAAU;CAAA,IAAAJ,EAAA,OAAAH,YAAAG,EAAA,OAAAE,kBAAAF,EAAA,OAAAG,WAAA;EAGjDC,KAAA,oBAAC,WAAD;GACWD,SAAAA;GACS,mBAAA;GAAQ,GACtBD;GAEHL;EALO,CAAA;EAMEG,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OANZI;AAMY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/react-native",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "React Native bindings for assistant-ui",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"assistant",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
],
|
|
32
32
|
"sideEffects": false,
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@assistant-ui/core": "^0.3.
|
|
35
|
-
"@assistant-ui/store": "^0.3.
|
|
36
|
-
"@assistant-ui/tap": "^0.9.
|
|
37
|
-
"assistant-stream": "^0.3.
|
|
34
|
+
"@assistant-ui/core": "^0.3.16",
|
|
35
|
+
"@assistant-ui/store": "^0.3.11",
|
|
36
|
+
"@assistant-ui/tap": "^0.9.15",
|
|
37
|
+
"assistant-stream": "^0.3.40",
|
|
38
38
|
"zustand": "^5.0.15"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
+
"@assistant-ui/x-buildutils": "0.0.24",
|
|
51
52
|
"@babel/core": "^7.29.7",
|
|
52
53
|
"@types/react": "^19.2.18",
|
|
53
|
-
"@types/react-dom": "^19.2.
|
|
54
|
+
"@types/react-dom": "^19.2.5",
|
|
54
55
|
"jsdom": "^30.0.1",
|
|
55
56
|
"react": "^19.2.8",
|
|
56
57
|
"react-dom": "^19.2.8",
|
|
57
58
|
"react-native": "^0.87.0",
|
|
58
59
|
"react-native-web": "^0.21.2",
|
|
59
|
-
"vitest": "^4.1.
|
|
60
|
-
"@assistant-ui/x-buildutils": "0.0.23"
|
|
60
|
+
"vitest": "^4.1.11"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public",
|
package/src/index.ts
CHANGED
|
@@ -57,6 +57,8 @@ export type {
|
|
|
57
57
|
VoiceSessionControls,
|
|
58
58
|
VoiceSessionHelpers,
|
|
59
59
|
SuggestionAdapter,
|
|
60
|
+
SuggestionAdapterGenerateOptions,
|
|
61
|
+
CreateSuggestionAdapterOptions,
|
|
60
62
|
// Other
|
|
61
63
|
Unsubscribe,
|
|
62
64
|
} from "@assistant-ui/core";
|
|
@@ -70,6 +72,7 @@ export type {
|
|
|
70
72
|
export { InMemoryThreadListAdapter } from "@assistant-ui/core";
|
|
71
73
|
export { createVoiceSession } from "@assistant-ui/core";
|
|
72
74
|
export { fromThreadMessageLike, generateId } from "@assistant-ui/core";
|
|
75
|
+
export { createSuggestionAdapter } from "@assistant-ui/core";
|
|
73
76
|
|
|
74
77
|
// Attachment adapter implementations
|
|
75
78
|
export {
|
|
@@ -8,6 +8,7 @@ const h = vi.hoisted(() => ({
|
|
|
8
8
|
sendSpy: vi.fn<() => void>(),
|
|
9
9
|
flushTapSyncSpy: vi.fn(<T,>(fn: () => T) => fn()),
|
|
10
10
|
composerState: { text: "" },
|
|
11
|
+
threadState: { isRunning: false, queue: false },
|
|
11
12
|
platform: { os: "web" as "web" | "ios" | "android" },
|
|
12
13
|
}));
|
|
13
14
|
|
|
@@ -16,7 +17,13 @@ vi.mock("@assistant-ui/store", () => {
|
|
|
16
17
|
setText: h.setText,
|
|
17
18
|
send: h.sendSpy,
|
|
18
19
|
});
|
|
19
|
-
const
|
|
20
|
+
const thread = {
|
|
21
|
+
getState: () => ({
|
|
22
|
+
isRunning: h.threadState.isRunning,
|
|
23
|
+
capabilities: { queue: h.threadState.queue },
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
const aui = { composer, thread };
|
|
20
27
|
return {
|
|
21
28
|
useAui: () => aui,
|
|
22
29
|
useAuiState: <T,>(
|
|
@@ -100,6 +107,8 @@ describe("ComposerInput", () => {
|
|
|
100
107
|
h.sendSpy.mockReset();
|
|
101
108
|
h.flushTapSyncSpy.mockClear();
|
|
102
109
|
h.composerState.text = "";
|
|
110
|
+
h.threadState.isRunning = false;
|
|
111
|
+
h.threadState.queue = false;
|
|
103
112
|
h.platform.os = "web";
|
|
104
113
|
|
|
105
114
|
container = document.createElement("div");
|
|
@@ -169,6 +178,43 @@ describe("ComposerInput", () => {
|
|
|
169
178
|
expect(event.defaultPrevented).toBe(false);
|
|
170
179
|
});
|
|
171
180
|
|
|
181
|
+
it("does not submit while the thread runs without queue support", async () => {
|
|
182
|
+
h.threadState.isRunning = true;
|
|
183
|
+
const input = await mount();
|
|
184
|
+
|
|
185
|
+
let event!: KeyboardEvent;
|
|
186
|
+
await act(async () => {
|
|
187
|
+
event = fireKeyDown(input, { key: "Enter" });
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
expect(h.sendSpy).not.toHaveBeenCalled();
|
|
191
|
+
expect(event.defaultPrevented).toBe(false);
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it("submits while running when the thread supports queueing", async () => {
|
|
195
|
+
h.threadState.isRunning = true;
|
|
196
|
+
h.threadState.queue = true;
|
|
197
|
+
const input = await mount();
|
|
198
|
+
|
|
199
|
+
await act(async () => {
|
|
200
|
+
fireKeyDown(input, { key: "Enter" });
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
expect(h.sendSpy).toHaveBeenCalledTimes(1);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it("blocks submission when the thread starts running after mount", async () => {
|
|
207
|
+
const input = await mount();
|
|
208
|
+
|
|
209
|
+
h.threadState.isRunning = true;
|
|
210
|
+
|
|
211
|
+
await act(async () => {
|
|
212
|
+
fireKeyDown(input, { key: "Enter" });
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
expect(h.sendSpy).not.toHaveBeenCalled();
|
|
216
|
+
});
|
|
217
|
+
|
|
172
218
|
it("ignores Enter while isComposing is set", async () => {
|
|
173
219
|
const input = await mount();
|
|
174
220
|
|
|
@@ -102,6 +102,8 @@ export const ComposerInput = ({
|
|
|
102
102
|
// react-native-web forwards the raw DOM keydown before its own composition guard, so re-check it here (mirrors isEventComposing)
|
|
103
103
|
if (nativeEvent.isComposing || nativeEvent.keyCode === 229) return;
|
|
104
104
|
if (nativeEvent.key === "Enter" && !nativeEvent.shiftKey) {
|
|
105
|
+
const threadState = aui.thread.getState();
|
|
106
|
+
if (threadState.isRunning && !threadState.capabilities.queue) return;
|
|
105
107
|
(e as unknown as Event).preventDefault?.();
|
|
106
108
|
aui.composer.send();
|
|
107
109
|
}
|