xertica-ui 2.1.3 → 2.1.4
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 +15 -0
- package/README.md +1 -1
- package/assets/xertica-logo.svg +37 -37
- package/assets/xertica-x-logo.svg +20 -20
- package/components/assistant/index.ts +6 -6
- package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +97 -0
- package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -0
- package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -0
- package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +86 -0
- package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +77 -0
- package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +573 -0
- package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +65 -0
- package/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.tsx +41 -0
- package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +98 -0
- package/components/assistant/xertica-assistant/parts/index.ts +16 -0
- package/components/assistant/xertica-assistant/types.ts +139 -0
- package/components/assistant/xertica-assistant/use-assistant.ts +5 -10
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +125 -1096
- package/components/blocks/card-patterns/ActivityCard.tsx +72 -72
- package/components/blocks/card-patterns/FeatureCard.tsx +100 -100
- package/components/blocks/card-patterns/NotificationCard.tsx +127 -127
- package/components/blocks/card-patterns/ProfileCard.tsx +84 -84
- package/components/blocks/card-patterns/ProjectCard.tsx +89 -89
- package/components/blocks/card-patterns/QuickActionCard.tsx +62 -62
- package/components/blocks/card-patterns/card-patterns.stories.tsx +445 -445
- package/components/blocks/card-patterns/index.ts +17 -17
- package/components/blocks/index.ts +1 -1
- package/components/brand/index.ts +6 -6
- package/components/brand/theme-toggle/ThemeToggle.tsx +8 -27
- package/components/brand/xertica-provider/XerticaProvider.tsx +48 -48
- package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
- package/components/brand/xertica-provider/xertica-provider.test.tsx +52 -52
- package/components/examples/MapExamples.tsx +282 -282
- package/components/examples/SimpleFilterableMap.tsx +191 -191
- package/components/examples/index.ts +51 -51
- package/components/figma/ImageWithFallback.tsx +27 -27
- package/components/hooks/index.ts +10 -7
- package/components/hooks/use-layout-shortcuts.ts +46 -0
- package/components/index.ts +5 -5
- package/components/layout/header/header.test.tsx +8 -8
- package/components/layout/header/header.tsx +4 -4
- package/components/layout/index.ts +2 -2
- package/components/layout/sidebar/sidebar.mdx +1 -1
- package/components/layout/sidebar/sidebar.test.tsx +11 -11
- package/components/layout/sidebar/sidebar.tsx +1 -31
- package/components/layout/sidebar/use-sidebar.ts +2 -11
- package/components/media/FloatingMediaWrapper.tsx +11 -11
- package/components/media/audio-player/AudioPlayer.tsx +140 -215
- package/components/media/audio-player/use-audio-player.ts +298 -0
- package/components/media/index.ts +3 -3
- package/components/pages/home-content/HomeContent.tsx +7 -7
- package/components/pages/home-content/home-content.mdx +62 -62
- package/components/pages/home-page/HomePage.stories.tsx +39 -39
- package/components/pages/home-page/home-page.mdx +53 -53
- package/components/pages/index.ts +8 -8
- 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/template-page.mdx +53 -53
- package/components/public-api-smoke.test.tsx +52 -52
- package/components/shared/CustomTooltipContent.tsx +52 -0
- package/components/shared/assistant-utils.ts +43 -43
- package/components/ui/accordion/accordion.mdx +8 -8
- package/components/ui/accordion/accordion.stories.tsx +53 -53
- package/components/ui/alert/alert.mdx +8 -8
- package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
- package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
- package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
- package/components/ui/avatar/avatar.mdx +8 -8
- package/components/ui/badge/badge.mdx +8 -8
- package/components/ui/badge/badge.tsx +9 -9
- package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
- package/components/ui/button/button.mdx +8 -8
- package/components/ui/calendar/calendar.mdx +8 -8
- package/components/ui/calendar/calendar.tsx +258 -258
- package/components/ui/card/card.mdx +8 -8
- package/components/ui/card/card.stories.tsx +245 -245
- package/components/ui/carousel/carousel.mdx +8 -8
- package/components/ui/chart/chart.mdx +8 -8
- package/components/ui/chart/chart.stories.tsx +1303 -1303
- package/components/ui/chart/chart.test.tsx +154 -154
- package/components/ui/chart/chart.tsx +2367 -2367
- package/components/ui/checkbox/checkbox.mdx +8 -8
- package/components/ui/checkbox/checkbox.stories.tsx +20 -20
- package/components/ui/collapsible/collapsible.mdx +8 -8
- package/components/ui/command/command.mdx +8 -8
- package/components/ui/context-menu/context-menu.mdx +8 -8
- package/components/ui/dialog/dialog.mdx +8 -8
- package/components/ui/drawer/drawer.mdx +8 -8
- package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
- package/components/ui/empty/empty.mdx +8 -8
- package/components/ui/file-upload/file-upload.mdx +8 -8
- package/components/ui/google-maps-loader/google-maps-loader.tsx +2 -2
- package/components/ui/hover-card/hover-card.mdx +8 -8
- package/components/ui/input/input.mdx +8 -8
- package/components/ui/input-otp/input-otp.mdx +8 -8
- package/components/ui/input-otp/input-otp.stories.tsx +6 -6
- package/components/ui/label/label.mdx +8 -8
- package/components/ui/map/map.mdx +8 -8
- package/components/ui/map/map.stories.tsx +51 -51
- package/components/ui/map/map.tsx +2 -2
- package/components/ui/menubar/menubar.mdx +8 -8
- package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
- package/components/ui/notification-badge/notification-badge.mdx +8 -8
- package/components/ui/pagination/pagination.mdx +8 -8
- package/components/ui/popover/popover.mdx +8 -8
- package/components/ui/progress/progress.mdx +8 -8
- package/components/ui/progress/progress.tsx +68 -68
- package/components/ui/radio-group/radio-group.mdx +8 -8
- package/components/ui/rating/rating.mdx +8 -8
- package/components/ui/resizable/resizable.mdx +8 -8
- package/components/ui/route-map/route-map.mdx +8 -8
- package/components/ui/route-map/route-map.stories.tsx +54 -54
- package/components/ui/route-map/route-map.tsx +2 -2
- package/components/ui/scroll-area/scroll-area.mdx +8 -8
- package/components/ui/search/search.mdx +8 -8
- package/components/ui/select/select.mdx +8 -8
- package/components/ui/select/select.stories.tsx +9 -9
- package/components/ui/separator/separator.mdx +8 -8
- package/components/ui/sheet/sheet.mdx +8 -8
- package/components/ui/sheet/sheet.stories.tsx +95 -95
- package/components/ui/simple-map/simple-map.mdx +8 -8
- package/components/ui/simple-map/simple-map.stories.tsx +48 -48
- package/components/ui/skeleton/skeleton.mdx +8 -8
- package/components/ui/slider/slider.mdx +8 -8
- package/components/ui/sonner/sonner.mdx +8 -8
- package/components/ui/stats-card/stats-card.mdx +8 -8
- package/components/ui/stepper/stepper.mdx +8 -8
- package/components/ui/switch/switch.mdx +8 -8
- package/components/ui/switch/switch.stories.tsx +20 -20
- package/components/ui/table/table.mdx +8 -8
- package/components/ui/tabs/tabs.mdx +8 -8
- package/components/ui/tabs/tabs.stories.tsx +26 -26
- package/components/ui/textarea/textarea.mdx +8 -8
- package/components/ui/timeline/timeline.mdx +8 -8
- package/components/ui/toggle/toggle.mdx +8 -8
- package/components/ui/toggle-group/toggle-group.mdx +8 -8
- package/components/ui/tooltip/tooltip.mdx +8 -8
- package/components/ui/tree-view/tree-view.mdx +8 -8
- package/components.json +1512 -1512
- package/contexts/ApiKeyContext.tsx +72 -72
- package/contexts/AssistenteContext.tsx +17 -54
- package/contexts/BrandColorsContext.tsx +32 -43
- package/contexts/LanguageContext.tsx +13 -13
- package/contexts/LayoutContext.test.tsx +11 -11
- package/contexts/LayoutContext.tsx +24 -50
- package/contexts/ThemeContext.tsx +26 -26
- package/contexts/theme-data.ts +4 -4
- package/dist/{AssistantChart-DoZCyS5r.cjs → AssistantChart-9w31gdAb.cjs} +4 -4
- package/dist/{AssistantChart-CldVCVDe.cjs → AssistantChart-BAudAfne.cjs} +5 -5
- package/dist/{use-mobile-DRB3BQgD.cjs → AssistantChart-BAx9VQvb.cjs} +209 -1070
- package/dist/{AssistantChart-Cu3m7RBo.js → AssistantChart-BP8upjMk.js} +5 -5
- package/dist/{use-mobile-BvYdisLP.js → AssistantChart-CVko2A1W.js} +171 -1025
- package/dist/{AssistantChart-C_hwFRRr.js → AssistantChart-CVzmmhx4.js} +4 -4
- package/dist/{AudioPlayer-C12BjQBV.cjs → AudioPlayer-1ypwE2Wh.cjs} +126 -187
- package/dist/{AudioPlayer-DcFKRJE_.js → AudioPlayer-DuKXrCfy.js} +80 -141
- package/dist/CustomTooltipContent-DHjkY0ww.js +40 -0
- package/dist/CustomTooltipContent-c_K-DWRr.cjs +56 -0
- package/dist/{ThemeContext-BoH4NLfN.js → LanguageContext-BwhwC3G2.js} +27 -104
- package/dist/{ThemeContext-r69W20Xg.cjs → LanguageContext-DvUt5jBg.cjs} +27 -104
- package/dist/{LayoutContext-BvK-ggDa.cjs → LayoutContext-BDmcZfMH.cjs} +8 -20
- package/dist/{LayoutContext-BAql6ZRY.js → LayoutContext-dbQvdC4O.js} +8 -20
- package/dist/{ThemeContext-C2EwAPDt.js → ThemeContext-BbBNoFTG.js} +2 -2
- package/dist/{ThemeContext-vTjumZeM.cjs → ThemeContext-Cmr8Ex8H.cjs} +2 -2
- package/dist/ThemeContext-RTy1m2Uq.js +82 -0
- package/dist/ThemeContext-bSzuOit2.cjs +81 -0
- package/dist/VerifyEmailPage-BE-L9mB7.js +2828 -0
- package/dist/{VerifyEmailPage-Cwi3kbol.cjs → VerifyEmailPage-Bae2cBXT.cjs} +7 -7
- package/dist/VerifyEmailPage-CR7kb5df.cjs +2827 -0
- package/dist/{VerifyEmailPage-C0c2e5n0.js → VerifyEmailPage-C_ihbcth.js} +6 -6
- package/dist/VerifyEmailPage-CbgjOF0v.js +2828 -0
- package/dist/{VerifyEmailPage-DvMLZgFt.js → VerifyEmailPage-CdYPSJoO.js} +1 -1
- package/dist/{VerifyEmailPage-CYXtbKi3.cjs → VerifyEmailPage-DMBh4NM9.cjs} +1 -1
- package/dist/VerifyEmailPage-Dt7zgA4w.cjs +2827 -0
- package/dist/{XerticaProvider-CEoWMTxu.js → XerticaProvider-BITjgC5p.js} +2 -2
- package/dist/{XerticaProvider-CllrbMEJ.cjs → XerticaProvider-By8q3Roe.cjs} +2 -2
- package/dist/{XerticaProvider-cI9hSs27.cjs → XerticaProvider-CW9hpCdF.cjs} +9 -8
- package/dist/{XerticaProvider-DDuiIcKo.js → XerticaProvider-siSt9uG2.js} +5 -4
- package/dist/{LanguageSelector-D6uacAIM.cjs → XerticaXLogo-D8jf0SNv.cjs} +86 -102
- package/dist/{LanguageSelector-B5YfbHra.js → XerticaXLogo-fAJMy3H4.js} +87 -103
- 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 +1 -1
- package/dist/assistant.es.js +1 -1
- package/dist/brand.cjs.js +2 -2
- package/dist/brand.es.js +2 -2
- package/dist/components/assistant/xertica-assistant/parts/AssistantCollapsedView.d.ts +13 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantConversationList.d.ts +16 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.d.ts +17 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.d.ts +19 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantHeader.d.ts +11 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantMessageBubble.d.ts +29 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantTabBar.d.ts +13 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantTypingIndicator.d.ts +4 -0
- package/dist/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.d.ts +17 -0
- package/dist/components/assistant/xertica-assistant/parts/index.d.ts +16 -0
- package/dist/components/assistant/xertica-assistant/types.d.ts +106 -0
- package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +1 -2
- package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +2 -96
- package/dist/components/hooks/index.d.ts +3 -0
- package/dist/components/hooks/use-layout-shortcuts.d.ts +22 -0
- package/dist/components/media/audio-player/AudioPlayer.d.ts +4 -1
- package/dist/components/media/audio-player/use-audio-player.d.ts +72 -0
- package/dist/components/shared/CustomTooltipContent.d.ts +20 -0
- package/dist/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts +2 -2
- package/dist/contexts/AssistenteContext.d.ts +10 -49
- 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 +30 -10
- package/dist/hooks.es.js +25 -4
- package/dist/index-CkTUgOwX.js +8 -0
- package/dist/{index-COtD8bRW.cjs → index-D3RLKRAs.cjs} +1 -1
- package/dist/index.cjs.js +11 -11
- package/dist/index.es.js +11 -11
- package/dist/index.umd.js +454 -1027
- package/dist/layout.cjs.js +3 -10
- package/dist/layout.es.js +3 -10
- 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/{sidebar-CK_0ZQHj.cjs → sidebar-CVUGHOS_.cjs} +10 -57
- package/dist/{sidebar-CUuOvYhK.js → sidebar-CmvwjnVb.js} +10 -40
- package/dist/ui.cjs.js +4 -4
- package/dist/ui.es.js +4 -4
- package/dist/use-audio-player-Bkh23vQ3.js +177 -0
- package/dist/use-audio-player-Dn1NR9xN.cjs +176 -0
- package/dist/utils/color-utils.d.ts +51 -0
- package/dist/{xertica-assistant-dyP7KHM5.cjs → xertica-assistant-B1IaHXnB.cjs} +388 -529
- package/dist/xertica-assistant-BMqdyRVi.js +2082 -0
- package/dist/xertica-assistant-Bj3vBCq_.cjs +2081 -0
- package/dist/{xertica-assistant-yX1CFBBo.js → xertica-assistant-DPsESB6t.js} +390 -531
- package/dist/{CodeBlock-BgfYL_rD.cjs → xertica-assistant-Qp3ydksa.cjs} +51 -263
- package/dist/{CodeBlock-DnYNI8rQ.js → xertica-assistant-gnCJdcZY.js} +7 -219
- package/dist/xertica-ui.css +2 -2
- package/docs/architecture-improvements.md +463 -0
- package/docs/architecture.md +1 -1
- package/docs/components/assistant-chart.md +1 -1
- package/docs/components/audio-player.md +46 -0
- package/docs/components/branding.md +251 -0
- package/docs/components/calendar.md +154 -154
- package/docs/components/card-patterns.md +337 -337
- package/docs/components/card.md +235 -235
- package/docs/components/code-block.md +108 -0
- package/docs/components/formatted-document.md +113 -0
- package/docs/components/hooks.md +430 -0
- package/docs/components/image-with-fallback.md +106 -0
- package/docs/components/map-layers.md +140 -0
- package/docs/components/map.md +84 -84
- package/docs/components/modern-chat-input.md +163 -0
- package/docs/components/pages.md +351 -0
- package/docs/components/xertica-provider.md +24 -24
- package/docs/decision-tree.md +287 -287
- package/docs/doc-audit.md +223 -0
- package/docs/getting-started.md +154 -0
- package/docs/llms.md +25 -5
- package/docs/patterns/detail-page.md +276 -0
- package/docs/patterns/settings.md +346 -0
- package/docs/patterns/wizard.md +217 -0
- package/guidelines/Guidelines.md +252 -252
- package/hooks/useTheme.ts +3 -3
- package/imports/Podcast.tsx +388 -388
- package/imports/XerticaAi.tsx +45 -45
- package/imports/XerticaX.tsx +19 -19
- package/imports/svg-aueiaqngck.ts +11 -11
- package/imports/svg-v9krss1ozd.ts +16 -16
- package/imports/svg-vhrdofe3qe.ts +5 -5
- package/llms-compact.txt +327 -327
- package/llms.txt +160 -160
- package/package.json +203 -203
- package/styles/xertica/app-overrides/chat.css +61 -61
- package/styles/xertica/app-overrides/scrollbar.css +33 -33
- package/styles/xertica/integrations/google-maps.css +76 -76
- package/styles/xertica/integrations/sonner.css +73 -73
- package/templates/CLAUDE.md +182 -182
- package/templates/guidelines/Guidelines.md +325 -325
- package/templates/package.json +2 -2
- package/templates/src/features/auth/index.ts +4 -4
- package/templates/src/features/auth/ui/AuthPageShell.tsx +34 -34
- 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 +151 -151
- package/templates/src/features/auth/ui/SocialLoginButtons.tsx +59 -59
- package/templates/src/features/auth/ui/VerifyEmailContent.tsx +82 -82
- package/templates/src/features/home/index.ts +1 -1
- package/templates/src/features/home/ui/HomeContent.tsx +100 -100
- package/templates/src/features/template/index.ts +5 -5
- package/templates/src/features/template/ui/CrudTemplate.tsx +3 -3
- package/templates/src/features/template/ui/DashboardTemplate.tsx +3 -3
- package/templates/src/features/template/ui/FormTemplate.tsx +120 -120
- package/templates/src/features/template/ui/LoginTemplate.tsx +3 -3
- package/templates/src/pages/AssistantPage.tsx +328 -328
- package/templates/src/pages/ForgotPasswordPage.tsx +6 -6
- package/templates/src/pages/HomePage.tsx +57 -57
- package/templates/src/pages/LoginPage.tsx +10 -10
- package/templates/src/pages/ResetPasswordPage.tsx +6 -6
- package/templates/src/pages/TemplatePage.tsx +30 -30
- package/templates/src/pages/VerifyEmailPage.tsx +6 -6
- package/templates/src/shared/config/navigation.ts +20 -20
- package/templates/src/shared/lib/auth.ts +20 -20
- package/templates/src/shared/types/auth.ts +3 -3
- package/templates/tsconfig.json +5 -5
- package/utils/color-utils.ts +72 -0
- package/utils/gemini.ts +140 -140
- package/dist/AudioPlayer-B1lt5cPl.cjs +0 -989
- package/dist/AudioPlayer-BZ7bibzU.cjs +0 -982
- package/dist/AudioPlayer-DMcG_c7L.js +0 -990
- package/dist/AudioPlayer-e8LfNoqO.js +0 -983
- package/dist/CodeBlock-7TTgmdGG.cjs +0 -2094
- package/dist/CodeBlock-BeSt1h5P.js +0 -2078
- 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/ImageWithFallback-CGtidP6B.cjs +0 -4542
- package/dist/ImageWithFallback-lsg3pdFg.js +0 -4508
- 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-hSwhNQex.js +0 -39
- package/dist/breadcrumb-CqJ7bHY5.js +0 -161
- package/dist/breadcrumb-m9Hb2_XN.cjs +0 -177
- 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/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/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-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-skplNlBM.cjs +0 -2345
- package/dist/select-Bkbr0f-Z.cjs +0 -162
- package/dist/select-CvIVdX2n.js +0 -145
- 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-mobile-B0hNy_Y6.cjs +0 -4303
- package/dist/use-mobile-BXuYROXM.js +0 -4202
- package/dist/use-mobile-Bbd51ASU.cjs +0 -4392
- package/dist/use-mobile-Bk6CX-TC.js +0 -4359
- package/dist/use-mobile-BzuxjzNX.cjs +0 -4392
- package/dist/use-mobile-CG2-SdXV.cjs +0 -4235
- 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-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/{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
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.1.4] — 2026-05-19
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **`XerticaAssistant` — decomposição em sub-componentes** — o componente monolítico (1 468 linhas) foi dividido em 9 sub-componentes focados em `parts/`: `AssistantHeader`, `AssistantCollapsedView`, `AssistantTabBar`, `AssistantWelcomeScreen`, `AssistantMessageBubble`, `AssistantTypingIndicator`, `AssistantConversationList`, `AssistantFeedbackDialog` e `AssistantDocumentEditor`. A API pública (`XerticaAssistantProps`) permanece 100% compatível.
|
|
15
|
+
- **`useAudioPlayer` — headless hook** — toda a lógica do `AudioPlayer` foi extraída para `components/media/audio-player/use-audio-player.ts`. O componente `AudioPlayer` agora consome o hook internamente; API pública inalterada. O hook é exportado via `components/hooks/index.ts`.
|
|
16
|
+
- **`useLayoutShortcuts` — headless hook** — registro de atalhos de teclado (Ctrl+B, Ctrl+I) extraído do `LayoutContext` para `components/hooks/use-layout-shortcuts.ts`. Exportado via `components/hooks/index.ts`.
|
|
17
|
+
- **`CustomTooltipContent` — componente compartilhado** — implementação duplicada de tooltip customizado (existia em `sidebar.tsx` e `xertica-assistant.tsx`) consolidada em `components/shared/CustomTooltipContent.tsx`.
|
|
18
|
+
- **`useIsMobile` — fonte única de detecção mobile** — `use-sidebar.ts`, `use-assistant.ts`, `LayoutContext.tsx` e `AudioPlayer.tsx` agora importam de `components/shared/use-mobile.ts` em vez de duplicar a lógica de `matchMedia`.
|
|
19
|
+
- **`utils/color-utils.ts` — utilitários de cor** — funções `hexToRgb`, `hexToRgba` e `isLightColor` extraídas do `BrandColorsContext` para `utils/color-utils.ts` como funções puras reutilizáveis.
|
|
20
|
+
- **`ThemeToggle` — usa `useTheme()`** — substituída referência direta ao `localStorage` pelo hook `useTheme()` do `ThemeContext`.
|
|
21
|
+
- **`types.ts` — fonte única de tipos do assistente** — `Message`, `Conversation`, `Suggestion`, `MockResponse`, `SearchResult`, `SearchSource`, `SearchCommand` e enums relacionados movidos para `components/assistant/xertica-assistant/types.ts`. `xertica-assistant.tsx` e `AssistenteContext.tsx` re-exportam os tipos para backward compatibility.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
10
25
|
## [2.1.3] — 2026-05-16
|
|
11
26
|
|
|
12
27
|
### Added
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Enterprise-grade React design system** built on Tailwind CSS v4, Radix UI, and Lucide Icons — with a robust AI-first documentation layer for precise LLM-driven composition and autonomous agent interaction.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/xertica-ui)
|
|
6
6
|
[](./LICENSE)
|
|
7
7
|
|
|
8
8
|
---
|
package/assets/xertica-logo.svg
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
fill="none"
|
|
3
|
-
preserveAspectRatio="xMidYMid meet"
|
|
4
|
-
viewBox="0 0 1543 289"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
>
|
|
7
|
-
<g id="Xertica.ai">
|
|
8
|
-
<path d="M1352.82 239.808V285.425H1304.73V239.808H1352.82Z" fill="#00BEFF" />
|
|
9
|
-
<path d="M814.8 284.848H766.711V77.4971H814.8V284.848Z" fill="#00BEFF" />
|
|
10
|
-
<path d="M1543 284.438H1514.2V160.28H1543V284.438Z" fill="#00BEFF" />
|
|
11
|
-
<path
|
|
12
|
-
clip-rule="evenodd"
|
|
13
|
-
d="M1432.83 157.796C1446.98 157.796 1459.14 162.515 1468.58 170.709V160.28H1497.38V284.438H1468.58V274.01C1459.14 282.451 1446.98 286.921 1432.83 286.921C1395.1 286.921 1368.29 260.352 1368.29 222.359C1368.29 184.616 1395.1 157.796 1432.83 157.796ZM1432.83 183.778C1410.79 183.778 1396.27 199.061 1396.27 222.359C1396.27 245.658 1410.79 260.94 1432.83 260.94C1454.63 260.94 1468.9 245.658 1468.9 222.359C1468.9 199.06 1454.63 183.778 1432.83 183.778Z"
|
|
14
|
-
fill="#00BEFF"
|
|
15
|
-
fill-rule="evenodd"
|
|
16
|
-
/>
|
|
17
|
-
<path d="M947.87 73.3516C1002.88 73.3516 1044.42 107.647 1053.57 159.234H1004.68C997.221 132.988 976.34 117.308 947.87 117.308C911.387 117.308 887.337 142.612 887.337 181.176C887.337 219.739 911.387 245.036 947.87 245.036C976.34 245.036 997.221 229.356 1004.68 203.109H1053.57C1044.47 254.701 1003.26 289 947.87 289C884.853 289 840.078 244.626 840.078 181.176C840.078 118.142 884.854 73.3516 947.87 73.3516Z" fill="#00BEFF" />
|
|
18
|
-
<path d="M88.4971 39.8242L157.353 142.191L83.5371 251.524L60.9277 284.854H0L96.3154 142.191L5.37695 7H66.3047L88.4971 39.8242Z" fill="#00BEFF" />
|
|
19
|
-
<path d="M254.314 284.855H193.387L151.914 223.71L182.548 178.551L254.314 284.855Z" fill="#00BEFF" />
|
|
20
|
-
<path
|
|
21
|
-
clip-rule="evenodd"
|
|
22
|
-
d="M1179.14 73.3477C1202.77 73.3477 1223.08 81.2286 1238.84 94.9121V77.4971H1286.94V284.847H1238.84V267.431C1223.09 281.528 1202.77 288.992 1179.14 288.992C1116.12 288.992 1071.35 244.622 1071.35 181.172C1071.35 118.139 1116.12 73.3478 1179.14 73.3477ZM1179.14 117.308C1142.66 117.308 1118.61 142.604 1118.61 181.172C1118.61 219.739 1142.66 245.035 1179.14 245.035C1215.21 245.035 1238.84 219.739 1238.84 181.172C1238.84 142.605 1215.21 117.308 1179.14 117.308Z"
|
|
23
|
-
fill="#00BEFF"
|
|
24
|
-
fill-rule="evenodd"
|
|
25
|
-
/>
|
|
26
|
-
<path d="M1543 145.383H1514.2V118.067H1543V145.383Z" fill="#00BEFF" />
|
|
27
|
-
<path d="M672.466 77.501H736.31V121.457H672.466V211.448C672.466 230.939 682.415 240.891 702.313 240.891H736.309V284.852H698.999C649.246 284.851 625.203 259.968 625.203 211.449V7H672.466V77.501Z" fill="#00BEFF" />
|
|
28
|
-
<path d="M814.8 52.6172H766.711V7H814.8V52.6172Z" fill="#00BEFF" />
|
|
29
|
-
<path
|
|
30
|
-
clip-rule="evenodd"
|
|
31
|
-
d="M354.069 73.3516C417.086 73.3517 461.864 118.143 461.864 181.176C461.864 187.396 461.031 193.615 460.204 199.422H295.197C301.829 228.864 323.392 246.696 354.069 246.696C372.724 246.696 389.309 241.721 399.675 226.376H452.742C441.132 265.774 400.501 288.996 354.069 288.996C291.053 288.996 246.274 244.626 246.273 181.176C246.273 118.142 291.053 73.3516 354.069 73.3516ZM354.068 115.65C325.044 115.65 303.902 131.826 296.44 158.78H410.863C403.819 131.826 382.672 115.65 354.068 115.65Z"
|
|
32
|
-
fill="#00BEFF"
|
|
33
|
-
fill-rule="evenodd"
|
|
34
|
-
/>
|
|
35
|
-
<path d="M596.957 121.453H562.962C543.064 121.453 533.114 131.409 533.114 150.899V284.847H485.852V150.899C485.852 102.38 509.894 77.4972 559.647 77.4971H596.957V121.453Z" fill="#00BEFF" />
|
|
36
|
-
<path d="M182.552 98.6992L151.922 53.3906L188.014 0H248.941L182.552 98.6992Z" fill="#00BEFF" />
|
|
37
|
-
</g>
|
|
1
|
+
<svg
|
|
2
|
+
fill="none"
|
|
3
|
+
preserveAspectRatio="xMidYMid meet"
|
|
4
|
+
viewBox="0 0 1543 289"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
>
|
|
7
|
+
<g id="Xertica.ai">
|
|
8
|
+
<path d="M1352.82 239.808V285.425H1304.73V239.808H1352.82Z" fill="#00BEFF" />
|
|
9
|
+
<path d="M814.8 284.848H766.711V77.4971H814.8V284.848Z" fill="#00BEFF" />
|
|
10
|
+
<path d="M1543 284.438H1514.2V160.28H1543V284.438Z" fill="#00BEFF" />
|
|
11
|
+
<path
|
|
12
|
+
clip-rule="evenodd"
|
|
13
|
+
d="M1432.83 157.796C1446.98 157.796 1459.14 162.515 1468.58 170.709V160.28H1497.38V284.438H1468.58V274.01C1459.14 282.451 1446.98 286.921 1432.83 286.921C1395.1 286.921 1368.29 260.352 1368.29 222.359C1368.29 184.616 1395.1 157.796 1432.83 157.796ZM1432.83 183.778C1410.79 183.778 1396.27 199.061 1396.27 222.359C1396.27 245.658 1410.79 260.94 1432.83 260.94C1454.63 260.94 1468.9 245.658 1468.9 222.359C1468.9 199.06 1454.63 183.778 1432.83 183.778Z"
|
|
14
|
+
fill="#00BEFF"
|
|
15
|
+
fill-rule="evenodd"
|
|
16
|
+
/>
|
|
17
|
+
<path d="M947.87 73.3516C1002.88 73.3516 1044.42 107.647 1053.57 159.234H1004.68C997.221 132.988 976.34 117.308 947.87 117.308C911.387 117.308 887.337 142.612 887.337 181.176C887.337 219.739 911.387 245.036 947.87 245.036C976.34 245.036 997.221 229.356 1004.68 203.109H1053.57C1044.47 254.701 1003.26 289 947.87 289C884.853 289 840.078 244.626 840.078 181.176C840.078 118.142 884.854 73.3516 947.87 73.3516Z" fill="#00BEFF" />
|
|
18
|
+
<path d="M88.4971 39.8242L157.353 142.191L83.5371 251.524L60.9277 284.854H0L96.3154 142.191L5.37695 7H66.3047L88.4971 39.8242Z" fill="#00BEFF" />
|
|
19
|
+
<path d="M254.314 284.855H193.387L151.914 223.71L182.548 178.551L254.314 284.855Z" fill="#00BEFF" />
|
|
20
|
+
<path
|
|
21
|
+
clip-rule="evenodd"
|
|
22
|
+
d="M1179.14 73.3477C1202.77 73.3477 1223.08 81.2286 1238.84 94.9121V77.4971H1286.94V284.847H1238.84V267.431C1223.09 281.528 1202.77 288.992 1179.14 288.992C1116.12 288.992 1071.35 244.622 1071.35 181.172C1071.35 118.139 1116.12 73.3478 1179.14 73.3477ZM1179.14 117.308C1142.66 117.308 1118.61 142.604 1118.61 181.172C1118.61 219.739 1142.66 245.035 1179.14 245.035C1215.21 245.035 1238.84 219.739 1238.84 181.172C1238.84 142.605 1215.21 117.308 1179.14 117.308Z"
|
|
23
|
+
fill="#00BEFF"
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
/>
|
|
26
|
+
<path d="M1543 145.383H1514.2V118.067H1543V145.383Z" fill="#00BEFF" />
|
|
27
|
+
<path d="M672.466 77.501H736.31V121.457H672.466V211.448C672.466 230.939 682.415 240.891 702.313 240.891H736.309V284.852H698.999C649.246 284.851 625.203 259.968 625.203 211.449V7H672.466V77.501Z" fill="#00BEFF" />
|
|
28
|
+
<path d="M814.8 52.6172H766.711V7H814.8V52.6172Z" fill="#00BEFF" />
|
|
29
|
+
<path
|
|
30
|
+
clip-rule="evenodd"
|
|
31
|
+
d="M354.069 73.3516C417.086 73.3517 461.864 118.143 461.864 181.176C461.864 187.396 461.031 193.615 460.204 199.422H295.197C301.829 228.864 323.392 246.696 354.069 246.696C372.724 246.696 389.309 241.721 399.675 226.376H452.742C441.132 265.774 400.501 288.996 354.069 288.996C291.053 288.996 246.274 244.626 246.273 181.176C246.273 118.142 291.053 73.3516 354.069 73.3516ZM354.068 115.65C325.044 115.65 303.902 131.826 296.44 158.78H410.863C403.819 131.826 382.672 115.65 354.068 115.65Z"
|
|
32
|
+
fill="#00BEFF"
|
|
33
|
+
fill-rule="evenodd"
|
|
34
|
+
/>
|
|
35
|
+
<path d="M596.957 121.453H562.962C543.064 121.453 533.114 131.409 533.114 150.899V284.847H485.852V150.899C485.852 102.38 509.894 77.4972 559.647 77.4971H596.957V121.453Z" fill="#00BEFF" />
|
|
36
|
+
<path d="M182.552 98.6992L151.922 53.3906L188.014 0H248.941L182.552 98.6992Z" fill="#00BEFF" />
|
|
37
|
+
</g>
|
|
38
38
|
</svg>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
fill="none"
|
|
3
|
-
preserveAspectRatio="xMidYMid meet"
|
|
4
|
-
viewBox="0 0 258 282"
|
|
5
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
-
>
|
|
7
|
-
<g id="Xertica X">
|
|
8
|
-
<path
|
|
9
|
-
d="M67.2666 0.0361328L89.7793 33.3447L159.63 137.228L84.7471 248.178L61.8115 282H0L97.7109 137.228L5.45508 0.0361328H67.2666Z"
|
|
10
|
-
fill="#00BEFF"
|
|
11
|
-
/>
|
|
12
|
-
<path
|
|
13
|
-
d="M258 282H196.185L154.114 219.951L185.192 174.123L258 282Z"
|
|
14
|
-
fill="#00BEFF"
|
|
15
|
-
/>
|
|
16
|
-
<path
|
|
17
|
-
d="M252.696 0.186523L185.042 100.142L154.106 54.0693L190.884 0L252.696 0.186523Z"
|
|
18
|
-
fill="#00BEFF"
|
|
19
|
-
/>
|
|
20
|
-
</g>
|
|
1
|
+
<svg
|
|
2
|
+
fill="none"
|
|
3
|
+
preserveAspectRatio="xMidYMid meet"
|
|
4
|
+
viewBox="0 0 258 282"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
>
|
|
7
|
+
<g id="Xertica X">
|
|
8
|
+
<path
|
|
9
|
+
d="M67.2666 0.0361328L89.7793 33.3447L159.63 137.228L84.7471 248.178L61.8115 282H0L97.7109 137.228L5.45508 0.0361328H67.2666Z"
|
|
10
|
+
fill="#00BEFF"
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M258 282H196.185L154.114 219.951L185.192 174.123L258 282Z"
|
|
14
|
+
fill="#00BEFF"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M252.696 0.186523L185.042 100.142L154.106 54.0693L190.884 0L252.696 0.186523Z"
|
|
18
|
+
fill="#00BEFF"
|
|
19
|
+
/>
|
|
20
|
+
</g>
|
|
21
21
|
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './xertica-assistant';
|
|
2
|
-
export { CodeBlock } from './code-block';
|
|
3
|
-
export { MarkdownMessage } from './markdown-message';
|
|
4
|
-
export { ModernChatInput } from './modern-chat-input';
|
|
5
|
-
export { FormattedDocument } from './formatted-document';
|
|
6
|
-
export { generateDemoResponse } from '../../utils/demo-responses';
|
|
1
|
+
export * from './xertica-assistant';
|
|
2
|
+
export { CodeBlock } from './code-block';
|
|
3
|
+
export { MarkdownMessage } from './markdown-message';
|
|
4
|
+
export { ModernChatInput } from './modern-chat-input';
|
|
5
|
+
export { FormattedDocument } from './formatted-document';
|
|
6
|
+
export { generateDemoResponse } from '../../utils/demo-responses';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MessageSquare, Heart, History } from 'lucide-react';
|
|
3
|
+
import { Button } from '../../../ui/button';
|
|
4
|
+
import { Tooltip, TooltipTrigger } from '../../../ui/tooltip';
|
|
5
|
+
import { CustomTooltipContent as AssistantTooltipContent } from '../../../shared/CustomTooltipContent';
|
|
6
|
+
import { XerticaOrbe } from '../../../brand/xertica-orbe';
|
|
7
|
+
import type { AssistantTab } from '../types';
|
|
8
|
+
|
|
9
|
+
interface AssistantCollapsedViewProps {
|
|
10
|
+
showHistory: boolean;
|
|
11
|
+
showFavorites: boolean;
|
|
12
|
+
onToggle: () => void;
|
|
13
|
+
onExpandWithTab: (tab: AssistantTab) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* AssistantCollapsedView — Icon-only strip shown when the assistant panel is collapsed.
|
|
18
|
+
* Renders the Xertica Orbe logo and quick-access icons for Chat, Favorites, and History.
|
|
19
|
+
*/
|
|
20
|
+
export function AssistantCollapsedView({
|
|
21
|
+
showHistory,
|
|
22
|
+
showFavorites,
|
|
23
|
+
onToggle,
|
|
24
|
+
onExpandWithTab,
|
|
25
|
+
}: AssistantCollapsedViewProps) {
|
|
26
|
+
return (
|
|
27
|
+
<div className="flex flex-col items-center p-4 space-y-4">
|
|
28
|
+
{/* Ícone do Assistente - Xertica Orbe */}
|
|
29
|
+
<Tooltip>
|
|
30
|
+
<TooltipTrigger asChild>
|
|
31
|
+
<button
|
|
32
|
+
onClick={onToggle}
|
|
33
|
+
className="w-10 h-10 rounded-full flex items-center justify-center hover:bg-accent/50 transition-colors duration-200 cursor-pointer mx-auto"
|
|
34
|
+
aria-label="Abrir assistente"
|
|
35
|
+
>
|
|
36
|
+
<XerticaOrbe size={32} />
|
|
37
|
+
</button>
|
|
38
|
+
</TooltipTrigger>
|
|
39
|
+
<AssistantTooltipContent side="left" sideOffset={8}>
|
|
40
|
+
<p>Assistente Xertica</p>
|
|
41
|
+
</AssistantTooltipContent>
|
|
42
|
+
</Tooltip>
|
|
43
|
+
|
|
44
|
+
<Tooltip>
|
|
45
|
+
<TooltipTrigger asChild>
|
|
46
|
+
<Button
|
|
47
|
+
variant="ghost"
|
|
48
|
+
size="sm"
|
|
49
|
+
onClick={() => onExpandWithTab('chat')}
|
|
50
|
+
className="w-8 h-8 p-0 text-muted-foreground"
|
|
51
|
+
>
|
|
52
|
+
<MessageSquare className="w-4 h-4" />
|
|
53
|
+
</Button>
|
|
54
|
+
</TooltipTrigger>
|
|
55
|
+
<AssistantTooltipContent side="left" sideOffset={8}>
|
|
56
|
+
<p>Chat</p>
|
|
57
|
+
</AssistantTooltipContent>
|
|
58
|
+
</Tooltip>
|
|
59
|
+
|
|
60
|
+
{showFavorites && (
|
|
61
|
+
<Tooltip>
|
|
62
|
+
<TooltipTrigger asChild>
|
|
63
|
+
<Button
|
|
64
|
+
variant="ghost"
|
|
65
|
+
size="sm"
|
|
66
|
+
onClick={() => onExpandWithTab('favoritos')}
|
|
67
|
+
className="w-8 h-8 p-0 text-muted-foreground"
|
|
68
|
+
>
|
|
69
|
+
<Heart className="w-4 h-4" />
|
|
70
|
+
</Button>
|
|
71
|
+
</TooltipTrigger>
|
|
72
|
+
<AssistantTooltipContent side="left" sideOffset={8}>
|
|
73
|
+
<p>Favoritos</p>
|
|
74
|
+
</AssistantTooltipContent>
|
|
75
|
+
</Tooltip>
|
|
76
|
+
)}
|
|
77
|
+
|
|
78
|
+
{showHistory && (
|
|
79
|
+
<Tooltip>
|
|
80
|
+
<TooltipTrigger asChild>
|
|
81
|
+
<Button
|
|
82
|
+
variant="ghost"
|
|
83
|
+
size="sm"
|
|
84
|
+
onClick={() => onExpandWithTab('historico')}
|
|
85
|
+
className="w-8 h-8 p-0 text-muted-foreground"
|
|
86
|
+
>
|
|
87
|
+
<History className="w-4 h-4" />
|
|
88
|
+
</Button>
|
|
89
|
+
</TooltipTrigger>
|
|
90
|
+
<AssistantTooltipContent side="left" sideOffset={8}>
|
|
91
|
+
<p>Histórico</p>
|
|
92
|
+
</AssistantTooltipContent>
|
|
93
|
+
</Tooltip>
|
|
94
|
+
)}
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Plus, Heart } from 'lucide-react';
|
|
3
|
+
import { Button } from '../../../ui/button';
|
|
4
|
+
import { ScrollArea } from '../../../ui/scroll-area';
|
|
5
|
+
import { cn } from '../../../shared/utils';
|
|
6
|
+
import type { Conversation, AssistantTab } from '../types';
|
|
7
|
+
|
|
8
|
+
interface AssistantConversationListProps {
|
|
9
|
+
conversations: Conversation[];
|
|
10
|
+
currentConversationId: string | null;
|
|
11
|
+
activeTab: AssistantTab;
|
|
12
|
+
isFullPage: boolean;
|
|
13
|
+
onNewConversation: () => void;
|
|
14
|
+
onSelectConversation: (id: string) => void;
|
|
15
|
+
onToggleFavorite: (id: string) => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* AssistantConversationList — Scrollable list of saved conversations shown in
|
|
20
|
+
* the History and Favorites tabs.
|
|
21
|
+
*/
|
|
22
|
+
export function AssistantConversationList({
|
|
23
|
+
conversations,
|
|
24
|
+
currentConversationId,
|
|
25
|
+
activeTab,
|
|
26
|
+
isFullPage,
|
|
27
|
+
onNewConversation,
|
|
28
|
+
onSelectConversation,
|
|
29
|
+
onToggleFavorite,
|
|
30
|
+
}: AssistantConversationListProps) {
|
|
31
|
+
return (
|
|
32
|
+
<ScrollArea className="flex-1 min-h-0">
|
|
33
|
+
<div className={`p-4 ${isFullPage ? 'mx-auto w-full max-w-6xl' : ''}`}>
|
|
34
|
+
{/* New Conversation Button */}
|
|
35
|
+
<Button
|
|
36
|
+
variant="outline"
|
|
37
|
+
size="sm"
|
|
38
|
+
onClick={onNewConversation}
|
|
39
|
+
className="w-full mb-4 justify-start"
|
|
40
|
+
>
|
|
41
|
+
<Plus className="w-4 h-4 mr-2" />
|
|
42
|
+
Nova Conversa
|
|
43
|
+
</Button>
|
|
44
|
+
|
|
45
|
+
{/* Conversations List */}
|
|
46
|
+
<div className="space-y-2">
|
|
47
|
+
{conversations.length === 0 ? (
|
|
48
|
+
<div className="text-center py-8">
|
|
49
|
+
<Heart className="w-12 h-12 mx-auto text-muted-foreground/50 mb-2" />
|
|
50
|
+
<p className="text-muted-foreground">
|
|
51
|
+
{activeTab === 'favoritos'
|
|
52
|
+
? 'Nenhuma conversa favorita ainda'
|
|
53
|
+
: 'Nenhuma conversa no histórico'}
|
|
54
|
+
</p>
|
|
55
|
+
</div>
|
|
56
|
+
) : (
|
|
57
|
+
conversations.map((conversa) => (
|
|
58
|
+
<div
|
|
59
|
+
key={conversa.id}
|
|
60
|
+
onClick={() => onSelectConversation(conversa.id)}
|
|
61
|
+
className={cn(
|
|
62
|
+
'p-3 rounded-[var(--radius)] cursor-pointer transition-colors duration-200 border',
|
|
63
|
+
conversa.id === currentConversationId
|
|
64
|
+
? 'border-primary bg-primary/10'
|
|
65
|
+
: 'border-border hover:bg-muted',
|
|
66
|
+
)}
|
|
67
|
+
>
|
|
68
|
+
<div className="flex items-start justify-between mb-1">
|
|
69
|
+
<h4 className="text-sm font-medium text-foreground truncate flex-1">
|
|
70
|
+
{conversa.title}
|
|
71
|
+
</h4>
|
|
72
|
+
<Button
|
|
73
|
+
variant="ghost"
|
|
74
|
+
size="sm"
|
|
75
|
+
onClick={(e) => {
|
|
76
|
+
e.stopPropagation();
|
|
77
|
+
onToggleFavorite(conversa.id);
|
|
78
|
+
}}
|
|
79
|
+
className="h-6 w-6 p-0 flex-shrink-0 ml-1"
|
|
80
|
+
>
|
|
81
|
+
<Heart
|
|
82
|
+
className={cn(
|
|
83
|
+
'w-3 h-3',
|
|
84
|
+
conversa.isFavorite
|
|
85
|
+
? 'text-destructive fill-current'
|
|
86
|
+
: 'text-muted-foreground',
|
|
87
|
+
)}
|
|
88
|
+
/>
|
|
89
|
+
</Button>
|
|
90
|
+
</div>
|
|
91
|
+
{conversa.lastMessage && (
|
|
92
|
+
<p className="text-sm text-muted-foreground truncate mb-1">
|
|
93
|
+
{conversa.lastMessage}
|
|
94
|
+
</p>
|
|
95
|
+
)}
|
|
96
|
+
<p className="text-sm text-muted-foreground">{conversa.timestamp}</p>
|
|
97
|
+
</div>
|
|
98
|
+
))
|
|
99
|
+
)}
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</ScrollArea>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { X, FileText, Check } from 'lucide-react';
|
|
3
|
+
import { Button } from '../../../ui/button';
|
|
4
|
+
import { RichTextEditor } from '../../../ui/rich-text-editor';
|
|
5
|
+
import { cn } from '../../../shared/utils';
|
|
6
|
+
|
|
7
|
+
interface EditingDocument {
|
|
8
|
+
content: string;
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface AssistantDocumentEditorProps {
|
|
13
|
+
document: EditingDocument;
|
|
14
|
+
isMobile: boolean;
|
|
15
|
+
containerWidth: string;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
onChange: (doc: EditingDocument) => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* AssistantDocumentEditor — Overlay panel with a rich text editor for editing documents
|
|
22
|
+
* generated by the assistant. Slides in from the left of the assistant panel.
|
|
23
|
+
*/
|
|
24
|
+
export function AssistantDocumentEditor({
|
|
25
|
+
document,
|
|
26
|
+
isMobile,
|
|
27
|
+
containerWidth,
|
|
28
|
+
onClose,
|
|
29
|
+
onChange,
|
|
30
|
+
}: AssistantDocumentEditorProps) {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
className={cn(
|
|
34
|
+
'flex flex-col border-border bg-background overflow-hidden transition-all duration-300',
|
|
35
|
+
isMobile
|
|
36
|
+
? 'fixed inset-0 z-[110] w-full h-[100dvh]'
|
|
37
|
+
: '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]',
|
|
38
|
+
)}
|
|
39
|
+
style={{ maxWidth: isMobile ? 'none' : `calc(100vw - ${containerWidth})` }}
|
|
40
|
+
>
|
|
41
|
+
<div className="h-full flex flex-col">
|
|
42
|
+
{/* Header Toolbar */}
|
|
43
|
+
<div className="px-4 h-[64px] border-b border-border bg-card flex items-center justify-between">
|
|
44
|
+
<div className="flex items-center gap-3">
|
|
45
|
+
<div className="p-2 bg-primary/10 rounded-md">
|
|
46
|
+
<FileText className="w-4 h-4 text-primary" />
|
|
47
|
+
</div>
|
|
48
|
+
<h3 className="font-semibold text-card-foreground text-sm">{document.title}</h3>
|
|
49
|
+
</div>
|
|
50
|
+
<Button
|
|
51
|
+
variant="ghost"
|
|
52
|
+
size="icon"
|
|
53
|
+
className="h-8 w-8 rounded-full"
|
|
54
|
+
onClick={onClose}
|
|
55
|
+
aria-label="Fechar editor de documento"
|
|
56
|
+
>
|
|
57
|
+
<X className="w-4 h-4" />
|
|
58
|
+
</Button>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
{/* Rich Text Editor */}
|
|
62
|
+
<div className="flex-1 bg-muted/20 p-0 sm:p-6 overflow-hidden">
|
|
63
|
+
<RichTextEditor
|
|
64
|
+
value={document.content || ''}
|
|
65
|
+
onChange={(newVal) =>
|
|
66
|
+
onChange({ ...document, content: newVal })
|
|
67
|
+
}
|
|
68
|
+
placeholder="Comece a digitar o conteúdo do seu documento aqui..."
|
|
69
|
+
className="max-w-4xl mx-auto h-full"
|
|
70
|
+
actionButton={
|
|
71
|
+
<Button size="sm" className="gap-2 h-8">
|
|
72
|
+
<Check className="w-3.5 h-3.5" />
|
|
73
|
+
Salvar
|
|
74
|
+
</Button>
|
|
75
|
+
}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from '../../../ui/button';
|
|
3
|
+
import { Textarea } from '../../../ui/textarea';
|
|
4
|
+
import {
|
|
5
|
+
Dialog,
|
|
6
|
+
DialogContent,
|
|
7
|
+
DialogDescription,
|
|
8
|
+
DialogFooter,
|
|
9
|
+
DialogHeader,
|
|
10
|
+
DialogTitle,
|
|
11
|
+
} from '../../../ui/dialog';
|
|
12
|
+
|
|
13
|
+
export interface EvaluationState {
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
messageId: string | null;
|
|
16
|
+
type?: 'dislike' | null;
|
|
17
|
+
category?: string | null;
|
|
18
|
+
reason: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface AssistantFeedbackDialogProps {
|
|
22
|
+
state: EvaluationState;
|
|
23
|
+
onReasonChange: (reason: string) => void;
|
|
24
|
+
onClose: () => void;
|
|
25
|
+
onSubmit: () => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* AssistantFeedbackDialog — Modal dialog for collecting negative feedback (dislike) on messages.
|
|
30
|
+
* Supports both categorized feedback (from feedbackOptions) and free-text input.
|
|
31
|
+
*/
|
|
32
|
+
export function AssistantFeedbackDialog({
|
|
33
|
+
state,
|
|
34
|
+
onReasonChange,
|
|
35
|
+
onClose,
|
|
36
|
+
onSubmit,
|
|
37
|
+
}: AssistantFeedbackDialogProps) {
|
|
38
|
+
return (
|
|
39
|
+
<Dialog
|
|
40
|
+
open={state.isOpen}
|
|
41
|
+
onOpenChange={(open) => !open && onClose()}
|
|
42
|
+
>
|
|
43
|
+
<DialogContent className="sm:max-w-[600px]">
|
|
44
|
+
<DialogHeader>
|
|
45
|
+
<DialogTitle className="pr-8">
|
|
46
|
+
{state.category
|
|
47
|
+
? `Enviar feedback: ${state.category}`
|
|
48
|
+
: 'Enviar feedback'}
|
|
49
|
+
</DialogTitle>
|
|
50
|
+
<DialogDescription>
|
|
51
|
+
{state.category
|
|
52
|
+
? 'Gostaria de adicionar algum comentário? (Opcional)'
|
|
53
|
+
: 'Conte-nos por que essa resposta não foi útil para que possamos melhorar.'}
|
|
54
|
+
</DialogDescription>
|
|
55
|
+
</DialogHeader>
|
|
56
|
+
|
|
57
|
+
<div className="grid gap-4 py-4 px-6">
|
|
58
|
+
<Textarea
|
|
59
|
+
className="min-h-[100px]"
|
|
60
|
+
placeholder={
|
|
61
|
+
state.category ? 'Comentário adicional...' : 'Descreva o motivo...'
|
|
62
|
+
}
|
|
63
|
+
aria-label={
|
|
64
|
+
state.category ? 'Comentário adicional' : 'Descreva o motivo'
|
|
65
|
+
}
|
|
66
|
+
value={state.reason}
|
|
67
|
+
onChange={(e) => onReasonChange(e.target.value)}
|
|
68
|
+
rows={4}
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<DialogFooter>
|
|
73
|
+
<Button variant="outline" onClick={onClose}>
|
|
74
|
+
Cancelar
|
|
75
|
+
</Button>
|
|
76
|
+
<Button
|
|
77
|
+
onClick={onSubmit}
|
|
78
|
+
disabled={!state.category && !state.reason.trim()}
|
|
79
|
+
>
|
|
80
|
+
{state.category ? 'Confirmar e Enviar' : 'Enviar Feedback'}
|
|
81
|
+
</Button>
|
|
82
|
+
</DialogFooter>
|
|
83
|
+
</DialogContent>
|
|
84
|
+
</Dialog>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChevronRight, PanelRight, Maximize2 } from 'lucide-react';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
import { Button } from '../../../ui/button';
|
|
5
|
+
import { XerticaOrbe } from '../../../brand/xertica-orbe';
|
|
6
|
+
import { cn } from '../../../shared/utils';
|
|
7
|
+
|
|
8
|
+
interface AssistantHeaderProps {
|
|
9
|
+
isExpanded: boolean;
|
|
10
|
+
onToggle: () => void;
|
|
11
|
+
onNavigateFullPage?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* AssistantHeader — Top bar shown in expanded/collapsed (non-fullPage) mode.
|
|
16
|
+
* Contains the Xertica Orbe logo, title, expand-to-full-page button, and toggle button.
|
|
17
|
+
*/
|
|
18
|
+
export function AssistantHeader({
|
|
19
|
+
isExpanded,
|
|
20
|
+
onToggle,
|
|
21
|
+
onNavigateFullPage,
|
|
22
|
+
}: AssistantHeaderProps) {
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
className={cn(
|
|
26
|
+
'border-b border-border flex items-center h-[64px]',
|
|
27
|
+
isExpanded ? 'justify-between px-4' : 'justify-center px-0',
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
{isExpanded && (
|
|
31
|
+
<motion.div
|
|
32
|
+
initial={{ opacity: 0, x: -10 }}
|
|
33
|
+
animate={{ opacity: 1, x: 0 }}
|
|
34
|
+
exit={{ opacity: 0, x: -10 }}
|
|
35
|
+
className="flex items-center gap-2 overflow-hidden"
|
|
36
|
+
>
|
|
37
|
+
<div className="flex-shrink-0">
|
|
38
|
+
<XerticaOrbe size={32} />
|
|
39
|
+
</div>
|
|
40
|
+
<span className="text-foreground font-medium truncate">Assistente Xertica</span>
|
|
41
|
+
</motion.div>
|
|
42
|
+
)}
|
|
43
|
+
|
|
44
|
+
<div className="flex items-center gap-1">
|
|
45
|
+
{isExpanded && onNavigateFullPage && (
|
|
46
|
+
<Button
|
|
47
|
+
variant="ghost"
|
|
48
|
+
size="sm"
|
|
49
|
+
onClick={onNavigateFullPage}
|
|
50
|
+
className="h-8 w-8 p-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-full"
|
|
51
|
+
title="Expandir assistente"
|
|
52
|
+
aria-label="Expandir assistente"
|
|
53
|
+
>
|
|
54
|
+
<Maximize2 className="w-4 h-4" />
|
|
55
|
+
</Button>
|
|
56
|
+
)}
|
|
57
|
+
|
|
58
|
+
<Button
|
|
59
|
+
variant="ghost"
|
|
60
|
+
size="sm"
|
|
61
|
+
onClick={onToggle}
|
|
62
|
+
className={cn(
|
|
63
|
+
'h-8 w-8 p-0 text-muted-foreground hover:bg-accent hover:text-accent-foreground rounded-full',
|
|
64
|
+
!isExpanded && 'w-10 h-10',
|
|
65
|
+
)}
|
|
66
|
+
aria-label={isExpanded ? 'Recolher assistente' : 'Expandir assistente'}
|
|
67
|
+
>
|
|
68
|
+
{isExpanded ? (
|
|
69
|
+
<ChevronRight className="w-4 h-4" />
|
|
70
|
+
) : (
|
|
71
|
+
<PanelRight className="w-4 h-4" />
|
|
72
|
+
)}
|
|
73
|
+
</Button>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|