@forgedevstack/bear 1.3.2 → 1.3.3

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 (306) hide show
  1. package/README.md +4 -0
  2. package/dist/components/ApprovalCard/ApprovalCard.cjs +1 -0
  3. package/dist/components/ApprovalCard/ApprovalCard.const.cjs +1 -0
  4. package/dist/components/ApprovalCard/ApprovalCard.const.d.ts +2 -0
  5. package/dist/components/ApprovalCard/ApprovalCard.const.js +8 -0
  6. package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
  7. package/dist/components/ApprovalCard/ApprovalCard.js +25 -0
  8. package/dist/components/ApprovalCard/ApprovalCard.types.d.ts +15 -0
  9. package/dist/components/ApprovalCard/index.d.ts +2 -0
  10. package/dist/components/ArtifactCard/ArtifactCard.cjs +1 -0
  11. package/dist/components/ArtifactCard/ArtifactCard.const.cjs +1 -0
  12. package/dist/components/ArtifactCard/ArtifactCard.const.d.ts +3 -0
  13. package/dist/components/ArtifactCard/ArtifactCard.const.js +8 -0
  14. package/dist/components/ArtifactCard/ArtifactCard.d.ts +2 -0
  15. package/dist/components/ArtifactCard/ArtifactCard.js +43 -0
  16. package/dist/components/ArtifactCard/ArtifactCard.types.d.ts +15 -0
  17. package/dist/components/ArtifactCard/index.d.ts +2 -0
  18. package/dist/components/Banner/Banner.const.cjs +1 -1
  19. package/dist/components/Banner/Banner.const.js +9 -8
  20. package/dist/components/Chart/BarChart.cjs +1 -1
  21. package/dist/components/Chart/BarChart.js +65 -72
  22. package/dist/components/Chart/Chart.cjs +1 -1
  23. package/dist/components/Chart/Chart.js +21 -18
  24. package/dist/components/Chart/Chart.types.d.ts +1 -1
  25. package/dist/components/Chart/FunnelChart.cjs +1 -1
  26. package/dist/components/Chart/FunnelChart.js +38 -36
  27. package/dist/components/Chart/LineChart.cjs +1 -1
  28. package/dist/components/Chart/LineChart.js +74 -60
  29. package/dist/components/Chart/PieChart.cjs +1 -1
  30. package/dist/components/Chart/PieChart.js +102 -82
  31. package/dist/components/Chart/RadarChart.cjs +1 -1
  32. package/dist/components/Chart/RadarChart.d.ts +1 -1
  33. package/dist/components/Chart/RadarChart.js +116 -93
  34. package/dist/components/Chat/Chat.cjs +1 -1
  35. package/dist/components/Chat/Chat.const.cjs +1 -1
  36. package/dist/components/Chat/Chat.const.d.ts +9 -22
  37. package/dist/components/Chat/Chat.const.js +18 -26
  38. package/dist/components/Chat/Chat.d.ts +1 -20
  39. package/dist/components/Chat/Chat.js +107 -162
  40. package/dist/components/Chat/Chat.types.d.ts +20 -27
  41. package/dist/components/Chat/Chat.utils.cjs +1 -0
  42. package/dist/components/Chat/Chat.utils.d.ts +2 -0
  43. package/dist/components/Chat/Chat.utils.js +10 -0
  44. package/dist/components/Chat/helpers/ChatTypingIndicator.cjs +1 -0
  45. package/dist/components/Chat/helpers/ChatTypingIndicator.d.ts +3 -0
  46. package/dist/components/Chat/helpers/ChatTypingIndicator.js +14 -0
  47. package/dist/components/Chat/index.d.ts +2 -1
  48. package/dist/components/ChatBubble/ChatBubble.cjs +1 -0
  49. package/dist/components/ChatBubble/ChatBubble.const.cjs +1 -0
  50. package/dist/components/ChatBubble/ChatBubble.const.d.ts +13 -0
  51. package/dist/components/ChatBubble/ChatBubble.const.js +17 -0
  52. package/dist/components/ChatBubble/ChatBubble.d.ts +2 -0
  53. package/dist/components/ChatBubble/ChatBubble.js +32 -0
  54. package/dist/components/ChatBubble/ChatBubble.types.d.ts +12 -0
  55. package/dist/components/ChatBubble/ChatBubble.utils.cjs +1 -0
  56. package/dist/components/ChatBubble/ChatBubble.utils.d.ts +6 -0
  57. package/dist/components/ChatBubble/ChatBubble.utils.js +15 -0
  58. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.cjs +1 -0
  59. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.d.ts +2 -0
  60. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.js +21 -0
  61. package/dist/components/ChatBubble/helpers/ChatBubbleThread.cjs +1 -0
  62. package/dist/components/ChatBubble/helpers/ChatBubbleThread.d.ts +4 -0
  63. package/dist/components/ChatBubble/helpers/ChatBubbleThread.js +63 -0
  64. package/dist/components/ChatBubble/index.d.ts +2 -0
  65. package/dist/components/ChatError/ChatError.cjs +1 -0
  66. package/dist/components/ChatError/ChatError.const.cjs +1 -0
  67. package/dist/components/ChatError/ChatError.const.d.ts +2 -0
  68. package/dist/components/ChatError/ChatError.const.js +8 -0
  69. package/dist/components/ChatError/ChatError.d.ts +2 -0
  70. package/dist/components/ChatError/ChatError.js +32 -0
  71. package/dist/components/ChatError/ChatError.types.d.ts +14 -0
  72. package/dist/components/ChatError/index.d.ts +2 -0
  73. package/dist/components/CitationList/CitationList.cjs +1 -0
  74. package/dist/components/CitationList/CitationList.d.ts +2 -0
  75. package/dist/components/CitationList/CitationList.js +30 -0
  76. package/dist/components/CitationList/CitationList.types.d.ts +15 -0
  77. package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
  78. package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
  79. package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
  80. package/dist/components/CitationList/helpers/index.d.ts +1 -0
  81. package/dist/components/CitationList/index.d.ts +2 -0
  82. package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
  83. package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
  84. package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
  85. package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
  86. package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
  87. package/dist/components/ContextMeter/ContextMeter.js +49 -0
  88. package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
  89. package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
  90. package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
  91. package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
  92. package/dist/components/ContextMeter/index.d.ts +2 -0
  93. package/dist/components/Drawer/Drawer.cjs +1 -1
  94. package/dist/components/Drawer/Drawer.const.cjs +1 -1
  95. package/dist/components/Drawer/Drawer.const.d.ts +2 -1
  96. package/dist/components/Drawer/Drawer.const.js +7 -6
  97. package/dist/components/Drawer/Drawer.d.ts +1 -1
  98. package/dist/components/Drawer/Drawer.js +93 -83
  99. package/dist/components/Drawer/Drawer.types.d.ts +4 -1
  100. package/dist/components/Drawer/hooks/useDrawer.cjs +1 -1
  101. package/dist/components/Drawer/hooks/useDrawer.js +33 -34
  102. package/dist/components/Drawer/index.d.ts +1 -1
  103. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  104. package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
  105. package/dist/components/EmptyState/EmptyState.const.d.ts +8 -6
  106. package/dist/components/EmptyState/EmptyState.const.js +15 -8
  107. package/dist/components/EmptyState/EmptyState.d.ts +1 -2
  108. package/dist/components/EmptyState/EmptyState.js +39 -43
  109. package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
  110. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
  111. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
  112. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
  113. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
  114. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
  115. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
  116. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
  117. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
  118. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
  119. package/dist/components/EmptyState/helpers/index.d.ts +3 -0
  120. package/dist/components/EmptyState/index.d.ts +1 -1
  121. package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
  122. package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -1
  123. package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -1
  124. package/dist/components/FloatingChat/FloatingChat.const.js +25 -7
  125. package/dist/components/FloatingChat/FloatingChat.d.ts +1 -18
  126. package/dist/components/FloatingChat/FloatingChat.js +93 -124
  127. package/dist/components/FloatingChat/FloatingChat.types.d.ts +11 -22
  128. package/dist/components/FloatingChat/FloatingChat.utils.cjs +1 -0
  129. package/dist/components/FloatingChat/FloatingChat.utils.d.ts +2 -0
  130. package/dist/components/FloatingChat/FloatingChat.utils.js +12 -0
  131. package/dist/components/FloatingChat/helpers/FloatingChatHeader.cjs +1 -0
  132. package/dist/components/FloatingChat/helpers/FloatingChatHeader.d.ts +9 -0
  133. package/dist/components/FloatingChat/helpers/FloatingChatHeader.js +21 -0
  134. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.cjs +1 -0
  135. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.d.ts +9 -0
  136. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.js +17 -0
  137. package/dist/components/FloatingChat/index.d.ts +1 -1
  138. package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -1
  139. package/dist/components/FormSkeleton/FormSkeleton.d.ts +1 -1
  140. package/dist/components/FormSkeleton/FormSkeleton.js +35 -24
  141. package/dist/components/Icon/index.d.ts +1 -0
  142. package/dist/components/Icon/productIcons.cjs +1 -0
  143. package/dist/components/Icon/productIcons.d.ts +7 -0
  144. package/dist/components/Icon/productIcons.js +25 -0
  145. package/dist/components/MessageActions/MessageActions.cjs +1 -0
  146. package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
  147. package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
  148. package/dist/components/MessageActions/MessageActions.const.js +10 -0
  149. package/dist/components/MessageActions/MessageActions.d.ts +2 -0
  150. package/dist/components/MessageActions/MessageActions.js +31 -0
  151. package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
  152. package/dist/components/MessageActions/index.d.ts +2 -0
  153. package/dist/components/Modal/Modal.cjs +1 -1
  154. package/dist/components/Modal/Modal.js +1 -1
  155. package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
  156. package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
  157. package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
  158. package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
  159. package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
  160. package/dist/components/ModelSelect/ModelSelect.js +41 -0
  161. package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
  162. package/dist/components/ModelSelect/index.d.ts +2 -0
  163. package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
  164. package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
  165. package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
  166. package/dist/components/PasswordInput/PasswordInput.js +5 -5
  167. package/dist/components/PromptComposer/PromptComposer.cjs +1 -0
  168. package/dist/components/PromptComposer/PromptComposer.const.cjs +1 -0
  169. package/dist/components/PromptComposer/PromptComposer.const.d.ts +6 -0
  170. package/dist/components/PromptComposer/PromptComposer.const.js +14 -0
  171. package/dist/components/PromptComposer/PromptComposer.d.ts +2 -0
  172. package/dist/components/PromptComposer/PromptComposer.js +132 -0
  173. package/dist/components/PromptComposer/PromptComposer.types.d.ts +45 -0
  174. package/dist/components/PromptComposer/PromptComposer.utils.cjs +1 -0
  175. package/dist/components/PromptComposer/PromptComposer.utils.d.ts +5 -0
  176. package/dist/components/PromptComposer/PromptComposer.utils.js +16 -0
  177. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.cjs +1 -0
  178. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.d.ts +1 -0
  179. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.js +6 -0
  180. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.cjs +1 -0
  181. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.d.ts +2 -0
  182. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.js +18 -0
  183. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.cjs +1 -0
  184. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.d.ts +1 -0
  185. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.js +9 -0
  186. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.cjs +1 -0
  187. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.d.ts +1 -0
  188. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.js +6 -0
  189. package/dist/components/PromptComposer/helpers/index.d.ts +4 -0
  190. package/dist/components/PromptComposer/index.d.ts +2 -0
  191. package/dist/components/PromptSuggestions/PromptSuggestions.cjs +1 -0
  192. package/dist/components/PromptSuggestions/PromptSuggestions.d.ts +2 -0
  193. package/dist/components/PromptSuggestions/PromptSuggestions.js +39 -0
  194. package/dist/components/PromptSuggestions/PromptSuggestions.types.d.ts +13 -0
  195. package/dist/components/PromptSuggestions/index.d.ts +2 -0
  196. package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
  197. package/dist/components/RichEditor/helpers/IconRender.js +16 -16
  198. package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
  199. package/dist/components/RichEditor/helpers/toolbarItemRender.js +23 -23
  200. package/dist/components/Select/Select.cjs +1 -1
  201. package/dist/components/Select/Select.js +23 -23
  202. package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
  203. package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
  204. package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
  205. package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
  206. package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
  207. package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
  208. package/dist/components/Select/helpers/index.d.ts +2 -0
  209. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  210. package/dist/components/Skeleton/Skeleton.const.cjs +2 -2
  211. package/dist/components/Skeleton/Skeleton.const.js +5 -6
  212. package/dist/components/Skeleton/Skeleton.js +59 -59
  213. package/dist/components/StatCard/StatCard.cjs +1 -1
  214. package/dist/components/StatCard/StatCard.const.cjs +1 -1
  215. package/dist/components/StatCard/StatCard.const.d.ts +0 -7
  216. package/dist/components/StatCard/StatCard.const.js +5 -12
  217. package/dist/components/StatCard/StatCard.d.ts +1 -2
  218. package/dist/components/StatCard/StatCard.js +48 -37
  219. package/dist/components/StatCard/StatCard.utils.cjs +1 -0
  220. package/dist/components/StatCard/StatCard.utils.d.ts +2 -0
  221. package/dist/components/StatCard/StatCard.utils.js +7 -0
  222. package/dist/components/StreamingMessage/StreamingMessage.cjs +1 -0
  223. package/dist/components/StreamingMessage/StreamingMessage.const.cjs +1 -0
  224. package/dist/components/StreamingMessage/StreamingMessage.const.d.ts +5 -0
  225. package/dist/components/StreamingMessage/StreamingMessage.const.js +10 -0
  226. package/dist/components/StreamingMessage/StreamingMessage.d.ts +2 -0
  227. package/dist/components/StreamingMessage/StreamingMessage.js +48 -0
  228. package/dist/components/StreamingMessage/StreamingMessage.types.d.ts +15 -0
  229. package/dist/components/StreamingMessage/index.d.ts +2 -0
  230. package/dist/components/ThemeSwitcher/ThemeSwitcher.cjs +1 -0
  231. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.cjs +1 -0
  232. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.d.ts +7 -0
  233. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.js +14 -0
  234. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +2 -0
  235. package/dist/components/ThemeSwitcher/ThemeSwitcher.js +39 -0
  236. package/dist/components/ThemeSwitcher/ThemeSwitcher.types.d.ts +14 -0
  237. package/dist/components/ThemeSwitcher/index.d.ts +2 -0
  238. package/dist/components/ThinkingBlock/ThinkingBlock.cjs +1 -0
  239. package/dist/components/ThinkingBlock/ThinkingBlock.const.cjs +1 -0
  240. package/dist/components/ThinkingBlock/ThinkingBlock.const.d.ts +4 -0
  241. package/dist/components/ThinkingBlock/ThinkingBlock.const.js +9 -0
  242. package/dist/components/ThinkingBlock/ThinkingBlock.d.ts +2 -0
  243. package/dist/components/ThinkingBlock/ThinkingBlock.js +45 -0
  244. package/dist/components/ThinkingBlock/ThinkingBlock.types.d.ts +16 -0
  245. package/dist/components/ThinkingBlock/index.d.ts +2 -0
  246. package/dist/components/ToolCall/ToolCall.cjs +1 -0
  247. package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
  248. package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
  249. package/dist/components/ToolCall/ToolCall.const.js +17 -0
  250. package/dist/components/ToolCall/ToolCall.d.ts +2 -0
  251. package/dist/components/ToolCall/ToolCall.js +43 -0
  252. package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
  253. package/dist/components/ToolCall/index.d.ts +2 -0
  254. package/dist/components/Transition/Transition.const.cjs +1 -1
  255. package/dist/components/Transition/Transition.const.js +12 -6
  256. package/dist/components/Transition/Transition.types.d.ts +1 -1
  257. package/dist/components/index.cjs +1 -1
  258. package/dist/components/index.d.ts +37 -9
  259. package/dist/components/index.js +455 -423
  260. package/dist/constants/generals.const.cjs +1 -1
  261. package/dist/constants/generals.const.d.ts +46 -0
  262. package/dist/constants/generals.const.js +158 -115
  263. package/dist/constants/keys.const.cjs +1 -1
  264. package/dist/constants/keys.const.js +2 -1
  265. package/dist/constants/numbers.const.cjs +1 -1
  266. package/dist/constants/numbers.const.d.ts +7 -0
  267. package/dist/constants/numbers.const.js +60 -52
  268. package/dist/context/BearProvider.cjs +1 -1
  269. package/dist/context/BearProvider.d.ts +19 -44
  270. package/dist/context/BearProvider.js +223 -208
  271. package/dist/context/bearProvider.types.d.ts +4 -0
  272. package/dist/context/index.d.ts +1 -1
  273. package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
  274. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
  275. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
  276. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
  277. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
  278. package/dist/index.cjs +1 -1
  279. package/dist/index.js +595 -563
  280. package/dist/styles/_ai-chat.css +487 -0
  281. package/dist/styles/_base.css +2 -0
  282. package/dist/styles/_chart.css +144 -0
  283. package/dist/styles/_effects.css +8 -4
  284. package/dist/styles/_skeleton.css +90 -0
  285. package/dist/styles/main.css +3 -0
  286. package/dist/styles.css +734 -32
  287. package/package.json +1 -1
  288. package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
  289. package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
  290. package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
  291. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.cjs +0 -1
  292. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.cjs +0 -1
  293. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.js +0 -14
  294. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.js +0 -35
  295. package/dist/node_modules/@forgedevstack/bear-icons/dist/action.cjs +0 -1
  296. package/dist/node_modules/@forgedevstack/bear-icons/dist/action.js +0 -26
  297. package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.cjs +0 -1
  298. package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.js +0 -4
  299. package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.cjs +0 -1
  300. package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.js +0 -130
  301. package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.cjs +0 -1
  302. package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.js +0 -12
  303. package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.cjs +0 -1
  304. package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.js +0 -18
  305. package/dist/node_modules/@forgedevstack/bear-icons/dist/status.cjs +0 -1
  306. package/dist/node_modules/@forgedevstack/bear-icons/dist/status.js +0 -6
