xertica-ui 2.5.0 → 2.5.2

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.
Files changed (536) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +56 -17
  3. package/assets/xertica-logo.svg +37 -37
  4. package/assets/xertica-x-logo.svg +20 -20
  5. package/bin/cli.ts +14 -2
  6. package/bin/generate-tokens.ts +262 -262
  7. package/bin/language-config.ts +359 -358
  8. package/components/assistant/code-block/CodeBlock.tsx +268 -268
  9. package/components/assistant/formatted-document/FormattedDocument.tsx +147 -147
  10. package/components/assistant/modern-chat-input/ModernChatInput.tsx +564 -564
  11. package/components/assistant/xertica-assistant/parts/AssistantCollapsedView.tsx +99 -99
  12. package/components/assistant/xertica-assistant/parts/AssistantConversationList.tsx +104 -104
  13. package/components/assistant/xertica-assistant/parts/AssistantDocumentEditor.tsx +81 -81
  14. package/components/assistant/xertica-assistant/parts/AssistantFeedbackDialog.tsx +88 -88
  15. package/components/assistant/xertica-assistant/parts/AssistantHeader.tsx +75 -75
  16. package/components/assistant/xertica-assistant/parts/AssistantMessageBubble.tsx +564 -564
  17. package/components/assistant/xertica-assistant/parts/AssistantTabBar.tsx +67 -67
  18. package/components/assistant/xertica-assistant/parts/AssistantWelcomeScreen.tsx +103 -103
  19. package/components/assistant/xertica-assistant/use-assistant.ts +615 -615
  20. package/components/assistant/xertica-assistant/xertica-assistant.tsx +611 -611
  21. package/components/blocks/card-patterns/ActivityCard.tsx +100 -100
  22. package/components/blocks/card-patterns/ActivityCardSkeleton.tsx +56 -56
  23. package/components/blocks/card-patterns/FeatureCardSkeleton.tsx +58 -58
  24. package/components/blocks/card-patterns/NotificationCard.tsx +140 -140
  25. package/components/blocks/card-patterns/NotificationCardSkeleton.tsx +81 -81
  26. package/components/blocks/card-patterns/ProfileCard.tsx +112 -112
  27. package/components/blocks/card-patterns/ProfileCardSkeleton.tsx +69 -69
  28. package/components/blocks/card-patterns/ProjectCard.tsx +123 -123
  29. package/components/blocks/card-patterns/ProjectCardSkeleton.tsx +67 -67
  30. package/components/blocks/card-patterns/QuickActionCardSkeleton.tsx +44 -44
  31. package/components/blocks/card-patterns/card-patterns.stories.tsx +594 -594
  32. package/components/blocks/card-patterns/index.ts +29 -29
  33. package/components/brand/language-selector/LanguageSelector.tsx +102 -102
  34. package/components/brand/language-selector/language-selector.stories.tsx +111 -111
  35. package/components/brand/language-selector/language-selector.test.tsx +101 -101
  36. package/components/brand/theme-toggle/ThemeToggle.tsx +74 -74
  37. package/components/brand/xertica-provider/xertica-provider.mdx +61 -61
  38. package/components/index.ts +86 -86
  39. package/components/layout/sidebar/sidebar.mdx +1 -1
  40. package/components/layout/sidebar/sidebar.stories.tsx +1033 -787
  41. package/components/layout/sidebar/sidebar.tsx +338 -1
  42. package/components/media/FloatingMediaWrapper.tsx +371 -371
  43. package/components/media/audio-player/AudioPlayer.tsx +768 -768
  44. package/components/media/video-player/VideoPlayer.tsx +310 -310
  45. package/components/pages/home-content/HomeContent.tsx +120 -120
  46. package/components/pages/home-content/home-content.mdx +62 -62
  47. package/components/pages/home-page/HomePage.tsx +78 -78
  48. package/components/pages/home-page/home-page.mdx +53 -53
  49. package/components/pages/template-content/TemplateContent.tsx +1354 -1354
  50. package/components/pages/template-content/template-content.mdx +61 -61
  51. package/components/pages/template-page/TemplatePage.stories.tsx +32 -32
  52. package/components/pages/template-page/template-page.mdx +53 -53
  53. package/components/shared/error-boundary.stories.tsx +114 -114
  54. package/components/shared/error-boundary.tsx +150 -150
  55. package/components/shared/error-fallbacks.tsx +222 -222
  56. package/components/ui/accordion/accordion.mdx +8 -8
  57. package/components/ui/alert/alert.mdx +8 -8
  58. package/components/ui/alert-dialog/alert-dialog.mdx +8 -8
  59. package/components/ui/aspect-ratio/aspect-ratio.mdx +8 -8
  60. package/components/ui/assistant-chart/assistant-chart.mdx +8 -8
  61. package/components/ui/avatar/avatar.mdx +8 -8
  62. package/components/ui/badge/badge.mdx +8 -8
  63. package/components/ui/breadcrumb/breadcrumb.mdx +8 -8
  64. package/components/ui/button/button.mdx +8 -8
  65. package/components/ui/calendar/calendar.mdx +8 -8
  66. package/components/ui/card/card.mdx +8 -8
  67. package/components/ui/carousel/carousel.mdx +8 -8
  68. package/components/ui/chart/chart.mdx +8 -8
  69. package/components/ui/chart/chart.test.tsx +178 -178
  70. package/components/ui/chart/chart.tsx +2245 -2239
  71. package/components/ui/checkbox/checkbox.mdx +8 -8
  72. package/components/ui/collapsible/collapsible.mdx +8 -8
  73. package/components/ui/command/command.mdx +8 -8
  74. package/components/ui/context-menu/context-menu.mdx +8 -8
  75. package/components/ui/dialog/dialog.mdx +8 -8
  76. package/components/ui/drawer/drawer.mdx +8 -8
  77. package/components/ui/dropdown-menu/dropdown-menu.mdx +8 -8
  78. package/components/ui/empty/empty.mdx +8 -8
  79. package/components/ui/file-upload/file-upload.mdx +8 -8
  80. package/components/ui/hover-card/hover-card.mdx +8 -8
  81. package/components/ui/input/input.mdx +8 -8
  82. package/components/ui/input-otp/input-otp.mdx +8 -8
  83. package/components/ui/label/label.mdx +8 -8
  84. package/components/ui/map/map.mdx +8 -8
  85. package/components/ui/menubar/menubar.mdx +8 -8
  86. package/components/ui/navigation-menu/navigation-menu.mdx +8 -8
  87. package/components/ui/notification-badge/notification-badge.mdx +8 -8
  88. package/components/ui/pagination/pagination.mdx +8 -8
  89. package/components/ui/popover/popover.mdx +8 -8
  90. package/components/ui/progress/progress.mdx +8 -8
  91. package/components/ui/radio-group/radio-group.mdx +8 -8
  92. package/components/ui/rating/rating.mdx +8 -8
  93. package/components/ui/resizable/resizable.mdx +8 -8
  94. package/components/ui/route-map/route-map.mdx +8 -8
  95. package/components/ui/scroll-area/scroll-area.mdx +8 -8
  96. package/components/ui/search/search.mdx +8 -8
  97. package/components/ui/select/select.mdx +8 -8
  98. package/components/ui/separator/separator.mdx +8 -8
  99. package/components/ui/sheet/sheet.mdx +8 -8
  100. package/components/ui/simple-map/simple-map.mdx +8 -8
  101. package/components/ui/skeleton/skeleton.mdx +8 -8
  102. package/components/ui/slider/slider.mdx +8 -8
  103. package/components/ui/sonner/sonner.mdx +8 -8
  104. package/components/ui/stats-card/index.ts +2 -2
  105. package/components/ui/stats-card/stats-card-skeleton.tsx +60 -60
  106. package/components/ui/stats-card/stats-card.mdx +8 -8
  107. package/components/ui/stats-card/stats-card.tsx +109 -109
  108. package/components/ui/stepper/stepper.mdx +8 -8
  109. package/components/ui/switch/switch.mdx +8 -8
  110. package/components/ui/table/table.mdx +8 -8
  111. package/components/ui/tabs/tabs.mdx +8 -8
  112. package/components/ui/textarea/textarea.mdx +8 -8
  113. package/components/ui/timeline/timeline.mdx +8 -8
  114. package/components/ui/toggle/toggle.mdx +8 -8
  115. package/components/ui/toggle-group/toggle-group.mdx +8 -8
  116. package/components/ui/tooltip/tooltip.mdx +8 -8
  117. package/components/ui/tree-view/tree-view.mdx +8 -8
  118. package/components.json +511 -511
  119. package/contexts/AuthContext.tsx +121 -121
  120. package/contexts/BrandColorsContext.tsx +282 -282
  121. package/contexts/LanguageContext.test.tsx +121 -121
  122. package/contexts/LanguageContext.tsx +250 -250
  123. package/contexts/theme-data.ts +391 -391
  124. package/dist/{AssistantChart-DoZCyS5r.cjs → AssistantChart-9w31gdAb.cjs} +4 -4
  125. package/dist/{AssistantChart-CldVCVDe.cjs → AssistantChart-BAudAfne.cjs} +5 -5
  126. package/dist/{AssistantChart-Bdd44uBn.cjs → AssistantChart-BAx9VQvb.cjs} +127 -388
  127. package/dist/{AssistantChart-Cu3m7RBo.js → AssistantChart-BP8upjMk.js} +5 -5
  128. package/dist/{AssistantChart-CFhDdGyU.js → AssistantChart-CVko2A1W.js} +130 -391
  129. package/dist/{AssistantChart-C_hwFRRr.js → AssistantChart-CVzmmhx4.js} +4 -4
  130. package/dist/{AudioPlayer-IAU5q5T1.cjs → AudioPlayer-1ypwE2Wh.cjs} +1 -1
  131. package/dist/{AudioPlayer-CGRUtUdN.js → AudioPlayer-DuKXrCfy.js} +1 -1
  132. package/dist/{LanguageContext-CS14yCpi.js → LanguageContext-BwhwC3G2.js} +2 -2
  133. package/dist/{LanguageContext-B_KFTCzT.cjs → LanguageContext-DvUt5jBg.cjs} +2 -2
  134. package/dist/{ThemeContext-C2EwAPDt.js → ThemeContext-BbBNoFTG.js} +2 -2
  135. package/dist/{ThemeContext-Bmod0Cg2.cjs → ThemeContext-BblcjQup.cjs} +13 -8
  136. package/dist/{ThemeContext-BWq9ACPo.js → ThemeContext-Bo-W2WZH.js} +13 -8
  137. package/dist/{ThemeContext-j5aGtPky.cjs → ThemeContext-CP3a0jxy.cjs} +193 -262
  138. package/dist/{ThemeContext-vTjumZeM.cjs → ThemeContext-Cmr8Ex8H.cjs} +2 -2
  139. package/dist/ThemeContext-CpqYShLq.cjs +324 -0
  140. package/dist/{ThemeContext-CQSo4Iwc.js → ThemeContext-D3LzacmG.js} +8 -1
  141. package/dist/ThemeContext-Du2nE1PL.js +325 -0
  142. package/dist/ThemeContext-GeEBTJ3q.cjs +1621 -0
  143. package/dist/ThemeContext-JyLK9B1o.js +1622 -0
  144. package/dist/{ThemeContext-CGk3KK0k.cjs → ThemeContext-U4dEYc6C.cjs} +8 -1
  145. package/dist/{ThemeContext-BXjrgUjW.js → ThemeContext-ept8jhXI.js} +200 -261
  146. package/dist/{VerifyEmailPage-CGIwmWrm.js → VerifyEmailPage-B31mCrMc.js} +1 -1
  147. package/dist/{VerifyEmailPage-C0c2e5n0.js → VerifyEmailPage-BE-L9mB7.js} +7 -7
  148. package/dist/{VerifyEmailPage-DSBMRHtl.js → VerifyEmailPage-BIBOKV7Z.js} +41 -36
  149. package/dist/{VerifyEmailPage-DgIid028.js → VerifyEmailPage-BJjAMUTW.js} +4 -4
  150. package/dist/{VerifyEmailPage--1Vurewl.cjs → VerifyEmailPage-BRSP-Pwt.cjs} +3 -3
  151. package/dist/{VerifyEmailPage-Cwi3kbol.cjs → VerifyEmailPage-Bae2cBXT.cjs} +7 -7
  152. package/dist/{VerifyEmailPage-De6bQjrz.cjs → VerifyEmailPage-BiRm7Nh4.cjs} +41 -36
  153. package/dist/{VerifyEmailPage-ByerOcm4.cjs → VerifyEmailPage-Bv8Ah_TK.cjs} +23 -20
  154. package/dist/VerifyEmailPage-Bvfv8HVQ.js +3214 -0
  155. package/dist/{VerifyEmailPage-BComraR7.cjs → VerifyEmailPage-CR7kb5df.cjs} +22 -12
  156. package/dist/{VerifyEmailPage-CpqqpLpo.cjs → VerifyEmailPage-C_Zk6Gen.cjs} +1 -1
  157. package/dist/{VerifyEmailPage-MTD7AG1Z.js → VerifyEmailPage-C_ihbcth.js} +4 -4
  158. package/dist/{VerifyEmailPage-1WwWczAn.js → VerifyEmailPage-CbgjOF0v.js} +22 -12
  159. package/dist/{VerifyEmailPage-DvMLZgFt.js → VerifyEmailPage-CdYPSJoO.js} +1 -1
  160. package/dist/{VerifyEmailPage-By3Jf__L.cjs → VerifyEmailPage-CkBYfsNy.cjs} +4 -4
  161. package/dist/{VerifyEmailPage-CJLz3jrn.js → VerifyEmailPage-Cyl55sJb.js} +23 -20
  162. package/dist/VerifyEmailPage-D-FRj5TU.cjs +3213 -0
  163. package/dist/{VerifyEmailPage-B4peJjAT.cjs → VerifyEmailPage-DF2ilhum.cjs} +334 -356
  164. package/dist/{VerifyEmailPage-CYXtbKi3.cjs → VerifyEmailPage-DMBh4NM9.cjs} +1 -1
  165. package/dist/{VerifyEmailPage-CgMxRb4z.js → VerifyEmailPage-DTtFfC-J.js} +3 -3
  166. package/dist/{VerifyEmailPage-CFLMls1p.cjs → VerifyEmailPage-Dt7zgA4w.cjs} +4 -4
  167. package/dist/{VerifyEmailPage-C5TNQTBa.js → VerifyEmailPage-EhudUdqF.js} +343 -355
  168. package/dist/{VerifyEmailPage-DGhuIqkb.js → VerifyEmailPage-X14vhdyl.js} +4 -4
  169. package/dist/VerifyEmailPage-hdB8JQGv.cjs +3213 -0
  170. package/dist/{VerifyEmailPage-Bp1XXl3H.cjs → VerifyEmailPage-u_Dn7t1U.cjs} +4 -4
  171. package/dist/VerifyEmailPage-vYHbYK3q.js +3214 -0
  172. package/dist/{XerticaProvider-CBGc4EMA.cjs → XerticaProvider-AChwphCO.cjs} +4 -4
  173. package/dist/{XerticaProvider-BIrqfZ-i.cjs → XerticaProvider-AbWlr7Af.cjs} +8 -11
  174. package/dist/{XerticaProvider-D-yNhF94.cjs → XerticaProvider-B8CaV7xu.cjs} +1 -1
  175. package/dist/{XerticaProvider-CEoWMTxu.js → XerticaProvider-BITjgC5p.js} +2 -2
  176. package/dist/{XerticaProvider-CllrbMEJ.cjs → XerticaProvider-By8q3Roe.cjs} +2 -2
  177. package/dist/{XerticaProvider-C1DKnvLh.js → XerticaProvider-CUYJZc32.js} +4 -4
  178. package/dist/{XerticaProvider-ET0ihewn.cjs → XerticaProvider-CW9hpCdF.cjs} +2 -2
  179. package/dist/{XerticaProvider-Dt5HEzbQ.js → XerticaProvider-CWgby5mY.js} +10 -10
  180. package/dist/XerticaProvider-CWs6EwNa.js +49 -0
  181. package/dist/XerticaProvider-CjQAQPcn.cjs +48 -0
  182. package/dist/XerticaProvider-D5lLumH-.js +49 -0
  183. package/dist/{XerticaProvider-DYq4JWtg.js → XerticaProvider-DQtvJU7m.js} +1 -1
  184. package/dist/XerticaProvider-qQUDop71.cjs +48 -0
  185. package/dist/{XerticaProvider-B7EVH-NF.js → XerticaProvider-siSt9uG2.js} +2 -2
  186. package/dist/{XerticaXLogo-Zw2B276b.cjs → XerticaXLogo-8TTzBjHw.cjs} +1 -1
  187. package/dist/{XerticaXLogo-B7xQ5dhi.js → XerticaXLogo-BWaag64t.js} +1 -1
  188. package/dist/{XerticaXLogo-DZbo4vOE.js → XerticaXLogo-CFuIlYFH.js} +12 -12
  189. package/dist/{XerticaXLogo-bvZSgwGF.cjs → XerticaXLogo-CU-U-GP4.cjs} +7 -13
  190. package/dist/XerticaXLogo-ChryA6xj.js +252 -0
  191. package/dist/{XerticaXLogo-CQUUjXoH.cjs → XerticaXLogo-CziKMQil.cjs} +8 -8
  192. package/dist/XerticaXLogo-DHz5SugF.js +252 -0
  193. package/dist/XerticaXLogo-DTee_y8X.cjs +251 -0
  194. package/dist/{XerticaXLogo-Cmsp-Eey.js → XerticaXLogo-DfUvz-lD.js} +9 -9
  195. package/dist/XerticaXLogo-kslQ8Tk_.cjs +251 -0
  196. package/dist/{alert-dialog-s-vmNkJ_.js → alert-dialog-iDe5VE5o.js} +3 -3
  197. package/dist/{alert-dialog-DSKByiKZ.cjs → alert-dialog-yckpaOpy.cjs} +3 -3
  198. package/dist/cli.js +16 -6
  199. package/dist/components/ui/chart/chart.d.ts +7 -5
  200. package/dist/{google-maps-loader-Y-QkD-Li.cjs → google-maps-loader-BqsYL48U.cjs} +0 -5
  201. package/dist/{google-maps-loader-CTYySAun.js → google-maps-loader-t2IlYBzw.js} +0 -4
  202. package/dist/index-CkTUgOwX.js +8 -0
  203. package/dist/{index-COtD8bRW.cjs → index-D3RLKRAs.cjs} +1 -1
  204. package/dist/index.cjs.js +2 -2
  205. package/dist/index.es.js +2 -2
  206. package/dist/index.umd.js +454 -1027
  207. package/dist/layout.cjs.js +1 -1
  208. package/dist/layout.es.js +1 -1
  209. package/dist/pages.cjs.js +1 -1
  210. package/dist/pages.es.js +1 -1
  211. package/dist/{sidebar-DAaY8bRU.cjs → sidebar-B3EYhli0.cjs} +33 -24
  212. package/dist/{sidebar-nzPoVHBQ.cjs → sidebar-B9NR0lCe.cjs} +46 -41
  213. package/dist/{sidebar-CeTMuzOx.cjs → sidebar-BvF5I2Ue.cjs} +47 -128
  214. package/dist/{sidebar-q7P2Godd.cjs → sidebar-C5B_LHek.cjs} +1 -1
  215. package/dist/{sidebar-CrQDDdcz.js → sidebar-CA6_ek3f.js} +33 -24
  216. package/dist/sidebar-CLmIjgNd.cjs +1136 -0
  217. package/dist/{sidebar-BxGXsDAd.cjs → sidebar-CVUGHOS_.cjs} +8 -16
  218. package/dist/{sidebar-BViy8Eeu.js → sidebar-CmvwjnVb.js} +9 -17
  219. package/dist/{sidebar-B6SlKZYN.js → sidebar-CplprZpM.js} +49 -40
  220. package/dist/sidebar-Duermn32.js +1133 -0
  221. package/dist/{sidebar-BbVIQvlP.js → sidebar-Dz7bd3zP.js} +1 -1
  222. package/dist/{sidebar-0ocFLSks.js → sidebar-KIS0C2JH.js} +50 -127
  223. package/dist/sidebar-OTO_up7Z.js +801 -0
  224. package/dist/sidebar-zowjejT2.cjs +800 -0
  225. package/dist/{use-audio-player-nv8ZSGa1.js → use-audio-player-Bkh23vQ3.js} +3 -7
  226. package/dist/{use-audio-player-NKsWyjWu.cjs → use-audio-player-Dn1NR9xN.cjs} +3 -7
  227. package/dist/{xertica-assistant-dyP7KHM5.cjs → xertica-assistant-B1IaHXnB.cjs} +388 -529
  228. package/dist/{xertica-assistant-ciJaWqm1.js → xertica-assistant-BMqdyRVi.js} +10 -28
  229. package/dist/{xertica-assistant-V_IdW4WF.cjs → xertica-assistant-Bj3vBCq_.cjs} +9 -27
  230. package/dist/{xertica-assistant-yX1CFBBo.js → xertica-assistant-DPsESB6t.js} +390 -531
  231. package/dist/{CodeBlock-7TTgmdGG.cjs → xertica-assistant-Qp3ydksa.cjs} +51 -263
  232. package/dist/{CodeBlock-BeSt1h5P.js → xertica-assistant-gnCJdcZY.js} +7 -219
  233. package/dist/xertica-ui.css +2 -2
  234. package/docs/architecture-improvements.md +456 -456
  235. package/docs/architecture.md +312 -312
  236. package/docs/components/assistant.md +428 -428
  237. package/docs/components/branding.md +252 -252
  238. package/docs/components/card-patterns.md +447 -447
  239. package/docs/components/error-boundary.md +201 -201
  240. package/docs/components/hooks.md +432 -432
  241. package/docs/components/language-selector.md +176 -176
  242. package/docs/components/pages.md +323 -323
  243. package/docs/components/sidebar.md +331 -331
  244. package/docs/components/stats-card.md +138 -138
  245. package/docs/doc-audit.md +244 -244
  246. package/docs/getting-started.md +616 -616
  247. package/docs/guidelines.md +330 -330
  248. package/docs/i18n.md +480 -480
  249. package/docs/installation.md +268 -268
  250. package/docs/llms.md +295 -295
  251. package/docs/state-management.md +289 -289
  252. package/guidelines/Guidelines.md +409 -409
  253. package/llms-compact.txt +1 -1
  254. package/llms-full.txt +10688 -10688
  255. package/llms.txt +1 -1
  256. package/package.json +1 -1
  257. package/styles/xertica/base.css +90 -90
  258. package/styles/xertica/tokens.css +240 -240
  259. package/templates/.prettierignore +4 -4
  260. package/templates/.prettierrc +10 -10
  261. package/templates/CLAUDE.md +180 -180
  262. package/templates/package.json +2 -2
  263. package/templates/src/app/App.tsx +46 -46
  264. package/templates/src/app/components/AuthGuard.tsx +131 -131
  265. package/templates/src/features/assistant/data/mock.ts +75 -75
  266. package/templates/src/features/assistant/hooks/useAssistantConfig.ts +20 -20
  267. package/templates/src/features/assistant/index.ts +5 -5
  268. package/templates/src/features/auth/ui/ForgotPasswordContent.tsx +70 -70
  269. package/templates/src/features/auth/ui/LoginContent.tsx +92 -92
  270. package/templates/src/features/auth/ui/ResetPasswordContent.tsx +183 -183
  271. package/templates/src/features/auth/ui/SocialLoginButtons.tsx +78 -78
  272. package/templates/src/features/auth/ui/VerifyEmailContent.tsx +80 -80
  273. package/templates/src/features/home/data/mock.ts +41 -41
  274. package/templates/src/features/home/hooks/useFeatureCards.ts +20 -20
  275. package/templates/src/features/home/index.ts +11 -11
  276. package/templates/src/features/home/ui/HomeContent.tsx +117 -117
  277. package/templates/src/features/template/ui/CrudTemplate.tsx +112 -112
  278. package/templates/src/features/template/ui/DashboardTemplate.tsx +110 -110
  279. package/templates/src/features/template/ui/FormTemplate.tsx +117 -117
  280. package/templates/src/features/template/ui/LoginTemplate.tsx +59 -59
  281. package/templates/src/features/template/ui/TemplateContent.tsx +1322 -1322
  282. package/templates/src/i18n.ts +124 -124
  283. package/templates/src/locales/en/common.json +21 -21
  284. package/templates/src/locales/en/components/activityCard.json +10 -10
  285. package/templates/src/locales/en/components/assistant.json +119 -119
  286. package/templates/src/locales/en/components/media.json +29 -29
  287. package/templates/src/locales/en/components/notificationCard.json +5 -5
  288. package/templates/src/locales/en/components/profileCard.json +8 -8
  289. package/templates/src/locales/en/components/projectCard.json +10 -10
  290. package/templates/src/locales/en/components/sidebar.json +14 -14
  291. package/templates/src/locales/en/components/stats.json +8 -8
  292. package/templates/src/locales/en/components/team.json +14 -14
  293. package/templates/src/locales/en/errors.json +9 -9
  294. package/templates/src/locales/en/languageSelector.json +7 -7
  295. package/templates/src/locales/en/nav.json +6 -6
  296. package/templates/src/locales/en/pages/crudTemplate.json +25 -25
  297. package/templates/src/locales/en/pages/dashboardTemplate.json +20 -20
  298. package/templates/src/locales/en/pages/forgotPassword.json +10 -10
  299. package/templates/src/locales/en/pages/formTemplate.json +16 -16
  300. package/templates/src/locales/en/pages/home.json +7 -7
  301. package/templates/src/locales/en/pages/login.json +15 -15
  302. package/templates/src/locales/en/pages/loginTemplate.json +9 -9
  303. package/templates/src/locales/en/pages/resetPassword.json +18 -18
  304. package/templates/src/locales/en/pages/templates.json +317 -317
  305. package/templates/src/locales/en/pages/verifyEmail.json +12 -12
  306. package/templates/src/locales/en/themeToggle.json +6 -6
  307. package/templates/src/locales/es/common.json +21 -21
  308. package/templates/src/locales/es/components/activityCard.json +10 -10
  309. package/templates/src/locales/es/components/assistant.json +119 -119
  310. package/templates/src/locales/es/components/media.json +29 -29
  311. package/templates/src/locales/es/components/notificationCard.json +5 -5
  312. package/templates/src/locales/es/components/profileCard.json +8 -8
  313. package/templates/src/locales/es/components/projectCard.json +10 -10
  314. package/templates/src/locales/es/components/sidebar.json +14 -14
  315. package/templates/src/locales/es/components/stats.json +8 -8
  316. package/templates/src/locales/es/components/team.json +14 -14
  317. package/templates/src/locales/es/errors.json +9 -9
  318. package/templates/src/locales/es/languageSelector.json +7 -7
  319. package/templates/src/locales/es/nav.json +6 -6
  320. package/templates/src/locales/es/pages/crudTemplate.json +25 -25
  321. package/templates/src/locales/es/pages/dashboardTemplate.json +20 -20
  322. package/templates/src/locales/es/pages/forgotPassword.json +10 -10
  323. package/templates/src/locales/es/pages/formTemplate.json +16 -16
  324. package/templates/src/locales/es/pages/home.json +7 -7
  325. package/templates/src/locales/es/pages/login.json +15 -15
  326. package/templates/src/locales/es/pages/loginTemplate.json +9 -9
  327. package/templates/src/locales/es/pages/resetPassword.json +18 -18
  328. package/templates/src/locales/es/pages/templates.json +317 -317
  329. package/templates/src/locales/es/pages/verifyEmail.json +12 -12
  330. package/templates/src/locales/es/themeToggle.json +6 -6
  331. package/templates/src/locales/pt-BR/common.json +21 -21
  332. package/templates/src/locales/pt-BR/components/activityCard.json +10 -10
  333. package/templates/src/locales/pt-BR/components/assistant.json +119 -119
  334. package/templates/src/locales/pt-BR/components/media.json +29 -29
  335. package/templates/src/locales/pt-BR/components/notificationCard.json +5 -5
  336. package/templates/src/locales/pt-BR/components/profileCard.json +8 -8
  337. package/templates/src/locales/pt-BR/components/projectCard.json +10 -10
  338. package/templates/src/locales/pt-BR/components/sidebar.json +14 -14
  339. package/templates/src/locales/pt-BR/components/stats.json +8 -8
  340. package/templates/src/locales/pt-BR/components/team.json +14 -14
  341. package/templates/src/locales/pt-BR/errors.json +9 -9
  342. package/templates/src/locales/pt-BR/languageSelector.json +7 -7
  343. package/templates/src/locales/pt-BR/nav.json +6 -6
  344. package/templates/src/locales/pt-BR/pages/crudTemplate.json +25 -25
  345. package/templates/src/locales/pt-BR/pages/dashboardTemplate.json +20 -20
  346. package/templates/src/locales/pt-BR/pages/forgotPassword.json +10 -10
  347. package/templates/src/locales/pt-BR/pages/formTemplate.json +16 -16
  348. package/templates/src/locales/pt-BR/pages/home.json +7 -7
  349. package/templates/src/locales/pt-BR/pages/login.json +15 -15
  350. package/templates/src/locales/pt-BR/pages/loginTemplate.json +9 -9
  351. package/templates/src/locales/pt-BR/pages/resetPassword.json +18 -18
  352. package/templates/src/locales/pt-BR/pages/templates.json +317 -317
  353. package/templates/src/locales/pt-BR/pages/verifyEmail.json +12 -12
  354. package/templates/src/locales/pt-BR/themeToggle.json +6 -6
  355. package/templates/src/pages/AssistantPage.tsx +470 -470
  356. package/templates/src/pages/HomePage.tsx +53 -53
  357. package/templates/src/shared/error-boundary.tsx +150 -150
  358. package/templates/src/shared/error-fallbacks.tsx +222 -222
  359. package/templates/src/styles/xertica/tokens.css +240 -240
  360. package/templates/vite.config.js +20 -20
  361. package/templates/vite.config.ts +55 -55
  362. package/dist/AssistantChart-BKVtGUKF.js +0 -3383
  363. package/dist/AssistantChart-CxGjH7Qk.js +0 -3477
  364. package/dist/AssistantChart-DIpshm3i.js +0 -4784
  365. package/dist/AssistantChart-D_PTeu8P.cjs +0 -3503
  366. package/dist/AssistantChart-WeycT5Pd.cjs +0 -3551
  367. package/dist/AssistantChart-zjsy2GaZ.cjs +0 -4810
  368. package/dist/AudioPlayer-B1lt5cPl.cjs +0 -989
  369. package/dist/AudioPlayer-BZ7bibzU.cjs +0 -982
  370. package/dist/AudioPlayer-BpRPS4-1.cjs +0 -1277
  371. package/dist/AudioPlayer-C12BjQBV.cjs +0 -997
  372. package/dist/AudioPlayer-CFeV8t-5.cjs +0 -936
  373. package/dist/AudioPlayer-Coly3q5R.js +0 -1278
  374. package/dist/AudioPlayer-CySJIyvL.js +0 -937
  375. package/dist/AudioPlayer-DMcG_c7L.js +0 -990
  376. package/dist/AudioPlayer-DcFKRJE_.js +0 -998
  377. package/dist/AudioPlayer-e8LfNoqO.js +0 -983
  378. package/dist/BrandColorsContext-565dDHd5.js +0 -660
  379. package/dist/BrandColorsContext-BcJbtkqn.cjs +0 -659
  380. package/dist/CodeBlock-BgfYL_rD.cjs +0 -2094
  381. package/dist/CodeBlock-BlcqlA9M.cjs +0 -2094
  382. package/dist/CodeBlock-Bnmeu5ez.cjs +0 -2094
  383. package/dist/CodeBlock-BtfPlbAI.js +0 -2078
  384. package/dist/CodeBlock-CIySIuYr.js +0 -2078
  385. package/dist/CodeBlock-CuPtUM-7.cjs +0 -2094
  386. package/dist/CodeBlock-D6ffWXgc.js +0 -2078
  387. package/dist/CodeBlock-D8dcwbit.cjs +0 -2094
  388. package/dist/CodeBlock-DMZrFnlw.cjs +0 -2094
  389. package/dist/CodeBlock-DlBehYN8.js +0 -2078
  390. package/dist/CodeBlock-DnYNI8rQ.js +0 -2078
  391. package/dist/CodeBlock-DvKWbSnE.cjs +0 -2094
  392. package/dist/CodeBlock-DwMCfkFY.js +0 -2078
  393. package/dist/CodeBlock-Dy6CNYyj.js +0 -2078
  394. package/dist/CodeBlock-U1pPOQI7.cjs +0 -2094
  395. package/dist/CodeBlock-f_GpNhEB.js +0 -2078
  396. package/dist/CodeBlock-oB6u8nI1.js +0 -2078
  397. package/dist/CodeBlock-tZC31B73.cjs +0 -2094
  398. package/dist/FeatureCard-CxC-7C-C.cjs +0 -300
  399. package/dist/FeatureCard-DbHWCb4E.js +0 -301
  400. package/dist/ImageWithFallback-CGtidP6B.cjs +0 -4542
  401. package/dist/ImageWithFallback-lsg3pdFg.js +0 -4508
  402. package/dist/LanguageSelector-B5YfbHra.js +0 -231
  403. package/dist/LanguageSelector-D6uacAIM.cjs +0 -230
  404. package/dist/LayoutContext-B45-e9DI.cjs +0 -93
  405. package/dist/LayoutContext-BAql6ZRY.js +0 -97
  406. package/dist/LayoutContext-Bav3UMEA.js +0 -94
  407. package/dist/LayoutContext-BvK-ggDa.cjs +0 -96
  408. package/dist/ThemeContext-BoH4NLfN.js +0 -734
  409. package/dist/ThemeContext-r69W20Xg.cjs +0 -733
  410. package/dist/VerifyEmailPage-COiyNl1y.js +0 -2825
  411. package/dist/VerifyEmailPage-CqKsR2v8.js +0 -2827
  412. package/dist/VerifyEmailPage-DjQKRlUS.cjs +0 -2824
  413. package/dist/VerifyEmailPage-s-1X3LDJ.cjs +0 -2826
  414. package/dist/XerticaOrbe-KL1RBHzw.cjs +0 -1354
  415. package/dist/XerticaOrbe-zwS1p2a8.js +0 -1355
  416. package/dist/XerticaProvider-6btlAlzc.js +0 -17
  417. package/dist/XerticaProvider-BNoNOxQ5.cjs +0 -16
  418. package/dist/XerticaProvider-BlY2limY.cjs +0 -38
  419. package/dist/XerticaProvider-DDuiIcKo.js +0 -39
  420. package/dist/XerticaProvider-cI9hSs27.cjs +0 -38
  421. package/dist/XerticaProvider-hSwhNQex.js +0 -39
  422. package/dist/alert-dialog-BOje--vD.js +0 -847
  423. package/dist/alert-dialog-BtEuQqrg.cjs +0 -870
  424. package/dist/breadcrumb-CqJ7bHY5.js +0 -161
  425. package/dist/breadcrumb-m9Hb2_XN.cjs +0 -177
  426. package/dist/components/assistant/xertica-assistant/hooks/index.d.ts +0 -6
  427. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-conversations.d.ts +0 -21
  428. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-messages.d.ts +0 -49
  429. package/dist/components/assistant/xertica-assistant/hooks/use-assistant-suggestions.d.ts +0 -16
  430. package/dist/components/blocks/audio-player/AudioPlayer.d.ts +0 -35
  431. package/dist/components/blocks/audio-player/index.d.ts +0 -1
  432. package/dist/components/blocks/document-editor/DocumentEditor.d.ts +0 -26
  433. package/dist/components/blocks/document-editor/index.d.ts +0 -1
  434. package/dist/components/blocks/podcast-player/PodcastPlayer.d.ts +0 -41
  435. package/dist/components/blocks/podcast-player/index.d.ts +0 -1
  436. package/dist/components/ui/chart/parts/chart-dashboard.d.ts +0 -113
  437. package/dist/components/ui/chart/parts/chart-metric.d.ts +0 -118
  438. package/dist/components/ui/chart/parts/chart-primitives.d.ts +0 -101
  439. package/dist/components/ui/chart/parts/chart-shared.d.ts +0 -20
  440. package/dist/components/ui/chart/parts/chart-utils.d.ts +0 -12
  441. package/dist/components/ui/chart/parts/index.d.ts +0 -5
  442. package/dist/dropdown-menu-BDB5CmQs.cjs +0 -247
  443. package/dist/dropdown-menu-DQidbKBD.js +0 -231
  444. package/dist/google-maps-loader-BFWp6VPd.js +0 -287
  445. package/dist/google-maps-loader-BKcdgFbu.cjs +0 -312
  446. package/dist/google-maps-loader-CumCNXeG.js +0 -312
  447. package/dist/google-maps-loader-eS3uQ5TA.cjs +0 -287
  448. package/dist/header-Cgy6vYPk.cjs +0 -731
  449. package/dist/header-DRlT4jgI.js +0 -715
  450. package/dist/header-Dux00SI4.cjs +0 -731
  451. package/dist/header-EkGKXPsD.js +0 -715
  452. package/dist/header-WfEywpyc.cjs +0 -731
  453. package/dist/header-tifNQn2U.js +0 -715
  454. package/dist/index-BhapVLVj.js +0 -8
  455. package/dist/index-D6fxYEY8.cjs +0 -7
  456. package/dist/index-DAIp0_HK.js +0 -8
  457. package/dist/index-DW5tYe26.js +0 -8
  458. package/dist/index-GA__GvnG.cjs +0 -7
  459. package/dist/input-2R4loU86.js +0 -127
  460. package/dist/input-DWANSKGb.cjs +0 -145
  461. package/dist/progress-DPtzoVV8.js +0 -175
  462. package/dist/progress-EeaoqqUs.cjs +0 -191
  463. package/dist/rich-text-editor-0mraWT5y.cjs +0 -2376
  464. package/dist/rich-text-editor-B-IkcPD0.js +0 -2874
  465. package/dist/rich-text-editor-B6jMRLzk.cjs +0 -1939
  466. package/dist/rich-text-editor-B8_oYcIR.js +0 -1730
  467. package/dist/rich-text-editor-B9UbSXNb.js +0 -1203
  468. package/dist/rich-text-editor-BYuRBNBU.js +0 -2373
  469. package/dist/rich-text-editor-Bb9pySTs.cjs +0 -2374
  470. package/dist/rich-text-editor-BcL6L3cm.cjs +0 -2374
  471. package/dist/rich-text-editor-BoVZYtTs.cjs +0 -2391
  472. package/dist/rich-text-editor-Bp3zQqMC.js +0 -2954
  473. package/dist/rich-text-editor-CMgSN_w2.js +0 -1189
  474. package/dist/rich-text-editor-CPV1lEPH.cjs +0 -1748
  475. package/dist/rich-text-editor-CeucBdIv.cjs +0 -2971
  476. package/dist/rich-text-editor-CoKqbCtu.cjs +0 -1799
  477. package/dist/rich-text-editor-Cw56T_mB.js +0 -2356
  478. package/dist/rich-text-editor-Cyt8qs2b.js +0 -1921
  479. package/dist/rich-text-editor-D6H84OcX.cjs +0 -1220
  480. package/dist/rich-text-editor-D76gD-QI.js +0 -2328
  481. package/dist/rich-text-editor-DKkokOnA.js +0 -1781
  482. package/dist/rich-text-editor-DNsdpN64.cjs +0 -2359
  483. package/dist/rich-text-editor-DfG8bCyY.js +0 -2358
  484. package/dist/rich-text-editor-Dxjw31Z4.js +0 -2341
  485. package/dist/rich-text-editor-DzP0Epmb.js +0 -2356
  486. package/dist/rich-text-editor-bRkNoeZY.cjs +0 -2891
  487. package/dist/rich-text-editor-lyYE2ZG5.cjs +0 -1207
  488. package/dist/rich-text-editor-skplNlBM.cjs +0 -2345
  489. package/dist/select-Bkbr0f-Z.cjs +0 -162
  490. package/dist/select-CvIVdX2n.js +0 -145
  491. package/dist/sidebar-CK_0ZQHj.cjs +0 -803
  492. package/dist/sidebar-CUuOvYhK.js +0 -787
  493. package/dist/sidebar-DQj1z3jG.cjs +0 -758
  494. package/dist/sidebar-Djn5syhi.cjs +0 -786
  495. package/dist/sidebar-LluMXfam.js +0 -759
  496. package/dist/sidebar-_rT7rBMk.js +0 -787
  497. package/dist/slider-Bc5Hd0y1.js +0 -56
  498. package/dist/slider-N7hFFj6X.cjs +0 -73
  499. package/dist/tooltip-Ded96neP.cjs +0 -137
  500. package/dist/tooltip-HDOoD2-0.js +0 -120
  501. package/dist/use-audio-player-B31J-aqh.cjs +0 -187
  502. package/dist/use-audio-player-BkmEmj8Q.js +0 -185
  503. package/dist/use-audio-player-CLFTWFW1.cjs +0 -184
  504. package/dist/use-audio-player-CLLn00I6.js +0 -188
  505. package/dist/use-file-upload-BcjEo2S5.js +0 -404
  506. package/dist/use-file-upload-CRJR68Tj.cjs +0 -403
  507. package/dist/use-mobile-B0hNy_Y6.cjs +0 -4303
  508. package/dist/use-mobile-BXuYROXM.js +0 -4202
  509. package/dist/use-mobile-Bbd51ASU.cjs +0 -4392
  510. package/dist/use-mobile-Bk6CX-TC.js +0 -4359
  511. package/dist/use-mobile-BvYdisLP.js +0 -4202
  512. package/dist/use-mobile-BzuxjzNX.cjs +0 -4392
  513. package/dist/use-mobile-CG2-SdXV.cjs +0 -4235
  514. package/dist/use-mobile-CKb5pqTs.js +0 -4269
  515. package/dist/use-mobile-CYuAuGDl.js +0 -4202
  516. package/dist/use-mobile-CaENcqm-.js +0 -4508
  517. package/dist/use-mobile-CbrYgJGJ.js +0 -4203
  518. package/dist/use-mobile-Cd4xPrKq.cjs +0 -46
  519. package/dist/use-mobile-DMOvImGQ.cjs +0 -4542
  520. package/dist/use-mobile-DRB3BQgD.cjs +0 -4235
  521. package/dist/use-mobile-DZvv7QMR.js +0 -4359
  522. package/dist/use-mobile-DdI_TXam.cjs +0 -4235
  523. package/dist/use-mobile-DlceKf8a.js +0 -4359
  524. package/dist/use-mobile-DsOnow1o.cjs +0 -4236
  525. package/dist/use-mobile-Kcj6jSnK.cjs +0 -4392
  526. package/dist/use-mobile-bnKcua_i.js +0 -4202
  527. package/dist/use-mobile-j4w2Jrf1.js +0 -30
  528. package/dist/use-mobile-ncXBeE2z.cjs +0 -4235
  529. package/dist/use-rich-text-editor-DjiddBGv.js +0 -282
  530. package/dist/use-rich-text-editor-lpeswbCs.cjs +0 -281
  531. package/dist/xertica-assistant-BdiZag0h.js +0 -2187
  532. package/dist/xertica-assistant-CrgTb6Hs.cjs +0 -2155
  533. package/dist/xertica-assistant-DCsnQyi5.js +0 -2156
  534. package/dist/xertica-assistant-DUBpmEgo.cjs +0 -2186
  535. package/dist/{rich-text-editor-DgF8s7xW.js → rich-text-editor-BmsjY03B.js} +26 -26
  536. package/dist/{rich-text-editor-mWoaSCE4.cjs → rich-text-editor-GS2kpTAK.cjs} +26 -26
