@nextclaw/ui 0.12.28 → 0.12.30

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 (43) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/assets/api-CKKNxbsy.js +15 -0
  3. package/dist/assets/{app-manager-provider-oYdeYPSv.js → app-manager-provider-BM1hziPv.js} +1 -1
  4. package/dist/assets/{channels-list-page-DkPvpAqc.js → channels-list-page-B6JASU3q.js} +2 -2
  5. package/dist/assets/{chat-page-b7Zf32fF.js → chat-page-C_lQm75P.js} +1 -1
  6. package/dist/assets/{desktop-DVUbOWbR.js → desktop-CmIbyIrg.js} +1 -1
  7. package/dist/assets/{desktop-update-config-CP8dFYXK.js → desktop-update-config-jWt63bXG.js} +1 -1
  8. package/dist/assets/{dialog-BKo0RItd.js → dialog-DWZeMf9V.js} +1 -1
  9. package/dist/assets/{dist-CFiwgaLs.js → dist-DN-YM_0Y.js} +1 -1
  10. package/dist/assets/{es2015-BhznEEyJ.js → es2015-ZJ-nWL4L.js} +1 -1
  11. package/dist/assets/{index-DqJ3CYwi.js → index-CTfzteME.js} +3 -3
  12. package/dist/assets/{index-DmWo8dX2.css → index-DKC9hvsP.css} +1 -1
  13. package/dist/assets/{marketplace-page-BVqFjnEB.js → marketplace-page-BdiLk2eA.js} +1 -1
  14. package/dist/assets/marketplace-page-C3RVIckE.js +1 -0
  15. package/dist/assets/mcp-marketplace-page-BVCDibC7.js +1 -0
  16. package/dist/assets/{mcp-marketplace-page-BOYJO0kp.js → mcp-marketplace-page-DTCFgcDl.js} +1 -1
  17. package/dist/assets/{model-config-Bg2yycmn.js → model-config-QChwQThC.js} +1 -1
  18. package/dist/assets/{notice-card-Dr6xCwva.js → notice-card-BM2_YNoc.js} +1 -1
  19. package/dist/assets/{popover-BDFNiLlg.js → popover-2H9DS7Cv.js} +1 -1
  20. package/dist/assets/{provider-scoped-model-input-BMTp4BEH.js → provider-scoped-model-input-DsZJ44ZV.js} +1 -1
  21. package/dist/assets/{providers-list-DC1q3fvC.js → providers-list-lpGJJ21M.js} +1 -1
  22. package/dist/assets/remote-Dm6hKGew.js +1 -0
  23. package/dist/assets/{runtime-config-page-q-nC0C5i.js → runtime-config-page-CDEAJFfY.js} +1 -1
  24. package/dist/assets/{search-config-CcKHif8O.js → search-config-CJOrq3h0.js} +1 -1
  25. package/dist/assets/{secrets-config-DSg6O92a.js → secrets-config-C17j6mjS.js} +1 -1
  26. package/dist/assets/{select-BUTwE_lC.js → select-C2c10F3e.js} +1 -1
  27. package/dist/assets/{setting-row-BavcnXw1.js → setting-row-CB_ZFbIZ.js} +1 -1
  28. package/dist/assets/{tag-chip-Dm2Lqnpu.js → tag-chip-CrQfVN3A.js} +1 -1
  29. package/dist/assets/{use-config-Cyv5IuSt.js → use-config-jAYudJxy.js} +1 -1
  30. package/dist/assets/{use-infinite-scroll-loader-DF2e6nQ2.js → use-infinite-scroll-loader-zzviKbU8.js} +1 -1
  31. package/dist/index.html +12 -12
  32. package/package.json +9 -9
  33. package/src/features/channels/utils/channel-form-fields.utils.ts +0 -9
  34. package/src/features/marketplace/components/marketplace-page.test.tsx +29 -29
  35. package/src/features/marketplace/utils/marketplace-installed-cache.utils.test.ts +11 -11
  36. package/src/index.css +3 -3
  37. package/src/shared/lib/logos/index.ts +0 -1
  38. package/dist/assets/api-DGD9_Bg4.js +0 -15
  39. package/dist/assets/marketplace-page-DkQ2hTs1.js +0 -1
  40. package/dist/assets/mcp-marketplace-page-DSML7NN0.js +0 -1
  41. package/dist/assets/remote-Dr3jcfWP.js +0 -1
  42. package/dist/logos/mochat.svg +0 -6
  43. package/public/logos/mochat.svg +0 -6
