cognova 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/-AsXrBBy.js +1 -0
- package/.output/public/_nuxt/2W1RPpXM.js +71 -0
- package/.output/public/_nuxt/{C4pxqdgg.js → 5UFq_rDn.js} +1 -1
- package/.output/public/_nuxt/5Zh-9l8_.js +1 -0
- package/.output/public/_nuxt/{DK9jxJ0g.js → 90UksHlj.js} +1 -1
- package/.output/public/_nuxt/{9IQmsEjr.js → 9QKmiSP_.js} +1 -1
- package/.output/public/_nuxt/{BOj6t-oo.js → ARbTpeGy.js} +1 -1
- package/.output/public/_nuxt/{DyRelyfs.js → ApfLnl06.js} +1 -1
- package/.output/public/_nuxt/{DznawRFW.js → B-2BuR5g.js} +1 -1
- package/.output/public/_nuxt/B4u7Mczo.js +1 -0
- package/.output/public/_nuxt/{DAQhmSv4.js → B5dI_yLq.js} +1 -1
- package/.output/public/_nuxt/{Bm9LyG4F.js → B6fnZcA6.js} +1 -1
- package/.output/public/_nuxt/{9QnH0xQM.js → B7uMSBlN.js} +1 -1
- package/.output/public/_nuxt/BBiRyPlN.js +1 -0
- package/.output/public/_nuxt/{iBGCpHdw.js → BF7413u4.js} +2 -2
- package/.output/public/_nuxt/{4MiwzAAt.js → BGtUoCgi.js} +2 -2
- package/.output/public/_nuxt/{CxuZBC8n.js → BHe4VLtR.js} +1 -1
- package/.output/public/_nuxt/{D3RiUGdz.js → BIMBp1Tj.js} +1 -1
- package/.output/public/_nuxt/{g20UHUCv.js → BIvPdoE3.js} +1 -1
- package/.output/public/_nuxt/BKaRtCjP.js +1 -0
- package/.output/public/_nuxt/BLmc9T7l.js +1 -0
- package/.output/public/_nuxt/BMdnU6BF.js +1 -0
- package/.output/public/_nuxt/{CKkC3Ptm.js → BOgdaA_8.js} +1 -1
- package/.output/public/_nuxt/{BffWCM73.js → BQZfTrUg.js} +1 -1
- package/.output/public/_nuxt/BQnublTW.js +1 -0
- package/.output/public/_nuxt/BSsvedap.js +1 -0
- package/.output/public/_nuxt/{Ci7UEZQh.js → BVypxKRT.js} +1 -1
- package/.output/public/_nuxt/{CYP_MLH8.js → BWqJFnZy.js} +1 -1
- package/.output/public/_nuxt/BXxYdXMr.js +1 -0
- package/.output/public/_nuxt/{D_3Rq1BS.js → B_17gAr_.js} +1 -1
- package/.output/public/_nuxt/B_qzFVK_.js +1 -0
- package/.output/public/_nuxt/{BqKFIuRj.js → BbRPwpIX.js} +1 -1
- package/.output/public/_nuxt/BhrzKbv9.js +1 -0
- package/.output/public/_nuxt/{Cqy_L_ip.js → Bl6LNGlA.js} +1 -1
- package/.output/public/_nuxt/{Fukkqjkf.js → BlPToGni.js} +1 -1
- package/.output/public/_nuxt/{DHKLCQRG.js → BlwHr46F.js} +1 -1
- package/.output/public/_nuxt/{C6aqGHu1.js → BnmwiZbF.js} +1 -1
- package/.output/public/_nuxt/BqtxLJaf.js +1 -0
- package/.output/public/_nuxt/{eko-0FUm.js → BrEXdify.js} +1 -1
- package/.output/public/_nuxt/{D3e44mCL.js → BtNnS4m3.js} +1 -1
- package/.output/public/_nuxt/{BCtfQCzC.js → BtVIBBUN.js} +1 -1
- package/.output/public/_nuxt/Bw5h4Jaf.js +1 -0
- package/.output/public/_nuxt/{FvlxxmNk.js → Bwcpy7gC.js} +2 -2
- package/.output/public/_nuxt/{Db2v8O7O.js → C0TUK31m.js} +1 -1
- package/.output/public/_nuxt/C1T4GK6c.js +1 -0
- package/.output/public/_nuxt/C2ANDZen.js +1 -0
- package/.output/public/_nuxt/{CqU2XbzO.js → C2RZSTuy.js} +1 -1
- package/.output/public/_nuxt/C3dYlP5x.js +1 -0
- package/.output/public/_nuxt/{m5kGCDpI.js → C3sh_tLi.js} +3 -3
- package/.output/public/_nuxt/{BjjCvHLT.js → C4zyxZG7.js} +1 -1
- package/.output/public/_nuxt/{C3FxIITy.js → C5I-XBZT.js} +1 -1
- package/.output/public/_nuxt/{yuf23kh9.js → CC4Goztu.js} +1 -1
- package/.output/public/_nuxt/CC77iplr.js +1 -0
- package/.output/public/_nuxt/{xuzLdW-o.js → CFyD2NHP.js} +1 -1
- package/.output/public/_nuxt/{CsJ9KhQ4.js → CGQDTeaO.js} +1 -1
- package/.output/public/_nuxt/{DnjGH3SQ.js → CHpwuMSk.js} +1 -1
- package/.output/public/_nuxt/CLzcRUcs.js +1 -0
- package/.output/public/_nuxt/CM2phu_3.js +1 -0
- package/.output/public/_nuxt/{Cr8ixbr1.js → CQpYRq61.js} +1 -1
- package/.output/public/_nuxt/{C0JKNMDO.js → CUN4bYcg.js} +1 -1
- package/.output/public/_nuxt/{CmzH6R-N.js → CXoITXft.js} +19 -19
- package/.output/public/_nuxt/CYjcQPl-.js +1 -0
- package/.output/public/_nuxt/{DGX0tzL8.js → CZ32KfaS.js} +1 -1
- package/.output/public/_nuxt/CclZMdca.js +1 -0
- package/.output/public/_nuxt/{C69W7k2j.js → CdpT_Vb6.js} +1 -1
- package/.output/public/_nuxt/CflRLvFC.js +1 -0
- package/.output/public/_nuxt/{gBC9k4Qj.js → CkqNv7sq.js} +2 -2
- package/.output/public/_nuxt/ClXDAYjE.js +1 -0
- package/.output/public/_nuxt/CrZGoMo_.js +1 -0
- package/.output/public/_nuxt/{BZXMQuYP.js → CvJtd2Af.js} +1 -1
- package/.output/public/_nuxt/{DKZxeXDQ.js → Cwtd8e-P.js} +1 -1
- package/.output/public/_nuxt/{nIU2F7ia.js → Cx44SSNp.js} +3 -3
- package/.output/public/_nuxt/{BzOqrmGa.js → CxEVzuCn.js} +3 -3
- package/.output/public/_nuxt/{Dy_Cq5LQ.js → CzIMQevQ.js} +1 -1
- package/.output/public/_nuxt/{D6t3dcTl.js → D0P9llU7.js} +1 -1
- package/.output/public/_nuxt/{JJ3634gV.js → D1DYuOOm.js} +1 -1
- package/.output/public/_nuxt/{BAIz-dEB.js → D1dDc8Vw.js} +1 -1
- package/.output/public/_nuxt/{DSRrg8JT.js → D1r0uqf3.js} +1 -1
- package/.output/public/_nuxt/{CNnJrDvu.js → D3a8R1T6.js} +1 -1
- package/.output/public/_nuxt/{B1X4Bzcy.js → D5EZbuub.js} +1 -1
- package/.output/public/_nuxt/D9V13KTK.js +1 -0
- package/.output/public/_nuxt/DAE2hbP7.js +1 -0
- package/.output/public/_nuxt/{Cvp7FI3T.js → DAIbdyS6.js} +1 -1
- package/.output/public/_nuxt/{EuOqK1A6.js → DAvlXjt0.js} +1 -1
- package/.output/public/_nuxt/DBKzwexZ.js +1 -0
- package/.output/public/_nuxt/{wCGVE8_e.js → DEATxnaF.js} +1 -1
- package/.output/public/_nuxt/{cABRLVee.js → DFg8PvHV.js} +1 -1
- package/.output/public/_nuxt/DM4MyqI-.js +1 -0
- package/.output/public/_nuxt/{Cdt3I3Go.js → DNE7kw9s.js} +1 -1
- package/.output/public/_nuxt/DO0oG4fG.js +1 -0
- package/.output/public/_nuxt/{B6S_ob86.js → DPFugPaB.js} +1 -1
- package/.output/public/_nuxt/{DJjDvbZE.js → DQlXU6_H.js} +1 -1
- package/.output/public/_nuxt/DQvuQpwh.js +1 -0
- package/.output/public/_nuxt/{sf57orEk.js → DRlG_bnX.js} +1 -1
- package/.output/public/_nuxt/{C6RC3lA1.js → DSQj-oMk.js} +1 -1
- package/.output/public/_nuxt/{CeIVm4A3.js → DU6ewLkE.js} +1 -1
- package/.output/public/_nuxt/{Cp2MA0cm.js → DWhzQg7B.js} +1 -1
- package/.output/public/_nuxt/{DJMS2og1.js → D_vK6VPK.js} +1 -1
- package/.output/public/_nuxt/{CihWZmJe.js → DaBp0Gba.js} +2 -2
- package/.output/public/_nuxt/DaH2FbAy.js +1 -0
- package/.output/public/_nuxt/{CtYFj7k1.js → DaJo0CeV.js} +1 -1
- package/.output/public/_nuxt/DauLdT7p.js +1 -0
- package/.output/public/_nuxt/{DG-T44jj.js → DdPA4eTX.js} +1 -1
- package/.output/public/_nuxt/{YuTZB7sD.js → DeAGWdWK.js} +1 -1
- package/.output/public/_nuxt/{CitkKxhw.js → DfF1qofg.js} +1 -1
- package/.output/public/_nuxt/{Daz4MeL6.js → DiGBA-aA.js} +1 -1
- package/.output/public/_nuxt/DiJxF69i.js +1 -0
- package/.output/public/_nuxt/{DIoI0uJm.js → DkBIU-1F.js} +1 -1
- package/.output/public/_nuxt/DmAM6bZ0.js +1 -0
- package/.output/public/_nuxt/DmeAKr3J.js +1 -0
- package/.output/public/_nuxt/DmmTnMzZ.js +1 -0
- package/.output/public/_nuxt/{Lwdv_RKd.js → DqsUSndS.js} +1 -1
- package/.output/public/_nuxt/Dvw-hR3Y.js +1 -0
- package/.output/public/_nuxt/{CVgTJeSq.js → Dz6sfh81.js} +1 -1
- package/.output/public/_nuxt/{BYjadNrw.js → FNhYm5FX.js} +1 -1
- package/.output/public/_nuxt/{Nb2jBtYT.js → HOeKUnra.js} +1 -1
- package/.output/public/_nuxt/{CtchsY6e.js → IR1jkN7B.js} +1 -1
- package/.output/public/_nuxt/{DCzfkCGa.js → MpTk6K7N.js} +1 -1
- package/.output/public/_nuxt/NZ7Wz6LP.js +1 -0
- package/.output/public/_nuxt/{DfQu3kEw.js → PqWbiAD2.js} +1 -1
- package/.output/public/_nuxt/{Jez9DHn7.js → Tu4FhMRc.js} +1 -1
- package/.output/public/_nuxt/{B3y_Qqox.js → UKPXYG4z.js} +1 -1
- package/.output/public/_nuxt/{BlAZO7nq.js → UO2Y9Nve.js} +1 -1
- package/.output/public/_nuxt/{KKK6HVeG.js → XHiJSquP.js} +1 -1
- package/.output/public/_nuxt/YGWAImQo.js +1 -0
- package/.output/public/_nuxt/{ghuJ76mD.js → ZR87XvwB.js} +1 -1
- package/.output/public/_nuxt/{yNrp2XvX.js → _E89BQAO.js} +1 -1
- package/.output/public/_nuxt/{C_BdYLzz.js → aiXk7zRt.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/91727fcc-bf7f-407f-9b1e-092017fcfee0.json +1 -0
- package/.output/public/_nuxt/cL7whuPe.js +1 -0
- package/.output/public/_nuxt/{BasgsT_S.js → ct6_k5IW.js} +1 -1
- package/.output/public/_nuxt/entry._7ZkP07A.css +1 -0
- package/.output/public/_nuxt/{DTDgHTuh.js → fEUQvmn8.js} +2 -2
- package/.output/public/_nuxt/{FNC8XZTk.js → gGlaVUMD.js} +1 -1
- package/.output/public/_nuxt/gjmGkVlL.js +1 -0
- package/.output/public/_nuxt/{IRSbVPIu.js → m5001Uvl.js} +1 -1
- package/.output/public/_nuxt/{_CYZi8HN.js → mQkFCz_M.js} +1 -1
- package/.output/public/_nuxt/{BxXOsXrM.js → p9l1LjVc.js} +10 -10
- package/.output/public/_nuxt/{BsEZoHd1.js → qR_K5W8V.js} +1 -1
- package/.output/public/_nuxt/{BrNqhp1a.js → t_9QQ4MF.js} +7 -7
- package/.output/public/_nuxt/{pcUI-zuY.js → uc4c4mfb.js} +1 -1
- package/.output/public/_nuxt/{usage.vakN1lvi.css → usage.BDeyCZwW.css} +1 -1
- package/.output/public/_nuxt/wPSLEMBw.js +1 -0
- package/.output/public/_nuxt/xKRwul0f.js +1 -0
- package/.output/public/_nuxt/{BWhMnjID.js → xgpiGSxb.js} +1 -1
- package/.output/public/_nuxt/xxnk7j0F.js +1 -0
- package/.output/public/favicon.svg +1 -0
- package/.output/server/chunks/build/A-BWukSPjS.mjs +1 -0
- package/.output/server/chunks/build/Accordion-BaJYea6e.mjs +1 -0
- package/.output/server/chunks/build/AccordionItem-DdG2zgcN.mjs +1 -0
- package/.output/server/chunks/build/Badge-BrU9UkCv.mjs +1 -0
- package/.output/server/chunks/build/Blockquote-DND8wTkU.mjs +1 -0
- package/.output/server/chunks/build/Callout-1halpaEg.mjs +1 -0
- package/.output/server/chunks/build/Card-BHCSDKDt.mjs +1 -0
- package/.output/server/chunks/build/CardGroup-BOuJcNGp.mjs +1 -0
- package/.output/server/chunks/build/Caution-BP3y-TcC.mjs +1 -0
- package/.output/server/chunks/build/Code-B1xkAS5a.mjs +1 -0
- package/.output/server/chunks/build/CodeCollapse-BIhaNa22.mjs +1 -0
- package/.output/server/chunks/build/CodeGroup-BviYyCuo.mjs +1 -0
- package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +2 -1
- package/.output/server/chunks/build/CodePreview-D8PsCQ6m.mjs +1 -0
- package/.output/server/chunks/build/CodeTree-BUTLupmL.mjs +1 -0
- package/.output/server/chunks/build/Collapsible-BIvXNaSq.mjs +1 -0
- package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
- package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
- package/.output/server/chunks/build/Em-DsIz_BnD.mjs +1 -0
- package/.output/server/chunks/build/Field-cwwmSQDT.mjs +1 -0
- package/.output/server/chunks/build/FieldGroup-CAIpQv8s.mjs +1 -0
- package/.output/server/chunks/build/H1-BbFNsPyP.mjs +1 -0
- package/.output/server/chunks/build/H2-vHTl_pWr.mjs +1 -0
- package/.output/server/chunks/build/H3-7eTcfO3s.mjs +1 -0
- package/.output/server/chunks/build/H4-C89p_PKO.mjs +1 -0
- package/.output/server/chunks/build/Hr-Bm8RlL3O.mjs +1 -0
- package/.output/server/chunks/build/Icon-Dp9iy0BI.mjs +1 -0
- package/.output/server/chunks/build/Img-CWLmvN1t.mjs +2 -1
- package/.output/server/chunks/build/Kbd-CQG6I_Ch.mjs +1 -0
- package/.output/server/chunks/build/Li-Bw1QUaGv.mjs +1 -0
- package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
- package/.output/server/chunks/build/Note-CHkjm9jm.mjs +1 -0
- package/.output/server/chunks/build/Ol-D-fPnfFM.mjs +1 -0
- package/.output/server/chunks/build/P-B5YI1V9y.mjs +1 -0
- package/.output/server/chunks/build/Pre-ChiJcf3C.mjs +1 -0
- package/.output/server/chunks/build/ProseH5-DahJyv8h.mjs +1 -0
- package/.output/server/chunks/build/ProseH6-C4Is5h6c.mjs +1 -0
- package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
- package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
- package/.output/server/chunks/build/Steps-BZpvXfzb.mjs +1 -0
- package/.output/server/chunks/build/Strong-DXJqOWL3.mjs +1 -0
- package/.output/server/chunks/build/Table-BSrLZ7dt.mjs +1 -0
- package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
- package/.output/server/chunks/build/Tabs-Dk3nvOFF.mjs +1 -0
- package/.output/server/chunks/build/TabsItem-CDhyuBtJ.mjs +1 -0
- package/.output/server/chunks/build/Tbody-CjMT5oH-.mjs +1 -0
- package/.output/server/chunks/build/Td-ZBVaEjFN.mjs +1 -0
- package/.output/server/chunks/build/Th-D317icbd.mjs +1 -0
- package/.output/server/chunks/build/Thead-Ca_ZESTK.mjs +1 -0
- package/.output/server/chunks/build/Tip-CP3oTARR.mjs +1 -0
- package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
- package/.output/server/chunks/build/Tr-6jI8j9gD.mjs +1 -0
- package/.output/server/chunks/build/{docs-Dk2JnYq3.mjs → Tree-DUhXKd8y.mjs} +46 -2235
- package/.output/server/chunks/build/Tree-DUhXKd8y.mjs.map +1 -0
- package/.output/server/chunks/build/Ul-BUGj_CPb.mjs +1 -0
- package/.output/server/chunks/build/Warning-BJ8G6cxC.mjs +1 -0
- package/.output/server/chunks/build/_id_-DN00UDdO.mjs +1 -0
- package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +1 -1
- package/.output/server/chunks/build/_name_-BnS_KEfX.mjs +1592 -0
- package/.output/server/chunks/build/_name_-BnS_KEfX.mjs.map +1 -0
- package/.output/server/chunks/build/{_uuid_-0UgdUhfY.mjs → _uuid_-DfJaumTE.mjs} +5 -4
- package/.output/server/chunks/build/{_uuid_-0UgdUhfY.mjs.map → _uuid_-DfJaumTE.mjs.map} +1 -1
- package/.output/server/chunks/build/auth-BGPNH2QJ.mjs +20 -0
- package/.output/server/chunks/build/auth-BGPNH2QJ.mjs.map +1 -0
- package/.output/server/chunks/build/auth-CvD7MqKW.mjs +1 -0
- package/.output/server/chunks/build/auth-CvD7MqKW.mjs.map +1 -1
- package/.output/server/chunks/build/chat-CZMiB68R.mjs +1 -0
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
- package/.output/server/chunks/build/{dashboard-YEscLBQN.mjs → dashboard-CLk1NlbR.mjs} +15 -4
- package/.output/server/chunks/build/dashboard-CLk1NlbR.mjs.map +1 -0
- package/.output/server/chunks/build/{dashboard-CpMVYnDV.mjs → dashboard-CiVTAZuF.mjs} +12 -4
- package/.output/server/chunks/build/{dashboard-CpMVYnDV.mjs.map → dashboard-CiVTAZuF.mjs.map} +1 -1
- package/.output/server/chunks/build/docs-ChGwOPg5.mjs +2204 -0
- package/.output/server/chunks/build/docs-ChGwOPg5.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-BzbcNcdU.mjs +1 -0
- package/.output/server/chunks/build/error-500-uCDjGRW8.mjs +1 -0
- package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
- package/.output/server/chunks/build/{hooks-DP8WoUPS.mjs → hooks-D328DcO6.mjs} +3 -2
- package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +1 -0
- package/.output/server/chunks/build/{index-DVx-QlhP.mjs → index-Byt-3Yq6.mjs} +3 -2
- package/.output/server/chunks/build/{index-DVx-QlhP.mjs.map → index-Byt-3Yq6.mjs.map} +1 -1
- package/.output/server/chunks/build/{index-Ba_bPJgk.mjs → index-C9PuieXh.mjs} +3 -2
- package/.output/server/chunks/build/index-C9PuieXh.mjs.map +1 -0
- package/.output/server/chunks/build/index-C_LcBBgO.mjs +1508 -0
- package/.output/server/chunks/build/index-C_LcBBgO.mjs.map +1 -0
- package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
- package/.output/server/chunks/build/index-DzdvIi8V.mjs +1 -0
- package/.output/server/chunks/build/library-CbWcF5wT.mjs +601 -0
- package/.output/server/chunks/build/library-CbWcF5wT.mjs.map +1 -0
- package/.output/server/chunks/build/{login-BAysbpyX.mjs → login-DnnElTl2.mjs} +15 -7
- package/.output/server/chunks/build/{login-BAysbpyX.mjs.map → login-DnnElTl2.mjs.map} +1 -1
- package/.output/server/chunks/build/memories-BqA719O1.mjs +1 -0
- package/.output/server/chunks/build/memories-BqA719O1.mjs.map +1 -1
- package/.output/server/chunks/build/server.mjs +62 -34
- package/.output/server/chunks/build/server.mjs.map +1 -1
- package/.output/server/chunks/build/settings-DdkKCJ00.mjs +1 -0
- package/.output/server/chunks/build/settings-DdkKCJ00.mjs.map +1 -1
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/{tasks-DiOi1HG_.mjs → tasks-DnAFqbtt.mjs} +3 -2
- package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +1 -0
- package/.output/server/chunks/build/{usage-H_mcd_fz.mjs → usage-CSrBh4Or.mjs} +159 -44
- package/.output/server/chunks/build/{usage-H_mcd_fz.mjs.map → usage-CSrBh4Or.mjs.map} +1 -1
- package/.output/server/chunks/build/{usePreferences-CzC8fRzd.mjs → usePreferences-DH1QjxOj.mjs} +7 -1
- package/.output/server/chunks/build/usePreferences-DH1QjxOj.mjs.map +1 -0
- package/.output/server/chunks/build/{view-Dc8mvzCB.mjs → view-n2sYa4Zh.mjs} +4 -3
- package/.output/server/chunks/build/{view-Dc8mvzCB.mjs.map → view-n2sYa4Zh.mjs.map} +1 -1
- package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-imports-PtwWlZ2H.mjs +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +1247 -824
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws/chat.mjs +2 -1
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/run.post.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/run.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id_.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/_id_.patch.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/_id_.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/api/agents/stats.get.mjs +1 -0
- package/.output/server/chunks/routes/api/agents/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/auth/_...all_.mjs +1 -0
- package/.output/server/chunks/routes/api/auth/_...all_.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.get.mjs +1 -0
- package/.output/server/chunks/routes/api/conversations/_id_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +1 -0
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/index.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/documents/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/delete.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/list.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/move.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/read.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/rename.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -0
- package/.output/server/chunks/routes/api/fs/write.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -0
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/home.get.mjs +1 -0
- package/.output/server/chunks/routes/api/home.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/hooks/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -0
- package/.output/server/chunks/routes/api/hooks/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -0
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get2.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get2.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get5.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get6.mjs +1 -0
- package/.output/server/chunks/routes/api/index.get6.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get7.mjs +40 -38
- package/.output/server/chunks/routes/api/index.get7.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get8.mjs +33 -38
- package/.output/server/chunks/routes/api/index.get8.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get9.mjs +83 -0
- package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -0
- package/.output/server/chunks/routes/api/index.post.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post2.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post2.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -0
- package/.output/server/chunks/routes/api/index.post4.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/context.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs +2 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -0
- package/.output/server/chunks/routes/api/memory/store.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/projects/index.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/projects/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/projects/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -0
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -0
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/skills/_name/export.get.mjs +72 -0
- package/.output/server/chunks/routes/api/skills/_name/export.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs +73 -0
- package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs +71 -0
- package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs +69 -0
- package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs +69 -0
- package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/index.get.mjs +60 -0
- package/.output/server/chunks/routes/api/skills/_name/index.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs +87 -0
- package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs +62 -0
- package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/create.post.mjs +79 -0
- package/.output/server/chunks/routes/api/skills/create.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/generate.post.mjs +143 -0
- package/.output/server/chunks/routes/api/skills/generate.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/import.post.mjs +96 -0
- package/.output/server/chunks/routes/api/skills/import.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/index.get.mjs +82 -0
- package/.output/server/chunks/routes/api/skills/index.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/index.get2.mjs +83 -0
- package/.output/server/chunks/routes/api/skills/index.get2.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs +72 -0
- package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/skills/library/install.post.mjs +90 -0
- package/.output/server/chunks/routes/api/skills/library/install.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/index.put.mjs.map +1 -1
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -0
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +4 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/user/email.patch.mjs +2 -1
- package/.output/server/chunks/routes/api/user/email.patch.mjs.map +1 -1
- package/.output/server/chunks/routes/notifications.mjs +2 -1
- package/.output/server/chunks/routes/notifications.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/routes/terminal.mjs +2 -1
- package/.output/server/chunks/routes/terminal.mjs.map +1 -1
- package/.output/server/index.mjs +2 -1
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/adm-zip/adm-zip.js +949 -0
- package/.output/server/node_modules/adm-zip/headers/entryHeader.js +374 -0
- package/.output/server/node_modules/adm-zip/headers/index.js +2 -0
- package/.output/server/node_modules/adm-zip/headers/mainHeader.js +130 -0
- package/.output/server/node_modules/adm-zip/methods/deflater.js +33 -0
- package/.output/server/node_modules/adm-zip/methods/index.js +3 -0
- package/.output/server/node_modules/adm-zip/methods/inflater.js +34 -0
- package/.output/server/node_modules/adm-zip/methods/zipcrypto.js +175 -0
- package/.output/server/node_modules/adm-zip/package.json +49 -0
- package/.output/server/node_modules/adm-zip/util/constants.js +142 -0
- package/.output/server/node_modules/adm-zip/util/decoder.js +5 -0
- package/.output/server/node_modules/adm-zip/util/errors.js +63 -0
- package/.output/server/node_modules/adm-zip/util/fattr.js +76 -0
- package/.output/server/node_modules/adm-zip/util/index.js +5 -0
- package/.output/server/node_modules/adm-zip/util/utils.js +336 -0
- package/.output/server/node_modules/adm-zip/zipEntry.js +405 -0
- package/.output/server/node_modules/adm-zip/zipFile.js +446 -0
- package/.output/server/package.json +2 -1
- package/Claude/CLAUDE.md +9 -4
- package/Claude/skills/environment/SKILL.md +6 -0
- package/Claude/skills/memory/SKILL.md +6 -0
- package/Claude/skills/project/SKILL.md +6 -0
- package/Claude/skills/secret/SKILL.md +85 -0
- package/Claude/skills/secret/secret.py +146 -0
- package/Claude/skills/skill-creator/SKILL.md +30 -0
- package/Claude/skills/task/SKILL.md +6 -0
- package/README.md +3 -0
- package/app/app.vue +1 -1
- package/app/components/dashboard/StatCards.vue +21 -2
- package/app/components/skills/Card.vue +82 -0
- package/app/components/skills/CreateModal.vue +156 -0
- package/app/components/skills/Editor.vue +135 -0
- package/app/components/skills/FileTree.vue +336 -0
- package/app/components/skills/LibraryCard.vue +122 -0
- package/app/components/skills/RenameModal.vue +84 -0
- package/app/components/usage/UsageCostChart.client.vue +59 -23
- package/app/components/usage/UsageCostChart.server.vue +1 -0
- package/app/components/usage/UsageSourceDonut.client.vue +17 -5
- package/app/components/usage/UsageSourceDonut.server.vue +1 -0
- package/app/components/usage/UsageTopConsumers.vue +13 -3
- package/app/composables/usePreferences.ts +9 -1
- package/app/layouts/auth.vue +0 -10
- package/app/layouts/dashboard.vue +7 -0
- package/app/pages/login.vue +18 -8
- package/app/pages/skills/[name].vue +210 -0
- package/app/pages/skills/index.vue +204 -0
- package/app/pages/skills/library.vue +209 -0
- package/app/pages/usage.vue +43 -16
- package/dist/cli/index.js +35 -36
- package/nuxt.config.ts +9 -0
- package/package.json +5 -3
- package/server/api/skills/[name]/export.get.ts +45 -0
- package/server/api/skills/[name]/files/create.post.ts +45 -0
- package/server/api/skills/[name]/files/delete.post.ts +45 -0
- package/server/api/skills/[name]/files/index.get.ts +28 -0
- package/server/api/skills/[name]/files/read.post.ts +41 -0
- package/server/api/skills/[name]/files/write.post.ts +42 -0
- package/server/api/skills/[name]/index.get.ts +54 -0
- package/server/api/skills/[name]/rename.post.ts +64 -0
- package/server/api/skills/[name]/toggle.post.ts +32 -0
- package/server/api/skills/create.post.ts +51 -0
- package/server/api/skills/generate.post.ts +126 -0
- package/server/api/skills/import.post.ts +87 -0
- package/server/api/skills/index.get.ts +57 -0
- package/server/api/skills/library/check-updates.get.ts +46 -0
- package/server/api/skills/library/index.get.ts +56 -0
- package/server/api/skills/library/install.post.ts +73 -0
- package/server/api/usage/stats.get.ts +4 -2
- package/server/db/schema.ts +17 -0
- package/server/drizzle/migrations/0012_good_deadpool.sql +12 -0
- package/server/drizzle/migrations/0013_swift_snowbird.sql +1 -0
- package/server/drizzle/migrations/meta/0012_snapshot.json +1713 -0
- package/server/drizzle/migrations/meta/0013_snapshot.json +1720 -0
- package/server/drizzle/migrations/meta/_journal.json +14 -0
- package/server/middleware/auth.ts +0 -1
- package/server/plugins/05.skills-catalog.ts +105 -0
- package/server/utils/skills-path.ts +197 -0
- package/shared/types/index.ts +65 -1
- package/.output/public/_nuxt/5ZXA0Ckq.js +0 -1
- package/.output/public/_nuxt/BIIJhjQO.js +0 -1
- package/.output/public/_nuxt/BIckl6wA.js +0 -1
- package/.output/public/_nuxt/BJ3o57WW.js +0 -1
- package/.output/public/_nuxt/BNetzZzF.js +0 -1
- package/.output/public/_nuxt/BS0ofHJK.js +0 -1
- package/.output/public/_nuxt/B_3_hrpn.js +0 -1
- package/.output/public/_nuxt/BaBZjmMC.js +0 -1
- package/.output/public/_nuxt/BaMqDm5u.js +0 -1
- package/.output/public/_nuxt/BhzMoffi.js +0 -1
- package/.output/public/_nuxt/BlhFigLL.js +0 -1
- package/.output/public/_nuxt/BoIxv-gM.js +0 -1
- package/.output/public/_nuxt/Br19oYkq.js +0 -1
- package/.output/public/_nuxt/C0kh_F7v.js +0 -1
- package/.output/public/_nuxt/C61KgSco.js +0 -1
- package/.output/public/_nuxt/CJUdYEdO.js +0 -1
- package/.output/public/_nuxt/CVJQGP1Q.js +0 -1
- package/.output/public/_nuxt/CWMUi89H.js +0 -1
- package/.output/public/_nuxt/Cdu2qGgq.js +0 -1
- package/.output/public/_nuxt/CeIu7z4p.js +0 -1
- package/.output/public/_nuxt/D2689qk4.js +0 -1
- package/.output/public/_nuxt/D31L7Ks6.js +0 -1
- package/.output/public/_nuxt/DB359q8R.js +0 -1
- package/.output/public/_nuxt/DHG66LPS.js +0 -1
- package/.output/public/_nuxt/DJ5V-y_x.js +0 -1
- package/.output/public/_nuxt/DLETdGFL.js +0 -1
- package/.output/public/_nuxt/DOICd-Ld.js +0 -1
- package/.output/public/_nuxt/DPEcH-gi.js +0 -65
- package/.output/public/_nuxt/Db8-_gO7.js +0 -1
- package/.output/public/_nuxt/DgV-EDJ9.js +0 -1
- package/.output/public/_nuxt/Dp2X5R2m.js +0 -1
- package/.output/public/_nuxt/DqB723Z0.js +0 -1
- package/.output/public/_nuxt/Q8Ps7oN5.js +0 -1
- package/.output/public/_nuxt/SXTDhzp6.js +0 -1
- package/.output/public/_nuxt/Sg2Lwc46.js +0 -1
- package/.output/public/_nuxt/_J_7XIn-.js +0 -1
- package/.output/public/_nuxt/builds/meta/a1e9100c-1a4f-4f7e-bb53-9dbe0d07effb.json +0 -1
- package/.output/public/_nuxt/entry.CGxIBGAf.css +0 -1
- package/.output/public/_nuxt/inmzPrjz.js +0 -1
- package/.output/public/_nuxt/oIX-ZDN6.js +0 -1
- package/.output/server/chunks/build/auth-CDHRohj4.mjs +0 -77
- package/.output/server/chunks/build/auth-CDHRohj4.mjs.map +0 -1
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs.map +0 -1
- package/.output/server/chunks/build/docs-Dk2JnYq3.mjs.map +0 -1
- package/.output/server/chunks/build/hooks-DP8WoUPS.mjs.map +0 -1
- package/.output/server/chunks/build/index-Ba_bPJgk.mjs.map +0 -1
- package/.output/server/chunks/build/tasks-DiOi1HG_.mjs.map +0 -1
- package/.output/server/chunks/build/usePreferences-CzC8fRzd.mjs.map +0 -1
- /package/.output/public/_nuxt/{useCopyToClipboard.Be_IvFWy.css → CodeEditor.Be_IvFWy.css} +0 -0
|
@@ -1,92 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useForwardProps, useForwardPropsEmits, ContextMenuRoot, ContextMenuTrigger, TreeItem, TreeRoot, TreeVirtualizer } from 'reka-ui';
|
|
7
|
-
import { useDebounceFn, reactiveOmit, reactivePick, createReusableTemplate } from '@vueuse/core';
|
|
8
|
-
import { Q as useRoute, g as _sfc_main$d, _ as _sfc_main$8$1, b as useLocale, e as useAppConfig, t as tv, i as useToast, z as __nuxt_component_3$1, J as omit, m as usePortal, r as isArrayOfArray, v as _sfc_main$b$1, h as get, G as _sfc_main$9$1, K as pickLinkProps, L as _sfc_main$a$1 } from './server.mjs';
|
|
1
|
+
import { useSlots, toRef, computed, unref, mergeProps, withCtx, renderSlot, createSlots, renderList, createBlock, createCommentVNode, createVNode, openBlock, useTemplateRef, resolveDynamicComponent, createTextVNode, toDisplayString, Fragment, useSSRContext } from 'vue';
|
|
2
|
+
import { ssrRenderComponent, ssrRenderSlot, ssrRenderClass, ssrRenderVNode, ssrInterpolate, ssrRenderList } from 'vue/server-renderer';
|
|
3
|
+
import { useForwardPropsEmits, ContextMenuRoot, ContextMenuTrigger, TreeItem, TreeRoot, TreeVirtualizer } from 'reka-ui';
|
|
4
|
+
import { reactivePick, createReusableTemplate, reactiveOmit } from '@vueuse/core';
|
|
5
|
+
import { e as useAppConfig, t as tv, J as omit, g as _sfc_main$d, b as useLocale, m as usePortal, r as isArrayOfArray, v as _sfc_main$b, h as get, G as _sfc_main$9, K as pickLinkProps, L as _sfc_main$a } from './server.mjs';
|
|
9
6
|
import { ContextMenu } from 'reka-ui/namespaced';
|
|
10
|
-
import { _ as _sfc_main$
|
|
11
|
-
import {
|
|
7
|
+
import { _ as _sfc_main$3 } from './Kbd-Daq7k0fm.mjs';
|
|
8
|
+
import { aj as defu } from '../nitro/nitro.mjs';
|
|
12
9
|
import { g as getEstimateSize } from './virtualizer-rkZfhL1t.mjs';
|
|
13
|
-
import { _ as _sfc_main$e } from './Modal-Z_SoWhh-.mjs';
|
|
14
|
-
import { _ as _sfc_main$f } from './Card-G40WAFiH.mjs';
|
|
15
|
-
import { u as useDashboard } from './DashboardSidebarToggle-Chnqv04k.mjs';
|
|
16
|
-
import { _ as _sfc_main$9 } from './ColorModeButton-CiS8E1tc.mjs';
|
|
17
|
-
import { _ as _sfc_main$a } from './Drawer-zOHju6ul.mjs';
|
|
18
|
-
import { _ as _sfc_main$g } from './Switch-GWdksmY6.mjs';
|
|
19
|
-
import { _ as _sfc_main$j } from './FormField-Caux_FCv.mjs';
|
|
20
|
-
import { _ as _sfc_main$k } from './SelectMenu-DPssg6zD.mjs';
|
|
21
|
-
import { _ as _sfc_main$l } from './InputTags-VS4G6txn.mjs';
|
|
22
|
-
import { _ as _sfc_main$1$2, a as _sfc_main$h } from './EditorToolbar-DIfb5arC.mjs';
|
|
23
|
-
import { _ as __nuxt_component_5, u as useCopyToClipboard } from './useCopyToClipboard-vi6FYyyZ.mjs';
|
|
24
|
-
import { u as useFetch } from './fetch-BB7Qzkwe.mjs';
|
|
25
|
-
import { u as usePreferences } from './usePreferences-CzC8fRzd.mjs';
|
|
26
|
-
import 'vue-router';
|
|
27
|
-
import 'tailwindcss/colors';
|
|
28
|
-
import '@iconify/vue';
|
|
29
|
-
import 'tailwind-variants';
|
|
30
|
-
import '@iconify/utils/lib/css/icon';
|
|
31
|
-
import 'perfect-debounce';
|
|
32
|
-
import '../routes/renderer.mjs';
|
|
33
|
-
import 'vue-bundle-renderer/runtime';
|
|
34
|
-
import 'unhead/server';
|
|
35
|
-
import 'devalue';
|
|
36
|
-
import 'unhead/plugins';
|
|
37
|
-
import 'unhead/utils';
|
|
38
|
-
import '@anthropic-ai/claude-agent-sdk';
|
|
39
|
-
import 'crypto';
|
|
40
|
-
import 'module';
|
|
41
|
-
import 'path';
|
|
42
|
-
import 'node:http';
|
|
43
|
-
import 'node:https';
|
|
44
|
-
import 'node:crypto';
|
|
45
|
-
import 'stream';
|
|
46
|
-
import 'events';
|
|
47
|
-
import 'http';
|
|
48
|
-
import 'buffer';
|
|
49
|
-
import 'zlib';
|
|
50
|
-
import 'https';
|
|
51
|
-
import 'net';
|
|
52
|
-
import 'tls';
|
|
53
|
-
import 'url';
|
|
54
|
-
import 'node:events';
|
|
55
|
-
import 'node:buffer';
|
|
56
|
-
import 'node:fs';
|
|
57
|
-
import 'node:path';
|
|
58
|
-
import 'fs';
|
|
59
|
-
import 'drizzle-orm/postgres-js/migrator';
|
|
60
|
-
import 'drizzle-orm';
|
|
61
|
-
import 'drizzle-orm/postgres-js';
|
|
62
|
-
import 'postgres';
|
|
63
|
-
import 'drizzle-orm/pg-core';
|
|
64
|
-
import 'better-auth';
|
|
65
|
-
import 'better-auth/adapters/drizzle';
|
|
66
|
-
import 'chokidar';
|
|
67
|
-
import 'fs/promises';
|
|
68
|
-
import 'gray-matter';
|
|
69
|
-
import 'cron';
|
|
70
|
-
import 'node:url';
|
|
71
|
-
import '@iconify/utils';
|
|
72
|
-
import 'consola';
|
|
73
|
-
import './cookie-C_iulBi6.mjs';
|
|
74
|
-
import './ssr-Bqnw2a-w.mjs';
|
|
75
|
-
import 'vaul-vue';
|
|
76
|
-
import '@tiptap/core';
|
|
77
|
-
import '@tiptap/extension-horizontal-rule';
|
|
78
|
-
import '@tiptap/extension-image';
|
|
79
|
-
import '@tiptap/extension-mention';
|
|
80
|
-
import '@tiptap/extension-placeholder';
|
|
81
|
-
import '@tiptap/markdown';
|
|
82
|
-
import '@tiptap/starter-kit';
|
|
83
|
-
import '@tiptap/vue-3';
|
|
84
|
-
import '@tiptap/vue-3/menus';
|
|
85
|
-
import './DropdownMenu-BBrV9nXz.mjs';
|
|
86
|
-
import './Tooltip-TRyl6dje.mjs';
|
|
87
|
-
import '@vue/shared';
|
|
88
10
|
|
|
89
|
-
const _sfc_main$
|
|
11
|
+
const _sfc_main$2 = {
|
|
90
12
|
__name: "UContextMenuContent",
|
|
91
13
|
__ssrInlineRender: true,
|
|
92
14
|
props: {
|
|
@@ -159,7 +81,7 @@ const _sfc_main$7 = {
|
|
|
159
81
|
class: __props.ui.itemLeadingIcon({ class: [__props.uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item?.color, active })
|
|
160
82
|
}, null, _parent2, _scopeId));
|
|
161
83
|
} else if (item.avatar) {
|
|
162
|
-
_push2(ssrRenderComponent(_sfc_main$b
|
|
84
|
+
_push2(ssrRenderComponent(_sfc_main$b, mergeProps({
|
|
163
85
|
size: item.ui?.itemLeadingAvatarSize || __props.uiOverride?.itemLeadingAvatarSize || __props.ui.itemLeadingAvatarSize()
|
|
164
86
|
}, item.avatar, {
|
|
165
87
|
"data-slot": "itemLeadingAvatar",
|
|
@@ -221,7 +143,7 @@ const _sfc_main$7 = {
|
|
|
221
143
|
} else if (item.kbds?.length) {
|
|
222
144
|
_push2(`<span data-slot="itemTrailingKbds" class="${ssrRenderClass(__props.ui.itemTrailingKbds({ class: [__props.uiOverride?.itemTrailingKbds, item.ui?.itemTrailingKbds] }))}"${_scopeId}><!--[-->`);
|
|
223
145
|
ssrRenderList(item.kbds, (kbd, kbdIndex) => {
|
|
224
|
-
_push2(ssrRenderComponent(_sfc_main$
|
|
146
|
+
_push2(ssrRenderComponent(_sfc_main$3, mergeProps({
|
|
225
147
|
key: kbdIndex,
|
|
226
148
|
size: item.ui?.itemTrailingKbdsSize || __props.uiOverride?.itemTrailingKbdsSize || __props.ui.itemTrailingKbdsSize()
|
|
227
149
|
}, { ref_for: true }, typeof kbd === "string" ? { value: kbd } : kbd), null, _parent2, _scopeId));
|
|
@@ -276,7 +198,7 @@ const _sfc_main$7 = {
|
|
|
276
198
|
name: item.icon,
|
|
277
199
|
"data-slot": "itemLeadingIcon",
|
|
278
200
|
class: __props.ui.itemLeadingIcon({ class: [__props.uiOverride?.itemLeadingIcon, item.ui?.itemLeadingIcon], color: item?.color, active })
|
|
279
|
-
}, null, 8, ["name", "class"])) : item.avatar ? (openBlock(), createBlock(_sfc_main$b
|
|
201
|
+
}, null, 8, ["name", "class"])) : item.avatar ? (openBlock(), createBlock(_sfc_main$b, mergeProps({
|
|
280
202
|
key: 2,
|
|
281
203
|
size: item.ui?.itemLeadingAvatarSize || __props.uiOverride?.itemLeadingAvatarSize || __props.ui.itemLeadingAvatarSize()
|
|
282
204
|
}, item.avatar, {
|
|
@@ -342,7 +264,7 @@ const _sfc_main$7 = {
|
|
|
342
264
|
class: __props.ui.itemTrailingKbds({ class: [__props.uiOverride?.itemTrailingKbds, item.ui?.itemTrailingKbds] })
|
|
343
265
|
}, [
|
|
344
266
|
(openBlock(true), createBlock(Fragment, null, renderList(item.kbds, (kbd, kbdIndex) => {
|
|
345
|
-
return openBlock(), createBlock(_sfc_main$
|
|
267
|
+
return openBlock(), createBlock(_sfc_main$3, mergeProps({
|
|
346
268
|
key: kbdIndex,
|
|
347
269
|
size: item.ui?.itemTrailingKbdsSize || __props.uiOverride?.itemTrailingKbdsSize || __props.ui.itemTrailingKbdsSize()
|
|
348
270
|
}, { ref_for: true }, typeof kbd === "string" ? { value: kbd } : kbd), null, 16, ["size"]);
|
|
@@ -449,7 +371,7 @@ const _sfc_main$7 = {
|
|
|
449
371
|
}),
|
|
450
372
|
_: 2
|
|
451
373
|
}, _parent5, _scopeId4));
|
|
452
|
-
_push5(ssrRenderComponent(_sfc_main$
|
|
374
|
+
_push5(ssrRenderComponent(_sfc_main$2, mergeProps({
|
|
453
375
|
sub: "",
|
|
454
376
|
class: item.ui?.content,
|
|
455
377
|
ui: __props.ui,
|
|
@@ -496,7 +418,7 @@ const _sfc_main$7 = {
|
|
|
496
418
|
]),
|
|
497
419
|
_: 2
|
|
498
420
|
}, 1032, ["disabled", "text-value", "class"]),
|
|
499
|
-
createVNode(_sfc_main$
|
|
421
|
+
createVNode(_sfc_main$2, mergeProps({
|
|
500
422
|
sub: "",
|
|
501
423
|
class: item.ui?.content,
|
|
502
424
|
ui: __props.ui,
|
|
@@ -560,10 +482,10 @@ const _sfc_main$7 = {
|
|
|
560
482
|
}, {
|
|
561
483
|
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
|
|
562
484
|
if (_push5) {
|
|
563
|
-
_push5(ssrRenderComponent(_sfc_main$9
|
|
485
|
+
_push5(ssrRenderComponent(_sfc_main$9, mergeProps({ ref_for: true }, unref(pickLinkProps)(item), { custom: "" }), {
|
|
564
486
|
default: withCtx(({ active, ...slotProps }, _push6, _parent6, _scopeId5) => {
|
|
565
487
|
if (_push6) {
|
|
566
|
-
_push6(ssrRenderComponent(_sfc_main$a
|
|
488
|
+
_push6(ssrRenderComponent(_sfc_main$a, mergeProps({ ref_for: true }, slotProps, {
|
|
567
489
|
"data-slot": "item",
|
|
568
490
|
class: __props.ui.item({ class: [__props.uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })
|
|
569
491
|
}), {
|
|
@@ -588,7 +510,7 @@ const _sfc_main$7 = {
|
|
|
588
510
|
}, _parent6, _scopeId5));
|
|
589
511
|
} else {
|
|
590
512
|
return [
|
|
591
|
-
createVNode(_sfc_main$a
|
|
513
|
+
createVNode(_sfc_main$a, mergeProps({ ref_for: true }, slotProps, {
|
|
592
514
|
"data-slot": "item",
|
|
593
515
|
class: __props.ui.item({ class: [__props.uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })
|
|
594
516
|
}), {
|
|
@@ -608,9 +530,9 @@ const _sfc_main$7 = {
|
|
|
608
530
|
}, _parent5, _scopeId4));
|
|
609
531
|
} else {
|
|
610
532
|
return [
|
|
611
|
-
createVNode(_sfc_main$9
|
|
533
|
+
createVNode(_sfc_main$9, mergeProps({ ref_for: true }, unref(pickLinkProps)(item), { custom: "" }), {
|
|
612
534
|
default: withCtx(({ active, ...slotProps }) => [
|
|
613
|
-
createVNode(_sfc_main$a
|
|
535
|
+
createVNode(_sfc_main$a, mergeProps({ ref_for: true }, slotProps, {
|
|
614
536
|
"data-slot": "item",
|
|
615
537
|
class: __props.ui.item({ class: [__props.uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })
|
|
616
538
|
}), {
|
|
@@ -679,7 +601,7 @@ const _sfc_main$7 = {
|
|
|
679
601
|
]),
|
|
680
602
|
_: 2
|
|
681
603
|
}, 1032, ["disabled", "text-value", "class"]),
|
|
682
|
-
createVNode(_sfc_main$
|
|
604
|
+
createVNode(_sfc_main$2, mergeProps({
|
|
683
605
|
sub: "",
|
|
684
606
|
class: item.ui?.content,
|
|
685
607
|
ui: __props.ui,
|
|
@@ -729,9 +651,9 @@ const _sfc_main$7 = {
|
|
|
729
651
|
onSelect: item.onSelect
|
|
730
652
|
}, {
|
|
731
653
|
default: withCtx(() => [
|
|
732
|
-
createVNode(_sfc_main$9
|
|
654
|
+
createVNode(_sfc_main$9, mergeProps({ ref_for: true }, unref(pickLinkProps)(item), { custom: "" }), {
|
|
733
655
|
default: withCtx(({ active, ...slotProps }) => [
|
|
734
|
-
createVNode(_sfc_main$a
|
|
656
|
+
createVNode(_sfc_main$a, mergeProps({ ref_for: true }, slotProps, {
|
|
735
657
|
"data-slot": "item",
|
|
736
658
|
class: __props.ui.item({ class: [__props.uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })
|
|
737
659
|
}), {
|
|
@@ -822,7 +744,7 @@ const _sfc_main$7 = {
|
|
|
822
744
|
]),
|
|
823
745
|
_: 2
|
|
824
746
|
}, 1032, ["disabled", "text-value", "class"]),
|
|
825
|
-
createVNode(_sfc_main$
|
|
747
|
+
createVNode(_sfc_main$2, mergeProps({
|
|
826
748
|
sub: "",
|
|
827
749
|
class: item.ui?.content,
|
|
828
750
|
ui: __props.ui,
|
|
@@ -872,9 +794,9 @@ const _sfc_main$7 = {
|
|
|
872
794
|
onSelect: item.onSelect
|
|
873
795
|
}, {
|
|
874
796
|
default: withCtx(() => [
|
|
875
|
-
createVNode(_sfc_main$9
|
|
797
|
+
createVNode(_sfc_main$9, mergeProps({ ref_for: true }, unref(pickLinkProps)(item), { custom: "" }), {
|
|
876
798
|
default: withCtx(({ active, ...slotProps }) => [
|
|
877
|
-
createVNode(_sfc_main$a
|
|
799
|
+
createVNode(_sfc_main$a, mergeProps({ ref_for: true }, slotProps, {
|
|
878
800
|
"data-slot": "item",
|
|
879
801
|
class: __props.ui.item({ class: [__props.uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })
|
|
880
802
|
}), {
|
|
@@ -973,7 +895,7 @@ const _sfc_main$7 = {
|
|
|
973
895
|
]),
|
|
974
896
|
_: 2
|
|
975
897
|
}, 1032, ["disabled", "text-value", "class"]),
|
|
976
|
-
createVNode(_sfc_main$
|
|
898
|
+
createVNode(_sfc_main$2, mergeProps({
|
|
977
899
|
sub: "",
|
|
978
900
|
class: item.ui?.content,
|
|
979
901
|
ui: __props.ui,
|
|
@@ -1023,9 +945,9 @@ const _sfc_main$7 = {
|
|
|
1023
945
|
onSelect: item.onSelect
|
|
1024
946
|
}, {
|
|
1025
947
|
default: withCtx(() => [
|
|
1026
|
-
createVNode(_sfc_main$9
|
|
948
|
+
createVNode(_sfc_main$9, mergeProps({ ref_for: true }, unref(pickLinkProps)(item), { custom: "" }), {
|
|
1027
949
|
default: withCtx(({ active, ...slotProps }) => [
|
|
1028
|
-
createVNode(_sfc_main$a
|
|
950
|
+
createVNode(_sfc_main$a, mergeProps({ ref_for: true }, slotProps, {
|
|
1029
951
|
"data-slot": "item",
|
|
1030
952
|
class: __props.ui.item({ class: [__props.uiOverride?.item, item.ui?.item, item.class], active, color: item?.color })
|
|
1031
953
|
}), {
|
|
@@ -1067,13 +989,13 @@ const _sfc_main$7 = {
|
|
|
1067
989
|
};
|
|
1068
990
|
}
|
|
1069
991
|
};
|
|
1070
|
-
const _sfc_setup$
|
|
1071
|
-
_sfc_main$
|
|
992
|
+
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
993
|
+
_sfc_main$2.setup = (props, ctx) => {
|
|
1072
994
|
const ssrContext = useSSRContext();
|
|
1073
995
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/@nuxt+ui@4.3.0_2329ed002e1dfb3a5ad728629f2842a0/node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue");
|
|
1074
|
-
return _sfc_setup$
|
|
996
|
+
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
1075
997
|
};
|
|
1076
|
-
const theme$
|
|
998
|
+
const theme$1 = {
|
|
1077
999
|
"slots": {
|
|
1078
1000
|
"content": "min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col",
|
|
1079
1001
|
"viewport": "relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",
|
|
@@ -1274,7 +1196,7 @@ const theme$2 = {
|
|
|
1274
1196
|
"size": "md"
|
|
1275
1197
|
}
|
|
1276
1198
|
};
|
|
1277
|
-
const _sfc_main$
|
|
1199
|
+
const _sfc_main$1 = {
|
|
1278
1200
|
__name: "UContextMenu",
|
|
1279
1201
|
__ssrInlineRender: true,
|
|
1280
1202
|
props: {
|
|
@@ -1302,7 +1224,7 @@ const _sfc_main$6 = {
|
|
|
1302
1224
|
const rootProps = useForwardPropsEmits(reactivePick(props, "modal"), emits);
|
|
1303
1225
|
const contentProps = toRef(() => props.content);
|
|
1304
1226
|
const getProxySlots = () => omit(slots, ["default"]);
|
|
1305
|
-
const ui = computed(() => tv({ extend: tv(theme$
|
|
1227
|
+
const ui = computed(() => tv({ extend: tv(theme$1), ...appConfig.ui?.contextMenu || {} })({
|
|
1306
1228
|
size: props.size
|
|
1307
1229
|
}));
|
|
1308
1230
|
return (_ctx, _push, _parent, _attrs) => {
|
|
@@ -1329,7 +1251,7 @@ const _sfc_main$6 = {
|
|
|
1329
1251
|
} else {
|
|
1330
1252
|
_push2(`<!---->`);
|
|
1331
1253
|
}
|
|
1332
|
-
_push2(ssrRenderComponent(_sfc_main$
|
|
1254
|
+
_push2(ssrRenderComponent(_sfc_main$2, mergeProps({
|
|
1333
1255
|
class: ui.value.content({ class: [!slots.default && props.class, props.ui?.content] }),
|
|
1334
1256
|
ui: ui.value,
|
|
1335
1257
|
"ui-override": props.ui
|
|
@@ -1370,7 +1292,7 @@ const _sfc_main$6 = {
|
|
|
1370
1292
|
]),
|
|
1371
1293
|
_: 3
|
|
1372
1294
|
}, 8, ["disabled", "class"])) : createCommentVNode("", true),
|
|
1373
|
-
createVNode(_sfc_main$
|
|
1295
|
+
createVNode(_sfc_main$2, mergeProps({
|
|
1374
1296
|
class: ui.value.content({ class: [!slots.default && props.class, props.ui?.content] }),
|
|
1375
1297
|
ui: ui.value,
|
|
1376
1298
|
"ui-override": props.ui
|
|
@@ -1400,13 +1322,13 @@ const _sfc_main$6 = {
|
|
|
1400
1322
|
};
|
|
1401
1323
|
}
|
|
1402
1324
|
};
|
|
1403
|
-
const _sfc_setup$
|
|
1404
|
-
_sfc_main$
|
|
1325
|
+
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
1326
|
+
_sfc_main$1.setup = (props, ctx) => {
|
|
1405
1327
|
const ssrContext = useSSRContext();
|
|
1406
1328
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/@nuxt+ui@4.3.0_2329ed002e1dfb3a5ad728629f2842a0/node_modules/@nuxt/ui/dist/runtime/components/ContextMenu.vue");
|
|
1407
|
-
return _sfc_setup$
|
|
1329
|
+
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
1408
1330
|
};
|
|
1409
|
-
const theme
|
|
1331
|
+
const theme = {
|
|
1410
1332
|
"slots": {
|
|
1411
1333
|
"root": "relative isolate",
|
|
1412
1334
|
"item": "w-full",
|
|
@@ -1556,7 +1478,7 @@ const theme$1 = {
|
|
|
1556
1478
|
"size": "md"
|
|
1557
1479
|
}
|
|
1558
1480
|
};
|
|
1559
|
-
const _sfc_main
|
|
1481
|
+
const _sfc_main = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
1560
1482
|
__name: "UTree",
|
|
1561
1483
|
__ssrInlineRender: true,
|
|
1562
1484
|
props: {
|
|
@@ -1638,7 +1560,7 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
1638
1560
|
}
|
|
1639
1561
|
}
|
|
1640
1562
|
});
|
|
1641
|
-
const ui = computed(() => tv({ extend: tv(theme
|
|
1563
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.tree || {} })({
|
|
1642
1564
|
color: props.color,
|
|
1643
1565
|
size: props.size,
|
|
1644
1566
|
virtualize: !!props.virtualize
|
|
@@ -2081,2123 +2003,12 @@ const _sfc_main$5 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
2081
2003
|
};
|
|
2082
2004
|
}
|
|
2083
2005
|
});
|
|
2084
|
-
const _sfc_setup
|
|
2085
|
-
_sfc_main
|
|
2006
|
+
const _sfc_setup = _sfc_main.setup;
|
|
2007
|
+
_sfc_main.setup = (props, ctx) => {
|
|
2086
2008
|
const ssrContext = useSSRContext();
|
|
2087
2009
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/@nuxt+ui@4.3.0_2329ed002e1dfb3a5ad728629f2842a0/node_modules/@nuxt/ui/dist/runtime/components/Tree.vue");
|
|
2088
|
-
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
2089
|
-
};
|
|
2090
|
-
function useFileTree() {
|
|
2091
|
-
const items = ref([]);
|
|
2092
|
-
const selectedFile = ref(null);
|
|
2093
|
-
const loading = ref(false);
|
|
2094
|
-
const error = ref(null);
|
|
2095
|
-
const searchQuery = ref("");
|
|
2096
|
-
function fileEntryToTreeItem(entry, expandRoot = false) {
|
|
2097
|
-
const icon = entry.type === "directory" ? void 0 : getFileIcon(entry.name);
|
|
2098
|
-
return {
|
|
2099
|
-
id: entry.path,
|
|
2100
|
-
label: entry.name,
|
|
2101
|
-
icon,
|
|
2102
|
-
path: entry.path,
|
|
2103
|
-
type: entry.type,
|
|
2104
|
-
defaultExpanded: expandRoot,
|
|
2105
|
-
children: entry.children?.map((child) => fileEntryToTreeItem(child))
|
|
2106
|
-
};
|
|
2107
|
-
}
|
|
2108
|
-
function getFileIcon(filename) {
|
|
2109
|
-
const ext = filename.split(".").pop()?.toLowerCase();
|
|
2110
|
-
switch (ext) {
|
|
2111
|
-
case "md":
|
|
2112
|
-
return "i-lucide-file-text";
|
|
2113
|
-
case "ts":
|
|
2114
|
-
case "tsx":
|
|
2115
|
-
return "i-lucide-file-code";
|
|
2116
|
-
case "js":
|
|
2117
|
-
case "jsx":
|
|
2118
|
-
return "i-lucide-file-code";
|
|
2119
|
-
case "vue":
|
|
2120
|
-
return "i-lucide-file-code";
|
|
2121
|
-
case "json":
|
|
2122
|
-
return "i-lucide-file-json";
|
|
2123
|
-
case "css":
|
|
2124
|
-
case "scss":
|
|
2125
|
-
return "i-lucide-file-code";
|
|
2126
|
-
case "png":
|
|
2127
|
-
case "jpg":
|
|
2128
|
-
case "jpeg":
|
|
2129
|
-
case "gif":
|
|
2130
|
-
case "svg":
|
|
2131
|
-
return "i-lucide-file-image";
|
|
2132
|
-
default:
|
|
2133
|
-
return "i-lucide-file";
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
async function loadTree(path = "/") {
|
|
2137
|
-
loading.value = true;
|
|
2138
|
-
error.value = null;
|
|
2139
|
-
try {
|
|
2140
|
-
const response = await $fetch("/api/fs/list", {
|
|
2141
|
-
query: { path, recursive: "true" }
|
|
2142
|
-
});
|
|
2143
|
-
items.value = response.data.map((entry) => fileEntryToTreeItem(entry, true));
|
|
2144
|
-
} catch (e) {
|
|
2145
|
-
error.value = "Failed to load file tree";
|
|
2146
|
-
console.error("Failed to load file tree:", e);
|
|
2147
|
-
} finally {
|
|
2148
|
-
loading.value = false;
|
|
2149
|
-
}
|
|
2150
|
-
}
|
|
2151
|
-
async function readFile(path) {
|
|
2152
|
-
try {
|
|
2153
|
-
const response = await $fetch("/api/fs/read", {
|
|
2154
|
-
method: "POST",
|
|
2155
|
-
body: { path }
|
|
2156
|
-
});
|
|
2157
|
-
return response.data;
|
|
2158
|
-
} catch (e) {
|
|
2159
|
-
console.error("Failed to read file:", e);
|
|
2160
|
-
throw e;
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
async function writeFile(path, content) {
|
|
2164
|
-
try {
|
|
2165
|
-
const response = await $fetch("/api/fs/write", {
|
|
2166
|
-
method: "POST",
|
|
2167
|
-
body: { path, content }
|
|
2168
|
-
});
|
|
2169
|
-
return response.data;
|
|
2170
|
-
} catch (e) {
|
|
2171
|
-
console.error("Failed to write file:", e);
|
|
2172
|
-
throw e;
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
async function createFile(parentPath, filename) {
|
|
2176
|
-
const path = parentPath === "/" ? `/${filename}` : `${parentPath}/${filename}`;
|
|
2177
|
-
await writeFile(path, "");
|
|
2178
|
-
await loadTree();
|
|
2179
|
-
return path;
|
|
2180
|
-
}
|
|
2181
|
-
async function createFolder(parentPath, foldername) {
|
|
2182
|
-
const path = parentPath === "/" ? `/${foldername}` : `${parentPath}/${foldername}`;
|
|
2183
|
-
try {
|
|
2184
|
-
await $fetch("/api/fs/mkdir", {
|
|
2185
|
-
method: "POST",
|
|
2186
|
-
body: { path }
|
|
2187
|
-
});
|
|
2188
|
-
await loadTree();
|
|
2189
|
-
return path;
|
|
2190
|
-
} catch (e) {
|
|
2191
|
-
console.error("Failed to create folder:", e);
|
|
2192
|
-
throw e;
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
async function renameItem(oldPath, newName) {
|
|
2196
|
-
const parts = oldPath.split("/");
|
|
2197
|
-
parts.pop();
|
|
2198
|
-
const newPath = [...parts, newName].join("/");
|
|
2199
|
-
try {
|
|
2200
|
-
await $fetch("/api/fs/rename", {
|
|
2201
|
-
method: "POST",
|
|
2202
|
-
body: { oldPath, newPath }
|
|
2203
|
-
});
|
|
2204
|
-
await loadTree();
|
|
2205
|
-
return newPath;
|
|
2206
|
-
} catch (e) {
|
|
2207
|
-
console.error("Failed to rename:", e);
|
|
2208
|
-
throw e;
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
async function deleteItem(path) {
|
|
2212
|
-
try {
|
|
2213
|
-
await $fetch("/api/fs/delete", {
|
|
2214
|
-
method: "POST",
|
|
2215
|
-
body: { path }
|
|
2216
|
-
});
|
|
2217
|
-
if (selectedFile.value === path) {
|
|
2218
|
-
selectedFile.value = null;
|
|
2219
|
-
}
|
|
2220
|
-
await loadTree();
|
|
2221
|
-
} catch (e) {
|
|
2222
|
-
console.error("Failed to delete:", e);
|
|
2223
|
-
throw e;
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
async function moveItem(sourcePath, destinationPath) {
|
|
2227
|
-
try {
|
|
2228
|
-
const response = await $fetch("/api/fs/move", {
|
|
2229
|
-
method: "POST",
|
|
2230
|
-
body: { sourcePath, destinationPath }
|
|
2231
|
-
});
|
|
2232
|
-
await loadTree();
|
|
2233
|
-
return response.data.newPath;
|
|
2234
|
-
} catch (e) {
|
|
2235
|
-
console.error("Failed to move:", e);
|
|
2236
|
-
throw e;
|
|
2237
|
-
}
|
|
2238
|
-
}
|
|
2239
|
-
const filteredItems = computed(() => {
|
|
2240
|
-
if (!searchQuery.value) return items.value;
|
|
2241
|
-
const query = searchQuery.value.toLowerCase();
|
|
2242
|
-
function filterTree(items2) {
|
|
2243
|
-
return items2.reduce((acc, item) => {
|
|
2244
|
-
const matches = item.label.toLowerCase().includes(query);
|
|
2245
|
-
const filteredChildren = item.children ? filterTree(item.children) : [];
|
|
2246
|
-
if (matches || filteredChildren.length > 0) {
|
|
2247
|
-
acc.push({
|
|
2248
|
-
...item,
|
|
2249
|
-
children: filteredChildren.length > 0 ? filteredChildren : item.children,
|
|
2250
|
-
defaultExpanded: filteredChildren.length > 0 || matches
|
|
2251
|
-
});
|
|
2252
|
-
}
|
|
2253
|
-
return acc;
|
|
2254
|
-
}, []);
|
|
2255
|
-
}
|
|
2256
|
-
return filterTree(items.value);
|
|
2257
|
-
});
|
|
2258
|
-
return {
|
|
2259
|
-
items,
|
|
2260
|
-
filteredItems,
|
|
2261
|
-
selectedFile,
|
|
2262
|
-
loading,
|
|
2263
|
-
error,
|
|
2264
|
-
searchQuery,
|
|
2265
|
-
loadTree,
|
|
2266
|
-
readFile,
|
|
2267
|
-
writeFile,
|
|
2268
|
-
createFile,
|
|
2269
|
-
createFolder,
|
|
2270
|
-
renameItem,
|
|
2271
|
-
deleteItem,
|
|
2272
|
-
moveItem
|
|
2273
|
-
};
|
|
2274
|
-
}
|
|
2275
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
2276
|
-
__name: "FileTree",
|
|
2277
|
-
__ssrInlineRender: true,
|
|
2278
|
-
emits: ["select"],
|
|
2279
|
-
setup(__props, { emit: __emit }) {
|
|
2280
|
-
const emit = __emit;
|
|
2281
|
-
const {
|
|
2282
|
-
filteredItems,
|
|
2283
|
-
selectedFile,
|
|
2284
|
-
loading,
|
|
2285
|
-
searchQuery,
|
|
2286
|
-
createFile,
|
|
2287
|
-
createFolder,
|
|
2288
|
-
renameItem,
|
|
2289
|
-
deleteItem,
|
|
2290
|
-
moveItem
|
|
2291
|
-
} = useFileTree();
|
|
2292
|
-
const draggedItem = ref(null);
|
|
2293
|
-
const dropTarget = ref(null);
|
|
2294
|
-
function handleDragStart(event, item) {
|
|
2295
|
-
draggedItem.value = item;
|
|
2296
|
-
if (event.dataTransfer) {
|
|
2297
|
-
event.dataTransfer.effectAllowed = "move";
|
|
2298
|
-
event.dataTransfer.setData("text/plain", item.path);
|
|
2299
|
-
}
|
|
2300
|
-
}
|
|
2301
|
-
function handleDragOver(event, item) {
|
|
2302
|
-
if (!draggedItem.value) return;
|
|
2303
|
-
if (item.type !== "directory") return;
|
|
2304
|
-
if (draggedItem.value.path === item.path) return;
|
|
2305
|
-
if (item.path.startsWith(draggedItem.value.path + "/")) return;
|
|
2306
|
-
event.preventDefault();
|
|
2307
|
-
dropTarget.value = item;
|
|
2308
|
-
}
|
|
2309
|
-
function handleDragLeave() {
|
|
2310
|
-
dropTarget.value = null;
|
|
2311
|
-
}
|
|
2312
|
-
function handleDragEnd() {
|
|
2313
|
-
draggedItem.value = null;
|
|
2314
|
-
dropTarget.value = null;
|
|
2315
|
-
}
|
|
2316
|
-
async function handleDrop(event, item) {
|
|
2317
|
-
event.preventDefault();
|
|
2318
|
-
if (!draggedItem.value || item.type !== "directory") return;
|
|
2319
|
-
try {
|
|
2320
|
-
await moveItem(draggedItem.value.path, item.path);
|
|
2321
|
-
} catch {
|
|
2322
|
-
}
|
|
2323
|
-
draggedItem.value = null;
|
|
2324
|
-
dropTarget.value = null;
|
|
2325
|
-
}
|
|
2326
|
-
const contextMenuTarget = ref(null);
|
|
2327
|
-
const showNewFileModal = ref(false);
|
|
2328
|
-
const showNewFolderModal = ref(false);
|
|
2329
|
-
const showRenameModal = ref(false);
|
|
2330
|
-
const showDeleteConfirm = ref(false);
|
|
2331
|
-
const newItemName = ref("");
|
|
2332
|
-
const contextMenuItems = computed(() => [
|
|
2333
|
-
[{
|
|
2334
|
-
label: "New File",
|
|
2335
|
-
icon: "i-lucide-file-plus",
|
|
2336
|
-
onSelect: () => {
|
|
2337
|
-
newItemName.value = "";
|
|
2338
|
-
showNewFileModal.value = true;
|
|
2339
|
-
}
|
|
2340
|
-
}, {
|
|
2341
|
-
label: "New Folder",
|
|
2342
|
-
icon: "i-lucide-folder-plus",
|
|
2343
|
-
onSelect: () => {
|
|
2344
|
-
newItemName.value = "";
|
|
2345
|
-
showNewFolderModal.value = true;
|
|
2346
|
-
}
|
|
2347
|
-
}],
|
|
2348
|
-
[{
|
|
2349
|
-
label: "Rename",
|
|
2350
|
-
icon: "i-lucide-pencil",
|
|
2351
|
-
onSelect: () => {
|
|
2352
|
-
if (contextMenuTarget.value) {
|
|
2353
|
-
newItemName.value = contextMenuTarget.value.label;
|
|
2354
|
-
showRenameModal.value = true;
|
|
2355
|
-
}
|
|
2356
|
-
}
|
|
2357
|
-
}, {
|
|
2358
|
-
label: "Delete",
|
|
2359
|
-
icon: "i-lucide-trash-2",
|
|
2360
|
-
color: "error",
|
|
2361
|
-
onSelect: () => {
|
|
2362
|
-
showDeleteConfirm.value = true;
|
|
2363
|
-
}
|
|
2364
|
-
}]
|
|
2365
|
-
]);
|
|
2366
|
-
function handleSelect(item) {
|
|
2367
|
-
if (item.type === "file") {
|
|
2368
|
-
selectedFile.value = item.path;
|
|
2369
|
-
emit("select", item.path);
|
|
2370
|
-
}
|
|
2371
|
-
}
|
|
2372
|
-
async function handleCreateFile() {
|
|
2373
|
-
if (!newItemName.value.trim()) return;
|
|
2374
|
-
const parentPath = contextMenuTarget.value?.type === "directory" ? contextMenuTarget.value.path : "/";
|
|
2375
|
-
let filename = newItemName.value.trim();
|
|
2376
|
-
if (!filename.includes(".")) {
|
|
2377
|
-
filename += ".md";
|
|
2378
|
-
}
|
|
2379
|
-
try {
|
|
2380
|
-
const path = await createFile(parentPath, filename);
|
|
2381
|
-
selectedFile.value = path;
|
|
2382
|
-
emit("select", path);
|
|
2383
|
-
} catch {
|
|
2384
|
-
}
|
|
2385
|
-
showNewFileModal.value = false;
|
|
2386
|
-
newItemName.value = "";
|
|
2387
|
-
}
|
|
2388
|
-
async function handleCreateFolder() {
|
|
2389
|
-
if (!newItemName.value.trim()) return;
|
|
2390
|
-
const parentPath = contextMenuTarget.value?.type === "directory" ? contextMenuTarget.value.path : "/";
|
|
2391
|
-
try {
|
|
2392
|
-
await createFolder(parentPath, newItemName.value.trim());
|
|
2393
|
-
} catch {
|
|
2394
|
-
}
|
|
2395
|
-
showNewFolderModal.value = false;
|
|
2396
|
-
newItemName.value = "";
|
|
2397
|
-
}
|
|
2398
|
-
async function handleRename() {
|
|
2399
|
-
if (!contextMenuTarget.value || !newItemName.value.trim()) return;
|
|
2400
|
-
try {
|
|
2401
|
-
await renameItem(contextMenuTarget.value.path, newItemName.value.trim());
|
|
2402
|
-
} catch {
|
|
2403
|
-
}
|
|
2404
|
-
showRenameModal.value = false;
|
|
2405
|
-
newItemName.value = "";
|
|
2406
|
-
}
|
|
2407
|
-
async function handleDelete() {
|
|
2408
|
-
if (!contextMenuTarget.value) return;
|
|
2409
|
-
try {
|
|
2410
|
-
await deleteItem(contextMenuTarget.value.path);
|
|
2411
|
-
} catch {
|
|
2412
|
-
}
|
|
2413
|
-
showDeleteConfirm.value = false;
|
|
2414
|
-
}
|
|
2415
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
2416
|
-
const _component_UInput = _sfc_main$b;
|
|
2417
|
-
const _component_USeparator = _sfc_main$c;
|
|
2418
|
-
const _component_UContextMenu = _sfc_main$6;
|
|
2419
|
-
const _component_UIcon = _sfc_main$d;
|
|
2420
|
-
const _component_UTree = _sfc_main$5;
|
|
2421
|
-
const _component_UModal = _sfc_main$e;
|
|
2422
|
-
const _component_UCard = _sfc_main$f;
|
|
2423
|
-
const _component_UButton = _sfc_main$8$1;
|
|
2424
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "h-full flex flex-col" }, _attrs))}><div class="-mt-1 pb-2">`);
|
|
2425
|
-
_push(ssrRenderComponent(_component_UInput, {
|
|
2426
|
-
modelValue: unref(searchQuery),
|
|
2427
|
-
"onUpdate:modelValue": ($event) => isRef(searchQuery) ? searchQuery.value = $event : null,
|
|
2428
|
-
placeholder: "Search files...",
|
|
2429
|
-
icon: "i-lucide-search",
|
|
2430
|
-
size: "sm",
|
|
2431
|
-
class: "w-full"
|
|
2432
|
-
}, null, _parent));
|
|
2433
|
-
_push(`</div>`);
|
|
2434
|
-
_push(ssrRenderComponent(_component_USeparator, { class: "mt-2" }, null, _parent));
|
|
2435
|
-
_push(ssrRenderComponent(_component_UContextMenu, {
|
|
2436
|
-
items: unref(contextMenuItems),
|
|
2437
|
-
class: "flex-1 h-full overflow-auto p-2",
|
|
2438
|
-
onContextmenu: ($event) => contextMenuTarget.value = null
|
|
2439
|
-
}, {
|
|
2440
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2441
|
-
if (_push2) {
|
|
2442
|
-
if (unref(loading)) {
|
|
2443
|
-
_push2(`<div class="flex items-center justify-center py-8"${_scopeId}>`);
|
|
2444
|
-
_push2(ssrRenderComponent(_component_UIcon, {
|
|
2445
|
-
name: "i-lucide-loader-2",
|
|
2446
|
-
class: "size-6 animate-spin text-dimmed"
|
|
2447
|
-
}, null, _parent2, _scopeId));
|
|
2448
|
-
_push2(`</div>`);
|
|
2449
|
-
} else if (unref(filteredItems).length === 0) {
|
|
2450
|
-
_push2(`<div class="h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"${_scopeId}>`);
|
|
2451
|
-
_push2(ssrRenderComponent(_component_UIcon, {
|
|
2452
|
-
name: "i-lucide-folder-open",
|
|
2453
|
-
class: "size-8 mx-auto mb-2 opacity-50"
|
|
2454
|
-
}, null, _parent2, _scopeId));
|
|
2455
|
-
_push2(`<p${_scopeId}>No files found</p><p class="text-xs mt-1"${_scopeId}> Right-click to create a file </p></div>`);
|
|
2456
|
-
} else {
|
|
2457
|
-
_push2(ssrRenderComponent(_component_UTree, {
|
|
2458
|
-
items: unref(filteredItems),
|
|
2459
|
-
"get-key": (item) => item.id,
|
|
2460
|
-
color: "primary",
|
|
2461
|
-
"expanded-icon": "i-lucide-folder-open",
|
|
2462
|
-
"collapsed-icon": "i-lucide-folder",
|
|
2463
|
-
onSelect: (_e, item) => handleSelect(item)
|
|
2464
|
-
}, {
|
|
2465
|
-
item: withCtx(({ item, expanded }, _push3, _parent3, _scopeId2) => {
|
|
2466
|
-
if (_push3) {
|
|
2467
|
-
_push3(`<div class="${ssrRenderClass([{
|
|
2468
|
-
"bg-primary/10 rounded": unref(dropTarget)?.path === item.path
|
|
2469
|
-
}, "flex items-center gap-2 w-full"])}" draggable="true"${_scopeId2}>`);
|
|
2470
|
-
if (item.children?.length) {
|
|
2471
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
2472
|
-
name: expanded ? "i-lucide-folder-open" : "i-lucide-folder",
|
|
2473
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2474
|
-
}, null, _parent3, _scopeId2));
|
|
2475
|
-
} else if (item.icon) {
|
|
2476
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
2477
|
-
name: item.icon,
|
|
2478
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2479
|
-
}, null, _parent3, _scopeId2));
|
|
2480
|
-
} else {
|
|
2481
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
2482
|
-
name: "i-lucide-file",
|
|
2483
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2484
|
-
}, null, _parent3, _scopeId2));
|
|
2485
|
-
}
|
|
2486
|
-
_push3(`<span class="truncate"${_scopeId2}>${ssrInterpolate(item.label)}</span></div>`);
|
|
2487
|
-
} else {
|
|
2488
|
-
return [
|
|
2489
|
-
createVNode("div", {
|
|
2490
|
-
class: ["flex items-center gap-2 w-full", {
|
|
2491
|
-
"bg-primary/10 rounded": unref(dropTarget)?.path === item.path
|
|
2492
|
-
}],
|
|
2493
|
-
draggable: "true",
|
|
2494
|
-
onContextmenu: ($event) => contextMenuTarget.value = item,
|
|
2495
|
-
onDragstart: ($event) => handleDragStart($event, item),
|
|
2496
|
-
onDragover: ($event) => handleDragOver($event, item),
|
|
2497
|
-
onDragleave: handleDragLeave,
|
|
2498
|
-
onDragend: handleDragEnd,
|
|
2499
|
-
onDrop: ($event) => handleDrop($event, item)
|
|
2500
|
-
}, [
|
|
2501
|
-
item.children?.length ? (openBlock(), createBlock(_component_UIcon, {
|
|
2502
|
-
key: 0,
|
|
2503
|
-
name: expanded ? "i-lucide-folder-open" : "i-lucide-folder",
|
|
2504
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2505
|
-
}, null, 8, ["name"])) : item.icon ? (openBlock(), createBlock(_component_UIcon, {
|
|
2506
|
-
key: 1,
|
|
2507
|
-
name: item.icon,
|
|
2508
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2509
|
-
}, null, 8, ["name"])) : (openBlock(), createBlock(_component_UIcon, {
|
|
2510
|
-
key: 2,
|
|
2511
|
-
name: "i-lucide-file",
|
|
2512
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2513
|
-
})),
|
|
2514
|
-
createVNode("span", { class: "truncate" }, toDisplayString(item.label), 1)
|
|
2515
|
-
], 42, ["onContextmenu", "onDragstart", "onDragover", "onDrop"])
|
|
2516
|
-
];
|
|
2517
|
-
}
|
|
2518
|
-
}),
|
|
2519
|
-
_: 1
|
|
2520
|
-
}, _parent2, _scopeId));
|
|
2521
|
-
}
|
|
2522
|
-
} else {
|
|
2523
|
-
return [
|
|
2524
|
-
unref(loading) ? (openBlock(), createBlock("div", {
|
|
2525
|
-
key: 0,
|
|
2526
|
-
class: "flex items-center justify-center py-8"
|
|
2527
|
-
}, [
|
|
2528
|
-
createVNode(_component_UIcon, {
|
|
2529
|
-
name: "i-lucide-loader-2",
|
|
2530
|
-
class: "size-6 animate-spin text-dimmed"
|
|
2531
|
-
})
|
|
2532
|
-
])) : unref(filteredItems).length === 0 ? (openBlock(), createBlock("div", {
|
|
2533
|
-
key: 1,
|
|
2534
|
-
class: "h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"
|
|
2535
|
-
}, [
|
|
2536
|
-
createVNode(_component_UIcon, {
|
|
2537
|
-
name: "i-lucide-folder-open",
|
|
2538
|
-
class: "size-8 mx-auto mb-2 opacity-50"
|
|
2539
|
-
}),
|
|
2540
|
-
createVNode("p", null, "No files found"),
|
|
2541
|
-
createVNode("p", { class: "text-xs mt-1" }, " Right-click to create a file ")
|
|
2542
|
-
])) : (openBlock(), createBlock(_component_UTree, {
|
|
2543
|
-
key: 2,
|
|
2544
|
-
items: unref(filteredItems),
|
|
2545
|
-
"get-key": (item) => item.id,
|
|
2546
|
-
color: "primary",
|
|
2547
|
-
"expanded-icon": "i-lucide-folder-open",
|
|
2548
|
-
"collapsed-icon": "i-lucide-folder",
|
|
2549
|
-
onSelect: (_e, item) => handleSelect(item)
|
|
2550
|
-
}, {
|
|
2551
|
-
item: withCtx(({ item, expanded }) => [
|
|
2552
|
-
createVNode("div", {
|
|
2553
|
-
class: ["flex items-center gap-2 w-full", {
|
|
2554
|
-
"bg-primary/10 rounded": unref(dropTarget)?.path === item.path
|
|
2555
|
-
}],
|
|
2556
|
-
draggable: "true",
|
|
2557
|
-
onContextmenu: ($event) => contextMenuTarget.value = item,
|
|
2558
|
-
onDragstart: ($event) => handleDragStart($event, item),
|
|
2559
|
-
onDragover: ($event) => handleDragOver($event, item),
|
|
2560
|
-
onDragleave: handleDragLeave,
|
|
2561
|
-
onDragend: handleDragEnd,
|
|
2562
|
-
onDrop: ($event) => handleDrop($event, item)
|
|
2563
|
-
}, [
|
|
2564
|
-
item.children?.length ? (openBlock(), createBlock(_component_UIcon, {
|
|
2565
|
-
key: 0,
|
|
2566
|
-
name: expanded ? "i-lucide-folder-open" : "i-lucide-folder",
|
|
2567
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2568
|
-
}, null, 8, ["name"])) : item.icon ? (openBlock(), createBlock(_component_UIcon, {
|
|
2569
|
-
key: 1,
|
|
2570
|
-
name: item.icon,
|
|
2571
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2572
|
-
}, null, 8, ["name"])) : (openBlock(), createBlock(_component_UIcon, {
|
|
2573
|
-
key: 2,
|
|
2574
|
-
name: "i-lucide-file",
|
|
2575
|
-
class: "size-4 shrink-0 text-dimmed"
|
|
2576
|
-
})),
|
|
2577
|
-
createVNode("span", { class: "truncate" }, toDisplayString(item.label), 1)
|
|
2578
|
-
], 42, ["onContextmenu", "onDragstart", "onDragover", "onDrop"])
|
|
2579
|
-
]),
|
|
2580
|
-
_: 1
|
|
2581
|
-
}, 8, ["items", "get-key", "onSelect"]))
|
|
2582
|
-
];
|
|
2583
|
-
}
|
|
2584
|
-
}),
|
|
2585
|
-
_: 1
|
|
2586
|
-
}, _parent));
|
|
2587
|
-
_push(ssrRenderComponent(_component_UModal, {
|
|
2588
|
-
open: unref(showNewFileModal),
|
|
2589
|
-
"onUpdate:open": ($event) => isRef(showNewFileModal) ? showNewFileModal.value = $event : null
|
|
2590
|
-
}, {
|
|
2591
|
-
content: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2592
|
-
if (_push2) {
|
|
2593
|
-
_push2(ssrRenderComponent(_component_UCard, null, {
|
|
2594
|
-
header: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2595
|
-
if (_push3) {
|
|
2596
|
-
_push3(`<div class="flex items-center gap-2"${_scopeId2}>`);
|
|
2597
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
2598
|
-
name: "i-lucide-file-plus",
|
|
2599
|
-
class: "size-5"
|
|
2600
|
-
}, null, _parent3, _scopeId2));
|
|
2601
|
-
_push3(`<span class="font-semibold"${_scopeId2}>New File</span></div>`);
|
|
2602
|
-
} else {
|
|
2603
|
-
return [
|
|
2604
|
-
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
2605
|
-
createVNode(_component_UIcon, {
|
|
2606
|
-
name: "i-lucide-file-plus",
|
|
2607
|
-
class: "size-5"
|
|
2608
|
-
}),
|
|
2609
|
-
createVNode("span", { class: "font-semibold" }, "New File")
|
|
2610
|
-
])
|
|
2611
|
-
];
|
|
2612
|
-
}
|
|
2613
|
-
}),
|
|
2614
|
-
footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2615
|
-
if (_push3) {
|
|
2616
|
-
_push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
|
|
2617
|
-
_push3(ssrRenderComponent(_component_UButton, {
|
|
2618
|
-
color: "neutral",
|
|
2619
|
-
variant: "ghost",
|
|
2620
|
-
onClick: ($event) => showNewFileModal.value = false
|
|
2621
|
-
}, {
|
|
2622
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
2623
|
-
if (_push4) {
|
|
2624
|
-
_push4(` Cancel `);
|
|
2625
|
-
} else {
|
|
2626
|
-
return [
|
|
2627
|
-
createTextVNode(" Cancel ")
|
|
2628
|
-
];
|
|
2629
|
-
}
|
|
2630
|
-
}),
|
|
2631
|
-
_: 1
|
|
2632
|
-
}, _parent3, _scopeId2));
|
|
2633
|
-
_push3(ssrRenderComponent(_component_UButton, { onClick: handleCreateFile }, {
|
|
2634
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
2635
|
-
if (_push4) {
|
|
2636
|
-
_push4(` Create `);
|
|
2637
|
-
} else {
|
|
2638
|
-
return [
|
|
2639
|
-
createTextVNode(" Create ")
|
|
2640
|
-
];
|
|
2641
|
-
}
|
|
2642
|
-
}),
|
|
2643
|
-
_: 1
|
|
2644
|
-
}, _parent3, _scopeId2));
|
|
2645
|
-
_push3(`</div>`);
|
|
2646
|
-
} else {
|
|
2647
|
-
return [
|
|
2648
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
2649
|
-
createVNode(_component_UButton, {
|
|
2650
|
-
color: "neutral",
|
|
2651
|
-
variant: "ghost",
|
|
2652
|
-
onClick: ($event) => showNewFileModal.value = false
|
|
2653
|
-
}, {
|
|
2654
|
-
default: withCtx(() => [
|
|
2655
|
-
createTextVNode(" Cancel ")
|
|
2656
|
-
]),
|
|
2657
|
-
_: 1
|
|
2658
|
-
}, 8, ["onClick"]),
|
|
2659
|
-
createVNode(_component_UButton, { onClick: handleCreateFile }, {
|
|
2660
|
-
default: withCtx(() => [
|
|
2661
|
-
createTextVNode(" Create ")
|
|
2662
|
-
]),
|
|
2663
|
-
_: 1
|
|
2664
|
-
})
|
|
2665
|
-
])
|
|
2666
|
-
];
|
|
2667
|
-
}
|
|
2668
|
-
}),
|
|
2669
|
-
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2670
|
-
if (_push3) {
|
|
2671
|
-
_push3(ssrRenderComponent(_component_UInput, {
|
|
2672
|
-
modelValue: unref(newItemName),
|
|
2673
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2674
|
-
placeholder: "filename.md",
|
|
2675
|
-
autofocus: "",
|
|
2676
|
-
onKeyup: handleCreateFile
|
|
2677
|
-
}, null, _parent3, _scopeId2));
|
|
2678
|
-
} else {
|
|
2679
|
-
return [
|
|
2680
|
-
createVNode(_component_UInput, {
|
|
2681
|
-
modelValue: unref(newItemName),
|
|
2682
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2683
|
-
placeholder: "filename.md",
|
|
2684
|
-
autofocus: "",
|
|
2685
|
-
onKeyup: withKeys(handleCreateFile, ["enter"])
|
|
2686
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2687
|
-
];
|
|
2688
|
-
}
|
|
2689
|
-
}),
|
|
2690
|
-
_: 1
|
|
2691
|
-
}, _parent2, _scopeId));
|
|
2692
|
-
} else {
|
|
2693
|
-
return [
|
|
2694
|
-
createVNode(_component_UCard, null, {
|
|
2695
|
-
header: withCtx(() => [
|
|
2696
|
-
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
2697
|
-
createVNode(_component_UIcon, {
|
|
2698
|
-
name: "i-lucide-file-plus",
|
|
2699
|
-
class: "size-5"
|
|
2700
|
-
}),
|
|
2701
|
-
createVNode("span", { class: "font-semibold" }, "New File")
|
|
2702
|
-
])
|
|
2703
|
-
]),
|
|
2704
|
-
footer: withCtx(() => [
|
|
2705
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
2706
|
-
createVNode(_component_UButton, {
|
|
2707
|
-
color: "neutral",
|
|
2708
|
-
variant: "ghost",
|
|
2709
|
-
onClick: ($event) => showNewFileModal.value = false
|
|
2710
|
-
}, {
|
|
2711
|
-
default: withCtx(() => [
|
|
2712
|
-
createTextVNode(" Cancel ")
|
|
2713
|
-
]),
|
|
2714
|
-
_: 1
|
|
2715
|
-
}, 8, ["onClick"]),
|
|
2716
|
-
createVNode(_component_UButton, { onClick: handleCreateFile }, {
|
|
2717
|
-
default: withCtx(() => [
|
|
2718
|
-
createTextVNode(" Create ")
|
|
2719
|
-
]),
|
|
2720
|
-
_: 1
|
|
2721
|
-
})
|
|
2722
|
-
])
|
|
2723
|
-
]),
|
|
2724
|
-
default: withCtx(() => [
|
|
2725
|
-
createVNode(_component_UInput, {
|
|
2726
|
-
modelValue: unref(newItemName),
|
|
2727
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2728
|
-
placeholder: "filename.md",
|
|
2729
|
-
autofocus: "",
|
|
2730
|
-
onKeyup: withKeys(handleCreateFile, ["enter"])
|
|
2731
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2732
|
-
]),
|
|
2733
|
-
_: 1
|
|
2734
|
-
})
|
|
2735
|
-
];
|
|
2736
|
-
}
|
|
2737
|
-
}),
|
|
2738
|
-
_: 1
|
|
2739
|
-
}, _parent));
|
|
2740
|
-
_push(ssrRenderComponent(_component_UModal, {
|
|
2741
|
-
open: unref(showNewFolderModal),
|
|
2742
|
-
"onUpdate:open": ($event) => isRef(showNewFolderModal) ? showNewFolderModal.value = $event : null
|
|
2743
|
-
}, {
|
|
2744
|
-
content: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2745
|
-
if (_push2) {
|
|
2746
|
-
_push2(ssrRenderComponent(_component_UCard, null, {
|
|
2747
|
-
header: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2748
|
-
if (_push3) {
|
|
2749
|
-
_push3(`<div class="flex items-center gap-2"${_scopeId2}>`);
|
|
2750
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
2751
|
-
name: "i-lucide-folder-plus",
|
|
2752
|
-
class: "size-5"
|
|
2753
|
-
}, null, _parent3, _scopeId2));
|
|
2754
|
-
_push3(`<span class="font-semibold"${_scopeId2}>New Folder</span></div>`);
|
|
2755
|
-
} else {
|
|
2756
|
-
return [
|
|
2757
|
-
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
2758
|
-
createVNode(_component_UIcon, {
|
|
2759
|
-
name: "i-lucide-folder-plus",
|
|
2760
|
-
class: "size-5"
|
|
2761
|
-
}),
|
|
2762
|
-
createVNode("span", { class: "font-semibold" }, "New Folder")
|
|
2763
|
-
])
|
|
2764
|
-
];
|
|
2765
|
-
}
|
|
2766
|
-
}),
|
|
2767
|
-
footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2768
|
-
if (_push3) {
|
|
2769
|
-
_push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
|
|
2770
|
-
_push3(ssrRenderComponent(_component_UButton, {
|
|
2771
|
-
color: "neutral",
|
|
2772
|
-
variant: "ghost",
|
|
2773
|
-
onClick: ($event) => showNewFolderModal.value = false
|
|
2774
|
-
}, {
|
|
2775
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
2776
|
-
if (_push4) {
|
|
2777
|
-
_push4(` Cancel `);
|
|
2778
|
-
} else {
|
|
2779
|
-
return [
|
|
2780
|
-
createTextVNode(" Cancel ")
|
|
2781
|
-
];
|
|
2782
|
-
}
|
|
2783
|
-
}),
|
|
2784
|
-
_: 1
|
|
2785
|
-
}, _parent3, _scopeId2));
|
|
2786
|
-
_push3(ssrRenderComponent(_component_UButton, { onClick: handleCreateFolder }, {
|
|
2787
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
2788
|
-
if (_push4) {
|
|
2789
|
-
_push4(` Create `);
|
|
2790
|
-
} else {
|
|
2791
|
-
return [
|
|
2792
|
-
createTextVNode(" Create ")
|
|
2793
|
-
];
|
|
2794
|
-
}
|
|
2795
|
-
}),
|
|
2796
|
-
_: 1
|
|
2797
|
-
}, _parent3, _scopeId2));
|
|
2798
|
-
_push3(`</div>`);
|
|
2799
|
-
} else {
|
|
2800
|
-
return [
|
|
2801
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
2802
|
-
createVNode(_component_UButton, {
|
|
2803
|
-
color: "neutral",
|
|
2804
|
-
variant: "ghost",
|
|
2805
|
-
onClick: ($event) => showNewFolderModal.value = false
|
|
2806
|
-
}, {
|
|
2807
|
-
default: withCtx(() => [
|
|
2808
|
-
createTextVNode(" Cancel ")
|
|
2809
|
-
]),
|
|
2810
|
-
_: 1
|
|
2811
|
-
}, 8, ["onClick"]),
|
|
2812
|
-
createVNode(_component_UButton, { onClick: handleCreateFolder }, {
|
|
2813
|
-
default: withCtx(() => [
|
|
2814
|
-
createTextVNode(" Create ")
|
|
2815
|
-
]),
|
|
2816
|
-
_: 1
|
|
2817
|
-
})
|
|
2818
|
-
])
|
|
2819
|
-
];
|
|
2820
|
-
}
|
|
2821
|
-
}),
|
|
2822
|
-
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2823
|
-
if (_push3) {
|
|
2824
|
-
_push3(ssrRenderComponent(_component_UInput, {
|
|
2825
|
-
modelValue: unref(newItemName),
|
|
2826
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2827
|
-
placeholder: "folder-name",
|
|
2828
|
-
autofocus: "",
|
|
2829
|
-
onKeyup: handleCreateFolder
|
|
2830
|
-
}, null, _parent3, _scopeId2));
|
|
2831
|
-
} else {
|
|
2832
|
-
return [
|
|
2833
|
-
createVNode(_component_UInput, {
|
|
2834
|
-
modelValue: unref(newItemName),
|
|
2835
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2836
|
-
placeholder: "folder-name",
|
|
2837
|
-
autofocus: "",
|
|
2838
|
-
onKeyup: withKeys(handleCreateFolder, ["enter"])
|
|
2839
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2840
|
-
];
|
|
2841
|
-
}
|
|
2842
|
-
}),
|
|
2843
|
-
_: 1
|
|
2844
|
-
}, _parent2, _scopeId));
|
|
2845
|
-
} else {
|
|
2846
|
-
return [
|
|
2847
|
-
createVNode(_component_UCard, null, {
|
|
2848
|
-
header: withCtx(() => [
|
|
2849
|
-
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
2850
|
-
createVNode(_component_UIcon, {
|
|
2851
|
-
name: "i-lucide-folder-plus",
|
|
2852
|
-
class: "size-5"
|
|
2853
|
-
}),
|
|
2854
|
-
createVNode("span", { class: "font-semibold" }, "New Folder")
|
|
2855
|
-
])
|
|
2856
|
-
]),
|
|
2857
|
-
footer: withCtx(() => [
|
|
2858
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
2859
|
-
createVNode(_component_UButton, {
|
|
2860
|
-
color: "neutral",
|
|
2861
|
-
variant: "ghost",
|
|
2862
|
-
onClick: ($event) => showNewFolderModal.value = false
|
|
2863
|
-
}, {
|
|
2864
|
-
default: withCtx(() => [
|
|
2865
|
-
createTextVNode(" Cancel ")
|
|
2866
|
-
]),
|
|
2867
|
-
_: 1
|
|
2868
|
-
}, 8, ["onClick"]),
|
|
2869
|
-
createVNode(_component_UButton, { onClick: handleCreateFolder }, {
|
|
2870
|
-
default: withCtx(() => [
|
|
2871
|
-
createTextVNode(" Create ")
|
|
2872
|
-
]),
|
|
2873
|
-
_: 1
|
|
2874
|
-
})
|
|
2875
|
-
])
|
|
2876
|
-
]),
|
|
2877
|
-
default: withCtx(() => [
|
|
2878
|
-
createVNode(_component_UInput, {
|
|
2879
|
-
modelValue: unref(newItemName),
|
|
2880
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2881
|
-
placeholder: "folder-name",
|
|
2882
|
-
autofocus: "",
|
|
2883
|
-
onKeyup: withKeys(handleCreateFolder, ["enter"])
|
|
2884
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2885
|
-
]),
|
|
2886
|
-
_: 1
|
|
2887
|
-
})
|
|
2888
|
-
];
|
|
2889
|
-
}
|
|
2890
|
-
}),
|
|
2891
|
-
_: 1
|
|
2892
|
-
}, _parent));
|
|
2893
|
-
_push(ssrRenderComponent(_component_UModal, {
|
|
2894
|
-
open: unref(showRenameModal),
|
|
2895
|
-
"onUpdate:open": ($event) => isRef(showRenameModal) ? showRenameModal.value = $event : null
|
|
2896
|
-
}, {
|
|
2897
|
-
content: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2898
|
-
if (_push2) {
|
|
2899
|
-
_push2(ssrRenderComponent(_component_UCard, null, {
|
|
2900
|
-
header: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2901
|
-
if (_push3) {
|
|
2902
|
-
_push3(`<div class="flex items-center gap-2"${_scopeId2}>`);
|
|
2903
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
2904
|
-
name: "i-lucide-pencil",
|
|
2905
|
-
class: "size-5"
|
|
2906
|
-
}, null, _parent3, _scopeId2));
|
|
2907
|
-
_push3(`<span class="font-semibold"${_scopeId2}>Rename</span></div>`);
|
|
2908
|
-
} else {
|
|
2909
|
-
return [
|
|
2910
|
-
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
2911
|
-
createVNode(_component_UIcon, {
|
|
2912
|
-
name: "i-lucide-pencil",
|
|
2913
|
-
class: "size-5"
|
|
2914
|
-
}),
|
|
2915
|
-
createVNode("span", { class: "font-semibold" }, "Rename")
|
|
2916
|
-
])
|
|
2917
|
-
];
|
|
2918
|
-
}
|
|
2919
|
-
}),
|
|
2920
|
-
footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2921
|
-
if (_push3) {
|
|
2922
|
-
_push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
|
|
2923
|
-
_push3(ssrRenderComponent(_component_UButton, {
|
|
2924
|
-
color: "neutral",
|
|
2925
|
-
variant: "ghost",
|
|
2926
|
-
onClick: ($event) => showRenameModal.value = false
|
|
2927
|
-
}, {
|
|
2928
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
2929
|
-
if (_push4) {
|
|
2930
|
-
_push4(` Cancel `);
|
|
2931
|
-
} else {
|
|
2932
|
-
return [
|
|
2933
|
-
createTextVNode(" Cancel ")
|
|
2934
|
-
];
|
|
2935
|
-
}
|
|
2936
|
-
}),
|
|
2937
|
-
_: 1
|
|
2938
|
-
}, _parent3, _scopeId2));
|
|
2939
|
-
_push3(ssrRenderComponent(_component_UButton, { onClick: handleRename }, {
|
|
2940
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
2941
|
-
if (_push4) {
|
|
2942
|
-
_push4(` Rename `);
|
|
2943
|
-
} else {
|
|
2944
|
-
return [
|
|
2945
|
-
createTextVNode(" Rename ")
|
|
2946
|
-
];
|
|
2947
|
-
}
|
|
2948
|
-
}),
|
|
2949
|
-
_: 1
|
|
2950
|
-
}, _parent3, _scopeId2));
|
|
2951
|
-
_push3(`</div>`);
|
|
2952
|
-
} else {
|
|
2953
|
-
return [
|
|
2954
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
2955
|
-
createVNode(_component_UButton, {
|
|
2956
|
-
color: "neutral",
|
|
2957
|
-
variant: "ghost",
|
|
2958
|
-
onClick: ($event) => showRenameModal.value = false
|
|
2959
|
-
}, {
|
|
2960
|
-
default: withCtx(() => [
|
|
2961
|
-
createTextVNode(" Cancel ")
|
|
2962
|
-
]),
|
|
2963
|
-
_: 1
|
|
2964
|
-
}, 8, ["onClick"]),
|
|
2965
|
-
createVNode(_component_UButton, { onClick: handleRename }, {
|
|
2966
|
-
default: withCtx(() => [
|
|
2967
|
-
createTextVNode(" Rename ")
|
|
2968
|
-
]),
|
|
2969
|
-
_: 1
|
|
2970
|
-
})
|
|
2971
|
-
])
|
|
2972
|
-
];
|
|
2973
|
-
}
|
|
2974
|
-
}),
|
|
2975
|
-
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
2976
|
-
if (_push3) {
|
|
2977
|
-
_push3(ssrRenderComponent(_component_UInput, {
|
|
2978
|
-
modelValue: unref(newItemName),
|
|
2979
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2980
|
-
placeholder: "new-name",
|
|
2981
|
-
autofocus: "",
|
|
2982
|
-
onKeyup: handleRename
|
|
2983
|
-
}, null, _parent3, _scopeId2));
|
|
2984
|
-
} else {
|
|
2985
|
-
return [
|
|
2986
|
-
createVNode(_component_UInput, {
|
|
2987
|
-
modelValue: unref(newItemName),
|
|
2988
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
2989
|
-
placeholder: "new-name",
|
|
2990
|
-
autofocus: "",
|
|
2991
|
-
onKeyup: withKeys(handleRename, ["enter"])
|
|
2992
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2993
|
-
];
|
|
2994
|
-
}
|
|
2995
|
-
}),
|
|
2996
|
-
_: 1
|
|
2997
|
-
}, _parent2, _scopeId));
|
|
2998
|
-
} else {
|
|
2999
|
-
return [
|
|
3000
|
-
createVNode(_component_UCard, null, {
|
|
3001
|
-
header: withCtx(() => [
|
|
3002
|
-
createVNode("div", { class: "flex items-center gap-2" }, [
|
|
3003
|
-
createVNode(_component_UIcon, {
|
|
3004
|
-
name: "i-lucide-pencil",
|
|
3005
|
-
class: "size-5"
|
|
3006
|
-
}),
|
|
3007
|
-
createVNode("span", { class: "font-semibold" }, "Rename")
|
|
3008
|
-
])
|
|
3009
|
-
]),
|
|
3010
|
-
footer: withCtx(() => [
|
|
3011
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
3012
|
-
createVNode(_component_UButton, {
|
|
3013
|
-
color: "neutral",
|
|
3014
|
-
variant: "ghost",
|
|
3015
|
-
onClick: ($event) => showRenameModal.value = false
|
|
3016
|
-
}, {
|
|
3017
|
-
default: withCtx(() => [
|
|
3018
|
-
createTextVNode(" Cancel ")
|
|
3019
|
-
]),
|
|
3020
|
-
_: 1
|
|
3021
|
-
}, 8, ["onClick"]),
|
|
3022
|
-
createVNode(_component_UButton, { onClick: handleRename }, {
|
|
3023
|
-
default: withCtx(() => [
|
|
3024
|
-
createTextVNode(" Rename ")
|
|
3025
|
-
]),
|
|
3026
|
-
_: 1
|
|
3027
|
-
})
|
|
3028
|
-
])
|
|
3029
|
-
]),
|
|
3030
|
-
default: withCtx(() => [
|
|
3031
|
-
createVNode(_component_UInput, {
|
|
3032
|
-
modelValue: unref(newItemName),
|
|
3033
|
-
"onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
|
|
3034
|
-
placeholder: "new-name",
|
|
3035
|
-
autofocus: "",
|
|
3036
|
-
onKeyup: withKeys(handleRename, ["enter"])
|
|
3037
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3038
|
-
]),
|
|
3039
|
-
_: 1
|
|
3040
|
-
})
|
|
3041
|
-
];
|
|
3042
|
-
}
|
|
3043
|
-
}),
|
|
3044
|
-
_: 1
|
|
3045
|
-
}, _parent));
|
|
3046
|
-
_push(ssrRenderComponent(_component_UModal, {
|
|
3047
|
-
open: unref(showDeleteConfirm),
|
|
3048
|
-
"onUpdate:open": ($event) => isRef(showDeleteConfirm) ? showDeleteConfirm.value = $event : null
|
|
3049
|
-
}, {
|
|
3050
|
-
content: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
3051
|
-
if (_push2) {
|
|
3052
|
-
_push2(ssrRenderComponent(_component_UCard, null, {
|
|
3053
|
-
header: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
3054
|
-
if (_push3) {
|
|
3055
|
-
_push3(`<div class="flex items-center gap-2 text-error"${_scopeId2}>`);
|
|
3056
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
3057
|
-
name: "i-lucide-trash-2",
|
|
3058
|
-
class: "size-5"
|
|
3059
|
-
}, null, _parent3, _scopeId2));
|
|
3060
|
-
_push3(`<span class="font-semibold"${_scopeId2}>Delete</span></div>`);
|
|
3061
|
-
} else {
|
|
3062
|
-
return [
|
|
3063
|
-
createVNode("div", { class: "flex items-center gap-2 text-error" }, [
|
|
3064
|
-
createVNode(_component_UIcon, {
|
|
3065
|
-
name: "i-lucide-trash-2",
|
|
3066
|
-
class: "size-5"
|
|
3067
|
-
}),
|
|
3068
|
-
createVNode("span", { class: "font-semibold" }, "Delete")
|
|
3069
|
-
])
|
|
3070
|
-
];
|
|
3071
|
-
}
|
|
3072
|
-
}),
|
|
3073
|
-
footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
3074
|
-
if (_push3) {
|
|
3075
|
-
_push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
|
|
3076
|
-
_push3(ssrRenderComponent(_component_UButton, {
|
|
3077
|
-
color: "neutral",
|
|
3078
|
-
variant: "ghost",
|
|
3079
|
-
onClick: ($event) => showDeleteConfirm.value = false
|
|
3080
|
-
}, {
|
|
3081
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
3082
|
-
if (_push4) {
|
|
3083
|
-
_push4(` Cancel `);
|
|
3084
|
-
} else {
|
|
3085
|
-
return [
|
|
3086
|
-
createTextVNode(" Cancel ")
|
|
3087
|
-
];
|
|
3088
|
-
}
|
|
3089
|
-
}),
|
|
3090
|
-
_: 1
|
|
3091
|
-
}, _parent3, _scopeId2));
|
|
3092
|
-
_push3(ssrRenderComponent(_component_UButton, {
|
|
3093
|
-
color: "error",
|
|
3094
|
-
onClick: handleDelete
|
|
3095
|
-
}, {
|
|
3096
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
3097
|
-
if (_push4) {
|
|
3098
|
-
_push4(` Delete `);
|
|
3099
|
-
} else {
|
|
3100
|
-
return [
|
|
3101
|
-
createTextVNode(" Delete ")
|
|
3102
|
-
];
|
|
3103
|
-
}
|
|
3104
|
-
}),
|
|
3105
|
-
_: 1
|
|
3106
|
-
}, _parent3, _scopeId2));
|
|
3107
|
-
_push3(`</div>`);
|
|
3108
|
-
} else {
|
|
3109
|
-
return [
|
|
3110
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
3111
|
-
createVNode(_component_UButton, {
|
|
3112
|
-
color: "neutral",
|
|
3113
|
-
variant: "ghost",
|
|
3114
|
-
onClick: ($event) => showDeleteConfirm.value = false
|
|
3115
|
-
}, {
|
|
3116
|
-
default: withCtx(() => [
|
|
3117
|
-
createTextVNode(" Cancel ")
|
|
3118
|
-
]),
|
|
3119
|
-
_: 1
|
|
3120
|
-
}, 8, ["onClick"]),
|
|
3121
|
-
createVNode(_component_UButton, {
|
|
3122
|
-
color: "error",
|
|
3123
|
-
onClick: handleDelete
|
|
3124
|
-
}, {
|
|
3125
|
-
default: withCtx(() => [
|
|
3126
|
-
createTextVNode(" Delete ")
|
|
3127
|
-
]),
|
|
3128
|
-
_: 1
|
|
3129
|
-
})
|
|
3130
|
-
])
|
|
3131
|
-
];
|
|
3132
|
-
}
|
|
3133
|
-
}),
|
|
3134
|
-
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
3135
|
-
if (_push3) {
|
|
3136
|
-
_push3(`<p${_scopeId2}> Are you sure you want to delete <strong${_scopeId2}>${ssrInterpolate(unref(contextMenuTarget)?.label)}</strong>? </p>`);
|
|
3137
|
-
if (unref(contextMenuTarget)?.type === "directory") {
|
|
3138
|
-
_push3(`<p class="text-sm text-dimmed mt-1"${_scopeId2}> This will delete all files and folders inside. </p>`);
|
|
3139
|
-
} else {
|
|
3140
|
-
_push3(`<!---->`);
|
|
3141
|
-
}
|
|
3142
|
-
} else {
|
|
3143
|
-
return [
|
|
3144
|
-
createVNode("p", null, [
|
|
3145
|
-
createTextVNode(" Are you sure you want to delete "),
|
|
3146
|
-
createVNode("strong", null, toDisplayString(unref(contextMenuTarget)?.label), 1),
|
|
3147
|
-
createTextVNode("? ")
|
|
3148
|
-
]),
|
|
3149
|
-
unref(contextMenuTarget)?.type === "directory" ? (openBlock(), createBlock("p", {
|
|
3150
|
-
key: 0,
|
|
3151
|
-
class: "text-sm text-dimmed mt-1"
|
|
3152
|
-
}, " This will delete all files and folders inside. ")) : createCommentVNode("", true)
|
|
3153
|
-
];
|
|
3154
|
-
}
|
|
3155
|
-
}),
|
|
3156
|
-
_: 1
|
|
3157
|
-
}, _parent2, _scopeId));
|
|
3158
|
-
} else {
|
|
3159
|
-
return [
|
|
3160
|
-
createVNode(_component_UCard, null, {
|
|
3161
|
-
header: withCtx(() => [
|
|
3162
|
-
createVNode("div", { class: "flex items-center gap-2 text-error" }, [
|
|
3163
|
-
createVNode(_component_UIcon, {
|
|
3164
|
-
name: "i-lucide-trash-2",
|
|
3165
|
-
class: "size-5"
|
|
3166
|
-
}),
|
|
3167
|
-
createVNode("span", { class: "font-semibold" }, "Delete")
|
|
3168
|
-
])
|
|
3169
|
-
]),
|
|
3170
|
-
footer: withCtx(() => [
|
|
3171
|
-
createVNode("div", { class: "flex justify-end gap-2" }, [
|
|
3172
|
-
createVNode(_component_UButton, {
|
|
3173
|
-
color: "neutral",
|
|
3174
|
-
variant: "ghost",
|
|
3175
|
-
onClick: ($event) => showDeleteConfirm.value = false
|
|
3176
|
-
}, {
|
|
3177
|
-
default: withCtx(() => [
|
|
3178
|
-
createTextVNode(" Cancel ")
|
|
3179
|
-
]),
|
|
3180
|
-
_: 1
|
|
3181
|
-
}, 8, ["onClick"]),
|
|
3182
|
-
createVNode(_component_UButton, {
|
|
3183
|
-
color: "error",
|
|
3184
|
-
onClick: handleDelete
|
|
3185
|
-
}, {
|
|
3186
|
-
default: withCtx(() => [
|
|
3187
|
-
createTextVNode(" Delete ")
|
|
3188
|
-
]),
|
|
3189
|
-
_: 1
|
|
3190
|
-
})
|
|
3191
|
-
])
|
|
3192
|
-
]),
|
|
3193
|
-
default: withCtx(() => [
|
|
3194
|
-
createVNode("p", null, [
|
|
3195
|
-
createTextVNode(" Are you sure you want to delete "),
|
|
3196
|
-
createVNode("strong", null, toDisplayString(unref(contextMenuTarget)?.label), 1),
|
|
3197
|
-
createTextVNode("? ")
|
|
3198
|
-
]),
|
|
3199
|
-
unref(contextMenuTarget)?.type === "directory" ? (openBlock(), createBlock("p", {
|
|
3200
|
-
key: 0,
|
|
3201
|
-
class: "text-sm text-dimmed mt-1"
|
|
3202
|
-
}, " This will delete all files and folders inside. ")) : createCommentVNode("", true)
|
|
3203
|
-
]),
|
|
3204
|
-
_: 1
|
|
3205
|
-
})
|
|
3206
|
-
];
|
|
3207
|
-
}
|
|
3208
|
-
}),
|
|
3209
|
-
_: 1
|
|
3210
|
-
}, _parent));
|
|
3211
|
-
_push(`</div>`);
|
|
3212
|
-
};
|
|
3213
|
-
}
|
|
3214
|
-
});
|
|
3215
|
-
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
3216
|
-
_sfc_main$4.setup = (props, ctx) => {
|
|
3217
|
-
const ssrContext = useSSRContext();
|
|
3218
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/files/FileTree.vue");
|
|
3219
|
-
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
3220
|
-
};
|
|
3221
|
-
const __nuxt_component_1 = Object.assign(_sfc_main$4, { __name: "FilesFileTree" });
|
|
3222
|
-
const theme = {
|
|
3223
|
-
"base": "hidden lg:flex",
|
|
3224
|
-
"variants": {
|
|
3225
|
-
"side": {
|
|
3226
|
-
"left": "",
|
|
3227
|
-
"right": ""
|
|
3228
|
-
}
|
|
3229
|
-
}
|
|
3230
|
-
};
|
|
3231
|
-
const _sfc_main$3 = {
|
|
3232
|
-
__name: "UDashboardSidebarCollapse",
|
|
3233
|
-
__ssrInlineRender: true,
|
|
3234
|
-
props: {
|
|
3235
|
-
color: { type: null, required: false, default: "neutral" },
|
|
3236
|
-
variant: { type: null, required: false, default: "ghost" },
|
|
3237
|
-
side: { type: String, required: false, default: "left" },
|
|
3238
|
-
label: { type: String, required: false },
|
|
3239
|
-
activeColor: { type: null, required: false },
|
|
3240
|
-
activeVariant: { type: null, required: false },
|
|
3241
|
-
size: { type: null, required: false },
|
|
3242
|
-
square: { type: Boolean, required: false },
|
|
3243
|
-
block: { type: Boolean, required: false },
|
|
3244
|
-
loadingAuto: { type: Boolean, required: false },
|
|
3245
|
-
onClick: { type: [Function, Array], required: false },
|
|
3246
|
-
class: { type: null, required: false },
|
|
3247
|
-
ui: { type: null, required: false },
|
|
3248
|
-
icon: { type: null, required: false },
|
|
3249
|
-
avatar: { type: Object, required: false },
|
|
3250
|
-
leading: { type: Boolean, required: false },
|
|
3251
|
-
leadingIcon: { type: null, required: false },
|
|
3252
|
-
trailing: { type: Boolean, required: false },
|
|
3253
|
-
trailingIcon: { type: null, required: false },
|
|
3254
|
-
loading: { type: Boolean, required: false },
|
|
3255
|
-
loadingIcon: { type: null, required: false },
|
|
3256
|
-
as: { type: null, required: false },
|
|
3257
|
-
type: { type: null, required: false },
|
|
3258
|
-
disabled: { type: Boolean, required: false },
|
|
3259
|
-
exactActiveClass: { type: String, required: false },
|
|
3260
|
-
viewTransition: { type: Boolean, required: false }
|
|
3261
|
-
},
|
|
3262
|
-
setup(__props) {
|
|
3263
|
-
const props = __props;
|
|
3264
|
-
const buttonProps = useForwardProps(reactiveOmit(props, "icon", "side", "class"));
|
|
3265
|
-
const { t } = useLocale();
|
|
3266
|
-
const appConfig = useAppConfig();
|
|
3267
|
-
const { sidebarCollapsed, collapseSidebar } = useDashboard({ sidebarCollapsed: ref(false), collapseSidebar: () => {
|
|
3268
|
-
} });
|
|
3269
|
-
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSidebarCollapse || {} }));
|
|
3270
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
3271
|
-
_push(ssrRenderComponent(_sfc_main$8$1, mergeProps({
|
|
3272
|
-
...unref(buttonProps),
|
|
3273
|
-
"icon": props.icon || (unref(sidebarCollapsed) ? unref(appConfig).ui.icons.panelOpen : unref(appConfig).ui.icons.panelClose),
|
|
3274
|
-
"aria-label": unref(sidebarCollapsed) ? unref(t)("dashboardSidebarCollapse.expand") : unref(t)("dashboardSidebarCollapse.collapse"),
|
|
3275
|
-
..._ctx.$attrs
|
|
3276
|
-
}, {
|
|
3277
|
-
class: ui.value({ class: props.class, side: props.side }),
|
|
3278
|
-
onClick: ($event) => unref(collapseSidebar)?.(!unref(sidebarCollapsed))
|
|
3279
|
-
}, _attrs), null, _parent));
|
|
3280
|
-
};
|
|
3281
|
-
}
|
|
3282
|
-
};
|
|
3283
|
-
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
3284
|
-
_sfc_main$3.setup = (props, ctx) => {
|
|
3285
|
-
const ssrContext = useSSRContext();
|
|
3286
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/@nuxt+ui@4.3.0_2329ed002e1dfb3a5ad728629f2842a0/node_modules/@nuxt/ui/dist/runtime/components/DashboardSidebarCollapse.vue");
|
|
3287
|
-
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
3288
|
-
};
|
|
3289
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3290
|
-
__name: "DocumentMetadata",
|
|
3291
|
-
__ssrInlineRender: true,
|
|
3292
|
-
props: {
|
|
3293
|
-
metadata: {},
|
|
3294
|
-
projects: {}
|
|
3295
|
-
},
|
|
3296
|
-
emits: ["update:metadata"],
|
|
3297
|
-
setup(__props, { emit: __emit }) {
|
|
3298
|
-
const props = __props;
|
|
3299
|
-
const emit = __emit;
|
|
3300
|
-
const visibilityOptions = [
|
|
3301
|
-
{
|
|
3302
|
-
label: "Hidden",
|
|
3303
|
-
value: "hidden",
|
|
3304
|
-
icon: "i-lucide-lock",
|
|
3305
|
-
description: "Hidden behind authentication and never viewable by the public"
|
|
3306
|
-
},
|
|
3307
|
-
{
|
|
3308
|
-
label: "Private",
|
|
3309
|
-
value: "private",
|
|
3310
|
-
icon: "i-lucide-eye-off",
|
|
3311
|
-
description: "Viewable by anyone with the link, but will not be indexed by search engines"
|
|
3312
|
-
},
|
|
3313
|
-
{
|
|
3314
|
-
label: "Public",
|
|
3315
|
-
value: "public",
|
|
3316
|
-
icon: "i-lucide-eye",
|
|
3317
|
-
description: "Viewable to the public and indexed by search engines"
|
|
3318
|
-
}
|
|
3319
|
-
];
|
|
3320
|
-
const visibility = computed(() => {
|
|
3321
|
-
if (!props.metadata.shared) return "hidden";
|
|
3322
|
-
return props.metadata.shareType || "private";
|
|
3323
|
-
});
|
|
3324
|
-
const selectedVisibility = computed(
|
|
3325
|
-
() => visibilityOptions.find((o) => o.value === visibility.value)
|
|
3326
|
-
);
|
|
3327
|
-
const localTags = computed({
|
|
3328
|
-
get: () => props.metadata.tags || [],
|
|
3329
|
-
set: (value) => emit("update:metadata", { tags: value })
|
|
3330
|
-
});
|
|
3331
|
-
function handleProjectChange(projectId) {
|
|
3332
|
-
emit("update:metadata", { projectId: projectId || void 0 });
|
|
3333
|
-
}
|
|
3334
|
-
function handleVisibilityChange(value) {
|
|
3335
|
-
if (value === "hidden") {
|
|
3336
|
-
emit("update:metadata", { shared: false, shareType: void 0 });
|
|
3337
|
-
} else {
|
|
3338
|
-
emit("update:metadata", { shared: true, shareType: value });
|
|
3339
|
-
}
|
|
3340
|
-
}
|
|
3341
|
-
const projectOptions = computed(() => [
|
|
3342
|
-
{ label: "None", value: void 0 },
|
|
3343
|
-
...props.projects.map((p) => ({ label: p.name, value: p.id }))
|
|
3344
|
-
]);
|
|
3345
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
3346
|
-
const _component_UFormField = _sfc_main$j;
|
|
3347
|
-
const _component_USelectMenu = _sfc_main$k;
|
|
3348
|
-
const _component_UIcon = _sfc_main$d;
|
|
3349
|
-
const _component_UInputTags = _sfc_main$l;
|
|
3350
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "border-b border-default px-4 py-3 bg-elevated/50" }, _attrs))}><div class="flex flex-wrap items-start gap-3">`);
|
|
3351
|
-
_push(ssrRenderComponent(_component_UFormField, {
|
|
3352
|
-
label: "Project",
|
|
3353
|
-
class: "w-40"
|
|
3354
|
-
}, {
|
|
3355
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
3356
|
-
if (_push2) {
|
|
3357
|
-
_push2(ssrRenderComponent(_component_USelectMenu, {
|
|
3358
|
-
"model-value": __props.metadata.projectId,
|
|
3359
|
-
items: unref(projectOptions),
|
|
3360
|
-
"value-key": "value",
|
|
3361
|
-
placeholder: "None",
|
|
3362
|
-
class: "w-full",
|
|
3363
|
-
"search-input": false,
|
|
3364
|
-
"onUpdate:modelValue": handleProjectChange
|
|
3365
|
-
}, null, _parent2, _scopeId));
|
|
3366
|
-
} else {
|
|
3367
|
-
return [
|
|
3368
|
-
createVNode(_component_USelectMenu, {
|
|
3369
|
-
"model-value": __props.metadata.projectId,
|
|
3370
|
-
items: unref(projectOptions),
|
|
3371
|
-
"value-key": "value",
|
|
3372
|
-
placeholder: "None",
|
|
3373
|
-
class: "w-full",
|
|
3374
|
-
"search-input": false,
|
|
3375
|
-
"onUpdate:modelValue": handleProjectChange
|
|
3376
|
-
}, null, 8, ["model-value", "items"])
|
|
3377
|
-
];
|
|
3378
|
-
}
|
|
3379
|
-
}),
|
|
3380
|
-
_: 1
|
|
3381
|
-
}, _parent));
|
|
3382
|
-
_push(ssrRenderComponent(_component_UFormField, {
|
|
3383
|
-
label: "Visibility",
|
|
3384
|
-
class: "w-44"
|
|
3385
|
-
}, {
|
|
3386
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
3387
|
-
if (_push2) {
|
|
3388
|
-
_push2(ssrRenderComponent(_component_USelectMenu, {
|
|
3389
|
-
"model-value": unref(visibility),
|
|
3390
|
-
items: visibilityOptions,
|
|
3391
|
-
"value-key": "value",
|
|
3392
|
-
class: "w-full",
|
|
3393
|
-
"search-input": false,
|
|
3394
|
-
"onUpdate:modelValue": handleVisibilityChange
|
|
3395
|
-
}, {
|
|
3396
|
-
leading: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
3397
|
-
if (_push3) {
|
|
3398
|
-
if (unref(selectedVisibility)) {
|
|
3399
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
3400
|
-
name: unref(selectedVisibility).icon,
|
|
3401
|
-
class: "size-4 text-dimmed"
|
|
3402
|
-
}, null, _parent3, _scopeId2));
|
|
3403
|
-
} else {
|
|
3404
|
-
_push3(`<!---->`);
|
|
3405
|
-
}
|
|
3406
|
-
} else {
|
|
3407
|
-
return [
|
|
3408
|
-
unref(selectedVisibility) ? (openBlock(), createBlock(_component_UIcon, {
|
|
3409
|
-
key: 0,
|
|
3410
|
-
name: unref(selectedVisibility).icon,
|
|
3411
|
-
class: "size-4 text-dimmed"
|
|
3412
|
-
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
3413
|
-
];
|
|
3414
|
-
}
|
|
3415
|
-
}),
|
|
3416
|
-
item: withCtx(({ item }, _push3, _parent3, _scopeId2) => {
|
|
3417
|
-
if (_push3) {
|
|
3418
|
-
_push3(`<div class="flex items-start gap-2 py-0.5"${_scopeId2}>`);
|
|
3419
|
-
_push3(ssrRenderComponent(_component_UIcon, {
|
|
3420
|
-
name: item.icon,
|
|
3421
|
-
class: "size-4 mt-0.5 shrink-0"
|
|
3422
|
-
}, null, _parent3, _scopeId2));
|
|
3423
|
-
_push3(`<div class="min-w-0"${_scopeId2}><div class="font-medium"${_scopeId2}>${ssrInterpolate(item.label)}</div><div class="text-xs text-dimmed truncate"${_scopeId2}>${ssrInterpolate(item.description)}</div></div></div>`);
|
|
3424
|
-
} else {
|
|
3425
|
-
return [
|
|
3426
|
-
createVNode("div", { class: "flex items-start gap-2 py-0.5" }, [
|
|
3427
|
-
createVNode(_component_UIcon, {
|
|
3428
|
-
name: item.icon,
|
|
3429
|
-
class: "size-4 mt-0.5 shrink-0"
|
|
3430
|
-
}, null, 8, ["name"]),
|
|
3431
|
-
createVNode("div", { class: "min-w-0" }, [
|
|
3432
|
-
createVNode("div", { class: "font-medium" }, toDisplayString(item.label), 1),
|
|
3433
|
-
createVNode("div", { class: "text-xs text-dimmed truncate" }, toDisplayString(item.description), 1)
|
|
3434
|
-
])
|
|
3435
|
-
])
|
|
3436
|
-
];
|
|
3437
|
-
}
|
|
3438
|
-
}),
|
|
3439
|
-
_: 1
|
|
3440
|
-
}, _parent2, _scopeId));
|
|
3441
|
-
} else {
|
|
3442
|
-
return [
|
|
3443
|
-
createVNode(_component_USelectMenu, {
|
|
3444
|
-
"model-value": unref(visibility),
|
|
3445
|
-
items: visibilityOptions,
|
|
3446
|
-
"value-key": "value",
|
|
3447
|
-
class: "w-full",
|
|
3448
|
-
"search-input": false,
|
|
3449
|
-
"onUpdate:modelValue": handleVisibilityChange
|
|
3450
|
-
}, {
|
|
3451
|
-
leading: withCtx(() => [
|
|
3452
|
-
unref(selectedVisibility) ? (openBlock(), createBlock(_component_UIcon, {
|
|
3453
|
-
key: 0,
|
|
3454
|
-
name: unref(selectedVisibility).icon,
|
|
3455
|
-
class: "size-4 text-dimmed"
|
|
3456
|
-
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
3457
|
-
]),
|
|
3458
|
-
item: withCtx(({ item }) => [
|
|
3459
|
-
createVNode("div", { class: "flex items-start gap-2 py-0.5" }, [
|
|
3460
|
-
createVNode(_component_UIcon, {
|
|
3461
|
-
name: item.icon,
|
|
3462
|
-
class: "size-4 mt-0.5 shrink-0"
|
|
3463
|
-
}, null, 8, ["name"]),
|
|
3464
|
-
createVNode("div", { class: "min-w-0" }, [
|
|
3465
|
-
createVNode("div", { class: "font-medium" }, toDisplayString(item.label), 1),
|
|
3466
|
-
createVNode("div", { class: "text-xs text-dimmed truncate" }, toDisplayString(item.description), 1)
|
|
3467
|
-
])
|
|
3468
|
-
])
|
|
3469
|
-
]),
|
|
3470
|
-
_: 1
|
|
3471
|
-
}, 8, ["model-value"])
|
|
3472
|
-
];
|
|
3473
|
-
}
|
|
3474
|
-
}),
|
|
3475
|
-
_: 1
|
|
3476
|
-
}, _parent));
|
|
3477
|
-
_push(ssrRenderComponent(_component_UFormField, {
|
|
3478
|
-
label: "Tags",
|
|
3479
|
-
class: "flex-1 min-w-48"
|
|
3480
|
-
}, {
|
|
3481
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
3482
|
-
if (_push2) {
|
|
3483
|
-
_push2(ssrRenderComponent(_component_UInputTags, {
|
|
3484
|
-
modelValue: unref(localTags),
|
|
3485
|
-
"onUpdate:modelValue": ($event) => isRef(localTags) ? localTags.value = $event : null,
|
|
3486
|
-
placeholder: "Add tags...",
|
|
3487
|
-
class: "w-full"
|
|
3488
|
-
}, null, _parent2, _scopeId));
|
|
3489
|
-
} else {
|
|
3490
|
-
return [
|
|
3491
|
-
createVNode(_component_UInputTags, {
|
|
3492
|
-
modelValue: unref(localTags),
|
|
3493
|
-
"onUpdate:modelValue": ($event) => isRef(localTags) ? localTags.value = $event : null,
|
|
3494
|
-
placeholder: "Add tags...",
|
|
3495
|
-
class: "w-full"
|
|
3496
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
3497
|
-
];
|
|
3498
|
-
}
|
|
3499
|
-
}),
|
|
3500
|
-
_: 1
|
|
3501
|
-
}, _parent));
|
|
3502
|
-
_push(`</div></div>`);
|
|
3503
|
-
};
|
|
3504
|
-
}
|
|
3505
|
-
});
|
|
3506
|
-
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
3507
|
-
_sfc_main$2.setup = (props, ctx) => {
|
|
3508
|
-
const ssrContext = useSSRContext();
|
|
3509
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/editor/DocumentMetadata.vue");
|
|
3510
|
-
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
3511
|
-
};
|
|
3512
|
-
const __nuxt_component_3 = Object.assign(_sfc_main$2, { __name: "EditorDocumentMetadata" });
|
|
3513
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3514
|
-
__name: "DocumentEditor",
|
|
3515
|
-
__ssrInlineRender: true,
|
|
3516
|
-
props: {
|
|
3517
|
-
document: {},
|
|
3518
|
-
body: {},
|
|
3519
|
-
metadata: {},
|
|
3520
|
-
filePath: {},
|
|
3521
|
-
saveStatus: {},
|
|
3522
|
-
isDirty: { type: Boolean },
|
|
3523
|
-
metadataDirty: { type: Boolean }
|
|
3524
|
-
},
|
|
3525
|
-
emits: ["update:body", "update:metadata", "save"],
|
|
3526
|
-
async setup(__props, { emit: __emit }) {
|
|
3527
|
-
let __temp, __restore;
|
|
3528
|
-
const props = __props;
|
|
3529
|
-
const emit = __emit;
|
|
3530
|
-
const { data: projectsData } = ([__temp, __restore] = withAsyncContext(() => useFetch("/api/projects", "$c96-63t_ij")), __temp = await __temp, __restore(), __temp);
|
|
3531
|
-
const projects = computed(() => projectsData.value?.data || []);
|
|
3532
|
-
const showMetadata = ref(true);
|
|
3533
|
-
const { editorMode } = usePreferences();
|
|
3534
|
-
const isEditorMode = computed({
|
|
3535
|
-
get: () => editorMode.value === "editor",
|
|
3536
|
-
set: (v) => editorMode.value = v ? "editor" : "code"
|
|
3537
|
-
});
|
|
3538
|
-
const isMarkdown = computed(
|
|
3539
|
-
() => props.document.fileType === "markdown" || isMarkdownFile(props.filePath)
|
|
3540
|
-
);
|
|
3541
|
-
computed(() => detectLanguage(props.filePath));
|
|
3542
|
-
const showModeToggle = computed(() => isMarkdown.value);
|
|
3543
|
-
const toolbarItems = [
|
|
3544
|
-
[
|
|
3545
|
-
{ kind: "heading", level: 1, icon: "i-lucide-heading-1" },
|
|
3546
|
-
{ kind: "heading", level: 2, icon: "i-lucide-heading-2" },
|
|
3547
|
-
{ kind: "heading", level: 3, icon: "i-lucide-heading-3" }
|
|
3548
|
-
],
|
|
3549
|
-
[
|
|
3550
|
-
{ kind: "mark", mark: "bold", icon: "i-lucide-bold" },
|
|
3551
|
-
{ kind: "mark", mark: "italic", icon: "i-lucide-italic" },
|
|
3552
|
-
{ kind: "mark", mark: "code", icon: "i-lucide-code" }
|
|
3553
|
-
],
|
|
3554
|
-
[
|
|
3555
|
-
{ kind: "bulletList", icon: "i-lucide-list" },
|
|
3556
|
-
{ kind: "orderedList", icon: "i-lucide-list-ordered" },
|
|
3557
|
-
{ kind: "blockquote", icon: "i-lucide-quote" }
|
|
3558
|
-
],
|
|
3559
|
-
[
|
|
3560
|
-
{ kind: "link", icon: "i-lucide-link" },
|
|
3561
|
-
{ kind: "codeBlock", icon: "i-lucide-file-code" },
|
|
3562
|
-
{ kind: "horizontalRule", icon: "i-lucide-minus" }
|
|
3563
|
-
],
|
|
3564
|
-
[
|
|
3565
|
-
{ kind: "undo", icon: "i-lucide-undo" },
|
|
3566
|
-
{ kind: "redo", icon: "i-lucide-redo" }
|
|
3567
|
-
]
|
|
3568
|
-
];
|
|
3569
|
-
const saveStatusIcon = computed(() => {
|
|
3570
|
-
switch (props.saveStatus) {
|
|
3571
|
-
case "saving":
|
|
3572
|
-
return "i-lucide-loader-2";
|
|
3573
|
-
case "saved":
|
|
3574
|
-
return "i-lucide-check";
|
|
3575
|
-
case "error":
|
|
3576
|
-
return "i-lucide-alert-circle";
|
|
3577
|
-
default:
|
|
3578
|
-
return props.isDirty || props.metadataDirty ? "i-lucide-circle-dot" : null;
|
|
3579
|
-
}
|
|
3580
|
-
});
|
|
3581
|
-
const saveStatusText = computed(() => {
|
|
3582
|
-
switch (props.saveStatus) {
|
|
3583
|
-
case "saving":
|
|
3584
|
-
return "Saving...";
|
|
3585
|
-
case "saved":
|
|
3586
|
-
return "Saved";
|
|
3587
|
-
case "error":
|
|
3588
|
-
return "Error saving";
|
|
3589
|
-
default:
|
|
3590
|
-
return props.isDirty || props.metadataDirty ? "Unsaved changes" : "";
|
|
3591
|
-
}
|
|
3592
|
-
});
|
|
3593
|
-
const editorContent = computed(() => props.body || void 0);
|
|
3594
|
-
function handleBodyUpdate(value) {
|
|
3595
|
-
emit("update:body", value);
|
|
3596
|
-
}
|
|
3597
|
-
function handleMetadataUpdate(updates) {
|
|
3598
|
-
emit("update:metadata", updates);
|
|
3599
|
-
}
|
|
3600
|
-
const toast = useToast();
|
|
3601
|
-
const shareUrl = computed(() => {
|
|
3602
|
-
if (!props.document?.id) return "";
|
|
3603
|
-
return `${(void 0).location.origin}/view/${props.document.id}`;
|
|
3604
|
-
});
|
|
3605
|
-
const linkCopied = ref(false);
|
|
3606
|
-
const showShareModal = ref(false);
|
|
3607
|
-
function handleShareClick() {
|
|
3608
|
-
if (props.metadata.shared) {
|
|
3609
|
-
copyShareLink();
|
|
3610
|
-
} else {
|
|
3611
|
-
showShareModal.value = true;
|
|
3612
|
-
}
|
|
3613
|
-
}
|
|
3614
|
-
const { copy } = useCopyToClipboard();
|
|
3615
|
-
async function copyShareLink() {
|
|
3616
|
-
const ok = await copy(shareUrl.value);
|
|
3617
|
-
if (ok) {
|
|
3618
|
-
linkCopied.value = true;
|
|
3619
|
-
toast.add({ title: "Link copied!", icon: "i-lucide-check", color: "success" });
|
|
3620
|
-
setTimeout(() => {
|
|
3621
|
-
linkCopied.value = false;
|
|
3622
|
-
}, 2e3);
|
|
3623
|
-
} else {
|
|
3624
|
-
toast.add({ title: "Failed to copy link", icon: "i-lucide-x", color: "error" });
|
|
3625
|
-
}
|
|
3626
|
-
}
|
|
3627
|
-
function setVisibility(shared, shareType) {
|
|
3628
|
-
emit("update:metadata", { shared, shareType: shareType ?? void 0 });
|
|
3629
|
-
showShareModal.value = false;
|
|
3630
|
-
if (shared) {
|
|
3631
|
-
setTimeout(() => copyShareLink(), 100);
|
|
3632
|
-
}
|
|
3633
|
-
}
|
|
3634
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
3635
|
-
const _component_UIcon = _sfc_main$d;
|
|
3636
|
-
const _component_USwitch = _sfc_main$g;
|
|
3637
|
-
const _component_UButton = _sfc_main$8$1;
|
|
3638
|
-
const _component_EditorDocumentMetadata = __nuxt_component_3;
|
|
3639
|
-
const _component_UEditor = _sfc_main$1$2;
|
|
3640
|
-
const _component_UEditorToolbar = _sfc_main$h;
|
|
3641
|
-
const _component_ClientOnly = __nuxt_component_3$1;
|
|
3642
|
-
const _component_EditorCodeEditorFallback = __nuxt_component_5;
|
|
3643
|
-
const _component_UModal = _sfc_main$e;
|
|
3644
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "h-full flex flex-col" }, _attrs))}><div class="border-b border-default py-2 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-dimmed min-w-0">`);
|
|
3645
|
-
_push(ssrRenderComponent(_component_UIcon, {
|
|
3646
|
-
name: "i-lucide-file-text",
|
|
3647
|
-
class: "size-4 shrink-0"
|
|
3648
|
-
}, null, _parent));
|
|
3649
|
-
_push(`<span class="truncate">${ssrInterpolate(__props.filePath)}</span></div>`);
|
|
3650
|
-
if (unref(showModeToggle)) {
|
|
3651
|
-
_push(`<div class="w-40">`);
|
|
3652
|
-
_push(ssrRenderComponent(_component_USwitch, {
|
|
3653
|
-
modelValue: unref(isEditorMode),
|
|
3654
|
-
"onUpdate:modelValue": ($event) => isRef(isEditorMode) ? isEditorMode.value = $event : null,
|
|
3655
|
-
"unchecked-icon": "i-lucide-code",
|
|
3656
|
-
"checked-icon": "i-lucide-pencil",
|
|
3657
|
-
label: unref(isEditorMode) ? "Editor Mode" : "Code Mode",
|
|
3658
|
-
ui: { base: "data-[state=unchecked]:bg-info", icon: "group-data-[state=unchecked]:text-info" }
|
|
3659
|
-
}, null, _parent));
|
|
3660
|
-
_push(`</div>`);
|
|
3661
|
-
} else {
|
|
3662
|
-
_push(`<!---->`);
|
|
3663
|
-
}
|
|
3664
|
-
_push(`<div class="flex items-center gap-3">`);
|
|
3665
|
-
_push(ssrRenderComponent(_component_UButton, {
|
|
3666
|
-
icon: unref(linkCopied) ? "i-lucide-check" : "i-lucide-share",
|
|
3667
|
-
size: "xs",
|
|
3668
|
-
variant: "ghost",
|
|
3669
|
-
class: "rounded-full",
|
|
3670
|
-
onClick: handleShareClick
|
|
3671
|
-
}, null, _parent));
|
|
3672
|
-
_push(ssrRenderComponent(_component_UButton, {
|
|
3673
|
-
icon: unref(showMetadata) ? "i-lucide-panel-top-close" : "i-lucide-panel-top-open",
|
|
3674
|
-
size: "xs",
|
|
3675
|
-
variant: "ghost",
|
|
3676
|
-
class: "rounded-full",
|
|
3677
|
-
onClick: ($event) => showMetadata.value = !unref(showMetadata)
|
|
3678
|
-
}, null, _parent));
|
|
3679
|
-
if (unref(saveStatusIcon)) {
|
|
3680
|
-
_push(`<div class="flex items-center gap-1 text-sm text-dimmed">`);
|
|
3681
|
-
_push(ssrRenderComponent(_component_UIcon, {
|
|
3682
|
-
name: unref(saveStatusIcon),
|
|
3683
|
-
class: [
|
|
3684
|
-
"size-4",
|
|
3685
|
-
__props.saveStatus === "saving" && "animate-spin",
|
|
3686
|
-
__props.saveStatus === "error" && "text-error"
|
|
3687
|
-
]
|
|
3688
|
-
}, null, _parent));
|
|
3689
|
-
_push(`<span>${ssrInterpolate(unref(saveStatusText))}</span></div>`);
|
|
3690
|
-
} else {
|
|
3691
|
-
_push(`<!---->`);
|
|
3692
|
-
}
|
|
3693
|
-
_push(`</div></div>`);
|
|
3694
|
-
if (unref(showMetadata)) {
|
|
3695
|
-
_push(ssrRenderComponent(_component_EditorDocumentMetadata, {
|
|
3696
|
-
metadata: __props.metadata,
|
|
3697
|
-
projects: unref(projects),
|
|
3698
|
-
"onUpdate:metadata": handleMetadataUpdate
|
|
3699
|
-
}, null, _parent));
|
|
3700
|
-
} else {
|
|
3701
|
-
_push(`<!---->`);
|
|
3702
|
-
}
|
|
3703
|
-
if (unref(isMarkdown) && unref(isEditorMode)) {
|
|
3704
|
-
_push(ssrRenderComponent(_component_UEditor, {
|
|
3705
|
-
"model-value": unref(editorContent),
|
|
3706
|
-
"content-type": "markdown",
|
|
3707
|
-
placeholder: "Start writing...",
|
|
3708
|
-
class: "markdown-editor w-full min-h-64 flex-1",
|
|
3709
|
-
"onUpdate:modelValue": handleBodyUpdate
|
|
3710
|
-
}, {
|
|
3711
|
-
default: withCtx(({ editor }, _push2, _parent2, _scopeId) => {
|
|
3712
|
-
if (_push2) {
|
|
3713
|
-
_push2(ssrRenderComponent(_component_UEditorToolbar, {
|
|
3714
|
-
editor,
|
|
3715
|
-
items: toolbarItems,
|
|
3716
|
-
class: "border-b border-default"
|
|
3717
|
-
}, null, _parent2, _scopeId));
|
|
3718
|
-
} else {
|
|
3719
|
-
return [
|
|
3720
|
-
createVNode(_component_UEditorToolbar, {
|
|
3721
|
-
editor,
|
|
3722
|
-
items: toolbarItems,
|
|
3723
|
-
class: "border-b border-default"
|
|
3724
|
-
}, null, 8, ["editor"])
|
|
3725
|
-
];
|
|
3726
|
-
}
|
|
3727
|
-
}),
|
|
3728
|
-
_: 1
|
|
3729
|
-
}, _parent));
|
|
3730
|
-
} else {
|
|
3731
|
-
_push(ssrRenderComponent(_component_ClientOnly, null, {
|
|
3732
|
-
fallback: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
3733
|
-
if (_push2) {
|
|
3734
|
-
_push2(ssrRenderComponent(_component_EditorCodeEditorFallback, { class: "flex-1" }, null, _parent2, _scopeId));
|
|
3735
|
-
} else {
|
|
3736
|
-
return [
|
|
3737
|
-
createVNode(_component_EditorCodeEditorFallback, { class: "flex-1" })
|
|
3738
|
-
];
|
|
3739
|
-
}
|
|
3740
|
-
})
|
|
3741
|
-
}, _parent));
|
|
3742
|
-
}
|
|
3743
|
-
_push(ssrRenderComponent(_component_UModal, {
|
|
3744
|
-
open: unref(showShareModal),
|
|
3745
|
-
"onUpdate:open": ($event) => isRef(showShareModal) ? showShareModal.value = $event : null,
|
|
3746
|
-
title: "Share Document",
|
|
3747
|
-
description: "Choose how you want to share this document"
|
|
3748
|
-
}, {
|
|
3749
|
-
body: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
3750
|
-
if (_push2) {
|
|
3751
|
-
_push2(`<div class="space-y-4"${_scopeId}><div class="${ssrRenderClass([{ "border-primary bg-elevated": !__props.metadata.shared }, "p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors"])}"${_scopeId}><div class="flex items-center gap-3"${_scopeId}>`);
|
|
3752
|
-
_push2(ssrRenderComponent(_component_UIcon, {
|
|
3753
|
-
name: "i-lucide-eye-off",
|
|
3754
|
-
class: "size-5 text-dimmed"
|
|
3755
|
-
}, null, _parent2, _scopeId));
|
|
3756
|
-
_push2(`<div${_scopeId}><div class="font-medium"${_scopeId}> Hidden </div><div class="text-sm text-dimmed"${_scopeId}> Only you can view this document. Not accessible via link. </div></div></div></div><div class="${ssrRenderClass([{ "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "private" }, "p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors"])}"${_scopeId}><div class="flex items-center gap-3"${_scopeId}>`);
|
|
3757
|
-
_push2(ssrRenderComponent(_component_UIcon, {
|
|
3758
|
-
name: "i-lucide-link",
|
|
3759
|
-
class: "size-5 text-dimmed"
|
|
3760
|
-
}, null, _parent2, _scopeId));
|
|
3761
|
-
_push2(`<div${_scopeId}><div class="font-medium"${_scopeId}> Private (Link Only) </div><div class="text-sm text-dimmed"${_scopeId}> Anyone with the link can view. Not indexed by search engines. </div></div></div></div><div class="${ssrRenderClass([{ "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "public" }, "p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors"])}"${_scopeId}><div class="flex items-center gap-3"${_scopeId}>`);
|
|
3762
|
-
_push2(ssrRenderComponent(_component_UIcon, {
|
|
3763
|
-
name: "i-lucide-globe",
|
|
3764
|
-
class: "size-5 text-dimmed"
|
|
3765
|
-
}, null, _parent2, _scopeId));
|
|
3766
|
-
_push2(`<div${_scopeId}><div class="font-medium"${_scopeId}> Public </div><div class="text-sm text-dimmed"${_scopeId}> Visible to everyone. Indexed by search engines. </div></div></div></div></div>`);
|
|
3767
|
-
} else {
|
|
3768
|
-
return [
|
|
3769
|
-
createVNode("div", { class: "space-y-4" }, [
|
|
3770
|
-
createVNode("div", {
|
|
3771
|
-
class: ["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors", { "border-primary bg-elevated": !__props.metadata.shared }],
|
|
3772
|
-
onClick: ($event) => setVisibility(false, null)
|
|
3773
|
-
}, [
|
|
3774
|
-
createVNode("div", { class: "flex items-center gap-3" }, [
|
|
3775
|
-
createVNode(_component_UIcon, {
|
|
3776
|
-
name: "i-lucide-eye-off",
|
|
3777
|
-
class: "size-5 text-dimmed"
|
|
3778
|
-
}),
|
|
3779
|
-
createVNode("div", null, [
|
|
3780
|
-
createVNode("div", { class: "font-medium" }, " Hidden "),
|
|
3781
|
-
createVNode("div", { class: "text-sm text-dimmed" }, " Only you can view this document. Not accessible via link. ")
|
|
3782
|
-
])
|
|
3783
|
-
])
|
|
3784
|
-
], 10, ["onClick"]),
|
|
3785
|
-
createVNode("div", {
|
|
3786
|
-
class: ["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors", { "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "private" }],
|
|
3787
|
-
onClick: ($event) => setVisibility(true, "private")
|
|
3788
|
-
}, [
|
|
3789
|
-
createVNode("div", { class: "flex items-center gap-3" }, [
|
|
3790
|
-
createVNode(_component_UIcon, {
|
|
3791
|
-
name: "i-lucide-link",
|
|
3792
|
-
class: "size-5 text-dimmed"
|
|
3793
|
-
}),
|
|
3794
|
-
createVNode("div", null, [
|
|
3795
|
-
createVNode("div", { class: "font-medium" }, " Private (Link Only) "),
|
|
3796
|
-
createVNode("div", { class: "text-sm text-dimmed" }, " Anyone with the link can view. Not indexed by search engines. ")
|
|
3797
|
-
])
|
|
3798
|
-
])
|
|
3799
|
-
], 10, ["onClick"]),
|
|
3800
|
-
createVNode("div", {
|
|
3801
|
-
class: ["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors", { "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "public" }],
|
|
3802
|
-
onClick: ($event) => setVisibility(true, "public")
|
|
3803
|
-
}, [
|
|
3804
|
-
createVNode("div", { class: "flex items-center gap-3" }, [
|
|
3805
|
-
createVNode(_component_UIcon, {
|
|
3806
|
-
name: "i-lucide-globe",
|
|
3807
|
-
class: "size-5 text-dimmed"
|
|
3808
|
-
}),
|
|
3809
|
-
createVNode("div", null, [
|
|
3810
|
-
createVNode("div", { class: "font-medium" }, " Public "),
|
|
3811
|
-
createVNode("div", { class: "text-sm text-dimmed" }, " Visible to everyone. Indexed by search engines. ")
|
|
3812
|
-
])
|
|
3813
|
-
])
|
|
3814
|
-
], 10, ["onClick"])
|
|
3815
|
-
])
|
|
3816
|
-
];
|
|
3817
|
-
}
|
|
3818
|
-
}),
|
|
3819
|
-
_: 1
|
|
3820
|
-
}, _parent));
|
|
3821
|
-
_push(`</div>`);
|
|
3822
|
-
};
|
|
3823
|
-
}
|
|
3824
|
-
});
|
|
3825
|
-
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
3826
|
-
_sfc_main$1.setup = (props, ctx) => {
|
|
3827
|
-
const ssrContext = useSSRContext();
|
|
3828
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/editor/DocumentEditor.vue");
|
|
3829
|
-
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
3830
|
-
};
|
|
3831
|
-
const __nuxt_component_8 = Object.assign(_sfc_main$1, { __name: "EditorDocumentEditor" });
|
|
3832
|
-
function useDocument() {
|
|
3833
|
-
const document = ref(null);
|
|
3834
|
-
const metadata = ref(null);
|
|
3835
|
-
const body = ref("");
|
|
3836
|
-
const filePath = ref(null);
|
|
3837
|
-
const loading = ref(false);
|
|
3838
|
-
const saveStatus = ref("idle");
|
|
3839
|
-
const isDirty = ref(false);
|
|
3840
|
-
const metadataDirty = ref(false);
|
|
3841
|
-
const debouncedSaveBody = useDebounceFn(async () => {
|
|
3842
|
-
if (!document.value || !isDirty.value) return;
|
|
3843
|
-
await saveDocument({ body: body.value });
|
|
3844
|
-
}, 2e3);
|
|
3845
|
-
const debouncedSaveMetadata = useDebounceFn(async () => {
|
|
3846
|
-
if (!document.value || !metadataDirty.value) return;
|
|
3847
|
-
await saveDocument();
|
|
3848
|
-
}, 500);
|
|
3849
|
-
async function loadDocument(path) {
|
|
3850
|
-
loading.value = true;
|
|
3851
|
-
filePath.value = path;
|
|
3852
|
-
isDirty.value = false;
|
|
3853
|
-
metadataDirty.value = false;
|
|
3854
|
-
saveStatus.value = "idle";
|
|
3855
|
-
try {
|
|
3856
|
-
const response = await $fetch("/api/documents/by-path", {
|
|
3857
|
-
method: "POST",
|
|
3858
|
-
body: { path }
|
|
3859
|
-
});
|
|
3860
|
-
document.value = response.data.document;
|
|
3861
|
-
metadata.value = response.data.metadata;
|
|
3862
|
-
body.value = response.data.body || "";
|
|
3863
|
-
} catch (e) {
|
|
3864
|
-
console.error("Failed to load document:", e);
|
|
3865
|
-
document.value = null;
|
|
3866
|
-
metadata.value = null;
|
|
3867
|
-
body.value = "";
|
|
3868
|
-
} finally {
|
|
3869
|
-
loading.value = false;
|
|
3870
|
-
}
|
|
3871
|
-
}
|
|
3872
|
-
function updateBody(newBody) {
|
|
3873
|
-
if (body.value !== newBody) {
|
|
3874
|
-
body.value = newBody;
|
|
3875
|
-
isDirty.value = true;
|
|
3876
|
-
debouncedSaveBody();
|
|
3877
|
-
}
|
|
3878
|
-
}
|
|
3879
|
-
function updateMetadata(updates) {
|
|
3880
|
-
if (!metadata.value) return;
|
|
3881
|
-
metadata.value = { ...metadata.value, ...updates };
|
|
3882
|
-
metadataDirty.value = true;
|
|
3883
|
-
debouncedSaveMetadata();
|
|
3884
|
-
}
|
|
3885
|
-
async function saveDocument(updates = {}) {
|
|
3886
|
-
if (!document.value) return;
|
|
3887
|
-
saveStatus.value = "saving";
|
|
3888
|
-
try {
|
|
3889
|
-
const payload = { ...updates };
|
|
3890
|
-
if (metadataDirty.value && metadata.value) {
|
|
3891
|
-
payload.title = metadata.value.title;
|
|
3892
|
-
payload.tags = metadata.value.tags;
|
|
3893
|
-
payload.projectId = metadata.value.projectId;
|
|
3894
|
-
payload.shared = metadata.value.shared;
|
|
3895
|
-
payload.shareType = metadata.value.shareType;
|
|
3896
|
-
}
|
|
3897
|
-
if (isDirty.value && updates.body === void 0)
|
|
3898
|
-
payload.body = body.value;
|
|
3899
|
-
const response = await $fetch(`/api/documents/${document.value.id}`, {
|
|
3900
|
-
method: "PUT",
|
|
3901
|
-
body: payload
|
|
3902
|
-
});
|
|
3903
|
-
document.value = response.data.document;
|
|
3904
|
-
metadata.value = response.data.metadata;
|
|
3905
|
-
body.value = response.data.body || "";
|
|
3906
|
-
isDirty.value = false;
|
|
3907
|
-
metadataDirty.value = false;
|
|
3908
|
-
saveStatus.value = "saved";
|
|
3909
|
-
setTimeout(() => {
|
|
3910
|
-
if (saveStatus.value === "saved")
|
|
3911
|
-
saveStatus.value = "idle";
|
|
3912
|
-
}, 2e3);
|
|
3913
|
-
} catch (e) {
|
|
3914
|
-
console.error("Failed to save document:", e);
|
|
3915
|
-
saveStatus.value = "error";
|
|
3916
|
-
}
|
|
3917
|
-
}
|
|
3918
|
-
async function saveNow() {
|
|
3919
|
-
if (!isDirty.value && !metadataDirty.value) return;
|
|
3920
|
-
await saveDocument({ body: body.value });
|
|
3921
|
-
}
|
|
3922
|
-
function closeDocument() {
|
|
3923
|
-
document.value = null;
|
|
3924
|
-
metadata.value = null;
|
|
3925
|
-
body.value = "";
|
|
3926
|
-
filePath.value = null;
|
|
3927
|
-
isDirty.value = false;
|
|
3928
|
-
metadataDirty.value = false;
|
|
3929
|
-
saveStatus.value = "idle";
|
|
3930
|
-
}
|
|
3931
|
-
return {
|
|
3932
|
-
document,
|
|
3933
|
-
metadata,
|
|
3934
|
-
body,
|
|
3935
|
-
filePath,
|
|
3936
|
-
loading,
|
|
3937
|
-
saveStatus,
|
|
3938
|
-
isDirty,
|
|
3939
|
-
metadataDirty,
|
|
3940
|
-
loadDocument,
|
|
3941
|
-
updateBody,
|
|
3942
|
-
updateMetadata,
|
|
3943
|
-
saveDocument,
|
|
3944
|
-
saveNow,
|
|
3945
|
-
closeDocument
|
|
3946
|
-
};
|
|
3947
|
-
}
|
|
3948
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3949
|
-
__name: "docs",
|
|
3950
|
-
__ssrInlineRender: true,
|
|
3951
|
-
setup(__props) {
|
|
3952
|
-
useRoute();
|
|
3953
|
-
const {
|
|
3954
|
-
document,
|
|
3955
|
-
metadata,
|
|
3956
|
-
body,
|
|
3957
|
-
filePath,
|
|
3958
|
-
loading,
|
|
3959
|
-
saveStatus,
|
|
3960
|
-
isDirty,
|
|
3961
|
-
metadataDirty,
|
|
3962
|
-
loadDocument,
|
|
3963
|
-
updateBody,
|
|
3964
|
-
updateMetadata,
|
|
3965
|
-
saveNow
|
|
3966
|
-
} = useDocument();
|
|
3967
|
-
const { lastDocumentPath } = usePreferences();
|
|
3968
|
-
async function handleFileSelect(path) {
|
|
3969
|
-
await loadDocument(path);
|
|
3970
|
-
lastDocumentPath.value = path;
|
|
3971
|
-
}
|
|
3972
|
-
return (_ctx, _push, _parent, _attrs) => {
|
|
3973
|
-
const _component_UDashboardPanel = _sfc_main$1$1;
|
|
3974
|
-
const _component_FilesFileTree = __nuxt_component_1;
|
|
3975
|
-
const _component_UDashboardNavbar = _sfc_main$8;
|
|
3976
|
-
const _component_UDashboardSidebarCollapse = _sfc_main$3;
|
|
3977
|
-
const _component_UColorModeButton = _sfc_main$9;
|
|
3978
|
-
const _component_UDrawer = _sfc_main$a;
|
|
3979
|
-
const _component_UButton = _sfc_main$8$1;
|
|
3980
|
-
const _component_UIcon = _sfc_main$d;
|
|
3981
|
-
const _component_EditorDocumentEditor = __nuxt_component_8;
|
|
3982
|
-
_push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-1 min-w-0" }, _attrs))}>`);
|
|
3983
|
-
_push(ssrRenderComponent(_component_UDashboardPanel, {
|
|
3984
|
-
id: "docs-filetree",
|
|
3985
|
-
collapsible: "",
|
|
3986
|
-
resizable: "",
|
|
3987
|
-
"min-size": 12,
|
|
3988
|
-
"default-size": 16,
|
|
3989
|
-
"max-size": 24,
|
|
3990
|
-
class: "hidden lg:flex"
|
|
3991
|
-
}, {
|
|
3992
|
-
body: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
3993
|
-
if (_push2) {
|
|
3994
|
-
_push2(ssrRenderComponent(_component_FilesFileTree, {
|
|
3995
|
-
class: "h-full",
|
|
3996
|
-
onSelect: handleFileSelect
|
|
3997
|
-
}, null, _parent2, _scopeId));
|
|
3998
|
-
} else {
|
|
3999
|
-
return [
|
|
4000
|
-
createVNode(_component_FilesFileTree, {
|
|
4001
|
-
class: "h-full",
|
|
4002
|
-
onSelect: handleFileSelect
|
|
4003
|
-
})
|
|
4004
|
-
];
|
|
4005
|
-
}
|
|
4006
|
-
}),
|
|
4007
|
-
_: 1
|
|
4008
|
-
}, _parent));
|
|
4009
|
-
_push(ssrRenderComponent(_component_UDashboardPanel, {
|
|
4010
|
-
id: "docs-editor",
|
|
4011
|
-
grow: "",
|
|
4012
|
-
ui: { body: "sm:py-0" }
|
|
4013
|
-
}, {
|
|
4014
|
-
header: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
4015
|
-
if (_push2) {
|
|
4016
|
-
_push2(ssrRenderComponent(_component_UDashboardNavbar, null, {
|
|
4017
|
-
title: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
4018
|
-
if (_push3) {
|
|
4019
|
-
_push3(ssrRenderComponent(_component_UDashboardSidebarCollapse, null, null, _parent3, _scopeId2));
|
|
4020
|
-
_push3(` Editor `);
|
|
4021
|
-
} else {
|
|
4022
|
-
return [
|
|
4023
|
-
createVNode(_component_UDashboardSidebarCollapse),
|
|
4024
|
-
createTextVNode(" Editor ")
|
|
4025
|
-
];
|
|
4026
|
-
}
|
|
4027
|
-
}),
|
|
4028
|
-
right: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
4029
|
-
if (_push3) {
|
|
4030
|
-
_push3(ssrRenderComponent(_component_UColorModeButton, null, null, _parent3, _scopeId2));
|
|
4031
|
-
_push3(ssrRenderComponent(_component_UDrawer, null, {
|
|
4032
|
-
content: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
4033
|
-
if (_push4) {
|
|
4034
|
-
_push4(ssrRenderComponent(_component_FilesFileTree, {
|
|
4035
|
-
class: "h-full",
|
|
4036
|
-
onSelect: handleFileSelect
|
|
4037
|
-
}, null, _parent4, _scopeId3));
|
|
4038
|
-
} else {
|
|
4039
|
-
return [
|
|
4040
|
-
createVNode(_component_FilesFileTree, {
|
|
4041
|
-
class: "h-full",
|
|
4042
|
-
onSelect: handleFileSelect
|
|
4043
|
-
})
|
|
4044
|
-
];
|
|
4045
|
-
}
|
|
4046
|
-
}),
|
|
4047
|
-
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
|
4048
|
-
if (_push4) {
|
|
4049
|
-
_push4(ssrRenderComponent(_component_UButton, {
|
|
4050
|
-
icon: "i-lucide-folder-tree",
|
|
4051
|
-
class: "block lg:hidden"
|
|
4052
|
-
}, null, _parent4, _scopeId3));
|
|
4053
|
-
} else {
|
|
4054
|
-
return [
|
|
4055
|
-
createVNode(_component_UButton, {
|
|
4056
|
-
icon: "i-lucide-folder-tree",
|
|
4057
|
-
class: "block lg:hidden"
|
|
4058
|
-
})
|
|
4059
|
-
];
|
|
4060
|
-
}
|
|
4061
|
-
}),
|
|
4062
|
-
_: 1
|
|
4063
|
-
}, _parent3, _scopeId2));
|
|
4064
|
-
} else {
|
|
4065
|
-
return [
|
|
4066
|
-
createVNode(_component_UColorModeButton),
|
|
4067
|
-
createVNode(_component_UDrawer, null, {
|
|
4068
|
-
content: withCtx(() => [
|
|
4069
|
-
createVNode(_component_FilesFileTree, {
|
|
4070
|
-
class: "h-full",
|
|
4071
|
-
onSelect: handleFileSelect
|
|
4072
|
-
})
|
|
4073
|
-
]),
|
|
4074
|
-
default: withCtx(() => [
|
|
4075
|
-
createVNode(_component_UButton, {
|
|
4076
|
-
icon: "i-lucide-folder-tree",
|
|
4077
|
-
class: "block lg:hidden"
|
|
4078
|
-
})
|
|
4079
|
-
]),
|
|
4080
|
-
_: 1
|
|
4081
|
-
})
|
|
4082
|
-
];
|
|
4083
|
-
}
|
|
4084
|
-
}),
|
|
4085
|
-
_: 1
|
|
4086
|
-
}, _parent2, _scopeId));
|
|
4087
|
-
} else {
|
|
4088
|
-
return [
|
|
4089
|
-
createVNode(_component_UDashboardNavbar, null, {
|
|
4090
|
-
title: withCtx(() => [
|
|
4091
|
-
createVNode(_component_UDashboardSidebarCollapse),
|
|
4092
|
-
createTextVNode(" Editor ")
|
|
4093
|
-
]),
|
|
4094
|
-
right: withCtx(() => [
|
|
4095
|
-
createVNode(_component_UColorModeButton),
|
|
4096
|
-
createVNode(_component_UDrawer, null, {
|
|
4097
|
-
content: withCtx(() => [
|
|
4098
|
-
createVNode(_component_FilesFileTree, {
|
|
4099
|
-
class: "h-full",
|
|
4100
|
-
onSelect: handleFileSelect
|
|
4101
|
-
})
|
|
4102
|
-
]),
|
|
4103
|
-
default: withCtx(() => [
|
|
4104
|
-
createVNode(_component_UButton, {
|
|
4105
|
-
icon: "i-lucide-folder-tree",
|
|
4106
|
-
class: "block lg:hidden"
|
|
4107
|
-
})
|
|
4108
|
-
]),
|
|
4109
|
-
_: 1
|
|
4110
|
-
})
|
|
4111
|
-
]),
|
|
4112
|
-
_: 1
|
|
4113
|
-
})
|
|
4114
|
-
];
|
|
4115
|
-
}
|
|
4116
|
-
}),
|
|
4117
|
-
body: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
4118
|
-
if (_push2) {
|
|
4119
|
-
if (unref(loading)) {
|
|
4120
|
-
_push2(`<div class="flex-1 flex items-center justify-center h-full"${_scopeId}>`);
|
|
4121
|
-
_push2(ssrRenderComponent(_component_UIcon, {
|
|
4122
|
-
name: "i-lucide-loader-2",
|
|
4123
|
-
class: "size-6 animate-spin text-dimmed"
|
|
4124
|
-
}, null, _parent2, _scopeId));
|
|
4125
|
-
_push2(`</div>`);
|
|
4126
|
-
} else if (!unref(filePath)) {
|
|
4127
|
-
_push2(`<div class="flex-1 flex items-center justify-center h-full text-dimmed"${_scopeId}><div class="text-center"${_scopeId}>`);
|
|
4128
|
-
_push2(ssrRenderComponent(_component_UIcon, {
|
|
4129
|
-
name: "i-lucide-file-text",
|
|
4130
|
-
class: "size-32 mx-auto mb-4 opacity-50"
|
|
4131
|
-
}, null, _parent2, _scopeId));
|
|
4132
|
-
_push2(`<p${_scopeId}>Select a file to edit</p></div></div>`);
|
|
4133
|
-
} else if (unref(metadata) && unref(document)) {
|
|
4134
|
-
_push2(ssrRenderComponent(_component_EditorDocumentEditor, {
|
|
4135
|
-
key: unref(filePath),
|
|
4136
|
-
document: unref(document),
|
|
4137
|
-
body: unref(body),
|
|
4138
|
-
metadata: unref(metadata),
|
|
4139
|
-
"file-path": unref(filePath),
|
|
4140
|
-
"save-status": unref(saveStatus),
|
|
4141
|
-
"is-dirty": unref(isDirty),
|
|
4142
|
-
"metadata-dirty": unref(metadataDirty),
|
|
4143
|
-
class: "h-full",
|
|
4144
|
-
"onUpdate:body": unref(updateBody),
|
|
4145
|
-
"onUpdate:metadata": unref(updateMetadata),
|
|
4146
|
-
onSave: unref(saveNow)
|
|
4147
|
-
}, null, _parent2, _scopeId));
|
|
4148
|
-
} else {
|
|
4149
|
-
_push2(`<!---->`);
|
|
4150
|
-
}
|
|
4151
|
-
} else {
|
|
4152
|
-
return [
|
|
4153
|
-
unref(loading) ? (openBlock(), createBlock("div", {
|
|
4154
|
-
key: 0,
|
|
4155
|
-
class: "flex-1 flex items-center justify-center h-full"
|
|
4156
|
-
}, [
|
|
4157
|
-
createVNode(_component_UIcon, {
|
|
4158
|
-
name: "i-lucide-loader-2",
|
|
4159
|
-
class: "size-6 animate-spin text-dimmed"
|
|
4160
|
-
})
|
|
4161
|
-
])) : !unref(filePath) ? (openBlock(), createBlock("div", {
|
|
4162
|
-
key: 1,
|
|
4163
|
-
class: "flex-1 flex items-center justify-center h-full text-dimmed"
|
|
4164
|
-
}, [
|
|
4165
|
-
createVNode("div", { class: "text-center" }, [
|
|
4166
|
-
createVNode(_component_UIcon, {
|
|
4167
|
-
name: "i-lucide-file-text",
|
|
4168
|
-
class: "size-32 mx-auto mb-4 opacity-50"
|
|
4169
|
-
}),
|
|
4170
|
-
createVNode("p", null, "Select a file to edit")
|
|
4171
|
-
])
|
|
4172
|
-
])) : unref(metadata) && unref(document) ? (openBlock(), createBlock(_component_EditorDocumentEditor, {
|
|
4173
|
-
key: unref(filePath),
|
|
4174
|
-
document: unref(document),
|
|
4175
|
-
body: unref(body),
|
|
4176
|
-
metadata: unref(metadata),
|
|
4177
|
-
"file-path": unref(filePath),
|
|
4178
|
-
"save-status": unref(saveStatus),
|
|
4179
|
-
"is-dirty": unref(isDirty),
|
|
4180
|
-
"metadata-dirty": unref(metadataDirty),
|
|
4181
|
-
class: "h-full",
|
|
4182
|
-
"onUpdate:body": unref(updateBody),
|
|
4183
|
-
"onUpdate:metadata": unref(updateMetadata),
|
|
4184
|
-
onSave: unref(saveNow)
|
|
4185
|
-
}, null, 8, ["document", "body", "metadata", "file-path", "save-status", "is-dirty", "metadata-dirty", "onUpdate:body", "onUpdate:metadata", "onSave"])) : createCommentVNode("", true)
|
|
4186
|
-
];
|
|
4187
|
-
}
|
|
4188
|
-
}),
|
|
4189
|
-
_: 1
|
|
4190
|
-
}, _parent));
|
|
4191
|
-
_push(`</div>`);
|
|
4192
|
-
};
|
|
4193
|
-
}
|
|
4194
|
-
});
|
|
4195
|
-
const _sfc_setup = _sfc_main.setup;
|
|
4196
|
-
_sfc_main.setup = (props, ctx) => {
|
|
4197
|
-
const ssrContext = useSSRContext();
|
|
4198
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/docs.vue");
|
|
4199
2010
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
4200
2011
|
};
|
|
4201
2012
|
|
|
4202
|
-
export { _sfc_main as
|
|
4203
|
-
//# sourceMappingURL=
|
|
2013
|
+
export { _sfc_main$1 as _, _sfc_main as a };
|
|
2014
|
+
//# sourceMappingURL=Tree-DUhXKd8y.mjs.map
|