package/dist/index.umd.js CHANGED
@@ -863,114 +863,15 @@ ${colorConfig.map(([key, itemConfig]) => {
863
863
  }
864
864
  );
865
865
  }
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;
866
+ function RichTextEditor({ value, onChange, placeholder, className, actionButton }) {
948
867
  const editorRef = React.useRef(null);
949
868
  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
- };
965
869
  const updateActiveFormats = () => {
966
870
  let formatBlock = "";
967
871
  try {
968
872
  formatBlock = document.queryCommandValue("formatBlock");
969
873
  } catch (e) {
970
874
  }
971
- const selection = window.getSelection();
972
- const anchorNode = selection == null ? void 0 : selection.anchorNode;
973
- const focusNode = selection == null ? void 0 : selection.focusNode;
974
875
  setActiveFormats({
975
876
  bold: document.queryCommandState("bold"),
976
877
  italic: document.queryCommandState("italic"),
@@ -980,7 +881,6 @@ ${colorConfig.map(([key, itemConfig]) => {
980
881
  justifyRight: document.queryCommandState("justifyRight"),
981
882
  insertUnorderedList: document.queryCommandState("insertUnorderedList"),
982
883
  insertOrderedList: document.queryCommandState("insertOrderedList"),
983
- link: !!(findParentTag(anchorNode || null, "A") || findParentTag(focusNode || null, "A")),
984
884
  h1: formatBlock === "h1" || formatBlock === "H1",
985
885
  h2: formatBlock === "h2" || formatBlock === "H2",
986
886
  h3: formatBlock === "h3" || formatBlock === "H3",
@@ -1035,152 +935,7 @@ ${colorConfig.map(([key, itemConfig]) => {
1035
935
  const text = ((_a = editorRef.current) == null ? void 0 : _a.innerText) || "";
1036
936
  return text.trim() ? text.trim().split(/\s+/).length : 0;
1037
937
  };
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: [
938
+ 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", className), children: [
1184
939
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
1185
940
  [contenteditable]:empty:before {
1186
941
  content: attr(data-placeholder);
@@ -1235,11 +990,6 @@ ${colorConfig.map(([key, itemConfig]) => {
1235
990
  margin-bottom: 1rem !important;
1236
991
  line-height: 1.6 !important;
1237
992
  }
1238
- .prose-editor a {
1239
- color: var(--info) !important;
1240
- text-decoration: underline !important;
1241
- cursor: pointer !important;
1242
- }
1243
993
  .prose-editor h1:first-child, .prose-editor h2:first-child, .prose-editor h3:first-child, .prose-editor p:first-child {
1244
994
  margin-top: 0 !important;
1245
995
  }
@@ -1247,239 +997,165 @@ ${colorConfig.map(([key, itemConfig]) => {
1247
997
  outline: none !important;
1248
998
  }
1249
999
  ` }),
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
- ] })
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.jsx(
1002
+ Button,
1003
+ {
1004
+ variant: "ghost",
1005
+ size: "icon",
1006
+ className: "h-8 w-8 text-muted-foreground",
1007
+ onClick: () => execCommand("undo"),
1008
+ title: "Desfazer",
1009
+ "aria-label": "Desfazer",
1010
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Undo, { className: "w-4 h-4" })
1011
+ }
1012
+ ),
1013
+ /* @__PURE__ */ jsxRuntime.jsx(
1014
+ Button,
1015
+ {
1016
+ variant: "ghost",
1017
+ size: "icon",
1018
+ className: "h-8 w-8 text-muted-foreground",
1019
+ onClick: () => execCommand("redo"),
1020
+ title: "Refazer",
1021
+ "aria-label": "Refazer",
1022
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Redo, { className: "w-4 h-4" })
1023
+ }
1024
+ ),
1025
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" }),
1026
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { modal: false, children: [
1027
+ /* @__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: [
1028
+ getCurrentBlockLabel(),
1029
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "w-3 h-3 ml-auto opacity-50 shrink-0" })
1030
+ ] }) }),
1031
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { align: "start", className: "w-[160px]", style: { zIndex: 9999 }, children: [
1032
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "P"), className: "gap-2", children: [
1033
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { className: "w-4 h-4 text-muted-foreground" }),
1034
+ " Parágrafo"
1035
+ ] }),
1036
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "H1"), className: "gap-2", children: [
1037
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heading1, { className: "w-4 h-4 text-muted-foreground" }),
1038
+ " Título 1"
1039
+ ] }),
1040
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "H2"), className: "gap-2", children: [
1041
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heading2, { className: "w-4 h-4 text-muted-foreground" }),
1042
+ " Título 2"
1043
+ ] }),
1044
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onPointerDown: (e) => e.preventDefault(), onClick: () => execCommand("formatBlock", "H3"), className: "gap-2", children: [
1045
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Heading3, { className: "w-4 h-4 text-muted-foreground" }),
1046
+ " Título 3"
1301
1047
  ] })
1302
- ] }),
1303
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" })
1304
- ] }),
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" })
1048
+ ] })
1454
1049
  ] }),
1455
- (allowFormatting || allowHeadings || allowAlignment || allowLists || allowLinks) && /* @__PURE__ */ jsxRuntime.jsx(
1050
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" }),
1051
+ /* @__PURE__ */ jsxRuntime.jsx(
1456
1052
  Button,
1457
1053
  {
1458
1054
  variant: "ghost",
1459
1055
  size: "icon",
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" })
1056
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.bold && "bg-muted text-foreground"),
1057
+ onClick: () => execCommand("bold"),
1058
+ title: "Negrito",
1059
+ "aria-label": "Negrito",
1060
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bold, { className: "w-4 h-4" })
1465
1061
  }
1466
1062
  ),
1467
- allowSearch && /* @__PURE__ */ jsxRuntime.jsx(
1063
+ /* @__PURE__ */ jsxRuntime.jsx(
1468
1064
  Button,
1469
1065
  {
1470
1066
  variant: "ghost",
1471
1067
  size: "icon",
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" })
1068
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.italic && "bg-muted text-foreground"),
1069
+ onClick: () => execCommand("italic"),
1070
+ title: "Itálico",
1071
+ "aria-label": "Itálico",
1072
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Italic, { className: "w-4 h-4" })
1073
+ }
1074
+ ),
1075
+ /* @__PURE__ */ jsxRuntime.jsx(
1076
+ Button,
1077
+ {
1078
+ variant: "ghost",
1079
+ size: "icon",
1080
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.underline && "bg-muted text-foreground"),
1081
+ onClick: () => execCommand("underline"),
1082
+ title: "Sublinhado",
1083
+ "aria-label": "Sublinhado",
1084
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Underline, { className: "w-4 h-4" })
1085
+ }
1086
+ ),
1087
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" }),
1088
+ /* @__PURE__ */ jsxRuntime.jsx(
1089
+ Button,
1090
+ {
1091
+ variant: "ghost",
1092
+ size: "icon",
1093
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.justifyLeft && "bg-muted text-foreground"),
1094
+ onClick: () => execCommand("justifyLeft"),
1095
+ title: "Alinhar à esquerda",
1096
+ "aria-label": "Alinhar à esquerda",
1097
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignLeft, { className: "w-4 h-4" })
1098
+ }
1099
+ ),
1100
+ /* @__PURE__ */ jsxRuntime.jsx(
1101
+ Button,
1102
+ {
1103
+ variant: "ghost",
1104
+ size: "icon",
1105
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.justifyCenter && "bg-muted text-foreground"),
1106
+ onClick: () => execCommand("justifyCenter"),
1107
+ title: "Centralizar",
1108
+ "aria-label": "Centralizar",
1109
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignCenter, { className: "w-4 h-4" })
1110
+ }
1111
+ ),
1112
+ /* @__PURE__ */ jsxRuntime.jsx(
1113
+ Button,
1114
+ {
1115
+ variant: "ghost",
1116
+ size: "icon",
1117
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.justifyRight && "bg-muted text-foreground"),
1118
+ onClick: () => execCommand("justifyRight"),
1119
+ title: "Alinhar à direita",
1120
+ "aria-label": "Alinhar à direita",
1121
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignRight, { className: "w-4 h-4" })
1122
+ }
1123
+ ),
1124
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-6 bg-border mx-1 hidden sm:block" }),
1125
+ /* @__PURE__ */ jsxRuntime.jsx(
1126
+ Button,
1127
+ {
1128
+ variant: "ghost",
1129
+ size: "icon",
1130
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.insertUnorderedList && "bg-muted text-foreground"),
1131
+ onClick: () => execCommand("insertUnorderedList"),
1132
+ title: "Lista com marcadores",
1133
+ "aria-label": "Lista com marcadores",
1134
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "w-4 h-4" })
1135
+ }
1136
+ ),
1137
+ /* @__PURE__ */ jsxRuntime.jsx(
1138
+ Button,
1139
+ {
1140
+ variant: "ghost",
1141
+ size: "icon",
1142
+ className: cn("h-8 w-8 text-muted-foreground", activeFormats.insertOrderedList && "bg-muted text-foreground"),
1143
+ onClick: () => execCommand("insertOrderedList"),
1144
+ title: "Lista numerada",
1145
+ "aria-label": "Lista numerada",
1146
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ListOrdered, { className: "w-4 h-4" })
1147
+ }
1148
+ ),
1149
+ /* @__PURE__ */ jsxRuntime.jsx(
1150
+ Button,
1151
+ {
1152
+ variant: "ghost",
1153
+ size: "icon",
1154
+ className: "h-8 w-8 text-muted-foreground",
1155
+ onClick: () => execCommand("removeFormat"),
1156
+ title: "Limpar formatação",
1157
+ "aria-label": "Limpar formatação",
1158
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Type, { className: "w-4 h-4" })
1483
1159
  }
1484
1160
  ),
1485
1161
  actionButton && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1487,105 +1163,23 @@ ${colorConfig.map(([key, itemConfig]) => {
1487
1163
  actionButton
1488
1164
  ] })
1489
1165
  ] }),
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(
1166
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto p-4 sm:p-8 bg-background scrollbar-thin", children: /* @__PURE__ */ jsxRuntime.jsx(
1554
1167
  "div",
1555
1168
  {
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
- )
1169
+ ref: editorRef,
1170
+ contentEditable: true,
1171
+ onInput: handleInput,
1172
+ onSelect: updateActiveFormats,
1173
+ onFocus: updateActiveFormats,
1174
+ className: "prose-editor min-h-full max-w-none focus:outline-none",
1175
+ "data-placeholder": placeholder
1574
1176
  }
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
- ] })
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
+ getWordCount(),
1181
+ " ",
1182
+ getWordCount() === 1 ? "palavra" : "palavras"
1589
1183
  ] }),
1590
1184
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] sm:text-xs text-muted-foreground/60 italic", children: "Auto-save ativo" })
1591
1185
  ] })
@@ -1687,6 +1281,36 @@ ${colorConfig.map(([key, itemConfig]) => {
1687
1281
  )
1688
1282
  ] });
1689
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
+ ) });
1313
+ }
1690
1314
  function ModernChatInput({
1691
1315
  value,
1692
1316
  onChange,
@@ -3514,10 +3138,10 @@ ${colorConfig.map(([key, itemConfig]) => {
3514
3138
  ) });
3515
3139
  }
3516
3140
  [
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" }) }
3141
+ { id: "rich-1", texto: "Ver exemplo de Gráfico", icon: React.createElement(lucideReact.BarChart3, { className: "w-4 h-4 mr-2" }) },
3142
+ { id: "rich-2", texto: "Ver exemplo de Imagem", icon: React.createElement(lucideReact.ImageIcon, { className: "w-4 h-4 mr-2" }) },
3143
+ { id: "rich-3", texto: "Ver exemplo de Tabela", icon: React.createElement(lucideReact.Table, { className: "w-4 h-4 mr-2" }) },
3144
+ { id: "rich-4", texto: "Ver exemplo de Documento", icon: React.createElement(lucideReact.FileText, { className: "w-4 h-4 mr-2" }) }
3521
3145
  ];
3522
3146
  const gerarResposta = (mensagemUsuario, customResponses) => {
3523
3147
  const mensagemLower = mensagemUsuario.toLowerCase();
@@ -3726,10 +3350,10 @@ Documento finalizado.`
3726
3350
  const fileInputRef = React.useRef(null);
3727
3351
  const audioInputRef = React.useRef(null);
3728
3352
  const defaultSuggestions = [
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" }
3353
+ { id: "1", texto: "Me ajude a criar um documento profissional" },
3354
+ { id: "2", texto: 'Buscar nos meus arquivos por "relatório"' },
3355
+ { id: "3", texto: "Resuma as conversas importantes desta semana" },
3356
+ { id: "4", texto: "Crie um podcast sobre o último projeto" }
3733
3357
  ];
3734
3358
  const sugestoes = propSuggestions ?? defaultSuggestions;
3735
3359
  React.useEffect(() => {
@@ -3886,7 +3510,7 @@ Documento finalizado.`
3886
3510
  const handleSelecionarConversa = (conversaId) => {
3887
3511
  const conversa = conversas.find((c) => c.id === conversaId);
3888
3512
  if (conversa) {
3889
- setMensagens(conversa.messages);
3513
+ setMensagens(conversa.mensagens);
3890
3514
  setConversaAtual(conversaId);
3891
3515
  setAbaSelecionada("chat");
3892
3516
  }
@@ -3894,7 +3518,7 @@ Documento finalizado.`
3894
3518
  const handleToggleFavoritaConversa = (conversaId) => {
3895
3519
  setConversas(
3896
3520
  (prev) => prev.map(
3897
- (conv) => conv.id === conversaId ? { ...conv, isFavorite: !conv.isFavorite } : conv
3521
+ (conv) => conv.id === conversaId ? { ...conv, favorita: !conv.favorita } : conv
3898
3522
  )
3899
3523
  );
3900
3524
  };
@@ -3912,9 +3536,9 @@ Documento finalizado.`
3912
3536
  };
3913
3537
  const handleRichSuggestionClick = (suggestion) => {
3914
3538
  if (onRichAction) {
3915
- onRichAction(suggestion.id, suggestion.text);
3539
+ onRichAction(suggestion.id, suggestion.texto);
3916
3540
  } else {
3917
- handleEnviarMensagem(suggestion.text);
3541
+ handleEnviarMensagem(suggestion.texto);
3918
3542
  }
3919
3543
  setShowMoreSuggestions(false);
3920
3544
  };
@@ -3947,7 +3571,7 @@ Documento finalizado.`
3947
3571
  };
3948
3572
  const conversasFiltradas = conversas.filter((conversa) => {
3949
3573
  if (abaSelecionada === "favoritos") {
3950
- return conversa.isFavorite;
3574
+ return conversa.favorita;
3951
3575
  }
3952
3576
  return true;
3953
3577
  });
@@ -4266,9 +3890,9 @@ Documento finalizado.`
4266
3890
  sugestoes.map((sugestao) => /* @__PURE__ */ jsxRuntime.jsx(
4267
3891
  "button",
4268
3892
  {
4269
- onClick: () => handleEnviarMensagem(sugestao.text),
3893
+ onClick: () => handleEnviarMensagem(sugestao.texto),
4270
3894
  className: "w-full p-3 text-left rounded-[var(--radius-card)] bg-muted text-foreground transition-colors duration-200 hover:bg-muted/80",
4271
- children: sugestao.text
3895
+ children: sugestao.texto
4272
3896
  },
4273
3897
  sugestao.id
4274
3898
  )),
@@ -4293,7 +3917,7 @@ Documento finalizado.`
4293
3917
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
4294
3918
  sugestao.id.includes("chart") && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart3, { className: "w-4 h-4 text-primary" }),
4295
3919
  sugestao.id.includes("table") && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Table, { className: "w-4 h-4 text-primary" }),
4296
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: sugestao.text })
3920
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: sugestao.texto })
4297
3921
  ] })
4298
3922
  },
4299
3923
  sugestao.id
@@ -4748,7 +4372,7 @@ Documento finalizado.`
4748
4372
  ),
4749
4373
  children: [
4750
4374
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-1", children: [
4751
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground truncate flex-1", children: conversa.title }),
4375
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-medium text-foreground truncate flex-1", children: conversa.titulo }),
4752
4376
  /* @__PURE__ */ jsxRuntime.jsx(
4753
4377
  Button,
4754
4378
  {
@@ -4764,14 +4388,14 @@ Documento finalizado.`
4764
4388
  {
4765
4389
  className: cn(
4766
4390
  "w-3 h-3",
4767
- conversa.isFavorite ? "text-destructive fill-current" : "text-muted-foreground"
4391
+ conversa.favorita ? "text-destructive fill-current" : "text-muted-foreground"
4768
4392
  )
4769
4393
  }
4770
4394
  )
4771
4395
  }
4772
4396
  )
4773
4397
  ] }),