@@ -1,32 +1,43 @@
1
- import { jsx as e, jsxs as E } from "react/jsx-runtime";
2
- import { cn as s } from "../../utils/cn.js";
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { THREE as p, FOURTEEN as d, FORTY as f } from "../../constants/numbers.const.js";
3
+ import { ANIMATION_PULSE as F } from "../../constants/generals.const.js";
4
+ import { cn as N } from "../../utils/cn.js";
3
5
  import "react";
4
- import { resolveBearId as f } from "../../utils/generateBearId.utils.js";
5
- import { useBearId as p } from "../../utils/useBearId.js";
6
- import { Skeleton as o } from "../Skeleton/Skeleton.js";
7
- import { FORM_SKELETON_FIELD_GAP_PX as F, FORM_SKELETON_DEFAULT_FIELDS as L, FORM_SKELETON_LABEL_HEIGHT_PX as O, FORM_SKELETON_FIELD_HEIGHT_PX as S, FORM_SKELETON_ROOT_CLASS as n } from "./FormSkeleton.const.js";
8
- const b = ({
9
- fields: t = L,
10
- animation: r = "pulse",
11
- id: _,
12
- testId: l,
13
- className: m
14
- }) => {
15
- const a = p("FormSkeleton"), d = f(_, a);
6
+ import { resolveBearId as S } from "../../utils/generateBearId.utils.js";
7
+ import { useBearId as _ } from "../../utils/useBearId.js";
8
+ import { Flex as r } from "../Flex/Flex.js";
9
+ import { Skeleton as m } from "../Skeleton/Skeleton.js";
10
+ const O = (t) => {
11
+ const { fields: l = p, animation: o = F, id: i, testId: a, className: n } = t;
16
12
  return /* @__PURE__ */ e(
17
- "div",
13
+ r,
18
14
  {
19
- id: d,
20
- "data-testid": l,
21
- className: s(n, "bear-flex bear-flex-col", m),
22
- style: { gap: F },
23
- children: Array.from({ length: t }).map((c, i) => /* @__PURE__ */ E("div", { className: "Bear-FormSkeleton__field bear-flex bear-flex-col bear-gap-2", children: [
24
- /* @__PURE__ */ e(o, { animation: r, width: "30%", height: O }),
25
- /* @__PURE__ */ e(o, { animation: r, width: "100%", height: S })
26
- ] }, `field-${i}`))
15
+ id: S(i, _("FormSkeleton")),
16
+ testId: a,
17
+ direction: "column",
18
+ gap: 4,
19
+ className: N("Bear-FormSkeleton", n),
20
+ children: Array.from({ length: l }).map((h, s) => /* @__PURE__ */ c(r, { direction: "column", gap: 2, className: "Bear-FormSkeleton__field", children: [
21
+ /* @__PURE__ */ e(
22
+ m,
23
+ {
24
+ animation: o,
25
+ height: d,
26
+ className: "Bear-FormSkeleton__label"
27
+ }
28
+ ),
29
+ /* @__PURE__ */ e(
30
+ m,
31
+ {
32
+ animation: o,
33
+ height: f,
34
+ className: "Bear-FormSkeleton__control"
35
+ }
36
+ )
37
+ ] }, `field-${s}`))
27
38
  }
28
39
  );
29
40
  };
30
41
  export {
31
- b as FormSkeleton
42
+ O as FormSkeleton
32
43
  };
@@ -1,2 +1,3 @@
1
1
  export * from '@forgedevstack/bear-icons';
2
2
  export { default } from '@forgedevstack/bear-icons';
3
+ export { StorybookIcon, SandboxIcon, ComponentsIcon } from './productIcons';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("@forgedevstack/bear-icons"),x=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("rect",{x:"4",y:"3",width:"16",height:"18",rx:"2"}),t.jsx("path",{d:"M8 7h8"}),t.jsx("path",{d:"M8 11h8"}),t.jsx("path",{d:"M8 15h5"}),t.jsx("circle",{cx:"17",cy:"16.5",r:"2.5"})]}),c=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("path",{d:"M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z"}),t.jsx("path",{d:"M12 12l8-4.5"}),t.jsx("path",{d:"M12 12v9"}),t.jsx("path",{d:"M12 12L4 7.5"}),t.jsx("path",{d:"M9.5 14.5l1.5 1.5 3-3"})]}),e=o=>t.jsxs(s.Icon,{...o,children:[t.jsx("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"13",y:"3",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"3",y:"13",width:"8",height:"8",rx:"1.5"}),t.jsx("rect",{x:"13",y:"13",width:"8",height:"8",rx:"1.5"})]});exports.ComponentsIcon=e;exports.SandboxIcon=c;exports.StorybookIcon=x;
@@ -0,0 +1,7 @@
1
+ import { IconProps } from '@forgedevstack/bear-icons';
2
+ import { FC } from 'react';
3
+ type ProductIcon = FC<Omit<IconProps, 'children'>>;
4
+ export declare const StorybookIcon: ProductIcon;
5
+ export declare const SandboxIcon: ProductIcon;
6
+ export declare const ComponentsIcon: ProductIcon;
7
+ export {};
@@ -0,0 +1,25 @@
1
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
+ import { Icon as c } from "@forgedevstack/bear-icons";
3
+ const e = (h) => /* @__PURE__ */ r(c, { ...h, children: [
4
+ /* @__PURE__ */ t("rect", { x: "4", y: "3", width: "16", height: "18", rx: "2" }),
5
+ /* @__PURE__ */ t("path", { d: "M8 7h8" }),
6
+ /* @__PURE__ */ t("path", { d: "M8 11h8" }),
7
+ /* @__PURE__ */ t("path", { d: "M8 15h5" }),
8
+ /* @__PURE__ */ t("circle", { cx: "17", cy: "16.5", r: "2.5" })
9
+ ] }), i = (h) => /* @__PURE__ */ r(c, { ...h, children: [
10
+ /* @__PURE__ */ t("path", { d: "M12 3l8 4.5v9L12 21l-8-4.5v-9L12 3z" }),
11
+ /* @__PURE__ */ t("path", { d: "M12 12l8-4.5" }),
12
+ /* @__PURE__ */ t("path", { d: "M12 12v9" }),
13
+ /* @__PURE__ */ t("path", { d: "M12 12L4 7.5" }),
14
+ /* @__PURE__ */ t("path", { d: "M9.5 14.5l1.5 1.5 3-3" })
15
+ ] }), x = (h) => /* @__PURE__ */ r(c, { ...h, children: [
16
+ /* @__PURE__ */ t("rect", { x: "3", y: "3", width: "8", height: "8", rx: "1.5" }),
17
+ /* @__PURE__ */ t("rect", { x: "13", y: "3", width: "8", height: "8", rx: "1.5" }),
18
+ /* @__PURE__ */ t("rect", { x: "3", y: "13", width: "8", height: "8", rx: "1.5" }),
19
+ /* @__PURE__ */ t("rect", { x: "13", y: "13", width: "8", height: "8", rx: "1.5" })
20
+ ] });
21
+ export {
22
+ x as ComponentsIcon,
23
+ i as SandboxIcon,
24
+ e as StorybookIcon
25
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("../../constants/generals.const.cjs"),B=require("../../utils/cn.cjs");require("react");const y=require("../../utils/generateBearId.utils.cjs"),I=require("../../utils/useBearId.cjs"),s=require("../Button/Button.cjs"),S=require("../Flex/Flex.cjs"),h=require("./MessageActions.const.cjs"),m=a=>{const{id:c,testId:l,onCopy:n,onRetry:o,onGood:r,onBad:i,translations:u,className:d}=a,g=I.useBearId(A.COMPONENT_NAME_MESSAGE_ACTIONS),b=y.resolveBearId(c,g),t={...h.MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS,...u};return e.jsxs(S.Flex,{id:b,testId:l,className:B.cn("Bear-MessageActions",d),align:"center",gap:1,children:[n&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:n,children:t.copyLabel}),o&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:o,children:t.retryLabel}),r&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:r,children:t.goodLabel}),i&&e.jsx(s.Button,{type:"button",variant:"ghost",size:"sm",onClick:i,children:t.badLabel})]})};exports.MessageActions=m;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/generals.const.cjs"),L={copyLabel:e.LABEL_COPY,retryLabel:e.LABEL_RETRY,goodLabel:e.LABEL_GOOD_RESPONSE,badLabel:e.LABEL_BAD_RESPONSE};exports.MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS=L;
@@ -0,0 +1,2 @@
1
+ import { MessageActionsTranslations } from './MessageActions.types';
2
+ export declare const MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS: MessageActionsTranslations;
@@ -0,0 +1,10 @@
1
+ import { LABEL_BAD_RESPONSE as L, LABEL_GOOD_RESPONSE as E, LABEL_RETRY as A, LABEL_COPY as S } from "../../constants/generals.const.js";
2
+ const o = {
3
+ copyLabel: S,
4
+ retryLabel: A,
5
+ goodLabel: E,
6
+ badLabel: L
7
+ };
8
+ export {
9
+ o as MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS
10
+ };
@@ -0,0 +1,2 @@
1
+ import { MessageActionsProps } from './MessageActions.types';
2
+ export declare const MessageActions: (props: MessageActionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { jsxs as g, jsx as t } from "react/jsx-runtime";
2
+ import { COMPONENT_NAME_MESSAGE_ACTIONS as A } from "../../constants/generals.const.js";
3
+ import { cn as h } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as N } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as f } from "../../utils/useBearId.js";
7
+ import { Button as e } from "../Button/Button.js";
8
+ import { Flex as y } from "../Flex/Flex.js";
9
+ import { MESSAGE_ACTIONS_DEFAULT_TRANSLATIONS as C } from "./MessageActions.const.js";
10
+ const B = (a) => {
11
+ const { id: m, testId: c, onCopy: r, onRetry: n, onGood: s, onBad: i, translations: l, className: d } = a, p = f(A), b = N(m, p), o = { ...C, ...l };
12
+ return /* @__PURE__ */ g(
13
+ y,
14
+ {
15
+ id: b,
16
+ testId: c,
17
+ className: h("Bear-MessageActions", d),
18
+ align: "center",
19
+ gap: 1,
20
+ children: [
21
+ r && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: r, children: o.copyLabel }),
22
+ n && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: n, children: o.retryLabel }),
23
+ s && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: s, children: o.goodLabel }),
24
+ i && /* @__PURE__ */ t(e, { type: "button", variant: "ghost", size: "sm", onClick: i, children: o.badLabel })
25
+ ]
26
+ }
27
+ );
28
+ };
29
+ export {
30
+ B as MessageActions
31
+ };
@@ -0,0 +1,16 @@
1
+ export interface MessageActionsTranslations {
2
+ copyLabel: string;
3
+ retryLabel: string;
4
+ goodLabel: string;
5
+ badLabel: string;
6
+ }
7
+ export interface MessageActionsProps {
8
+ id?: string;
9
+ testId?: string;
10
+ onCopy?: () => void;
11
+ onRetry?: () => void;
12
+ onGood?: () => void;
13
+ onBad?: () => void;
14
+ translations?: Partial<MessageActionsTranslations>;
15
+ className?: string;
16
+ }
@@ -0,0 +1,2 @@
1
+ export { MessageActions } from './MessageActions';
2
+ export type { MessageActionsProps, MessageActionsTranslations } from './MessageActions.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),E=require("react"),x=require("react-dom"),a=require("../../utils/cn.cjs"),j=require("../../utils/generateBearId.utils.cjs"),q=require("../../utils/useBearId.cjs"),g=require("../../node_modules/@forgedevstack/bear-icons/dist/navigation.cjs"),w=require("../Backdrop/Backdrop.cjs"),e=require("./Modal.const.cjs"),R=m=>{const{isOpen:s,onClose:l,title:r,children:L,size:M="md",showCloseButton:d=!0,closeOnEscape:A=!0,disableEscapeKeyDown:B=!1,lockBodyScroll:C=!0,cancelPreventScroll:O=!1,closeOnBackdrop:k=!0,hideBackdrop:b=!1,keepMounted:n=!1,isCancelBackgroundClick:i,zIndex:v=e.MODAL_Z_INDEX,className:y,footer:u,testId:D,id:f}=m,h=q.useBearId("Modal"),c=j.resolveBearId(f,h),_=C&&!O,p=i!==void 0?i:k,S=A&&!B,t=E.useCallback(N=>{S&&N.key==="Escape"&&l()},[S,l]);if(E.useEffect(()=>{if(s)return document.addEventListener("keydown",t),_&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[s,t,_]),!s&&!n)return null;const I=o.jsxs("div",{className:e.MODAL_ROOT_CLASSES,"data-testid":D,id:c,style:{zIndex:v},children:[!b&&o.jsx(w.Backdrop,{open:s,keepMounted:n,blur:!0,nested:!0,className:"Bear-Modal__backdrop",onClick:p?()=>l():void 0}),o.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?`${c}-title`:void 0,className:a.cn("Bear-Modal__container",e.MODAL_CONTAINER_CLASSES,e.MODAL_SIZE_CLASSES[M],y),style:{zIndex:e.MODAL_PANEL_Z_INDEX},children:[(r||d)&&o.jsxs("div",{className:a.cn("Bear-Modal__header",e.MODAL_HEADER_CLASSES),children:[r&&o.jsx("h2",{id:`${c}-title`,className:a.cn("Bear-Modal__title",e.MODAL_TITLE_CLASSES),children:r}),d&&o.jsx("button",{onClick:l,className:a.cn("Bear-Modal__close",e.MODAL_CLOSE_CLASSES),"aria-label":"Close modal",children:o.jsx(g.CloseIcon,{className:"bear-w-5 bear-h-5"})})]}),o.jsx("div",{className:a.cn("Bear-Modal__body",e.MODAL_BODY_CLASSES),children:L}),u&&o.jsx("div",{className:a.cn("Bear-Modal__footer",e.MODAL_FOOTER_CLASSES),children:u})]})]});return x.createPortal(I,document.body)};exports.Modal=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),E=require("react"),x=require("react-dom"),a=require("../../utils/cn.cjs"),j=require("../../utils/generateBearId.utils.cjs"),q=require("../../utils/useBearId.cjs"),g=require("@forgedevstack/bear-icons/navigation"),w=require("../Backdrop/Backdrop.cjs"),e=require("./Modal.const.cjs"),R=m=>{const{isOpen:s,onClose:l,title:r,children:L,size:M="md",showCloseButton:d=!0,closeOnEscape:A=!0,disableEscapeKeyDown:B=!1,lockBodyScroll:C=!0,cancelPreventScroll:O=!1,closeOnBackdrop:k=!0,hideBackdrop:b=!1,keepMounted:n=!1,isCancelBackgroundClick:i,zIndex:v=e.MODAL_Z_INDEX,className:y,footer:u,testId:D,id:f}=m,h=q.useBearId("Modal"),c=j.resolveBearId(f,h),_=C&&!O,p=i!==void 0?i:k,S=A&&!B,t=E.useCallback(N=>{S&&N.key==="Escape"&&l()},[S,l]);if(E.useEffect(()=>{if(s)return document.addEventListener("keydown",t),_&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[s,t,_]),!s&&!n)return null;const I=o.jsxs("div",{className:e.MODAL_ROOT_CLASSES,"data-testid":D,id:c,style:{zIndex:v},children:[!b&&o.jsx(w.Backdrop,{open:s,keepMounted:n,blur:!0,nested:!0,className:"Bear-Modal__backdrop",onClick:p?()=>l():void 0}),o.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":r?`${c}-title`:void 0,className:a.cn("Bear-Modal__container",e.MODAL_CONTAINER_CLASSES,e.MODAL_SIZE_CLASSES[M],y),style:{zIndex:e.MODAL_PANEL_Z_INDEX},children:[(r||d)&&o.jsxs("div",{className:a.cn("Bear-Modal__header",e.MODAL_HEADER_CLASSES),children:[r&&o.jsx("h2",{id:`${c}-title`,className:a.cn("Bear-Modal__title",e.MODAL_TITLE_CLASSES),children:r}),d&&o.jsx("button",{onClick:l,className:a.cn("Bear-Modal__close",e.MODAL_CLOSE_CLASSES),"aria-label":"Close modal",children:o.jsx(g.CloseIcon,{className:"bear-w-5 bear-h-5"})})]}),o.jsx("div",{className:a.cn("Bear-Modal__body",e.MODAL_BODY_CLASSES),children:L}),u&&o.jsx("div",{className:a.cn("Bear-Modal__footer",e.MODAL_FOOTER_CLASSES),children:u})]})]});return x.createPortal(I,document.body)};exports.Modal=R;
@@ -4,7 +4,7 @@ import { createPortal as x } from "react-dom";
4
4
  import { cn as o } from "../../utils/cn.js";