@@ -1 +1 @@
1
- import{r as e}from"./i18n-D1144VAA.js";import{$ as t,B as n,F as r,G as i,I as a,J as o,K as s,L as c,Lt as l,N as u,P as d,Q as f,R as p,Rt as m,U as h,V as g,W as _,X as v,Xt as y,Y as b,Z as x,_ as S,et as C,g as w,q as T,z as E,zt as D}from"./api-DGD9_Bg4.js";function O(){return D({queryKey:[`config`],queryFn:p,staleTime:3e4,refetchOnWindowFocus:!0})}function k(){return D({queryKey:[`app-meta`],queryFn:c,staleTime:1/0})}function A(){return D({queryKey:[`config-meta`],queryFn:E,staleTime:1/0})}function j(){return D({queryKey:[`config-schema`],queryFn:n,staleTime:1/0})}function M(){let t=y();return m({mutationFn:v,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){let n=y();return m({mutationFn:({data:e})=>t(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`config`]}),n.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function P(){let t=y();return m({mutationFn:({provider:e,data:t})=>x(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function F(){let t=y();return m({mutationFn:({data:e})=>u(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function I(){let t=y();return m({mutationFn:({provider:e})=>r(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function L(){return m({mutationFn:({provider:e,data:t})=>o(e,t)})}function R(){return m({mutationFn:({provider:e,data:t})=>T(e,t)})}function z(){return m({mutationFn:({provider:e,data:t})=>_(e,t)})}function B(){return m({mutationFn:({provider:e})=>h(e)})}function V(){let t=y();return m({mutationFn:({channel:e,data:t})=>b(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplying`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function H(){let t=y();return m({mutationFn:({data:e})=>f(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function U(){let t=y();return m({mutationFn:({data:e})=>C(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function W(){return m({mutationFn:({actionId:e,data:t})=>a(e,t),onError:t=>{l.error(e(`error`)+`: `+t.message)}})}function G(e){return D({queryKey:[`ncp-sessions`,e?.limit??null],queryFn:()=>S(e),staleTime:5e3,retry:!1})}function K(e){return D({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>w(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,staleTime:5e3,retry:!1})}function q(e={all:!0}){return D({queryKey:[`cron`,e],queryFn:()=>g(e),staleTime:1e4})}function J(){let t=y();return m({mutationFn:({id:e})=>d(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function Y(){let t=y();return m({mutationFn:({id:e,enabled:t})=>s(e,{enabled:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function X(){let t=y();return m({mutationFn:({id:e,force:t})=>i(e,{force:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}export{U as C,N as S,Y as _,F as a,P as b,I as c,K as d,G as f,L as g,R as h,j as i,W as l,X as m,O as n,q as o,z as p,A as r,J as s,k as t,B as u,V as v,H as x,M as y};
1
+ import{r as e}from"./i18n-D1144VAA.js";import{$ as t,B as n,F as r,G as i,I as a,J as o,K as s,L as c,Lt as l,N as u,P as d,Q as f,R as p,Rt as m,U as h,V as g,W as _,X as v,Xt as y,Y as b,Z as x,_ as S,et as C,g as w,q as T,z as E,zt as D}from"./api-CKKNxbsy.js";function O(){return D({queryKey:[`config`],queryFn:p,staleTime:3e4,refetchOnWindowFocus:!0})}function k(){return D({queryKey:[`app-meta`],queryFn:c,staleTime:1/0})}function A(){return D({queryKey:[`config-meta`],queryFn:E,staleTime:1/0})}function j(){return D({queryKey:[`config-schema`],queryFn:n,staleTime:1/0})}function M(){let t=y();return m({mutationFn:v,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){let n=y();return m({mutationFn:({data:e})=>t(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`config`]}),n.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function P(){let t=y();return m({mutationFn:({provider:e,data:t})=>x(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function F(){let t=y();return m({mutationFn:({data:e})=>u(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function I(){let t=y();return m({mutationFn:({provider:e})=>r(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function L(){return m({mutationFn:({provider:e,data:t})=>o(e,t)})}function R(){return m({mutationFn:({provider:e,data:t})=>T(e,t)})}function z(){return m({mutationFn:({provider:e,data:t})=>_(e,t)})}function B(){return m({mutationFn:({provider:e})=>h(e)})}function V(){let t=y();return m({mutationFn:({channel:e,data:t})=>b(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplying`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function H(){let t=y();return m({mutationFn:({data:e})=>f(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function U(){let t=y();return m({mutationFn:({data:e})=>C(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function W(){return m({mutationFn:({actionId:e,data:t})=>a(e,t),onError:t=>{l.error(e(`error`)+`: `+t.message)}})}function G(e){return D({queryKey:[`ncp-sessions`,e?.limit??null],queryFn:()=>S(e),staleTime:5e3,retry:!1})}function K(e){return D({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>w(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,staleTime:5e3,retry:!1})}function q(e={all:!0}){return D({queryKey:[`cron`,e],queryFn:()=>g(e),staleTime:1e4})}function J(){let t=y();return m({mutationFn:({id:e})=>d(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function Y(){let t=y();return m({mutationFn:({id:e,enabled:t})=>s(e,{enabled:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function X(){let t=y();return m({mutationFn:({id:e,force:t})=>i(e,{force:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}export{U as C,N as S,Y as _,F as a,P as b,I as c,K as d,G as f,L as g,R as h,j as i,W as l,X as m,O as n,q as o,z as p,A as r,J as s,k as t,B as u,V as v,H as x,M as y};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{$t as i,Bt as a,Qt as o,Zt as s,en as c}from"./api-DGD9_Bg4.js";import{t as l}from"./createLucideIcon-DzY6wN61.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-BUTwE_lC.js";import{u as h}from"./index-DqJ3CYwi.js";var g=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:i()})}getOptimisticResult(e){return e.behavior=i(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=i&&u===`forward`,p=c&&u===`backward`,m=i&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,n.data),hasPreviousPage:o(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:a&&!f&&!m}}};function _(e,t){return a(e,g,t)}var v=l(`PackageSearch`,[[`path`,{d:`M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14`,key:`e7tb2h`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`12`,key:`a4e8g8`}],[`circle`,{cx:`18.5`,cy:`15.5`,r:`2.5`,key:`b5zd12`}],[`path`,{d:`M20.27 17.27 22 19`,key:`1l4muz`}]]);function y(e){if(!e||e.pages.length===0)return;let t=e.pages.flatMap(e=>e.items);return{...e.pages[e.pages.length-1],items:t,pages:e.pages,loadedItems:t.length,loadedPages:e.pages.length}}var b=n();function x({scope:e,searchText:t,searchPlaceholder:n,sort:i,onSearchTextChange:a,onSortChange:o}){return(0,b.jsx)(`div`,{className:`mb-4`,children:(0,b.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,b.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,b.jsx)(v,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400`}),(0,b.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),placeholder:n,className:`h-9 w-full rounded-xl border border-gray-200/80 pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40`})]}),e===`all`&&(0,b.jsxs)(m,{value:i,onValueChange:e=>o(e),children:[(0,b.jsx)(d,{className:`h-9 w-[150px] shrink-0 rounded-lg`,children:(0,b.jsx)(u,{})}),(0,b.jsxs)(f,{children:[(0,b.jsx)(p,{value:`relevance`,children:r(`marketplaceSortRelevance`)}),(0,b.jsx)(p,{value:`updated`,children:r(`marketplaceSortUpdated`)})]})]})]})})}function S({count:e}){return(0,b.jsx)(b.Fragment,{children:Array.from({length:e},(e,t)=>(0,b.jsx)(`article`,{className:`h-full rounded-2xl border border-gray-200/40 bg-white px-5 py-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-3.5`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 flex-1 gap-3`,children:[(0,b.jsx)(h,{className:`h-10 w-10 shrink-0 rounded-xl`}),(0,b.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,b.jsx)(h,{className:`h-4 w-32 max-w-[70%]`}),(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(h,{className:`h-3 w-12`}),(0,b.jsx)(h,{className:`h-3 w-24`})]}),(0,b.jsx)(h,{className:`h-3 w-full`})]})]}),(0,b.jsx)(h,{className:`h-8 w-20 shrink-0 rounded-xl`})]})},`marketplace-skeleton-${t}`))})}function C({hasMore:e,loading:t,sentinelRef:n}){return!e&&!t?null:(0,b.jsxs)(`div`,{className:`py-4`,children:[e&&(0,b.jsx)(`div`,{ref:n,className:`h-1 w-full`,"aria-hidden":`true`}),t&&(0,b.jsx)(`div`,{"data-testid":`marketplace-loading-more`,className:`pt-3 text-center text-xs text-gray-500`,children:r(`loading`)})]})}function w(e){let t=e.trim().toLowerCase().replace(/_/g,`-`),n=[t,t.split(`-`)[0],`en`];return Array.from(new Set(n.filter(Boolean)))}function T(e){return e.trim().toLowerCase().replace(/_/g,`-`)}function E(e,t,n){if(e){let t=Object.entries(e).map(([e,t])=>({locale:T(e),text:typeof t==`string`?t.trim():``})).filter(e=>e.text.length>0);if(t.length>0){let e=new Map(t.map(e=>[e.locale,e.text]));for(let t of n){let n=T(t),r=e.get(n);if(r)return r}for(let e of n){let n=T(e).split(`-`)[0];if(!n)continue;let r=t.find(e=>e.locale===n||e.locale.startsWith(`${n}-`));if(r)return r.text}return t[0]?.text??``}}return t?.trim()??``}function D(e,t){if(!e)return``;for(let n of t)if(T(n).split(`-`)[0]===`zh`&&e.descriptionZh?.trim())return e.descriptionZh.trim();return e.description?.trim()?e.description.trim():e.descriptionZh?.trim()?e.descriptionZh.trim():``}var O=e(t(),1),k=160;function A(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(null),r=(0,O.useRef)(e.onLoadMore),i=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{r.current=e.onLoadMore},[e.onLoadMore]),(0,O.useEffect)(()=>{e.disabled&&(i.current=!1)},[e.disabled]),(0,O.useEffect)(()=>{let a=t.current,o=n.current,s=e.thresholdPx??k;if(e.disabled||!a||!o)return;let c=()=>{i.current||e.disabled||(i.current=!0,Promise.resolve(r.current()).finally(()=>{i.current=!1}))},l=()=>{o.getBoundingClientRect().top-a.getBoundingClientRect().bottom<=s&&c()};if(typeof IntersectionObserver==`function`){let e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:a,rootMargin:`0px 0px ${s}px 0px`});return e.observe(o),l(),()=>{e.disconnect()}}return a.addEventListener(`scroll`,l,{passive:!0}),l(),()=>{a.removeEventListener(`scroll`,l)}},[e.disabled,e.thresholdPx,e.watchValue]),{containerRef:t,sentinelRef:n}}export{x as a,y as c,E as i,_ as l,w as n,C as o,D as r,S as s,A as t};
1
+ import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{$t as i,Bt as a,Qt as o,Zt as s,en as c}from"./api-CKKNxbsy.js";import{t as l}from"./createLucideIcon-DzY6wN61.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-C2c10F3e.js";import{u as h}from"./index-CTfzteME.js";var g=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:i()})}getOptimisticResult(e){return e.behavior=i(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=i&&u===`forward`,p=c&&u===`backward`,m=i&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,n.data),hasPreviousPage:o(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:a&&!f&&!m}}};function _(e,t){return a(e,g,t)}var v=l(`PackageSearch`,[[`path`,{d:`M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14`,key:`e7tb2h`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`12`,key:`a4e8g8`}],[`circle`,{cx:`18.5`,cy:`15.5`,r:`2.5`,key:`b5zd12`}],[`path`,{d:`M20.27 17.27 22 19`,key:`1l4muz`}]]);function y(e){if(!e||e.pages.length===0)return;let t=e.pages.flatMap(e=>e.items);return{...e.pages[e.pages.length-1],items:t,pages:e.pages,loadedItems:t.length,loadedPages:e.pages.length}}var b=n();function x({scope:e,searchText:t,searchPlaceholder:n,sort:i,onSearchTextChange:a,onSortChange:o}){return(0,b.jsx)(`div`,{className:`mb-4`,children:(0,b.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,b.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,b.jsx)(v,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400`}),(0,b.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),placeholder:n,className:`h-9 w-full rounded-xl border border-gray-200/80 pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40`})]}),e===`all`&&(0,b.jsxs)(m,{value:i,onValueChange:e=>o(e),children:[(0,b.jsx)(d,{className:`h-9 w-[150px] shrink-0 rounded-lg`,children:(0,b.jsx)(u,{})}),(0,b.jsxs)(f,{children:[(0,b.jsx)(p,{value:`relevance`,children:r(`marketplaceSortRelevance`)}),(0,b.jsx)(p,{value:`updated`,children:r(`marketplaceSortUpdated`)})]})]})]})})}function S({count:e}){return(0,b.jsx)(b.Fragment,{children:Array.from({length:e},(e,t)=>(0,b.jsx)(`article`,{className:`h-full rounded-2xl border border-gray-200/40 bg-white px-5 py-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-3.5`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 flex-1 gap-3`,children:[(0,b.jsx)(h,{className:`h-10 w-10 shrink-0 rounded-xl`}),(0,b.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,b.jsx)(h,{className:`h-4 w-32 max-w-[70%]`}),(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(h,{className:`h-3 w-12`}),(0,b.jsx)(h,{className:`h-3 w-24`})]}),(0,b.jsx)(h,{className:`h-3 w-full`})]})]}),(0,b.jsx)(h,{className:`h-8 w-20 shrink-0 rounded-xl`})]})},`marketplace-skeleton-${t}`))})}function C({hasMore:e,loading:t,sentinelRef:n}){return!e&&!t?null:(0,b.jsxs)(`div`,{className:`py-4`,children:[e&&(0,b.jsx)(`div`,{ref:n,className:`h-1 w-full`,"aria-hidden":`true`}),t&&(0,b.jsx)(`div`,{"data-testid":`marketplace-loading-more`,className:`pt-3 text-center text-xs text-gray-500`,children:r(`loading`)})]})}function w(e){let t=e.trim().toLowerCase().replace(/_/g,`-`),n=[t,t.split(`-`)[0],`en`];return Array.from(new Set(n.filter(Boolean)))}function T(e){return e.trim().toLowerCase().replace(/_/g,`-`)}function E(e,t,n){if(e){let t=Object.entries(e).map(([e,t])=>({locale:T(e),text:typeof t==`string`?t.trim():``})).filter(e=>e.text.length>0);if(t.length>0){let e=new Map(t.map(e=>[e.locale,e.text]));for(let t of n){let n=T(t),r=e.get(n);if(r)return r}for(let e of n){let n=T(e).split(`-`)[0];if(!n)continue;let r=t.find(e=>e.locale===n||e.locale.startsWith(`${n}-`));if(r)return r.text}return t[0]?.text??``}}return t?.trim()??``}function D(e,t){if(!e)return``;for(let n of t)if(T(n).split(`-`)[0]===`zh`&&e.descriptionZh?.trim())return e.descriptionZh.trim();return e.description?.trim()?e.description.trim():e.descriptionZh?.trim()?e.descriptionZh.trim():``}var O=e(t(),1),k=160;function A(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(null),r=(0,O.useRef)(e.onLoadMore),i=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{r.current=e.onLoadMore},[e.onLoadMore]),(0,O.useEffect)(()=>{e.disabled&&(i.current=!1)},[e.disabled]),(0,O.useEffect)(()=>{let a=t.current,o=n.current,s=e.thresholdPx??k;if(e.disabled||!a||!o)return;let c=()=>{i.current||e.disabled||(i.current=!0,Promise.resolve(r.current()).finally(()=>{i.current=!1}))},l=()=>{o.getBoundingClientRect().top-a.getBoundingClientRect().bottom<=s&&c()};if(typeof IntersectionObserver==`function`){let e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:a,rootMargin:`0px 0px ${s}px 0px`});return e.observe(o),l(),()=>{e.disconnect()}}return a.addEventListener(`scroll`,l,{passive:!0}),l(),()=>{a.removeEventListener(`scroll`,l)}},[e.disabled,e.thresholdPx,e.watchValue]),{containerRef:t,sentinelRef:n}}export{x as a,y as c,E as i,_ as l,w as n,C as o,D as r,S as s,A as t};
package/dist/index.html CHANGED
@@ -78,24 +78,24 @@
78
78
  })();
79
79
  </script>
80
80
  <title>NextClaw</title>
81
- <script type="module" crossorigin src="/assets/index-DqJ3CYwi.js"></script>
81
+ <script type="module" crossorigin src="/assets/index-CTfzteME.js"></script>
82
82
  <link rel="modulepreload" crossorigin href="/assets/i18n-D1144VAA.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DzY6wN61.js">
84
84
  <link rel="modulepreload" crossorigin href="/assets/cpu-DPPwMzoC.js">
85
- <link rel="modulepreload" crossorigin href="/assets/api-DGD9_Bg4.js">
86
- <link rel="modulepreload" crossorigin href="/assets/es2015-BhznEEyJ.js">
87
- <link rel="modulepreload" crossorigin href="/assets/select-BUTwE_lC.js">
88
- <link rel="modulepreload" crossorigin href="/assets/dist-CFiwgaLs.js">
85
+ <link rel="modulepreload" crossorigin href="/assets/api-CKKNxbsy.js">
86
+ <link rel="modulepreload" crossorigin href="/assets/es2015-ZJ-nWL4L.js">
87
+ <link rel="modulepreload" crossorigin href="/assets/select-C2c10F3e.js">
88
+ <link rel="modulepreload" crossorigin href="/assets/dist-DN-YM_0Y.js">
89
89
  <link rel="modulepreload" crossorigin href="/assets/x-BeyYA_h6.js">
90
- <link rel="modulepreload" crossorigin href="/assets/dialog-BKo0RItd.js">
91
- <link rel="modulepreload" crossorigin href="/assets/popover-BDFNiLlg.js">
90
+ <link rel="modulepreload" crossorigin href="/assets/dialog-DWZeMf9V.js">
91
+ <link rel="modulepreload" crossorigin href="/assets/popover-2H9DS7Cv.js">
92
92
  <link rel="modulepreload" crossorigin href="/assets/search-CRtQwr-h.js">
93
93
  <link rel="modulepreload" crossorigin href="/assets/book-open-BcnAiKde.js">
94
94
  <link rel="modulepreload" crossorigin href="/assets/download-CMM8po31.js">
95
95
  <link rel="modulepreload" crossorigin href="/assets/key-round-DUq47t0P.js">
96
- <link rel="modulepreload" crossorigin href="/assets/notice-card-Dr6xCwva.js">
96
+ <link rel="modulepreload" crossorigin href="/assets/notice-card-BM2_YNoc.js">
97
97
  <link rel="modulepreload" crossorigin href="/assets/status-dot-l3kPFdq_.js">
98
- <link rel="modulepreload" crossorigin href="/assets/app-manager-provider-oYdeYPSv.js">
98
+ <link rel="modulepreload" crossorigin href="/assets/app-manager-provider-BM1hziPv.js">
99
99
  <link rel="modulepreload" crossorigin href="/assets/settings-MWL2SMyk.js">
100
100
  <link rel="modulepreload" crossorigin href="/assets/refresh-cw-CrbD8EkT.js">
101
101
  <link rel="modulepreload" crossorigin href="/assets/sparkles-BmgOD4nY.js">
@@ -104,9 +104,9 @@
104
104
  <link rel="modulepreload" crossorigin href="/assets/doc-browser-context-FukQHvyo.js">
105
105
  <link rel="modulepreload" crossorigin href="/assets/doc-browser-rZIQIjuw.js">
106
106
  <link rel="modulepreload" crossorigin href="/assets/doc-browser-CAhfnm0D.js">
107
- <link rel="modulepreload" crossorigin href="/assets/use-config-Cyv5IuSt.js">
108
- <link rel="modulepreload" crossorigin href="/assets/desktop-DVUbOWbR.js">
109
- <link rel="stylesheet" crossorigin href="/assets/index-DmWo8dX2.css">
107
+ <link rel="modulepreload" crossorigin href="/assets/use-config-jAYudJxy.js">
108
+ <link rel="modulepreload" crossorigin href="/assets/desktop-CmIbyIrg.js">
109
+ <link rel="stylesheet" crossorigin href="/assets/index-DKC9hvsP.css">
110
110
  </head>
111
111
 
112
112
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/ui",
3
- "version": "0.12.28",
3
+ "version": "0.12.30",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,14 +28,14 @@
28
28
  "tailwind-merge": "^2.5.4",
29
29
  "zod": "^3.23.8",
30
30
  "zustand": "^5.0.2",
31
- "@nextclaw/client-sdk": "0.1.7",
32
- "@nextclaw/ncp": "0.5.12",
33
- "@nextclaw/server": "0.12.19",
34
- "@nextclaw/shared": "0.1.6",
35
- "@nextclaw/ncp-http-agent-client": "0.3.24",
36
- "@nextclaw/agent-chat": "0.1.17",
37
- "@nextclaw/agent-chat-ui": "0.3.19",
38
- "@nextclaw/ncp-react": "0.4.32"
31
+ "@nextclaw/agent-chat": "0.1.18",
32
+ "@nextclaw/client-sdk": "0.1.9",
33
+ "@nextclaw/agent-chat-ui": "0.3.20",
34
+ "@nextclaw/ncp": "0.5.13",
35
+ "@nextclaw/ncp-http-agent-client": "0.3.25",
36
+ "@nextclaw/server": "0.12.21",
37
+ "@nextclaw/ncp-react": "0.4.33",
38
+ "@nextclaw/shared": "0.1.7"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@testing-library/react": "^16.3.0",
@@ -189,15 +189,6 @@ export function buildChannelFormDefinitions(): Record<string, ChannelFormDefinit
189
189
  { name: 'fromAddress', type: 'email', label: t('fromAddress') }
190
190
  ]