4774
- conversa.lastMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground truncate mb-1", children: conversa.lastMessage }),
4398
+ conversa.ultimaMensagem && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground truncate mb-1", children: conversa.ultimaMensagem }),
4775
4399
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: conversa.timestamp })
4776
4400
  ]
4777
4401
  },
@@ -4925,16 +4549,12 @@ Documento finalizado.`
4925
4549
  }
4926
4550
  const GOOGLE_MAPS_LIBRARIES = ["marker", "places", "geometry", "drawing", "maps"];
4927
4551
  const GOOGLE_MAPS_ID = "xertica-google-map-script";
4928
- const __vite_import_meta_env__$2 = {};
4929
4552
  const GoogleMapsContext = React.createContext({
4930
4553
  isLoaded: false,
4931
4554
  loadError: void 0,
4932
4555
  load: () => Promise.resolve()
4933
4556
  });
4934
4557
  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
- }
4938
4558
  if (typeof window === "undefined") return void 0;
4939
4559
  const savedKey = localStorage.getItem("xertica-googlemaps-api-key");
4940
4560
  if (savedKey && savedKey.trim().length > 0) {
@@ -4942,25 +4562,6 @@ Documento finalizado.`
4942
4562
  }
4943
4563
  return void 0;
4944
4564
  }
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
- }
4964
4565
  function isGoogleMapsAlreadyLoaded() {
4965
4566
  var _a, _b;
4966
4567
  if (typeof window === "undefined") return false;
@@ -5170,37 +4771,6 @@ Documento finalizado.`
5170
4771
  ] });
5171
4772
  };
5172
4773
  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
- }
5204
4774
  const Toaster = ({ theme, ...props }) => {
5205
4775
  const [resolvedTheme, setResolvedTheme] = React__namespace.useState(theme);
5206
4776
  React__namespace.useEffect(() => {
@@ -5243,10 +4813,9 @@ Documento finalizado.`
5243
4813
  );
