cortex-react-components 3.3.0 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/dist/{chunk-Z54HOXSV.mjs → chunk-2254O4YT.mjs} +2 -2
  2. package/dist/{chunk-V6YEUAIH.mjs → chunk-3BYBIUZN.mjs} +3 -3
  3. package/dist/{chunk-XFJPL6FS.mjs → chunk-3IXZB3VP.mjs} +1 -1
  4. package/dist/{chunk-WJTVZ6CB.mjs → chunk-3NXXPFU2.mjs} +1 -1
  5. package/dist/{chunk-CONYNX7Y.mjs → chunk-4HKHDXKK.mjs} +3 -3
  6. package/dist/{chunk-DSVXGGGV.mjs → chunk-54AIO5ED.mjs} +2 -2
  7. package/dist/{chunk-7ZCW4XMR.mjs → chunk-64IBDKCH.mjs} +1 -1
  8. package/dist/{chunk-EJJITIA3.mjs → chunk-65ZDGR46.mjs} +5 -5
  9. package/dist/{chunk-I4MTJN23.mjs → chunk-6A7T3O6T.mjs} +6 -5
  10. package/dist/{chunk-HUZCVQP7.mjs → chunk-7IMTNL53.mjs} +1 -1
  11. package/dist/{chunk-IJ3E6ZXF.mjs → chunk-B2LFNC3C.mjs} +1 -1
  12. package/dist/{chunk-IDMTHUC4.mjs → chunk-B36NGEMF.mjs} +3 -3
  13. package/dist/{chunk-FABRRO2B.mjs → chunk-BAJ7NCAT.mjs} +1 -1
  14. package/dist/{chunk-4JHX6BW6.mjs → chunk-BEGQGEDH.mjs} +1 -1
  15. package/dist/{chunk-36W3BORX.mjs → chunk-BWS5MUG7.mjs} +1 -1
  16. package/dist/{chunk-5NGZXIP7.mjs → chunk-CI625DSA.mjs} +1 -1
  17. package/dist/{chunk-WX5QYPGU.mjs → chunk-CUUAA2TB.mjs} +1 -1
  18. package/dist/{chunk-ETG5N2OG.mjs → chunk-DOIUUDF6.mjs} +1 -1
  19. package/dist/{chunk-SSE3MQDP.mjs → chunk-DST7L2PX.mjs} +3 -3
  20. package/dist/{chunk-UETTBM3J.mjs → chunk-F6NJD6IG.mjs} +1 -1
  21. package/dist/{chunk-L4SNPNYU.mjs → chunk-FBCL4K4A.mjs} +1 -1
  22. package/dist/{chunk-IVOPNDSN.mjs → chunk-G5N5MCLS.mjs} +5 -5
  23. package/dist/{chunk-NQMJXY3N.mjs → chunk-GC7DB2Y5.mjs} +1 -1
  24. package/dist/{chunk-5CQITTLV.mjs → chunk-GMHZ7GGN.mjs} +1 -1
  25. package/dist/{chunk-C3CKYJ2F.mjs → chunk-GZRODHXY.mjs} +1 -1
  26. package/dist/{chunk-SM57JU3T.mjs → chunk-HCVN3YVW.mjs} +5 -5
  27. package/dist/{chunk-SSDRUPMS.mjs → chunk-HWSDSULO.mjs} +183 -36
  28. package/dist/{chunk-QPO45D6F.mjs → chunk-I2MVZVXE.mjs} +1 -1
  29. package/dist/chunk-IC4N2KYF.mjs +401 -0
  30. package/dist/{chunk-GGOGMLBY.mjs → chunk-JKVS2VFG.mjs} +4 -4
  31. package/dist/{chunk-OPJMXB4K.mjs → chunk-K4ZS4W4S.mjs} +2 -2
  32. package/dist/{chunk-Q6CUUDUR.mjs → chunk-LVLYUHSA.mjs} +1 -1
  33. package/dist/{chunk-UDCOG2XL.mjs → chunk-LY4RR7AL.mjs} +1 -1
  34. package/dist/{chunk-QMFGV3M5.mjs → chunk-LZUYY2G6.mjs} +2 -2
  35. package/dist/{chunk-XGHUG2WQ.mjs → chunk-MDG2I4PB.mjs} +1 -1
  36. package/dist/{chunk-YD7Q7IZX.mjs → chunk-MNJ5CMJM.mjs} +1 -1
  37. package/dist/{chunk-YY4VLYYH.mjs → chunk-MOMYX6OH.mjs} +26 -11
  38. package/dist/{chunk-EDYFH3EJ.mjs → chunk-NM7RODDO.mjs} +3 -3
  39. package/dist/{chunk-KOK3VCJZ.mjs → chunk-O5RKEF5N.mjs} +2 -2
  40. package/dist/chunk-PBIUFMQ7.mjs +595 -0
  41. package/dist/{chunk-GTHNG3Q7.mjs → chunk-PPESICX2.mjs} +1 -1
  42. package/dist/{chunk-F7JPOQIC.mjs → chunk-Q54XDKD6.mjs} +1 -1
  43. package/dist/{chunk-LTDXFLCW.mjs → chunk-QM3XSGNV.mjs} +13 -5
  44. package/dist/{chunk-LGGOEYDB.mjs → chunk-QU3TSSIT.mjs} +9 -9
  45. package/dist/{chunk-OCVHSV6Z.mjs → chunk-R4WRE5VN.mjs} +2 -2
  46. package/dist/{chunk-HMVIQFLN.mjs → chunk-S2JSIAMP.mjs} +1 -1
  47. package/dist/{chunk-4JSM5VYZ.mjs → chunk-SAVDOTMQ.mjs} +1 -1
  48. package/dist/{chunk-PE44IHZN.mjs → chunk-SBD4TWK2.mjs} +1 -1
  49. package/dist/{chunk-B7WVGDB6.mjs → chunk-SZJ6XME5.mjs} +1 -1
  50. package/dist/{chunk-URC56DLC.mjs → chunk-T2VDQBFT.mjs} +1 -1
  51. package/dist/{chunk-2D3EN2AX.mjs → chunk-T36HNGWV.mjs} +2 -2
  52. package/dist/{chunk-3BYULUMU.mjs → chunk-T62Q55Y5.mjs} +1 -1
  53. package/dist/{chunk-IBQBZNEA.mjs → chunk-T756T7P5.mjs} +1 -1
  54. package/dist/{chunk-HNBHBFLY.mjs → chunk-TZBPEFJY.mjs} +1 -1
  55. package/dist/{chunk-HQW5M4ND.mjs → chunk-U5XRK325.mjs} +1 -1
  56. package/dist/{chunk-4P5Q6UXF.mjs → chunk-UBFOKMYD.mjs} +5 -5
  57. package/dist/{chunk-6NRBLKM4.mjs → chunk-UM7KTWAX.mjs} +2 -2
  58. package/dist/{chunk-E5LGE3IW.mjs → chunk-W73LGNTH.mjs} +1 -1
  59. package/dist/{chunk-QETXXFRW.mjs → chunk-WNGLLRYA.mjs} +1 -1
  60. package/dist/{chunk-NVSA5BFC.mjs → chunk-XP74JZNW.mjs} +3 -3
  61. package/dist/{chunk-OXP3LJ53.mjs → chunk-XT7I7SJB.mjs} +4 -4
  62. package/dist/{chunk-JFXWP3RQ.mjs → chunk-Y7B7YO6Q.mjs} +1 -1
  63. package/dist/{chunk-XZFMQXYJ.mjs → chunk-ZD5DKC5T.mjs} +1 -1
  64. package/dist/{chunk-EC5I4CIO.mjs → chunk-ZJ5SRNYD.mjs} +1 -1
  65. package/dist/{chunk-LM4J7254.mjs → chunk-ZSGXRIK7.mjs} +7 -7
  66. package/dist/{chunk-MZVEK6A5.mjs → chunk-ZZQWZWMG.mjs} +19 -19
  67. package/dist/components/AdvancedComponents/AppSidebar.d.ts +1 -1
  68. package/dist/components/AdvancedComponents/AppSidebar.js +481 -302
  69. package/dist/components/AdvancedComponents/AppSidebar.mjs +4 -4
  70. package/dist/components/AdvancedComponents/index.js +481 -302
  71. package/dist/components/AdvancedComponents/index.mjs +4 -4
  72. package/dist/components/Blocks/Banner.mjs +6 -6
  73. package/dist/components/Blocks/CallToAction.mjs +6 -6
  74. package/dist/components/Blocks/CollapsibleArea.mjs +7 -7
  75. package/dist/components/Blocks/Content.mjs +7 -7
  76. package/dist/components/Blocks/FeaturesBlock.mjs +6 -6
  77. package/dist/components/Blocks/RelatedPosts.mjs +7 -7
  78. package/dist/components/Blocks/RenderBlocks.mjs +9 -9
  79. package/dist/components/Blocks/ReusableContentBlock.mjs +9 -9
  80. package/dist/components/Blocks/index.mjs +15 -15
  81. package/dist/components/CRM/CogeBoard.js +1 -1
  82. package/dist/components/CRM/CogeBoard.mjs +3 -3
  83. package/dist/components/CRM/DealDetails.js +1 -1
  84. package/dist/components/CRM/DealDetails.mjs +2 -2
  85. package/dist/components/CRM/KanbanBoard.js +1 -1
  86. package/dist/components/CRM/KanbanBoard.mjs +3 -3
  87. package/dist/components/CRM/NewDealForm.js +1 -1
  88. package/dist/components/CRM/NewDealForm.mjs +2 -2
  89. package/dist/components/CRM/index.js +1 -1
  90. package/dist/components/CRM/index.mjs +8 -8
  91. package/dist/components/Cards/ContentCard.mjs +6 -6
  92. package/dist/components/Cards/FeatureCard.mjs +6 -6
  93. package/dist/components/Cards/Image.js +1 -1
  94. package/dist/components/Cards/Image.mjs +2 -2
  95. package/dist/components/Cards/ImageProxy.js +1 -1
  96. package/dist/components/Cards/ImageProxy.mjs +2 -2
  97. package/dist/components/Cards/index.js +1 -1
  98. package/dist/components/Cards/index.mjs +12 -12
  99. package/dist/components/Chat/ChatInterface.mjs +11 -11
  100. package/dist/components/Chat/CopilotInterface.d.ts +1 -1
  101. package/dist/components/Chat/CopilotInterface.js +528 -331
  102. package/dist/components/Chat/CopilotInterface.mjs +17 -17
  103. package/dist/components/Chat/PartTypes/MessageHandler.mjs +9 -9
  104. package/dist/components/Chat/PartTypes/index.mjs +11 -11
  105. package/dist/components/Chat/chat-session-sidebar.d.ts +1 -1
  106. package/dist/components/Chat/demo-long-messages.js +528 -331
  107. package/dist/components/Chat/demo-long-messages.mjs +17 -17
  108. package/dist/components/Chat/demo-tests.js +528 -331
  109. package/dist/components/Chat/demo-tests.mjs +17 -17
  110. package/dist/components/Chat/demo.js +528 -331
  111. package/dist/components/Chat/demo.mjs +17 -17
  112. package/dist/components/Chat/example-usage.js +528 -331
  113. package/dist/components/Chat/example-usage.mjs +18 -18
  114. package/dist/components/Chat/example-with-vercel-ai.js +528 -331
  115. package/dist/components/Chat/example-with-vercel-ai.mjs +17 -17
  116. package/dist/components/Chat/index.js +528 -331
  117. package/dist/components/Chat/index.mjs +25 -25
  118. package/dist/components/DigitalColleagues/Views/TeamsIndexView.d.ts +1 -9
  119. package/dist/components/DigitalColleagues/Views/TeamsIndexView.js +23 -28
  120. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +5 -7
  121. package/dist/components/DigitalColleagues/index.d.ts +0 -18
  122. package/dist/components/DigitalColleagues/index.js +0 -16754
  123. package/dist/components/DigitalColleagues/test-data.d.ts +1 -112
  124. package/dist/components/DigitalColleagues/test-data.js +482 -308
  125. package/dist/components/DigitalColleagues/test-data.mjs +1 -5
  126. package/dist/components/Foundry/Knowledge/add-knowledge-modal.js +1 -1
  127. package/dist/components/Foundry/Knowledge/add-knowledge-modal.mjs +3 -3
  128. package/dist/components/Foundry/Knowledge/add-team-context.js +1 -1
  129. package/dist/components/Foundry/Knowledge/add-team-context.mjs +2 -2
  130. package/dist/components/Foundry/Knowledge/manage-team-context.js +1 -1
  131. package/dist/components/Foundry/Knowledge/manage-team-context.mjs +2 -2
  132. package/dist/components/Foundry/MainPage.mjs +3 -3
  133. package/dist/components/Foundry/ManagementSidebar.d.ts +2 -2
  134. package/dist/components/Foundry/ManagementSidebar.js +12 -4
  135. package/dist/components/Foundry/ManagementSidebar.mjs +1 -1
  136. package/dist/components/Foundry/Pages/dashboardpage.js +1424 -2040
  137. package/dist/components/Foundry/Pages/dashboardpage.mjs +25 -26
  138. package/dist/components/Foundry/RichText/index.js +1 -1
  139. package/dist/components/Foundry/RichText/index.mjs +5 -5
  140. package/dist/components/Foundry/RichText/plugins/image-plugin.js +1 -1
  141. package/dist/components/Foundry/RichText/plugins/image-plugin.mjs +2 -2
  142. package/dist/components/Foundry/RichText/plugins/toolbar-plugin.js +1 -1
  143. package/dist/components/Foundry/RichText/plugins/toolbar-plugin.mjs +4 -4
  144. package/dist/components/Foundry/Views/ColleaguesView.js +5 -4
  145. package/dist/components/Foundry/Views/ColleaguesView.mjs +3 -3
  146. package/dist/components/Foundry/Views/KnowledgeView.js +1 -1
  147. package/dist/components/Foundry/Views/KnowledgeView.mjs +12 -12
  148. package/dist/components/Foundry/Views/TeamsIndexView.js +6 -5
  149. package/dist/components/Foundry/Views/TeamsIndexView.mjs +5 -5
  150. package/dist/components/Foundry/Views/index.js +1352 -787
  151. package/dist/components/Foundry/Views/index.mjs +50 -49
  152. package/dist/components/{.archive → Foundry}/app-card.d.ts +1 -1
  153. package/dist/components/{DigitalColleagues/colleague-type-selection.js → Foundry/app-card.js} +89 -117
  154. package/dist/components/{DigitalColleagues/colleague-card.mjs → Foundry/app-card.mjs} +4 -5
  155. package/dist/components/Foundry/document-edit.js +1 -1
  156. package/dist/components/Foundry/document-edit.mjs +6 -6
  157. package/dist/components/Foundry/document-preview-examples.js +1 -1
  158. package/dist/components/Foundry/document-preview-examples.mjs +7 -7
  159. package/dist/components/Foundry/document-preview.js +1 -1
  160. package/dist/components/Foundry/document-preview.mjs +7 -7
  161. package/dist/components/Foundry/file-edit.js +1 -1
  162. package/dist/components/Foundry/file-edit.mjs +7 -7
  163. package/dist/components/Foundry/foundary-layout.js +481 -302
  164. package/dist/components/Foundry/foundary-layout.mjs +5 -5
  165. package/dist/components/Foundry/index.js +2748 -2868
  166. package/dist/components/Foundry/index.mjs +78 -79
  167. package/dist/components/Foundry/knowledge-browser.js +1 -1
  168. package/dist/components/Foundry/knowledge-browser.mjs +8 -8
  169. package/dist/components/Foundry/types.d.ts +26 -0
  170. package/dist/components/HeaderFooter/SectionHeading.mjs +7 -7
  171. package/dist/components/HeaderFooter/index.mjs +5 -5
  172. package/dist/components/Heros/DashboardHero/DashboardHero.js +5 -4
  173. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +2 -2
  174. package/dist/components/Heros/DashboardHero/index.js +5 -4
  175. package/dist/components/Heros/DashboardHero/index.mjs +2 -2
  176. package/dist/components/Heros/HighImpact/index.mjs +7 -7
  177. package/dist/components/Heros/LowImpact/index.mjs +7 -7
  178. package/dist/components/Heros/MediumImpact/index.mjs +7 -7
  179. package/dist/components/Heros/PostHero/index.mjs +2 -2
  180. package/dist/components/Heros/RenderHero.mjs +10 -10
  181. package/dist/components/Heros/index.js +5 -4
  182. package/dist/components/Heros/index.mjs +15 -15
  183. package/dist/components/Layouts/OutputHeaderFooter.mjs +7 -7
  184. package/dist/components/Layouts/Print.mjs +11 -11
  185. package/dist/components/Layouts/SlideShow.mjs +13 -13
  186. package/dist/components/Layouts/index.mjs +17 -17
  187. package/dist/components/Payload/RichText/index.mjs +6 -6
  188. package/dist/components/Payload/RichText/serialize.mjs +6 -6
  189. package/dist/components/Payload/index.mjs +6 -6
  190. package/dist/components/Projects/AddEpicModal.js +1 -1
  191. package/dist/components/Projects/AddEpicModal.mjs +2 -2
  192. package/dist/components/Projects/AddFileModal.js +1 -1
  193. package/dist/components/Projects/AddFileModal.mjs +2 -2
  194. package/dist/components/Projects/AddSprintModal.js +1 -1
  195. package/dist/components/Projects/AddSprintModal.mjs +2 -2
  196. package/dist/components/Projects/AddTaskModal.js +1 -1
  197. package/dist/components/Projects/AddTaskModal.mjs +2 -2
  198. package/dist/components/Projects/EpicFilter.d.ts +6 -2
  199. package/dist/components/Projects/EpicFilter.js +6 -6
  200. package/dist/components/Projects/EpicFilter.mjs +6 -6
  201. package/dist/components/Projects/EpicsView.d.ts +12 -2
  202. package/dist/components/Projects/EpicsView.js +3980 -736
  203. package/dist/components/Projects/EpicsView.mjs +48 -6
  204. package/dist/components/Projects/FileView.js +6 -5
  205. package/dist/components/Projects/FileView.mjs +12 -12
  206. package/dist/components/Projects/GanttView.d.ts +13 -0
  207. package/dist/components/{DigitalColleagues/colleague-card.js → Projects/GanttView.js} +559 -260
  208. package/dist/components/{DigitalColleagues/digital-colleague-clone.mjs → Projects/GanttView.mjs} +7 -6
  209. package/dist/components/Projects/KanbanBoardView.js +6 -5
  210. package/dist/components/Projects/KanbanBoardView.mjs +17 -17
  211. package/dist/components/Projects/KanbanColumn.d.ts +1 -1
  212. package/dist/components/Projects/PlanningView.js +6 -5
  213. package/dist/components/Projects/PlanningView.mjs +5 -5
  214. package/dist/components/Projects/ProjectPage.d.ts +2 -2
  215. package/dist/components/Projects/ProjectPage.js +1727 -966
  216. package/dist/components/Projects/ProjectPage.mjs +30 -29
  217. package/dist/components/Projects/ProjectView.d.ts +1 -1
  218. package/dist/components/Projects/ProjectView.js +1209 -644
  219. package/dist/components/Projects/ProjectView.mjs +25 -24
  220. package/dist/components/Projects/ProjectsIndexView.js +6 -5
  221. package/dist/components/Projects/ProjectsIndexView.mjs +4 -4
  222. package/dist/components/Projects/SprintBoardView.d.ts +3 -0
  223. package/dist/components/Projects/SprintBoardView.js +252 -110
  224. package/dist/components/Projects/SprintBoardView.mjs +18 -18
  225. package/dist/components/Projects/TaskDetailsModal.js +1 -1
  226. package/dist/components/Projects/TaskDetailsModal.mjs +11 -11
  227. package/dist/components/Projects/TasksView.js +6 -5
  228. package/dist/components/Projects/TasksView.mjs +4 -4
  229. package/dist/components/Projects/business-unit-switcher.d.ts +1 -1
  230. package/dist/components/Projects/business-units.d.ts +1 -1
  231. package/dist/components/Projects/file-list.js +1 -1
  232. package/dist/components/Projects/file-list.mjs +8 -8
  233. package/dist/components/Projects/index.js +538 -231
  234. package/dist/components/Projects/index.mjs +23 -23
  235. package/dist/components/Projects/project-card.d.ts +1 -1
  236. package/dist/components/Projects/project-form.d.ts +1 -1
  237. package/dist/components/Projects/team-card.d.ts +1 -1
  238. package/dist/components/Projects/team-switcher-bar.d.ts +1 -1
  239. package/dist/components/Projects/test-data.d.ts +448 -29
  240. package/dist/components/dc-temp/dashboard-integration-example.js +498 -326
  241. package/dist/components/dc-temp/dashboard-integration-example.mjs +7 -7
  242. package/dist/components/dc-temp/index.d.ts +3 -3
  243. package/dist/components/dc-temp/index.js +3746 -2980
  244. package/dist/components/dc-temp/index.mjs +24 -22
  245. package/dist/components/dc-temp/mock-data.d.ts +1 -1
  246. package/dist/components/index.js +4129 -4210
  247. package/dist/components/index.mjs +174 -176
  248. package/dist/components/ui/command.js +1 -1
  249. package/dist/components/ui/command.mjs +2 -2
  250. package/dist/components/ui/dialog.js +1 -1
  251. package/dist/components/ui/dialog.mjs +1 -1
  252. package/dist/components/ui/index.js +1 -1
  253. package/dist/components/ui/index.mjs +2 -2
  254. package/dist/decorators/Intranet.css +54 -14
  255. package/dist/decorators/Intranet.mjs +103 -105
  256. package/dist/globals.css +54 -14
  257. package/dist/hooks/use-local-storage.d.ts +2 -1
  258. package/dist/hooks/use-local-storage.js +5 -4
  259. package/dist/hooks/use-local-storage.mjs +1 -1
  260. package/dist/index.js +4125 -4206
  261. package/dist/index.mjs +185 -187
  262. package/dist/metafile-cjs.json +1 -1
  263. package/dist/metafile-esm.json +1 -1
  264. package/dist/pages/Blog.mjs +11 -11
  265. package/dist/pages/Documentation.mjs +3 -3
  266. package/dist/pages/IndexPage.mjs +14 -14
  267. package/dist/pages/Intranet.mjs +1 -1
  268. package/dist/pages/LandingPage.mjs +113 -115
  269. package/dist/pages/Page.mjs +15 -15
  270. package/dist/pages/Publish.mjs +104 -106
  271. package/dist/pages/Website.mjs +18 -18
  272. package/dist/sections/AboutSection.mjs +8 -8
  273. package/dist/sections/BlogDetail.mjs +7 -7
  274. package/dist/sections/BlogList.mjs +8 -8
  275. package/dist/sections/ContactSection.mjs +8 -8
  276. package/dist/sections/PageSections.mjs +113 -115
  277. package/dist/sections/PricingSection.mjs +8 -8
  278. package/dist/sections/ServiceDetail.mjs +7 -7
  279. package/dist/sections/ServiceDetailSection.mjs +7 -7
  280. package/dist/sections/ServiceSection.mjs +104 -106
  281. package/dist/sections/index.mjs +113 -115
  282. package/package.json +5 -2
  283. package/dist/chunk-5MMSWFVA.mjs +0 -364
  284. package/dist/chunk-7TDXZ32Q.mjs +0 -197
  285. package/dist/chunk-APXXTGT4.mjs +0 -424
  286. package/dist/chunk-BZENEU5C.mjs +0 -160
  287. package/dist/chunk-C444TUVA.mjs +0 -306
  288. package/dist/chunk-CNQTT5P3.mjs +0 -276
  289. package/dist/chunk-CQKCEXF2.mjs +0 -82
  290. package/dist/chunk-EKQB7NJA.mjs +0 -194
  291. package/dist/chunk-G4WW3ZTX.mjs +0 -1063
  292. package/dist/chunk-IWG2URAU.mjs +0 -74
  293. package/dist/chunk-IWSATDRG.mjs +0 -118
  294. package/dist/chunk-JRNDRMIC.mjs +0 -73
  295. package/dist/chunk-K2C4VMGF.mjs +0 -121
  296. package/dist/chunk-LQQ6C7FN.mjs +0 -365
  297. package/dist/chunk-M6ELOAGS.mjs +0 -136
  298. package/dist/chunk-NAUBZM7P.mjs +0 -183
  299. package/dist/chunk-NHDPHK6D.mjs +0 -72
  300. package/dist/chunk-R5MJWISX.mjs +0 -194
  301. package/dist/chunk-RKYMAFRJ.mjs +0 -92
  302. package/dist/chunk-SZBUXY6L.mjs +0 -121
  303. package/dist/chunk-VY6L37RQ.mjs +0 -103
  304. package/dist/chunk-X6UI73UN.mjs +0 -262
  305. package/dist/components/DigitalColleagues/AppSidebarLeft.d.ts +0 -47
  306. package/dist/components/DigitalColleagues/AppSidebarLeft.js +0 -3407
  307. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +0 -23
  308. package/dist/components/DigitalColleagues/DashboardHeader.d.ts +0 -8
  309. package/dist/components/DigitalColleagues/DashboardHeader.js +0 -2756
  310. package/dist/components/DigitalColleagues/DashboardHeader.mjs +0 -15
  311. package/dist/components/DigitalColleagues/DigitalColleageusLayout.css +0 -917
  312. package/dist/components/DigitalColleagues/DigitalColleageusLayout.d.ts +0 -28
  313. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +0 -4417
  314. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +0 -31
  315. package/dist/components/DigitalColleagues/MainPage.css +0 -917
  316. package/dist/components/DigitalColleagues/MainPage.d.ts +0 -3
  317. package/dist/components/DigitalColleagues/MainPage.js +0 -4080
  318. package/dist/components/DigitalColleagues/MainPage.mjs +0 -46
  319. package/dist/components/DigitalColleagues/ManagementSidebar.d.ts +0 -8
  320. package/dist/components/DigitalColleagues/ManagementSidebar.js +0 -99
  321. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +0 -9
  322. package/dist/components/DigitalColleagues/Pages/dashboardpage.css +0 -917
  323. package/dist/components/DigitalColleagues/Pages/dashboardpage.d.ts +0 -18
  324. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +0 -8514
  325. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +0 -78
  326. package/dist/components/DigitalColleagues/README-document-edit.js +0 -2
  327. package/dist/components/DigitalColleagues/README-document-edit.mjs +0 -7
  328. package/dist/components/DigitalColleagues/README-document-preview.js +0 -2
  329. package/dist/components/DigitalColleagues/README-document-preview.mjs +0 -7
  330. package/dist/components/DigitalColleagues/SearchableSelect.css +0 -917
  331. package/dist/components/DigitalColleagues/SearchableSelect.d.ts +0 -16
  332. package/dist/components/DigitalColleagues/SearchableSelect.js +0 -2745
  333. package/dist/components/DigitalColleagues/SearchableSelect.mjs +0 -16
  334. package/dist/components/DigitalColleagues/Views/ColleaguesView.css +0 -917
  335. package/dist/components/DigitalColleagues/Views/ColleaguesView.d.ts +0 -14
  336. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +0 -3795
  337. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +0 -28
  338. package/dist/components/DigitalColleagues/Views/KnowledgeView.css +0 -917
  339. package/dist/components/DigitalColleagues/Views/KnowledgeView.d.ts +0 -11
  340. package/dist/components/DigitalColleagues/Views/KnowledgeView.docs.js +0 -2
  341. package/dist/components/DigitalColleagues/Views/KnowledgeView.docs.mjs +0 -7
  342. package/dist/components/DigitalColleagues/Views/KnowledgeView.js +0 -3935
  343. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +0 -26
  344. package/dist/components/DigitalColleagues/Views/index.css +0 -917
  345. package/dist/components/DigitalColleagues/Views/index.d.ts +0 -7
  346. package/dist/components/DigitalColleagues/Views/index.js +0 -12284
  347. package/dist/components/DigitalColleagues/Views/index.mjs +0 -114
  348. package/dist/components/DigitalColleagues/colleague-card.css +0 -917
  349. package/dist/components/DigitalColleagues/colleague-card.d.ts +0 -12
  350. package/dist/components/DigitalColleagues/colleague-form.css +0 -917
  351. package/dist/components/DigitalColleagues/colleague-form.d.ts +0 -14
  352. package/dist/components/DigitalColleagues/colleague-form.js +0 -3086
  353. package/dist/components/DigitalColleagues/colleague-form.mjs +0 -22
  354. package/dist/components/DigitalColleagues/colleague-type-selection.css +0 -917
  355. package/dist/components/DigitalColleagues/colleague-type-selection.d.ts +0 -7
  356. package/dist/components/DigitalColleagues/colleague-type-selection.mjs +0 -16
  357. package/dist/components/DigitalColleagues/digital-colleague-clone.css +0 -917
  358. package/dist/components/DigitalColleagues/digital-colleague-clone.d.ts +0 -9
  359. package/dist/components/DigitalColleagues/digital-colleague-clone.js +0 -2828
  360. package/dist/components/DigitalColleagues/digital-colleague-options.css +0 -917
  361. package/dist/components/DigitalColleagues/digital-colleague-options.d.ts +0 -7
  362. package/dist/components/DigitalColleagues/digital-colleague-options.js +0 -2697
  363. package/dist/components/DigitalColleagues/digital-colleague-options.mjs +0 -16
  364. package/dist/components/DigitalColleagues/document-edit.css +0 -917
  365. package/dist/components/DigitalColleagues/document-edit.d.ts +0 -10
  366. package/dist/components/DigitalColleagues/document-edit.js +0 -3112
  367. package/dist/components/DigitalColleagues/document-edit.mjs +0 -20
  368. package/dist/components/DigitalColleagues/document-preview-examples.css +0 -917
  369. package/dist/components/DigitalColleagues/document-preview-examples.d.ts +0 -12
  370. package/dist/components/DigitalColleagues/document-preview-examples.js +0 -3433
  371. package/dist/components/DigitalColleagues/document-preview-examples.mjs +0 -151
  372. package/dist/components/DigitalColleagues/document-preview.css +0 -917
  373. package/dist/components/DigitalColleagues/document-preview.d.ts +0 -18
  374. package/dist/components/DigitalColleagues/document-preview.js +0 -3296
  375. package/dist/components/DigitalColleagues/document-preview.mjs +0 -21
  376. package/dist/components/DigitalColleagues/index.css +0 -917
  377. package/dist/components/DigitalColleagues/index.mjs +0 -200
  378. package/dist/components/DigitalColleagues/knowledge-browser.css +0 -917
  379. package/dist/components/DigitalColleagues/knowledge-browser.d.ts +0 -13
  380. package/dist/components/DigitalColleagues/knowledge-browser.js +0 -3581
  381. package/dist/components/DigitalColleagues/knowledge-browser.mjs +0 -23
  382. package/dist/components/DigitalColleagues/knowledge-search.css +0 -917
  383. package/dist/components/DigitalColleagues/knowledge-search.d.ts +0 -12
  384. package/dist/components/DigitalColleagues/knowledge-search.js +0 -2819
  385. package/dist/components/DigitalColleagues/knowledge-search.mjs +0 -20
  386. package/dist/components/DigitalColleagues/team-form.css +0 -917
  387. package/dist/components/DigitalColleagues/team-form.d.ts +0 -24
  388. package/dist/components/DigitalColleagues/team-form.js +0 -2836
  389. package/dist/components/DigitalColleagues/team-form.mjs +0 -20
  390. package/dist/components/DigitalColleagues/types.d.ts +0 -289
  391. package/dist/components/DigitalColleagues/types.js +0 -18
  392. package/dist/{chunk-RFQKQLNT.mjs → chunk-JJDC25TG.mjs} +3 -3
  393. package/dist/{chunk-GZGWWPCP.mjs → chunk-L666B5DN.mjs} +12 -12
  394. /package/dist/components/{DigitalColleagues/AppSidebarLeft.css → Foundry/app-card.css} +0 -0
  395. /package/dist/components/{DigitalColleagues/DashboardHeader.css → Projects/GanttView.css} +0 -0