5
5
  import { resolveBearId as T } from "../../utils/generateBearId.utils.js";
6
6
  import { useBearId as R } from "../../utils/useBearId.js";
7
- import { CloseIcon as g } from "../../node_modules/@forgedevstack/bear-icons/dist/navigation.js";
7
+ import { CloseIcon as g } from "@forgedevstack/bear-icons/navigation";
8
8
  import { Backdrop as z } from "../Backdrop/Backdrop.js";
9
9
  import { MODAL_Z_INDEX as P, MODAL_ROOT_CLASSES as Z, MODAL_PANEL_Z_INDEX as j, MODAL_TITLE_CLASSES as X, MODAL_CLOSE_CLASSES as $, MODAL_HEADER_CLASSES as F, MODAL_BODY_CLASSES as H, MODAL_FOOTER_CLASSES as K, MODAL_SIZE_CLASSES as Y, MODAL_CONTAINER_CLASSES as q } from "./Modal.const.js";
10
10
  const le = (u) => {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),M=require("../../constants/generals.const.cjs"),_=require("../../utils/cn.cjs");require("react");const b=require("../../utils/generateBearId.utils.cjs"),B=require("../../utils/useBearId.cjs"),I=require("../Box/Box.cjs"),L=require("../Select/Select.cjs"),g=require("./ModelSelect.const.cjs"),m=t=>{const{id:r,testId:l,models:o,value:c,onChange:n,label:a,placeholder:d=g.MODEL_SELECT_DEFAULT_PLACEHOLDER,disabled:i,className:u}=t,E=B.useBearId(M.COMPONENT_NAME_MODEL_SELECT),S=b.resolveBearId(r,E),q=o.map(e=>({value:e.id,label:e.label,disabled:e.disabled}));return s.jsx(I.Box,{id:S,"data-testid":l,className:_.cn("Bear-ModelSelect",u),children:s.jsx(L.Select,{options:q,value:c,onChange:n,label:a,placeholder:d,disabled:i,size:"sm"})})};exports.ModelSelect=m;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="Model";exports.MODEL_SELECT_DEFAULT_PLACEHOLDER=E;