5244
4814
  };
5245
4815
  function XerticaProvider({
5246
- children,
5247
- googleMapsApiKey
4816
+ children
5248
4817
  }) {
5249
- return /* @__PURE__ */ jsxRuntime.jsx(GoogleMapsLoaderProvider, { apiKey: googleMapsApiKey, children: /* @__PURE__ */ jsxRuntime.jsx(LayoutProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipProvider, { children: [
4818
+ return /* @__PURE__ */ jsxRuntime.jsx(GoogleMapsLoaderProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(LayoutProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipProvider, { children: [
5250
4819
  children,
5251
4820
  /* @__PURE__ */ jsxRuntime.jsx(Toaster, { position: "top-right", richColors: true })
5252
4821
  ] }) }) });
@@ -5305,6 +4874,34 @@ Documento finalizado.`
5305
4874
  }
5306
4875
  );
5307
4876
  }
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";
5308
4905
  function XerticaLogo({
5309
4906
  className = "w-auto h-8",
5310
4907
  color,
@@ -6707,7 +6304,7 @@ Documento finalizado.`
6707
6304
  };
6708
6305
  }, [map, layers.bicycling]);
6709
6306
  }
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" };
6307
+ const __vite_import_meta_env__$1 = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
6711
6308
  const DEFAULT_CENTER = { lat: -23.5505, lng: -46.6333 };