191
191
  },
192
- mochat: {
193
- fields: [
194
- { name: 'enabled', type: 'boolean', label: t('enabled') },
195
- { name: 'baseUrl', type: 'text', label: t('baseUrl') },
196
- { name: 'clawToken', type: 'password', label: t('clawToken') },
197
- { name: 'agentUserId', type: 'text', label: t('agentUserId') },
198
- { name: 'allowFrom', type: 'tags', label: t('allowFrom') }
199
- ]
200
- },
201
192
  qq: {
202
193
  fields: [
203
194
  { name: 'enabled', type: 'boolean', label: t('enabled') },
@@ -122,16 +122,16 @@ function createPluginMarketplaceItem(
122
122
  overrides: Partial<MarketplaceItemSummary> = {},
123
123
  ): MarketplaceItemSummary {
124
124
  return createMarketplaceItem({
125
- id: "plugin-codex-runtime",
126
- slug: "codex-runtime",
125
+ id: "plugin-channel-slack",
126
+ slug: "channel-slack",
127
127
  type: "plugin",
128
- name: "Codex SDK NCP Runtime",
129
- summary: "Optional Codex runtime for NextClaw",
130
- summaryI18n: { en: "Optional Codex runtime for NextClaw" },
128
+ name: "Slack Channel",
129
+ summary: "Optional Slack channel for NextClaw",
130
+ summaryI18n: { en: "Optional Slack channel for NextClaw" },
131
131
  install: {
132
132
  kind: "npm",
133
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
134
- command: "npm install @nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
133
+ spec: "@nextclaw/channel-plugin-slack",
134
+ command: "npm install @nextclaw/channel-plugin-slack",
135
135
  },
136
136
  ...overrides,
137
137
  });
@@ -142,9 +142,9 @@ function createInstalledRecord(
142
142
  ): MarketplaceInstalledRecord {
143
143
  return {
144
144
  type: "plugin",
145
- id: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
146
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
147
- label: "Codex SDK NCP Runtime",
145
+ id: "@nextclaw/channel-plugin-slack",
146
+ spec: "@nextclaw/channel-plugin-slack",
147
+ label: "Slack Channel",
148
148
  enabled: true,
149
149
  origin: "marketplace",
150
150
  source: "marketplace",
@@ -248,17 +248,17 @@ describe("MarketplacePage", () => {
248
248
  sort: "relevance",
249
249
  items: [
250
250
  createMarketplaceItem({
251
- id: "plugin-codex-runtime",
252
- slug: "codex-runtime",
251
+ id: "plugin-channel-slack",
252
+ slug: "channel-slack",
253
253
  type: "plugin",
254
- name: "Codex SDK NCP Runtime",
255
- summary: "Optional Codex runtime for NextClaw",
256
- summaryI18n: { en: "Optional Codex runtime for NextClaw" },
254
+ name: "Slack Channel",
255
+ summary: "Optional Slack channel for NextClaw",
256
+ summaryI18n: { en: "Optional Slack channel for NextClaw" },
257
257
  install: {
258
258
  kind: "npm",
259
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
259
+ spec: "@nextclaw/channel-plugin-slack",
260
260
  command:
261
- "npm install @nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
261
+ "npm install @nextclaw/channel-plugin-slack",
262
262
  },
263
263
  }),
264
264
  ],
@@ -269,7 +269,7 @@ describe("MarketplacePage", () => {
269
269
  const card = container.querySelector("article");
270
270
 
271
271
  expect(card?.textContent).toContain(
272
- "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
272
+ "@nextclaw/channel-plugin-slack",
273
273
  );
274
274
  expect(card?.textContent).not.toContain("Plugin");
275
275
  });
@@ -289,7 +289,7 @@ describe("MarketplacePage", () => {
289
289
 
290
290
  const { container } = render(<MarketplacePage forcedType="plugins" />);
291
291
 
292
- expect(screen.getByText("Codex SDK NCP Runtime")).toBeTruthy();
292
+ expect(screen.getByText("Slack Channel")).toBeTruthy();
293
293
  expect(container.querySelector(".opacity-70")).toBeNull();
294
294
  });
295
295
 
@@ -306,14 +306,14 @@ describe("MarketplacePage", () => {
306
306
  items: [
307
307
  createPluginMarketplaceItem(),
308
308
  createPluginMarketplaceItem({
309
- id: "plugin-claude-runtime",
310
- slug: "claude-runtime",
311
- name: "Claude Agent Runtime",
309
+ id: "plugin-channel-discord",
310
+ slug: "channel-discord",
311
+ name: "Discord Channel",
312
312
  install: {
313
313
  kind: "npm",
314
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
314
+ spec: "@nextclaw/channel-plugin-discord",
315
315
  command:
316
- "npm install @nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
316
+ "npm install @nextclaw/channel-plugin-discord",
317
317
  },
318
318
  }),
319
319
  ],
@@ -324,15 +324,15 @@ describe("MarketplacePage", () => {
324
324
  type: "plugin",
325
325
  total: 2,
326
326
  specs: [
327
- "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
328
- "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
327
+ "@nextclaw/channel-plugin-slack",
328
+ "@nextclaw/channel-plugin-discord",
329
329
  ],
330
330
  records: [
331
331
  createInstalledRecord(),
332
332
  createInstalledRecord({
333
- id: "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
334
- spec: "@nextclaw/nextclaw-ncp-runtime-plugin-claude-code-sdk",
335
- label: "Claude Agent Runtime",
333
+ id: "@nextclaw/channel-plugin-discord",
334
+ spec: "@nextclaw/channel-plugin-discord",
335
+ label: "Discord Channel",
336
336
  }),
337
337
  ],
338
338
  } satisfies MarketplaceInstalledView,
@@ -14,22 +14,22 @@ describe('marketplace-installed-cache', () => {
14
14
  it('adds a plugin record immediately after install success', () => {
15
15
  const request: MarketplaceInstallRequest = {
16
16
  type: 'plugin',
17
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
17
+ spec: '@nextclaw/channel-plugin-slack',
18
18
  kind: 'npm'
19
19
  };
20
20
  const result: MarketplaceInstallResult = {
21
21
  type: 'plugin',
22
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
22
+ spec: '@nextclaw/channel-plugin-slack',
23
23
  message: 'installed'
24
24
  };
25
25
 
26
26
  const next = applyInstallResultToInstalledView({ request, result });
27
27
 
28
28
  expect(next.total).toBe(1);
29
- expect(next.specs).toEqual(['@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk']);
29
+ expect(next.specs).toEqual(['@nextclaw/channel-plugin-slack']);
30
30
  expect(next.records[0]).toMatchObject({
31
31
  type: 'plugin',
32
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
32
+ spec: '@nextclaw/channel-plugin-slack',
33
33
  enabled: true,
34
34
  origin: 'marketplace',
35
35
  runtimeStatus: 'ready'
@@ -40,13 +40,13 @@ describe('marketplace-installed-cache', () => {
40
40
  const view: MarketplaceInstalledView = {
41
41
  type: 'plugin',
42
42
  total: 1,
43
- specs: ['@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk'],
43
+ specs: ['@nextclaw/channel-plugin-slack'],
44
44
  records: [
45
45
  {
46
46
  type: 'plugin',
47
- id: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
48
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
49
- label: 'Codex Runtime',
47
+ id: '@nextclaw/channel-plugin-slack',
48
+ spec: '@nextclaw/channel-plugin-slack',
49
+ label: 'Slack Channel',
50
50
  enabled: true,
51
51
  origin: 'marketplace'
52
52
  }
@@ -55,13 +55,13 @@ describe('marketplace-installed-cache', () => {
55
55
  const request: MarketplaceManageRequest = {
56
56
  type: 'plugin',
57
57
  action: 'disable',
58
- id: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
59
- spec: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk'
58
+ id: '@nextclaw/channel-plugin-slack',
59
+ spec: '@nextclaw/channel-plugin-slack'
60
60
  };
61
61
  const result: MarketplaceManageResult = {
62
62
  type: 'plugin',
63
63
  action: 'disable',
64
- id: '@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk',
64
+ id: '@nextclaw/channel-plugin-slack',
65
65
  message: 'disabled'
66
66
  };
67
67
 
package/src/index.css CHANGED
@@ -40,15 +40,15 @@
40
40
 
41
41
  .desktop-window-drag {
42
42
  -webkit-app-region: drag;
43
+ app-region: drag;
44
+ user-select: none;
43
45
  }
44
46
 
45
47
  .desktop-window-no-drag {
46
48
  -webkit-app-region: no-drag;
49
+ app-region: no-drag;
47
50
  }
48
51
 
49
- /* ========================================
50
- SCROLLBAR
51
- ======================================== */
52
52
  .custom-scrollbar::-webkit-scrollbar {
53
53
  width: 5px;
54
54
  height: 5px;
@@ -10,7 +10,6 @@ const CHANNEL_LOGOS: LogoMap = {
10
10
  dingtalk: "dingtalk.svg",
11
11
  wecom: "wecom.svg",
12
12
  weixin: "weixin.svg",
13
- mochat: "mochat.svg",
14
13
  email: "email.svg"
15
14
  };
16
15