@@ -0,0 +1 @@
1
+ export declare const MODEL_SELECT_DEFAULT_PLACEHOLDER = "Model";
@@ -0,0 +1,4 @@
1
+ const E = "Model";
2
+ export {
3
+ E as MODEL_SELECT_DEFAULT_PLACEHOLDER
4
+ };
@@ -0,0 +1,2 @@
1
+ import { ModelSelectProps } from './ModelSelect.types';
2
+ export declare const ModelSelect: (props: ModelSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { COMPONENT_NAME_MODEL_SELECT as L } from "../../constants/generals.const.js";
3
+ import { cn as b } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as M } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as _ } from "../../utils/useBearId.js";
7
+ import { Box as C } from "../Box/Box.js";
8
+ import { Select as I } from "../Select/Select.js";
9
+ import { MODEL_SELECT_DEFAULT_PLACEHOLDER as N } from "./ModelSelect.const.js";
10
+ const A = (r) => {
11
+ const {
12
+ id: t,
13
+ testId: a,
14
+ models: d,
15
+ value: l,
16
+ onChange: m,
17
+ label: s,
18
+ placeholder: i = N,
19
+ disabled: c,
20
+ className: p
21
+ } = r, n = _(L), E = M(t, n), f = d.map((e) => ({
22
+ value: e.id,
23
+ label: e.label,
24
+ disabled: e.disabled
25
+ }));
26
+ return /* @__PURE__ */ o(C, { id: E, "data-testid": a, className: b("Bear-ModelSelect", p), children: /* @__PURE__ */ o(
27
+ I,
28
+ {
29
+ options: f,
30
+ value: l,
31
+ onChange: m,
32
+ label: s,
33
+ placeholder: i,
34
+ disabled: c,
35
+ size: "sm"
36
+ }
37
+ ) });
38
+ };
39
+ export {
40
+ A as ModelSelect
41
+ };
@@ -0,0 +1,16 @@
1
+ export interface ModelSelectOption {
2
+ id: string;
3
+ label: string;
4
+ disabled?: boolean;
5
+ }
6
+ export interface ModelSelectProps {
7
+ id?: string;
8
+ testId?: string;
9
+ models: ModelSelectOption[];
10
+ value?: string;
11
+ onChange?: (id: string) => void;
12
+ label?: string;
13
+ placeholder?: string;
14
+ disabled?: boolean;
15
+ className?: string;
16
+ }
@@ -0,0 +1,2 @@
1
+ export { ModelSelect } from './ModelSelect';
2
+ export type { ModelSelectOption, ModelSelectProps } from './ModelSelect.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const E=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),_={[E.OVERLAY_OPEN_EFFECT_FADE]:E.OVERLAY_OPEN_EFFECT_FADE,[E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN]:E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN,[E.OVERLAY_OPEN_EFFECT_SCALE]:E.OVERLAY_OPEN_EFFECT_SCALE};exports.OVERLAY_OPEN_EFFECT_NONE=E.OVERLAY_OPEN_EFFECT_NONE;exports.OVERLAY_EFFECT_TRANSITION=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const E=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),_={[E.OVERLAY_OPEN_EFFECT_FADE]:E.OVERLAY_OPEN_EFFECT_FADE,[E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN]:E.OVERLAY_OPEN_EFFECT_SLIDE_DOWN,[E.OVERLAY_OPEN_EFFECT_SCALE]:E.OVERLAY_OPEN_EFFECT_SCALE,[E.OVERLAY_OPEN_EFFECT_FOLD]:E.OVERLAY_OPEN_EFFECT_FOLD};exports.OVERLAY_OPEN_EFFECT_NONE=E.OVERLAY_OPEN_EFFECT_NONE;exports.OVERLAY_EFFECT_TRANSITION=_;
@@ -1,12 +1,13 @@
1
1
  import "react";