6712
6309
  const DEFAULT_ZOOM = 12;
6713
6310
  const MapContent = React.forwardRef(
@@ -6979,7 +6576,7 @@ Documento finalizado.`
6979
6576
  const Map$1 = React.forwardRef(
6980
6577
  (props, ref) => {
6981
6578
  const { isLoaded, loadError } = useGoogleMapsLoader();
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" || "";
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 && void 0 || "";
6983
6580
  const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
6984
6581
  if (isLoaded || isValidKey || loadError) {
6985
6582
  return /* @__PURE__ */ jsxRuntime.jsx(MapContent, { ref, ...props, apiKey: effectiveApiKey });
@@ -7805,25 +7402,21 @@ Documento finalizado.`
7805
7402
  subtitle,
7806
7403
  backHref,
7807
7404
  onBack,
7808
- renderBackLink,
7809
7405
  actions,
7810
- className,
7811
- backLabel = "Back"
7406
+ className
7812
7407
  }) {
7813
- const showBack = !!(backHref || onBack || renderBackLink);
7814
- const icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-5 w-5" });
7815
7408
  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: [
7816
7409
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4", children: [
7817
- showBack && /* @__PURE__ */ jsxRuntime.jsx(
7410
+ (backHref || onBack) && /* @__PURE__ */ jsxRuntime.jsx(
7818
7411
  Button,
7819
7412
  {
7820
7413
  variant: "outline",
7821
7414
  size: "icon",
7822
7415
  className: "h-10 w-10 shrink-0",
7823
7416
  onClick: onBack,
7824
- asChild: !!renderBackLink || !!backHref,
7825
- "aria-label": backLabel,
7826
- children: renderBackLink ? renderBackLink(icon) : backHref ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: backHref, children: icon }) : icon
7417
+ asChild: !!backHref,
7418
+ "aria-label": "Voltar",
7419
+ children: backHref ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: backHref, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-5 w-5" }) }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-5 w-5" })
7827
7420
  }
