@assistant-ui/react 0.14.27 → 0.14.28

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.
Files changed (180) hide show
  1. package/dist/client/ExternalThread.d.ts.map +1 -1
  2. package/dist/client/ExternalThread.js +2 -2
  3. package/dist/client/ExternalThread.js.map +1 -1
  4. package/dist/context/react/utils/createContextStoreHook.d.ts.map +1 -1
  5. package/dist/context/react/utils/createStateHookForRuntime.d.ts.map +1 -1
  6. package/dist/legacy-runtime/AssistantRuntimeProvider.js.map +1 -1
  7. package/dist/legacy-runtime/runtime-cores/assistant-transport/commandQueue.d.ts.map +1 -1
  8. package/dist/mcp-apps/McpAppRenderer.d.ts.map +1 -1
  9. package/dist/model-context/makeAssistantVisible.d.ts.map +1 -1
  10. package/dist/model-context/makeAssistantVisible.js +7 -1
  11. package/dist/model-context/makeAssistantVisible.js.map +1 -1
  12. package/dist/primitives/actionBar/ActionBarCopy.d.ts.map +1 -1
  13. package/dist/primitives/actionBar/ActionBarEdit.d.ts.map +1 -1
  14. package/dist/primitives/actionBar/ActionBarExportMarkdown.d.ts.map +1 -1
  15. package/dist/primitives/actionBar/ActionBarFeedbackNegative.d.ts.map +1 -1
  16. package/dist/primitives/actionBar/ActionBarFeedbackPositive.d.ts.map +1 -1
  17. package/dist/primitives/actionBar/ActionBarReload.d.ts.map +1 -1
  18. package/dist/primitives/actionBar/ActionBarRoot.d.ts.map +1 -1
  19. package/dist/primitives/actionBar/ActionBarRoot.js.map +1 -1
  20. package/dist/primitives/actionBar/ActionBarSpeak.d.ts.map +1 -1
  21. package/dist/primitives/actionBar/ActionBarStopSpeaking.d.ts.map +1 -1
  22. package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts.map +1 -1
  23. package/dist/primitives/actionBarMore/ActionBarMoreContent.js.map +1 -1
  24. package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts.map +1 -1
  25. package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts.map +1 -1
  26. package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts.map +1 -1
  27. package/dist/primitives/assistantModal/AssistantModalAnchor.d.ts.map +1 -1
  28. package/dist/primitives/assistantModal/AssistantModalContent.d.ts.map +1 -1
  29. package/dist/primitives/assistantModal/AssistantModalContent.js.map +1 -1
  30. package/dist/primitives/assistantModal/AssistantModalTrigger.d.ts.map +1 -1
  31. package/dist/primitives/assistantModal/popoverRenderPrimitives.d.ts.map +1 -1
  32. package/dist/primitives/attachment/AttachmentRemove.d.ts.map +1 -1
  33. package/dist/primitives/attachment/AttachmentRoot.d.ts.map +1 -1
  34. package/dist/primitives/attachment/AttachmentThumb.d.ts.map +1 -1
  35. package/dist/primitives/attachment/AttachmentThumb.js.map +1 -1
  36. package/dist/primitives/branchPicker/BranchPickerNext.d.ts.map +1 -1
  37. package/dist/primitives/branchPicker/BranchPickerPrevious.d.ts.map +1 -1
  38. package/dist/primitives/branchPicker/BranchPickerRoot.d.ts.map +1 -1
  39. package/dist/primitives/branchPicker/BranchPickerRoot.js.map +1 -1
  40. package/dist/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.d.ts.map +1 -1
  41. package/dist/primitives/chainOfThought/ChainOfThoughtRoot.d.ts.map +1 -1
  42. package/dist/primitives/composer/ComposerAddAttachment.d.ts.map +1 -1
  43. package/dist/primitives/composer/ComposerAttachmentDropzone.d.ts.map +1 -1
  44. package/dist/primitives/composer/ComposerAttachmentDropzone.js.map +1 -1
  45. package/dist/primitives/composer/ComposerCancel.d.ts.map +1 -1
  46. package/dist/primitives/composer/ComposerDictate.d.ts.map +1 -1
  47. package/dist/primitives/composer/ComposerDictationTranscript.d.ts.map +1 -1
  48. package/dist/primitives/composer/ComposerDictationTranscript.js.map +1 -1
  49. package/dist/primitives/composer/ComposerInput.js.map +1 -1
  50. package/dist/primitives/composer/ComposerQuote.d.ts.map +1 -1
  51. package/dist/primitives/composer/ComposerQuote.js.map +1 -1
  52. package/dist/primitives/composer/ComposerRoot.d.ts +5 -0
  53. package/dist/primitives/composer/ComposerRoot.d.ts.map +1 -1
  54. package/dist/primitives/composer/ComposerRoot.js +86 -40
  55. package/dist/primitives/composer/ComposerRoot.js.map +1 -1
  56. package/dist/primitives/composer/ComposerSend.d.ts.map +1 -1
  57. package/dist/primitives/composer/ComposerStopDictation.d.ts.map +1 -1
  58. package/dist/primitives/composer/trigger/TriggerPopover.d.ts.map +1 -1
  59. package/dist/primitives/composer/trigger/TriggerPopover.js.map +1 -1
  60. package/dist/primitives/composer/trigger/TriggerPopoverBack.d.ts.map +1 -1
  61. package/dist/primitives/composer/trigger/TriggerPopoverCategories.d.ts.map +1 -1
  62. package/dist/primitives/composer/trigger/TriggerPopoverCategories.js.map +1 -1
  63. package/dist/primitives/composer/trigger/TriggerPopoverItems.d.ts.map +1 -1
  64. package/dist/primitives/composer/trigger/TriggerPopoverItems.js.map +1 -1
  65. package/dist/primitives/composer/trigger/TriggerPopoverResource.d.ts.map +1 -1
  66. package/dist/primitives/composer/trigger/TriggerPopoverRootContext.js.map +1 -1
  67. package/dist/primitives/composer/trigger/detectTrigger.d.ts +1 -1
  68. package/dist/primitives/composer/trigger/triggerDetectionResource.d.ts.map +1 -1
  69. package/dist/primitives/composer/trigger/triggerKeyboardResource.d.ts.map +1 -1
  70. package/dist/primitives/composer/trigger/triggerNavigationResource.d.ts.map +1 -1
  71. package/dist/primitives/composer/trigger/triggerSelectionResource.d.ts.map +1 -1
  72. package/dist/primitives/dropdownMenuRenderPrimitives.d.ts.map +1 -1
  73. package/dist/primitives/error/ErrorMessage.d.ts.map +1 -1
  74. package/dist/primitives/error/ErrorMessage.js.map +1 -1
  75. package/dist/primitives/error/ErrorRoot.d.ts.map +1 -1
  76. package/dist/primitives/message/MessageParts.js.map +1 -1
  77. package/dist/primitives/message/MessagePartsGrouped.js.map +1 -1
  78. package/dist/primitives/message/MessageRoot.d.ts.map +1 -1
  79. package/dist/primitives/messagePart/MessagePartImage.d.ts.map +1 -1
  80. package/dist/primitives/messagePart/MessagePartText.d.ts.map +1 -1
  81. package/dist/primitives/messagePart/MessagePartText.js.map +1 -1
  82. package/dist/primitives/messagePart/useMessagePartData.d.ts +3 -2
  83. package/dist/primitives/messagePart/useMessagePartData.d.ts.map +1 -1
  84. package/dist/primitives/messagePart/useMessagePartData.js +3 -2
  85. package/dist/primitives/messagePart/useMessagePartData.js.map +1 -1
  86. package/dist/primitives/messagePart/useMessagePartFile.d.ts +5 -4
  87. package/dist/primitives/messagePart/useMessagePartFile.d.ts.map +1 -1
  88. package/dist/primitives/messagePart/useMessagePartFile.js +11 -3
  89. package/dist/primitives/messagePart/useMessagePartFile.js.map +1 -1
  90. package/dist/primitives/messagePart/useMessagePartImage.d.ts +5 -4
  91. package/dist/primitives/messagePart/useMessagePartImage.d.ts.map +1 -1
  92. package/dist/primitives/messagePart/useMessagePartImage.js +10 -3
  93. package/dist/primitives/messagePart/useMessagePartImage.js.map +1 -1
  94. package/dist/primitives/messagePart/useMessagePartReasoning.d.ts +5 -4
  95. package/dist/primitives/messagePart/useMessagePartReasoning.d.ts.map +1 -1
  96. package/dist/primitives/messagePart/useMessagePartReasoning.js +10 -3
  97. package/dist/primitives/messagePart/useMessagePartReasoning.js.map +1 -1
  98. package/dist/primitives/messagePart/useMessagePartSource.d.ts +6 -4
  99. package/dist/primitives/messagePart/useMessagePartSource.d.ts.map +1 -1
  100. package/dist/primitives/messagePart/useMessagePartSource.js +12 -3
  101. package/dist/primitives/messagePart/useMessagePartSource.js.map +1 -1
  102. package/dist/primitives/messagePart/useMessagePartText.d.ts +6 -5
  103. package/dist/primitives/messagePart/useMessagePartText.d.ts.map +1 -1
  104. package/dist/primitives/messagePart/useMessagePartText.js +10 -3
  105. package/dist/primitives/messagePart/useMessagePartText.js.map +1 -1
  106. package/dist/primitives/queueItem/QueueItemRemove.d.ts.map +1 -1
  107. package/dist/primitives/queueItem/QueueItemSteer.d.ts.map +1 -1
  108. package/dist/primitives/queueItem/QueueItemText.d.ts.map +1 -1
  109. package/dist/primitives/queueItem/QueueItemText.js.map +1 -1
  110. package/dist/primitives/selectionToolbar/SelectionToolbarQuote.d.ts.map +1 -1
  111. package/dist/primitives/selectionToolbar/SelectionToolbarRoot.d.ts.map +1 -1
  112. package/dist/primitives/selectionToolbar/SelectionToolbarRoot.js.map +1 -1
  113. package/dist/primitives/suggestion/SuggestionDescription.d.ts.map +1 -1
  114. package/dist/primitives/suggestion/SuggestionDescription.js.map +1 -1
  115. package/dist/primitives/suggestion/SuggestionTitle.d.ts.map +1 -1
  116. package/dist/primitives/suggestion/SuggestionTitle.js.map +1 -1
  117. package/dist/primitives/suggestion/SuggestionTrigger.d.ts.map +1 -1
  118. package/dist/primitives/thread/ThreadRoot.d.ts.map +1 -1
  119. package/dist/primitives/thread/ThreadScrollToBottom.d.ts.map +1 -1
  120. package/dist/primitives/thread/ThreadSuggestion.d.ts.map +1 -1
  121. package/dist/primitives/thread/ThreadViewport.d.ts.map +1 -1
  122. package/dist/primitives/thread/ThreadViewport.js +53 -19
  123. package/dist/primitives/thread/ThreadViewport.js.map +1 -1
  124. package/dist/primitives/thread/ThreadViewportFooter.d.ts.map +1 -1
  125. package/dist/primitives/thread/topAnchor/createReserveObservers.d.ts.map +1 -1
  126. package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.d.ts +4 -0
  127. package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.d.ts.map +1 -1
  128. package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js +14 -1
  129. package/dist/primitives/thread/topAnchor/mountTopAnchorReserve.js.map +1 -1
  130. package/dist/primitives/thread/topAnchor/topAnchorTurn.d.ts +13 -1
  131. package/dist/primitives/thread/topAnchor/topAnchorTurn.d.ts.map +1 -1
  132. package/dist/primitives/thread/topAnchor/topAnchorTurn.js +14 -1
  133. package/dist/primitives/thread/topAnchor/topAnchorTurn.js.map +1 -1
  134. package/dist/primitives/thread/useThreadViewportAutoScroll.js +2 -1
  135. package/dist/primitives/thread/useThreadViewportAutoScroll.js.map +1 -1
  136. package/dist/primitives/threadList/ThreadListLoadMore.d.ts.map +1 -1
  137. package/dist/primitives/threadList/ThreadListNew.d.ts.map +1 -1
  138. package/dist/primitives/threadList/ThreadListRoot.d.ts.map +1 -1
  139. package/dist/primitives/threadList/ThreadListRoot.js.map +1 -1
  140. package/dist/primitives/threadListFocusGroup.d.ts.map +1 -1
  141. package/dist/primitives/threadListItem/ThreadListItemArchive.d.ts.map +1 -1
  142. package/dist/primitives/threadListItem/ThreadListItemDelete.d.ts.map +1 -1
  143. package/dist/primitives/threadListItem/ThreadListItemRoot.d.ts.map +1 -1
  144. package/dist/primitives/threadListItem/ThreadListItemRoot.js.map +1 -1
  145. package/dist/primitives/threadListItem/ThreadListItemTrigger.d.ts.map +1 -1
  146. package/dist/primitives/threadListItem/ThreadListItemTrigger.js.map +1 -1
  147. package/dist/primitives/threadListItem/ThreadListItemUnarchive.d.ts.map +1 -1
  148. package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts.map +1 -1
  149. package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js.map +1 -1
  150. package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts.map +1 -1
  151. package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js.map +1 -1
  152. package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts.map +1 -1
  153. package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts.map +1 -1
  154. package/dist/tests/setup.d.ts +1 -1
  155. package/dist/utils/Primitive.d.ts.map +1 -1
  156. package/dist/utils/Primitive.js.map +1 -1
  157. package/dist/utils/createActionButton.d.ts.map +1 -1
  158. package/package.json +20 -20
  159. package/src/client/ExternalThread.ts +2 -1
  160. package/src/model-context/makeAssistantVisible.test.tsx +146 -0
  161. package/src/model-context/makeAssistantVisible.tsx +18 -1
  162. package/src/primitives/composer/ComposerRoot.test.tsx +226 -5
  163. package/src/primitives/composer/ComposerRoot.tsx +50 -1
  164. package/src/primitives/messagePart/useMessagePartData.ts +3 -2
  165. package/src/primitives/messagePart/useMessagePartFile.ts +19 -7
  166. package/src/primitives/messagePart/useMessagePartImage.ts +18 -7
  167. package/src/primitives/messagePart/useMessagePartReasoning.ts +15 -6
  168. package/src/primitives/messagePart/useMessagePartSource.ts +20 -7
  169. package/src/primitives/messagePart/useMessagePartText.ts +15 -5
  170. package/src/primitives/thread/ThreadViewport.tsx +15 -0
  171. package/src/primitives/thread/topAnchor/mountTopAnchorReserve.test.ts +243 -0
  172. package/src/primitives/thread/topAnchor/mountTopAnchorReserve.ts +28 -7
  173. package/src/primitives/thread/topAnchor/topAnchorTurn.test.ts +69 -0
  174. package/src/primitives/thread/topAnchor/topAnchorTurn.ts +29 -0
  175. package/src/primitives/thread/useThreadViewportAutoScroll.test.tsx +86 -1
  176. package/src/primitives/thread/useThreadViewportAutoScroll.ts +6 -1
  177. package/src/tests/BaseComposerRuntimeCore.test.ts +12 -3
  178. package/src/tests/external-thread-attachments.test.tsx +81 -0
  179. package/src/tests/messagePartSwitchRace.test.tsx +158 -0
  180. package/src/tests/messagePartTypeMismatch.test.tsx +146 -0