2
- import { OVERLAY_OPEN_EFFECT_SCALE as E, OVERLAY_OPEN_EFFECT_SLIDE_DOWN as _, OVERLAY_OPEN_EFFECT_FADE as O } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
3
- import { OVERLAY_OPEN_EFFECT_NONE as T } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
4
- const A = {
2
+ import { OVERLAY_OPEN_EFFECT_FOLD as E, OVERLAY_OPEN_EFFECT_SCALE as _, OVERLAY_OPEN_EFFECT_SLIDE_DOWN as O, OVERLAY_OPEN_EFFECT_FADE as F } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
3
+ import { OVERLAY_OPEN_EFFECT_NONE as C } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js";
4
+ const L = {
5
+ [F]: F,
5
6
  [O]: O,
6
7
  [_]: _,
7
8
  [E]: E
8
9
  };
9
10
  export {
10
- A as OVERLAY_EFFECT_TRANSITION,
11
- T as OVERLAY_OPEN_EFFECT_NONE
11
+ L as OVERLAY_EFFECT_TRANSITION,
12
+ C as OVERLAY_OPEN_EFFECT_NONE
12
13
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),L=require("../Input/Input.cjs"),i=require("../../node_modules/@forgedevstack/bear-icons/dist/action.cjs"),_=b.cn("Bear-PasswordInput__shift bear-text-xs bear-font-medium bear-px-1.5 bear-py-0.5","bear-rounded bear-bg-amber-100 bear-text-amber-700","dark:bear-bg-amber-900/40 dark:bear-text-amber-400","bear-select-none bear-whitespace-nowrap"),S=({visible:t,onVisibilityChange:a,hideToggle:d=!1,toggleAriaLabel:u="Toggle password visibility",showShiftIndicator:n=!1,visibleIcon:l,hiddenIcon:p,...w})=>{const[x,m]=s.useState(!1),[f,I]=s.useState(!1),o=t!==void 0,c=o?t:x,g=s.useCallback(()=>{o?a==null||a(!t):m(e=>!e)},[o,t,a]);s.useEffect(()=>{if(!n)return;const e=j=>I(j.getModifierState("CapsLock"));return window.addEventListener("keydown",e),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",e)}},[n]);const v=r.jsx(i.VisibilityOffIcon,{className:"bear-w-4 bear-h-4"}),k=r.jsx(i.VisibilityIcon,{className:"bear-w-4 bear-h-4"}),y=d?void 0:r.jsxs("span",{className:"Bear-PasswordInput__actions bear-inline-flex bear-items-center bear-gap-1.5",children:[n&&f&&r.jsx("span",{className:_,children:"Caps"}),r.jsx("button",{type:"button",tabIndex:-1,onClick:g,className:b.cn("Bear-PasswordInput__toggle bear-inline-flex bear-items-center bear-justify-center","bear-text-gray-400 hover:bear-text-gray-600 dark:hover:bear-text-gray-300","bear-transition-colors bear-cursor-pointer"),"aria-label":u,children:c?l??v:p??k})]});return r.jsx(L.Input,{type:c?"text":"password",rightAddon:y,autoComplete:"current-password",...w})};exports.PasswordInput=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),L=require("../Input/Input.cjs"),i=require("@forgedevstack/bear-icons/action"),_=b.cn("Bear-PasswordInput__shift bear-text-xs bear-font-medium bear-px-1.5 bear-py-0.5","bear-rounded bear-bg-amber-100 bear-text-amber-700","dark:bear-bg-amber-900/40 dark:bear-text-amber-400","bear-select-none bear-whitespace-nowrap"),S=({visible:t,onVisibilityChange:a,hideToggle:d=!1,toggleAriaLabel:u="Toggle password visibility",showShiftIndicator:n=!1,visibleIcon:l,hiddenIcon:p,...w})=>{const[x,m]=s.useState(!1),[f,I]=s.useState(!1),o=t!==void 0,c=o?t:x,g=s.useCallback(()=>{o?a==null||a(!t):m(e=>!e)},[o,t,a]);s.useEffect(()=>{if(!n)return;const e=j=>I(j.getModifierState("CapsLock"));return window.addEventListener("keydown",e),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",e)}},[n]);const v=r.jsx(i.VisibilityOffIcon,{className:"bear-w-4 bear-h-4"}),k=r.jsx(i.VisibilityIcon,{className:"bear-w-4 bear-h-4"}),y=d?void 0:r.jsxs("span",{className:"Bear-PasswordInput__actions bear-inline-flex bear-items-center bear-gap-1.5",children:[n&&f&&r.jsx("span",{className:_,children:"Caps"}),r.jsx("button",{type:"button",tabIndex:-1,onClick:g,className:b.cn("Bear-PasswordInput__toggle bear-inline-flex bear-items-center bear-justify-center","bear-text-gray-400 hover:bear-text-gray-600 dark:hover:bear-text-gray-300","bear-transition-colors bear-cursor-pointer"),"aria-label":u,children:c?l??v:p??k})]});return r.jsx(L.Input,{type:c?"text":"password",rightAddon:y,autoComplete:"current-password",...w})};exports.PasswordInput=S;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as L, jsx as r } from "react/jsx-runtime";
2
- import { useState as b, useCallback as _, useEffect as N } from "react";
2
+ import { useState as b, useCallback as _, useEffect as E } from "react";
3
3
  import { cn as c } from "../../utils/cn.js";