7828
7421
  ),
7829
7422
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-1", children: [
@@ -11398,7 +10991,7 @@ Documento finalizado.`
11398
10991
  const displayCount = count > max ? `${max}+` : count;
11399
10992
  const shouldShow = count > 0 || showZero;
11400
10993
  if (!shouldShow && !dot) {
11401
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children });
10994
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, children });
11402
10995
  }
11403
10996
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("relative inline-block", className), ...props, children: [
11404
10997
  children,
@@ -11483,7 +11076,7 @@ Documento finalizado.`
11483
11076
  const getTrendIcon = () => {
11484
11077
  if (!trend) return null;
11485
11078
  if (trend.value > 0) {
11486
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4 text-success" });
11079
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { className: "h-4 w-4 text-[rgb(5,150,105)]" });
11487
11080
  } else if (trend.value < 0) {
11488
11081
  return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { className: "h-4 w-4 text-destructive" });
11489
11082
  } else {
@@ -11493,7 +11086,7 @@ Documento finalizado.`
11493
11086
  const getTrendColor = () => {
11494
11087
  if (!trend) return "";
11495
11088
  if (trend.value > 0) {
11496
- return "text-success";
11089
+ return "text-[rgb(5,150,105)]";
11497
11090
  } else if (trend.value < 0) {
11498
11091
  return "text-destructive";
11499
11092
  } else {
@@ -11623,120 +11216,29 @@ Documento finalizado.`
11623
11216
  ));
