@flexkit/studio 0.2.32 → 0.2.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/activity-nav-button-ZHQOZBCC.js +2 -0
  2. package/dist/{activity-nav-button-E4I4YC3X.js.map → activity-nav-button-ZHQOZBCC.js.map} +1 -1
  3. package/dist/astro.js +1 -1
  4. package/dist/chat-page-LR7XC2US.js +4 -0
  5. package/dist/{chat-page-7UB3BMBF.js.map → chat-page-LR7XC2US.js.map} +1 -1
  6. package/dist/chunk-2MVQXXY7.js +4 -0
  7. package/dist/{chunk-R2O4WC3H.js.map → chunk-2MVQXXY7.js.map} +1 -1
  8. package/dist/{chunk-ERCVR23U.js → chunk-36DLIVZF.js} +2 -2
  9. package/dist/{chunk-ERCVR23U.js.map → chunk-36DLIVZF.js.map} +1 -1
  10. package/dist/chunk-3SY46ERM.js +2 -0
  11. package/dist/chunk-3SY46ERM.js.map +1 -0
  12. package/dist/chunk-4ZWQ44NZ.js +2 -0
  13. package/dist/{chunk-2NXQF2F7.js.map → chunk-4ZWQ44NZ.js.map} +1 -1
  14. package/dist/chunk-5JUG4BEF.js +2 -0
  15. package/dist/chunk-5JUG4BEF.js.map +1 -0
  16. package/dist/chunk-6I7D2JBA.js +3 -0
  17. package/dist/chunk-6I7D2JBA.js.map +1 -0
  18. package/dist/chunk-7ODGH7G2.js +2 -0
  19. package/dist/{chunk-5LGIALCK.js.map → chunk-7ODGH7G2.js.map} +1 -1
  20. package/dist/{chunk-SZEGGBOC.js → chunk-A4DPLZZF.js} +2 -2
  21. package/dist/{chunk-SZEGGBOC.js.map → chunk-A4DPLZZF.js.map} +1 -1
  22. package/dist/{chunk-C4XLDODU.js → chunk-C2KPTRYM.js} +3 -1
  23. package/dist/chunk-C3OHXPJV.js +2 -0
  24. package/dist/chunk-C3OHXPJV.js.map +1 -0
  25. package/dist/{chunk-KR27GOH6.js → chunk-CFYO546Y.js} +3 -3
  26. package/dist/{chunk-KR27GOH6.js.map → chunk-CFYO546Y.js.map} +1 -1
  27. package/dist/chunk-DHE6PO3V.js +2 -0
  28. package/dist/{chunk-5AJXR47U.js.map → chunk-DHE6PO3V.js.map} +1 -1
  29. package/dist/{chunk-V7C4EHK3.js → chunk-DSLPTDZX.js} +2 -2
  30. package/dist/{chunk-V7C4EHK3.js.map → chunk-DSLPTDZX.js.map} +1 -1
  31. package/dist/chunk-HSGUVQXU.js +10 -0
  32. package/dist/{chunk-JAPZBEBZ.js.map → chunk-HSGUVQXU.js.map} +1 -1
  33. package/dist/{chunk-EMFHKTAV.js → chunk-K3HW6YWS.js} +2 -2
  34. package/dist/{chunk-EMFHKTAV.js.map → chunk-K3HW6YWS.js.map} +1 -1
  35. package/dist/chunk-L5T56MRH.js +7 -0
  36. package/dist/chunk-L5T56MRH.js.map +1 -0
  37. package/dist/chunk-MBBE4RND.js +3 -0
  38. package/dist/chunk-MBBE4RND.js.map +1 -0
  39. package/dist/{chunk-USNXQOMJ.js → chunk-N33S7BSG.js} +2 -2
  40. package/dist/{chunk-USNXQOMJ.js.map → chunk-N33S7BSG.js.map} +1 -1
  41. package/dist/{chunk-KN7OJFEX.js → chunk-N52JTYBJ.js} +2 -2
  42. package/dist/{chunk-KN7OJFEX.js.map → chunk-N52JTYBJ.js.map} +1 -1
  43. package/dist/{chunk-AY2RXJWS.js → chunk-NFEQBTIW.js} +2 -2
  44. package/dist/{chunk-AY2RXJWS.js.map → chunk-NFEQBTIW.js.map} +1 -1
  45. package/dist/chunk-RFUMT6ZR.js +2 -0
  46. package/dist/{chunk-JWJJZVP3.js.map → chunk-RFUMT6ZR.js.map} +1 -1
  47. package/dist/{chunk-GSGPULRL.js → chunk-RLVHUIFC.js} +2 -2
  48. package/dist/{chunk-GSGPULRL.js.map → chunk-RLVHUIFC.js.map} +1 -1
  49. package/dist/chunk-S26WK6RF.js +2 -0
  50. package/dist/{chunk-54AXLGAK.js.map → chunk-S26WK6RF.js.map} +1 -1
  51. package/dist/{chunk-ONB3FWK5.js → chunk-S7VNSSIK.js} +2 -2
  52. package/dist/{chunk-ONB3FWK5.js.map → chunk-S7VNSSIK.js.map} +1 -1
  53. package/dist/chunk-S7Z6KKIN.js +2 -0
  54. package/dist/chunk-S7Z6KKIN.js.map +1 -0
  55. package/dist/{chunk-2NQ2RZ2M.js → chunk-U5XZWEPO.js} +3 -3
  56. package/dist/{chunk-2NQ2RZ2M.js.map → chunk-U5XZWEPO.js.map} +1 -1
  57. package/dist/chunk-UB22GYFK.js +2 -0
  58. package/dist/{chunk-MRHZN4G4.js.map → chunk-UB22GYFK.js.map} +1 -1
  59. package/dist/chunk-VUZ7GHSO.js +7 -0
  60. package/dist/{chunk-NNISUDZX.js.map → chunk-VUZ7GHSO.js.map} +1 -1
  61. package/dist/chunk-X3SHNHHM.js +2 -0
  62. package/dist/chunk-X3SHNHHM.js.map +1 -0
  63. package/dist/{chunk-XV7U33XQ.js → chunk-YKM3FUGK.js} +3 -3
  64. package/dist/{chunk-XV7U33XQ.js.map → chunk-YKM3FUGK.js.map} +1 -1
  65. package/dist/electron.js +1 -1
  66. package/dist/{entry-CA2QAEHN.js → entry-ROTT3ZDN.js} +2 -2
  67. package/dist/{entry-CA2QAEHN.js.map → entry-ROTT3ZDN.js.map} +1 -1
  68. package/dist/index.d.ts +10 -1
  69. package/dist/index.js +7 -7
  70. package/dist/index.js.map +1 -1
  71. package/dist/list-N4E3VXM5.js +3 -0
  72. package/dist/{list-Q2KAEJ26.js.map → list-N4E3VXM5.js.map} +1 -1
  73. package/dist/list-RCTHBJOK.js +2 -0
  74. package/dist/{list-UMMVRYVD.js.map → list-RCTHBJOK.js.map} +1 -1
  75. package/dist/nextjs.js +1 -1
  76. package/dist/pages-XUJGIHQI.js +5 -0
  77. package/dist/{pages-KZ66JVNU.js.map → pages-XUJGIHQI.js.map} +1 -1
  78. package/dist/plugin-pages-FEQILAQR.js +2 -0
  79. package/dist/{plugin-pages-SR2WSUKZ.js.map → plugin-pages-FEQILAQR.js.map} +1 -1
  80. package/dist/project-selector-U64ROZ5D.js +2 -0
  81. package/dist/project-selector-U64ROZ5D.js.map +1 -0
  82. package/dist/record-links-HO4SEHOA.js +2 -0
  83. package/dist/{record-links-3WZGSVFU.js.map → record-links-HO4SEHOA.js.map} +1 -1
  84. package/dist/root-BUXIQKA5.js +14 -0
  85. package/dist/{root-LFJ5BQSY.js.map → root-BUXIQKA5.js.map} +1 -1
  86. package/dist/root-CCUROZVR.js +2 -0
  87. package/dist/{root-6QTQUYK4.js.map → root-CCUROZVR.js.map} +1 -1
  88. package/dist/root-GQL3P63Z.js +31 -0
  89. package/dist/{root-7BUVDOMV.js.map → root-GQL3P63Z.js.map} +1 -1
  90. package/dist/root-KXY4A6DW.js +2 -0
  91. package/dist/{root-2VBLPRG7.js.map → root-KXY4A6DW.js.map} +1 -1
  92. package/dist/root-MLEJUEMJ.js +23 -0
  93. package/dist/{root-FZLKYL5W.js.map → root-MLEJUEMJ.js.map} +1 -1
  94. package/dist/root-VA3E6HEY.js +2 -0
  95. package/dist/{root-OXS3QQX6.js.map → root-VA3E6HEY.js.map} +1 -1
  96. package/dist/search-YY4GQQRM.js +2 -0
  97. package/dist/{search-AZK3Q2KX.js.map → search-YY4GQQRM.js.map} +1 -1
  98. package/dist/skills-pages-SAOZTUOH.js +2 -0
  99. package/dist/{skills-pages-7IYBJ4QI.js.map → skills-pages-SAOZTUOH.js.map} +1 -1
  100. package/dist/source-2S24MZ5D.js +2 -0
  101. package/dist/{source-4BP5PJ2N.js.map → source-2S24MZ5D.js.map} +1 -1
  102. package/dist/spec-renderer-ZSIVMKVE.js +2 -0
  103. package/dist/{spec-renderer-3GAVSV52.js.map → spec-renderer-ZSIVMKVE.js.map} +1 -1
  104. package/dist/tanstack-start.js +1 -1
  105. package/dist/ui.js +1 -1
  106. package/dist/user-nav-ZH63YHX7.js +2 -0
  107. package/dist/{user-nav-OWTTAXZS.js.map → user-nav-ZH63YHX7.js.map} +1 -1
  108. package/package.json +4 -4
  109. package/dist/activity-nav-button-E4I4YC3X.js +0 -2
  110. package/dist/chat-page-7UB3BMBF.js +0 -4
  111. package/dist/chunk-2NXQF2F7.js +0 -2
  112. package/dist/chunk-32ZU4MLE.js +0 -2
  113. package/dist/chunk-32ZU4MLE.js.map +0 -1
  114. package/dist/chunk-54AXLGAK.js +0 -2
  115. package/dist/chunk-5AJXR47U.js +0 -2
  116. package/dist/chunk-5LGIALCK.js +0 -2
  117. package/dist/chunk-6NRQMG26.js +0 -2
  118. package/dist/chunk-6NRQMG26.js.map +0 -1
  119. package/dist/chunk-AKQ6ELDX.js +0 -2
  120. package/dist/chunk-AKQ6ELDX.js.map +0 -1
  121. package/dist/chunk-DGIY4SKN.js +0 -7
  122. package/dist/chunk-DGIY4SKN.js.map +0 -1
  123. package/dist/chunk-HDOIOXMP.js +0 -2
  124. package/dist/chunk-HDOIOXMP.js.map +0 -1
  125. package/dist/chunk-HZOD2HOF.js +0 -3
  126. package/dist/chunk-HZOD2HOF.js.map +0 -1
  127. package/dist/chunk-JAPZBEBZ.js +0 -10
  128. package/dist/chunk-JWJJZVP3.js +0 -2
  129. package/dist/chunk-MRHZN4G4.js +0 -2
  130. package/dist/chunk-NNISUDZX.js +0 -7
  131. package/dist/chunk-O2QMYUPS.js +0 -2
  132. package/dist/chunk-O2QMYUPS.js.map +0 -1
  133. package/dist/chunk-R2O4WC3H.js +0 -4
  134. package/dist/chunk-WPCPL2TQ.js +0 -3
  135. package/dist/chunk-WPCPL2TQ.js.map +0 -1
  136. package/dist/list-Q2KAEJ26.js +0 -3
  137. package/dist/list-UMMVRYVD.js +0 -2
  138. package/dist/pages-KZ66JVNU.js +0 -5
  139. package/dist/plugin-pages-SR2WSUKZ.js +0 -2
  140. package/dist/project-selector-72VM6SUI.js +0 -2
  141. package/dist/project-selector-72VM6SUI.js.map +0 -1
  142. package/dist/record-links-3WZGSVFU.js +0 -2
  143. package/dist/root-2VBLPRG7.js +0 -2
  144. package/dist/root-6QTQUYK4.js +0 -2
  145. package/dist/root-7BUVDOMV.js +0 -31
  146. package/dist/root-FZLKYL5W.js +0 -23
  147. package/dist/root-LFJ5BQSY.js +0 -14
  148. package/dist/root-OXS3QQX6.js +0 -2
  149. package/dist/search-AZK3Q2KX.js +0 -2
  150. package/dist/skills-pages-7IYBJ4QI.js +0 -2
  151. package/dist/source-4BP5PJ2N.js +0 -2
  152. package/dist/spec-renderer-3GAVSV52.js +0 -2
  153. package/dist/user-nav-OWTTAXZS.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flexkit/studio",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "description": "Flexkit Studio - Build custom internal tools like PIMs, CRMs, and ERPs with a flexible React UI and a graph-backed API",
5
5
  "keywords": [
6
6
  "flexkit",
@@ -77,8 +77,8 @@
77
77
  "tsup": "8.5.1",
78
78
  "typescript": "^5.3.3",
79
79
  "eslint-config-custom": "0.0.0",
80
- "tailwind-config": "0.0.1",
81
- "tsconfig": "0.0.0"
80
+ "tsconfig": "0.0.0",
81
+ "tailwind-config": "0.0.1"
82
82
  },