@@ -1 +1 @@
1
- {"version":3,"file":"BranchPickerNext.d.ts","names":[],"sources":["../../../src/primitives/branchPicker/BranchPickerNext.ts"],"mappings":";;cASM;kBAMW;OACH,UAAU;;;;;OAKV,QAAQ,yBAAyB;;;;;;;;;;;;;;;cAgBlC,2CAAyB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"BranchPickerNext.d.ts","names":[],"sources":["../../../src/primitives/branchPicker/BranchPickerNext.ts"],"mappings":";;cASM;kBAMW;OACH,UAAU;;;;;OAKV,QAAQ,yBAAyB;;;;;;;;;;;;;;;cAgBlC,2CAAyB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAGrC,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BranchPickerPrevious.d.ts","names":[],"sources":["../../../src/primitives/branchPicker/BranchPickerPrevious.ts"],"mappings":";;cASM;kBAMW;OACH,UAAU;;;;;OAKV,QAAQ,yBAAyB;;;;;;;;;;;;;;;cAgBlC,+CAA6B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"BranchPickerPrevious.d.ts","names":[],"sources":["../../../src/primitives/branchPicker/BranchPickerPrevious.ts"],"mappings":";;cASM;kBAMW;OACH,UAAU;;;;;OAKV,QAAQ,yBAAyB;;;;;;;;;;;;;;;cAgBlC,+CAA6B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAGzC,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BranchPickerRoot.d.ts","names":[],"sources":["../../../src/primitives/branchPicker/BranchPickerRoot.tsx"],"mappings":";;;kBAUiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;IAM5D;;;;;;;;;;;;;;;;;;;;cAqBS,2CAAyB,0BAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA"}
1
+ {"version":3,"file":"BranchPickerRoot.d.ts","names":[],"sources":["../../../src/primitives/branchPicker/BranchPickerRoot.tsx"],"mappings":";;;kBAUiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;IAM5D;;;;;;;;;;;;;;;;;;;;cAqBS,2CAAyB,0BAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA;;;;;;;;;;EArBX;oBA8BzB,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BranchPickerRoot.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","MessagePrimitiveIf","If","BranchPickerPrimitiveRoot","Element","div","Props","hideWhenSingleBranch","t0","ref","$","rest","t1","undefined","t2","t3","displayName"],"sources":["../../../src/primitives/branchPicker/BranchPickerRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { MessagePrimitiveIf as If } from \"../message/MessageIf\";\n\nexport namespace BranchPickerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n /**\n * Whether to hide the branch picker when there's only one branch available.\n * When true, the component will only render when multiple branches exist.\n * @default false\n */\n hideWhenSingleBranch?: boolean | undefined;\n };\n}\n\n/**\n * The root container for branch picker components.\n *\n * This component provides a container for branch navigation controls,\n * with optional conditional rendering based on the number of available branches.\n * It integrates with the message branching system to allow users to navigate\n * between different response variations.\n *\n * @example\n * ```tsx\n * <BranchPickerPrimitive.Root hideWhenSingleBranch={true}>\n * <BranchPickerPrimitive.Previous />\n * <BranchPickerPrimitive.Count />\n * <BranchPickerPrimitive.Next />\n * </BranchPickerPrimitive.Root>\n * ```\n */\nexport const BranchPickerPrimitiveRoot = forwardRef<\n BranchPickerPrimitiveRoot.Element,\n BranchPickerPrimitiveRoot.Props\n>(({ hideWhenSingleBranch, ...rest }, ref) => {\n return (\n <If hasBranches={hideWhenSingleBranch ? true : undefined}>\n <Primitive.div {...rest} ref={ref} />\n </If>\n );\n});\n\nBranchPickerPrimitiveRoot.displayName = \"BranchPickerPrimitive.Root\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAaQ,4BAA4BJ,YAGvCS,IAAAC,QAAA;CAAA,MAAAC,IAAAd,EAAA,CAAA;CAAA,IAAAW;CAAA,IAAAI;CAAA,IAAAD,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,yBAAAI,QAAAH;EAAiCE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAC;CAAA,OAAA;EAAAJ,uBAAAG,EAAA;EAAAC,OAAAD,EAAA;CAAA;CAEf,MAAAE,KAAAL,uBAAA,OAAAM,KAAAA;CAAuC,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,OAAAC,EAAA,OAAAC,MAAA;EACtDG,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBH;GAAWF;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAE,MAAAF,EAAA,OAAAI,IAAA;EADvCC,KAAA,oBAAC,oBAAD;GAAiB,aAAAH;aACfE;EADC,CAAA;EAEEJ,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFLK;AAEK,CAER;AAEDZ,0BAA0Ba,cAAc"}
1
+ {"version":3,"file":"BranchPickerRoot.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","MessagePrimitiveIf","If","BranchPickerPrimitiveRoot","Element","div","Props","hideWhenSingleBranch","t0","ref","$","rest","t1","undefined","t2","t3","displayName"],"sources":["../../../src/primitives/branchPicker/BranchPickerRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { MessagePrimitiveIf as If } from \"../message/MessageIf\";\n\nexport namespace BranchPickerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div> & {\n /**\n * Whether to hide the branch picker when there's only one branch available.\n * When true, the component will only render when multiple branches exist.\n * @default false\n */\n hideWhenSingleBranch?: boolean | undefined;\n };\n}\n\n/**\n * The root container for branch picker components.\n *\n * This component provides a container for branch navigation controls,\n * with optional conditional rendering based on the number of available branches.\n * It integrates with the message branching system to allow users to navigate\n * between different response variations.\n *\n * @example\n * ```tsx\n * <BranchPickerPrimitive.Root hideWhenSingleBranch={true}>\n * <BranchPickerPrimitive.Previous />\n * <BranchPickerPrimitive.Count />\n * <BranchPickerPrimitive.Next />\n * </BranchPickerPrimitive.Root>\n * ```\n */\nexport const BranchPickerPrimitiveRoot = forwardRef<\n BranchPickerPrimitiveRoot.Element,\n BranchPickerPrimitiveRoot.Props\n>(({ hideWhenSingleBranch, ...rest }, ref) => {\n return (\n <If hasBranches={hideWhenSingleBranch ? true : undefined}>\n <Primitive.div {...rest} ref={ref} />\n </If>\n );\n});\n\nBranchPickerPrimitiveRoot.displayName = \"BranchPickerPrimitive.Root\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAaQ,4BAA4BJ,YAGvCS,IAAAC,QAAA;CAAA,MAAAC,IAAAd,EAAA,CAAA;CAAA,IAAAW;CAAA,IAAAI;CAAA,IAAAD,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,yBAAAI,QAAAH;EAAiCE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAC;CAAA,OAAA;EAAAJ,uBAAAG,EAAA;EAAAC,OAAAD,EAAA;CAAA;CAEf,MAAAE,KAAAL,uBAAA,OAAAM,KAAAA;CAAuC,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,OAAAC,EAAA,OAAAC,MAAA;EACtDG,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBH;GAAWF;EAAG,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAK;CAAA,IAAAL,EAAA,OAAAE,MAAAF,EAAA,OAAAI,IAAA;EADvCC,KAAA,oBAAC,oBAAD;GAAiB,aAAAH;GACfE,UAAAA;EADC,CAAA;EAEEJ,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,OAFLK;AAEK,CAER;AAEDZ,0BAA0Ba,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChainOfThoughtAccordionTrigger.d.ts","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.ts"],"mappings":";;cAUM;kBAWW;OACH,UAAU;;;;;OAKV,QAAQ,yBACX;;;;;;;;;;;;;;;cAiBE,yDAAuC,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"ChainOfThoughtAccordionTrigger.d.ts","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtAccordionTrigger.ts"],"mappings":";;cAUM;kBAWW;OACH,UAAU;;;;;OAKV,QAAQ,yBACX;;;;;;;;;;;;;;;cAiBE,yDAAuC,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAGnD,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChainOfThoughtRoot.d.ts","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtRoot.tsx"],"mappings":";;;KASK,oBAAoB,gCAAgC,UAAU;kBAElD;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ;;;;;;;;;;;;;;;;;;cAmBT,6CAA2B,0BAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA"}
1
+ {"version":3,"file":"ChainOfThoughtRoot.d.ts","names":[],"sources":["../../../src/primitives/chainOfThought/ChainOfThoughtRoot.tsx"],"mappings":";;;KASK,oBAAoB,gCAAgC,UAAU;kBAElD;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ;;;;;;;;;;;;;;;;;;cAmBT,6CAA2B,0BAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA;;;;oBAKtC,cAAA,0CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerAddAttachment.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerAddAttachment.ts"],"mappings":";;cAWM,6BAA4B;;EAIhC;;kBAyCe;OACH,UAAU;OACV,QAAQ,yBAAyB;;cAGlC,gDAA8B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"ComposerAddAttachment.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerAddAttachment.ts"],"mappings":";;cAWM,6BAA4B;;EAIhC;;kBAyCe;OACH,UAAU;OACV,QAAQ,yBAAyB;;cAGlC,gDAA8B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;;;EA9C9B;oBAkDZ,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerAttachmentDropzone.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"mappings":";;kBAgBiB;OACH,UAAU;OACV,QAAQ,MAAM,eAAe;IACvC;IACA,SAAS;IACT;;;cAIS,qCAAmC,MAAA,0BAAA,MAAA,eAAA;;WALnC"}
1
+ {"version":3,"file":"ComposerAttachmentDropzone.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"mappings":";;kBAgBiB;OACH,UAAU;OACV,QAAQ,MAAM,eAAe;IACvC;IACA,SAAS;IACT;;;cAIS,qCAAmC,MAAA,0BAAA,MAAA,eAAA;EANlC;EACD,SAAA;EACE;IA8Fb,MAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerAttachmentDropzone.js","names":["c","_c","forwardRef","useCallback","useState","ReactElement","cloneElement","isValidElement","composeEventHandlers","Slot","React","useAui","ComposerPrimitiveAttachmentDropzone","Element","HTMLDivElement","Props","HTMLAttributes","asChild","render","disabled","t0","ref","$","t1","children","rest","undefined","isDragging","setIsDragging","aui","t2","e","preventDefault","handleDragEnterCapture","t3","e_0","handleDragOverCapture","t4","e_1","next","relatedTarget","Node","currentTarget","contains","handleDragLeaveCapture","t5","e_2","files","Array","from","dataTransfer","Promise","all","map","file","composer","addAttachment","t6","error","console","handleDrop","t7","onDragEnterCapture","t8","onDragOverCapture","t9","onDragLeaveCapture","t10","onDropCapture","t11","mergedProps","renderChildren","props","Record","t12","ReactNode","t13","t14","Comp","Root","displayName"],"sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n forwardRef,\n useCallback,\n useState,\n type ReactElement,\n cloneElement,\n isValidElement,\n} from \"react\";\n\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Slot } from \"radix-ui\";\nimport type React from \"react\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport namespace ComposerPrimitiveAttachmentDropzone {\n export type Element = HTMLDivElement;\n export type Props = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean | undefined;\n render?: ReactElement | undefined;\n disabled?: boolean | undefined;\n };\n}\n\nexport const ComposerPrimitiveAttachmentDropzone = forwardRef<\n HTMLDivElement,\n ComposerPrimitiveAttachmentDropzone.Props\n>(({ disabled, asChild = false, render, children, ...rest }, ref) => {\n const [isDragging, setIsDragging] = useState(false);\n const aui = useAui();\n\n const handleDragEnterCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n setIsDragging(true);\n },\n [disabled],\n );\n\n const handleDragOverCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n if (!isDragging) setIsDragging(true);\n },\n [disabled, isDragging],\n );\n\n const handleDragLeaveCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n const next = e.relatedTarget as Node | null;\n if (next && e.currentTarget.contains(next)) {\n return;\n }\n setIsDragging(false);\n },\n [disabled],\n );\n\n const handleDrop = useCallback(\n async (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n setIsDragging(false);\n const files = Array.from(e.dataTransfer.files);\n await Promise.all(\n files.map(async (file) => {\n try {\n await aui.composer().addAttachment(file);\n } catch (error) {\n console.error(\"Failed to add attachment:\", error);\n }\n }),\n );\n },\n [disabled, aui],\n );\n\n const mergedProps = {\n ...(isDragging ? { \"data-dragging\": \"true\" } : null),\n ...rest,\n onDragEnterCapture: composeEventHandlers(\n rest.onDragEnterCapture,\n handleDragEnterCapture,\n ),\n onDragOverCapture: composeEventHandlers(\n rest.onDragOverCapture,\n handleDragOverCapture,\n ),\n onDragLeaveCapture: composeEventHandlers(\n rest.onDragLeaveCapture,\n handleDragLeaveCapture,\n ),\n onDropCapture: composeEventHandlers(rest.onDropCapture, handleDrop),\n ref,\n };\n\n if (render && isValidElement(render)) {\n const renderChildren =\n children !== undefined\n ? children\n : (render.props as Record<string, unknown>).children;\n return (\n <Slot.Root {...mergedProps}>\n {cloneElement(render, undefined, renderChildren as React.ReactNode)}\n </Slot.Root>\n );\n }\n\n const Comp = asChild ? Slot.Root : \"div\";\n return <Comp {...mergedProps}>{children}</Comp>;\n});\n\nComposerPrimitiveAttachmentDropzone.displayName =\n \"ComposerPrimitive.AttachmentDropzone\";\n"],"mappings":";;;;;;;;AAyBA,MAAaY,sCAAsCV,YAGjDkB,IAAAC,QAAA;CAAA,MAAAC,IAAArB,EAAA,EAAA;CAAC,MAAA,EAAAkB,UAAAF,SAAAM,IAAAL,QAAAM,UAAA,GAAAC,SAAAL;CAAY,MAAAH,UAAAM,OAAAG,KAAAA,IAAA,QAAAH;CACb,MAAA,CAAAI,YAAAC,iBAAoCxB,SAAS,KAAK;CAClD,MAAAyB,MAAYlB,OAAO;CAAE,IAAAmB;CAAA,IAAAR,EAAA,OAAAH,UAAA;EAGnBW,MAAAC,MAAA;GACE,IAAIZ,UAAQ;GACZY,EAACC,eAAgB;GACjBJ,cAAc,IAAI;EAAC;EACpBN,EAAA,KAAAH;EAAAG,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CALH,MAAAW,yBAA+BH;CAO7B,IAAAI;CAAA,IAAAZ,EAAA,OAAAH,YAAAG,EAAA,OAAAK,YAAA;EAGAO,MAAAC,QAAA;GACE,IAAIhB,UAAQ;GACZY,IAACC,eAAgB;GACjB,IAAI,CAACL,YAAYC,cAAc,IAAI;EAAE;EACtCN,EAAA,KAAAH;EAAAG,EAAA,KAAAK;E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L;CAAA,IAAApD,EAAA,QAAAwD,QAAAxD,EAAA,QAAAE,YAAAF,EAAA,QAAAgD,aAAA;EAClCI,MAAA,oBAAC,MAAD;GAAK,GAAKJ;GAAc9C;EAAnB,CAAA;EAAmCF,EAAA,MAAAwD;EAAAxD,EAAA,MAAAE;EAAAF,EAAA,MAAAgD;EAAAhD,EAAA,MAAAoD;CAAA,OAAAA,MAAApD,EAAA;CAAA,OAAxCoD;AAAwC,CAChD;AAED9D,oCAAoCoE,cAClC"}
1
+ {"version":3,"file":"ComposerAttachmentDropzone.js","names":["c","_c","forwardRef","useCallback","useState","ReactElement","cloneElement","isValidElement","composeEventHandlers","Slot","React","useAui","ComposerPrimitiveAttachmentDropzone","Element","HTMLDivElement","Props","HTMLAttributes","asChild","render","disabled","t0","ref","$","t1","children","rest","undefined","isDragging","setIsDragging","aui","t2","e","preventDefault","handleDragEnterCapture","t3","e_0","handleDragOverCapture","t4","e_1","next","relatedTarget","Node","currentTarget","contains","handleDragLeaveCapture","t5","e_2","files","Array","from","dataTransfer","Promise","all","map","file","composer","addAttachment","t6","error","console","handleDrop","t7","onDragEnterCapture","t8","onDragOverCapture","t9","onDragLeaveCapture","t10","onDropCapture","t11","mergedProps","renderChildren","props","Record","t12","ReactNode","t13","t14","Comp","Root","displayName"],"sources":["../../../src/primitives/composer/ComposerAttachmentDropzone.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n forwardRef,\n useCallback,\n useState,\n type ReactElement,\n cloneElement,\n isValidElement,\n} from \"react\";\n\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Slot } from \"radix-ui\";\nimport type React from \"react\";\nimport { useAui } from \"@assistant-ui/store\";\n\nexport namespace ComposerPrimitiveAttachmentDropzone {\n export type Element = HTMLDivElement;\n export type Props = React.HTMLAttributes<HTMLDivElement> & {\n asChild?: boolean | undefined;\n render?: ReactElement | undefined;\n disabled?: boolean | undefined;\n };\n}\n\nexport const ComposerPrimitiveAttachmentDropzone = forwardRef<\n HTMLDivElement,\n ComposerPrimitiveAttachmentDropzone.Props\n>(({ disabled, asChild = false, render, children, ...rest }, ref) => {\n const [isDragging, setIsDragging] = useState(false);\n const aui = useAui();\n\n const handleDragEnterCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n setIsDragging(true);\n },\n [disabled],\n );\n\n const handleDragOverCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n if (!isDragging) setIsDragging(true);\n },\n [disabled, isDragging],\n );\n\n const handleDragLeaveCapture = useCallback(\n (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n const next = e.relatedTarget as Node | null;\n if (next && e.currentTarget.contains(next)) {\n return;\n }\n setIsDragging(false);\n },\n [disabled],\n );\n\n const handleDrop = useCallback(\n async (e: React.DragEvent) => {\n if (disabled) return;\n e.preventDefault();\n setIsDragging(false);\n const files = Array.from(e.dataTransfer.files);\n await Promise.all(\n files.map(async (file) => {\n try {\n await aui.composer().addAttachment(file);\n } catch (error) {\n console.error(\"Failed to add attachment:\", error);\n }\n }),\n );\n },\n [disabled, aui],\n );\n\n const mergedProps = {\n ...(isDragging ? { \"data-dragging\": \"true\" } : null),\n ...rest,\n onDragEnterCapture: composeEventHandlers(\n rest.onDragEnterCapture,\n handleDragEnterCapture,\n ),\n onDragOverCapture: composeEventHandlers(\n rest.onDragOverCapture,\n handleDragOverCapture,\n ),\n onDragLeaveCapture: composeEventHandlers(\n rest.onDragLeaveCapture,\n handleDragLeaveCapture,\n ),\n onDropCapture: composeEventHandlers(rest.onDropCapture, handleDrop),\n ref,\n };\n\n if (render && isValidElement(render)) {\n const renderChildren =\n children !== undefined\n ? children\n : (render.props as Record<string, unknown>).children;\n return (\n <Slot.Root {...mergedProps}>\n {cloneElement(render, undefined, renderChildren as React.ReactNode)}\n </Slot.Root>\n );\n }\n\n const Comp = asChild ? Slot.Root : \"div\";\n return <Comp {...mergedProps}>{children}</Comp>;\n});\n\nComposerPrimitiveAtt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,yBAAyB;;;;;;;;;;;;;;;cAgBlC,yCAAuB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"ComposerCancel.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerCancel.ts"],"mappings":";;cASM;kBAMW;OACH,UAAU;;;;;OAKV,QAAQ,yBAAyB;;;;;;;;;;;;;;;cAgBlC,yCAAuB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAGnC,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerDictate.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerDictate.ts"],"mappings":";;cASM;kBAMW;OACH,UAAU;OACV,QAAQ,yBAAyB;;;;;;;;;;;;;;cAelC,0CAAwB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"ComposerDictate.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerDictate.ts"],"mappings":";;cASM;kBAMW;OACH,UAAU;OACV,QAAQ,yBAAyB;;;;;;;;;;;;;;cAelC,0CAAwB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAGpC,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerDictationTranscript.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerDictationTranscript.tsx"],"mappings":";;;kBAUiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;;;;;;;;cAkBnD,sDAAoC,0BAAA,KAAA,qBAAA,gBAAA,mCAAA,eAAA"}
1
+ {"version":3,"file":"ComposerDictationTranscript.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerDictationTranscript.tsx"],"mappings":";;;kBAUiB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;;;;;;;;cAkBnD,sDAAoC,0BAAA,KAAA,qBAAA,gBAAA,mCAAA,eAAA;;;;oBAa/C,cAAA,2CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerDictationTranscript.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","useAuiState","ComposerPrimitiveDictationTranscript","Element","span","Props","t0","$","children","props","transcript","_temp","t1","t2","displayName","s","composer","dictation"],"sources":["../../../src/primitives/composer/ComposerDictationTranscript.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace ComposerPrimitiveDictationTranscript {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\n/**\n * Renders the current interim (partial) transcript while dictation is active.\n *\n * This component displays real-time feedback of what the user is saying before\n * the transcription is finalized and committed to the composer input.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.If dictation>\n * <div className=\"dictation-preview\">\n * <ComposerPrimitive.DictationTranscript />\n * </div>\n * </ComposerPrimitive.If>\n * ```\n */\nexport const ComposerPrimitiveDictationTranscript = forwardRef<\n ComposerPrimitiveDictationTranscript.Element,\n ComposerPrimitiveDictationTranscript.Props\n>(({ children, ...props }, forwardRef) => {\n const transcript = useAuiState((s) => s.composer.dictation?.transcript);\n\n if (!transcript) return null;\n\n return (\n <Primitive.span {...props} ref={forwardRef}>\n {children ?? transcript}\n </Primitive.span>\n );\n});\n\nComposerPrimitiveDictationTranscript.displayName =\n \"ComposerPrimitive.DictationTranscript\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAaO,uCAAuCH,YAGlDO,IAAAP,eAAA;CAAA,MAAAQ,IAAAX,EAAA,CAAA;CAAA,IAAAY;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAE,aAAAC,SAAAH;EAAsBC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,WAAAD,EAAA;EAAAE,QAAAF,EAAA;CAAA;CACvB,MAAAG,aAAmBT,YAAYU,KAAuC;CAEtE,IAAI,CAACD,YAAU,OAAS;CAInB,MAAAE,KAAAJ,YAAAE;CAAsB,IAAAG;CAAA,IAAAN,EAAA,OAAAR,cAAAQ,EAAA,OAAAE,SAAAF,EAAA,OAAAK,IAAA;EADzBC,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBJ;GAAYV,KAAAA;aAC7Ba;EACH,CAAA;EAAiBL,EAAA,KAAAR;EAAAQ,EAAA,KAAAE;EAAAF,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDX,qCAAqCY,cACnC;AAbA,SAAAH,MAAAI,GAAA;CAAA,OACsCA,EAACC,SAASC,WAAsBP;AAAA"}
1
+ {"version":3,"file":"ComposerDictationTranscript.js","names":["c","_c","Primitive","ComponentRef","forwardRef","ComponentPropsWithoutRef","useAuiState","ComposerPrimitiveDictationTranscript","Element","span","Props","t0","$","children","props","transcript","_temp","t1","t2","displayName","s","composer","dictation"],"sources":["../../../src/primitives/composer/ComposerDictationTranscript.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n forwardRef,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace ComposerPrimitiveDictationTranscript {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\n/**\n * Renders the current interim (partial) transcript while dictation is active.\n *\n * This component displays real-time feedback of what the user is saying before\n * the transcription is finalized and committed to the composer input.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.If dictation>\n * <div className=\"dictation-preview\">\n * <ComposerPrimitive.DictationTranscript />\n * </div>\n * </ComposerPrimitive.If>\n * ```\n */\nexport const ComposerPrimitiveDictationTranscript = forwardRef<\n ComposerPrimitiveDictationTranscript.Element,\n ComposerPrimitiveDictationTranscript.Props\n>(({ children, ...props }, forwardRef) => {\n const transcript = useAuiState((s) => s.composer.dictation?.transcript);\n\n if (!transcript) return null;\n\n return (\n <Primitive.span {...props} ref={forwardRef}>\n {children ?? transcript}\n </Primitive.span>\n );\n});\n\nComposerPrimitiveDictationTranscript.displayName =\n \"ComposerPrimitive.DictationTranscript\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAaO,uCAAuCH,YAGlDO,IAAAP,eAAA;CAAA,MAAAQ,IAAAX,EAAA,CAAA;CAAA,IAAAY;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAAC,CAAA,CAAAE,aAAAC,SAAAH;EAAsBC,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAD,WAAAD,EAAA;EAAAE,QAAAF,EAAA;CAAA;CACvB,MAAAG,aAAmBT,YAAYU,KAAuC;CAEtE,IAAI,CAACD,YAAU,OAAS;CAInB,MAAAE,KAAAJ,YAAAE;CAAsB,IAAAG;CAAA,IAAAN,EAAA,OAAAR,cAAAQ,EAAA,OAAAE,SAAAF,EAAA,OAAAK,IAAA;EADzBC,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBJ;GAAYV,KAAAA;GAC7Ba,UAAAA;EACH,CAAA;EAAiBL,EAAA,KAAAR;EAAAQ,EAAA,KAAAE;EAAAF,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDX,qCAAqCY,cACnC;AAbA,SAAAH,MAAAI,GAAA;CAAA,OACsCA,EAACC,SAASC,WAAsBP;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerInput.js","names":["composeEventHandlers","useComposedRefs","Slot","ClipboardEvent","KeyboardEvent","ReactElement","ReactNode","forwardRef","useCallback","useEffect","useRef","cloneElement","isValidElement","TextareaAutosize","TextareaAutosizeProps","TextareaHeightChangeMeta","useEscapeKeydown","useOnScrollToBottom","useMediaQuery","useAui","flushTapSync","useComposerInputPluginRegistryOptional","useComposerCompactContextOptional","useComposerInputDisabled","useComposerInputValue","useTriggerPopoverAriaProps","TOUCH_PRIMARY_QUERY","ComposerPrimitiveInput","Element","HTMLTextAreaElement","BaseProps","asChild","render","cancelOnEscape","unstable_focusOnRunStart","unstable_focusOnScrollToBottom","unstable_focusOnThreadSwitched","unstable_insertNewlineOnTouchEnter","addAttachmentOnPaste","SubmitModeProps","submitMode","submitOnEnter","Props","autoFocus","disabled","disabledProp","onChange","onKeyDown","onPaste","onSelect","onHeightChange","rest","forwardedRef","aui","pluginRegistry","compactContext","declaredSubmitMode","isTouchPrimary","effectiveSubmitMode","value","isDisabled","textareaRef","ref","compositionRef","e","current","contains","target","Node","plugin","getPlugins","handleKeyDown","composer","getState","canCancel","cancel","preventDefault","handleKeyPress","nativeEvent","isComposing","key","threadState","thread","hasQueue","capabilities","queue","shiftKey","ctrlKey","metaKey","canSend","send","steer","isRunning","shouldSubmit","closest","requestSubmit","handlePaste","threadCapabilities","files","Array","from","clipboardData","attachments","length","Promise","all","map","file","addAttachment","error","console","handleHeightChange","height","meta","el","cs","getComputedStyle","contentHeight","boxSizing","parseFloat","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","Math","round","rowHeight","setMultiline","autoFocusEnabled","focus","textarea","preventScroll","setSelectionRange","type","undefined","on","ariaComboboxProps","inputProps","name","const","React","ForwardedRef","ChangeEvent","isEditing","nativeIsComposing","setText","pos","selectionStart","setCursorPosition","onCompositionStart","CompositionEventHandler","onCompositionEnd","CompositionEvent","SyntheticEvent","renderChildren","children","props","Record","Component","Root","displayName"],"sources":["../../../src/primitives/composer/ComposerInput.tsx"],"sourcesContent":["\"use client\";\n\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Slot } from \"radix-ui\";\nimport {\n type ClipboardEvent,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n cloneElement,\n isValidElement,\n} from \"react\";\nimport TextareaAutosize, {\n type TextareaAutosizeProps,\n type TextareaHeightChangeMeta,\n} from \"react-textarea-autosize\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { useOnScrollToBottom } from \"../../utils/hooks/useOnScrollToBottom\";\nimport { useMediaQuery } from \"../../utils/hooks/useMediaQuery\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { flushTapSync } from \"@assistant-ui/tap\";\nimport { useComposerInputPluginRegistryOptional } from \"./ComposerInputPluginContext\";\nimport { useComposerCompactContextOptional } from \"./ComposerCompactContext\";\nimport {\n useComposerInputDisabled,\n useComposerInputValue,\n useTriggerPopoverAriaProps,\n} from \"./useComposerInputState\";\n\nconst TOUCH_PRIMARY_QUERY = \"(pointer: coarse) and (not (any-pointer: fine))\";\n\nexport namespace ComposerPrimitiveInput {\n export type Element = HTMLTextAreaElement;\n\n type BaseProps = {\n /**\n * Whether to render as a child component using Slot.\n * When true, the component will merge its props with its child.\n */\n asChild?: boolean | undefined;\n /**\n * A React element to use as the input container, with props merged in.\n */\n render?: ReactElement | undefined;\n /**\n * Whether to cancel message composition when Escape is pressed.\n * @default true\n */\n cancelOnEscape?: boolean | undefined;\n /**\n * Whether to automatically focus the input when a new run starts.\n * @default true\n */\n unstable_focusOnRunStart?: boolean | undefined;\n /**\n * Whether to automatically focus the input when scrolling to bottom.\n * @default true\n */\n unstable_focusOnScrollToBottom?: boolean | undefined;\n /**\n * Whether to automatically focus the input when switching threads.\n * @default true\n */\n unstable_focusOnThreadSwitched?: boolean | undefined;\n /**\n * Whether plain Enter on a touch-primary device should insert a newline\n * instead of submitting, detected via\n * `(pointer: coarse) and (not (any-pointer: fine))`. Only takes effect\n * when `submitMode` resolves to `\"enter\"`.\n * @default false\n */\n unstable_insertNewlineOnTouchEnter?: boolean | undefined;\n /**\n * Whether to automatically add pasted files as attachments.\n * @default true\n */\n addAttachmentOnPaste?: boolean | undefined;\n };\n\n type SubmitModeProps =\n | {\n /**\n * Controls how the Enter key submits messages.\n * - \"enter\": Plain Enter submits (Shift+Enter for newline)\n * - \"ctrlEnter\": Ctrl/Cmd+Enter submits (plain Enter for newline)\n * - \"none\": Keyboard submission disabled\n * @default \"enter\"\n */\n submitMode?: \"enter\" | \"ctrlEnter\" | \"none\" | undefined;\n /**\n * @deprecated Use `submitMode` instead\n * @ignore\n */\n submitOnEnter?: never;\n }\n | {\n submitMode?: never;\n /**\n * Whether to submit the message when Enter is pressed (without Shift).\n * @default true\n * @deprecated Use `submitMode` instead. Will be removed in a future version.\n */\n submitOnEnter?: boolean | undefined;\n };\n\n export type Props = TextareaAutosizeProps & BaseProps & SubmitModeProps;\n}\n\n/**\n * A text input component for composing messages.\n *\n * This component provides a rich text input experience with automatic resizing,\n * keyboard shortcuts, file paste support, and intelligent focus management.\n * It integrates with the composer context to manage message state and submission.\n *\n * When rendered inside `Unstable_TriggerPopoverRoot` and a popover is open, the\n * underlying `<textarea>` automatically receives `aria-controls`,\n * `aria-expanded`, `aria-haspopup`, and `aria-activedescendant` for the\n * combobox relationship. These computed attributes override user-provided\n * values for those four ARIA props while the popover is open.\n *\n * @example\n * ```tsx\n * // Ctrl/Cmd+Enter to submit (plain Enter inserts newline)\n * <ComposerPrimitive.Input\n * placeholder=\"Type your message...\"\n * submitMode=\"ctrlEnter\"\n * />\n *\n * // Insert a newline on Enter on touch-primary devices.\n * <ComposerPrimitive.Input\n * placeholder=\"Type your message...\"\n * unstable_insertNewlineOnTouchEnter\n * />\n *\n * // Old API (deprecated, still supported)\n * <ComposerPrimitive.Input\n * placeholder=\"Type your message...\"\n * submitOnEnter={true}\n * />\n * ```\n */\nexport const ComposerPrimitiveInput = forwardRef<\n ComposerPrimitiveInput.Element,\n ComposerPrimitiveInput.Props\n>(\n (\n {\n autoFocus = false,\n asChild,\n render,\n disabled: disabledProp,\n onChange,\n onKeyDown,\n onPaste,\n onSelect,\n submitOnEnter,\n submitMode,\n cancelOnEscape = true,\n unstable_focusOnRunStart = true,\n unstable_focusOnScrollToBottom = true,\n unstable_focusOnThreadSwitched = true,\n unstable_insertNewlineOnTouchEnter = false,\n addAttachmentOnPaste = true,\n onHeightChange,\n ...rest\n },\n forwardedRef,\n ) => {\n const aui = useAui();\n const pluginRegistry = useComposerInputPluginRegistryOptional();\n const compactContext = useComposerCompactContextOptional();\n\n const declaredSubmitMode =\n submitMode ?? (submitOnEnter === false ? \"none\" : \"enter\");\n const isTouchPrimary = useMediaQuery(\n unstable_insertNewlineOnTouchEnter ? TOUCH_PRIMARY_QUERY : null,\n );\n const effectiveSubmitMode =\n unstable_insertNewlineOnTouchEnter &&\n isTouchPrimary &&\n declaredSubmitMode === \"enter\"\n ? \"none\"\n : declaredSubmitMode;\n\n const value = useComposerInputValue();\n const isDisabled = useComposerInputDisabled(disabledProp);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const ref = useComposedRefs(forwardedRef, textareaRef);\n // suppress text/cursor broadcasts during IME composition\n const compositionRef = useRef(false);\n\n useEscapeKeydown((e) => {\n // Only handle ESC if it originated from within this input\n if (!textareaRef.current?.contains(e.target as Node)) return;\n\n // Let registered plugins (mention, slash command, etc.) handle Escape first\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n if (plugin.handleKeyDown(e)) return;\n }\n }\n\n if (!cancelOnEscape) return;\n\n const composer = aui.composer();\n if (composer.getState().canCancel) {\n composer.cancel();\n e.preventDefault();\n }\n });\n\n const handleKeyPress = (e: KeyboardEvent) => {\n if (isDisabled) return;\n\n // ignore IME composition events\n if (e.nativeEvent.isComposing) return;\n\n // Let registered plugins (mention, slash command, etc.) handle keyboard events first\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n if (plugin.handleKeyDown(e)) return;\n }\n }\n\n if (e.key === \"Enter\") {\n const threadState = aui.thread().getState();\n const hasQueue = threadState.capabilities.queue;\n\n // Steer hotkey: Cmd/Ctrl+Shift+Enter (respects submitMode=\"none\" and canSend)\n if (\n e.shiftKey &&\n (e.ctrlKey || e.metaKey) &&\n hasQueue &&\n declaredSubmitMode !== \"none\" &&\n aui.composer().getState().canSend\n ) {\n e.preventDefault();\n aui.composer().send({ steer: true });\n return;\n }\n\n // Regular newline: Shift+Enter\n if (e.shiftKey) return;\n\n // Block submission when running unless queue is supported\n if (threadState.isRunning && !hasQueue) return;\n\n let shouldSubmit = false;\n if (effectiveSubmitMode === \"ctrlEnter\") {\n shouldSubmit = e.ctrlKey || e.metaKey;\n } else if (effectiveSubmitMode === \"enter\") {\n shouldSubmit = true;\n }\n\n if (shouldSubmit) {\n e.preventDefault();\n textareaRef.current?.closest(\"form\")?.requestSubmit();\n }\n }\n };\n\n const handlePaste = async (e: ClipboardEvent<HTMLTextAreaElement>) => {\n if (!addAttachmentOnPaste) return;\n const threadCapabilities = aui.thread().getState().capabilities;\n const files = Array.from(e.clipboardData?.files || []);\n\n if (threadCapabilities.attachments && files.length > 0) {\n try {\n e.preventDefault();\n await Promise.all(\n files.map((file) => aui.composer().addAttachment(file)),\n );\n } catch (error) {\n console.error(\"Error adding attachment:\", error);\n }\n }\n };\n\n const handleHeightChange = (\n height: number,\n meta: TextareaHeightChangeMeta,\n ) => {\n onHeightChange?.(height, meta);\n if (!compactContext) return;\n const el = textareaRef.current;\n if (!el || el.value === \"\") return;\n const cs = getComputedStyle(el);\n const contentHeight =\n cs.boxSizing === \"border-box\"\n ? height -\n parseFloat(cs.paddingTop) -\n parseFloat(cs.paddingBottom) -\n parseFloat(cs.borderTopWidth) -\n parseFloat(cs.borderBottomWidth)\n : height;\n if (Math.round(contentHeight / meta.rowHeight) > 1) {\n compactContext.setMultiline(true);\n }\n };\n\n const autoFocusEnabled = autoFocus && !isDisabled;\n const focus = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea || !autoFocusEnabled) return;\n\n textarea.focus({ preventScroll: true });\n textarea.setSelectionRange(textarea.value.length, textarea.value.length);\n }, [autoFocusEnabled]);\n\n useEffect(() => focus(), [focus]);\n\n useOnScrollToBottom(() => {\n if (\n aui.composer().getState().type === \"thread\" &&\n unstable_focusOnScrollToBottom\n ) {\n focus();\n }\n });\n\n useEffect(() => {\n if (\n aui.composer().getState().type !== \"thread\" ||\n !unstable_focusOnRunStart\n )\n return undefined;\n\n return aui.on(\"thread.runStart\", focus);\n }, [unstable_focusOnRunStart, focus, aui]);\n\n useEffect(() => {\n if (\n aui.composer().getState().type !== \"thread\" ||\n !unstable_focusOnThreadSwitched\n )\n return undefined;\n\n return aui.on(\"threadListItem.switchedTo\", focus);\n }, [unstable_focusOnThreadSwitched, focus, aui]);\n\n useEffect(() => {\n if (value === \"\") compactContext?.setMultiline(false);\n }, [value, compactContext]);\n\n const ariaComboboxProps = useTriggerPopoverAriaProps();\n\n const inputProps = {\n name: \"input\" as const,\n value,\n ...rest,\n ...ariaComboboxProps,\n ref: ref as React.ForwardedRef<HTMLTextAreaElement>,\n disabled: isDisabled,\n onChange: composeEventHandlers(\n onChange,\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!aui.composer().getState().isEditing) return;\n const nativeIsComposing =\n (e.nativeEvent as { isComposing?: boolean }).isComposing === true;\n // recover stuck compositionRef when the browser drops compositionend\n if (compositionRef.current && !nativeIsComposing) {\n compositionRef.current = false;\n }\n const isComposing = nativeIsComposing || compositionRef.current;\n // keep controlled value in sync mid-IME so react does not reset the textarea to a stale value\n flushTapSync(() => {\n aui.composer().setText(e.target.value);\n });\n if (isComposing) return;\n const pos = e.target.selectionStart ?? e.target.value.length;\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n plugin.setCursorPosition(pos);\n }\n }\n },\n ),\n onKeyDown: composeEventHandlers(onKeyDown, handleKeyPress),\n onCompositionStart: composeEventHandlers(\n (rest as { onCompositionStart?: React.CompositionEventHandler })\n .onCompositionStart,\n () => {\n compositionRef.current = true;\n },\n ),\n onCompositionEnd: composeEventHandlers(\n (rest as { onCompositionEnd?: React.CompositionEventHandler })\n .onCompositionEnd,\n (e: React.CompositionEvent<HTMLTextAreaElement>) => {\n compositionRef.current = false;\n if (!aui.composer().getState().isEditing) return;\n const target = e.target as HTMLTextAreaElement;\n flushTapSync(() => {\n aui.composer().setText(target.value);\n });\n const pos = target.selectionStart ?? target.value.length;\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n plugin.setCursorPosition(pos);\n }\n }\n },\n ),\n onSelect: composeEventHandlers(\n onSelect,\n (e: React.SyntheticEvent<HTMLTextAreaElement>) => {\n if (compositionRef.current) return;\n const target = e.target as HTMLTextAreaElement;\n const pos = target.selectionStart ?? target.value.length;\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n plugin.setCursorPosition(pos);\n }\n }\n },\n ),\n onPaste: composeEventHandlers(onPaste, handlePaste),\n ...(compactContext\n ? { onHeightChange: handleHeightChange }\n : onHeightChange !== undefined\n ? { onHeightChange }\n : {}),\n };\n\n if (render && isValidElement(render)) {\n const renderChildren =\n (rest as any).children !== undefined\n ? ((rest as any).children as ReactNode)\n : ((render.props as Record<string, unknown>).children as ReactNode);\n return (\n <Slot.Root {...inputProps}>\n {cloneElement(render, undefined, renderChildren)}\n </Slot.Root>\n );\n }\n\n const Component = asChild ? Slot.Root : TextareaAutosize;\n return <Component {...inputProps} />;\n },\n);\n\nComposerPrimitiveInput.displayName = \"ComposerPrimitive.Input\";\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,MAAM0B,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiH5B,MAAaC,yBAAyBpB,YAKlC,EACEoC,YAAY,OACZZ,SACAC,QACAY,UAAUC,cACVC,UACAC,WACAC,SACAC,UACAR,eACA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ME,WAASH,IAAEG;GACjB,MAAM+E,QAAM/E,SAAOgF,kBAAkBhF,SAAOR,MAAM4C;GAClD,IAAIjD,gBACF,KAAK,MAAMe,YAAUf,eAAegB,WAAW,GAC7CD,SAAO+E,kBAAkBF,KAAG;EAGlC,CACF;EACAlG,SAAShD,qBAAqBgD,SAASgD,WAAW;EAClD,GAAIzC,iBACA,EAAEL,gBAAgB6D,mBAAmB,IACrC7D,mBAAmBoF,KAAAA,IACjB,EAAEpF,eAAe,IACjB,CAAC;CACT;CAEA,IAAIlB,UAAUpB,eAAeoB,MAAM,GAAG;EACpC,MAAM0H,iBACHvG,KAAawG,aAAarB,KAAAA,IACrBnF,KAAawG,WACb3H,OAAO4H,MAAkCD;EACjD,OACE,oBAAC,KAAK,MAAN;GAAW,GAAIlB;aACZ9H,aAAaqB,QAAQsG,KAAAA,GAAWoB,cAAc;EACtC,CAAA;CAEf;CAGA,OAAO,oBADW3H,UAAU7B,KAAK6J,OAAOlJ,kBACjC,EAAW,GAAI4H,WAAW,CAAA;AACnC,CACF;AAEA9G,uBAAuBqI,cAAc"}
1
+ {"version":3,"file":"ComposerInput.js","names":["composeEventHandlers","useComposedRefs","Slot","ClipboardEvent","KeyboardEvent","ReactElement","ReactNode","forwardRef","useCallback","useEffect","useRef","cloneElement","isValidElement","TextareaAutosize","TextareaAutosizeProps","TextareaHeightChangeMeta","useEscapeKeydown","useOnScrollToBottom","useMediaQuery","useAui","flushTapSync","useComposerInputPluginRegistryOptional","useComposerCompactContextOptional","useComposerInputDisabled","useComposerInputValue","useTriggerPopoverAriaProps","TOUCH_PRIMARY_QUERY","ComposerPrimitiveInput","Element","HTMLTextAreaElement","BaseProps","asChild","render","cancelOnEscape","unstable_focusOnRunStart","unstable_focusOnScrollToBottom","unstable_focusOnThreadSwitched","unstable_insertNewlineOnTouchEnter","addAttachmentOnPaste","SubmitModeProps","submitMode","submitOnEnter","Props","autoFocus","disabled","disabledProp","onChange","onKeyDown","onPaste","onSelect","onHeightChange","rest","forwardedRef","aui","pluginRegistry","compactContext","declaredSubmitMode","isTouchPrimary","effectiveSubmitMode","value","isDisabled","textareaRef","ref","compositionRef","e","current","contains","target","Node","plugin","getPlugins","handleKeyDown","composer","getState","canCancel","cancel","preventDefault","handleKeyPress","nativeEvent","isComposing","key","threadState","thread","hasQueue","capabilities","queue","shiftKey","ctrlKey","metaKey","canSend","send","steer","isRunning","shouldSubmit","closest","requestSubmit","handlePaste","threadCapabilities","files","Array","from","clipboardData","attachments","length","Promise","all","map","file","addAttachment","error","console","handleHeightChange","height","meta","el","cs","getComputedStyle","contentHeight","boxSizing","parseFloat","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","Math","round","rowHeight","setMultiline","autoFocusEnabled","focus","textarea","preventScroll","setSelectionRange","type","undefined","on","ariaComboboxProps","inputProps","name","const","React","ForwardedRef","ChangeEvent","isEditing","nativeIsComposing","setText","pos","selectionStart","setCursorPosition","onCompositionStart","CompositionEventHandler","onCompositionEnd","CompositionEvent","SyntheticEvent","renderChildren","children","props","Record","Component","Root","displayName"],"sources":["../../../src/primitives/composer/ComposerInput.tsx"],"sourcesContent":["\"use client\";\n\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Slot } from \"radix-ui\";\nimport {\n type ClipboardEvent,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n cloneElement,\n isValidElement,\n} from \"react\";\nimport TextareaAutosize, {\n type TextareaAutosizeProps,\n type TextareaHeightChangeMeta,\n} from \"react-textarea-autosize\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { useOnScrollToBottom } from \"../../utils/hooks/useOnScrollToBottom\";\nimport { useMediaQuery } from \"../../utils/hooks/useMediaQuery\";\nimport { useAui } from \"@assistant-ui/store\";\nimport { flushTapSync } from \"@assistant-ui/tap\";\nimport { useComposerInputPluginRegistryOptional } from \"./ComposerInputPluginContext\";\nimport { useComposerCompactContextOptional } from \"./ComposerCompactContext\";\nimport {\n useComposerInputDisabled,\n useComposerInputValue,\n useTriggerPopoverAriaProps,\n} from \"./useComposerInputState\";\n\nconst TOUCH_PRIMARY_QUERY = \"(pointer: coarse) and (not (any-pointer: fine))\";\n\nexport namespace ComposerPrimitiveInput {\n export type Element = HTMLTextAreaElement;\n\n type BaseProps = {\n /**\n * Whether to render as a child component using Slot.\n * When true, the component will merge its props with its child.\n */\n asChild?: boolean | undefined;\n /**\n * A React element to use as the input container, with props merged in.\n */\n render?: ReactElement | undefined;\n /**\n * Whether to cancel message composition when Escape is pressed.\n * @default true\n */\n cancelOnEscape?: boolean | undefined;\n /**\n * Whether to automatically focus the input when a new run starts.\n * @default true\n */\n unstable_focusOnRunStart?: boolean | undefined;\n /**\n * Whether to automatically focus the input when scrolling to bottom.\n * @default true\n */\n unstable_focusOnScrollToBottom?: boolean | undefined;\n /**\n * Whether to automatically focus the input when switching threads.\n * @default true\n */\n unstable_focusOnThreadSwitched?: boolean | undefined;\n /**\n * Whether plain Enter on a touch-primary device should insert a newline\n * instead of submitting, detected via\n * `(pointer: coarse) and (not (any-pointer: fine))`. Only takes effect\n * when `submitMode` resolves to `\"enter\"`.\n * @default false\n */\n unstable_insertNewlineOnTouchEnter?: boolean | undefined;\n /**\n * Whether to automatically add pasted files as attachments.\n * @default true\n */\n addAttachmentOnPaste?: boolean | undefined;\n };\n\n type SubmitModeProps =\n | {\n /**\n * Controls how the Enter key submits messages.\n * - \"enter\": Plain Enter submits (Shift+Enter for newline)\n * - \"ctrlEnter\": Ctrl/Cmd+Enter submits (plain Enter for newline)\n * - \"none\": Keyboard submission disabled\n * @default \"enter\"\n */\n submitMode?: \"enter\" | \"ctrlEnter\" | \"none\" | undefined;\n /**\n * @deprecated Use `submitMode` instead\n * @ignore\n */\n submitOnEnter?: never;\n }\n | {\n submitMode?: never;\n /**\n * Whether to submit the message when Enter is pressed (without Shift).\n * @default true\n * @deprecated Use `submitMode` instead. Will be removed in a future version.\n */\n submitOnEnter?: boolean | undefined;\n };\n\n export type Props = TextareaAutosizeProps & BaseProps & SubmitModeProps;\n}\n\n/**\n * A text input component for composing messages.\n *\n * This component provides a rich text input experience with automatic resizing,\n * keyboard shortcuts, file paste support, and intelligent focus management.\n * It integrates with the composer context to manage message state and submission.\n *\n * When rendered inside `Unstable_TriggerPopoverRoot` and a popover is open, the\n * underlying `<textarea>` automatically receives `aria-controls`,\n * `aria-expanded`, `aria-haspopup`, and `aria-activedescendant` for the\n * combobox relationship. These computed attributes override user-provided\n * values for those four ARIA props while the popover is open.\n *\n * @example\n * ```tsx\n * // Ctrl/Cmd+Enter to submit (plain Enter inserts newline)\n * <ComposerPrimitive.Input\n * placeholder=\"Type your message...\"\n * submitMode=\"ctrlEnter\"\n * />\n *\n * // Insert a newline on Enter on touch-primary devices.\n * <ComposerPrimitive.Input\n * placeholder=\"Type your message...\"\n * unstable_insertNewlineOnTouchEnter\n * />\n *\n * // Old API (deprecated, still supported)\n * <ComposerPrimitive.Input\n * placeholder=\"Type your message...\"\n * submitOnEnter={true}\n * />\n * ```\n */\nexport const ComposerPrimitiveInput = forwardRef<\n ComposerPrimitiveInput.Element,\n ComposerPrimitiveInput.Props\n>(\n (\n {\n autoFocus = false,\n asChild,\n render,\n disabled: disabledProp,\n onChange,\n onKeyDown,\n onPaste,\n onSelect,\n submitOnEnter,\n submitMode,\n cancelOnEscape = true,\n unstable_focusOnRunStart = true,\n unstable_focusOnScrollToBottom = true,\n unstable_focusOnThreadSwitched = true,\n unstable_insertNewlineOnTouchEnter = false,\n addAttachmentOnPaste = true,\n onHeightChange,\n ...rest\n },\n forwardedRef,\n ) => {\n const aui = useAui();\n const pluginRegistry = useComposerInputPluginRegistryOptional();\n const compactContext = useComposerCompactContextOptional();\n\n const declaredSubmitMode =\n submitMode ?? (submitOnEnter === false ? \"none\" : \"enter\");\n const isTouchPrimary = useMediaQuery(\n unstable_insertNewlineOnTouchEnter ? TOUCH_PRIMARY_QUERY : null,\n );\n const effectiveSubmitMode =\n unstable_insertNewlineOnTouchEnter &&\n isTouchPrimary &&\n declaredSubmitMode === \"enter\"\n ? \"none\"\n : declaredSubmitMode;\n\n const value = useComposerInputValue();\n const isDisabled = useComposerInputDisabled(disabledProp);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const ref = useComposedRefs(forwardedRef, textareaRef);\n // suppress text/cursor broadcasts during IME composition\n const compositionRef = useRef(false);\n\n useEscapeKeydown((e) => {\n // Only handle ESC if it originated from within this input\n if (!textareaRef.current?.contains(e.target as Node)) return;\n\n // Let registered plugins (mention, slash command, etc.) handle Escape first\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n if (plugin.handleKeyDown(e)) return;\n }\n }\n\n if (!cancelOnEscape) return;\n\n const composer = aui.composer();\n if (composer.getState().canCancel) {\n composer.cancel();\n e.preventDefault();\n }\n });\n\n const handleKeyPress = (e: KeyboardEvent) => {\n if (isDisabled) return;\n\n // ignore IME composition events\n if (e.nativeEvent.isComposing) return;\n\n // Let registered plugins (mention, slash command, etc.) handle keyboard events first\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n if (plugin.handleKeyDown(e)) return;\n }\n }\n\n if (e.key === \"Enter\") {\n const threadState = aui.thread().getState();\n const hasQueue = threadState.capabilities.queue;\n\n // Steer hotkey: Cmd/Ctrl+Shift+Enter (respects submitMode=\"none\" and canSend)\n if (\n e.shiftKey &&\n (e.ctrlKey || e.metaKey) &&\n hasQueue &&\n declaredSubmitMode !== \"none\" &&\n aui.composer().getState().canSend\n ) {\n e.preventDefault();\n aui.composer().send({ steer: true });\n return;\n }\n\n // Regular newline: Shift+Enter\n if (e.shiftKey) return;\n\n // Block submission when running unless queue is supported\n if (threadState.isRunning && !hasQueue) return;\n\n let shouldSubmit = false;\n if (effectiveSubmitMode === \"ctrlEnter\") {\n shouldSubmit = e.ctrlKey || e.metaKey;\n } else if (effectiveSubmitMode === \"enter\") {\n shouldSubmit = true;\n }\n\n if (shouldSubmit) {\n e.preventDefault();\n textareaRef.current?.closest(\"form\")?.requestSubmit();\n }\n }\n };\n\n const handlePaste = async (e: ClipboardEvent<HTMLTextAreaElement>) => {\n if (!addAttachmentOnPaste) return;\n const threadCapabilities = aui.thread().getState().capabilities;\n const files = Array.from(e.clipboardData?.files || []);\n\n if (threadCapabilities.attachments && files.length > 0) {\n try {\n e.preventDefault();\n await Promise.all(\n files.map((file) => aui.composer().addAttachment(file)),\n );\n } catch (error) {\n console.error(\"Error adding attachment:\", error);\n }\n }\n };\n\n const handleHeightChange = (\n height: number,\n meta: TextareaHeightChangeMeta,\n ) => {\n onHeightChange?.(height, meta);\n if (!compactContext) return;\n const el = textareaRef.current;\n if (!el || el.value === \"\") return;\n const cs = getComputedStyle(el);\n const contentHeight =\n cs.boxSizing === \"border-box\"\n ? height -\n parseFloat(cs.paddingTop) -\n parseFloat(cs.paddingBottom) -\n parseFloat(cs.borderTopWidth) -\n parseFloat(cs.borderBottomWidth)\n : height;\n if (Math.round(contentHeight / meta.rowHeight) > 1) {\n compactContext.setMultiline(true);\n }\n };\n\n const autoFocusEnabled = autoFocus && !isDisabled;\n const focus = useCallback(() => {\n const textarea = textareaRef.current;\n if (!textarea || !autoFocusEnabled) return;\n\n textarea.focus({ preventScroll: true });\n textarea.setSelectionRange(textarea.value.length, textarea.value.length);\n }, [autoFocusEnabled]);\n\n useEffect(() => focus(), [focus]);\n\n useOnScrollToBottom(() => {\n if (\n aui.composer().getState().type === \"thread\" &&\n unstable_focusOnScrollToBottom\n ) {\n focus();\n }\n });\n\n useEffect(() => {\n if (\n aui.composer().getState().type !== \"thread\" ||\n !unstable_focusOnRunStart\n )\n return undefined;\n\n return aui.on(\"thread.runStart\", focus);\n }, [unstable_focusOnRunStart, focus, aui]);\n\n useEffect(() => {\n if (\n aui.composer().getState().type !== \"thread\" ||\n !unstable_focusOnThreadSwitched\n )\n return undefined;\n\n return aui.on(\"threadListItem.switchedTo\", focus);\n }, [unstable_focusOnThreadSwitched, focus, aui]);\n\n useEffect(() => {\n if (value === \"\") compactContext?.setMultiline(false);\n }, [value, compactContext]);\n\n const ariaComboboxProps = useTriggerPopoverAriaProps();\n\n const inputProps = {\n name: \"input\" as const,\n value,\n ...rest,\n ...ariaComboboxProps,\n ref: ref as React.ForwardedRef<HTMLTextAreaElement>,\n disabled: isDisabled,\n onChange: composeEventHandlers(\n onChange,\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!aui.composer().getState().isEditing) return;\n const nativeIsComposing =\n (e.nativeEvent as { isComposing?: boolean }).isComposing === true;\n // recover stuck compositionRef when the browser drops compositionend\n if (compositionRef.current && !nativeIsComposing) {\n compositionRef.current = false;\n }\n const isComposing = nativeIsComposing || compositionRef.current;\n // keep controlled value in sync mid-IME so react does not reset the textarea to a stale value\n flushTapSync(() => {\n aui.composer().setText(e.target.value);\n });\n if (isComposing) return;\n const pos = e.target.selectionStart ?? e.target.value.length;\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n plugin.setCursorPosition(pos);\n }\n }\n },\n ),\n onKeyDown: composeEventHandlers(onKeyDown, handleKeyPress),\n onCompositionStart: composeEventHandlers(\n (rest as { onCompositionStart?: React.CompositionEventHandler })\n .onCompositionStart,\n () => {\n compositionRef.current = true;\n },\n ),\n onCompositionEnd: composeEventHandlers(\n (rest as { onCompositionEnd?: React.CompositionEventHandler })\n .onCompositionEnd,\n (e: React.CompositionEvent<HTMLTextAreaElement>) => {\n compositionRef.current = false;\n if (!aui.composer().getState().isEditing) return;\n const target = e.target as HTMLTextAreaElement;\n flushTapSync(() => {\n aui.composer().setText(target.value);\n });\n const pos = target.selectionStart ?? target.value.length;\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n plugin.setCursorPosition(pos);\n }\n }\n },\n ),\n onSelect: composeEventHandlers(\n onSelect,\n (e: React.SyntheticEvent<HTMLTextAreaElement>) => {\n if (compositionRef.current) return;\n const target = e.target as HTMLTextAreaElement;\n const pos = target.selectionStart ?? target.value.length;\n if (pluginRegistry) {\n for (const plugin of pluginRegistry.getPlugins()) {\n plugin.setCursorPosition(pos);\n }\n }\n },\n ),\n onPaste: composeEventHandlers(onPaste, handlePaste),\n ...(compactContext\n ? { onHeightChange: handleHeightChange }\n : onHeightChange !== undefined\n ? { onHeightChange }\n : {}),\n };\n\n if (render && isValidElement(render)) {\n const renderChildren =\n (rest as any).children !== undefined\n ? ((rest as any).children as ReactNode)\n : ((render.props as Record<string, unknown>).children as ReactNode);\n return (\n <Slot.Root {...inputProps}>\n {cloneElement(render, undefined, renderChildren)}\n </Slot.Root>\n );\n }\n\n const Component = asChild ? Slot.Root : TextareaAutosize;\n return <Component {...inputProps} />;\n },\n);\n\nComposerPrimitiveInput.displayName = \"ComposerPrimitive.Input\";\n"],"mappings":";;;;;;;;;;;;;;;;AAkCA,MAAM0B,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiH5B,MAAaC,yBAAyBpB,YAKlC,EACEoC,YAAY,OACZZ,SACAC,QACAY,UAAUC,cACVC,UACAC,WACAC,SACAC,UACAR,eACAD,YACAP,iBAAiB,MACjBC,2BAA2B,MAC3BC,iCAAiC,MACjCC,iCAAiC,MACjCC,qCAAqC,OACrCC,uBAAuB,MACvBY,gBACA,GAAGC,QAELC,iBACG;CACH,MAAMC,MAAMlC,OAAO;CACnB,MAAMmC,iBAAiBjC,uCAAuC;CAC9D,MAAMkC,iBAAiBjC,kCAAkC;CAEzD,MAAMkC,qBACJhB,eAAeC,kBAAkB,QAAQ,SAAS;CACpD,MAAMgB,iBAAiBvC,cACrBmB,qCAAqCX,sBAAsB,IAC7D;CACA,MAAMgC,sBACJrB,sCACAoB,kBACAD,uBAAuB,UACnB,SACAA;CAEN,MAAMG,QAAQnC,sBAAsB;CACpC,MAAMoC,aAAarC,yBAAyBsB,YAAY;CACxD,MAAMgB,cAAcnD,OAA4B,IAAI;CACpD,MAAMoD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9H,UAAAA,aAAaqB,QAAQsG,KAAAA,GAAWoB,cAAc;EACtC,CAAA;CAEf;CAGA,OAAO,oBADW3H,UAAU7B,KAAK6J,OAAOlJ,kBACjC,EAAW,GAAI4H,WAAW,CAAA;AACnC,CACF;AAEA9G,uBAAuBqI,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerQuote.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerQuote.tsx"],"mappings":";;;kBAciB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;;;;;cAenD,wCAAsB,0BAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA;;;;;kBAclB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;cAWnD,4CAA0B,0BAAA,KAAA,qBAAA,gBAAA,mCAAA,eAAA;;;;;kBAkBtB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;cAWnD,+CAA6B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"ComposerQuote.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerQuote.tsx"],"mappings":";;;kBAciB;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;;;;;cAenD,wCAAsB,0BAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA;;;;oBAQjC,cAAA,0CAAA,cAAA;kBAMe;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;cAWnD,4CAA0B,0BAAA,KAAA,qBAAA,gBAAA,mCAAA,eAAA;;;;oBAYrC,cAAA,2CAAA,cAAA;kBAMe;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,gCAAgC,UAAU;;;;;;;;;;cAWnD,+CAA6B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAiBxC,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerQuote.js","names":["c","_c","Primitive","ComponentRef","ComponentPropsWithoutRef","forwardRef","useCallback","useAui","useAuiState","composeEventHandlers","ComposerPrimitiveQuote","Element","div","Props","props","forwardedRef","$","quote","_temp","t0","displayName","ComposerPrimitiveQuoteText","span","children","text","_temp2","t1","t2","ComposerPrimitiveQuoteDismiss","button","onClick","aui","composer","setQuote","undefined","handleDismiss","t3","s"],"sources":["../../../src/primitives/composer/ComposerQuote.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n type ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n} from \"react\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// ---- Root ----\n\nexport namespace ComposerPrimitiveQuote {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\n/**\n * Renders a container for the quoted text preview in the composer.\n * Only renders when a quote is set.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.Quote>\n * <ComposerPrimitive.QuoteText />\n * <ComposerPrimitive.QuoteDismiss>×</ComposerPrimitive.QuoteDismiss>\n * </ComposerPrimitive.Quote>\n * ```\n */\nexport const ComposerPrimitiveQuote = forwardRef<\n ComposerPrimitiveQuote.Element,\n ComposerPrimitiveQuote.Props\n>((props, forwardedRef) => {\n const quote = useAuiState((s) => s.composer.quote);\n if (!quote) return null;\n\n return <Primitive.div {...props} ref={forwardedRef} />;\n});\n\nComposerPrimitiveQuote.displayName = \"ComposerPrimitive.Quote\";\n\n// ---- QuoteText ----\n\nexport namespace ComposerPrimitiveQuoteText {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\n/**\n * Renders the quoted text content.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.QuoteText />\n * ```\n */\nexport const ComposerPrimitiveQuoteText = forwardRef<\n ComposerPrimitiveQuoteText.Element,\n ComposerPrimitiveQuoteText.Props\n>(({ children, ...props }, forwardedRef) => {\n const text = useAuiState((s) => s.composer.quote?.text);\n if (!text) return null;\n\n return (\n <Primitive.span {...props} ref={forwardedRef}>\n {children ?? text}\n </Primitive.span>\n );\n});\n\nComposerPrimitiveQuoteText.displayName = \"ComposerPrimitive.QuoteText\";\n\n// ---- QuoteDismiss ----\n\nexport namespace ComposerPrimitiveQuoteDismiss {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\n/**\n * A button that clears the current quote from the composer.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.QuoteDismiss>×</ComposerPrimitive.QuoteDismiss>\n * ```\n */\nexport const ComposerPrimitiveQuoteDismiss = forwardRef<\n ComposerPrimitiveQuoteDismiss.Element,\n ComposerPrimitiveQuoteDismiss.Props\n>(({ onClick, ...props }, forwardedRef) => {\n const aui = useAui();\n const handleDismiss = useCallback(() => {\n aui.composer().setQuote(undefined);\n }, [aui]);\n\n return (\n <Primitive.button\n type=\"button\"\n {...props}\n ref={forwardedRef}\n onClick={composeEventHandlers(onClick, handleDismiss)}\n />\n );\n});\n\nComposerPrimitiveQuoteDismiss.displayName = \"ComposerPrimitive.QuoteDismiss\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA,MAAaU,yBAAyBL,YAGpCS,OAAAC,iBAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAEA,IAAI,CADUO,YAAYU,KACrBD,GAAK,OAAS;CAAK,IAAAE;CAAA,IAAAH,EAAA,OAAAD,gBAAAC,EAAA,OAAAF,OAAA;EAEjBK,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBL;GAAYC,KAAAA;EAAY,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAF;EAAAE,EAAA,KAAAG;CAAA,OAAA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C,SAAUC,KAAAA,CAAS;EAAC;EACnClB,EAAA,KAAAe;EAAAf,EAAA,KAAAU;CAAA,OAAAA,KAAAV,EAAA;CAFD,MAAAmB,gBAAsBT;CAEZ,IAAAC;CAAA,IAAAX,EAAA,OAAAmB,iBAAAnB,EAAA,OAAAc,SAAA;EAOGH,KAAAlB,qBAAqBqB,SAASK,aAAa;EAACnB,EAAA,KAAAmB;EAAAnB,EAAA,KAAAc;EAAAd,EAAA,KAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAoB;CAAA,IAAApB,EAAA,OAAAD,gBAAAC,EAAA,OAAAF,SAAAE,EAAA,QAAAW,IAAA;EAJvDS,KAAA,oBAAA,UAAA,QAAA;GACO,MAAA;GAAQ,GACTtB;GACCC,KAAAA;GACI,SAAAY;EAA4C,CAAA;EACrDX,EAAA,KAAAD;EAAAC,EAAA,KAAAF;EAAAE,EAAA,MAAAW;EAAAX,EAAA,MAAAoB;CAAA,OAAAA,KAAApB,EAAA;CAAA,OALFoB;AAKE,CAEL;AAEDR,8BAA8BR,cAAc;AA1E1C,SAAAF,MAAAmB,GAAA;CAAA,OACiCA,EAACL,SAASf;AAAM;AA0BjD,SAAAQ,OAAAY,GAAA;CAAA,OACgCA,EAACL,SAASf,OAAYO;AAAA"}
1
+ {"version":3,"file":"ComposerQuote.js","names":["c","_c","Primitive","ComponentRef","ComponentPropsWithoutRef","forwardRef","useCallback","useAui","useAuiState","composeEventHandlers","ComposerPrimitiveQuote","Element","div","Props","props","forwardedRef","$","quote","_temp","t0","displayName","ComposerPrimitiveQuoteText","span","children","text","_temp2","t1","t2","ComposerPrimitiveQuoteDismiss","button","onClick","aui","composer","setQuote","undefined","handleDismiss","t3","s"],"sources":["../../../src/primitives/composer/ComposerQuote.tsx"],"sourcesContent":["\"use client\";\n\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n type ComponentPropsWithoutRef,\n forwardRef,\n useCallback,\n} from \"react\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// ---- Root ----\n\nexport namespace ComposerPrimitiveQuote {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\n/**\n * Renders a container for the quoted text preview in the composer.\n * Only renders when a quote is set.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.Quote>\n * <ComposerPrimitive.QuoteText />\n * <ComposerPrimitive.QuoteDismiss>×</ComposerPrimitive.QuoteDismiss>\n * </ComposerPrimitive.Quote>\n * ```\n */\nexport const ComposerPrimitiveQuote = forwardRef<\n ComposerPrimitiveQuote.Element,\n ComposerPrimitiveQuote.Props\n>((props, forwardedRef) => {\n const quote = useAuiState((s) => s.composer.quote);\n if (!quote) return null;\n\n return <Primitive.div {...props} ref={forwardedRef} />;\n});\n\nComposerPrimitiveQuote.displayName = \"ComposerPrimitive.Quote\";\n\n// ---- QuoteText ----\n\nexport namespace ComposerPrimitiveQuoteText {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\n/**\n * Renders the quoted text content.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.QuoteText />\n * ```\n */\nexport const ComposerPrimitiveQuoteText = forwardRef<\n ComposerPrimitiveQuoteText.Element,\n ComposerPrimitiveQuoteText.Props\n>(({ children, ...props }, forwardedRef) => {\n const text = useAuiState((s) => s.composer.quote?.text);\n if (!text) return null;\n\n return (\n <Primitive.span {...props} ref={forwardedRef}>\n {children ?? text}\n </Primitive.span>\n );\n});\n\nComposerPrimitiveQuoteText.displayName = \"ComposerPrimitive.QuoteText\";\n\n// ---- QuoteDismiss ----\n\nexport namespace ComposerPrimitiveQuoteDismiss {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\n/**\n * A button that clears the current quote from the composer.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.QuoteDismiss>×</ComposerPrimitive.QuoteDismiss>\n * ```\n */\nexport const ComposerPrimitiveQuoteDismiss = forwardRef<\n ComposerPrimitiveQuoteDismiss.Element,\n ComposerPrimitiveQuoteDismiss.Props\n>(({ onClick, ...props }, forwardedRef) => {\n const aui = useAui();\n const handleDismiss = useCallback(() => {\n aui.composer().setQuote(undefined);\n }, [aui]);\n\n return (\n <Primitive.button\n type=\"button\"\n {...props}\n ref={forwardedRef}\n onClick={composeEventHandlers(onClick, handleDismiss)}\n />\n );\n});\n\nComposerPrimitiveQuoteDismiss.displayName = \"ComposerPrimitive.QuoteDismiss\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+BA,MAAaU,yBAAyBL,YAGpCS,OAAAC,iBAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAEA,IAAI,CADUO,YAAYU,KACrBD,GAAK,OAAS;CAAK,IAAAE;CAAA,IAAAH,EAAA,OAAAD,gBAAAC,EAAA,OAAAF,OAAA;EAEjBK,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBL;GAAYC,KAAAA;EAAY,CAAA;EAAIC,EAAA,KAAAD;EAAAC,EAAA,KAAAF;EAAAE,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAA/CG;AAA+C,CACvD;AAEDT,uBAAuBU,cAAc;;;;;;;;;AAiBrC,MAAaC,6BAA6BhB,YAGxCc,IAAAJ,iBAAA;CAAA,MAAAC,IAAAf,EAAA,CAAA;CAAA,IAAAsB;CAAA,IAAAT;CAAA,IAAAE,EAAA,OAAAG,IAAA;EAAC,CAAA,CAAAI,aAAAT,SAAAK;EAAsBH,EAAA,KAAAG;EAAAH,EAAA,KAAAO;EAAAP,EAAA,KAAAF;CAAA,OAAA;EAAAS,WAAAP,EAAA;EAAAF,QAAAE,EAAA;CAAA;CACvB,MAAAQ,OAAahB,YAAYiB,MAA6B;CACtD,IAAI,CAACD,MAAI,OAAS;CAIb,MAAAE,KAAAH,YAAAC;C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TtB;GACCC,KAAAA;GACI,SAAAY;EAA4C,CAAA;EACrDX,EAAA,KAAAD;EAAAC,EAAA,KAAAF;EAAAE,EAAA,MAAAW;EAAAX,EAAA,MAAAoB;CAAA,OAAAA,KAAApB,EAAA;CAAA,OALFoB;AAKE,CAEL;AAEDR,8BAA8BR,cAAc;AA1E1C,SAAAF,MAAAmB,GAAA;CAAA,OACiCA,EAACL,SAASf;AAAM;AA0BjD,SAAAQ,OAAAY,GAAA;CAAA,OACgCA,EAACL,SAASf,OAAYO;AAAA"}
@@ -26,6 +26,11 @@ declare namespace ComposerPrimitiveRoot {
26
26
  * is submitted (e.g., via Enter key or submit button). It automatically prevents the
27
27
  * default form submission and triggers the composer's send functionality.
28
28
  *
29
+ * Clicking blank form space focuses the composer input (the first textarea or
30
+ * contenteditable inside the form). Text selection cannot start from blank
31
+ * areas; descendants that need native mousedown defaults can call
32
+ * `stopPropagation()` in their own `onMouseDown`.
33
+ *
29
34
  * @example
30
35
  * ```tsx
31
36
  * <ComposerPrimitive.Root>
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerRoot.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerRoot.tsx"],"mappings":";;;kBAgBiB;OACH,UAAU,oBAAoB,UAAU;;;;;OAKxC,QAAQ,gCAAgC,UAAU;;;;;;;;;IAS5D;;;;;;;;;;;;;;;;;;cAmBS,uCAAqB,0BAAA,KAAA,qBAAA,gBAAA,mCAAA,mBAAA"}
1
+ {"version":3,"file":"ComposerRoot.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerRoot.tsx"],"mappings":";;;kBAwCiB;OACH,UAAU,oBAAoB,UAAU;;;;;OAKxC,QAAQ,gCAAgC,UAAU;;;;;;;;;IAS5D;;;;;;;;;;;;;;;;;;;;;;;cAwBS,uCAAqB,0BAAA,KAAA,qBAAA,gBAAA,mCAAA,mBAAA;;;;;;;;;;;;;EAxBpB;oBAgFZ,cAAA"}
@@ -8,6 +8,24 @@ import { forwardRef, useState } from "@assistant-ui/tap/react-shim";
8
8
  import { jsx } from "react/jsx-runtime";
9
9
  import { composeEventHandlers } from "@radix-ui/primitive";
10
10
  //#region src/primitives/composer/ComposerRoot.tsx
11
+ const CONTENT_EDITABLE_SELECTOR = "[contenteditable]:not([contenteditable='false'])";
12
+ const COMPOSER_INPUT_SELECTOR = `textarea:not(:disabled), ${CONTENT_EDITABLE_SELECTOR}`;
13
+ const INTERACTIVE_ELEMENT_SELECTOR = [
14
+ "a",
15
+ "audio[controls]",
16
+ "button",
17
+ "details",
18
+ "embed",
19
+ "iframe",
20
+ "input",
21
+ "label",
22
+ "select",
23
+ "summary",
24
+ "textarea",
25
+ "video[controls]",
26
+ CONTENT_EDITABLE_SELECTOR,
27
+ "[tabindex]"
28
+ ].join(", ");
11
29
  /**
12
30
  * The root form container for message composition.
13
31
  *
@@ -15,6 +33,11 @@ import { composeEventHandlers } from "@radix-ui/primitive";
15
33
  * is submitted (e.g., via Enter key or submit button). It automatically prevents the
16
34
  * default form submission and triggers the composer's send functionality.
17
35
  *
36
+ * Clicking blank form space focuses the composer input (the first textarea or
37
+ * contenteditable inside the form). Text selection cannot start from blank
38
+ * areas; descendants that need native mousedown defaults can call
39
+ * `stopPropagation()` in their own `onMouseDown`.
40
+ *
18
41
  * @example
19
42
  * ```tsx
20
43
  * <ComposerPrimitive.Root>
@@ -24,83 +47,106 @@ import { composeEventHandlers } from "@radix-ui/primitive";
24
47
  * ```
25
48
  */
26
49
  const ComposerPrimitiveRoot = forwardRef((t0, forwardedRef) => {
27
- const $ = c(20);
50
+ const $ = c(24);
28
51
  let compact;
52
+ let onMouseDown;
29
53
  let onSubmit;
30
54
  let rest;
31
55
  if ($[0] !== t0) {
32
- ({onSubmit, compact, ...rest} = t0);
56
+ ({onSubmit, onMouseDown, compact, ...rest} = t0);
33
57
  $[0] = t0;
34
58
  $[1] = compact;
35
- $[2] = onSubmit;
36
- $[3] = rest;
59
+ $[2] = onMouseDown;
60
+ $[3] = onSubmit;
61
+ $[4] = rest;
37
62
  } else {
38
63
  compact = $[1];
39
- onSubmit = $[2];
40
- rest = $[3];
64
+ onMouseDown = $[2];
65
+ onSubmit = $[3];
66
+ rest = $[4];
41
67
  }
42
68
  const send = useComposerSend();
43
69
  const [multiline, setMultiline] = useState(false);
44
70
  let t1;
45
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
71
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
46
72
  t1 = { setMultiline };
47
- $[4] = t1;
48
- } else t1 = $[4];
73
+ $[5] = t1;
74
+ } else t1 = $[5];
49
75
  const compactContext = t1;
50
76
  let t2;
51
- if ($[5] !== compact) {
77
+ if ($[6] !== compact) {
52
78
  t2 = (s) => compact ? s.composer.attachments.length === 0 && s.composer.quote == null && s.composer.queue.length === 0 && s.composer.dictation == null && !s.composer.text.includes("\n") : false;
53
- $[5] = compact;
54
- $[6] = t2;
55
- } else t2 = $[6];
79
+ $[6] = compact;
80
+ $[7] = t2;
81
+ } else t2 = $[7];
56
82
  const isCompact = useAuiState(t2) && !multiline;
57
83
  let t3;
58
- if ($[7] !== send) {
84
+ if ($[8] !== send) {
59
85
  t3 = (e) => {
60
86
  e.preventDefault();
61
87
  if (!send) return;
62
88
  send();
63
89
  };
64
- $[7] = send;
65
- $[8] = t3;
66
- } else t3 = $[8];
90
+ $[8] = send;
91
+ $[9] = t3;
92
+ } else t3 = $[9];
67
93
  const handleSubmit = t3;
94
+ const handleMouseDown = _temp;
68
95
  const t4 = compact ? compactContext : null;
69
96
  const t5 = isCompact ? "" : void 0;
70
97
  let t6;
71
- if ($[9] !== handleSubmit || $[10] !== onSubmit) {
98
+ if ($[10] !== handleSubmit || $[11] !== onSubmit) {
72
99
  t6 = composeEventHandlers(onSubmit, handleSubmit);
73
- $[9] = handleSubmit;
74
- $[10] = onSubmit;
75
- $[11] = t6;
76
- } else t6 = $[11];
100
+ $[10] = handleSubmit;
101
+ $[11] = onSubmit;
102
+ $[12] = t6;
103
+ } else t6 = $[12];
77
104
  let t7;
78
- if ($[12] !== forwardedRef || $[13] !== rest || $[14] !== t5 || $[15] !== t6) {
79
- t7 = /* @__PURE__ */ jsx(Primitive.form, {
105
+ if ($[13] !== onMouseDown) {
106
+ t7 = composeEventHandlers(onMouseDown, handleMouseDown);
107
+ $[13] = onMouseDown;
108
+ $[14] = t7;
109
+ } else t7 = $[14];
110
+ let t8;
111
+ if ($[15] !== forwardedRef || $[16] !== rest || $[17] !== t5 || $[18] !== t6 || $[19] !== t7) {
112
+ t8 = /* @__PURE__ */ jsx(Primitive.form, {
80
113
  ...rest,
81
114
  "data-compact": t5,
82
115
  ref: forwardedRef,
83
- onSubmit: t6
116
+ onSubmit: t6,
117
+ onMouseDown: t7
84
118
  });
85
- $[12] = forwardedRef;
86
- $[13] = rest;
87
- $[14] = t5;
88
- $[15] = t6;
89
- $[16] = t7;
90
- } else t7 = $[16];
91
- let t8;
92
- if ($[17] !== t4 || $[18] !== t7) {
93
- t8 = /* @__PURE__ */ jsx(ComposerCompactContext.Provider, {
119
+ $[15] = forwardedRef;
120
+ $[16] = rest;
121
+ $[17] = t5;
122
+ $[18] = t6;
123
+ $[19] = t7;
124
+ $[20] = t8;
125
+ } else t8 = $[20];
126
+ let t9;
127
+ if ($[21] !== t4 || $[22] !== t8) {
128
+ t9 = /* @__PURE__ */ jsx(ComposerCompactContext.Provider, {
94
129
  value: t4,
95
- children: t7
130
+ children: t8
96
131
  });
97
- $[17] = t4;
98
- $[18] = t7;
99
- $[19] = t8;
100
- } else t8 = $[19];
101
- return t8;
132
+ $[21] = t4;
133
+ $[22] = t8;
134
+ $[23] = t9;
135
+ } else t9 = $[23];
136
+ return t9;
102
137
  });
103
138
  ComposerPrimitiveRoot.displayName = "ComposerPrimitive.Root";
139
+ function _temp(e_0) {
140
+ if (e_0.button !== 0) return;
141
+ const target = e_0.target;
142
+ if (!(target instanceof Element) || !e_0.currentTarget.contains(target)) return;
143
+ const interactive = target.closest(INTERACTIVE_ELEMENT_SELECTOR);
144
+ if (interactive && e_0.currentTarget.contains(interactive)) return;
145
+ const input = e_0.currentTarget.querySelector(COMPOSER_INPUT_SELECTOR);
146
+ if (!input) return;
147
+ e_0.preventDefault();
148
+ input.focus();
149
+ }
104
150
  //#endregion
105
151
  export { ComposerPrimitiveRoot };
106
152
 
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerRoot.js","names":["c","_c","composeEventHandlers","useAuiState","Primitive","ComponentRef","FormEvent","forwardRef","ComponentPropsWithoutRef","useMemo","useState","useComposerSend","ComposerCompactContext","ComposerPrimitiveRoot","Element","form","Props","compact","t0","forwardedRef","$","onSubmit","rest","send","multiline","setMultiline","t1","Symbol","for","compactContext","t2","s","composer","attachments","length","quote","queue","dictation","text","includes","stateAllowsCompact","isCompact","t3","e","preventDefault","handleSubmit","t4","t5","undefined","t6","t7","t8","displayName"],"sources":["../../../src/primitives/composer/ComposerRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n type FormEvent,\n forwardRef,\n type ComponentPropsWithoutRef,\n useMemo,\n useState,\n} from \"react\";\nimport { useComposerSend } from \"./ComposerSend\";\nimport { ComposerCompactContext } from \"./ComposerCompactContext\";\n\nexport namespace ComposerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.form>;\n /**\n * Props for the ComposerPrimitive.Root component.\n * Accepts all standard form element props.\n */\n export type Props = ComponentPropsWithoutRef<typeof Primitive.form> & {\n /**\n * Opt the composer into compact mode. While the input holds at most a single\n * line of text and there are no attachments, quote, queued messages, or\n * active dictation, the root renders a `data-compact` attribute so styles\n * can collapse the composer into a single row. It expands automatically\n * when any of those conditions stop holding.\n * @default false\n */\n compact?: boolean | undefined;\n };\n}\n\n/**\n * The root form container for message composition.\n *\n * This component provides a form wrapper that handles message submission when the form\n * is submitted (e.g., via Enter key or submit button). It automatically prevents the\n * default form submission and triggers the composer's send functionality.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.Root>\n * <ComposerPrimitive.Input placeholder=\"Type your message...\" />\n * <ComposerPrimitive.Send>Send</ComposerPrimitive.Send>\n * </ComposerPrimitive.Root>\n * ```\n */\nexport const ComposerPrimitiveRoot = forwardRef<\n ComposerPrimitiveRoot.Element,\n ComposerPrimitiveRoot.Props\n>(({ onSubmit, compact, ...rest }, forwardedRef) => {\n const send = useComposerSend();\n\n const [multiline, setMultiline] = useState(false);\n const compactContext = useMemo(() => ({ setMultiline }), []);\n const stateAllowsCompact = useAuiState((s) =>\n compact\n ? s.composer.attachments.length === 0 &&\n s.composer.quote == null &&\n s.composer.queue.length === 0 &&\n s.composer.dictation == null &&\n !s.composer.text.includes(\"\\n\")\n : false,\n );\n const isCompact = stateAllowsCompact && !multiline;\n\n const handleSubmit = (e: FormEvent) => {\n e.preventDefault();\n\n if (!send) return;\n send();\n };\n\n return (\n <ComposerCompactContext.Provider value={compact ? compactContext : null}>\n <Primitive.form\n {...rest}\n data-compact={isCompact ? \"\" : undefined}\n ref={forwardedRef}\n onSubmit={composeEventHandlers(onSubmit, handleSubmit)}\n />\n </ComposerCompactContext.Provider>\n );\n});\n\nComposerPrimitiveRoot.displayName = \"ComposerPrimitive.Root\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,MAAaa,wBAAwBN,YAGnCW,IAAAC,iBAAA;CAAA,MAAAC,IAAAnB,EAAA,EAAA;CAAA,IAAAgB;CAAA,IAAAI;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAG,UAAAJ,YAAAK,QAAAJ;EAA8BE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAC;EAAAD,EAAA,KAAAE;CAAA,OAAA;EAAAL,UAAAG,EAAA;EAAAC,WAAAD,EAAA;EAAAE,OAAAF,EAAA;CAAA;CAC/B,MAAAG,OAAaZ,gBAAgB;CAE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AAA,GACM5B;GACU,gBAAAyB;GACT5B,KAAAA;GACK,UAAA8B;EAA4C,CAAA;EACtD7B,EAAA,MAAAD;EAAAC,EAAA,MAAAE;EAAAF,EAAA,MAAA2B;EAAA3B,EAAA,MAAA6B;EAAA7B,EAAA,MAAA8B;CAAA,OAAAA,KAAA9B,EAAA;CAAA,IAAA+B;CAAA,IAAA/B,EAAA,QAAA0B,MAAA1B,EAAA,QAAA8B,IAAA;EANJC,KAAA,oBAAA,uBAAA,UAAA;GAAwC,OAAAL;aACtCI;EAMF,CAAA;EAAkC9B,EAAA,MAAA0B;EAAA1B,EAAA,MAAA8B;EAAA9B,EAAA,MAAA+B;CAAA,OAAAA,KAAA/B,EAAA;CAAA,OAPlC+B;AAOkC,CAErC;AAEDtC,sBAAsBuC,cAAc"}
1
+ {"version":3,"file":"ComposerRoot.js","names":["c","_c","composeEventHandlers","useAuiState","Primitive","ComponentRef","FormEvent","forwardRef","ComponentPropsWithoutRef","MouseEvent","useMemo","useState","useComposerSend","ComposerCompactContext","CONTENT_EDITABLE_SELECTOR","COMPOSER_INPUT_SELECTOR","INTERACTIVE_ELEMENT_SELECTOR","join","ComposerPrimitiveRoot","Element","form","Props","compact","t0","forwardedRef","$","onMouseDown","onSubmit","rest","send","multiline","setMultiline","t1","Symbol","for","compactContext","t2","s","composer","attachments","length","quote","queue","dictation","text","includes","stateAllowsCompact","isCompact","t3","e","preventDefault","handleSubmit","handleMouseDown","_temp","t4","t5","undefined","t6","t7","t8","t9","displayName","e_0","button","target","currentTarget","contains","interactive","closest","input","querySelector","focus"],"sources":["../../../src/primitives/composer/ComposerRoot.tsx"],"sourcesContent":["\"use client\";\n\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport { Primitive } from \"../../utils/Primitive\";\nimport {\n type ComponentRef,\n type FormEvent,\n forwardRef,\n type ComponentPropsWithoutRef,\n type MouseEvent,\n useMemo,\n useState,\n} from \"react\";\nimport { useComposerSend } from \"./ComposerSend\";\nimport { ComposerCompactContext } from \"./ComposerCompactContext\";\n\nconst CONTENT_EDITABLE_SELECTOR =\n \"[contenteditable]:not([contenteditable='false'])\";\n\nconst COMPOSER_INPUT_SELECTOR = `textarea:not(:disabled), ${CONTENT_EDITABLE_SELECTOR}`;\n\n// Keeps tabindex=\"-1\": roving-tabindex widgets click-focus items at -1.\nconst INTERACTIVE_ELEMENT_SELECTOR = [\n \"a\",\n \"audio[controls]\",\n \"button\",\n \"details\",\n \"embed\",\n \"iframe\",\n \"input\",\n \"label\",\n \"select\",\n \"summary\",\n \"textarea\",\n \"video[controls]\",\n CONTENT_EDITABLE_SELECTOR,\n \"[tabindex]\",\n].join(\", \");\n\nexport namespace ComposerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.form>;\n /**\n * Props for the ComposerPrimitive.Root component.\n * Accepts all standard form element props.\n */\n export type Props = ComponentPropsWithoutRef<typeof Primitive.form> & {\n /**\n * Opt the composer into compact mode. While the input holds at most a single\n * line of text and there are no attachments, quote, queued messages, or\n * active dictation, the root renders a `data-compact` attribute so styles\n * can collapse the composer into a single row. It expands automatically\n * when any of those conditions stop holding.\n * @default false\n */\n compact?: boolean | undefined;\n };\n}\n\n/**\n * The root form container for message composition.\n *\n * This component provides a form wrapper that handles message submission when the form\n * is submitted (e.g., via Enter key or submit button). It automatically prevents the\n * default form submission and triggers the composer's send functionality.\n *\n * Clicking blank form space focuses the composer input (the first textarea or\n * contenteditable inside the form). Text selection cannot start from blank\n * areas; descendants that need native mousedown defaults can call\n * `stopPropagation()` in their own `onMouseDown`.\n *\n * @example\n * ```tsx\n * <ComposerPrimitive.Root>\n * <ComposerPrimitive.Input placeholder=\"Type your message...\" />\n * <ComposerPrimitive.Send>Send</ComposerPrimitive.Send>\n * </ComposerPrimitive.Root>\n * ```\n */\nexport const ComposerPrimitiveRoot = forwardRef<\n ComposerPrimitiveRoot.Element,\n ComposerPrimitiveRoot.Props\n>(({ onSubmit, onMouseDown, compact, ...rest }, forwardedRef) => {\n const send = useComposerSend();\n\n const [multiline, setMultiline] = useState(false);\n const compactContext = useMemo(() => ({ setMultiline }), []);\n const stateAllowsCompact = useAuiState((s) =>\n compact\n ? s.composer.attachments.length === 0 &&\n s.composer.quote == null &&\n s.composer.queue.length === 0 &&\n s.composer.dictation == null &&\n !s.composer.text.includes(\"\\n\")\n : false,\n );\n const isCompact = stateAllowsCompact && !multiline;\n\n const handleSubmit = (e: FormEvent) => {\n e.preventDefault();\n\n if (!send) return;\n send();\n };\n\n const handleMouseDown = (e: MouseEvent<HTMLFormElement>) => {\n if (e.button !== 0) return;\n const target = e.target;\n // Portaled descendants (e.g. a dialog overlay) propagate mousedown through\n // the React tree while their DOM nodes live outside the form.\n if (!(target instanceof Element) || !e.currentTarget.contains(target))\n return;\n // Bound the ancestor walk to the form: hosts like AssistantModal render\n // the composer inside a wrapper carrying tabindex=\"-1\" (Radix FocusScope).\n const interactive = target.closest(INTERACTIVE_ELEMENT_SELECTOR);\n if (interactive && e.currentTarget.contains(interactive)) return;\n const input = e.currentTarget.querySelector<HTMLElement>(\n COMPOSER_INPUT_SELECTOR,\n );\n if (!input) return;\n e.preventDefault();\n input.focus();\n };\n\n return (\n <ComposerCompactContext.Provider value={compact ? compactContext : null}>\n <Primitive.form\n {...rest}\n data-compact={isCompact ? \"\" : undefined}\n ref={forwardedRef}\n onSubmit={composeEventHandlers(onSubmit, handleSubmit)}\n onMouseDown={composeEventHandlers(onMouseDown, handleMouseDown)}\n />\n </ComposerCompactContext.Provider>\n );\n});\n\nComposerPrimitiveRoot.displayName = \"ComposerPrimitive.Root\";\n"],"mappings":";;;;;;;;;;AAiBA,MAAMc,4BACJ;AAEF,MAAMC,0BAA0B,4BAA4BD;AAG5D,MAAME,+BAA+B;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACAF;CACA;AAAY,CACb,CAACG,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;AAyCX,MAA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AIb,IAACc,WAAY,GAAC;CAClB,MAAAC,SAAef,IAACe;CAGhB,IAAI,EAAEA,kBAAkB7C,YAApB,CAAiC8B,IAACgB,cAAcC,SAAUF,MAAM,GAAC;CAIrE,MAAAG,cAAoBH,OAAMI,QAASpD,4BAA4B;CAC/D,IAAImD,eAAelB,IAACgB,cAAcC,SAAUC,WAAW,GAAC;CACxD,MAAAE,QAAcpB,IAACgB,cAAcK,cAC3BvD,uBACF;CACA,IAAI,CAACsD,OAAK;CACVpB,IAACC,eAAgB;CACjBmB,MAAKE,MAAO;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerSend.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerSend.ts"],"mappings":";;cAUa;kBAOI;OACH,UAAU;;;;;OAKV,QAAQ,yBAAyB;;;;;;;;;;;;;;;;cAiBlC,uCAAqB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"ComposerSend.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerSend.ts"],"mappings":";;cAUa;kBAOI;OACH,UAAU;;;;;OAKV,QAAQ,yBAAyB;;;;;;;;;;;;;;;;cAiBlC,uCAAqB,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAGjC,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerStopDictation.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerStopDictation.ts"],"mappings":";;cAWM;kBAYW;OACH,UAAU;OACV,QAAQ,yBAAyB;;;;;;;;;;;;;;cAelC,gDAA8B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA"}
1
+ {"version":3,"file":"ComposerStopDictation.d.ts","names":[],"sources":["../../../src/primitives/composer/ComposerStopDictation.ts"],"mappings":";;cAWM;kBAYW;OACH,UAAU;OACV,QAAQ,yBAAyB;;;;;;;;;;;;;;cAelC,gDAA8B,0BAAA,KAAA,qBAAA,gBAAA,qCAAA,qBAAA;;;;oBAG1C,cAAA,6CAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"TriggerPopover.d.ts","names":[],"sources":["../../../../src/primitives/composer/trigger/TriggerPopover.tsx"],"mappings":";;;;;;cAkCa,qCAA6B;cAS7B,6CAAqC;;KAItC;EACV,SAAS,UAAU;;;cAOR,sCAA8B;kBAS1B;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,KAClB,gCAAgC,UAAU;;aAIjC;;aAEA,UAAU;;aAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BA,iDAA+B,0BAAA,KAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA;;;;;;;;qBAjCrB"}
1
+ {"version":3,"file":"TriggerPopover.d.ts","names":[],"sources":["../../../../src/primitives/composer/trigger/TriggerPopover.tsx"],"mappings":";;;;;;cAkCa,qCAA6B;cAS7B,6CAAqC;;KAItC;EACV,SAAS,UAAU;;;cAOR,sCAA8B;kBAS1B;OACH,UAAU,oBAAoB,UAAU;OACxC,QAAQ,KAClB,gCAAgC,UAAU;;aAIjC;;aAEA,UAAU;;aAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BA,iDAA+B,0BAAA,KAAA,KAAA,qBAAA,gBAAA,kCAAA,eAAA;;;;;;WAnCzB;;WAEI,UAAA;;WAEE;oBA6JxB,cAAA"}