11624
11217
  TimelineDescription.displayName = "TimelineDescription";
11625
11218
  const TreeView = React__namespace.forwardRef(
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;
11219
+ ({ className, data, onNodeClick, defaultExpanded = [], ...props }, ref) => {
11220
+ const [expanded, setExpanded] = React__namespace.useState(
11221
+ new Set(defaultExpanded)
11222
+ );
11632
11223
  const toggleExpand = (nodeId) => {
11633
11224
  setExpanded((prev) => {
11634
- const next = new Set(prev);
11635
- next.has(nodeId) ? next.delete(nodeId) : next.add(nodeId);
11636
- return next;
11637
- });
11638
- };
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;
11225
+ const newSet = new Set(prev);
11226
+ if (newSet.has(nodeId)) {
11227
+ newSet.delete(nodeId);
11228
+ } else {
11229
+ newSet.add(nodeId);
11726
11230
  }
11727
- }
11231
+ return newSet;
11232
+ });
11728
11233
  };
11729
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("w-full", className), role: "tree", ...props, children: data.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
11234
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("w-full", className), ...props, children: data.map((node) => /* @__PURE__ */ jsxRuntime.jsx(
11730
11235
  TreeNodeComponent,
11731
11236
  {
11732
11237
  node,
11733
11238
  level: 0,
11734
11239
  expanded,
11735
- selectedId: effectiveSelectedId,
11736
11240
  onToggle: toggleExpand,
11737
- onSelect: handleSelect,
11738
- onKeyDown: handleKeyDown,
11739
- nodeRefs
11241
+ onNodeClick
11740
11242
  },
11741
11243
  node.id
11742
11244
  )) });
@@ -11747,59 +11249,43 @@ Documento finalizado.`
11747
11249
  node,
11748
11250
  level,
11749
11251
  expanded,
11750
- selectedId,
11751
11252
  onToggle,
11752
- onSelect,
11753
- onKeyDown,
11754
- nodeRefs
11253
+ onNodeClick
11755
11254
  }) => {
11756
- var _a;
11757
- const hasChildren = !!((_a = node.children) == null ? void 0 : _a.length);
11255
+ const hasChildren = node.children && node.children.length > 0;
11758
11256
  const isExpanded = expanded.has(node.id);
11759
- const isSelected = node.id === selectedId;
11760
11257
  const handleClick = () => {
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);
11258
+ if (hasChildren) {
11259
+ onToggle(node.id);
11260
+ }
11261
+ onNodeClick == null ? void 0 : onNodeClick(node);
11767
11262
  };
11768
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "none", children: [
11263
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11769
11264
  /* @__PURE__ */ jsxRuntime.jsxs(
11770
11265
  "button",
11771
11266
  {
11772
- ref: setRef,
11773
- role: "treeitem",
11774
- "aria-expanded": hasChildren ? isExpanded : void 0,
11775
- "aria-selected": isSelected,
11776
- tabIndex: isSelected ? 0 : -1,
11777
11267
  onClick: handleClick,
11778
- onKeyDown: (e) => onKeyDown(e, node),
11779
11268
  className: cn(
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"
11269
+ "flex w-full items-center gap-2 rounded-[var(--radius)] px-2 py-1.5 text-left transition-colors hover:bg-muted",
11270
+ "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
11783
11271
  ),
11784
11272
  style: { paddingLeft: `${level * 1.5 + 0.5}rem` },
11785
11273
  children: [
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" }),
11274
+ 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" }) }),
11275
+ !hasChildren && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-4" }),
11787
11276
  node.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-muted-foreground", children: node.icon }),
11788
11277
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-foreground", children: node.label })
11789
11278
  ]
11790
11279
  }
11791
11280
  ),
11792
- hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", children: node.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
11281
+ hasChildren && isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { children: node.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
11793
11282
  TreeNodeComponent,
11794
11283
  {
11795
11284
  node: child,
11796
11285
  level: level + 1,
11797
11286
  expanded,
11798
- selectedId,
11799
11287
  onToggle,
11800
- onSelect,
11801
- onKeyDown,
11802
- nodeRefs
11288
+ onNodeClick
11803
11289
  },
11804
11290
  child.id
11805
11291
  )) })
@@ -12071,72 +11557,99 @@ Documento finalizado.`
12071
11557
  }
12072
11558
  );
12073
11559
  }
12074
- const StepperContext = React__namespace.createContext(void 0);
11560
+ const StepperContext = React__namespace.createContext(
11561
+ void 0
11562
+ );
12075
11563
  const useStepper = () => {
12076
11564
  const context = React__namespace.useContext(StepperContext);
12077
- if (!context) throw new Error("useStepper must be used within a Stepper");
11565
+ if (!context) {
11566
+ throw new Error("useStepper must be used within a Stepper");
11567
+ }
12078
11568
  return context;
12079
11569
  };
12080
11570
  const Stepper = React__namespace.forwardRef(
12081
- ({ currentStep, orientation = "horizontal", className, children, ...props }, ref) => {
11571
+ ({ currentStep, className, children, ...props }, ref) => {
12082
11572
  const totalSteps = React__namespace.Children.count(children);
12083
- return /* @__PURE__ */ jsxRuntime.jsx(StepperContext.Provider, { value: { currentStep, totalSteps, orientation }, children: /* @__PURE__ */ jsxRuntime.jsx(
11573
+ return /* @__PURE__ */ jsxRuntime.jsx(StepperContext.Provider, { value: { currentStep, totalSteps }, children: /* @__PURE__ */ jsxRuntime.jsx(
12084
11574
  "div",
12085
11575
  {
12086
11576
  ref,
12087
11577
  className: cn("w-full", className),
12088
11578
  ...props,
12089
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
12090
- orientation === "horizontal" ? "flex items-start justify-between" : "flex flex-col gap-0"
12091
- ), children })
11579
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between", children })
12092
11580
  }
12093
11581
  ) });
12094
11582
  }
12095
11583
  );
12096
11584
  Stepper.displayName = "Stepper";
12097
11585
  const Step = React__namespace.forwardRef(
12098
- ({ step, label, description, error = false, className, ...props }, ref) => {
12099
- const { currentStep, totalSteps, orientation } = useStepper();
11586
+ ({ step, label, description, className, ...props }, ref) => {
11587
+ const { currentStep, totalSteps } = useStepper();
12100
11588
  const isActive = step === currentStep;
12101
- const isCompleted = step < currentStep && !error;
11589
+ const isCompleted = step < currentStep;
12102
11590
  const isFirst = step === 1;
12103
11591
  const isLast = step === totalSteps;
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"
11592
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11593
+ "div",
11594
+ {
11595
+ ref,
11596
+ className: cn("flex flex-1 flex-col items-center", className),
11597
+ ...props,
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
+ }
12110
11652
  );
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
- ] });
12140
11653
  }
12141
11654
  );
12142
11655
  Step.displayName = "Step";
@@ -12148,34 +11661,20 @@ Documento finalizado.`
12148
11661
  maxSize = 5 * 1024 * 1024,
12149
11662
  // 5MB default
12150
11663
  showPreview = true,
12151
- onError,
12152
11664
  accept,
12153
11665
  disabled,
12154
11666
  ...props
12155
11667
  }, ref) => {
12156
11668
  const [files, setFiles] = React__namespace.useState([]);
12157
11669
  const [dragActive, setDragActive] = React__namespace.useState(false);
12158
- const [errorMessage, setErrorMessage] = React__namespace.useState(null);
12159
11670
  const inputRef = React__namespace.useRef(null);
12160
11671
  const handleFiles = (newFiles) => {
12161
11672
  if (!newFiles) return;
12162
- setErrorMessage(null);
12163
11673
  const filesArray = Array.from(newFiles);
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);
11674
+ const validFiles = filesArray.filter((file) => file.size <= maxSize);
11675
+ const updatedFiles = maxFiles === 1 ? validFiles.slice(0, 1) : [...files, ...validFiles].slice(0, maxFiles);
11676
+ setFiles(updatedFiles);
11677
+ onFilesChange == null ? void 0 : onFilesChange(updatedFiles);
12179
11678
  };
12180
11679
  const handleDrag = (e) => {
12181
11680
  e.preventDefault();
@@ -12202,12 +11701,10 @@ Documento finalizado.`
12202
11701
  const updatedFiles = files.filter((_, i) => i !== index);
12203
11702
  setFiles(updatedFiles);
12204
11703
  onFilesChange == null ? void 0 : onFilesChange(updatedFiles);
12205
- if (updatedFiles.length === 0) setErrorMessage(null);
12206
11704
  };
12207
11705
  const openFileDialog = () => {
12208
11706
  var _a;
12209
11707
  if (!disabled) {
12210
- setErrorMessage(null);
12211
11708
  (_a = inputRef.current) == null ? void 0 : _a.click();
12212
11709
  }
12213
11710
  };
@@ -12223,7 +11720,6 @@ Documento finalizado.`
12223
11720
  className: cn(
12224
11721
  "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",
12225
11722
  dragActive && "border-primary bg-primary/5",
12226
- errorMessage && "border-destructive/50",
12227
11723
  disabled && "cursor-not-allowed opacity-50"
12228
11724
  ),
12229
11725
  children: [
@@ -12254,10 +11750,6 @@ Documento finalizado.`
12254
11750
  ]
12255
11751
  }
12256
11752
  ),
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
- ] }),
12261
11753
  showPreview && files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-2", children: files.map((file, index) => /* @__PURE__ */ jsxRuntime.jsxs(
12262
11754
  "div",