83
83
  "dependencies": {
84
84
  "@ai-sdk/react": "3.0.118",
@@ -198,7 +198,7 @@
198
198
  "test:performance": "tsup --config tests/performance.config.ts && node --test build/tests/list-performance.test.js build/tests/editor-preview.test.js",
199
199
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
200
200
  "ui:add": "pnpm dlx shadcn@latest add",
201
- "test:core": "tsup --config tests/core.config.ts && node --test build/tests/json-schema-to-zod.test.js build/tests/icon-name.test.js build/tests/project-schemas.test.js build/tests/rating-preview.test.js build/tests/last-project.test.js build/tests/proxy-target.test.js build/tests/project-label.test.js build/tests/hosted-session.test.js build/tests/bff-session.test.js build/tests/project-schema-key.test.js build/tests/schema-deploy-watch.test.js build/tests/app-sessions.test.js build/tests/electron-api.test.js build/tests/error-reporter.test.js build/tests/product-events.test.js build/tests/login-providers.test.js build/tests/line-diff.test.js",
201
+ "test:core": "tsup --config tests/core.config.ts && node --test build/tests/json-schema-to-zod.test.js build/tests/icon-name.test.js build/tests/project-schemas.test.js build/tests/rating-preview.test.js build/tests/last-project.test.js build/tests/proxy-target.test.js build/tests/project-label.test.js build/tests/hosted-session.test.js build/tests/bff-session.test.js build/tests/project-schema-key.test.js build/tests/schema-deploy-watch.test.js build/tests/app-sessions.test.js build/tests/electron-api.test.js build/tests/error-reporter.test.js build/tests/product-events.test.js build/tests/login-providers.test.js build/tests/line-diff.test.js build/tests/create-project.test.js",
202
202
  "test:ai": "tsup --config tests/ai.config.ts && node --test build/tests/ai/*.test.js",
203
203
  "test:knowledge": "tsup --config tests/knowledge.config.ts && node --test build/tests/knowledge/*.test.js",
204
204
  "test:graph": "tsup --config tests/graph.config.ts && node --test build/tests/graph/*.test.js",
@@ -1,2 +0,0 @@
1
- import'./index.css';export{b as ActivityNavButton,a as useActivitySummary}from'./chunk-ERCVR23U.js';import'./chunk-U6VZY3V2.js';import'./chunk-7KLXWCDS.js';import'./chunk-HKN6BX5U.js';import'./chunk-5CVDMZUI.js';import'./chunk-USNXQOMJ.js';import'./chunk-6NRQMG26.js';import'./chunk-O2QMYUPS.js';//# sourceMappingURL=activity-nav-button-E4I4YC3X.js.map
2
- //# sourceMappingURL=activity-nav-button-E4I4YC3X.js.map
@@ -1,4 +0,0 @@
1
- import'./index.css';import {a}from'./chunk-JWJJZVP3.js';import {f as f$2,b,c,g as g$1,a as a$1,e as e$1,d}from'./chunk-CSUHZFEP.js';import {x,A,u,t,H,o,m,l,n,p,y,r,s,w,v as v$1,k,e as e$2,G,D,B,g as g$2,j,h,f as f$3,z,F,I,E,q}from'./chunk-JAPZBEBZ.js';import {a as a$2,c as c$2,b as b$2}from'./chunk-ELOJGLAR.js';import'./chunk-QSTWBKPN.js';import {c as c$3}from'./chunk-5LGIALCK.js';import {g,f as f$1,a as a$4}from'./chunk-U6VZY3V2.js';import'./chunk-GSGPULRL.js';import'./chunk-2NXQF2F7.js';import'./chunk-V7C4EHK3.js';import'./chunk-7KLXWCDS.js';import'./chunk-HKN6BX5U.js';import {f}from'./chunk-HZOD2HOF.js';import'./chunk-WPCPL2TQ.js';import'./chunk-5CVDMZUI.js';import {Rb,O,Pb,ab,bb,db,Xb,_b,Yb,Zb,$b,ac,cc,dc,ec,Vb,hc,ic,lc,jc,kc,Kc,gc}from'./chunk-DGIY4SKN.js';import'./chunk-SZEGGBOC.js';import {v}from'./chunk-32ZU4MLE.js';import'./chunk-U45E5X3H.js';import'./chunk-HDOIOXMP.js';import {b as b$1,c as c$1,e}from'./chunk-USNXQOMJ.js';import {b as b$3}from'./chunk-6NRQMG26.js';import {a as a$3}from'./chunk-O2QMYUPS.js';import {useRef,useMemo,useState,useEffect,useLayoutEffect}from'react';import {LoaderCircle,CornerDownRightIcon,CheckIcon,CopyIcon,PencilIcon}from'lucide-react';import {useParams,useNavigate}from'react-router-dom';import ie,{useSWRConfig}from'swr';import {jsx,jsxs}from'react/jsx-runtime';function jt(e,t){let r=Date.parse(e.createdAt)-Date.parse(t.createdAt);return Number.isFinite(r)&&r!==0?r:e.createdAt!==t.createdAt?e.createdAt<t.createdAt?-1:1:e.id===t.id?0:e.id<t.id?-1:1}function le(e){return [...new Map(e.map(r=>[r.id,r])).values()].sort(jt)}function ke(e,t){if(!t)return e;if(!e)return t;let r=new Set(t.messages.map(c=>c.id)),a=t.messages[t.messages.length-1],s=e.messages.filter(c=>!r.has(c.id)&&(!a||jt(c,a)>0));return s.length===0?t:{...t,messages:le([...t.messages,...s])}}function an(e){return e==="pending"||e==="streaming"||e==="awaiting_approval"}function Qt(e){return e==="queued"||e==="steering"}function Ce(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.role==="assistant"){if(!an(r.status))break;return {after:e.slice(t+1),before:e.slice(0,t),live:r}}}return {after:[],before:e,live:null}}function _e(e){return e==="steering"?"Picked up at the next step":e==="queued"?"Sends when this turn ends":null}function Ot(e){let t=new Set;for(let r of e)if(!(r.role!=="assistant"||!Array.isArray(r.parts)))for(let a of r.parts){let s=a.type==="data-mid-turn-message"?a.data?.messageId:null;typeof s=="string"&&t.add(s);}return t}function ve(e){return e.find(t=>t.role==="user"&&t.status==="queued"&&t.kind!=="monitor_event")??null}function $t(e){return e.streaming&&!e.hasDraft?"stop":"send"}var mn=6e4,qt=15e3;function hn(e){if(!e)return 0;if(Ce(e.messages).live||ve(e.messages))return y;if(!e.messages.some(a=>a.role==="assistant"&&a.status==="complete"))return (e.monitors?.length??0)>0?qt:0;let r=new Date(e.chat.lastMessageAt??e.chat.updatedAt).getTime();return Date.now()-r<mn?y:(e.monitors?.length??0)>0?qt:0}function An(e,t,r){return {chat:{createdAt:r,id:e,lastMessageAt:r,modelId:t,title:null,updatedAt:r},messages:[],pendingApproval:null}}function Xt(e,t,r,a,s,c){return e||(t?{chat:t,messages:[],pendingApproval:null}:r||An(a,s,c))}function zt(e,t){let r=new Set([t.userMessage.id,t.assistantMessage.id]);return {...e,messages:le([...e.messages.filter(a=>!r.has(a.id)),t.userMessage,t.assistantMessage])}}function kn(e,t){return {...e,messages:le([...e.messages.filter(r=>r.id!==t.id),t])}}function Cn(e,t,r){return t?ke(e[t],r):r}function vn(e){return e==="awaiting_approval"?"awaiting_approval":e==="complete"?"success":e==="failed"?"failed":"running"}function Le({attachments:e$1=[],label:t,text:r}){let{textInput:a}=Pb(),[s,c]=useState(false),u=r.trim().length>0;async function C(){await navigator.clipboard.writeText(r),c(true),setTimeout(()=>c(false),1500);}return jsxs("div",{className:"fk:group fk:ml-auto fk:flex fk:w-fit fk:max-w-[70%] fk:flex-col fk:items-end fk:gap-1",children:[jsx(q,{attachments:e$1}),u?jsx("div",{className:"fk:whitespace-pre-wrap fk:rounded-xl fk:bg-muted fk:dark:bg-white/20 fk:px-3.5 fk:py-2 fk:text-base fk:corner-squircle",children:r}):null,t?jsxs("span",{className:"fk:inline-flex fk:items-center fk:gap-1 fk:text-xs fk:text-muted-foreground",children:[jsx(CornerDownRightIcon,{className:"fk:size-3 fk:shrink-0"}),t]}):null,jsxs("div",{className:u?"fk:flex fk:gap-0.5 fk:opacity-0 fk:transition-opacity fk:group-hover:opacity-100":"fk:hidden",children:[jsxs(b$1,{children:[jsx(c$1,{asChild:true,children:jsx(b$3,{"aria-label":"Copy prompt",className:"fk:size-6 fk:text-muted-foreground",size:"icon",variant:"ghost",onClick:()=>{C();},children:s?jsx(CheckIcon,{className:"fk:size-3.5"}):jsx(CopyIcon,{className:"fk:size-3.5"})})}),jsx(e,{children:"Copy"})]}),jsxs(b$1,{children:[jsx(c$1,{asChild:true,children:jsx(b$3,{"aria-label":"Edit prompt",className:"fk:size-6 fk:text-muted-foreground",size:"icon",variant:"ghost",onClick:()=>a.setInput(r),children:jsx(PencilIcon,{className:"fk:size-3.5"})})}),jsx(e,{children:"Edit"})]})]})]})}function Wt(e){let r=e.find(a=>a.type==="data-suggested-prompt")?.data?.prompt;return typeof r=="string"&&r.trim()?r:null}function Vt({prompt:e}){let{textInput:t}=Pb();return jsx("div",{className:"fk:flex fk:justify-start",children:jsxs("button",{className:"fk:inline-flex fk:max-w-full fk:items-center fk:gap-1.5 fk:rounded-full fk:border fk:border-border/70 fk:bg-muted/40 fk:px-3 fk:py-1.5 fk:text-left fk:text-sm fk:text-muted-foreground fk:transition-colors fk:hover:border-border fk:hover:bg-muted fk:hover:ext-foreground fk:corner-squircle",title:"Use as your next message",type:"button",onClick:()=>t.setInput(e),children:[jsx(CornerDownRightIcon,{className:"fk:size-3 fk:shrink-0"}),jsx("span",{className:"fk:truncate",children:e})]})})}function yn({api:e,part:t,partIndex:r,parts:a}){return t.type.startsWith("tool-")?t.state==="output-error"?jsx(G,{message:t.errorText??"The tool call failed."}):null:jsx(F,{api:e,part:t,partIndex:r,parts:a})}function Gt({api:e,message:t,showSuggestion:r$1=false}){if(t.kind==="monitor_event"){let u=r(t);return u?jsx(s,{data:u,error:t.error}):null}if(t.kind==="plugin_connected"){let u=w(t.parts);return u?jsx(v$1,{data:u,error:t.error,label:_e(t.status)}):null}if(t.role==="user")return jsx(Le,{attachments:k(t.parts),label:_e(t.status),text:t.textContent});let a=(Array.isArray(t.parts)?t.parts:[]).filter(u=>!e$2(u)&&!(u.type.startsWith("tool-")&&u.state!=="output-error")),s$1=a.some(u=>u.type==="data-turn-error"),c=r$1&&!t.error?Wt(a):null;return a.length===0&&!t.error?null:jsxs("div",{className:"fk:w-full fk:min-w-0 fk:space-y-8",children:[a.map((u,C)=>jsx(yn,{api:e,part:u,partIndex:C,parts:a},u.toolCallId??`${t.id}-${C.toString()}`)),t.error&&!s$1?jsx(G,{message:t.error}):null,c?jsx(Vt,{prompt:c}):null]})}function Sn({api:e,chatId:t,detail:r,message:a,onMidTurnDelivered:s,onStatusChange:c,onTurnUpdated:u,questionAnsweredSignal:C}){let $=vn(a.status),y=a.workflowRunId?e.getAgentChatStreamUrl(t,a.workflowRunId):"",[H,x]=useState(0),[p,A]=useState(false),[S,R]=useState({}),B$1=useRef(null),{message:m,status:M}=D(y,{decidedApprovals:S,recordStatus:$,resumeToken:H,suppressApprovalPause:p}),D$1=useMemo(()=>m?[{...m,parts:m.parts.filter(d=>!e$2(d))}]:[],[m]),q=B(D$1),j$1=useRef(u);j$1.current=u;let X=useRef(c);X.current=c;let N=useMemo(()=>({answerQuestion:async(d,O)=>{let{question:K}=await e.answerAgentChatQuestion(t,d,O);return A(true),x(V=>V+1),j$1.current(),K??null},onApprovalDecided:(d,O)=>{d&&O&&O!=="pending"&&R(K=>({...K,[d]:O})),!(d&&B$1.current===d)&&(d&&(B$1.current=d),A(true),x(K=>K+1),j$1.current());}}),[e,t]);useEffect(()=>{x(0),A(false),B$1.current=null,R({});},[a.id]);let f=useRef(C);useEffect(()=>{C!==f.current&&(f.current=C,C?.messageId===a.id&&(A(true),x(d=>d+1)));},[a.id,C]),useEffect(()=>{p&&a.status==="streaming"&&A(false);},[a.status,p]),useEffect(()=>{(M==="finished"||M==="paused")&&j$1.current();},[M]);let _=(m?.parts??[]).filter(d=>d.type==="data-mid-turn-message").map(d=>String(d.data?.messageId??"")).join(`
2
- `),W=useRef(s);W.current=s,useEffect(()=>{_&&W.current(_.split(`
3
- `));},[_]);let i=!p&&a.status!=="streaming"&&(a.status==="awaiting_approval"||M==="paused"||g$2(m)||j(m)),Q=useMemo(()=>new Set(h(m)),[m]),U=r.pendingApproval&&!Q.has(r.pendingApproval.id)?r.pendingApproval:null,J=m?.parts[m.parts.length-1],b=J?.type==="text"&&J.state==="streaming",Z=j(m)?"Waiting for your answer":"Awaiting approval",L=i?Z:f$3(m)??"Thinking",I$1=i?M!=="finished"&&M!=="error":M==="streaming"&&!b;useEffect(()=>{X.current({label:L,visible:I$1});},[L,I$1]);let ee=!!U&&i,oe=M==="finished"?Wt(q.flatMap(d=>d.parts)):null;return q.length===0&&!ee?jsx(z.Provider,{value:N,children:null}):jsx(z.Provider,{value:N,children:jsxs("div",{className:"fk:w-full fk:min-w-0 fk:space-y-8",children:[q.map(d=>jsx("div",{className:"fk:space-y-8 fk:min-w-0",children:d.parts.map((O,K)=>jsx(F,{api:e,part:O,partIndex:K,parts:d.parts},K))},d.id)),U&&ee?jsx(I,{api:e,message:E(U)}):null,oe?jsx(Vt,{prompt:oe}):null]})})}function Mn({draftKey:e}){let{textInput:t}=Pb(),{setInput:r,value:a}=t,s=useRef(null);return useLayoutEffect(()=>{if(s.current===e){c$2(e,a);return}s.current=e;let c=b$2(e);c!==a&&r(c);},[e,r,a]),null}function wn({api:e,effort:t,modelKey:r,modelPending:a,models:s,onEffortChange:c$1,onError:u,onModelChange:C,onSend:$,onStop:y,placeholder:H,sending:x,streaming:p$1}){let{attachments:A,textInput:S}=Pb(),R=o(e,u),{currentProjectId:B}=f(),{data:m$1,error:M}=ie(B?`/api/flexkit/${B}/plugins`:null,f$1),D=useRef(false),q=s.filter(i=>!i.deprecated||b(i)===r),j=c(s,r),X=e$1(j),N=d(j,t),f$2=S.value.trim().length>0||A.files.length>0,_=$t({hasDraft:f$2,streaming:p$1}),W=f$2&&!R.isUploading&&!x&&!a;return jsxs(Xb,{accept:n,className:"fk:mx-auto fk:max-w-4xl",maxFileSize:l,maxFiles:m,multiple:true,onError:i=>u(i.message),onSubmit:({text:i})=>{let Q=i?.trim()??"",U=R.getUploaded(A.files.map(b=>b.id));if(!Q&&U.length===0||R.isUploading||x||D.current||a||!m$1&&!M&&B)return Promise.reject(new Error("The message cannot be sent right now."));let J=c$3(Q,m$1?.plugins??[]);return J?(S.setInput(J.tokens.reduce((b,Z)=>b.split(Z).join(""),i)),u(`That looks like a ${J.label}. It was removed from your message: connect ${J.plugin.name} from its connect card or AI \u2192 Plugins instead, where it is stored encrypted and never shown to the agent.`),Promise.reject(new Error("The message contains a plugin token."))):(D.current=true,S.clear(),$(Q,U).catch(b=>{throw S.setInput(i),b}).finally(()=>{D.current=false;}))},children:[A.files.length>0?jsx(_b,{children:jsx(p,{uploads:R})}):null,jsx(Yb,{children:jsx(Zb,{disabled:x,placeholder:H})}),jsxs($b,{children:[jsxs(ac,{children:[jsxs(cc,{children:[jsx(dc,{"aria-label":"Add attachments",className:"fk:border-0 fk:bg-border fk:corner-round",disabled:x,tooltip:"Add photos or files"}),jsx(ec,{children:jsx(Vb,{})})]}),q.length>0?jsxs(hc,{value:r??void 0,onValueChange:C,children:[jsx(ic,{"aria-label":"Model",className:"fk:min-w-44",children:jsx(lc,{placeholder:"Model"})}),jsx(jc,{children:q.map(i=>jsx(kc,{value:b(i),children:i.name},b(i)))})]}):null,X.length>1&&N?jsxs(hc,{value:N,onValueChange:c$1,children:[jsx(ic,{"aria-label":"Reasoning effort",className:"fk:min-w-28",children:jsx(lc,{placeholder:"Effort"})}),jsx(jc,{children:X.map(i=>jsx(kc,{value:i.value,children:i.label},i.value))})]}):null]}),jsxs("div",{className:"fk:flex fk:items-center fk:gap-3",children:[jsx(Kc,{disabled:x,onAudioRecorded:async(i,Q)=>{let{text:U}=await e.transcribeAgentAudio(i,Q);return U},onError:i=>u(i.message),onTranscriptionChange:i=>{u(null),S.setInput(a$4(S.value,i));}}),jsx(gc,{className:"fk:corner-round",disabled:_==="stop"?false:!W,status:_==="stop"?"streaming":void 0,onStop:()=>{y();}})]})]})]})}var Ue={chatId:null,error:null,loading:false,older:[],page:null},In=3e3;function Pn({api:e,chatId:t,projectId:r,pendingFollowUp:a,pendingMessage:s,questionAnsweredSignal:c,resolveDetail:u}){let{data:C,mutate:$}=ie(t?g(r).agentChat(t):null,f$1,{refreshInterval:0}),y=u(C),[H$1,x]=useState(Ue),p=H$1.chatId===t?H$1:Ue,A=useRef(t);A.current=t;let S=(o,v)=>x(w=>{if(w.chatId!==o&&A.current!==o)return w;let F=w.chatId===o?w:{...Ue,chatId:o};return {...F,...v(F)}}),R=useRef({chatId:null,messages:[]}),B=y?.messages;useEffect(()=>{let o=R.current,v=B??[];if(R.current={chatId:t,messages:v},!t||o.chatId!==t)return;let w=new Set(v.map(k=>k.id)),F=o.messages.filter(k=>!w.has(k.id));F.length>0&&S(t,k=>({older:le([...k.older,...F])}));},[t,B]);let m=new Set(y?.messages.map(o=>o.id)??[]),M=[...p.older.filter(o=>!m.has(o.id)),...y?.messages??[]],D=useRef(y);D.current=y;let q=useRef(void 0);ie(t?`${g(r).agentChat(t)}?view=status`:null,f$1,{refreshInterval:()=>hn(D.current),onSuccess:o=>{let v=JSON.stringify(o),w=q.current;q.current=v;let{current:F}=D,k=F?[...F.messages].reverse().find(te=>te.role==="assistant"):void 0;(w&&w!==v||k&&o.latestMessage&&(k.id!==o.latestMessage.id||k.status!==o.latestMessage.status||k.workflowRunId!==o.latestMessage.workflowRunId||F?.chat.updatedAt!==o.chat.updatedAt))&&$();}});let j=async()=>{let o=p.page?.cursor??y?.nextCursor;if(!t||!o||p.loading)return;let v=t;S(v,()=>({error:null,loading:true}));try{let w=await f$1(`${g(r).agentChat(v)}?before=${encodeURIComponent(o)}`);S(v,F=>({loading:!1,older:le([...w.messages,...F.older]),page:{cursor:w.nextCursor??null,hasMore:w.hasMore??!1}}));}catch{S(v,()=>({error:"Could not load earlier messages. Try again.",loading:false}));}},{after:X,before:N,live:f}=Ce(M),[_,W]=useState({ids:[],messageId:""}),i=Ot(M);for(let o of f&&_.messageId===f.id?_.ids:[])i.add(o);let Q=X.filter(o=>Qt(o.status)&&!i.has(o.id)),U=N.filter(o=>!i.has(o.id)),b=(!f&&!s?ve(M):null)?.id??null,[Z,L]=useState(0),I=useRef(null);useEffect(()=>{if(!t||!b||I.current===b)return;I.current=b;let o=false,v=null;return e.startQueuedAgentChatMessage(t,b).then(()=>{},()=>{v=setTimeout(()=>{o||L(w=>w+1);},In);}).finally(()=>{I.current=null,$();}),()=>{o=true,v&&clearTimeout(v);}},[e,t,$,b,Z]);let[ee,oe]=useState(null),d=f&&ee?.messageId===f.id?ee.status:null;if(t&&!y&&!s)return jsxs("div",{className:"fk:flex fk:flex-1 fk:items-center fk:justify-center fk:gap-2 fk:text-sm fk:text-muted-foreground",children:[jsx(LoaderCircle,{className:"fk:size-4 fk:animate-spin"}),"Loading chat..."]});let O=!!s||!!f,K=[...U].reverse().find(o=>o.role==="assistant")?.id??null,V=f?d?.label??"Thinking":"Sending",se=f?d?.visible??true:true;return jsxs(ab,{className:"fk:h-0 fk:min-h-0 fk:flex-1",children:[jsx(bb,{className:"fk:gap-0 fk:p-0",children:jsxs("div",{className:"fk:mx-auto fk:w-full fk:max-w-4xl fk:space-y-5 fk:pb-6 fk:pr-4",children:[p.page?.hasMore??y?.hasMore?jsx(b$3,{variant:"ghost",disabled:p.loading,onClick:()=>{j();},children:p.loading?"Loading\u2026":"Load earlier messages"}):null,p.error?jsx("p",{role:"alert",children:p.error}):null,U.map(o=>jsx(Gt,{api:e,message:o,showSuggestion:!O&&o.id===K},o.id)),f&&t&&y?jsx(Sn,{api:e,chatId:t,detail:y,message:f,onMidTurnDelivered:o=>W({ids:o,messageId:f.id}),onStatusChange:o=>oe({messageId:f.id,status:o}),onTurnUpdated:()=>{$();},questionAnsweredSignal:c}):null,s&&!f?jsx(Le,{attachments:s.attachments,text:s.text}):null,O?jsx(H,{label:V,visible:se}):null,Q.map(o=>jsx(Gt,{api:e,message:o},o.id)),a&&f?jsx(Le,{attachments:a.attachments,text:a.text}):null]})}),jsx(db,{})]})}var Jt=["Where should we begin?","Ready when you are","What\u2019s on the agenda today?","What\u2019s on your mind today?"];function Tn(e){return [`How can I help, ${e}?`,`Good to see you, ${e}.`,`Hey, ${e}. Ready to dive in?`]}function xn(e){let t=e?[...Jt,...Tn(e)]:Jt;return t[Math.floor(Math.random()*t.length)]??"How can I help?"}var Zt="flexkit-ai:lastModelId",Ke="flexkit-ai:lastEffort";function bn(){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(Zt);return e?{effort:localStorage.getItem(Ke),modelKey:e}:null}catch{return null}}function En(e){return e.selectedModelKey?{effort:e.selectedEffort,modelKey:e.selectedModelKey}:e.awaitingChatModel?{effort:null,modelKey:null}:e.chatSelection?{effort:e.selectedEffort??e.chatSelection.effort,modelKey:e.chatSelection.modelKey}:e.lastUsed?{effort:e.selectedEffort??e.lastUsed.effort,modelKey:e.lastUsed.modelKey}:{effort:e.selectedEffort,modelKey:e.defaultModelKey}}function Rn(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Zt,e.modelKey),e.effort?localStorage.setItem(Ke,e.effort):localStorage.removeItem(Ke);}catch{}}function Dn({projectId:e}){let{data:t,isLoading:r}=ie(g(e).agentProfile(),f$1),a=useMemo(()=>r?null:xn(t?.preferredName??null),[t,r]);return jsx("div",{className:"fk:flex fk:flex-col fk:items-center fk:pb-2 fk:text-center",children:jsx("h2",{className:"fk:text-2xl fk:font-semibold",children:a??"\xA0"})})}function er(){let{api:e$1,projectId:t$1}=x(),{currentProject:r,projectSummaries:a$4}=f(),{chatId:s}=useParams(),c$2=useNavigate(),u$1=a(),{mutate:C}=useSWRConfig(),{data:$}=ie(t$1?g(t$1).tools():null,f$1),{data:y}=ie(t$1&&s?g(t$1).agentChat(s):null,f$1),H=useRef({});function x$1(l){return Cn(H.current,s,l)}let p=x$1(y),A$1=useMemo(()=>$?.tools.models??[],[$]),[S,R]=useState(null),[B,m]=useState(null),M=useRef(null),[D,q]=useState(bn),[j,X]=useState(false),N=useRef(false),[f$3,_]=useState(null),W=f$3&&f$3.chatId===s?f$3:void 0,[i,Q]=useState(null),[U,J]=useState(null),b$2=i&&i.chatId===s?i:void 0,[Z,L]=useState(null),I=p?.chat.modelId??null,ee=!!s&&p===void 0,oe=useMemo(()=>f$2(I,A$1)??(I?{effort:null,modelKey:I}:null),[I,A$1]),d=useMemo(()=>{let l=A$1.find(h=>!h.deprecated);return l?b(l):null},[A$1]),O$1=useMemo(()=>{let l=c(A$1,D?.modelKey??null);return D&&l&&!l.deprecated?D:null},[A$1,D]),{effort:K,modelKey:V}=En({awaitingChatModel:ee,chatSelection:oe,defaultModelKey:d,lastUsed:O$1,selectedEffort:B,selectedModelKey:S}),se=V?g$1({effort:K,modelKey:V},A$1):null,o=ee&&!S;useEffect(()=>{M.current=null,R(null),m(null),L(null);},[s]),useEffect(()=>{S===a$1&&I&&I!==a$1&&I!==M.current&&(R(null),m(null));},[I,S]);function v$1(l){q(l),Rn(l);}function w(l){M.current=l===a$1?I:null,R(l),m(null),v$1({effort:null,modelKey:l});}function F(l){m(l),V&&v$1({effort:l,modelKey:V});}if(!t$1||!e$1)return jsx("div",{className:"fk:flex fk:h-full fk:items-center fk:justify-center fk:text-sm fk:text-muted-foreground",children:"Select a project to chat with the agent."});let k=e$1,te=t$1,en=r?.title??a$4.find(l=>l.id===t$1)?.name??"your project",Fe=!s&&!W,ce=!!(p&&Ce(p.messages).live);async function tn(l,h,z){Q({attachments:z,chatId:l,text:h});try{let P=await k.sendAgentChatFollowUp(l,{attachments:z,content:h,modelId:se});if("question"in P){J({messageId:P.question.chatMessageId}),await C(g(te).agentChat(l));return}await He(l,P);}finally{Q(null);}}async function He(l,h){await C(g(te).agentChat(l),z=>{let P=Xt(ke(H.current[l],z),null,y,l,se,"turn"in h?h.turn.userMessage.createdAt:h.followUp.message.createdAt),ae="turn"in h?zt(P,h.turn):kn(P,h.followUp.message);return H.current[l]=ae,ae},{revalidate:false});}let nn={onConnected:async l=>{if(!s)return;let h=s;try{await He(h,await k.announcePluginConnected(h,l));}catch(z){L(z instanceof Error?z.message:"The agent could not continue after the connection.");}}};async function Be(l,h){if(N.current)throw new Error("A message is already being sent.");if(o)throw new Error("This chat is still loading.");N.current=true,X(true),L(null);let z=p?ve(p.messages):null;if(s&&(ce||z)){try{!ce&&z&&await k.startQueuedAgentChatMessage(s,z.id).catch(()=>{}),await tn(s,l,h);}catch(P){throw L(P instanceof Error?P.message:"Failed to send the message."),P}finally{N.current=false,X(false);}return}_({attachments:h,chatId:s,text:l});try{let P=s?{chat:null,turn:await k.sendAgentChatMessage(s,{attachments:h,content:l,modelId:se})}:await k.startAgentChat({attachments:h,content:l,modelId:se}),{chat:ae,turn:je}=P,fe=s??ae.id;await C(g(te).agentChat(fe),sn=>{let Qe=zt(Xt(ke(H.current[fe],sn),ae,y,fe,se,je.userMessage.createdAt),je);return H.current[fe]=Qe,Qe},{revalidate:!1}),ae&&c$2(`${u$1}/chats/${ae.id}`),_(null);}catch(P){throw _(null),L(P instanceof Error?P.message:"Failed to send the message."),P}finally{N.current=false,X(false);}}async function rn(){if(s)try{await k.stopAgentChat(s);}catch(l){L(l instanceof Error?l.message:"Failed to stop the turn.");}finally{await C(g(te).agentChat(s));}}return jsxs(Rb,{children:[jsx(Mn,{draftKey:a$2(te,s)}),jsxs("div",{className:"fk:flex fk:h-full fk:min-h-0 fk:flex-col fk:gap-2",children:[jsxs("div",{className:"fk:mb-2 fk:flex fk:shrink-0 fk:items-start fk:gap-2",children:[jsxs(b$1,{children:[jsx(c$1,{asChild:true,children:jsx(O,{className:"fk:-ml-1 fk:h-4 fk:w-4"})}),jsx(e,{children:"Toggle Sidebar"})]}),jsx(v,{orientation:"vertical",className:"fk:mt-1 fk:h-4"}),jsx("div",{className:"fk:flex fk:flex-1 fk:items-center fk:gap-2",children:jsx("h1",{className:"fk:truncate fk:text-lg fk:font-semibold fk:leading-none fk:tracking-tight",children:s?p?.chat.title?.trim()??"Chat":"Agent"})})]}),jsx("div",{className:"fk:flex fk:min-h-0 fk:flex-1 fk:gap-4",children:jsxs("div",{className:a$3("fk:flex fk:min-h-0 fk:min-w-0 fk:flex-1 fk:flex-col fk:gap-3",Fe&&"fk:justify-center fk:pb-[12vh]"),children:[Fe?jsx(Dn,{projectId:te}):jsx(A.Provider,{value:true,children:jsx(u.Provider,{value:nn,children:jsx(Pn,{api:k,chatId:s??null,pendingFollowUp:b$2,pendingMessage:W,projectId:t$1,questionAnsweredSignal:U,resolveDetail:x$1})})}),jsxs("div",{className:"fk:shrink-0 fk:pb-3",children:[s?jsx(t,{api:k,chatId:s,projectId:t$1,sending:j||o,onTurnIntoAutomation:l=>{N.current||o||Be(`Turn the monitor \u201C${l.description}\u201D into an automation.`,[]).catch(h=>L(h instanceof Error?h.message:"Failed to send the message."));}}):null,Z?jsx("p",{className:"fk:mx-auto fk:mb-2 fk:max-w-4xl fk:text-xs fk:text-destructive",children:Z}):null,jsx(wn,{api:k,effort:K,modelKey:V,modelPending:o,models:A$1,sending:j,streaming:ce,onEffortChange:F,onError:L,onModelChange:w,onSend:Be,onStop:rn,placeholder:ce?"Add context or steer the agent...":`Ask Flexkit anything about ${en}...`})]})]})})]})]})}export{er as AgentChatPage};//# sourceMappingURL=chat-page-7UB3BMBF.js.map
4
- //# sourceMappingURL=chat-page-7UB3BMBF.js.map
@@ -1,2 +0,0 @@
1
- import'./index.css';import {b}from'./chunk-6NRQMG26.js';import {a}from'./chunk-O2QMYUPS.js';import {AlertDialog}from'radix-ui';import {jsx,jsxs}from'react/jsx-runtime';function p({...t}){return jsx(AlertDialog.Root,{"data-slot":"alert-dialog",...t})}function s({...t}){return jsx(AlertDialog.Portal,{"data-slot":"alert-dialog-portal",...t})}function d({className:t,...a$1}){return jsx(AlertDialog.Overlay,{"data-slot":"alert-dialog-overlay",className:a("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",t),...a$1})}function u({className:t,size:a$1="default",...i}){return jsxs(s,{children:[jsx(d,{}),jsx(AlertDialog.Content,{"data-slot":"alert-dialog-content","data-size":a$1,className:a("fk:group/alert-dialog-content fk:fixed fk:top-[50%] fk:left-[50%] fk:z-50 fk:grid fk:w-full fk:max-w-[calc(100%-2rem)] fk:translate-x-[-50%] fk:translate-y-[-50%] fk:gap-4 fk:rounded-lg fk:border fk:bg-background fk:p-6 fk:shadow-lg fk:duration-200 fk:data-[size=sm]:max-w-xs fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95 fk:data-[size=default]:sm:max-w-lg fk:corner-squircle",t),...i})]})}function k({className:t,...a$1}){return jsx("div",{"data-slot":"alert-dialog-header",className:a("fk:grid fk:grid-rows-[auto_1fr] fk:place-items-center fk:gap-1.5 fk:text-center fk:has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] fk:has-data-[slot=alert-dialog-media]:gap-x-6 fk:sm:group-data-[size=default]/alert-dialog-content:place-items-start fk:sm:group-data-[size=default]/alert-dialog-content:text-left fk:sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",t),...a$1})}function P({className:t,...a$1}){return jsx("div",{"data-slot":"alert-dialog-footer",className:a("fk:flex fk:flex-col-reverse fk:gap-2 fk:group-data-[size=sm]/alert-dialog-content:grid fk:group-data-[size=sm]/alert-dialog-content:grid-cols-2 fk:sm:flex-row fk:sm:justify-end",t),...a$1})}function A({className:t,...a$1}){return jsx(AlertDialog.Title,{"data-slot":"alert-dialog-title",className:a("fk:text-lg fk:font-semibold fk:sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",t),...a$1})}function D({className:t,...a$1}){return jsx(AlertDialog.Description,{"data-slot":"alert-dialog-description",className:a("fk:text-sm fk:text-muted-foreground",t),...a$1})}function v({className:t,variant:a$1="default",size:i="default",...r}){return jsx(b,{variant:a$1,size:i,asChild:true,children:jsx(AlertDialog.Action,{"data-slot":"alert-dialog-action",className:a(t),...r})})}function z({className:t,variant:a$1="outline",size:i="default",...r}){return jsx(b,{variant:a$1,size:i,asChild:true,children:jsx(AlertDialog.Cancel,{"data-slot":"alert-dialog-cancel",className:a(t),...r})})}export{p as a,s as b,u as c,k as d,P as e,A as f,D as g,v as h,z as i};//# sourceMappingURL=chunk-2NXQF2F7.js.map
2
- //# sourceMappingURL=chunk-2NXQF2F7.js.map
@@ -1,2 +0,0 @@
1
- import'./index.css';import {b as b$1}from'./chunk-6NRQMG26.js';import {a}from'./chunk-O2QMYUPS.js';import {Slot,Dialog,Separator,ScrollArea}from'radix-ui';import {cva}from'class-variance-authority';import {jsx,jsxs}from'react/jsx-runtime';import {XIcon,SearchIcon}from'lucide-react';import {Command}from'cmdk';var D=cva("fk:inline-flex fk:w-fit fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:overflow-hidden fk:rounded-full fk:border fk:border-transparent fk:px-2 fk:py-0.5 fk:text-xs fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&>svg]:pointer-events-none fk:[&>svg]:size-3 fk:corner-squircle",{variants:{variant:{default:"fk:bg-primary fk:text-primary-foreground fk:[a&]:hover:bg-primary/90",secondary:"fk:bg-secondary fk:text-secondary-foreground fk:[a&]:hover:bg-secondary/90",destructive:"fk:bg-destructive fk:text-white fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40 fk:[a&]:hover:bg-destructive/90",outline:"fk:border-border fk:text-foreground fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground",ghost:"fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground",link:"fk:text-primary fk:underline-offset-4 fk:[a&]:hover:underline"}},defaultVariants:{variant:"default"}});function F({className:t,variant:o="default",asChild:r=false,...i}){let c=r?Slot.Root:"span";return jsx(c,{"data-slot":"badge","data-variant":o,className:a(D({variant:o}),t),...i})}function g({...t}){return jsx(Dialog.Root,{"data-slot":"dialog",...t})}function W({...t}){return jsx(Dialog.Trigger,{"data-slot":"dialog-trigger",...t})}function S({...t}){return jsx(Dialog.Portal,{"data-slot":"dialog-portal",...t})}function Y({...t}){return jsx(Dialog.Close,{"data-slot":"dialog-close",...t})}function z({className:t,...o}){return jsx(Dialog.Overlay,{"data-slot":"dialog-overlay",className:a("fk:fixed fk:inset-0 fk:z-50 fk:bg-black/50 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0",t),...o})}function v({className:t,children:o,showCloseButton:r=true,...i}){return jsxs(S,{"data-slot":"dialog-portal",children:[jsx(z,{}),jsxs(Dialog.Content,{"data-slot":"dialog-content",className:a("fk:fixed fk:top-[50%] fk:left-[50%] fk:z-50 fk:grid fk:w-full fk:max-w-[calc(100%-2rem)] fk:translate-x-[-50%] fk:translate-y-[-50%] fk:gap-4 fk:rounded-lg fk:border fk:bg-background fk:p-6 fk:shadow-lg fk:duration-200 fk:outline-none fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95 fk:sm:max-w-lg fk:corner-squircle",t),...i,children:[o,r&&jsxs(Dialog.Close,{"data-slot":"dialog-close",className:"fk:absolute fk:top-4 fk:right-4 fk:rounded-xs fk:opacity-70 fk:ring-offset-background fk:transition-opacity fk:hover:opacity-100 fk:focus:ring-2 fk:focus:ring-ring fk:focus:ring-offset-2 fk:focus:outline-hidden fk:disabled:pointer-events-none fk:data-[state=open]:bg-accent fk:data-[state=open]:text-muted-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:corner-squircle",children:[jsx(XIcon,{}),jsx("span",{className:"fk:sr-only",children:"Close"})]})]})]})}function h({className:t,...o}){return jsx("div",{"data-slot":"dialog-header",className:a("fk:flex fk:flex-col fk:gap-2 fk:text-center fk:sm:text-left",t),...o})}function Z({className:t,showCloseButton:o=false,children:r,...i}){return jsxs("div",{"data-slot":"dialog-footer",className:a("fk:flex fk:flex-col-reverse fk:gap-2 fk:sm:flex-row fk:sm:justify-end",t),...i,children:[r,o&&jsx(Dialog.Close,{asChild:true,children:jsx(b$1,{variant:"outline",children:"Close"})})]})}function b({className:t,...o}){return jsx(Dialog.Title,{"data-slot":"dialog-title",className:a("fk:text-lg fk:leading-none fk:font-semibold fk:text-left",t),...o})}function x({className:t,...o}){return jsx(Dialog.Description,{"data-slot":"dialog-description",className:a("fk:text-sm fk:text-muted-foreground fk:text-left",t),...o})}function A({className:t,...o}){return jsx(Command,{"data-slot":"command",className:a("fk:flex fk:h-full fk:w-full fk:flex-col fk:rounded-md fk:bg-popover fk:text-popover-foreground fk:corner-squircle",t),...o})}function at({title:t="Command Palette",description:o="Search for a command to run...",children:r,className:i,showCloseButton:c=true,...P}){return jsxs(g,{...P,children:[jsxs(h,{className:"fk:sr-only",children:[jsx(b,{children:t}),jsx(x,{children:o})]}),jsx(v,{className:a("fk:overflow-hidden fk:p-0",i),showCloseButton:c,children:jsx(A,{className:"fk:**:data-[slot=command-input-wrapper]:h-12 fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground fk:**:[[cmdk-group]]:px-2 fk:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 fk:[&_[cmdk-input-wrapper]_svg]:h-5 fk:[&_[cmdk-input-wrapper]_svg]:w-5 fk:**:[[cmdk-input]]:h-12 fk:**:[[cmdk-item]]:px-2 fk:**:[[cmdk-item]]:py-3 fk:[&_[cmdk-item]_svg]:h-5 fk:[&_[cmdk-item]_svg]:w-5",children:r})})]})}function nt({className:t,...o}){return jsxs("div",{"data-slot":"command-input-wrapper",className:"fk:flex fk:h-9 fk:items-center fk:gap-2 fk:border-b fk:px-3",children:[jsx(SearchIcon,{className:"fk:size-4 fk:shrink-0 fk:opacity-50"}),jsx(Command.Input,{"data-slot":"command-input",className:a("fk:flex fk:h-10 fk:w-full fk:rounded-md fk:bg-transparent fk:py-3 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50 fk:corner-squircle",t),...o})]})}function it({className:t,...o}){return jsx(Command.List,{"data-slot":"command-list",className:a("fk:max-h-[300px] fk:scroll-py-1 fk:overflow-x-hidden fk:overflow-y-auto",t),...o})}function ft({...t}){return jsx(Command.Empty,{"data-slot":"command-empty",className:"fk:py-6 fk:text-center fk:text-sm",...t})}function st({className:t,...o}){return jsx(Command.Group,{"data-slot":"command-group",className:a("fk:overflow-hidden fk:p-1 fk:text-foreground fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:py-1.5 fk:**:[[cmdk-group-heading]]:text-xs fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground",t),...o})}function lt({className:t,...o}){return jsx(Command.Separator,{"data-slot":"command-separator",className:a("fk:-mx-1 fk:h-px fk:bg-border",t),...o})}function dt({className:t,...o}){return jsx(Command.Item,{"data-slot":"command-item",className:a("fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:data-[disabled=true]:pointer-events-none fk:data-[disabled=true]:opacity-50 fk:data-[selected=true]:bg-accent fk:data-[selected=true]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground fk:corner-squircle",t),...o})}function kt({className:t,...o}){return jsx("span",{"data-slot":"command-shortcut",className:a("fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground",t),...o})}function C({className:t,orientation:o="horizontal",decorative:r=true,...i}){return jsx(Separator.Root,{"data-slot":"separator",decorative:r,orientation:o,className:a("fk:shrink-0 fk:bg-border fk:data-[orientation=horizontal]:h-px fk:data-[orientation=horizontal]:w-full fk:data-[orientation=vertical]:h-full fk:data-[orientation=vertical]:w-px",t),...i})}function xt({className:t,children:o,...r}){return jsxs(ScrollArea.Root,{"data-slot":"scroll-area",className:a("fk:relative",t),...r,children:[jsx(ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"fk:size-full fk:rounded-[inherit] fk:transition-[color,box-shadow] fk:outline-none fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1 fk:corner-squircle",children:o}),jsx(T,{}),jsx(ScrollArea.Corner,{})]})}function T({className:t,orientation:o="vertical",...r}){return jsx(ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:o,className:a("fk:flex fk:touch-none fk:p-px fk:transition-colors fk:select-none",o==="vertical"&&"fk:h-full fk:w-2.5 fk:border-l fk:border-l-transparent",o==="horizontal"&&"fk:h-2.5 fk:flex-col fk:border-t fk:border-t-transparent",t),...r,children:jsx(ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"fk:relative fk:flex-1 fk:rounded-full fk:bg-border fk:corner-squircle"})})}var E=cva("fk:flex fk:w-fit fk:items-stretch fk:has-[>[data-slot=button-group]]:gap-2 fk:[&>*]:focus-visible:relative fk:[&>*]:focus-visible:z-10 fk:has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md fk:[&>[data-slot=select-trigger]:not([class*=w-])]:w-fit fk:[&>input]:flex-1",{variants:{orientation:{horizontal:"fk:[&>*:not(:first-child)]:rounded-l-none fk:[&>*:not(:first-child)]:border-l-0 fk:[&>*:not(:last-child)]:rounded-r-none",vertical:"fk:flex-col fk:[&>*:not(:first-child)]:rounded-t-none fk:[&>*:not(:first-child)]:border-t-0 fk:[&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function Nt({className:t,orientation:o,...r}){return jsx("div",{role:"group","data-slot":"button-group","data-orientation":o,className:a(E({orientation:o}),t),...r})}function St({className:t,asChild:o=false,...r}){let i=o?Slot.Root:"div";return jsx(i,{className:a("fk:bg-muted fk:shadow-xs fk:flex fk:items-center fk:gap-2 fk:rounded-md fk:border fk:px-4 fk:text-sm fk:font-medium fk:[&_svg:not([class*=size-])]:size-4 fk:[&_svg]:pointer-events-none fk:corner-squircle",t),...r})}function zt({className:t,orientation:o="vertical",...r}){return jsx(C,{"data-slot":"button-group-separator",orientation:o,className:a("fk:bg-input fk:relative fk:!m-0 fk:self-stretch fk:data-[orientation=vertical]:h-auto",t),...r})}export{St as A,zt as B,D as a,F as b,g as c,W as d,S as e,Y as f,z as g,v as h,h as i,Z as j,b as k,x as l,A as m,at as n,nt as o,it as p,ft as q,st as r,lt as s,dt as t,kt as u,C as v,xt as w,T as x,E as y,Nt as z};//# sourceMappingURL=chunk-32ZU4MLE.js.map
2
- //# sourceMappingURL=chunk-32ZU4MLE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ui/primitives/badge.tsx","../src/ui/primitives/dialog.tsx","../src/ui/primitives/command.tsx","../src/ui/primitives/separator.tsx","../src/ui/primitives/scroll-area.tsx","../src/ui/primitives/button-group.tsx"],"names":["badgeVariants","cva","Badge","className","variant","asChild","props","Comp","Slot","jsx","cn","Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","DialogContent","children","showCloseButton","jsxs","XIcon","DialogHeader","DialogFooter","Button","DialogTitle","DialogDescription","Command","CommandPrimitive","CommandDialog","title","description","CommandInput","SearchIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","Separator","orientation","decorative","SeparatorPrimitive","ScrollArea","ScrollAreaPrimitive","ScrollBar","buttonGroupVariants","ButtonGroup","ButtonGroupText","ButtonGroupSeparator"],"mappings":"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","file":"chunk-32ZU4MLE.js","sourcesContent":["import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst badgeVariants = cva(\n 'fk:inline-flex fk:w-fit fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:overflow-hidden fk:rounded-full fk:border fk:border-transparent fk:px-2 fk:py-0.5 fk:text-xs fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&>svg]:pointer-events-none fk:[&>svg]:size-3 fk:corner-squircle',\n {\n variants: {\n variant: {\n default: 'fk:bg-primary fk:text-primary-foreground fk:[a&]:hover:bg-primary/90',\n secondary: 'fk:bg-secondary fk:text-secondary-foreground fk:[a&]:hover:bg-secondary/90',\n destructive:\n 'fk:bg-destructive fk:text-white fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40 fk:[a&]:hover:bg-destructive/90',\n outline: 'fk:border-border fk:text-foreground fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground',\n ghost: 'fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground',\n link: 'fk:text-primary fk:underline-offset-4 fk:[a&]:hover:underline',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction Badge({\n className,\n variant = 'default',\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : 'span';\n\n return (\n <Comp data-slot=\"badge\" data-variant={variant} className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n","'use client';\n\nimport * as React from 'react';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { XIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Button } from './button';\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fk:fixed fk:inset-0 fk:z-50 fk:bg-black/50 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fk:fixed fk:top-[50%] fk:left-[50%] fk:z-50 fk:grid fk:w-full fk:max-w-[calc(100%-2rem)] fk:translate-x-[-50%] fk:translate-y-[-50%] fk:gap-4 fk:rounded-lg fk:border fk:bg-background fk:p-6 fk:shadow-lg fk:duration-200 fk:outline-none fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95 fk:sm:max-w-lg fk:corner-squircle',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"fk:absolute fk:top-4 fk:right-4 fk:rounded-xs fk:opacity-70 fk:ring-offset-background fk:transition-opacity fk:hover:opacity-100 fk:focus:ring-2 fk:focus:ring-ring fk:focus:ring-offset-2 fk:focus:outline-hidden fk:disabled:pointer-events-none fk:data-[state=open]:bg-accent fk:data-[state=open]:text-muted-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:corner-squircle\"\n >\n <XIcon />\n <span className=\"fk:sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('fk:flex fk:flex-col fk:gap-2 fk:text-center fk:sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn('fk:flex fk:flex-col-reverse fk:gap-2 fk:sm:flex-row fk:sm:justify-end', className)}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('fk:text-lg fk:leading-none fk:font-semibold fk:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('fk:text-sm fk:text-muted-foreground fk:text-left', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\n\ntype CommandChildren = React.ComponentProps<typeof CommandPrimitive>['children'];\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'fk:flex fk:h-full fk:w-full fk:flex-col fk:rounded-md fk:bg-popover fk:text-popover-foreground fk:corner-squircle',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"fk:sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent className={cn('fk:overflow-hidden fk:p-0', className)} showCloseButton={showCloseButton}>\n <Command className=\"fk:**:data-[slot=command-input-wrapper]:h-12 fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground fk:**:[[cmdk-group]]:px-2 fk:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 fk:[&_[cmdk-input-wrapper]_svg]:h-5 fk:[&_[cmdk-input-wrapper]_svg]:w-5 fk:**:[[cmdk-input]]:h-12 fk:**:[[cmdk-item]]:px-2 fk:**:[[cmdk-item]]:py-3 fk:[&_[cmdk-item]_svg]:h-5 fk:[&_[cmdk-item]_svg]:w-5\">\n {children as CommandChildren}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"fk:flex fk:h-9 fk:items-center fk:gap-2 fk:border-b fk:px-3\">\n <SearchIcon className=\"fk:size-4 fk:shrink-0 fk:opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'fk:flex fk:h-10 fk:w-full fk:rounded-md fk:bg-transparent fk:py-3 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50 fk:corner-squircle',\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('fk:max-h-[300px] fk:scroll-py-1 fk:overflow-x-hidden fk:overflow-y-auto', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return <CommandPrimitive.Empty data-slot=\"command-empty\" className=\"fk:py-6 fk:text-center fk:text-sm\" {...props} />;\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'fk:overflow-hidden fk:p-1 fk:text-foreground fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:py-1.5 fk:**:[[cmdk-group-heading]]:text-xs fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('fk:-mx-1 fk:h-px fk:bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:data-[disabled=true]:pointer-events-none fk:data-[disabled=true]:opacity-50 fk:data-[selected=true]:bg-accent fk:data-[selected=true]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground fk:corner-squircle\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn('fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { Separator as SeparatorPrimitive } from 'radix-ui';\nimport { cn } from '../lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'fk:shrink-0 fk:bg-border fk:data-[orientation=horizontal]:h-px fk:data-[orientation=horizontal]:w-full fk:data-[orientation=vertical]:h-full fk:data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n","'use client';\n\nimport * as React from 'react';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { cn } from '../lib/utils';\n\nfunction ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('fk:relative', className)} {...props}>\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"fk:size-full fk:rounded-[inherit] fk:transition-[color,box-shadow] fk:outline-none fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1 fk:corner-squircle\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'fk:flex fk:touch-none fk:p-px fk:transition-colors fk:select-none',\n orientation === 'vertical' && 'fk:h-full fk:w-2.5 fk:border-l fk:border-l-transparent',\n orientation === 'horizontal' && 'fk:h-2.5 fk:flex-col fk:border-t fk:border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"fk:relative fk:flex-1 fk:rounded-full fk:bg-border fk:corner-squircle\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n","import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\nimport { Separator } from './separator';\n\nconst buttonGroupVariants = cva(\n 'fk:flex fk:w-fit fk:items-stretch fk:has-[>[data-slot=button-group]]:gap-2 fk:[&>*]:focus-visible:relative fk:[&>*]:focus-visible:z-10 fk:has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md fk:[&>[data-slot=select-trigger]:not([class*=w-])]:w-fit fk:[&>input]:flex-1',\n {\n variants: {\n orientation: {\n horizontal:\n 'fk:[&>*:not(:first-child)]:rounded-l-none fk:[&>*:not(:first-child)]:border-l-0 fk:[&>*:not(:last-child)]:rounded-r-none',\n vertical:\n 'fk:flex-col fk:[&>*:not(:first-child)]:rounded-t-none fk:[&>*:not(:first-child)]:border-t-0 fk:[&>*:not(:last-child)]:rounded-b-none',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n }\n);\n\nfunction ButtonGroup({\n className,\n orientation,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\nfunction ButtonGroupText({\n className,\n asChild = false,\n ...props\n}: React.ComponentProps<'div'> & {\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : 'div';\n\n return (\n <Comp\n className={cn(\n 'fk:bg-muted fk:shadow-xs fk:flex fk:items-center fk:gap-2 fk:rounded-md fk:border fk:px-4 fk:text-sm fk:font-medium fk:[&_svg:not([class*=size-])]:size-4 fk:[&_svg]:pointer-events-none fk:corner-squircle',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction ButtonGroupSeparator({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n 'fk:bg-input fk:relative fk:!m-0 fk:self-stretch fk:data-[orientation=vertical]:h-auto',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n"]}
@@ -1,2 +0,0 @@
1
- import'./index.css';import {t,u,v as v$1}from'./chunk-DGIY4SKN.js';import {v,b as b$1,m,o,p,q,r,t as t$1,s}from'./chunk-32ZU4MLE.js';import {b}from'./chunk-6NRQMG26.js';import {a}from'./chunk-O2QMYUPS.js';import {CirclePlus,Check}from'lucide-react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function w({column:s$1,title:i,options:d}){let r$1=new Set(s$1?.getFilterValue());return jsxs(t,{children:[jsx(u,{asChild:true,children:jsxs(b,{variant:"outline",size:"sm",className:"fk:h-8 fk:border-dashed",children:[jsx(CirclePlus,{className:"fk:mr-2 fk:h-4 fk:w-4"}),i,r$1?.size>0&&jsxs(Fragment,{children:[jsx(v,{orientation:"vertical",className:"fk:mx-2 fk:h-4"}),jsx(b$1,{variant:"secondary",className:"fk:rounded-xs fk:px-1 fk:font-normal fk:lg:hidden fk:corner-squircle",children:r$1.size}),jsx("div",{className:"fk:space-x-1 fk:lg:flex",children:r$1.size>2?jsxs(b$1,{variant:"secondary",className:"fk:rounded-xs fk:px-1 fk:font-normal fk:corner-squircle",children:[r$1.size," selected"]}):d.filter(a=>r$1.has(a.value)).map(a=>jsx(b$1,{variant:"secondary",className:"fk:rounded-xs fk:px-1 fk:font-normal fk:corner-squircle",children:a.label},a.value))})]})]})}),jsx(v$1,{className:"fk:w-50 fk:p-0",align:"start",children:jsxs(m,{children:[jsx(o,{placeholder:i}),jsxs(p,{children:[jsx(q,{children:"No results found."}),jsx(r,{children:d.map(a$1=>{let m=r$1.has(a$1.value);return jsxs(t$1,{onSelect:()=>{m?r$1.delete(a$1.value):r$1.add(a$1.value);let c=Array.from(r$1);s$1?.setFilterValue(c.length?c:void 0);},children:[jsx("div",{className:a("fk:mr-2 fk:flex fk:h-4 fk:w-4 fk:items-center fk:justify-center fk:rounded-xs fk:border fk:border-primary fk:corner-squircle",m?"fk:bg-primary fk:text-primary-foreground":"fk:opacity-50 fk:[&_svg]:invisible"),children:jsx(Check,{className:a("fk:size-3.5",m?"fk:text-primary-foreground":"fk:text-muted-foreground")})}),a$1.icon&&jsx(a$1.icon,{className:"fk:mr-2 fk:h-4 fk:w-4 fk:text-muted-foreground"}),jsx("span",{children:a$1.label})]},a$1.value)})}),r$1.size>0&&jsxs(Fragment,{children:[jsx(s,{}),jsx(r,{children:jsx(t$1,{onSelect:()=>s$1?.setFilterValue(void 0),className:"fk:justify-center fk:text-center",children:"Clear filters"})})]})]})]})})]})}export{w as a};//# sourceMappingURL=chunk-54AXLGAK.js.map
2
- //# sourceMappingURL=chunk-54AXLGAK.js.map
@@ -1,2 +0,0 @@
1
- import'./index.css';import {a}from'./chunk-QSTWBKPN.js';import {a as a$1,d}from'./chunk-5LGIALCK.js';import {f,d as d$2}from'./chunk-U6VZY3V2.js';import {f as f$1}from'./chunk-HZOD2HOF.js';import {O,ha,ia,ja,Tc,Vc,qa,s,p,q as q$1,r}from'./chunk-DGIY4SKN.js';import {e,g,h,i,j,t,d as d$1,a as a$2,b as b$3,c as c$1,o}from'./chunk-SZEGGBOC.js';import {w,b as b$2}from'./chunk-32ZU4MLE.js';import {b as b$1,c,e as e$1}from'./chunk-USNXQOMJ.js';import {b}from'./chunk-6NRQMG26.js';import {useState,useMemo,useRef,useEffect}from'react';import {useNavigate,useLocation,useParams,Link}from'react-router-dom';import q,{useSWRConfig}from'swr';import {Plug,ArrowLeft,ExternalLink,RefreshCw,ChevronLeft,ChevronRight,Plus,CheckIcon,XIcon,MoreHorizontal,TriangleAlert}from'lucide-react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';function Re(n){let a;try{a=new URL(n);}catch{return null}return a.protocol!=="https:"||a.username!==""||a.password!==""?null:a.href}function xe(){let{currentProjectId:n}=f$1();return {api:useMemo(()=>n?d$2(n):null,[n]),base:n?`/api/flexkit/${n}`:null}}function Ee(n){return n.length===2?"Project & Personal":n[0]==="project"?"Project":"Personal"}function ze(n){return n.length===2?"fk:bg-indigo-100 fk:text-indigo-800 fk:dark:bg-indigo-950 fk:dark:text-indigo-300":n[0]==="project"?"fk:bg-sky-100 fk:text-sky-800 fk:dark:bg-sky-950 fk:dark:text-sky-300":"fk:bg-teal-100 fk:text-teal-800 fk:dark:bg-teal-950 fk:dark:text-teal-300"}function T(n){return n.connections.length>0}function Ie(n){return n==="project"?"Project":"Personal"}function z(n,a,t){return t==="personal"?n.allowPersonal:a}function he(n,a){return n.connections.filter(t=>t.scope===a).sort((t,s)=>Number(s.isPrimary)-Number(t.isPrimary)||t.createdAt.localeCompare(s.createdAt))}function $e(n){let a=n.connections.filter(t=>t.isPrimary&&t.status==="connected");return a.find(t=>t.scope==="personal")??a.find(t=>t.scope==="project")??null}function je({busy:n,canManage:a,plugin:t,onConnect:s}){let i$1=t.scopes.filter(k=>he(t,k).length===0),[f]=i$1;if(!f)return null;if(t.scopes.length===1)return jsxs(b,{disabled:n||!t.enabled||!z(t,a,f),size:"sm",type:"button",onClick:()=>s(f),children:[jsx(Plug,{}),"Connect"]});let m=i$1.some(k=>z(t,a,k));return jsxs(e,{children:[jsx(g,{asChild:true,children:jsxs(b,{disabled:n||!t.enabled||!m,size:"sm",type:"button",children:[jsx(Plug,{}),"Connect"]})}),jsx(h,{align:"end",className:"fk:w-72",children:jsx(i,{children:i$1.map(k=>jsx(j,{disabled:!z(t,a,k),onSelect:()=>s(k),children:jsxs("span",{className:"fk:flex fk:flex-col fk:gap-0.5",children:[jsx("span",{children:Ie(k)}),jsx("span",{className:"fk:text-xs fk:text-muted-foreground",children:k==="personal"?"Only you can use this connection in this project.":"Shared with project members who can use this plugin."})]})},k))})})]})}function S(n,a){let t=/^(.*\/ai)(?:\/|$)/.exec(n);return t?`${t[1]}/${a}`:a}function H(n){return n.split(/[\s_-]+/).filter(Boolean).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function Be(n){let a={};for(let t of n){let s=a[t.category];if(s){s.push(t);continue}a[t.category]=[t];}return Object.entries(a).sort(([t],[s])=>H(t).localeCompare(H(s))).map(([t,s])=>({category:t,plugins:s}))}var ce=[{id:"first",rows:[{descriptionWidth:"fk:w-44",id:"first-a",nameWidth:"fk:w-24"},{descriptionWidth:"fk:w-52",id:"first-b",nameWidth:"fk:w-16"},{descriptionWidth:"fk:w-40",id:"first-c",nameWidth:"fk:w-28"},{descriptionWidth:"fk:w-48",id:"first-d",nameWidth:"fk:w-20"}]},{id:"second",rows:[{descriptionWidth:"fk:w-36",id:"second-a",nameWidth:"fk:w-32"},{descriptionWidth:"fk:w-56",id:"second-b",nameWidth:"fk:w-24"}]}];function ke({action:n,row:a}){return jsxs("div",{className:"fk:-mx-3 fk:flex fk:min-w-0 fk:items-center fk:gap-3 fk:px-3 fk:py-2",children:[jsx(t,{className:"fk:size-10 fk:shrink-0 fk:rounded-lg"}),jsxs("span",{className:"fk:flex fk:min-w-0 fk:flex-1 fk:flex-col fk:gap-1.5",children:[jsx(t,{className:`fk:h-4 ${a.nameWidth}`}),jsx(t,{className:`fk:h-4 ${a.descriptionWidth}`})]}),n?jsx(t,{className:"fk:size-4 fk:shrink-0"}):null]})}var K="fk:grid fk:grid-cols-1 fk:gap-x-16 fk:gap-y-1 fk:lg:grid-cols-2";function We({grouped:n=true}){let a=ce.flatMap(t=>t.rows);return n?jsxs("div",{"aria-busy":"true",className:"fk:flex fk:flex-col fk:gap-8",children:[jsx("span",{className:"fk:sr-only",children:"Loading plugins"}),ce.map(t$1=>jsxs("section",{children:[jsx(t,{className:"fk:mb-1 fk:h-4 fk:w-28"}),jsx("div",{className:K,children:t$1.rows.map(s=>jsx(ke,{action:true,row:s},s.id))})]},t$1.id))]}):jsxs("div",{"aria-busy":"true",className:K,children:[jsx("span",{className:"fk:sr-only",children:"Loading plugins"}),a.map(t=>jsx(ke,{action:true,row:t},t.id))]})}function Ue(){let n=useNavigate(),{pathname:a}=useLocation(),t=/\/ai\/plugins\/?$/.test(a),s=a.includes("/ai/skills");return jsxs("div",{className:"fk:mb-2 fk:flex fk:shrink-0 fk:items-center fk:gap-2",children:[jsxs(b$1,{children:[jsx(c,{asChild:true,children:jsx(O,{className:"fk:-ml-1 fk:h-4 fk:w-4"})}),jsx(e$1,{children:"Toggle Sidebar"})]}),jsx(ha,{value:s?"skills":"plugins",onValueChange:f=>{let m=f==="skills"?"skills":"plugins";(f==="skills"?s:t)||n(S(a,m));},children:jsxs(ia,{children:[jsx(ja,{value:"plugins",onClick:()=>{t||n(S(a,"plugins"));},children:"Plugins"}),jsx(ja,{value:"skills",children:"Skills"})]})})]})}function Xe({onOpen:n,plugin:a$1}){let t=T(a$1),s=a$1.connections.filter(f=>f.status==="needs_auth").length,i=s===1?"An account needs to be reconnected":`${s.toString()} accounts need to be reconnected`;return jsxs("button",{type:"button",onClick:n,className:"fk:-mx-3 fk:flex fk:min-w-0 fk:items-center fk:gap-3 fk:rounded-lg fk:px-3 fk:py-2 fk:text-left fk:transition-colors fk:hover:bg-accent fk:focus-visible:bg-accent fk:focus-visible:outline-none fk:corner-squircle",children:[jsx(a,{className:"fk:size-10 fk:rounded-lg",src:a$1.logoUrl}),jsxs("span",{className:"fk:min-w-0 fk:flex-1",children:[jsx("span",{className:"fk:block fk:truncate fk:text-sm fk:font-medium",children:a$1.name}),jsx("span",{className:"fk:block fk:truncate fk:text-sm fk:text-muted-foreground",children:a$1.description})]}),s>0?jsxs(b$1,{children:[jsx(c,{asChild:true,children:jsxs("span",{className:"fk:flex fk:shrink-0",children:[jsx(TriangleAlert,{"aria-hidden":true,className:"fk:size-4 fk:text-destructive"}),jsx("span",{className:"fk:sr-only",children:i})]})}),jsx(e$1,{children:i})]}):t?jsx(CheckIcon,{className:"fk:size-4 fk:shrink-0 fk:text-success"}):jsx(Plus,{className:"fk:size-4 fk:shrink-0 fk:text-muted-foreground"})]})}function ue({onOpen:n,plugins:a}){return jsx("div",{className:K,children:a.map(t=>jsx(Xe,{plugin:t,onOpen:()=>n(t.id)},t.id))})}function be({installedOnly:n=false}){let{base:a}=xe(),{data:t$1,error:s$1,isLoading:i}=q(a?`${a}/plugins`:null,f),[f$1,m]=useState(""),k=useNavigate(),{pathname:p}=useLocation(),x=f$1.trim().toLowerCase(),l=(t$1?.plugins??[]).filter(c=>(!n||T(c))&&`${c.name} ${c.description}`.toLowerCase().includes(x)),b=(t$1?.plugins??[]).filter(T),u=n?[]:Be(l),g="Plugins are being prepared. Check back soon.";n&&!x?g="No plugins installed yet.":(t$1?.catalogSha||n)&&(g="No plugins match your search.");function M(c){k(S(p,`plugins/${c}`));}let r=jsx("div",{className:"fk:flex fk:flex-col fk:gap-8",children:u.map(c=>jsxs("section",{children:[jsx("h3",{className:"fk:mb-1 fk:text-sm fk:font-medium",children:H(c.category)}),jsx(ue,{plugins:c.plugins,onOpen:M})]},c.category))});return n&&(r=jsx(ue,{plugins:l,onOpen:M})),(i||s$1||l.length===0)&&(r=null),jsxs("main",{className:"fk:flex fk:min-h-0 fk:flex-1 fk:flex-col",children:[jsx(Ue,{}),jsx(w,{className:"fk:h-0 fk:min-h-0 fk:flex-1",children:jsxs("div",{className:"fk:mx-auto fk:flex fk:w-full fk:max-w-4xl fk:flex-col fk:gap-8 fk:py-6 fk:pl-4 fk:pr-6",children:[jsxs("div",{children:[jsx("h2",{className:"fk:text-2xl fk:font-semibold",children:"Plugins"}),jsx("p",{className:"fk:mt-2 fk:text-muted-foreground",children:"Connect the tools you use and add skills to your workflows."})]}),jsxs("div",{className:"fk:flex fk:flex-wrap fk:items-center fk:gap-3",children:[jsx(s,{"aria-label":"Search plugins",className:"fk:mr-auto fk:w-full fk:max-w-xs",placeholder:"Search plugins\u2026",value:f$1,onChange:c=>m(c.target.value)}),!n&&i?jsxs("div",{className:"fk:flex fk:items-center fk:gap-3",children:[jsx("div",{className:"fk:flex fk:-space-x-2",children:["installed-a","installed-b","installed-c"].map(c=>jsx(t,{className:"fk:size-8 fk:rounded-md fk:ring-2 fk:ring-background"},c))}),jsx(t,{className:"fk:h-4 fk:w-20"})]}):null,!n&&!i&&b.length>0?jsx(d$1,{children:b.slice(0,9).map(c=>jsxs(a$2,{className:"fk:rounded-md",children:[jsx(b$3,{src:c.logoUrl,alt:""}),jsx(c$1,{children:c.name.charAt(0)})]},c.id))}):null,n?jsxs(Link,{to:S(p,"plugins"),className:"fk:inline-flex fk:items-center fk:gap-1 fk:text-sm fk:text-muted-foreground fk:hover:text-foreground",children:[jsx(ChevronLeft,{className:"fk:size-4"}),"Show all"]}):null,!n&&!i?jsxs(Link,{to:S(p,"plugins/installed"),className:"fk:inline-flex fk:items-center fk:gap-1 fk:text-sm fk:text-muted-foreground fk:hover:text-foreground",children:[b.length," installed",jsx(ChevronRight,{className:"fk:size-4"})]}):null]}),s$1?jsx(Tc,{variant:"destructive",children:jsx(Vc,{children:"Unable to load plugins. Please try again."})}):null,i?jsx(We,{grouped:!n}):null,!i&&!s$1&&l.length===0?jsx(Tc,{children:jsx(Vc,{children:g})}):null,r]})})]})}function on(){return jsx(be,{})}function sn(){return jsx(be,{installedOnly:true})}function Je({base:n,connectionId:a}){let{data:t$1,error:s}=q(`${n}/plugin-connections/${a}/tools`,f);return s?jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:"Unable to discover tools. Reconnect or try again."}):t$1?jsx("div",{className:"fk:flex fk:flex-col fk:gap-3",children:t$1.servers.map(i=>jsxs("section",{className:"fk:flex fk:flex-col fk:gap-2",children:[jsx("h4",{className:"fk:font-medium",children:i.name}),i.error?jsx("p",{children:i.error}):null,i.tools.length>0?jsxs(p,{className:"fk:group",children:[jsxs(q$1,{className:"fk:flex fk:w-fit fk:items-center fk:gap-1 fk:text-sm fk:text-muted-foreground",children:[jsx(ChevronRight,{className:"fk:size-4 fk:transition-transform fk:group-data-[state=open]:rotate-90"}),_e(i.tools.length)]}),jsx(r,{children:jsx("ul",{className:"fk:mt-2 fk:flex fk:flex-col fk:gap-2",children:i.tools.map(f=>jsxs("li",{children:[jsx("span",{className:"fk:text-sm fk:font-medium",children:f.name}),jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:f.description})]},f.name))})})]}):null]},i.name))}):jsx(t,{className:"fk:h-12 fk:w-full"})}function _e(n){return n===1?"1 tool":`${n.toString()} tools`}function Ge(n){return n.accountName&&n.accountName!==n.displayName?n.accountName:n.scope==="project"?"Shared with this project":"Only you can use this account"}function Fe({actionable:n,actions:a,busy:t,connection:s$1,pluginEnabled:i$1}){let[f,m]=useState(false),[k,p]=useState(""),x=useRef(null),l=s$1.status==="needs_auth",b$1=async()=>{let u=k.trim();await a.onRename(s$1,u||null),m(false);};return useEffect(()=>{if(!f)return;let u=window.setTimeout(()=>x.current?.focus(),0);return ()=>window.clearTimeout(u)},[f]),jsxs("li",{className:"fk:flex fk:min-w-0 fk:items-center fk:gap-3 fk:py-2",children:[jsx(a$2,{className:"fk:size-8",children:jsx(c$1,{children:s$1.displayName.charAt(0).toUpperCase()})}),f?jsxs("form",{className:"fk:flex fk:min-w-0 fk:flex-1 fk:items-center fk:gap-2",onSubmit:u=>{u.preventDefault(),b$1();},children:[jsx(s,{"aria-label":"Account name",ref:x,className:"fk:h-8 fk:max-w-xs",disabled:t,placeholder:s$1.accountName??"Account name",value:k,onChange:u=>p(u.target.value),onKeyDown:u=>{u.key==="Escape"&&m(false);}}),jsx(b,{"aria-label":"Save name",disabled:t,size:"icon",type:"submit",variant:"ghost",children:jsx(CheckIcon,{})}),jsx(b,{"aria-label":"Cancel rename",size:"icon",type:"button",variant:"ghost",onClick:()=>m(false),children:jsx(XIcon,{})})]}):jsxs("span",{className:"fk:flex fk:min-w-0 fk:flex-1 fk:flex-col",children:[jsxs("span",{className:"fk:flex fk:min-w-0 fk:items-center fk:gap-2",children:[jsx("span",{className:"fk:truncate fk:text-sm fk:font-medium",children:s$1.displayName}),s$1.isPrimary?jsx(b$2,{variant:"secondary",children:"Primary"}):null,l?jsx(b$2,{variant:"destructive",children:"Needs reconnect"}):null]}),jsx("span",{className:"fk:truncate fk:text-sm fk:text-muted-foreground",children:Ge(s$1)})]}),n&&!f?jsxs(e,{children:[jsx(g,{asChild:true,children:jsx(b,{"aria-label":`Manage ${s$1.displayName}`,disabled:t,size:"icon",variant:"ghost",children:jsx(MoreHorizontal,{})})}),jsxs(h,{align:"end",children:[jsxs(i,{children:[!s$1.isPrimary&&!l?jsx(j,{onSelect:()=>a.onMakePrimary(s$1),children:"Make primary"}):null,jsx(j,{onSelect:()=>{p(s$1.label??""),m(true);},children:"Rename"}),jsx(j,{disabled:!i$1,onSelect:()=>a.onReconnect(s$1),children:"Reconnect"})]}),jsx(o,{}),jsx(j,{variant:"destructive",onSelect:()=>a.onDisconnect(s$1),children:"Disconnect"})]})]}):null]})}function He({actions:n,busy:a,canManage:t,onConnect:s,plugin:i}){let f=i.scopes.length>1;return jsxs("section",{className:"fk:flex fk:flex-col fk:gap-3",children:[jsx("h2",{className:"fk:text-xl fk:font-semibold",children:"Connected accounts"}),i.scopes.map(m=>{let k=he(i,m),p=z(i,t,m),x=m==="personal"||t;return k.length===0&&!p?null:jsxs("div",{className:"fk:flex fk:flex-col",children:[f?jsx("h3",{className:"fk:text-sm fk:font-medium fk:text-muted-foreground",children:m==="project"?"Project accounts":"Your accounts"}):null,jsxs("ul",{className:"fk:flex fk:flex-col fk:divide-y",children:[k.map(l=>jsx(Fe,{actionable:x,actions:n,busy:a,connection:l,pluginEnabled:i.enabled},l.id)),p?jsx("li",{children:jsxs("button",{className:"fk:flex fk:w-full fk:items-center fk:gap-3 fk:py-2 fk:text-left fk:text-sm fk:text-muted-foreground fk:transition-colors fk:hover:text-foreground fk:disabled:pointer-events-none fk:disabled:opacity-50",disabled:a||!i.enabled,type:"button",onClick:()=>s(m),children:[jsx("span",{className:"fk:flex fk:size-8 fk:shrink-0 fk:items-center fk:justify-center fk:rounded-full fk:border fk:border-dashed",children:jsx(Plus,{className:"fk:size-4"})}),k.length>0?"Connect another account":"Connect an account"]})}):null]})]},m)})]})}function ln(){let{pluginId:n}=useParams(),{api:a$2,base:t$1}=xe(),{data:s,error:i,mutate:f$1}=q(t$1&&n?`${t$1}/plugins/${n}`:null,f),{mutate:m}=useSWRConfig(),k=useNavigate(),[p,x]=useState(false),l=s?.plugin,b$3=l?Re(l.sourceUrl):null,u=async r=>{x(true);try{await r(),await f$1();}catch(c){if(c instanceof a$1){qa.error('You signed in with a different account. Use "Connect another account" to add it.');return}qa.error(c instanceof Error?c.message:"Unable to complete this action.");}finally{x(false);}};if(i)return jsx("div",{className:"fk:p-6",children:jsx(Tc,{variant:"destructive",children:jsx(Vc,{children:"Unable to load this plugin."})})});if(!l||!s||!a$2||!t$1)return jsxs("main",{className:"fk:flex fk:min-h-0 fk:flex-1 fk:flex-col",children:[jsxs("div",{className:"fk:mb-2 fk:flex fk:shrink-0 fk:items-center fk:gap-2",children:[jsxs(b$1,{children:[jsx(c,{asChild:true,children:jsx(O,{className:"fk:-ml-1 fk:h-4 fk:w-4"})}),jsx(e$1,{children:"Toggle Sidebar"})]}),jsxs(b,{variant:"ghost",size:"sm",onClick:()=>k("..",{relative:"path"}),children:[jsx(ArrowLeft,{}),"Plugins"]})]}),jsx(w,{className:"fk:h-0 fk:min-h-0 fk:flex-1",children:jsxs("div",{"aria-busy":"true",className:"fk:mx-auto fk:flex fk:w-full fk:max-w-4xl fk:flex-col fk:gap-8 fk:py-6 fk:pl-4 fk:pr-6",children:[jsx("span",{className:"fk:sr-only",children:"Loading plugin"}),jsxs("section",{className:"fk:flex fk:flex-col fk:gap-3",children:[jsxs("div",{className:"fk:flex fk:items-center fk:gap-4",children:[jsx(t,{className:"fk:size-14 fk:shrink-0 fk:rounded-lg"}),jsx(t,{className:"fk:h-7 fk:w-40"}),jsx(t,{className:"fk:ml-auto fk:h-9 fk:w-28"})]}),jsx(t,{className:"fk:h-4 fk:w-full"}),jsx(t,{className:"fk:h-4 fk:w-2/3"}),jsx(t,{className:"fk:h-6 fk:w-24 fk:rounded-full"})]})]})})]});let g=$e(l),M={onDisconnect:r=>{u(()=>a$2.disconnectPlugin(r.id));},onMakePrimary:r=>{u(()=>a$2.updatePluginConnection(r.id,{primary:!0}));},onReconnect:r=>{u(()=>d(a$2,l,r.scope,{connectionId:r.id}));},onRename:(r,c)=>u(()=>a$2.updatePluginConnection(r.id,{label:c}))};return jsxs("main",{className:"fk:flex fk:min-h-0 fk:flex-1 fk:flex-col",children:[jsxs("div",{className:"fk:mb-2 fk:flex fk:shrink-0 fk:items-center fk:gap-2",children:[jsxs(b$1,{children:[jsx(c,{asChild:true,children:jsx(O,{className:"fk:-ml-1 fk:h-4 fk:w-4"})}),jsx(e$1,{children:"Toggle Sidebar"})]}),jsxs(b,{variant:"ghost",size:"sm",onClick:()=>k("..",{relative:"path"}),children:[jsx(ArrowLeft,{}),"Plugins"]})]}),jsx(w,{className:"fk:h-0 fk:min-h-0 fk:flex-1",children:jsxs("div",{className:"fk:mx-auto fk:flex fk:w-full fk:max-w-4xl fk:flex-col fk:gap-8 fk:py-6 fk:pl-4 fk:pr-6",children:[jsxs("section",{className:"fk:flex fk:flex-col fk:gap-3",children:[jsxs("div",{className:"fk:flex fk:flex-wrap fk:items-center fk:gap-4",children:[jsx(a,{className:"fk:size-14 fk:rounded-lg",src:l.logoUrl}),jsxs("div",{className:"fk:flex fk:min-w-0 fk:flex-col fk:gap-0.5",children:[jsx("h1",{className:"fk:text-xl fk:font-semibold",children:l.name}),b$3?jsxs("a",{href:b$3,target:"_blank",rel:"noopener noreferrer",className:"fk:inline-flex fk:w-fit fk:items-center fk:gap-1 fk:text-sm fk:hover:underline fk:text-muted-foreground",children:["View source",jsx(ExternalLink,{className:"fk:size-3"})]}):null]}),jsx("div",{className:"fk:ml-auto fk:flex fk:shrink-0 fk:flex-wrap fk:items-center fk:justify-end fk:gap-2",children:T(l)?null:jsx(je,{busy:p,canManage:s.canManage,plugin:l,onConnect:r=>{u(()=>d(a$2,l,r));}})})]}),jsx("p",{className:"fk:text-muted-foreground",children:l.description}),jsx("div",{className:"fk:flex fk:flex-wrap fk:items-center fk:gap-3",children:jsx(b$2,{className:`fk:border-0 fk:text-[0.625rem] fk:leading-4.5 fk:font-normal fk:py-0 fk:px-2 ${ze(l.scopes)}`,variant:"default",children:Ee(l.scopes)})}),l.scopes.map(r=>(r==="personal"?l.allowPersonal:s.canManage)?null:jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:r==="project"?"Ask an owner or developer to connect.":"Personal connections are disabled by project policy."},r))]}),l.enabled?null:jsx(Tc,{children:jsx(Vc,{children:"This plugin is disabled by project policy."})}),T(l)?jsx(He,{actions:M,busy:p,canManage:s.canManage,plugin:l,onConnect:r=>{u(()=>d(a$2,l,r));}}):null,jsxs("section",{className:"fk:flex fk:flex-col fk:gap-3",children:[jsxs("div",{className:"fk:flex fk:items-center fk:gap-3",children:[jsx("h2",{className:"fk:text-xl fk:font-semibold",children:"Included tools"}),l.capabilities.agentTools&&g?jsxs(b,{className:"fk:ml-auto",disabled:p,size:"sm",variant:"ghost",onClick:()=>{u(async()=>{await a$2.refreshPluginTools(g.id),await m(`${t$1}/plugin-connections/${g.id}/tools`);});},children:[jsx(RefreshCw,{}),"Refresh"]}):null]}),l.capabilities.automationDelivery?jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:"Automation delivery to selected channels. This plugin does not expose MCP messaging tools."}):null,l.capabilities.agentTools&&!g?jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:"Connect to discover available tools."}):null,l.capabilities.agentTools&&g?jsxs(Fragment,{children:[jsxs("p",{className:"fk:text-sm fk:text-muted-foreground",children:["Tools \xB7 via ",g.displayName]}),jsx(Je,{base:t$1,connectionId:g.id},g.id)]}):null]}),jsxs("section",{className:"fk:flex fk:flex-col fk:gap-3",children:[jsx("h2",{className:"fk:text-xl fk:font-semibold",children:"Included skills"}),s.skills.length===0?jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:"This plugin includes no skills."}):s.skills.map(r=>jsxs("div",{children:[jsx("h3",{className:"fk:font-medium",children:r.name}),jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:r.description})]},r.key))]}),jsxs("section",{className:"fk:space-y-3",children:[jsx("h2",{className:"fk:text-xl fk:font-semibold",children:"Used by"}),l.usedBy.length===0?jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:"No automations visible to you use this plugin yet."}):jsx("ul",{children:l.usedBy.map(r=>jsx("li",{children:jsx(b,{className:"fk:pl-0!",variant:"link",onClick:()=>k(`../../automations/${r.id}`,{relative:"path"}),children:r.name})},r.id))})]})]})})]})}export{je as a,Ue as b,on as c,sn as d,ln as e};//# sourceMappingURL=chunk-5AJXR47U.js.map
2
- //# sourceMappingURL=chunk-5AJXR47U.js.map
@@ -1,2 +0,0 @@
1
- import'./index.css';import {b as b$1}from'./chunk-U6VZY3V2.js';import {s}from'./chunk-DGIY4SKN.js';import {c,h,i,k,l,j}from'./chunk-32ZU4MLE.js';import {b}from'./chunk-6NRQMG26.js';import {useSyncExternalStore,useId,useState}from'react';import {LoaderCircle,ExternalLinkIcon}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var K="/plugins/oauth/start",R=class extends Error{code="account_mismatch";constructor(){super('You signed in with a different account. Use "Connect another account" to add it.'),this.name="PluginAccountMismatchError";}};function U(t){let e;try{e=new URL(t);}catch{return null}return e.protocol!=="https:"||e.username!==""||e.password!==""?null:e}function Q(t,e){let n=b$1(),r=U(t),o=U(e);return !r||!o||r.origin!==n||r.pathname!==K||o.origin!==n||o.pathname!=="/"?null:{href:r.href,origin:n}}async function O(t,e,n,r){let o=window.open("about:blank",`flexkit-plugin-${crypto.randomUUID()}`,"popup,width=560,height=720");if(!o)throw new Error("Allow popups for Studio, then connect again.");let a;try{a=await t.connectPlugins({pluginId:e,scope:n,studioOrigin:window.location.origin,...r?.connectionId?{connectionId:r.connectionId}:{}});}catch(u){throw o.close(),u}let d=Q(a.authorizeUrl,a.completionOrigin);if(!d)throw o.close(),new Error("Connection could not be started.");let g=d.origin;await new Promise((u,m)=>{let c=false,f=false,k=false,h=i=>{if(!f){if(f=true,window.clearInterval(l),window.clearTimeout(C),window.removeEventListener("message",P),o.close(),i){m(i);return}u();}},v=async()=>{if(c||f)return;c=true;let i;try{i=await t.pluginOAuthStatus(a.transactionId);}catch{c=false;return}if(c=false,i.status==="complete"){h();return}if(!k&&o.closed&&i.status==="pending"){h(new Error("Connection window was closed."));return}(i.status==="failed"||new Date(i.expires_at).getTime()<Date.now())&&h(new Error("Connection was not completed. Please try again."));},P=i=>{if(i.origin!==g||i.source!==o||!i.data||typeof i.data!="object")return;let y=i.data;if(y.type==="flexkit:plugin-oauth-ready"&&y.transactionId===a.transactionId){k=true,o.postMessage({type:"flexkit:plugin-oauth-start",transactionId:a.transactionId,ticket:a.launchTicket},g);return}if(y.type==="flexkit:plugin-oauth"&&y.transactionId===a.transactionId){if(y.status==="failed"&&y.error==="account_mismatch"){h(new R);return}v();}},l=window.setInterval(()=>{v();},2e3),C=window.setTimeout(()=>h(new Error("Connection timed out. Please try again.")),6e5);window.addEventListener("message",P),o.location.href=d.href;});}function W(t){let{connect:e}=t;return e?.type==="api-token"?e.pattern?[{label:e.tokenLabel,pattern:e.pattern}]:[]:e?.type==="credentials"?[...e.fields,...e.methods.flatMap(n=>n.fields)].filter(n=>n.kind==="secret"&&n.detect).map(n=>({label:n.label,pattern:n.detect})):[]}function M(t,e){let n=t.methods.find(r=>r.key===e);return [...t.fields,...n?.fields??[]]}function z(t,e){return t.every(n=>!n.required||!!e[n.key]?.trim())}function X(t,e){for(let n of t){let r=e[n.key]?.trim()??"";if(!r){if(n.required)return {field:n.key,message:`Enter the ${n.label}.`};continue}if(r.length>4096)return {field:n.key,message:`The ${n.label} is too long; paste only the value.`};if(!S(r,n.pattern))return {field:n.key,message:`That is not a valid ${n.label}.`}}return null}function S(t,e){if(!e)return true;try{return new RegExp(e,"u").test(t)}catch{return true}}function Z(t){if(!t)return null;try{return new RegExp(t,"u")}catch{return null}}function ae(t,e){let n=t.split(/[\s"'`()<>[\]{},;:=!?&]+/).map(a=>a.replace(/\.+$/,"")).filter(Boolean),r=null,o=new Set;for(let a of e)for(let d of W(a)){let g=Z(d.pattern);for(let u of g?n:[])g.test(u)&&(r??={plugin:a,label:d.label},o.add(u));}return r?{...r,tokens:[...o]}:null}var _=null,q=0,L=null,N=new Set;function B(t){_=t,N.forEach(e=>e());}function ne(t){return N.add(t),()=>N.delete(t)}function me(t,e,n,r){let{connect:o}=e;if(o?.type!=="api-token"&&o?.type!=="credentials")return O(t,e.id,n,r).then(()=>true);L?.();let a=++q,d=r?.connectionId?{connectionId:r.connectionId}:{};return new Promise(g=>{let u=c=>{_?.id===a&&B(null),q===a&&(L=null),g(c);},m=o.type==="api-token"?{kind:"token",id:a,plugin:{...e,connect:o},submit:async c=>{await t.connectPluginToken({pluginId:e.id,scope:n,token:c,...d});},settle:u}:{kind:"credentials",id:a,plugin:{...e,connect:o},submit:async(c,f)=>{await t.connectPluginCredentials({pluginId:e.id,scope:n,method:c,values:f,...d});},settle:u};L=()=>u(false),setTimeout(()=>{q===a&&B(m);});})}function oe(t){if(!t)return null;try{let e=new URL(t);return e.protocol==="https:"?e.href:null}catch{return null}}function ke(){let t=useSyncExternalStore(ne,()=>_,()=>null);return t?t.kind==="token"?jsx(le,{request:t},t.id):jsx(re,{request:t},t.id):null}function $({id:t,message:e}){return e?jsx("p",{className:"fk:text-sm fk:text-destructive",id:t,children:e}):null}function V({href:t,label:e}){let n=oe(t);return n?jsxs("a",{className:"fk:inline-flex fk:items-center fk:gap-1 fk:text-sm fk:text-muted-foreground fk:underline-offset-4 fk:hover:underline",href:n,rel:"noreferrer",target:"_blank",children:[e,jsx(ExternalLinkIcon,{className:"fk:size-3.5"})]}):null}function re({request:t}){let{connect:e,name:n}=t.plugin,r=useId(),[o,a]=useState(e.methods[0]?.key??null),[d,g]=useState({}),[u,m]=useState(null),[c$1,f]=useState(false),k$1=M(e,o),h$1=e.methods.find(l=>l.key===o)??null,v=z(k$1,d);async function P(l){if(l.preventDefault(),c$1)return;let C=X(k$1,d);if(C){m(C);return}f(true),m(null);try{await t.submit(o??void 0,Object.fromEntries(k$1.map(i=>[i.key,d[i.key]?.trim()??""]).filter(([,i])=>i))),g({}),t.settle(!0);}catch(i){m({field:null,message:i instanceof Error?i.message:`${n} could not be connected.`});}finally{f(false);}}return jsx(c,{open:true,onOpenChange:l=>{!l&&!c$1&&t.settle(false);},children:jsx(h,{children:jsxs("form",{className:"fk:flex fk:flex-col fk:gap-4",onSubmit:l=>{P(l);},children:[jsxs(i,{children:[jsxs(k,{children:["Connect ",n]}),jsxs(l,{children:[e.description," Flexkit checks the credentials with ",n,", stores them encrypted and sends them only to Flexkit's own ",n," server; the agent can use the tools but never sees them."]})]}),e.methods.length>1?jsx("div",{className:"fk:space-y-1.5",role:"group","aria-label":"How to connect",children:e.methods.map(l=>jsxs("button",{"aria-pressed":o===l.key,className:`fk:flex fk:w-full fk:flex-col fk:rounded-lg fk:border fk:px-3 fk:py-2 fk:text-left fk:corner-squircle ${o===l.key?"fk:border-primary fk:bg-primary/5":"fk:border-border fk:hover:bg-muted/60"}`,disabled:c$1,onClick:()=>{a(l.key),m(null);},type:"button",children:[jsx("span",{className:"fk:text-sm fk:font-medium",children:l.label}),l.description?jsx("span",{className:"fk:text-xs fk:text-muted-foreground",children:l.description}):null]},l.key))}):h$1?.description?jsx("p",{className:"fk:text-sm fk:text-muted-foreground",children:h$1.description}):null,k$1.map((l,C)=>{let i=`${r}-${l.key}`,y=u?.field===l.key?u.message:null;return jsxs("div",{className:"fk:flex fk:flex-col fk:gap-2",children:[jsx("label",{className:"fk:text-sm fk:font-medium",htmlFor:i,children:l.label}),jsx(s,{"aria-describedby":y?`${i}-error`:l.help?`${i}-help`:void 0,"aria-invalid":y?true:void 0,autoComplete:"off",autoFocus:C===0,disabled:c$1,id:i,placeholder:l.placeholder??void 0,spellCheck:false,type:l.kind==="secret"?"password":"text",value:d[l.key]??"",onChange:j=>{g(Y=>({...Y,[l.key]:j.target.value})),m(null);}}),l.help&&!y?jsx("p",{className:"fk:text-sm fk:text-muted-foreground",id:`${i}-help`,children:l.help}):null,jsx($,{id:`${i}-error`,message:y})]},l.key)}),jsx($,{id:`${r}-error`,message:u?.field===null?u.message:null}),jsx(V,{href:e.helpUrl,label:`How to set up ${n}`}),jsxs(j,{children:[jsx(b,{disabled:c$1,size:"sm",type:"button",variant:"outline",onClick:()=>t.settle(false),children:"Cancel"}),jsxs(b,{disabled:c$1||!v,size:"sm",type:"submit",children:[c$1?jsx(LoaderCircle,{className:"fk:size-4 fk:animate-spin"}):null,"Connect"]})]})]})})})}function le({request:t}){let{connect:e,name:n}=t.plugin,r=useId(),[o,a]=useState(""),[d,g]=useState(null),[u,m]=useState(false);async function c$1(f){f.preventDefault();let k=o.trim();if(!(u||!k)){if(!S(k,e.pattern)){g(`That does not look like a ${e.tokenLabel}.`);return}m(true),g(null);try{await t.submit(k),a(""),t.settle(!0);}catch(h){g(h instanceof Error?h.message:`${n} could not be connected.`);}finally{m(false);}}}return jsx(c,{open:true,onOpenChange:f=>{!f&&!u&&t.settle(false);},children:jsx(h,{children:jsxs("form",{className:"fk:flex fk:flex-col fk:gap-4",onSubmit:f=>{c$1(f);},children:[jsxs(i,{children:[jsxs(k,{children:["Connect ",n]}),jsxs(l,{children:["Paste a ",e.tokenLabel,". Flexkit stores it encrypted and sends it only to ",n,"; the agent can use"," ",n,"'s tools but never sees the token. Give it read access only, unless the agent should change things in ",n,"."]})]}),jsxs("div",{className:"fk:flex fk:flex-col fk:gap-2",children:[jsx("label",{className:"fk:text-sm fk:font-medium",htmlFor:r,children:e.tokenLabel}),jsx(s,{"aria-describedby":d?`${r}-error`:void 0,"aria-invalid":d?true:void 0,autoComplete:"off",autoFocus:true,disabled:u,id:r,placeholder:e.placeholder??void 0,spellCheck:false,type:"password",value:o,onChange:f=>{a(f.target.value),g(null);}}),jsx($,{id:`${r}-error`,message:d}),jsx(V,{href:e.helpUrl,label:`How to create a ${e.tokenLabel}`})]}),jsxs(j,{children:[jsx(b,{disabled:u,size:"sm",type:"button",variant:"outline",onClick:()=>t.settle(false),children:"Cancel"}),jsxs(b,{disabled:u||!o.trim(),size:"sm",type:"submit",children:[u?jsx(LoaderCircle,{className:"fk:size-4 fk:animate-spin"}):null,"Connect"]})]})]})})})}export{R as a,O as b,ae as c,me as d,ke as e};//# sourceMappingURL=chunk-5LGIALCK.js.map
2
- //# sourceMappingURL=chunk-5LGIALCK.js.map
@@ -1,2 +0,0 @@
1
- import'./index.css';import {a as a$1}from'./chunk-O2QMYUPS.js';import {Slot}from'radix-ui';import {cva}from'class-variance-authority';import {jsx}from'react/jsx-runtime';var a=cva("fk:inline-flex fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:rounded-md fk:text-sm fk:font-medium fk:whitespace-nowrap fk:transition-all fk:outline-none fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:disabled:pointer-events-none fk:disabled:opacity-50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:corner-squircle",{variants:{variant:{default:"fk:bg-primary fk:text-primary-foreground fk:hover:bg-primary/90",destructive:"fk:bg-destructive fk:text-white fk:hover:bg-destructive/90 fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40",outline:"fk:border fk:bg-background fk:shadow-xs fk:hover:bg-accent fk:hover:text-accent-foreground fk:dark:border-input",secondary:"fk:bg-secondary fk:text-secondary-foreground fk:hover:bg-secondary/80",ghost:"fk:hover:bg-accent fk:hover:text-accent-foreground fk:dark:hover:bg-accent/50",link:"fk:text-primary fk:underline-offset-4 fk:hover:underline"},size:{default:"fk:h-9 fk:px-4 fk:py-2 fk:has-[>svg]:px-3",xs:"fk:h-6 fk:rounded-md fk:px-2 fk:text-xs fk:has-[>svg]:px-1.5 fk:[&_svg:not([class*='size-'])]:size-3 fk:corner-squircle",sm:"fk:h-8 fk:rounded-md fk:px-3 fk:has-[>svg]:px-2.5 fk:corner-squircle",lg:"fk:h-10 fk:rounded-md fk:px-6 fk:has-[>svg]:px-4 fk:corner-squircle",icon:"fk:size-9","icon-xs":"fk:size-6 fk:rounded-md fk:[&_svg:not([class*='size-'])]:size-3 fk:corner-squircle","icon-sm":"fk:size-8","icon-lg":"fk:size-10"}},defaultVariants:{variant:"default",size:"default"}});function v({className:f,variant:e="default",size:r="default",asChild:i=false,...o}){let s=i?Slot.Root:"button";return jsx(s,{"data-slot":"button","data-variant":e,"data-size":r,className:a$1(a({variant:e,size:r,className:f})),...o})}export{a,v as b};//# sourceMappingURL=chunk-6NRQMG26.js.map
2
- //# sourceMappingURL=chunk-6NRQMG26.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ui/primitives/button.tsx"],"names":["buttonVariants","cva","Button","className","variant","size","asChild","props","Comp","Slot","jsx","cn"],"mappings":"0KAKA,IAAMA,CAAAA,CAAiBC,IACrB,khBAAA,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,QAAS,iEAAA,CACT,WAAA,CACE,qKAAA,CACF,OAAA,CACE,iHAAA,CACF,SAAA,CAAW,wEACX,KAAA,CAAO,+EAAA,CACP,IAAA,CAAM,0DACR,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,2CAAA,CACT,EAAA,CAAI,yHAAA,CACJ,EAAA,CAAI,sEAAA,CACJ,GAAI,qEAAA,CACJ,IAAA,CAAM,WAAA,CACN,SAAA,CAAW,oFAAA,CACX,SAAA,CAAW,WAAA,CACX,SAAA,CAAW,YACb,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,UACT,IAAA,CAAM,SACR,CACF,CACF,EAEA,SAASC,EAAO,CACd,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,SAAA,CACV,KAAAC,CAAAA,CAAO,SAAA,CACP,OAAA,CAAAC,CAAAA,CAAU,KAAA,CACV,GAAGC,CACL,CAAA,CAGK,CACH,IAAMC,CAAAA,CAAOF,CAAAA,CAAUG,IAAAA,CAAK,KAAO,QAAA,CAEnC,OACEC,GAAAA,CAACF,CAAAA,CAAA,CACC,WAAA,CAAU,SACV,cAAA,CAAcJ,CAAAA,CACd,WAAA,CAAWC,CAAAA,CACX,SAAA,CAAWM,GAAAA,CAAGX,EAAe,CAAE,OAAA,CAAAI,CAAAA,CAAS,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CACzD,GAAGI,CAAAA,CACN,CAEJ","file":"chunk-6NRQMG26.js","sourcesContent":["import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n \"fk:inline-flex fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:rounded-md fk:text-sm fk:font-medium fk:whitespace-nowrap fk:transition-all fk:outline-none fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:disabled:pointer-events-none fk:disabled:opacity-50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:corner-squircle\",\n {\n variants: {\n variant: {\n default: 'fk:bg-primary fk:text-primary-foreground fk:hover:bg-primary/90',\n destructive:\n 'fk:bg-destructive fk:text-white fk:hover:bg-destructive/90 fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40',\n outline:\n 'fk:border fk:bg-background fk:shadow-xs fk:hover:bg-accent fk:hover:text-accent-foreground fk:dark:border-input',\n secondary: 'fk:bg-secondary fk:text-secondary-foreground fk:hover:bg-secondary/80',\n ghost: 'fk:hover:bg-accent fk:hover:text-accent-foreground fk:dark:hover:bg-accent/50',\n link: 'fk:text-primary fk:underline-offset-4 fk:hover:underline',\n },\n size: {\n default: 'fk:h-9 fk:px-4 fk:py-2 fk:has-[>svg]:px-3',\n xs: \"fk:h-6 fk:rounded-md fk:px-2 fk:text-xs fk:has-[>svg]:px-1.5 fk:[&_svg:not([class*='size-'])]:size-3 fk:corner-squircle\",\n sm: 'fk:h-8 fk:rounded-md fk:px-3 fk:has-[>svg]:px-2.5 fk:corner-squircle',\n lg: 'fk:h-10 fk:rounded-md fk:px-6 fk:has-[>svg]:px-4 fk:corner-squircle',\n icon: 'fk:size-9',\n 'icon-xs': \"fk:size-6 fk:rounded-md fk:[&_svg:not([class*='size-'])]:size-3 fk:corner-squircle\",\n 'icon-sm': 'fk:size-8',\n 'icon-lg': 'fk:size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Button({\n className,\n variant = 'default',\n size = 'default',\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot.Root : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n data-variant={variant}\n data-size={size}\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n"]}
@@ -1,2 +0,0 @@
1
- import'./index.css';function a(e,n,r=[]){return r.find(t=>t.id===e)?.name??n.find(t=>t.projectId===e)?.title??e}function c(e,n){let r=new Map;for(let t of e){let o=n.find(l=>l.id===t),i=o?.team.id??"",s=r.get(i)??{label:o?.team.name??"",projectIds:[]};s.projectIds.push(t),r.set(i,s);}return r.size<=1?[{label:null,projectIds:e}]:[...r.values()].map(t=>({label:t.label||null,projectIds:t.projectIds}))}export{a,c as b};//# sourceMappingURL=chunk-AKQ6ELDX.js.map
2
- //# sourceMappingURL=chunk-AKQ6ELDX.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ui/components/project-label.ts"],"names":["getProjectLabel","projectId","projects","projectSummaries","project","groupProjectIdsByTeam","projectIds","teams","id","summary","key","group"],"mappings":"oBAGO,SAASA,CAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CAAqC,GAC7B,CACR,OACEA,CAAAA,CAAiB,IAAA,CAAMC,CAAAA,EAAYA,CAAAA,CAAQ,KAAOH,CAAS,CAAA,EAAG,IAAA,EAC9DC,CAAAA,CAAS,IAAA,CAAME,CAAAA,EAAYA,EAAQ,SAAA,GAAcH,CAAS,CAAA,EAAG,KAAA,EAC7DA,CAEJ,CAGO,SAASI,CAAAA,CACdC,CAAAA,CACAH,CAAAA,CACkD,CAClD,IAAMI,CAAAA,CAAQ,IAAI,GAAA,CAElB,IAAA,IAAWC,CAAAA,IAAMF,CAAAA,CAAY,CAC3B,IAAMG,EAAUN,CAAAA,CAAiB,IAAA,CAAMC,CAAAA,EAAYA,CAAAA,CAAQ,EAAA,GAAOI,CAAE,EAC9DE,CAAAA,CAAMD,CAAAA,EAAS,IAAA,CAAK,EAAA,EAAM,EAAA,CAC1BE,CAAAA,CAAQJ,EAAM,GAAA,CAAIG,CAAG,CAAA,EAAK,CAAE,KAAA,CAAOD,CAAAA,EAAS,KAAK,IAAA,EAAQ,EAAA,CAAI,UAAA,CAAY,EAAG,CAAA,CAClFE,EAAM,UAAA,CAAW,IAAA,CAAKH,CAAE,CAAA,CACxBD,CAAAA,CAAM,GAAA,CAAIG,EAAKC,CAAK,EACtB,CAEA,OAAIJ,CAAAA,CAAM,IAAA,EAAQ,EACT,CAAC,CAAE,KAAA,CAAO,IAAA,CAAM,UAAA,CAAAD,CAAW,CAAC,CAAA,CAG9B,CAAC,GAAGC,CAAAA,CAAM,MAAA,EAAQ,EAAE,GAAA,CAAKI,CAAAA,GAAW,CAAE,KAAA,CAAOA,CAAAA,CAAM,KAAA,EAAS,KAAM,UAAA,CAAYA,CAAAA,CAAM,UAAW,CAAA,CAAE,CAC1G","file":"chunk-AKQ6ELDX.js","sourcesContent":["import type { ProjectSummary, ProjectUiConfig } from '../../core/config/types';\n\n/** Name of a project: the listed name, else the deployed schema title, else the id. */\nexport function getProjectLabel(\n projectId: string,\n projects: ProjectUiConfig[],\n projectSummaries: ProjectSummary[] = []\n): string {\n return (\n projectSummaries.find((project) => project.id === projectId)?.name ??\n projects.find((project) => project.projectId === projectId)?.title ??\n projectId\n );\n}\n\n/** Groups ids by team when the summaries span more than one team; otherwise a single unnamed group. */\nexport function groupProjectIdsByTeam(\n projectIds: string[],\n projectSummaries: ProjectSummary[]\n): { label: string | null; projectIds: string[] }[] {\n const teams = new Map<string, { label: string; projectIds: string[] }>();\n\n for (const id of projectIds) {\n const summary = projectSummaries.find((project) => project.id === id);\n const key = summary?.team.id ?? '';\n const group = teams.get(key) ?? { label: summary?.team.name ?? '', projectIds: [] };\n group.projectIds.push(id);\n teams.set(key, group);\n }\n\n if (teams.size <= 1) {\n return [{ label: null, projectIds }];\n }\n\n return [...teams.values()].map((group) => ({ label: group.label || null, projectIds: group.projectIds }));\n}\n"]}