4
- import { Input as E } from "../Input/Input.js";
5
- import { VisibilityOffIcon as B, VisibilityIcon as C } from "../../node_modules/@forgedevstack/bear-icons/dist/action.js";
4
+ import { Input as N } from "../Input/Input.js";
5
+ import { VisibilityOffIcon as B, VisibilityIcon as C } from "@forgedevstack/bear-icons/action";
6
6
  const O = c(
7
7
  "Bear-PasswordInput__shift bear-text-xs bear-font-medium bear-px-1.5 bear-py-0.5",
8
8
  "bear-rounded bear-bg-amber-100 bear-text-amber-700",
@@ -21,7 +21,7 @@ const O = c(
21
21
  const [u, f] = b(!1), [w, x] = b(!1), n = a !== void 0, o = n ? a : u, k = _(() => {
22
22
  n ? t == null || t(!a) : f((e) => !e);
23
23
  }, [n, a, t]);
24
- N(() => {
24
+ E(() => {
25
25
  if (!s) return;
26
26
  const e = (y) => x(y.getModifierState("CapsLock"));
27
27
  return window.addEventListener("keydown", e), window.addEventListener("keyup", e), () => {
@@ -47,7 +47,7 @@ const O = c(
47
47
  )
48
48
  ] });
49
49
  return /* @__PURE__ */ r(
50
- E,
50
+ N,
51
51
  {
52
52
  type: o ? "text" : "password",
53
53
  rightAddon: g,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),T=require("react"),i=require("../../constants/generals.const.cjs"),V=require("../../utils/cn.cjs"),$=require("../../utils/generateBearId.utils.cjs"),Y=require("../../utils/useBearId.cjs"),R=require("../Box/Box.cjs"),d=require("../Button/Button.cjs"),g=require("../Flex/Flex.cjs"),s=require("./PromptComposer.const.cjs"),c=require("./PromptComposer.utils.cjs"),z=require("./helpers/PromptComposerAttachSvg.cjs"),H=require("./helpers/PromptComposerFileChip.cjs"),K=require("./helpers/PromptComposerSendSvg.cjs"),J=require("./helpers/PromptComposerStopSvg.cjs"),Q=x=>{const{id:f,testId:M,value:P,defaultValue:b=s.PROMPT_COMPOSER_DEFAULT_VALUE,onChange:p,onSubmit:a,onStop:_,onAttach:m,files:E,onFileRemove:B,isStreaming:o=s.PROMPT_COMPOSER_DEFAULT_STREAMING,disabled:r=s.PROMPT_COMPOSER_DEFAULT_DISABLED,allowAttach:v=s.PROMPT_COMPOSER_DEFAULT_ATTACH,accept:A,placeholder:I,translations:j,footer:q,className:N}=x,y=Y.useBearId(i.COMPONENT_NAME_PROMPT_COMPOSER),C=$.resolveBearId(f,y),S=T.useRef(null),[D,F]=T.useState(b),n=c.resolvePromptDraft({value:P},D),l={...s.PROMPT_COMPOSER_DEFAULT_TRANSLATIONS,...j},L=`${C}-field`,h=c.canSubmitPrompt(n,r,o),u=e=>{c.shouldUseInternalDraft(P)&&F(e),p==null||p(e)},w=()=>{const e=n.trim();!h||!e||(a==null||a(e),u(i.EMPTY_STRING))},U=()=>{var e;(e=S.current)==null||e.click()},k=e=>{!e||e.length===0||m==null||m(Array.from(e))},G=o&&!!_,O=E??[];return t.jsxs(R.Box,{id:C,"data-testid":M,className:V.cn("Bear-PromptComposer",N),children:[O.length>0&&t.jsx(g.Flex,{className:"Bear-PromptComposer__files",wrap:"wrap",gap:2,children:O.map(e=>t.jsx(H.PromptComposerFileChip,{file:e,disabled:r,onRemove:B},`${e.name}-${e.size}-${e.lastModified}`))}),t.jsxs(g.Flex,{className:"Bear-PromptComposer__row",align:"end",gap:2,children:[v&&t.jsx(d.Button,{type:"button",variant:"ghost",iconOnly:!0,disabled:r||o,"aria-label":l.attachLabel,onClick:U,children:t.jsx(z.PromptComposerAttachSvg,{})}),t.jsx(R.Box,{className:"Bear-PromptComposer__field",children:t.jsx("textarea",{id:L,className:"Bear-PromptComposer__textarea",value:n,placeholder:I??l.placeholder,disabled:r,rows:2,onChange:e=>u(e.target.value),onKeyDown:e=>c.submitPromptDraft({event:e,disabled:r,isStreaming:o,onSubmit:a,draft:n,clearDraft:()=>u(i.EMPTY_STRING)})})}),G?t.jsx(d.Button,{type:"button",variant:"secondary",iconOnly:!0,"aria-label":l.stopLabel,onClick:_,children:t.jsx(J.PromptComposerStopSvg,{})}):t.jsx(d.Button,{type:"button",variant:"primary",iconOnly:!0,disabled:!h,"aria-label":l.sendLabel,onClick:w,children:t.jsx(K.PromptComposerSendSvg,{})})]}),t.jsx("input",{ref:S,type:"file",hidden:!0,multiple:!0,accept:A,disabled:r||o,onChange:e=>{k(e.target.files),e.target.value=i.EMPTY_STRING}}),q]})};exports.PromptComposer=Q;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../../constants/generals.const.cjs"),_={placeholder:O.PLACEHOLDER_START_TYPING,sendLabel:O.LABEL_SEND,stopLabel:O.LABEL_STOP,attachLabel:O.LABEL_ATTACH},E=O.BOOLEAN_FALSE,T=O.BOOLEAN_FALSE,A=O.BOOLEAN_FALSE,P=O.EMPTY_STRING;exports.PROMPT_COMPOSER_DEFAULT_ATTACH=A;exports.PROMPT_COMPOSER_DEFAULT_DISABLED=E;exports.PROMPT_COMPOSER_DEFAULT_STREAMING=T;exports.PROMPT_COMPOSER_DEFAULT_TRANSLATIONS=_;exports.PROMPT_COMPOSER_DEFAULT_VALUE=P;
@@ -0,0 +1,6 @@
1
+ import { PromptComposerTranslations } from './PromptComposer.types';
2
+ export declare const PROMPT_COMPOSER_DEFAULT_TRANSLATIONS: PromptComposerTranslations;
3
+ export declare const PROMPT_COMPOSER_DEFAULT_DISABLED = false;
4
+ export declare const PROMPT_COMPOSER_DEFAULT_STREAMING = false;
5
+ export declare const PROMPT_COMPOSER_DEFAULT_ATTACH = false;
6
+ export declare const PROMPT_COMPOSER_DEFAULT_VALUE = "";
@@ -0,0 +1,14 @@
1
+ import { EMPTY_STRING as E, BOOLEAN_FALSE as T, LABEL_ATTACH as _, LABEL_STOP as A, LABEL_SEND as L, PLACEHOLDER_START_TYPING as O } from "../../constants/generals.const.js";
2
+ const R = {
3
+ placeholder: O,
4
+ sendLabel: L,
5
+ stopLabel: A,
6
+ attachLabel: _
7
+ }, S = T, M = T, o = T, t = E;
8
+ export {
9
+ o as PROMPT_COMPOSER_DEFAULT_ATTACH,
10
+ S as PROMPT_COMPOSER_DEFAULT_DISABLED,
11
+ M as PROMPT_COMPOSER_DEFAULT_STREAMING,
12
+ R as PROMPT_COMPOSER_DEFAULT_TRANSLATIONS,
13
+ t as PROMPT_COMPOSER_DEFAULT_VALUE
14
+ };
@@ -0,0 +1,2 @@
1
+ import { PromptComposerProps } from './PromptComposer.types';
2
+ export declare const PromptComposer: (props: PromptComposerProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,132 @@
1
+ import { jsxs as C, jsx as t } from "react/jsx-runtime";
2
+ import { useRef as $, useState as j } from "react";
3
+ import { COMPONENT_NAME_PROMPT_COMPOSER as G, EMPTY_STRING as p } from "../../constants/generals.const.js";
4
+ import { cn as z } from "../../utils/cn.js";
5
+ import { resolveBearId as H } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as K } from "../../utils/useBearId.js";
7
+ import { Box as O } from "../Box/Box.js";
8
+ import { Button as c } from "../Button/Button.js";
9
+ import { Flex as S } from "../Flex/Flex.js";
10
+ import { PROMPT_COMPOSER_DEFAULT_VALUE as Y, PROMPT_COMPOSER_DEFAULT_STREAMING as q, PROMPT_COMPOSER_DEFAULT_DISABLED as J, PROMPT_COMPOSER_DEFAULT_ATTACH as Q, PROMPT_COMPOSER_DEFAULT_TRANSLATIONS as W } from "./PromptComposer.const.js";
11
+ import { canSubmitPrompt as X, submitPromptDraft as Z, resolvePromptDraft as ee, shouldUseInternalDraft as te } from "./PromptComposer.utils.js";
12
+ import { PromptComposerAttachSvg as re } from "./helpers/PromptComposerAttachSvg.js";
13
+ import { PromptComposerFileChip as oe } from "./helpers/PromptComposerFileChip.js";
14
+ import { PromptComposerSendSvg as ae } from "./helpers/PromptComposerSendSvg.js";
15
+ import { PromptComposerStopSvg as le } from "./helpers/PromptComposerStopSvg.js";
16
+ const Re = (R) => {
17
+ const {
18
+ id: T,
19
+ testId: b,
20
+ value: d,
21
+ defaultValue: E = Y,
22
+ onChange: s,
23
+ onSubmit: a,
24
+ onStop: f,
25
+ onAttach: m,
26
+ files: M,
27
+ onFileRemove: A,
28
+ isStreaming: o = q,
29
+ disabled: r = J,
30
+ allowAttach: g = Q,
31
+ accept: v,
32
+ placeholder: D,
33
+ translations: I,
34
+ footer: N,
35
+ className: y
36
+ } = R, B = K(G), P = H(T, B), u = $(null), [F, L] = j(E), l = ee({ value: d }, F), n = { ...W, ...I }, w = `${P}-field`, _ = X(l, r, o), i = (e) => {
37
+ te(d) && L(e), s == null || s(e);
38
+ }, x = () => {
39
+ const e = l.trim();
40
+ !_ || !e || (a == null || a(e), i(p));
41
+ }, U = () => {
42
+ var e;
43
+ (e = u.current) == null || e.click();
44
+ }, k = (e) => {
45
+ !e || e.length === 0 || m == null || m(Array.from(e));
46
+ }, V = o && !!f, h = M ?? [];
47
+ return /* @__PURE__ */ C(O, { id: P, "data-testid": b, className: z("Bear-PromptComposer", y), children: [
48
+ h.length > 0 && /* @__PURE__ */ t(S, { className: "Bear-PromptComposer__files", wrap: "wrap", gap: 2, children: h.map((e) => /* @__PURE__ */ t(
49
+ oe,
50
+ {
51
+ file: e,
52
+ disabled: r,
53
+ onRemove: A
54
+ },
55
+ `${e.name}-${e.size}-${e.lastModified}`
56
+ )) }),
57
+ /* @__PURE__ */ C(S, { className: "Bear-PromptComposer__row", align: "end", gap: 2, children: [
58
+ g && /* @__PURE__ */ t(
59
+ c,
60
+ {
61
+ type: "button",
62
+ variant: "ghost",
63
+ iconOnly: !0,
64
+ disabled: r || o,
65
+ "aria-label": n.attachLabel,
66
+ onClick: U,
67
+ children: /* @__PURE__ */ t(re, {})
68
+ }
69
+ ),
70
+ /* @__PURE__ */ t(O, { className: "Bear-PromptComposer__field", children: /* @__PURE__ */ t(
71
+ "textarea",
72
+ {
73
+ id: w,
74
+ className: "Bear-PromptComposer__textarea",
75
+ value: l,
76
+ placeholder: D ?? n.placeholder,
77
+ disabled: r,
78
+ rows: 2,
79
+ onChange: (e) => i(e.target.value),
80
+ onKeyDown: (e) => Z({
81
+ event: e,
82
+ disabled: r,
83
+ isStreaming: o,
84
+ onSubmit: a,
85
+ draft: l,
86
+ clearDraft: () => i(p)
87
+ })
88
+ }
89
+ ) }),
90
+ V ? /* @__PURE__ */ t(
91
+ c,
92
+ {
93
+ type: "button",
94
+ variant: "secondary",
95
+ iconOnly: !0,
96
+ "aria-label": n.stopLabel,
97
+ onClick: f,
98
+ children: /* @__PURE__ */ t(le, {})
99
+ }
100
+ ) : /* @__PURE__ */ t(
101
+ c,
102
+ {
103
+ type: "button",
104
+ variant: "primary",
105
+ iconOnly: !0,
106
+ disabled: !_,
107
+ "aria-label": n.sendLabel,
108
+ onClick: x,
109
+ children: /* @__PURE__ */ t(ae, {})
110
+ }
111
+ )
112
+ ] }),
113
+ /* @__PURE__ */ t(
114
+ "input",
115
+ {
116
+ ref: u,
117
+ type: "file",
118
+ hidden: !0,
119
+ multiple: !0,
120
+ accept: v,
121
+ disabled: r || o,
122
+ onChange: (e) => {
123
+ k(e.target.files), e.target.value = p;
124
+ }
125
+ }
126
+ ),
127
+ N
128
+ ] });
129
+ };
130
+ export {
131
+ Re as PromptComposer
132
+ };
@@ -0,0 +1,45 @@
1
+ import { KeyboardEvent, ReactNode } from 'react';
2
+ export interface PromptComposerTranslations {
3
+ placeholder: string;
4
+ sendLabel: string;
5
+ stopLabel: string;
6
+ attachLabel: string;
7
+ }
8
+ export interface PromptComposerProps {
9
+ id?: string;
10
+ testId?: string;
11
+ value?: string;
12
+ defaultValue?: string;
13
+ onChange?: (value: string) => void;
14
+ onSubmit?: (value: string) => void;
15
+ onStop?: () => void;
16
+ onAttach?: (files: File[]) => void;
17
+ files?: File[];
18
+ onFileRemove?: (file: File) => void;
19
+ isStreaming?: boolean;
20
+ disabled?: boolean;
21
+ allowAttach?: boolean;
22
+ accept?: string;
23
+ placeholder?: string;
24
+ translations?: Partial<PromptComposerTranslations>;
25
+ footer?: ReactNode;
26
+ className?: string;
27
+ }
28
+ export interface PromptComposerFileChipProps {
29
+ file: File;
30
+ disabled: boolean;
31
+ onRemove?: (file: File) => void;
32
+ }
33
+ export interface UsePromptComposerValueParams {
34
+ value?: string;
35
+ defaultValue?: string;
36
+ onChange?: (value: string) => void;
37
+ }
38
+ export interface PromptComposerKeyParams {
39
+ event: KeyboardEvent<HTMLTextAreaElement>;
40
+ disabled: boolean;
41
+ isStreaming: boolean;
42
+ onSubmit?: (value: string) => void;
43
+ draft: string;
44
+ clearDraft: () => void;
45
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../constants/generals.const.cjs"),c=require("../../constants/keys.const.cjs"),l=t=>{const{event:r,disabled:e,isStreaming:o,onSubmit:n,draft:a,clearDraft:i}=t;if(r.key!==c.KEY_ENTER||r.shiftKey||e||o)return;r.preventDefault();const s=a.trim();s&&(n==null||n(s),i())},f=(t,r)=>t.value??r,m=t=>t===void 0,d=(t,r,e)=>r||e?u.BOOLEAN_FALSE:t.trim().length>0;exports.canSubmitPrompt=d;exports.resolvePromptDraft=f;exports.shouldUseInternalDraft=m;exports.submitPromptDraft=l;
@@ -0,0 +1,5 @@
1
+ import { PromptComposerKeyParams, UsePromptComposerValueParams } from './PromptComposer.types';
2
+ export declare const submitPromptDraft: (params: PromptComposerKeyParams) => void;
3
+ export declare const resolvePromptDraft: (params: UsePromptComposerValueParams, internalValue: string) => string;
4
+ export declare const shouldUseInternalDraft: (value: string | undefined) => value is undefined;
5
+ export declare const canSubmitPrompt: (draft: string, disabled: boolean, isStreaming: boolean) => boolean;
@@ -0,0 +1,16 @@
1
+ import { BOOLEAN_FALSE as f } from "../../constants/generals.const.js";
2
+ import { KEY_ENTER as m } from "../../constants/keys.const.js";
3
+ const l = (t) => {
4
+ const { event: r, disabled: e, isStreaming: i, onSubmit: n, draft: s, clearDraft: a } = t;
5
+ if (r.key !== m || r.shiftKey || e || i)
6
+ return;
7
+ r.preventDefault();
8
+ const o = s.trim();
9
+ o && (n == null || n(o), a());
10
+ }, p = (t, r) => t.value ?? r, d = (t) => t === void 0, v = (t, r, e) => r || e ? f : t.trim().length > 0;
11
+ export {
12
+ v as canSubmitPrompt,
13
+ p as resolvePromptDraft,
14
+ d as shouldUseInternalDraft,
15
+ l as submitPromptDraft
16
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../../constants/numbers.const.cjs"),o=()=>e.jsx("svg",{width:t.EIGHTEEN,height:t.EIGHTEEN,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48"})});exports.PromptComposerAttachSvg=o;