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/index.umd.js
CHANGED
|
@@ -863,15 +863,114 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
863
863
|
}
|
|
864
864
|
);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Popover({
|
|
867
|
+
...props
|
|
868
|
+
}) {
|
|
869
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
870
|
+
}
|
|
871
|
+
function PopoverTrigger({
|
|
872
|
+
...props
|
|
873
|
+
}) {
|
|
874
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
875
|
+
}
|
|
876
|
+
function PopoverContent({
|
|
877
|
+
className,
|
|
878
|
+
align = "center",
|
|
879
|
+
sideOffset = 4,
|
|
880
|
+
...props
|
|
881
|
+
}) {
|
|
882
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
883
|
+
PopoverPrimitive__namespace.Content,
|
|
884
|
+
{
|
|
885
|
+
"data-slot": "popover-content",
|
|
886
|
+
align,
|
|
887
|
+
sideOffset,
|
|
888
|
+
className: cn(
|
|
889
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
890
|
+
className
|
|
891
|
+
),
|
|
892
|
+
...props
|
|
893
|
+
}
|
|
894
|
+
) });
|
|
895
|
+
}
|
|
896
|
+
const Input = React__namespace.forwardRef(
|
|
897
|
+
({ className, type, size = "md", ...props }, ref) => {
|
|
898
|
+
const sizeClasses = {
|
|
899
|
+
sm: "h-8 px-2 py-1 text-sm",
|
|
900
|
+
md: "h-10 px-3 py-2 text-base",
|
|
901
|
+
lg: "h-12 px-4 py-3 text-base"
|
|
902
|
+
};
|
|
903
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
904
|
+
"input",
|
|
905
|
+
{
|
|
906
|
+
type,
|
|
907
|
+
"data-slot": "input",
|
|
908
|
+
className: cn(
|
|
909
|
+
"flex w-full min-w-0 bg-background rounded-[var(--radius)] border border-border transition-colors outline-none text-foreground",
|
|
910
|
+
"placeholder:text-muted-foreground",
|
|
911
|
+
"focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
912
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
913
|
+
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
914
|
+
sizeClasses[size],
|
|
915
|
+
className
|
|
916
|
+
),
|
|
917
|
+
ref,
|
|
918
|
+
...props
|
|
919
|
+
}
|
|
920
|
+
);
|
|
921
|
+
}
|
|
922
|
+
);
|
|
923
|
+
Input.displayName = "Input";
|
|
924
|
+
function RichTextEditor({
|
|
925
|
+
value,
|
|
926
|
+
onChange,
|
|
927
|
+
placeholder,
|
|
928
|
+
className,
|
|
929
|
+
actionButton,
|
|
930
|
+
allowSearch = true,
|
|
931
|
+
allowLinks = true,
|
|
932
|
+
allowUndoRedo = true,
|
|
933
|
+
allowHeadings = true,
|
|
934
|
+
allowFormatting = true,
|
|
935
|
+
allowAlignment = true,
|
|
936
|
+
allowLists = true,
|
|
937
|
+
showWordCount = true,
|
|
938
|
+
showCharacterCount = true,
|
|
939
|
+
disabled = false,
|
|
940
|
+
readOnly = false,
|
|
941
|
+
onFocus,
|
|
942
|
+
onBlur,
|
|
943
|
+
minHeight,
|
|
944
|
+
maxHeight
|
|
945
|
+
}) {
|
|
946
|
+
const isEditable = !disabled && !readOnly;
|
|
947
|
+
const showToolbar = isEditable;
|
|
867
948
|
const editorRef = React.useRef(null);
|
|
868
949
|
const [activeFormats, setActiveFormats] = React.useState({});
|
|
950
|
+
const [isSearchOpen, setIsSearchOpen] = React.useState(false);
|
|
951
|
+
const [searchQuery, setSearchQuery] = React.useState("");
|
|
952
|
+
const [linkUrl, setLinkUrl] = React.useState("https://");
|
|
953
|
+
const [isLinkOpen, setIsLinkOpen] = React.useState(false);
|
|
954
|
+
const searchInputRef = React.useRef(null);
|
|
955
|
+
const linkInputRef = React.useRef(null);
|
|
956
|
+
const savedSelection = React.useRef(null);
|
|
957
|
+
const findParentTag = (node, tagName) => {
|
|
958
|
+
let current = node;
|
|
959
|
+
while (current && current !== editorRef.current) {
|
|
960
|
+
if (current.nodeName === tagName) return current;
|
|
961
|
+
current = current.parentNode;
|
|
962
|
+
}
|
|
963
|
+
return null;
|
|
964
|
+
};
|
|
869
965
|
const updateActiveFormats = () => {
|
|
870
966
|
let formatBlock = "";
|
|
871
967
|
try {
|
|
872
968
|
formatBlock = document.queryCommandValue("formatBlock");
|
|
873
969
|
} catch (e) {
|
|
874
970
|
}
|
|
971
|
+
const selection = window.getSelection();
|
|
972
|
+
const anchorNode = selection == null ? void 0 : selection.anchorNode;
|
|
973
|
+
const focusNode = selection == null ? void 0 : selection.focusNode;
|
|
875
974
|
setActiveFormats({
|
|
876
975
|
bold: document.queryCommandState("bold"),
|
|
877
976
|
italic: document.queryCommandState("italic"),
|
|
@@ -881,6 +980,7 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
881
980
|
justifyRight: document.queryCommandState("justifyRight"),
|
|
882
981
|
insertUnorderedList: document.queryCommandState("insertUnorderedList"),
|
|
883
982
|
insertOrderedList: document.queryCommandState("insertOrderedList"),
|
|
983
|
+
link: !!(findParentTag(anchorNode || null, "A") || findParentTag(focusNode || null, "A")),
|
|
884
984
|
h1: formatBlock === "h1" || formatBlock === "H1",
|
|
885
985
|
h2: formatBlock === "h2" || formatBlock === "H2",
|
|
886
986
|
h3: formatBlock === "h3" || formatBlock === "H3",
|
|
@@ -935,7 +1035,152 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
935
1035
|
const text = ((_a = editorRef.current) == null ? void 0 : _a.innerText) || "";
|
|
936
1036
|
return text.trim() ? text.trim().split(/\s+/).length : 0;
|
|
937
1037
|
};
|
|
938
|
-
|
|
1038
|
+
const getCharacterCount = () => {
|
|
1039
|
+
var _a;
|
|
1040
|
+
const text = ((_a = editorRef.current) == null ? void 0 : _a.innerText) || "";
|
|
1041
|
+
return text.trim() ? text.length : 0;
|
|
1042
|
+
};
|
|
1043
|
+
const performSearch = (text, backward = false) => {
|
|
1044
|
+
var _a, _b;
|
|
1045
|
+
if (!text || !editorRef.current) return;
|
|
1046
|
+
const editor = editorRef.current;
|
|
1047
|
+
const selection = window.getSelection();
|
|
1048
|
+
if (!selection) return;
|
|
1049
|
+
const walker = document.createTreeWalker(editor, NodeFilter.SHOW_TEXT);
|
|
1050
|
+
const segments = [];
|
|
1051
|
+
let offset = 0;
|
|
1052
|
+
let node;
|
|
1053
|
+
while (node = walker.nextNode()) {
|
|
1054
|
+
segments.push({ node, start: offset });
|
|
1055
|
+
offset += node.length;
|
|
1056
|
+
}
|
|
1057
|
+
const fullText = segments.reduce((acc, s) => acc + (s.node.textContent ?? ""), "");
|
|
1058
|
+
let searchFrom = 0;
|
|
1059
|
+
if (selection.rangeCount > 0) {
|
|
1060
|
+
const range2 = selection.getRangeAt(0);
|
|
1061
|
+
if (editor.contains(range2.startContainer)) {
|
|
1062
|
+
const seg = segments.find((s) => s.node === range2.startContainer);
|
|
1063
|
+
if (seg) {
|
|
1064
|
+
searchFrom = backward ? seg.start + range2.startOffset - 1 : seg.start + range2.endOffset;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
const lowerFull = fullText.toLowerCase();
|
|
1069
|
+
const lowerQuery = text.toLowerCase();
|
|
1070
|
+
let matchStart = -1;
|
|
1071
|
+
if (backward) {
|
|
1072
|
+
matchStart = lowerFull.lastIndexOf(lowerQuery, Math.max(0, searchFrom));
|
|
1073
|
+
if (matchStart === -1) matchStart = lowerFull.lastIndexOf(lowerQuery);
|
|
1074
|
+
} else {
|
|
1075
|
+
matchStart = lowerFull.indexOf(lowerQuery, searchFrom);
|
|
1076
|
+
if (matchStart === -1) matchStart = lowerFull.indexOf(lowerQuery);
|
|
1077
|
+
}
|
|
1078
|
+
if (matchStart === -1) return;
|
|
1079
|
+
const matchEnd = matchStart + text.length;
|
|
1080
|
+
const range = document.createRange();
|
|
1081
|
+
let startSet = false;
|
|
1082
|
+
let endSet = false;
|
|
1083
|
+
for (let i = 0; i < segments.length && !endSet; i++) {
|
|
1084
|
+
const seg = segments[i];
|
|
1085
|
+
const segEnd = seg.start + seg.node.length;
|
|
1086
|
+
if (!startSet && matchStart < segEnd && matchStart >= seg.start) {
|
|
1087
|
+
range.setStart(seg.node, matchStart - seg.start);
|
|
1088
|
+
startSet = true;
|
|
1089
|
+
}
|
|
1090
|
+
if (startSet && matchEnd <= segEnd) {
|
|
1091
|
+
range.setEnd(seg.node, matchEnd - seg.start);
|
|
1092
|
+
endSet = true;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
if (startSet && endSet) {
|
|
1096
|
+
selection.removeAllRanges();
|
|
1097
|
+
selection.addRange(range);
|
|
1098
|
+
(_b = (_a = range.startContainer.parentElement) == null ? void 0 : _a.scrollIntoView) == null ? void 0 : _b.call(_a, { block: "nearest" });
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
const handleCreateLink = () => {
|
|
1102
|
+
if (savedSelection.current) {
|
|
1103
|
+
const selection2 = window.getSelection();
|
|
1104
|
+
selection2 == null ? void 0 : selection2.removeAllRanges();
|
|
1105
|
+
selection2 == null ? void 0 : selection2.addRange(savedSelection.current);
|
|
1106
|
+
}
|
|
1107
|
+
const selection = window.getSelection();
|
|
1108
|
+
const anchorNode = selection == null ? void 0 : selection.anchorNode;
|
|
1109
|
+
const existingLink = findParentTag(anchorNode || null, "A");
|
|
1110
|
+
if (existingLink) {
|
|
1111
|
+
if (linkUrl) {
|
|
1112
|
+
existingLink.setAttribute("href", linkUrl);
|
|
1113
|
+
existingLink.setAttribute("target", "_blank");
|
|
1114
|
+
existingLink.setAttribute("rel", "noopener noreferrer");
|
|
1115
|
+
existingLink.style.color = "hsl(var(--primary))";
|
|
1116
|
+
existingLink.style.textDecoration = "underline";
|
|
1117
|
+
existingLink.style.cursor = "pointer";
|
|
1118
|
+
}
|
|
1119
|
+
handleInput();
|
|
1120
|
+
setIsLinkOpen(false);
|
|
1121
|
+
savedSelection.current = null;
|
|
1122
|
+
return;
|
|
1123
|
+
}
|
|
1124
|
+
if (!selection || selection.rangeCount === 0 || selection.isCollapsed) {
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
if (linkUrl) {
|
|
1128
|
+
execCommand("createLink", linkUrl);
|
|
1129
|
+
setTimeout(() => {
|
|
1130
|
+
var _a;
|
|
1131
|
+
const anchor = findParentTag(((_a = window.getSelection()) == null ? void 0 : _a.anchorNode) || null, "A");
|
|
1132
|
+
if (anchor) {
|
|
1133
|
+
anchor.setAttribute("target", "_blank");
|
|
1134
|
+
anchor.setAttribute("rel", "noopener noreferrer");
|
|
1135
|
+
anchor.style.color = "hsl(var(--primary))";
|
|
1136
|
+
anchor.style.textDecoration = "underline";
|
|
1137
|
+
anchor.style.cursor = "pointer";
|
|
1138
|
+
}
|
|
1139
|
+
handleInput();
|
|
1140
|
+
}, 10);
|
|
1141
|
+
setIsLinkOpen(false);
|
|
1142
|
+
savedSelection.current = null;
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
const handleUnlink = () => {
|
|
1146
|
+
const selection = window.getSelection();
|
|
1147
|
+
const anchorNode = selection == null ? void 0 : selection.anchorNode;
|
|
1148
|
+
const existingLink = findParentTag(anchorNode || null, "A");
|
|
1149
|
+
if (existingLink) {
|
|
1150
|
+
const parent = existingLink.parentNode;
|
|
1151
|
+
while (existingLink.firstChild) {
|
|
1152
|
+
parent == null ? void 0 : parent.insertBefore(existingLink.firstChild, existingLink);
|
|
1153
|
+
}
|
|
1154
|
+
parent == null ? void 0 : parent.removeChild(existingLink);
|
|
1155
|
+
handleInput();
|
|
1156
|
+
} else {
|
|
1157
|
+
execCommand("unlink");
|
|
1158
|
+
}
|
|
1159
|
+
};
|
|
1160
|
+
const onLinkPopoverOpenChange = (open) => {
|
|
1161
|
+
if (open) {
|
|
1162
|
+
const selection = window.getSelection();
|
|
1163
|
+
const anchorNode = selection == null ? void 0 : selection.anchorNode;
|
|
1164
|
+
const focusNode = selection == null ? void 0 : selection.focusNode;
|
|
1165
|
+
const existingLink = findParentTag(anchorNode || null, "A") || findParentTag(focusNode || null, "A");
|
|
1166
|
+
if (existingLink) {
|
|
1167
|
+
setLinkUrl(existingLink.getAttribute("href") || "https://");
|
|
1168
|
+
} else {
|
|
1169
|
+
setLinkUrl("https://");
|
|
1170
|
+
}
|
|
1171
|
+
if (selection && selection.rangeCount > 0 && (!selection.isCollapsed || existingLink)) {
|
|
1172
|
+
savedSelection.current = selection.getRangeAt(0).cloneRange();
|
|
1173
|
+
} else {
|
|
1174
|
+
savedSelection.current = null;
|
|
1175
|
+
}
|
|
1176
|
+
setTimeout(() => {
|
|
1177
|
+
var _a;
|
|
1178
|
+
return (_a = linkInputRef.current) == null ? void 0 : _a.focus();
|
|
1179
|
+
}, 100);
|
|
1180
|
+
}
|
|
1181
|
+
setIsLinkOpen(open);
|
|
1182
|
+
};
|
|
1183
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col h-full w-full bg-background sm:border border-border sm:shadow-sm sm:rounded-lg overflow-hidden", disabled && "opacity-50 pointer-events-none", className), children: [
|
|
939
1184
|
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
940
1185
|
[contenteditable]:empty:before {
|
|
941
1186
|
content: attr(data-placeholder);
|
|
@@ -990,6 +1235,11 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
990
1235
|
margin-bottom: 1rem !important;
|
|
991
1236
|
line-height: 1.6 !important;
|
|
992
1237
|
}
|
|
1238
|
+
.prose-editor a {
|
|
1239
|
+
color: var(--info) !important;
|
|
1240
|
+
text-decoration: underline !important;
|
|
1241
|
+
cursor: pointer !important;
|
|
1242
|
+
}
|
|
993
1243
|
.prose-editor h1:first-child, .prose-editor h2:first-child, .prose-editor h3:first-child, .prose-editor p:first-child {
|
|
994
1244
|
margin-top: 0 !important;
|
|
995
1245
|
}
|
|
@@ -997,165 +1247,239 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
997
1247
|
outline: none !important;
|
|
998
1248
|
}
|
|
999
1249
|
` }),
|
|
1000
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 border-b border-border bg-muted/30 flex items-center gap-1 flex-wrap shrink-0", children: [
|
|
1001
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1250
|
+
showToolbar && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-2 border-b border-border bg-muted/30 flex items-center gap-1 flex-wrap shrink-0", children: [
|
|
1251
|
+
allowUndoRedo && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1252
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1253
|
+
Button,
|
|
1254
|
+
{
|
|
1255
|
+
variant: "ghost",
|
|
1256
|
+
size: "icon",
|
|
1257
|
+
className: "h-8 w-8 text-muted-foreground",
|
|
1258
|
+
onClick: () => execCommand("undo"),
|
|
1259
|
+
title: "Desfazer",
|
|
1260
|
+
"aria-label": "Desfazer",
|
|
1261
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Undo, { className: "w-4 h-4" })
|
|
1262
|
+
}
|
|
1263
|
+
),
|
|
1264
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1265
|
+
Button,
|
|
1266
|
+
{
|
|
1267
|
+
variant: "ghost",
|
|
1268
|
+
size: "icon",
|
|
1269
|
+
className: "h-8 w-8 text-muted-foreground",
|
|
1270
|
+
onClick: () => execCommand("redo"),
|
|
1271
|
+
title: "Refazer",
|
|
1272
|
+
"aria-label": "Refazer",
|
|
1273
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Redo, { className: "w-4 h-4" })
|
|
1274
|
+
}
|
|
1275
|
+
),
|
|
1276
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" })
|
|
1277
|
+
] }),
|
|
1278
|
+
allowHeadings && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1279
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { modal: false, children: [
|
|
1280
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", className: "h-8 gap-0 text-muted-foreground w-[120px] justify-start px-2", children: [
|
|
1281
|
+
getCurrentBlockLabel(),
|
|
1282
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-3 h-3 ml-auto opacity-50 shrink-0" })
|
|
1283
|
+
] }) }),
|
|
1284
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "start", className: "w-[160px]", style: { zIndex: 9999 }, children: [
|
|
1285
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "P"), className: "gap-2", children: [
|
|
1286
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { className: "w-4 h-4 text-muted-foreground" }),
|
|
1287
|
+
" Parágrafo"
|
|
1288
|
+
] }),
|
|
1289
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "H1"), className: "gap-2", children: [
|
|
1290
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heading1, { className: "w-4 h-4 text-muted-foreground" }),
|
|
1291
|
+
" Título 1"
|
|
1292
|
+
] }),
|
|
1293
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "H2"), className: "gap-2", children: [
|
|
1294
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heading2, { className: "w-4 h-4 text-muted-foreground" }),
|
|
1295
|
+
" Título 2"
|
|
1296
|
+
] }),
|
|
1297
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "H3"), className: "gap-2", children: [
|
|
1298
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heading3, { className: "w-4 h-4 text-muted-foreground" }),
|
|
1299
|
+
" Título 3"
|
|
1300
|
+
] })
|
|
1047
1301
|
] })
|
|
1048
|
-
] })
|
|
1302
|
+
] }),
|
|
1303
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" })
|
|
1049
1304
|
] }),
|
|
1050
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1305
|
+
allowFormatting && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1306
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1307
|
+
Button,
|
|
1308
|
+
{
|
|
1309
|
+
variant: "ghost",
|
|
1310
|
+
size: "icon",
|
|
1311
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.bold && "bg-muted text-foreground"),
|
|
1312
|
+
onClick: () => execCommand("bold"),
|
|
1313
|
+
title: "Negrito",
|
|
1314
|
+
"aria-label": "Negrito",
|
|
1315
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bold, { className: "w-4 h-4" })
|
|
1316
|
+
}
|
|
1317
|
+
),
|
|
1318
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1319
|
+
Button,
|
|
1320
|
+
{
|
|
1321
|
+
variant: "ghost",
|
|
1322
|
+
size: "icon",
|
|
1323
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.italic && "bg-muted text-foreground"),
|
|
1324
|
+
onClick: () => execCommand("italic"),
|
|
1325
|
+
title: "Itálico",
|
|
1326
|
+
"aria-label": "Itálico",
|
|
1327
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Italic, { className: "w-4 h-4" })
|
|
1328
|
+
}
|
|
1329
|
+
),
|
|
1330
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1331
|
+
Button,
|
|
1332
|
+
{
|
|
1333
|
+
variant: "ghost",
|
|
1334
|
+
size: "icon",
|
|
1335
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.underline && "bg-muted text-foreground"),
|
|
1336
|
+
onClick: () => execCommand("underline"),
|
|
1337
|
+
title: "Sublinhado",
|
|
1338
|
+
"aria-label": "Sublinhado",
|
|
1339
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Underline, { className: "w-4 h-4" })
|
|
1340
|
+
}
|
|
1341
|
+
),
|
|
1342
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" })
|
|
1343
|
+
] }),
|
|
1344
|
+
allowAlignment && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1345
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1346
|
+
Button,
|
|
1347
|
+
{
|
|
1348
|
+
variant: "ghost",
|
|
1349
|
+
size: "icon",
|
|
1350
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.justifyLeft && "bg-muted text-foreground"),
|
|
1351
|
+
onClick: () => execCommand("justifyLeft"),
|
|
1352
|
+
title: "Alinhar à esquerda",
|
|
1353
|
+
"aria-label": "Alinhar à esquerda",
|
|
1354
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignLeft, { className: "w-4 h-4" })
|
|
1355
|
+
}
|
|
1356
|
+
),
|
|
1357
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1358
|
+
Button,
|
|
1359
|
+
{
|
|
1360
|
+
variant: "ghost",
|
|
1361
|
+
size: "icon",
|
|
1362
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.justifyCenter && "bg-muted text-foreground"),
|
|
1363
|
+
onClick: () => execCommand("justifyCenter"),
|
|
1364
|
+
title: "Centralizar",
|
|
1365
|
+
"aria-label": "Centralizar",
|
|
1366
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignCenter, { className: "w-4 h-4" })
|
|
1367
|
+
}
|
|
1368
|
+
),
|
|
1369
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1370
|
+
Button,
|
|
1371
|
+
{
|
|
1372
|
+
variant: "ghost",
|
|
1373
|
+
size: "icon",
|
|
1374
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.justifyRight && "bg-muted text-foreground"),
|
|
1375
|
+
onClick: () => execCommand("justifyRight"),
|
|
1376
|
+
title: "Alinhar à direita",
|
|
1377
|
+
"aria-label": "Alinhar à direita",
|
|
1378
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignRight, { className: "w-4 h-4" })
|
|
1379
|
+
}
|
|
1380
|
+
),
|
|
1381
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" })
|
|
1382
|
+
] }),
|
|
1383
|
+
allowLists && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1384
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1385
|
+
Button,
|
|
1386
|
+
{
|
|
1387
|
+
variant: "ghost",
|
|
1388
|
+
size: "icon",
|
|
1389
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.insertUnorderedList && "bg-muted text-foreground"),
|
|
1390
|
+
onClick: () => execCommand("insertUnorderedList"),
|
|
1391
|
+
title: "Lista com marcadores",
|
|
1392
|
+
"aria-label": "Lista com marcadores",
|
|
1393
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "w-4 h-4" })
|
|
1394
|
+
}
|
|
1395
|
+
),
|
|
1396
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1397
|
+
Button,
|
|
1398
|
+
{
|
|
1399
|
+
variant: "ghost",
|
|
1400
|
+
size: "icon",
|
|
1401
|
+
className: cn("h-8 w-8 text-muted-foreground", activeFormats.insertOrderedList && "bg-muted text-foreground"),
|
|
1402
|
+
onClick: () => execCommand("insertOrderedList"),
|
|
1403
|
+
title: "Lista numerada",
|
|
1404
|
+
"aria-label": "Lista numerada",
|
|
1405
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ListOrdered, { className: "w-4 h-4" })
|
|
1406
|
+
}
|
|
1407
|
+
),
|
|
1408
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" })
|
|
1409
|
+
] }),
|
|
1410
|
+
allowLinks && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1411
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: isLinkOpen, onOpenChange: onLinkPopoverOpenChange, modal: false, children: [
|
|
1412
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1413
|
+
Button,
|
|
1414
|
+
{
|
|
1415
|
+
variant: "ghost",
|
|
1416
|
+
size: "icon",
|
|
1417
|
+
className: cn("h-8 w-8 text-muted-foreground", (activeFormats.link || isLinkOpen) && "bg-muted text-foreground"),
|
|
1418
|
+
title: "Inserir link",
|
|
1419
|
+
"aria-label": "Inserir link",
|
|
1420
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link, { className: "w-4 h-4" })
|
|
1421
|
+
}
|
|
1422
|
+
) }),
|
|
1423
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-80 p-3", align: "start", style: { zIndex: 9999 }, children: !savedSelection.current && !activeFormats.link ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground py-1", children: "Selecione um texto para criar um link." }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1424
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-medium", children: activeFormats.link ? "Editar Link" : "Inserir Link" }),
|
|
1425
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
1426
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1427
|
+
Input,
|
|
1428
|
+
{
|
|
1429
|
+
ref: linkInputRef,
|
|
1430
|
+
placeholder: "https://...",
|
|
1431
|
+
value: linkUrl,
|
|
1432
|
+
onChange: (e) => setLinkUrl(e.target.value),
|
|
1433
|
+
onKeyDown: (e) => e.key === "Enter" && handleCreateLink(),
|
|
1434
|
+
className: "h-8 text-xs"
|
|
1435
|
+
}
|
|
1436
|
+
),
|
|
1437
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", className: "h-8", onClick: handleCreateLink, children: "Aplicar" })
|
|
1438
|
+
] })
|
|
1439
|
+
] }) })
|
|
1440
|
+
] }),
|
|
1441
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1442
|
+
Button,
|
|
1443
|
+
{
|
|
1444
|
+
variant: "ghost",
|
|
1445
|
+
size: "icon",
|
|
1446
|
+
className: "h-8 w-8 text-muted-foreground",
|
|
1447
|
+
onClick: handleUnlink,
|
|
1448
|
+
title: "Remover link",
|
|
1449
|
+
"aria-label": "Remover link",
|
|
1450
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
|
|
1451
|
+
}
|
|
1452
|
+
),
|
|
1453
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" })
|
|
1454
|
+
] }),
|
|
1455
|
+
(allowFormatting || allowHeadings || allowAlignment || allowLists || allowLinks) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1138
1456
|
Button,
|
|
1139
1457
|
{
|
|
1140
1458
|
variant: "ghost",
|
|
1141
1459
|
size: "icon",
|
|
1142
|
-
className:
|
|
1143
|
-
onClick: () => execCommand("
|
|
1144
|
-
title: "
|
|
1145
|
-
"aria-label": "
|
|
1146
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.
|
|
1460
|
+
className: "h-8 w-8 text-muted-foreground",
|
|
1461
|
+
onClick: () => execCommand("removeFormat"),
|
|
1462
|
+
title: "Limpar formatação",
|
|
1463
|
+
"aria-label": "Limpar formatação",
|
|
1464
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { className: "w-4 h-4" })
|
|
1147
1465
|
}
|
|
1148
1466
|
),
|
|
1149
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1467
|
+
allowSearch && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1150
1468
|
Button,
|
|
1151
1469
|
{
|
|
1152
1470
|
variant: "ghost",
|
|
1153
1471
|
size: "icon",
|
|
1154
|
-
className: "h-8 w-8 text-muted-foreground",
|
|
1155
|
-
onClick: () =>
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1472
|
+
className: cn("h-8 w-8 text-muted-foreground", isSearchOpen && "bg-muted text-foreground"),
|
|
1473
|
+
onClick: () => {
|
|
1474
|
+
setIsSearchOpen(!isSearchOpen);
|
|
1475
|
+
if (!isSearchOpen) setTimeout(() => {
|
|
1476
|
+
var _a;
|
|
1477
|
+
return (_a = searchInputRef.current) == null ? void 0 : _a.focus();
|
|
1478
|
+
}, 100);
|
|
1479
|
+
},
|
|
1480
|
+
title: "Buscar",
|
|
1481
|
+
"aria-label": "Buscar",
|
|
1482
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-4 h-4" })
|
|
1159
1483
|
}
|
|
1160
1484
|
),
|
|
1161
1485
|
actionButton && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1163,23 +1487,105 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
1163
1487
|
actionButton
|
|
1164
1488
|
] })
|
|
1165
1489
|
] }),
|
|
1166
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1490
|
+
isSearchOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-1.5 border-b border-border bg-muted/20 flex items-center gap-2", children: [
|
|
1491
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 max-w-sm", children: [
|
|
1492
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground" }),
|
|
1493
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1494
|
+
Input,
|
|
1495
|
+
{
|
|
1496
|
+
ref: searchInputRef,
|
|
1497
|
+
placeholder: "Buscar no texto...",
|
|
1498
|
+
value: searchQuery,
|
|
1499
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
1500
|
+
onKeyDown: (e) => {
|
|
1501
|
+
if (e.key === "Enter") {
|
|
1502
|
+
e.preventDefault();
|
|
1503
|
+
performSearch(searchQuery, e.shiftKey);
|
|
1504
|
+
}
|
|
1505
|
+
if (e.key === "Escape") {
|
|
1506
|
+
setIsSearchOpen(false);
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
className: "h-8 pl-8 text-xs bg-background"
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1512
|
+
] }),
|
|
1513
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1514
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1515
|
+
Button,
|
|
1516
|
+
{
|
|
1517
|
+
variant: "ghost",
|
|
1518
|
+
size: "icon",
|
|
1519
|
+
className: "h-7 w-7",
|
|
1520
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1521
|
+
onClick: () => performSearch(searchQuery, true),
|
|
1522
|
+
title: "Anterior",
|
|
1523
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "w-4 h-4" })
|
|
1524
|
+
}
|
|
1525
|
+
),
|
|
1526
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1527
|
+
Button,
|
|
1528
|
+
{
|
|
1529
|
+
variant: "ghost",
|
|
1530
|
+
size: "icon",
|
|
1531
|
+
className: "h-7 w-7",
|
|
1532
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1533
|
+
onClick: () => performSearch(searchQuery, false),
|
|
1534
|
+
title: "Próximo",
|
|
1535
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-4 h-4" })
|
|
1536
|
+
}
|
|
1537
|
+
),
|
|
1538
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-border mx-1" }),
|
|
1539
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1540
|
+
Button,
|
|
1541
|
+
{
|
|
1542
|
+
variant: "ghost",
|
|
1543
|
+
size: "icon",
|
|
1544
|
+
className: "h-7 w-7 text-muted-foreground hover:text-foreground",
|
|
1545
|
+
onClick: () => setIsSearchOpen(false),
|
|
1546
|
+
title: "Fechar busca",
|
|
1547
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "w-4 h-4" })
|
|
1548
|
+
}
|
|
1549
|
+
)
|
|
1550
|
+
] }),
|
|
1551
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden sm:block text-[10px] text-muted-foreground ml-auto uppercase tracking-wider font-medium", children: "Pressione Enter para buscar" })
|
|
1552
|
+
] }),
|
|
1553
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1167
1554
|
"div",
|
|
1168
1555
|
{
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1556
|
+
className: "flex-1 overflow-y-auto p-4 sm:p-8 bg-background scrollbar-thin",
|
|
1557
|
+
style: { minHeight, maxHeight },
|
|
1558
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1559
|
+
"div",
|
|
1560
|
+
{
|
|
1561
|
+
ref: editorRef,
|
|
1562
|
+
contentEditable: isEditable,
|
|
1563
|
+
onInput: handleInput,
|
|
1564
|
+
onSelect: isEditable ? updateActiveFormats : void 0,
|
|
1565
|
+
onFocus: () => {
|
|
1566
|
+
updateActiveFormats();
|
|
1567
|
+
onFocus == null ? void 0 : onFocus();
|
|
1568
|
+
},
|
|
1569
|
+
onBlur,
|
|
1570
|
+
className: "prose-editor min-h-full max-w-none focus:outline-none",
|
|
1571
|
+
"data-placeholder": placeholder
|
|
1572
|
+
}
|
|
1573
|
+
)
|
|
1176
1574
|
}
|
|
1177
|
-
)
|
|
1178
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2 border-t border-border bg-muted/20 flex items-center justify-between", children: [
|
|
1179
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[10px] sm:text-xs text-muted-foreground font-medium uppercase tracking-wider", children: [
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1575
|
+
),
|
|
1576
|
+
(showWordCount || showCharacterCount) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2 border-t border-border bg-muted/20 flex items-center justify-between", children: [
|
|
1577
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[10px] sm:text-xs text-muted-foreground font-medium uppercase tracking-wider flex items-center gap-2", children: [
|
|
1578
|
+
showWordCount && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
1579
|
+
getWordCount(),
|
|
1580
|
+
" ",
|
|
1581
|
+
getWordCount() === 1 ? "palavra" : "palavras"
|
|
1582
|
+
] }),
|
|
1583
|
+
showWordCount && showCharacterCount && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "•" }),
|
|
1584
|
+
showCharacterCount && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
1585
|
+
getCharacterCount(),
|
|
1586
|
+
" ",
|
|
1587
|
+
getCharacterCount() === 1 ? "caractere" : "caracteres"
|
|
1588
|
+
] })
|
|
1183
1589
|
] }),
|
|
1184
1590
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] sm:text-xs text-muted-foreground/60 italic", children: "Auto-save ativo" })
|
|
1185
1591
|
] })
|
|
@@ -1264,52 +1670,22 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
1264
1670
|
}
|
|
1265
1671
|
),
|
|
1266
1672
|
isLong && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1267
|
-
Button,
|
|
1268
|
-
{
|
|
1269
|
-
variant: "ghost",
|
|
1270
|
-
size: "sm",
|
|
1271
|
-
onClick: () => setIsExpanded(!isExpanded),
|
|
1272
|
-
className: "mt-2 w-full text-xs hover:bg-accent text-muted-foreground",
|
|
1273
|
-
children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1274
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "w-3 h-3 mr-1" }),
|
|
1275
|
-
"See less"
|
|
1276
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1277
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-3 h-3 mr-1" }),
|
|
1278
|
-
"See more"
|
|
1279
|
-
] })
|
|
1280
|
-
}
|
|
1281
|
-
)
|
|
1282
|
-
] });
|
|
1283
|
-
}
|
|
1284
|
-
function Popover({
|
|
1285
|
-
...props
|
|
1286
|
-
}) {
|
|
1287
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
1288
|
-
}
|
|
1289
|
-
function PopoverTrigger({
|
|
1290
|
-
...props
|
|
1291
|
-
}) {
|
|
1292
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1293
|
-
}
|
|
1294
|
-
function PopoverContent({
|
|
1295
|
-
className,
|
|
1296
|
-
align = "center",
|
|
1297
|
-
sideOffset = 4,
|
|
1298
|
-
...props
|
|
1299
|
-
}) {
|
|
1300
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1301
|
-
PopoverPrimitive__namespace.Content,
|
|
1302
|
-
{
|
|
1303
|
-
"data-slot": "popover-content",
|
|
1304
|
-
align,
|
|
1305
|
-
sideOffset,
|
|
1306
|
-
className: cn(
|
|
1307
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
1308
|
-
className
|
|
1309
|
-
),
|
|
1310
|
-
...props
|
|
1311
|
-
}
|
|
1312
|
-
) });
|
|
1673
|
+
Button,
|
|
1674
|
+
{
|
|
1675
|
+
variant: "ghost",
|
|
1676
|
+
size: "sm",
|
|
1677
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
1678
|
+
className: "mt-2 w-full text-xs hover:bg-accent text-muted-foreground",
|
|
1679
|
+
children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1680
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "w-3 h-3 mr-1" }),
|
|
1681
|
+
"See less"
|
|
1682
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1683
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-3 h-3 mr-1" }),
|
|
1684
|
+
"See more"
|
|
1685
|
+
] })
|
|
1686
|
+
}
|
|
1687
|
+
)
|
|
1688
|
+
] });
|
|
1313
1689
|
}
|
|
1314
1690
|
function ModernChatInput({
|
|
1315
1691
|
value,
|
|
@@ -3138,10 +3514,10 @@ ${colorConfig.map(([key, itemConfig]) => {
|
|
|
3138
3514
|
) });
|
|
3139
3515
|
}
|
|
3140
3516
|
[
|
|
3141
|
-
{ id: "rich-1",
|
|
3142
|
-
{ id: "rich-2",
|
|
3143
|
-
{ id: "rich-3",
|
|
3144
|
-
{ id: "rich-4",
|
|
3517
|
+
{ id: "rich-1", text: "Ver exemplo de Gráfico", icon: React.createElement(lucideReact.BarChart3, { className: "w-4 h-4 mr-2" }) },
|
|
3518
|
+
{ id: "rich-2", text: "Ver exemplo de Imagem", icon: React.createElement(lucideReact.ImageIcon, { className: "w-4 h-4 mr-2" }) },
|
|
3519
|
+
{ id: "rich-3", text: "Ver exemplo de Tabela", icon: React.createElement(lucideReact.Table, { className: "w-4 h-4 mr-2" }) },
|
|
3520
|
+
{ id: "rich-4", text: "Ver exemplo de Documento", icon: React.createElement(lucideReact.FileText, { className: "w-4 h-4 mr-2" }) }
|
|
3145
3521
|
];
|
|
3146
3522
|
const gerarResposta = (mensagemUsuario, customResponses) => {
|
|
3147
3523
|
const mensagemLower = mensagemUsuario.toLowerCase();
|
|
@@ -3350,10 +3726,10 @@ Documento finalizado.`
|
|
|
3350
3726
|
const fileInputRef = React.useRef(null);
|
|
3351
3727
|
const audioInputRef = React.useRef(null);
|
|
3352
3728
|
const defaultSuggestions = [
|
|
3353
|
-
{ id: "1",
|
|
3354
|
-
{ id: "2",
|
|
3355
|
-
{ id: "3",
|
|
3356
|
-
{ id: "4",
|
|
3729
|
+
{ id: "1", text: "Me ajude a criar um documento profissional" },
|
|
3730
|
+
{ id: "2", text: 'Buscar nos meus arquivos por "relatório"' },
|
|
3731
|
+
{ id: "3", text: "Resuma as conversas importantes desta semana" },
|
|
3732
|
+
{ id: "4", text: "Crie um podcast sobre o último projeto" }
|
|
3357
3733
|
];
|
|
3358
3734
|
const sugestoes = propSuggestions ?? defaultSuggestions;
|
|
3359
3735
|
React.useEffect(() => {
|
|
@@ -3510,7 +3886,7 @@ Documento finalizado.`
|
|
|
3510
3886
|
const handleSelecionarConversa = (conversaId) => {
|
|
3511
3887
|
const conversa = conversas.find((c) => c.id === conversaId);
|
|
3512
3888
|
if (conversa) {
|
|
3513
|
-
setMensagens(conversa.
|
|
3889
|
+
setMensagens(conversa.messages);
|
|
3514
3890
|
setConversaAtual(conversaId);
|
|
3515
3891
|
setAbaSelecionada("chat");
|
|
3516
3892
|
}
|
|
@@ -3518,7 +3894,7 @@ Documento finalizado.`
|
|
|
3518
3894
|
const handleToggleFavoritaConversa = (conversaId) => {
|
|
3519
3895
|
setConversas(
|
|
3520
3896
|
(prev) => prev.map(
|
|
3521
|
-
(conv) => conv.id === conversaId ? { ...conv,
|
|
3897
|
+
(conv) => conv.id === conversaId ? { ...conv, isFavorite: !conv.isFavorite } : conv
|
|
3522
3898
|
)
|
|
3523
3899
|
);
|
|
3524
3900
|
};
|
|
@@ -3536,9 +3912,9 @@ Documento finalizado.`
|
|
|
3536
3912
|
};
|
|
3537
3913
|
const handleRichSuggestionClick = (suggestion) => {
|
|
3538
3914
|
if (onRichAction) {
|
|
3539
|
-
onRichAction(suggestion.id, suggestion.
|
|
3915
|
+
onRichAction(suggestion.id, suggestion.text);
|
|
3540
3916
|
} else {
|
|
3541
|
-
handleEnviarMensagem(suggestion.
|
|
3917
|
+
handleEnviarMensagem(suggestion.text);
|
|
3542
3918
|
}
|
|
3543
3919
|
setShowMoreSuggestions(false);
|
|
3544
3920
|
};
|
|
@@ -3571,7 +3947,7 @@ Documento finalizado.`
|
|
|
3571
3947
|
};
|
|
3572
3948
|
const conversasFiltradas = conversas.filter((conversa) => {
|
|
3573
3949
|
if (abaSelecionada === "favoritos") {
|
|
3574
|
-
return conversa.
|
|
3950
|
+
return conversa.isFavorite;
|
|
3575
3951
|
}
|
|
3576
3952
|
return true;
|
|
3577
3953
|
});
|
|
@@ -3890,9 +4266,9 @@ Documento finalizado.`
|
|
|
3890
4266
|
sugestoes.map((sugestao) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3891
4267
|
"button",
|
|
3892
4268
|
{
|
|
3893
|
-
onClick: () => handleEnviarMensagem(sugestao.
|
|
4269
|
+
onClick: () => handleEnviarMensagem(sugestao.text),
|
|
3894
4270
|
className: "w-full p-3 text-left rounded-[var(--radius-card)] bg-muted text-foreground transition-colors duration-200 hover:bg-muted/80",
|
|
3895
|
-
children: sugestao.
|
|
4271
|
+
children: sugestao.text
|
|
3896
4272
|
},
|
|
3897
4273
|
sugestao.id
|
|
3898
4274
|
)),
|
|
@@ -3917,7 +4293,7 @@ Documento finalizado.`
|
|
|
3917
4293
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3918
4294
|
sugestao.id.includes("chart") && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "w-4 h-4 text-primary" }),
|
|
3919
4295
|
sugestao.id.includes("table") && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Table, { className: "w-4 h-4 text-primary" }),
|
|
3920
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: sugestao.
|
|
4296
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: sugestao.text })
|
|
3921
4297
|
] })
|
|
3922
4298
|
},
|
|
3923
4299
|
sugestao.id
|
|
@@ -4372,7 +4748,7 @@ Documento finalizado.`
|
|
|
4372
4748
|
),
|
|
4373
4749
|
children: [
|
|
4374
4750
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-1", children: [
|
|
4375
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground truncate flex-1", children: conversa.
|
|
4751
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground truncate flex-1", children: conversa.title }),
|
|
4376
4752
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4377
4753
|
Button,
|
|
4378
4754
|
{
|
|
@@ -4388,14 +4764,14 @@ Documento finalizado.`
|
|
|
4388
4764
|
{
|
|
4389
4765
|
className: cn(
|
|
4390
4766
|
"w-3 h-3",
|
|
4391
|
-
conversa.
|
|
4767
|
+
conversa.isFavorite ? "text-destructive fill-current" : "text-muted-foreground"
|
|
4392
4768
|
)
|
|
4393
4769
|
}
|
|
4394
4770
|
)
|
|
4395
4771
|
}
|
|
4396
4772
|
)
|
|
4397
4773
|
] }),
|
|
4398
|
-
conversa.
|
|
4774
|
+
conversa.lastMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground truncate mb-1", children: conversa.lastMessage }),
|
|
4399
4775
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: conversa.timestamp })
|
|
4400
4776
|
]
|
|
4401
4777
|
},
|
|
@@ -4549,12 +4925,16 @@ Documento finalizado.`
|
|
|
4549
4925
|
}
|
|
4550
4926
|
const GOOGLE_MAPS_LIBRARIES = ["marker", "places", "geometry", "drawing", "maps"];
|
|
4551
4927
|
const GOOGLE_MAPS_ID = "xertica-google-map-script";
|
|
4928
|
+
const __vite_import_meta_env__$2 = {};
|
|
4552
4929
|
const GoogleMapsContext = React.createContext({
|
|
4553
4930
|
isLoaded: false,
|
|
4554
4931
|
loadError: void 0,
|
|
4555
4932
|
load: () => Promise.resolve()
|
|
4556
4933
|
});
|
|
4557
4934
|
function getInitialApiKey() {
|
|
4935
|
+
if (typeof { url: typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.umd.js", document.baseURI).href } !== "undefined" && __vite_import_meta_env__$2 && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo") {
|
|
4936
|
+
return "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo";
|
|
4937
|
+
}
|
|
4558
4938
|
if (typeof window === "undefined") return void 0;
|
|
4559
4939
|
const savedKey = localStorage.getItem("xertica-googlemaps-api-key");
|
|
4560
4940
|
if (savedKey && savedKey.trim().length > 0) {
|
|
@@ -4562,6 +4942,25 @@ Documento finalizado.`
|
|
|
4562
4942
|
}
|
|
4563
4943
|
return void 0;
|
|
4564
4944
|
}
|
|
4945
|
+
function removeExistingScript() {
|
|
4946
|
+
var _a;
|
|
4947
|
+
if (typeof window === "undefined") return;
|
|
4948
|
+
if (window.__googleMapsCallback) {
|
|
4949
|
+
delete window.__googleMapsCallback;
|
|
4950
|
+
}
|
|
4951
|
+
const existingScript = document.querySelector(`script[src*="maps.googleapis.com/maps/api/js"]`);
|
|
4952
|
+
if (existingScript) {
|
|
4953
|
+
existingScript.remove();
|
|
4954
|
+
}
|
|
4955
|
+
if ((_a = window.google) == null ? void 0 : _a.maps) {
|
|
4956
|
+
delete window.google.maps;
|
|
4957
|
+
}
|
|
4958
|
+
if (window.__XERTICA_GOOGLE_MAPS_LOADER__) {
|
|
4959
|
+
window.__XERTICA_GOOGLE_MAPS_LOADER__.isLoaded = false;
|
|
4960
|
+
window.__XERTICA_GOOGLE_MAPS_LOADER__.loadError = void 0;
|
|
4961
|
+
window.__XERTICA_GOOGLE_MAPS_LOADER__.scriptElement = void 0;
|
|
4962
|
+
}
|
|
4963
|
+
}
|
|
4565
4964
|
function isGoogleMapsAlreadyLoaded() {
|
|
4566
4965
|
var _a, _b;
|
|
4567
4966
|
if (typeof window === "undefined") return false;
|
|
@@ -4771,6 +5170,37 @@ Documento finalizado.`
|
|
|
4771
5170
|
] });
|
|
4772
5171
|
};
|
|
4773
5172
|
const useGoogleMapsLoader = () => React.useContext(GoogleMapsContext);
|
|
5173
|
+
function reloadGoogleMaps(newApiKey) {
|
|
5174
|
+
return new Promise((resolve, reject) => {
|
|
5175
|
+
if (typeof window === "undefined") {
|
|
5176
|
+
reject(new Error("Window is undefined"));
|
|
5177
|
+
return;
|
|
5178
|
+
}
|
|
5179
|
+
if (!newApiKey || newApiKey.length < 10) {
|
|
5180
|
+
reject(new Error("Invalid or missing Google Maps API key"));
|
|
5181
|
+
return;
|
|
5182
|
+
}
|
|
5183
|
+
const existingScript = document.querySelector(`script[src*="maps.googleapis.com/maps/api/js"]`);
|
|
5184
|
+
if (existingScript && existingScript.src.includes(`key=${newApiKey}`)) {
|
|
5185
|
+
resolve();
|
|
5186
|
+
return;
|
|
5187
|
+
}
|
|
5188
|
+
if (typeof customElements !== "undefined" && customElements.get("gmp-map")) {
|
|
5189
|
+
console.warn("[GoogleMapsLoader] Cannot reload map API dynamically because custom elements (gmp-map) are already registered. A full page reload is required to apply the new API key.");
|
|
5190
|
+
resolve();
|
|
5191
|
+
return;
|
|
5192
|
+
}
|
|
5193
|
+
removeExistingScript();
|
|
5194
|
+
updateSingleton({ isLoaded: false, loadError: void 0 });
|
|
5195
|
+
loadGoogleMapsScript(newApiKey).then(() => {
|
|
5196
|
+
updateSingleton({ isLoaded: true, loadError: void 0 });
|
|
5197
|
+
resolve();
|
|
5198
|
+
}).catch((error) => {
|
|
5199
|
+
updateSingleton({ isLoaded: false, loadError: error });
|
|
5200
|
+
reject(error);
|
|
5201
|
+
});
|
|
5202
|
+
});
|
|
5203
|
+
}
|
|
4774
5204
|
const Toaster = ({ theme, ...props }) => {
|
|
4775
5205
|
const [resolvedTheme, setResolvedTheme] = React__namespace.useState(theme);
|
|
4776
5206
|
React__namespace.useEffect(() => {
|
|
@@ -4813,9 +5243,10 @@ Documento finalizado.`
|
|
|
4813
5243
|
);
|
|
4814
5244
|
};
|
|
4815
5245
|
function XerticaProvider({
|
|
4816
|
-
children
|
|
5246
|
+
children,
|
|
5247
|
+
googleMapsApiKey
|
|
4817
5248
|
}) {
|
|
4818
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GoogleMapsLoaderProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(LayoutProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipProvider, { children: [
|
|
5249
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GoogleMapsLoaderProvider, { apiKey: googleMapsApiKey, children: /* @__PURE__ */ jsxRuntime.jsx(LayoutProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipProvider, { children: [
|
|
4819
5250
|
children,
|
|
4820
5251
|
/* @__PURE__ */ jsxRuntime.jsx(Toaster, { position: "top-right", richColors: true })
|
|
4821
5252
|
] }) }) });
|
|
@@ -4874,34 +5305,6 @@ Documento finalizado.`
|
|
|
4874
5305
|
}
|
|
4875
5306
|
);
|
|
4876
5307
|
}
|
|
4877
|
-
const Input = React__namespace.forwardRef(
|
|
4878
|
-
({ className, type, size = "md", ...props }, ref) => {
|
|
4879
|
-
const sizeClasses = {
|
|
4880
|
-
sm: "h-8 px-2 py-1 text-sm",
|
|
4881
|
-
md: "h-10 px-3 py-2 text-base",
|
|
4882
|
-
lg: "h-12 px-4 py-3 text-base"
|
|
4883
|
-
};
|
|
4884
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4885
|
-
"input",
|
|
4886
|
-
{
|
|
4887
|
-
type,
|
|
4888
|
-
"data-slot": "input",
|
|
4889
|
-
className: cn(
|
|
4890
|
-
"flex w-full min-w-0 bg-background rounded-[var(--radius)] border border-border transition-colors outline-none text-foreground",
|
|
4891
|
-
"placeholder:text-muted-foreground",
|
|
4892
|
-
"focus:ring-2 focus:ring-primary focus:border-transparent",
|
|
4893
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
4894
|
-
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
4895
|
-
sizeClasses[size],
|
|
4896
|
-
className
|
|
4897
|
-
),
|
|
4898
|
-
ref,
|
|
4899
|
-
...props
|
|
4900
|
-
}
|
|
4901
|
-
);
|
|
4902
|
-
}
|
|
4903
|
-
);
|
|
4904
|
-
Input.displayName = "Input";
|
|
4905
5308
|
function XerticaLogo({
|
|
4906
5309
|
className = "w-auto h-8",
|
|
4907
5310
|
color,
|
|
@@ -6304,7 +6707,7 @@ Documento finalizado.`
|
|
|
6304
6707
|
};
|
|
6305
6708
|
}, [map, layers.bicycling]);
|
|
6306
6709
|
}
|
|
6307
|
-
const __vite_import_meta_env__$1 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
|
|
6710
|
+
const __vite_import_meta_env__$1 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
|
|
6308
6711
|
const DEFAULT_CENTER = { lat: -23.5505, lng: -46.6333 };
|
|
6309
6712
|
const DEFAULT_ZOOM = 12;
|
|
6310
6713
|
const MapContent = React.forwardRef(
|
|
@@ -6576,7 +6979,7 @@ Documento finalizado.`
|
|
|
6576
6979
|
const Map$1 = React.forwardRef(
|
|
6577
6980
|
(props, ref) => {
|
|
6578
6981
|
const { isLoaded, loadError } = useGoogleMapsLoader();
|
|
6579
|
-
const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.umd.js", document.baseURI).href } !== "undefined" && __vite_import_meta_env__$1 &&
|
|
6982
|
+
const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.umd.js", document.baseURI).href } !== "undefined" && __vite_import_meta_env__$1 && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
|
|
6580
6983
|
const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
|
|
6581
6984
|
if (isLoaded || isValidKey || loadError) {
|
|
6582
6985
|
return /* @__PURE__ */ jsxRuntime.jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
|
|
@@ -7402,21 +7805,25 @@ Documento finalizado.`
|
|
|
7402
7805
|
subtitle,
|
|
7403
7806
|
backHref,
|
|
7404
7807
|
onBack,
|
|
7808
|
+
renderBackLink,
|
|
7405
7809
|
actions,
|
|
7406
|
-
className
|
|
7810
|
+
className,
|
|
7811
|
+
backLabel = "Back"
|
|
7407
7812
|
}) {
|
|
7813
|
+
const showBack = !!(backHref || onBack || renderBackLink);
|
|
7814
|
+
const icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-5 w-5" });
|
|
7408
7815
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4 md:flex-row md:items-center md:justify-between mb-8", className), children: [
|
|
7409
7816
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4", children: [
|
|
7410
|
-
|
|
7817
|
+
showBack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7411
7818
|
Button,
|
|
7412
7819
|
{
|
|
7413
7820
|
variant: "outline",
|
|
7414
7821
|
size: "icon",
|
|
7415
7822
|
className: "h-10 w-10 shrink-0",
|
|
7416
7823
|
onClick: onBack,
|
|
7417
|
-
asChild: !!backHref,
|
|
7418
|
-
"aria-label":
|
|
7419
|
-
children: backHref ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: backHref, children:
|
|
7824
|
+
asChild: !!renderBackLink || !!backHref,
|
|
7825
|
+
"aria-label": backLabel,
|
|
7826
|
+
children: renderBackLink ? renderBackLink(icon) : backHref ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: backHref, children: icon }) : icon
|
|
7420
7827
|
}
|
|
7421
7828
|
),
|
|
7422
7829
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-1", children: [
|
|
@@ -10991,7 +11398,7 @@ Documento finalizado.`
|
|
|
10991
11398
|
const displayCount = count > max ? `${max}+` : count;
|
|
10992
11399
|
const shouldShow = count > 0 || showZero;
|
|
10993
11400
|
if (!shouldShow && !dot) {
|
|
10994
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, children });
|
|
11401
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children });
|
|
10995
11402
|
}
|
|
10996
11403
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("relative inline-block", className), ...props, children: [
|
|
10997
11404
|
children,
|
|
@@ -11076,7 +11483,7 @@ Documento finalizado.`
|
|
|
11076
11483
|
const getTrendIcon = () => {
|
|
11077
11484
|
if (!trend) return null;
|
|
11078
11485
|
if (trend.value > 0) {
|
|
11079
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4 text-
|
|
11486
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4 text-success" });
|
|
11080
11487
|
} else if (trend.value < 0) {
|
|
11081
11488
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-4 w-4 text-destructive" });
|
|
11082
11489
|
} else {
|
|
@@ -11086,7 +11493,7 @@ Documento finalizado.`
|
|
|
11086
11493
|
const getTrendColor = () => {
|
|
11087
11494
|
if (!trend) return "";
|
|
11088
11495
|
if (trend.value > 0) {
|
|
11089
|
-
return "text-
|
|
11496
|
+
return "text-success";
|
|
11090
11497
|
} else if (trend.value < 0) {
|
|
11091
11498
|
return "text-destructive";
|
|
11092
11499
|
} else {
|
|
@@ -11216,29 +11623,120 @@ Documento finalizado.`
|
|
|
11216
11623
|
));
|
|
11217
11624
|
TimelineDescription.displayName = "TimelineDescription";
|
|
11218
11625
|
const TreeView = React__namespace.forwardRef(
|
|
11219
|
-
({ className, data, onNodeClick, defaultExpanded = [], ...props }, ref) => {
|
|
11220
|
-
const [expanded, setExpanded] = React__namespace.useState(
|
|
11221
|
-
|
|
11222
|
-
);
|
|
11626
|
+
({ className, data, onNodeClick, onNodeSelect, defaultExpanded = [], selectedNodeId, ...props }, ref) => {
|
|
11627
|
+
const [expanded, setExpanded] = React__namespace.useState(new Set(defaultExpanded));
|
|
11628
|
+
const [internalSelectedId, setInternalSelectedId] = React__namespace.useState(void 0);
|
|
11629
|
+
const nodeRefs = React__namespace.useRef(/* @__PURE__ */ new Map());
|
|
11630
|
+
const isControlled = selectedNodeId !== void 0;
|
|
11631
|
+
const effectiveSelectedId = isControlled ? selectedNodeId : internalSelectedId;
|
|
11223
11632
|
const toggleExpand = (nodeId) => {
|
|
11224
11633
|
setExpanded((prev) => {
|
|
11225
|
-
const
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
} else {
|
|
11229
|
-
newSet.add(nodeId);
|
|
11230
|
-
}
|
|
11231
|
-
return newSet;
|
|
11634
|
+
const next = new Set(prev);
|
|
11635
|
+
next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
|
|
11636
|
+
return next;
|
|
11232
11637
|
});
|
|
11233
11638
|
};
|
|
11234
|
-
|
|
11639
|
+
const getVisibleNodes = React__namespace.useCallback(() => {
|
|
11640
|
+
const result = [];
|
|
11641
|
+
const traverse = (nodes) => {
|
|
11642
|
+
var _a;
|
|
11643
|
+
for (const node of nodes) {
|
|
11644
|
+
result.push(node);
|
|
11645
|
+
if (((_a = node.children) == null ? void 0 : _a.length) && expanded.has(node.id)) traverse(node.children);
|
|
11646
|
+
}
|
|
11647
|
+
};
|
|
11648
|
+
traverse(data);
|
|
11649
|
+
return result;
|
|
11650
|
+
}, [data, expanded]);
|
|
11651
|
+
const findParent = (nodes, targetId) => {
|
|
11652
|
+
var _a;
|
|
11653
|
+
for (const n of nodes) {
|
|
11654
|
+
if ((_a = n.children) == null ? void 0 : _a.some((c) => c.id === targetId)) return n;
|
|
11655
|
+
if (n.children) {
|
|
11656
|
+
const found = findParent(n.children, targetId);
|
|
11657
|
+
if (found) return found;
|
|
11658
|
+
}
|
|
11659
|
+
}
|
|
11660
|
+
return null;
|
|
11661
|
+
};
|
|
11662
|
+
const handleSelect = (node) => {
|
|
11663
|
+
if (!isControlled) setInternalSelectedId(node.id);
|
|
11664
|
+
onNodeSelect == null ? void 0 : onNodeSelect(node);
|
|
11665
|
+
onNodeClick == null ? void 0 : onNodeClick(node);
|
|
11666
|
+
};
|
|
11667
|
+
const handleKeyDown = (e, node) => {
|
|
11668
|
+
var _a, _b;
|
|
11669
|
+
const visibleNodes = getVisibleNodes();
|
|
11670
|
+
const idx = visibleNodes.findIndex((n) => n.id === node.id);
|
|
11671
|
+
const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
|
|
11672
|
+
const isExpanded = expanded.has(node.id);
|
|
11673
|
+
const focusNode = (id) => {
|
|
11674
|
+
var _a2;
|
|
11675
|
+
(_a2 = nodeRefs.current.get(id)) == null ? void 0 : _a2.focus();
|
|
11676
|
+
};
|
|
11677
|
+
switch (e.key) {
|
|
11678
|
+
case "ArrowDown": {
|
|
11679
|
+
e.preventDefault();
|
|
11680
|
+
const next = visibleNodes[idx + 1];
|
|
11681
|
+
if (next) focusNode(next.id);
|
|
11682
|
+
break;
|
|
11683
|
+
}
|
|
11684
|
+
case "ArrowUp": {
|
|
11685
|
+
e.preventDefault();
|
|
11686
|
+
const prev = visibleNodes[idx - 1];
|
|
11687
|
+
if (prev) focusNode(prev.id);
|
|
11688
|
+
break;
|
|
11689
|
+
}
|
|
11690
|
+
case "ArrowRight": {
|
|
11691
|
+
e.preventDefault();
|
|
11692
|
+
if (hasChildren && !isExpanded) {
|
|
11693
|
+
toggleExpand(node.id);
|
|
11694
|
+
} else if (hasChildren && isExpanded && ((_b = node.children) == null ? void 0 : _b.length)) {
|
|
11695
|
+
focusNode(node.children[0].id);
|
|
11696
|
+
}
|
|
11697
|
+
break;
|
|
11698
|
+
}
|
|
11699
|
+
case "ArrowLeft": {
|
|
11700
|
+
e.preventDefault();
|
|
11701
|
+
if (hasChildren && isExpanded) {
|
|
11702
|
+
toggleExpand(node.id);
|
|
11703
|
+
} else {
|
|
11704
|
+
const parent = findParent(data, node.id);
|
|
11705
|
+
if (parent) focusNode(parent.id);
|
|
11706
|
+
}
|
|
11707
|
+
break;
|
|
11708
|
+
}
|
|
11709
|
+
case "Home": {
|
|
11710
|
+
e.preventDefault();
|
|
11711
|
+
if (visibleNodes.length > 0) focusNode(visibleNodes[0].id);
|
|
11712
|
+
break;
|
|
11713
|
+
}
|
|
11714
|
+
case "End": {
|
|
11715
|
+
e.preventDefault();
|
|
11716
|
+
const last = visibleNodes[visibleNodes.length - 1];
|
|
11717
|
+
if (last) focusNode(last.id);
|
|
11718
|
+
break;
|
|
11719
|
+
}
|
|
11720
|
+
case "Enter":
|
|
11721
|
+
case " ": {
|
|
11722
|
+
e.preventDefault();
|
|
11723
|
+
if (hasChildren) toggleExpand(node.id);
|
|
11724
|
+
handleSelect(node);
|
|
11725
|
+
break;
|
|
11726
|
+
}
|
|
11727
|
+
}
|
|
11728
|
+
};
|
|
11729
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("w-full", className), role: "tree", ...props, children: data.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11235
11730
|
TreeNodeComponent,
|
|
11236
11731
|
{
|
|
11237
11732
|
node,
|
|
11238
11733
|
level: 0,
|
|
11239
11734
|
expanded,
|
|
11735
|
+
selectedId: effectiveSelectedId,
|
|
11240
11736
|
onToggle: toggleExpand,
|
|
11241
|
-
|
|
11737
|
+
onSelect: handleSelect,
|
|
11738
|
+
onKeyDown: handleKeyDown,
|
|
11739
|
+
nodeRefs
|
|
11242
11740
|
},
|
|
11243
11741
|
node.id
|
|
11244
11742
|
)) });
|
|
@@ -11249,43 +11747,59 @@ Documento finalizado.`
|
|
|
11249
11747
|
node,
|
|
11250
11748
|
level,
|
|
11251
11749
|
expanded,
|
|
11750
|
+
selectedId,
|
|
11252
11751
|
onToggle,
|
|
11253
|
-
|
|
11752
|
+
onSelect,
|
|
11753
|
+
onKeyDown,
|
|
11754
|
+
nodeRefs
|
|
11254
11755
|
}) => {
|
|
11255
|
-
|
|
11756
|
+
var _a;
|
|
11757
|
+
const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
|
|
11256
11758
|
const isExpanded = expanded.has(node.id);
|
|
11759
|
+
const isSelected = node.id === selectedId;
|
|
11257
11760
|
const handleClick = () => {
|
|
11258
|
-
if (hasChildren)
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11761
|
+
if (hasChildren) onToggle(node.id);
|
|
11762
|
+
onSelect(node);
|
|
11763
|
+
};
|
|
11764
|
+
const setRef = (el) => {
|
|
11765
|
+
if (el) nodeRefs.current.set(node.id, el);
|
|
11766
|
+
else nodeRefs.current.delete(node.id);
|
|
11262
11767
|
};
|
|
11263
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
11768
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "none", children: [
|
|
11264
11769
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11265
11770
|
"button",
|
|
11266
11771
|
{
|
|
11772
|
+
ref: setRef,
|
|
11773
|
+
role: "treeitem",
|
|
11774
|
+
"aria-expanded": hasChildren ? isExpanded : void 0,
|
|
11775
|
+
"aria-selected": isSelected,
|
|
11776
|
+
tabIndex: isSelected ? 0 : -1,
|
|
11267
11777
|
onClick: handleClick,
|
|
11778
|
+
onKeyDown: (e) => onKeyDown(e, node),
|
|
11268
11779
|
className: cn(
|
|
11269
|
-
"flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors
|
|
11270
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-
|
|
11780
|
+
"flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors",
|
|
11781
|
+
"hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
11782
|
+
isSelected && "bg-primary/10 text-primary font-medium"
|
|
11271
11783
|
),
|
|
11272
11784
|
style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
|
|
11273
11785
|
children: [
|
|
11274
|
-
hasChildren
|
|
11275
|
-
!hasChildren && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-4" }),
|
|
11786
|
+
hasChildren ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-4 flex-shrink-0", "aria-hidden": "true" }),
|
|
11276
11787
|
node.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
|
|
11277
11788
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-foreground", children: node.label })
|
|
11278
11789
|
]
|
|
11279
11790
|
}
|
|
11280
11791
|
),
|
|
11281
|
-
hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { children: node.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11792
|
+
hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
11282
11793
|
TreeNodeComponent,
|
|
11283
11794
|
{
|
|
11284
11795
|
node: child,
|
|
11285
11796
|
level: level + 1,
|
|
11286
11797
|
expanded,
|
|
11798
|
+
selectedId,
|
|
11287
11799
|
onToggle,
|
|
11288
|
-
|
|
11800
|
+
onSelect,
|
|
11801
|
+
onKeyDown,
|
|
11802
|
+
nodeRefs
|
|
11289
11803
|
},
|
|
11290
11804
|
child.id
|
|
11291
11805
|
)) })
|
|
@@ -11557,99 +12071,72 @@ Documento finalizado.`
|
|
|
11557
12071
|
}
|
|
11558
12072
|
);
|
|
11559
12073
|
}
|
|
11560
|
-
const StepperContext = React__namespace.createContext(
|
|
11561
|
-
void 0
|
|
11562
|
-
);
|
|
12074
|
+
const StepperContext = React__namespace.createContext(void 0);
|
|
11563
12075
|
const useStepper = () => {
|
|
11564
12076
|
const context = React__namespace.useContext(StepperContext);
|
|
11565
|
-
if (!context)
|
|
11566
|
-
throw new Error("useStepper must be used within a Stepper");
|
|
11567
|
-
}
|
|
12077
|
+
if (!context) throw new Error("useStepper must be used within a Stepper");
|
|
11568
12078
|
return context;
|
|
11569
12079
|
};
|
|
11570
12080
|
const Stepper = React__namespace.forwardRef(
|
|
11571
|
-
({ currentStep, className, children, ...props }, ref) => {
|
|
12081
|
+
({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
|
|
11572
12082
|
const totalSteps = React__namespace.Children.count(children);
|
|
11573
|
-
return /* @__PURE__ */ jsxRuntime.jsx(StepperContext.Provider, { value: { currentStep, totalSteps }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12083
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11574
12084
|
"div",
|
|
11575
12085
|
{
|
|
11576
12086
|
ref,
|
|
11577
12087
|
className: cn("w-full", className),
|
|
11578
12088
|
...props,
|
|
11579
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
12089
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
12090
|
+
orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
|
|
12091
|
+
), children })
|
|
11580
12092
|
}
|
|
11581
12093
|
) });
|
|
11582
12094
|
}
|
|
11583
12095
|
);
|
|
11584
12096
|
Stepper.displayName = "Stepper";
|
|
11585
12097
|
const Step = React__namespace.forwardRef(
|
|
11586
|
-
({ step, label, description, className, ...props }, ref) => {
|
|
11587
|
-
const { currentStep, totalSteps } = useStepper();
|
|
12098
|
+
({ step, label, description, error = false, className, ...props }, ref) => {
|
|
12099
|
+
const { currentStep, totalSteps, orientation } = useStepper();
|
|
11588
12100
|
const isActive = step === currentStep;
|
|
11589
|
-
const isCompleted = step < currentStep;
|
|
12101
|
+
const isCompleted = step < currentStep && !error;
|
|
11590
12102
|
const isFirst = step === 1;
|
|
11591
12103
|
const isLast = step === totalSteps;
|
|
11592
|
-
|
|
11593
|
-
"
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
children: [
|
|
11599
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-start", children: [
|
|
11600
|
-
step > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11601
|
-
"div",
|
|
11602
|
-
{
|
|
11603
|
-
className: cn(
|
|
11604
|
-
"h-0.5 flex-1 transition-colors mt-[18px]",
|
|
11605
|
-
step <= currentStep ? "bg-primary" : "bg-muted"
|
|
11606
|
-
)
|
|
11607
|
-
}
|
|
11608
|
-
),
|
|
11609
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11610
|
-
"div",
|
|
11611
|
-
{
|
|
11612
|
-
className: cn(
|
|
11613
|
-
"relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
|
|
11614
|
-
isActive && "border-primary bg-primary text-primary-foreground",
|
|
11615
|
-
isCompleted && "border-primary bg-primary text-primary-foreground",
|
|
11616
|
-
!isActive && !isCompleted && "border-muted bg-background text-muted-foreground"
|
|
11617
|
-
),
|
|
11618
|
-
children: isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: step })
|
|
11619
|
-
}
|
|
11620
|
-
),
|
|
11621
|
-
step < totalSteps && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11622
|
-
"div",
|
|
11623
|
-
{
|
|
11624
|
-
className: cn(
|
|
11625
|
-
"h-0.5 flex-1 transition-colors mt-[18px]",
|
|
11626
|
-
step < currentStep ? "bg-primary" : "bg-muted"
|
|
11627
|
-
)
|
|
11628
|
-
}
|
|
11629
|
-
)
|
|
11630
|
-
] }),
|
|
11631
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
11632
|
-
"mt-2 px-1",
|
|
11633
|
-
isFirst && "text-left self-start",
|
|
11634
|
-
isLast && "text-right self-end",
|
|
11635
|
-
!isFirst && !isLast && "text-center w-full"
|
|
11636
|
-
), children: [
|
|
11637
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11638
|
-
"div",
|
|
11639
|
-
{
|
|
11640
|
-
className: cn(
|
|
11641
|
-
"transition-colors",
|
|
11642
|
-
isActive && "text-foreground",
|
|
11643
|
-
!isActive && "text-muted-foreground"
|
|
11644
|
-
),
|
|
11645
|
-
children: label
|
|
11646
|
-
}
|
|
11647
|
-
),
|
|
11648
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-muted-foreground text-xs", children: description })
|
|
11649
|
-
] })
|
|
11650
|
-
]
|
|
11651
|
-
}
|
|
12104
|
+
const circleClasses = cn(
|
|
12105
|
+
"relative flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full border-2 transition-colors",
|
|
12106
|
+
isActive && !error && "border-primary bg-primary text-primary-foreground",
|
|
12107
|
+
isCompleted && "border-primary bg-primary text-primary-foreground",
|
|
12108
|
+
error && "border-destructive bg-destructive text-destructive-foreground",
|
|
12109
|
+
!isActive && !isCompleted && !error && "border-muted bg-background text-muted-foreground"
|
|
11652
12110
|
);
|
|
12111
|
+
const connectorClasses = (filled) => cn("transition-colors", filled ? "bg-primary" : "bg-muted");
|
|
12112
|
+
if (orientation === "vertical") {
|
|
12113
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex gap-4", className), ...props, children: [
|
|
12114
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
12115
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: step }) }),
|
|
12116
|
+
!isLast && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-0.5 flex-1 min-h-[2rem] mt-1", connectorClasses(step < currentStep)) })
|
|
12117
|
+
] }),
|
|
12118
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("pb-6", isLast && "pb-0"), children: [
|
|
12119
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
|
|
12120
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
12121
|
+
] })
|
|
12122
|
+
] });
|
|
12123
|
+
}
|
|
12124
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-1 flex-col items-center", className), ...props, children: [
|
|
12125
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-start", children: [
|
|
12126
|
+
step > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step <= currentStep)) }),
|
|
12127
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: circleClasses, children: error ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: step }) }),
|
|
12128
|
+
step < totalSteps && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-0.5 flex-1 mt-[18px]", connectorClasses(step < currentStep)) })
|
|
12129
|
+
] }),
|
|
12130
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
|
|
12131
|
+
"mt-2 px-1",
|
|
12132
|
+
isFirst && "text-left self-start",
|
|
12133
|
+
isLast && "text-right self-end",
|
|
12134
|
+
!isFirst && !isLast && "text-center w-full"
|
|
12135
|
+
), children: [
|
|
12136
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("transition-colors", isActive || error ? "text-foreground" : "text-muted-foreground"), children: label }),
|
|
12137
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
12138
|
+
] })
|
|
12139
|
+
] });
|
|
11653
12140
|
}
|
|
11654
12141
|
);
|
|
11655
12142
|
Step.displayName = "Step";
|
|
@@ -11661,20 +12148,34 @@ Documento finalizado.`
|
|
|
11661
12148
|
maxSize = 5 * 1024 * 1024,
|
|
11662
12149
|
// 5MB default
|
|
11663
12150
|
showPreview = true,
|
|
12151
|
+
onError,
|
|
11664
12152
|
accept,
|
|
11665
12153
|
disabled,
|
|
11666
12154
|
...props
|
|
11667
12155
|
}, ref) => {
|
|
11668
12156
|
const [files, setFiles] = React__namespace.useState([]);
|
|
11669
12157
|
const [dragActive, setDragActive] = React__namespace.useState(false);
|
|
12158
|
+
const [errorMessage, setErrorMessage] = React__namespace.useState(null);
|
|
11670
12159
|
const inputRef = React__namespace.useRef(null);
|
|
11671
12160
|
const handleFiles = (newFiles) => {
|
|
11672
12161
|
if (!newFiles) return;
|
|
12162
|
+
setErrorMessage(null);
|
|
11673
12163
|
const filesArray = Array.from(newFiles);
|
|
11674
|
-
const
|
|
11675
|
-
const
|
|
11676
|
-
|
|
11677
|
-
|
|
12164
|
+
const oversized = filesArray.filter((f) => f.size > maxSize);
|
|
12165
|
+
const validFiles = filesArray.filter((f) => f.size <= maxSize);
|
|
12166
|
+
if (oversized.length > 0) {
|
|
12167
|
+
const limitMB = (maxSize / 1024 / 1024).toFixed(0);
|
|
12168
|
+
setErrorMessage(`${oversized.length} file(s) exceed the ${limitMB}MB limit and were not added.`);
|
|
12169
|
+
onError == null ? void 0 : onError(oversized, "size");
|
|
12170
|
+
}
|
|
12171
|
+
const merged = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
|
|
12172
|
+
const countRejected = maxFiles === 1 ? validFiles.slice(1) : [...files, ...validFiles].slice(maxFiles);
|
|
12173
|
+
if (countRejected.length > 0) {
|
|
12174
|
+
setErrorMessage(`Only ${maxFiles} file(s) allowed. ${countRejected.length} file(s) were not added.`);
|
|
12175
|
+
onError == null ? void 0 : onError(countRejected, "count");
|
|
12176
|
+
}
|
|
12177
|
+
setFiles(merged);
|
|
12178
|
+
onFilesChange == null ? void 0 : onFilesChange(merged);
|
|
11678
12179
|
};
|
|
11679
12180
|
const handleDrag = (e) => {
|
|
11680
12181
|
e.preventDefault();
|
|
@@ -11701,10 +12202,12 @@ Documento finalizado.`
|
|
|
11701
12202
|
const updatedFiles = files.filter((_, i) => i !== index);
|
|
11702
12203
|
setFiles(updatedFiles);
|
|
11703
12204
|
onFilesChange == null ? void 0 : onFilesChange(updatedFiles);
|
|
12205
|
+
if (updatedFiles.length === 0) setErrorMessage(null);
|
|
11704
12206
|
};
|
|
11705
12207
|
const openFileDialog = () => {
|
|
11706
12208
|
var _a;
|
|
11707
12209
|
if (!disabled) {
|
|
12210
|
+
setErrorMessage(null);
|
|
11708
12211
|
(_a = inputRef.current) == null ? void 0 : _a.click();
|
|
11709
12212
|
}
|
|
11710
12213
|
};
|
|
@@ -11720,6 +12223,7 @@ Documento finalizado.`
|
|
|
11720
12223
|
className: cn(
|
|
11721
12224
|
"relative flex cursor-pointer flex-col items-center justify-center rounded-[var(--radius)] border-2 border-dashed border-border bg-background p-8 transition-colors hover:bg-muted/50",
|
|
11722
12225
|
dragActive && "border-primary bg-primary/5",
|
|
12226
|
+
errorMessage && "border-destructive/50",
|
|
11723
12227
|
disabled && "cursor-not-allowed opacity-50"
|
|
11724
12228
|
),
|
|
11725
12229
|
children: [
|
|
@@ -11750,6 +12254,10 @@ Documento finalizado.`
|
|
|
11750
12254
|
]
|
|
11751
12255
|
}
|
|
11752
12256
|
),
|
|
12257
|
+
errorMessage && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2 rounded-[var(--radius)] border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive", children: [
|
|
12258
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4 shrink-0" }),
|
|
12259
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: errorMessage })
|
|
12260
|
+
] }),
|
|
11753
12261
|
showPreview && files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11754
12262
|
"div",
|
|
11755
12263
|
{
|
|
@@ -11794,29 +12302,43 @@ Documento finalizado.`
|
|
|
11794
12302
|
onChange,
|
|
11795
12303
|
max = 5,
|
|
11796
12304
|
readonly = false,
|
|
12305
|
+
disabled = false,
|
|
11797
12306
|
size = "md",
|
|
11798
12307
|
showValue = false,
|
|
12308
|
+
allowHalf = false,
|
|
12309
|
+
getAriaLabel,
|
|
11799
12310
|
...props
|
|
11800
12311
|
}, ref) => {
|
|
11801
12312
|
const [hoverValue, setHoverValue] = React__namespace.useState(null);
|
|
12313
|
+
const isInteractive = !readonly && !disabled;
|
|
11802
12314
|
const sizeStyles = {
|
|
11803
12315
|
sm: "h-4 w-4",
|
|
11804
12316
|
md: "h-5 w-5",
|
|
11805
12317
|
lg: "h-6 w-6"
|
|
11806
12318
|
};
|
|
11807
12319
|
const handleClick = (rating) => {
|
|
11808
|
-
if (
|
|
11809
|
-
onChange(rating);
|
|
11810
|
-
}
|
|
12320
|
+
if (isInteractive) onChange == null ? void 0 : onChange(rating);
|
|
11811
12321
|
};
|
|
11812
|
-
const
|
|
11813
|
-
if (!
|
|
12322
|
+
const handleMouseMove = (e, rating) => {
|
|
12323
|
+
if (!isInteractive) return;
|
|
12324
|
+
if (allowHalf) {
|
|
12325
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
12326
|
+
setHoverValue(e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating);
|
|
12327
|
+
} else {
|
|
11814
12328
|
setHoverValue(rating);
|
|
11815
12329
|
}
|
|
11816
12330
|
};
|
|
11817
12331
|
const handleMouseLeave = () => {
|
|
11818
|
-
if (
|
|
11819
|
-
|
|
12332
|
+
if (isInteractive) setHoverValue(null);
|
|
12333
|
+
};
|
|
12334
|
+
const handleClickWithHalf = (e, rating) => {
|
|
12335
|
+
if (!isInteractive) return;
|
|
12336
|
+
if (allowHalf) {
|
|
12337
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
12338
|
+
const half = e.clientX - rect.left < rect.width / 2 ? rating - 0.5 : rating;
|
|
12339
|
+
onChange == null ? void 0 : onChange(half);
|
|
12340
|
+
} else {
|
|
12341
|
+
handleClick(rating);
|
|
11820
12342
|
}
|
|
11821
12343
|
};
|
|
11822
12344
|
const displayValue = hoverValue ?? value;
|
|
@@ -11824,40 +12346,45 @@ Documento finalizado.`
|
|
|
11824
12346
|
"div",
|
|
11825
12347
|
{
|
|
11826
12348
|
ref,
|
|
11827
|
-
className: cn("flex items-center gap-1", className),
|
|
12349
|
+
className: cn("flex items-center gap-1", disabled && "opacity-50", className),
|
|
11828
12350
|
...props,
|
|
11829
12351
|
children: [
|
|
11830
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: Array.from({ length: max }, (_, index) => {
|
|
12352
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
|
|
11831
12353
|
const rating = index + 1;
|
|
11832
|
-
const
|
|
11833
|
-
|
|
12354
|
+
const isFull = rating <= displayValue;
|
|
12355
|
+
const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
|
|
12356
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11834
12357
|
"button",
|
|
11835
12358
|
{
|
|
11836
12359
|
type: "button",
|
|
11837
|
-
onClick: () =>
|
|
11838
|
-
|
|
12360
|
+
onClick: (e) => handleClickWithHalf(e, rating),
|
|
12361
|
+
onMouseMove: (e) => handleMouseMove(e, rating),
|
|
11839
12362
|
onMouseLeave: handleMouseLeave,
|
|
11840
|
-
disabled: readonly,
|
|
11841
|
-
"aria-label": `${rating}
|
|
12363
|
+
disabled: readonly || disabled,
|
|
12364
|
+
"aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
|
|
11842
12365
|
className: cn(
|
|
11843
|
-
"transition-colors focus:outline-none",
|
|
11844
|
-
|
|
11845
|
-
|
|
12366
|
+
"relative transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
12367
|
+
isInteractive && "cursor-pointer hover:scale-110",
|
|
12368
|
+
!isInteractive && "cursor-default"
|
|
11846
12369
|
),
|
|
11847
|
-
children:
|
|
11848
|
-
lucideReact.Star,
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
12370
|
+
children: [
|
|
12371
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Star, { className: cn(sizeStyles[size], "fill-none text-muted-foreground") }),
|
|
12372
|
+
(isFull || isHalf) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12373
|
+
"span",
|
|
12374
|
+
{
|
|
12375
|
+
className: cn(
|
|
12376
|
+
"absolute inset-0 overflow-hidden",
|
|
12377
|
+
isHalf ? "w-1/2" : "w-full"
|
|
12378
|
+
),
|
|
12379
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Star, { className: cn(sizeStyles[size], "fill-warning text-warning") })
|
|
12380
|
+
}
|
|
12381
|
+
)
|
|
12382
|
+
]
|
|
11856
12383
|
},
|
|
11857
12384
|
index
|
|
11858
12385
|
);
|
|
11859
12386
|
}) }),
|
|
11860
|
-
showValue && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-muted-foreground", children: value.toFixed(1) })
|
|
12387
|
+
showValue && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
|
|
11861
12388
|
]
|
|
11862
12389
|
}
|
|
11863
12390
|
);
|
|
@@ -11865,8 +12392,24 @@ Documento finalizado.`
|
|
|
11865
12392
|
);
|
|
11866
12393
|
Rating.displayName = "Rating";
|
|
11867
12394
|
const Search = React__namespace.forwardRef(
|
|
11868
|
-
({
|
|
11869
|
-
|
|
12395
|
+
({
|
|
12396
|
+
className,
|
|
12397
|
+
containerClassName,
|
|
12398
|
+
onSearch,
|
|
12399
|
+
onClear,
|
|
12400
|
+
onChange,
|
|
12401
|
+
size = "md",
|
|
12402
|
+
searchLabel = "Search",
|
|
12403
|
+
clearLabel = "Clear search",
|
|
12404
|
+
value: controlledValue,
|
|
12405
|
+
defaultValue,
|
|
12406
|
+
...props
|
|
12407
|
+
}, ref) => {
|
|
12408
|
+
const isControlled = controlledValue !== void 0;
|
|
12409
|
+
const [internalValue, setInternalValue] = React__namespace.useState(
|
|
12410
|
+
isControlled ? "" : defaultValue ?? ""
|
|
12411
|
+
);
|
|
12412
|
+
const displayValue = isControlled ? controlledValue : internalValue;
|
|
11870
12413
|
const sizeClasses = {
|
|
11871
12414
|
sm: "h-8 px-8 py-1 text-sm",
|
|
11872
12415
|
md: "h-10 px-10 py-2 text-base",
|
|
@@ -11882,35 +12425,38 @@ Documento finalizado.`
|
|
|
11882
12425
|
md: "right-3",
|
|
11883
12426
|
lg: "right-4"
|
|
11884
12427
|
};
|
|
11885
|
-
React__namespace.useEffect(() => {
|
|
11886
|
-
if (props.value !== void 0) {
|
|
11887
|
-
setValue(props.value);
|
|
11888
|
-
}
|
|
11889
|
-
}, [props.value]);
|
|
11890
12428
|
const handleChange = (e) => {
|
|
11891
12429
|
const newValue = e.target.value;
|
|
11892
|
-
|
|
12430
|
+
if (!isControlled) setInternalValue(newValue);
|
|
11893
12431
|
onChange == null ? void 0 : onChange(e);
|
|
11894
12432
|
onSearch == null ? void 0 : onSearch(newValue);
|
|
11895
12433
|
};
|
|
11896
12434
|
const handleClear = () => {
|
|
11897
|
-
|
|
12435
|
+
if (!isControlled) setInternalValue("");
|
|
11898
12436
|
onClear == null ? void 0 : onClear();
|
|
11899
12437
|
onSearch == null ? void 0 : onSearch("");
|
|
11900
12438
|
};
|
|
11901
12439
|
const handleKeyDown = (e) => {
|
|
12440
|
+
var _a;
|
|
11902
12441
|
if (e.key === "Escape") {
|
|
11903
12442
|
handleClear();
|
|
11904
12443
|
}
|
|
12444
|
+
(_a = props.onKeyDown) == null ? void 0 : _a.call(props, e);
|
|
11905
12445
|
};
|
|
11906
12446
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative w-full", containerClassName), children: [
|
|
11907
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12447
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12448
|
+
lucideReact.Search,
|
|
12449
|
+
{
|
|
12450
|
+
"aria-hidden": "true",
|
|
12451
|
+
className: cn("absolute top-1/2 -translate-y-1/2 text-muted-foreground", iconSizeClasses[size])
|
|
12452
|
+
}
|
|
12453
|
+
),
|
|
11908
12454
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11909
12455
|
"input",
|
|
11910
12456
|
{
|
|
11911
12457
|
ref,
|
|
11912
12458
|
type: "text",
|
|
11913
|
-
value,
|
|
12459
|
+
value: displayValue,
|
|
11914
12460
|
onChange: handleChange,
|
|
11915
12461
|
onKeyDown: handleKeyDown,
|
|
11916
12462
|
className: cn(
|
|
@@ -11921,16 +12467,16 @@ Documento finalizado.`
|
|
|
11921
12467
|
sizeClasses[size],
|
|
11922
12468
|
className
|
|
11923
12469
|
),
|
|
11924
|
-
"aria-label": props.placeholder ||
|
|
12470
|
+
"aria-label": props.placeholder || searchLabel,
|
|
11925
12471
|
...props
|
|
11926
12472
|
}
|
|
11927
12473
|
),
|
|
11928
|
-
|
|
12474
|
+
displayValue && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11929
12475
|
"button",
|
|
11930
12476
|
{
|
|
11931
12477
|
type: "button",
|
|
11932
12478
|
onClick: handleClear,
|
|
11933
|
-
"aria-label":
|
|
12479
|
+
"aria-label": clearLabel,
|
|
11934
12480
|
className: cn(
|
|
11935
12481
|
"absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
|
|
11936
12482
|
clearSizeClasses[size]
|
|
@@ -11942,7 +12488,7 @@ Documento finalizado.`
|
|
|
11942
12488
|
}
|
|
11943
12489
|
);
|
|
11944
12490
|
Search.displayName = "Search";
|
|
11945
|
-
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
|
|
12491
|
+
const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_GEMINI_API_KEY": "AIzaSyBnoWKe4LjQzlIklON_dVXMXNUl2gvfH6U", "VITE_GOOGLE_MAPS_API_KEY": "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" };
|
|
11946
12492
|
const RouteMapContent = React.forwardRef(
|
|
11947
12493
|
({ apiKey, ...props }, ref) => {
|
|
11948
12494
|
const { isLoaded, loadError, load } = useGoogleMapsLoader();
|
|
@@ -12119,7 +12665,7 @@ Documento finalizado.`
|
|
|
12119
12665
|
const RouteMap = React.forwardRef(
|
|
12120
12666
|
(props, ref) => {
|
|
12121
12667
|
const { isLoaded, loadError } = useGoogleMapsLoader();
|
|
12122
|
-
const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.umd.js", document.baseURI).href } !== "undefined" && __vite_import_meta_env__ &&
|
|
12668
|
+
const effectiveApiKey = props.apiKey || typeof { url: typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index.umd.js", document.baseURI).href } !== "undefined" && __vite_import_meta_env__ && "AIzaSyCj19NndSgZOb8057q24UbJtSsfVJiyVdo" || "";
|
|
12123
12669
|
const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
|
|
12124
12670
|
if (isLoaded || isValidKey || loadError) {
|
|
12125
12671
|
return /* @__PURE__ */ jsxRuntime.jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
|
|
@@ -12166,6 +12712,72 @@ Documento finalizado.`
|
|
|
12166
12712
|
}
|
|
12167
12713
|
);
|
|
12168
12714
|
RouteMap.displayName = "RouteMap";
|
|
12715
|
+
const SimpleMap = React.forwardRef(
|
|
12716
|
+
({
|
|
12717
|
+
center,
|
|
12718
|
+
address,
|
|
12719
|
+
markerTitle,
|
|
12720
|
+
markerInfo,
|
|
12721
|
+
showMarker = true,
|
|
12722
|
+
zoom = 15,
|
|
12723
|
+
height = "350px",
|
|
12724
|
+
...props
|
|
12725
|
+
}, ref) => {
|
|
12726
|
+
const markers = showMarker && center ? [
|
|
12727
|
+
{
|
|
12728
|
+
position: center,
|
|
12729
|
+
title: markerTitle || address || "Location",
|
|
12730
|
+
info: markerInfo || address
|
|
12731
|
+
}
|
|
12732
|
+
] : [];
|
|
12733
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12734
|
+
Map$1,
|
|
12735
|
+
{
|
|
12736
|
+
ref,
|
|
12737
|
+
center,
|
|
12738
|
+
zoom,
|
|
12739
|
+
height,
|
|
12740
|
+
markers,
|
|
12741
|
+
...props
|
|
12742
|
+
}
|
|
12743
|
+
);
|
|
12744
|
+
}
|
|
12745
|
+
);
|
|
12746
|
+
SimpleMap.displayName = "SimpleMap";
|
|
12747
|
+
function AssistantChart({
|
|
12748
|
+
data,
|
|
12749
|
+
config,
|
|
12750
|
+
categoryKey = "month",
|
|
12751
|
+
bars,
|
|
12752
|
+
xAxisFormatter,
|
|
12753
|
+
className
|
|
12754
|
+
}) {
|
|
12755
|
+
const resolvedBars = bars ?? Object.keys(config).map((key) => ({ dataKey: key }));
|
|
12756
|
+
const formatTick = xAxisFormatter ?? ((value) => value.slice(0, 3));
|
|
12757
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ChartContainer, { config, className: cn("min-h-[200px] w-full", className), children: /* @__PURE__ */ jsxRuntime.jsxs(RechartsPrimitive.BarChart, { accessibilityLayer: true, data, children: [
|
|
12758
|
+
/* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive.CartesianGrid, { vertical: false }),
|
|
12759
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12760
|
+
RechartsPrimitive.XAxis,
|
|
12761
|
+
{
|
|
12762
|
+
dataKey: categoryKey,
|
|
12763
|
+
tickLine: false,
|
|
12764
|
+
tickMargin: 10,
|
|
12765
|
+
axisLine: false,
|
|
12766
|
+
tickFormatter: formatTick
|
|
12767
|
+
}
|
|
12768
|
+
),
|
|
12769
|
+
/* @__PURE__ */ jsxRuntime.jsx(ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsxRuntime.jsx(ChartTooltipContent, { indicator: "dashed" }) }),
|
|
12770
|
+
resolvedBars.map((bar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12771
|
+
RechartsPrimitive.Bar,
|
|
12772
|
+
{
|
|
12773
|
+
dataKey: bar.dataKey,
|
|
12774
|
+
fill: bar.fill ?? `var(--color-${bar.dataKey})`,
|
|
12775
|
+
radius: bar.radius ?? 4
|
|
12776
|
+
},
|
|
12777
|
+
bar.dataKey
|
|
12778
|
+
))
|
|
12779
|
+
] }) });
|
|
12780
|
+
}
|
|
12169
12781
|
const MOBILE_BREAKPOINT = 768;
|
|
12170
12782
|
function useIsMobile() {
|
|
12171
12783
|
const [isMobile, setIsMobile] = React__namespace.useState(
|
|
@@ -12645,62 +13257,14 @@ Documento finalizado.`
|
|
|
12645
13257
|
),
|
|
12646
13258
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex-1 relative overflow-hidden group", enablePadding && "p-2", colorVariant === "primary" ? "bg-primary" : "bg-card"), children })
|
|
12647
13259
|
] }),
|
|
12648
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
),
|
|
12655
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12656
|
-
"div",
|
|
12657
|
-
{
|
|
12658
|
-
className: "absolute top-0 right-0 w-2 h-full cursor-ew-resize hover:bg-primary/20 transition-colors",
|
|
12659
|
-
onMouseDown: (e) => handleResizeStart(e, "right")
|
|
12660
|
-
}
|
|
12661
|
-
),
|
|
12662
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12663
|
-
"div",
|
|
12664
|
-
{
|
|
12665
|
-
className: "absolute top-0 left-0 w-full h-2 cursor-ns-resize hover:bg-primary/20 transition-colors",
|
|
12666
|
-
onMouseDown: (e) => handleResizeStart(e, "top")
|
|
12667
|
-
}
|
|
12668
|
-
),
|
|
12669
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12670
|
-
"div",
|
|
12671
|
-
{
|
|
12672
|
-
className: "absolute bottom-0 left-0 w-full h-2 cursor-ns-resize hover:bg-primary/20 transition-colors",
|
|
12673
|
-
onMouseDown: (e) => handleResizeStart(e, "bottom")
|
|
12674
|
-
}
|
|
12675
|
-
),
|
|
12676
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12677
|
-
"div",
|
|
12678
|
-
{
|
|
12679
|
-
className: "absolute top-0 left-0 w-4 h-4 cursor-nwse-resize hover:bg-primary/20 transition-colors",
|
|
12680
|
-
onMouseDown: (e) => handleResizeStart(e, "top-left")
|
|
12681
|
-
}
|
|
12682
|
-
),
|
|
12683
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12684
|
-
"div",
|
|
12685
|
-
{
|
|
12686
|
-
className: "absolute top-0 right-0 w-4 h-4 cursor-nesw-resize hover:bg-primary/20 transition-colors",
|
|
12687
|
-
onMouseDown: (e) => handleResizeStart(e, "top-right")
|
|
12688
|
-
}
|
|
12689
|
-
),
|
|
12690
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12691
|
-
"div",
|
|
12692
|
-
{
|
|
12693
|
-
className: "absolute bottom-0 left-0 w-4 h-4 cursor-nesw-resize hover:bg-primary/20 transition-colors",
|
|
12694
|
-
onMouseDown: (e) => handleResizeStart(e, "bottom-left")
|
|
12695
|
-
}
|
|
12696
|
-
),
|
|
12697
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12698
|
-
"div",
|
|
12699
|
-
{
|
|
12700
|
-
className: "absolute bottom-0 right-0 w-4 h-4 cursor-nwse-resize hover:bg-primary/20 transition-colors",
|
|
12701
|
-
onMouseDown: (e) => handleResizeStart(e, "bottom-right")
|
|
12702
|
-
}
|
|
12703
|
-
)
|
|
13260
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute top-0 left-0 w-2 h-full cursor-ew-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "left") }),
|
|
13261
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute top-0 right-0 w-2 h-full cursor-ew-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "right") }),
|
|
13262
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute top-0 left-0 w-full h-2 cursor-ns-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "top") }),
|
|
13263
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute bottom-0 left-0 w-full h-2 cursor-ns-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "bottom") }),
|
|
13264
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute top-0 left-0 w-4 h-4 cursor-nwse-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "top-left") }),
|
|
13265
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute top-0 right-0 w-4 h-4 cursor-nesw-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "top-right") }),
|
|
13266
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute bottom-0 left-0 w-4 h-4 cursor-nesw-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "bottom-left") }),
|
|
13267
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute bottom-0 right-0 w-4 h-4 cursor-nwse-resize hover:bg-primary/20 transition-colors", onMouseDown: (e) => handleResizeStart(e, "bottom-right") })
|
|
12704
13268
|
] })
|
|
12705
13269
|
}
|
|
12706
13270
|
) });
|
|
@@ -13458,6 +14022,7 @@ Documento finalizado.`
|
|
|
13458
14022
|
exports2.AlertDialogTrigger = AlertDialogTrigger;
|
|
13459
14023
|
exports2.AlertTitle = AlertTitle;
|
|
13460
14024
|
exports2.AspectRatio = AspectRatio;
|
|
14025
|
+
exports2.AssistantChart = AssistantChart;
|
|
13461
14026
|
exports2.AudioPlayer = AudioPlayer;
|
|
13462
14027
|
exports2.Avatar = Avatar;
|
|
13463
14028
|
exports2.AvatarFallback = AvatarFallback;
|
|
@@ -13556,6 +14121,11 @@ Documento finalizado.`
|
|
|
13556
14121
|
exports2.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
13557
14122
|
exports2.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
13558
14123
|
exports2.Empty = Empty;
|
|
14124
|
+
exports2.EmptyAction = EmptyAction;
|
|
14125
|
+
exports2.EmptyDescription = EmptyDescription;
|
|
14126
|
+
exports2.EmptyIcon = EmptyIcon;
|
|
14127
|
+
exports2.EmptyImage = EmptyImage;
|
|
14128
|
+
exports2.EmptyTitle = EmptyTitle;
|
|
13559
14129
|
exports2.FileUpload = FileUpload;
|
|
13560
14130
|
exports2.FloatingMediaWrapper = FloatingMediaWrapper;
|
|
13561
14131
|
exports2.Form = Form;
|
|
@@ -13628,6 +14198,7 @@ Documento finalizado.`
|
|
|
13628
14198
|
exports2.ResizableHandle = ResizableHandle;
|
|
13629
14199
|
exports2.ResizablePanel = ResizablePanel;
|
|
13630
14200
|
exports2.ResizablePanelGroup = ResizablePanelGroup;
|
|
14201
|
+
exports2.RichTextEditor = RichTextEditor;
|
|
13631
14202
|
exports2.RouteMap = RouteMap;
|
|
13632
14203
|
exports2.ScrollArea = ScrollArea;
|
|
13633
14204
|
exports2.ScrollBar = ScrollBar;
|
|
@@ -13652,6 +14223,7 @@ Documento finalizado.`
|
|
|
13652
14223
|
exports2.SheetTitle = SheetTitle;
|
|
13653
14224
|
exports2.SheetTrigger = SheetTrigger;
|
|
13654
14225
|
exports2.Sidebar = Sidebar;
|
|
14226
|
+
exports2.SimpleMap = SimpleMap;
|
|
13655
14227
|
exports2.Skeleton = Skeleton;
|
|
13656
14228
|
exports2.Slider = Slider;
|
|
13657
14229
|
exports2.StatsCard = StatsCard;
|
|
@@ -13701,6 +14273,7 @@ Documento finalizado.`
|
|
|
13701
14273
|
exports2.generateDemoResponse = gerarResposta;
|
|
13702
14274
|
exports2.gerarResposta = gerarResposta;
|
|
13703
14275
|
exports2.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
14276
|
+
exports2.reloadGoogleMaps = reloadGoogleMaps;
|
|
13704
14277
|
exports2.toggleVariants = toggleVariants;
|
|
13705
14278
|
exports2.useFormField = useFormField;
|
|
13706
14279
|
exports2.useGoogleMapsLoader = useGoogleMapsLoader;
|