@admin-layout/tailwind-ui 12.2.4-alpha.7 → 12.2.4-alpha.71

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 (437) hide show
  1. package/lib/components/AIToolbar/components/AIToolBar.d.ts +22 -0
  2. package/lib/components/AIToolbar/components/AIToolBar.d.ts.map +1 -0
  3. package/lib/components/AIToolbar/components/AIToolBar.js +87 -0
  4. package/lib/components/AIToolbar/components/AIToolBar.js.map +1 -0
  5. package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts +14 -0
  6. package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts.map +1 -0
  7. package/lib/components/AIToolbar/components/AIToolbarPrimitives.js +60 -0
  8. package/lib/components/AIToolbar/components/AIToolbarPrimitives.js.map +1 -0
  9. package/lib/components/AIToolbar/components/CustomCursor.d.ts +2 -0
  10. package/lib/components/AIToolbar/components/CustomCursor.d.ts.map +1 -0
  11. package/lib/components/AIToolbar/components/CustomCursor.js +66 -0
  12. package/lib/components/AIToolbar/components/CustomCursor.js.map +1 -0
  13. package/lib/components/AIToolbar/components/DragButton.d.ts +9 -0
  14. package/lib/components/AIToolbar/components/DragButton.d.ts.map +1 -0
  15. package/lib/components/AIToolbar/components/DragButton.js +57 -0
  16. package/lib/components/AIToolbar/components/DragButton.js.map +1 -0
  17. package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts +7 -0
  18. package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts.map +1 -0
  19. package/lib/components/AIToolbar/components/Markdown/copy-button.js +30 -0
  20. package/lib/components/AIToolbar/components/Markdown/copy-button.js.map +1 -0
  21. package/lib/components/AIToolbar/components/Markdown/index.d.ts +7 -0
  22. package/lib/components/AIToolbar/components/Markdown/index.d.ts.map +1 -0
  23. package/lib/components/AIToolbar/components/Markdown/index.js +46 -0
  24. package/lib/components/AIToolbar/components/Markdown/index.js.map +1 -0
  25. package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts +24 -0
  26. package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts.map +1 -0
  27. package/lib/components/AIToolbar/components/completion/AssistantAvatar.js +48 -0
  28. package/lib/components/AIToolbar/components/completion/AssistantAvatar.js.map +1 -0
  29. package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts +28 -0
  30. package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts.map +1 -0
  31. package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js +209 -0
  32. package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js.map +1 -0
  33. package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts +15 -0
  34. package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts.map +1 -0
  35. package/lib/components/AIToolbar/components/completion/Audio.d.ts +5 -0
  36. package/lib/components/AIToolbar/components/completion/Audio.d.ts.map +1 -0
  37. package/lib/components/AIToolbar/components/completion/Audio.js +67 -0
  38. package/lib/components/AIToolbar/components/completion/Audio.js.map +1 -0
  39. package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts +11 -0
  40. package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts.map +1 -0
  41. package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js +66 -0
  42. package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js.map +1 -0
  43. package/lib/components/AIToolbar/components/completion/CharacterPicker.d.ts +5 -0
  44. package/lib/components/AIToolbar/components/completion/CharacterPicker.d.ts.map +1 -0
  45. package/lib/components/AIToolbar/components/completion/CharacterPicker.js +93 -0
  46. package/lib/components/AIToolbar/components/completion/CharacterPicker.js.map +1 -0
  47. package/lib/components/AIToolbar/components/completion/Files.d.ts +7 -0
  48. package/lib/components/AIToolbar/components/completion/Files.d.ts.map +1 -0
  49. package/lib/components/AIToolbar/components/completion/Files.js +166 -0
  50. package/lib/components/AIToolbar/components/completion/Files.js.map +1 -0
  51. package/lib/components/AIToolbar/components/completion/Input.d.ts +6 -0
  52. package/lib/components/AIToolbar/components/completion/Input.d.ts.map +1 -0
  53. package/lib/components/AIToolbar/components/completion/Input.js +287 -0
  54. package/lib/components/AIToolbar/components/completion/Input.js.map +1 -0
  55. package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts +11 -0
  56. package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts.map +1 -0
  57. package/lib/components/AIToolbar/components/completion/MessageHistory.js +131 -0
  58. package/lib/components/AIToolbar/components/completion/MessageHistory.js.map +1 -0
  59. package/lib/components/AIToolbar/components/completion/Screenshot.d.ts +7 -0
  60. package/lib/components/AIToolbar/components/completion/Screenshot.d.ts.map +1 -0
  61. package/lib/components/AIToolbar/components/completion/Screenshot.js +30 -0
  62. package/lib/components/AIToolbar/components/completion/Screenshot.js.map +1 -0
  63. package/lib/components/AIToolbar/components/completion/index.d.ts +13 -0
  64. package/lib/components/AIToolbar/components/completion/index.d.ts.map +1 -0
  65. package/lib/components/AIToolbar/components/completion/index.js +25 -0
  66. package/lib/components/AIToolbar/components/completion/index.js.map +1 -0
  67. package/lib/components/AIToolbar/components/index.d.ts +17 -0
  68. package/lib/components/AIToolbar/components/index.d.ts.map +1 -0
  69. package/lib/components/AIToolbar/components/speech/Header.d.ts +14 -0
  70. package/lib/components/AIToolbar/components/speech/Header.d.ts.map +1 -0
  71. package/lib/components/AIToolbar/components/speech/Header.js +82 -0
  72. package/lib/components/AIToolbar/components/speech/Header.js.map +1 -0
  73. package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.d.ts +2 -0
  74. package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.d.ts.map +1 -0
  75. package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.js +396 -0
  76. package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.js.map +1 -0
  77. package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts +8 -0
  78. package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts.map +1 -0
  79. package/lib/components/AIToolbar/components/speech/ModeSwitcher.js +44 -0
  80. package/lib/components/AIToolbar/components/speech/ModeSwitcher.js.map +1 -0
  81. package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts +13 -0
  82. package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts.map +1 -0
  83. package/lib/components/AIToolbar/components/speech/PermissionFlow.js +168 -0
  84. package/lib/components/AIToolbar/components/speech/PermissionFlow.js.map +1 -0
  85. package/lib/components/AIToolbar/components/speech/QuickActions.d.ts +13 -0
  86. package/lib/components/AIToolbar/components/speech/QuickActions.d.ts.map +1 -0
  87. package/lib/components/AIToolbar/components/speech/QuickActions.js +100 -0
  88. package/lib/components/AIToolbar/components/speech/QuickActions.js.map +1 -0
  89. package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts +14 -0
  90. package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts.map +1 -0
  91. package/lib/components/AIToolbar/components/speech/RecordingPanel.js +101 -0
  92. package/lib/components/AIToolbar/components/speech/RecordingPanel.js.map +1 -0
  93. package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts +14 -0
  94. package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts.map +1 -0
  95. package/lib/components/AIToolbar/components/speech/SettingsPanel.js +293 -0
  96. package/lib/components/AIToolbar/components/speech/SettingsPanel.js.map +1 -0
  97. package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts +10 -0
  98. package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts.map +1 -0
  99. package/lib/components/AIToolbar/components/speech/StatusIndicator.js +48 -0
  100. package/lib/components/AIToolbar/components/speech/StatusIndicator.js.map +1 -0
  101. package/lib/components/AIToolbar/components/speech/Warning.d.ts +6 -0
  102. package/lib/components/AIToolbar/components/speech/Warning.d.ts.map +1 -0
  103. package/lib/components/AIToolbar/components/speech/Warning.js +226 -0
  104. package/lib/components/AIToolbar/components/speech/Warning.js.map +1 -0
  105. package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts +7 -0
  106. package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts.map +1 -0
  107. package/lib/components/AIToolbar/components/speech/audio-visualizer.js +194 -0
  108. package/lib/components/AIToolbar/components/speech/audio-visualizer.js.map +1 -0
  109. package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts +2 -0
  110. package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts.map +1 -0
  111. package/lib/components/AIToolbar/components/speech/floatArrayToWav.js +32 -0
  112. package/lib/components/AIToolbar/components/speech/floatArrayToWav.js.map +1 -0
  113. package/lib/components/AIToolbar/components/speech/index.d.ts +4 -0
  114. package/lib/components/AIToolbar/components/speech/index.d.ts.map +1 -0
  115. package/lib/components/AIToolbar/components/speech/index.js +276 -0
  116. package/lib/components/AIToolbar/components/speech/index.js.map +1 -0
  117. package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts +12 -0
  118. package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts.map +1 -0
  119. package/lib/components/AIToolbar/components/speech/promptTemplates.js +114 -0
  120. package/lib/components/AIToolbar/components/speech/promptTemplates.js.map +1 -0
  121. package/lib/components/AIToolbar/components/types.d.ts +194 -0
  122. package/lib/components/AIToolbar/components/types.d.ts.map +1 -0
  123. package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts +13 -0
  124. package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts.map +1 -0
  125. package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js +6 -0
  126. package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js.map +1 -0
  127. package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts +54 -0
  128. package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts.map +1 -0
  129. package/lib/components/AIToolbar/hooks/useActiveCharacter.js +359 -0
  130. package/lib/components/AIToolbar/hooks/useActiveCharacter.js.map +1 -0
  131. package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts +14 -0
  132. package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts.map +1 -0
  133. package/lib/components/AIToolbar/hooks/useCharacterSprite.js +103 -0
  134. package/lib/components/AIToolbar/hooks/useCharacterSprite.js.map +1 -0
  135. package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts +10 -0
  136. package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts.map +1 -0
  137. package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js +126 -0
  138. package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js.map +1 -0
  139. package/lib/components/AIToolbar/index.d.ts +8 -0
  140. package/lib/components/AIToolbar/index.d.ts.map +1 -0
  141. package/lib/components/AIToolbar/utils/emotionClassifier.d.ts +19 -0
  142. package/lib/components/AIToolbar/utils/emotionClassifier.d.ts.map +1 -0
  143. package/lib/components/AIToolbar/utils/emotionClassifier.js +142 -0
  144. package/lib/components/AIToolbar/utils/emotionClassifier.js.map +1 -0
  145. package/lib/components/Button/Button.d.ts +1 -1
  146. package/lib/components/Button/Button.d.ts.map +1 -1
  147. package/lib/components/Button/Button.js +7 -6
  148. package/lib/components/Button/Button.js.map +1 -1
  149. package/lib/components/CharacterSlotPicker/CharacterSlotPicker.d.ts +20 -0
  150. package/lib/components/CharacterSlotPicker/CharacterSlotPicker.d.ts.map +1 -0
  151. package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js +249 -0
  152. package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js.map +1 -0
  153. package/lib/components/CharacterSlotPicker/index.d.ts +3 -0
  154. package/lib/components/CharacterSlotPicker/index.d.ts.map +1 -0
  155. package/lib/components/DatePicker/DatePicker.js +158 -140
  156. package/lib/components/DatePicker/DatePicker.js.map +1 -1
  157. package/lib/components/Dialog/Dialog.d.ts +20 -0
  158. package/lib/components/Dialog/Dialog.d.ts.map +1 -0
  159. package/lib/components/Dialog/Dialog.js +111 -0
  160. package/lib/components/Dialog/Dialog.js.map +1 -0
  161. package/lib/components/Dialog/index.d.ts +3 -0
  162. package/lib/components/Dialog/index.d.ts.map +1 -0
  163. package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +1 -2
  164. package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
  165. package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +2 -2
  166. package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +1 -2
  167. package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
  168. package/lib/components/ErrorHandlers/ErrorBoundary.js +35 -28
  169. package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
  170. package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +1 -2
  171. package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
  172. package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +20 -15
  173. package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
  174. package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts +4 -2
  175. package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts.map +1 -1
  176. package/lib/components/ErrorHandlers/RemixErrorBoundary.js +222 -100
  177. package/lib/components/ErrorHandlers/RemixErrorBoundary.js.map +1 -1
  178. package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts +4 -2
  179. package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts.map +1 -1
  180. package/lib/components/ErrorHandlers/SPAErrorBoundary.js +247 -82
  181. package/lib/components/ErrorHandlers/SPAErrorBoundary.js.map +1 -1
  182. package/lib/components/ErrorPages/403.d.ts +1 -2
  183. package/lib/components/ErrorPages/403.d.ts.map +1 -1
  184. package/lib/components/ErrorPages/403.js +26 -18
  185. package/lib/components/ErrorPages/403.js.map +1 -1
  186. package/lib/components/ErrorPages/404.d.ts +1 -2
  187. package/lib/components/ErrorPages/404.d.ts.map +1 -1
  188. package/lib/components/ErrorPages/404.js +26 -18
  189. package/lib/components/ErrorPages/404.js.map +1 -1
  190. package/lib/components/ErrorPages/500.d.ts +1 -2
  191. package/lib/components/ErrorPages/500.d.ts.map +1 -1
  192. package/lib/components/ErrorPages/500.js +26 -18
  193. package/lib/components/ErrorPages/500.js.map +1 -1
  194. package/lib/components/Inbox/Channels/ChannelBar.d.ts +33 -0
  195. package/lib/components/Inbox/Channels/ChannelBar.d.ts.map +1 -0
  196. package/lib/components/Inbox/Channels/ChannelBar.js +79 -0
  197. package/lib/components/Inbox/Channels/ChannelBar.js.map +1 -0
  198. package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts +24 -0
  199. package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts.map +1 -0
  200. package/lib/components/Inbox/Channels/ChannelConnectModal.js +177 -0
  201. package/lib/components/Inbox/Channels/ChannelConnectModal.js.map +1 -0
  202. package/lib/components/Inbox/Channels/channelsMeta.d.ts +16 -0
  203. package/lib/components/Inbox/Channels/channelsMeta.d.ts.map +1 -0
  204. package/lib/components/Inbox/Channels/channelsMeta.js +127 -0
  205. package/lib/components/Inbox/Channels/channelsMeta.js.map +1 -0
  206. package/lib/components/Inbox/Channels/index.d.ts +7 -0
  207. package/lib/components/Inbox/Channels/index.d.ts.map +1 -0
  208. package/lib/components/Inbox/index.d.ts +2 -0
  209. package/lib/components/Inbox/index.d.ts.map +1 -0
  210. package/lib/components/InputToolBar/InputToolBar.d.ts +8 -0
  211. package/lib/components/InputToolBar/InputToolBar.d.ts.map +1 -0
  212. package/lib/components/InputToolBar/InputToolBar.js +469 -0
  213. package/lib/components/InputToolBar/InputToolBar.js.map +1 -0
  214. package/lib/components/InputToolBar/defaults.d.ts +15 -0
  215. package/lib/components/InputToolBar/defaults.d.ts.map +1 -0
  216. package/lib/components/InputToolBar/defaults.js +59 -0
  217. package/lib/components/InputToolBar/defaults.js.map +1 -0
  218. package/lib/components/InputToolBar/index.d.ts +5 -0
  219. package/lib/components/InputToolBar/index.d.ts.map +1 -0
  220. package/lib/components/InputToolBar/types.d.ts +153 -0
  221. package/lib/components/InputToolBar/types.d.ts.map +1 -0
  222. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +1 -2
  223. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -1
  224. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +24 -19
  225. package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -1
  226. package/lib/components/Markdown/MarkdownBreadcrumbs.d.ts +13 -0
  227. package/lib/components/Markdown/MarkdownBreadcrumbs.d.ts.map +1 -0
  228. package/lib/components/Markdown/MarkdownBreadcrumbs.js +34 -0
  229. package/lib/components/Markdown/MarkdownBreadcrumbs.js.map +1 -0
  230. package/lib/components/Markdown/MarkdownCopyButton.d.ts +10 -0
  231. package/lib/components/Markdown/MarkdownCopyButton.d.ts.map +1 -0
  232. package/lib/components/Markdown/MarkdownCopyButton.js +229 -0
  233. package/lib/components/Markdown/MarkdownCopyButton.js.map +1 -0
  234. package/lib/components/Markdown/MarkdownHeader.d.ts +13 -0
  235. package/lib/components/Markdown/MarkdownHeader.d.ts.map +1 -0
  236. package/lib/components/Markdown/MarkdownHeader.js +44 -0
  237. package/lib/components/Markdown/MarkdownHeader.js.map +1 -0
  238. package/lib/components/Markdown/MarkdownNavigation.d.ts +15 -0
  239. package/lib/components/Markdown/MarkdownNavigation.d.ts.map +1 -0
  240. package/lib/components/Markdown/MarkdownNavigation.js +38 -0
  241. package/lib/components/Markdown/MarkdownNavigation.js.map +1 -0
  242. package/lib/components/Markdown/MarkdownPage.d.ts +41 -0
  243. package/lib/components/Markdown/MarkdownPage.d.ts.map +1 -0
  244. package/lib/components/Markdown/MarkdownPage.js +238 -0
  245. package/lib/components/Markdown/MarkdownPage.js.map +1 -0
  246. package/lib/components/Markdown/MarkdownTableOfContents.d.ts +15 -0
  247. package/lib/components/Markdown/MarkdownTableOfContents.d.ts.map +1 -0
  248. package/lib/components/Markdown/MarkdownTableOfContents.js +57 -0
  249. package/lib/components/Markdown/MarkdownTableOfContents.js.map +1 -0
  250. package/lib/components/Markdown/index.d.ts +7 -0
  251. package/lib/components/Markdown/index.d.ts.map +1 -0
  252. package/lib/components/OTP/OTPInput.js +32 -30
  253. package/lib/components/OTP/OTPInput.js.map +1 -1
  254. package/lib/components/OTP/OTPVerification.js +75 -55
  255. package/lib/components/OTP/OTPVerification.js.map +1 -1
  256. package/lib/components/OTP/SingleInput.js +2 -2
  257. package/lib/components/OTP/SingleInput.js.map +1 -1
  258. package/lib/components/PageContainer/PageContainer.js +29 -22
  259. package/lib/components/PageContainer/PageContainer.js.map +1 -1
  260. package/lib/components/PageLoading/index.js +8 -7
  261. package/lib/components/PageLoading/index.js.map +1 -1
  262. package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +1 -2
  263. package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -1
  264. package/lib/components/ReactTable/Table.d.ts +1 -2
  265. package/lib/components/ReactTable/Table.d.ts.map +1 -1
  266. package/lib/components/ReactTable/Table.js +92 -71
  267. package/lib/components/ReactTable/Table.js.map +1 -1
  268. package/lib/components/ReactTable/TableFilters.d.ts +2 -3
  269. package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
  270. package/lib/components/ReactTable/TableFilters.js +40 -34
  271. package/lib/components/ReactTable/TableFilters.js.map +1 -1
  272. package/lib/components/Search/SearchInput.d.ts +1 -2
  273. package/lib/components/Search/SearchInput.d.ts.map +1 -1
  274. package/lib/components/Search/SearchInput.js +14 -13
  275. package/lib/components/Search/SearchInput.js.map +1 -1
  276. package/lib/components/Select/Select.d.ts +6 -6
  277. package/lib/components/Select/Select.d.ts.map +1 -1
  278. package/lib/components/Select/Select.js +60 -45
  279. package/lib/components/Select/Select.js.map +1 -1
  280. package/lib/components/Spin/index.js +14 -11
  281. package/lib/components/Spin/index.js.map +1 -1
  282. package/lib/components/ThemeProvider/ThemeProvider.d.ts +1 -1
  283. package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  284. package/lib/components/ThemeProvider/ThemeProvider.js +29 -17
  285. package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
  286. package/lib/components/ThemeProvider/ThemeToggle.js +28 -25
  287. package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -1
  288. package/lib/components/ThemeProvider/types.d.ts +3 -3
  289. package/lib/components/ThemeProvider/types.d.ts.map +1 -1
  290. package/lib/components/YantraIcon.d.ts +6 -0
  291. package/lib/components/YantraIcon.d.ts.map +1 -0
  292. package/lib/components/YantraIcon.js +32 -0
  293. package/lib/components/YantraIcon.js.map +1 -0
  294. package/lib/components/index.d.ts +8 -0
  295. package/lib/components/index.d.ts.map +1 -1
  296. package/lib/hooks/activeCharacterPreference.d.ts +25 -0
  297. package/lib/hooks/activeCharacterPreference.d.ts.map +1 -0
  298. package/lib/hooks/activeCharacterPreference.js +71 -0
  299. package/lib/hooks/activeCharacterPreference.js.map +1 -0
  300. package/lib/hooks/characterOverrides.d.ts +29 -0
  301. package/lib/hooks/characterOverrides.d.ts.map +1 -0
  302. package/lib/hooks/characterOverrides.js +130 -0
  303. package/lib/hooks/characterOverrides.js.map +1 -0
  304. package/lib/hooks/characterSlotsPreference.d.ts +33 -0
  305. package/lib/hooks/characterSlotsPreference.d.ts.map +1 -0
  306. package/lib/hooks/characterSlotsPreference.js +141 -0
  307. package/lib/hooks/characterSlotsPreference.js.map +1 -0
  308. package/lib/hooks/index.d.ts +4 -0
  309. package/lib/hooks/index.d.ts.map +1 -1
  310. package/lib/hooks/useGlobalShortcutBridge.d.ts +21 -0
  311. package/lib/hooks/useGlobalShortcutBridge.d.ts.map +1 -0
  312. package/lib/hooks/useGlobalShortcutBridge.js +68 -0
  313. package/lib/hooks/useGlobalShortcutBridge.js.map +1 -0
  314. package/lib/hooks/useToast.d.ts +1 -1
  315. package/lib/hooks/useToast.d.ts.map +1 -1
  316. package/lib/hooks/useToast.js +46 -37
  317. package/lib/hooks/useToast.js.map +1 -1
  318. package/lib/index.js +1 -1
  319. package/lib/shardui/accordion.js +20 -16
  320. package/lib/shardui/accordion.js.map +1 -1
  321. package/lib/shardui/alert-dialog.d.ts +2 -2
  322. package/lib/shardui/alert-dialog.js +15 -13
  323. package/lib/shardui/alert-dialog.js.map +1 -1
  324. package/lib/shardui/alert.js +4 -4
  325. package/lib/shardui/alert.js.map +1 -1
  326. package/lib/shardui/avatar.js +4 -4
  327. package/lib/shardui/avatar.js.map +1 -1
  328. package/lib/shardui/badge.d.ts +1 -1
  329. package/lib/shardui/badge.d.ts.map +1 -1
  330. package/lib/shardui/badge.js +2 -2
  331. package/lib/shardui/badge.js.map +1 -1
  332. package/lib/shardui/breadcrumb.d.ts +2 -2
  333. package/lib/shardui/breadcrumb.js +19 -16
  334. package/lib/shardui/breadcrumb.js.map +1 -1
  335. package/lib/shardui/button.js +2 -2
  336. package/lib/shardui/button.js.map +1 -1
  337. package/lib/shardui/calendar.d.ts +1 -1
  338. package/lib/shardui/calendar.d.ts.map +1 -1
  339. package/lib/shardui/calendar.js +4 -4
  340. package/lib/shardui/card.js +7 -7
  341. package/lib/shardui/card.js.map +1 -1
  342. package/lib/shardui/carousel.js +40 -33
  343. package/lib/shardui/carousel.js.map +1 -1
  344. package/lib/shardui/chart.d.ts +1 -1
  345. package/lib/shardui/chart.d.ts.map +1 -1
  346. package/lib/shardui/chart.js +81 -66
  347. package/lib/shardui/chart.js.map +1 -1
  348. package/lib/shardui/checkbox.js +10 -8
  349. package/lib/shardui/checkbox.js.map +1 -1
  350. package/lib/shardui/command.d.ts +3 -3
  351. package/lib/shardui/command.d.ts.map +1 -1
  352. package/lib/shardui/command.js +28 -24
  353. package/lib/shardui/command.js.map +1 -1
  354. package/lib/shardui/context-menu.d.ts +1 -1
  355. package/lib/shardui/context-menu.js +41 -30
  356. package/lib/shardui/context-menu.js.map +1 -1
  357. package/lib/shardui/dialog.d.ts +2 -2
  358. package/lib/shardui/dialog.js +22 -17
  359. package/lib/shardui/dialog.js.map +1 -1
  360. package/lib/shardui/drawer.d.ts +3 -3
  361. package/lib/shardui/drawer.js +17 -14
  362. package/lib/shardui/drawer.js.map +1 -1
  363. package/lib/shardui/dropdown-menu.d.ts +1 -1
  364. package/lib/shardui/dropdown-menu.js +42 -31
  365. package/lib/shardui/dropdown-menu.js.map +1 -1
  366. package/lib/shardui/form.d.ts +1 -1
  367. package/lib/shardui/form.d.ts.map +1 -1
  368. package/lib/shardui/form.js +22 -19
  369. package/lib/shardui/form.js.map +1 -1
  370. package/lib/shardui/hover-card.js +2 -2
  371. package/lib/shardui/hover-card.js.map +1 -1
  372. package/lib/shardui/input-otp.js +16 -13
  373. package/lib/shardui/input-otp.js.map +1 -1
  374. package/lib/shardui/input.js +2 -2
  375. package/lib/shardui/input.js.map +1 -1
  376. package/lib/shardui/label.js +2 -2
  377. package/lib/shardui/label.js.map +1 -1
  378. package/lib/shardui/menubar.d.ts +1 -1
  379. package/lib/shardui/menubar.js +46 -35
  380. package/lib/shardui/menubar.js.map +1 -1
  381. package/lib/shardui/navigation-menu.js +28 -24
  382. package/lib/shardui/navigation-menu.js.map +1 -1
  383. package/lib/shardui/pagination.d.ts +5 -5
  384. package/lib/shardui/pagination.js +30 -22
  385. package/lib/shardui/pagination.js.map +1 -1
  386. package/lib/shardui/popover.js +10 -8
  387. package/lib/shardui/popover.js.map +1 -1
  388. package/lib/shardui/progress.js +10 -9
  389. package/lib/shardui/progress.js.map +1 -1
  390. package/lib/shardui/radio-group.js +11 -9
  391. package/lib/shardui/radio-group.js.map +1 -1
  392. package/lib/shardui/resizable.d.ts +3 -3
  393. package/lib/shardui/resizable.d.ts.map +1 -1
  394. package/lib/shardui/resizable.js +11 -9
  395. package/lib/shardui/resizable.js.map +1 -1
  396. package/lib/shardui/scroll-area.js +14 -11
  397. package/lib/shardui/scroll-area.js.map +1 -1
  398. package/lib/shardui/select.js +49 -35
  399. package/lib/shardui/select.js.map +1 -1
  400. package/lib/shardui/separator.js +2 -2
  401. package/lib/shardui/separator.js.map +1 -1
  402. package/lib/shardui/sheet.d.ts +2 -2
  403. package/lib/shardui/sheet.js +24 -19
  404. package/lib/shardui/sheet.js.map +1 -1
  405. package/lib/shardui/sidebar.js +104 -88
  406. package/lib/shardui/sidebar.js.map +1 -1
  407. package/lib/shardui/skeleton.d.ts +1 -1
  408. package/lib/shardui/skeleton.d.ts.map +1 -1
  409. package/lib/shardui/skeleton.js +2 -2
  410. package/lib/shardui/skeleton.js.map +1 -1
  411. package/lib/shardui/slider.js +12 -10
  412. package/lib/shardui/slider.js.map +1 -1
  413. package/lib/shardui/sonner.d.ts +1 -1
  414. package/lib/shardui/sonner.d.ts.map +1 -1
  415. package/lib/shardui/sonner.js +2 -2
  416. package/lib/shardui/sonner.js.map +1 -1
  417. package/lib/shardui/switch.js +7 -6
  418. package/lib/shardui/switch.js.map +1 -1
  419. package/lib/shardui/table.js +16 -15
  420. package/lib/shardui/table.js.map +1 -1
  421. package/lib/shardui/tabs.js +4 -4
  422. package/lib/shardui/tabs.js.map +1 -1
  423. package/lib/shardui/textarea.js +2 -2
  424. package/lib/shardui/textarea.js.map +1 -1
  425. package/lib/shardui/toast.js +12 -11
  426. package/lib/shardui/toast.js.map +1 -1
  427. package/lib/shardui/toaster.d.ts +1 -2
  428. package/lib/shardui/toaster.d.ts.map +1 -1
  429. package/lib/shardui/toaster.js +21 -14
  430. package/lib/shardui/toaster.js.map +1 -1
  431. package/lib/shardui/toggle-group.js +15 -12
  432. package/lib/shardui/toggle-group.js.map +1 -1
  433. package/lib/shardui/toggle.js +2 -2
  434. package/lib/shardui/toggle.js.map +1 -1
  435. package/lib/shardui/tooltip.js +2 -2
  436. package/lib/shardui/tooltip.js.map +1 -1
  437. package/package.json +10 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCharacterSprite.d.ts","sourceRoot":"","sources":["../../../../src/components/AIToolbar/hooks/useCharacterSprite.ts"],"names":[],"mappings":"AAqFA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC5C,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACjC,MAAM,GAAG,IAAI,CAoBf;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAGhD"}
