@admin-layout/tailwind-ui 12.2.4-alpha.6 → 12.2.4-alpha.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/AIToolbar/components/AIToolBar.d.ts +22 -0
- package/lib/components/AIToolbar/components/AIToolBar.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/AIToolBar.js +87 -0
- package/lib/components/AIToolbar/components/AIToolBar.js.map +1 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts +14 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.js +60 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.js.map +1 -0
- package/lib/components/AIToolbar/components/CustomCursor.d.ts +2 -0
- package/lib/components/AIToolbar/components/CustomCursor.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/CustomCursor.js +66 -0
- package/lib/components/AIToolbar/components/CustomCursor.js.map +1 -0
- package/lib/components/AIToolbar/components/DragButton.d.ts +9 -0
- package/lib/components/AIToolbar/components/DragButton.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/DragButton.js +57 -0
- package/lib/components/AIToolbar/components/DragButton.js.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts +7 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.js +30 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.js.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/index.d.ts +7 -0
- package/lib/components/AIToolbar/components/Markdown/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/index.js +46 -0
- package/lib/components/AIToolbar/components/Markdown/index.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts +24 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.js +48 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts +28 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js +209 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts +15 -0
- package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts +5 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.js +67 -0
- package/lib/components/AIToolbar/components/completion/Audio.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts +11 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js +66 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.d.ts +5 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.js +93 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts +7 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.js +136 -0
- package/lib/components/AIToolbar/components/completion/Files.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts +6 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.js +287 -0
- package/lib/components/AIToolbar/components/completion/Input.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts +11 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.js +131 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts +7 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js +30 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts +13 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.js +25 -0
- package/lib/components/AIToolbar/components/completion/index.js.map +1 -0
- package/lib/components/AIToolbar/components/index.d.ts +17 -0
- package/lib/components/AIToolbar/components/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Header.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/Header.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Header.js +82 -0
- package/lib/components/AIToolbar/components/speech/Header.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts +8 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.js +44 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts +13 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.js +168 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.d.ts +13 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.js +100 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.js +101 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.d.ts +12 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.js +142 -0
- package/lib/components/AIToolbar/components/speech/ResultsSection.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js +293 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts +10 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.js +48 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/Warning.d.ts +6 -0
- package/lib/components/AIToolbar/components/speech/Warning.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Warning.js +154 -0
- package/lib/components/AIToolbar/components/speech/Warning.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts +7 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.js +194 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts +2 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.js +32 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/index.d.ts +4 -0
- package/lib/components/AIToolbar/components/speech/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/index.js +300 -0
- package/lib/components/AIToolbar/components/speech/index.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts +12 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.js +114 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.js.map +1 -0
- package/lib/components/AIToolbar/components/types.d.ts +194 -0
- package/lib/components/AIToolbar/components/types.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts +13 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js +6 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts +52 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js +360 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts +14 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.js +103 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts +10 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js +126 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js.map +1 -0
- package/lib/components/AIToolbar/index.d.ts +7 -0
- package/lib/components/AIToolbar/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.d.ts +19 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.d.ts.map +1 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.js +142 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.js.map +1 -0
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +7 -6
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +158 -140
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts +20 -0
- package/lib/components/Dialog/Dialog.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.js +111 -0
- package/lib/components/Dialog/Dialog.js.map +1 -0
- package/lib/components/Dialog/index.d.ts +3 -0
- package/lib/components/Dialog/index.d.ts.map +1 -0
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +1 -2
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +2 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.js +35 -28
- package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +20 -15
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts +4 -2
- package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js +222 -100
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts +4 -2
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.js +247 -82
- package/lib/components/ErrorHandlers/SPAErrorBoundary.js.map +1 -1
- package/lib/components/ErrorPages/403.d.ts +1 -2
- package/lib/components/ErrorPages/403.d.ts.map +1 -1
- package/lib/components/ErrorPages/403.js +26 -18
- package/lib/components/ErrorPages/403.js.map +1 -1
- package/lib/components/ErrorPages/404.d.ts +1 -2
- package/lib/components/ErrorPages/404.d.ts.map +1 -1
- package/lib/components/ErrorPages/404.js +26 -18
- package/lib/components/ErrorPages/404.js.map +1 -1
- package/lib/components/ErrorPages/500.d.ts +1 -2
- package/lib/components/ErrorPages/500.d.ts.map +1 -1
- package/lib/components/ErrorPages/500.js +26 -18
- package/lib/components/ErrorPages/500.js.map +1 -1
- package/lib/components/InputToolBar/InputToolBar.d.ts +8 -0
- package/lib/components/InputToolBar/InputToolBar.d.ts.map +1 -0
- package/lib/components/InputToolBar/InputToolBar.js +469 -0
- package/lib/components/InputToolBar/InputToolBar.js.map +1 -0
- package/lib/components/InputToolBar/defaults.d.ts +15 -0
- package/lib/components/InputToolBar/defaults.d.ts.map +1 -0
- package/lib/components/InputToolBar/defaults.js +59 -0
- package/lib/components/InputToolBar/defaults.js.map +1 -0
- package/lib/components/InputToolBar/index.d.ts +5 -0
- package/lib/components/InputToolBar/index.d.ts.map +1 -0
- package/lib/components/InputToolBar/types.d.ts +153 -0
- package/lib/components/InputToolBar/types.d.ts.map +1 -0
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +1 -2
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +24 -19
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -1
- package/lib/components/Markdown/MarkdownBreadcrumbs.d.ts +13 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.js +34 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.js.map +1 -0
- package/lib/components/Markdown/MarkdownCopyButton.d.ts +10 -0
- package/lib/components/Markdown/MarkdownCopyButton.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownCopyButton.js +229 -0
- package/lib/components/Markdown/MarkdownCopyButton.js.map +1 -0
- package/lib/components/Markdown/MarkdownHeader.d.ts +13 -0
- package/lib/components/Markdown/MarkdownHeader.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownHeader.js +44 -0
- package/lib/components/Markdown/MarkdownHeader.js.map +1 -0
- package/lib/components/Markdown/MarkdownNavigation.d.ts +15 -0
- package/lib/components/Markdown/MarkdownNavigation.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownNavigation.js +38 -0
- package/lib/components/Markdown/MarkdownNavigation.js.map +1 -0
- package/lib/components/Markdown/MarkdownPage.d.ts +41 -0
- package/lib/components/Markdown/MarkdownPage.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownPage.js +238 -0
- package/lib/components/Markdown/MarkdownPage.js.map +1 -0
- package/lib/components/Markdown/MarkdownTableOfContents.d.ts +15 -0
- package/lib/components/Markdown/MarkdownTableOfContents.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownTableOfContents.js +57 -0
- package/lib/components/Markdown/MarkdownTableOfContents.js.map +1 -0
- package/lib/components/Markdown/index.d.ts +7 -0
- package/lib/components/Markdown/index.d.ts.map +1 -0
- package/lib/components/OTP/OTPInput.js +32 -30
- package/lib/components/OTP/OTPInput.js.map +1 -1
- package/lib/components/OTP/OTPVerification.js +75 -55
- package/lib/components/OTP/OTPVerification.js.map +1 -1
- package/lib/components/OTP/SingleInput.js +2 -2
- package/lib/components/OTP/SingleInput.js.map +1 -1
- package/lib/components/PageContainer/PageContainer.js +29 -22
- package/lib/components/PageContainer/PageContainer.js.map +1 -1
- package/lib/components/PageLoading/index.js +8 -7
- package/lib/components/PageLoading/index.js.map +1 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +1 -2
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.d.ts +1 -2
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.js +92 -71
- package/lib/components/ReactTable/Table.js.map +1 -1
- package/lib/components/ReactTable/TableFilters.d.ts +2 -3
- package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
- package/lib/components/ReactTable/TableFilters.js +40 -34
- package/lib/components/ReactTable/TableFilters.js.map +1 -1
- package/lib/components/Search/SearchInput.d.ts +1 -2
- package/lib/components/Search/SearchInput.d.ts.map +1 -1
- package/lib/components/Search/SearchInput.js +14 -13
- package/lib/components/Search/SearchInput.js.map +1 -1
- package/lib/components/Select/Select.d.ts +6 -6
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +60 -45
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Spin/index.js +14 -11
- package/lib/components/Spin/index.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +29 -17
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +28 -25
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -1
- package/lib/components/ThemeProvider/types.d.ts +3 -3
- package/lib/components/ThemeProvider/types.d.ts.map +1 -1
- package/lib/components/YantraIcon.d.ts +6 -0
- package/lib/components/YantraIcon.d.ts.map +1 -0
- package/lib/components/YantraIcon.js +32 -0
- package/lib/components/YantraIcon.js.map +1 -0
- package/lib/components/index.d.ts +6 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/activeCharacterPreference.d.ts +24 -0
- package/lib/hooks/activeCharacterPreference.d.ts.map +1 -0
- package/lib/hooks/activeCharacterPreference.js +64 -0
- package/lib/hooks/activeCharacterPreference.js.map +1 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useToast.d.ts +1 -1
- package/lib/hooks/useToast.d.ts.map +1 -1
- package/lib/hooks/useToast.js +46 -37
- package/lib/hooks/useToast.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/shardui/accordion.js +20 -16
- package/lib/shardui/accordion.js.map +1 -1
- package/lib/shardui/alert-dialog.d.ts +2 -2
- package/lib/shardui/alert-dialog.js +15 -13
- package/lib/shardui/alert-dialog.js.map +1 -1
- package/lib/shardui/alert.js +4 -4
- package/lib/shardui/alert.js.map +1 -1
- package/lib/shardui/avatar.js +4 -4
- package/lib/shardui/avatar.js.map +1 -1
- package/lib/shardui/badge.d.ts +1 -1
- package/lib/shardui/badge.d.ts.map +1 -1
- package/lib/shardui/badge.js +2 -2
- package/lib/shardui/badge.js.map +1 -1
- package/lib/shardui/breadcrumb.d.ts +2 -2
- package/lib/shardui/breadcrumb.js +19 -16
- package/lib/shardui/breadcrumb.js.map +1 -1
- package/lib/shardui/button.js +2 -2
- package/lib/shardui/button.js.map +1 -1
- package/lib/shardui/calendar.d.ts +1 -1
- package/lib/shardui/calendar.d.ts.map +1 -1
- package/lib/shardui/calendar.js +4 -4
- package/lib/shardui/card.js +7 -7
- package/lib/shardui/card.js.map +1 -1
- package/lib/shardui/carousel.js +40 -33
- package/lib/shardui/carousel.js.map +1 -1
- package/lib/shardui/chart.d.ts +1 -1
- package/lib/shardui/chart.d.ts.map +1 -1
- package/lib/shardui/chart.js +81 -66
- package/lib/shardui/chart.js.map +1 -1
- package/lib/shardui/checkbox.js +10 -8
- package/lib/shardui/checkbox.js.map +1 -1
- package/lib/shardui/command.d.ts +2 -2
- package/lib/shardui/command.d.ts.map +1 -1
- package/lib/shardui/command.js +28 -24
- package/lib/shardui/command.js.map +1 -1
- package/lib/shardui/context-menu.d.ts +1 -1
- package/lib/shardui/context-menu.js +41 -30
- package/lib/shardui/context-menu.js.map +1 -1
- package/lib/shardui/dialog.d.ts +2 -2
- package/lib/shardui/dialog.js +22 -17
- package/lib/shardui/dialog.js.map +1 -1
- package/lib/shardui/drawer.d.ts +3 -3
- package/lib/shardui/drawer.js +17 -14
- package/lib/shardui/drawer.js.map +1 -1
- package/lib/shardui/dropdown-menu.d.ts +1 -1
- package/lib/shardui/dropdown-menu.js +42 -31
- package/lib/shardui/dropdown-menu.js.map +1 -1
- package/lib/shardui/form.d.ts +1 -1
- package/lib/shardui/form.d.ts.map +1 -1
- package/lib/shardui/form.js +22 -19
- package/lib/shardui/form.js.map +1 -1
- package/lib/shardui/hover-card.js +2 -2
- package/lib/shardui/hover-card.js.map +1 -1
- package/lib/shardui/input-otp.js +16 -13
- package/lib/shardui/input-otp.js.map +1 -1
- package/lib/shardui/input.js +2 -2
- package/lib/shardui/input.js.map +1 -1
- package/lib/shardui/label.js +2 -2
- package/lib/shardui/label.js.map +1 -1
- package/lib/shardui/menubar.d.ts +1 -1
- package/lib/shardui/menubar.js +46 -35
- package/lib/shardui/menubar.js.map +1 -1
- package/lib/shardui/navigation-menu.js +28 -24
- package/lib/shardui/navigation-menu.js.map +1 -1
- package/lib/shardui/pagination.d.ts +5 -5
- package/lib/shardui/pagination.js +30 -22
- package/lib/shardui/pagination.js.map +1 -1
- package/lib/shardui/popover.js +10 -8
- package/lib/shardui/popover.js.map +1 -1
- package/lib/shardui/progress.js +10 -9
- package/lib/shardui/progress.js.map +1 -1
- package/lib/shardui/radio-group.js +11 -9
- package/lib/shardui/radio-group.js.map +1 -1
- package/lib/shardui/resizable.d.ts +3 -3
- package/lib/shardui/resizable.d.ts.map +1 -1
- package/lib/shardui/resizable.js +11 -9
- package/lib/shardui/resizable.js.map +1 -1
- package/lib/shardui/scroll-area.js +14 -11
- package/lib/shardui/scroll-area.js.map +1 -1
- package/lib/shardui/select.js +49 -35
- package/lib/shardui/select.js.map +1 -1
- package/lib/shardui/separator.js +2 -2
- package/lib/shardui/separator.js.map +1 -1
- package/lib/shardui/sheet.d.ts +2 -2
- package/lib/shardui/sheet.js +24 -19
- package/lib/shardui/sheet.js.map +1 -1
- package/lib/shardui/sidebar.js +104 -88
- package/lib/shardui/sidebar.js.map +1 -1
- package/lib/shardui/skeleton.d.ts +1 -1
- package/lib/shardui/skeleton.d.ts.map +1 -1
- package/lib/shardui/skeleton.js +2 -2
- package/lib/shardui/skeleton.js.map +1 -1
- package/lib/shardui/slider.js +12 -10
- package/lib/shardui/slider.js.map +1 -1
- package/lib/shardui/sonner.d.ts +1 -1
- package/lib/shardui/sonner.d.ts.map +1 -1
- package/lib/shardui/sonner.js +2 -2
- package/lib/shardui/sonner.js.map +1 -1
- package/lib/shardui/switch.js +7 -6
- package/lib/shardui/switch.js.map +1 -1
- package/lib/shardui/table.js +16 -15
- package/lib/shardui/table.js.map +1 -1
- package/lib/shardui/tabs.js +4 -4
- package/lib/shardui/tabs.js.map +1 -1
- package/lib/shardui/textarea.js +2 -2
- package/lib/shardui/textarea.js.map +1 -1
- package/lib/shardui/toast.js +12 -11
- package/lib/shardui/toast.js.map +1 -1
- package/lib/shardui/toaster.d.ts +1 -2
- package/lib/shardui/toaster.d.ts.map +1 -1
- package/lib/shardui/toaster.js +21 -14
- package/lib/shardui/toaster.js.map +1 -1
- package/lib/shardui/toggle-group.js +15 -12
- package/lib/shardui/toggle-group.js.map +1 -1
- package/lib/shardui/toggle.js +2 -2
- package/lib/shardui/toggle.js.map +1 -1
- package/lib/shardui/tooltip.js +2 -2
- package/lib/shardui/tooltip.js.map +1 -1
- package/package.json +9 -3
|
@@ -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,7 @@
|
|
|
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 type { MarketplaceCharacterEntry, ActiveCharacter, CharacterListEntry, CharacterPicker, } from './hooks/useActiveCharacter';
|
|
7
|
+
//# 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,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) =>
|
|
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,
|
|
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
|
|
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
|
|
42
|
+
return jsxs("button", {
|
|
43
43
|
className: `${baseClasses} ${variantClasses} ${sizeClasses} ${widthClass} ${disabledClass} ${className}`,
|
|
44
44
|
disabled: isLoading || disabled,
|
|
45
|
-
...props
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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":"
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|