xertica-ui 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/assets/xertica-logo.svg +37 -37
- package/assets/xertica-x-logo.svg +20 -20
- package/bin/cli.ts +1 -1
- package/bin/generate-tokens.ts +13 -7
- package/components/assistant/index.ts +6 -6
- package/components/assistant/xertica-assistant/index.ts +2 -0
- package/components/assistant/xertica-assistant/use-assistant.ts +564 -0
- package/components/assistant/xertica-assistant/xertica-assistant.stories.tsx +200 -0
- package/components/assistant/xertica-assistant/xertica-assistant.tsx +183 -474
- 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/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 +7 -7
- 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/index.ts +2 -0
- package/components/layout/sidebar/sidebar.mdx +1 -1
- package/components/layout/sidebar/sidebar.stories.tsx +160 -8
- package/components/layout/sidebar/sidebar.test.tsx +11 -11
- package/components/layout/sidebar/sidebar.tsx +610 -471
- package/components/layout/sidebar/use-sidebar.ts +113 -0
- package/components/media/FloatingMediaWrapper.tsx +11 -11
- package/components/media/audio-player/AudioPlayer.tsx +22 -22
- 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/HomePage.tsx +1 -1
- package/components/pages/home-page/home-page.mdx +53 -53
- package/components/pages/index.ts +8 -8
- package/components/pages/template-content/TemplateContent.tsx +5 -5
- 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 +5 -5
- package/components/pages/template-page/template-page.mdx +53 -53
- package/components/public-api-smoke.test.tsx +52 -52
- package/components/shared/assistant-utils.ts +43 -43
- package/components/shared/layout-constants.ts +1 -1
- 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 -344
- package/components/ui/chart/chart.test.tsx +154 -154
- package/components/ui/chart/chart.tsx +2367 -1494
- 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/file-upload/file-upload.stories.tsx +100 -0
- package/components/ui/file-upload/file-upload.tsx +14 -74
- package/components/ui/file-upload/index.ts +1 -0
- package/components/ui/file-upload/use-file-upload.ts +181 -0
- 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/index.ts +2 -0
- package/components/ui/pagination/pagination.mdx +8 -8
- package/components/ui/pagination/pagination.stories.tsx +94 -0
- package/components/ui/pagination/use-pagination.ts +194 -0
- 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/rich-text-editor/index.ts +2 -0
- package/components/ui/rich-text-editor/rich-text-editor.stories.tsx +129 -1
- package/components/ui/rich-text-editor/rich-text-editor.tsx +86 -305
- package/components/ui/rich-text-editor/use-rich-text-editor.ts +439 -0
- 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/index.ts +3 -1
- package/components/ui/stepper/stepper.mdx +8 -8
- package/components/ui/stepper/stepper.stories.tsx +116 -0
- package/components/ui/stepper/stepper.tsx +4 -4
- package/components/ui/stepper/use-stepper.ts +137 -0
- 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/index.ts +4 -1
- package/components/ui/tree-view/tree-view.mdx +8 -8
- package/components/ui/tree-view/tree-view.stories.tsx +110 -4
- package/components/ui/tree-view/tree-view.tsx +17 -125
- package/components/ui/tree-view/use-tree-view.ts +229 -0
- package/components.json +1512 -1512
- package/contexts/ApiKeyContext.tsx +72 -72
- package/contexts/BrandColorsContext.tsx +26 -26
- package/contexts/LanguageContext.tsx +13 -13
- package/contexts/LayoutContext.test.tsx +11 -11
- package/contexts/LayoutContext.tsx +29 -29
- package/contexts/ThemeContext.tsx +26 -26
- package/contexts/theme-data.ts +4 -4
- package/dist/{AssistantChart-CVzmmhx4.js → AssistantChart-C_hwFRRr.js} +4 -4
- package/dist/{AssistantChart-BAx9VQvb.cjs → AssistantChart-CldVCVDe.cjs} +311 -94
- package/dist/{AssistantChart-CVko2A1W.js → AssistantChart-Cu3m7RBo.js} +314 -97
- package/dist/{AssistantChart-9w31gdAb.cjs → AssistantChart-DoZCyS5r.cjs} +4 -4
- package/dist/AudioPlayer-B1lt5cPl.cjs +989 -0
- package/dist/AudioPlayer-BZ7bibzU.cjs +982 -0
- package/dist/AudioPlayer-C12BjQBV.cjs +997 -0
- package/dist/AudioPlayer-DMcG_c7L.js +990 -0
- package/dist/AudioPlayer-DcFKRJE_.js +998 -0
- package/dist/AudioPlayer-e8LfNoqO.js +983 -0
- package/dist/{xertica-assistant-Qp3ydksa.cjs → CodeBlock-7TTgmdGG.cjs} +263 -51
- package/dist/{xertica-assistant-gnCJdcZY.js → CodeBlock-BeSt1h5P.js} +219 -7
- package/dist/CodeBlock-BgfYL_rD.cjs +2094 -0
- package/dist/CodeBlock-BlcqlA9M.cjs +2094 -0
- package/dist/CodeBlock-Bnmeu5ez.cjs +2094 -0
- package/dist/CodeBlock-BtfPlbAI.js +2078 -0
- package/dist/CodeBlock-CIySIuYr.js +2078 -0
- package/dist/CodeBlock-CuPtUM-7.cjs +2094 -0
- package/dist/CodeBlock-D6ffWXgc.js +2078 -0
- package/dist/CodeBlock-D8dcwbit.cjs +2094 -0
- package/dist/CodeBlock-DMZrFnlw.cjs +2094 -0
- package/dist/CodeBlock-DlBehYN8.js +2078 -0
- package/dist/CodeBlock-DnYNI8rQ.js +2078 -0
- package/dist/CodeBlock-DvKWbSnE.cjs +2094 -0
- package/dist/CodeBlock-DwMCfkFY.js +2078 -0
- package/dist/CodeBlock-Dy6CNYyj.js +2078 -0
- package/dist/CodeBlock-U1pPOQI7.cjs +2094 -0
- package/dist/CodeBlock-f_GpNhEB.js +2078 -0
- package/dist/CodeBlock-oB6u8nI1.js +2078 -0
- package/dist/CodeBlock-tZC31B73.cjs +2094 -0
- package/dist/ImageWithFallback-CGtidP6B.cjs +4542 -0
- package/dist/ImageWithFallback-lsg3pdFg.js +4508 -0
- package/dist/LanguageSelector-B5YfbHra.js +231 -0
- package/dist/LanguageSelector-D6uacAIM.cjs +230 -0
- package/dist/LayoutContext-BAql6ZRY.js +97 -0
- package/dist/LayoutContext-BvK-ggDa.cjs +96 -0
- package/dist/ThemeContext-BoH4NLfN.js +734 -0
- package/dist/{ThemeContext-BbBNoFTG.js → ThemeContext-C2EwAPDt.js} +2 -2
- package/dist/ThemeContext-r69W20Xg.cjs +733 -0
- package/dist/{ThemeContext-Cmr8Ex8H.cjs → ThemeContext-vTjumZeM.cjs} +2 -2
- package/dist/{VerifyEmailPage-BE-L9mB7.js → VerifyEmailPage-C0c2e5n0.js} +7 -7
- package/dist/{VerifyEmailPage-DMBh4NM9.cjs → VerifyEmailPage-CYXtbKi3.cjs} +1 -1
- package/dist/{VerifyEmailPage-CR7kb5df.cjs → VerifyEmailPage-Cwi3kbol.cjs} +7 -7
- package/dist/{VerifyEmailPage-CdYPSJoO.js → VerifyEmailPage-DvMLZgFt.js} +1 -1
- package/dist/XerticaOrbe-KL1RBHzw.cjs +1354 -0
- package/dist/XerticaOrbe-zwS1p2a8.js +1355 -0
- package/dist/XerticaProvider-6btlAlzc.js +17 -0
- package/dist/XerticaProvider-BNoNOxQ5.cjs +16 -0
- package/dist/XerticaProvider-BlY2limY.cjs +38 -0
- package/dist/{XerticaProvider-BITjgC5p.js → XerticaProvider-CEoWMTxu.js} +2 -2
- package/dist/{XerticaProvider-By8q3Roe.cjs → XerticaProvider-CllrbMEJ.cjs} +2 -2
- package/dist/XerticaProvider-DDuiIcKo.js +39 -0
- package/dist/XerticaProvider-cI9hSs27.cjs +38 -0
- package/dist/XerticaProvider-hSwhNQex.js +39 -0
- package/dist/{alert-dialog-yckpaOpy.cjs → alert-dialog-DSKByiKZ.cjs} +3 -3
- package/dist/{alert-dialog-iDe5VE5o.js → alert-dialog-s-vmNkJ_.js} +3 -3
- package/dist/assistant.cjs.js +2 -1
- package/dist/assistant.es.js +3 -2
- package/dist/brand.cjs.js +1 -1
- package/dist/brand.es.js +1 -1
- package/dist/breadcrumb-CqJ7bHY5.js +161 -0
- package/dist/breadcrumb-m9Hb2_XN.cjs +177 -0
- package/dist/cli.js +14 -8
- package/dist/components/assistant/xertica-assistant/index.d.ts +2 -0
- package/dist/components/assistant/xertica-assistant/use-assistant.d.ts +126 -0
- package/dist/components/assistant/xertica-assistant/xertica-assistant.d.ts +7 -2
- package/dist/components/blocks/audio-player/AudioPlayer.d.ts +35 -0
- package/dist/components/blocks/audio-player/index.d.ts +1 -0
- package/dist/components/blocks/document-editor/DocumentEditor.d.ts +26 -0
- package/dist/components/blocks/document-editor/index.d.ts +1 -0
- package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +41 -0
- package/dist/components/blocks/podcast-player/index.d.ts +1 -0
- package/dist/components/layout/sidebar/index.d.ts +2 -0
- package/dist/components/layout/sidebar/sidebar.d.ts +80 -0
- package/dist/components/layout/sidebar/use-sidebar.d.ts +22 -0
- package/dist/components/shared/layout-constants.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/chart/chart.d.ts +162 -5
- package/dist/components/ui/file-upload/file-upload.d.ts +2 -0
- package/dist/components/ui/file-upload/index.d.ts +1 -0
- package/dist/components/ui/file-upload/use-file-upload.d.ts +49 -0
- package/dist/components/ui/pagination/index.d.ts +2 -0
- package/dist/components/ui/pagination/use-pagination.d.ts +78 -0
- package/dist/components/ui/rich-text-editor/index.d.ts +2 -0
- package/dist/components/ui/rich-text-editor/use-rich-text-editor.d.ts +107 -0
- package/dist/components/ui/stepper/index.d.ts +3 -1
- package/dist/components/ui/stepper/stepper.d.ts +2 -2
- package/dist/components/ui/stepper/use-stepper.d.ts +60 -0
- package/dist/components/ui/tree-view/index.d.ts +4 -1
- package/dist/components/ui/tree-view/tree-view.d.ts +4 -6
- package/dist/components/ui/tree-view/use-tree-view.d.ts +60 -0
- package/dist/dropdown-menu-BDB5CmQs.cjs +247 -0
- package/dist/dropdown-menu-DQidbKBD.js +231 -0
- package/dist/google-maps-loader-BFWp6VPd.js +287 -0
- package/dist/{google-maps-loader-t2IlYBzw.js → google-maps-loader-CTYySAun.js} +4 -0
- package/dist/{google-maps-loader-BqsYL48U.cjs → google-maps-loader-Y-QkD-Li.cjs} +5 -0
- package/dist/google-maps-loader-eS3uQ5TA.cjs +287 -0
- package/dist/header-Cgy6vYPk.cjs +731 -0
- package/dist/header-DRlT4jgI.js +715 -0
- package/dist/header-Dux00SI4.cjs +731 -0
- package/dist/header-EkGKXPsD.js +715 -0
- package/dist/header-WfEywpyc.cjs +731 -0
- package/dist/header-tifNQn2U.js +715 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +1 -1
- package/dist/index-BhapVLVj.js +8 -0
- package/dist/{index-D3RLKRAs.cjs → index-COtD8bRW.cjs} +1 -1
- package/dist/index-D6fxYEY8.cjs +7 -0
- package/dist/index-DW5tYe26.js +8 -0
- package/dist/index.cjs.js +19 -8
- package/dist/index.es.js +39 -28
- package/dist/index.umd.js +1043 -470
- package/dist/input-2R4loU86.js +127 -0
- package/dist/input-DWANSKGb.cjs +145 -0
- package/dist/layout.cjs.js +89 -1
- package/dist/layout.es.js +90 -2
- package/dist/pages.cjs.js +1 -1
- package/dist/pages.es.js +1 -1
- package/dist/rich-text-editor-0mraWT5y.cjs +2376 -0
- package/dist/rich-text-editor-B6jMRLzk.cjs +1939 -0
- package/dist/rich-text-editor-B8_oYcIR.js +1730 -0
- package/dist/rich-text-editor-B9UbSXNb.js +1203 -0
- package/dist/rich-text-editor-BYuRBNBU.js +2373 -0
- package/dist/rich-text-editor-Bb9pySTs.cjs +2374 -0
- package/dist/rich-text-editor-BcL6L3cm.cjs +2374 -0
- package/dist/rich-text-editor-BoVZYtTs.cjs +2391 -0
- package/dist/rich-text-editor-CPV1lEPH.cjs +1748 -0
- package/dist/rich-text-editor-CoKqbCtu.cjs +1799 -0
- package/dist/rich-text-editor-Cw56T_mB.js +2356 -0
- package/dist/rich-text-editor-Cyt8qs2b.js +1921 -0
- package/dist/rich-text-editor-D6H84OcX.cjs +1220 -0
- package/dist/rich-text-editor-D76gD-QI.js +2328 -0
- package/dist/rich-text-editor-DKkokOnA.js +1781 -0
- package/dist/rich-text-editor-DNsdpN64.cjs +2359 -0
- package/dist/rich-text-editor-DfG8bCyY.js +2358 -0
- package/dist/rich-text-editor-DgF8s7xW.js +2949 -0
- package/dist/rich-text-editor-Dxjw31Z4.js +2341 -0
- package/dist/rich-text-editor-DzP0Epmb.js +2356 -0
- package/dist/rich-text-editor-mWoaSCE4.cjs +2966 -0
- package/dist/rich-text-editor-skplNlBM.cjs +2345 -0
- package/dist/select-Bkbr0f-Z.cjs +162 -0
- package/dist/select-CvIVdX2n.js +145 -0
- package/dist/sidebar-CK_0ZQHj.cjs +803 -0
- package/dist/sidebar-CUuOvYhK.js +787 -0
- package/dist/slider-Bc5Hd0y1.js +56 -0
- package/dist/slider-N7hFFj6X.cjs +73 -0
- package/dist/tooltip-Ded96neP.cjs +137 -0
- package/dist/tooltip-HDOoD2-0.js +120 -0
- package/dist/ui.cjs.js +14 -4
- package/dist/ui.es.js +26 -16
- package/dist/use-mobile-B0hNy_Y6.cjs +4303 -0
- package/dist/use-mobile-BXuYROXM.js +4202 -0
- package/dist/use-mobile-Bbd51ASU.cjs +4392 -0
- package/dist/use-mobile-Bk6CX-TC.js +4359 -0
- package/dist/use-mobile-BvYdisLP.js +4202 -0
- package/dist/use-mobile-BzuxjzNX.cjs +4392 -0
- package/dist/use-mobile-CG2-SdXV.cjs +4235 -0
- package/dist/use-mobile-CKb5pqTs.js +4269 -0
- package/dist/use-mobile-CYuAuGDl.js +4202 -0
- package/dist/use-mobile-CaENcqm-.js +4508 -0
- package/dist/use-mobile-CbrYgJGJ.js +4203 -0
- package/dist/use-mobile-DMOvImGQ.cjs +4542 -0
- package/dist/use-mobile-DRB3BQgD.cjs +4235 -0
- package/dist/use-mobile-DZvv7QMR.js +4359 -0
- package/dist/use-mobile-DdI_TXam.cjs +4235 -0
- package/dist/use-mobile-DlceKf8a.js +4359 -0
- package/dist/use-mobile-DsOnow1o.cjs +4236 -0
- package/dist/use-mobile-Kcj6jSnK.cjs +4392 -0
- package/dist/use-mobile-bnKcua_i.js +4202 -0
- package/dist/use-mobile-ncXBeE2z.cjs +4235 -0
- package/dist/{xertica-assistant-B1IaHXnB.cjs → xertica-assistant-dyP7KHM5.cjs} +533 -392
- package/dist/{xertica-assistant-DPsESB6t.js → xertica-assistant-yX1CFBBo.js} +535 -394
- package/dist/xertica-ui.css +2 -2
- package/docs/ai-usage.md +28 -10
- package/docs/architecture.md +76 -0
- package/docs/components/assistant.md +159 -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/chart.md +354 -39
- package/docs/components/file-upload.md +119 -2
- package/docs/components/map.md +84 -84
- package/docs/components/pagination.md +187 -0
- package/docs/components/rich-text-editor.md +164 -0
- package/docs/components/sidebar.md +153 -4
- package/docs/components/stepper.md +157 -12
- package/docs/components/tree-view.md +164 -6
- package/docs/components/xertica-provider.md +24 -24
- package/docs/decision-tree.md +287 -287
- package/docs/getting-started.md +1 -1
- package/docs/guidelines.md +14 -8
- package/docs/layout.md +2 -2
- package/docs/llms.md +4 -4
- package/guidelines/Guidelines.md +252 -250
- 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/styles/xertica/tokens.css +41 -12
- package/templates/CLAUDE.md +182 -172
- package/templates/guidelines/Guidelines.md +325 -313
- package/templates/package.json +3 -3
- 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/src/styles/xertica/tokens.css +39 -10
- package/templates/tsconfig.json +5 -5
- package/utils/gemini.ts +140 -140
- package/dist/VerifyEmailPage-Bae2cBXT.cjs +0 -2827
- package/dist/VerifyEmailPage-CbgjOF0v.js +0 -2828
- package/dist/index-CkTUgOwX.js +0 -8
package/dist/cli.js
CHANGED
|
@@ -342,8 +342,8 @@ var generateTokensCss = (theme) => {
|
|
|
342
342
|
--success-foreground: rgba(250, 250, 250, 1);
|
|
343
343
|
--info: rgba(37, 99, 235, 1);
|
|
344
344
|
--info-foreground: rgba(250, 250, 250, 1);
|
|
345
|
-
--warning: rgba(
|
|
346
|
-
--warning-foreground: rgba(
|
|
345
|
+
--warning: rgba(234, 179, 8, 1);
|
|
346
|
+
--warning-foreground: rgba(28, 25, 23, 1);
|
|
347
347
|
|
|
348
348
|
--border: rgba(228, 228, 231, 1);
|
|
349
349
|
--input: rgba(244, 244, 245, 0.5);
|
|
@@ -366,12 +366,15 @@ var generateTokensCss = (theme) => {
|
|
|
366
366
|
--sidebar-border: rgba(255, 255, 255, 0.1);
|
|
367
367
|
--sidebar-ring: ${rgba(colors.primary, 0.5)};
|
|
368
368
|
|
|
369
|
-
/* Charts */
|
|
369
|
+
/* Charts \u2014 vibrant, accessible, harmonious palette */
|
|
370
370
|
--chart-1: ${rgba(colors.chart1)};
|
|
371
371
|
--chart-2: ${rgba(colors.chart2)};
|
|
372
372
|
--chart-3: ${rgba(colors.chart3)};
|
|
373
373
|
--chart-4: ${rgba(colors.chart4)};
|
|
374
374
|
--chart-5: ${rgba(colors.chart5)};
|
|
375
|
+
--chart-6: rgba(168, 85, 247, 1); /* purple \u2014 extended palette */
|
|
376
|
+
--chart-7: rgba(20, 184, 166, 1); /* teal \u2014 extended palette */
|
|
377
|
+
--chart-8: rgba(251, 113, 133, 1); /* rose \u2014 extended palette */
|
|
375
378
|
|
|
376
379
|
/* Gradients */
|
|
377
380
|
--gradient-diagonal: linear-gradient(135deg, ${colors.gradientStart} 0%, ${colors.gradientEnd} 100%);
|
|
@@ -424,9 +427,9 @@ var generateTokensCss = (theme) => {
|
|
|
424
427
|
--toast-success-border: rgba(5, 150, 105, 1);
|
|
425
428
|
--toast-success-icon: rgba(5, 150, 105, 1);
|
|
426
429
|
/* Toast - Warning */
|
|
427
|
-
--toast-warning-bg: rgba(254,
|
|
428
|
-
--toast-warning-border: rgba(
|
|
429
|
-
--toast-warning-icon: rgba(
|
|
430
|
+
--toast-warning-bg: rgba(254, 249, 195, 1);
|
|
431
|
+
--toast-warning-border: rgba(161, 98, 7, 1);
|
|
432
|
+
--toast-warning-icon: rgba(161, 98, 7, 1);
|
|
430
433
|
/* Toast - Info */
|
|
431
434
|
--toast-info-bg: rgba(219, 234, 254, 1);
|
|
432
435
|
--toast-info-border: rgba(37, 99, 235, 1);
|
|
@@ -484,12 +487,15 @@ var generateTokensCss = (theme) => {
|
|
|
484
487
|
|
|
485
488
|
--elevation-sm: 0px 0px 48px 0px rgba(0, 0, 0, 0.3);
|
|
486
489
|
|
|
487
|
-
/* Charts */
|
|
490
|
+
/* Charts \u2014 dark mode: slightly lighter/more saturated for contrast on dark bg */
|
|
488
491
|
--chart-1: ${rgba(colors.chart1)};
|
|
489
492
|
--chart-2: ${rgba(colors.chart2)};
|
|
490
493
|
--chart-3: ${rgba(colors.chart3)};
|
|
491
494
|
--chart-4: ${rgba(colors.chart4)};
|
|
492
495
|
--chart-5: ${rgba(colors.chart5)};
|
|
496
|
+
--chart-6: rgba(196, 132, 252, 1); /* purple lighter */
|
|
497
|
+
--chart-7: rgba(45, 212, 191, 1); /* teal lighter */
|
|
498
|
+
--chart-8: rgba(253, 164, 175, 1); /* rose lighter */
|
|
493
499
|
|
|
494
500
|
/* Sidebar */
|
|
495
501
|
--sidebar: ${rgba(colors.sidebarDark)};
|
|
@@ -528,7 +534,7 @@ var generateTokensCss = (theme) => {
|
|
|
528
534
|
var __filename = fileURLToPath(import.meta.url);
|
|
529
535
|
var __dirname = path.dirname(__filename);
|
|
530
536
|
var program = new Command();
|
|
531
|
-
program.name("xertica-ui").description("CLI to initialize Xertica UI projects").version("2.1.
|
|
537
|
+
program.name("xertica-ui").description("CLI to initialize Xertica UI projects").version("2.1.3");
|
|
532
538
|
program.command("init").description("Initialize a new Xertica UI project").argument("[directory]", "Directory to initialize in", ".").action(async (directory) => {
|
|
533
539
|
const targetDir = path.resolve(process.cwd(), directory);
|
|
534
540
|
const templatesDir = path.resolve(__dirname, "../templates");
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { type MockResponse } from '../../shared/assistant-utils';
|
|
2
|
+
import type { Message, Conversation, Suggestion, AssistantTab, AssistantMode, SearchResult } from './xertica-assistant';
|
|
3
|
+
export interface UseAssistantProps {
|
|
4
|
+
/** Layout mode for the assistant panel */
|
|
5
|
+
mode?: AssistantMode;
|
|
6
|
+
/** Controlled expansion state */
|
|
7
|
+
isExpanded?: boolean;
|
|
8
|
+
/** Toggle callback for controlled expansion */
|
|
9
|
+
onToggle?: () => void;
|
|
10
|
+
/** Initially selected tab */
|
|
11
|
+
defaultTab?: AssistantTab;
|
|
12
|
+
/** Enables demo mode with mock AI responses */
|
|
13
|
+
demoMode?: boolean;
|
|
14
|
+
/** Custom mock responses for demo mode */
|
|
15
|
+
customResponses?: MockResponse[];
|
|
16
|
+
/** Pre-loaded messages to hydrate an existing conversation */
|
|
17
|
+
initialMessages?: Message[];
|
|
18
|
+
/** Previously saved conversations */
|
|
19
|
+
savedConversations?: Conversation[];
|
|
20
|
+
/** Suggested prompts shown in the empty state */
|
|
21
|
+
suggestions?: Suggestion[];
|
|
22
|
+
/** Callback fired when the user sends a message */
|
|
23
|
+
onSendMessage?: (message: string) => void;
|
|
24
|
+
/** Whether the assistant is currently processing a response */
|
|
25
|
+
isProcessing?: boolean;
|
|
26
|
+
/** Custom response generator — overrides demo mode defaults */
|
|
27
|
+
responseGenerator?: (message: string) => Promise<string | Partial<Message>> | string | Partial<Message>;
|
|
28
|
+
/** Extended suggestions shown when the user clicks "More suggestions" */
|
|
29
|
+
richSuggestions?: Suggestion[];
|
|
30
|
+
/** Callback fired when the user clicks a rich suggestion */
|
|
31
|
+
onRichAction?: (actionId: string, actionText: string) => void;
|
|
32
|
+
/** Callback fired when the user rates a message */
|
|
33
|
+
onEvaluation?: (messageId: string, type: 'like' | 'dislike', reason?: string) => void;
|
|
34
|
+
/** Negative feedback categories shown in the dislike dropdown */
|
|
35
|
+
feedbackOptions?: string[];
|
|
36
|
+
}
|
|
37
|
+
export interface UseAssistantReturn {
|
|
38
|
+
isFullPage: boolean;
|
|
39
|
+
isExpanded: boolean;
|
|
40
|
+
isMobile: boolean;
|
|
41
|
+
abaSelecionada: AssistantTab;
|
|
42
|
+
setAbaSelecionada: (tab: AssistantTab) => void;
|
|
43
|
+
mensagens: Message[];
|
|
44
|
+
setMensagens: React.Dispatch<React.SetStateAction<Message[]>>;
|
|
45
|
+
mensagem: string;
|
|
46
|
+
setMensagem: (value: string) => void;
|
|
47
|
+
conversas: Conversation[];
|
|
48
|
+
conversaAtual: string | null;
|
|
49
|
+
conversasFiltradas: Conversation[];
|
|
50
|
+
copiedId: string | null;
|
|
51
|
+
generatingPodcastId: string | null;
|
|
52
|
+
executingCommand: string | null;
|
|
53
|
+
savedSearches: string[];
|
|
54
|
+
editingDocument: {
|
|
55
|
+
content: string;
|
|
56
|
+
title: string;
|
|
57
|
+
} | null;
|
|
58
|
+
setEditingDocument: (doc: {
|
|
59
|
+
content: string;
|
|
60
|
+
title: string;
|
|
61
|
+
} | null) => void;
|
|
62
|
+
showMoreSuggestions: boolean;
|
|
63
|
+
setShowMoreSuggestions: (show: boolean) => void;
|
|
64
|
+
evaluationState: {
|
|
65
|
+
isOpen: boolean;
|
|
66
|
+
messageId: string | null;
|
|
67
|
+
type: 'dislike' | null;
|
|
68
|
+
category?: string | null;
|
|
69
|
+
reason: string;
|
|
70
|
+
};
|
|
71
|
+
setEvaluationState: React.Dispatch<React.SetStateAction<UseAssistantReturn['evaluationState']>>;
|
|
72
|
+
sugestoes: Suggestion[];
|
|
73
|
+
messagesEndRef: React.RefObject<HTMLDivElement>;
|
|
74
|
+
fileInputRef: React.RefObject<HTMLInputElement>;
|
|
75
|
+
audioInputRef: React.RefObject<HTMLInputElement>;
|
|
76
|
+
handleToggle: () => void;
|
|
77
|
+
handleExpandWithTab: (tab: AssistantTab) => void;
|
|
78
|
+
handleEnviarMensagem: (arg?: string | any) => Promise<void>;
|
|
79
|
+
handleToggleFavorite: (messageId: string) => void;
|
|
80
|
+
handleCopyMessage: (content: string, messageId: string) => Promise<void>;
|
|
81
|
+
handleGeneratePodcast: (messageId: string, content: string) => Promise<void>;
|
|
82
|
+
handleDownloadDocument: (content: string, fileName: string) => void;
|
|
83
|
+
handleDownloadPodcast: (audioUrl: string, fileName: string) => void;
|
|
84
|
+
handleEditDocument: (content: string, title: string) => void;
|
|
85
|
+
handleNovaConversa: () => void;
|
|
86
|
+
handleSelecionarConversa: (conversaId: string) => void;
|
|
87
|
+
handleToggleFavoritaConversa: (conversaId: string) => void;
|
|
88
|
+
handleOpenSearchResult: (result: SearchResult) => void;
|
|
89
|
+
handleExecuteSearchCommand: (commandId: string, searchTerm: string, results: SearchResult[], messageId: string) => Promise<void>;
|
|
90
|
+
handleRichSuggestionClick: (suggestion: Suggestion) => void;
|
|
91
|
+
handleEvaluationClick: (messageId: string, type: 'like' | 'dislike') => void;
|
|
92
|
+
openFeedbackDialog: (messageId: string, category: string | null) => void;
|
|
93
|
+
handleSubmitDislike: () => void;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* `useAssistant` — Headless hook for the XerticaAssistant component.
|
|
97
|
+
*
|
|
98
|
+
* Encapsulates all state management and business logic for the AI assistant panel.
|
|
99
|
+
* Use this hook when you need to build a fully custom assistant UI while reusing
|
|
100
|
+
* the same state logic as the default `XerticaAssistant` component.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```tsx
|
|
104
|
+
* import { useAssistant } from 'xertica-ui/assistant';
|
|
105
|
+
*
|
|
106
|
+
* function MyCustomAssistant() {
|
|
107
|
+
* const {
|
|
108
|
+
* mensagens,
|
|
109
|
+
* mensagem,
|
|
110
|
+
* setMensagem,
|
|
111
|
+
* handleEnviarMensagem,
|
|
112
|
+
* isExpanded,
|
|
113
|
+
* handleToggle,
|
|
114
|
+
* } = useAssistant({ demoMode: true });
|
|
115
|
+
*
|
|
116
|
+
* return (
|
|
117
|
+
* <div>
|
|
118
|
+
* {mensagens.map(msg => <p key={msg.id}>{msg.content}</p>)}
|
|
119
|
+
* <input value={mensagem} onChange={e => setMensagem(e.target.value)} />
|
|
120
|
+
* <button onClick={() => handleEnviarMensagem()}>Send</button>
|
|
121
|
+
* </div>
|
|
122
|
+
* );
|
|
123
|
+
* }
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export declare function useAssistant({ mode, isExpanded: controlledIsExpanded, onToggle, defaultTab, demoMode, customResponses, initialMessages, savedConversations, suggestions: propSuggestions, onSendMessage, isProcessing, responseGenerator, richSuggestions, onRichAction, onEvaluation, }?: UseAssistantProps): UseAssistantReturn;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type MockResponse } from '../../shared/assistant-utils';
|
|
2
3
|
/**
|
|
3
4
|
* Supported message sender types in the assistant
|
|
4
5
|
*/
|
|
@@ -93,7 +94,6 @@ export type AssistantMode = 'collapsed' | 'expanded' | 'fullPage';
|
|
|
93
94
|
* Available tabs in the assistant panel
|
|
94
95
|
*/
|
|
95
96
|
export type AssistantTab = 'chat' | 'historico' | 'favoritos';
|
|
96
|
-
import { type MockResponse } from '../../shared/assistant-utils';
|
|
97
97
|
export interface XerticaAssistantProps {
|
|
98
98
|
/**
|
|
99
99
|
* Layout mode for the assistant panel
|
|
@@ -147,6 +147,11 @@ export interface XerticaAssistantProps {
|
|
|
147
147
|
* Suggested prompts shown to the user in the empty state
|
|
148
148
|
*/
|
|
149
149
|
suggestions?: Suggestion[];
|
|
150
|
+
/**
|
|
151
|
+
* Subtitle shown below the user's name in the empty state.
|
|
152
|
+
* @default 'Como posso ajudar?'
|
|
153
|
+
*/
|
|
154
|
+
welcomeMessage?: string;
|
|
150
155
|
/**
|
|
151
156
|
* Callback fired when the user sends a message
|
|
152
157
|
*/
|
|
@@ -274,4 +279,4 @@ export interface XerticaAssistantProps {
|
|
|
274
279
|
* 2. Use `onSendMessage` to capture user input and `responseGenerator` to provide AI responses in demo mode.
|
|
275
280
|
* 3. Supports automatic Markdown rendering and syntax-highlighted code blocks.
|
|
276
281
|
*/
|
|
277
|
-
export declare function XerticaAssistant({ mode, isExpanded: controlledIsExpanded, onToggle, defaultTab, demoMode, onNavigateSettings, onNavigateFullPage, userName, initialMessages, savedConversations, suggestions: propSuggestions, onSendMessage, onFileAttach, isProcessing, width, height, className, mobileFloating, customResponses, responseGenerator, richSuggestions, onRichAction, onEvaluation, feedbackOptions, showHistory, showFavorites, enableAudioInput, enableFileAttachment, enableDocumentCreation, enablePodcastGeneration, enableSearch, }: XerticaAssistantProps): import("react/jsx-runtime").JSX.Element;
|
|
282
|
+
export declare function XerticaAssistant({ mode, isExpanded: controlledIsExpanded, onToggle, defaultTab, demoMode, onNavigateSettings, onNavigateFullPage, userName, initialMessages, savedConversations, suggestions: propSuggestions, onSendMessage, onFileAttach, isProcessing, width, height, className, mobileFloating, customResponses, responseGenerator, richSuggestions, welcomeMessage, onRichAction, onEvaluation, feedbackOptions, showHistory, showFavorites, enableAudioInput, enableFileAttachment, enableDocumentCreation, enablePodcastGeneration, enableSearch, }: XerticaAssistantProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the AudioPlayer component.
|
|
3
|
+
*/
|
|
4
|
+
interface AudioPlayerProps {
|
|
5
|
+
/** Whether the player is currently visible and open */
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
/** Callback to close the player bar */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** Pass sidebar expansion state to adjust layout positioning (optional, now uses LayoutContext) */
|
|
10
|
+
sidebarExpanded?: boolean;
|
|
11
|
+
/** Title of the audio track/podcast */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Subtitle or source information */
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
/** Total duration in seconds */
|
|
16
|
+
duration?: number;
|
|
17
|
+
/** Initial or current playback time in seconds */
|
|
18
|
+
currentTime?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Global floating Audio Player bar.
|
|
22
|
+
*
|
|
23
|
+
* @description
|
|
24
|
+
* A fixed-position playback bar that handles audio progress, volume,
|
|
25
|
+
* and specific podcast actions (reset, speed, info, refresh).
|
|
26
|
+
* It transitions smoothly from the bottom of the screen.
|
|
27
|
+
*
|
|
28
|
+
* @ai-rules
|
|
29
|
+
* 1. Placement: This component should typically be rendered once at the top level (e.g., in a Layout) and controlled via global state.
|
|
30
|
+
* 2. Positional logic: It automatically offsets itself based on `sidebarExpanded` to avoid overlapping navigation.
|
|
31
|
+
* 3. Use `duration` and `currentTime` to synchronize with external audio state if needed.
|
|
32
|
+
*/
|
|
33
|
+
export declare function AudioPlayer({ isOpen, onClose, title, subtitle, duration, // 20:00
|
|
34
|
+
currentTime }: AudioPlayerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AudioPlayer';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the DocumentEditor component.
|
|
3
|
+
*/
|
|
4
|
+
interface DocumentEditorProps {
|
|
5
|
+
/** Initial markdown or plain text content */
|
|
6
|
+
initialContent: string;
|
|
7
|
+
/** Title for the document (default: 'New Document') */
|
|
8
|
+
initialTitle?: string;
|
|
9
|
+
/** Callback to close the editor */
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Rich-text document editor with markdown compatibility.
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
* Provides a content-editable environment for document editing. It supports
|
|
17
|
+
* basic formatting (bold, italic, headers, lists) and maintains an edit history
|
|
18
|
+
* for Undo/Redo. It also handles simple markdown-to-HTML conversion for initial loading.
|
|
19
|
+
*
|
|
20
|
+
* @ai-rules
|
|
21
|
+
* 1. Use this component for full-screen editing experiences or side-panel document refinement.
|
|
22
|
+
* 2. It tracks unsaved changes internally; ensure you handle persistence via future prop extensions or external state.
|
|
23
|
+
* 3. The `convertMarkdownToHtml` helper is basic — it does not support complex nested markdown structures.
|
|
24
|
+
*/
|
|
25
|
+
export declare function DocumentEditor({ initialContent, initialTitle, onClose }: DocumentEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DocumentEditor';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the PodcastPlayer component.
|
|
3
|
+
*/
|
|
4
|
+
interface PodcastPlayerProps {
|
|
5
|
+
/** Whether the player is currently visible and open */
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
/** Callback to close the player bar */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** Pass sidebar expansion state to adjust layout positioning (optional, now uses LayoutContext) */
|
|
10
|
+
sidebarExpanded?: boolean;
|
|
11
|
+
/** Title of the podcast/process track */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Subtitle or source information */
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
/** Total duration in seconds */
|
|
16
|
+
duration?: number;
|
|
17
|
+
/** Initial or current playback time in seconds */
|
|
18
|
+
currentTime?: number;
|
|
19
|
+
/** Display mode of the player */
|
|
20
|
+
variant?: 'fixed' | 'inline';
|
|
21
|
+
/** How the fixed player occupies space */
|
|
22
|
+
layoutMode?: 'viewport' | 'container';
|
|
23
|
+
/** Optional state of the right-side panel for layout adjustments */
|
|
24
|
+
rightSidebarState?: 'none' | 'collapsed' | 'expanded';
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Advanced Podcast Player component.
|
|
28
|
+
*
|
|
29
|
+
* @description
|
|
30
|
+
* An enhanced version of the Audio Player that supports multiple layout modes
|
|
31
|
+
* (fixed or inline), viewport portals, and responsive mobile rendering. It uses
|
|
32
|
+
* a theme-aware primary background when fixed.
|
|
33
|
+
*
|
|
34
|
+
* @ai-rules
|
|
35
|
+
* 1. Portals: When `variant="fixed"` and `layoutMode="viewport"`, it uses `createPortal` to render at the document root.
|
|
36
|
+
* 2. Variant: Use `variant="fixed"` for global playback; use `variant="inline"` for embedding directly in content cards.
|
|
37
|
+
* 3. Mobile: This component has a dedicated vertical layout for mobile screens (< 768px).
|
|
38
|
+
*/
|
|
39
|
+
export declare function PodcastPlayer({ isOpen, onClose, title, subtitle, duration, // 20:00
|
|
40
|
+
currentTime, variant, layoutMode, rightSidebarState }: PodcastPlayerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PodcastPlayer';
|
|
@@ -33,6 +33,14 @@ export interface RouteConfig {
|
|
|
33
33
|
/** Child routes exposed via contextual menu button at the end of the item */
|
|
34
34
|
children?: RouteConfig[];
|
|
35
35
|
}
|
|
36
|
+
export interface NavigationItem {
|
|
37
|
+
path: string;
|
|
38
|
+
label: string;
|
|
39
|
+
icon?: any;
|
|
40
|
+
active: boolean;
|
|
41
|
+
children?: RouteConfig[];
|
|
42
|
+
actions?: ActionMenuItem[];
|
|
43
|
+
}
|
|
36
44
|
export interface SidebarFilterConfig {
|
|
37
45
|
show: boolean;
|
|
38
46
|
content?: React.ReactNode;
|
|
@@ -116,6 +124,66 @@ export interface SidebarProps {
|
|
|
116
124
|
/** Pixel width when expanded (desktop) */
|
|
117
125
|
width?: number;
|
|
118
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Root container for the Sidebar. Provides context to all sub-components.
|
|
129
|
+
* Use this when building a fully custom sidebar layout.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* <Sidebar.Root expanded={expanded} onToggle={toggle} width={280}>
|
|
133
|
+
* <Sidebar.Header logo={<MyLogo />} />
|
|
134
|
+
* <Sidebar.Nav navigationGroups={groups} />
|
|
135
|
+
* <Sidebar.Footer user={user} onLogout={logout} />
|
|
136
|
+
* </Sidebar.Root>
|
|
137
|
+
*/
|
|
138
|
+
declare function SidebarRoot({ expanded: expandedProp, onToggle: onToggleProp, navigate: navigateProp, location: locationProp, width: widthProp, children, className, }: {
|
|
139
|
+
expanded?: boolean;
|
|
140
|
+
onToggle?: () => void;
|
|
141
|
+
navigate?: (path: string) => void;
|
|
142
|
+
location?: {
|
|
143
|
+
pathname: string;
|
|
144
|
+
};
|
|
145
|
+
width?: number;
|
|
146
|
+
children: React.ReactNode;
|
|
147
|
+
className?: string;
|
|
148
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
149
|
+
/**
|
|
150
|
+
* Toggle button + logo header area for the Sidebar.
|
|
151
|
+
*/
|
|
152
|
+
declare function SidebarHeader({ logo, logoCollapsed, }: {
|
|
153
|
+
logo?: React.ReactNode;
|
|
154
|
+
logoCollapsed?: React.ReactNode;
|
|
155
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
156
|
+
/**
|
|
157
|
+
* Navigation area for the Sidebar (default variant).
|
|
158
|
+
* Renders grouped or flat navigation items with overflow handling.
|
|
159
|
+
*/
|
|
160
|
+
declare function SidebarNav({ navigationGroups, routes, variant, }: {
|
|
161
|
+
navigationGroups?: RouteGroup[];
|
|
162
|
+
routes?: RouteConfig[];
|
|
163
|
+
variant?: "default" | "assistant";
|
|
164
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
165
|
+
/**
|
|
166
|
+
* Assistant-specific search + fixed area header for the Sidebar.
|
|
167
|
+
*/
|
|
168
|
+
declare function SidebarSearch({ fixedArea, search, }: {
|
|
169
|
+
fixedArea?: SidebarFixedAreaConfig;
|
|
170
|
+
search?: SidebarSearchConfig;
|
|
171
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
172
|
+
/**
|
|
173
|
+
* Footer area for the Sidebar with user info, settings, and logout.
|
|
174
|
+
*/
|
|
175
|
+
declare function SidebarFooter({ user, onLogout, onSettingsClick, showUser, showSettings, showLogout, }: {
|
|
176
|
+
user?: {
|
|
177
|
+
name?: string;
|
|
178
|
+
email?: string;
|
|
179
|
+
avatar?: string;
|
|
180
|
+
} | null;
|
|
181
|
+
onLogout?: () => void;
|
|
182
|
+
onSettingsClick?: () => void;
|
|
183
|
+
showUser?: boolean;
|
|
184
|
+
showSettings?: boolean;
|
|
185
|
+
showLogout?: boolean;
|
|
186
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
119
187
|
/**
|
|
120
188
|
* Primary navigation sidebar component.
|
|
121
189
|
*
|
|
@@ -127,9 +195,21 @@ export interface SidebarProps {
|
|
|
127
195
|
* This component is autonomous: it works out-of-the-box using local state or
|
|
128
196
|
* integrates automatically with `LayoutContext` if wrapped in `LayoutProvider`.
|
|
129
197
|
*
|
|
198
|
+
* For advanced customization, use the Compound Component API:
|
|
199
|
+
* `<Sidebar.Root>`, `<Sidebar.Header>`, `<Sidebar.Search>`, `<Sidebar.Nav>`, `<Sidebar.Footer>`
|
|
200
|
+
*
|
|
130
201
|
* @ai-rules
|
|
131
202
|
* 1. NEVER recreate the sidebar with raw Tailwind classes — always use this component.
|
|
132
203
|
* 2. Use `variant="assistant"` for AI/tool sidebars; use `variant="default"` for standard navigation.
|
|
133
204
|
* 3. Supports `Ctrl+B` keyboard shortcut automatically via `LayoutProvider`.
|
|
134
205
|
*/
|
|
135
206
|
export declare function Sidebar({ expanded: expandedProp, onToggle: onToggleProp, user, onLogout, onSettingsClick, location: locationProp, navigate: navigateProp, routes, logo, logoCollapsed, variant, fixedArea, search, navigationGroups, footer, showFooter, width: widthProp, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
207
|
+
export declare namespace Sidebar {
|
|
208
|
+
var Root: typeof SidebarRoot;
|
|
209
|
+
var Header: typeof SidebarHeader;
|
|
210
|
+
var Search: typeof SidebarSearch;
|
|
211
|
+
var Nav: typeof SidebarNav;
|
|
212
|
+
var Footer: typeof SidebarFooter;
|
|
213
|
+
}
|
|
214
|
+
export { useSidebar } from "./use-sidebar";
|
|
215
|
+
export type { UseSidebarProps } from "./use-sidebar";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RouteGroup } from "./sidebar";
|
|
2
|
+
export interface UseSidebarProps {
|
|
3
|
+
defaultExpanded?: boolean;
|
|
4
|
+
expanded?: boolean;
|
|
5
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
6
|
+
navigationGroups?: RouteGroup[];
|
|
7
|
+
}
|
|
8
|
+
export declare function useSidebar({ defaultExpanded, expanded: controlledExpanded, onExpandedChange, navigationGroups, }?: UseSidebarProps): {
|
|
9
|
+
expanded: boolean;
|
|
10
|
+
setExpanded: (value: boolean | ((prev: boolean) => boolean)) => void;
|
|
11
|
+
toggleExpanded: () => void;
|
|
12
|
+
isMobileViewport: boolean;
|
|
13
|
+
hasOverflow: boolean;
|
|
14
|
+
visibleItems: RouteGroup[];
|
|
15
|
+
overflowItems: RouteGroup[];
|
|
16
|
+
openSubmenu: string | null;
|
|
17
|
+
setOpenSubmenu: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
18
|
+
isFilterOpen: boolean;
|
|
19
|
+
setIsFilterOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
20
|
+
navRef: import("react").RefObject<HTMLElement>;
|
|
21
|
+
navigationGroups: RouteGroup[];
|
|
22
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Width of the sidebar when expanded (Desktop) */
|
|
2
|
-
export declare const SIDEBAR_EXPANDED_WIDTH =
|
|
2
|
+
export declare const SIDEBAR_EXPANDED_WIDTH = 280;
|
|
3
3
|
/** Width of the sidebar when collapsed (Desktop) */
|
|
4
4
|
export declare const SIDEBAR_COLLAPSED_WIDTH = 80;
|
|
5
5
|
/** Width of the assistant panel when expanded (Desktop) */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "success" | "info" | "warning" | "destructive" | "
|
|
4
|
+
variant?: "link" | "default" | "success" | "info" | "warning" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
/**
|