@@ -0,0 +1,103 @@
1
+ import*as React from'react';// Expression-sprite lookup for assistant message bubbles.
2
+ //
3
+ // Resolves `(characterFileName, label)` → `data:image/png;base64,...` via the
4
+ // Tauri command `character_get_expression`, with a module-level cache so the
5
+ // same sprite is fetched at most once per session even when many messages map
6
+ // to the same emotion.
7
+ //
8
+ // The Rust side (`character_get_expression`) already implements graceful
9
+ // fallback through `neutral`/`joy`/avatar when the requested label is missing,
10
+ // so callers can pass any of the 28 GoEmotions labels without first checking
11
+ // which sprites the character actually ships.
12
+ //
13
+ // Degrades to `null` outside Tauri / when no character file_name is provided.
14
+ function isTauri() {
15
+ if (typeof window === 'undefined') return false;
16
+ const w = window;
17
+ return Boolean(w.__TAURI_INTERNALS__ ?? w.__TAURI__);
18
+ }
19
+ async function safeInvoke(cmd, args) {
20
+ if (!isTauri()) return null;
21
+ try {
22
+ // @ts-ignore — optional dynamic import, present as a peer dep in Tauri builds.
23
+ const mod = await import('@tauri-apps/api/core');
24
+ return await mod.invoke(cmd, args);
25
+ } catch {
26
+ return null;
27
+ }
28
+ }
29
+ // Two layered caches keyed by `${fileName}::${label}`:
30
+ //
31
+ // - `urlCache` resolves synchronously on subsequent calls (no re-render flicker).
32
+ // - `pendingCache` deduplicates concurrent fetches for the same key when
33
+ // several messages on screen happen to share the same emotion.
34
+ const urlCache = new Map();
35
+ const pendingCache = new Map();
36
+ function cacheKey(fileName, label) {
37
+ return `${fileName}::${label}`;
38
+ }
39
+ async function fetchSprite(fileName, label) {
40
+ const key = cacheKey(fileName, label);
41
+ const cached = urlCache.get(key);
42
+ if (cached !== undefined) return cached;
43
+ const pending = pendingCache.get(key);
44
+ if (pending) return pending;
45
+ const promise = (async () => {
46
+ const dto = await safeInvoke('character_get_expression', {
47
+ fileName,
48
+ label
49
+ });
50
+ if (!dto || !dto.base64 || dto.base64.length < 100) {
51
+ urlCache.set(key, '');
52
+ return null;
53
+ }
54
+ const url = `data:${dto.mime_type || 'image/png'};base64,${dto.base64}`;
55
+ urlCache.set(key, url);
56
+ // If Rust fell back to a different label (sprite missing), also cache
57
+ // the resolved label so a subsequent call for it short-circuits.
58
+ if (dto.label && dto.label !== label) {
59
+ urlCache.set(cacheKey(fileName, dto.label), url);
60
+ }
61
+ return url;
62
+ })();
63
+ pendingCache.set(key, promise);
64
+ try {
65
+ return await promise;
66
+ } finally {
67
+ pendingCache.delete(key);
68
+ }
69
+ }
70
+ /**
71
+ * Returns the data URL for `(characterFileName, label)` or `null` while the
72
+ * sprite is loading / when running outside Tauri / when no character is set.
73
+ *
74
+ * Re-evaluates whenever either input changes. Cached results resolve in the
75
+ * same render (no transient `null`).
76
+ */
77
+ function useCharacterSprite(characterFileName, label) {
78
+ const key = characterFileName && label ? cacheKey(characterFileName, label) : null;
79
+ const cachedInitial = key ? urlCache.get(key) ?? null : null;
80
+ const [src, setSrc] = React.useState(cachedInitial && cachedInitial !== '' ? cachedInitial : null);
81
+ React.useEffect(() => {
82
+ if (!characterFileName || !label) {
83
+ setSrc(null);
84
+ return;
85
+ }
86
+ let alive = true;
87
+ fetchSprite(characterFileName, label).then(url => {
88
+ if (alive) setSrc(url);
89
+ });
90
+ return () => {
91
+ alive = false;
92
+ };
93
+ }, [characterFileName, label]);
94
+ return src;
95
+ }
96
+ /**
97
+ * Clears the sprite cache. Call after `character_refresh` so newly-installed
98
+ * sprite packs aren't shadowed by stale data URLs.
99
+ */
100
+ function clearCharacterSpriteCache() {
101
+ urlCache.clear();
102
+ pendingCache.clear();
103
+ }export{clearCharacterSpriteCache,useCharacterSprite};//# sourceMappingURL=useCharacterSprite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCharacterSprite.js","sources":["../../../../src/components/AIToolbar/hooks/useCharacterSprite.ts"],"sourcesContent":[null],"names":[],"mappings":"4BAqFA;;;;;;AAMG;AACH;AAyBA;;;AAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Returns the current chat-background image as a `data:` URL, or `null` when
3
+ * no wallpaper is selected / we are not running under Tauri.
4
+ *
5
+ * Re-fetches whenever the user picks a different wallpaper, regardless of
6
+ * which webview the picker lives in.
7
+ */
8
+ export declare function useChatBackgroundImage(): string | null;
9
+ export default useChatBackgroundImage;
10
+ //# sourceMappingURL=useChatBackgroundImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatBackgroundImage.d.ts","sourceRoot":"","sources":["../../../../src/components/AIToolbar/hooks/useChatBackgroundImage.ts"],"names":[],"mappings":"AA4EA;;;;;;GAMG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CA+DtD;AAED,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,126 @@
1
+ import*as React from'react';// Chat-background image lookup for AIToolbar surfaces.
2
+ //
3
+ // The desktop app lets users pick a wallpaper that paints behind the `/chat`
4
+ // route. The toolbar's Conversation popover and Message History popover render
5
+ // in Radix portals (outside the chat tree), so the wallpaper does not bleed
6
+ // through to them by default. This hook re-subscribes to the same contract
7
+ // `yantra-app/packages-modules/account/browser/src/hooks/useChatBackground.tsx`
8
+ // already publishes:
9
+ //
10
+ // - localStorage key `yantra:chat-background:selected-id` → currently-selected background ID
11
+ // - cross-webview event `yantra:chat-background-change` → fan-out when the picker mutates the selection
12
+ // - Tauri command `background_get` { id } → returns { mime_type, base64 }
13
+ //
14
+ // Reusing the same key/event lets the popovers stay in lock-step with the
15
+ // `/chat` overlay without yantra-app having to inject anything through props.
16
+ //
17
+ // Degrades gracefully:
18
+ // - Outside Tauri (regular browser, SSR): returns null synchronously.
19
+ // - No selection / unknown ID: returns null.
20
+ // - Selection changes mid-session: re-fetches automatically.
21
+ // constants
22
+ const SELECTED_BG_STORAGE_KEY = 'yantra:chat-background:selected-id';
23
+ const BG_CHANGE_EVENT = 'yantra:chat-background-change';
24
+ // helpers
25
+ function isTauri() {
26
+ if (typeof window === 'undefined') return false;
27
+ const w = window;
28
+ return Boolean(w.__TAURI_INTERNALS__ ?? w.__TAURI__);
29
+ }
30
+ async function safeInvoke(cmd, args) {
31
+ if (!isTauri()) return null;
32
+ try {
33
+ // @ts-ignore — optional dynamic import, present as a peer dep in Tauri builds.
34
+ const mod = await import('@tauri-apps/api/core');
35
+ return await mod.invoke(cmd, args);
36
+ } catch {
37
+ return null;
38
+ }
39
+ }
40
+ async function safeListen(event, cb) {
41
+ if (!isTauri()) return () => {};
42
+ try {
43
+ // @ts-ignore — see safeInvoke note.
44
+ const mod = await import('@tauri-apps/api/event');
45
+ const unlisten = await mod.listen(event, e => cb(e.payload));
46
+ return unlisten;
47
+ } catch {
48
+ return () => {};
49
+ }
50
+ }
51
+ function readSelectedId() {
52
+ if (typeof window === 'undefined') return null;
53
+ try {
54
+ return window.localStorage.getItem(SELECTED_BG_STORAGE_KEY);
55
+ } catch {
56
+ return null;
57
+ }
58
+ }
59
+ // main API
60
+ /**
61
+ * Returns the current chat-background image as a `data:` URL, or `null` when
62
+ * no wallpaper is selected / we are not running under Tauri.
63
+ *
64
+ * Re-fetches whenever the user picks a different wallpaper, regardless of
65
+ * which webview the picker lives in.
66
+ */
67
+ function useChatBackgroundImage() {
68
+ const [selectedId, setSelectedId] = React.useState(() => readSelectedId());
69
+ const [imageUrl, setImageUrl] = React.useState(null);
70
+ // Subscribe to selection changes from three possible sources:
71
+ // (a) same-window `dispatchEvent` (picker on this webview).
72
+ // (b) cross-tab `storage` event (rare in the Tauri shell but free).
73
+ // (c) Tauri `listen` (picker on the *other* webview — desktop-bar vs dashboard).
74
+ React.useEffect(() => {
75
+ function localHandler(e) {
76
+ const detail = e.detail;
77
+ setSelectedId(detail?.id ?? null);
78
+ }
79
+ function storageHandler(e) {
80
+ if (e.key !== SELECTED_BG_STORAGE_KEY) return;
81
+ setSelectedId(e.newValue);
82
+ }
83
+ if (typeof window !== 'undefined') {
84
+ window.addEventListener(BG_CHANGE_EVENT, localHandler);
85
+ window.addEventListener('storage', storageHandler);
86
+ }
87
+ let unlisten = null;
88
+ let cancelled = false;
89
+ safeListen(BG_CHANGE_EVENT, payload => {
90
+ setSelectedId(payload?.id ?? null);
91
+ }).then(fn => {
92
+ if (cancelled) fn();else unlisten = fn;
93
+ });
94
+ return () => {
95
+ cancelled = true;
96
+ if (typeof window !== 'undefined') {
97
+ window.removeEventListener(BG_CHANGE_EVENT, localHandler);
98
+ window.removeEventListener('storage', storageHandler);
99
+ }
100
+ if (unlisten) unlisten();
101
+ };
102
+ }, []);
103
+ // Resolve ID → data URL. Tauri returns base64 — we only build the data URL
104
+ // once per ID change to avoid churning the popover background.
105
+ React.useEffect(() => {
106
+ if (!selectedId) {
107
+ setImageUrl(null);
108
+ return;
109
+ }
110
+ let alive = true;
111
+ safeInvoke('background_get', {
112
+ id: selectedId
113
+ }).then(dto => {
114
+ if (!alive) return;
115
+ if (dto && dto.base64) {
116
+ setImageUrl(`data:${dto.mime_type || 'image/png'};base64,${dto.base64}`);
117
+ } else {
118
+ setImageUrl(null);
119
+ }
120
+ });
121
+ return () => {
122
+ alive = false;
123
+ };
124
+ }, [selectedId]);
125
+ return imageUrl;
126
+ }export{useChatBackgroundImage};//# sourceMappingURL=useChatBackgroundImage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatBackgroundImage.js","sources":["../../../../src/components/AIToolbar/hooks/useChatBackgroundImage.ts"],"sourcesContent":[null],"names":[],"mappings":"4BA4EA;;;;;;AAMG;AACH;AAiEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ export { AIToolbar, AIToolbarLeading, AIToolbarMain, AIToolbarTrailing, AIToolbarInputSurface, AIToolbarStatusDot, } from './components/AIToolbarPrimitives';
2
+ export type { AIToolbarProps, AIToolbarSectionProps, AIToolbarInputSurfaceProps, AIToolbarStatusDotProps, } from './components/AIToolbarPrimitives';
3
+ export * from './components';
4
+ export type { CompletionSubmitOptions, UseCompletionReturn, SystemAudioProps, AIToolbarAppProps, AIToolbarHostPlatform, ChatMessage, ChatConversation, VadConfig, ToolbarAiProvider, ToolbarSelectedProvider, ToolbarAudioDevices, ToolbarAttachedFile, ToolbarScreenshotConfiguration, } from './components/types';
5
+ export { setMarketplaceCharacters, useActiveCharacter, useCharacterPicker } from './hooks/useActiveCharacter';
6
+ export { readPreferredActiveCharacterFileName } from '../../hooks/activeCharacterPreference';
7
+ export type { MarketplaceCharacterEntry, ActiveCharacter, CharacterListEntry, CharacterPicker, } from './hooks/useActiveCharacter';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AIToolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACR,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,GAC1B,MAAM,kCAAkC,CAAC;AAE1C,cAAc,cAAc,CAAC;AAE7B,YAAY,EACR,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,8BAA8B,GACjC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC9G,OAAO,EAAE,oCAAoC,EAAE,MAAM,uCAAuC,CAAC;AAC7F,YAAY,EACR,yBAAyB,EACzB,eAAe,EACf,kBAAkB,EAClB,eAAe,GAClB,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type EmotionLabel = 'admiration' | 'amusement' | 'anger' | 'annoyance' | 'approval' | 'caring' | 'confusion' | 'curiosity' | 'desire' | 'disappointment' | 'disapproval' | 'disgust' | 'embarrassment' | 'excitement' | 'fear' | 'gratitude' | 'grief' | 'joy' | 'love' | 'nervousness' | 'neutral' | 'optimism' | 'pride' | 'realization' | 'relief' | 'remorse' | 'sadness' | 'surprise';
2
+ /** All 28 labels, in the SillyTavern canonical order. */
3
+ export declare const ALL_EMOTIONS: EmotionLabel[];
4
+ /**
5
+ * Classify a chat-message string into one of the 28 GoEmotions labels.
6
+ *
7
+ * Returns `'neutral'` when no rule fires, which is what every sprite pack
8
+ * uses as the fallback (and what `character_get_expression` falls back to
9
+ * server-side when the requested sprite is missing).
10
+ *
11
+ * @param text - The assistant's message text. Markdown formatting is fine —
12
+ * the regexes only care about word content.
13
+ * @param available - Optional restrict-set: only return labels present here.
14
+ * Useful when the caller knows which sprites the
15
+ * character actually ships and wants to avoid a Tauri
16
+ * round-trip for labels that will fall back anyway.
17
+ */
18
+ export declare function classifyEmotion(text: string | null | undefined, available?: readonly string[]): EmotionLabel;
19
+ //# sourceMappingURL=emotionClassifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emotionClassifier.d.ts","sourceRoot":"","sources":["../../../../src/components/AIToolbar/utils/emotionClassifier.ts"],"names":[],"mappings":"AAqBA,MAAM,MAAM,YAAY,GAClB,YAAY,GACZ,WAAW,GACX,OAAO,GACP,WAAW,GACX,UAAU,GACV,QAAQ,GACR,WAAW,GACX,WAAW,GACX,QAAQ,GACR,gBAAgB,GAChB,aAAa,GACb,SAAS,GACT,eAAe,GACf,YAAY,GACZ,MAAM,GACN,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,aAAa,GACb,SAAS,GACT,UAAU,GACV,OAAO,GACP,aAAa,GACb,QAAQ,GACR,SAAS,GACT,SAAS,GACT,UAAU,CAAC;AAEjB,yDAAyD;AACzD,eAAO,MAAM,YAAY,EAAE,YAAY,EA6BtC,CAAC;AAgNF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,YAAY,CAuB5G"}
@@ -0,0 +1,142 @@
1
+ // Lightweight emotion classifier for assistant message text.
2
+ //
3
+ // Picks one of the 28 SillyTavern / GoEmotions labels so the AIToolbar can
4
+ // switch the assistant's avatar to the matching expression sprite (see
5
+ // `packages-extensions/seraphina-character-extension/characters/Seraphina/`
6
+ // for the canonical sprite layout: `neutral.png`, `joy.png`, `caring.png`,
7
+ // `surprise.png`, etc.).
8
+ //
9
+ // This is intentionally a heuristic (regex/keyword scoring) — fast, offline,
10
+ // no model dependency — and is the same shape (`text → label`) as a real
11
+ // GoEmotions classifier, so it can be transparently swapped for an ONNX
12
+ // transformer later without touching the call sites.
13
+ //
14
+ // Limitations:
15
+ // - English only; would need rework for i18n responses.
16
+ // - Misses subtle nuance (sarcasm, mixed emotions) — picks the *strongest*
17
+ // signal and never returns more than one label.
18
+ // - Stage directions in italics ("smiles warmly") count the same as inline
19
+ // dialogue; that's actually desirable for character-card style replies
20
+ // where mood lives in the prose.
21
+ /** All 28 labels, in the SillyTavern canonical order. */
22
+ const RULES = [{
23
+ label: 'joy',
24
+ patterns: [/\b(happy|happiness|joy(ful)?|delight(ed|ful)?|cheerful|glad)\b/gi, /\b(smile[sd]?|grin(s|ned|ning)?|beam(s|ing|ed)?)\b/gi, /:\)|=\)|<3+/g]
25
+ }, {
26
+ label: 'amusement',
27
+ patterns: [/\b(laugh(s|ed|ing|ter)?|chuckle[sd]?|giggle[sd]?|snicker(s|ed|ing)?)\b/gi, /\b(amus(ed|ing|ement)|funny|hilarious|teasing)\b/gi, /\bha+ha+\b/gi, /lol\b/gi]
28
+ }, {
29
+ label: 'love',
30
+ patterns: [/\b(i love you|love you|my love|beloved|darling|sweetheart|dearest)\b/gi, /\b(adore[sd]?|cherish(ed|es)?|smitten)\b/gi],
31
+ weight: 2
32
+ }, {
33
+ label: 'caring',
34
+ patterns: [/\b(gentle(ly)?|tender(ly)?|softly|kind(ly|ness)?|warm(ly|th)?|reassuring(ly)?)\b/gi, /\b(comfort(s|ed|ing)?|soothing(ly)?|protect(s|ing|ed)?|nurturing)\b/gi, /\b(are you (ok|okay|alright)|how are you feeling|don'?t worry)\b/gi]
35
+ }, {
36
+ label: 'admiration',
37
+ patterns: [/\b(impressive|impressed|brilliant|magnificent|incredible|amazing|remarkable|astonishing|stunning|breathtaking)\b/gi, /\b(well done|great job|so proud of you)\b/gi]
38
+ }, {
39
+ label: 'approval',
40
+ patterns: [/\b(approve|agree|exactly|precisely|that'?s right|good idea|sounds good|works for me)\b/gi, /\b(yes,?\s+(of course|absolutely|certainly))/gi]
41
+ }, {
42
+ label: 'disapproval',
43
+ patterns: [/\b(disapprove|that'?s wrong|i don'?t agree|i wouldn'?t|shouldn'?t have)\b/gi, /\b(unacceptable|not okay)\b/gi]
44
+ }, {
45
+ label: 'anger',
46
+ patterns: [/\b(angry|furious|enraged|seething|livid|outraged)\b/gi, /\b(scowl(s|ed|ing)?|glare[sd]?|snarl(s|ed|ing)?|growl(s|ed|ing)?)\b/gi, /\bhow dare you\b/gi],
47
+ weight: 2
48
+ }, {
49
+ label: 'annoyance',
50
+ patterns: [/\b(annoy(ed|ing|ance)?|irritat(ed|ing|ion)|frustrat(ed|ing|ion))\b/gi, /\b(sigh(s|ed|ing)?|huff(s|ed|ing)?|rolls? (her|his|their) eyes)\b/gi, /\b(ugh|tsk)\b/gi]
51
+ }, {
52
+ label: 'fear',
53
+ patterns: [/\b(afraid|scared|terrified|frightened|fearful|horrified)\b/gi, /\b(trembl(es|ed|ing)|shiver(s|ed|ing)?|flinch(es|ed|ing)?)\b/gi, /\b(panic(ked|king)?|dread)\b/gi],
54
+ weight: 2
55
+ }, {
56
+ label: 'nervousness',
57
+ patterns: [/\b(nervous(ly|ness)?|anxious(ly)?|uneasy|jittery|tense(ly)?|on edge)\b/gi, /\b(fidget(s|ed|ing)?|bites? (her|his|their) lip|wrings? (her|his|their) hands)\b/gi]
58
+ }, {
59
+ label: 'sadness',
60
+ patterns: [/\b(sad(ness|ly)?|unhappy|sorrow(ful)?|heartbroken|miserable|melancholy|forlorn)\b/gi, /\b(tear(s|ful|y)|crying|weep(s|ing|ed)?|sob(s|bing|bed)?)\b/gi, /:\(/g],
61
+ weight: 2
62
+ }, {
63
+ label: 'grief',
64
+ patterns: [/\b(grief|grieving|mourn(s|ed|ing)?|bereaved|devastated)\b/gi, /\b(loss of|passed away|gone forever)\b/gi],
65
+ weight: 2
66
+ }, {
67
+ label: 'remorse',
68
+ patterns: [/\b(i'?m sorry|i am sorry|my apologies|apologi[sz]e|forgive me|regret(s|ted|ting)?|guilty|guilt)\b/gi, /\b(shouldn'?t have|wish i hadn'?t)\b/gi],
69
+ weight: 2
70
+ }, {
71
+ label: 'disappointment',
72
+ patterns: [/\b(disappointed|disappointing|let down|underwhelm(ed|ing)?|expected (more|better))\b/gi]
73
+ }, {
74
+ label: 'embarrassment',
75
+ patterns: [/\b(embarrass(ed|ing|ment)?|flustered|mortified|sheepish(ly)?)\b/gi, /\b(blush(es|ed|ing)?|cheeks (turn|burn|flush))\b/gi]
76
+ }, {
77
+ label: 'disgust',
78
+ patterns: [/\b(disgust(ed|ing)?|revolted|repulsed|nauseat(ed|ing)|gross|yuck|ew)\b/gi, /\b(grimace[sd]?|wrinkles? (her|his|their) nose)\b/gi]
79
+ }, {
80
+ label: 'excitement',
81
+ patterns: [/\b(excited(ly)?|thrilled|exhilarat(ed|ing)|exhilaration|elated|ecstatic|stoked|pumped)\b/gi, /\b(can'?t wait|bouncing|jumps? up)\b/gi]
82
+ }, {
83
+ label: 'gratitude',
84
+ patterns: [/\b(thank you|thanks|thank(ful|fully)?|grateful(ly)?|appreciat(e|ed|ing|ion))\b/gi],
85
+ weight: 2
86
+ }, {
87
+ label: 'pride',
88
+ patterns: [/\b(proud(ly)?|pride)\b/gi, /\b(chin (held )?high|stands? tall)\b/gi]
89
+ }, {
90
+ label: 'relief',
91
+ patterns: [/\b(relief|relieved|reliev(es|ed|ing)?)\b/gi, /\b(exhale[sd]? (deeply|slowly)|breathes? out)\b/gi]
92
+ }, {
93
+ label: 'optimism',
94
+ patterns: [/\b(hopeful(ly)?|optimist(ic)?|things will (work|turn) out|look(ing)? forward|we'?ll figure)\b/gi]
95
+ }, {
96
+ label: 'desire',
97
+ patterns: [/\b(crave[sd]?|yearn(s|ed|ing)?|long(s|ed|ing) for|want(s|ed|ing)? you|need(s|ed|ing)? you)\b/gi, /\b(lean(s|ed|ing)? in close|breathless)\b/gi]
98
+ }, {
99
+ label: 'curiosity',
100
+ patterns: [/\b(curious(ly)?|curiosity|intrigu(ed|ing)|wonder(s|ed|ing)? (about|what|why|how))\b/gi, /\btell me more\b/gi]
101
+ }, {
102
+ label: 'confusion',
103
+ patterns: [/\b(confus(ed|ing|ion)|puzzl(ed|ing)|baffl(ed|ing)|perplex(ed|ing))\b/gi, /\b(tilts? (her|his|their) head|raises? an eyebrow|i don'?t understand|what do you mean)\b/gi, /\?\?+/g]
104
+ }, {
105
+ label: 'realization',
106
+ patterns: [/\b(realiz(es|ed|ing)|realisation|i see now|of course!|that makes sense|finally understand)\b/gi, /\b(aha|eureka)\b/gi]
107
+ }, {
108
+ label: 'surprise',
109
+ patterns: [/\b(surpris(ed|ing|e)|astonish(ed|ing)|astounded|shocked|stunned|taken aback)\b/gi, /\b(gasp(s|ed|ing)?|eyes (widen|go wide))\b/gi, /\b(oh!|wha[at]?\?!)/gi]
110
+ }];
111
+ /**
112
+ * Classify a chat-message string into one of the 28 GoEmotions labels.
113
+ *
114
+ * Returns `'neutral'` when no rule fires, which is what every sprite pack
115
+ * uses as the fallback (and what `character_get_expression` falls back to
116
+ * server-side when the requested sprite is missing).
117
+ *
118
+ * @param text - The assistant's message text. Markdown formatting is fine —
119
+ * the regexes only care about word content.
120
+ * @param available - Optional restrict-set: only return labels present here.
121
+ * Useful when the caller knows which sprites the
122
+ * character actually ships and wants to avoid a Tauri
123
+ * round-trip for labels that will fall back anyway.
124
+ */
125
+ function classifyEmotion(text, available) {
126
+ if (!text) return 'neutral';
127
+ let bestLabel = 'neutral';
128
+ let bestScore = 0;
129
+ for (const rule of RULES) {
130
+ const weight = rule.weight ?? 1;
131
+ let score = 0;
132
+ for (const pattern of rule.patterns) {
133
+ const matches = text.match(pattern);
134
+ if (matches) score += matches.length * weight;
135
+ }
136
+ if (score > bestScore) {
137
+ bestScore = score;
138
+ bestLabel = rule.label;
139
+ }
140
+ }
141
+ return bestLabel;
142
+ }export{classifyEmotion};//# sourceMappingURL=emotionClassifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emotionClassifier.js","sources":["../../../../src/components/AIToolbar/utils/emotionClassifier.ts"],"sourcesContent":[null],"names":[],"mappings":"AAqBA;AA8BA;AACA;AA6OA;;;;;;;;;;;;;AAaG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,6 +8,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
8
8
  fullWidth?: boolean;
9
9
  children: React.ReactNode;
10
10
  }
11
- declare const Button: ({ variant, size, isLoading, fullWidth, className, children, disabled, ...props }: ButtonProps) => React.JSX.Element;
11
+ declare const Button: ({ variant, size, isLoading, fullWidth, className, children, disabled, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export { Button as TailwindUiButton };
13
13
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AACrF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,QAAA,MAAM,MAAM,GAAI,kFASb,WAAW,sBA6Cb,CAAC;AAEF,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AACrF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,QAAA,MAAM,MAAM,GAAI,kFASb,WAAW,4CA6Cb,CAAC;AAEF,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import React__default from'react';import {Loader2}from'lucide-react';const Button = ({
1
+ import {jsxs,jsx}from'react/jsx-runtime';import {Loader2}from'lucide-react';const Button = ({
2
2
  variant = 'primary',
3
3
  size = 'medium',
4
4
  isLoading = false,
@@ -39,11 +39,12 @@ import React__default from'react';import {Loader2}from'lucide-react';const Butto
39
39
  const sizeClasses = getSizeClasses();
40
40
  const widthClass = fullWidth ? 'w-full' : '';
41
41
  const disabledClass = isLoading || disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer interactive-hover';
42
- return React__default.createElement("button", {
42
+ return jsxs("button", {
43
43
  className: `${baseClasses} ${variantClasses} ${sizeClasses} ${widthClass} ${disabledClass} ${className}`,
44
44
  disabled: isLoading || disabled,
45
- ...props
46
- }, isLoading && React__default.createElement(Loader2, {
47
- className: "w-4 h-4 mr-2 animate-spin"
48
- }), children);
45
+ ...props,
46
+ children: [isLoading && jsx(Loader2, {
47
+ className: "w-4 h-4 mr-2 animate-spin"
48
+ }), children]
49
+ });
49
50
  };export{Button as TailwindUiButton};//# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":[],"mappings":"qEAIA,MAAM,MAAM;AAEZ,EAAA,OAAM,GAAA;MACF,GAAA,QAAU;WACH,GAAA,KAAA;WACP,GAAU,KAAE;WACZ,GAAU,EAAE;AACZ,EAAA,QAAA;AACH,EAAA,QAAA;AAED,EAAA,GAAA;AAwDA,CAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":[],"mappings":"4EAIA,MAAM,MAAM;AAEZ,EAAA,OAAM,GAAA;MACF,GAAA,QAAU;WACH,GAAA,KAAA;WACP,GAAU,KAAE;WACZ,GAAU,EAAE;AACZ,EAAA,QAAA;AACH,EAAA,QAAA;AAED,EAAA,GAAA;AAwDA,CAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 3×3 grid of character slots (1–9).
3
+ *
4
+ * - Click an empty tile → opens a small "pick" popover listing installed
5
+ * characters; clicking one assigns it to the slot.
6
+ * - Click a filled tile → activates that character (`setActive(name)`).
7
+ * - Right-click (or "×" badge) a filled tile → clears the slot.
8
+ * - The default slot wears a ring + star; any tile's ⋆ button promotes it
9
+ * to default.
10
+ *
11
+ * Self-contained: pulls the installed character list from
12
+ * `useCharacterPicker()` and stores assignments via
13
+ * `useCharacterSlots()`. No props required.
14
+ */
15
+ export interface CharacterSlotPickerProps {
16
+ /** Optional className applied to the outer wrapper. */
17
+ className?: string;
18
+ }
19
+ export declare function CharacterSlotPicker({ className }: CharacterSlotPickerProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=CharacterSlotPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterSlotPicker.d.ts","sourceRoot":"","sources":["../../../src/components/CharacterSlotPicker/CharacterSlotPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAqQH,MAAM,WAAW,wBAAwB;IACrC,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE,wBAAwB,2CA6D1E"}