cortex-react-components 3.2.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-KCPLIAIF.mjs → chunk-2D3EN2AX.mjs} +2 -2
- package/dist/{chunk-PRMR24PY.mjs → chunk-36W3BORX.mjs} +3 -3
- package/dist/{chunk-PTDP7PZK.mjs → chunk-3G7VLQG5.mjs} +1 -1
- package/dist/{chunk-6R3QP53O.mjs → chunk-4JHX6BW6.mjs} +2 -2
- package/dist/{chunk-XDV7AVPQ.mjs → chunk-4JSM5VYZ.mjs} +2 -2
- package/dist/{chunk-K6N5K2A7.mjs → chunk-4P5Q6UXF.mjs} +4 -4
- package/dist/{chunk-UNEYYMLL.mjs → chunk-6NRBLKM4.mjs} +2 -2
- package/dist/{chunk-5Z7JRCOM.mjs → chunk-7ZCW4XMR.mjs} +1 -1
- package/dist/{chunk-V4I6U2SE.mjs → chunk-AVNBD2X5.mjs} +1 -1
- package/dist/{chunk-YOKF4FEM.mjs → chunk-BMZG77IE.mjs} +1 -1
- package/dist/chunk-BXEALHGJ.mjs +142 -0
- package/dist/{chunk-G7SFQSC7.mjs → chunk-C444TUVA.mjs} +6 -6
- package/dist/{chunk-JD7SR5V3.mjs → chunk-CONYNX7Y.mjs} +63 -7
- package/dist/{chunk-2VF2D4DL.mjs → chunk-DGDELNS3.mjs} +1 -1
- package/dist/{chunk-RJZMTP7J.mjs → chunk-DHB2L7O2.mjs} +1 -1
- package/dist/{chunk-ZED4UNH7.mjs → chunk-DPTILX6A.mjs} +2 -2
- package/dist/{chunk-ZBCZGWDU.mjs → chunk-EC5I4CIO.mjs} +2 -2
- package/dist/{chunk-ORWAJNJO.mjs → chunk-EDYFH3EJ.mjs} +4 -4
- package/dist/{chunk-EQYJUXKZ.mjs → chunk-EGCBZZGV.mjs} +1 -1
- package/dist/{chunk-PAXCURFR.mjs → chunk-EGZL4DVZ.mjs} +1 -1
- package/dist/{chunk-G46GZ57S.mjs → chunk-EJJITIA3.mjs} +2 -2
- package/dist/{chunk-LVLEZS7Q.mjs → chunk-ETG5N2OG.mjs} +1 -1
- package/dist/{chunk-25EF7VEC.mjs → chunk-F7JPOQIC.mjs} +1 -1
- package/dist/{chunk-RQGM66Q4.mjs → chunk-FABRRO2B.mjs} +1 -1
- package/dist/{chunk-JQNNFILH.mjs → chunk-FWRVXOCU.mjs} +1 -1
- package/dist/{chunk-4YSV633W.mjs → chunk-GAWBCR4S.mjs} +1 -1
- package/dist/{chunk-VMDVXNP5.mjs → chunk-GGOGMLBY.mjs} +14 -14
- package/dist/chunk-GXN5ZNBZ.mjs +135 -0
- package/dist/{chunk-3R2LCGLI.mjs → chunk-HLEMFDTD.mjs} +1 -1
- package/dist/{chunk-S27KJUKF.mjs → chunk-HMVIQFLN.mjs} +1 -1
- package/dist/{chunk-CIFGBEFV.mjs → chunk-HNBHBFLY.mjs} +1 -1
- package/dist/{chunk-O633TXQG.mjs → chunk-HUZCVQP7.mjs} +1 -1
- package/dist/{chunk-MPFWWJYT.mjs → chunk-IDMTHUC4.mjs} +2 -2
- package/dist/{chunk-2L6AWG6R.mjs → chunk-IJ3E6ZXF.mjs} +2 -2
- package/dist/{chunk-G5N5MCLS.mjs → chunk-IVOPNDSN.mjs} +5 -5
- package/dist/{chunk-PFA2P52R.mjs → chunk-JFXWP3RQ.mjs} +1 -1
- package/dist/{chunk-UYUP2DAL.mjs → chunk-KHFPDDTO.mjs} +1 -1
- package/dist/{chunk-6GO5N6ZP.mjs → chunk-KIZUBPPQ.mjs} +1 -1
- package/dist/{chunk-QE3XE3LW.mjs → chunk-KOK3VCJZ.mjs} +1 -1
- package/dist/{chunk-YKX5AGFQ.mjs → chunk-L4SNPNYU.mjs} +2 -2
- package/dist/{chunk-CIXAM7LW.mjs → chunk-LGGOEYDB.mjs} +13 -13
- package/dist/{chunk-SSF2CAW7.mjs → chunk-LM4J7254.mjs} +1 -1
- package/dist/{chunk-FECAR2TE.mjs → chunk-LPK5R32M.mjs} +1 -1
- package/dist/{chunk-UHOCECJY.mjs → chunk-LQQ6C7FN.mjs} +4 -4
- package/dist/{chunk-22E2TZBE.mjs → chunk-LTDXFLCW.mjs} +1 -1
- package/dist/{chunk-QOYK2HBL.mjs → chunk-MZVEK6A5.mjs} +13 -13
- package/dist/{chunk-3W5H36HK.mjs → chunk-NNH7EC5Z.mjs} +1 -1
- package/dist/{chunk-P4P6J2SW.mjs → chunk-NQMJXY3N.mjs} +2 -2
- package/dist/{chunk-ZWV2O6CK.mjs → chunk-NVSA5BFC.mjs} +3 -3
- package/dist/{chunk-UFBLZW2N.mjs → chunk-OCVHSV6Z.mjs} +2 -2
- package/dist/{chunk-673GELPP.mjs → chunk-OXP3LJ53.mjs} +1 -1
- package/dist/{chunk-5OGDBGXG.mjs → chunk-PJZ5PWKP.mjs} +1 -1
- package/dist/{chunk-V2BZ7RE7.mjs → chunk-PLFX66EX.mjs} +1 -1
- package/dist/{chunk-E6M7XAYT.mjs → chunk-Q45EN2QB.mjs} +1 -1
- package/dist/{chunk-J5ZETWHG.mjs → chunk-Q6CUUDUR.mjs} +2 -2
- package/dist/{chunk-USEHRJFR.mjs → chunk-QETXXFRW.mjs} +1 -1
- package/dist/{chunk-ZF2DELZ5.mjs → chunk-QXOHY4AT.mjs} +39 -3
- package/dist/{chunk-NF4JWFAZ.mjs → chunk-RFMER577.mjs} +1 -1
- package/dist/{chunk-YUBPY7L4.mjs → chunk-RFQKQLNT.mjs} +5 -5
- package/dist/{chunk-QUGB53Z3.mjs → chunk-RV4VRLGN.mjs} +1 -1
- package/dist/{chunk-TLCSKAWQ.mjs → chunk-SM57JU3T.mjs} +5 -5
- package/dist/{chunk-B63AROCU.mjs → chunk-SMX6BH2N.mjs} +1 -1
- package/dist/{chunk-L3SZS7PC.mjs → chunk-SNUES6JA.mjs} +1 -1
- package/dist/{chunk-5GFRQ4NR.mjs → chunk-SSDRUPMS.mjs} +1 -1
- package/dist/{chunk-GDMWNNYC.mjs → chunk-SSE3MQDP.mjs} +1 -1
- package/dist/{chunk-UJI3Y73K.mjs → chunk-TDOOQIMQ.mjs} +2 -2
- package/dist/{chunk-EJJNYV7C.mjs → chunk-U6ZFUE5O.mjs} +2 -2
- package/dist/{chunk-2363JAWB.mjs → chunk-URC56DLC.mjs} +1 -1
- package/dist/{chunk-HI6QOZHR.mjs → chunk-V6VAVPKH.mjs} +1 -1
- package/dist/{chunk-4PFDNMLD.mjs → chunk-WEIPDZOJ.mjs} +1 -1
- package/dist/{chunk-PIGOOCU6.mjs → chunk-WJTVZ6CB.mjs} +1 -1
- package/dist/{chunk-56NFUKPK.mjs → chunk-WX5QYPGU.mjs} +1 -1
- package/dist/{chunk-LQPN7L4Z.mjs → chunk-XFJPL6FS.mjs} +1 -1
- package/dist/{chunk-4PC77ZEN.mjs → chunk-XZFMQXYJ.mjs} +1 -1
- package/dist/{chunk-TIGSOXUA.mjs → chunk-YD7Q7IZX.mjs} +1 -1
- package/dist/{chunk-AOSO2JVA.mjs → chunk-YUZYLKBD.mjs} +1 -1
- package/dist/{chunk-CVH5TDS6.mjs → chunk-YY4VLYYH.mjs} +4 -4
- package/dist/{chunk-HK2DQNBU.mjs → chunk-Z54HOXSV.mjs} +4 -4
- package/dist/{chunk-TP5AUT7W.mjs → chunk-ZJB7AFL5.mjs} +2 -2
- package/dist/components/AdvancedComponents/user-selection.d.ts +1 -1
- package/dist/components/AdvancedComponents/user-selection.js +1 -1
- package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
- package/dist/components/Blocks/Banner.mjs +10 -10
- package/dist/components/Blocks/CallToAction.mjs +10 -10
- package/dist/components/Blocks/CollapsibleArea.mjs +11 -11
- package/dist/components/Blocks/Content.mjs +11 -11
- package/dist/components/Blocks/FeaturesBlock.mjs +10 -10
- package/dist/components/Blocks/ImageBlock.mjs +3 -3
- package/dist/components/Blocks/MediaBlock.mjs +3 -3
- package/dist/components/Blocks/RelatedPosts.mjs +12 -12
- package/dist/components/Blocks/RenderBlocks.mjs +13 -13
- package/dist/components/Blocks/ReusableContentBlock.mjs +13 -13
- package/dist/components/Blocks/index.mjs +20 -20
- package/dist/components/CRM/index.mjs +3 -3
- package/dist/components/Cards/ContentCard.mjs +10 -10
- package/dist/components/Cards/FeatureCard.mjs +10 -10
- package/dist/components/Cards/index.mjs +16 -16
- package/dist/components/Chat/ChatInterface.mjs +11 -11
- package/dist/components/Chat/CopilotInterface.mjs +12 -12
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +9 -9
- package/dist/components/Chat/PartTypes/index.mjs +11 -11
- package/dist/components/Chat/demo-long-messages.mjs +12 -12
- package/dist/components/Chat/demo-tests.mjs +12 -12
- package/dist/components/Chat/demo.mjs +12 -12
- package/dist/components/Chat/example-usage.mjs +13 -13
- package/dist/components/Chat/example-with-vercel-ai.mjs +12 -12
- package/dist/components/Chat/index.mjs +20 -20
- package/dist/components/DigitalColleagues/MainPage.mjs +2 -2
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +18 -18
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +16 -16
- package/dist/components/DigitalColleagues/Views/ColleaguesView.d.ts +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +3 -3
- package/dist/components/DigitalColleagues/Views/index.js +21 -21
- package/dist/components/DigitalColleagues/Views/index.mjs +28 -28
- package/dist/components/DigitalColleagues/digital-colleague-clone.d.ts +1 -1
- package/dist/components/DigitalColleagues/index.js +20 -20
- package/dist/components/DigitalColleagues/index.mjs +45 -45
- package/dist/components/{Foundary → Foundry}/AppSidebarLeft.js +3 -3
- package/dist/components/{Foundary → Foundry}/AppSidebarLeft.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/DashboardHeader.js +2 -2
- package/dist/components/{Foundary → Foundry}/DashboardHeader.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/Knowledge/add-knowledge-modal.js +2 -2
- package/dist/components/{Foundary → Foundry}/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/Knowledge/add-team-context.js +3 -3
- package/dist/components/{Foundary → Foundry}/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/Knowledge/manage-team-context.js +2 -2
- package/dist/components/{Foundary → Foundry}/Knowledge/manage-team-context.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/LandingMenu.js +2 -2
- package/dist/components/{Foundary → Foundry}/LandingMenu.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/Login.js +2 -2
- package/dist/components/{Foundary → Foundry}/Login.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/MainPage.js +4 -4
- package/dist/components/{Foundary → Foundry}/MainPage.mjs +4 -4
- package/dist/components/{Foundary → Foundry}/ManagementSidebar.js +1 -1
- package/dist/components/{Foundary → Foundry}/ManagementSidebar.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/Pages/dashboardpage.js +912 -598
- package/dist/components/{Foundary → Foundry}/Pages/dashboardpage.mjs +34 -32
- package/dist/components/{Foundary → Foundry}/README-document-edit.js +1 -1
- package/dist/components/{Foundary → Foundry}/README-document-edit.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/README-document-preview.js +1 -1
- package/dist/components/{Foundary → Foundry}/README-document-preview.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Bold.js +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Bold.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Headings.js +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Headings.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Italic.js +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Italic.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/StrikeThrough.js +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/StrikeThrough.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Subscript.js +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Subscript.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Superscript.js +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Superscript.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Underline.js +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/Icons/Underline.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/components/RawUploadComponent/index.js +2 -2
- package/dist/components/{Foundary → Foundry}/RichText/components/RawUploadComponent/index.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/RichText/index.js +18 -18
- package/dist/components/{Foundary → Foundry}/RichText/index.mjs +12 -12
- package/dist/components/{Foundary → Foundry}/RichText/nodes/image-node.js +4 -4
- package/dist/components/{Foundary → Foundry}/RichText/nodes/image-node.mjs +2 -2
- package/dist/components/{Foundary → Foundry}/RichText/plugins/image-plugin.js +7 -7
- package/dist/components/{Foundary → Foundry}/RichText/plugins/image-plugin.mjs +3 -3
- package/dist/components/{Foundary → Foundry}/RichText/plugins/toolbar-plugin.js +16 -16
- package/dist/components/{Foundary → Foundry}/RichText/plugins/toolbar-plugin.mjs +11 -11
- package/dist/components/{Foundary → Foundry}/SearchableSelect.js +2 -2
- package/dist/components/{Foundary → Foundry}/SearchableSelect.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/Views/ColleaguesView.d.ts +4 -2
- package/dist/components/{Foundary → Foundry}/Views/ColleaguesView.js +521 -207
- package/dist/components/{Foundary → Foundry}/Views/ColleaguesView.mjs +10 -8
- package/dist/components/Foundry/Views/KnowledgeView.docs.js +2 -0
- package/dist/components/Foundry/Views/KnowledgeView.docs.mjs +7 -0
- package/dist/components/{Foundary → Foundry}/Views/KnowledgeView.js +29 -29
- package/dist/components/{Foundary → Foundry}/Views/KnowledgeView.mjs +18 -18
- package/dist/components/{Foundary → Foundry}/Views/TeamsIndexView.js +4 -4
- package/dist/components/{Foundary → Foundry}/Views/TeamsIndexView.mjs +2 -2
- package/dist/components/{Foundary → Foundry}/Views/index.js +2169 -1855
- package/dist/components/{Foundary → Foundry}/Views/index.mjs +42 -40
- package/dist/components/Foundry/add-colleague-to-team-form.d.ts +10 -0
- package/dist/components/Foundry/add-colleague-to-team-form.js +2762 -0
- package/dist/components/Foundry/add-colleague-to-team-form.mjs +18 -0
- package/dist/components/{Foundary → Foundry}/colleague-card.js +2 -2
- package/dist/components/{Foundary → Foundry}/colleague-card.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/colleague-form.js +4 -4
- package/dist/components/{Foundary → Foundry}/colleague-form.mjs +2 -2
- package/dist/components/{Foundary → Foundry}/colleague-type-selection.js +2 -2
- package/dist/components/{Foundary → Foundry}/colleague-type-selection.mjs +1 -1
- package/dist/components/Foundry/digital-colleague-selection.d.ts +9 -0
- package/dist/components/Foundry/digital-colleague-selection.js +2787 -0
- package/dist/components/Foundry/digital-colleague-selection.mjs +19 -0
- package/dist/components/{Foundary → Foundry}/document-edit.js +20 -20
- package/dist/components/{Foundary → Foundry}/document-edit.mjs +13 -13
- package/dist/components/{Foundary → Foundry}/document-preview-examples.js +24 -24
- package/dist/components/{Foundary → Foundry}/document-preview-examples.mjs +15 -15
- package/dist/components/{Foundary → Foundry}/document-preview.js +22 -22
- package/dist/components/{Foundary → Foundry}/document-preview.mjs +14 -14
- package/dist/components/{Foundary → Foundry}/file-edit.js +20 -20
- package/dist/components/{Foundary → Foundry}/file-edit.mjs +13 -13
- package/dist/components/{Foundary → Foundry}/foundary-clone.js +3 -3
- package/dist/components/{Foundary → Foundry}/foundary-clone.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/foundary-layout.d.ts +3 -3
- package/dist/components/{Foundary → Foundry}/foundary-layout.js +5 -5
- package/dist/components/{Foundary → Foundry}/foundary-layout.mjs +3 -3
- package/dist/components/{Foundary → Foundry}/foundary-options.d.ts +2 -1
- package/dist/components/{Foundary → Foundry}/foundary-options.js +39 -3
- package/dist/components/{Foundary → Foundry}/foundary-options.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/index.d.ts +3 -1
- package/dist/components/{Foundary → Foundry}/index.js +2248 -1930
- package/dist/components/{Foundary → Foundry}/index.mjs +67 -59
- package/dist/components/{Foundary → Foundry}/knowledge-browser.js +24 -24
- package/dist/components/{Foundary → Foundry}/knowledge-browser.mjs +15 -15
- package/dist/components/Foundry/knowledge-search.css +917 -0
- package/dist/components/{Foundary → Foundry}/knowledge-search.js +2 -2
- package/dist/components/{Foundary → Foundry}/knowledge-search.mjs +1 -1
- package/dist/components/Foundry/team-form.css +917 -0
- package/dist/components/{Foundary → Foundry}/team-form.js +2 -2
- package/dist/components/{Foundary → Foundry}/team-form.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/test-data.js +1 -1
- package/dist/components/{Foundary → Foundry}/test-data.mjs +1 -1
- package/dist/components/{Foundary → Foundry}/types.js +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +11 -11
- package/dist/components/HeaderFooter/index.mjs +6 -6
- package/dist/components/Heros/HighImpact/index.mjs +11 -11
- package/dist/components/Heros/LowImpact/index.mjs +11 -11
- package/dist/components/Heros/MediumImpact/index.mjs +11 -11
- package/dist/components/Heros/RenderHero.mjs +14 -14
- package/dist/components/Heros/index.mjs +16 -16
- package/dist/components/Layouts/OutputHeaderFooter.mjs +13 -13
- package/dist/components/Layouts/Print.mjs +17 -17
- package/dist/components/Layouts/SlideShow.mjs +19 -19
- package/dist/components/Layouts/index.mjs +20 -20
- package/dist/components/Payload/CollectionArchive/index.mjs +4 -4
- package/dist/components/Payload/Media/index.mjs +2 -2
- package/dist/components/Payload/PayloadCard/index.mjs +3 -3
- package/dist/components/Payload/RichText/index.mjs +10 -10
- package/dist/components/Payload/RichText/serialize.mjs +10 -10
- package/dist/components/Payload/index.mjs +12 -12
- package/dist/components/Projects/AddEpicModal.d.ts +1 -1
- package/dist/components/Projects/AddSprintModal.d.ts +1 -1
- package/dist/components/Projects/AddTaskModal.d.ts +1 -1
- package/dist/components/Projects/EpicsView.d.ts +1 -1
- package/dist/components/Projects/FileView.d.ts +1 -1
- package/dist/components/Projects/FileView.js +19 -19
- package/dist/components/Projects/FileView.mjs +15 -15
- package/dist/components/Projects/KanbanBoardView.d.ts +1 -1
- package/dist/components/Projects/KanbanBoardView.js +20 -20
- package/dist/components/Projects/KanbanBoardView.mjs +18 -18
- package/dist/components/Projects/PlanningView.d.ts +1 -1
- package/dist/components/Projects/ProjectPage.d.ts +1 -1
- package/dist/components/Projects/ProjectPage.js +19 -19
- package/dist/components/Projects/ProjectPage.mjs +20 -20
- package/dist/components/Projects/ProjectView.d.ts +1 -1
- package/dist/components/Projects/ProjectView.js +20 -20
- package/dist/components/Projects/ProjectView.mjs +20 -20
- package/dist/components/Projects/ProjectsIndexView.d.ts +1 -1
- package/dist/components/Projects/SprintBoardView.d.ts +1 -1
- package/dist/components/Projects/SprintBoardView.js +20 -20
- package/dist/components/Projects/SprintBoardView.mjs +18 -18
- package/dist/components/Projects/TaskCard.d.ts +1 -1
- package/dist/components/Projects/TaskDetailsModal.d.ts +1 -1
- package/dist/components/Projects/TaskDetailsModal.js +20 -20
- package/dist/components/Projects/TaskDetailsModal.mjs +17 -17
- package/dist/components/Projects/TaskSidebar.d.ts +1 -1
- package/dist/components/Projects/TaskSidebar.js +2 -2
- package/dist/components/Projects/TaskSidebar.mjs +2 -2
- package/dist/components/Projects/TasksView.d.ts +1 -1
- package/dist/components/Projects/file-list.d.ts +1 -1
- package/dist/components/Projects/file-list.js +19 -19
- package/dist/components/Projects/file-list.mjs +14 -14
- package/dist/components/Projects/index.js +20 -20
- package/dist/components/Projects/index.mjs +21 -21
- package/dist/components/dc-temp/index.js +19 -19
- package/dist/components/dc-temp/index.mjs +19 -19
- package/dist/components/dc-temp/mock-data.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +2279 -1961
- package/dist/components/index.mjs +159 -151
- package/dist/decorators/Intranet.mjs +97 -95
- package/dist/index.js +2505 -2187
- package/dist/index.mjs +170 -162
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +13 -13
- package/dist/pages/Documentation.mjs +2 -2
- package/dist/pages/IndexPage.mjs +20 -20
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +109 -107
- package/dist/pages/Page.mjs +17 -17
- package/dist/pages/Publish.mjs +98 -96
- package/dist/pages/Website.mjs +21 -21
- package/dist/sections/AboutSection.mjs +12 -12
- package/dist/sections/BlogDetail.mjs +11 -11
- package/dist/sections/BlogList.mjs +12 -12
- package/dist/sections/ContactSection.mjs +12 -12
- package/dist/sections/PageSections.mjs +107 -105
- package/dist/sections/PricingSection.mjs +12 -12
- package/dist/sections/ServiceDetail.mjs +11 -11
- package/dist/sections/ServiceDetailSection.mjs +11 -11
- package/dist/sections/ServiceSection.mjs +98 -96
- package/dist/sections/form/index.mjs +2 -2
- package/dist/sections/index.mjs +107 -105
- package/package.json +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.docs.js +0 -2
- package/dist/components/Foundary/Views/KnowledgeView.docs.mjs +0 -7
- package/dist/{chunk-NKRBXAPF.mjs → chunk-2YHN7ZCJ.mjs} +3 -3
- package/dist/{chunk-OT2SSFKS.mjs → chunk-GSG52WU5.mjs} +3 -3
- package/dist/{chunk-L666B5DN.mjs → chunk-GZGWWPCP.mjs} +12 -12
- /package/dist/components/{Foundary → Foundry}/AppSidebarLeft.css +0 -0
- /package/dist/components/{Foundary → Foundry}/AppSidebarLeft.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/DashboardHeader.css +0 -0
- /package/dist/components/{Foundary → Foundry}/DashboardHeader.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Knowledge/add-knowledge-modal.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Knowledge/add-knowledge-modal.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Knowledge/add-team-context.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Knowledge/add-team-context.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Knowledge/manage-team-context.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Knowledge/manage-team-context.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/LandingMenu.css +0 -0
- /package/dist/components/{Foundary → Foundry}/LandingMenu.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Login.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Login.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/MainPage.css +0 -0
- /package/dist/components/{Foundary → Foundry}/MainPage.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/ManagementSidebar.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Pages/dashboardpage.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Pages/dashboardpage.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/Icons/Bold.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/Icons/Headings.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/Icons/Italic.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/Icons/StrikeThrough.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/Icons/Subscript.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/Icons/Superscript.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/Icons/Underline.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/components/RawUploadComponent/index.css +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/components/RawUploadComponent/index.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/index.css +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/index.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/nodes/image-node.css +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/nodes/image-node.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/plugins/image-plugin.css +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/plugins/image-plugin.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/plugins/toolbar-plugin.css +0 -0
- /package/dist/components/{Foundary → Foundry}/RichText/plugins/toolbar-plugin.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/SearchableSelect.css +0 -0
- /package/dist/components/{Foundary → Foundry}/SearchableSelect.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Views/ColleaguesView.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Views/KnowledgeView.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Views/KnowledgeView.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Views/TeamsIndexView.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Views/TeamsIndexView.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/Views/index.css +0 -0
- /package/dist/components/{Foundary → Foundry}/Views/index.d.ts +0 -0
- /package/dist/components/{Foundary/colleague-card.css → Foundry/add-colleague-to-team-form.css} +0 -0
- /package/dist/components/{Foundary/colleague-form.css → Foundry/colleague-card.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/colleague-card.d.ts +0 -0
- /package/dist/components/{Foundary/colleague-type-selection.css → Foundry/colleague-form.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/colleague-form.d.ts +0 -0
- /package/dist/components/{Foundary/document-edit.css → Foundry/colleague-type-selection.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/colleague-type-selection.d.ts +0 -0
- /package/dist/components/{Foundary/document-preview-examples.css → Foundry/digital-colleague-selection.css} +0 -0
- /package/dist/components/{Foundary/document-preview.css → Foundry/document-edit.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/document-edit.d.ts +0 -0
- /package/dist/components/{Foundary/file-edit.css → Foundry/document-preview-examples.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/document-preview-examples.d.ts +0 -0
- /package/dist/components/{Foundary/foundary-clone.css → Foundry/document-preview.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/document-preview.d.ts +0 -0
- /package/dist/components/{Foundary/foundary-layout.css → Foundry/file-edit.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/file-edit.d.ts +0 -0
- /package/dist/components/{Foundary/foundary-options.css → Foundry/foundary-clone.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/foundary-clone.d.ts +0 -0
- /package/dist/components/{Foundary/index.css → Foundry/foundary-layout.css} +0 -0
- /package/dist/components/{Foundary/knowledge-browser.css → Foundry/foundary-options.css} +0 -0
- /package/dist/components/{Foundary/knowledge-search.css → Foundry/index.css} +0 -0
- /package/dist/components/{Foundary/team-form.css → Foundry/knowledge-browser.css} +0 -0
- /package/dist/components/{Foundary → Foundry}/knowledge-browser.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/knowledge-search.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/team-form.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/test-data.d.ts +0 -0
- /package/dist/components/{Foundary → Foundry}/types.d.ts +0 -0
|
@@ -32,17 +32,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
));
|
|
33
33
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
34
|
|
|
35
|
-
// src/components/
|
|
35
|
+
// src/components/Foundry/Pages/dashboardpage.tsx
|
|
36
36
|
var dashboardpage_exports = {};
|
|
37
37
|
__export(dashboardpage_exports, {
|
|
38
38
|
default: () => Home4
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(dashboardpage_exports);
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
41
|
+
var import_react43 = require("react");
|
|
42
|
+
var import_react44 = require("motion/react");
|
|
43
|
+
var import_lucide_react38 = require("lucide-react");
|
|
44
44
|
|
|
45
|
-
// src/components/
|
|
45
|
+
// src/components/Foundry/foundary-layout.tsx
|
|
46
46
|
var import_react6 = require("react");
|
|
47
47
|
|
|
48
48
|
// src/utils/cn.ts
|
|
@@ -4316,7 +4316,7 @@ function AppHeader({
|
|
|
4316
4316
|
] });
|
|
4317
4317
|
}
|
|
4318
4318
|
|
|
4319
|
-
// src/components/
|
|
4319
|
+
// src/components/Foundry/foundary-layout.tsx
|
|
4320
4320
|
var import_lucide_react9 = require("lucide-react");
|
|
4321
4321
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
4322
4322
|
var businessUnits2 = [
|
|
@@ -4329,7 +4329,7 @@ var businessUnits2 = [
|
|
|
4329
4329
|
accentColor: "text-orange-600"
|
|
4330
4330
|
}
|
|
4331
4331
|
];
|
|
4332
|
-
function
|
|
4332
|
+
function FoundryLayout({
|
|
4333
4333
|
sidebarItems,
|
|
4334
4334
|
children,
|
|
4335
4335
|
title = "Digital Colleagues",
|
|
@@ -4648,7 +4648,7 @@ var import_react17 = require("motion/react");
|
|
|
4648
4648
|
var import_lucide_react17 = require("lucide-react");
|
|
4649
4649
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"));
|
|
4650
4650
|
|
|
4651
|
-
// src/components/
|
|
4651
|
+
// src/components/Foundry/file-edit.tsx
|
|
4652
4652
|
var import_react15 = require("motion/react");
|
|
4653
4653
|
var import_lucide_react16 = require("lucide-react");
|
|
4654
4654
|
var import_react16 = require("react");
|
|
@@ -4760,7 +4760,7 @@ var EditableField = ({
|
|
|
4760
4760
|
] });
|
|
4761
4761
|
};
|
|
4762
4762
|
|
|
4763
|
-
// src/components/
|
|
4763
|
+
// src/components/Foundry/RichText/index.tsx
|
|
4764
4764
|
var import_LexicalAutoFocusPlugin = require("@payloadcms/richtext-lexical/lexical/react/LexicalAutoFocusPlugin");
|
|
4765
4765
|
var import_LexicalComposer = require("@payloadcms/richtext-lexical/lexical/react/LexicalComposer");
|
|
4766
4766
|
var import_LexicalContentEditable = require("@payloadcms/richtext-lexical/lexical/react/LexicalContentEditable");
|
|
@@ -4773,7 +4773,7 @@ var import_rich_text2 = require("@payloadcms/richtext-lexical/lexical/rich-text"
|
|
|
4773
4773
|
var import_LexicalOnChangePlugin = require("@payloadcms/richtext-lexical/lexical/react/LexicalOnChangePlugin");
|
|
4774
4774
|
var import_react14 = require("react");
|
|
4775
4775
|
|
|
4776
|
-
// src/components/
|
|
4776
|
+
// src/components/Foundry/RichText/plugins/toolbar-plugin.tsx
|
|
4777
4777
|
var import_LexicalComposerContext3 = require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext");
|
|
4778
4778
|
var import_utils19 = require("@payloadcms/richtext-lexical/lexical/utils");
|
|
4779
4779
|
var import_lexical3 = require("@payloadcms/richtext-lexical/lexical");
|
|
@@ -4783,7 +4783,7 @@ var import_lucide_react14 = require("lucide-react");
|
|
|
4783
4783
|
var import_react13 = require("react");
|
|
4784
4784
|
var import_rich_text = require("@payloadcms/richtext-lexical/lexical/rich-text");
|
|
4785
4785
|
|
|
4786
|
-
// src/components/
|
|
4786
|
+
// src/components/Foundry/RichText/plugins/image-plugin.tsx
|
|
4787
4787
|
var import_LexicalComposerContext2 = require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext");
|
|
4788
4788
|
var import_utils18 = require("@payloadcms/richtext-lexical/lexical/utils");
|
|
4789
4789
|
var import_lexical2 = require("@payloadcms/richtext-lexical/lexical");
|
|
@@ -4791,11 +4791,11 @@ var import_react12 = require("react");
|
|
|
4791
4791
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
4792
4792
|
var import_client2 = require("@payloadcms/richtext-lexical/client");
|
|
4793
4793
|
|
|
4794
|
-
// src/components/
|
|
4794
|
+
// src/components/Foundry/RichText/nodes/image-node.tsx
|
|
4795
4795
|
var import_client = require("@payloadcms/richtext-lexical/client");
|
|
4796
4796
|
var import_bson_objectid = __toESM(require("bson-objectid"));
|
|
4797
4797
|
|
|
4798
|
-
// src/components/
|
|
4798
|
+
// src/components/Foundry/RichText/components/RawUploadComponent/index.tsx
|
|
4799
4799
|
var import_ui = require("@payloadcms/ui");
|
|
4800
4800
|
var import_react11 = require("react");
|
|
4801
4801
|
var import_LexicalComposerContext = require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext");
|
|
@@ -4896,7 +4896,7 @@ var Component = (props) => {
|
|
|
4896
4896
|
};
|
|
4897
4897
|
var RawUploadComponent_default = Component;
|
|
4898
4898
|
|
|
4899
|
-
// src/components/
|
|
4899
|
+
// src/components/Foundry/RichText/nodes/image-node.tsx
|
|
4900
4900
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4901
4901
|
function $convertUploadElement(domNode) {
|
|
4902
4902
|
if (domNode.hasAttribute("data-lexical-upload-relation-to") && domNode.hasAttribute("data-lexical-upload-id")) {
|
|
@@ -4944,7 +4944,7 @@ function $createMyUploadNode(data) {
|
|
|
4944
4944
|
return new UploadNode({ data });
|
|
4945
4945
|
}
|
|
4946
4946
|
|
|
4947
|
-
// src/components/
|
|
4947
|
+
// src/components/Foundry/RichText/plugins/image-plugin.tsx
|
|
4948
4948
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4949
4949
|
var CAN_USE_DOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
4950
4950
|
var getDOMSelection = (targetWindow) => CAN_USE_DOM ? (targetWindow || window).getSelection() : null;
|
|
@@ -5177,7 +5177,7 @@ function getDragSelection(event) {
|
|
|
5177
5177
|
return range;
|
|
5178
5178
|
}
|
|
5179
5179
|
|
|
5180
|
-
// src/components/
|
|
5180
|
+
// src/components/Foundry/RichText/Icons/Bold.tsx
|
|
5181
5181
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5182
5182
|
var Bold = () => {
|
|
5183
5183
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -5203,7 +5203,7 @@ var Bold = () => {
|
|
|
5203
5203
|
};
|
|
5204
5204
|
var Bold_default = Bold;
|
|
5205
5205
|
|
|
5206
|
-
// src/components/
|
|
5206
|
+
// src/components/Foundry/RichText/Icons/Italic.tsx
|
|
5207
5207
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5208
5208
|
var Italic = () => {
|
|
5209
5209
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
@@ -5229,7 +5229,7 @@ var Italic = () => {
|
|
|
5229
5229
|
};
|
|
5230
5230
|
var Italic_default = Italic;
|
|
5231
5231
|
|
|
5232
|
-
// src/components/
|
|
5232
|
+
// src/components/Foundry/RichText/Icons/Underline.tsx
|
|
5233
5233
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5234
5234
|
var Underline = () => {
|
|
5235
5235
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
@@ -5258,7 +5258,7 @@ var Underline = () => {
|
|
|
5258
5258
|
};
|
|
5259
5259
|
var Underline_default = Underline;
|
|
5260
5260
|
|
|
5261
|
-
// src/components/
|
|
5261
|
+
// src/components/Foundry/RichText/Icons/StrikeThrough.tsx
|
|
5262
5262
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5263
5263
|
var Strikethrough = () => {
|
|
5264
5264
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
@@ -5287,7 +5287,7 @@ var Strikethrough = () => {
|
|
|
5287
5287
|
};
|
|
5288
5288
|
var StrikeThrough_default = Strikethrough;
|
|
5289
5289
|
|
|
5290
|
-
// src/components/
|
|
5290
|
+
// src/components/Foundry/RichText/Icons/Subscript.tsx
|
|
5291
5291
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5292
5292
|
var Subscript = () => {
|
|
5293
5293
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
@@ -5313,7 +5313,7 @@ var Subscript = () => {
|
|
|
5313
5313
|
};
|
|
5314
5314
|
var Subscript_default = Subscript;
|
|
5315
5315
|
|
|
5316
|
-
// src/components/
|
|
5316
|
+
// src/components/Foundry/RichText/Icons/Superscript.tsx
|
|
5317
5317
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5318
5318
|
var Superscript = () => {
|
|
5319
5319
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
@@ -5339,7 +5339,7 @@ var Superscript = () => {
|
|
|
5339
5339
|
};
|
|
5340
5340
|
var Superscript_default = Superscript;
|
|
5341
5341
|
|
|
5342
|
-
// src/components/
|
|
5342
|
+
// src/components/Foundry/RichText/Icons/Headings.tsx
|
|
5343
5343
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5344
5344
|
var TextIcon = () => {
|
|
5345
5345
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
@@ -5452,7 +5452,7 @@ var H4 = () => {
|
|
|
5452
5452
|
);
|
|
5453
5453
|
};
|
|
5454
5454
|
|
|
5455
|
-
// src/components/
|
|
5455
|
+
// src/components/Foundry/RichText/plugins/toolbar-plugin.tsx
|
|
5456
5456
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5457
5457
|
var LowPriority = 1;
|
|
5458
5458
|
function Divider() {
|
|
@@ -5842,7 +5842,7 @@ function ToolbarPlugin() {
|
|
|
5842
5842
|
] }) });
|
|
5843
5843
|
}
|
|
5844
5844
|
|
|
5845
|
-
// src/components/
|
|
5845
|
+
// src/components/Foundry/RichText/index.tsx
|
|
5846
5846
|
var import_LexicalComposerContext4 = require("@payloadcms/richtext-lexical/lexical/react/LexicalComposerContext");
|
|
5847
5847
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5848
5848
|
var RichTextContent = ({ setValue, value, name, editable = true }) => {
|
|
@@ -6064,7 +6064,7 @@ var SelectSeparator = React18.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
6064
6064
|
));
|
|
6065
6065
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
6066
6066
|
|
|
6067
|
-
// src/components/
|
|
6067
|
+
// src/components/Foundry/file-edit.tsx
|
|
6068
6068
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6069
6069
|
var isFileType = (doc) => {
|
|
6070
6070
|
return "mimeType" in doc && "url" in doc && !("format" in doc);
|
|
@@ -7259,7 +7259,7 @@ var mockTutorials = [
|
|
|
7259
7259
|
}
|
|
7260
7260
|
];
|
|
7261
7261
|
|
|
7262
|
-
// src/components/
|
|
7262
|
+
// src/components/Foundry/test-data.tsx
|
|
7263
7263
|
var import_lucide_react21 = require("lucide-react");
|
|
7264
7264
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
7265
7265
|
var mockSidebarItems = [
|
|
@@ -8224,11 +8224,11 @@ var mockDigitalColleagues2 = mockColleagues2.filter(
|
|
|
8224
8224
|
(colleague) => colleague.type === "digital"
|
|
8225
8225
|
);
|
|
8226
8226
|
|
|
8227
|
-
// src/components/
|
|
8228
|
-
var
|
|
8229
|
-
var
|
|
8227
|
+
// src/components/Foundry/Views/ColleaguesView.tsx
|
|
8228
|
+
var import_react32 = require("react");
|
|
8229
|
+
var import_lucide_react31 = require("lucide-react");
|
|
8230
8230
|
|
|
8231
|
-
// src/components/
|
|
8231
|
+
// src/components/Foundry/colleague-card.tsx
|
|
8232
8232
|
var import_react20 = require("react");
|
|
8233
8233
|
var import_lucide_react22 = require("lucide-react");
|
|
8234
8234
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
@@ -8347,11 +8347,11 @@ function ColleagueCard({
|
|
|
8347
8347
|
] });
|
|
8348
8348
|
}
|
|
8349
8349
|
|
|
8350
|
-
// src/components/
|
|
8350
|
+
// src/components/Foundry/colleague-form.tsx
|
|
8351
8351
|
var import_react22 = require("react");
|
|
8352
8352
|
var import_lucide_react24 = require("lucide-react");
|
|
8353
8353
|
|
|
8354
|
-
// src/components/
|
|
8354
|
+
// src/components/Foundry/knowledge-search.tsx
|
|
8355
8355
|
var import_react21 = require("react");
|
|
8356
8356
|
var import_lucide_react23 = require("lucide-react");
|
|
8357
8357
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
@@ -8471,7 +8471,7 @@ function KnowledgeSearch({
|
|
|
8471
8471
|
] });
|
|
8472
8472
|
}
|
|
8473
8473
|
|
|
8474
|
-
// src/components/
|
|
8474
|
+
// src/components/Foundry/colleague-form.tsx
|
|
8475
8475
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
8476
8476
|
function ColleagueForm({
|
|
8477
8477
|
colleague,
|
|
@@ -8936,7 +8936,7 @@ function UserSelection({
|
|
|
8936
8936
|
}
|
|
8937
8937
|
)
|
|
8938
8938
|
] }) }) }) }) }),
|
|
8939
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "container grid gap-4 md:grid-cols-2 lg:grid-cols-3", children: filteredUsers.map((user) => {
|
|
8939
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "container grid gap-4 md:grid-cols-2 lg:grid-cols-3 mt-4", children: filteredUsers.map((user) => {
|
|
8940
8940
|
if (!user || !user.id) return null;
|
|
8941
8941
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
8942
8942
|
import_react24.motion.div,
|
|
@@ -8983,7 +8983,7 @@ function UserSelection({
|
|
|
8983
8983
|
) }) });
|
|
8984
8984
|
}
|
|
8985
8985
|
|
|
8986
|
-
// src/components/
|
|
8986
|
+
// src/components/Foundry/foundary-clone.tsx
|
|
8987
8987
|
var import_react25 = require("react");
|
|
8988
8988
|
var import_lucide_react26 = require("lucide-react");
|
|
8989
8989
|
var import_react26 = require("motion/react");
|
|
@@ -9067,7 +9067,7 @@ function DigitalColleagueClone({
|
|
|
9067
9067
|
}
|
|
9068
9068
|
)
|
|
9069
9069
|
] }) }) }),
|
|
9070
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3", children: filteredColleagues.map((colleague) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9070
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3 mt-4", children: filteredColleagues.map((colleague) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9071
9071
|
import_react26.motion.div,
|
|
9072
9072
|
{
|
|
9073
9073
|
layout: true,
|
|
@@ -9137,17 +9137,37 @@ function DigitalColleagueClone({
|
|
|
9137
9137
|
) }) });
|
|
9138
9138
|
}
|
|
9139
9139
|
|
|
9140
|
-
// src/components/
|
|
9140
|
+
// src/components/Foundry/digital-colleague-selection.tsx
|
|
9141
|
+
var import_react27 = require("react");
|
|
9141
9142
|
var import_lucide_react27 = require("lucide-react");
|
|
9142
|
-
var
|
|
9143
|
+
var import_react28 = require("motion/react");
|
|
9143
9144
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
9144
|
-
function
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
onCancel
|
|
9145
|
+
function DigitalColleagueSelection({
|
|
9146
|
+
digitalColleagues,
|
|
9147
|
+
onColleagueSelect,
|
|
9148
|
+
onCancel,
|
|
9149
|
+
selectedColleagueId
|
|
9148
9150
|
}) {
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
+
const [searchTerm, setSearchTerm] = (0, import_react27.useState)("");
|
|
9152
|
+
const [statusFilter, setStatusFilter] = (0, import_react27.useState)("all");
|
|
9153
|
+
const filteredColleagues = (0, import_react27.useMemo)(() => {
|
|
9154
|
+
return digitalColleagues.filter((colleague) => {
|
|
9155
|
+
const matchesSearch = colleague?.name.toLowerCase().includes(searchTerm.toLowerCase()) || colleague.jobDescription?.toLowerCase().includes(searchTerm.toLowerCase()) || colleague.workInstructions?.toLowerCase().includes(searchTerm.toLowerCase());
|
|
9156
|
+
return matchesSearch;
|
|
9157
|
+
});
|
|
9158
|
+
}, [digitalColleagues, searchTerm, statusFilter]);
|
|
9159
|
+
const handleColleagueSelect = (colleague) => {
|
|
9160
|
+
onColleagueSelect(colleague);
|
|
9161
|
+
};
|
|
9162
|
+
const formatDate = (date) => {
|
|
9163
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
9164
|
+
month: "short",
|
|
9165
|
+
day: "numeric",
|
|
9166
|
+
year: "numeric"
|
|
9167
|
+
}).format(date);
|
|
9168
|
+
};
|
|
9169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "px-2 md:px-4 py-4 space-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react28.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9170
|
+
import_react28.motion.div,
|
|
9151
9171
|
{
|
|
9152
9172
|
initial: { opacity: 0, y: 10 },
|
|
9153
9173
|
animate: { opacity: 1, y: 0 },
|
|
@@ -9160,75 +9180,283 @@ function ColleagueTypeSelection({
|
|
|
9160
9180
|
"Back"
|
|
9161
9181
|
] }),
|
|
9162
9182
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { children: [
|
|
9163
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h1", { className: "text-3xl font-bold", children: "Add Colleague" }),
|
|
9164
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-muted-foreground", children: "
|
|
9183
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h1", { className: "text-3xl font-bold", children: "Add Existing Digital Colleague" }),
|
|
9184
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-muted-foreground", children: "Select a digital colleague to add to your team" })
|
|
9165
9185
|
] })
|
|
9166
9186
|
] }),
|
|
9167
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.
|
|
9187
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CardContent, { className: "pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-col md:flex-row gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative", children: [
|
|
9188
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.Search, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
|
|
9168
9189
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9169
|
-
|
|
9190
|
+
Input,
|
|
9191
|
+
{
|
|
9192
|
+
placeholder: "Search by name, job description, or capabilities...",
|
|
9193
|
+
value: searchTerm,
|
|
9194
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
9195
|
+
className: "pl-9"
|
|
9196
|
+
}
|
|
9197
|
+
)
|
|
9198
|
+
] }) }) }) }) }),
|
|
9199
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "space-y-4 mt-4", children: filteredColleagues.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(CardContent, { className: "pt-6 text-center", children: [
|
|
9200
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.Bot, { className: "h-12 w-12 mx-auto mb-4 text-muted-foreground" }),
|
|
9201
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-lg font-medium mb-2", children: "No digital colleagues found" }),
|
|
9202
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-muted-foreground", children: searchTerm ? "Try adjusting your search criteria" : "No digital colleagues available to add" })
|
|
9203
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3", children: filteredColleagues.map((colleague) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9204
|
+
import_react28.motion.div,
|
|
9205
|
+
{
|
|
9206
|
+
initial: { opacity: 0, y: 20 },
|
|
9207
|
+
animate: { opacity: 1, y: 0 },
|
|
9208
|
+
exit: { opacity: 0, y: -20 },
|
|
9209
|
+
transition: { duration: 0.2 },
|
|
9210
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9211
|
+
Card,
|
|
9212
|
+
{
|
|
9213
|
+
className: "cursor-pointer transition-all hover:shadow-lg hover:border-primary/50",
|
|
9214
|
+
onClick: () => handleColleagueSelect(colleague),
|
|
9215
|
+
children: [
|
|
9216
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CardHeader, { className: "pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex items-start justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
9217
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Avatar, { className: "h-12 w-12 flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(AvatarFallback, { className: "bg-purple-100", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.Bot, { className: "h-6 w-6 text-purple-600" }) }) }),
|
|
9218
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex-1 min-w-0 overflow-hidden", children: [
|
|
9219
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CardTitle, { className: "text-base truncate", children: colleague?.name }),
|
|
9220
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-sm text-muted-foreground truncate", children: colleague.jobDescription || "Digital Colleague" })
|
|
9221
|
+
] })
|
|
9222
|
+
] }) }) }),
|
|
9223
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(CardContent, { className: "space-y-3", children: [
|
|
9224
|
+
colleague.model && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
9225
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.Bot, { className: "h-4 w-4 text-muted-foreground" }),
|
|
9226
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-muted-foreground truncate", children: typeof colleague.model === "object" ? colleague.model.name : colleague.model })
|
|
9227
|
+
] }),
|
|
9228
|
+
colleague.capabilities && colleague.capabilities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-wrap gap-1", children: [
|
|
9229
|
+
colleague.capabilities.slice(0, 3).map((cap, index) => {
|
|
9230
|
+
const capName = typeof cap === "object" && cap.value && typeof cap.value === "object" && "name" in cap.value ? String(cap.value.name) : "Capability";
|
|
9231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Badge, { variant: "secondary", className: "text-xs", children: capName }, index);
|
|
9232
|
+
}),
|
|
9233
|
+
colleague.capabilities.length > 3 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Badge, { variant: "outline", className: "text-xs", children: [
|
|
9234
|
+
"+",
|
|
9235
|
+
colleague.capabilities.length - 3
|
|
9236
|
+
] })
|
|
9237
|
+
] }),
|
|
9238
|
+
colleague.workInstructions && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-sm text-muted-foreground line-clamp-2", children: colleague.workInstructions }),
|
|
9239
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Button, { className: "w-full", variant: "outline", size: "sm", children: [
|
|
9240
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.UserPlus, { className: "h-4 w-4 mr-2" }),
|
|
9241
|
+
"Add to Team"
|
|
9242
|
+
] }) })
|
|
9243
|
+
] })
|
|
9244
|
+
]
|
|
9245
|
+
}
|
|
9246
|
+
)
|
|
9247
|
+
},
|
|
9248
|
+
colleague.id
|
|
9249
|
+
)) }) })
|
|
9250
|
+
]
|
|
9251
|
+
},
|
|
9252
|
+
"colleague-selection"
|
|
9253
|
+
) }) });
|
|
9254
|
+
}
|
|
9255
|
+
|
|
9256
|
+
// src/components/Foundry/add-colleague-to-team-form.tsx
|
|
9257
|
+
var import_lucide_react28 = require("lucide-react");
|
|
9258
|
+
var import_react29 = require("motion/react");
|
|
9259
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
9260
|
+
function AddColleagueToTeamForm({
|
|
9261
|
+
colleague,
|
|
9262
|
+
team,
|
|
9263
|
+
onSave,
|
|
9264
|
+
onCancel,
|
|
9265
|
+
isLoading = false
|
|
9266
|
+
}) {
|
|
9267
|
+
const handleSubmit = (e) => {
|
|
9268
|
+
e.preventDefault();
|
|
9269
|
+
onSave(colleague, team.id);
|
|
9270
|
+
};
|
|
9271
|
+
const isColleagueAlreadyMember = () => {
|
|
9272
|
+
if (!team.members) return false;
|
|
9273
|
+
return team.members.some(
|
|
9274
|
+
(member) => member.relationTo === "digital-colleagues" && (typeof member.value === "number" && member.value === colleague.id || typeof member.value === "object" && member.value.id === colleague.id)
|
|
9275
|
+
);
|
|
9276
|
+
};
|
|
9277
|
+
const alreadyMember = isColleagueAlreadyMember();
|
|
9278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "px-2 md:px-4 py-4 space-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react29.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9279
|
+
import_react29.motion.div,
|
|
9280
|
+
{
|
|
9281
|
+
initial: { opacity: 0, y: 10 },
|
|
9282
|
+
animate: { opacity: 1, y: 0 },
|
|
9283
|
+
exit: { opacity: 0, y: -10 },
|
|
9284
|
+
transition: { duration: 0.2 },
|
|
9285
|
+
children: [
|
|
9286
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-4 mb-6", children: [
|
|
9287
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Button, { variant: "ghost", onClick: onCancel, className: "gap-2", children: [
|
|
9288
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react28.ChevronLeft, { className: "h-4 w-4" }),
|
|
9289
|
+
"Back"
|
|
9290
|
+
] }),
|
|
9291
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { children: [
|
|
9292
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h1", { className: "text-3xl font-bold", children: "Add to Team" }),
|
|
9293
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-muted-foreground", children: "Confirm adding this digital colleague to your team" })
|
|
9294
|
+
] })
|
|
9295
|
+
] }),
|
|
9296
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("form", { onSubmit: handleSubmit, className: "space-y-6", children: [
|
|
9297
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Card, { children: [
|
|
9298
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CardHeader, {}),
|
|
9299
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-4", children: [
|
|
9300
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Avatar, { className: "h-16 w-16", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AvatarFallback, { className: "bg-purple-100", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react28.Bot, { className: "h-8 w-8 text-purple-600" }) }) }),
|
|
9301
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
9302
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "text-xl font-semibold", children: colleague.name }),
|
|
9303
|
+
colleague.jobDescription && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-muted-foreground", children: colleague.jobDescription }),
|
|
9304
|
+
colleague.model && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
9305
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react28.Bot, { className: "h-4 w-4 text-muted-foreground" }),
|
|
9306
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-muted-foreground", children: typeof colleague.model === "object" ? colleague.model.name : colleague.model })
|
|
9307
|
+
] }),
|
|
9308
|
+
colleague.capabilities && colleague.capabilities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-wrap gap-1 mt-2", children: [
|
|
9309
|
+
colleague.capabilities.slice(0, 5).map((cap, index) => {
|
|
9310
|
+
const capName = typeof cap === "object" && cap.value && typeof cap.value === "object" && "name" in cap.value ? String(cap.value.name) : "Capability";
|
|
9311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge, { variant: "secondary", className: "text-xs", children: capName }, index);
|
|
9312
|
+
}),
|
|
9313
|
+
colleague.capabilities.length > 5 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Badge, { variant: "outline", className: "text-xs", children: [
|
|
9314
|
+
"+",
|
|
9315
|
+
colleague.capabilities.length - 5,
|
|
9316
|
+
" more"
|
|
9317
|
+
] })
|
|
9318
|
+
] })
|
|
9319
|
+
] })
|
|
9320
|
+
] }) })
|
|
9321
|
+
] }),
|
|
9322
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Card, { children: [
|
|
9323
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(CardHeader, { children: [
|
|
9324
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CardTitle, { className: "text-lg", children: "Team" }),
|
|
9325
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-muted-foreground", children: "This colleague will be added to the following team" })
|
|
9326
|
+
] }),
|
|
9327
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "p-4 border rounded-lg bg-primary/5 border-primary", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
9328
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0 mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react28.Users, { className: "h-5 w-5 text-blue-600" }) }) }),
|
|
9329
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1", children: [
|
|
9330
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9331
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "text-base font-semibold", children: team.name }),
|
|
9332
|
+
alreadyMember && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Badge, { variant: "secondary", className: "text-xs", children: [
|
|
9333
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react28.Check, { className: "h-3 w-3 mr-1" }),
|
|
9334
|
+
"Already a member"
|
|
9335
|
+
] })
|
|
9336
|
+
] }),
|
|
9337
|
+
team.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-muted-foreground mt-1", children: team.description }),
|
|
9338
|
+
team.members && team.members.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", { className: "text-xs text-muted-foreground mt-2", children: [
|
|
9339
|
+
team.members.length,
|
|
9340
|
+
" current member",
|
|
9341
|
+
team.members.length !== 1 ? "s" : ""
|
|
9342
|
+
] })
|
|
9343
|
+
] })
|
|
9344
|
+
] }) }) })
|
|
9345
|
+
] }),
|
|
9346
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-end gap-3", children: [
|
|
9347
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isLoading, children: "Cancel" }),
|
|
9348
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9349
|
+
Button,
|
|
9350
|
+
{
|
|
9351
|
+
type: "submit",
|
|
9352
|
+
disabled: isLoading || alreadyMember,
|
|
9353
|
+
className: "gap-2",
|
|
9354
|
+
children: [
|
|
9355
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react28.Users, { className: "h-4 w-4" }),
|
|
9356
|
+
alreadyMember ? "Already in Team" : "Add to Team"
|
|
9357
|
+
]
|
|
9358
|
+
}
|
|
9359
|
+
)
|
|
9360
|
+
] })
|
|
9361
|
+
] })
|
|
9362
|
+
]
|
|
9363
|
+
},
|
|
9364
|
+
"add-colleague-to-team"
|
|
9365
|
+
) }) });
|
|
9366
|
+
}
|
|
9367
|
+
|
|
9368
|
+
// src/components/Foundry/colleague-type-selection.tsx
|
|
9369
|
+
var import_lucide_react29 = require("lucide-react");
|
|
9370
|
+
var import_react30 = require("motion/react");
|
|
9371
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
9372
|
+
function ColleagueTypeSelection({
|
|
9373
|
+
onSelectHuman,
|
|
9374
|
+
onSelectDigital,
|
|
9375
|
+
onCancel
|
|
9376
|
+
}) {
|
|
9377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "px-2 md:px-4 py-4 space-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react30.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
9378
|
+
import_react30.motion.div,
|
|
9379
|
+
{
|
|
9380
|
+
initial: { opacity: 0, y: 10 },
|
|
9381
|
+
animate: { opacity: 1, y: 0 },
|
|
9382
|
+
exit: { opacity: 0, y: -10 },
|
|
9383
|
+
transition: { duration: 0.2 },
|
|
9384
|
+
children: [
|
|
9385
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-4 mb-6", children: [
|
|
9386
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Button, { variant: "ghost", onClick: onCancel, className: "gap-2", children: [
|
|
9387
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react29.ChevronLeft, { className: "h-4 w-4" }),
|
|
9388
|
+
"Back"
|
|
9389
|
+
] }),
|
|
9390
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { children: [
|
|
9391
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h1", { className: "text-3xl font-bold", children: "Add Colleague" }),
|
|
9392
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-muted-foreground", children: "Choose the type of colleague to add" })
|
|
9393
|
+
] })
|
|
9394
|
+
] }),
|
|
9395
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "grid gap-6 md:grid-cols-2 max-w-4xl mx-auto", children: [
|
|
9396
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
9397
|
+
import_react30.motion.div,
|
|
9170
9398
|
{
|
|
9171
9399
|
whileHover: { scale: 1.02 },
|
|
9172
9400
|
whileTap: { scale: 0.98 },
|
|
9173
9401
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
9174
|
-
children: /* @__PURE__ */ (0,
|
|
9402
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
9175
9403
|
Card,
|
|
9176
9404
|
{
|
|
9177
9405
|
className: "cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",
|
|
9178
9406
|
onClick: onSelectHuman,
|
|
9179
9407
|
children: [
|
|
9180
|
-
/* @__PURE__ */ (0,
|
|
9181
|
-
/* @__PURE__ */ (0,
|
|
9182
|
-
/* @__PURE__ */ (0,
|
|
9408
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(CardHeader, { className: "text-center pb-4", children: [
|
|
9409
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react29.User, { className: "h-8 w-8 text-blue-600" }) }),
|
|
9410
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CardTitle, { className: "text-xl", children: "Add Human Colleague" })
|
|
9183
9411
|
] }),
|
|
9184
|
-
/* @__PURE__ */ (0,
|
|
9185
|
-
/* @__PURE__ */ (0,
|
|
9186
|
-
/* @__PURE__ */ (0,
|
|
9187
|
-
/* @__PURE__ */ (0,
|
|
9188
|
-
/* @__PURE__ */ (0,
|
|
9189
|
-
/* @__PURE__ */ (0,
|
|
9412
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(CardContent, { className: "text-center", children: [
|
|
9413
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-muted-foreground mb-4", children: "Select from existing users in your organization to add as team members." }),
|
|
9414
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "space-y-2 text-sm", children: [
|
|
9415
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9416
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react29.Users, { className: "h-4 w-4 text-blue-600" }),
|
|
9417
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "Browse existing users" })
|
|
9190
9418
|
] }),
|
|
9191
|
-
/* @__PURE__ */ (0,
|
|
9192
|
-
/* @__PURE__ */ (0,
|
|
9193
|
-
/* @__PURE__ */ (0,
|
|
9419
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9420
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react29.User, { className: "h-4 w-4 text-blue-600" }),
|
|
9421
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "Import user details automatically" })
|
|
9194
9422
|
] })
|
|
9195
9423
|
] }),
|
|
9196
|
-
/* @__PURE__ */ (0,
|
|
9424
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Button, { className: "mt-6 w-full", onClick: onSelectHuman, children: "Select User" })
|
|
9197
9425
|
] })
|
|
9198
9426
|
]
|
|
9199
9427
|
}
|
|
9200
9428
|
)
|
|
9201
9429
|
}
|
|
9202
9430
|
),
|
|
9203
|
-
/* @__PURE__ */ (0,
|
|
9204
|
-
|
|
9431
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
9432
|
+
import_react30.motion.div,
|
|
9205
9433
|
{
|
|
9206
9434
|
whileHover: { scale: 1.02 },
|
|
9207
9435
|
whileTap: { scale: 0.98 },
|
|
9208
9436
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
9209
|
-
children: /* @__PURE__ */ (0,
|
|
9437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
9210
9438
|
Card,
|
|
9211
9439
|
{
|
|
9212
9440
|
className: "cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",
|
|
9213
9441
|
onClick: onSelectDigital,
|
|
9214
9442
|
children: [
|
|
9215
|
-
/* @__PURE__ */ (0,
|
|
9216
|
-
/* @__PURE__ */ (0,
|
|
9217
|
-
/* @__PURE__ */ (0,
|
|
9443
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(CardHeader, { className: "text-center pb-4", children: [
|
|
9444
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react29.Bot, { className: "h-8 w-8 text-purple-600" }) }),
|
|
9445
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CardTitle, { className: "text-xl", children: "Add Digital Colleague" })
|
|
9218
9446
|
] }),
|
|
9219
|
-
/* @__PURE__ */ (0,
|
|
9220
|
-
/* @__PURE__ */ (0,
|
|
9221
|
-
/* @__PURE__ */ (0,
|
|
9222
|
-
/* @__PURE__ */ (0,
|
|
9223
|
-
/* @__PURE__ */ (0,
|
|
9224
|
-
/* @__PURE__ */ (0,
|
|
9447
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(CardContent, { className: "text-center", children: [
|
|
9448
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-muted-foreground mb-4", children: "Clone an existing digital colleague or create a new AI assistant for your team." }),
|
|
9449
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "space-y-2 text-sm", children: [
|
|
9450
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9451
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react29.Bot, { className: "h-4 w-4 text-purple-600" }),
|
|
9452
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "Clone existing colleagues" })
|
|
9225
9453
|
] }),
|
|
9226
|
-
/* @__PURE__ */ (0,
|
|
9227
|
-
/* @__PURE__ */ (0,
|
|
9228
|
-
/* @__PURE__ */ (0,
|
|
9454
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9455
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react29.Users, { className: "h-4 w-4 text-purple-600" }),
|
|
9456
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "Create from templates" })
|
|
9229
9457
|
] })
|
|
9230
9458
|
] }),
|
|
9231
|
-
/* @__PURE__ */ (0,
|
|
9459
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Button, { className: "mt-6 w-full", onClick: onSelectDigital, children: "Add Digital Colleague" })
|
|
9232
9460
|
] })
|
|
9233
9461
|
]
|
|
9234
9462
|
}
|
|
@@ -9242,98 +9470,134 @@ function ColleagueTypeSelection({
|
|
|
9242
9470
|
) }) });
|
|
9243
9471
|
}
|
|
9244
9472
|
|
|
9245
|
-
// src/components/
|
|
9246
|
-
var
|
|
9247
|
-
var
|
|
9248
|
-
var
|
|
9473
|
+
// src/components/Foundry/foundary-options.tsx
|
|
9474
|
+
var import_lucide_react30 = require("lucide-react");
|
|
9475
|
+
var import_react31 = require("motion/react");
|
|
9476
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
9249
9477
|
function DigitalColleagueOptions({
|
|
9250
9478
|
onCloneExisting,
|
|
9479
|
+
onAddExisting,
|
|
9251
9480
|
onCreateNew,
|
|
9252
9481
|
onCancel
|
|
9253
9482
|
}) {
|
|
9254
|
-
return /* @__PURE__ */ (0,
|
|
9255
|
-
|
|
9483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "px-2 md:px-4 py-4 space-y-6", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react31.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
9484
|
+
import_react31.motion.div,
|
|
9256
9485
|
{
|
|
9257
9486
|
initial: { opacity: 0, y: 10 },
|
|
9258
9487
|
animate: { opacity: 1, y: 0 },
|
|
9259
9488
|
exit: { opacity: 0, y: -10 },
|
|
9260
9489
|
transition: { duration: 0.2 },
|
|
9261
9490
|
children: [
|
|
9262
|
-
/* @__PURE__ */ (0,
|
|
9263
|
-
/* @__PURE__ */ (0,
|
|
9264
|
-
/* @__PURE__ */ (0,
|
|
9491
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-4 mb-6", children: [
|
|
9492
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Button, { variant: "ghost", onClick: onCancel, className: "gap-2", children: [
|
|
9493
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.ChevronLeft, { className: "h-4 w-4" }),
|
|
9265
9494
|
"Back"
|
|
9266
9495
|
] }),
|
|
9267
|
-
/* @__PURE__ */ (0,
|
|
9268
|
-
/* @__PURE__ */ (0,
|
|
9269
|
-
/* @__PURE__ */ (0,
|
|
9496
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { children: [
|
|
9497
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h1", { className: "text-3xl font-bold", children: "Add Digital Colleague" }),
|
|
9498
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-muted-foreground", children: "Choose how to create your digital colleague" })
|
|
9270
9499
|
] })
|
|
9271
9500
|
] }),
|
|
9272
|
-
/* @__PURE__ */ (0,
|
|
9273
|
-
/* @__PURE__ */ (0,
|
|
9274
|
-
|
|
9501
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "grid gap-6 md:grid-cols-3 max-w-6xl mx-auto", children: [
|
|
9502
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
9503
|
+
import_react31.motion.div,
|
|
9504
|
+
{
|
|
9505
|
+
whileHover: { scale: 1.02 },
|
|
9506
|
+
whileTap: { scale: 0.98 },
|
|
9507
|
+
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
9508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
9509
|
+
Card,
|
|
9510
|
+
{
|
|
9511
|
+
className: "cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",
|
|
9512
|
+
onClick: onAddExisting,
|
|
9513
|
+
children: [
|
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(CardHeader, { className: "text-center pb-4", children: [
|
|
9515
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.UserPlus, { className: "h-8 w-8 text-purple-600" }) }),
|
|
9516
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CardTitle, { className: "text-xl", children: "Add Existing" })
|
|
9517
|
+
] }),
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(CardContent, { className: "text-center", children: [
|
|
9519
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-muted-foreground mb-4", children: "Add an already configured digital colleague directly to your team." }),
|
|
9520
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-2 text-sm", children: [
|
|
9521
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9522
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.Bot, { className: "h-4 w-4 text-purple-600" }),
|
|
9523
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Fully configured" })
|
|
9524
|
+
] }),
|
|
9525
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9526
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.UserPlus, { className: "h-4 w-4 text-purple-600" }),
|
|
9527
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Ready to use" })
|
|
9528
|
+
] })
|
|
9529
|
+
] }),
|
|
9530
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { className: "mt-6 w-full", onClick: onAddExisting, children: "Browse & Add" })
|
|
9531
|
+
] })
|
|
9532
|
+
]
|
|
9533
|
+
}
|
|
9534
|
+
)
|
|
9535
|
+
}
|
|
9536
|
+
),
|
|
9537
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
9538
|
+
import_react31.motion.div,
|
|
9275
9539
|
{
|
|
9276
9540
|
whileHover: { scale: 1.02 },
|
|
9277
9541
|
whileTap: { scale: 0.98 },
|
|
9278
9542
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
9279
|
-
children: /* @__PURE__ */ (0,
|
|
9543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
9280
9544
|
Card,
|
|
9281
9545
|
{
|
|
9282
9546
|
className: "cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",
|
|
9283
9547
|
onClick: onCloneExisting,
|
|
9284
9548
|
children: [
|
|
9285
|
-
/* @__PURE__ */ (0,
|
|
9286
|
-
/* @__PURE__ */ (0,
|
|
9287
|
-
/* @__PURE__ */ (0,
|
|
9549
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(CardHeader, { className: "text-center pb-4", children: [
|
|
9550
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.Copy, { className: "h-8 w-8 text-blue-600" }) }),
|
|
9551
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CardTitle, { className: "text-xl", children: "Clone Existing" })
|
|
9288
9552
|
] }),
|
|
9289
|
-
/* @__PURE__ */ (0,
|
|
9290
|
-
/* @__PURE__ */ (0,
|
|
9291
|
-
/* @__PURE__ */ (0,
|
|
9292
|
-
/* @__PURE__ */ (0,
|
|
9293
|
-
/* @__PURE__ */ (0,
|
|
9294
|
-
/* @__PURE__ */ (0,
|
|
9553
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(CardContent, { className: "text-center", children: [
|
|
9554
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-muted-foreground mb-4", children: "Start with an existing digital colleague and customize it for your needs." }),
|
|
9555
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-2 text-sm", children: [
|
|
9556
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9557
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.Bot, { className: "h-4 w-4 text-blue-600" }),
|
|
9558
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Pre-configured capabilities" })
|
|
9295
9559
|
] }),
|
|
9296
|
-
/* @__PURE__ */ (0,
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9298
|
-
/* @__PURE__ */ (0,
|
|
9560
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9561
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.Copy, { className: "h-4 w-4 text-blue-600" }),
|
|
9562
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Inherit knowledge base" })
|
|
9299
9563
|
] })
|
|
9300
9564
|
] }),
|
|
9301
|
-
/* @__PURE__ */ (0,
|
|
9565
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { className: "mt-6 w-full", onClick: onCloneExisting, children: "Browse & Clone" })
|
|
9302
9566
|
] })
|
|
9303
9567
|
]
|
|
9304
9568
|
}
|
|
9305
9569
|
)
|
|
9306
9570
|
}
|
|
9307
9571
|
),
|
|
9308
|
-
/* @__PURE__ */ (0,
|
|
9309
|
-
|
|
9572
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
9573
|
+
import_react31.motion.div,
|
|
9310
9574
|
{
|
|
9311
9575
|
whileHover: { scale: 1.02 },
|
|
9312
9576
|
whileTap: { scale: 0.98 },
|
|
9313
9577
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
9314
|
-
children: /* @__PURE__ */ (0,
|
|
9578
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
9315
9579
|
Card,
|
|
9316
9580
|
{
|
|
9317
9581
|
className: "cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",
|
|
9318
9582
|
onClick: onCreateNew,
|
|
9319
9583
|
children: [
|
|
9320
|
-
/* @__PURE__ */ (0,
|
|
9321
|
-
/* @__PURE__ */ (0,
|
|
9322
|
-
/* @__PURE__ */ (0,
|
|
9584
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(CardHeader, { className: "text-center pb-4", children: [
|
|
9585
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.Sparkles, { className: "h-8 w-8 text-green-600" }) }),
|
|
9586
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CardTitle, { className: "text-xl", children: "Create New" })
|
|
9323
9587
|
] }),
|
|
9324
|
-
/* @__PURE__ */ (0,
|
|
9325
|
-
/* @__PURE__ */ (0,
|
|
9326
|
-
/* @__PURE__ */ (0,
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9328
|
-
/* @__PURE__ */ (0,
|
|
9329
|
-
/* @__PURE__ */ (0,
|
|
9588
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(CardContent, { className: "text-center", children: [
|
|
9589
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-muted-foreground mb-4", children: "Build a completely new digital colleague from scratch with custom specifications." }),
|
|
9590
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-2 text-sm", children: [
|
|
9591
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9592
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.Plus, { className: "h-4 w-4 text-green-600" }),
|
|
9593
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Custom job description" })
|
|
9330
9594
|
] }),
|
|
9331
|
-
/* @__PURE__ */ (0,
|
|
9332
|
-
/* @__PURE__ */ (0,
|
|
9333
|
-
/* @__PURE__ */ (0,
|
|
9595
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 justify-center", children: [
|
|
9596
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react30.Sparkles, { className: "h-4 w-4 text-green-600" }),
|
|
9597
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: "Define unique capabilities" })
|
|
9334
9598
|
] })
|
|
9335
9599
|
] }),
|
|
9336
|
-
/* @__PURE__ */ (0,
|
|
9600
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { className: "mt-6 w-full", onClick: onCreateNew, children: "Create from Scratch" })
|
|
9337
9601
|
] })
|
|
9338
9602
|
]
|
|
9339
9603
|
}
|
|
@@ -9347,8 +9611,8 @@ function DigitalColleagueOptions({
|
|
|
9347
9611
|
) }) });
|
|
9348
9612
|
}
|
|
9349
9613
|
|
|
9350
|
-
// src/components/
|
|
9351
|
-
var
|
|
9614
|
+
// src/components/Foundry/Views/ColleaguesView.tsx
|
|
9615
|
+
var import_react33 = require("motion/react");
|
|
9352
9616
|
|
|
9353
9617
|
// src/components/dc-temp/utils.ts
|
|
9354
9618
|
var import_clsx2 = require("clsx");
|
|
@@ -9356,35 +9620,38 @@ function cn2(...inputs) {
|
|
|
9356
9620
|
return twMerge((0, import_clsx2.clsx)(inputs));
|
|
9357
9621
|
}
|
|
9358
9622
|
|
|
9359
|
-
// src/components/
|
|
9360
|
-
var
|
|
9623
|
+
// src/components/Foundry/Views/ColleaguesView.tsx
|
|
9624
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
9361
9625
|
function ColleaguesView({
|
|
9362
9626
|
initialColleagues,
|
|
9363
9627
|
onColleagueAdd,
|
|
9364
9628
|
onColleagueEdit,
|
|
9365
9629
|
onColleagueDelete,
|
|
9630
|
+
onColleagueAddToTeam,
|
|
9366
9631
|
compactView = false,
|
|
9367
9632
|
departments = ["Design", "Engineering", "Marketing", "Product", "Sales", "Operations"],
|
|
9368
9633
|
className,
|
|
9369
9634
|
availableUsers = [],
|
|
9370
9635
|
existingDigitalColleagues = [],
|
|
9636
|
+
currentTeam,
|
|
9371
9637
|
availableKnowledgeDocuments = [],
|
|
9372
9638
|
availableCapabilities = [],
|
|
9373
9639
|
availableModels = []
|
|
9374
9640
|
}) {
|
|
9375
|
-
const [colleagues, setColleagues] = (0,
|
|
9376
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
9377
|
-
const [departmentFilter, setDepartmentFilter] = (0,
|
|
9378
|
-
const [statusFilter, setStatusFilter] = (0,
|
|
9379
|
-
const [activeTab, setActiveTab] = (0,
|
|
9380
|
-
const [editingColleague, setEditingColleague] = (0,
|
|
9381
|
-
const [viewingColleague, setViewingColleague] = (0,
|
|
9382
|
-
(0,
|
|
9641
|
+
const [colleagues, setColleagues] = (0, import_react32.useState)(initialColleagues || []);
|
|
9642
|
+
const [searchTerm, setSearchTerm] = (0, import_react32.useState)("");
|
|
9643
|
+
const [departmentFilter, setDepartmentFilter] = (0, import_react32.useState)("all");
|
|
9644
|
+
const [statusFilter, setStatusFilter] = (0, import_react32.useState)("all");
|
|
9645
|
+
const [activeTab, setActiveTab] = (0, import_react32.useState)("all");
|
|
9646
|
+
const [editingColleague, setEditingColleague] = (0, import_react32.useState)(null);
|
|
9647
|
+
const [viewingColleague, setViewingColleague] = (0, import_react32.useState)(null);
|
|
9648
|
+
const [selectedColleagueForTeam, setSelectedColleagueForTeam] = (0, import_react32.useState)(null);
|
|
9649
|
+
(0, import_react32.useEffect)(() => {
|
|
9383
9650
|
setColleagues(initialColleagues || []);
|
|
9384
9651
|
}, [initialColleagues]);
|
|
9385
9652
|
const safeAvailableUsers = Array.isArray(availableUsers) ? availableUsers : [];
|
|
9386
9653
|
const safeExistingDigitalColleagues = Array.isArray(existingDigitalColleagues) ? existingDigitalColleagues : [];
|
|
9387
|
-
const [currentView, setCurrentView] = (0,
|
|
9654
|
+
const [currentView, setCurrentView] = (0, import_react32.useState)("main");
|
|
9388
9655
|
const filteredColleagues = colleagues.filter((colleague) => {
|
|
9389
9656
|
if (!colleague || !colleague?.name) return false;
|
|
9390
9657
|
const matchesSearch = colleague?.name.toLowerCase().includes(searchTerm.toLowerCase()) || colleague.type === "human" && // (colleague.email?.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
|
@@ -9450,6 +9717,27 @@ function ColleaguesView({
|
|
|
9450
9717
|
onColleagueAdd?.({ ...clonedColleague, type: "digital" });
|
|
9451
9718
|
setCurrentView("main");
|
|
9452
9719
|
};
|
|
9720
|
+
const handleDigitalColleagueSelect = (selectedColleague) => {
|
|
9721
|
+
if (!selectedColleague || !selectedColleague.id) {
|
|
9722
|
+
console.error(
|
|
9723
|
+
"Invalid selected colleague provided to handleDigitalColleagueSelect:",
|
|
9724
|
+
selectedColleague
|
|
9725
|
+
);
|
|
9726
|
+
return;
|
|
9727
|
+
}
|
|
9728
|
+
setSelectedColleagueForTeam(selectedColleague);
|
|
9729
|
+
setCurrentView("addToTeam");
|
|
9730
|
+
};
|
|
9731
|
+
const handleAddColleagueToTeam = (colleague, teamId) => {
|
|
9732
|
+
onColleagueAddToTeam?.(colleague, teamId);
|
|
9733
|
+
setColleagues((prev) => [...prev, { ...colleague, type: "digital" }]);
|
|
9734
|
+
setSelectedColleagueForTeam(null);
|
|
9735
|
+
setCurrentView("main");
|
|
9736
|
+
};
|
|
9737
|
+
const handleCancelAddToTeam = () => {
|
|
9738
|
+
setSelectedColleagueForTeam(null);
|
|
9739
|
+
setCurrentView("digitalSelection");
|
|
9740
|
+
};
|
|
9453
9741
|
const handleCreateNewDigital = () => {
|
|
9454
9742
|
setEditingColleague(null);
|
|
9455
9743
|
setCurrentView("form");
|
|
@@ -9500,7 +9788,7 @@ function ColleaguesView({
|
|
|
9500
9788
|
setStatusFilter("all");
|
|
9501
9789
|
};
|
|
9502
9790
|
if (currentView === "typeSelection") {
|
|
9503
|
-
return /* @__PURE__ */ (0,
|
|
9791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9504
9792
|
ColleagueTypeSelection,
|
|
9505
9793
|
{
|
|
9506
9794
|
onSelectHuman: () => setCurrentView("userSelection"),
|
|
@@ -9512,7 +9800,7 @@ function ColleaguesView({
|
|
|
9512
9800
|
if (currentView === "userSelection") {
|
|
9513
9801
|
return (
|
|
9514
9802
|
// <h1>User selection</h1>
|
|
9515
|
-
/* @__PURE__ */ (0,
|
|
9803
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9516
9804
|
UserSelection,
|
|
9517
9805
|
{
|
|
9518
9806
|
users: safeAvailableUsers,
|
|
@@ -9523,17 +9811,43 @@ function ColleaguesView({
|
|
|
9523
9811
|
);
|
|
9524
9812
|
}
|
|
9525
9813
|
if (currentView === "digitalOptions") {
|
|
9526
|
-
return /* @__PURE__ */ (0,
|
|
9814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9527
9815
|
DigitalColleagueOptions,
|
|
9528
9816
|
{
|
|
9817
|
+
onAddExisting: () => setCurrentView("digitalSelection"),
|
|
9529
9818
|
onCloneExisting: () => setCurrentView("digitalClone"),
|
|
9530
9819
|
onCreateNew: handleCreateNewDigital,
|
|
9531
9820
|
onCancel: () => setCurrentView("typeSelection")
|
|
9532
9821
|
}
|
|
9533
9822
|
);
|
|
9534
9823
|
}
|
|
9824
|
+
if (currentView === "digitalSelection") {
|
|
9825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9826
|
+
DigitalColleagueSelection,
|
|
9827
|
+
{
|
|
9828
|
+
digitalColleagues: safeExistingDigitalColleagues,
|
|
9829
|
+
onColleagueSelect: handleDigitalColleagueSelect,
|
|
9830
|
+
onCancel: () => setCurrentView("digitalOptions")
|
|
9831
|
+
}
|
|
9832
|
+
);
|
|
9833
|
+
}
|
|
9834
|
+
if (currentView === "addToTeam") {
|
|
9835
|
+
if (!selectedColleagueForTeam || !currentTeam) {
|
|
9836
|
+
setCurrentView("digitalSelection");
|
|
9837
|
+
return null;
|
|
9838
|
+
}
|
|
9839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9840
|
+
AddColleagueToTeamForm,
|
|
9841
|
+
{
|
|
9842
|
+
colleague: selectedColleagueForTeam,
|
|
9843
|
+
team: currentTeam,
|
|
9844
|
+
onSave: handleAddColleagueToTeam,
|
|
9845
|
+
onCancel: handleCancelAddToTeam
|
|
9846
|
+
}
|
|
9847
|
+
);
|
|
9848
|
+
}
|
|
9535
9849
|
if (currentView === "digitalClone") {
|
|
9536
|
-
return /* @__PURE__ */ (0,
|
|
9850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9537
9851
|
DigitalColleagueClone,
|
|
9538
9852
|
{
|
|
9539
9853
|
digitalColleagues: safeExistingDigitalColleagues,
|
|
@@ -9543,7 +9857,7 @@ function ColleaguesView({
|
|
|
9543
9857
|
);
|
|
9544
9858
|
}
|
|
9545
9859
|
if (currentView === "form") {
|
|
9546
|
-
return /* @__PURE__ */ (0,
|
|
9860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9547
9861
|
ColleagueForm,
|
|
9548
9862
|
{
|
|
9549
9863
|
colleague: editingColleague || void 0,
|
|
@@ -9556,7 +9870,7 @@ function ColleaguesView({
|
|
|
9556
9870
|
);
|
|
9557
9871
|
}
|
|
9558
9872
|
if (currentView === "view") {
|
|
9559
|
-
return /* @__PURE__ */ (0,
|
|
9873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9560
9874
|
ColleagueForm,
|
|
9561
9875
|
{
|
|
9562
9876
|
colleague: viewingColleague || void 0,
|
|
@@ -9569,15 +9883,15 @@ function ColleaguesView({
|
|
|
9569
9883
|
}
|
|
9570
9884
|
);
|
|
9571
9885
|
}
|
|
9572
|
-
return /* @__PURE__ */ (0,
|
|
9573
|
-
|
|
9886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-2 md:px-4 py-4 space-y-8", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react33.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9887
|
+
import_react33.motion.div,
|
|
9574
9888
|
{
|
|
9575
9889
|
initial: { opacity: 0, y: 10 },
|
|
9576
9890
|
animate: { opacity: 1, y: 0 },
|
|
9577
9891
|
exit: { opacity: 0, y: -10 },
|
|
9578
9892
|
transition: { duration: 0.2 },
|
|
9579
|
-
children: /* @__PURE__ */ (0,
|
|
9580
|
-
/* @__PURE__ */ (0,
|
|
9893
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `space-y-6 ${className || ""}`, children: [
|
|
9894
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9581
9895
|
DashboardHero,
|
|
9582
9896
|
{
|
|
9583
9897
|
title: "Colleagues",
|
|
@@ -9589,42 +9903,42 @@ function ColleaguesView({
|
|
|
9589
9903
|
}
|
|
9590
9904
|
}
|
|
9591
9905
|
),
|
|
9592
|
-
/* @__PURE__ */ (0,
|
|
9593
|
-
/* @__PURE__ */ (0,
|
|
9594
|
-
/* @__PURE__ */ (0,
|
|
9595
|
-
/* @__PURE__ */ (0,
|
|
9596
|
-
/* @__PURE__ */ (0,
|
|
9906
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
|
|
9907
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Card, { children: [
|
|
9908
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
9909
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CardTitle, { className: "text-sm font-medium", children: "Total Colleagues" }),
|
|
9910
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react31.Users, { className: "h-4 w-4 text-muted-foreground" })
|
|
9597
9911
|
] }),
|
|
9598
|
-
/* @__PURE__ */ (0,
|
|
9599
|
-
/* @__PURE__ */ (0,
|
|
9600
|
-
/* @__PURE__ */ (0,
|
|
9912
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(CardContent, { children: [
|
|
9913
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-2xl font-bold", children: colleagues.length }),
|
|
9914
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs text-muted-foreground", children: "0 active" })
|
|
9601
9915
|
] })
|
|
9602
9916
|
] }),
|
|
9603
|
-
/* @__PURE__ */ (0,
|
|
9604
|
-
/* @__PURE__ */ (0,
|
|
9605
|
-
/* @__PURE__ */ (0,
|
|
9606
|
-
/* @__PURE__ */ (0,
|
|
9917
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Card, { children: [
|
|
9918
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
9919
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CardTitle, { className: "text-sm font-medium", children: "Human Members" }),
|
|
9920
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react31.User, { className: "h-4 w-4 text-muted-foreground" })
|
|
9607
9921
|
] }),
|
|
9608
|
-
/* @__PURE__ */ (0,
|
|
9609
|
-
/* @__PURE__ */ (0,
|
|
9610
|
-
/* @__PURE__ */ (0,
|
|
9922
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(CardContent, { children: [
|
|
9923
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-2xl font-bold", children: colleagues.filter((c) => c.type === "human").length }),
|
|
9924
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs text-muted-foreground", children: "active" })
|
|
9611
9925
|
] })
|
|
9612
9926
|
] }),
|
|
9613
|
-
/* @__PURE__ */ (0,
|
|
9614
|
-
/* @__PURE__ */ (0,
|
|
9615
|
-
/* @__PURE__ */ (0,
|
|
9616
|
-
/* @__PURE__ */ (0,
|
|
9927
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Card, { children: [
|
|
9928
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
9929
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CardTitle, { className: "text-sm font-medium", children: "Digital Colleagues" }),
|
|
9930
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react31.Bot, { className: "h-4 w-4 text-muted-foreground" })
|
|
9617
9931
|
] }),
|
|
9618
|
-
/* @__PURE__ */ (0,
|
|
9619
|
-
/* @__PURE__ */ (0,
|
|
9620
|
-
/* @__PURE__ */ (0,
|
|
9932
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(CardContent, { children: [
|
|
9933
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "text-2xl font-bold", children: colleagues.filter((c) => c.type === "digital").length }),
|
|
9934
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-xs text-muted-foreground", children: "0 active" })
|
|
9621
9935
|
] })
|
|
9622
9936
|
] })
|
|
9623
9937
|
] }),
|
|
9624
|
-
/* @__PURE__ */ (0,
|
|
9625
|
-
/* @__PURE__ */ (0,
|
|
9626
|
-
/* @__PURE__ */ (0,
|
|
9627
|
-
/* @__PURE__ */ (0,
|
|
9938
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CardContent, { className: "pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col md:flex-row gap-4", children: [
|
|
9939
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "relative", children: [
|
|
9940
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react31.Search, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
|
|
9941
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9628
9942
|
Input,
|
|
9629
9943
|
{
|
|
9630
9944
|
placeholder: "Search colleagues...",
|
|
@@ -9634,28 +9948,28 @@ function ColleaguesView({
|
|
|
9634
9948
|
}
|
|
9635
9949
|
)
|
|
9636
9950
|
] }) }),
|
|
9637
|
-
/* @__PURE__ */ (0,
|
|
9638
|
-
/* @__PURE__ */ (0,
|
|
9639
|
-
/* @__PURE__ */ (0,
|
|
9640
|
-
/* @__PURE__ */ (0,
|
|
9641
|
-
departments.map((dept) => /* @__PURE__ */ (0,
|
|
9951
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Select, { value: departmentFilter, onValueChange: setDepartmentFilter, children: [
|
|
9952
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectTrigger, { className: "w-full md:w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectValue, { placeholder: "Department" }) }),
|
|
9953
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(SelectContent, { children: [
|
|
9954
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "all", children: "All Departments" }),
|
|
9955
|
+
departments.map((dept) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: dept, children: dept }, dept))
|
|
9642
9956
|
] })
|
|
9643
9957
|
] }),
|
|
9644
|
-
/* @__PURE__ */ (0,
|
|
9645
|
-
/* @__PURE__ */ (0,
|
|
9646
|
-
/* @__PURE__ */ (0,
|
|
9647
|
-
/* @__PURE__ */ (0,
|
|
9648
|
-
/* @__PURE__ */ (0,
|
|
9649
|
-
/* @__PURE__ */ (0,
|
|
9958
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Select, { value: statusFilter, onValueChange: setStatusFilter, children: [
|
|
9959
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectTrigger, { className: "w-full md:w-[140px]", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectValue, { placeholder: "Status" }) }),
|
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(SelectContent, { children: [
|
|
9961
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "all", children: "All Status" }),
|
|
9962
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "active", children: "Active" }),
|
|
9963
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "inactive", children: "Inactive" })
|
|
9650
9964
|
] })
|
|
9651
9965
|
] }),
|
|
9652
|
-
(searchTerm || departmentFilter !== "all" || statusFilter !== "all") && /* @__PURE__ */ (0,
|
|
9653
|
-
/* @__PURE__ */ (0,
|
|
9966
|
+
(searchTerm || departmentFilter !== "all" || statusFilter !== "all") && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Button, { variant: "outline", onClick: clearFilters, className: "gap-2", children: [
|
|
9967
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react31.Filter, { className: "h-4 w-4" }),
|
|
9654
9968
|
"Clear"
|
|
9655
9969
|
] })
|
|
9656
9970
|
] }) }) }),
|
|
9657
|
-
/* @__PURE__ */ (0,
|
|
9658
|
-
/* @__PURE__ */ (0,
|
|
9971
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-4", children: [
|
|
9972
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9659
9973
|
NavigationTabs,
|
|
9660
9974
|
{
|
|
9661
9975
|
activeTab,
|
|
@@ -9669,11 +9983,11 @@ function ColleaguesView({
|
|
|
9669
9983
|
gridCols: 3
|
|
9670
9984
|
}
|
|
9671
9985
|
),
|
|
9672
|
-
activeTab === "all" && /* @__PURE__ */ (0,
|
|
9986
|
+
activeTab === "all" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9673
9987
|
"div",
|
|
9674
9988
|
{
|
|
9675
9989
|
className: `grid gap-4 ${compactView ? "grid-cols-1 md:grid-cols-2 lg:grid-cols-4" : "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,
|
|
9676
|
-
children: filteredColleagues.map((colleague) => /* @__PURE__ */ (0,
|
|
9990
|
+
children: filteredColleagues.map((colleague) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9677
9991
|
ColleagueCard,
|
|
9678
9992
|
{
|
|
9679
9993
|
colleague,
|
|
@@ -9687,11 +10001,11 @@ function ColleaguesView({
|
|
|
9687
10001
|
))
|
|
9688
10002
|
}
|
|
9689
10003
|
),
|
|
9690
|
-
activeTab === "human" && /* @__PURE__ */ (0,
|
|
10004
|
+
activeTab === "human" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9691
10005
|
"div",
|
|
9692
10006
|
{
|
|
9693
10007
|
className: `grid gap-4 ${compactView ? "grid-cols-1 md:grid-cols-2 lg:grid-cols-4" : "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,
|
|
9694
|
-
children: humanColleagues.map((colleague) => /* @__PURE__ */ (0,
|
|
10008
|
+
children: humanColleagues.map((colleague) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9695
10009
|
ColleagueCard,
|
|
9696
10010
|
{
|
|
9697
10011
|
colleague,
|
|
@@ -9704,11 +10018,11 @@ function ColleaguesView({
|
|
|
9704
10018
|
))
|
|
9705
10019
|
}
|
|
9706
10020
|
),
|
|
9707
|
-
activeTab === "digital" && /* @__PURE__ */ (0,
|
|
10021
|
+
activeTab === "digital" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9708
10022
|
"div",
|
|
9709
10023
|
{
|
|
9710
10024
|
className: `grid gap-4 ${compactView ? "grid-cols-1 md:grid-cols-2 lg:grid-cols-4" : "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,
|
|
9711
|
-
children: digitalColleagues.map((colleague) => /* @__PURE__ */ (0,
|
|
10025
|
+
children: digitalColleagues.map((colleague) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
9712
10026
|
ColleagueCard,
|
|
9713
10027
|
{
|
|
9714
10028
|
colleague,
|
|
@@ -9723,12 +10037,12 @@ function ColleaguesView({
|
|
|
9723
10037
|
}
|
|
9724
10038
|
)
|
|
9725
10039
|
] }),
|
|
9726
|
-
filteredColleagues.length === 0 && /* @__PURE__ */ (0,
|
|
9727
|
-
/* @__PURE__ */ (0,
|
|
9728
|
-
/* @__PURE__ */ (0,
|
|
9729
|
-
/* @__PURE__ */ (0,
|
|
9730
|
-
/* @__PURE__ */ (0,
|
|
9731
|
-
/* @__PURE__ */ (0,
|
|
10040
|
+
filteredColleagues.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CardContent, { className: "pt-6", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "text-center py-8", children: [
|
|
10041
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react31.Users, { className: "h-12 w-12 text-muted-foreground mx-auto mb-4" }),
|
|
10042
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { className: "text-lg font-semibold mb-2", children: "No colleagues found" }),
|
|
10043
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-muted-foreground mb-4", children: searchTerm || departmentFilter !== "all" || statusFilter !== "all" ? "Try adjusting your filters to see more results." : "Get started by adding your first colleague." }),
|
|
10044
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Button, { onClick: handleAddColleague, className: "gap-2", children: [
|
|
10045
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react31.Plus, { className: "h-4 w-4" }),
|
|
9732
10046
|
"Add Colleague"
|
|
9733
10047
|
] })
|
|
9734
10048
|
] }) }) })
|
|
@@ -9738,25 +10052,25 @@ function ColleaguesView({
|
|
|
9738
10052
|
) }) });
|
|
9739
10053
|
}
|
|
9740
10054
|
|
|
9741
|
-
// src/components/
|
|
9742
|
-
var
|
|
10055
|
+
// src/components/Foundry/Views/KnowledgeView.tsx
|
|
10056
|
+
var import_react42 = require("react");
|
|
9743
10057
|
|
|
9744
|
-
// src/components/
|
|
9745
|
-
var
|
|
9746
|
-
var
|
|
9747
|
-
var
|
|
10058
|
+
// src/components/Foundry/knowledge-browser.tsx
|
|
10059
|
+
var import_react38 = require("motion/react");
|
|
10060
|
+
var import_lucide_react34 = require("lucide-react");
|
|
10061
|
+
var import_react39 = require("react");
|
|
9748
10062
|
|
|
9749
|
-
// src/components/
|
|
9750
|
-
var
|
|
9751
|
-
var
|
|
9752
|
-
var
|
|
10063
|
+
// src/components/Foundry/document-preview.tsx
|
|
10064
|
+
var import_react36 = require("motion/react");
|
|
10065
|
+
var import_lucide_react33 = require("lucide-react");
|
|
10066
|
+
var import_react37 = require("react");
|
|
9753
10067
|
var DialogPrimitive3 = __toESM(require("@radix-ui/react-dialog"));
|
|
9754
10068
|
|
|
9755
|
-
// src/components/
|
|
9756
|
-
var
|
|
9757
|
-
var
|
|
9758
|
-
var
|
|
9759
|
-
var
|
|
10069
|
+
// src/components/Foundry/document-edit.tsx
|
|
10070
|
+
var import_react34 = require("motion/react");
|
|
10071
|
+
var import_lucide_react32 = require("lucide-react");
|
|
10072
|
+
var import_react35 = require("react");
|
|
10073
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
9760
10074
|
function DocumentEdit({
|
|
9761
10075
|
document: document2,
|
|
9762
10076
|
onSave,
|
|
@@ -9765,17 +10079,17 @@ function DocumentEdit({
|
|
|
9765
10079
|
availableDocuments = [],
|
|
9766
10080
|
knowledgeContexts = []
|
|
9767
10081
|
}) {
|
|
9768
|
-
const [editedDocument, setEditedDocument] = (0,
|
|
10082
|
+
const [editedDocument, setEditedDocument] = (0, import_react35.useState)({
|
|
9769
10083
|
...document2,
|
|
9770
10084
|
updatedAt: /* @__PURE__ */ new Date()
|
|
9771
10085
|
});
|
|
9772
|
-
const [isMetadataExpanded, setIsMetadataExpanded] = (0,
|
|
9773
|
-
const [richTextContent, setRichTextContent] = (0,
|
|
9774
|
-
const [isAutoSaving, setIsAutoSaving] = (0,
|
|
9775
|
-
const timerRef = (0,
|
|
9776
|
-
const lastSavedHashRef = (0,
|
|
9777
|
-
const autoSaveDisplayTimerRef = (0,
|
|
9778
|
-
const debounceRef = (0,
|
|
10086
|
+
const [isMetadataExpanded, setIsMetadataExpanded] = (0, import_react35.useState)(false);
|
|
10087
|
+
const [richTextContent, setRichTextContent] = (0, import_react35.useState)(editedDocument.richTextContent);
|
|
10088
|
+
const [isAutoSaving, setIsAutoSaving] = (0, import_react35.useState)(false);
|
|
10089
|
+
const timerRef = (0, import_react35.useRef)(null);
|
|
10090
|
+
const lastSavedHashRef = (0, import_react35.useRef)("");
|
|
10091
|
+
const autoSaveDisplayTimerRef = (0, import_react35.useRef)(null);
|
|
10092
|
+
const debounceRef = (0, import_react35.useRef)(null);
|
|
9779
10093
|
const stableStringify = (obj) => {
|
|
9780
10094
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
9781
10095
|
const stringify = (val) => {
|
|
@@ -9833,13 +10147,13 @@ function DocumentEdit({
|
|
|
9833
10147
|
}
|
|
9834
10148
|
return true;
|
|
9835
10149
|
};
|
|
9836
|
-
const hashToContentLenRef = (0,
|
|
10150
|
+
const hashToContentLenRef = (0, import_react35.useRef)(/* @__PURE__ */ new Map());
|
|
9837
10151
|
const canonicalContentFromHash = (hash) => {
|
|
9838
10152
|
const len = hashToContentLenRef.current.get(hash);
|
|
9839
10153
|
if (len == null) return null;
|
|
9840
10154
|
return "x".repeat(len);
|
|
9841
10155
|
};
|
|
9842
|
-
(0,
|
|
10156
|
+
(0, import_react35.useEffect)(() => {
|
|
9843
10157
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
9844
10158
|
debounceRef.current = setTimeout(() => {
|
|
9845
10159
|
const nextHash = computeSnapshotHash();
|
|
@@ -9867,7 +10181,7 @@ function DocumentEdit({
|
|
|
9867
10181
|
richTextContent
|
|
9868
10182
|
// relevant in richText mode
|
|
9869
10183
|
]);
|
|
9870
|
-
(0,
|
|
10184
|
+
(0, import_react35.useEffect)(() => {
|
|
9871
10185
|
const handleBeforeUnload = () => {
|
|
9872
10186
|
const nextHash = computeSnapshotHash();
|
|
9873
10187
|
if (nextHash !== lastSavedHashRef.current) {
|
|
@@ -9882,7 +10196,7 @@ function DocumentEdit({
|
|
|
9882
10196
|
window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
9883
10197
|
};
|
|
9884
10198
|
}, [editedDocument, richTextContent]);
|
|
9885
|
-
(0,
|
|
10199
|
+
(0, import_react35.useEffect)(() => {
|
|
9886
10200
|
if (isAutoSaving) {
|
|
9887
10201
|
autoSaveDisplayTimerRef.current = setTimeout(() => {
|
|
9888
10202
|
setIsAutoSaving(false);
|
|
@@ -9894,20 +10208,20 @@ function DocumentEdit({
|
|
|
9894
10208
|
}
|
|
9895
10209
|
};
|
|
9896
10210
|
}, [isAutoSaving]);
|
|
9897
|
-
(0,
|
|
10211
|
+
(0, import_react35.useEffect)(() => {
|
|
9898
10212
|
setEditedDocument(document2);
|
|
9899
10213
|
}, [document2]);
|
|
9900
10214
|
const formatIcon = (format) => {
|
|
9901
10215
|
switch (format) {
|
|
9902
10216
|
case "markdown":
|
|
9903
10217
|
case "mdx":
|
|
9904
|
-
return /* @__PURE__ */ (0,
|
|
10218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.FileText, { className: "h-6 w-6 text-primary" });
|
|
9905
10219
|
case "richText":
|
|
9906
|
-
return /* @__PURE__ */ (0,
|
|
10220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.File, { className: "h-6 w-6 text-success" });
|
|
9907
10221
|
case "text":
|
|
9908
|
-
return /* @__PURE__ */ (0,
|
|
10222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.Type, { className: "h-6 w-6 text-muted-foreground" });
|
|
9909
10223
|
default:
|
|
9910
|
-
return /* @__PURE__ */ (0,
|
|
10224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.File, { className: "h-6 w-6 text-muted-foreground" });
|
|
9911
10225
|
}
|
|
9912
10226
|
};
|
|
9913
10227
|
const formatBadgeColor = (format) => {
|
|
@@ -9980,19 +10294,19 @@ function DocumentEdit({
|
|
|
9980
10294
|
return { ...prev, metadata: newMetadata };
|
|
9981
10295
|
});
|
|
9982
10296
|
};
|
|
9983
|
-
return /* @__PURE__ */ (0,
|
|
9984
|
-
|
|
10297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
10298
|
+
import_react34.motion.div,
|
|
9985
10299
|
{
|
|
9986
10300
|
initial: { opacity: 0, y: 20 },
|
|
9987
10301
|
animate: { opacity: 1, y: 0 },
|
|
9988
10302
|
transition: { duration: 0.3 },
|
|
9989
10303
|
className: "h-screen flex flex-col",
|
|
9990
10304
|
children: [
|
|
9991
|
-
/* @__PURE__ */ (0,
|
|
9992
|
-
/* @__PURE__ */ (0,
|
|
9993
|
-
/* @__PURE__ */ (0,
|
|
9994
|
-
/* @__PURE__ */ (0,
|
|
9995
|
-
/* @__PURE__ */ (0,
|
|
10305
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "border-b border-border bg-card p-8 pb-6", children: [
|
|
10306
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start justify-between gap-4 mb-4", children: [
|
|
10307
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-start gap-4 flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
10308
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start gap-4 mb-0 leading-tight", children: [
|
|
10309
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
9996
10310
|
EditableField,
|
|
9997
10311
|
{
|
|
9998
10312
|
fieldName: "title",
|
|
@@ -10002,7 +10316,7 @@ function DocumentEdit({
|
|
|
10002
10316
|
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"
|
|
10003
10317
|
}
|
|
10004
10318
|
) }),
|
|
10005
|
-
/* @__PURE__ */ (0,
|
|
10319
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10006
10320
|
"span",
|
|
10007
10321
|
{
|
|
10008
10322
|
className: `inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${formatBadgeColor(
|
|
@@ -10012,7 +10326,7 @@ function DocumentEdit({
|
|
|
10012
10326
|
}
|
|
10013
10327
|
)
|
|
10014
10328
|
] }),
|
|
10015
|
-
/* @__PURE__ */ (0,
|
|
10329
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10016
10330
|
EditableField,
|
|
10017
10331
|
{
|
|
10018
10332
|
fieldName: "description",
|
|
@@ -10024,8 +10338,8 @@ function DocumentEdit({
|
|
|
10024
10338
|
}
|
|
10025
10339
|
) })
|
|
10026
10340
|
] }) }),
|
|
10027
|
-
/* @__PURE__ */ (0,
|
|
10028
|
-
/* @__PURE__ */ (0,
|
|
10341
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
10342
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
10029
10343
|
Button,
|
|
10030
10344
|
{
|
|
10031
10345
|
variant: "ghost",
|
|
@@ -10033,25 +10347,25 @@ function DocumentEdit({
|
|
|
10033
10347
|
onClick: () => setIsMetadataExpanded(!isMetadataExpanded),
|
|
10034
10348
|
className: "gap-2",
|
|
10035
10349
|
children: [
|
|
10036
|
-
/* @__PURE__ */ (0,
|
|
10350
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.Info, { className: "h-4 w-4" }),
|
|
10037
10351
|
"Metadata",
|
|
10038
|
-
editedDocument.metadata && Object.keys(editedDocument.metadata).length > 0 && /* @__PURE__ */ (0,
|
|
10039
|
-
isMetadataExpanded ? /* @__PURE__ */ (0,
|
|
10352
|
+
editedDocument.metadata && Object.keys(editedDocument.metadata).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.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: Object.keys(editedDocument.metadata).length }),
|
|
10353
|
+
isMetadataExpanded ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.ChevronRight, { className: "h-4 w-4" })
|
|
10040
10354
|
]
|
|
10041
10355
|
}
|
|
10042
10356
|
),
|
|
10043
|
-
/* @__PURE__ */ (0,
|
|
10044
|
-
/* @__PURE__ */ (0,
|
|
10357
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Button, { variant: "outline", size: "sm", onClick: onCancel, className: "gap-2", children: [
|
|
10358
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.X, { className: "h-4 w-4" }),
|
|
10045
10359
|
"Close"
|
|
10046
10360
|
] }),
|
|
10047
|
-
/* @__PURE__ */ (0,
|
|
10048
|
-
isAutoSaving ? /* @__PURE__ */ (0,
|
|
10361
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Button, { size: "sm", onClick: handleSave, className: "gap-2", disabled: isAutoSaving, children: [
|
|
10362
|
+
isAutoSaving ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.Save, { className: "h-4 w-4" }),
|
|
10049
10363
|
isAutoSaving ? "Auto-saving..." : "Save"
|
|
10050
10364
|
] })
|
|
10051
10365
|
] })
|
|
10052
10366
|
] }),
|
|
10053
|
-
/* @__PURE__ */ (0,
|
|
10054
|
-
|
|
10367
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10368
|
+
import_react34.motion.div,
|
|
10055
10369
|
{
|
|
10056
10370
|
initial: false,
|
|
10057
10371
|
animate: {
|
|
@@ -10060,16 +10374,16 @@ function DocumentEdit({
|
|
|
10060
10374
|
},
|
|
10061
10375
|
transition: { duration: 0.2, ease: "easeInOut" },
|
|
10062
10376
|
className: "overflow-hidden h-full max-h-full",
|
|
10063
|
-
children: /* @__PURE__ */ (0,
|
|
10064
|
-
/* @__PURE__ */ (0,
|
|
10065
|
-
/* @__PURE__ */ (0,
|
|
10377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "pt-4 border-t border-border mt-4 max-h-full flex gap-2", children: [
|
|
10378
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center justify-between mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("h3", { className: "text-sm font-semibold text-foreground flex items-center gap-2", children: [
|
|
10379
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.Info, { className: "h-4 w-4" }),
|
|
10066
10380
|
"Document Metadata"
|
|
10067
10381
|
] }) }),
|
|
10068
|
-
/* @__PURE__ */ (0,
|
|
10069
|
-
/* @__PURE__ */ (0,
|
|
10382
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
10383
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "bg-muted rounded-lg p-4 border border-border", children: editedDocument.metadata && Object.keys(editedDocument.metadata).length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "space-y-2", children: Object.entries(editedDocument.metadata).map(([key, value], index) => {
|
|
10070
10384
|
const suggestedValues = getSuggestedValues(key);
|
|
10071
|
-
return /* @__PURE__ */ (0,
|
|
10072
|
-
/* @__PURE__ */ (0,
|
|
10385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex gap-2 items-center", children: [
|
|
10386
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10073
10387
|
Input,
|
|
10074
10388
|
{
|
|
10075
10389
|
value: key,
|
|
@@ -10090,22 +10404,22 @@ function DocumentEdit({
|
|
|
10090
10404
|
list: `metadata-keys-${key}`
|
|
10091
10405
|
}
|
|
10092
10406
|
),
|
|
10093
|
-
/* @__PURE__ */ (0,
|
|
10094
|
-
/* @__PURE__ */ (0,
|
|
10095
|
-
suggestedValues.length > 0 ? /* @__PURE__ */ (0,
|
|
10407
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("datalist", { id: `metadata-keys-${key}`, children: suggestedKeys.allKeys.map((suggestedKey) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("option", { value: suggestedKey }, suggestedKey)) }),
|
|
10408
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-muted-foreground text-sm", children: "=" }),
|
|
10409
|
+
suggestedValues.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
10096
10410
|
Select,
|
|
10097
10411
|
{
|
|
10098
10412
|
value: String(value || ""),
|
|
10099
10413
|
onValueChange: (newValue) => handleMetadataValueSelect(key, newValue),
|
|
10100
10414
|
children: [
|
|
10101
|
-
/* @__PURE__ */ (0,
|
|
10102
|
-
/* @__PURE__ */ (0,
|
|
10103
|
-
suggestedValues.map((suggestedValue) => /* @__PURE__ */ (0,
|
|
10104
|
-
/* @__PURE__ */ (0,
|
|
10415
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectTrigger, { className: "flex-1 h-8 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectValue, { placeholder: "Value" }) }),
|
|
10416
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(SelectContent, { children: [
|
|
10417
|
+
suggestedValues.map((suggestedValue) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectItem, { value: suggestedValue, children: suggestedValue }, suggestedValue)),
|
|
10418
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectItem, { value: "__custom__", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-muted-foreground text-xs", children: "Custom..." }) })
|
|
10105
10419
|
] })
|
|
10106
10420
|
]
|
|
10107
10421
|
}
|
|
10108
|
-
) : /* @__PURE__ */ (0,
|
|
10422
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10109
10423
|
Input,
|
|
10110
10424
|
{
|
|
10111
10425
|
value: String(value || ""),
|
|
@@ -10114,7 +10428,7 @@ function DocumentEdit({
|
|
|
10114
10428
|
className: "flex-1 h-8 text-sm"
|
|
10115
10429
|
}
|
|
10116
10430
|
),
|
|
10117
|
-
/* @__PURE__ */ (0,
|
|
10431
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10118
10432
|
Button,
|
|
10119
10433
|
{
|
|
10120
10434
|
type: "button",
|
|
@@ -10122,15 +10436,15 @@ function DocumentEdit({
|
|
|
10122
10436
|
size: "sm",
|
|
10123
10437
|
onClick: () => handleRemoveMetadataField(key),
|
|
10124
10438
|
className: "h-8 w-8 p-0 text-muted-foreground hover:text-destructive",
|
|
10125
|
-
children: /* @__PURE__ */ (0,
|
|
10439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.X, { className: "h-3 w-3" })
|
|
10126
10440
|
}
|
|
10127
10441
|
)
|
|
10128
10442
|
] }, `metadata-key-${index}`);
|
|
10129
|
-
}) }) : /* @__PURE__ */ (0,
|
|
10130
|
-
/* @__PURE__ */ (0,
|
|
10131
|
-
/* @__PURE__ */ (0,
|
|
10443
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-center py-4", children: [
|
|
10444
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm text-muted-foreground mb-2", children: "No metadata fields" }),
|
|
10445
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-xs text-muted-foreground", children: 'Click "Add Field" to create metadata' })
|
|
10132
10446
|
] }) }),
|
|
10133
|
-
/* @__PURE__ */ (0,
|
|
10447
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
10134
10448
|
Button,
|
|
10135
10449
|
{
|
|
10136
10450
|
type: "button",
|
|
@@ -10139,7 +10453,7 @@ function DocumentEdit({
|
|
|
10139
10453
|
onClick: handleAddMetadataField,
|
|
10140
10454
|
className: "gap-1 h-8",
|
|
10141
10455
|
children: [
|
|
10142
|
-
/* @__PURE__ */ (0,
|
|
10456
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react32.Plus, { className: "h-3 w-3" }),
|
|
10143
10457
|
"Add Field"
|
|
10144
10458
|
]
|
|
10145
10459
|
}
|
|
@@ -10149,14 +10463,14 @@ function DocumentEdit({
|
|
|
10149
10463
|
}
|
|
10150
10464
|
)
|
|
10151
10465
|
] }),
|
|
10152
|
-
/* @__PURE__ */ (0,
|
|
10466
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "p-8 pt-0 h-full max-h-full overflow-auto", children: editedDocument.format === "richText" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10153
10467
|
RichText_default,
|
|
10154
10468
|
{
|
|
10155
10469
|
setValue: setRichTextContent,
|
|
10156
10470
|
value: richTextContent,
|
|
10157
10471
|
name: "richTextContent"
|
|
10158
10472
|
}
|
|
10159
|
-
) : /* @__PURE__ */ (0,
|
|
10473
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10160
10474
|
Textarea,
|
|
10161
10475
|
{
|
|
10162
10476
|
value: editedDocument.content || "",
|
|
@@ -10171,33 +10485,33 @@ function DocumentEdit({
|
|
|
10171
10485
|
);
|
|
10172
10486
|
}
|
|
10173
10487
|
|
|
10174
|
-
// src/components/
|
|
10488
|
+
// src/components/Foundry/document-preview.tsx
|
|
10175
10489
|
var import_react_markdown = __toESM(require("react-markdown"));
|
|
10176
10490
|
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
10177
|
-
var
|
|
10178
|
-
var defaultMarkdownRenderer = (content) => /* @__PURE__ */ (0,
|
|
10491
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
10492
|
+
var defaultMarkdownRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10179
10493
|
import_react_markdown.default,
|
|
10180
10494
|
{
|
|
10181
10495
|
remarkPlugins: [import_remark_gfm.default],
|
|
10182
10496
|
components: {
|
|
10183
|
-
h1: ({ children }) => /* @__PURE__ */ (0,
|
|
10184
|
-
h2: ({ children }) => /* @__PURE__ */ (0,
|
|
10185
|
-
h3: ({ children }) => /* @__PURE__ */ (0,
|
|
10186
|
-
h4: ({ children }) => /* @__PURE__ */ (0,
|
|
10187
|
-
ol: ({ children }) => /* @__PURE__ */ (0,
|
|
10188
|
-
ul: ({ children }) => /* @__PURE__ */ (0,
|
|
10189
|
-
li: ({ children }) => /* @__PURE__ */ (0,
|
|
10190
|
-
p: ({ children }) => /* @__PURE__ */ (0,
|
|
10191
|
-
a: ({ children, href }) => /* @__PURE__ */ (0,
|
|
10192
|
-
img: ({ src, alt }) => /* @__PURE__ */ (0,
|
|
10193
|
-
blockquote: ({ children }) => /* @__PURE__ */ (0,
|
|
10497
|
+
h1: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h1", { className: "text-2xl font-bold", children }),
|
|
10498
|
+
h2: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: "text-xl font-bold", children }),
|
|
10499
|
+
h3: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "text-lg font-bold", children }),
|
|
10500
|
+
h4: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h4", { className: "text-base font-bold", children }),
|
|
10501
|
+
ol: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ol", { className: "list-decimal", children }),
|
|
10502
|
+
ul: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: "list-disc", children }),
|
|
10503
|
+
li: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("li", { className: "ml-4", children }),
|
|
10504
|
+
p: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "mb-4", children }),
|
|
10505
|
+
a: ({ children, href }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("a", { href, className: "text-blue-500", children }),
|
|
10506
|
+
img: ({ src, alt }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src, alt, className: "mb-4" }),
|
|
10507
|
+
blockquote: ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("blockquote", { className: "border-l-4 border-gray-300 pl-4 mb-4", children })
|
|
10194
10508
|
},
|
|
10195
10509
|
children: content
|
|
10196
10510
|
}
|
|
10197
10511
|
);
|
|
10198
|
-
var defaultTextRenderer = (content) => /* @__PURE__ */ (0,
|
|
10512
|
+
var defaultTextRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "whitespace-pre-wrap font-mono text-sm leading-relaxed", children: content });
|
|
10199
10513
|
var defaultRichTextRenderer = (content) => {
|
|
10200
|
-
return /* @__PURE__ */ (0,
|
|
10514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "prose prose-slate dark:prose-invert max-w-none", children: content && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10201
10515
|
RichText_default,
|
|
10202
10516
|
{
|
|
10203
10517
|
value: JSON.stringify(content),
|
|
@@ -10207,9 +10521,9 @@ var defaultRichTextRenderer = (content) => {
|
|
|
10207
10521
|
JSON.stringify(content)
|
|
10208
10522
|
) });
|
|
10209
10523
|
};
|
|
10210
|
-
var defaultMDXRenderer = (content) => /* @__PURE__ */ (0,
|
|
10211
|
-
/* @__PURE__ */ (0,
|
|
10212
|
-
/* @__PURE__ */ (0,
|
|
10524
|
+
var defaultMDXRenderer = (content) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "prose prose-slate dark:prose-invert max-w-none", children: [
|
|
10525
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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_runtime54.jsxs)("p", { className: "text-blue-800 dark:text-blue-200 text-sm", children: [
|
|
10526
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("strong", { children: "MDX Renderer:" }),
|
|
10213
10527
|
" This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."
|
|
10214
10528
|
] }) }),
|
|
10215
10529
|
defaultMarkdownRenderer(content)
|
|
@@ -10223,29 +10537,29 @@ function DocumentPreview({
|
|
|
10223
10537
|
availableDocuments = [],
|
|
10224
10538
|
knowledgeContexts = []
|
|
10225
10539
|
}) {
|
|
10226
|
-
const [isEditing, setIsEditing] = (0,
|
|
10227
|
-
const [isMetadataExpanded, setIsMetadataExpanded] = (0,
|
|
10228
|
-
const [document2, setDocument] = (0,
|
|
10229
|
-
const [isSaving, setIsSaving] = (0,
|
|
10230
|
-
const rollbackRef = (0,
|
|
10540
|
+
const [isEditing, setIsEditing] = (0, import_react37.useState)(false);
|
|
10541
|
+
const [isMetadataExpanded, setIsMetadataExpanded] = (0, import_react37.useState)(false);
|
|
10542
|
+
const [document2, setDocument] = (0, import_react37.useState)(initialDocument);
|
|
10543
|
+
const [isSaving, setIsSaving] = (0, import_react37.useState)(false);
|
|
10544
|
+
const rollbackRef = (0, import_react37.useRef)(null);
|
|
10231
10545
|
const contentForKey = document2.format === "richText" ? document2.richTextContent : document2.content;
|
|
10232
|
-
const contentKey = (0,
|
|
10546
|
+
const contentKey = (0, import_react37.useMemo)(() => {
|
|
10233
10547
|
return `${document2.format}:${JSON.stringify(contentForKey)}`;
|
|
10234
10548
|
}, [document2.format, contentForKey]);
|
|
10235
|
-
(0,
|
|
10549
|
+
(0, import_react37.useEffect)(() => {
|
|
10236
10550
|
setDocument(initialDocument);
|
|
10237
10551
|
}, [initialDocument]);
|
|
10238
10552
|
const formatIcon = (format) => {
|
|
10239
10553
|
switch (format) {
|
|
10240
10554
|
case "markdown":
|
|
10241
10555
|
case "mdx":
|
|
10242
|
-
return /* @__PURE__ */ (0,
|
|
10556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.FileText, { className: "h-6 w-6 text-primary" });
|
|
10243
10557
|
case "richText":
|
|
10244
|
-
return /* @__PURE__ */ (0,
|
|
10558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.File, { className: "h-6 w-6 text-success" });
|
|
10245
10559
|
case "text":
|
|
10246
|
-
return /* @__PURE__ */ (0,
|
|
10560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.Type, { className: "h-6 w-6 text-muted-foreground" });
|
|
10247
10561
|
default:
|
|
10248
|
-
return /* @__PURE__ */ (0,
|
|
10562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.File, { className: "h-6 w-6 text-muted-foreground" });
|
|
10249
10563
|
}
|
|
10250
10564
|
};
|
|
10251
10565
|
const formatBadgeColor = (format) => {
|
|
@@ -10283,7 +10597,7 @@ function DocumentPreview({
|
|
|
10283
10597
|
const handleSave = async (updatedDocument, mode2 = "save") => {
|
|
10284
10598
|
if (mode2 === "save") setIsSaving(true);
|
|
10285
10599
|
rollbackRef.current = document2;
|
|
10286
|
-
(0,
|
|
10600
|
+
(0, import_react37.startTransition)(() => {
|
|
10287
10601
|
setDocument({
|
|
10288
10602
|
...updatedDocument,
|
|
10289
10603
|
richTextContent: updatedDocument.richTextContent ? structuredClone(updatedDocument.richTextContent) : void 0
|
|
@@ -10295,7 +10609,7 @@ function DocumentPreview({
|
|
|
10295
10609
|
if (!ok) throw new Error("save failed");
|
|
10296
10610
|
} catch (e) {
|
|
10297
10611
|
if (rollbackRef.current) {
|
|
10298
|
-
(0,
|
|
10612
|
+
(0, import_react37.startTransition)(() => setDocument(rollbackRef.current));
|
|
10299
10613
|
}
|
|
10300
10614
|
}
|
|
10301
10615
|
};
|
|
@@ -10303,10 +10617,10 @@ function DocumentPreview({
|
|
|
10303
10617
|
setIsEditing(false);
|
|
10304
10618
|
};
|
|
10305
10619
|
const isDialogOpen = isEditing || mode === "create";
|
|
10306
|
-
return /* @__PURE__ */ (0,
|
|
10307
|
-
/* @__PURE__ */ (0,
|
|
10308
|
-
/* @__PURE__ */ (0,
|
|
10309
|
-
/* @__PURE__ */ (0,
|
|
10620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
10621
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Dialog, { open: isDialogOpen, onOpenChange: (open) => !open && handleCancel(), children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(DialogPortal, { children: [
|
|
10622
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DialogOverlay, {}),
|
|
10623
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
10310
10624
|
DialogPrimitive3.Content,
|
|
10311
10625
|
{
|
|
10312
10626
|
className: cn(
|
|
@@ -10315,8 +10629,8 @@ function DocumentPreview({
|
|
|
10315
10629
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
10316
10630
|
),
|
|
10317
10631
|
children: [
|
|
10318
|
-
isSaving && /* @__PURE__ */ (0,
|
|
10319
|
-
/* @__PURE__ */ (0,
|
|
10632
|
+
isSaving && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "absolute inset-0 bg-background/50 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.Loader2, { className: "h-8 w-8 animate-spin text-primary" }) }),
|
|
10633
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10320
10634
|
DocumentEdit,
|
|
10321
10635
|
{
|
|
10322
10636
|
mode: mode === "create" ? "create" : "edit",
|
|
@@ -10331,20 +10645,20 @@ function DocumentPreview({
|
|
|
10331
10645
|
}
|
|
10332
10646
|
)
|
|
10333
10647
|
] }) }),
|
|
10334
|
-
/* @__PURE__ */ (0,
|
|
10335
|
-
|
|
10648
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
10649
|
+
import_react36.motion.div,
|
|
10336
10650
|
{
|
|
10337
10651
|
initial: { opacity: 0, y: 20 },
|
|
10338
10652
|
animate: { opacity: 1, y: 0 },
|
|
10339
10653
|
transition: { duration: 0.3 },
|
|
10340
10654
|
className: "h-full flex flex-col",
|
|
10341
10655
|
children: [
|
|
10342
|
-
/* @__PURE__ */ (0,
|
|
10343
|
-
/* @__PURE__ */ (0,
|
|
10344
|
-
/* @__PURE__ */ (0,
|
|
10345
|
-
/* @__PURE__ */ (0,
|
|
10656
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "border-b border-border bg-card p-8 pb-6", children: [
|
|
10657
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-start justify-between gap-4", children: [
|
|
10658
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-start gap-4 flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
10659
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("h1", { className: "text-2xl font-bold text-foreground mb-2 leading-tight", children: [
|
|
10346
10660
|
document2.title,
|
|
10347
|
-
/* @__PURE__ */ (0,
|
|
10661
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10348
10662
|
"span",
|
|
10349
10663
|
{
|
|
10350
10664
|
className: `inline-flex ml-4 items-center px-3 py-1 rounded-full text-sm font-medium border ${formatBadgeColor(
|
|
@@ -10354,10 +10668,10 @@ function DocumentPreview({
|
|
|
10354
10668
|
}
|
|
10355
10669
|
)
|
|
10356
10670
|
] }),
|
|
10357
|
-
document2.description && /* @__PURE__ */ (0,
|
|
10671
|
+
document2.description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-muted-foreground text-lg leading-relaxed", children: document2.description })
|
|
10358
10672
|
] }) }),
|
|
10359
|
-
/* @__PURE__ */ (0,
|
|
10360
|
-
document2.metadata && Object.keys(document2.metadata).length > 0 && /* @__PURE__ */ (0,
|
|
10673
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "items-center gap-2 flex-shrink-0 hidden lg:flex", children: [
|
|
10674
|
+
document2.metadata && Object.keys(document2.metadata).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
10361
10675
|
Button,
|
|
10362
10676
|
{
|
|
10363
10677
|
variant: "ghost",
|
|
@@ -10365,13 +10679,13 @@ function DocumentPreview({
|
|
|
10365
10679
|
onClick: () => setIsMetadataExpanded(!isMetadataExpanded),
|
|
10366
10680
|
className: "gap-2",
|
|
10367
10681
|
children: [
|
|
10368
|
-
/* @__PURE__ */ (0,
|
|
10682
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.Info, { className: "h-4 w-4" }),
|
|
10369
10683
|
"Metadata",
|
|
10370
|
-
isMetadataExpanded ? /* @__PURE__ */ (0,
|
|
10684
|
+
isMetadataExpanded ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.ChevronDown, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.ChevronRight, { className: "h-4 w-4" })
|
|
10371
10685
|
]
|
|
10372
10686
|
}
|
|
10373
10687
|
),
|
|
10374
|
-
editable && /* @__PURE__ */ (0,
|
|
10688
|
+
editable && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
10375
10689
|
Button,
|
|
10376
10690
|
{
|
|
10377
10691
|
variant: "outline",
|
|
@@ -10379,15 +10693,15 @@ function DocumentPreview({
|
|
|
10379
10693
|
onClick: () => setIsEditing(true),
|
|
10380
10694
|
className: "gap-2",
|
|
10381
10695
|
children: [
|
|
10382
|
-
/* @__PURE__ */ (0,
|
|
10696
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.Edit3, { className: "h-4 w-4" }),
|
|
10383
10697
|
"Edit"
|
|
10384
10698
|
]
|
|
10385
10699
|
}
|
|
10386
10700
|
)
|
|
10387
10701
|
] })
|
|
10388
10702
|
] }),
|
|
10389
|
-
document2.metadata && Object.keys(document2.metadata).length > 0 && /* @__PURE__ */ (0,
|
|
10390
|
-
|
|
10703
|
+
document2.metadata && Object.keys(document2.metadata).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
10704
|
+
import_react36.motion.div,
|
|
10391
10705
|
{
|
|
10392
10706
|
initial: false,
|
|
10393
10707
|
animate: {
|
|
@@ -10396,26 +10710,26 @@ function DocumentPreview({
|
|
|
10396
10710
|
},
|
|
10397
10711
|
transition: { duration: 0.2, ease: "easeInOut" },
|
|
10398
10712
|
className: "overflow-hidden",
|
|
10399
|
-
children: /* @__PURE__ */ (0,
|
|
10400
|
-
/* @__PURE__ */ (0,
|
|
10401
|
-
/* @__PURE__ */ (0,
|
|
10713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "pt-4 border-t border-border mt-4", children: [
|
|
10714
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("h3", { className: "text-sm font-semibold text-foreground mb-3 flex items-center gap-2", children: [
|
|
10715
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react33.Info, { className: "h-4 w-4" }),
|
|
10402
10716
|
"Document Metadata"
|
|
10403
10717
|
] }),
|
|
10404
|
-
/* @__PURE__ */ (0,
|
|
10405
|
-
/* @__PURE__ */ (0,
|
|
10406
|
-
/* @__PURE__ */ (0,
|
|
10718
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "bg-muted rounded-lg p-4 border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime54.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(document2.metadata).map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
10719
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-muted-foreground font-medium text-xs uppercase tracking-wide", children: key.replace(/([A-Z])/g, " $1").trim() }),
|
|
10720
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-foreground font-medium", children: String(value) })
|
|
10407
10721
|
] }, key)) }) })
|
|
10408
10722
|
] })
|
|
10409
10723
|
}
|
|
10410
10724
|
)
|
|
10411
10725
|
] }),
|
|
10412
|
-
/* @__PURE__ */ (0,
|
|
10726
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex-1 ", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "py-4 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "space-y-4", children: document2.content || document2.richTextContent ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "bg-background px-8 overflow-hidden h-full flex-1", children: renderContent(
|
|
10413
10727
|
document2.format === "richText" ? document2.richTextContent : document2.content,
|
|
10414
10728
|
document2.format
|
|
10415
|
-
) }) }, contentKey) : /* @__PURE__ */ (0,
|
|
10416
|
-
/* @__PURE__ */ (0,
|
|
10417
|
-
/* @__PURE__ */ (0,
|
|
10418
|
-
/* @__PURE__ */ (0,
|
|
10729
|
+
) }) }, contentKey) : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "text-center p-12 bg-muted rounded-xl border-2 border-dashed border-border", children: [
|
|
10730
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.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_runtime54.jsx)(import_lucide_react33.FileText, { className: "h-8 w-8 text-muted-foreground" }) }),
|
|
10731
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h4", { className: "text-foreground font-medium mb-1", children: "No content available" }),
|
|
10732
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-muted-foreground text-sm", children: "This document doesn't have preview content" })
|
|
10419
10733
|
] }) }) }) })
|
|
10420
10734
|
]
|
|
10421
10735
|
}
|
|
@@ -10423,8 +10737,8 @@ function DocumentPreview({
|
|
|
10423
10737
|
] });
|
|
10424
10738
|
}
|
|
10425
10739
|
|
|
10426
|
-
// src/components/
|
|
10427
|
-
var
|
|
10740
|
+
// src/components/Foundry/knowledge-browser.tsx
|
|
10741
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
10428
10742
|
function MenuItem({
|
|
10429
10743
|
label,
|
|
10430
10744
|
documents,
|
|
@@ -10434,27 +10748,27 @@ function MenuItem({
|
|
|
10434
10748
|
selectedDocumentId,
|
|
10435
10749
|
showDocumentCount = true
|
|
10436
10750
|
}) {
|
|
10437
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
10751
|
+
const [isExpanded, setIsExpanded] = (0, import_react39.useState)(level === 0);
|
|
10438
10752
|
const hasChildren = children && Object.keys(children).length > 0;
|
|
10439
10753
|
const totalDocuments = documents.length + (children ? Object.values(children).reduce((acc, child) => acc + child.documents.length, 0) : 0);
|
|
10440
10754
|
const formatDocumentIcon = (format) => {
|
|
10441
10755
|
switch (format) {
|
|
10442
10756
|
case "markdown":
|
|
10443
10757
|
case "mdx":
|
|
10444
|
-
return /* @__PURE__ */ (0,
|
|
10758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react34.FileText, { className: "h-3.5 w-3.5 text-muted-foreground" });
|
|
10445
10759
|
case "richText":
|
|
10446
|
-
return /* @__PURE__ */ (0,
|
|
10760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react34.File, { className: "h-3.5 w-3.5 text-muted-foreground" });
|
|
10447
10761
|
default:
|
|
10448
|
-
return /* @__PURE__ */ (0,
|
|
10762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react34.File, { className: "h-3.5 w-3.5 text-muted-foreground" });
|
|
10449
10763
|
}
|
|
10450
10764
|
};
|
|
10451
10765
|
const getCategoryColor = (level2) => {
|
|
10452
10766
|
const colors = ["bg-primary", "bg-secondary", "bg-accent", "bg-chart-1"];
|
|
10453
10767
|
return colors[level2 % colors.length];
|
|
10454
10768
|
};
|
|
10455
|
-
return /* @__PURE__ */ (0,
|
|
10456
|
-
(hasChildren || documents.length > 0) && /* @__PURE__ */ (0,
|
|
10457
|
-
|
|
10769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "space-y-1", children: [
|
|
10770
|
+
(hasChildren || documents.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
10771
|
+
import_react38.motion.div,
|
|
10458
10772
|
{
|
|
10459
10773
|
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"}`,
|
|
10460
10774
|
style: { marginLeft: `${level * 20}px` },
|
|
@@ -10462,25 +10776,25 @@ function MenuItem({
|
|
|
10462
10776
|
whileHover: { scale: 1.01 },
|
|
10463
10777
|
whileTap: { scale: 0.99 },
|
|
10464
10778
|
children: [
|
|
10465
|
-
/* @__PURE__ */ (0,
|
|
10466
|
-
/* @__PURE__ */ (0,
|
|
10467
|
-
|
|
10779
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: `w-1 h-6 rounded-full ${getCategoryColor(level)}` }),
|
|
10780
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10781
|
+
import_react38.motion.div,
|
|
10468
10782
|
{
|
|
10469
10783
|
animate: { rotate: isExpanded ? 90 : 0 },
|
|
10470
10784
|
transition: { duration: 0.2 },
|
|
10471
10785
|
className: "flex-shrink-0",
|
|
10472
|
-
children: /* @__PURE__ */ (0,
|
|
10786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react34.ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
|
|
10473
10787
|
}
|
|
10474
10788
|
),
|
|
10475
|
-
/* @__PURE__ */ (0,
|
|
10476
|
-
/* @__PURE__ */ (0,
|
|
10477
|
-
showDocumentCount && totalDocuments > 0 && /* @__PURE__ */ (0,
|
|
10789
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex-1 flex items-center justify-between min-w-0", children: [
|
|
10790
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex items-center gap-2 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "font-medium text-foreground truncate", children: label }) }),
|
|
10791
|
+
showDocumentCount && totalDocuments > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-shrink-0 ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime55.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 }) })
|
|
10478
10792
|
] })
|
|
10479
10793
|
]
|
|
10480
10794
|
}
|
|
10481
10795
|
),
|
|
10482
|
-
/* @__PURE__ */ (0,
|
|
10483
|
-
|
|
10796
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10797
|
+
import_react38.motion.div,
|
|
10484
10798
|
{
|
|
10485
10799
|
initial: false,
|
|
10486
10800
|
animate: {
|
|
@@ -10489,9 +10803,9 @@ function MenuItem({
|
|
|
10489
10803
|
},
|
|
10490
10804
|
transition: { duration: 0.2, ease: "easeInOut" },
|
|
10491
10805
|
className: "overflow-hidden",
|
|
10492
|
-
children: /* @__PURE__ */ (0,
|
|
10493
|
-
documents.map((doc, index) => /* @__PURE__ */ (0,
|
|
10494
|
-
|
|
10806
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "pt-2 space-y-1", children: [
|
|
10807
|
+
documents.map((doc, index) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
10808
|
+
import_react38.motion.div,
|
|
10495
10809
|
{
|
|
10496
10810
|
initial: { opacity: 0, x: -10 },
|
|
10497
10811
|
animate: { opacity: 1, x: 0 },
|
|
@@ -10502,23 +10816,23 @@ function MenuItem({
|
|
|
10502
10816
|
whileHover: { scale: 1.01 },
|
|
10503
10817
|
whileTap: { scale: 0.99 },
|
|
10504
10818
|
children: [
|
|
10505
|
-
/* @__PURE__ */ (0,
|
|
10506
|
-
/* @__PURE__ */ (0,
|
|
10507
|
-
/* @__PURE__ */ (0,
|
|
10819
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-shrink-0", children: formatDocumentIcon(doc.format) }),
|
|
10820
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
10821
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10508
10822
|
"p",
|
|
10509
10823
|
{
|
|
10510
10824
|
className: `text-sm truncate transition-colors ${selectedDocumentId === doc.id ? "text-primary font-medium" : "text-foreground group-hover:text-foreground"}`,
|
|
10511
10825
|
children: doc.title
|
|
10512
10826
|
}
|
|
10513
10827
|
),
|
|
10514
|
-
doc.description && /* @__PURE__ */ (0,
|
|
10828
|
+
doc.description && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-xs text-muted-foreground truncate mt-0.5", children: doc.description })
|
|
10515
10829
|
] }),
|
|
10516
|
-
doc.tags && doc.tags.length > 0 && /* @__PURE__ */ (0,
|
|
10830
|
+
doc.tags && doc.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime55.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] }) })
|
|
10517
10831
|
]
|
|
10518
10832
|
},
|
|
10519
10833
|
doc.id
|
|
10520
10834
|
)),
|
|
10521
|
-
children && Object.entries(children).map(([childLabel, childData]) => /* @__PURE__ */ (0,
|
|
10835
|
+
children && Object.entries(children).map(([childLabel, childData]) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10522
10836
|
MenuItem,
|
|
10523
10837
|
{
|
|
10524
10838
|
label: childLabel,
|
|
@@ -10546,13 +10860,13 @@ function KnowledgeBrowser({
|
|
|
10546
10860
|
className,
|
|
10547
10861
|
editable = true
|
|
10548
10862
|
}) {
|
|
10549
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
10550
|
-
const [selectedDocument, setSelectedDocument] = (0,
|
|
10551
|
-
const [documents, setDocuments] = (0,
|
|
10552
|
-
(0,
|
|
10863
|
+
const [searchQuery, setSearchQuery] = (0, import_react39.useState)("");
|
|
10864
|
+
const [selectedDocument, setSelectedDocument] = (0, import_react39.useState)(null);
|
|
10865
|
+
const [documents, setDocuments] = (0, import_react39.useState)(initialDocuments);
|
|
10866
|
+
(0, import_react39.useEffect)(() => {
|
|
10553
10867
|
setDocuments(initialDocuments);
|
|
10554
10868
|
}, [initialDocuments]);
|
|
10555
|
-
(0,
|
|
10869
|
+
(0, import_react39.useEffect)(() => {
|
|
10556
10870
|
if (selectedDocument?.id) {
|
|
10557
10871
|
const currDoc = documents.find((doc) => doc.id === selectedDocument.id);
|
|
10558
10872
|
if (currDoc) {
|
|
@@ -10560,7 +10874,7 @@ function KnowledgeBrowser({
|
|
|
10560
10874
|
}
|
|
10561
10875
|
}
|
|
10562
10876
|
}, [documents]);
|
|
10563
|
-
const filteredDocuments = (0,
|
|
10877
|
+
const filteredDocuments = (0, import_react39.useMemo)(() => {
|
|
10564
10878
|
if (!searchQuery) return documents;
|
|
10565
10879
|
return documents.filter(
|
|
10566
10880
|
(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(
|
|
@@ -10568,7 +10882,7 @@ function KnowledgeBrowser({
|
|
|
10568
10882
|
)
|
|
10569
10883
|
);
|
|
10570
10884
|
}, [documents, searchQuery]);
|
|
10571
|
-
const hierarchy = (0,
|
|
10885
|
+
const hierarchy = (0, import_react39.useMemo)(() => {
|
|
10572
10886
|
const buildHierarchy = (docs, groupKeys) => {
|
|
10573
10887
|
if (groupKeys.length === 0) {
|
|
10574
10888
|
return {};
|
|
@@ -10604,11 +10918,11 @@ function KnowledgeBrowser({
|
|
|
10604
10918
|
setSelectedDocument(document2);
|
|
10605
10919
|
onDocumentClick?.(document2);
|
|
10606
10920
|
};
|
|
10607
|
-
return /* @__PURE__ */ (0,
|
|
10608
|
-
/* @__PURE__ */ (0,
|
|
10609
|
-
/* @__PURE__ */ (0,
|
|
10610
|
-
/* @__PURE__ */ (0,
|
|
10611
|
-
/* @__PURE__ */ (0,
|
|
10921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `flex h-full ${className || ""}`, children: [
|
|
10922
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "w-1/3 border-r border-border bg-muted/20", children: [
|
|
10923
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "p-6 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "relative", children: [
|
|
10924
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react34.Search, { className: "h-4 w-4 text-muted-foreground" }) }),
|
|
10925
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10612
10926
|
Input,
|
|
10613
10927
|
{
|
|
10614
10928
|
placeholder: "Search knowledge base...",
|
|
@@ -10618,7 +10932,7 @@ function KnowledgeBrowser({
|
|
|
10618
10932
|
}
|
|
10619
10933
|
)
|
|
10620
10934
|
] }) }),
|
|
10621
|
-
/* @__PURE__ */ (0,
|
|
10935
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ScrollArea, { className: "h-[calc(100%-100px)]", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "p-4 space-y-3", children: menuConfig.groupBy.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10622
10936
|
MenuItem,
|
|
10623
10937
|
{
|
|
10624
10938
|
label: "Document",
|
|
@@ -10629,8 +10943,8 @@ function KnowledgeBrowser({
|
|
|
10629
10943
|
showDocumentCount: menuConfig.showDocumentCount
|
|
10630
10944
|
},
|
|
10631
10945
|
"Document"
|
|
10632
|
-
) }) : /* @__PURE__ */ (0,
|
|
10633
|
-
Object.entries(hierarchy).map(([label, data]) => /* @__PURE__ */ (0,
|
|
10946
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
10947
|
+
Object.entries(hierarchy).map(([label, data]) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10634
10948
|
MenuItem,
|
|
10635
10949
|
{
|
|
10636
10950
|
label,
|
|
@@ -10643,49 +10957,49 @@ function KnowledgeBrowser({
|
|
|
10643
10957
|
},
|
|
10644
10958
|
label
|
|
10645
10959
|
)),
|
|
10646
|
-
Object.keys(hierarchy).length === 0 && /* @__PURE__ */ (0,
|
|
10647
|
-
|
|
10960
|
+
Object.keys(hierarchy).length === 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
10961
|
+
import_react38.motion.div,
|
|
10648
10962
|
{
|
|
10649
10963
|
initial: { opacity: 0 },
|
|
10650
10964
|
animate: { opacity: 1 },
|
|
10651
10965
|
className: "text-center text-muted-foreground py-12",
|
|
10652
10966
|
children: [
|
|
10653
|
-
/* @__PURE__ */ (0,
|
|
10654
|
-
/* @__PURE__ */ (0,
|
|
10655
|
-
/* @__PURE__ */ (0,
|
|
10967
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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_runtime55.jsx)(import_lucide_react34.FileText, { className: "h-8 w-8 text-muted-foreground" }) }),
|
|
10968
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-sm font-medium", children: "No documents found" }),
|
|
10969
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-xs mt-1", children: "Try adjusting your search terms" })
|
|
10656
10970
|
]
|
|
10657
10971
|
}
|
|
10658
10972
|
)
|
|
10659
10973
|
] }) }) })
|
|
10660
10974
|
] }),
|
|
10661
|
-
/* @__PURE__ */ (0,
|
|
10975
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-1 bg-background overflow-scroll", children: selectedDocument ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
10662
10976
|
DocumentPreview,
|
|
10663
10977
|
{
|
|
10664
10978
|
document: selectedDocument,
|
|
10665
10979
|
onDocumentUpdate,
|
|
10666
10980
|
editable
|
|
10667
10981
|
}
|
|
10668
|
-
) : /* @__PURE__ */ (0,
|
|
10669
|
-
|
|
10982
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "h-full flex items-center justify-center text-center", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
10983
|
+
import_react38.motion.div,
|
|
10670
10984
|
{
|
|
10671
10985
|
initial: { opacity: 0, y: 20 },
|
|
10672
10986
|
animate: { opacity: 1, y: 0 },
|
|
10673
10987
|
transition: { duration: 0.4 },
|
|
10674
10988
|
className: "max-w-sm",
|
|
10675
10989
|
children: [
|
|
10676
|
-
/* @__PURE__ */ (0,
|
|
10677
|
-
/* @__PURE__ */ (0,
|
|
10678
|
-
/* @__PURE__ */ (0,
|
|
10990
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.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_runtime55.jsx)(import_lucide_react34.FileText, { className: "h-10 w-10 text-primary" }) }),
|
|
10991
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h3", { className: "text-xl font-semibold text-foreground mb-2", children: "Select a document" }),
|
|
10992
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-muted-foreground leading-relaxed", children: "Choose any document from the knowledge base to view its content and details" })
|
|
10679
10993
|
]
|
|
10680
10994
|
}
|
|
10681
10995
|
) }) })
|
|
10682
10996
|
] });
|
|
10683
10997
|
}
|
|
10684
10998
|
|
|
10685
|
-
// src/components/
|
|
10686
|
-
var
|
|
10687
|
-
var
|
|
10688
|
-
var
|
|
10999
|
+
// src/components/Foundry/Knowledge/add-knowledge-modal.tsx
|
|
11000
|
+
var import_lucide_react35 = require("lucide-react");
|
|
11001
|
+
var import_react40 = require("react");
|
|
11002
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
10689
11003
|
var AddKnowledgeModal = ({
|
|
10690
11004
|
isOpen,
|
|
10691
11005
|
onClose,
|
|
@@ -10702,7 +11016,7 @@ var AddKnowledgeModal = ({
|
|
|
10702
11016
|
allKeys: Array.from(keysFromContexts).sort()
|
|
10703
11017
|
};
|
|
10704
11018
|
};
|
|
10705
|
-
const [formData, setFormData] = (0,
|
|
11019
|
+
const [formData, setFormData] = (0, import_react40.useState)(() => {
|
|
10706
11020
|
const suggestedKeys2 = getSuggestedMetadataKeys();
|
|
10707
11021
|
return {
|
|
10708
11022
|
name: "",
|
|
@@ -10785,13 +11099,13 @@ var AddKnowledgeModal = ({
|
|
|
10785
11099
|
return { ...prev, metadata: newMetadata };
|
|
10786
11100
|
});
|
|
10787
11101
|
};
|
|
10788
|
-
return /* @__PURE__ */ (0,
|
|
10789
|
-
/* @__PURE__ */ (0,
|
|
10790
|
-
/* @__PURE__ */ (0,
|
|
10791
|
-
/* @__PURE__ */ (0,
|
|
10792
|
-
/* @__PURE__ */ (0,
|
|
10793
|
-
/* @__PURE__ */ (0,
|
|
10794
|
-
/* @__PURE__ */ (0,
|
|
11102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Dialog, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DialogContent, { className: "sm:max-w-md", children: [
|
|
11103
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DialogTitle, { children: "Add New Knowledge source" }) }),
|
|
11104
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
11105
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-2", children: [
|
|
11106
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
11107
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Label2, { htmlFor: "name", children: "Name *" }),
|
|
11108
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
10795
11109
|
Input,
|
|
10796
11110
|
{
|
|
10797
11111
|
id: "name",
|
|
@@ -10801,9 +11115,9 @@ var AddKnowledgeModal = ({
|
|
|
10801
11115
|
}
|
|
10802
11116
|
)
|
|
10803
11117
|
] }),
|
|
10804
|
-
/* @__PURE__ */ (0,
|
|
10805
|
-
/* @__PURE__ */ (0,
|
|
10806
|
-
/* @__PURE__ */ (0,
|
|
11118
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
11119
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Label2, { htmlFor: "name", children: "Description" }),
|
|
11120
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
10807
11121
|
Input,
|
|
10808
11122
|
{
|
|
10809
11123
|
id: "name",
|
|
@@ -10816,19 +11130,19 @@ var AddKnowledgeModal = ({
|
|
|
10816
11130
|
}
|
|
10817
11131
|
)
|
|
10818
11132
|
] }),
|
|
10819
|
-
/* @__PURE__ */ (0,
|
|
10820
|
-
/* @__PURE__ */ (0,
|
|
10821
|
-
/* @__PURE__ */ (0,
|
|
10822
|
-
/* @__PURE__ */ (0,
|
|
10823
|
-
suggestedKeys.contextKeys.length > 0 ? /* @__PURE__ */ (0,
|
|
11133
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-2", children: [
|
|
11134
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
|
|
11135
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
11136
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Label2, { htmlFor: "metadata", children: "Metadata" }),
|
|
11137
|
+
suggestedKeys.contextKeys.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
10824
11138
|
"Context keys: ",
|
|
10825
11139
|
suggestedKeys.contextKeys.slice(0, 4).join(", "),
|
|
10826
11140
|
suggestedKeys.contextKeys.length > 4 && ` +${suggestedKeys.contextKeys.length - 4} more`,
|
|
10827
11141
|
" ",
|
|
10828
11142
|
"\u2022 Fill in values or add more fields"
|
|
10829
|
-
] }) : /* @__PURE__ */ (0,
|
|
11143
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-xs text-muted-foreground", children: "Add key-value metadata to organize and categorize your knowledge" })
|
|
10830
11144
|
] }),
|
|
10831
|
-
/* @__PURE__ */ (0,
|
|
11145
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
10832
11146
|
Button,
|
|
10833
11147
|
{
|
|
10834
11148
|
type: "button",
|
|
@@ -10837,16 +11151,16 @@ var AddKnowledgeModal = ({
|
|
|
10837
11151
|
onClick: handleAddMetadataField,
|
|
10838
11152
|
className: "gap-1 h-8",
|
|
10839
11153
|
children: [
|
|
10840
|
-
/* @__PURE__ */ (0,
|
|
11154
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react35.Plus, { className: "h-3 w-3" }),
|
|
10841
11155
|
"Add"
|
|
10842
11156
|
]
|
|
10843
11157
|
}
|
|
10844
11158
|
)
|
|
10845
11159
|
] }),
|
|
10846
|
-
/* @__PURE__ */ (0,
|
|
11160
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "space-y-2", children: formData.metadata.map(({ key, value }, index) => {
|
|
10847
11161
|
const suggestedValues = getSuggestedValues(key);
|
|
10848
|
-
return /* @__PURE__ */ (0,
|
|
10849
|
-
/* @__PURE__ */ (0,
|
|
11162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex gap-2 items-center", children: [
|
|
11163
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
10850
11164
|
Input,
|
|
10851
11165
|
{
|
|
10852
11166
|
value: key,
|
|
@@ -10874,22 +11188,22 @@ var AddKnowledgeModal = ({
|
|
|
10874
11188
|
list: `metadata-keys-${key}`
|
|
10875
11189
|
}
|
|
10876
11190
|
),
|
|
10877
|
-
/* @__PURE__ */ (0,
|
|
10878
|
-
/* @__PURE__ */ (0,
|
|
10879
|
-
suggestedValues.length > 0 ? /* @__PURE__ */ (0,
|
|
11191
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("datalist", { id: `metadata-keys-${key}`, children: suggestedKeys.allKeys.map((suggestedKey) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("option", { value: suggestedKey }, suggestedKey)) }),
|
|
11192
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-muted-foreground text-sm", children: "=" }),
|
|
11193
|
+
suggestedValues.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
10880
11194
|
Select,
|
|
10881
11195
|
{
|
|
10882
11196
|
value: String(value || ""),
|
|
10883
11197
|
onValueChange: (newValue) => handleMetadataValueSelect(key, newValue),
|
|
10884
11198
|
children: [
|
|
10885
|
-
/* @__PURE__ */ (0,
|
|
10886
|
-
/* @__PURE__ */ (0,
|
|
10887
|
-
suggestedValues.map((suggestedValue) => /* @__PURE__ */ (0,
|
|
10888
|
-
/* @__PURE__ */ (0,
|
|
11199
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectTrigger, { className: "flex-1 h-8 text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectValue, { placeholder: "Value" }) }),
|
|
11200
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(SelectContent, { children: [
|
|
11201
|
+
suggestedValues.map((suggestedValue) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectItem, { value: suggestedValue, children: suggestedValue }, suggestedValue)),
|
|
11202
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectItem, { value: "__custom__", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-muted-foreground text-xs", children: "Custom..." }) })
|
|
10889
11203
|
] })
|
|
10890
11204
|
]
|
|
10891
11205
|
}
|
|
10892
|
-
) : /* @__PURE__ */ (0,
|
|
11206
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
10893
11207
|
Input,
|
|
10894
11208
|
{
|
|
10895
11209
|
value: String(value || ""),
|
|
@@ -10898,7 +11212,7 @@ var AddKnowledgeModal = ({
|
|
|
10898
11212
|
className: "flex-1 h-8 text-sm"
|
|
10899
11213
|
}
|
|
10900
11214
|
),
|
|
10901
|
-
/* @__PURE__ */ (0,
|
|
11215
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
10902
11216
|
Button,
|
|
10903
11217
|
{
|
|
10904
11218
|
type: "button",
|
|
@@ -10906,20 +11220,20 @@ var AddKnowledgeModal = ({
|
|
|
10906
11220
|
size: "sm",
|
|
10907
11221
|
onClick: () => handleRemoveMetadataField(key),
|
|
10908
11222
|
className: "h-8 w-8 p-0 text-muted-foreground hover:text-destructive",
|
|
10909
|
-
children: /* @__PURE__ */ (0,
|
|
11223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react35.X, { className: "h-3 w-3" })
|
|
10910
11224
|
}
|
|
10911
11225
|
)
|
|
10912
11226
|
] }, `metadata-key-${index}`);
|
|
10913
11227
|
}) })
|
|
10914
11228
|
] })
|
|
10915
11229
|
] }),
|
|
10916
|
-
/* @__PURE__ */ (0,
|
|
10917
|
-
/* @__PURE__ */ (0,
|
|
10918
|
-
/* @__PURE__ */ (0,
|
|
11230
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex justify-end gap-3 pt-4", children: [
|
|
11231
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Button, { variant: "outline", size: "sm", onClick: onClose, className: "gap-2", children: [
|
|
11232
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react35.X, { className: "h-4 w-4" }),
|
|
10919
11233
|
"Cancel"
|
|
10920
11234
|
] }),
|
|
10921
|
-
/* @__PURE__ */ (0,
|
|
10922
|
-
/* @__PURE__ */ (0,
|
|
11235
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Button, { type: "submit", children: [
|
|
11236
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react35.Save, { className: "h-4 w-4" }),
|
|
10923
11237
|
"Create"
|
|
10924
11238
|
] })
|
|
10925
11239
|
] })
|
|
@@ -10927,14 +11241,14 @@ var AddKnowledgeModal = ({
|
|
|
10927
11241
|
] }) });
|
|
10928
11242
|
};
|
|
10929
11243
|
|
|
10930
|
-
// src/components/
|
|
10931
|
-
var
|
|
11244
|
+
// src/components/Foundry/Views/KnowledgeView.tsx
|
|
11245
|
+
var import_lucide_react37 = require("lucide-react");
|
|
10932
11246
|
|
|
10933
|
-
// src/components/
|
|
10934
|
-
var
|
|
10935
|
-
var
|
|
11247
|
+
// src/components/Foundry/Knowledge/manage-team-context.tsx
|
|
11248
|
+
var import_react41 = require("react");
|
|
11249
|
+
var import_lucide_react36 = require("lucide-react");
|
|
10936
11250
|
var import_sonner = require("sonner");
|
|
10937
|
-
var
|
|
11251
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
10938
11252
|
var ManageTeamContextModal = ({
|
|
10939
11253
|
isOpen,
|
|
10940
11254
|
onClose,
|
|
@@ -10943,15 +11257,15 @@ var ManageTeamContextModal = ({
|
|
|
10943
11257
|
onUpdate,
|
|
10944
11258
|
onDelete
|
|
10945
11259
|
}) => {
|
|
10946
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
10947
|
-
const [selectedSource, setSelectedSource] = (0,
|
|
10948
|
-
const [label, setLabel] = (0,
|
|
10949
|
-
const [description, setDescription] = (0,
|
|
10950
|
-
const [groupBy, setGroupBy] = (0,
|
|
10951
|
-
const [tagInput, setTagInput] = (0,
|
|
10952
|
-
const [sortBy, setSortBy] = (0,
|
|
10953
|
-
const [sortOrder, setSortOrder] = (0,
|
|
10954
|
-
const [showDocumentCount, setShowDocumentCount] = (0,
|
|
11260
|
+
const [searchQuery, setSearchQuery] = (0, import_react41.useState)("");
|
|
11261
|
+
const [selectedSource, setSelectedSource] = (0, import_react41.useState)(null);
|
|
11262
|
+
const [label, setLabel] = (0, import_react41.useState)("");
|
|
11263
|
+
const [description, setDescription] = (0, import_react41.useState)("");
|
|
11264
|
+
const [groupBy, setGroupBy] = (0, import_react41.useState)([]);
|
|
11265
|
+
const [tagInput, setTagInput] = (0, import_react41.useState)("");
|
|
11266
|
+
const [sortBy, setSortBy] = (0, import_react41.useState)("name");
|
|
11267
|
+
const [sortOrder, setSortOrder] = (0, import_react41.useState)("asc");
|
|
11268
|
+
const [showDocumentCount, setShowDocumentCount] = (0, import_react41.useState)(true);
|
|
10955
11269
|
const filteredSources = knowledgeSources.filter(
|
|
10956
11270
|
(source) => source.label.toLowerCase().includes(searchQuery.toLowerCase()) || source.description?.toLowerCase().includes(searchQuery.toLowerCase())
|
|
10957
11271
|
);
|
|
@@ -11036,13 +11350,13 @@ var ManageTeamContextModal = ({
|
|
|
11036
11350
|
resetForm();
|
|
11037
11351
|
}
|
|
11038
11352
|
};
|
|
11039
|
-
return /* @__PURE__ */ (0,
|
|
11040
|
-
/* @__PURE__ */ (0,
|
|
11041
|
-
/* @__PURE__ */ (0,
|
|
11042
|
-
/* @__PURE__ */ (0,
|
|
11043
|
-
/* @__PURE__ */ (0,
|
|
11044
|
-
/* @__PURE__ */ (0,
|
|
11045
|
-
/* @__PURE__ */ (0,
|
|
11353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Dialog, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(DialogContent, { className: "sm:max-w-[900px] max-h-[90vh] bg-card border-border p-0", children: [
|
|
11354
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DialogHeader, { className: "px-6 pt-6 pb-4 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DialogTitle, { className: "text-foreground text-2xl", children: "Manage Knowledge Sources" }) }),
|
|
11355
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 p-6 overflow-hidden", children: [
|
|
11356
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
11357
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "relative", children: [
|
|
11358
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react36.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
11359
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11046
11360
|
Input,
|
|
11047
11361
|
{
|
|
11048
11362
|
value: searchQuery,
|
|
@@ -11052,10 +11366,10 @@ var ManageTeamContextModal = ({
|
|
|
11052
11366
|
}
|
|
11053
11367
|
)
|
|
11054
11368
|
] }),
|
|
11055
|
-
/* @__PURE__ */ (0,
|
|
11056
|
-
/* @__PURE__ */ (0,
|
|
11057
|
-
/* @__PURE__ */ (0,
|
|
11058
|
-
] }) : filteredSources.map((source) => /* @__PURE__ */ (0,
|
|
11369
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ScrollArea, { className: "rounded-md border border-border bg-background flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "p-2 space-y-2", children: filteredSources.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
|
|
11370
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react36.FileText, { className: "h-12 w-12 text-muted-foreground mb-2" }),
|
|
11371
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-sm text-muted-foreground", children: searchQuery ? "No contexts found" : "No contexts yet" })
|
|
11372
|
+
] }) : filteredSources.map((source) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11059
11373
|
"div",
|
|
11060
11374
|
{
|
|
11061
11375
|
onClick: () => handleSelectSource(source),
|
|
@@ -11063,11 +11377,11 @@ var ManageTeamContextModal = ({
|
|
|
11063
11377
|
"p-3 rounded-lg cursor-pointer transition-all hover:bg-accent/50",
|
|
11064
11378
|
selectedSource?.id === source.id && "bg-accent text-accent-foreground"
|
|
11065
11379
|
),
|
|
11066
|
-
children: /* @__PURE__ */ (0,
|
|
11067
|
-
/* @__PURE__ */ (0,
|
|
11068
|
-
source.description && /* @__PURE__ */ (0,
|
|
11069
|
-
(source.menuConfig?.groupBy || []).length > 0 && /* @__PURE__ */ (0,
|
|
11070
|
-
source.menuConfig?.groupBy?.slice(0, 3).map((tag) => /* @__PURE__ */ (0,
|
|
11380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
11381
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h4", { className: "font-medium truncate", children: source.label }),
|
|
11382
|
+
source.description && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-sm opacity-80 truncate mt-1", children: source.description }),
|
|
11383
|
+
(source.menuConfig?.groupBy || []).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-wrap gap-1 mt-2", children: [
|
|
11384
|
+
source.menuConfig?.groupBy?.slice(0, 3).map((tag) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11071
11385
|
"span",
|
|
11072
11386
|
{
|
|
11073
11387
|
className: "text-xs px-2 py-0.5 rounded-full bg-secondary text-secondary-foreground",
|
|
@@ -11075,7 +11389,7 @@ var ManageTeamContextModal = ({
|
|
|
11075
11389
|
},
|
|
11076
11390
|
tag
|
|
11077
11391
|
)),
|
|
11078
|
-
(source.menuConfig?.groupBy || []).length > 3 && /* @__PURE__ */ (0,
|
|
11392
|
+
(source.menuConfig?.groupBy || []).length > 3 && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "text-xs px-2 py-0.5", children: [
|
|
11079
11393
|
"+",
|
|
11080
11394
|
(source.menuConfig?.groupBy || []).length - 3
|
|
11081
11395
|
] })
|
|
@@ -11084,16 +11398,16 @@ var ManageTeamContextModal = ({
|
|
|
11084
11398
|
},
|
|
11085
11399
|
source.id
|
|
11086
11400
|
)) }) }),
|
|
11087
|
-
/* @__PURE__ */ (0,
|
|
11401
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { variant: "outline", onClick: resetForm, className: "w-full", children: "Clear Selection / New Context" })
|
|
11088
11402
|
] }),
|
|
11089
|
-
/* @__PURE__ */ (0,
|
|
11090
|
-
/* @__PURE__ */ (0,
|
|
11091
|
-
/* @__PURE__ */ (0,
|
|
11092
|
-
/* @__PURE__ */ (0,
|
|
11403
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-4", children: [
|
|
11404
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ScrollArea, { className: "h-[400px] pr-4", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-4", children: [
|
|
11405
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-2", children: [
|
|
11406
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Label2, { htmlFor: "label", className: "text-foreground", children: [
|
|
11093
11407
|
"Label ",
|
|
11094
|
-
/* @__PURE__ */ (0,
|
|
11408
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-destructive", children: "*" })
|
|
11095
11409
|
] }),
|
|
11096
|
-
/* @__PURE__ */ (0,
|
|
11410
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11097
11411
|
Input,
|
|
11098
11412
|
{
|
|
11099
11413
|
id: "label",
|
|
@@ -11104,9 +11418,9 @@ var ManageTeamContextModal = ({
|
|
|
11104
11418
|
}
|
|
11105
11419
|
)
|
|
11106
11420
|
] }),
|
|
11107
|
-
/* @__PURE__ */ (0,
|
|
11108
|
-
/* @__PURE__ */ (0,
|
|
11109
|
-
/* @__PURE__ */ (0,
|
|
11421
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-2", children: [
|
|
11422
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Label2, { htmlFor: "description", className: "text-foreground", children: "Description" }),
|
|
11423
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11110
11424
|
Textarea,
|
|
11111
11425
|
{
|
|
11112
11426
|
id: "description",
|
|
@@ -11118,10 +11432,10 @@ var ManageTeamContextModal = ({
|
|
|
11118
11432
|
}
|
|
11119
11433
|
)
|
|
11120
11434
|
] }),
|
|
11121
|
-
/* @__PURE__ */ (0,
|
|
11122
|
-
/* @__PURE__ */ (0,
|
|
11123
|
-
/* @__PURE__ */ (0,
|
|
11124
|
-
/* @__PURE__ */ (0,
|
|
11435
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-2", children: [
|
|
11436
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Label2, { className: "text-foreground", children: "Group By" }),
|
|
11437
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex gap-2", children: [
|
|
11438
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11125
11439
|
Input,
|
|
11126
11440
|
{
|
|
11127
11441
|
value: tagInput,
|
|
@@ -11131,16 +11445,16 @@ var ManageTeamContextModal = ({
|
|
|
11131
11445
|
className: "bg-background border-input flex-1"
|
|
11132
11446
|
}
|
|
11133
11447
|
),
|
|
11134
|
-
/* @__PURE__ */ (0,
|
|
11448
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { onClick: handleAddTag, className: "bg-accent hover:bg-accent/90", children: "Add" })
|
|
11135
11449
|
] }),
|
|
11136
|
-
groupBy.length > 0 && /* @__PURE__ */ (0,
|
|
11450
|
+
groupBy.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-wrap gap-2 mt-2", children: groupBy.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
11137
11451
|
"div",
|
|
11138
11452
|
{
|
|
11139
11453
|
className: "bg-secondary text-secondary-foreground px-3 py-1 rounded-md flex items-center gap-2 text-sm",
|
|
11140
11454
|
children: [
|
|
11141
11455
|
tag,
|
|
11142
|
-
/* @__PURE__ */ (0,
|
|
11143
|
-
|
|
11456
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11457
|
+
import_lucide_react36.X,
|
|
11144
11458
|
{
|
|
11145
11459
|
className: "h-3 w-3 cursor-pointer hover:text-destructive",
|
|
11146
11460
|
onClick: () => handleRemoveTag(tag)
|
|
@@ -11151,42 +11465,42 @@ var ManageTeamContextModal = ({
|
|
|
11151
11465
|
tag
|
|
11152
11466
|
)) })
|
|
11153
11467
|
] }),
|
|
11154
|
-
/* @__PURE__ */ (0,
|
|
11155
|
-
/* @__PURE__ */ (0,
|
|
11156
|
-
/* @__PURE__ */ (0,
|
|
11468
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-2", children: [
|
|
11469
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Label2, { htmlFor: "sortBy", className: "text-foreground", children: "Sort By" }),
|
|
11470
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
11157
11471
|
Select,
|
|
11158
11472
|
{
|
|
11159
11473
|
value: sortBy,
|
|
11160
11474
|
onValueChange: (val) => setSortBy(val),
|
|
11161
11475
|
children: [
|
|
11162
|
-
/* @__PURE__ */ (0,
|
|
11163
|
-
/* @__PURE__ */ (0,
|
|
11164
|
-
/* @__PURE__ */ (0,
|
|
11165
|
-
/* @__PURE__ */ (0,
|
|
11476
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectTrigger, { className: "bg-background border-input", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectValue, {}) }),
|
|
11477
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(SelectContent, { className: "bg-popover border-border", children: [
|
|
11478
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectItem, { value: "name", children: "Name" }),
|
|
11479
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectItem, { value: "createdAt", children: "Created At" })
|
|
11166
11480
|
] })
|
|
11167
11481
|
]
|
|
11168
11482
|
}
|
|
11169
11483
|
)
|
|
11170
11484
|
] }),
|
|
11171
|
-
/* @__PURE__ */ (0,
|
|
11172
|
-
/* @__PURE__ */ (0,
|
|
11173
|
-
/* @__PURE__ */ (0,
|
|
11485
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-2", children: [
|
|
11486
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Label2, { htmlFor: "sortOrder", className: "text-foreground", children: "Sort Order" }),
|
|
11487
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
11174
11488
|
Select,
|
|
11175
11489
|
{
|
|
11176
11490
|
value: sortOrder,
|
|
11177
11491
|
onValueChange: (value) => setSortOrder(value),
|
|
11178
11492
|
children: [
|
|
11179
|
-
/* @__PURE__ */ (0,
|
|
11180
|
-
/* @__PURE__ */ (0,
|
|
11181
|
-
/* @__PURE__ */ (0,
|
|
11182
|
-
/* @__PURE__ */ (0,
|
|
11493
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectTrigger, { className: "bg-background border-input", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectValue, {}) }),
|
|
11494
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(SelectContent, { className: "bg-popover border-border", children: [
|
|
11495
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectItem, { value: "asc", children: "Ascending" }),
|
|
11496
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectItem, { value: "desc", children: "Descending" })
|
|
11183
11497
|
] })
|
|
11184
11498
|
]
|
|
11185
11499
|
}
|
|
11186
11500
|
)
|
|
11187
11501
|
] }),
|
|
11188
|
-
/* @__PURE__ */ (0,
|
|
11189
|
-
/* @__PURE__ */ (0,
|
|
11502
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
11503
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11190
11504
|
Checkbox,
|
|
11191
11505
|
{
|
|
11192
11506
|
id: "showDocumentCount",
|
|
@@ -11194,7 +11508,7 @@ var ManageTeamContextModal = ({
|
|
|
11194
11508
|
onCheckedChange: (checked) => setShowDocumentCount(checked)
|
|
11195
11509
|
}
|
|
11196
11510
|
),
|
|
11197
|
-
/* @__PURE__ */ (0,
|
|
11511
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
11198
11512
|
Label2,
|
|
11199
11513
|
{
|
|
11200
11514
|
htmlFor: "showDocumentCount",
|
|
@@ -11204,21 +11518,21 @@ var ManageTeamContextModal = ({
|
|
|
11204
11518
|
)
|
|
11205
11519
|
] })
|
|
11206
11520
|
] }) }),
|
|
11207
|
-
/* @__PURE__ */ (0,
|
|
11208
|
-
/* @__PURE__ */ (0,
|
|
11209
|
-
/* @__PURE__ */ (0,
|
|
11521
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex gap-3 pt-4 border-t border-border", children: selectedSource ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
11522
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Button, { variant: "destructive", onClick: handleDelete, className: "flex-1", children: [
|
|
11523
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react36.Trash2, { className: "mr-2 h-4 w-4" }),
|
|
11210
11524
|
"Delete"
|
|
11211
11525
|
] }),
|
|
11212
|
-
/* @__PURE__ */ (0,
|
|
11213
|
-
] }) : /* @__PURE__ */ (0,
|
|
11526
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { onClick: handleUpdate, className: "flex-1 bg-accent hover:bg-accent/90", children: "Update" })
|
|
11527
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { onClick: handleCreate, className: "w-full bg-accent hover:bg-accent/90", children: "Create" }) })
|
|
11214
11528
|
] })
|
|
11215
11529
|
] }),
|
|
11216
|
-
/* @__PURE__ */ (0,
|
|
11530
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-6 py-4 border-t border-border flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { variant: "outline", onClick: onClose, children: "Close" }) })
|
|
11217
11531
|
] }) });
|
|
11218
11532
|
};
|
|
11219
11533
|
|
|
11220
|
-
// src/components/
|
|
11221
|
-
var
|
|
11534
|
+
// src/components/Foundry/Views/KnowledgeView.tsx
|
|
11535
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
11222
11536
|
function KnowledgeView({
|
|
11223
11537
|
documents = [],
|
|
11224
11538
|
contexts = [],
|
|
@@ -11232,11 +11546,11 @@ function KnowledgeView({
|
|
|
11232
11546
|
onUpdateTeamContext,
|
|
11233
11547
|
onDeleteTeamContext
|
|
11234
11548
|
}) {
|
|
11235
|
-
const [activeContext, setActiveContext] = (0,
|
|
11236
|
-
const [isAddKnowledgeModalOpen, setIsAddKnowledgeModalOpen] = (0,
|
|
11237
|
-
const [isAddTeamContextModalOpen, setIsAddTeamContextModalOpen] = (0,
|
|
11238
|
-
const [isAddingKnowledge, setIsAddingKnowledge] = (0,
|
|
11239
|
-
(0,
|
|
11549
|
+
const [activeContext, setActiveContext] = (0, import_react42.useState)(contexts[0]);
|
|
11550
|
+
const [isAddKnowledgeModalOpen, setIsAddKnowledgeModalOpen] = (0, import_react42.useState)(false);
|
|
11551
|
+
const [isAddTeamContextModalOpen, setIsAddTeamContextModalOpen] = (0, import_react42.useState)(false);
|
|
11552
|
+
const [isAddingKnowledge, setIsAddingKnowledge] = (0, import_react42.useState)(false);
|
|
11553
|
+
(0, import_react42.useEffect)(() => {
|
|
11240
11554
|
if (!activeContext && contexts && contexts.length > 0) setActiveContext(contexts[0]);
|
|
11241
11555
|
else {
|
|
11242
11556
|
const currContext = contexts.find((c) => c.id === activeContext?.id);
|
|
@@ -11251,15 +11565,15 @@ function KnowledgeView({
|
|
|
11251
11565
|
}
|
|
11252
11566
|
setIsAddKnowledgeModalOpen(false);
|
|
11253
11567
|
};
|
|
11254
|
-
return /* @__PURE__ */ (0,
|
|
11255
|
-
/* @__PURE__ */ (0,
|
|
11256
|
-
isAddingKnowledge && /* @__PURE__ */ (0,
|
|
11257
|
-
/* @__PURE__ */ (0,
|
|
11258
|
-
/* @__PURE__ */ (0,
|
|
11568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
11569
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "px-2 md:px-4 py-4 flex-shrink-0", children: [
|
|
11570
|
+
isAddingKnowledge && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "absolute inset-0 bg-background/90 z-[9999] flex flex-col items-center justify-center gap-4", children: [
|
|
11571
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react37.Loader2, { className: "h-8 w-8 animate-spin text-primary" }),
|
|
11572
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "font-semibold text-lg", children: "Initializing document..." })
|
|
11259
11573
|
] }),
|
|
11260
|
-
contexts && contexts.length > 0 && /* @__PURE__ */ (0,
|
|
11261
|
-
/* @__PURE__ */ (0,
|
|
11262
|
-
/* @__PURE__ */ (0,
|
|
11574
|
+
contexts && contexts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "", children: [
|
|
11575
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("nav", { className: "-mb-px flex justify-between items-center", children: [
|
|
11576
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex space-x-8 overflow-x-auto", children: contexts.map((context) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
11263
11577
|
"button",
|
|
11264
11578
|
{
|
|
11265
11579
|
onClick: () => setActiveContext(context),
|
|
@@ -11271,27 +11585,27 @@ function KnowledgeView({
|
|
|
11271
11585
|
},
|
|
11272
11586
|
context.id
|
|
11273
11587
|
)) }),
|
|
11274
|
-
/* @__PURE__ */ (0,
|
|
11275
|
-
/* @__PURE__ */ (0,
|
|
11588
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu, { children: [
|
|
11589
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
11276
11590
|
"div",
|
|
11277
11591
|
{
|
|
11278
11592
|
className: "inline-flex border border-primary rounded-xl items-center justify-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",
|
|
11279
11593
|
children: [
|
|
11280
11594
|
"Actions ",
|
|
11281
|
-
/* @__PURE__ */ (0,
|
|
11595
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react37.ChevronDown, { className: "h-4 w-4" })
|
|
11282
11596
|
]
|
|
11283
11597
|
}
|
|
11284
11598
|
) }),
|
|
11285
|
-
/* @__PURE__ */ (0,
|
|
11286
|
-
/* @__PURE__ */ (0,
|
|
11287
|
-
/* @__PURE__ */ (0,
|
|
11599
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { children: [
|
|
11600
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { onClick: () => setIsAddKnowledgeModalOpen(true), children: "Add Knowledge" }),
|
|
11601
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuItem, { onClick: () => setIsAddTeamContextModalOpen(true), children: "Manage Contexts" })
|
|
11288
11602
|
] })
|
|
11289
11603
|
] })
|
|
11290
11604
|
] }) }),
|
|
11291
|
-
activeContext?.description && /* @__PURE__ */ (0,
|
|
11605
|
+
activeContext?.description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-3 px-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-sm text-primary", children: activeContext?.description }) })
|
|
11292
11606
|
] })
|
|
11293
11607
|
] }),
|
|
11294
|
-
activeContext ? /* @__PURE__ */ (0,
|
|
11608
|
+
activeContext ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1 min-h-0 px-2 md:px-4 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "h-full rounded-xl border overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
11295
11609
|
KnowledgeBrowser,
|
|
11296
11610
|
{
|
|
11297
11611
|
documents,
|
|
@@ -11301,12 +11615,12 @@ function KnowledgeView({
|
|
|
11301
11615
|
selectedDocumentId,
|
|
11302
11616
|
onDocumentUpdate
|
|
11303
11617
|
}
|
|
11304
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
11305
|
-
/* @__PURE__ */ (0,
|
|
11306
|
-
/* @__PURE__ */ (0,
|
|
11618
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
11619
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-muted-foreground", children: "No contexts available" }) }),
|
|
11620
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { onClick: () => setIsAddTeamContextModalOpen(true), children: "Add Context" }) })
|
|
11307
11621
|
] }),
|
|
11308
|
-
/* @__PURE__ */ (0,
|
|
11309
|
-
/* @__PURE__ */ (0,
|
|
11622
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
11623
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
11310
11624
|
ManageTeamContextModal,
|
|
11311
11625
|
{
|
|
11312
11626
|
isOpen: isAddTeamContextModalOpen,
|
|
@@ -11317,7 +11631,7 @@ function KnowledgeView({
|
|
|
11317
11631
|
onDelete: onDeleteTeamContext
|
|
11318
11632
|
}
|
|
11319
11633
|
),
|
|
11320
|
-
/* @__PURE__ */ (0,
|
|
11634
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
11321
11635
|
AddKnowledgeModal,
|
|
11322
11636
|
{
|
|
11323
11637
|
isOpen: isAddKnowledgeModalOpen,
|
|
@@ -11330,8 +11644,8 @@ function KnowledgeView({
|
|
|
11330
11644
|
] });
|
|
11331
11645
|
}
|
|
11332
11646
|
|
|
11333
|
-
// src/components/
|
|
11334
|
-
var
|
|
11647
|
+
// src/components/Foundry/Pages/dashboardpage.tsx
|
|
11648
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
11335
11649
|
function Home4({
|
|
11336
11650
|
title = "Digital Colleagues",
|
|
11337
11651
|
businessUnits: businessUnits3,
|
|
@@ -11347,8 +11661,8 @@ function Home4({
|
|
|
11347
11661
|
onColleagueEdit,
|
|
11348
11662
|
onColleagueDelete
|
|
11349
11663
|
}) {
|
|
11350
|
-
const [activeTab, setActiveTab] = (0,
|
|
11351
|
-
const [currentBusinessUnit, setCurrentBusinessUnit] = (0,
|
|
11664
|
+
const [activeTab, setActiveTab] = (0, import_react43.useState)("home");
|
|
11665
|
+
const [currentBusinessUnit, setCurrentBusinessUnit] = (0, import_react43.useState)(businessUnits3[0]);
|
|
11352
11666
|
const handleAppOpen = (app) => {
|
|
11353
11667
|
console.log("Opening app:", app.name);
|
|
11354
11668
|
};
|
|
@@ -11385,33 +11699,33 @@ function Home4({
|
|
|
11385
11699
|
const renderTabContent = () => {
|
|
11386
11700
|
switch (activeTab) {
|
|
11387
11701
|
case "home":
|
|
11388
|
-
return /* @__PURE__ */ (0,
|
|
11389
|
-
/* @__PURE__ */ (0,
|
|
11390
|
-
/* @__PURE__ */ (0,
|
|
11702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "px-2 md:px-4 py-4 space-y-8", children: [
|
|
11703
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "text-center py-12", children: [
|
|
11704
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("h1", { className: "text-4xl font-bold mb-4", children: [
|
|
11391
11705
|
"Welcome to the ",
|
|
11392
11706
|
currentBusinessUnit.name,
|
|
11393
11707
|
" team"
|
|
11394
11708
|
] }),
|
|
11395
|
-
/* @__PURE__ */ (0,
|
|
11709
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xl text-muted-foreground mb-8", children: "This is your collaborative workspace for productivity and knowledge sharing." })
|
|
11396
11710
|
] }),
|
|
11397
|
-
/* @__PURE__ */ (0,
|
|
11398
|
-
/* @__PURE__ */ (0,
|
|
11399
|
-
/* @__PURE__ */ (0,
|
|
11400
|
-
/* @__PURE__ */ (0,
|
|
11401
|
-
/* @__PURE__ */ (0,
|
|
11711
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "grid grid-cols-1 md:grid-cols-3 gap-6", children: [
|
|
11712
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "bg-card p-6 rounded-lg border", children: [
|
|
11713
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h3", { className: "text-lg font-semibold mb-2", children: "Projects" }),
|
|
11714
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-3xl font-bold text-primary", children: projects.length }),
|
|
11715
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm text-muted-foreground", children: "Active projects" })
|
|
11402
11716
|
] }),
|
|
11403
|
-
/* @__PURE__ */ (0,
|
|
11404
|
-
/* @__PURE__ */ (0,
|
|
11405
|
-
/* @__PURE__ */ (0,
|
|
11406
|
-
/* @__PURE__ */ (0,
|
|
11717
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "bg-card p-6 rounded-lg border", children: [
|
|
11718
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h3", { className: "text-lg font-semibold mb-2", children: "Team Members" }),
|
|
11719
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-3xl font-bold text-primary", children: teamMemberCount }),
|
|
11720
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm text-muted-foreground", children: "Collaborators" })
|
|
11407
11721
|
] }),
|
|
11408
|
-
/* @__PURE__ */ (0,
|
|
11409
|
-
/* @__PURE__ */ (0,
|
|
11410
|
-
/* @__PURE__ */ (0,
|
|
11411
|
-
/* @__PURE__ */ (0,
|
|
11722
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "bg-card p-6 rounded-lg border", children: [
|
|
11723
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h3", { className: "text-lg font-semibold mb-2", children: "Files" }),
|
|
11724
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-3xl font-bold text-primary", children: fileCount }),
|
|
11725
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm text-muted-foreground", children: "Project files" })
|
|
11412
11726
|
] })
|
|
11413
11727
|
] }),
|
|
11414
|
-
/* @__PURE__ */ (0,
|
|
11728
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11415
11729
|
DashboardHero,
|
|
11416
11730
|
{
|
|
11417
11731
|
title: `Chat with your team`,
|
|
@@ -11424,7 +11738,7 @@ function Home4({
|
|
|
11424
11738
|
)
|
|
11425
11739
|
] });
|
|
11426
11740
|
case "colleagues":
|
|
11427
|
-
return /* @__PURE__ */ (0,
|
|
11741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11428
11742
|
ColleaguesView,
|
|
11429
11743
|
{
|
|
11430
11744
|
initialColleagues,
|
|
@@ -11435,16 +11749,16 @@ function Home4({
|
|
|
11435
11749
|
}
|
|
11436
11750
|
);
|
|
11437
11751
|
case "chat":
|
|
11438
|
-
return /* @__PURE__ */ (0,
|
|
11439
|
-
/* @__PURE__ */ (0,
|
|
11440
|
-
/* @__PURE__ */ (0,
|
|
11441
|
-
/* @__PURE__ */ (0,
|
|
11752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "px-2 md:px-4 py-4 space-y-8", children: [
|
|
11753
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "text-center py-12", children: [
|
|
11754
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h1", { className: "text-4xl font-bold mb-4", children: "Team Chat" }),
|
|
11755
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("p", { className: "text-xl text-muted-foreground mb-8", children: [
|
|
11442
11756
|
"Connect with your ",
|
|
11443
11757
|
currentBusinessUnit.name,
|
|
11444
11758
|
" team members and collaborate in real-time."
|
|
11445
11759
|
] })
|
|
11446
11760
|
] }),
|
|
11447
|
-
/* @__PURE__ */ (0,
|
|
11761
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11448
11762
|
DashboardHero,
|
|
11449
11763
|
{
|
|
11450
11764
|
title: `Launch Full Chat Interface`,
|
|
@@ -11458,8 +11772,8 @@ function Home4({
|
|
|
11458
11772
|
)
|
|
11459
11773
|
] });
|
|
11460
11774
|
case "apps":
|
|
11461
|
-
return /* @__PURE__ */ (0,
|
|
11462
|
-
/* @__PURE__ */ (0,
|
|
11775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-8", children: [
|
|
11776
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11463
11777
|
DashboardHero,
|
|
11464
11778
|
{
|
|
11465
11779
|
title: "Creative Apps Collection",
|
|
@@ -11471,9 +11785,9 @@ function Home4({
|
|
|
11471
11785
|
}
|
|
11472
11786
|
}
|
|
11473
11787
|
),
|
|
11474
|
-
/* @__PURE__ */ (0,
|
|
11475
|
-
/* @__PURE__ */ (0,
|
|
11476
|
-
/* @__PURE__ */ (0,
|
|
11788
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "space-y-4", children: [
|
|
11789
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h2", { className: "text-2xl font-semibold", children: "New Releases" }),
|
|
11790
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4", children: mockApps.filter((app) => app.new).map((app) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11477
11791
|
AppCard,
|
|
11478
11792
|
{
|
|
11479
11793
|
app,
|
|
@@ -11484,9 +11798,9 @@ function Home4({
|
|
|
11484
11798
|
app.name
|
|
11485
11799
|
)) })
|
|
11486
11800
|
] }),
|
|
11487
|
-
/* @__PURE__ */ (0,
|
|
11488
|
-
/* @__PURE__ */ (0,
|
|
11489
|
-
/* @__PURE__ */ (0,
|
|
11801
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "space-y-4", children: [
|
|
11802
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h2", { className: "text-2xl font-semibold", children: "All Apps" }),
|
|
11803
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4", children: mockApps.map((app) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11490
11804
|
AppCard,
|
|
11491
11805
|
{
|
|
11492
11806
|
app,
|
|
@@ -11498,10 +11812,10 @@ function Home4({
|
|
|
11498
11812
|
] })
|
|
11499
11813
|
] });
|
|
11500
11814
|
case "knowledge":
|
|
11501
|
-
return /* @__PURE__ */ (0,
|
|
11815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(KnowledgeView, {});
|
|
11502
11816
|
case "files":
|
|
11503
|
-
return /* @__PURE__ */ (0,
|
|
11504
|
-
/* @__PURE__ */ (0,
|
|
11817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "px-2 md:px-4 py-4 space-y-8", children: [
|
|
11818
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11505
11819
|
DashboardHero,
|
|
11506
11820
|
{
|
|
11507
11821
|
title: "Your Creative Files",
|
|
@@ -11513,14 +11827,14 @@ function Home4({
|
|
|
11513
11827
|
}
|
|
11514
11828
|
}
|
|
11515
11829
|
),
|
|
11516
|
-
/* @__PURE__ */ (0,
|
|
11517
|
-
/* @__PURE__ */ (0,
|
|
11518
|
-
/* @__PURE__ */ (0,
|
|
11830
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "space-y-4", children: [
|
|
11831
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h2", { className: "text-2xl font-semibold", children: "All Files" }) }),
|
|
11832
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(FileList, { files: mockRecentFiles, onFileClick: handleFileClick })
|
|
11519
11833
|
] })
|
|
11520
11834
|
] });
|
|
11521
11835
|
case "projects":
|
|
11522
|
-
return /* @__PURE__ */ (0,
|
|
11523
|
-
/* @__PURE__ */ (0,
|
|
11836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "px-2 md:px-4 py-4 space-y-8", children: [
|
|
11837
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11524
11838
|
DashboardHero,
|
|
11525
11839
|
{
|
|
11526
11840
|
title: "Project Management",
|
|
@@ -11532,9 +11846,9 @@ function Home4({
|
|
|
11532
11846
|
}
|
|
11533
11847
|
}
|
|
11534
11848
|
),
|
|
11535
|
-
/* @__PURE__ */ (0,
|
|
11536
|
-
/* @__PURE__ */ (0,
|
|
11537
|
-
/* @__PURE__ */ (0,
|
|
11849
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "space-y-4", children: [
|
|
11850
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h2", { className: "text-2xl font-semibold", children: "Active Projects" }),
|
|
11851
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3", children: projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11538
11852
|
ProjectCard,
|
|
11539
11853
|
{
|
|
11540
11854
|
project,
|
|
@@ -11546,8 +11860,8 @@ function Home4({
|
|
|
11546
11860
|
] })
|
|
11547
11861
|
] });
|
|
11548
11862
|
case "learn":
|
|
11549
|
-
return /* @__PURE__ */ (0,
|
|
11550
|
-
/* @__PURE__ */ (0,
|
|
11863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-8", children: [
|
|
11864
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11551
11865
|
DashboardHero,
|
|
11552
11866
|
{
|
|
11553
11867
|
title: "Learn & Grow",
|
|
@@ -11559,14 +11873,14 @@ function Home4({
|
|
|
11559
11873
|
}
|
|
11560
11874
|
}
|
|
11561
11875
|
),
|
|
11562
|
-
/* @__PURE__ */ (0,
|
|
11563
|
-
/* @__PURE__ */ (0,
|
|
11564
|
-
/* @__PURE__ */ (0,
|
|
11565
|
-
/* @__PURE__ */ (0,
|
|
11566
|
-
/* @__PURE__ */ (0,
|
|
11567
|
-
/* @__PURE__ */ (0,
|
|
11568
|
-
/* @__PURE__ */ (0,
|
|
11569
|
-
/* @__PURE__ */ (0,
|
|
11876
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("section", { className: "space-y-4", children: [
|
|
11877
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h2", { className: "text-2xl font-semibold", children: "Featured Tutorials" }),
|
|
11878
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3", children: mockTutorials.slice(0, 3).map((tutorial) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "rounded-3xl border p-6", children: [
|
|
11879
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h3", { className: "font-semibold mb-2", children: tutorial.title }),
|
|
11880
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm text-muted-foreground mb-4", children: tutorial.description }),
|
|
11881
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
11882
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: tutorial.duration }),
|
|
11883
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: tutorial.level })
|
|
11570
11884
|
] })
|
|
11571
11885
|
] }, tutorial.title)) })
|
|
11572
11886
|
] })
|
|
@@ -11575,8 +11889,8 @@ function Home4({
|
|
|
11575
11889
|
return null;
|
|
11576
11890
|
}
|
|
11577
11891
|
};
|
|
11578
|
-
return /* @__PURE__ */ (0,
|
|
11579
|
-
|
|
11892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11893
|
+
FoundryLayout,
|
|
11580
11894
|
{
|
|
11581
11895
|
sidebarItems: mockSidebarItems,
|
|
11582
11896
|
title,
|
|
@@ -11588,12 +11902,12 @@ function Home4({
|
|
|
11588
11902
|
onTabChange: setActiveTab,
|
|
11589
11903
|
showTabs: true,
|
|
11590
11904
|
onActionClick: handleCopilotClick,
|
|
11591
|
-
actionIcon: /* @__PURE__ */ (0,
|
|
11905
|
+
actionIcon: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react38.Bot, { className: "mr-2 h-4 w-4" }),
|
|
11592
11906
|
actionText: "Start Chat",
|
|
11593
11907
|
onNotificationRemove: handleNotificationRemove,
|
|
11594
11908
|
onRemoveAll: handleRemoveAll,
|
|
11595
|
-
children: /* @__PURE__ */ (0,
|
|
11596
|
-
|
|
11909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react44.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
11910
|
+
import_react44.motion.div,
|
|
11597
11911
|
{
|
|
11598
11912
|
className: "flex-1 h-full",
|
|
11599
11913
|
initial: { opacity: 0, y: 10 },
|