@@ -1,3581 +0,0 @@
1
- "use client";
2
- "use strict";
3
- 'use client'
4
-
5
- "use strict";
6
- "use client";
7
- var __create = Object.create;
8
- var __defProp = Object.defineProperty;
9
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
10
- var __getOwnPropNames = Object.getOwnPropertyNames;
11
- var __getProtoOf = Object.getPrototypeOf;
12
- var __hasOwnProp = Object.prototype.hasOwnProperty;
13
- var __export = (target, all) => {
14
- for (var name in all)
15
- __defProp(target, name, { get: all[name], enumerable: true });
16
- };
17
- var __copyProps = (to, from, except, desc) => {
18
- if (from && typeof from === "object" || typeof from === "function") {
19
- for (let key of __getOwnPropNames(from))
20
- if (!__hasOwnProp.call(to, key) && key !== except)
21
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
- }
23
- return to;
24
- };
25
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
- // If the importer is in node compatibility mode or this is not an ESM
27
- // file that has been converted to a CommonJS file using a Babel-
28
- // compatible transform (i.e. "__esModule" has not been set), then set
29
- // "default" to the CommonJS "module.exports" for node compatibility.
30
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
- mod
32
- ));
33
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
-
35
- // src/components/DigitalColleagues/knowledge-browser.tsx
36
- var knowledge_browser_exports = {};
37
- __export(knowledge_browser_exports, {
38
- KnowledgeBrowser: () => KnowledgeBrowser
39
- });
40
- module.exports = __toCommonJS(knowledge_browser_exports);
41
- var import_react6 = require("motion/react");
42
- var import_lucide_react5 = require("lucide-react");
43
- var import_react7 = require("react");
44
-
45
- // src/components/ui/input.tsx
46
- var React = __toESM(require("react"));
47
-
48
- // src/utils/cn.ts
49
- var import_clsx = require("clsx");
50
-
51
- // node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
52
- var CLASS_PART_SEPARATOR = "-";
53
- var createClassGroupUtils = (config) => {
54
- const classMap = createClassMap(config);
55
- const {
56
- conflictingClassGroups,
57
- conflictingClassGroupModifiers
58
- } = config;
59
- const getClassGroupId = (className) => {
60
- const classParts = className.split(CLASS_PART_SEPARATOR);
61
- if (classParts[0] === "" && classParts.length !== 1) {
62
- classParts.shift();
63
- }
64
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
65
- };
66
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
67
- const conflicts = conflictingClassGroups[classGroupId] || [];
68
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
69
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
70
- }
71
- return conflicts;
72
- };
73
- return {
74
- getClassGroupId,
75
- getConflictingClassGroupIds
76
- };
77
- };
78
- var getGroupRecursive = (classParts, classPartObject) => {
79
- if (classParts.length === 0) {
80
- return classPartObject.classGroupId;
81
- }
82
- const currentClassPart = classParts[0];
83
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
84
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
85
- if (classGroupFromNextClassPart) {
86
- return classGroupFromNextClassPart;
87
- }
88
- if (classPartObject.validators.length === 0) {
89
- return void 0;
90
- }
91
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
92
- return classPartObject.validators.find(({
93
- validator
94
- }) => validator(classRest))?.classGroupId;
95
- };
96
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
97
- var getGroupIdForArbitraryProperty = (className) => {
98
- if (arbitraryPropertyRegex.test(className)) {
99
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
100
- const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
101
- if (property) {
102
- return "arbitrary.." + property;
103
- }
104
- }
105
- };
106
- var createClassMap = (config) => {
107
- const {
108
- theme,
109
- prefix
110
- } = config;
111
- const classMap = {
112
- nextPart: /* @__PURE__ */ new Map(),
113
- validators: []
114
- };
115
- const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
116
- prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
117
- processClassesRecursively(classGroup, classMap, classGroupId, theme);
118
- });
119
- return classMap;
120
- };
121
- var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
122
- classGroup.forEach((classDefinition) => {
123
- if (typeof classDefinition === "string") {
124
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
125
- classPartObjectToEdit.classGroupId = classGroupId;
126
- return;
127
- }
128
- if (typeof classDefinition === "function") {
129
- if (isThemeGetter(classDefinition)) {
130
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
131
- return;
132
- }
133
- classPartObject.validators.push({
134
- validator: classDefinition,
135
- classGroupId
136
- });
137
- return;
138
- }
139
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
140
- processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
141
- });
142
- });
143
- };
144
- var getPart = (classPartObject, path) => {
145
- let currentClassPartObject = classPartObject;
146
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
147
- if (!currentClassPartObject.nextPart.has(pathPart)) {
148
- currentClassPartObject.nextPart.set(pathPart, {
149
- nextPart: /* @__PURE__ */ new Map(),
150
- validators: []
151
- });
152
- }
153
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
154
- });
155
- return currentClassPartObject;
156
- };
157
- var isThemeGetter = (func) => func.isThemeGetter;
158
- var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
159
- if (!prefix) {
160
- return classGroupEntries;
161
- }
162
- return classGroupEntries.map(([classGroupId, classGroup]) => {
163
- const prefixedClassGroup = classGroup.map((classDefinition) => {
164
- if (typeof classDefinition === "string") {
165
- return prefix + classDefinition;
166
- }
167
- if (typeof classDefinition === "object") {
168
- return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
169
- }
170
- return classDefinition;
171
- });
172
- return [classGroupId, prefixedClassGroup];
173
- });
174
- };
175
- var createLruCache = (maxCacheSize) => {
176
- if (maxCacheSize < 1) {
177
- return {
178
- get: () => void 0,
179
- set: () => {
180
- }
181
- };
182
- }
183
- let cacheSize = 0;
184
- let cache = /* @__PURE__ */ new Map();
185
- let previousCache = /* @__PURE__ */ new Map();
186
- const update = (key, value) => {
187
- cache.set(key, value);
188
- cacheSize++;
189
- if (cacheSize > maxCacheSize) {
190
- cacheSize = 0;
191
- previousCache = cache;
192
- cache = /* @__PURE__ */ new Map();
193
- }
194
- };
195
- return {
196
- get(key) {
197
- let value = cache.get(key);
198
- if (value !== void 0) {
199
- return value;
200
- }
201
- if ((value = previousCache.get(key)) !== void 0) {
202
- update(key, value);
203
- return value;
204
- }
205
- },
206
- set(key, value) {
207
- if (cache.has(key)) {
208
- cache.set(key, value);
209
- } else {
210
- update(key, value);
211
- }
212
- }
213
- };
214
- };
215
- var IMPORTANT_MODIFIER = "!";
216
- var createParseClassName = (config) => {
217
- const {
218
- separator,
219
- experimentalParseClassName
220
- } = config;
221
- const isSeparatorSingleCharacter = separator.length === 1;
222
- const firstSeparatorCharacter = separator[0];
223
- const separatorLength = separator.length;
224
- const parseClassName = (className) => {
225
- const modifiers = [];
226
- let bracketDepth = 0;
227
- let modifierStart = 0;
228
- let postfixModifierPosition;
229
- for (let index = 0; index < className.length; index++) {
230
- let currentCharacter = className[index];
231
- if (bracketDepth === 0) {
232
- if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
233
- modifiers.push(className.slice(modifierStart, index));
234
- modifierStart = index + separatorLength;
235
- continue;
236
- }
237
- if (currentCharacter === "/") {
238
- postfixModifierPosition = index;
239
- continue;
240
- }
241
- }
242
- if (currentCharacter === "[") {
243
- bracketDepth++;
244
- } else if (currentCharacter === "]") {
245
- bracketDepth--;
246
- }
247
- }
248
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
249
- const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
250
- const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
251
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
252
- return {
253
- modifiers,
254
- hasImportantModifier,
255
- baseClassName,
256
- maybePostfixModifierPosition
257
- };
258
- };
259
- if (experimentalParseClassName) {
260
- return (className) => experimentalParseClassName({
261
- className,
262
- parseClassName
263
- });
264
- }
265
- return parseClassName;
266
- };
267
- var sortModifiers = (modifiers) => {
268
- if (modifiers.length <= 1) {
269
- return modifiers;
270
- }
271
- const sortedModifiers = [];
272
- let unsortedModifiers = [];
273
- modifiers.forEach((modifier) => {
274
- const isArbitraryVariant = modifier[0] === "[";
275
- if (isArbitraryVariant) {
276
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
277
- unsortedModifiers = [];
278
- } else {
279
- unsortedModifiers.push(modifier);
280
- }
281
- });
282
- sortedModifiers.push(...unsortedModifiers.sort());
283
- return sortedModifiers;
284
- };
285
- var createConfigUtils = (config) => ({
286
- cache: createLruCache(config.cacheSize),
287
- parseClassName: createParseClassName(config),
288
- ...createClassGroupUtils(config)
289
- });
290
- var SPLIT_CLASSES_REGEX = /\s+/;
291
- var mergeClassList = (classList, configUtils) => {
292
- const {
293
- parseClassName,
294
- getClassGroupId,
295
- getConflictingClassGroupIds
296
- } = configUtils;
297
- const classGroupsInConflict = [];
298
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
299
- let result = "";
300
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
301
- const originalClassName = classNames[index];
302
- const {
303
- modifiers,
304
- hasImportantModifier,
305
- baseClassName,
306
- maybePostfixModifierPosition
307
- } = parseClassName(originalClassName);
308
- let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
309
- let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
310
- if (!classGroupId) {
311
- if (!hasPostfixModifier) {
312
- result = originalClassName + (result.length > 0 ? " " + result : result);
313
- continue;
314
- }
315
- classGroupId = getClassGroupId(baseClassName);
316
- if (!classGroupId) {
317
- result = originalClassName + (result.length > 0 ? " " + result : result);
318
- continue;
319
- }
320
- hasPostfixModifier = false;
321
- }
322
- const variantModifier = sortModifiers(modifiers).join(":");
323
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
324
- const classId = modifierId + classGroupId;
325
- if (classGroupsInConflict.includes(classId)) {
326
- continue;
327
- }
328
- classGroupsInConflict.push(classId);
329
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
330
- for (let i = 0; i < conflictGroups.length; ++i) {
331
- const group = conflictGroups[i];
332
- classGroupsInConflict.push(modifierId + group);
333
- }
334
- result = originalClassName + (result.length > 0 ? " " + result : result);
335
- }
336
- return result;
337
- };
338
- function twJoin() {
339
- let index = 0;
340
- let argument;
341
- let resolvedValue;
342
- let string = "";
343
- while (index < arguments.length) {
344
- if (argument = arguments[index++]) {
345
- if (resolvedValue = toValue(argument)) {
346
- string && (string += " ");
347
- string += resolvedValue;
348
- }
349
- }
350
- }
351
- return string;
352
- }
353
- var toValue = (mix) => {
354
- if (typeof mix === "string") {
355
- return mix;
356
- }
357
- let resolvedValue;
358
- let string = "";
359
- for (let k = 0; k < mix.length; k++) {
360
- if (mix[k]) {
361
- if (resolvedValue = toValue(mix[k])) {
362
- string && (string += " ");
363
- string += resolvedValue;
364
- }
365
- }
366
- }
367
- return string;
368
- };
369
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
370
- let configUtils;
371
- let cacheGet;
372
- let cacheSet;
373
- let functionToCall = initTailwindMerge;
374
- function initTailwindMerge(classList) {
375
- const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
376
- configUtils = createConfigUtils(config);
377
- cacheGet = configUtils.cache.get;
378
- cacheSet = configUtils.cache.set;
379
- functionToCall = tailwindMerge;
380
- return tailwindMerge(classList);
381
- }
382
- function tailwindMerge(classList) {
383
- const cachedResult = cacheGet(classList);
384
- if (cachedResult) {
385
- return cachedResult;
386
- }
387
- const result = mergeClassList(classList, configUtils);
388
- cacheSet(classList, result);
389
- return result;
390
- }
391
- return function callTailwindMerge() {
392
- return functionToCall(twJoin.apply(null, arguments));
393
- };
394
- }
395
- var fromTheme = (key) => {
396
- const themeGetter = (theme) => theme[key] || [];
397
- themeGetter.isThemeGetter = true;
398
- return themeGetter;
399
- };
400
- var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
401
- var fractionRegex = /^\d+\/\d+$/;
402
- var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
403
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
404
- var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
405
- var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
406
- var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
407
- var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
408
- var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
409
- var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
410
- var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
411
- var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
412
- var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
413
- var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
414
- var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
415
- var isTshirtSize = (value) => tshirtUnitRegex.test(value);
416
- var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
417
- var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
418
- var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
419
- var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
420
- var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
421
- var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
422
- var isAny = () => true;
423
- var getIsArbitraryValue = (value, label, testValue) => {
424
- const result = arbitraryValueRegex.exec(value);
425
- if (result) {
426
- if (result[1]) {
427
- return typeof label === "string" ? result[1] === label : label.has(result[1]);
428
- }
429
- return testValue(result[2]);
430
- }
431
- return false;
432
- };
433
- var isLengthOnly = (value) => (
434
- // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
435
- // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
436
- // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
437
- lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
438
- );
439
- var isNever = () => false;
440
- var isShadow = (value) => shadowRegex.test(value);
441
- var isImage = (value) => imageRegex.test(value);
442
- var getDefaultConfig = () => {
443
- const colors = fromTheme("colors");
444
- const spacing = fromTheme("spacing");
445
- const blur = fromTheme("blur");
446
- const brightness = fromTheme("brightness");
447
- const borderColor = fromTheme("borderColor");
448
- const borderRadius = fromTheme("borderRadius");
449
- const borderSpacing = fromTheme("borderSpacing");
450
- const borderWidth = fromTheme("borderWidth");
451
- const contrast = fromTheme("contrast");
452
- const grayscale = fromTheme("grayscale");
453
- const hueRotate = fromTheme("hueRotate");
454
- const invert = fromTheme("invert");
455
- const gap = fromTheme("gap");
456
- const gradientColorStops = fromTheme("gradientColorStops");
457
- const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
458
- const inset = fromTheme("inset");
459
- const margin = fromTheme("margin");
460
- const opacity = fromTheme("opacity");
461
- const padding = fromTheme("padding");
462
- const saturate = fromTheme("saturate");
463
- const scale = fromTheme("scale");
464
- const sepia = fromTheme("sepia");
465
- const skew = fromTheme("skew");
466
- const space = fromTheme("space");
467
- const translate = fromTheme("translate");
468
- const getOverscroll = () => ["auto", "contain", "none"];
469
- const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
470
- const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
471
- const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
472
- const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
473
- const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
474
- const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
475
- const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
476
- const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
477
- const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
478
- const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
479
- const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
480
- const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
481
- return {
482
- cacheSize: 500,
483
- separator: ":",
484
- theme: {
485
- colors: [isAny],
486
- spacing: [isLength, isArbitraryLength],
487
- blur: ["none", "", isTshirtSize, isArbitraryValue],
488
- brightness: getNumberAndArbitrary(),
489
- borderColor: [colors],
490
- borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
491
- borderSpacing: getSpacingWithArbitrary(),
492
- borderWidth: getLengthWithEmptyAndArbitrary(),
493
- contrast: getNumberAndArbitrary(),
494
- grayscale: getZeroAndEmpty(),
495
- hueRotate: getNumberAndArbitrary(),
496
- invert: getZeroAndEmpty(),
497
- gap: getSpacingWithArbitrary(),
498
- gradientColorStops: [colors],
499
- gradientColorStopPositions: [isPercent, isArbitraryLength],
500
- inset: getSpacingWithAutoAndArbitrary(),
501
- margin: getSpacingWithAutoAndArbitrary(),
502
- opacity: getNumberAndArbitrary(),
503
- padding: getSpacingWithArbitrary(),
504
- saturate: getNumberAndArbitrary(),
505
- scale: getNumberAndArbitrary(),
506
- sepia: getZeroAndEmpty(),
507
- skew: getNumberAndArbitrary(),
508
- space: getSpacingWithArbitrary(),
509
- translate: getSpacingWithArbitrary()
510
- },
511
- classGroups: {
512
- // Layout
513
- /**
514
- * Aspect Ratio
515
- * @see https://tailwindcss.com/docs/aspect-ratio
516
- */
517
- aspect: [{
518
- aspect: ["auto", "square", "video", isArbitraryValue]
519
- }],
520
- /**
521
- * Container
522
- * @see https://tailwindcss.com/docs/container
523
- */
524
- container: ["container"],
525
- /**
526
- * Columns
527
- * @see https://tailwindcss.com/docs/columns
528
- */
529
- columns: [{
530
- columns: [isTshirtSize]
531
- }],
532
- /**
533
- * Break After
534
- * @see https://tailwindcss.com/docs/break-after
535
- */
536
- "break-after": [{
537
- "break-after": getBreaks()
538
- }],
539
- /**
540
- * Break Before
541
- * @see https://tailwindcss.com/docs/break-before
542
- */
543
- "break-before": [{
544
- "break-before": getBreaks()
545
- }],
546
- /**
547
- * Break Inside
548
- * @see https://tailwindcss.com/docs/break-inside
549
- */
550
- "break-inside": [{
551
- "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
552
- }],
553
- /**
554
- * Box Decoration Break
555
- * @see https://tailwindcss.com/docs/box-decoration-break
556
- */
557
- "box-decoration": [{
558
- "box-decoration": ["slice", "clone"]
559
- }],
560
- /**
561
- * Box Sizing
562
- * @see https://tailwindcss.com/docs/box-sizing
563
- */
564
- box: [{
565
- box: ["border", "content"]
566
- }],
567
- /**
568
- * Display
569
- * @see https://tailwindcss.com/docs/display
570
- */
571
- display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
572
- /**
573
- * Floats
574
- * @see https://tailwindcss.com/docs/float
575
- */
576
- float: [{
577
- float: ["right", "left", "none", "start", "end"]
578
- }],
579
- /**
580
- * Clear
581
- * @see https://tailwindcss.com/docs/clear
582
- */
583
- clear: [{
584
- clear: ["left", "right", "both", "none", "start", "end"]
585
- }],
586
- /**
587
- * Isolation
588
- * @see https://tailwindcss.com/docs/isolation
589
- */
590
- isolation: ["isolate", "isolation-auto"],
591
- /**
592
- * Object Fit
593
- * @see https://tailwindcss.com/docs/object-fit
594
- */
595
- "object-fit": [{
596
- object: ["contain", "cover", "fill", "none", "scale-down"]
597
- }],
598
- /**
599
- * Object Position
600
- * @see https://tailwindcss.com/docs/object-position
601
- */
602
- "object-position": [{
603
- object: [...getPositions(), isArbitraryValue]
604
- }],
605
- /**
606
- * Overflow
607
- * @see https://tailwindcss.com/docs/overflow
608
- */
609
- overflow: [{
610
- overflow: getOverflow()
611
- }],
612
- /**
613
- * Overflow X
614
- * @see https://tailwindcss.com/docs/overflow
615
- */
616
- "overflow-x": [{
617
- "overflow-x": getOverflow()
618
- }],
619
- /**
620
- * Overflow Y
621
- * @see https://tailwindcss.com/docs/overflow
622
- */
623
- "overflow-y": [{
624
- "overflow-y": getOverflow()
625
- }],
626
- /**
627
- * Overscroll Behavior
628
- * @see https://tailwindcss.com/docs/overscroll-behavior
629
- */
630
- overscroll: [{
631
- overscroll: getOverscroll()
632
- }],
633
- /**
634
- * Overscroll Behavior X
635
- * @see https://tailwindcss.com/docs/overscroll-behavior
636
- */
637
- "overscroll-x": [{
638
- "overscroll-x": getOverscroll()
639
- }],
640
- /**
641
- * Overscroll Behavior Y
642
- * @see https://tailwindcss.com/docs/overscroll-behavior
643
- */
644
- "overscroll-y": [{
645
- "overscroll-y": getOverscroll()
646
- }],
647
- /**
648
- * Position
649
- * @see https://tailwindcss.com/docs/position
650
- */
651
- position: ["static", "fixed", "absolute", "relative", "sticky"],
652
- /**
653
- * Top / Right / Bottom / Left
654
- * @see https://tailwindcss.com/docs/top-right-bottom-left
655
- */
656
- inset: [{
657
- inset: [inset]
658
- }],
659
- /**
660
- * Right / Left
661
- * @see https://tailwindcss.com/docs/top-right-bottom-left
662
- */
663
- "inset-x": [{
664
- "inset-x": [inset]
665
- }],
666
- /**
667
- * Top / Bottom
668
- * @see https://tailwindcss.com/docs/top-right-bottom-left
669
- */
670
- "inset-y": [{
671
- "inset-y": [inset]
672
- }],
673
- /**
674
- * Start
675
- * @see https://tailwindcss.com/docs/top-right-bottom-left
676
- */
677
- start: [{
678
- start: [inset]
679
- }],
680
- /**
681
- * End
682
- * @see https://tailwindcss.com/docs/top-right-bottom-left
683
- */
684
- end: [{
685
- end: [inset]
686
- }],
687
- /**
688
- * Top
689
- * @see https://tailwindcss.com/docs/top-right-bottom-left
690
- */
691
- top: [{
692
- top: [inset]
693
- }],
694
- /**
695
- * Right
696
- * @see https://tailwindcss.com/docs/top-right-bottom-left
697
- */
698
- right: [{
699
- right: [inset]
700
- }],
701
- /**
702
- * Bottom
703
- * @see https://tailwindcss.com/docs/top-right-bottom-left
704
- */
705
- bottom: [{
706
- bottom: [inset]
707
- }],
708
- /**
709
- * Left
710
- * @see https://tailwindcss.com/docs/top-right-bottom-left
711
- */
712
- left: [{
713
- left: [inset]
714
- }],
715
- /**
716
- * Visibility
717
- * @see https://tailwindcss.com/docs/visibility
718
- */
719
- visibility: ["visible", "invisible", "collapse"],
720
- /**
721
- * Z-Index
722
- * @see https://tailwindcss.com/docs/z-index
723
- */
724
- z: [{
725
- z: ["auto", isInteger, isArbitraryValue]
726
- }],
727
- // Flexbox and Grid
728
- /**
729
- * Flex Basis
730
- * @see https://tailwindcss.com/docs/flex-basis
731
- */
732
- basis: [{
733
- basis: getSpacingWithAutoAndArbitrary()
734
- }],
735
- /**
736
- * Flex Direction
737
- * @see https://tailwindcss.com/docs/flex-direction
738
- */
739
- "flex-direction": [{
740
- flex: ["row", "row-reverse", "col", "col-reverse"]
741
- }],
742
- /**
743
- * Flex Wrap
744
- * @see https://tailwindcss.com/docs/flex-wrap
745
- */
746
- "flex-wrap": [{
747
- flex: ["wrap", "wrap-reverse", "nowrap"]
748
- }],
749
- /**
750
- * Flex
751
- * @see https://tailwindcss.com/docs/flex
752
- */
753
- flex: [{
754
- flex: ["1", "auto", "initial", "none", isArbitraryValue]
755
- }],
756
- /**
757
- * Flex Grow
758
- * @see https://tailwindcss.com/docs/flex-grow
759
- */
760
- grow: [{
761
- grow: getZeroAndEmpty()
762
- }],
763
- /**
764
- * Flex Shrink
765
- * @see https://tailwindcss.com/docs/flex-shrink
766
- */
767
- shrink: [{
768
- shrink: getZeroAndEmpty()
769
- }],
770
- /**
771
- * Order
772
- * @see https://tailwindcss.com/docs/order
773
- */
774
- order: [{
775
- order: ["first", "last", "none", isInteger, isArbitraryValue]
776
- }],
777
- /**
778
- * Grid Template Columns
779
- * @see https://tailwindcss.com/docs/grid-template-columns
780
- */
781
- "grid-cols": [{
782
- "grid-cols": [isAny]
783
- }],
784
- /**
785
- * Grid Column Start / End
786
- * @see https://tailwindcss.com/docs/grid-column
787
- */
788
- "col-start-end": [{
789
- col: ["auto", {
790
- span: ["full", isInteger, isArbitraryValue]
791
- }, isArbitraryValue]
792
- }],
793
- /**
794
- * Grid Column Start
795
- * @see https://tailwindcss.com/docs/grid-column
796
- */
797
- "col-start": [{
798
- "col-start": getNumberWithAutoAndArbitrary()
799
- }],
800
- /**
801
- * Grid Column End
802
- * @see https://tailwindcss.com/docs/grid-column
803
- */
804
- "col-end": [{
805
- "col-end": getNumberWithAutoAndArbitrary()
806
- }],
807
- /**
808
- * Grid Template Rows
809
- * @see https://tailwindcss.com/docs/grid-template-rows
810
- */
811
- "grid-rows": [{
812
- "grid-rows": [isAny]
813
- }],
814
- /**
815
- * Grid Row Start / End
816
- * @see https://tailwindcss.com/docs/grid-row
817
- */
818
- "row-start-end": [{
819
- row: ["auto", {
820
- span: [isInteger, isArbitraryValue]
821
- }, isArbitraryValue]
822
- }],
823
- /**
824
- * Grid Row Start
825
- * @see https://tailwindcss.com/docs/grid-row
826
- */
827
- "row-start": [{
828
- "row-start": getNumberWithAutoAndArbitrary()
829
- }],
830
- /**
831
- * Grid Row End
832
- * @see https://tailwindcss.com/docs/grid-row
833
- */
834
- "row-end": [{
835
- "row-end": getNumberWithAutoAndArbitrary()
836
- }],
837
- /**
838
- * Grid Auto Flow
839
- * @see https://tailwindcss.com/docs/grid-auto-flow
840
- */
841
- "grid-flow": [{
842
- "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
843
- }],
844
- /**
845
- * Grid Auto Columns
846
- * @see https://tailwindcss.com/docs/grid-auto-columns
847
- */
848
- "auto-cols": [{
849
- "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
850
- }],
851
- /**
852
- * Grid Auto Rows
853
- * @see https://tailwindcss.com/docs/grid-auto-rows
854
- */
855
- "auto-rows": [{
856
- "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
857
- }],
858
- /**
859
- * Gap
860
- * @see https://tailwindcss.com/docs/gap
861
- */
862
- gap: [{
863
- gap: [gap]
864
- }],
865
- /**
866
- * Gap X
867
- * @see https://tailwindcss.com/docs/gap
868
- */
869
- "gap-x": [{
870
- "gap-x": [gap]
871
- }],
872
- /**
873
- * Gap Y
874
- * @see https://tailwindcss.com/docs/gap
875
- */
876
- "gap-y": [{
877
- "gap-y": [gap]
878
- }],
879
- /**
880
- * Justify Content
881
- * @see https://tailwindcss.com/docs/justify-content
882
- */
883
- "justify-content": [{
884
- justify: ["normal", ...getAlign()]
885
- }],
886
- /**
887
- * Justify Items
888
- * @see https://tailwindcss.com/docs/justify-items
889
- */
890
- "justify-items": [{
891
- "justify-items": ["start", "end", "center", "stretch"]
892
- }],
893
- /**
894
- * Justify Self
895
- * @see https://tailwindcss.com/docs/justify-self
896
- */
897
- "justify-self": [{
898
- "justify-self": ["auto", "start", "end", "center", "stretch"]
899
- }],
900
- /**
901
- * Align Content
902
- * @see https://tailwindcss.com/docs/align-content
903
- */
904
- "align-content": [{
905
- content: ["normal", ...getAlign(), "baseline"]
906
- }],
907
- /**
908
- * Align Items
909
- * @see https://tailwindcss.com/docs/align-items
910
- */
911
- "align-items": [{
912
- items: ["start", "end", "center", "baseline", "stretch"]
913
- }],
914
- /**
915
- * Align Self
916
- * @see https://tailwindcss.com/docs/align-self
917
- */
918
- "align-self": [{
919
- self: ["auto", "start", "end", "center", "stretch", "baseline"]
920
- }],
921
- /**
922
- * Place Content
923
- * @see https://tailwindcss.com/docs/place-content
924
- */
925
- "place-content": [{
926
- "place-content": [...getAlign(), "baseline"]
927
- }],
928
- /**
929
- * Place Items
930
- * @see https://tailwindcss.com/docs/place-items
931
- */
932
- "place-items": [{
933
- "place-items": ["start", "end", "center", "baseline", "stretch"]
934
- }],
935
- /**
936
- * Place Self
937
- * @see https://tailwindcss.com/docs/place-self
938
- */
939
- "place-self": [{
940
- "place-self": ["auto", "start", "end", "center", "stretch"]
941
- }],
942
- // Spacing
943
- /**
944
- * Padding
945
- * @see https://tailwindcss.com/docs/padding
946
- */
947
- p: [{
948
- p: [padding]
949
- }],
950
- /**
951
- * Padding X
952
- * @see https://tailwindcss.com/docs/padding
953
- */
954
- px: [{
955
- px: [padding]
956
- }],
957
- /**
958
- * Padding Y
959
- * @see https://tailwindcss.com/docs/padding
960
- */
961
- py: [{
962
- py: [padding]
963
- }],
964
- /**
965
- * Padding Start
966
- * @see https://tailwindcss.com/docs/padding
967
- */
968
- ps: [{
969
- ps: [padding]
970
- }],
971
- /**
972
- * Padding End
973
- * @see https://tailwindcss.com/docs/padding
974
- */
975
- pe: [{
976
- pe: [padding]
977
- }],
978
- /**
979
- * Padding Top
980
- * @see https://tailwindcss.com/docs/padding
981
- */
982
- pt: [{
983
- pt: [padding]
984
- }],
985
- /**
986
- * Padding Right
987
- * @see https://tailwindcss.com/docs/padding
988
- */
989
- pr: [{
990
- pr: [padding]
991
- }],
992
- /**
993
- * Padding Bottom
994
- * @see https://tailwindcss.com/docs/padding
995
- */
996
- pb: [{
997
- pb: [padding]
998
- }],
999
- /**
1000
- * Padding Left
1001
- * @see https://tailwindcss.com/docs/padding
1002
- */
1003
- pl: [{
1004
- pl: [padding]
1005
- }],
1006
- /**
1007
- * Margin
1008
- * @see https://tailwindcss.com/docs/margin
1009
- */
1010
- m: [{
1011
- m: [margin]
1012
- }],
1013
- /**
1014
- * Margin X
1015
- * @see https://tailwindcss.com/docs/margin
1016
- */
1017
- mx: [{
1018
- mx: [margin]
1019
- }],
1020
- /**
1021
- * Margin Y
1022
- * @see https://tailwindcss.com/docs/margin
1023
- */
1024
- my: [{
1025
- my: [margin]
1026
- }],
1027
- /**
1028
- * Margin Start
1029
- * @see https://tailwindcss.com/docs/margin
1030
- */
1031
- ms: [{
1032
- ms: [margin]
1033
- }],
1034
- /**
1035
- * Margin End
1036
- * @see https://tailwindcss.com/docs/margin
1037
- */
1038
- me: [{
1039
- me: [margin]
1040
- }],
1041
- /**
1042
- * Margin Top
1043
- * @see https://tailwindcss.com/docs/margin
1044
- */
1045
- mt: [{
1046
- mt: [margin]
1047
- }],
1048
- /**
1049
- * Margin Right
1050
- * @see https://tailwindcss.com/docs/margin
1051
- */
1052
- mr: [{
1053
- mr: [margin]
1054
- }],
1055
- /**
1056
- * Margin Bottom
1057
- * @see https://tailwindcss.com/docs/margin
1058
- */
1059
- mb: [{
1060
- mb: [margin]
1061
- }],
1062
- /**
1063
- * Margin Left
1064
- * @see https://tailwindcss.com/docs/margin
1065
- */
1066
- ml: [{
1067
- ml: [margin]
1068
- }],
1069
- /**
1070
- * Space Between X
1071
- * @see https://tailwindcss.com/docs/space
1072
- */
1073
- "space-x": [{
1074
- "space-x": [space]
1075
- }],
1076
- /**
1077
- * Space Between X Reverse
1078
- * @see https://tailwindcss.com/docs/space
1079
- */
1080
- "space-x-reverse": ["space-x-reverse"],
1081
- /**
1082
- * Space Between Y
1083
- * @see https://tailwindcss.com/docs/space
1084
- */
1085
- "space-y": [{
1086
- "space-y": [space]
1087
- }],
1088
- /**
1089
- * Space Between Y Reverse
1090
- * @see https://tailwindcss.com/docs/space
1091
- */
1092
- "space-y-reverse": ["space-y-reverse"],
1093
- // Sizing
1094
- /**
1095
- * Width
1096
- * @see https://tailwindcss.com/docs/width
1097
- */
1098
- w: [{
1099
- w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
1100
- }],
1101
- /**
1102
- * Min-Width
1103
- * @see https://tailwindcss.com/docs/min-width
1104
- */
1105
- "min-w": [{
1106
- "min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
1107
- }],
1108
- /**
1109
- * Max-Width
1110
- * @see https://tailwindcss.com/docs/max-width
1111
- */
1112
- "max-w": [{
1113
- "max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
1114
- screen: [isTshirtSize]
1115
- }, isTshirtSize]
1116
- }],
1117
- /**
1118
- * Height
1119
- * @see https://tailwindcss.com/docs/height
1120
- */
1121
- h: [{
1122
- h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
1123
- }],
1124
- /**
1125
- * Min-Height
1126
- * @see https://tailwindcss.com/docs/min-height
1127
- */
1128
- "min-h": [{
1129
- "min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1130
- }],
1131
- /**
1132
- * Max-Height
1133
- * @see https://tailwindcss.com/docs/max-height
1134
- */
1135
- "max-h": [{
1136
- "max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
1137
- }],
1138
- /**
1139
- * Size
1140
- * @see https://tailwindcss.com/docs/size
1141
- */
1142
- size: [{
1143
- size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
1144
- }],
1145
- // Typography
1146
- /**
1147
- * Font Size
1148
- * @see https://tailwindcss.com/docs/font-size
1149
- */
1150
- "font-size": [{
1151
- text: ["base", isTshirtSize, isArbitraryLength]
1152
- }],
1153
- /**
1154
- * Font Smoothing
1155
- * @see https://tailwindcss.com/docs/font-smoothing
1156
- */
1157
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1158
- /**
1159
- * Font Style
1160
- * @see https://tailwindcss.com/docs/font-style
1161
- */
1162
- "font-style": ["italic", "not-italic"],
1163
- /**
1164
- * Font Weight
1165
- * @see https://tailwindcss.com/docs/font-weight
1166
- */
1167
- "font-weight": [{
1168
- font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
1169
- }],
1170
- /**
1171
- * Font Family
1172
- * @see https://tailwindcss.com/docs/font-family
1173
- */
1174
- "font-family": [{
1175
- font: [isAny]
1176
- }],
1177
- /**
1178
- * Font Variant Numeric
1179
- * @see https://tailwindcss.com/docs/font-variant-numeric
1180
- */
1181
- "fvn-normal": ["normal-nums"],
1182
- /**
1183
- * Font Variant Numeric
1184
- * @see https://tailwindcss.com/docs/font-variant-numeric
1185
- */
1186
- "fvn-ordinal": ["ordinal"],
1187
- /**
1188
- * Font Variant Numeric
1189
- * @see https://tailwindcss.com/docs/font-variant-numeric
1190
- */
1191
- "fvn-slashed-zero": ["slashed-zero"],
1192
- /**
1193
- * Font Variant Numeric
1194
- * @see https://tailwindcss.com/docs/font-variant-numeric
1195
- */
1196
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1197
- /**
1198
- * Font Variant Numeric
1199
- * @see https://tailwindcss.com/docs/font-variant-numeric
1200
- */
1201
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1202
- /**
1203
- * Font Variant Numeric
1204
- * @see https://tailwindcss.com/docs/font-variant-numeric
1205
- */
1206
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1207
- /**
1208
- * Letter Spacing
1209
- * @see https://tailwindcss.com/docs/letter-spacing
1210
- */
1211
- tracking: [{
1212
- tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
1213
- }],
1214
- /**
1215
- * Line Clamp
1216
- * @see https://tailwindcss.com/docs/line-clamp
1217
- */
1218
- "line-clamp": [{
1219
- "line-clamp": ["none", isNumber, isArbitraryNumber]
1220
- }],
1221
- /**
1222
- * Line Height
1223
- * @see https://tailwindcss.com/docs/line-height
1224
- */
1225
- leading: [{
1226
- leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
1227
- }],
1228
- /**
1229
- * List Style Image
1230
- * @see https://tailwindcss.com/docs/list-style-image
1231
- */
1232
- "list-image": [{
1233
- "list-image": ["none", isArbitraryValue]
1234
- }],
1235
- /**
1236
- * List Style Type
1237
- * @see https://tailwindcss.com/docs/list-style-type
1238
- */
1239
- "list-style-type": [{
1240
- list: ["none", "disc", "decimal", isArbitraryValue]
1241
- }],
1242
- /**
1243
- * List Style Position
1244
- * @see https://tailwindcss.com/docs/list-style-position
1245
- */
1246
- "list-style-position": [{
1247
- list: ["inside", "outside"]
1248
- }],
1249
- /**
1250
- * Placeholder Color
1251
- * @deprecated since Tailwind CSS v3.0.0
1252
- * @see https://tailwindcss.com/docs/placeholder-color
1253
- */
1254
- "placeholder-color": [{
1255
- placeholder: [colors]
1256
- }],
1257
- /**
1258
- * Placeholder Opacity
1259
- * @see https://tailwindcss.com/docs/placeholder-opacity
1260
- */
1261
- "placeholder-opacity": [{
1262
- "placeholder-opacity": [opacity]
1263
- }],
1264
- /**
1265
- * Text Alignment
1266
- * @see https://tailwindcss.com/docs/text-align
1267
- */
1268
- "text-alignment": [{
1269
- text: ["left", "center", "right", "justify", "start", "end"]
1270
- }],
1271
- /**
1272
- * Text Color
1273
- * @see https://tailwindcss.com/docs/text-color
1274
- */
1275
- "text-color": [{
1276
- text: [colors]
1277
- }],
1278
- /**
1279
- * Text Opacity
1280
- * @see https://tailwindcss.com/docs/text-opacity
1281
- */
1282
- "text-opacity": [{
1283
- "text-opacity": [opacity]
1284
- }],
1285
- /**
1286
- * Text Decoration
1287
- * @see https://tailwindcss.com/docs/text-decoration
1288
- */
1289
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1290
- /**
1291
- * Text Decoration Style
1292
- * @see https://tailwindcss.com/docs/text-decoration-style
1293
- */
1294
- "text-decoration-style": [{
1295
- decoration: [...getLineStyles(), "wavy"]
1296
- }],
1297
- /**
1298
- * Text Decoration Thickness
1299
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1300
- */
1301
- "text-decoration-thickness": [{
1302
- decoration: ["auto", "from-font", isLength, isArbitraryLength]
1303
- }],
1304
- /**
1305
- * Text Underline Offset
1306
- * @see https://tailwindcss.com/docs/text-underline-offset
1307
- */
1308
- "underline-offset": [{
1309
- "underline-offset": ["auto", isLength, isArbitraryValue]
1310
- }],
1311
- /**
1312
- * Text Decoration Color
1313
- * @see https://tailwindcss.com/docs/text-decoration-color
1314
- */
1315
- "text-decoration-color": [{
1316
- decoration: [colors]
1317
- }],
1318
- /**
1319
- * Text Transform
1320
- * @see https://tailwindcss.com/docs/text-transform
1321
- */
1322
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1323
- /**
1324
- * Text Overflow
1325
- * @see https://tailwindcss.com/docs/text-overflow
1326
- */
1327
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1328
- /**
1329
- * Text Wrap
1330
- * @see https://tailwindcss.com/docs/text-wrap
1331
- */
1332
- "text-wrap": [{
1333
- text: ["wrap", "nowrap", "balance", "pretty"]
1334
- }],
1335
- /**
1336
- * Text Indent
1337
- * @see https://tailwindcss.com/docs/text-indent
1338
- */
1339
- indent: [{
1340
- indent: getSpacingWithArbitrary()
1341
- }],
1342
- /**
1343
- * Vertical Alignment
1344
- * @see https://tailwindcss.com/docs/vertical-align
1345
- */
1346
- "vertical-align": [{
1347
- align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
1348
- }],
1349
- /**
1350
- * Whitespace
1351
- * @see https://tailwindcss.com/docs/whitespace
1352
- */
1353
- whitespace: [{
1354
- whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1355
- }],
1356
- /**
1357
- * Word Break
1358
- * @see https://tailwindcss.com/docs/word-break
1359
- */
1360
- break: [{
1361
- break: ["normal", "words", "all", "keep"]
1362
- }],
1363
- /**
1364
- * Hyphens
1365
- * @see https://tailwindcss.com/docs/hyphens
1366
- */
1367
- hyphens: [{
1368
- hyphens: ["none", "manual", "auto"]
1369
- }],
1370
- /**
1371
- * Content
1372
- * @see https://tailwindcss.com/docs/content
1373
- */
1374
- content: [{
1375
- content: ["none", isArbitraryValue]
1376
- }],
1377
- // Backgrounds
1378
- /**
1379
- * Background Attachment
1380
- * @see https://tailwindcss.com/docs/background-attachment
1381
- */
1382
- "bg-attachment": [{
1383
- bg: ["fixed", "local", "scroll"]
1384
- }],
1385
- /**
1386
- * Background Clip
1387
- * @see https://tailwindcss.com/docs/background-clip
1388
- */
1389
- "bg-clip": [{
1390
- "bg-clip": ["border", "padding", "content", "text"]
1391
- }],
1392
- /**
1393
- * Background Opacity
1394
- * @deprecated since Tailwind CSS v3.0.0
1395
- * @see https://tailwindcss.com/docs/background-opacity
1396
- */
1397
- "bg-opacity": [{
1398
- "bg-opacity": [opacity]
1399
- }],
1400
- /**
1401
- * Background Origin
1402
- * @see https://tailwindcss.com/docs/background-origin
1403
- */
1404
- "bg-origin": [{
1405
- "bg-origin": ["border", "padding", "content"]
1406
- }],
1407
- /**
1408
- * Background Position
1409
- * @see https://tailwindcss.com/docs/background-position
1410
- */
1411
- "bg-position": [{
1412
- bg: [...getPositions(), isArbitraryPosition]
1413
- }],
1414
- /**
1415
- * Background Repeat
1416
- * @see https://tailwindcss.com/docs/background-repeat
1417
- */
1418
- "bg-repeat": [{
1419
- bg: ["no-repeat", {
1420
- repeat: ["", "x", "y", "round", "space"]
1421
- }]
1422
- }],
1423
- /**
1424
- * Background Size
1425
- * @see https://tailwindcss.com/docs/background-size
1426
- */
1427
- "bg-size": [{
1428
- bg: ["auto", "cover", "contain", isArbitrarySize]
1429
- }],
1430
- /**
1431
- * Background Image
1432
- * @see https://tailwindcss.com/docs/background-image
1433
- */
1434
- "bg-image": [{
1435
- bg: ["none", {
1436
- "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1437
- }, isArbitraryImage]
1438
- }],
1439
- /**
1440
- * Background Color
1441
- * @see https://tailwindcss.com/docs/background-color
1442
- */
1443
- "bg-color": [{
1444
- bg: [colors]
1445
- }],
1446
- /**
1447
- * Gradient Color Stops From Position
1448
- * @see https://tailwindcss.com/docs/gradient-color-stops
1449
- */
1450
- "gradient-from-pos": [{
1451
- from: [gradientColorStopPositions]
1452
- }],
1453
- /**
1454
- * Gradient Color Stops Via Position
1455
- * @see https://tailwindcss.com/docs/gradient-color-stops
1456
- */
1457
- "gradient-via-pos": [{
1458
- via: [gradientColorStopPositions]
1459
- }],
1460
- /**
1461
- * Gradient Color Stops To Position
1462
- * @see https://tailwindcss.com/docs/gradient-color-stops
1463
- */
1464
- "gradient-to-pos": [{
1465
- to: [gradientColorStopPositions]
1466
- }],
1467
- /**
1468
- * Gradient Color Stops From
1469
- * @see https://tailwindcss.com/docs/gradient-color-stops
1470
- */
1471
- "gradient-from": [{
1472
- from: [gradientColorStops]
1473
- }],
1474
- /**
1475
- * Gradient Color Stops Via
1476
- * @see https://tailwindcss.com/docs/gradient-color-stops
1477
- */
1478
- "gradient-via": [{
1479
- via: [gradientColorStops]
1480
- }],
1481
- /**
1482
- * Gradient Color Stops To
1483
- * @see https://tailwindcss.com/docs/gradient-color-stops
1484
- */
1485
- "gradient-to": [{
1486
- to: [gradientColorStops]
1487
- }],
1488
- // Borders
1489
- /**
1490
- * Border Radius
1491
- * @see https://tailwindcss.com/docs/border-radius
1492
- */
1493
- rounded: [{
1494
- rounded: [borderRadius]
1495
- }],
1496
- /**
1497
- * Border Radius Start
1498
- * @see https://tailwindcss.com/docs/border-radius
1499
- */
1500
- "rounded-s": [{
1501
- "rounded-s": [borderRadius]
1502
- }],
1503
- /**
1504
- * Border Radius End
1505
- * @see https://tailwindcss.com/docs/border-radius
1506
- */
1507
- "rounded-e": [{
1508
- "rounded-e": [borderRadius]
1509
- }],
1510
- /**
1511
- * Border Radius Top
1512
- * @see https://tailwindcss.com/docs/border-radius
1513
- */
1514
- "rounded-t": [{
1515
- "rounded-t": [borderRadius]
1516
- }],
1517
- /**
1518
- * Border Radius Right
1519
- * @see https://tailwindcss.com/docs/border-radius
1520
- */
1521
- "rounded-r": [{
1522
- "rounded-r": [borderRadius]
1523
- }],
1524
- /**
1525
- * Border Radius Bottom
1526
- * @see https://tailwindcss.com/docs/border-radius
1527
- */
1528
- "rounded-b": [{
1529
- "rounded-b": [borderRadius]
1530
- }],
1531
- /**
1532
- * Border Radius Left
1533
- * @see https://tailwindcss.com/docs/border-radius
1534
- */
1535
- "rounded-l": [{
1536
- "rounded-l": [borderRadius]
1537
- }],
1538
- /**
1539
- * Border Radius Start Start
1540
- * @see https://tailwindcss.com/docs/border-radius
1541
- */
1542
- "rounded-ss": [{
1543
- "rounded-ss": [borderRadius]
1544
- }],
1545
- /**
1546
- * Border Radius Start End
1547
- * @see https://tailwindcss.com/docs/border-radius
1548
- */
1549
- "rounded-se": [{
1550
- "rounded-se": [borderRadius]
1551
- }],
1552
- /**
1553
- * Border Radius End End
1554
- * @see https://tailwindcss.com/docs/border-radius
1555
- */
1556
- "rounded-ee": [{
1557
- "rounded-ee": [borderRadius]
1558
- }],
1559
- /**
1560
- * Border Radius End Start
1561
- * @see https://tailwindcss.com/docs/border-radius
1562
- */
1563
- "rounded-es": [{
1564
- "rounded-es": [borderRadius]
1565
- }],
1566
- /**
1567
- * Border Radius Top Left
1568
- * @see https://tailwindcss.com/docs/border-radius
1569
- */
1570
- "rounded-tl": [{
1571
- "rounded-tl": [borderRadius]
1572
- }],
1573
- /**
1574
- * Border Radius Top Right
1575
- * @see https://tailwindcss.com/docs/border-radius
1576
- */
1577
- "rounded-tr": [{
1578
- "rounded-tr": [borderRadius]
1579
- }],
1580
- /**
1581
- * Border Radius Bottom Right
1582
- * @see https://tailwindcss.com/docs/border-radius
1583
- */
1584
- "rounded-br": [{
1585
- "rounded-br": [borderRadius]
1586
- }],
1587
- /**
1588
- * Border Radius Bottom Left
1589
- * @see https://tailwindcss.com/docs/border-radius
1590
- */
1591
- "rounded-bl": [{
1592
- "rounded-bl": [borderRadius]
1593
- }],
1594
- /**
1595
- * Border Width
1596
- * @see https://tailwindcss.com/docs/border-width
1597
- */
1598
- "border-w": [{
1599
- border: [borderWidth]
1600
- }],
1601
- /**
1602
- * Border Width X
1603
- * @see https://tailwindcss.com/docs/border-width
1604
- */
1605
- "border-w-x": [{
1606
- "border-x": [borderWidth]
1607
- }],
1608
- /**
1609
- * Border Width Y
1610
- * @see https://tailwindcss.com/docs/border-width
1611
- */
1612
- "border-w-y": [{
1613
- "border-y": [borderWidth]
1614
- }],
1615
- /**
1616
- * Border Width Start
1617
- * @see https://tailwindcss.com/docs/border-width
1618
- */
1619
- "border-w-s": [{
1620
- "border-s": [borderWidth]
1621
- }],
1622
- /**
1623
- * Border Width End
1624
- * @see https://tailwindcss.com/docs/border-width
1625
- */
1626
- "border-w-e": [{
1627
- "border-e": [borderWidth]
1628
- }],
1629
- /**
1630
- * Border Width Top
1631
- * @see https://tailwindcss.com/docs/border-width
1632
- */
1633
- "border-w-t": [{
1634
- "border-t": [borderWidth]
1635
- }],
1636
- /**
1637
- * Border Width Right
1638
- * @see https://tailwindcss.com/docs/border-width
1639
- */
1640
- "border-w-r": [{
1641
- "border-r": [borderWidth]
1642
- }],
1643
- /**
1644
- * Border Width Bottom
1645
- * @see https://tailwindcss.com/docs/border-width
1646
- */
1647
- "border-w-b": [{
1648
- "border-b": [borderWidth]
1649
- }],
1650
- /**
1651
- * Border Width Left
1652
- * @see https://tailwindcss.com/docs/border-width
1653
- */
1654
- "border-w-l": [{
1655
- "border-l": [borderWidth]
1656
- }],
1657
- /**
1658
- * Border Opacity
1659
- * @see https://tailwindcss.com/docs/border-opacity
1660
- */
1661
- "border-opacity": [{
1662
- "border-opacity": [opacity]
1663
- }],
1664
- /**
1665
- * Border Style
1666
- * @see https://tailwindcss.com/docs/border-style
1667
- */
1668
- "border-style": [{
1669
- border: [...getLineStyles(), "hidden"]
1670
- }],
1671
- /**
1672
- * Divide Width X
1673
- * @see https://tailwindcss.com/docs/divide-width
1674
- */
1675
- "divide-x": [{
1676
- "divide-x": [borderWidth]
1677
- }],
1678
- /**
1679
- * Divide Width X Reverse
1680
- * @see https://tailwindcss.com/docs/divide-width
1681
- */
1682
- "divide-x-reverse": ["divide-x-reverse"],
1683
- /**
1684
- * Divide Width Y
1685
- * @see https://tailwindcss.com/docs/divide-width
1686
- */
1687
- "divide-y": [{
1688
- "divide-y": [borderWidth]
1689
- }],
1690
- /**
1691
- * Divide Width Y Reverse
1692
- * @see https://tailwindcss.com/docs/divide-width
1693
- */
1694
- "divide-y-reverse": ["divide-y-reverse"],
1695
- /**
1696
- * Divide Opacity
1697
- * @see https://tailwindcss.com/docs/divide-opacity
1698
- */
1699
- "divide-opacity": [{
1700
- "divide-opacity": [opacity]
1701
- }],
1702
- /**
1703
- * Divide Style
1704
- * @see https://tailwindcss.com/docs/divide-style
1705
- */
1706
- "divide-style": [{
1707
- divide: getLineStyles()
1708
- }],
1709
- /**
1710
- * Border Color
1711
- * @see https://tailwindcss.com/docs/border-color
1712
- */
1713
- "border-color": [{
1714
- border: [borderColor]
1715
- }],
1716
- /**
1717
- * Border Color X
1718
- * @see https://tailwindcss.com/docs/border-color
1719
- */
1720
- "border-color-x": [{
1721
- "border-x": [borderColor]
1722
- }],
1723
- /**
1724
- * Border Color Y
1725
- * @see https://tailwindcss.com/docs/border-color
1726
- */
1727
- "border-color-y": [{
1728
- "border-y": [borderColor]
1729
- }],
1730
- /**
1731
- * Border Color S
1732
- * @see https://tailwindcss.com/docs/border-color
1733
- */
1734
- "border-color-s": [{
1735
- "border-s": [borderColor]
1736
- }],
1737
- /**
1738
- * Border Color E
1739
- * @see https://tailwindcss.com/docs/border-color
1740
- */
1741
- "border-color-e": [{
1742
- "border-e": [borderColor]
1743
- }],
1744
- /**
1745
- * Border Color Top
1746
- * @see https://tailwindcss.com/docs/border-color
1747
- */
1748
- "border-color-t": [{
1749
- "border-t": [borderColor]
1750
- }],
1751
- /**
1752
- * Border Color Right
1753
- * @see https://tailwindcss.com/docs/border-color
1754
- */
1755
- "border-color-r": [{
1756
- "border-r": [borderColor]
1757
- }],
1758
- /**
1759
- * Border Color Bottom
1760
- * @see https://tailwindcss.com/docs/border-color
1761
- */
1762
- "border-color-b": [{
1763
- "border-b": [borderColor]
1764
- }],
1765
- /**
1766
- * Border Color Left
1767
- * @see https://tailwindcss.com/docs/border-color
1768
- */
1769
- "border-color-l": [{
1770
- "border-l": [borderColor]
1771
- }],
1772
- /**
1773
- * Divide Color
1774
- * @see https://tailwindcss.com/docs/divide-color
1775
- */
1776
- "divide-color": [{
1777
- divide: [borderColor]
1778
- }],
1779
- /**
1780
- * Outline Style
1781
- * @see https://tailwindcss.com/docs/outline-style
1782
- */
1783
- "outline-style": [{
1784
- outline: ["", ...getLineStyles()]
1785
- }],
1786
- /**
1787
- * Outline Offset
1788
- * @see https://tailwindcss.com/docs/outline-offset
1789
- */
1790
- "outline-offset": [{
1791
- "outline-offset": [isLength, isArbitraryValue]
1792
- }],
1793
- /**
1794
- * Outline Width
1795
- * @see https://tailwindcss.com/docs/outline-width
1796
- */
1797
- "outline-w": [{
1798
- outline: [isLength, isArbitraryLength]
1799
- }],
1800
- /**
1801
- * Outline Color
1802
- * @see https://tailwindcss.com/docs/outline-color
1803
- */
1804
- "outline-color": [{
1805
- outline: [colors]
1806
- }],
1807
- /**
1808
- * Ring Width
1809
- * @see https://tailwindcss.com/docs/ring-width
1810
- */
1811
- "ring-w": [{
1812
- ring: getLengthWithEmptyAndArbitrary()
1813
- }],
1814
- /**
1815
- * Ring Width Inset
1816
- * @see https://tailwindcss.com/docs/ring-width
1817
- */
1818
- "ring-w-inset": ["ring-inset"],
1819
- /**
1820
- * Ring Color
1821
- * @see https://tailwindcss.com/docs/ring-color
1822
- */
1823
- "ring-color": [{
1824
- ring: [colors]
1825
- }],
1826
- /**
1827
- * Ring Opacity
1828
- * @see https://tailwindcss.com/docs/ring-opacity
1829
- */
1830
- "ring-opacity": [{
1831
- "ring-opacity": [opacity]
1832
- }],
1833
- /**
1834
- * Ring Offset Width
1835
- * @see https://tailwindcss.com/docs/ring-offset-width
1836
- */
1837
- "ring-offset-w": [{
1838
- "ring-offset": [isLength, isArbitraryLength]
1839
- }],
1840
- /**
1841
- * Ring Offset Color
1842
- * @see https://tailwindcss.com/docs/ring-offset-color
1843
- */
1844
- "ring-offset-color": [{
1845
- "ring-offset": [colors]
1846
- }],
1847
- // Effects
1848
- /**
1849
- * Box Shadow
1850
- * @see https://tailwindcss.com/docs/box-shadow
1851
- */
1852
- shadow: [{
1853
- shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
1854
- }],
1855
- /**
1856
- * Box Shadow Color
1857
- * @see https://tailwindcss.com/docs/box-shadow-color
1858
- */
1859
- "shadow-color": [{
1860
- shadow: [isAny]
1861
- }],
1862
- /**
1863
- * Opacity
1864
- * @see https://tailwindcss.com/docs/opacity
1865
- */
1866
- opacity: [{
1867
- opacity: [opacity]
1868
- }],
1869
- /**
1870
- * Mix Blend Mode
1871
- * @see https://tailwindcss.com/docs/mix-blend-mode
1872
- */
1873
- "mix-blend": [{
1874
- "mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
1875
- }],
1876
- /**
1877
- * Background Blend Mode
1878
- * @see https://tailwindcss.com/docs/background-blend-mode
1879
- */
1880
- "bg-blend": [{
1881
- "bg-blend": getBlendModes()
1882
- }],
1883
- // Filters
1884
- /**
1885
- * Filter
1886
- * @deprecated since Tailwind CSS v3.0.0
1887
- * @see https://tailwindcss.com/docs/filter
1888
- */
1889
- filter: [{
1890
- filter: ["", "none"]
1891
- }],
1892
- /**
1893
- * Blur
1894
- * @see https://tailwindcss.com/docs/blur
1895
- */
1896
- blur: [{
1897
- blur: [blur]
1898
- }],
1899
- /**
1900
- * Brightness
1901
- * @see https://tailwindcss.com/docs/brightness
1902
- */
1903
- brightness: [{
1904
- brightness: [brightness]
1905
- }],
1906
- /**
1907
- * Contrast
1908
- * @see https://tailwindcss.com/docs/contrast
1909
- */
1910
- contrast: [{
1911
- contrast: [contrast]
1912
- }],
1913
- /**
1914
- * Drop Shadow
1915
- * @see https://tailwindcss.com/docs/drop-shadow
1916
- */
1917
- "drop-shadow": [{
1918
- "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
1919
- }],
1920
- /**
1921
- * Grayscale
1922
- * @see https://tailwindcss.com/docs/grayscale
1923
- */
1924
- grayscale: [{
1925
- grayscale: [grayscale]
1926
- }],
1927
- /**
1928
- * Hue Rotate
1929
- * @see https://tailwindcss.com/docs/hue-rotate
1930
- */
1931
- "hue-rotate": [{
1932
- "hue-rotate": [hueRotate]
1933
- }],
1934
- /**
1935
- * Invert
1936
- * @see https://tailwindcss.com/docs/invert
1937
- */
1938
- invert: [{
1939
- invert: [invert]
1940
- }],
1941
- /**
1942
- * Saturate
1943
- * @see https://tailwindcss.com/docs/saturate
1944
- */
1945
- saturate: [{
1946
- saturate: [saturate]
1947
- }],
1948
- /**
1949
- * Sepia
1950
- * @see https://tailwindcss.com/docs/sepia
1951
- */
1952
- sepia: [{
1953
- sepia: [sepia]
1954
- }],
1955
- /**
1956
- * Backdrop Filter
1957
- * @deprecated since Tailwind CSS v3.0.0
1958
- * @see https://tailwindcss.com/docs/backdrop-filter
1959
- */
1960
- "backdrop-filter": [{
1961
- "backdrop-filter": ["", "none"]
1962
- }],
1963
- /**
1964
- * Backdrop Blur
1965
- * @see https://tailwindcss.com/docs/backdrop-blur
1966
- */
1967
- "backdrop-blur": [{
1968
- "backdrop-blur": [blur]
1969
- }],
1970
- /**
1971
- * Backdrop Brightness
1972
- * @see https://tailwindcss.com/docs/backdrop-brightness
1973
- */
1974
- "backdrop-brightness": [{
1975
- "backdrop-brightness": [brightness]
1976
- }],
1977
- /**
1978
- * Backdrop Contrast
1979
- * @see https://tailwindcss.com/docs/backdrop-contrast
1980
- */
1981
- "backdrop-contrast": [{
1982
- "backdrop-contrast": [contrast]
1983
- }],
1984
- /**
1985
- * Backdrop Grayscale
1986
- * @see https://tailwindcss.com/docs/backdrop-grayscale
1987
- */
1988
- "backdrop-grayscale": [{
1989
- "backdrop-grayscale": [grayscale]
1990
- }],
1991
- /**
1992
- * Backdrop Hue Rotate
1993
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1994
- */
1995
- "backdrop-hue-rotate": [{
1996
- "backdrop-hue-rotate": [hueRotate]
1997
- }],
1998
- /**
1999
- * Backdrop Invert
2000
- * @see https://tailwindcss.com/docs/backdrop-invert
2001
- */
2002
- "backdrop-invert": [{
2003
- "backdrop-invert": [invert]
2004
- }],
2005
- /**
2006
- * Backdrop Opacity
2007
- * @see https://tailwindcss.com/docs/backdrop-opacity
2008
- */
2009
- "backdrop-opacity": [{
2010
- "backdrop-opacity": [opacity]
2011
- }],
2012
- /**
2013
- * Backdrop Saturate
2014
- * @see https://tailwindcss.com/docs/backdrop-saturate
2015
- */
2016
- "backdrop-saturate": [{
2017
- "backdrop-saturate": [saturate]
2018
- }],
2019
- /**
2020
- * Backdrop Sepia
2021
- * @see https://tailwindcss.com/docs/backdrop-sepia
2022
- */
2023
- "backdrop-sepia": [{
2024
- "backdrop-sepia": [sepia]
2025
- }],
2026
- // Tables
2027
- /**
2028
- * Border Collapse
2029
- * @see https://tailwindcss.com/docs/border-collapse
2030
- */
2031
- "border-collapse": [{
2032
- border: ["collapse", "separate"]
2033
- }],
2034
- /**
2035
- * Border Spacing
2036
- * @see https://tailwindcss.com/docs/border-spacing
2037
- */
2038
- "border-spacing": [{
2039
- "border-spacing": [borderSpacing]
2040
- }],
2041
- /**
2042
- * Border Spacing X
2043
- * @see https://tailwindcss.com/docs/border-spacing
2044
- */
2045
- "border-spacing-x": [{
2046
- "border-spacing-x": [borderSpacing]
2047
- }],
2048
- /**
2049
- * Border Spacing Y
2050
- * @see https://tailwindcss.com/docs/border-spacing
2051
- */
2052
- "border-spacing-y": [{
2053
- "border-spacing-y": [borderSpacing]
2054
- }],
2055
- /**
2056
- * Table Layout
2057
- * @see https://tailwindcss.com/docs/table-layout
2058
- */
2059
- "table-layout": [{
2060
- table: ["auto", "fixed"]
2061
- }],
2062
- /**
2063
- * Caption Side
2064
- * @see https://tailwindcss.com/docs/caption-side
2065
- */
2066
- caption: [{
2067
- caption: ["top", "bottom"]
2068
- }],
2069
- // Transitions and Animation
2070
- /**
2071
- * Tranisition Property
2072
- * @see https://tailwindcss.com/docs/transition-property
2073
- */
2074
- transition: [{
2075
- transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
2076
- }],
2077
- /**
2078
- * Transition Duration
2079
- * @see https://tailwindcss.com/docs/transition-duration
2080
- */
2081
- duration: [{
2082
- duration: getNumberAndArbitrary()
2083
- }],
2084
- /**
2085
- * Transition Timing Function
2086
- * @see https://tailwindcss.com/docs/transition-timing-function
2087
- */
2088
- ease: [{
2089
- ease: ["linear", "in", "out", "in-out", isArbitraryValue]
2090
- }],
2091
- /**
2092
- * Transition Delay
2093
- * @see https://tailwindcss.com/docs/transition-delay
2094
- */
2095
- delay: [{
2096
- delay: getNumberAndArbitrary()
2097
- }],
2098
- /**
2099
- * Animation
2100
- * @see https://tailwindcss.com/docs/animation
2101
- */
2102
- animate: [{
2103
- animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
2104
- }],
2105
- // Transforms
2106
- /**
2107
- * Transform
2108
- * @see https://tailwindcss.com/docs/transform
2109
- */
2110
- transform: [{
2111
- transform: ["", "gpu", "none"]
2112
- }],
2113
- /**
2114
- * Scale
2115
- * @see https://tailwindcss.com/docs/scale
2116
- */
2117
- scale: [{
2118
- scale: [scale]
2119
- }],
2120
- /**
2121
- * Scale X
2122
- * @see https://tailwindcss.com/docs/scale
2123
- */
2124
- "scale-x": [{
2125
- "scale-x": [scale]
2126
- }],
2127
- /**
2128
- * Scale Y
2129
- * @see https://tailwindcss.com/docs/scale
2130
- */
2131
- "scale-y": [{
2132
- "scale-y": [scale]
2133
- }],
2134
- /**
2135
- * Rotate
2136
- * @see https://tailwindcss.com/docs/rotate
2137
- */
2138
- rotate: [{
2139
- rotate: [isInteger, isArbitraryValue]
2140
- }],
2141
- /**
2142
- * Translate X
2143
- * @see https://tailwindcss.com/docs/translate
2144
- */
2145
- "translate-x": [{
2146
- "translate-x": [translate]
2147
- }],
2148
- /**
2149
- * Translate Y
2150
- * @see https://tailwindcss.com/docs/translate
2151
- */
2152
- "translate-y": [{
2153
- "translate-y": [translate]
2154
- }],
2155
- /**
2156
- * Skew X
2157
- * @see https://tailwindcss.com/docs/skew
2158
- */
2159
- "skew-x": [{
2160
- "skew-x": [skew]
2161
- }],
2162
- /**
2163
- * Skew Y
2164
- * @see https://tailwindcss.com/docs/skew
2165
- */
2166
- "skew-y": [{
2167
- "skew-y": [skew]
2168
- }],
2169
- /**
2170
- * Transform Origin
2171
- * @see https://tailwindcss.com/docs/transform-origin
2172
- */
2173
- "transform-origin": [{
2174
- origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
2175
- }],
2176
- // Interactivity
2177
- /**
2178
- * Accent Color
2179
- * @see https://tailwindcss.com/docs/accent-color
2180
- */
2181
- accent: [{
2182
- accent: ["auto", colors]
2183
- }],
2184
- /**
2185
- * Appearance
2186
- * @see https://tailwindcss.com/docs/appearance
2187
- */
2188
- appearance: [{
2189
- appearance: ["none", "auto"]
2190
- }],
2191
- /**
2192
- * Cursor
2193
- * @see https://tailwindcss.com/docs/cursor
2194
- */
2195
- cursor: [{
2196
- cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
2197
- }],
2198
- /**
2199
- * Caret Color
2200
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2201
- */
2202
- "caret-color": [{
2203
- caret: [colors]
2204
- }],
2205
- /**
2206
- * Pointer Events
2207
- * @see https://tailwindcss.com/docs/pointer-events
2208
- */
2209
- "pointer-events": [{
2210
- "pointer-events": ["none", "auto"]
2211
- }],
2212
- /**
2213
- * Resize
2214
- * @see https://tailwindcss.com/docs/resize
2215
- */
2216
- resize: [{
2217
- resize: ["none", "y", "x", ""]
2218
- }],
2219
- /**
2220
- * Scroll Behavior
2221
- * @see https://tailwindcss.com/docs/scroll-behavior
2222
- */
2223
- "scroll-behavior": [{
2224
- scroll: ["auto", "smooth"]
2225
- }],
2226
- /**
2227
- * Scroll Margin
2228
- * @see https://tailwindcss.com/docs/scroll-margin
2229
- */
2230
- "scroll-m": [{
2231
- "scroll-m": getSpacingWithArbitrary()
2232
- }],
2233
- /**
2234
- * Scroll Margin X
2235
- * @see https://tailwindcss.com/docs/scroll-margin
2236
- */
2237
- "scroll-mx": [{
2238
- "scroll-mx": getSpacingWithArbitrary()
2239
- }],
2240
- /**
2241
- * Scroll Margin Y
2242
- * @see https://tailwindcss.com/docs/scroll-margin
2243
- */
2244
- "scroll-my": [{
2245
- "scroll-my": getSpacingWithArbitrary()
2246
- }],
2247
- /**
2248
- * Scroll Margin Start
2249
- * @see https://tailwindcss.com/docs/scroll-margin
2250
- */
2251
- "scroll-ms": [{
2252
- "scroll-ms": getSpacingWithArbitrary()
2253
- }],
2254
- /**
2255
- * Scroll Margin End
2256
- * @see https://tailwindcss.com/docs/scroll-margin
2257
- */
2258
- "scroll-me": [{
2259
- "scroll-me": getSpacingWithArbitrary()
2260
- }],
2261
- /**
2262
- * Scroll Margin Top
2263
- * @see https://tailwindcss.com/docs/scroll-margin
2264
- */
2265
- "scroll-mt": [{
2266
- "scroll-mt": getSpacingWithArbitrary()
2267
- }],
2268
- /**
2269
- * Scroll Margin Right
2270
- * @see https://tailwindcss.com/docs/scroll-margin
2271
- */
2272
- "scroll-mr": [{
2273
- "scroll-mr": getSpacingWithArbitrary()
2274
- }],
2275
- /**
2276
- * Scroll Margin Bottom
2277
- * @see https://tailwindcss.com/docs/scroll-margin
2278
- */
2279
- "scroll-mb": [{
2280
- "scroll-mb": getSpacingWithArbitrary()
2281
- }],
2282
- /**
2283
- * Scroll Margin Left
2284
- * @see https://tailwindcss.com/docs/scroll-margin
2285
- */
2286
- "scroll-ml": [{
2287
- "scroll-ml": getSpacingWithArbitrary()
2288
- }],
2289
- /**
2290
- * Scroll Padding
2291
- * @see https://tailwindcss.com/docs/scroll-padding
2292
- */
2293
- "scroll-p": [{
2294
- "scroll-p": getSpacingWithArbitrary()
2295
- }],
2296
- /**
2297
- * Scroll Padding X
2298
- * @see https://tailwindcss.com/docs/scroll-padding
2299
- */
2300
- "scroll-px": [{
2301
- "scroll-px": getSpacingWithArbitrary()
2302
- }],
2303
- /**
2304
- * Scroll Padding Y
2305
- * @see https://tailwindcss.com/docs/scroll-padding
2306
- */
2307
- "scroll-py": [{
2308
- "scroll-py": getSpacingWithArbitrary()
2309
- }],
2310
- /**
2311
- * Scroll Padding Start
2312
- * @see https://tailwindcss.com/docs/scroll-padding
2313
- */
2314
- "scroll-ps": [{
2315
- "scroll-ps": getSpacingWithArbitrary()
2316
- }],
2317
- /**
2318
- * Scroll Padding End
2319
- * @see https://tailwindcss.com/docs/scroll-padding
2320
- */
2321
- "scroll-pe": [{
2322
- "scroll-pe": getSpacingWithArbitrary()
2323
- }],
2324
- /**
2325
- * Scroll Padding Top
2326
- * @see https://tailwindcss.com/docs/scroll-padding
2327
- */
2328
- "scroll-pt": [{
2329
- "scroll-pt": getSpacingWithArbitrary()
2330
- }],
2331
- /**
2332
- * Scroll Padding Right
2333
- * @see https://tailwindcss.com/docs/scroll-padding
2334
- */
2335
- "scroll-pr": [{
2336
- "scroll-pr": getSpacingWithArbitrary()
2337
- }],
2338
- /**
2339
- * Scroll Padding Bottom
2340
- * @see https://tailwindcss.com/docs/scroll-padding
2341
- */
2342
- "scroll-pb": [{
2343
- "scroll-pb": getSpacingWithArbitrary()
2344
- }],
2345
- /**
2346
- * Scroll Padding Left
2347
- * @see https://tailwindcss.com/docs/scroll-padding
2348
- */
2349
- "scroll-pl": [{
2350
- "scroll-pl": getSpacingWithArbitrary()
2351
- }],
2352
- /**
2353
- * Scroll Snap Align
2354
- * @see https://tailwindcss.com/docs/scroll-snap-align
2355
- */
2356
- "snap-align": [{
2357
- snap: ["start", "end", "center", "align-none"]
2358
- }],
2359
- /**
2360
- * Scroll Snap Stop
2361
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2362
- */
2363
- "snap-stop": [{
2364
- snap: ["normal", "always"]
2365
- }],
2366
- /**
2367
- * Scroll Snap Type
2368
- * @see https://tailwindcss.com/docs/scroll-snap-type
2369
- */
2370
- "snap-type": [{
2371
- snap: ["none", "x", "y", "both"]
2372
- }],
2373
- /**
2374
- * Scroll Snap Type Strictness
2375
- * @see https://tailwindcss.com/docs/scroll-snap-type
2376
- */
2377
- "snap-strictness": [{
2378
- snap: ["mandatory", "proximity"]
2379
- }],
2380
- /**
2381
- * Touch Action
2382
- * @see https://tailwindcss.com/docs/touch-action
2383
- */
2384
- touch: [{
2385
- touch: ["auto", "none", "manipulation"]
2386
- }],
2387
- /**
2388
- * Touch Action X
2389
- * @see https://tailwindcss.com/docs/touch-action
2390
- */
2391
- "touch-x": [{
2392
- "touch-pan": ["x", "left", "right"]
2393
- }],
2394
- /**
2395
- * Touch Action Y
2396
- * @see https://tailwindcss.com/docs/touch-action
2397
- */
2398
- "touch-y": [{
2399
- "touch-pan": ["y", "up", "down"]
2400
- }],
2401
- /**
2402
- * Touch Action Pinch Zoom
2403
- * @see https://tailwindcss.com/docs/touch-action
2404
- */
2405
- "touch-pz": ["touch-pinch-zoom"],
2406
- /**
2407
- * User Select
2408
- * @see https://tailwindcss.com/docs/user-select
2409
- */
2410
- select: [{
2411
- select: ["none", "text", "all", "auto"]
2412
- }],
2413
- /**
2414
- * Will Change
2415
- * @see https://tailwindcss.com/docs/will-change
2416
- */
2417
- "will-change": [{
2418
- "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
2419
- }],
2420
- // SVG
2421
- /**
2422
- * Fill
2423
- * @see https://tailwindcss.com/docs/fill
2424
- */
2425
- fill: [{
2426
- fill: [colors, "none"]
2427
- }],
2428
- /**
2429
- * Stroke Width
2430
- * @see https://tailwindcss.com/docs/stroke-width
2431
- */
2432
- "stroke-w": [{
2433
- stroke: [isLength, isArbitraryLength, isArbitraryNumber]
2434
- }],
2435
- /**
2436
- * Stroke
2437
- * @see https://tailwindcss.com/docs/stroke
2438
- */
2439
- stroke: [{
2440
- stroke: [colors, "none"]
2441
- }],
2442
- // Accessibility
2443
- /**
2444
- * Screen Readers
2445
- * @see https://tailwindcss.com/docs/screen-readers
2446
- */
2447
- sr: ["sr-only", "not-sr-only"],
2448
- /**
2449
- * Forced Color Adjust
2450
- * @see https://tailwindcss.com/docs/forced-color-adjust
2451
- */
2452
- "forced-color-adjust": [{
2453
- "forced-color-adjust": ["auto", "none"]
2454
- }]
2455
- },
2456
- conflictingClassGroups: {
2457
- overflow: ["overflow-x", "overflow-y"],
2458
- overscroll: ["overscroll-x", "overscroll-y"],
2459
- inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2460
- "inset-x": ["right", "left"],
2461
- "inset-y": ["top", "bottom"],
2462
- flex: ["basis", "grow", "shrink"],
2463
- gap: ["gap-x", "gap-y"],
2464
- p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2465
- px: ["pr", "pl"],
2466
- py: ["pt", "pb"],
2467
- m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2468
- mx: ["mr", "ml"],
2469
- my: ["mt", "mb"],
2470
- size: ["w", "h"],
2471
- "font-size": ["leading"],
2472
- "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2473
- "fvn-ordinal": ["fvn-normal"],
2474
- "fvn-slashed-zero": ["fvn-normal"],
2475
- "fvn-figure": ["fvn-normal"],
2476
- "fvn-spacing": ["fvn-normal"],
2477
- "fvn-fraction": ["fvn-normal"],
2478
- "line-clamp": ["display", "overflow"],
2479
- rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
2480
- "rounded-s": ["rounded-ss", "rounded-es"],
2481
- "rounded-e": ["rounded-se", "rounded-ee"],
2482
- "rounded-t": ["rounded-tl", "rounded-tr"],
2483
- "rounded-r": ["rounded-tr", "rounded-br"],
2484
- "rounded-b": ["rounded-br", "rounded-bl"],
2485
- "rounded-l": ["rounded-tl", "rounded-bl"],
2486
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
2487
- "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2488
- "border-w-x": ["border-w-r", "border-w-l"],
2489
- "border-w-y": ["border-w-t", "border-w-b"],
2490
- "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
2491
- "border-color-x": ["border-color-r", "border-color-l"],
2492
- "border-color-y": ["border-color-t", "border-color-b"],
2493
- "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
2494
- "scroll-mx": ["scroll-mr", "scroll-ml"],
2495
- "scroll-my": ["scroll-mt", "scroll-mb"],
2496
- "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
2497
- "scroll-px": ["scroll-pr", "scroll-pl"],
2498
- "scroll-py": ["scroll-pt", "scroll-pb"],
2499
- touch: ["touch-x", "touch-y", "touch-pz"],
2500
- "touch-x": ["touch"],
2501
- "touch-y": ["touch"],
2502
- "touch-pz": ["touch"]
2503
- },
2504
- conflictingClassGroupModifiers: {
2505
- "font-size": ["leading"]
2506
- }
2507
- };
2508
- };
2509
- var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
2510
-
2511
- // src/utils/cn.ts
2512
- function cn(...inputs) {
2513
- return twMerge((0, import_clsx.clsx)(inputs));
2514
- }
2515
-
2516
- // src/components/ui/input.tsx
2517
- var import_jsx_runtime = require("react/jsx-runtime");
2518
- var Input = React.forwardRef(
2519
- ({ className, type, ...props }, ref) => {
2520
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2521
- "input",
2522
- {
2523
- type,
2524
- className: cn(
2525
- "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2526
- className
2527
- ),
2528
- ref,
2529
- ...props
2530
- }
2531
- );
2532
- }
2533
- );
2534
- Input.displayName = "Input";
2535
-
2536
- // src/components/ui/scroll-area.tsx
2537
- var React2 = __toESM(require("react"));
2538
- var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"));
2539
- var import_jsx_runtime2 = require("react/jsx-runtime");
2540
- var ScrollArea = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2541
- ScrollAreaPrimitive.Root,
2542
- {
2543
- ref,
2544
- className: cn("relative overflow-hidden", className),
2545
- ...props,
2546
- children: [
2547
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
2548
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ScrollBar, {}),
2549
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ScrollAreaPrimitive.Corner, {})
2550
- ]
2551
- }
2552
- ));
2553
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
2554
- var ScrollBar = React2.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2555
- ScrollAreaPrimitive.ScrollAreaScrollbar,
2556
- {
2557
- ref,
2558
- orientation,
2559
- className: cn(
2560
- "flex touch-none select-none transition-colors",
2561
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
2562
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
2563
- className
2564
- ),
2565
- ...props,
2566
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
2567
- }
2568
- ));
2569
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
2570
-
2571
- // src/components/DigitalColleagues/document-preview.tsx
2572
- var import_react4 = require("motion/react");
2573
- var import_lucide_react4 = require("lucide-react");
2574
- var import_react5 = require("react");
2575
-
2576
- // src/components/ui/button.tsx
2577
- var import_react_slot = require("@radix-ui/react-slot");
2578
- var import_class_variance_authority = require("class-variance-authority");
2579
- var React3 = __toESM(require("react"));
2580
- var import_jsx_runtime3 = require("react/jsx-runtime");
2581
- var buttonVariants = (0, import_class_variance_authority.cva)(
2582
- "inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
2583
- {
2584
- defaultVariants: {
2585
- size: "default",
2586
- variant: "default"
2587
- },
2588
- variants: {
2589
- size: {
2590
- clear: "",
2591
- default: "h-10 px-4 py-2",
2592
- icon: "h-10 w-10",
2593
- lg: "h-11 rounded px-8",
2594
- sm: "h-9 rounded px-3"
2595
- },
2596
- variant: {
2597
- default: "bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",
2598
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
2599
- ghost: "hover:bg-card hover:text-accent",
2600
- link: "text-primary items-start justify-start underline-offset-4 hover:underline",
2601
- outline: "border border-border bg-background hover:bg-card hover:text-accent",
2602
- secondary: "bg-secondary text-secondary-foreground hover:bg-accent"
2603
- }
2604
- }
2605
- }
2606
- );
2607
- var Button = React3.forwardRef(
2608
- ({ asChild = false, className, size, variant, ...props }, ref) => {
2609
- const Comp = asChild ? import_react_slot.Slot : "button";
2610
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { className: cn(buttonVariants({ className, size, variant })), ref, ...props });
2611
- }
2612
- );
2613
- Button.displayName = "Button";
2614
-
2615
- // src/components/DigitalColleagues/document-edit.tsx
2616
- var import_react2 = require("motion/react");
2617
- var import_lucide_react3 = require("lucide-react");
2618
- var import_react3 = require("react");
2619
-
2620
- // src/components/ui/textarea.tsx
2621
- var React4 = __toESM(require("react"));
2622
- var import_jsx_runtime4 = require("react/jsx-runtime");
2623
- var Textarea = React4.forwardRef(
2624
- ({ className, ...props }, ref) => {
2625
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2626
- "textarea",
2627
- {
2628
- className: cn(
2629
- "flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2630
- className
2631
- ),
2632
- ref,
2633
- ...props
2634
- }
2635
- );
2636
- }
2637
- );
2638
- Textarea.displayName = "Textarea";
2639
-
2640
- // src/components/ui/select.tsx
2641
- var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
2642
- var import_lucide_react = require("lucide-react");
2643
- var React5 = __toESM(require("react"));
2644
- var import_jsx_runtime5 = require("react/jsx-runtime");
2645
- var Select = SelectPrimitive.Root;
2646
- var SelectValue = SelectPrimitive.Value;
2647
- var SelectTrigger = React5.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2648
- SelectPrimitive.Trigger,
2649
- {
2650
- className: cn(
2651
- "flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
2652
- className
2653
- ),
2654
- ref,
2655
- ...props,
2656
- children: [
2657
- children,
2658
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
2659
- ]
2660
- }
2661
- ));
2662
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
2663
- var SelectScrollUpButton = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2664
- SelectPrimitive.ScrollUpButton,
2665
- {
2666
- className: cn("flex cursor-default items-center justify-center py-1", className),
2667
- ref,
2668
- ...props,
2669
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ChevronUp, { className: "h-4 w-4" })
2670
- }
2671
- ));
2672
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
2673
- var SelectScrollDownButton = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2674
- SelectPrimitive.ScrollDownButton,
2675
- {
2676
- className: cn("flex cursor-default items-center justify-center py-1", className),
2677
- ref,
2678
- ...props,
2679
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.ChevronDown, { className: "h-4 w-4" })
2680
- }
2681
- ));
2682
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
2683
- var SelectContent = React5.forwardRef(({ children, className, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2684
- SelectPrimitive.Content,
2685
- {
2686
- className: cn(
2687
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md 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",
2688
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
2689
- className
2690
- ),
2691
- position,
2692
- ref,
2693
- ...props,
2694
- children: [
2695
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectScrollUpButton, {}),
2696
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2697
- SelectPrimitive.Viewport,
2698
- {
2699
- className: cn(
2700
- "p-1",
2701
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
2702
- ),
2703
- children
2704
- }
2705
- ),
2706
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectScrollDownButton, {})
2707
- ]
2708
- }
2709
- ) }));
2710
- SelectContent.displayName = SelectPrimitive.Content.displayName;
2711
- var SelectLabel = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2712
- SelectPrimitive.Label,
2713
- {
2714
- className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
2715
- ref,
2716
- ...props
2717
- }
2718
- ));
2719
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
2720
- var SelectItem = React5.forwardRef(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2721
- SelectPrimitive.Item,
2722
- {
2723
- className: cn(
2724
- "relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2725
- className
2726
- ),
2727
- ref,
2728
- ...props,
2729
- children: [
2730
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react.Check, { className: "h-4 w-4" }) }) }),
2731
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SelectPrimitive.ItemText, { children })
2732
- ]
2733
- }
2734
- ));
2735
- SelectItem.displayName = SelectPrimitive.Item.displayName;
2736
- var SelectSeparator = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2737
- SelectPrimitive.Separator,
2738
- {
2739
- className: cn("-mx-1 my-1 h-px bg-muted", className),
2740
- ref,
2741
- ...props
2742
- }
2743
- ));
2744
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
2745
-
2746
- // src/components/AdvancedComponents/EditableField.tsx
2747
- var import_react = require("react");
2748
-
2749
- // src/components/ui/label.tsx
2750
- var React6 = __toESM(require("react"));
2751
- var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
2752
- var import_class_variance_authority2 = require("class-variance-authority");
2753
- var import_jsx_runtime6 = require("react/jsx-runtime");
2754
- var labelVariants = (0, import_class_variance_authority2.cva)(
2755
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
2756
- );
2757
- var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
2758
- Label2.displayName = LabelPrimitive.Root.displayName;
2759
-
2760
- // src/components/AdvancedComponents/EditableField.tsx
2761
- var import_lucide_react2 = require("lucide-react");
2762
- var import_jsx_runtime7 = require("react/jsx-runtime");
2763
- var EditableField = ({
2764
- fieldName,
2765
- value,
2766
- label,
2767
- multiline = false,
2768
- onSave,
2769
- className = "",
2770
- disabled = false
2771
- }) => {
2772
- const [isEditing, setIsEditing] = (0, import_react.useState)(false);
2773
- const [tempValue, setTempValue] = (0, import_react.useState)("");
2774
- const handleFieldClick = () => {
2775
- if (!disabled) {
2776
- setIsEditing(true);
2777
- setTempValue(value);
2778
- }
2779
- };
2780
- const handleSave = async () => {
2781
- if (tempValue !== value) {
2782
- await onSave(fieldName, tempValue);
2783
- }
2784
- setIsEditing(false);
2785
- };
2786
- const handleKeyPress = (e) => {
2787
- if (e.key === "Enter" && !multiline) {
2788
- handleSave();
2789
- } else if (e.key === "Enter" && e.ctrlKey && multiline) {
2790
- handleSave();
2791
- } else if (e.key === "Escape") {
2792
- setIsEditing(false);
2793
- setTempValue("");
2794
- }
2795
- };
2796
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: `space-y-2 ${className}`, children: [
2797
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Label2, { children: label }),
2798
- isEditing ? multiline ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2799
- Textarea,
2800
- {
2801
- value: tempValue,
2802
- onChange: (e) => setTempValue(e.target.value),
2803
- onBlur: handleSave,
2804
- onKeyDown: handleKeyPress,
2805
- autoFocus: true,
2806
- rows: 4,
2807
- className: "resize-none"
2808
- }
2809
- ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2810
- Input,
2811
- {
2812
- value: tempValue,
2813
- onChange: (e) => setTempValue(e.target.value),
2814
- onBlur: handleSave,
2815
- onKeyPress: handleKeyPress,
2816
- autoFocus: true,
2817
- className: "text-lg font-medium"
2818
- }
2819
- ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2820
- "div",
2821
- {
2822
- onClick: handleFieldClick,
2823
- className: `${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${multiline ? "min-h-[100px] max-h-[300px]" : "min-h-[40px]"} flex items-start gap-2 overflow-hidden`,
2824
- children: [
2825
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `${multiline ? "text-sm text-muted-foreground max-h-[280px] overflow-y-auto break-words" : "text-lg font-medium text-foreground"} flex-1 whitespace-pre-wrap break-words`, children: value || "Click to edit..." }),
2826
- !disabled && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react2.Edit, { className: "h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0" })
2827
- ]
2828
- }
2829
- )
2830
- ] });
2831
- };
2832
-
2833
- // src/components/DigitalColleagues/document-edit.tsx
2834
- var import_jsx_runtime8 = require("react/jsx-runtime");
2835
- function DocumentEdit({
2836
- document,
2837
- onSave,
2838
- onCancel,
2839
- availableDocuments = [],
2840
- knowledgeContexts = []
2841
- }) {
2842
- const [editedDocument, setEditedDocument] = (0, import_react3.useState)({
2843
- ...document,
2844
- updatedAt: /* @__PURE__ */ new Date()
2845
- });
2846
- const [isMetadataExpanded, setIsMetadataExpanded] = (0, import_react3.useState)(false);
2847
- const [metadataFields, setMetadataFields] = (0, import_react3.useState)(() => {
2848
- const fields = [];
2849
- let idCounter = 0;
2850
- const contextKeys = /* @__PURE__ */ new Set();
2851
- knowledgeContexts.forEach((context) => {
2852
- context.menuConfig.groupBy.forEach((key) => contextKeys.add(key));
2853
- });
2854
- contextKeys.forEach((key) => {
2855
- fields.push({
2856
- id: `context_field_${idCounter++}`,
2857
- key,
2858
- value: document.metadata?.[key] ? String(document.metadata[key]) : "",
2859
- isContextKey: true
2860
- });
2861
- });
2862
- if (document.metadata) {
2863
- Object.entries(document.metadata).forEach(([key, value]) => {
2864
- if (!contextKeys.has(key)) {
2865
- fields.push({
2866
- id: `existing_field_${idCounter++}`,
2867
- key,
2868
- value: String(value),
2869
- isContextKey: false
2870
- });
2871
- }
2872
- });
2873
- }
2874
- return fields;
2875
- });
2876
- const formatIcon = (format) => {
2877
- switch (format) {
2878
- case "markdown":
2879
- case "mdx":
2880
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.FileText, { className: "h-6 w-6 text-primary" });
2881
- case "richtext":
2882
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.File, { className: "h-6 w-6 text-success" });
2883
- case "text":
2884
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Type, { className: "h-6 w-6 text-muted-foreground" });
2885
- default:
2886
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.File, { className: "h-6 w-6 text-muted-foreground" });
2887
- }
2888
- };
2889
- const formatBadgeColor = (format) => {
2890
- switch (format) {
2891
- case "markdown":
2892
- return "bg-primary/10 text-primary border-primary/20";
2893
- case "mdx":
2894
- return "bg-secondary/10 text-secondary border-secondary/20";
2895
- case "richtext":
2896
- return "bg-success/10 text-success border-success/20";
2897
- case "text":
2898
- return "bg-muted/50 text-muted-foreground border-muted-foreground/20";
2899
- default:
2900
- return "bg-muted text-muted-foreground border-border";
2901
- }
2902
- };
2903
- const getSuggestedMetadataKeys = () => {
2904
- const keysFromDocuments = /* @__PURE__ */ new Set();
2905
- availableDocuments.forEach((doc) => {
2906
- if (doc.metadata) {
2907
- Object.keys(doc.metadata).forEach((key) => keysFromDocuments.add(key));
2908
- }
2909
- });
2910
- return {
2911
- documentKeys: Array.from(keysFromDocuments).sort()
2912
- };
2913
- };
2914
- const getSuggestedValues = (key) => {
2915
- const values = /* @__PURE__ */ new Set();
2916
- availableDocuments.forEach((doc) => {
2917
- if (doc.metadata?.[key]) {
2918
- values.add(String(doc.metadata[key]));
2919
- }
2920
- });
2921
- return Array.from(values).sort();
2922
- };
2923
- const suggestedKeys = getSuggestedMetadataKeys();
2924
- const handleSave = () => {
2925
- onSave(editedDocument);
2926
- };
2927
- (0, import_react3.useEffect)(() => {
2928
- const metadata = metadataFields.filter((field) => field.key.trim() !== "" && field.value.trim() !== "").reduce(
2929
- (acc, field) => ({
2930
- ...acc,
2931
- [field.key]: field.value
2932
- }),
2933
- {}
2934
- );
2935
- setEditedDocument((prev) => ({
2936
- ...prev,
2937
- metadata: Object.keys(metadata).length > 0 ? metadata : void 0
2938
- }));
2939
- }, [metadataFields]);
2940
- const handleMetadataKeyChange = (fieldId, newKey) => {
2941
- setMetadataFields(
2942
- (prev) => prev.map((field) => field.id === fieldId ? { ...field, key: newKey } : field)
2943
- );
2944
- };
2945
- const handleMetadataValueChange = (fieldId, newValue) => {
2946
- setMetadataFields(
2947
- (prev) => prev.map((field) => field.id === fieldId ? { ...field, value: newValue } : field)
2948
- );
2949
- };
2950
- const handleMetadataValueSelect = (fieldId, value) => {
2951
- if (value === "__custom__") {
2952
- handleMetadataValueChange(fieldId, "");
2953
- } else {
2954
- handleMetadataValueChange(fieldId, value);
2955
- }
2956
- };
2957
- const handleAddMetadataField = () => {
2958
- const newField = {
2959
- id: `field_${Date.now()}`,
2960
- key: "",
2961
- value: "",
2962
- isContextKey: false
2963
- };
2964
- setMetadataFields((prev) => [...prev, newField]);
2965
- };
2966
- const handleRemoveMetadataField = (fieldId) => {
2967
- setMetadataFields((prev) => prev.filter((field) => field.id !== fieldId));
2968
- };
2969
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2970
- import_react2.motion.div,
2971
- {
2972
- initial: { opacity: 0, y: 20 },
2973
- animate: { opacity: 1, y: 0 },
2974
- transition: { duration: 0.3 },
2975
- className: "h-full flex flex-col",
2976
- children: [
2977
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "border-b border-border bg-card p-8 pb-6", children: [
2978
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start justify-between gap-4 mb-4", children: [
2979
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start gap-4 flex-1 min-w-0", children: [
2980
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-shrink-0 p-3 rounded-xl bg-muted border border-border", children: formatIcon(editedDocument.format) }),
2981
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex-1 min-w-0", children: [
2982
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start gap-4 mb-2 leading-tight", children: [
2983
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2984
- EditableField,
2985
- {
2986
- fieldName: "title",
2987
- value: editedDocument.title,
2988
- label: "",
2989
- onSave: (fieldName, value) => setEditedDocument((prev) => ({ ...prev, title: value })),
2990
- className: "[&>div:last-child]:text-2xl [&>div:last-child]:font-bold [&>div:last-child]:leading-tight [&>div:last-child]:text-foreground [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"
2991
- }
2992
- ) }),
2993
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2994
- "span",
2995
- {
2996
- className: `inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${formatBadgeColor(
2997
- editedDocument.format
2998
- )} flex-shrink-0 mt-1`,
2999
- children: editedDocument.format.toUpperCase()
3000
- }
3001
- )
3002
- ] }),
3003
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3004
- EditableField,
3005
- {
3006
- fieldName: "description",
3007
- value: editedDocument.description || "Click to add description...",
3008
- label: "",
3009
- multiline: true,
3010
- onSave: (fieldName, value) => setEditedDocument((prev) => ({ ...prev, description: value })),
3011
- className: "[&>div:last-child]:text-muted-foreground [&>div:last-child]:text-lg [&>div:last-child]:leading-relaxed [&>div:last-child]:p-0 [&>div:last-child]:border-0 [&>div:last-child]:hover:bg-muted/30 [&>div:last-child]:min-h-0"
3012
- }
3013
- ) })
3014
- ] })
3015
- ] }),
3016
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
3017
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3018
- Button,
3019
- {
3020
- variant: "ghost",
3021
- size: "sm",
3022
- onClick: () => setIsMetadataExpanded(!isMetadataExpanded),
3023
- className: "gap-2",
3024
- children: [
3025
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Info, { className: "h-4 w-4" }),
3026
- "Metadata",
3027
- metadataFields.filter(
3028
- (field) => field.key.trim() !== "" && field.value.trim() !== ""
3029
- ).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "inline-flex items-center justify-center w-5 h-5 text-xs font-medium bg-primary/10 text-primary rounded-full", children: metadataFields.filter(
3030
- (field) => field.key.trim() !== "" && field.value.trim() !== ""
3031
- ).length }),
3032
- isMetadataExpanded ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.ChevronRight, { className: "h-4 w-4" })
3033
- ]
3034
- }
3035
- ),
3036
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Button, { variant: "outline", size: "sm", onClick: onCancel, className: "gap-2", children: [
3037
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.X, { className: "h-4 w-4" }),
3038
- "Cancel"
3039
- ] }),
3040
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Button, { size: "sm", onClick: handleSave, className: "gap-2", children: [
3041
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Save, { className: "h-4 w-4" }),
3042
- "Save Changes"
3043
- ] })
3044
- ] })
3045
- ] }),
3046
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3047
- import_react2.motion.div,
3048
- {
3049
- initial: false,
3050
- animate: {
3051
- height: isMetadataExpanded ? "auto" : 0,
3052
- opacity: isMetadataExpanded ? 1 : 0
3053
- },
3054
- transition: { duration: 0.2, ease: "easeInOut" },
3055
- className: "overflow-hidden",
3056
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "pt-4 border-t border-border mt-4", children: [
3057
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
3058
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("h3", { className: "text-sm font-semibold text-foreground flex items-center gap-2", children: [
3059
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Info, { className: "h-4 w-4" }),
3060
- "Document Metadata"
3061
- ] }),
3062
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3063
- Button,
3064
- {
3065
- type: "button",
3066
- variant: "outline",
3067
- size: "sm",
3068
- onClick: handleAddMetadataField,
3069
- className: "gap-1 h-8",
3070
- children: [
3071
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Plus, { className: "h-3 w-3" }),
3072
- "Add Field"
3073
- ]
3074
- }
3075
- )
3076
- ] }),
3077
- suggestedKeys.documentKeys.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "text-xs text-muted-foreground mb-3", children: [
3078
- "Additional from documents: ",
3079
- suggestedKeys.documentKeys.slice(0, 4).join(", "),
3080
- suggestedKeys.documentKeys.length > 4 && ` +${suggestedKeys.documentKeys.length - 4} more`
3081
- ] }),
3082
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "bg-muted rounded-lg p-4 border border-border", children: metadataFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "space-y-2", children: metadataFields.map((field) => {
3083
- const suggestedValues = getSuggestedValues(field.key);
3084
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-2 items-center", children: [
3085
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3086
- Input,
3087
- {
3088
- value: field.key,
3089
- onChange: (e) => handleMetadataKeyChange(field.id, e.target.value),
3090
- placeholder: "Key",
3091
- className: `w-32 h-8 text-sm ${field.isContextKey ? "bg-primary/5 border-primary/30" : ""}`,
3092
- list: `metadata-keys-${field.id}`,
3093
- disabled: field.isContextKey
3094
- }
3095
- ),
3096
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("datalist", { id: `metadata-keys-${field.id}`, children: suggestedKeys.documentKeys.map((suggestedKey) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: suggestedKey }, suggestedKey)) }),
3097
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-muted-foreground text-sm", children: "=" }),
3098
- suggestedValues.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
3099
- Select,
3100
- {
3101
- value: field.value || "",
3102
- onValueChange: (newValue) => handleMetadataValueSelect(field.id, newValue),
3103
- children: [
3104
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectTrigger, { className: "flex-1 h-8 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectValue, { placeholder: "Value" }) }),
3105
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(SelectContent, { children: [
3106
- suggestedValues.map((suggestedValue) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectItem, { value: suggestedValue, children: suggestedValue }, suggestedValue)),
3107
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectItem, { value: "__custom__", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-muted-foreground text-xs", children: "Custom..." }) })
3108
- ] })
3109
- ]
3110
- }
3111
- ) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3112
- Input,
3113
- {
3114
- value: field.value || "",
3115
- onChange: (e) => handleMetadataValueChange(field.id, e.target.value),
3116
- placeholder: "Value",
3117
- className: "flex-1 h-8 text-sm"
3118
- }
3119
- ),
3120
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3121
- Button,
3122
- {
3123
- type: "button",
3124
- variant: "ghost",
3125
- size: "sm",
3126
- onClick: () => handleRemoveMetadataField(field.id),
3127
- className: "h-8 w-8 p-0 text-muted-foreground hover:text-destructive",
3128
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.X, { className: "h-3 w-3" })
3129
- }
3130
- )
3131
- ] }, field.id);
3132
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "text-center py-4", children: [
3133
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-muted-foreground mb-2", children: "No metadata fields" }),
3134
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-muted-foreground", children: 'Click "Add Field" to create metadata' })
3135
- ] }) })
3136
- ] })
3137
- }
3138
- )
3139
- ] }),
3140
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "p-8", children: [
3141
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("label", { className: "block text-sm font-medium text-foreground mb-4", children: "Content" }),
3142
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3143
- Textarea,
3144
- {
3145
- value: editedDocument.content || "",
3146
- onChange: (e) => setEditedDocument((prev) => ({ ...prev, content: e.target.value })),
3147
- placeholder: "Document content...",
3148
- className: "min-h-[400px] font-mono text-sm",
3149
- style: { resize: "vertical" }
3150
- }
3151
- )
3152
- ] }) })
3153
- ]
3154
- }
3155
- );
3156
- }
3157
-
3158
- // src/components/DigitalColleagues/document-preview.tsx
3159
- var import_jsx_runtime9 = require("react/jsx-runtime");
3160
- var defaultMarkdownRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3161
- "div",
3162
- {
3163
- className: "prose prose-slate dark:prose-invert max-w-none",
3164
- dangerouslySetInnerHTML: {
3165
- __html: content.replace(/\n/g, "<br>").replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/`(.*?)`/g, '<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm, '<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm, '<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm, '<h3 class="text-lg font-medium mb-2">$1</h3>')
3166
- }
3167
- }
3168
- );
3169
- var defaultTextRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "whitespace-pre-wrap font-mono text-sm leading-relaxed", children: content });
3170
- var defaultRichTextRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "prose prose-slate dark:prose-invert max-w-none", children: [
3171
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { className: "text-amber-800 dark:text-amber-200 text-sm", children: [
3172
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { children: "RichText Renderer:" }),
3173
- " This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."
3174
- ] }) }),
3175
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("pre", { className: "text-sm", children: content })
3176
- ] });
3177
- var defaultMDXRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "prose prose-slate dark:prose-invert max-w-none", children: [
3178
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("p", { className: "text-blue-800 dark:text-blue-200 text-sm", children: [
3179
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("strong", { children: "MDX Renderer:" }),
3180
- " This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."
3181
- ] }) }),
3182
- defaultMarkdownRenderer(content)
3183
- ] });
3184
- function DocumentPreview({
3185
- document,
3186
- onDocumentUpdate,
3187
- editable = true,
3188
- renderers,
3189
- availableDocuments = [],
3190
- knowledgeContexts = []
3191
- }) {
3192
- const [isEditing, setIsEditing] = (0, import_react5.useState)(false);
3193
- const [isMetadataExpanded, setIsMetadataExpanded] = (0, import_react5.useState)(false);
3194
- const formatIcon = (format) => {
3195
- switch (format) {
3196
- case "markdown":
3197
- case "mdx":
3198
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.FileText, { className: "h-6 w-6 text-primary" });
3199
- case "richtext":
3200
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.File, { className: "h-6 w-6 text-success" });
3201
- case "text":
3202
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Type, { className: "h-6 w-6 text-muted-foreground" });
3203
- default:
3204
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.File, { className: "h-6 w-6 text-muted-foreground" });
3205
- }
3206
- };
3207
- const formatBadgeColor = (format) => {
3208
- switch (format) {
3209
- case "markdown":
3210
- return "bg-primary/10 text-primary border-primary/20";
3211
- case "mdx":
3212
- return "bg-secondary/10 text-secondary border-secondary/20";
3213
- case "richtext":
3214
- return "bg-success/10 text-success border-success/20";
3215
- case "text":
3216
- return "bg-muted/50 text-muted-foreground border-muted-foreground/20";
3217
- default:
3218
- return "bg-muted text-muted-foreground border-border";
3219
- }
3220
- };
3221
- const renderContent = (content, format) => {
3222
- const defaultRenderers = {
3223
- markdown: defaultMarkdownRenderer,
3224
- mdx: defaultMDXRenderer,
3225
- richtext: defaultRichTextRenderer,
3226
- text: defaultTextRenderer
3227
- };
3228
- const renderer = renderers?.[format] || defaultRenderers[format];
3229
- if (renderer) {
3230
- return renderer(content);
3231
- }
3232
- return defaultTextRenderer(content);
3233
- };
3234
- const handleSave = (updatedDocument) => {
3235
- setIsEditing(false);
3236
- onDocumentUpdate?.(updatedDocument);
3237
- };
3238
- const handleCancel = () => {
3239
- setIsEditing(false);
3240
- };
3241
- if (isEditing) {
3242
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3243
- DocumentEdit,
3244
- {
3245
- document,
3246
- onSave: handleSave,
3247
- onCancel: handleCancel,
3248
- availableDocuments,
3249
- knowledgeContexts
3250
- }
3251
- );
3252
- }
3253
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3254
- import_react4.motion.div,
3255
- {
3256
- initial: { opacity: 0, y: 20 },
3257
- animate: { opacity: 1, y: 0 },
3258
- transition: { duration: 0.3 },
3259
- className: "h-full flex flex-col",
3260
- children: [
3261
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "border-b border-border bg-card p-8 pb-6", children: [
3262
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start justify-between gap-4 mb-4", children: [
3263
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-start gap-4 flex-1 min-w-0", children: [
3264
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-shrink-0 p-3 rounded-xl bg-muted border border-border", children: formatIcon(document.format) }),
3265
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-1 min-w-0", children: [
3266
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("h1", { className: "text-2xl font-bold text-foreground mb-2 leading-tight", children: [
3267
- document.title,
3268
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: `inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${formatBadgeColor(document.format)}`, children: document.format.toUpperCase() })
3269
- ] }),
3270
- document.description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-muted-foreground text-lg leading-relaxed", children: document.description })
3271
- ] })
3272
- ] }),
3273
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
3274
- document.metadata && Object.keys(document.metadata).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3275
- Button,
3276
- {
3277
- variant: "ghost",
3278
- size: "sm",
3279
- onClick: () => setIsMetadataExpanded(!isMetadataExpanded),
3280
- className: "gap-2",
3281
- children: [
3282
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Info, { className: "h-4 w-4" }),
3283
- "Metadata",
3284
- isMetadataExpanded ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" })
3285
- ]
3286
- }
3287
- ),
3288
- editable && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3289
- Button,
3290
- {
3291
- variant: "outline",
3292
- size: "sm",
3293
- onClick: () => setIsEditing(true),
3294
- className: "gap-2",
3295
- children: [
3296
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Edit3, { className: "h-4 w-4" }),
3297
- "Edit"
3298
- ]
3299
- }
3300
- )
3301
- ] })
3302
- ] }),
3303
- document.metadata && Object.keys(document.metadata).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3304
- import_react4.motion.div,
3305
- {
3306
- initial: false,
3307
- animate: {
3308
- height: isMetadataExpanded ? "auto" : 0,
3309
- opacity: isMetadataExpanded ? 1 : 0
3310
- },
3311
- transition: { duration: 0.2, ease: "easeInOut" },
3312
- className: "overflow-hidden",
3313
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "pt-4 border-t border-border mt-4", children: [
3314
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("h3", { className: "text-sm font-semibold text-foreground mb-3 flex items-center gap-2", children: [
3315
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.Info, { className: "h-4 w-4" }),
3316
- "Document Metadata"
3317
- ] }),
3318
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-muted rounded-lg p-4 border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm", children: Object.entries(document.metadata).map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-1", children: [
3319
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-muted-foreground font-medium text-xs uppercase tracking-wide", children: key.replace(/([A-Z])/g, " $1").trim() }),
3320
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-foreground font-medium", children: String(value) })
3321
- ] }, key)) }) })
3322
- ] })
3323
- }
3324
- )
3325
- ] }),
3326
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "p-8", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "space-y-4", children: document.content ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-card border border-border rounded-xl p-6 overflow-hidden", children: renderContent(document.content, document.format) }) }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border", children: [
3327
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react4.FileText, { className: "h-8 w-8 text-muted-foreground" }) }),
3328
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h4", { className: "text-foreground font-medium mb-1", children: "No content available" }),
3329
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "text-muted-foreground text-sm", children: "This document doesn't have preview content" })
3330
- ] }) }) }) })
3331
- ]
3332
- }
3333
- );
3334
- }
3335
-
3336
- // src/components/DigitalColleagues/knowledge-browser.tsx
3337
- var import_jsx_runtime10 = require("react/jsx-runtime");
3338
- function MenuItem({
3339
- label,
3340
- documents,
3341
- children,
3342
- level,
3343
- onDocumentClick,
3344
- selectedDocumentId,
3345
- showDocumentCount = true
3346
- }) {
3347
- const [isExpanded, setIsExpanded] = (0, import_react7.useState)(level === 0);
3348
- const hasChildren = children && Object.keys(children).length > 0;
3349
- const totalDocuments = documents.length + (children ? Object.values(children).reduce((acc, child) => acc + child.documents.length, 0) : 0);
3350
- const formatDocumentIcon = (format) => {
3351
- switch (format) {
3352
- case "markdown":
3353
- case "mdx":
3354
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.FileText, { className: "h-3.5 w-3.5 text-muted-foreground" });
3355
- case "richtext":
3356
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.File, { className: "h-3.5 w-3.5 text-muted-foreground" });
3357
- default:
3358
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.File, { className: "h-3.5 w-3.5 text-muted-foreground" });
3359
- }
3360
- };
3361
- const getCategoryColor = (level2) => {
3362
- const colors = [
3363
- "bg-primary",
3364
- "bg-secondary",
3365
- "bg-accent",
3366
- "bg-chart-1"
3367
- ];
3368
- return colors[level2 % colors.length];
3369
- };
3370
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-1", children: [
3371
- (hasChildren || documents.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3372
- import_react6.motion.div,
3373
- {
3374
- className: `group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${isExpanded ? "bg-card shadow-sm border border-border" : "hover:bg-muted/50 hover:shadow-sm"}`,
3375
- style: { marginLeft: `${level * 20}px` },
3376
- onClick: () => setIsExpanded(!isExpanded),
3377
- whileHover: { scale: 1.01 },
3378
- whileTap: { scale: 0.99 },
3379
- children: [
3380
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: `w-1 h-6 rounded-full ${getCategoryColor(level)}` }),
3381
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3382
- import_react6.motion.div,
3383
- {
3384
- animate: { rotate: isExpanded ? 90 : 0 },
3385
- transition: { duration: 0.2 },
3386
- className: "flex-shrink-0",
3387
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
3388
- }
3389
- ),
3390
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-1 flex items-center justify-between min-w-0", children: [
3391
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center gap-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "font-medium text-foreground truncate", children: label }) }),
3392
- showDocumentCount && totalDocuments > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-shrink-0 ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full", children: totalDocuments }) })
3393
- ] })
3394
- ]
3395
- }
3396
- ),
3397
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3398
- import_react6.motion.div,
3399
- {
3400
- initial: false,
3401
- animate: {
3402
- height: isExpanded ? "auto" : 0,
3403
- opacity: isExpanded ? 1 : 0
3404
- },
3405
- transition: { duration: 0.2, ease: "easeInOut" },
3406
- className: "overflow-hidden",
3407
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "pt-2 space-y-1", children: [
3408
- documents.map((doc, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3409
- import_react6.motion.div,
3410
- {
3411
- initial: { opacity: 0, x: -10 },
3412
- animate: { opacity: 1, x: 0 },
3413
- transition: { delay: index * 0.05, duration: 0.2 },
3414
- className: `group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${selectedDocumentId === doc.id ? "bg-primary/10 border-l-2 border-primary shadow-sm" : "hover:bg-muted/50 hover:translate-x-1"}`,
3415
- style: { marginLeft: `${level * 20 + 20}px` },
3416
- onClick: () => onDocumentClick?.(doc),
3417
- whileHover: { scale: 1.01 },
3418
- whileTap: { scale: 0.99 },
3419
- children: [
3420
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-shrink-0", children: formatDocumentIcon(doc.format) }),
3421
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-1 min-w-0", children: [
3422
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: `text-sm truncate transition-colors ${selectedDocumentId === doc.id ? "text-primary font-medium" : "text-foreground group-hover:text-foreground"}`, children: doc.title }),
3423
- doc.description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-xs text-muted-foreground truncate mt-0.5", children: doc.description })
3424
- ] }),
3425
- doc.tags && doc.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors", children: doc.tags[0] }) })
3426
- ]
3427
- },
3428
- doc.id
3429
- )),
3430
- children && Object.entries(children).map(([childLabel, childData]) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3431
- MenuItem,
3432
- {
3433
- label: childLabel,
3434
- documents: childData.documents,
3435
- children: childData.children,
3436
- level: level + 1,
3437
- onDocumentClick,
3438
- selectedDocumentId,
3439
- showDocumentCount
3440
- },
3441
- childLabel
3442
- ))
3443
- ] })
3444
- }
3445
- )
3446
- ] });
3447
- }
3448
- function KnowledgeBrowser({
3449
- documents,
3450
- menuConfig,
3451
- onDocumentClick,
3452
- onDocumentShare,
3453
- onDocumentUpdate,
3454
- selectedDocumentId,
3455
- className,
3456
- editable = true
3457
- }) {
3458
- const [searchQuery, setSearchQuery] = (0, import_react7.useState)("");
3459
- const [selectedDocument, setSelectedDocument] = (0, import_react7.useState)(null);
3460
- const filteredDocuments = (0, import_react7.useMemo)(() => {
3461
- if (!searchQuery) return documents;
3462
- return documents.filter(
3463
- (doc) => doc.title.toLowerCase().includes(searchQuery.toLowerCase()) || doc.description?.toLowerCase().includes(searchQuery.toLowerCase()) || doc.tags?.some((tag) => tag.toLowerCase().includes(searchQuery.toLowerCase())) || Object.values(doc.metadata || {}).some(
3464
- (value) => String(value).toLowerCase().includes(searchQuery.toLowerCase())
3465
- )
3466
- );
3467
- }, [documents, searchQuery]);
3468
- const hierarchy = (0, import_react7.useMemo)(() => {
3469
- const buildHierarchy = (docs, groupKeys) => {
3470
- if (groupKeys.length === 0) {
3471
- return {};
3472
- }
3473
- const [currentKey, ...remainingKeys] = groupKeys;
3474
- const grouped = docs.reduce((acc, doc) => {
3475
- const value = doc.metadata?.[currentKey] || "Uncategorized";
3476
- const key = String(value);
3477
- if (!acc[key]) {
3478
- acc[key] = { documents: [], children: {} };
3479
- }
3480
- if (remainingKeys.length === 0) {
3481
- acc[key].documents.push(doc);
3482
- } else {
3483
- const childHierarchy = buildHierarchy([doc], remainingKeys);
3484
- const childKey = Object.keys(childHierarchy)[0];
3485
- if (childKey) {
3486
- if (!acc[key].children) acc[key].children = {};
3487
- if (!acc[key].children[childKey]) {
3488
- acc[key].children[childKey] = childHierarchy[childKey];
3489
- } else {
3490
- acc[key].children[childKey].documents.push(...childHierarchy[childKey].documents);
3491
- }
3492
- }
3493
- }
3494
- return acc;
3495
- }, {});
3496
- return grouped;
3497
- };
3498
- if (!menuConfig.groupBy || menuConfig.groupBy.length === 0) {
3499
- return {
3500
- "All Documents": {
3501
- documents: filteredDocuments,
3502
- children: {}
3503
- }
3504
- };
3505
- }
3506
- return buildHierarchy(filteredDocuments, menuConfig.groupBy);
3507
- }, [filteredDocuments, menuConfig.groupBy]);
3508
- const handleDocumentClick = (document) => {
3509
- setSelectedDocument(document);
3510
- onDocumentClick?.(document);
3511
- };
3512
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: `flex h-full ${className || ""}`, children: [
3513
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w-1/3 border-r border-border bg-muted/20", children: [
3514
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "p-6 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative", children: [
3515
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.Search, { className: "h-4 w-4 text-muted-foreground" }) }),
3516
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3517
- Input,
3518
- {
3519
- placeholder: "Search knowledge base...",
3520
- value: searchQuery,
3521
- onChange: (e) => setSearchQuery(e.target.value),
3522
- className: "pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"
3523
- }
3524
- )
3525
- ] }) }),
3526
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ScrollArea, { className: "h-[calc(100%-100px)]", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "p-4 space-y-3", children: [
3527
- Object.entries(hierarchy).map(([label, data]) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3528
- MenuItem,
3529
- {
3530
- label,
3531
- documents: data.documents,
3532
- children: data.children,
3533
- level: 0,
3534
- onDocumentClick: handleDocumentClick,
3535
- selectedDocumentId,
3536
- showDocumentCount: menuConfig.showDocumentCount
3537
- },
3538
- label
3539
- )),
3540
- Object.keys(hierarchy).length === 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3541
- import_react6.motion.div,
3542
- {
3543
- initial: { opacity: 0 },
3544
- animate: { opacity: 1 },
3545
- className: "text-center text-muted-foreground py-12",
3546
- children: [
3547
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.FileText, { className: "h-8 w-8 text-muted-foreground" }) }),
3548
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm font-medium", children: "No documents found" }),
3549
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-xs mt-1", children: "Try adjusting your search terms" })
3550
- ]
3551
- }
3552
- )
3553
- ] }) })
3554
- ] }),
3555
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-1 bg-background", children: selectedDocument ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3556
- DocumentPreview,
3557
- {
3558
- document: selectedDocument,
3559
- onDocumentUpdate,
3560
- editable
3561
- }
3562
- ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-full flex items-center justify-center text-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3563
- import_react6.motion.div,
3564
- {
3565
- initial: { opacity: 0, y: 20 },
3566
- animate: { opacity: 1, y: 0 },
3567
- transition: { duration: 0.4 },
3568
- className: "max-w-sm",
3569
- children: [
3570
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react5.FileText, { className: "h-10 w-10 text-primary" }) }),
3571
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("h3", { className: "text-xl font-semibold text-foreground mb-2", children: "Select a document" }),
3572
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-muted-foreground leading-relaxed", children: "Choose any document from the knowledge base to view its content and details" })
3573
- ]
3574
- }
3575
- ) }) })
3576
- ] });
3577
- }
3578
- // Annotate the CommonJS export names for ESM import in node:
3579
- 0 && (module.exports = {
3580
- KnowledgeBrowser
3581
- });