12263
11755
  {
@@ -12302,43 +11794,29 @@ Documento finalizado.`
12302
11794
  onChange,
12303
11795
  max = 5,
12304
11796
  readonly = false,
12305
- disabled = false,
12306
11797
  size = "md",
12307
11798
  showValue = false,
12308
- allowHalf = false,
12309
- getAriaLabel,
12310
11799
  ...props
12311
11800
  }, ref) => {
12312
11801
  const [hoverValue, setHoverValue] = React__namespace.useState(null);
12313
- const isInteractive = !readonly && !disabled;
12314
11802
  const sizeStyles = {
12315
11803
  sm: "h-4 w-4",
12316
11804
  md: "h-5 w-5",
12317
11805
  lg: "h-6 w-6"
12318
11806
  };
12319
11807
  const handleClick = (rating) => {
12320
- if (isInteractive) onChange == null ? void 0 : onChange(rating);
11808
+ if (!readonly && onChange) {
11809
+ onChange(rating);
11810
+ }
12321
11811
  };
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 {
11812
+ const handleMouseEnter = (rating) => {
11813
+ if (!readonly) {
12328
11814
  setHoverValue(rating);
12329
11815
  }
12330
11816
  };
12331
11817
  const handleMouseLeave = () => {
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);
11818
+ if (!readonly) {
11819
+ setHoverValue(null);
12342
11820
  }
12343
11821
  };
12344
11822
  const displayValue = hoverValue ?? value;
@@ -12346,45 +11824,40 @@ Documento finalizado.`
12346
11824
  "div",
12347
11825
  {
12348
11826
  ref,
12349
- className: cn("flex items-center gap-1", disabled && "opacity-50", className),
11827
+ className: cn("flex items-center gap-1", className),
12350
11828
  ...props,
12351
11829
  children: [
12352
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", role: "group", "aria-label": "Rating", children: Array.from({ length: max }, (_, index) => {
11830
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: Array.from({ length: max }, (_, index) => {
12353
11831
  const rating = index + 1;
12354
- const isFull = rating <= displayValue;
12355
- const isHalf = allowHalf && !isFull && rating - 0.5 <= displayValue;
12356
- return /* @__PURE__ */ jsxRuntime.jsxs(
11832
+ const isFilled = rating <= displayValue;
11833
+ return /* @__PURE__ */ jsxRuntime.jsx(
12357
11834
  "button",
12358
11835
  {
12359
11836
  type: "button",
12360
- onClick: (e) => handleClickWithHalf(e, rating),
12361
- onMouseMove: (e) => handleMouseMove(e, rating),
11837
+ onClick: () => handleClick(rating),
11838
+ onMouseEnter: () => handleMouseEnter(rating),
12362
11839
  onMouseLeave: handleMouseLeave,
12363
- disabled: readonly || disabled,
12364
- "aria-label": getAriaLabel ? getAriaLabel(rating, max) : `${rating} / ${max}`,
11840
+ disabled: readonly,
11841
+ "aria-label": `${rating} de ${max} estrelas`,
12365
11842
  className: cn(
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"
11843
+ "transition-colors focus:outline-none",
11844
+ !readonly && "cursor-pointer hover:scale-110",
11845
+ readonly && "cursor-default"
12369
11846
  ),
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
- ]
11847
+ children: /* @__PURE__ */ jsxRuntime.jsx(
11848
+ lucideReact.Star,
11849
+ {
11850
+ className: cn(
11851
+ sizeStyles[size],
11852
+ isFilled ? "fill-[rgb(245,158,11)] text-[rgb(245,158,11)]" : "fill-none text-muted-foreground"
11853
+ )
11854
+ }
11855
+ )
12383
11856
  },
12384
11857
  index
12385
11858
  );
12386
11859
  }) }),
12387
- showValue && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-sm text-muted-foreground", children: value % 1 === 0 ? value.toFixed(0) : value.toFixed(1) })
11860
+ showValue && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-muted-foreground", children: value.toFixed(1) })
12388
11861
  ]
12389
11862
  }
12390
11863
  );
@@ -12392,24 +11865,8 @@ Documento finalizado.`
12392
11865
  );
12393
11866
  Rating.displayName = "Rating";
12394
11867
  const Search = React__namespace.forwardRef(
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;
11868
+ ({ className, containerClassName, onSearch, onClear, onChange, size = "md", ...props }, ref) => {
11869
+ const [value, setValue] = React__namespace.useState(props.value || "");
12413
11870
  const sizeClasses = {
12414
11871
  sm: "h-8 px-8 py-1 text-sm",
12415
11872
  md: "h-10 px-10 py-2 text-base",
@@ -12425,38 +11882,35 @@ Documento finalizado.`
12425
11882
  md: "right-3",
12426
11883
  lg: "right-4"
12427
11884
  };
11885
+ React__namespace.useEffect(() => {
11886
+ if (props.value !== void 0) {
11887
+ setValue(props.value);
11888
+ }
11889
+ }, [props.value]);
12428
11890
  const handleChange = (e) => {
12429
11891
  const newValue = e.target.value;
12430
- if (!isControlled) setInternalValue(newValue);
11892
+ setValue(newValue);
12431
11893
  onChange == null ? void 0 : onChange(e);
12432
11894
  onSearch == null ? void 0 : onSearch(newValue);
12433
11895
  };
12434
11896
  const handleClear = () => {
12435
- if (!isControlled) setInternalValue("");
11897
+ setValue("");
12436
11898
  onClear == null ? void 0 : onClear();
12437
11899
  onSearch == null ? void 0 : onSearch("");
12438
11900
  };
12439
11901
  const handleKeyDown = (e) => {
12440
- var _a;
12441
11902
  if (e.key === "Escape") {
12442
11903
  handleClear();
12443
11904
  }
12444
- (_a = props.onKeyDown) == null ? void 0 : _a.call(props, e);
12445
11905
  };
12446
11906
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative w-full", containerClassName), children: [
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
- ),
11907
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: cn("absolute top-1/2 -translate-y-1/2 text-muted-foreground", iconSizeClasses[size]) }),
12454
11908
  /* @__PURE__ */ jsxRuntime.jsx(
12455
11909
  "input",
12456
11910
  {
12457
11911
  ref,
12458
11912
  type: "text",
12459
- value: displayValue,
11913
+ value,
12460
11914
  onChange: handleChange,
12461
11915
  onKeyDown: handleKeyDown,
12462
11916
  className: cn(
@@ -12467,16 +11921,16 @@ Documento finalizado.`
12467
11921
  sizeClasses[size],
12468
11922
  className
12469
11923
  ),
12470
- "aria-label": props.placeholder || searchLabel,
11924
+ "aria-label": props.placeholder || "Buscar",
12471
11925
  ...props
12472
11926
  }
12473
11927
  ),
12474
- displayValue && /* @__PURE__ */ jsxRuntime.jsx(
11928
+ value && /* @__PURE__ */ jsxRuntime.jsx(
12475
11929
  "button",
12476
11930
  {
12477
11931
  type: "button",
12478
11932
  onClick: handleClear,
12479
- "aria-label": clearLabel,
11933
+ "aria-label": "Limpar pesquisa",
12480
11934
  className: cn(
12481
11935
  "absolute top-1/2 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground focus:outline-none",
12482
11936
  clearSizeClasses[size]
@@ -12488,7 +11942,7 @@ Documento finalizado.`
12488
11942
  }
12489
11943
  );
12490
11944
  Search.displayName = "Search";
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" };
11945
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
12492
11946
  const RouteMapContent = React.forwardRef(
12493
11947
  ({ apiKey, ...props }, ref) => {
12494
11948
  const { isLoaded, loadError, load } = useGoogleMapsLoader();
@@ -12665,7 +12119,7 @@ Documento finalizado.`
12665
12119
  const RouteMap = React.forwardRef(
12666
12120
  (props, ref) => {
12667
12121
  const { isLoaded, loadError } = useGoogleMapsLoader();
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" || "";
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__ && void 0 || "";
12669
12123
  const isValidKey = effectiveApiKey && effectiveApiKey !== "YOUR_GOOGLE_MAPS_API_KEY_HERE" && effectiveApiKey.startsWith("AIza");
12670
12124
  if (isLoaded || isValidKey || loadError) {
12671
12125
  return /* @__PURE__ */ jsxRuntime.jsx(RouteMapContent, { ref, ...props, apiKey: effectiveApiKey });
@@ -12712,72 +12166,6 @@ Documento finalizado.`
12712
12166
  }
12713
12167
  );
12714
12168
  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
- }
12781
12169
  const MOBILE_BREAKPOINT = 768;
12782
12170
  function useIsMobile() {
12783
12171
  const [isMobile, setIsMobile] = React__namespace.useState(
@@ -13257,14 +12645,62 @@ Documento finalizado.`
13257
12645
  ),
13258
12646
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex-1 relative overflow-hidden group", enablePadding && "p-2", colorVariant === "primary" ? "bg-primary" : "bg-card"), children })
13259
12647
  ] }),
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") })
12648
+ /* @__PURE__ */ jsxRuntime.jsx(
12649
+ "div",
12650
+ {
12651
+ className: "absolute top-0 left-0 w-2 h-full cursor-ew-resize hover:bg-primary/20 transition-colors",
12652
+ onMouseDown: (e) => handleResizeStart(e, "left")
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
+ )
13268
12704
  ] })
13269
12705
  }
13270
12706
  ) });
@@ -14022,7 +13458,6 @@ Documento finalizado.`
14022
13458
  exports2.AlertDialogTrigger = AlertDialogTrigger;
14023
13459
  exports2.AlertTitle = AlertTitle;
14024
13460
  exports2.AspectRatio = AspectRatio;
14025
- exports2.AssistantChart = AssistantChart;
14026
13461
  exports2.AudioPlayer = AudioPlayer;
14027
13462
  exports2.Avatar = Avatar;
14028
13463
  exports2.AvatarFallback = AvatarFallback;
@@ -14121,11 +13556,6 @@ Documento finalizado.`
14121
13556
  exports2.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
14122
13557
  exports2.DropdownMenuTrigger = DropdownMenuTrigger;
14123
13558
  exports2.Empty = Empty;
14124
- exports2.EmptyAction = EmptyAction;
14125
- exports2.EmptyDescription = EmptyDescription;
14126
- exports2.EmptyIcon = EmptyIcon;
14127
- exports2.EmptyImage = EmptyImage;
14128
- exports2.EmptyTitle = EmptyTitle;
14129
13559
  exports2.FileUpload = FileUpload;
14130
13560
  exports2.FloatingMediaWrapper = FloatingMediaWrapper;
14131
13561
  exports2.Form = Form;
@@ -14198,7 +13628,6 @@ Documento finalizado.`
14198
13628
  exports2.ResizableHandle = ResizableHandle;
14199
13629
  exports2.ResizablePanel = ResizablePanel;
14200
13630
  exports2.ResizablePanelGroup = ResizablePanelGroup;
14201
- exports2.RichTextEditor = RichTextEditor;
14202
13631
  exports2.RouteMap = RouteMap;
14203
13632
  exports2.ScrollArea = ScrollArea;
14204
13633
  exports2.ScrollBar = ScrollBar;
@@ -14223,7 +13652,6 @@ Documento finalizado.`
14223
13652
  exports2.SheetTitle = SheetTitle;
14224
13653
  exports2.SheetTrigger = SheetTrigger;
14225
13654
  exports2.Sidebar = Sidebar;
14226
- exports2.SimpleMap = SimpleMap;
14227
13655
  exports2.Skeleton = Skeleton;
14228
13656
  exports2.Slider = Slider;
14229
13657
  exports2.StatsCard = StatsCard;
@@ -14273,7 +13701,6 @@ Documento finalizado.`
14273
13701
  exports2.generateDemoResponse = gerarResposta;
14274
13702
  exports2.gerarResposta = gerarResposta;
14275
13703
  exports2.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
14276
- exports2.reloadGoogleMaps = reloadGoogleMaps;
14277
13704
  exports2.toggleVariants = toggleVariants;
14278
13705
  exports2.useFormField = useFormField;
14279
13706
  exports2.useGoogleMapsLoader = useGoogleMapsLoader;