xertica-ui 2.1.10 → 2.2.0
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/CHANGELOG.md +525 -469
- package/README.md +382 -299
- package/assets/xertica-logo.svg +37 -37
- package/assets/xertica-x-logo.svg +20 -20
- package/bin/cli.ts +748 -548
- package/bin/generate-tokens.ts +262 -262
- package/bin/language-config.ts +361 -0
- package/components/assets/xertica-orbe-animation.ts +1162 -1162
- package/components/assistant/code-block/CodeBlock.tsx +268 -266
- package/components/assistant/code-block/code-block.stories.tsx +57 -57
- package/components/assistant/code-block/code-block.test.tsx +44 -44
- package/components/assistant/code-block/index.ts +1 -1
- package/components/assistant/formatted-document/FormattedDocument.tsx +147 -145
- package/components/assistant/formatted-document/formatted-document.stories.tsx +51 -51
- package/components/assistant/formatted-document/formatted-document.test.tsx +42 -42
- package/components/assistant/formatted-document/index.ts +1 -1
- package/components/assistant/index.ts +6 -6
- package/components/assistant/markdown-message/MarkdownMessage.tsx +152 -152
- package/components/assistant/markdown-message/index.ts +1 -1
- package/components/assistant/markdown-message/markdown-message.stories.tsx +50 -50
- package/components/assistant/markdown-message/markdown-message.test.tsx +33 -33
- package/components/assistant/modern-chat-input/ModernChatInput.tsx +36 -31
- package/components/assistant/modern-chat-input/index.ts +1 -1
- package/components/assistant/modern-chat-input/modern-chat-input.stories.tsx +131 -131
- package/components/assistant/modern-chat-input/modern-chat-input.test.tsx +79 -79
- package/components/assistant/xertica-assistant/index.ts +3 -3
- package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -97
- package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +106 -104
- package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -79
- package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +78 -74
- package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -73
- package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +560 -558
- package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -65
- package/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.tsx +41 -41
- package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -101
- package/components/assistant/xertica-assistant/parts/index.ts +16 -16
- package/components/assistant/xertica-assistant/types.ts +134 -134
- package/components/assistant/xertica-assistant/use-assistant.ts +615 -608
- package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +407 -407
- package/components/assistant/xertica-assistant/xertica-assistant.test.tsx +65 -65
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +613 -609
- package/components/blocks/card-patterns/ActivityCard.tsx +100 -81
- package/components/blocks/card-patterns/ActivityCardSkeleton.tsx +56 -0
- package/components/blocks/card-patterns/FeatureCard.tsx +109 -109
- package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +63 -0
- package/components/blocks/card-patterns/NotificationCard.tsx +140 -137
- package/components/blocks/card-patterns/NotificationCardSkeleton.tsx +81 -0
- package/components/blocks/card-patterns/ProfileCard.tsx +114 -100
- package/components/blocks/card-patterns/ProfileCardSkeleton.tsx +69 -0
- package/components/blocks/card-patterns/ProjectCard.tsx +123 -110
- package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +72 -0
- package/components/blocks/card-patterns/QuickActionCard.tsx +68 -68
- package/components/blocks/card-patterns/QuickActionCardSkeleton.tsx +44 -0
- package/components/blocks/card-patterns/card-patterns.mdx +123 -0
- package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -515
- package/components/blocks/card-patterns/index.ts +29 -17
- package/components/blocks/index.ts +1 -1
- package/components/brand/branding/branding.stories.tsx +57 -57
- package/components/brand/index.ts +6 -6
- package/components/brand/language-selector/LanguageSelector.tsx +47 -12
- package/components/brand/language-selector/index.ts +1 -1
- package/components/brand/language-selector/language-selector.mdx +126 -57
- package/components/brand/language-selector/language-selector.stories.tsx +66 -16
- package/components/brand/language-selector/language-selector.test.tsx +64 -8
- package/components/brand/theme-toggle/ThemeToggle.tsx +70 -68
- package/components/brand/theme-toggle/index.ts +1 -1
- package/components/brand/theme-toggle/theme-toggle.stories.tsx +34 -34
- package/components/brand/theme-toggle/theme-toggle.test.tsx +34 -34
- package/components/brand/xertica-logo/XerticaLogo.stories.tsx +82 -82
- package/components/brand/xertica-logo/XerticaLogo.tsx +104 -104
- package/components/brand/xertica-logo/index.ts +1 -1
- package/components/brand/xertica-logo/xertica-logo.test.tsx +26 -26
- package/components/brand/xertica-orbe/XerticaOrbe.tsx +1927 -1927
- package/components/brand/xertica-orbe/index.ts +1 -1
- package/components/brand/xertica-orbe/xertica-orbe.stories.tsx +40 -40
- package/components/brand/xertica-orbe/xertica-orbe.test.tsx +19 -19
- package/components/brand/xertica-provider/XerticaProvider.tsx +38 -2
- package/components/brand/xertica-provider/index.ts +1 -1
- package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
- package/components/brand/xertica-provider/xertica-provider.test.tsx +74 -74
- package/components/brand/xertica-xlogo/XerticaXLogo.stories.tsx +79 -79
- package/components/brand/xertica-xlogo/XerticaXLogo.tsx +65 -65
- package/components/brand/xertica-xlogo/index.ts +1 -1
- package/components/brand/xertica-xlogo/xertica-xlogo.test.tsx +16 -16
- package/components/examples/ApiKeyMapExample.tsx +71 -71
- package/components/examples/DrawingMapExample.tsx +565 -565
- package/components/examples/FilterableMapExample.tsx +393 -393
- package/components/examples/LocationPickerExample.tsx +348 -348
- package/components/examples/MapExamples.tsx +268 -268
- package/components/examples/MapGmpExample.tsx +169 -169
- package/components/examples/MapShowcase.tsx +471 -471
- package/components/examples/RouteMapExamples.tsx +329 -329
- package/components/examples/SidebarLogoExample.tsx +65 -65
- package/components/examples/SimpleFilterableMap.tsx +219 -219
- package/components/examples/index.ts +45 -45
- package/components/figma/ImageWithFallback.tsx +27 -27
- package/components/hooks/index.ts +13 -13
- package/components/hooks/use-layout-shortcuts.ts +43 -43
- package/components/index.ts +90 -77
- package/components/layout/header/header.stories.tsx +204 -204
- package/components/layout/header/header.test.tsx +75 -75
- package/components/layout/header/header.tsx +349 -349
- package/components/layout/header/index.ts +1 -1
- package/components/layout/index.ts +2 -2
- package/components/layout/sidebar/index.ts +3 -3
- package/components/layout/sidebar/sidebar.mdx +1 -1
- package/components/layout/sidebar/sidebar.stories.tsx +586 -586
- package/components/layout/sidebar/sidebar.test.tsx +76 -76
- package/components/layout/sidebar/sidebar.tsx +1073 -1068
- package/components/layout/sidebar/use-sidebar.ts +104 -104
- package/components/media/FloatingMediaWrapper.tsx +371 -368
- package/components/media/audio-player/AudioPlayer.stories.tsx +124 -124
- package/components/media/audio-player/AudioPlayer.test.tsx +106 -106
- package/components/media/audio-player/AudioPlayer.tsx +765 -762
- package/components/media/audio-player/index.ts +1 -1
- package/components/media/audio-player/use-audio-player.ts +312 -312
- package/components/media/index.ts +3 -3
- package/components/media/video-player/VideoPlayer.stories.tsx +98 -98
- package/components/media/video-player/VideoPlayer.test.tsx +73 -73
- package/components/media/video-player/VideoPlayer.tsx +310 -308
- package/components/media/video-player/index.ts +1 -1
- package/components/pages/forgot-password-page/ForgotPasswordPage.stories.tsx +24 -24
- package/components/pages/forgot-password-page/ForgotPasswordPage.tsx +188 -188
- package/components/pages/forgot-password-page/forgot-password-page.test.tsx +45 -45
- package/components/pages/forgot-password-page/index.ts +1 -1
- package/components/pages/home-content/HomeContent.stories.tsx +43 -43
- package/components/pages/home-content/HomeContent.tsx +120 -125
- package/components/pages/home-content/home-content.mdx +62 -62
- package/components/pages/home-content/index.ts +1 -1
- package/components/pages/home-page/HomePage.stories.tsx +39 -39
- package/components/pages/home-page/HomePage.tsx +74 -75
- package/components/pages/home-page/home-page.mdx +53 -53
- package/components/pages/home-page/home-page.test.tsx +53 -53
- package/components/pages/home-page/index.ts +1 -1
- package/components/pages/index.ts +8 -8
- package/components/pages/login-page/LoginPage.stories.tsx +39 -39
- package/components/pages/login-page/LoginPage.tsx +216 -216
- package/components/pages/login-page/index.ts +1 -1
- package/components/pages/login-page/login-page.test.tsx +63 -63
- package/components/pages/reset-password-page/ResetPasswordPage.stories.tsx +24 -24
- package/components/pages/reset-password-page/ResetPasswordPage.tsx +239 -237
- package/components/pages/reset-password-page/index.ts +1 -1
- package/components/pages/template-content/TemplateContent.stories.tsx +43 -43
- package/components/pages/template-content/TemplateContent.tsx +1235 -1237
- package/components/pages/template-content/index.ts +1 -1
- package/components/pages/template-content/template-content.mdx +61 -61
- package/components/pages/template-page/TemplatePage.stories.tsx +39 -39
- package/components/pages/template-page/TemplatePage.tsx +62 -62
- package/components/pages/template-page/index.ts +1 -1
- package/components/pages/template-page/template-page.mdx +53 -53
- package/components/pages/template-page/template-page.test.tsx +52 -52
- package/components/pages/verify-email-page/VerifyEmailPage.stories.tsx +41 -41
- package/components/pages/verify-email-page/VerifyEmailPage.tsx +206 -206
- package/components/pages/verify-email-page/index.ts +1 -1
- package/components/public-api-smoke.test.tsx +52 -52
- package/components/shared/CustomTooltipContent.tsx +48 -48
- package/components/shared/assistant-utils.test.ts +16 -16
- package/components/shared/assistant-utils.ts +225 -225
- package/components/shared/error-boundary.stories.tsx +132 -132
- package/components/shared/error-boundary.tsx +154 -154
- package/components/shared/error-fallbacks.tsx +226 -226
- package/components/shared/layout-constants.ts +8 -8
- package/components/shared/navigation.ts +35 -35
- package/components/shared/use-mobile.test.ts +16 -16
- package/components/shared/use-mobile.ts +36 -36
- package/components/shared/utils.test.ts +14 -14
- package/components/shared/utils.ts +6 -6
- package/components/ui/accordion/accordion.mdx +8 -8
- package/components/ui/accordion/accordion.stories.tsx +105 -105
- package/components/ui/accordion/accordion.test.tsx +59 -59
- package/components/ui/accordion/accordion.tsx +77 -77
- package/components/ui/accordion/index.ts +1 -1
- package/components/ui/alert/alert.mdx +8 -8
- package/components/ui/alert/alert.stories.tsx +86 -86
- package/components/ui/alert/alert.test.tsx +53 -53
- package/components/ui/alert/alert.tsx +93 -93
- package/components/ui/alert/index.ts +1 -1
- package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
- package/components/ui/alert-dialog/alert-dialog.stories.tsx +84 -84
- package/components/ui/alert-dialog/alert-dialog.test.tsx +70 -70
- package/components/ui/alert-dialog/alert-dialog.tsx +149 -149
- package/components/ui/alert-dialog/index.ts +1 -1
- package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
- package/components/ui/aspect-ratio/aspect-ratio.stories.tsx +46 -46
- package/components/ui/aspect-ratio/aspect-ratio.test.tsx +28 -28
- package/components/ui/aspect-ratio/aspect-ratio.tsx +20 -20
- package/components/ui/aspect-ratio/index.ts +1 -1
- package/components/ui/assistant-chart/AssistantChart.tsx +64 -64
- package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
- package/components/ui/assistant-chart/assistant-chart.stories.tsx +44 -44
- package/components/ui/assistant-chart/assistant-chart.test.tsx +46 -46
- package/components/ui/assistant-chart/index.ts +1 -1
- package/components/ui/avatar/avatar.mdx +8 -8
- package/components/ui/avatar/avatar.stories.tsx +86 -86
- package/components/ui/avatar/avatar.test.tsx +55 -55
- package/components/ui/avatar/avatar.tsx +71 -71
- package/components/ui/avatar/index.ts +1 -1
- package/components/ui/badge/badge.mdx +8 -8
- package/components/ui/badge/badge.stories.tsx +72 -72
- package/components/ui/badge/badge.test.tsx +40 -40
- package/components/ui/badge/badge.tsx +58 -58
- package/components/ui/badge/index.ts +1 -1
- package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
- package/components/ui/breadcrumb/breadcrumb.stories.tsx +123 -123
- package/components/ui/breadcrumb/breadcrumb.test.tsx +70 -70
- package/components/ui/breadcrumb/breadcrumb.tsx +114 -114
- package/components/ui/breadcrumb/index.ts +1 -1
- package/components/ui/button/button.mdx +8 -8
- package/components/ui/button/button.stories.tsx +183 -183
- package/components/ui/button/button.test.tsx +64 -64
- package/components/ui/button/button.tsx +98 -98
- package/components/ui/button/index.ts +1 -1
- package/components/ui/calendar/calendar.mdx +8 -8
- package/components/ui/calendar/calendar.stories.tsx +108 -108
- package/components/ui/calendar/calendar.test.tsx +53 -53
- package/components/ui/calendar/calendar.tsx +230 -230
- package/components/ui/calendar/index.ts +1 -1
- package/components/ui/card/card.mdx +8 -8
- package/components/ui/card/card.stories.tsx +301 -301
- package/components/ui/card/card.test.tsx +55 -55
- package/components/ui/card/card.tsx +83 -83
- package/components/ui/card/index.ts +1 -1
- package/components/ui/carousel/carousel.mdx +8 -8
- package/components/ui/carousel/carousel.stories.tsx +80 -80
- package/components/ui/carousel/carousel.test.tsx +75 -75
- package/components/ui/carousel/carousel.tsx +242 -242
- package/components/ui/carousel/index.ts +1 -1
- package/components/ui/chart/chart.mdx +8 -8
- package/components/ui/chart/chart.stories.tsx +1328 -1328
- package/components/ui/chart/chart.test.tsx +178 -178
- package/components/ui/chart/chart.tsx +2232 -2232
- package/components/ui/chart/index.ts +1 -1
- package/components/ui/checkbox/checkbox.mdx +8 -8
- package/components/ui/checkbox/checkbox.stories.tsx +109 -109
- package/components/ui/checkbox/checkbox.test.tsx +49 -49
- package/components/ui/checkbox/checkbox.tsx +68 -68
- package/components/ui/checkbox/index.ts +1 -1
- package/components/ui/collapsible/collapsible.mdx +8 -8
- package/components/ui/collapsible/collapsible.stories.tsx +45 -45
- package/components/ui/collapsible/collapsible.test.tsx +51 -51
- package/components/ui/collapsible/collapsible.tsx +32 -32
- package/components/ui/collapsible/index.ts +1 -1
- package/components/ui/command/command.mdx +8 -8
- package/components/ui/command/command.stories.tsx +134 -134
- package/components/ui/command/command.test.tsx +48 -48
- package/components/ui/command/command.tsx +163 -163
- package/components/ui/command/index.ts +1 -1
- package/components/ui/context-menu/context-menu.mdx +8 -8
- package/components/ui/context-menu/context-menu.stories.tsx +76 -76
- package/components/ui/context-menu/context-menu.test.tsx +61 -61
- package/components/ui/context-menu/context-menu.tsx +236 -236
- package/components/ui/context-menu/index.ts +1 -1
- package/components/ui/dialog/dialog.mdx +8 -8
- package/components/ui/dialog/dialog.stories.tsx +174 -174
- package/components/ui/dialog/dialog.test.tsx +78 -78
- package/components/ui/dialog/dialog.tsx +189 -189
- package/components/ui/dialog/index.ts +1 -1
- package/components/ui/drawer/drawer.mdx +8 -8
- package/components/ui/drawer/drawer.stories.tsx +71 -71
- package/components/ui/drawer/drawer.test.tsx +67 -67
- package/components/ui/drawer/drawer.tsx +146 -146
- package/components/ui/drawer/index.ts +1 -1
- package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
- package/components/ui/dropdown-menu/dropdown-menu.stories.tsx +156 -156
- package/components/ui/dropdown-menu/dropdown-menu.test.tsx +62 -62
- package/components/ui/dropdown-menu/dropdown-menu.tsx +240 -240
- package/components/ui/dropdown-menu/index.ts +1 -1
- package/components/ui/empty/empty.mdx +8 -8
- package/components/ui/empty/empty.stories.tsx +85 -85
- package/components/ui/empty/empty.test.tsx +31 -31
- package/components/ui/empty/empty.tsx +88 -88
- package/components/ui/empty/index.ts +1 -1
- package/components/ui/file-upload/file-upload.mdx +8 -8
- package/components/ui/file-upload/file-upload.stories.tsx +144 -144
- package/components/ui/file-upload/file-upload.test.tsx +65 -65
- package/components/ui/file-upload/file-upload.tsx +142 -142
- package/components/ui/file-upload/index.ts +2 -2
- package/components/ui/file-upload/use-file-upload.ts +177 -177
- package/components/ui/form/form.stories.tsx +85 -85
- package/components/ui/form/form.test.tsx +75 -75
- package/components/ui/form/form.tsx +163 -163
- package/components/ui/form/index.ts +1 -1
- package/components/ui/google-maps-loader/google-maps-loader.test.tsx +35 -35
- package/components/ui/google-maps-loader/google-maps-loader.tsx +465 -465
- package/components/ui/google-maps-loader/index.ts +1 -1
- package/components/ui/hover-card/hover-card.mdx +8 -8
- package/components/ui/hover-card/hover-card.stories.tsx +61 -61
- package/components/ui/hover-card/hover-card.test.tsx +48 -48
- package/components/ui/hover-card/hover-card.tsx +50 -50
- package/components/ui/hover-card/index.ts +1 -1
- package/components/ui/index.ts +400 -400
- package/components/ui/input/index.ts +1 -1
- package/components/ui/input/input.mdx +8 -8
- package/components/ui/input/input.stories.tsx +153 -153
- package/components/ui/input/input.test.tsx +47 -47
- package/components/ui/input/input.tsx +57 -57
- package/components/ui/input-otp/index.ts +1 -1
- package/components/ui/input-otp/input-otp.mdx +8 -8
- package/components/ui/input-otp/input-otp.stories.tsx +120 -120
- package/components/ui/input-otp/input-otp.test.tsx +74 -74
- package/components/ui/input-otp/input-otp.tsx +101 -101
- package/components/ui/label/index.ts +1 -1
- package/components/ui/label/label.mdx +8 -8
- package/components/ui/label/label.stories.tsx +74 -74
- package/components/ui/label/label.test.tsx +45 -45
- package/components/ui/label/label.tsx +53 -53
- package/components/ui/map/index.ts +1 -1
- package/components/ui/map/map.mdx +8 -8
- package/components/ui/map/map.stories.tsx +86 -86
- package/components/ui/map/map.test.tsx +82 -82
- package/components/ui/map/map.tsx +506 -506
- package/components/ui/map/mock.test.tsx +13 -13
- package/components/ui/map-config/index.ts +1 -1
- package/components/ui/map-config/map-config.ts +18 -18
- package/components/ui/map-layers/index.ts +1 -1
- package/components/ui/map-layers/map-layers.test.tsx +48 -48
- package/components/ui/map-layers/map-layers.tsx +126 -126
- package/components/ui/map.exports/index.ts +1 -1
- package/components/ui/map.exports/map.exports.ts +31 -31
- package/components/ui/menubar/index.ts +1 -1
- package/components/ui/menubar/menubar.mdx +8 -8
- package/components/ui/menubar/menubar.stories.tsx +130 -130
- package/components/ui/menubar/menubar.test.tsx +53 -53
- package/components/ui/menubar/menubar.tsx +265 -265
- package/components/ui/navigation-menu/index.ts +1 -1
- package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
- package/components/ui/navigation-menu/navigation-menu.stories.tsx +126 -126
- package/components/ui/navigation-menu/navigation-menu.test.tsx +47 -47
- package/components/ui/navigation-menu/navigation-menu.tsx +165 -165
- package/components/ui/notification-badge/index.ts +1 -1
- package/components/ui/notification-badge/notification-badge.mdx +8 -8
- package/components/ui/notification-badge/notification-badge.stories.tsx +66 -66
- package/components/ui/notification-badge/notification-badge.test.tsx +61 -61
- package/components/ui/notification-badge/notification-badge.tsx +91 -91
- package/components/ui/page-header/index.ts +1 -1
- package/components/ui/page-header/page-header.stories.tsx +69 -69
- package/components/ui/page-header/page-header.test.tsx +37 -37
- package/components/ui/page-header/page-header.tsx +124 -124
- package/components/ui/pagination/index.ts +3 -3
- package/components/ui/pagination/pagination.mdx +8 -8
- package/components/ui/pagination/pagination.stories.tsx +210 -210
- package/components/ui/pagination/pagination.test.tsx +63 -63
- package/components/ui/pagination/pagination.tsx +140 -140
- package/components/ui/pagination/use-pagination.ts +173 -173
- package/components/ui/popover/index.ts +1 -1
- package/components/ui/popover/popover.mdx +8 -8
- package/components/ui/popover/popover.stories.tsx +73 -73
- package/components/ui/popover/popover.test.tsx +48 -48
- package/components/ui/popover/popover.tsx +54 -54
- package/components/ui/progress/index.ts +1 -1
- package/components/ui/progress/progress.mdx +8 -8
- package/components/ui/progress/progress.stories.tsx +55 -55
- package/components/ui/progress/progress.test.tsx +23 -23
- package/components/ui/progress/progress.tsx +68 -68
- package/components/ui/radio-group/index.ts +1 -1
- package/components/ui/radio-group/radio-group.mdx +8 -8
- package/components/ui/radio-group/radio-group.stories.tsx +114 -114
- package/components/ui/radio-group/radio-group.test.tsx +78 -78
- package/components/ui/radio-group/radio-group.tsx +93 -93
- package/components/ui/rating/index.ts +1 -1
- package/components/ui/rating/rating.mdx +8 -8
- package/components/ui/rating/rating.stories.tsx +50 -50
- package/components/ui/rating/rating.test.tsx +48 -48
- package/components/ui/rating/rating.tsx +145 -145
- package/components/ui/resizable/index.ts +1 -1
- package/components/ui/resizable/resizable.mdx +8 -8
- package/components/ui/resizable/resizable.stories.tsx +88 -88
- package/components/ui/resizable/resizable.test.tsx +61 -61
- package/components/ui/resizable/resizable.tsx +452 -452
- package/components/ui/rich-text-editor/index.ts +7 -7
- package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +290 -290
- package/components/ui/rich-text-editor/rich-text-editor.test.tsx +86 -86
- package/components/ui/rich-text-editor/rich-text-editor.tsx +634 -634
- package/components/ui/rich-text-editor/use-rich-text-editor.ts +453 -453
- package/components/ui/route-map/index.ts +1 -1
- package/components/ui/route-map/route-map.mdx +8 -8
- package/components/ui/route-map/route-map.stories.tsx +48 -48
- package/components/ui/route-map/route-map.test.tsx +108 -108
- package/components/ui/route-map/route-map.tsx +349 -349
- package/components/ui/scroll-area/index.ts +1 -1
- package/components/ui/scroll-area/scroll-area.mdx +8 -8
- package/components/ui/scroll-area/scroll-area.stories.tsx +31 -31
- package/components/ui/scroll-area/scroll-area.test.tsx +27 -27
- package/components/ui/scroll-area/scroll-area.tsx +70 -70
- package/components/ui/search/index.ts +1 -1
- package/components/ui/search/search.mdx +8 -8
- package/components/ui/search/search.stories.tsx +107 -107
- package/components/ui/search/search.test.tsx +67 -67
- package/components/ui/search/search.tsx +141 -141
- package/components/ui/select/index.ts +1 -1
- package/components/ui/select/select.mdx +8 -8
- package/components/ui/select/select.stories.tsx +163 -163
- package/components/ui/select/select.test.tsx +99 -99
- package/components/ui/select/select.tsx +195 -195
- package/components/ui/separator/index.ts +1 -1
- package/components/ui/separator/separator.mdx +8 -8
- package/components/ui/separator/separator.stories.tsx +55 -55
- package/components/ui/separator/separator.test.tsx +23 -23
- package/components/ui/separator/separator.tsx +39 -39
- package/components/ui/sheet/index.ts +1 -1
- package/components/ui/sheet/sheet.mdx +8 -8
- package/components/ui/sheet/sheet.stories.tsx +93 -93
- package/components/ui/sheet/sheet.test.tsx +62 -62
- package/components/ui/sheet/sheet.tsx +149 -149
- package/components/ui/simple-map/index.ts +1 -1
- package/components/ui/simple-map/simple-map.mdx +8 -8
- package/components/ui/simple-map/simple-map.stories.tsx +44 -44
- package/components/ui/simple-map/simple-map.test.tsx +36 -36
- package/components/ui/simple-map/simple-map.tsx +92 -92
- package/components/ui/skeleton/index.ts +1 -1
- package/components/ui/skeleton/skeleton.mdx +8 -8
- package/components/ui/skeleton/skeleton.stories.tsx +36 -36
- package/components/ui/skeleton/skeleton.test.tsx +19 -19
- package/components/ui/skeleton/skeleton.tsx +25 -25
- package/components/ui/slider/index.ts +1 -1
- package/components/ui/slider/slider.mdx +8 -8
- package/components/ui/slider/slider.stories.tsx +44 -44
- package/components/ui/slider/slider.test.tsx +25 -25
- package/components/ui/slider/slider.tsx +66 -66
- package/components/ui/sonner/index.ts +1 -1
- package/components/ui/sonner/sonner.mdx +8 -8
- package/components/ui/sonner/sonner.stories.tsx +41 -41
- package/components/ui/sonner/sonner.test.tsx +24 -24
- package/components/ui/sonner/sonner.tsx +74 -74
- package/components/ui/stats-card/index.ts +2 -1
- package/components/ui/stats-card/stats-card-skeleton.tsx +62 -0
- package/components/ui/stats-card/stats-card.mdx +8 -8
- package/components/ui/stats-card/stats-card.stories.tsx +99 -77
- package/components/ui/stats-card/stats-card.test.tsx +34 -34
- package/components/ui/stats-card/stats-card.tsx +93 -93
- package/components/ui/stepper/index.ts +3 -3
- package/components/ui/stepper/stepper.mdx +8 -8
- package/components/ui/stepper/stepper.stories.tsx +171 -171
- package/components/ui/stepper/stepper.test.tsx +47 -47
- package/components/ui/stepper/stepper.tsx +190 -190
- package/components/ui/stepper/use-stepper.ts +139 -139
- package/components/ui/switch/index.ts +1 -1
- package/components/ui/switch/switch.mdx +8 -8
- package/components/ui/switch/switch.stories.tsx +93 -93
- package/components/ui/switch/switch.test.tsx +44 -44
- package/components/ui/switch/switch.tsx +70 -70
- package/components/ui/table/index.ts +1 -1
- package/components/ui/table/table.mdx +8 -8
- package/components/ui/table/table.stories.tsx +114 -114
- package/components/ui/table/table.test.tsx +43 -43
- package/components/ui/table/table.tsx +104 -104
- package/components/ui/tabs/index.ts +1 -1
- package/components/ui/tabs/tabs.mdx +8 -8
- package/components/ui/tabs/tabs.stories.tsx +140 -140
- package/components/ui/tabs/tabs.test.tsx +50 -50
- package/components/ui/tabs/tabs.tsx +66 -66
- package/components/ui/textarea/index.ts +1 -1
- package/components/ui/textarea/textarea.mdx +8 -8
- package/components/ui/textarea/textarea.stories.tsx +69 -69
- package/components/ui/textarea/textarea.test.tsx +41 -41
- package/components/ui/textarea/textarea.tsx +61 -61
- package/components/ui/timeline/index.ts +1 -1
- package/components/ui/timeline/timeline.mdx +8 -8
- package/components/ui/timeline/timeline.stories.tsx +97 -97
- package/components/ui/timeline/timeline.test.tsx +53 -53
- package/components/ui/timeline/timeline.tsx +124 -124
- package/components/ui/toggle/index.ts +1 -1
- package/components/ui/toggle/toggle.mdx +8 -8
- package/components/ui/toggle/toggle.stories.tsx +56 -56
- package/components/ui/toggle/toggle.test.tsx +32 -32
- package/components/ui/toggle/toggle.tsx +55 -55
- package/components/ui/toggle-group/index.ts +1 -1
- package/components/ui/toggle-group/toggle-group.mdx +8 -8
- package/components/ui/toggle-group/toggle-group.stories.tsx +66 -66
- package/components/ui/toggle-group/toggle-group.test.tsx +47 -47
- package/components/ui/toggle-group/toggle-group.tsx +79 -79
- package/components/ui/tooltip/index.ts +1 -1
- package/components/ui/tooltip/tooltip.mdx +8 -8
- package/components/ui/tooltip/tooltip.stories.tsx +83 -83
- package/components/ui/tooltip/tooltip.test.tsx +39 -39
- package/components/ui/tooltip/tooltip.tsx +69 -69
- package/components/ui/tree-view/index.ts +4 -4
- package/components/ui/tree-view/tree-view.mdx +8 -8
- package/components/ui/tree-view/tree-view.stories.tsx +154 -154
- package/components/ui/tree-view/tree-view.test.tsx +58 -58
- package/components/ui/tree-view/tree-view.tsx +171 -171
- package/components/ui/tree-view/use-tree-view.ts +237 -237
- package/components.json +892 -892
- package/contexts/ApiKeyContext.test.tsx +26 -26
- package/contexts/ApiKeyContext.tsx +196 -196
- package/contexts/AssistenteContext.test.tsx +17 -17
- package/contexts/AssistenteContext.tsx +113 -113
- package/contexts/AuthContext.tsx +118 -118
- package/contexts/BrandColorsContext.test.tsx +21 -21
- package/contexts/BrandColorsContext.tsx +251 -251
- package/contexts/LanguageContext.test.tsx +108 -16
- package/contexts/LanguageContext.tsx +202 -17
- package/contexts/LayoutContext.test.tsx +29 -29
- package/contexts/LayoutContext.tsx +140 -140
- package/contexts/ThemeContext.test.tsx +38 -38
- package/contexts/ThemeContext.tsx +111 -111
- package/contexts/index.ts +8 -8
- package/contexts/theme-data.ts +340 -340
- package/dist/{AssistantChart-DoZCyS5r.cjs → AssistantChart-9w31gdAb.cjs} +4 -4
- package/dist/{AssistantChart-CldVCVDe.cjs → AssistantChart-BAudAfne.cjs} +5 -5
- package/dist/{AssistantChart-Bdd44uBn.cjs → AssistantChart-BAx9VQvb.cjs} +127 -388
- package/dist/{AssistantChart-Cu3m7RBo.js → AssistantChart-BP8upjMk.js} +5 -5
- package/dist/{use-mobile-BXuYROXM.js → AssistantChart-BXU1ACnh.js} +958 -1671
- package/dist/{AssistantChart-CFhDdGyU.js → AssistantChart-CVko2A1W.js} +130 -391
- package/dist/{AssistantChart-C_hwFRRr.js → AssistantChart-CVzmmhx4.js} +4 -4
- package/dist/{use-mobile-CG2-SdXV.cjs → AssistantChart-D0A1FPYt.cjs} +980 -1700
- package/dist/{AudioPlayer-IAU5q5T1.cjs → AudioPlayer-1ypwE2Wh.cjs} +1 -1
- package/dist/AudioPlayer-BWDW6TN9.cjs +1279 -0
- package/dist/AudioPlayer-CM962GEh.js +1280 -0
- package/dist/{AudioPlayer-CySJIyvL.js → AudioPlayer-DuKXrCfy.js} +1 -1
- package/dist/CodeBlock-CV6dtsTM.cjs +220 -0
- package/dist/CodeBlock-CjeFavqV.js +221 -0
- package/dist/{FeatureCard-DbHWCb4E.js → FeatureCard-Cfs6Ishq.js} +221 -37
- package/dist/FeatureCard-ie3L8Fpr.cjs +484 -0
- package/dist/FeatureCardSkeleton-CAgu8stE.js +27 -0
- package/dist/FeatureCardSkeleton-mO3Bdm_V.cjs +26 -0
- package/dist/{LanguageContext-CS14yCpi.js → LanguageContext-BwhwC3G2.js} +2 -2
- package/dist/{LanguageContext-B_KFTCzT.cjs → LanguageContext-DvUt5jBg.cjs} +2 -2
- package/dist/{ThemeContext-C2EwAPDt.js → ThemeContext-BbBNoFTG.js} +2 -2
- package/dist/ThemeContext-BblcjQup.cjs +1855 -0
- package/dist/ThemeContext-Bo-W2WZH.js +1856 -0
- package/dist/ThemeContext-CP3a0jxy.cjs +1855 -0
- package/dist/{ThemeContext-vTjumZeM.cjs → ThemeContext-Cmr8Ex8H.cjs} +2 -2
- package/dist/ThemeContext-CpqYShLq.cjs +324 -0
- package/dist/{ThemeContext-CQSo4Iwc.js → ThemeContext-D3LzacmG.js} +8 -1
- package/dist/ThemeContext-Du2nE1PL.js +325 -0
- package/dist/ThemeContext-GeEBTJ3q.cjs +1621 -0
- package/dist/ThemeContext-JyLK9B1o.js +1622 -0
- package/dist/{ThemeContext-CGk3KK0k.cjs → ThemeContext-U4dEYc6C.cjs} +8 -1
- package/dist/ThemeContext-ept8jhXI.js +1856 -0
- package/dist/{VerifyEmailPage-C0c2e5n0.js → VerifyEmailPage-BE-L9mB7.js} +7 -7
- package/dist/VerifyEmailPage-BIBOKV7Z.js +3214 -0
- package/dist/{VerifyEmailPage--1Vurewl.cjs → VerifyEmailPage-BRSP-Pwt.cjs} +3 -3
- package/dist/{VerifyEmailPage-Cwi3kbol.cjs → VerifyEmailPage-Bae2cBXT.cjs} +7 -7
- package/dist/{VerifyEmailPage-DjQKRlUS.cjs → VerifyEmailPage-BiRm7Nh4.cjs} +1185 -796
- package/dist/VerifyEmailPage-Bvfv8HVQ.js +3214 -0
- package/dist/{VerifyEmailPage-BComraR7.cjs → VerifyEmailPage-CR7kb5df.cjs} +22 -12
- package/dist/{VerifyEmailPage-MTD7AG1Z.js → VerifyEmailPage-C_ihbcth.js} +4 -4
- package/dist/{VerifyEmailPage-1WwWczAn.js → VerifyEmailPage-CbgjOF0v.js} +22 -12
- package/dist/{VerifyEmailPage-DvMLZgFt.js → VerifyEmailPage-CdYPSJoO.js} +1 -1
- package/dist/VerifyEmailPage-D-FRj5TU.cjs +3213 -0
- package/dist/{VerifyEmailPage-s-1X3LDJ.cjs → VerifyEmailPage-DF2ilhum.cjs} +1049 -665
- package/dist/{VerifyEmailPage-CYXtbKi3.cjs → VerifyEmailPage-DMBh4NM9.cjs} +1 -1
- package/dist/{VerifyEmailPage-CgMxRb4z.js → VerifyEmailPage-DTtFfC-J.js} +3 -3
- package/dist/{VerifyEmailPage-CFLMls1p.cjs → VerifyEmailPage-Dt7zgA4w.cjs} +4 -4
- package/dist/VerifyEmailPage-EhudUdqF.js +3211 -0
- package/dist/VerifyEmailPage-hdB8JQGv.cjs +3213 -0
- package/dist/VerifyEmailPage-vYHbYK3q.js +3214 -0
- package/dist/XerticaProvider-AChwphCO.cjs +48 -0
- package/dist/XerticaProvider-AbWlr7Af.cjs +48 -0
- package/dist/{XerticaProvider-D-yNhF94.cjs → XerticaProvider-B8CaV7xu.cjs} +1 -1
- package/dist/{XerticaProvider-CEoWMTxu.js → XerticaProvider-BITjgC5p.js} +2 -2
- package/dist/{XerticaProvider-CllrbMEJ.cjs → XerticaProvider-By8q3Roe.cjs} +2 -2
- package/dist/XerticaProvider-CUYJZc32.js +49 -0
- package/dist/{XerticaProvider-ET0ihewn.cjs → XerticaProvider-CW9hpCdF.cjs} +2 -2
- package/dist/XerticaProvider-CWgby5mY.js +49 -0
- package/dist/XerticaProvider-CWs6EwNa.js +49 -0
- package/dist/XerticaProvider-CjQAQPcn.cjs +48 -0
- package/dist/XerticaProvider-D5lLumH-.js +49 -0
- package/dist/{XerticaProvider-DYq4JWtg.js → XerticaProvider-DQtvJU7m.js} +1 -1
- package/dist/XerticaProvider-qQUDop71.cjs +48 -0
- package/dist/{XerticaProvider-B7EVH-NF.js → XerticaProvider-siSt9uG2.js} +2 -2
- package/dist/{LanguageSelector-D6uacAIM.cjs → XerticaXLogo-8TTzBjHw.cjs} +136 -115
- package/dist/{LanguageSelector-B5YfbHra.js → XerticaXLogo-BWaag64t.js} +136 -115
- package/dist/XerticaXLogo-CFuIlYFH.js +252 -0
- package/dist/XerticaXLogo-CU-U-GP4.cjs +251 -0
- package/dist/XerticaXLogo-ChryA6xj.js +252 -0
- package/dist/{XerticaXLogo-CQUUjXoH.cjs → XerticaXLogo-CziKMQil.cjs} +8 -8
- package/dist/XerticaXLogo-DHz5SugF.js +252 -0
- package/dist/XerticaXLogo-DTee_y8X.cjs +251 -0
- package/dist/{XerticaXLogo-Cmsp-Eey.js → XerticaXLogo-DfUvz-lD.js} +9 -9
- package/dist/XerticaXLogo-kslQ8Tk_.cjs +251 -0
- package/dist/{alert-dialog-s-vmNkJ_.js → alert-dialog-iDe5VE5o.js} +3 -3
- package/dist/{alert-dialog-DSKByiKZ.cjs → alert-dialog-yckpaOpy.cjs} +3 -3
- package/dist/assistant.cjs.js +2 -2
- package/dist/assistant.es.js +2 -2
- package/dist/blocks.cjs.js +8 -1
- package/dist/blocks.es.js +10 -3
- package/dist/brand.cjs.js +2 -2
- package/dist/brand.es.js +2 -2
- package/dist/cli.js +524 -164
- package/dist/components/blocks/card-patterns/ActivityCardSkeleton.d.ts +19 -0
- package/dist/components/blocks/card-patterns/FeatureCardSkeleton.d.ts +18 -0
- package/dist/components/blocks/card-patterns/NotificationCardSkeleton.d.ts +21 -0
- package/dist/components/blocks/card-patterns/ProfileCardSkeleton.d.ts +20 -0
- package/dist/components/blocks/card-patterns/ProjectCardSkeleton.d.ts +18 -0
- package/dist/components/blocks/card-patterns/QuickActionCardSkeleton.d.ts +16 -0
- package/dist/components/blocks/card-patterns/index.d.ts +12 -0
- package/dist/components/brand/language-selector/LanguageSelector.d.ts +15 -1
- package/dist/components/brand/xertica-provider/XerticaProvider.d.ts +29 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/ui/stats-card/index.d.ts +1 -0
- package/dist/components/ui/stats-card/stats-card-skeleton.d.ts +25 -0
- package/dist/contexts/LanguageContext.d.ts +66 -5
- package/dist/features/assistant/data/mock.d.ts +2 -2
- package/dist/features/assistant/hooks/useAssistantConfig.d.ts +0 -1
- package/dist/features/assistant/index.d.ts +1 -1
- package/dist/features/home/hooks/useDashboardStats.d.ts +0 -1
- package/dist/features/home/hooks/useFeatureCards.d.ts +0 -1
- package/dist/features/home/hooks/useTeamMembers.d.ts +0 -1
- package/dist/features/home/index.d.ts +3 -3
- package/dist/{google-maps-loader-Y-QkD-Li.cjs → google-maps-loader-BqsYL48U.cjs} +0 -5
- package/dist/{google-maps-loader-CTYySAun.js → google-maps-loader-t2IlYBzw.js} +0 -4
- package/dist/hooks.cjs.js +2 -1
- package/dist/hooks.es.js +2 -1
- package/dist/i18n.d.ts +13 -0
- package/dist/index-CkTUgOwX.js +8 -0
- package/dist/{index-COtD8bRW.cjs → index-D3RLKRAs.cjs} +1 -1
- package/dist/index.cjs.js +34 -19
- package/dist/index.es.js +71 -56
- package/dist/index.umd.js +454 -1027
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +1 -1
- package/dist/media.cjs.js +1 -1
- package/dist/media.es.js +1 -1
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/{rich-text-editor-Bp3zQqMC.js → rich-text-editor-1UW3Y2JK.js} +989 -1052
- package/dist/{rich-text-editor-CeucBdIv.cjs → rich-text-editor-CyggTOLQ.cjs} +989 -1052
- package/dist/{sidebar-DQj1z3jG.cjs → sidebar-B3EYhli0.cjs} +269 -227
- package/dist/{sidebar-CK_0ZQHj.cjs → sidebar-B9NR0lCe.cjs} +271 -274
- package/dist/sidebar-BvF5I2Ue.cjs +800 -0
- package/dist/{sidebar-q7P2Godd.cjs → sidebar-C5B_LHek.cjs} +1 -1
- package/dist/{sidebar-LluMXfam.js → sidebar-CA6_ek3f.js} +269 -227
- package/dist/{sidebar-BxGXsDAd.cjs → sidebar-CVUGHOS_.cjs} +8 -16
- package/dist/{sidebar-BViy8Eeu.js → sidebar-CmvwjnVb.js} +9 -17
- package/dist/{sidebar-CUuOvYhK.js → sidebar-CplprZpM.js} +272 -258
- package/dist/{sidebar-BbVIQvlP.js → sidebar-Dz7bd3zP.js} +1 -1
- package/dist/sidebar-KIS0C2JH.js +801 -0
- package/dist/sidebar-OTO_up7Z.js +801 -0
- package/dist/sidebar-zowjejT2.cjs +800 -0
- package/dist/skeleton-4zoHiFJ_.cjs +83 -0
- package/dist/skeleton-C4bHqUBf.js +84 -0
- package/dist/ui.cjs.js +12 -11
- package/dist/ui.es.js +46 -45
- package/dist/{use-audio-player-nv8ZSGa1.js → use-audio-player-Bkh23vQ3.js} +3 -7
- package/dist/{use-audio-player-NKsWyjWu.cjs → use-audio-player-Dn1NR9xN.cjs} +3 -7
- package/dist/{xertica-assistant-dyP7KHM5.cjs → xertica-assistant-B1IaHXnB.cjs} +388 -529
- package/dist/{xertica-assistant-ciJaWqm1.js → xertica-assistant-BMqdyRVi.js} +10 -28
- package/dist/{xertica-assistant-BdiZag0h.js → xertica-assistant-BbgzsgsG.js} +539 -562
- package/dist/{xertica-assistant-V_IdW4WF.cjs → xertica-assistant-Bj3vBCq_.cjs} +9 -27
- package/dist/{xertica-assistant-yX1CFBBo.js → xertica-assistant-DPsESB6t.js} +390 -531
- package/dist/{CodeBlock-7TTgmdGG.cjs → xertica-assistant-Qp3ydksa.cjs} +51 -263
- package/dist/{xertica-assistant-DUBpmEgo.cjs → xertica-assistant-d2qs2Vd9.cjs} +538 -561
- package/dist/{CodeBlock-DnYNI8rQ.js → xertica-assistant-gnCJdcZY.js} +7 -219
- package/dist/xertica-ui.css +2 -2
- package/docs/ai-usage.md +195 -195
- package/docs/architecture-improvements.md +456 -476
- package/docs/architecture.md +306 -273
- package/docs/components/accordion.md +109 -109
- package/docs/components/alert-dialog.md +127 -127
- package/docs/components/alert.md +106 -106
- package/docs/components/aspect-ratio.md +58 -58
- package/docs/components/assistant-chart.md +47 -47
- package/docs/components/assistant.md +426 -426
- package/docs/components/audio-player.md +167 -167
- package/docs/components/avatar.md +101 -101
- package/docs/components/badge.md +84 -84
- package/docs/components/branding.md +252 -249
- package/docs/components/breadcrumb.md +104 -104
- package/docs/components/button.md +156 -156
- package/docs/components/calendar.md +141 -141
- package/docs/components/card-patterns.md +445 -376
- package/docs/components/card.md +245 -245
- package/docs/components/carousel.md +100 -100
- package/docs/components/chart.md +638 -638
- package/docs/components/checkbox.md +88 -88
- package/docs/components/code-block.md +105 -105
- package/docs/components/collapsible.md +86 -86
- package/docs/components/command.md +113 -113
- package/docs/components/context-menu.md +81 -81
- package/docs/components/dialog.md +198 -198
- package/docs/components/drawer.md +105 -105
- package/docs/components/dropdown-menu.md +127 -127
- package/docs/components/empty.md +127 -127
- package/docs/components/error-boundary.md +191 -191
- package/docs/components/file-upload.md +189 -189
- package/docs/components/floating-media-wrapper.md +63 -63
- package/docs/components/form.md +177 -177
- package/docs/components/formatted-document.md +105 -105
- package/docs/components/google-maps-loader.md +44 -44
- package/docs/components/header.md +177 -177
- package/docs/components/hooks.md +430 -425
- package/docs/components/hover-card.md +86 -86
- package/docs/components/image-with-fallback.md +107 -107
- package/docs/components/input-otp.md +95 -95
- package/docs/components/input.md +130 -130
- package/docs/components/label.md +69 -69
- package/docs/components/language-selector.md +71 -16
- package/docs/components/map-layers.md +138 -138
- package/docs/components/map.md +84 -84
- package/docs/components/markdown-message.md +47 -47
- package/docs/components/menubar.md +89 -89
- package/docs/components/modern-chat-input.md +164 -164
- package/docs/components/navigation-menu.md +83 -83
- package/docs/components/notification-badge.md +78 -78
- package/docs/components/page-header.md +93 -93
- package/docs/components/pages.md +309 -309
- package/docs/components/pagination.md +334 -334
- package/docs/components/popover.md +116 -116
- package/docs/components/progress.md +103 -103
- package/docs/components/radio-group.md +133 -133
- package/docs/components/rating.md +77 -77
- package/docs/components/resizable.md +84 -84
- package/docs/components/rich-text-editor.md +255 -255
- package/docs/components/route-map.md +124 -124
- package/docs/components/scroll-area.md +58 -58
- package/docs/components/search.md +87 -87
- package/docs/components/select.md +144 -144
- package/docs/components/separator.md +58 -58
- package/docs/components/sheet.md +122 -122
- package/docs/components/sidebar.md +314 -314
- package/docs/components/simple-map.md +51 -51
- package/docs/components/skeleton.md +99 -99
- package/docs/components/slider.md +84 -84
- package/docs/components/sonner.md +115 -115
- package/docs/components/stats-card.md +120 -120
- package/docs/components/stepper.md +268 -268
- package/docs/components/switch.md +106 -106
- package/docs/components/table.md +138 -138
- package/docs/components/tabs.md +117 -117
- package/docs/components/textarea.md +86 -86
- package/docs/components/theme-toggle.md +73 -73
- package/docs/components/timeline.md +121 -121
- package/docs/components/toggle-group.md +68 -68
- package/docs/components/toggle.md +62 -62
- package/docs/components/tooltip.md +116 -116
- package/docs/components/tree-view.md +238 -238
- package/docs/components/use-mobile.md +96 -96
- package/docs/components/video-player.md +68 -68
- package/docs/components/xertica-logo.md +36 -36
- package/docs/components/xertica-orbe.md +35 -35
- package/docs/components/xertica-provider.md +65 -65
- package/docs/components/xertica-xlogo.md +35 -35
- package/docs/decision-tree.md +293 -293
- package/docs/doc-audit.md +243 -224
- package/docs/form-sizing.md +162 -162
- package/docs/getting-started.md +591 -568
- package/docs/guidelines.md +328 -222
- package/docs/i18n.md +324 -43
- package/docs/installation.md +267 -267
- package/docs/layout.md +143 -143
- package/docs/llms.md +295 -295
- package/docs/patterns/analytics.md +194 -194
- package/docs/patterns/crud.md +149 -149
- package/docs/patterns/dashboard.md +138 -138
- package/docs/patterns/detail-page.md +296 -296
- package/docs/patterns/form.md +241 -241
- package/docs/patterns/login.md +156 -156
- package/docs/patterns/settings.md +368 -368
- package/docs/patterns/wizard.md +213 -213
- package/docs/state-management.md +289 -283
- package/guidelines/Guidelines.md +406 -257
- package/hooks/useTheme.test.tsx +16 -16
- package/hooks/useTheme.ts +4 -4
- package/imports/Podcast.tsx +540 -540
- package/imports/XerticaAi.tsx +46 -46
- package/imports/XerticaX.tsx +15 -15
- package/imports/svg-aueiaqngck.ts +20 -20
- package/imports/svg-v9krss1ozd.ts +23 -23
- package/imports/svg-vhrdofe3qe.ts +6 -6
- package/llms-compact.txt +1 -1
- package/llms-full.txt +5 -2
- package/llms.txt +186 -186
- package/mcp/resources.json +22 -22
- package/mcp/tools.json +35 -35
- package/package.json +213 -213
- package/scripts/ai-validator.ts +91 -91
- package/scripts/cleanup-case-dupes.ts +62 -62
- package/scripts/generate-ai-manifests.ts +107 -107
- package/styles/globals.css +13 -13
- package/styles/xertica/app-overrides/chat.css +61 -61
- package/styles/xertica/app-overrides/scrollbar.css +33 -33
- package/styles/xertica/base.css +71 -71
- package/styles/xertica/integrations/google-maps.css +76 -76
- package/styles/xertica/integrations/sonner.css +73 -73
- package/styles/xertica/theme-map.css +99 -99
- package/styles/xertica/tokens.css +236 -236
- package/templates/.prettierignore +4 -4
- package/templates/.prettierrc +10 -10
- package/templates/CLAUDE.md +180 -180
- package/templates/eslint.config.js +26 -26
- package/templates/guidelines/Guidelines.md +553 -335
- package/templates/package.json +69 -69
- package/templates/postcss.config.js +6 -6
- package/templates/src/app/App.tsx +46 -46
- package/templates/src/app/components/AppLayout.tsx +55 -55
- package/templates/src/app/components/AuthGuard.tsx +82 -82
- package/templates/src/app/context/AuthContext.tsx +108 -108
- package/templates/src/features/assistant/data/mock.ts +21 -12
- package/templates/src/features/assistant/hooks/useAssistantConfig.ts +4 -3
- package/templates/src/features/assistant/index.ts +5 -5
- package/templates/src/features/auth/index.ts +4 -4
- package/templates/src/features/auth/ui/AuthPageShell.tsx +32 -32
- package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
- package/templates/src/features/auth/ui/LoginContent.tsx +90 -90
- package/templates/src/features/auth/ui/ResetPasswordContent.tsx +177 -177
- package/templates/src/features/auth/ui/SocialLoginButtons.tsx +73 -73
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +82 -82
- package/templates/src/features/home/data/mock.ts +35 -35
- package/templates/src/features/home/hooks/useFeatureCards.ts +4 -3
- package/templates/src/features/home/index.ts +11 -11
- package/templates/src/features/home/store/dashboardStore.ts +25 -25
- package/templates/src/features/home/ui/HomeContent.tsx +119 -121
- package/templates/src/features/template/index.ts +5 -5
- package/templates/src/features/template/ui/CrudTemplate.tsx +32 -17
- package/templates/src/features/template/ui/DashboardTemplate.tsx +31 -15
- package/templates/src/features/template/ui/FormTemplate.tsx +21 -21
- package/templates/src/features/template/ui/LoginTemplate.tsx +14 -7
- package/templates/src/features/template/ui/TemplateContent.tsx +403 -288
- package/templates/src/i18n.ts +97 -11
- package/templates/src/locales/en/common.json +21 -0
- package/templates/src/locales/en/components/activityCard.json +10 -0
- package/templates/src/locales/en/components/assistant.json +105 -0
- package/templates/src/locales/en/components/media.json +29 -0
- package/templates/src/locales/en/components/notificationCard.json +5 -0
- package/templates/src/locales/en/components/profileCard.json +8 -0
- package/templates/src/locales/en/components/projectCard.json +10 -0
- package/templates/src/locales/en/components/sidebar.json +14 -0
- package/templates/src/locales/en/components/stats.json +8 -0
- package/templates/src/locales/en/components/team.json +14 -0
- package/templates/src/locales/en/errors.json +9 -0
- package/templates/src/locales/en/languageSelector.json +7 -0
- package/templates/src/locales/en/nav.json +6 -0
- package/templates/src/locales/en/pages/crudTemplate.json +25 -0
- package/templates/src/locales/en/pages/dashboardTemplate.json +20 -0
- package/templates/src/locales/en/pages/formTemplate.json +16 -0
- package/templates/src/locales/en/pages/home.json +7 -0
- package/templates/src/locales/en/pages/login.json +15 -0
- package/templates/src/locales/en/pages/loginTemplate.json +9 -0
- package/templates/src/locales/en/pages/resetPassword.json +18 -0
- package/templates/src/locales/en/pages/templates.json +317 -0
- package/templates/src/locales/en/pages/verifyEmail.json +12 -0
- package/templates/src/locales/en/themeToggle.json +6 -0
- package/templates/src/locales/es/common.json +21 -0
- package/templates/src/locales/es/components/activityCard.json +10 -0
- package/templates/src/locales/es/components/assistant.json +105 -0
- package/templates/src/locales/es/components/media.json +29 -0
- package/templates/src/locales/es/components/notificationCard.json +5 -0
- package/templates/src/locales/es/components/profileCard.json +8 -0
- package/templates/src/locales/es/components/projectCard.json +10 -0
- package/templates/src/locales/es/components/sidebar.json +14 -0
- package/templates/src/locales/es/components/stats.json +8 -0
- package/templates/src/locales/es/components/team.json +14 -0
- package/templates/src/locales/es/errors.json +9 -0
- package/templates/src/locales/es/languageSelector.json +7 -0
- package/templates/src/locales/es/nav.json +6 -0
- package/templates/src/locales/es/pages/crudTemplate.json +25 -0
- package/templates/src/locales/es/pages/dashboardTemplate.json +20 -0
- package/templates/src/locales/es/pages/formTemplate.json +16 -0
- package/templates/src/locales/es/pages/home.json +7 -0
- package/templates/src/locales/es/pages/login.json +15 -0
- package/templates/src/locales/es/pages/loginTemplate.json +9 -0
- package/templates/src/locales/es/pages/resetPassword.json +18 -0
- package/templates/src/locales/es/pages/templates.json +317 -0
- package/templates/src/locales/es/pages/verifyEmail.json +12 -0
- package/templates/src/locales/es/themeToggle.json +6 -0
- package/templates/src/locales/pt-BR/common.json +21 -0
- package/templates/src/locales/pt-BR/components/activityCard.json +10 -0
- package/templates/src/locales/pt-BR/components/assistant.json +105 -0
- package/templates/src/locales/pt-BR/components/media.json +29 -0
- package/templates/src/locales/pt-BR/components/notificationCard.json +5 -0
- package/templates/src/locales/pt-BR/components/profileCard.json +8 -0
- package/templates/src/locales/pt-BR/components/projectCard.json +10 -0
- package/templates/src/locales/pt-BR/components/sidebar.json +14 -0
- package/templates/src/locales/pt-BR/components/stats.json +8 -0
- package/templates/src/locales/pt-BR/components/team.json +14 -0
- package/templates/src/locales/pt-BR/errors.json +9 -0
- package/templates/src/locales/pt-BR/languageSelector.json +7 -0
- package/templates/src/locales/pt-BR/nav.json +6 -0
- package/templates/src/locales/pt-BR/pages/crudTemplate.json +25 -0
- package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +20 -0
- package/templates/src/locales/pt-BR/pages/formTemplate.json +16 -0
- package/templates/src/locales/pt-BR/pages/home.json +7 -0
- package/templates/src/locales/pt-BR/pages/login.json +15 -0
- package/templates/src/locales/pt-BR/pages/loginTemplate.json +9 -0
- package/templates/src/locales/pt-BR/pages/resetPassword.json +18 -0
- package/templates/src/locales/pt-BR/pages/templates.json +317 -0
- package/templates/src/locales/pt-BR/pages/verifyEmail.json +12 -0
- package/templates/src/locales/pt-BR/themeToggle.json +6 -0
- package/templates/src/main.tsx +11 -11
- package/templates/src/pages/AssistantPage.tsx +463 -463
- package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
- package/templates/src/pages/HomePage.tsx +49 -50
- package/templates/src/pages/LoginPage.tsx +10 -10
- package/templates/src/pages/ResetPasswordPage.tsx +6 -6
- package/templates/src/pages/TemplatePage.tsx +28 -28
- package/templates/src/pages/VerifyEmailPage.tsx +6 -6
- package/templates/src/shared/config/navigation.ts +19 -19
- package/templates/src/shared/error-boundary.tsx +154 -154
- package/templates/src/shared/error-fallbacks.tsx +226 -226
- package/templates/src/shared/lib/auth.ts +20 -20
- package/templates/src/shared/types/auth.ts +3 -3
- package/templates/src/styles/index.css +95 -95
- package/templates/src/styles/xertica/tokens.css +236 -236
- package/templates/tsconfig.json +25 -25
- package/templates/tsconfig.node.json +12 -12
- package/templates/vite-env.d.ts +1 -1
- package/templates/vite.config.ts +51 -21
- package/utils/color-utils.ts +72 -72
- package/utils/demo-responses.test.ts +10 -10
- package/utils/demo-responses.ts +151 -151
- package/utils/gemini.test.ts +25 -25
- package/utils/gemini.ts +155 -155
- package/dist/AssistantChart-DIpshm3i.js +0 -4784
- package/dist/AssistantChart-zjsy2GaZ.cjs +0 -4810
- package/dist/AudioPlayer-B1lt5cPl.cjs +0 -989
- package/dist/AudioPlayer-BZ7bibzU.cjs +0 -982
- package/dist/AudioPlayer-C12BjQBV.cjs +0 -997
- package/dist/AudioPlayer-CFeV8t-5.cjs +0 -936
- package/dist/AudioPlayer-CGRUtUdN.js +0 -937
- package/dist/AudioPlayer-DMcG_c7L.js +0 -990
- package/dist/AudioPlayer-DcFKRJE_.js +0 -998
- package/dist/AudioPlayer-e8LfNoqO.js +0 -983
- package/dist/CodeBlock-BeSt1h5P.js +0 -2078
- package/dist/CodeBlock-BgfYL_rD.cjs +0 -2094
- package/dist/CodeBlock-BlcqlA9M.cjs +0 -2094
- package/dist/CodeBlock-Bnmeu5ez.cjs +0 -2094
- package/dist/CodeBlock-BtfPlbAI.js +0 -2078
- package/dist/CodeBlock-CIySIuYr.js +0 -2078
- package/dist/CodeBlock-CuPtUM-7.cjs +0 -2094
- package/dist/CodeBlock-D6ffWXgc.js +0 -2078
- package/dist/CodeBlock-D8dcwbit.cjs +0 -2094
- package/dist/CodeBlock-DMZrFnlw.cjs +0 -2094
- package/dist/CodeBlock-DlBehYN8.js +0 -2078
- package/dist/CodeBlock-DvKWbSnE.cjs +0 -2094
- package/dist/CodeBlock-DwMCfkFY.js +0 -2078
- package/dist/CodeBlock-Dy6CNYyj.js +0 -2078
- package/dist/CodeBlock-U1pPOQI7.cjs +0 -2094
- package/dist/CodeBlock-f_GpNhEB.js +0 -2078
- package/dist/CodeBlock-oB6u8nI1.js +0 -2078
- package/dist/CodeBlock-tZC31B73.cjs +0 -2094
- package/dist/FeatureCard-CxC-7C-C.cjs +0 -300
- package/dist/ImageWithFallback-CGtidP6B.cjs +0 -4542
- package/dist/ImageWithFallback-lsg3pdFg.js +0 -4508
- package/dist/LayoutContext-BAql6ZRY.js +0 -97
- package/dist/LayoutContext-BvK-ggDa.cjs +0 -96
- package/dist/ThemeContext-BoH4NLfN.js +0 -734
- package/dist/ThemeContext-r69W20Xg.cjs +0 -733
- package/dist/VerifyEmailPage-COiyNl1y.js +0 -2825
- package/dist/VerifyEmailPage-CqKsR2v8.js +0 -2827
- package/dist/XerticaOrbe-KL1RBHzw.cjs +0 -1354
- package/dist/XerticaOrbe-zwS1p2a8.js +0 -1355
- package/dist/XerticaProvider-6btlAlzc.js +0 -17
- package/dist/XerticaProvider-BNoNOxQ5.cjs +0 -16
- package/dist/XerticaProvider-BlY2limY.cjs +0 -38
- package/dist/XerticaProvider-DDuiIcKo.js +0 -39
- package/dist/XerticaProvider-cI9hSs27.cjs +0 -38
- package/dist/XerticaProvider-hSwhNQex.js +0 -39
- package/dist/breadcrumb-CqJ7bHY5.js +0 -161
- package/dist/breadcrumb-m9Hb2_XN.cjs +0 -177
- package/dist/components/assistant/xertica-assistant/hooks/index.d.ts +0 -6
- package/dist/components/assistant/xertica-assistant/hooks/use-assistant-conversations.d.ts +0 -21
- package/dist/components/assistant/xertica-assistant/hooks/use-assistant-messages.d.ts +0 -49
- package/dist/components/assistant/xertica-assistant/hooks/use-assistant-suggestions.d.ts +0 -16
- package/dist/components/blocks/audio-player/AudioPlayer.d.ts +0 -35
- package/dist/components/blocks/audio-player/index.d.ts +0 -1
- package/dist/components/blocks/document-editor/DocumentEditor.d.ts +0 -26
- package/dist/components/blocks/document-editor/index.d.ts +0 -1
- package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +0 -41
- package/dist/components/blocks/podcast-player/index.d.ts +0 -1
- package/dist/components/ui/chart/parts/chart-dashboard.d.ts +0 -113
- package/dist/components/ui/chart/parts/chart-metric.d.ts +0 -118
- package/dist/components/ui/chart/parts/chart-primitives.d.ts +0 -101
- package/dist/components/ui/chart/parts/chart-shared.d.ts +0 -20
- package/dist/components/ui/chart/parts/chart-utils.d.ts +0 -12
- package/dist/components/ui/chart/parts/index.d.ts +0 -5
- package/dist/dropdown-menu-BDB5CmQs.cjs +0 -247
- package/dist/dropdown-menu-DQidbKBD.js +0 -231
- package/dist/google-maps-loader-BFWp6VPd.js +0 -287
- package/dist/google-maps-loader-eS3uQ5TA.cjs +0 -287
- package/dist/header-Cgy6vYPk.cjs +0 -731
- package/dist/header-DRlT4jgI.js +0 -715
- package/dist/header-Dux00SI4.cjs +0 -731
- package/dist/header-EkGKXPsD.js +0 -715
- package/dist/header-WfEywpyc.cjs +0 -731
- package/dist/header-tifNQn2U.js +0 -715
- package/dist/index-BhapVLVj.js +0 -8
- package/dist/index-D6fxYEY8.cjs +0 -7
- package/dist/index-DW5tYe26.js +0 -8
- package/dist/input-2R4loU86.js +0 -127
- package/dist/input-DWANSKGb.cjs +0 -145
- package/dist/progress-DPtzoVV8.js +0 -175
- package/dist/progress-EeaoqqUs.cjs +0 -191
- package/dist/rich-text-editor-0mraWT5y.cjs +0 -2376
- package/dist/rich-text-editor-B6jMRLzk.cjs +0 -1939
- package/dist/rich-text-editor-B8_oYcIR.js +0 -1730
- package/dist/rich-text-editor-B9UbSXNb.js +0 -1203
- package/dist/rich-text-editor-BYuRBNBU.js +0 -2373
- package/dist/rich-text-editor-Bb9pySTs.cjs +0 -2374
- package/dist/rich-text-editor-BcL6L3cm.cjs +0 -2374
- package/dist/rich-text-editor-BoVZYtTs.cjs +0 -2391
- package/dist/rich-text-editor-CMgSN_w2.js +0 -1189
- package/dist/rich-text-editor-CPV1lEPH.cjs +0 -1748
- package/dist/rich-text-editor-CoKqbCtu.cjs +0 -1799
- package/dist/rich-text-editor-Cw56T_mB.js +0 -2356
- package/dist/rich-text-editor-Cyt8qs2b.js +0 -1921
- package/dist/rich-text-editor-D6H84OcX.cjs +0 -1220
- package/dist/rich-text-editor-D76gD-QI.js +0 -2328
- package/dist/rich-text-editor-DKkokOnA.js +0 -1781
- package/dist/rich-text-editor-DNsdpN64.cjs +0 -2359
- package/dist/rich-text-editor-DfG8bCyY.js +0 -2358
- package/dist/rich-text-editor-Dxjw31Z4.js +0 -2341
- package/dist/rich-text-editor-DzP0Epmb.js +0 -2356
- package/dist/rich-text-editor-lyYE2ZG5.cjs +0 -1207
- package/dist/rich-text-editor-skplNlBM.cjs +0 -2345
- package/dist/select-Bkbr0f-Z.cjs +0 -162
- package/dist/select-CvIVdX2n.js +0 -145
- package/dist/sidebar-Djn5syhi.cjs +0 -786
- package/dist/sidebar-_rT7rBMk.js +0 -787
- package/dist/slider-Bc5Hd0y1.js +0 -56
- package/dist/slider-N7hFFj6X.cjs +0 -73
- package/dist/tooltip-Ded96neP.cjs +0 -137
- package/dist/tooltip-HDOoD2-0.js +0 -120
- package/dist/use-audio-player-BkmEmj8Q.js +0 -185
- package/dist/use-audio-player-CLFTWFW1.cjs +0 -184
- package/dist/use-file-upload-BcjEo2S5.js +0 -404
- package/dist/use-file-upload-CRJR68Tj.cjs +0 -403
- package/dist/use-mobile-B0hNy_Y6.cjs +0 -4303
- package/dist/use-mobile-Bbd51ASU.cjs +0 -4392
- package/dist/use-mobile-Bk6CX-TC.js +0 -4359
- package/dist/use-mobile-BvYdisLP.js +0 -4202
- package/dist/use-mobile-BzuxjzNX.cjs +0 -4392
- package/dist/use-mobile-CKb5pqTs.js +0 -4269
- package/dist/use-mobile-CYuAuGDl.js +0 -4202
- package/dist/use-mobile-CaENcqm-.js +0 -4508
- package/dist/use-mobile-CbrYgJGJ.js +0 -4203
- package/dist/use-mobile-DMOvImGQ.cjs +0 -4542
- package/dist/use-mobile-DRB3BQgD.cjs +0 -4235
- package/dist/use-mobile-DZvv7QMR.js +0 -4359
- package/dist/use-mobile-DdI_TXam.cjs +0 -4235
- package/dist/use-mobile-DlceKf8a.js +0 -4359
- package/dist/use-mobile-DsOnow1o.cjs +0 -4236
- package/dist/use-mobile-Kcj6jSnK.cjs +0 -4392
- package/dist/use-mobile-bnKcua_i.js +0 -4202
- package/dist/use-mobile-ncXBeE2z.cjs +0 -4235
- package/dist/use-rich-text-editor-DjiddBGv.js +0 -282
- package/dist/use-rich-text-editor-lpeswbCs.cjs +0 -281
- package/templates/src/locales/en.json +0 -79
- package/templates/src/locales/es.json +0 -79
- package/templates/src/locales/pt-BR.json +0 -79
- package/dist/{rich-text-editor-DgF8s7xW.js → rich-text-editor-BmsjY03B.js} +26 -26
- package/dist/{rich-text-editor-mWoaSCE4.cjs → rich-text-editor-GS2kpTAK.cjs} +26 -26
|
@@ -1,2094 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const React = require("react");
|
|
4
|
-
const framerMotion = require("framer-motion");
|
|
5
|
-
const lucideReact = require("lucide-react");
|
|
6
|
-
const RechartsPrimitive = require("recharts");
|
|
7
|
-
const richTextEditor = require("./rich-text-editor-Bb9pySTs.cjs");
|
|
8
|
-
const dropdownMenu = require("./dropdown-menu-BDB5CmQs.cjs");
|
|
9
|
-
const tooltip = require("./tooltip-Ded96neP.cjs");
|
|
10
|
-
const input = require("./input-DWANSKGb.cjs");
|
|
11
|
-
const sonner = require("sonner");
|
|
12
|
-
const XerticaOrbe = require("./XerticaOrbe-KL1RBHzw.cjs");
|
|
13
|
-
const TooltipPrimitive = require("@radix-ui/react-tooltip");
|
|
14
|
-
const reactSyntaxHighlighter = require("react-syntax-highlighter");
|
|
15
|
-
function _interopNamespaceDefault(e) {
|
|
16
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
17
|
-
if (e) {
|
|
18
|
-
for (const k in e) {
|
|
19
|
-
if (k !== "default") {
|
|
20
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: () => e[k]
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
n.default = e;
|
|
29
|
-
return Object.freeze(n);
|
|
30
|
-
}
|
|
31
|
-
const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
|
|
32
|
-
function MarkdownMessage({ content, className = "" }) {
|
|
33
|
-
const convertMarkdownToHtml = (markdown) => {
|
|
34
|
-
let html = markdown;
|
|
35
|
-
html = html.replace(/</g, "<").replace(/>/g, ">");
|
|
36
|
-
html = html.replace(/^### (.*$)/gim, '<h3 class="font-medium text-sm mt-2 mb-1 break-words">$1</h3>');
|
|
37
|
-
html = html.replace(/^## (.*$)/gim, '<h2 class="font-medium text-base mt-3 mb-1.5 break-words">$1</h2>');
|
|
38
|
-
html = html.replace(/^# (.*$)/gim, '<h1 class="font-medium text-lg mt-3 mb-2 break-words">$1</h1>');
|
|
39
|
-
html = html.replace(/\*\*(.*?)\*\*/g, '<strong class="font-medium">$1</strong>');
|
|
40
|
-
html = html.replace(/\*(.*?)\*/g, '<em class="italic">$1</em>');
|
|
41
|
-
html = html.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" class="text-[var(--chart-4)] hover:underline break-all" target="_blank" rel="noopener noreferrer">$1</a>');
|
|
42
|
-
html = html.replace(/`([^`]+)`/g, '<code class="px-1.5 py-0.5 rounded bg-muted text-xs font-mono break-all inline-block max-w-full">$1</code>');
|
|
43
|
-
html = html.replace(/((?:^[•\-] .*$(?:\n|$))+)/gim, (match) => {
|
|
44
|
-
const items = match.trim().split("\n").map(
|
|
45
|
-
(item) => `<li class="ml-4 mb-1 list-disc break-words">${item.replace(/^[•\-]\s+/, "")}</li>`
|
|
46
|
-
).join("");
|
|
47
|
-
return `<ul class="list-disc my-2">${items}</ul>`;
|
|
48
|
-
});
|
|
49
|
-
html = html.replace(/((?:^\d+\. .*$(?:\n|$))+)/gim, (match) => {
|
|
50
|
-
const items = match.trim().split("\n").map(
|
|
51
|
-
(item) => `<li class="ml-4 mb-1 list-decimal break-words">${item.replace(/^\d+\.\s+/, "")}</li>`
|
|
52
|
-
).join("");
|
|
53
|
-
return `<ol class="list-decimal my-2">${items}</ol>`;
|
|
54
|
-
});
|
|
55
|
-
html = html.replace(/\n\n/g, '</p><p class="mb-2 break-words">');
|
|
56
|
-
html = html.replace(/\n/g, "<br/>");
|
|
57
|
-
html = '<p class="mb-2 break-words">' + html + "</p>";
|
|
58
|
-
html = html.replace(/<p[^>]*>\s*<\/p>/g, "");
|
|
59
|
-
return html;
|
|
60
|
-
};
|
|
61
|
-
const htmlContent = convertMarkdownToHtml(content);
|
|
62
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
className: `text-sm leading-relaxed break-words overflow-wrap-anywhere max-w-full ${className}`,
|
|
66
|
-
dangerouslySetInnerHTML: { __html: htmlContent }
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
function FormattedDocument({ content, maxPreviewLength = 500, className = "" }) {
|
|
71
|
-
const [isExpanded, setIsExpanded] = React.useState(false);
|
|
72
|
-
const convertMarkdownToHtml = (markdown) => {
|
|
73
|
-
let html = markdown;
|
|
74
|
-
html = html.replace(/^### (.*$)/gim, '<h3 class="text-base font-medium mt-2 mb-1 text-foreground">$1</h3>');
|
|
75
|
-
html = html.replace(/^## (.*$)/gim, '<h2 class="text-lg font-medium mt-2 mb-1 text-foreground">$1</h2>');
|
|
76
|
-
html = html.replace(/^# (.*$)/gim, '<h1 class="text-xl font-medium mt-3 mb-2 text-foreground">$1</h1>');
|
|
77
|
-
html = html.replace(/\*\*(.*?)\*\*/g, '<strong class="font-medium text-foreground">$1</strong>');
|
|
78
|
-
html = html.replace(/\*(.*?)\*/g, '<em class="italic">$1</em>');
|
|
79
|
-
html = html.replace(/^[-*+] \[ \] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-0.5"><input type="checkbox" disabled class="rounded w-3.5 h-3.5 accent-primary" aria-label="$1" /> <span class="text-sm">$1</span></div>');
|
|
80
|
-
html = html.replace(/^[-*+] \[x\] (.*$)/gim, '<div class="flex items-center gap-2 ml-4 my-0.5"><input type="checkbox" checked disabled class="rounded w-3.5 h-3.5 accent-primary" aria-label="$1" /> <span class="text-sm">$1</span></div>');
|
|
81
|
-
html = html.replace(/((?:^[-*+] .*$(?:\n|$))+)/gim, (match) => {
|
|
82
|
-
const items = match.trim().split("\n").map(
|
|
83
|
-
(item) => `<li class="ml-6 my-0.5 list-disc">${item.replace(/^[-*+] /i, "")}</li>`
|
|
84
|
-
).join("");
|
|
85
|
-
return `<ul class="list-disc my-2">${items}</ul>`;
|
|
86
|
-
});
|
|
87
|
-
html = html.replace(/((?:^\d+\. .*$(?:\n|$))+)/gim, (match) => {
|
|
88
|
-
const items = match.trim().split("\n").map(
|
|
89
|
-
(item) => `<li class="ml-6 my-0.5 list-decimal">${item.replace(/^\d+\. /i, "")}</li>`
|
|
90
|
-
).join("");
|
|
91
|
-
return `<ol class="list-decimal my-2">${items}</ol>`;
|
|
92
|
-
});
|
|
93
|
-
html = html.replace(/^---$/gim, '<hr class="my-2 border-border" />');
|
|
94
|
-
html = html.replace(/\n\n+/g, '</p><p class="my-0.5">');
|
|
95
|
-
html = html.replace(/\n/g, " ");
|
|
96
|
-
html = '<p class="my-0.5">' + html + "</p>";
|
|
97
|
-
return html;
|
|
98
|
-
};
|
|
99
|
-
const htmlContent = convertMarkdownToHtml(content);
|
|
100
|
-
const isLong = content.length > maxPreviewLength;
|
|
101
|
-
const displayContent = !isLong || isExpanded ? htmlContent : convertMarkdownToHtml(content.substring(0, maxPreviewLength) + "...");
|
|
102
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
103
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
-
"div",
|
|
105
|
-
{
|
|
106
|
-
className: "max-w-none text-sm text-foreground leading-relaxed break-words overflow-hidden",
|
|
107
|
-
dangerouslySetInnerHTML: { __html: displayContent }
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
isLong && /* @__PURE__ */ jsxRuntime.jsx(
|
|
111
|
-
tooltip.Button,
|
|
112
|
-
{
|
|
113
|
-
variant: "ghost",
|
|
114
|
-
size: "sm",
|
|
115
|
-
onClick: () => setIsExpanded(!isExpanded),
|
|
116
|
-
className: "mt-2 w-full text-xs hover:bg-accent text-muted-foreground",
|
|
117
|
-
children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
118
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "w-3 h-3 mr-1" }),
|
|
119
|
-
"See less"
|
|
120
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
121
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-3 h-3 mr-1" }),
|
|
122
|
-
"See more"
|
|
123
|
-
] })
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
] });
|
|
127
|
-
}
|
|
128
|
-
function ModernChatInput({
|
|
129
|
-
value,
|
|
130
|
-
onChange,
|
|
131
|
-
onSubmit,
|
|
132
|
-
placeholder = "Mande uma mensagem para o Xertica",
|
|
133
|
-
disabled = false,
|
|
134
|
-
onFileUpload,
|
|
135
|
-
onAudioUpload,
|
|
136
|
-
onVoiceRecording,
|
|
137
|
-
isFullPage = false,
|
|
138
|
-
enableAudioInput = true,
|
|
139
|
-
enableFileAttachment = true,
|
|
140
|
-
enableDocumentCreation = true,
|
|
141
|
-
enablePodcastGeneration = true,
|
|
142
|
-
enableSearch = true
|
|
143
|
-
}) {
|
|
144
|
-
const textareaRef = React.useRef(null);
|
|
145
|
-
const [isFocused, setIsFocused] = React.useState(false);
|
|
146
|
-
const [textareaHeight, setTextareaHeight] = React.useState(20);
|
|
147
|
-
const [selectedAction, setSelectedAction] = React.useState(null);
|
|
148
|
-
const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);
|
|
149
|
-
const [isRecording, setIsRecording] = React.useState(false);
|
|
150
|
-
const [recordingTime, setRecordingTime] = React.useState(0);
|
|
151
|
-
const recordingIntervalRef = React.useRef(null);
|
|
152
|
-
const adjustHeight = () => {
|
|
153
|
-
const textarea = textareaRef.current;
|
|
154
|
-
if (textarea) {
|
|
155
|
-
textarea.style.height = "20px";
|
|
156
|
-
const scrollHeight = textarea.scrollHeight;
|
|
157
|
-
const newHeight = Math.min(Math.max(scrollHeight, 20), 100);
|
|
158
|
-
setTextareaHeight(newHeight);
|
|
159
|
-
textarea.style.height = newHeight + "px";
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
React.useEffect(() => {
|
|
163
|
-
const textarea = textareaRef.current;
|
|
164
|
-
if (textarea) {
|
|
165
|
-
textarea.style.height = "20px";
|
|
166
|
-
setTextareaHeight(20);
|
|
167
|
-
if (value) {
|
|
168
|
-
setTimeout(adjustHeight, 0);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}, []);
|
|
172
|
-
React.useEffect(() => {
|
|
173
|
-
if (value === "") {
|
|
174
|
-
const textarea = textareaRef.current;
|
|
175
|
-
if (textarea) {
|
|
176
|
-
textarea.style.height = "20px";
|
|
177
|
-
setTextareaHeight(20);
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
const timeoutId = setTimeout(adjustHeight, 0);
|
|
181
|
-
return () => clearTimeout(timeoutId);
|
|
182
|
-
}
|
|
183
|
-
}, [value]);
|
|
184
|
-
const handleKeyDown = (e) => {
|
|
185
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
186
|
-
e.preventDefault();
|
|
187
|
-
if (value.trim() && !disabled) {
|
|
188
|
-
onSubmit(selectedAction);
|
|
189
|
-
setSelectedAction(null);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
const handleActionSelect = (action) => {
|
|
194
|
-
setSelectedAction(action);
|
|
195
|
-
setIsPopoverOpen(false);
|
|
196
|
-
};
|
|
197
|
-
const handleRemoveAction = () => {
|
|
198
|
-
setSelectedAction(null);
|
|
199
|
-
};
|
|
200
|
-
const handleVoiceRecording = () => {
|
|
201
|
-
if (isRecording) {
|
|
202
|
-
if (recordingIntervalRef.current) {
|
|
203
|
-
clearInterval(recordingIntervalRef.current);
|
|
204
|
-
recordingIntervalRef.current = null;
|
|
205
|
-
}
|
|
206
|
-
const transcricoes = [
|
|
207
|
-
"Como posso analisar os dados de vendas do último trimestre?",
|
|
208
|
-
"Me ajude a criar um relatório de performance do time",
|
|
209
|
-
"Quais são as principais tendências do mercado atual?",
|
|
210
|
-
"Preciso de insights sobre a satisfação dos clientes",
|
|
211
|
-
"Como posso melhorar a produtividade da minha equipe?",
|
|
212
|
-
"Me mostre um resumo das métricas mais importantes",
|
|
213
|
-
"Crie um documento sobre técnicas de marketing digital",
|
|
214
|
-
"Analise os dados de engajamento das redes sociais"
|
|
215
|
-
];
|
|
216
|
-
const transcricaoAleatoria = transcricoes[Math.floor(Math.random() * transcricoes.length)];
|
|
217
|
-
if (onVoiceRecording) {
|
|
218
|
-
onVoiceRecording(transcricaoAleatoria);
|
|
219
|
-
}
|
|
220
|
-
setIsRecording(false);
|
|
221
|
-
setRecordingTime(0);
|
|
222
|
-
} else {
|
|
223
|
-
setIsRecording(true);
|
|
224
|
-
setRecordingTime(0);
|
|
225
|
-
sonner.toast.info("Gravação iniciada", {
|
|
226
|
-
description: "Fale sua dúvida ou comando. A gravação parará automaticamente em 60s.",
|
|
227
|
-
duration: 3e3
|
|
228
|
-
});
|
|
229
|
-
recordingIntervalRef.current = setInterval(() => {
|
|
230
|
-
setRecordingTime((prev) => prev + 1);
|
|
231
|
-
}, 1e3);
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
React.useEffect(() => {
|
|
235
|
-
if (recordingTime >= 60 && isRecording) {
|
|
236
|
-
handleVoiceRecording();
|
|
237
|
-
}
|
|
238
|
-
}, [recordingTime, isRecording]);
|
|
239
|
-
React.useEffect(() => {
|
|
240
|
-
return () => {
|
|
241
|
-
if (recordingIntervalRef.current) {
|
|
242
|
-
clearInterval(recordingIntervalRef.current);
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
}, []);
|
|
246
|
-
const getActionInfo = (action) => {
|
|
247
|
-
switch (action) {
|
|
248
|
-
case "document":
|
|
249
|
-
return { label: "Criar documento", icon: lucideReact.FileText, color: "bg-[var(--chart-4)]" };
|
|
250
|
-
case "podcast":
|
|
251
|
-
return { label: "Gerar podcast", icon: lucideReact.Radio, color: "bg-[var(--chart-1)]" };
|
|
252
|
-
case "search":
|
|
253
|
-
return { label: "Pesquisar", icon: lucideReact.Search, color: "bg-[var(--chart-2)]" };
|
|
254
|
-
default:
|
|
255
|
-
return null;
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
const handleFocus = () => setIsFocused(true);
|
|
259
|
-
const handleBlur = () => setIsFocused(false);
|
|
260
|
-
const hasContent = value.trim().length > 0;
|
|
261
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `p-4 ${isFullPage ? "mx-auto w-full max-w-6xl" : ""}`, children: [
|
|
262
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isRecording && /* @__PURE__ */ jsxRuntime.jsx(
|
|
263
|
-
framerMotion.motion.div,
|
|
264
|
-
{
|
|
265
|
-
initial: { opacity: 0, y: 10 },
|
|
266
|
-
animate: { opacity: 1, y: 0 },
|
|
267
|
-
exit: { opacity: 0, y: 10 },
|
|
268
|
-
className: "mb-3 p-4 bg-destructive/10 border border-destructive/30 rounded-[var(--radius-card)]",
|
|
269
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
270
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
271
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
272
|
-
framerMotion.motion.div,
|
|
273
|
-
{
|
|
274
|
-
animate: {
|
|
275
|
-
scale: [1, 1.2, 1],
|
|
276
|
-
opacity: [1, 0.7, 1]
|
|
277
|
-
},
|
|
278
|
-
transition: {
|
|
279
|
-
duration: 1.5,
|
|
280
|
-
repeat: Infinity,
|
|
281
|
-
ease: "easeInOut"
|
|
282
|
-
},
|
|
283
|
-
className: "w-3 h-3 bg-destructive rounded-full"
|
|
284
|
-
}
|
|
285
|
-
),
|
|
286
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: [0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
287
|
-
framerMotion.motion.div,
|
|
288
|
-
{
|
|
289
|
-
animate: {
|
|
290
|
-
height: ["8px", "20px", "8px"]
|
|
291
|
-
},
|
|
292
|
-
transition: {
|
|
293
|
-
duration: 0.8,
|
|
294
|
-
repeat: Infinity,
|
|
295
|
-
ease: "easeInOut",
|
|
296
|
-
delay: i * 0.1
|
|
297
|
-
},
|
|
298
|
-
className: "w-1 bg-destructive rounded-full h-2"
|
|
299
|
-
},
|
|
300
|
-
i
|
|
301
|
-
)) }),
|
|
302
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-destructive", children: "Gravando áudio" })
|
|
303
|
-
] }),
|
|
304
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
305
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm text-destructive font-mono tabular-nums", children: [
|
|
306
|
-
Math.floor(recordingTime / 60),
|
|
307
|
-
":",
|
|
308
|
-
(recordingTime % 60).toString().padStart(2, "0")
|
|
309
|
-
] }),
|
|
310
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
311
|
-
tooltip.Button,
|
|
312
|
-
{
|
|
313
|
-
onClick: handleVoiceRecording,
|
|
314
|
-
size: "sm",
|
|
315
|
-
variant: "outline",
|
|
316
|
-
className: "h-7 px-3 text-xs border-destructive/30 text-destructive hover:bg-destructive/10 rounded-[var(--radius-button)]",
|
|
317
|
-
children: "Parar gravação"
|
|
318
|
-
}
|
|
319
|
-
)
|
|
320
|
-
] })
|
|
321
|
-
] })
|
|
322
|
-
}
|
|
323
|
-
) }),
|
|
324
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
325
|
-
framerMotion.motion.div,
|
|
326
|
-
{
|
|
327
|
-
className: `relative bg-card rounded-[var(--radius)] border shadow-sm transition-all duration-300 ${isFocused || hasContent ? "border-primary shadow-lg shadow-primary/10" : "border-border"}`,
|
|
328
|
-
initial: false,
|
|
329
|
-
animate: {
|
|
330
|
-
scale: isFocused ? 1.01 : 1
|
|
331
|
-
},
|
|
332
|
-
transition: { duration: 0.2, ease: "easeOut" },
|
|
333
|
-
children: [
|
|
334
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 pt-[14px] pr-[10px] pb-[8px] pl-[10px] rounded-[var(--radius)]", children: [
|
|
335
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: selectedAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
336
|
-
framerMotion.motion.div,
|
|
337
|
-
{
|
|
338
|
-
initial: { opacity: 0, y: -10, height: 0 },
|
|
339
|
-
animate: { opacity: 1, y: 0, height: "auto" },
|
|
340
|
-
exit: { opacity: 0, y: -10, height: 0 },
|
|
341
|
-
transition: { duration: 0.2 },
|
|
342
|
-
className: "mb-2",
|
|
343
|
-
children: (() => {
|
|
344
|
-
const actionInfo = getActionInfo(selectedAction);
|
|
345
|
-
if (!actionInfo) return null;
|
|
346
|
-
const Icon = actionInfo.icon;
|
|
347
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `inline-flex items-center gap-2 px-3 py-1.5 rounded-full ${actionInfo.color} text-white text-xs font-medium shadow-sm`, children: [
|
|
348
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "w-3.5 h-3.5" }),
|
|
349
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: actionInfo.label }),
|
|
350
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
351
|
-
"button",
|
|
352
|
-
{
|
|
353
|
-
onClick: handleRemoveAction,
|
|
354
|
-
className: "ml-1 hover:bg-white/20 rounded-full p-0.5 transition-colors",
|
|
355
|
-
"aria-label": "Remover ação",
|
|
356
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-3 h-3" })
|
|
357
|
-
}
|
|
358
|
-
)
|
|
359
|
-
] });
|
|
360
|
-
})()
|
|
361
|
-
}
|
|
362
|
-
) }),
|
|
363
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
364
|
-
"textarea",
|
|
365
|
-
{
|
|
366
|
-
ref: textareaRef,
|
|
367
|
-
value,
|
|
368
|
-
onChange: (e) => onChange(e.target.value),
|
|
369
|
-
onKeyDown: handleKeyDown,
|
|
370
|
-
onFocus: handleFocus,
|
|
371
|
-
onBlur: handleBlur,
|
|
372
|
-
placeholder,
|
|
373
|
-
"aria-label": placeholder || "Mensagem para o Xertica",
|
|
374
|
-
disabled,
|
|
375
|
-
className: "w-full bg-transparent border-0 outline-none resize-none text-foreground placeholder-muted-foreground text-sm leading-5 min-h-[20px] max-h-[100px] overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent",
|
|
376
|
-
style: {
|
|
377
|
-
height: `${textareaHeight}px`,
|
|
378
|
-
minHeight: "20px",
|
|
379
|
-
maxHeight: "100px"
|
|
380
|
-
},
|
|
381
|
-
rows: 1
|
|
382
|
-
}
|
|
383
|
-
) }),
|
|
384
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
385
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
386
|
-
(enableDocumentCreation || enablePodcastGeneration || enableSearch) && /* @__PURE__ */ jsxRuntime.jsxs(input.Popover, { open: isPopoverOpen, onOpenChange: setIsPopoverOpen, children: [
|
|
387
|
-
/* @__PURE__ */ jsxRuntime.jsx(input.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
388
|
-
tooltip.Button,
|
|
389
|
-
{
|
|
390
|
-
variant: "ghost",
|
|
391
|
-
size: "sm",
|
|
392
|
-
className: "h-8 w-8 p-0 rounded-full text-muted-foreground hover:bg-accent hover:text-foreground transition-all duration-200",
|
|
393
|
-
"aria-label": "Ver ações",
|
|
394
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
395
|
-
framerMotion.motion.div,
|
|
396
|
-
{
|
|
397
|
-
whileHover: { scale: 1.05 },
|
|
398
|
-
whileTap: { scale: 0.95 },
|
|
399
|
-
className: "flex items-center justify-center w-full h-full",
|
|
400
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "w-4 h-4" })
|
|
401
|
-
}
|
|
402
|
-
)
|
|
403
|
-
}
|
|
404
|
-
) }),
|
|
405
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
406
|
-
input.PopoverContent,
|
|
407
|
-
{
|
|
408
|
-
className: "w-56 p-2",
|
|
409
|
-
align: "start",
|
|
410
|
-
side: "top",
|
|
411
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
412
|
-
enableDocumentCreation && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
413
|
-
"button",
|
|
414
|
-
{
|
|
415
|
-
onClick: () => handleActionSelect("document"),
|
|
416
|
-
className: "w-full flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-accent transition-colors text-left group",
|
|
417
|
-
children: [
|
|
418
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full bg-[var(--chart-4)]/20 flex items-center justify-center group-hover:bg-[var(--chart-4)] transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "w-4 h-4 text-[var(--chart-4)] group-hover:text-white" }) }),
|
|
419
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
420
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "Criar documento" }),
|
|
421
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: "Gere um documento completo" })
|
|
422
|
-
] })
|
|
423
|
-
]
|
|
424
|
-
}
|
|
425
|
-
),
|
|
426
|
-
enablePodcastGeneration && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
427
|
-
"button",
|
|
428
|
-
{
|
|
429
|
-
onClick: () => handleActionSelect("podcast"),
|
|
430
|
-
className: "w-full flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-accent transition-colors text-left group",
|
|
431
|
-
children: [
|
|
432
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full bg-[var(--chart-1)]/20 flex items-center justify-center group-hover:bg-[var(--chart-1)] transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Radio, { className: "w-4 h-4 text-[var(--chart-1)] group-hover:text-white" }) }),
|
|
433
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
434
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "Gerar podcast" }),
|
|
435
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: "Crie um podcast de áudio" })
|
|
436
|
-
] })
|
|
437
|
-
]
|
|
438
|
-
}
|
|
439
|
-
),
|
|
440
|
-
enableSearch && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
441
|
-
"button",
|
|
442
|
-
{
|
|
443
|
-
onClick: () => handleActionSelect("search"),
|
|
444
|
-
className: "w-full flex items-center gap-3 px-3 py-2.5 rounded-lg hover:bg-accent transition-colors text-left group",
|
|
445
|
-
children: [
|
|
446
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full bg-[var(--chart-2)]/20 flex items-center justify-center group-hover:bg-[var(--chart-2)] transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-4 h-4 text-[var(--chart-2)] group-hover:text-white" }) }),
|
|
447
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
448
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "Pesquisar" }),
|
|
449
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs text-muted-foreground", children: "Busque por informações relevantes" })
|
|
450
|
-
] })
|
|
451
|
-
]
|
|
452
|
-
}
|
|
453
|
-
)
|
|
454
|
-
] })
|
|
455
|
-
}
|
|
456
|
-
)
|
|
457
|
-
] }),
|
|
458
|
-
enableFileAttachment && /* @__PURE__ */ jsxRuntime.jsx(
|
|
459
|
-
framerMotion.motion.div,
|
|
460
|
-
{
|
|
461
|
-
whileHover: { scale: 1.05 },
|
|
462
|
-
whileTap: { scale: 0.95 },
|
|
463
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
464
|
-
tooltip.Button,
|
|
465
|
-
{
|
|
466
|
-
variant: "ghost",
|
|
467
|
-
size: "sm",
|
|
468
|
-
onClick: onFileUpload,
|
|
469
|
-
className: "h-8 w-8 p-0 rounded-full text-muted-foreground hover:bg-accent hover:text-foreground transition-all duration-200",
|
|
470
|
-
"aria-label": "Anexar arquivo",
|
|
471
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "w-4 h-4" })
|
|
472
|
-
}
|
|
473
|
-
)
|
|
474
|
-
}
|
|
475
|
-
)
|
|
476
|
-
] }),
|
|
477
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
478
|
-
enableAudioInput && /* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
-
framerMotion.motion.div,
|
|
480
|
-
{
|
|
481
|
-
whileHover: { scale: 1.05 },
|
|
482
|
-
whileTap: { scale: 0.95 },
|
|
483
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
484
|
-
tooltip.Button,
|
|
485
|
-
{
|
|
486
|
-
variant: "ghost",
|
|
487
|
-
size: "sm",
|
|
488
|
-
onClick: handleVoiceRecording,
|
|
489
|
-
className: `h-8 w-8 p-0 rounded-full transition-all duration-200 ${isRecording ? "bg-destructive hover:bg-destructive/90 text-white animate-pulse" : "text-muted-foreground hover:bg-accent hover:text-foreground"}`,
|
|
490
|
-
"aria-label": isRecording ? "Parar gravação" : "Sugerir com voz",
|
|
491
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mic, { className: "w-4 h-4" })
|
|
492
|
-
}
|
|
493
|
-
)
|
|
494
|
-
}
|
|
495
|
-
),
|
|
496
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
497
|
-
framerMotion.motion.div,
|
|
498
|
-
{
|
|
499
|
-
initial: { scale: 0.8, opacity: 0 },
|
|
500
|
-
animate: { scale: 1, opacity: 1 },
|
|
501
|
-
exit: { scale: 0.8, opacity: 0 },
|
|
502
|
-
transition: { duration: 0.2, ease: "easeInOut" },
|
|
503
|
-
whileHover: hasContent ? { scale: 1.05 } : {},
|
|
504
|
-
whileTap: hasContent ? { scale: 0.95 } : {},
|
|
505
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
506
|
-
tooltip.Button,
|
|
507
|
-
{
|
|
508
|
-
onClick: () => {
|
|
509
|
-
onSubmit(selectedAction);
|
|
510
|
-
setSelectedAction(null);
|
|
511
|
-
},
|
|
512
|
-
size: "sm",
|
|
513
|
-
disabled: !hasContent || disabled,
|
|
514
|
-
className: `h-8 w-8 p-0 rounded-full transition-all duration-300 ${hasContent && !disabled ? "bg-primary hover:bg-primary/90 text-primary-foreground shadow-lg shadow-primary/30 hover:shadow-primary/40" : "bg-muted text-muted-foreground cursor-not-allowed"}`,
|
|
515
|
-
"aria-label": "Enviar mensagem",
|
|
516
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
517
|
-
framerMotion.motion.div,
|
|
518
|
-
{
|
|
519
|
-
animate: {
|
|
520
|
-
rotate: hasContent ? 0 : -45
|
|
521
|
-
},
|
|
522
|
-
transition: { duration: 0.2 },
|
|
523
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "w-4 h-4" })
|
|
524
|
-
}
|
|
525
|
-
)
|
|
526
|
-
}
|
|
527
|
-
)
|
|
528
|
-
},
|
|
529
|
-
hasContent ? "active" : "inactive"
|
|
530
|
-
) })
|
|
531
|
-
] })
|
|
532
|
-
] })
|
|
533
|
-
] }),
|
|
534
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isFocused && /* @__PURE__ */ jsxRuntime.jsx(
|
|
535
|
-
framerMotion.motion.div,
|
|
536
|
-
{
|
|
537
|
-
className: "absolute inset-0 rounded-[var(--radius)] bg-gradient-to-r from-primary/5 via-transparent to-primary/5 pointer-events-none",
|
|
538
|
-
initial: { opacity: 0 },
|
|
539
|
-
animate: { opacity: 1 },
|
|
540
|
-
exit: { opacity: 0 },
|
|
541
|
-
transition: { duration: 0.3 }
|
|
542
|
-
}
|
|
543
|
-
) })
|
|
544
|
-
]
|
|
545
|
-
}
|
|
546
|
-
),
|
|
547
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
548
|
-
framerMotion.motion.div,
|
|
549
|
-
{
|
|
550
|
-
className: "mt-2 text-center",
|
|
551
|
-
initial: { opacity: 0, y: 5 },
|
|
552
|
-
animate: { opacity: 1, y: 0 },
|
|
553
|
-
transition: { delay: 0.1 },
|
|
554
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "O assistente Xertica pode cometer erros. Considere verificar informações importantes." })
|
|
555
|
-
}
|
|
556
|
-
)
|
|
557
|
-
] });
|
|
558
|
-
}
|
|
559
|
-
[
|
|
560
|
-
{ id: "rich-1", text: "Ver exemplo de Gráfico", icon: React.createElement(lucideReact.BarChart3, { className: "w-4 h-4 mr-2" }) },
|
|
561
|
-
{ id: "rich-2", text: "Ver exemplo de Imagem", icon: React.createElement(lucideReact.ImageIcon, { className: "w-4 h-4 mr-2" }) },
|
|
562
|
-
{ id: "rich-3", text: "Ver exemplo de Tabela", icon: React.createElement(lucideReact.Table, { className: "w-4 h-4 mr-2" }) },
|
|
563
|
-
{ id: "rich-4", text: "Ver exemplo de Documento", icon: React.createElement(lucideReact.FileText, { className: "w-4 h-4 mr-2" }) }
|
|
564
|
-
];
|
|
565
|
-
const gerarResposta = (mensagemUsuario, customResponses) => {
|
|
566
|
-
const mensagemLower = mensagemUsuario.toLowerCase();
|
|
567
|
-
if (customResponses && customResponses.length > 0) {
|
|
568
|
-
for (const mock of customResponses) {
|
|
569
|
-
const trigger = mock.trigger;
|
|
570
|
-
let match = false;
|
|
571
|
-
if (trigger instanceof RegExp) {
|
|
572
|
-
match = trigger.test(mensagemUsuario);
|
|
573
|
-
} else {
|
|
574
|
-
match = mensagemLower.includes(trigger.toLowerCase());
|
|
575
|
-
}
|
|
576
|
-
if (match) {
|
|
577
|
-
return mock.response;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
const mensagemOriginal = mensagemUsuario;
|
|
582
|
-
if (mensagemLower.includes("o que") && (mensagemLower.includes("fazer") || mensagemLower.includes("pedir"))) {
|
|
583
|
-
return "Posso ajudar você com diversas tarefas! Posso:\n\n• Analisar dados e métricas dos seus projetos\n• Responder perguntas sobre performance e resultados\n• Sugerir otimizações e melhorias\n• Gerar relatórios e documentação\n• Ajudar no planejamento de sprints\n• E muito mais!\n\nQual tarefa você gostaria de realizar primeiro?";
|
|
584
|
-
}
|
|
585
|
-
if (mensagemLower.includes("o que você faz") || mensagemLower.includes("quem é você")) {
|
|
586
|
-
return "Olá! Sou o Assistente Xertica, uma IA desenvolvida para ajudar você a gerenciar projetos, analisar dados e otimizar processos. Estou aqui 24/7 para responder suas perguntas e auxiliar nas suas tarefas diárias.\n\nPosso processar documentos, analisar áudios e imagens, além de fornecer insights baseados nos dados da plataforma.";
|
|
587
|
-
}
|
|
588
|
-
if (mensagemLower.includes("projeto") && (mensagemLower.includes("preocupar") || mensagemLower.includes("atenção"))) {
|
|
589
|
-
return "Com base na análise dos seus projetos ativos, recomendo focar nos seguintes:\n\n1. **Projeto Alpha** - 15% acima do prazo, requer atenção imediata\n2. **Sistema Beta** - Performance crítica, necessita otimização\n3. **Mobile Gamma** - Aguardando aprovações há 5 dias\n\nGostaria de mais detalhes sobre algum deles?";
|
|
590
|
-
}
|
|
591
|
-
if (mensagemLower.includes("próximo projeto") || mensagemLower.includes("próxima tarefa")) {
|
|
592
|
-
return "Seu próximo projeto prioritário é o **Sistema de Analytics V2**.\n\n📅 Início previsto: Próxima segunda-feira\n👥 Time: 5 desenvolvedores\n⏱️ Duração estimada: 3 sprints\n\nJá preparei um roadmap inicial. Gostaria de revisar?";
|
|
593
|
-
}
|
|
594
|
-
if (mensagemLower.includes("desempenho") || mensagemLower.includes("performance") || mensagemLower.includes("melhor")) {
|
|
595
|
-
return "Analisando os dados de performance dos últimos 30 dias:\n\n🏆 **Melhor Performance:**\n• Projeto Dashboard 2.0: +35% eficiência\n• Sistema CRM: -40% tempo de resposta\n• App Mobile: 4.8★ rating (+0.5)\n\n📊 Todos estão acima das metas estabelecidas. Parabéns!\n\nQuer ver métricas detalhadas?";
|
|
596
|
-
}
|
|
597
|
-
if (mensagemLower.includes("olá") || mensagemLower.includes("oi") || mensagemLower.includes("bom dia") || mensagemLower.includes("boa tarde") || mensagemLower.includes("boa noite")) {
|
|
598
|
-
return "Olá! 👋 Como posso ajudar você hoje? Estou pronto para auxiliar com análises, relatórios ou responder suas dúvidas sobre os projetos.";
|
|
599
|
-
}
|
|
600
|
-
if (mensagemLower.includes("obrigado") || mensagemLower.includes("obrigada")) {
|
|
601
|
-
return "Por nada! Estou aqui sempre que precisar. 😊 Se tiver mais alguma dúvida ou precisar de ajuda, é só chamar!";
|
|
602
|
-
}
|
|
603
|
-
if (mensagemLower.includes("criar documento")) {
|
|
604
|
-
const tema = mensagemOriginal.replace(/📄 \[Criar documento\]/gi, "").trim() || "Novo Documento";
|
|
605
|
-
return {
|
|
606
|
-
content: `📝 Documento criado com sucesso!
|
|
607
|
-
|
|
608
|
-
Gerei um documento completo sobre "${tema}". O documento está pronto para revisão e pode ser editado conforme necessário.`,
|
|
609
|
-
attachmentType: "document",
|
|
610
|
-
attachmentName: `Documento - ${tema}.md`,
|
|
611
|
-
documentTitle: tema,
|
|
612
|
-
documentContent: `# ${tema}
|
|
613
|
-
|
|
614
|
-
## Introdução
|
|
615
|
-
Este é um documento gerado automaticamente sobre ${tema}.
|
|
616
|
-
|
|
617
|
-
## Detalhes
|
|
618
|
-
- Item 1
|
|
619
|
-
- Item 2
|
|
620
|
-
|
|
621
|
-
## Conclusão
|
|
622
|
-
Documento finalizado.`
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
if (mensagemLower.includes("gráfico") || mensagemLower.includes("chart")) {
|
|
626
|
-
return {
|
|
627
|
-
content: "Aqui está a análise de performance solicitada:",
|
|
628
|
-
chartData: [
|
|
629
|
-
{ month: "Jan", desktop: 186, mobile: 80 },
|
|
630
|
-
{ month: "Fev", desktop: 305, mobile: 200 },
|
|
631
|
-
{ month: "Mar", desktop: 237, mobile: 120 },
|
|
632
|
-
{ month: "Abr", desktop: 73, mobile: 190 },
|
|
633
|
-
{ month: "Mai", desktop: 209, mobile: 130 },
|
|
634
|
-
{ month: "Jun", desktop: 214, mobile: 140 }
|
|
635
|
-
],
|
|
636
|
-
chartConfig: {
|
|
637
|
-
desktop: { label: "Desktop", color: "hsl(var(--primary))" },
|
|
638
|
-
mobile: { label: "Mobile", color: "hsl(var(--destructive))" }
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
}
|
|
642
|
-
if (mensagemLower.includes("tabela") || mensagemLower.includes("table")) {
|
|
643
|
-
return {
|
|
644
|
-
content: "Aqui estão os dados estruturados conforme solicitado:",
|
|
645
|
-
tableData: {
|
|
646
|
-
caption: "Lista de Projetos Ativos",
|
|
647
|
-
headers: ["Projeto", "Status", "Prazo"],
|
|
648
|
-
rows: [
|
|
649
|
-
["Alpha", "Em andamento", "15/05"],
|
|
650
|
-
["Beta", "Concluido", "02/04"],
|
|
651
|
-
["Gamma", "Atrasado", "10/01"]
|
|
652
|
-
]
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
}
|
|
656
|
-
if (mensagemLower.includes("exemplo de documento")) {
|
|
657
|
-
return {
|
|
658
|
-
content: "Com certeza! Aqui está um exemplo de documento profissional que acabei de gerar:",
|
|
659
|
-
attachmentType: "document",
|
|
660
|
-
attachmentName: "Proposta_Comercial_Xertica.md",
|
|
661
|
-
documentTitle: "Proposta Comercial Xertica",
|
|
662
|
-
documentContent: "# Proposta Comercial\n\n## 1. Visão Geral\nNossa solução oferece o melhor desempenho para sua empresa.\n\n## 2. Investimento\nO valor total é de R$ 50.000,00."
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
|
-
if (mensagemLower.includes("arquivo") || mensagemLower.includes("documento")) {
|
|
666
|
-
return "Entendi que você deseja trabalhar com arquivos. Posso analisar diversos tipos de documentos:\n\n📄 Documentos de texto (PDF, DOCX)\n📊 Planilhas (XLSX, CSV)\n📈 Relatórios e apresentações\n\nBasta enviá-los usando o botão de anexo (📎) e terei prazer em analisá-los para você!";
|
|
667
|
-
}
|
|
668
|
-
const respostasGenericas = [
|
|
669
|
-
"Entendo sua questão. Com base nos dados disponíveis na plataforma Xertica, posso fornecer análises detalhadas sobre esse tema. Poderia me dar mais contexto para que eu possa ajudá-lo melhor?",
|
|
670
|
-
"Interessante! Deixe-me processar isso... Com base no seu histórico e nos dados do sistema, recomendo que possamos explorar essa questão em mais detalhes. O que especificamente você gostaria de saber?",
|
|
671
|
-
"Ótima pergunta! Para te dar a melhor resposta possível, preciso entender melhor o contexto. Você pode me fornecer mais informações sobre o que está buscando?",
|
|
672
|
-
"Estou analisando sua solicitação. Baseado nos dados do sistema Xertica, posso te ajudar com isso. Você gostaria de uma análise rápida ou um relatório completo?"
|
|
673
|
-
];
|
|
674
|
-
return respostasGenericas[Math.floor(Math.random() * respostasGenericas.length)];
|
|
675
|
-
};
|
|
676
|
-
function AssistantTooltipContent({
|
|
677
|
-
className,
|
|
678
|
-
sideOffset = 0,
|
|
679
|
-
children,
|
|
680
|
-
...props
|
|
681
|
-
}) {
|
|
682
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
683
|
-
TooltipPrimitive__namespace.Content,
|
|
684
|
-
{
|
|
685
|
-
"data-slot": "tooltip-content",
|
|
686
|
-
sideOffset,
|
|
687
|
-
className: tooltip.cn(
|
|
688
|
-
"bg-popover text-popover-foreground shadow-lg animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
689
|
-
className
|
|
690
|
-
),
|
|
691
|
-
...props,
|
|
692
|
-
children: [
|
|
693
|
-
children,
|
|
694
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
695
|
-
TooltipPrimitive__namespace.Arrow,
|
|
696
|
-
{
|
|
697
|
-
className: "fill-popover z-50 drop-shadow-sm",
|
|
698
|
-
width: 8,
|
|
699
|
-
height: 4
|
|
700
|
-
}
|
|
701
|
-
)
|
|
702
|
-
]
|
|
703
|
-
}
|
|
704
|
-
) });
|
|
705
|
-
}
|
|
706
|
-
function XerticaAssistant({
|
|
707
|
-
mode = "expanded",
|
|
708
|
-
isExpanded: controlledIsExpanded,
|
|
709
|
-
onToggle,
|
|
710
|
-
defaultTab = "chat",
|
|
711
|
-
demoMode = true,
|
|
712
|
-
onNavigateSettings,
|
|
713
|
-
onNavigateFullPage,
|
|
714
|
-
userName = "Usuário",
|
|
715
|
-
initialMessages = [],
|
|
716
|
-
savedConversations = [],
|
|
717
|
-
suggestions: propSuggestions,
|
|
718
|
-
onSendMessage,
|
|
719
|
-
onFileAttach,
|
|
720
|
-
isProcessing = false,
|
|
721
|
-
width,
|
|
722
|
-
height,
|
|
723
|
-
className = "",
|
|
724
|
-
mobileFloating = false,
|
|
725
|
-
customResponses = [],
|
|
726
|
-
responseGenerator,
|
|
727
|
-
richSuggestions = [],
|
|
728
|
-
onRichAction,
|
|
729
|
-
onEvaluation,
|
|
730
|
-
feedbackOptions,
|
|
731
|
-
// Feature flags — all default to true for backward compatibility
|
|
732
|
-
showHistory = true,
|
|
733
|
-
showFavorites = true,
|
|
734
|
-
enableAudioInput = true,
|
|
735
|
-
enableFileAttachment = true,
|
|
736
|
-
enableDocumentCreation = true,
|
|
737
|
-
enablePodcastGeneration = true,
|
|
738
|
-
enableSearch = true
|
|
739
|
-
}) {
|
|
740
|
-
const isFullPage = mode === "fullPage";
|
|
741
|
-
const [internalIsExpanded, setInternalIsExpanded] = React.useState(controlledIsExpanded ?? true);
|
|
742
|
-
const isExpanded = controlledIsExpanded ?? internalIsExpanded;
|
|
743
|
-
const [isMobile, setIsMobile] = React.useState(false);
|
|
744
|
-
React.useEffect(() => {
|
|
745
|
-
const handleResize = () => setIsMobile(window.innerWidth < 768);
|
|
746
|
-
handleResize();
|
|
747
|
-
window.addEventListener("resize", handleResize);
|
|
748
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
749
|
-
}, []);
|
|
750
|
-
const [abaSelecionada, setAbaSelecionada] = React.useState(defaultTab);
|
|
751
|
-
const [mensagens, setMensagens] = React.useState(initialMessages);
|
|
752
|
-
const [mensagem, setMensagem] = React.useState("");
|
|
753
|
-
const [conversas, setConversas] = React.useState(savedConversations);
|
|
754
|
-
const [conversaAtual, setConversaAtual] = React.useState(null);
|
|
755
|
-
const [copiedId, setCopiedId] = React.useState(null);
|
|
756
|
-
const [generatingPodcastId, setGeneratingPodcastId] = React.useState(null);
|
|
757
|
-
const [executingCommand, setExecutingCommand] = React.useState(null);
|
|
758
|
-
const [savedSearches, setSavedSearches] = React.useState([]);
|
|
759
|
-
const [editingDocument, setEditingDocument] = React.useState(null);
|
|
760
|
-
const [showMoreSuggestions, setShowMoreSuggestions] = React.useState(false);
|
|
761
|
-
const [evaluationState, setEvaluationState] = React.useState({
|
|
762
|
-
isOpen: false,
|
|
763
|
-
messageId: null,
|
|
764
|
-
type: null,
|
|
765
|
-
category: null,
|
|
766
|
-
reason: ""
|
|
767
|
-
});
|
|
768
|
-
const messagesEndRef = React.useRef(null);
|
|
769
|
-
const fileInputRef = React.useRef(null);
|
|
770
|
-
const audioInputRef = React.useRef(null);
|
|
771
|
-
const defaultSuggestions = [
|
|
772
|
-
{ id: "1", text: "Me ajude a criar um documento profissional" },
|
|
773
|
-
{ id: "2", text: 'Buscar nos meus arquivos por "relatório"' },
|
|
774
|
-
{ id: "3", text: "Resuma as conversas importantes desta semana" },
|
|
775
|
-
{ id: "4", text: "Crie um podcast sobre o último projeto" }
|
|
776
|
-
];
|
|
777
|
-
const sugestoes = propSuggestions ?? defaultSuggestions;
|
|
778
|
-
React.useEffect(() => {
|
|
779
|
-
if (messagesEndRef.current && abaSelecionada === "chat") {
|
|
780
|
-
messagesEndRef.current.scrollIntoView({ behavior: "smooth" });
|
|
781
|
-
}
|
|
782
|
-
}, [mensagens, abaSelecionada]);
|
|
783
|
-
React.useEffect(() => {
|
|
784
|
-
if (initialMessages && initialMessages.length > 0) {
|
|
785
|
-
setMensagens(initialMessages);
|
|
786
|
-
}
|
|
787
|
-
}, [initialMessages]);
|
|
788
|
-
const handleToggle = () => {
|
|
789
|
-
if (onToggle) {
|
|
790
|
-
onToggle();
|
|
791
|
-
} else {
|
|
792
|
-
setInternalIsExpanded(!internalIsExpanded);
|
|
793
|
-
}
|
|
794
|
-
};
|
|
795
|
-
const handleExpandWithTab = (tab) => {
|
|
796
|
-
setAbaSelecionada(tab);
|
|
797
|
-
if (onToggle) {
|
|
798
|
-
onToggle();
|
|
799
|
-
} else {
|
|
800
|
-
setInternalIsExpanded(true);
|
|
801
|
-
}
|
|
802
|
-
};
|
|
803
|
-
const handleEnviarMensagem = async (arg) => {
|
|
804
|
-
let msgToSend = mensagem;
|
|
805
|
-
if (typeof arg === "string" && !["document", "podcast", "search"].includes(arg)) {
|
|
806
|
-
msgToSend = arg;
|
|
807
|
-
}
|
|
808
|
-
if (!msgToSend.trim() || isProcessing) return;
|
|
809
|
-
const novaMensagem = {
|
|
810
|
-
id: `msg-${Date.now()}`,
|
|
811
|
-
type: "user",
|
|
812
|
-
content: msgToSend,
|
|
813
|
-
timestamp: /* @__PURE__ */ new Date(),
|
|
814
|
-
isFavorite: false
|
|
815
|
-
};
|
|
816
|
-
setMensagens((prev) => [...prev, novaMensagem]);
|
|
817
|
-
if (onSendMessage) {
|
|
818
|
-
onSendMessage(msgToSend);
|
|
819
|
-
}
|
|
820
|
-
if (demoMode || responseGenerator) {
|
|
821
|
-
const mensagemAtual = msgToSend;
|
|
822
|
-
setTimeout(async () => {
|
|
823
|
-
let resposta;
|
|
824
|
-
if (responseGenerator) {
|
|
825
|
-
resposta = await responseGenerator(mensagemAtual);
|
|
826
|
-
} else {
|
|
827
|
-
resposta = gerarResposta(mensagemAtual, customResponses);
|
|
828
|
-
}
|
|
829
|
-
let novaMensagemIA = {
|
|
830
|
-
id: `msg-${Date.now()}-ia`,
|
|
831
|
-
type: "assistant",
|
|
832
|
-
content: "",
|
|
833
|
-
timestamp: /* @__PURE__ */ new Date(),
|
|
834
|
-
isFavorite: false
|
|
835
|
-
};
|
|
836
|
-
if (typeof resposta === "string") {
|
|
837
|
-
novaMensagemIA.content = resposta;
|
|
838
|
-
} else {
|
|
839
|
-
novaMensagemIA = { ...novaMensagemIA, ...resposta };
|
|
840
|
-
}
|
|
841
|
-
setMensagens((prev) => [...prev, novaMensagemIA]);
|
|
842
|
-
}, 1e3 + Math.random() * 1e3);
|
|
843
|
-
}
|
|
844
|
-
setMensagem("");
|
|
845
|
-
};
|
|
846
|
-
const handleCopyMessage = async (content, messageId) => {
|
|
847
|
-
try {
|
|
848
|
-
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
849
|
-
try {
|
|
850
|
-
await navigator.clipboard.writeText(content);
|
|
851
|
-
setCopiedId(messageId);
|
|
852
|
-
setTimeout(() => setCopiedId(null), 2e3);
|
|
853
|
-
} catch (clipboardError) {
|
|
854
|
-
if (clipboardError.name === "NotAllowedError" || clipboardError.message.includes("permissions policy")) {
|
|
855
|
-
throw new Error("Clipboard permission denied, falling back");
|
|
856
|
-
}
|
|
857
|
-
throw clipboardError;
|
|
858
|
-
}
|
|
859
|
-
} else {
|
|
860
|
-
throw new Error("Clipboard API not available");
|
|
861
|
-
}
|
|
862
|
-
} catch (err) {
|
|
863
|
-
try {
|
|
864
|
-
const textArea = document.createElement("textarea");
|
|
865
|
-
textArea.value = content;
|
|
866
|
-
textArea.style.position = "fixed";
|
|
867
|
-
textArea.style.left = "-999999px";
|
|
868
|
-
textArea.style.top = "-999999px";
|
|
869
|
-
document.body.appendChild(textArea);
|
|
870
|
-
textArea.focus();
|
|
871
|
-
textArea.select();
|
|
872
|
-
const successful = document.execCommand("copy");
|
|
873
|
-
document.body.removeChild(textArea);
|
|
874
|
-
if (successful) {
|
|
875
|
-
setCopiedId(messageId);
|
|
876
|
-
setTimeout(() => setCopiedId(null), 2e3);
|
|
877
|
-
} else {
|
|
878
|
-
console.error("Falha ao copiar: execCommand returned false");
|
|
879
|
-
}
|
|
880
|
-
} catch (fallbackErr) {
|
|
881
|
-
console.error("Falha ao copiar:", fallbackErr);
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
const handleGeneratePodcast = async (messageId, content) => {
|
|
886
|
-
setGeneratingPodcastId(messageId);
|
|
887
|
-
setTimeout(() => {
|
|
888
|
-
setMensagens(
|
|
889
|
-
(prev) => prev.map(
|
|
890
|
-
(msg) => msg.id === messageId ? {
|
|
891
|
-
...msg,
|
|
892
|
-
attachmentType: "podcast",
|
|
893
|
-
attachmentName: "Podcast - " + content.substring(0, 30) + "...",
|
|
894
|
-
audioUrl: "data:audio/mpeg;base64,//uQx..."
|
|
895
|
-
// Mock
|
|
896
|
-
} : msg
|
|
897
|
-
)
|
|
898
|
-
);
|
|
899
|
-
setGeneratingPodcastId(null);
|
|
900
|
-
}, 2e3);
|
|
901
|
-
};
|
|
902
|
-
const handleDownloadDocument = (content, fileName) => {
|
|
903
|
-
const blob = new Blob([content], { type: "text/markdown" });
|
|
904
|
-
const url = URL.createObjectURL(blob);
|
|
905
|
-
const a = document.createElement("a");
|
|
906
|
-
a.href = url;
|
|
907
|
-
a.download = fileName.endsWith(".md") ? fileName : fileName + ".md";
|
|
908
|
-
document.body.appendChild(a);
|
|
909
|
-
a.click();
|
|
910
|
-
document.body.removeChild(a);
|
|
911
|
-
URL.revokeObjectURL(url);
|
|
912
|
-
};
|
|
913
|
-
const handleDownloadPodcast = (audioUrl, fileName) => {
|
|
914
|
-
const a = document.createElement("a");
|
|
915
|
-
a.href = audioUrl;
|
|
916
|
-
a.download = fileName.endsWith(".mp3") ? fileName : fileName + ".mp3";
|
|
917
|
-
document.body.appendChild(a);
|
|
918
|
-
a.click();
|
|
919
|
-
document.body.removeChild(a);
|
|
920
|
-
};
|
|
921
|
-
const handleEditDocument = (content, title) => {
|
|
922
|
-
setEditingDocument({ content, title });
|
|
923
|
-
};
|
|
924
|
-
const handleNovaConversa = () => {
|
|
925
|
-
setMensagens([]);
|
|
926
|
-
setConversaAtual(null);
|
|
927
|
-
setAbaSelecionada("chat");
|
|
928
|
-
};
|
|
929
|
-
const handleSelecionarConversa = (conversaId) => {
|
|
930
|
-
const conversa = conversas.find((c) => c.id === conversaId);
|
|
931
|
-
if (conversa) {
|
|
932
|
-
setMensagens(conversa.messages);
|
|
933
|
-
setConversaAtual(conversaId);
|
|
934
|
-
setAbaSelecionada("chat");
|
|
935
|
-
}
|
|
936
|
-
};
|
|
937
|
-
const handleToggleFavoritaConversa = (conversaId) => {
|
|
938
|
-
setConversas(
|
|
939
|
-
(prev) => prev.map(
|
|
940
|
-
(conv) => conv.id === conversaId ? { ...conv, isFavorite: !conv.isFavorite } : conv
|
|
941
|
-
)
|
|
942
|
-
);
|
|
943
|
-
};
|
|
944
|
-
const handleOpenSearchResult = (result) => {
|
|
945
|
-
console.log("Abrir resultado:", result);
|
|
946
|
-
};
|
|
947
|
-
const handleExecuteSearchCommand = async (commandId, searchTerm, results, messageId) => {
|
|
948
|
-
setExecutingCommand(commandId);
|
|
949
|
-
setTimeout(() => {
|
|
950
|
-
if (commandId === "5") {
|
|
951
|
-
setSavedSearches((prev) => [...prev, messageId]);
|
|
952
|
-
}
|
|
953
|
-
setExecutingCommand(null);
|
|
954
|
-
}, 1500);
|
|
955
|
-
};
|
|
956
|
-
const handleRichSuggestionClick = (suggestion) => {
|
|
957
|
-
if (onRichAction) {
|
|
958
|
-
onRichAction(suggestion.id, suggestion.text);
|
|
959
|
-
} else {
|
|
960
|
-
handleEnviarMensagem(suggestion.text);
|
|
961
|
-
}
|
|
962
|
-
setShowMoreSuggestions(false);
|
|
963
|
-
};
|
|
964
|
-
const handleEvaluationClick = (messageId, type) => {
|
|
965
|
-
{
|
|
966
|
-
if (onEvaluation) onEvaluation(messageId, "like");
|
|
967
|
-
setMensagens((prev) => prev.map((m) => m.id === messageId ? { ...m, evaluation: "like" } : m));
|
|
968
|
-
sonner.toast.success("Obrigado por avaliar positivamente!");
|
|
969
|
-
}
|
|
970
|
-
};
|
|
971
|
-
const openFeedbackDialog = (messageId, category) => {
|
|
972
|
-
setEvaluationState({
|
|
973
|
-
isOpen: true,
|
|
974
|
-
messageId,
|
|
975
|
-
type: "dislike",
|
|
976
|
-
category,
|
|
977
|
-
reason: ""
|
|
978
|
-
});
|
|
979
|
-
};
|
|
980
|
-
const handleSubmitDislike = () => {
|
|
981
|
-
if (evaluationState.messageId) {
|
|
982
|
-
const finalReason = evaluationState.category ? evaluationState.reason ? `${evaluationState.category}: ${evaluationState.reason}` : evaluationState.category : evaluationState.reason;
|
|
983
|
-
if (onEvaluation) {
|
|
984
|
-
onEvaluation(evaluationState.messageId, "dislike", finalReason);
|
|
985
|
-
}
|
|
986
|
-
setMensagens((prev) => prev.map((m) => m.id === evaluationState.messageId ? { ...m, evaluation: "dislike", evaluationReason: finalReason } : m));
|
|
987
|
-
sonner.toast.success("Obrigado pelo seu feedback. Vamos melhorar.");
|
|
988
|
-
}
|
|
989
|
-
setEvaluationState({ isOpen: false, messageId: null, type: null, category: null, reason: "" });
|
|
990
|
-
};
|
|
991
|
-
const conversasFiltradas = conversas.filter((conversa) => {
|
|
992
|
-
if (abaSelecionada === "favoritos") {
|
|
993
|
-
return conversa.isFavorite;
|
|
994
|
-
}
|
|
995
|
-
return true;
|
|
996
|
-
});
|
|
997
|
-
const containerWidth = width ?? (isFullPage ? "100%" : isExpanded ? editingDocument ? "420px" : "420px" : "80px");
|
|
998
|
-
const containerHeight = height ?? "h-full";
|
|
999
|
-
if (isMobile && !isExpanded) {
|
|
1000
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1001
|
-
tooltip.Button,
|
|
1002
|
-
{
|
|
1003
|
-
onClick: handleToggle,
|
|
1004
|
-
className: tooltip.cn(
|
|
1005
|
-
"fixed bottom-4 right-4 h-14 rounded-full shadow-lg pl-3 pr-5 gap-3 bg-white text-zinc-900 hover:bg-zinc-50 border border-zinc-200 z-50 transition-all duration-300",
|
|
1006
|
-
className
|
|
1007
|
-
),
|
|
1008
|
-
children: [
|
|
1009
|
-
/* @__PURE__ */ jsxRuntime.jsx(XerticaOrbe.XerticaOrbe, { size: 32 }),
|
|
1010
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-base tracking-wide", children: "Assistente" })
|
|
1011
|
-
]
|
|
1012
|
-
}
|
|
1013
|
-
);
|
|
1014
|
-
}
|
|
1015
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1016
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1017
|
-
"input",
|
|
1018
|
-
{
|
|
1019
|
-
ref: fileInputRef,
|
|
1020
|
-
type: "file",
|
|
1021
|
-
accept: ".pdf,.doc,.docx,.txt,.md",
|
|
1022
|
-
className: "hidden",
|
|
1023
|
-
onChange: (e) => {
|
|
1024
|
-
var _a;
|
|
1025
|
-
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
1026
|
-
if (file && onFileAttach) {
|
|
1027
|
-
onFileAttach(file);
|
|
1028
|
-
}
|
|
1029
|
-
},
|
|
1030
|
-
"aria-label": "Upload de documento"
|
|
1031
|
-
}
|
|
1032
|
-
),
|
|
1033
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1034
|
-
"input",
|
|
1035
|
-
{
|
|
1036
|
-
ref: audioInputRef,
|
|
1037
|
-
type: "file",
|
|
1038
|
-
accept: "audio/*",
|
|
1039
|
-
className: "hidden",
|
|
1040
|
-
onChange: (e) => {
|
|
1041
|
-
var _a;
|
|
1042
|
-
const file = (_a = e.target.files) == null ? void 0 : _a[0];
|
|
1043
|
-
if (file && onFileAttach) {
|
|
1044
|
-
onFileAttach(file);
|
|
1045
|
-
}
|
|
1046
|
-
},
|
|
1047
|
-
"aria-label": "Upload de áudio"
|
|
1048
|
-
}
|
|
1049
|
-
),
|
|
1050
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1051
|
-
"div",
|
|
1052
|
-
{
|
|
1053
|
-
className: tooltip.cn(
|
|
1054
|
-
`${containerHeight} flex flex-col bg-background relative`,
|
|
1055
|
-
!isFullPage && "border-l border-border shadow-sm",
|
|
1056
|
-
isMobile && isExpanded && "fixed inset-0 z-[100] h-[100dvh] w-full border-l-0 shadow-2xl",
|
|
1057
|
-
className
|
|
1058
|
-
),
|
|
1059
|
-
style: !(isMobile && isExpanded) ? {
|
|
1060
|
-
width: isFullPage ? "100%" : containerWidth
|
|
1061
|
-
} : void 0,
|
|
1062
|
-
children: [
|
|
1063
|
-
editingDocument && !isFullPage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1064
|
-
"div",
|
|
1065
|
-
{
|
|
1066
|
-
className: tooltip.cn(
|
|
1067
|
-
"flex flex-col border-border bg-background overflow-hidden transition-all duration-300",
|
|
1068
|
-
isMobile ? "fixed inset-0 z-[110] w-full h-[100dvh]" : "absolute top-0 bottom-0 right-full w-[800px] border-l border-r border-border shadow-[-25px_0_50px_-15px_rgba(0,0,0,0.15)] z-[90]"
|
|
1069
|
-
),
|
|
1070
|
-
style: { maxWidth: isMobile ? "none" : `calc(100vw - ${containerWidth})` },
|
|
1071
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col", children: [
|
|
1072
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 h-[64px] border-b border-border bg-card flex items-center justify-between", children: [
|
|
1073
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1074
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-2 bg-primary/10 rounded-md", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "w-4 h-4 text-primary" }) }),
|
|
1075
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-card-foreground text-sm", children: editingDocument.title })
|
|
1076
|
-
] }),
|
|
1077
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1078
|
-
tooltip.Button,
|
|
1079
|
-
{
|
|
1080
|
-
variant: "ghost",
|
|
1081
|
-
size: "icon",
|
|
1082
|
-
className: "h-8 w-8 rounded-full",
|
|
1083
|
-
onClick: () => setEditingDocument(null),
|
|
1084
|
-
"aria-label": "Fechar editor de documento",
|
|
1085
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
|
|
1086
|
-
}
|
|
1087
|
-
)
|
|
1088
|
-
] }),
|
|
1089
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 bg-muted/20 p-0 sm:p-6 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1090
|
-
richTextEditor.RichTextEditor,
|
|
1091
|
-
{
|
|
1092
|
-
value: editingDocument.content || "",
|
|
1093
|
-
onChange: (newVal) => setEditingDocument((prev) => prev ? { ...prev, content: newVal } : null),
|
|
1094
|
-
placeholder: "Comece a digitar o conteúdo do seu documento aqui...",
|
|
1095
|
-
className: "max-w-4xl mx-auto h-full",
|
|
1096
|
-
actionButton: /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Button, { size: "sm", className: "gap-2 h-8", children: [
|
|
1097
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3.5 h-3.5" }),
|
|
1098
|
-
"Salvar"
|
|
1099
|
-
] })
|
|
1100
|
-
}
|
|
1101
|
-
) })
|
|
1102
|
-
] })
|
|
1103
|
-
}
|
|
1104
|
-
),
|
|
1105
|
-
!isFullPage && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1106
|
-
"div",
|
|
1107
|
-
{
|
|
1108
|
-
className: tooltip.cn(
|
|
1109
|
-
"border-b border-border flex items-center h-[64px]",
|
|
1110
|
-
isExpanded ? "justify-between px-4" : "justify-center px-0"
|
|
1111
|
-
),
|
|
1112
|
-
children: [
|
|
1113
|
-
isExpanded && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1114
|
-
framerMotion.motion.div,
|
|
1115
|
-
{
|
|
1116
|
-
initial: { opacity: 0, x: -10 },
|
|
1117
|
-
animate: { opacity: 1, x: 0 },
|
|
1118
|
-
exit: { opacity: 0, x: -10 },
|
|
1119
|
-
className: "flex items-center gap-2 overflow-hidden",
|
|
1120
|
-
children: [
|
|
1121
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(XerticaOrbe.XerticaOrbe, { size: 32 }) }),
|
|
1122
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-medium truncate", children: "Assistente Xertica" })
|
|
1123
|
-
]
|
|
1124
|
-
}
|
|
1125
|
-
),
|
|
1126
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1127
|
-
isExpanded && onNavigateFullPage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1128
|
-
tooltip.Button,
|
|
1129
|
-
{
|
|
1130
|
-
variant: "ghost",
|
|
1131
|
-
size: "sm",
|
|
1132
|
-
onClick: onNavigateFullPage,
|
|
1133
|
-
className: "h-8 w-8 p-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-full",
|
|
1134
|
-
title: "Expandir assistente",
|
|
1135
|
-
"aria-label": "Expandir assistente",
|
|
1136
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Maximize2, { className: "w-4 h-4" })
|
|
1137
|
-
}
|
|
1138
|
-
),
|
|
1139
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1140
|
-
tooltip.Button,
|
|
1141
|
-
{
|
|
1142
|
-
variant: "ghost",
|
|
1143
|
-
size: "sm",
|
|
1144
|
-
onClick: handleToggle,
|
|
1145
|
-
className: tooltip.cn(
|
|
1146
|
-
"h-8 w-8 p-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-full",
|
|
1147
|
-
!isExpanded && "w-10 h-10"
|
|
1148
|
-
// Slightly larger touch target when collapsed if desired, or keep consistent
|
|
1149
|
-
),
|
|
1150
|
-
"aria-label": isExpanded ? "Recolher assistente" : "Expandir assistente",
|
|
1151
|
-
children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelRight, { className: "w-4 h-4" })
|
|
1152
|
-
}
|
|
1153
|
-
)
|
|
1154
|
-
] })
|
|
1155
|
-
]
|
|
1156
|
-
}
|
|
1157
|
-
),
|
|
1158
|
-
!isExpanded && !isFullPage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center p-4 space-y-4", children: [
|
|
1159
|
-
/* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip, { children: [
|
|
1160
|
-
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1161
|
-
"button",
|
|
1162
|
-
{
|
|
1163
|
-
onClick: handleToggle,
|
|
1164
|
-
className: "w-10 h-10 rounded-full flex items-center justify-center hover:bg-accent/50 transition-colors duration-200 cursor-pointer mx-auto",
|
|
1165
|
-
"aria-label": "Abrir assistente",
|
|
1166
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(XerticaOrbe.XerticaOrbe, { size: 32 })
|
|
1167
|
-
}
|
|
1168
|
-
) }),
|
|
1169
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
|
-
AssistantTooltipContent,
|
|
1171
|
-
{
|
|
1172
|
-
side: "left",
|
|
1173
|
-
sideOffset: 8,
|
|
1174
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Assistente Xertica" })
|
|
1175
|
-
}
|
|
1176
|
-
)
|
|
1177
|
-
] }),
|
|
1178
|
-
/* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip, { children: [
|
|
1179
|
-
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1180
|
-
tooltip.Button,
|
|
1181
|
-
{
|
|
1182
|
-
variant: "ghost",
|
|
1183
|
-
size: "sm",
|
|
1184
|
-
onClick: () => handleExpandWithTab("chat"),
|
|
1185
|
-
className: "w-8 h-8 p-0 text-muted-foreground",
|
|
1186
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "w-4 h-4" })
|
|
1187
|
-
}
|
|
1188
|
-
) }),
|
|
1189
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1190
|
-
AssistantTooltipContent,
|
|
1191
|
-
{
|
|
1192
|
-
side: "left",
|
|
1193
|
-
sideOffset: 8,
|
|
1194
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Chat" })
|
|
1195
|
-
}
|
|
1196
|
-
)
|
|
1197
|
-
] }),
|
|
1198
|
-
showFavorites && /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip, { children: [
|
|
1199
|
-
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
|
-
tooltip.Button,
|
|
1201
|
-
{
|
|
1202
|
-
variant: "ghost",
|
|
1203
|
-
size: "sm",
|
|
1204
|
-
onClick: () => handleExpandWithTab("favoritos"),
|
|
1205
|
-
className: "w-8 h-8 p-0 text-muted-foreground",
|
|
1206
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heart, { className: "w-4 h-4" })
|
|
1207
|
-
}
|
|
1208
|
-
) }),
|
|
1209
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1210
|
-
AssistantTooltipContent,
|
|
1211
|
-
{
|
|
1212
|
-
side: "left",
|
|
1213
|
-
sideOffset: 8,
|
|
1214
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Favoritos" })
|
|
1215
|
-
}
|
|
1216
|
-
)
|
|
1217
|
-
] }),
|
|
1218
|
-
showHistory && /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip, { children: [
|
|
1219
|
-
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1220
|
-
tooltip.Button,
|
|
1221
|
-
{
|
|
1222
|
-
variant: "ghost",
|
|
1223
|
-
size: "sm",
|
|
1224
|
-
onClick: () => handleExpandWithTab("historico"),
|
|
1225
|
-
className: "w-8 h-8 p-0 text-muted-foreground",
|
|
1226
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "w-4 h-4" })
|
|
1227
|
-
}
|
|
1228
|
-
) }),
|
|
1229
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1230
|
-
AssistantTooltipContent,
|
|
1231
|
-
{
|
|
1232
|
-
side: "left",
|
|
1233
|
-
sideOffset: 8,
|
|
1234
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Histórico" })
|
|
1235
|
-
}
|
|
1236
|
-
)
|
|
1237
|
-
] })
|
|
1238
|
-
] }),
|
|
1239
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: (isExpanded || isFullPage) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1240
|
-
framerMotion.motion.div,
|
|
1241
|
-
{
|
|
1242
|
-
initial: isFullPage ? false : { opacity: 0, x: 50 },
|
|
1243
|
-
animate: { opacity: 1, x: 0 },
|
|
1244
|
-
exit: isFullPage ? void 0 : { opacity: 0, x: 50 },
|
|
1245
|
-
transition: { duration: 0.2 },
|
|
1246
|
-
className: "flex-1 flex flex-col overflow-hidden",
|
|
1247
|
-
children: [
|
|
1248
|
-
!isFullPage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1249
|
-
"div",
|
|
1250
|
-
{
|
|
1251
|
-
className: "px-4 py-2 border-b border-border",
|
|
1252
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
|
|
1253
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1254
|
-
tooltip.Button,
|
|
1255
|
-
{
|
|
1256
|
-
variant: abaSelecionada === "chat" ? "default" : "ghost",
|
|
1257
|
-
size: "sm",
|
|
1258
|
-
onClick: () => setAbaSelecionada("chat"),
|
|
1259
|
-
className: "flex-1 h-8",
|
|
1260
|
-
"aria-label": "Ver chat",
|
|
1261
|
-
children: [
|
|
1262
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "w-3 h-3 mr-1" }),
|
|
1263
|
-
"Chat"
|
|
1264
|
-
]
|
|
1265
|
-
}
|
|
1266
|
-
),
|
|
1267
|
-
showHistory && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1268
|
-
tooltip.Button,
|
|
1269
|
-
{
|
|
1270
|
-
variant: abaSelecionada === "historico" ? "default" : "ghost",
|
|
1271
|
-
size: "sm",
|
|
1272
|
-
onClick: () => setAbaSelecionada("historico"),
|
|
1273
|
-
className: "flex-1 h-8",
|
|
1274
|
-
"aria-label": "Ver histórico de conversas",
|
|
1275
|
-
children: [
|
|
1276
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "w-3 h-3 mr-1" }),
|
|
1277
|
-
"Histórico"
|
|
1278
|
-
]
|
|
1279
|
-
}
|
|
1280
|
-
),
|
|
1281
|
-
showFavorites && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1282
|
-
tooltip.Button,
|
|
1283
|
-
{
|
|
1284
|
-
variant: abaSelecionada === "favoritos" ? "default" : "ghost",
|
|
1285
|
-
size: "sm",
|
|
1286
|
-
onClick: () => setAbaSelecionada("favoritos"),
|
|
1287
|
-
className: "flex-1 h-8",
|
|
1288
|
-
"aria-label": "Ver mensagens favoritas",
|
|
1289
|
-
children: [
|
|
1290
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heart, { className: "w-3 h-3 mr-1" }),
|
|
1291
|
-
"Favoritos"
|
|
1292
|
-
]
|
|
1293
|
-
}
|
|
1294
|
-
)
|
|
1295
|
-
] })
|
|
1296
|
-
}
|
|
1297
|
-
),
|
|
1298
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-hidden flex flex-col", children: [
|
|
1299
|
-
abaSelecionada === "chat" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-1 flex flex-col min-h-0 ${isFullPage ? "mx-auto w-full max-w-6xl" : ""}`, children: mensagens.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-y-auto min-h-0", children: [
|
|
1300
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 text-center", children: [
|
|
1301
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-4 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(XerticaOrbe.XerticaOrbe, { size: 64 }) }),
|
|
1302
|
-
/* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "mb-2 text-foreground", children: [
|
|
1303
|
-
"Olá, ",
|
|
1304
|
-
userName
|
|
1305
|
-
] }),
|
|
1306
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "Como posso ajudar?" })
|
|
1307
|
-
] }),
|
|
1308
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 pb-4 space-y-2", children: [
|
|
1309
|
-
sugestoes.map((sugestao) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1310
|
-
"button",
|
|
1311
|
-
{
|
|
1312
|
-
onClick: () => handleEnviarMensagem(sugestao.text),
|
|
1313
|
-
className: "w-full p-3 text-left rounded-[var(--radius-card)] bg-muted text-foreground transition-colors duration-200 hover:bg-muted/80",
|
|
1314
|
-
children: sugestao.text
|
|
1315
|
-
},
|
|
1316
|
-
sugestao.id
|
|
1317
|
-
)),
|
|
1318
|
-
!showMoreSuggestions ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1319
|
-
tooltip.Button,
|
|
1320
|
-
{
|
|
1321
|
-
variant: "ghost",
|
|
1322
|
-
size: "sm",
|
|
1323
|
-
onClick: () => setShowMoreSuggestions(true),
|
|
1324
|
-
className: "w-full justify-start text-muted-foreground",
|
|
1325
|
-
children: [
|
|
1326
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "w-4 h-4 mr-2" }),
|
|
1327
|
-
"Mais sugestões"
|
|
1328
|
-
]
|
|
1329
|
-
}
|
|
1330
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 pt-2 border-t border-border mt-2 animate-in slide-in-from-top-2", children: [
|
|
1331
|
-
richSuggestions.length > 0 ? richSuggestions.map((sugestao) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1332
|
-
"button",
|
|
1333
|
-
{
|
|
1334
|
-
onClick: () => handleRichSuggestionClick(sugestao),
|
|
1335
|
-
className: "w-full p-3 text-left rounded-[var(--radius-card)] bg-muted/50 border border-border text-foreground transition-all duration-200 hover:bg-primary/5 hover:border-primary/50 group",
|
|
1336
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1337
|
-
sugestao.id.includes("chart") && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "w-4 h-4 text-primary" }),
|
|
1338
|
-
sugestao.id.includes("table") && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Table, { className: "w-4 h-4 text-primary" }),
|
|
1339
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: sugestao.text })
|
|
1340
|
-
] })
|
|
1341
|
-
},
|
|
1342
|
-
sugestao.id
|
|
1343
|
-
)) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground text-center py-2", children: "Nenhuma sugestão extra." }),
|
|
1344
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1345
|
-
tooltip.Button,
|
|
1346
|
-
{
|
|
1347
|
-
variant: "ghost",
|
|
1348
|
-
size: "sm",
|
|
1349
|
-
onClick: () => setShowMoreSuggestions(false),
|
|
1350
|
-
className: "w-full justify-center text-muted-foreground mt-2",
|
|
1351
|
-
children: [
|
|
1352
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "w-4 h-4 mr-2" }),
|
|
1353
|
-
"Voltar"
|
|
1354
|
-
]
|
|
1355
|
-
}
|
|
1356
|
-
)
|
|
1357
|
-
] })
|
|
1358
|
-
] })
|
|
1359
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(input.ScrollArea, { className: "flex-1 min-h-0 overflow-x-hidden [&_[data-radix-scroll-area-viewport]>div]:!block", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 px-4 py-4 max-w-6xl mx-auto !block !w-full", children: [
|
|
1360
|
-
mensagens.map((msg) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1361
|
-
framerMotion.motion.div,
|
|
1362
|
-
{
|
|
1363
|
-
initial: { opacity: 0, y: 10 },
|
|
1364
|
-
animate: { opacity: 1, y: 0 },
|
|
1365
|
-
className: `flex gap-2 w-full min-w-0 ${msg.type === "user" ? "justify-end" : "justify-start"}`,
|
|
1366
|
-
children: [
|
|
1367
|
-
msg.type === "assistant" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(XerticaOrbe.XerticaOrbe, { size: 32 }) }),
|
|
1368
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: tooltip.cn(
|
|
1369
|
-
"flex flex-col min-w-0 transition-all duration-300",
|
|
1370
|
-
msg.type === "user" ? "max-w-[85%] md:max-w-[70%] items-end w-fit" : tooltip.cn(
|
|
1371
|
-
"items-start",
|
|
1372
|
-
msg.tableData || msg.chartData || msg.searchResults || msg.attachmentType === "document" ? "w-full max-w-full" : "w-fit max-w-[95%] md:max-w-[90%]"
|
|
1373
|
-
)
|
|
1374
|
-
), children: [
|
|
1375
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1376
|
-
"div",
|
|
1377
|
-
{
|
|
1378
|
-
className: tooltip.cn(
|
|
1379
|
-
"px-4 py-2 break-words overflow-hidden overflow-x-hidden w-full min-w-0 rounded-2xl",
|
|
1380
|
-
msg.type === "user" ? "bg-primary text-primary-foreground shadow-sm" : "bg-muted text-foreground"
|
|
1381
|
-
),
|
|
1382
|
-
children: [
|
|
1383
|
-
msg.attachmentType === "document" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1384
|
-
"div",
|
|
1385
|
-
{
|
|
1386
|
-
className: "flex items-center justify-between mb-2 pb-2 border-b border-border min-w-0 overflow-hidden",
|
|
1387
|
-
children: [
|
|
1388
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 overflow-hidden", children: [
|
|
1389
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "w-4 h-4 flex-shrink-0" }),
|
|
1390
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium break-words", children: msg.attachmentName })
|
|
1391
|
-
] }),
|
|
1392
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-shrink-0", children: [
|
|
1393
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1394
|
-
tooltip.Button,
|
|
1395
|
-
{
|
|
1396
|
-
variant: "ghost",
|
|
1397
|
-
size: "sm",
|
|
1398
|
-
onClick: () => msg.documentContent && msg.attachmentName && handleDownloadDocument(msg.documentContent, msg.attachmentName),
|
|
1399
|
-
className: "h-6 px-2",
|
|
1400
|
-
title: "Baixar",
|
|
1401
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "w-3 h-3" })
|
|
1402
|
-
}
|
|
1403
|
-
),
|
|
1404
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1405
|
-
tooltip.Button,
|
|
1406
|
-
{
|
|
1407
|
-
variant: "ghost",
|
|
1408
|
-
size: "sm",
|
|
1409
|
-
onClick: () => msg.documentContent && msg.documentTitle && handleEditDocument(msg.documentContent, msg.documentTitle),
|
|
1410
|
-
className: "h-6 px-2",
|
|
1411
|
-
children: [
|
|
1412
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Edit, { className: "w-3 h-3 mr-1" }),
|
|
1413
|
-
"Editar"
|
|
1414
|
-
]
|
|
1415
|
-
}
|
|
1416
|
-
)
|
|
1417
|
-
] })
|
|
1418
|
-
]
|
|
1419
|
-
}
|
|
1420
|
-
),
|
|
1421
|
-
msg.attachmentType && msg.attachmentType !== "podcast" && msg.attachmentType !== "document" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1422
|
-
"div",
|
|
1423
|
-
{
|
|
1424
|
-
className: "flex items-center gap-2 mb-2 pb-2 border-b border-border min-w-0 overflow-hidden",
|
|
1425
|
-
children: [
|
|
1426
|
-
msg.attachmentType === "file" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "w-4 h-4 flex-shrink-0" }),
|
|
1427
|
-
msg.attachmentType === "audio" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Music, { className: "w-4 h-4 flex-shrink-0" }),
|
|
1428
|
-
msg.attachmentType === "image" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "w-4 h-4 flex-shrink-0" }),
|
|
1429
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-small break-words", children: msg.attachmentName })
|
|
1430
|
-
]
|
|
1431
|
-
}
|
|
1432
|
-
),
|
|
1433
|
-
msg.type === "user" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "whitespace-pre-wrap break-words", children: msg.content }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1434
|
-
(msg.content.includes("🔐") || msg.content.includes("❌")) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1435
|
-
"div",
|
|
1436
|
-
{
|
|
1437
|
-
className: "mb-3 p-3 border rounded-[var(--radius)] overflow-hidden bg-[var(--toast-error-bg)]/20 border-[var(--toast-error-border)]/30",
|
|
1438
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 min-w-0", children: [
|
|
1439
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "w-5 h-5 flex-shrink-0 mt-0.5 text-[var(--toast-error-icon)]" }),
|
|
1440
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1441
|
-
MarkdownMessage,
|
|
1442
|
-
{
|
|
1443
|
-
content: msg.content,
|
|
1444
|
-
className: "text-foreground"
|
|
1445
|
-
}
|
|
1446
|
-
) })
|
|
1447
|
-
] })
|
|
1448
|
-
}
|
|
1449
|
-
),
|
|
1450
|
-
!(msg.content.includes("🔐") || msg.content.includes("❌")) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1451
|
-
MarkdownMessage,
|
|
1452
|
-
{
|
|
1453
|
-
content: msg.content,
|
|
1454
|
-
className: "text-foreground"
|
|
1455
|
-
}
|
|
1456
|
-
)
|
|
1457
|
-
] }),
|
|
1458
|
-
msg.chartData && msg.chartConfig && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 w-full h-[300px] min-w-[300px]", children: /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartContainer, { config: msg.chartConfig, className: "h-full w-full", children: /* @__PURE__ */ jsxRuntime.jsxs(RechartsPrimitive.BarChart, { accessibilityLayer: true, data: msg.chartData, children: [
|
|
1459
|
-
/* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive.CartesianGrid, { vertical: false }),
|
|
1460
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1461
|
-
RechartsPrimitive.XAxis,
|
|
1462
|
-
{
|
|
1463
|
-
dataKey: "month",
|
|
1464
|
-
tickLine: false,
|
|
1465
|
-
tickMargin: 10,
|
|
1466
|
-
axisLine: false,
|
|
1467
|
-
tickFormatter: (value) => value.slice(0, 3)
|
|
1468
|
-
}
|
|
1469
|
-
),
|
|
1470
|
-
/* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartTooltip, { content: /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartTooltipContent, {}) }),
|
|
1471
|
-
/* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartLegend, { content: /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.ChartLegendContent, {}) }),
|
|
1472
|
-
Object.keys(msg.chartConfig).map((key) => /* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive.Bar, { dataKey: key, fill: `var(--color-${key})`, radius: 4 }, key))
|
|
1473
|
-
] }) }) }),
|
|
1474
|
-
msg.tableData && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 w-full max-w-full border rounded-[var(--radius)] overflow-x-auto custom-scrollbar relative", children: /* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.Table, { children: [
|
|
1475
|
-
msg.tableData.caption && /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.TableCaption, { children: msg.tableData.caption }),
|
|
1476
|
-
/* @__PURE__ */ jsxRuntime.jsx(richTextEditor.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.TableRow, { children: msg.tableData.headers.map((header, i) => /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.TableHead, { children: header }, i)) }) }),
|
|
1477
|
-
/* @__PURE__ */ jsxRuntime.jsx(richTextEditor.TableBody, { children: msg.tableData.rows.map((row, i) => /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.TableRow, { children: row.map((cell, j) => /* @__PURE__ */ jsxRuntime.jsx(richTextEditor.TableCell, { children: cell }, j)) }, i)) })
|
|
1478
|
-
] }) }),
|
|
1479
|
-
msg.attachmentType === "document" && msg.documentContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1480
|
-
"div",
|
|
1481
|
-
{
|
|
1482
|
-
className: "mt-3 pt-3 border-t border-border overflow-hidden",
|
|
1483
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1484
|
-
FormattedDocument,
|
|
1485
|
-
{
|
|
1486
|
-
content: msg.documentContent,
|
|
1487
|
-
maxPreviewLength: 250
|
|
1488
|
-
}
|
|
1489
|
-
)
|
|
1490
|
-
}
|
|
1491
|
-
),
|
|
1492
|
-
msg.attachmentType === "podcast" && msg.audioUrl && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1493
|
-
"div",
|
|
1494
|
-
{
|
|
1495
|
-
className: "mt-3 pt-3 border-t border-border overflow-hidden",
|
|
1496
|
-
children: [
|
|
1497
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3 min-w-0 overflow-hidden", children: [
|
|
1498
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-0 flex-1 overflow-hidden", children: [
|
|
1499
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1500
|
-
"div",
|
|
1501
|
-
{
|
|
1502
|
-
className: "w-6 h-6 flex items-center justify-center flex-shrink-0 rounded-[var(--radius-button)] bg-gradient-to-br from-[var(--chart-1)] via-[var(--chart-4)] to-[var(--chart-1)]",
|
|
1503
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Radio, { className: "w-3 h-3 text-white" })
|
|
1504
|
-
}
|
|
1505
|
-
),
|
|
1506
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium break-words", children: msg.attachmentName })
|
|
1507
|
-
] }),
|
|
1508
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1509
|
-
tooltip.Button,
|
|
1510
|
-
{
|
|
1511
|
-
variant: "ghost",
|
|
1512
|
-
size: "sm",
|
|
1513
|
-
onClick: () => msg.audioUrl && msg.attachmentName && handleDownloadPodcast(msg.audioUrl, msg.attachmentName),
|
|
1514
|
-
className: "h-6 px-2 flex-shrink-0",
|
|
1515
|
-
title: "Baixar",
|
|
1516
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "w-3 h-3" })
|
|
1517
|
-
}
|
|
1518
|
-
)
|
|
1519
|
-
] }),
|
|
1520
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1521
|
-
"div",
|
|
1522
|
-
{
|
|
1523
|
-
className: "rounded-[var(--radius)] p-2 overflow-hidden bg-gradient-to-r from-[var(--chart-1)]/10 to-[var(--chart-4)]/10",
|
|
1524
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1525
|
-
"audio",
|
|
1526
|
-
{
|
|
1527
|
-
controls: true,
|
|
1528
|
-
className: "w-full max-w-full h-10 outline-none",
|
|
1529
|
-
children: [
|
|
1530
|
-
/* @__PURE__ */ jsxRuntime.jsx("source", { src: msg.audioUrl, type: "audio/mpeg" }),
|
|
1531
|
-
"Seu navegador não suporta o elemento de áudio."
|
|
1532
|
-
]
|
|
1533
|
-
}
|
|
1534
|
-
)
|
|
1535
|
-
}
|
|
1536
|
-
)
|
|
1537
|
-
]
|
|
1538
|
-
}
|
|
1539
|
-
),
|
|
1540
|
-
msg.attachmentType === "search" && msg.searchResults && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1541
|
-
"div",
|
|
1542
|
-
{
|
|
1543
|
-
className: "mt-3 pt-3 border-t border-border space-y-4 overflow-hidden",
|
|
1544
|
-
children: [
|
|
1545
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-hidden", children: [
|
|
1546
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
|
|
1547
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-4 h-4 text-[var(--chart-4)]" }),
|
|
1548
|
-
/* @__PURE__ */ jsxRuntime.jsxs("h4", { className: "text-foreground", children: [
|
|
1549
|
-
"Resultados Encontrados (",
|
|
1550
|
-
msg.searchResults.length,
|
|
1551
|
-
")"
|
|
1552
|
-
] })
|
|
1553
|
-
] }),
|
|
1554
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2 overflow-hidden", children: msg.searchResults.map((result) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1555
|
-
"div",
|
|
1556
|
-
{
|
|
1557
|
-
onClick: () => handleOpenSearchResult(result),
|
|
1558
|
-
className: "p-3 rounded-[var(--radius)] border border-border transition-all cursor-pointer group overflow-hidden hover:bg-muted/50",
|
|
1559
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between gap-2 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 flex-1 min-w-0 overflow-hidden", children: [
|
|
1560
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-0.5 flex-shrink-0", children: [
|
|
1561
|
-
result.type === "document" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "w-4 h-4 text-[var(--chart-4)]" }),
|
|
1562
|
-
result.type === "project" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "w-4 h-4 text-[var(--chart-1)]" }),
|
|
1563
|
-
result.type === "conversation" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "w-4 h-4 text-[var(--chart-2)]" }),
|
|
1564
|
-
result.type === "file" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Folder, { className: "w-4 h-4 text-[var(--chart-3)]" }),
|
|
1565
|
-
result.type === "contact" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "w-4 h-4 text-[var(--chart-5)]" })
|
|
1566
|
-
] }),
|
|
1567
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 overflow-hidden", children: [
|
|
1568
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 min-w-0", children: [
|
|
1569
|
-
/* @__PURE__ */ jsxRuntime.jsx("h5", { className: "text-sm font-medium break-words flex-1 min-w-0 text-foreground", children: result.title }),
|
|
1570
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1571
|
-
"span",
|
|
1572
|
-
{
|
|
1573
|
-
className: "px-1.5 py-0.5 rounded-sm flex-shrink-0 self-start bg-[var(--chart-4)]/10 text-[var(--chart-4)]",
|
|
1574
|
-
children: [
|
|
1575
|
-
result.relevance,
|
|
1576
|
-
"%"
|
|
1577
|
-
]
|
|
1578
|
-
}
|
|
1579
|
-
)
|
|
1580
|
-
] }),
|
|
1581
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-1 line-clamp-2 break-words", children: result.description }),
|
|
1582
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mt-2 flex-wrap min-w-0", children: [
|
|
1583
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground flex items-center gap-1 min-w-0 max-w-full", children: [
|
|
1584
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "w-3 h-3 flex-shrink-0" }),
|
|
1585
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: result.path })
|
|
1586
|
-
] }),
|
|
1587
|
-
result.lastModified && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground flex items-center gap-1 flex-shrink-0", children: [
|
|
1588
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "w-3 h-3" }),
|
|
1589
|
-
result.lastModified
|
|
1590
|
-
] })
|
|
1591
|
-
] })
|
|
1592
|
-
] })
|
|
1593
|
-
] }) })
|
|
1594
|
-
},
|
|
1595
|
-
result.id
|
|
1596
|
-
)) })
|
|
1597
|
-
] }),
|
|
1598
|
-
msg.searchSources && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1599
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "mb-2 text-foreground", children: "Fontes Consultadas" }),
|
|
1600
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2 overflow-hidden", children: msg.searchSources.map((source, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1601
|
-
"div",
|
|
1602
|
-
{
|
|
1603
|
-
className: "px-3 py-1.5 border max-w-full rounded-[var(--radius-button)] bg-muted border-border",
|
|
1604
|
-
children: [
|
|
1605
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground break-words", children: source.name }),
|
|
1606
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground ml-1 whitespace-nowrap", children: [
|
|
1607
|
-
"(",
|
|
1608
|
-
source.count,
|
|
1609
|
-
")"
|
|
1610
|
-
] })
|
|
1611
|
-
]
|
|
1612
|
-
},
|
|
1613
|
-
index
|
|
1614
|
-
)) })
|
|
1615
|
-
] }),
|
|
1616
|
-
msg.searchCommands && msg.searchResults && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1617
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "mb-2 text-foreground", children: "O que você pode fazer com estes resultados" }),
|
|
1618
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-2", children: msg.searchCommands.map((command) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1619
|
-
"button",
|
|
1620
|
-
{
|
|
1621
|
-
onClick: () => handleExecuteSearchCommand(
|
|
1622
|
-
command.id,
|
|
1623
|
-
msg.content.replace("🔍 Pesquisa realizada com sucesso!", "").split('"')[1] || "pesquisa",
|
|
1624
|
-
msg.searchResults,
|
|
1625
|
-
msg.id
|
|
1626
|
-
),
|
|
1627
|
-
disabled: executingCommand === command.id,
|
|
1628
|
-
className: tooltip.cn(
|
|
1629
|
-
"flex items-start gap-2 p-2 rounded-[var(--radius)] border transition-all text-left disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1630
|
-
savedSearches.includes(msg.id) && command.id === "5" ? "border-[var(--toast-warning-border)] bg-[var(--toast-warning-bg)]/20" : "border-border bg-transparent hover:bg-muted/50"
|
|
1631
|
-
),
|
|
1632
|
-
children: [
|
|
1633
|
-
executingCommand === command.id ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-5 h-5 animate-spin flex-shrink-0 text-primary" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: command.icon }),
|
|
1634
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 overflow-hidden", children: [
|
|
1635
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-medium text-foreground break-words", children: command.id === "5" && savedSearches.includes(msg.id) ? "⭐ Pesquisa salva" : command.label }),
|
|
1636
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground break-words", children: executingCommand === command.id ? "Processando..." : command.description })
|
|
1637
|
-
] })
|
|
1638
|
-
]
|
|
1639
|
-
},
|
|
1640
|
-
command.id
|
|
1641
|
-
)) })
|
|
1642
|
-
] })
|
|
1643
|
-
]
|
|
1644
|
-
}
|
|
1645
|
-
)
|
|
1646
|
-
]
|
|
1647
|
-
}
|
|
1648
|
-
),
|
|
1649
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-1 px-2", children: [
|
|
1650
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: msg.timestamp.toLocaleTimeString("pt-BR", { hour: "2-digit", minute: "2-digit" }) }),
|
|
1651
|
-
enablePodcastGeneration && msg.type === "assistant" && msg.attachmentType !== "podcast" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1652
|
-
tooltip.Button,
|
|
1653
|
-
{
|
|
1654
|
-
variant: "ghost",
|
|
1655
|
-
size: "sm",
|
|
1656
|
-
onClick: () => handleGeneratePodcast(msg.id, msg.content),
|
|
1657
|
-
disabled: generatingPodcastId === msg.id,
|
|
1658
|
-
className: "h-6 w-6 p-0 disabled:opacity-50 text-muted-foreground",
|
|
1659
|
-
title: "Gerar Podcast",
|
|
1660
|
-
"aria-label": "Gerar Podcast",
|
|
1661
|
-
children: generatingPodcastId === msg.id ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Radio, { className: "w-3 h-3" })
|
|
1662
|
-
}
|
|
1663
|
-
),
|
|
1664
|
-
msg.type === "assistant" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 border-l border-border pl-2 ml-1", children: [
|
|
1665
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1666
|
-
tooltip.Button,
|
|
1667
|
-
{
|
|
1668
|
-
variant: "ghost",
|
|
1669
|
-
size: "icon",
|
|
1670
|
-
className: tooltip.cn(
|
|
1671
|
-
"h-6 w-6 rounded-full hover:bg-green-100 dark:hover:bg-green-900/20 hover:text-green-600",
|
|
1672
|
-
msg.evaluation === "like" && "text-green-600 bg-green-100 dark:bg-green-900/20"
|
|
1673
|
-
),
|
|
1674
|
-
onClick: () => handleEvaluationClick(msg.id),
|
|
1675
|
-
title: "Gostei",
|
|
1676
|
-
"aria-label": "Gostei",
|
|
1677
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ThumbsUp, { className: "h-3.5 w-3.5" })
|
|
1678
|
-
}
|
|
1679
|
-
),
|
|
1680
|
-
/* @__PURE__ */ jsxRuntime.jsxs(dropdownMenu.DropdownMenu, { children: [
|
|
1681
|
-
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1682
|
-
tooltip.Button,
|
|
1683
|
-
{
|
|
1684
|
-
variant: "ghost",
|
|
1685
|
-
size: "icon",
|
|
1686
|
-
className: tooltip.cn(
|
|
1687
|
-
"h-6 w-6 rounded-full hover:bg-red-100 dark:hover:bg-red-900/20 hover:text-red-600",
|
|
1688
|
-
msg.evaluation === "dislike" && "text-red-600 bg-red-100 dark:bg-red-900/20"
|
|
1689
|
-
),
|
|
1690
|
-
title: "Não gostei",
|
|
1691
|
-
"aria-label": "Não gostei",
|
|
1692
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ThumbsDown, { className: "h-3.5 w-3.5" })
|
|
1693
|
-
}
|
|
1694
|
-
) }),
|
|
1695
|
-
/* @__PURE__ */ jsxRuntime.jsxs(dropdownMenu.DropdownMenuContent, { align: "start", children: [
|
|
1696
|
-
feedbackOptions && feedbackOptions.length > 0 ? feedbackOptions.map((option, idx) => /* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuItem, { onClick: () => openFeedbackDialog(msg.id, option), children: option }, idx)) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1697
|
-
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuItem, { onClick: () => openFeedbackDialog(msg.id, "Não era o que eu procurava"), children: "Não era o que eu procurava" }),
|
|
1698
|
-
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuItem, { onClick: () => openFeedbackDialog(msg.id, "Informação incorreta"), children: "Informação incorreta" }),
|
|
1699
|
-
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuItem, { onClick: () => openFeedbackDialog(msg.id, "Resposta incompleta"), children: "Resposta incompleta" })
|
|
1700
|
-
] }),
|
|
1701
|
-
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuItem, { onClick: () => openFeedbackDialog(msg.id, null), children: "Outros..." })
|
|
1702
|
-
] })
|
|
1703
|
-
] })
|
|
1704
|
-
] }),
|
|
1705
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1706
|
-
tooltip.Button,
|
|
1707
|
-
{
|
|
1708
|
-
variant: "ghost",
|
|
1709
|
-
size: "sm",
|
|
1710
|
-
onClick: () => handleCopyMessage(msg.content, msg.id),
|
|
1711
|
-
className: `h-6 w-6 p-0 ${copiedId === msg.id ? "text-[var(--toast-success-icon)]" : "text-muted-foreground"}`,
|
|
1712
|
-
"aria-label": copiedId === msg.id ? "Copiado" : "Copiar mensagem",
|
|
1713
|
-
children: copiedId === msg.id ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3 h-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-3 h-3" })
|
|
1714
|
-
}
|
|
1715
|
-
)
|
|
1716
|
-
] })
|
|
1717
|
-
] })
|
|
1718
|
-
]
|
|
1719
|
-
},
|
|
1720
|
-
msg.id
|
|
1721
|
-
)),
|
|
1722
|
-
isProcessing && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1723
|
-
framerMotion.motion.div,
|
|
1724
|
-
{
|
|
1725
|
-
initial: { opacity: 0, y: 10 },
|
|
1726
|
-
animate: { opacity: 1, y: 0 },
|
|
1727
|
-
className: "flex gap-2 justify-start",
|
|
1728
|
-
children: [
|
|
1729
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(XerticaOrbe.XerticaOrbe, { size: 32 }) }),
|
|
1730
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1731
|
-
"div",
|
|
1732
|
-
{
|
|
1733
|
-
className: "px-4 py-3 bg-muted rounded-2xl",
|
|
1734
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
|
|
1735
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1736
|
-
framerMotion.motion.div,
|
|
1737
|
-
{
|
|
1738
|
-
className: "w-2 h-2 rounded-full bg-muted-foreground",
|
|
1739
|
-
animate: { y: [0, -8, 0] },
|
|
1740
|
-
transition: { repeat: Infinity, duration: 0.6, delay: 0 }
|
|
1741
|
-
}
|
|
1742
|
-
),
|
|
1743
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1744
|
-
framerMotion.motion.div,
|
|
1745
|
-
{
|
|
1746
|
-
className: "w-2 h-2 rounded-full bg-muted-foreground",
|
|
1747
|
-
animate: { y: [0, -8, 0] },
|
|
1748
|
-
transition: { repeat: Infinity, duration: 0.6, delay: 0.2 }
|
|
1749
|
-
}
|
|
1750
|
-
),
|
|
1751
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1752
|
-
framerMotion.motion.div,
|
|
1753
|
-
{
|
|
1754
|
-
className: "w-2 h-2 rounded-full bg-muted-foreground",
|
|
1755
|
-
animate: { y: [0, -8, 0] },
|
|
1756
|
-
transition: { repeat: Infinity, duration: 0.6, delay: 0.4 }
|
|
1757
|
-
}
|
|
1758
|
-
)
|
|
1759
|
-
] })
|
|
1760
|
-
}
|
|
1761
|
-
)
|
|
1762
|
-
]
|
|
1763
|
-
}
|
|
1764
|
-
),
|
|
1765
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: messagesEndRef })
|
|
1766
|
-
] }) }) }),
|
|
1767
|
-
(abaSelecionada === "historico" && showHistory || abaSelecionada === "favoritos" && showFavorites) && /* @__PURE__ */ jsxRuntime.jsx(input.ScrollArea, { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `p-4 ${isFullPage ? "mx-auto w-full max-w-6xl" : ""}`, children: [
|
|
1768
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1769
|
-
tooltip.Button,
|
|
1770
|
-
{
|
|
1771
|
-
variant: "outline",
|
|
1772
|
-
size: "sm",
|
|
1773
|
-
onClick: handleNovaConversa,
|
|
1774
|
-
className: "w-full mb-4 justify-start",
|
|
1775
|
-
children: [
|
|
1776
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "w-4 h-4 mr-2" }),
|
|
1777
|
-
"Nova Conversa"
|
|
1778
|
-
]
|
|
1779
|
-
}
|
|
1780
|
-
),
|
|
1781
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: conversasFiltradas.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8", children: [
|
|
1782
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heart, { className: "w-12 h-12 mx-auto text-muted-foreground/50 mb-2" }),
|
|
1783
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: abaSelecionada === "favoritos" ? "Nenhuma conversa favorita ainda" : "Nenhuma conversa no histórico" })
|
|
1784
|
-
] }) : conversasFiltradas.map((conversa) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1785
|
-
"div",
|
|
1786
|
-
{
|
|
1787
|
-
onClick: () => handleSelecionarConversa(conversa.id),
|
|
1788
|
-
className: tooltip.cn(
|
|
1789
|
-
"p-3 rounded-[var(--radius)] cursor-pointer transition-colors duration-200 border",
|
|
1790
|
-
conversa.id === conversaAtual ? "border-primary bg-primary/10" : "border-border hover:bg-muted"
|
|
1791
|
-
),
|
|
1792
|
-
children: [
|
|
1793
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-1", children: [
|
|
1794
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground truncate flex-1", children: conversa.title }),
|
|
1795
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1796
|
-
tooltip.Button,
|
|
1797
|
-
{
|
|
1798
|
-
variant: "ghost",
|
|
1799
|
-
size: "sm",
|
|
1800
|
-
onClick: (e) => {
|
|
1801
|
-
e.stopPropagation();
|
|
1802
|
-
handleToggleFavoritaConversa(conversa.id);
|
|
1803
|
-
},
|
|
1804
|
-
className: "h-6 w-6 p-0 flex-shrink-0 ml-1",
|
|
1805
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1806
|
-
lucideReact.Heart,
|
|
1807
|
-
{
|
|
1808
|
-
className: tooltip.cn(
|
|
1809
|
-
"w-3 h-3",
|
|
1810
|
-
conversa.isFavorite ? "text-destructive fill-current" : "text-muted-foreground"
|
|
1811
|
-
)
|
|
1812
|
-
}
|
|
1813
|
-
)
|
|
1814
|
-
}
|
|
1815
|
-
)
|
|
1816
|
-
] }),
|
|
1817
|
-
conversa.lastMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground truncate mb-1", children: conversa.lastMessage }),
|
|
1818
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: conversa.timestamp })
|
|
1819
|
-
]
|
|
1820
|
-
},
|
|
1821
|
-
conversa.id
|
|
1822
|
-
)) })
|
|
1823
|
-
] }) })
|
|
1824
|
-
] }),
|
|
1825
|
-
abaSelecionada === "chat" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1826
|
-
ModernChatInput,
|
|
1827
|
-
{
|
|
1828
|
-
value: mensagem,
|
|
1829
|
-
onChange: setMensagem,
|
|
1830
|
-
onSubmit: handleEnviarMensagem,
|
|
1831
|
-
onFileUpload: enableFileAttachment ? () => {
|
|
1832
|
-
var _a;
|
|
1833
|
-
return (_a = fileInputRef.current) == null ? void 0 : _a.click();
|
|
1834
|
-
} : void 0,
|
|
1835
|
-
onAudioUpload: enableAudioInput ? () => {
|
|
1836
|
-
var _a;
|
|
1837
|
-
return (_a = audioInputRef.current) == null ? void 0 : _a.click();
|
|
1838
|
-
} : void 0,
|
|
1839
|
-
placeholder: "Envie uma mensagem para Xertica",
|
|
1840
|
-
disabled: isProcessing,
|
|
1841
|
-
isFullPage,
|
|
1842
|
-
enableAudioInput,
|
|
1843
|
-
enableFileAttachment,
|
|
1844
|
-
enableDocumentCreation,
|
|
1845
|
-
enablePodcastGeneration,
|
|
1846
|
-
enableSearch
|
|
1847
|
-
}
|
|
1848
|
-
)
|
|
1849
|
-
]
|
|
1850
|
-
}
|
|
1851
|
-
) })
|
|
1852
|
-
]
|
|
1853
|
-
}
|
|
1854
|
-
),
|
|
1855
|
-
/* @__PURE__ */ jsxRuntime.jsx(richTextEditor.Dialog, { open: evaluationState.isOpen, onOpenChange: (open) => !open && setEvaluationState((prev) => ({ ...prev, isOpen: false })), children: /* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.DialogContent, { className: "sm:max-w-[600px]", children: [
|
|
1856
|
-
/* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.DialogHeader, { children: [
|
|
1857
|
-
/* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogTitle, { className: "pr-8", children: evaluationState.category ? `Enviar feedback: ${evaluationState.category}` : "Enviar feedback" }),
|
|
1858
|
-
/* @__PURE__ */ jsxRuntime.jsx(richTextEditor.DialogDescription, { children: evaluationState.category ? "Gostaria de adicionar algum comentário? (Opcional)" : "Conte-nos por que essa resposta não foi útil para que possamos melhorar." })
|
|
1859
|
-
] }),
|
|
1860
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4 py-4 px-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1861
|
-
richTextEditor.Textarea,
|
|
1862
|
-
{
|
|
1863
|
-
className: "min-h-[100px]",
|
|
1864
|
-
placeholder: evaluationState.category ? "Comentário adicional..." : "Descreva o motivo...",
|
|
1865
|
-
"aria-label": evaluationState.category ? "Comentário adicional" : "Descreva o motivo",
|
|
1866
|
-
value: evaluationState.reason,
|
|
1867
|
-
onChange: (e) => setEvaluationState((prev) => ({ ...prev, reason: e.target.value })),
|
|
1868
|
-
rows: 4
|
|
1869
|
-
}
|
|
1870
|
-
) }),
|
|
1871
|
-
/* @__PURE__ */ jsxRuntime.jsxs(richTextEditor.DialogFooter, { children: [
|
|
1872
|
-
/* @__PURE__ */ jsxRuntime.jsx(tooltip.Button, { variant: "outline", onClick: () => setEvaluationState((prev) => ({ ...prev, isOpen: false })), children: "Cancelar" }),
|
|
1873
|
-
/* @__PURE__ */ jsxRuntime.jsx(tooltip.Button, { onClick: handleSubmitDislike, disabled: !evaluationState.category && !evaluationState.reason.trim(), children: evaluationState.category ? "Confirmar e Enviar" : "Enviar Feedback" })
|
|
1874
|
-
] })
|
|
1875
|
-
] }) })
|
|
1876
|
-
] });
|
|
1877
|
-
}
|
|
1878
|
-
const elegantTheme = {
|
|
1879
|
-
'code[class*="language-"]': {
|
|
1880
|
-
color: "var(--foreground)",
|
|
1881
|
-
fontFamily: "var(--font-mono)",
|
|
1882
|
-
fontSize: "0.875rem",
|
|
1883
|
-
textAlign: "left",
|
|
1884
|
-
whiteSpace: "pre",
|
|
1885
|
-
wordSpacing: "normal",
|
|
1886
|
-
wordBreak: "normal",
|
|
1887
|
-
lineHeight: "1.6",
|
|
1888
|
-
tabSize: 2,
|
|
1889
|
-
hyphens: "none"
|
|
1890
|
-
},
|
|
1891
|
-
'pre[class*="language-"]': {
|
|
1892
|
-
color: "var(--foreground)",
|
|
1893
|
-
fontFamily: "var(--font-mono)",
|
|
1894
|
-
fontSize: "0.875rem",
|
|
1895
|
-
textAlign: "left",
|
|
1896
|
-
whiteSpace: "pre",
|
|
1897
|
-
wordSpacing: "normal",
|
|
1898
|
-
wordBreak: "normal",
|
|
1899
|
-
lineHeight: "1.6",
|
|
1900
|
-
tabSize: 2,
|
|
1901
|
-
hyphens: "none",
|
|
1902
|
-
padding: "1rem",
|
|
1903
|
-
margin: 0,
|
|
1904
|
-
overflow: "auto",
|
|
1905
|
-
background: "transparent"
|
|
1906
|
-
},
|
|
1907
|
-
"comment": {
|
|
1908
|
-
color: "var(--muted-foreground)",
|
|
1909
|
-
fontStyle: "italic"
|
|
1910
|
-
},
|
|
1911
|
-
"prolog": {
|
|
1912
|
-
color: "var(--muted-foreground)"
|
|
1913
|
-
},
|
|
1914
|
-
"doctype": {
|
|
1915
|
-
color: "var(--muted-foreground)"
|
|
1916
|
-
},
|
|
1917
|
-
"cdata": {
|
|
1918
|
-
color: "var(--muted-foreground)"
|
|
1919
|
-
},
|
|
1920
|
-
"punctuation": {
|
|
1921
|
-
color: "var(--muted-foreground)"
|
|
1922
|
-
},
|
|
1923
|
-
"property": {
|
|
1924
|
-
color: "var(--chart-4)"
|
|
1925
|
-
},
|
|
1926
|
-
"tag": {
|
|
1927
|
-
color: "var(--chart-1)"
|
|
1928
|
-
},
|
|
1929
|
-
"boolean": {
|
|
1930
|
-
color: "var(--chart-5)"
|
|
1931
|
-
},
|
|
1932
|
-
"number": {
|
|
1933
|
-
color: "var(--chart-5)"
|
|
1934
|
-
},
|
|
1935
|
-
"constant": {
|
|
1936
|
-
color: "var(--chart-5)"
|
|
1937
|
-
},
|
|
1938
|
-
"symbol": {
|
|
1939
|
-
color: "var(--chart-5)"
|
|
1940
|
-
},
|
|
1941
|
-
"deleted": {
|
|
1942
|
-
color: "var(--chart-5)"
|
|
1943
|
-
},
|
|
1944
|
-
"selector": {
|
|
1945
|
-
color: "var(--chart-2)"
|
|
1946
|
-
},
|
|
1947
|
-
"attr-name": {
|
|
1948
|
-
color: "var(--chart-4)"
|
|
1949
|
-
},
|
|
1950
|
-
"string": {
|
|
1951
|
-
color: "var(--chart-2)"
|
|
1952
|
-
},
|
|
1953
|
-
"char": {
|
|
1954
|
-
color: "var(--chart-2)"
|
|
1955
|
-
},
|
|
1956
|
-
"builtin": {
|
|
1957
|
-
color: "var(--chart-4)"
|
|
1958
|
-
},
|
|
1959
|
-
"inserted": {
|
|
1960
|
-
color: "var(--chart-2)"
|
|
1961
|
-
},
|
|
1962
|
-
"operator": {
|
|
1963
|
-
color: "var(--primary)"
|
|
1964
|
-
},
|
|
1965
|
-
"entity": {
|
|
1966
|
-
color: "var(--chart-4)"
|
|
1967
|
-
},
|
|
1968
|
-
"url": {
|
|
1969
|
-
color: "var(--chart-1)"
|
|
1970
|
-
},
|
|
1971
|
-
".language-css .token.string": {
|
|
1972
|
-
color: "var(--chart-2)"
|
|
1973
|
-
},
|
|
1974
|
-
".style .token.string": {
|
|
1975
|
-
color: "var(--chart-2)"
|
|
1976
|
-
},
|
|
1977
|
-
"atrule": {
|
|
1978
|
-
color: "var(--chart-3)"
|
|
1979
|
-
},
|
|
1980
|
-
"attr-value": {
|
|
1981
|
-
color: "var(--chart-2)"
|
|
1982
|
-
},
|
|
1983
|
-
"keyword": {
|
|
1984
|
-
color: "var(--chart-3)"
|
|
1985
|
-
},
|
|
1986
|
-
"function": {
|
|
1987
|
-
color: "var(--chart-1)"
|
|
1988
|
-
},
|
|
1989
|
-
"class-name": {
|
|
1990
|
-
color: "var(--chart-4)"
|
|
1991
|
-
},
|
|
1992
|
-
"regex": {
|
|
1993
|
-
color: "var(--chart-5)"
|
|
1994
|
-
},
|
|
1995
|
-
"important": {
|
|
1996
|
-
color: "var(--chart-5)",
|
|
1997
|
-
fontWeight: "bold"
|
|
1998
|
-
},
|
|
1999
|
-
"variable": {
|
|
2000
|
-
color: "var(--chart-5)"
|
|
2001
|
-
}
|
|
2002
|
-
};
|
|
2003
|
-
const CodeBlock = ({
|
|
2004
|
-
code,
|
|
2005
|
-
language = "tsx",
|
|
2006
|
-
filename,
|
|
2007
|
-
showLineNumbers = false
|
|
2008
|
-
}) => {
|
|
2009
|
-
const [copied, setCopied] = React.useState(false);
|
|
2010
|
-
const handleCopy = async () => {
|
|
2011
|
-
try {
|
|
2012
|
-
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
2013
|
-
try {
|
|
2014
|
-
await navigator.clipboard.writeText(code);
|
|
2015
|
-
} catch (clipboardError) {
|
|
2016
|
-
if (clipboardError.name === "NotAllowedError" || clipboardError.message.includes("permissions policy")) {
|
|
2017
|
-
throw new Error("Clipboard permission denied, falling back");
|
|
2018
|
-
}
|
|
2019
|
-
throw clipboardError;
|
|
2020
|
-
}
|
|
2021
|
-
} else {
|
|
2022
|
-
throw new Error("Clipboard API not available");
|
|
2023
|
-
}
|
|
2024
|
-
setCopied(true);
|
|
2025
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
2026
|
-
} catch (err) {
|
|
2027
|
-
try {
|
|
2028
|
-
const textArea = document.createElement("textarea");
|
|
2029
|
-
textArea.value = code;
|
|
2030
|
-
textArea.style.position = "fixed";
|
|
2031
|
-
textArea.style.left = "-999999px";
|
|
2032
|
-
textArea.style.top = "-999999px";
|
|
2033
|
-
document.body.appendChild(textArea);
|
|
2034
|
-
textArea.focus();
|
|
2035
|
-
textArea.select();
|
|
2036
|
-
const successful = document.execCommand("copy");
|
|
2037
|
-
document.body.removeChild(textArea);
|
|
2038
|
-
if (successful) {
|
|
2039
|
-
setCopied(true);
|
|
2040
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
2041
|
-
} else {
|
|
2042
|
-
console.error("Failed to copy text: execCommand returned false");
|
|
2043
|
-
}
|
|
2044
|
-
} catch (fallbackErr) {
|
|
2045
|
-
console.error("All copy methods failed:", fallbackErr);
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
};
|
|
2049
|
-
const codeString = typeof code === "string" ? code : String(code || "");
|
|
2050
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group rounded-[var(--radius)] border border-border overflow-hidden bg-muted/30", children: [
|
|
2051
|
-
filename && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 py-2 bg-muted border-b border-border", children: [
|
|
2052
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-mono", children: filename }),
|
|
2053
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground uppercase", children: language })
|
|
2054
|
-
] }),
|
|
2055
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
2056
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2057
|
-
tooltip.Button,
|
|
2058
|
-
{
|
|
2059
|
-
variant: "ghost",
|
|
2060
|
-
size: "icon",
|
|
2061
|
-
className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10 bg-background/80 hover:bg-background",
|
|
2062
|
-
onClick: handleCopy,
|
|
2063
|
-
"aria-label": copied ? "Copiado" : "Copiar código",
|
|
2064
|
-
children: copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-4 h-4 text-[var(--toast-success-icon)]", "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
2065
|
-
}
|
|
2066
|
-
),
|
|
2067
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto w-full max-w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2068
|
-
reactSyntaxHighlighter.Prism,
|
|
2069
|
-
{
|
|
2070
|
-
language,
|
|
2071
|
-
style: elegantTheme,
|
|
2072
|
-
showLineNumbers,
|
|
2073
|
-
wrapLines: true,
|
|
2074
|
-
customStyle: {
|
|
2075
|
-
margin: 0,
|
|
2076
|
-
padding: "1rem",
|
|
2077
|
-
background: "transparent",
|
|
2078
|
-
fontSize: "inherit"
|
|
2079
|
-
},
|
|
2080
|
-
codeTagProps: {
|
|
2081
|
-
className: "text-[length:inherit]"
|
|
2082
|
-
},
|
|
2083
|
-
children: codeString
|
|
2084
|
-
}
|
|
2085
|
-
) })
|
|
2086
|
-
] })
|
|
2087
|
-
] });
|
|
2088
|
-
};
|
|
2089
|
-
exports.CodeBlock = CodeBlock;
|
|
2090
|
-
exports.FormattedDocument = FormattedDocument;
|
|
2091
|
-
exports.MarkdownMessage = MarkdownMessage;
|
|
2092
|
-
exports.ModernChatInput = ModernChatInput;
|
|
2093
|
-
exports.XerticaAssistant = XerticaAssistant;
|
|
2094
|
-
exports.gerarResposta = gerarResposta;
|