@nextclaw/ui 0.15.1 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/assets/{api-b1R9VdeH.js → api-B7Qigvtm.js} +2 -2
- package/dist/assets/{appearance-settings-page-D2O9pch9.js → appearance-settings-page-CuE0Iiqj.js} +1 -1
- package/dist/assets/{book-open-B77lQ2Tg.js → book-open-Ba2f7YiG.js} +1 -1
- package/dist/assets/channels-list-page-CTsM6TcP.js +8 -0
- package/dist/assets/{chat-page-CZ7WxPir.js → chat-page-C_5dcuE3.js} +1 -1
- package/dist/assets/config-split-page-Fbb4PtTf.js +1 -0
- package/dist/assets/{confirm-dialog-C-NXSioX.js → confirm-dialog-D2EG3nqE.js} +1 -1
- package/dist/assets/{desktop-update-config-usHpXugP.js → desktop-update-config-BGR3HUi1.js} +1 -1
- package/dist/assets/{dist-jdGmbb6w.js → dist-7JTjycxE.js} +1 -1
- package/dist/assets/{dist-YtoqU-AT.js → dist-wXLhk4hl.js} +1 -1
- package/dist/assets/doc-browser-bHyXnxlj.js +1 -0
- package/dist/assets/doc-browser-context-CYAGm5d5.js +1 -0
- package/dist/assets/doc-browser-gTrQ3jCF.js +1 -0
- package/dist/assets/{es2015-bNpL2LKy.js → es2015-j1SRCIX5.js} +1 -1
- package/dist/assets/{external-link-BM6fk8q-.js → external-link-DxuPaDoK.js} +1 -1
- package/dist/assets/form-actions-BztL7P_T.js +1 -0
- package/dist/assets/{i18n-provider-CntWolRA.js → i18n-provider-B4oMxOFx.js} +1 -1
- package/dist/assets/index-CvrvblgX.css +1 -0
- package/dist/assets/index-Obd4JYU2.js +104 -0
- package/dist/assets/loader-circle-CdzgK4eH.js +1 -0
- package/dist/assets/{mcp-marketplace-page-CLmUstLN.js → mcp-marketplace-page-Bt7CuOoq.js} +2 -2
- package/dist/assets/mcp-marketplace-page-Ck3t78_n.js +1 -0
- package/dist/assets/model-config-page-DeKk9gvE.js +1 -0
- package/dist/assets/plus-Bx7wQbhG.js +1 -0
- package/dist/assets/{provider-scoped-model-input-Cm_a4GHf.js → provider-scoped-model-input-DsH2LF1q.js} +1 -1
- package/dist/assets/providers-config-page-BFnGp68F.js +1 -0
- package/dist/assets/{react-BN8uzPnp.js → react-UirzUuST.js} +1 -1
- package/dist/assets/{refresh-cw-BpVcFPmJ.js → refresh-cw-eT8BF-8B.js} +1 -1
- package/dist/assets/remote-CDkHZtA8.js +1 -0
- package/dist/assets/rotate-cw-1JqxHTuw.js +1 -0
- package/dist/assets/runtime-config-page-BelAqiNG.js +1 -0
- package/dist/assets/{save-BpFW5fpk.js → save-Cb2g0BOi.js} +1 -1
- package/dist/assets/{search-D0uO7enf.js → search-BcHjwdsb.js} +1 -1
- package/dist/assets/search-config-page-zPm6--Ig.js +1 -0
- package/dist/assets/secrets-config-page-Cxyp-KuQ.js +3 -0
- package/dist/assets/security-config-B_gCq9fn.js +1 -0
- package/dist/assets/{select-Bh-CrA4p.js → select-CdSEOwVM.js} +1 -1
- package/dist/assets/{setting-row-BJfCHRcb.js → setting-row-CTAtGexr.js} +1 -1
- package/dist/assets/{settings-2-Blzi1vr6.js → settings-2-2DWauOjY.js} +1 -1
- package/dist/assets/{side-dock-ZdaSrQVB.js → side-dock-DPvakJ0a.js} +2 -2
- package/dist/assets/{skeleton-BLlEzebZ.js → skeleton-P5oM14E1.js} +1 -1
- package/dist/assets/{switch-CFLJFNSd.js → switch-BU_UEULb.js} +1 -1
- package/dist/assets/{tag-chip-CzGihiQx.js → tag-chip-D-WsKoT1.js} +1 -1
- package/dist/assets/{tooltip-CdcrBjrC.js → tooltip-CjkOaHW7.js} +1 -1
- package/dist/assets/{use-config-CVPgsBmU.js → use-config--hx5oxQn.js} +1 -1
- package/dist/assets/{use-confirm-dialog-CSeBk9SF.js → use-confirm-dialog-CD9a_SK1.js} +1 -1
- package/dist/assets/x-DT5x45JU.js +1 -0
- package/dist/index.html +38 -30
- package/index.html +12 -4
- package/package.json +9 -9
- package/src/app/components/layout/__tests__/sidebar.layout.test.tsx +29 -1
- package/src/app/components/layout/sidebar-items.tsx +43 -4
- package/src/app/components/layout/sidebar.tsx +83 -61
- package/src/app/configs/app-navigation.config.ts +49 -0
- package/src/app/styles/design-system.css +82 -0
- package/src/features/channels/components/config/channel-form.tsx +14 -11
- package/src/features/chat/components/conversation/__tests__/chat-conversation-header-section.test.tsx +40 -0
- package/src/features/chat/components/conversation/chat-conversation-header-section.tsx +3 -1
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +1 -1
- package/src/features/chat/components/layout/__tests__/chat-sidebar-toolbar.test.tsx +48 -0
- package/src/features/chat/components/layout/__tests__/chat-sidebar-utility-menu.test.tsx +55 -0
- package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +0 -3
- package/src/features/chat/components/layout/chat-sidebar-toolbar.tsx +3 -4
- package/src/features/chat/components/layout/chat-sidebar-utility-menu.tsx +29 -30
- package/src/features/chat/components/layout/chat-sidebar.tsx +21 -7
- package/src/features/chat/features/conversation/components/session-conversation-input.tsx +2 -1
- package/src/features/chat/features/message/components/__tests__/chat-inline-panel-app-card.test.tsx +22 -1
- package/src/features/chat/features/message/components/chat-inline-panel-app-card.tsx +10 -5
- package/src/features/chat/features/message/utils/chat-inline-panel-app-card.utils.ts +0 -11
- package/src/features/chat/features/session/components/__tests__/chat-sidebar-project-groups.test.tsx +116 -0
- package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +108 -46
- package/src/features/chat/features/session/components/chat-sidebar-session-entry.tsx +6 -0
- package/src/features/chat/features/session/components/chat-sidebar-session-item.tsx +48 -24
- package/src/features/chat/features/session/components/chat-sidebar-session-list.tsx +0 -3
- package/src/features/chat/features/session/components/session-header/chat-session-header-actions.tsx +0 -4
- package/src/features/chat/features/session/utils/chat-sidebar-session-groups.utils.ts +25 -3
- package/src/features/chat/features/welcome/components/chat-welcome-capability-grid.tsx +9 -4
- package/src/features/chat/features/welcome/components/chat-welcome.tsx +0 -5
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +159 -56
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +1 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel.test.tsx +144 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-directory-browser.tsx +99 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-file-breadcrumbs.tsx +3 -1
- package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +66 -7
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +3 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-nav.tsx +44 -1
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel.tsx +45 -3
- package/src/features/chat/managers/__tests__/chat-session-list.manager.test.ts +33 -2
- package/src/features/chat/managers/chat-session-list.manager.ts +32 -0
- package/src/features/chat/stores/chat-session-list.store.ts +28 -5
- package/src/features/marketplace/components/mcp/mcp-marketplace-page.tsx +5 -12
- package/src/features/panel-apps/components/panel-app-list-item.tsx +6 -6
- package/src/features/panel-apps/index.ts +1 -0
- package/src/features/panel-apps/utils/panel-app-doc-browser.utils.tsx +2 -10
- package/src/features/panel-apps/utils/panel-app-iframe.utils.ts +6 -0
- package/src/features/pwa/managers/__tests__/pwa-shell-theme.manager.test.ts +11 -3
- package/src/features/pwa/managers/pwa-shell-theme.manager.ts +3 -1
- package/src/features/service-apps/components/service-apps-panel.tsx +145 -35
- package/src/features/settings/components/config/provider-auth-section.tsx +1 -1
- package/src/features/settings/components/config/provider-form.tsx +11 -8
- package/src/features/settings/components/config/provider-models-section.tsx +7 -7
- package/src/features/settings/components/config/provider-pill-selector.tsx +1 -1
- package/src/features/settings/components/config/secrets-config-form.tsx +5 -4
- package/src/features/settings/pages/model-config-page.tsx +26 -25
- package/src/features/settings/pages/providers-config-page.tsx +10 -13
- package/src/features/settings/pages/search-config-page.tsx +8 -5
- package/src/features/system-status/components/config/runtime-config-editor.tsx +5 -4
- package/src/index.css +18 -0
- package/src/shared/components/config-split-page.tsx +6 -6
- package/src/shared/components/doc-browser/__tests__/doc-browser-url.utils.test.ts +73 -0
- package/src/shared/components/doc-browser/__tests__/doc-browser.test.tsx +48 -0
- package/src/shared/components/doc-browser/doc-browser-context.tsx +4 -0
- package/src/shared/components/doc-browser/doc-browser-panel-parts.tsx +5 -1
- package/src/shared/components/doc-browser/doc-browser-renderer.types.ts +2 -1
- package/src/shared/components/doc-browser/doc-browser-tab-strip.tsx +10 -10
- package/src/shared/components/doc-browser/doc-browser.tsx +6 -4
- package/src/shared/components/doc-browser/utils/doc-browser-url.utils.ts +62 -4
- package/src/shared/components/resizable-right-panel/__tests__/resizable-right-panel.test.tsx +18 -0
- package/src/shared/components/resizable-right-panel/resizable-right-panel.tsx +28 -3
- package/src/shared/components/ui/actions/__tests__/icon-action-button.test.tsx +36 -0
- package/src/shared/components/ui/actions/form-actions.tsx +25 -0
- package/src/shared/components/ui/actions/icon-action-button.tsx +25 -2
- package/src/shared/components/ui/card.tsx +12 -4
- package/src/shared/components/ui/tab-strip/compact-tab-strip.tsx +2 -1
- package/src/shared/hooks/use-server-path-browse.ts +26 -4
- package/src/shared/hooks/use-server-path-read.ts +11 -1
- package/src/shared/lib/api/utils/server-path.utils.ts +1 -0
- package/src/shared/lib/i18n/locales/en-US/chat.json +16 -0
- package/src/shared/lib/i18n/locales/en-US/core.json +3 -0
- package/src/shared/lib/i18n/locales/en-US/doc-browser.json +5 -0
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +16 -0
- package/src/shared/lib/i18n/locales/zh-CN/core.json +3 -0
- package/src/shared/lib/i18n/locales/zh-CN/doc-browser.json +5 -0
- package/src/shared/lib/session-project/workspace-file-breadcrumb.utils.ts +9 -5
- package/src/shared/lib/theme/index.test.ts +21 -0
- package/src/shared/lib/theme/index.ts +6 -4
- package/src/vite-env.d.ts +2 -0
- package/dist/assets/channels-list-page-DcsIQc6A.js +0 -8
- package/dist/assets/config-split-page-BWQ6_Raq.js +0 -1
- package/dist/assets/doc-browser-B_Tf9n70.js +0 -1
- package/dist/assets/doc-browser-BdZPFOVa.js +0 -1
- package/dist/assets/doc-browser-context-DwokemUn.js +0 -1
- package/dist/assets/index-BIcEw90u.js +0 -104
- package/dist/assets/index-BiNSTKTU.css +0 -1
- package/dist/assets/loader-circle-MBgNSVIH.js +0 -1
- package/dist/assets/mcp-marketplace-page-rZkmWPMy.js +0 -1
- package/dist/assets/model-config-page-Di0ySJD2.js +0 -1
- package/dist/assets/plus-vDqW5Kxp.js +0 -1
- package/dist/assets/providers-config-page-BAf2W0MV.js +0 -1
- package/dist/assets/remote-CLQ0IBM8.js +0 -1
- package/dist/assets/rotate-cw-CvNBv7_w.js +0 -1
- package/dist/assets/runtime-config-page-CflvvoDc.js +0 -1
- package/dist/assets/search-config-page-D0klFUXd.js +0 -1
- package/dist/assets/secrets-config-page-dVZ631Wp.js +0 -3
- package/dist/assets/security-config-C5gnlkuj.js +0 -1
- package/dist/assets/x-BF2KQ--V.js +0 -1
- /package/dist/assets/{config-hints-fGnUjDe9.js → config-hints-C_iP1zl_.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,h as t,p as n,u as r,v as i}from"./react-
|
|
1
|
+
import{f as e,h as t,p as n,u as r,v as i}from"./react-UirzUuST.js";var a=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,o=e,s=(e,t)=>n=>{if(t?.variants==null)return o(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,s=Object.keys(r).map(e=>{let t=n?.[e],o=i?.[e];if(t===null)return null;let s=a(t)||a(o);return r[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return o(e,s,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...c}[t]):{...i,...c}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},c=i(t(),1),l=n(),u=s(`inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium ring-offset-background transition-colors duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,outline:`border border-border bg-card text-muted-foreground hover:bg-accent hover:text-accent-foreground`,secondary:`bg-muted text-foreground hover:bg-accent hover:text-accent-foreground`,ghost:`text-muted-foreground hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`,primary:`bg-primary text-primary-foreground hover:bg-primary-600 active:bg-primary-700 shadow-sm`,subtle:`bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground`,"primary-outline":`border border-primary/30 text-primary hover:bg-primary hover:text-primary-foreground`},size:{default:`h-9 px-4 py-2`,sm:`h-8 px-3 text-xs`,lg:`h-11 px-5 text-[14px]`,xl:`h-12 px-6 text-[15px]`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),d=c.forwardRef(({className:e,variant:t,size:n,...i},a)=>(0,l.jsx)(`button`,{className:r(u({variant:t,size:n,className:e})),ref:a,...i}));d.displayName=`Button`;function f({children:e,fullHeight:t=!1,className:n}){return(0,l.jsx)(`div`,{className:r(`animate-fade-in`,t?`h-[calc(100vh-80px)] w-full flex flex-col`:`pb-16`,n),children:e})}function p({title:e,description:t,actions:n,className:i}){return(0,l.jsxs)(`div`,{className:r(`flex items-center justify-between mb-6 shrink-0`,i),children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:e}),t&&(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:t})]}),n&&(0,l.jsx)(`div`,{className:`flex items-center gap-2 shrink-0`,children:n})]})}var m=c.forwardRef(({className:e,hover:t=!0,surface:n=`raised`,...i},a)=>(0,l.jsx)(`div`,{ref:a,className:r(`rounded-2xl border bg-card text-card-foreground transition-colors duration-base`,n===`raised`?`border-border shadow-card`:`border-border/75 shadow-none`,t&&n===`raised`&&`hover:border-primary/25 hover:shadow-card-hover`,t&&n===`flat`&&`hover:bg-muted/40`,e),...i}));m.displayName=`Card`;var h=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`div`,{ref:n,className:r(`flex flex-col space-y-1.5 p-6`,e),...t}));h.displayName=`CardHeader`;var g=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`h3`,{ref:n,className:r(`text-[15px] font-semibold leading-tight tracking-tight text-foreground`,e),...t}));g.displayName=`CardTitle`;var _=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`p`,{ref:n,className:r(`text-[13px] text-muted-foreground leading-relaxed`,e),...t}));_.displayName=`CardDescription`;var v=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`div`,{ref:n,className:r(`p-6 pt-0`,e),...t}));v.displayName=`CardContent`;var y=c.forwardRef(({className:e,...t},n)=>(0,l.jsx)(`div`,{ref:n,className:r(`flex items-center justify-between p-6 pt-0`,e),...t}));y.displayName=`CardFooter`;var b=c.forwardRef(({className:e,checked:t=!1,onCheckedChange:n,thumbClassName:i,...a},o)=>(0,l.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-state":t?`checked`:`unchecked`,ref:o,className:r(`switch-track peer inline-flex h-[22px] w-10 shrink-0 cursor-pointer items-center rounded-full border-2 transition-colors duration-fast focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,t?`border-primary/70 bg-primary`:`border-border/60 bg-muted hover:bg-accent`,e),onClick:()=>n?.(!t),...a,children:(0,l.jsx)(`span`,{"data-state":t?`checked`:`unchecked`,className:r(`switch-thumb pointer-events-none block h-5 w-5 rounded-full bg-card shadow-md ring-1 ring-border/50 transition-transform duration-fast`,t?`translate-x-5`:`translate-x-0`,i)})}));b.displayName=`Switch`;export{h as a,f as c,_ as i,d as l,m as n,g as o,v as r,p as s,b as t,s as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,p as t,u as n,v as r}from"./react-
|
|
1
|
+
import{h as e,p as t,u as n,v as r}from"./react-UirzUuST.js";import{u as i}from"./switch-BU_UEULb.js";var a=r(e(),1),o=t(),s=i(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,{variants:{tone:{subtle:`border-gray-200 bg-gray-50 text-gray-600`,neutral:`border-gray-200 bg-white text-gray-600`,success:`border-emerald-200 bg-emerald-50 text-emerald-700`,warning:`border-amber-200 bg-amber-50 text-amber-800`,danger:`border-rose-200 bg-rose-50 text-rose-600`,info:`border-primary/20 bg-primary/10 text-primary`}},defaultVariants:{tone:`subtle`}}),c=a.forwardRef(({className:e,tone:t,...r},i)=>(0,o.jsx)(`span`,{ref:i,className:n(s({tone:t}),e),...r}));c.displayName=`TagChip`;export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,p as t,u as n,v as r}from"./react-
|
|
1
|
+
import{h as e,p as t,u as n,v as r}from"./react-UirzUuST.js";import{a as i,b as a,c as o,f as s,g as c,h as l,i as u,l as d,m as f,o as p,r as m,s as h,t as g,u as _,x as v,y}from"./dist-7JTjycxE.js";import{t as b}from"./dist-wXLhk4hl.js";var x=o(`Boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),S=r(e(),1),C=t(),[w,T]=y(`Tooltip`,[h]),E=h(),D=`TooltipProvider`,O=700,k=`tooltip.open`,[A,j]=w(D),M=e=>{let{__scopeTooltip:t,delayDuration:n=O,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=S.useRef(!0),s=S.useRef(!1),c=S.useRef(0);return S.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,C.jsx)(A,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:S.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:S.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:S.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};M.displayName=D;var N=`Tooltip`,[ee,P]=w(N),F=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,u=j(N,e.__scopeTooltip),d=E(t),[f,m]=S.useState(null),h=c(),g=S.useRef(0),_=o??u.disableHoverableContent,v=s??u.delayDuration,y=S.useRef(!1),[b,x]=l({prop:r,defaultProp:i??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(k))):u.onClose(),a?.(e)},caller:N}),w=S.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),T=S.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),D=S.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),O=S.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);return S.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]),(0,C.jsx)(p,{...d,children:(0,C.jsx)(ee,{scope:t,contentId:h,open:b,stateAttribute:w,trigger:f,onTriggerChange:m,onTriggerEnter:S.useCallback(()=>{u.isOpenDelayedRef.current?O():T()},[u.isOpenDelayedRef,O,T]),onTriggerLeave:S.useCallback(()=>{_?D():(window.clearTimeout(g.current),g.current=0)},[D,_]),onOpen:T,onClose:D,disableHoverableContent:_,children:n})})};F.displayName=N;var I=`TooltipTrigger`,L=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=P(I,n),o=j(I,n),c=E(n),l=a(t,S.useRef(null),i.onTriggerChange),u=S.useRef(!1),d=S.useRef(!1),f=S.useCallback(()=>u.current=!1,[]);return S.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,C.jsx)(m,{asChild:!0,...c,children:(0,C.jsx)(s.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:v(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:v(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:v(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:v(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:v(e.onBlur,i.onClose),onClick:v(e.onClick,i.onClose)})})});L.displayName=I;var R=`TooltipPortal`,[z,B]=w(R,{forceMount:void 0}),V=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=P(R,t);return(0,C.jsx)(z,{scope:t,forceMount:n,children:(0,C.jsx)(b,{present:n||a.open,children:(0,C.jsx)(d,{asChild:!0,container:i,children:r})})})};V.displayName=R;var H=`TooltipContent`,U=S.forwardRef((e,t)=>{let n=B(H,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=P(H,e.__scopeTooltip);return(0,C.jsx)(b,{present:r||o.open,children:o.disableHoverableContent?(0,C.jsx)(K,{side:i,...a,ref:t}):(0,C.jsx)(W,{side:i,...a,ref:t})})}),W=S.forwardRef((e,t)=>{let n=P(H,e.__scopeTooltip),r=j(H,e.__scopeTooltip),i=S.useRef(null),o=a(t,i),[s,c]=S.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=S.useCallback(()=>{c(null),f(!1)},[f]),m=S.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=ae(r,ie(r,n.getBoundingClientRect())),a=oe(t.getBoundingClientRect());c(ce([...i,...a])),f(!0)},[f]);return S.useEffect(()=>()=>p(),[p]),S.useEffect(()=>{if(l&&d){let e=e=>m(e,d),t=e=>m(e,l);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),S.useEffect(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!se(n,s);r?p():i&&(p(),u())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,s,u,p]),(0,C.jsx)(K,{...e,ref:o})}),[G,te]=w(N,{isInside:!1}),ne=f(`TooltipContent`),K=S.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=P(H,n),u=E(n),{onClose:d}=l;return S.useEffect(()=>(document.addEventListener(k,d),()=>document.removeEventListener(k,d)),[d]),S.useEffect(()=>{if(l.trigger){let e=e=>{e.target?.contains(l.trigger)&&d()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]),(0,C.jsx)(_,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,C.jsxs)(i,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,C.jsx)(ne,{children:r}),(0,C.jsx)(G,{scope:n,isInside:!0,children:(0,C.jsx)(g,{id:l.contentId,role:`tooltip`,children:a||r})})]})})});U.displayName=H;var q=`TooltipArrow`,re=S.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=E(n);return te(q,n).isInside?null:(0,C.jsx)(u,{...i,...r,ref:t})});re.displayName=q;function ie(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function ae(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function oe(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function se(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ce(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),le(t)}function le(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var J=M,Y=F,X=L,Z=V,Q=U,ue=J,de=Y,fe=X,$=S.forwardRef(({className:e,sideOffset:t=4,...r},i)=>(0,C.jsx)(Z,{children:(0,C.jsx)(Q,{ref:i,sideOffset:t,className:n(`z-[var(--z-tooltip,10150)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...r})}));$.displayName=Q.displayName;export{Q as a,Y as c,fe as i,X as l,$ as n,Z as o,ue as r,J as s,de as t,x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./react-
|
|
1
|
+
import{r as e}from"./react-UirzUuST.js";import{$ as t,H as n,I as r,It as i,J as a,K as o,Lt as s,Q as c,R as l,Rt as u,U as d,V as f,Y as p,Yt as m,at as h,et as g,it as _,nt as v,q as y,rt as b,tt as x,z as S}from"./api-B7Qigvtm.js";function C(){return u({queryKey:[`config`],queryFn:f,staleTime:3e4,refetchOnWindowFocus:!0})}function w(){return u({queryKey:[`config-meta`],queryFn:n,staleTime:1/0})}function T(){return u({queryKey:[`providers`],queryFn:y,staleTime:3e4,refetchOnWindowFocus:!0})}function E(){return u({queryKey:[`provider-templates`],queryFn:o,staleTime:1/0})}function D(){return u({queryKey:[`config-schema`],queryFn:d,staleTime:1/0})}function O(){let t=m();return s({mutationFn:x,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function k(){let t=m();return s({mutationFn:({data:e})=>_(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function A(){let t=m();return s({mutationFn:({provider:e,data:t})=>v(e,t),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),r.silentSuccess||i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function j(){let t=m();return s({mutationFn:({data:e})=>r(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function M(){let t=m();return s({mutationFn:({provider:e})=>l(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`providers`]}),t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSaved`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){return s({mutationFn:({provider:e,data:n})=>t(e,n)})}function P(){return s({mutationFn:({provider:e,data:t})=>c(e,t)})}function F(){return s({mutationFn:({provider:e,data:t})=>p(e,t)})}function I(){return s({mutationFn:({provider:e})=>a(e)})}function L(){let t=m();return s({mutationFn:({channel:e,data:t})=>g(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),i.success(e(`configSavedApplying`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function R(){let t=m();return s({mutationFn:({data:e})=>b(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function z(){let t=m();return s({mutationFn:({data:e})=>h(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),i.success(e(`configSavedApplied`))},onError:t=>{i.error(e(`configSaveFailed`)+`: `+t.message)}})}function B(){return s({mutationFn:({actionId:e,data:t})=>S(e,t),onError:t=>{i.error(e(`error`)+`: `+t.message)}})}export{k as _,M as a,F as c,P as d,N as f,R as g,A as h,j as i,E as l,O as m,w as n,B as o,L as p,D as r,I as s,C as t,T as u,z as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,p as t,r as n,v as r}from"./react-
|
|
1
|
+
import{h as e,p as t,r as n,v as r}from"./react-UirzUuST.js";import{t as i}from"./confirm-dialog-D2EG3nqE.js";var a=r(e(),1),o=t(),s={open:!1,title:``,description:``,confirmLabel:n(`confirm`),cancelLabel:n(`cancel`),variant:`default`,resolve:null};function c(){let[e,t]=(0,a.useState)(s),r=(0,a.useCallback)(e=>new Promise(r=>{t({open:!0,title:e.title,description:e.description??``,confirmLabel:e.confirmLabel??n(`confirm`),cancelLabel:e.cancelLabel??n(`cancel`),variant:e.variant??`default`,resolve:e=>{r(e),t(e=>({...e,open:!1,resolve:null}))}})}),[]),c=(0,a.useCallback)(e=>{t(t=>(!e&&t.resolve&&t.resolve(!1),{...t,open:e,resolve:e?t.resolve:null}))},[]);return{confirm:r,ConfirmDialog:(0,a.useCallback)(()=>(0,o.jsx)(i,{open:e.open,onOpenChange:c,title:e.title,description:e.description||void 0,confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,variant:e.variant,onConfirm:()=>e.resolve?.(!0),onCancel:()=>e.resolve?.(!1)}),[e,c])}}export{c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"./dist-7JTjycxE.js";var t=e(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
|
package/dist/index.html
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
<meta name="apple-mobile-web-app-title" content="NextClaw" />
|
|
12
12
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
13
13
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
14
|
-
<meta name="theme-color" content="#
|
|
15
|
-
<meta name="color-scheme" content="light
|
|
14
|
+
<meta name="theme-color" content="#FFFFFF" />
|
|
15
|
+
<meta name="color-scheme" content="light" />
|
|
16
16
|
<style>
|
|
17
17
|
html,
|
|
18
18
|
body,
|
|
19
19
|
#root {
|
|
20
|
-
background: #
|
|
20
|
+
background: #ffffff;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
html[data-theme="minimal"],
|
|
@@ -26,6 +26,12 @@
|
|
|
26
26
|
background: #ffffff;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
html[data-theme="work"],
|
|
30
|
+
html[data-theme="work"] body,
|
|
31
|
+
html[data-theme="work"] #root {
|
|
32
|
+
background: #ffffff;
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
html[data-theme="warm"],
|
|
30
36
|
html[data-theme="warm"] body,
|
|
31
37
|
html[data-theme="warm"] #root {
|
|
@@ -68,6 +74,7 @@
|
|
|
68
74
|
const storedTheme = window.localStorage.getItem(storageKey);
|
|
69
75
|
const themeColors = {
|
|
70
76
|
natural: '#FAF9F7',
|
|
77
|
+
work: '#FFFFFF',
|
|
71
78
|
minimal: '#FFFFFF',
|
|
72
79
|
warm: '#FAF8F4',
|
|
73
80
|
cool: '#F8FAFC',
|
|
@@ -78,6 +85,7 @@
|
|
|
78
85
|
};
|
|
79
86
|
const themeAppearances = {
|
|
80
87
|
natural: 'light',
|
|
88
|
+
work: 'light',
|
|
81
89
|
minimal: 'light',
|
|
82
90
|
warm: 'light',
|
|
83
91
|
cool: 'light',
|
|
@@ -94,7 +102,7 @@
|
|
|
94
102
|
: storedTheme;
|
|
95
103
|
const nextTheme = Object.prototype.hasOwnProperty.call(themeColors, normalizedStoredTheme)
|
|
96
104
|
? normalizedStoredTheme
|
|
97
|
-
: '
|
|
105
|
+
: 'work';
|
|
98
106
|
if (storedTheme !== nextTheme) {
|
|
99
107
|
window.localStorage.setItem(storageKey, nextTheme);
|
|
100
108
|
}
|
|
@@ -178,34 +186,34 @@
|
|
|
178
186
|
})();
|
|
179
187
|
</script>
|
|
180
188
|
<title>NextClaw</title>
|
|
181
|
-
<script type="module" crossorigin src="/assets/index-
|
|
182
|
-
<link rel="modulepreload" crossorigin href="/assets/react-
|
|
183
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
184
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
185
|
-
<link rel="modulepreload" crossorigin href="/assets/tooltip-
|
|
186
|
-
<link rel="modulepreload" crossorigin href="/assets/book-open-
|
|
187
|
-
<link rel="modulepreload" crossorigin href="/assets/plus-
|
|
188
|
-
<link rel="modulepreload" crossorigin href="/assets/x-
|
|
189
|
+
<script type="module" crossorigin src="/assets/index-Obd4JYU2.js"></script>
|
|
190
|
+
<link rel="modulepreload" crossorigin href="/assets/react-UirzUuST.js">
|
|
191
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-7JTjycxE.js">
|
|
192
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-wXLhk4hl.js">
|
|
193
|
+
<link rel="modulepreload" crossorigin href="/assets/tooltip-CjkOaHW7.js">
|
|
194
|
+
<link rel="modulepreload" crossorigin href="/assets/book-open-Ba2f7YiG.js">
|
|
195
|
+
<link rel="modulepreload" crossorigin href="/assets/plus-Bx7wQbhG.js">
|
|
196
|
+
<link rel="modulepreload" crossorigin href="/assets/x-DT5x45JU.js">
|
|
189
197
|
<link rel="modulepreload" crossorigin href="/assets/middleware-BILWbJE4.js">
|
|
190
|
-
<link rel="modulepreload" crossorigin href="/assets/doc-browser-context-
|
|
191
|
-
<link rel="modulepreload" crossorigin href="/assets/es2015-
|
|
192
|
-
<link rel="modulepreload" crossorigin href="/assets/switch-
|
|
193
|
-
<link rel="modulepreload" crossorigin href="/assets/confirm-dialog-
|
|
194
|
-
<link rel="modulepreload" crossorigin href="/assets/use-confirm-dialog-
|
|
198
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-context-CYAGm5d5.js">
|
|
199
|
+
<link rel="modulepreload" crossorigin href="/assets/es2015-j1SRCIX5.js">
|
|
200
|
+
<link rel="modulepreload" crossorigin href="/assets/switch-BU_UEULb.js">
|
|
201
|
+
<link rel="modulepreload" crossorigin href="/assets/confirm-dialog-D2EG3nqE.js">
|
|
202
|
+
<link rel="modulepreload" crossorigin href="/assets/use-confirm-dialog-CD9a_SK1.js">
|
|
195
203
|
<link rel="modulepreload" crossorigin href="/assets/host-capabilities-9bB_998Z.js">
|
|
196
|
-
<link rel="modulepreload" crossorigin href="/assets/side-dock-
|
|
197
|
-
<link rel="modulepreload" crossorigin href="/assets/select-
|
|
198
|
-
<link rel="modulepreload" crossorigin href="/assets/api-
|
|
199
|
-
<link rel="modulepreload" crossorigin href="/assets/search-
|
|
200
|
-
<link rel="modulepreload" crossorigin href="/assets/external-link-
|
|
201
|
-
<link rel="modulepreload" crossorigin href="/assets/refresh-cw-
|
|
202
|
-
<link rel="modulepreload" crossorigin href="/assets/doc-browser-
|
|
203
|
-
<link rel="modulepreload" crossorigin href="/assets/i18n-provider-
|
|
204
|
-
<link rel="modulepreload" crossorigin href="/assets/loader-circle-
|
|
205
|
-
<link rel="modulepreload" crossorigin href="/assets/skeleton-
|
|
206
|
-
<link rel="modulepreload" crossorigin href="/assets/tag-chip-
|
|
207
|
-
<link rel="modulepreload" crossorigin href="/assets/mcp-marketplace-page-
|
|
208
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
204
|
+
<link rel="modulepreload" crossorigin href="/assets/side-dock-DPvakJ0a.js">
|
|
205
|
+
<link rel="modulepreload" crossorigin href="/assets/select-CdSEOwVM.js">
|
|
206
|
+
<link rel="modulepreload" crossorigin href="/assets/api-B7Qigvtm.js">
|
|
207
|
+
<link rel="modulepreload" crossorigin href="/assets/search-BcHjwdsb.js">
|
|
208
|
+
<link rel="modulepreload" crossorigin href="/assets/external-link-DxuPaDoK.js">
|
|
209
|
+
<link rel="modulepreload" crossorigin href="/assets/refresh-cw-eT8BF-8B.js">
|
|
210
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-bHyXnxlj.js">
|
|
211
|
+
<link rel="modulepreload" crossorigin href="/assets/i18n-provider-B4oMxOFx.js">
|
|
212
|
+
<link rel="modulepreload" crossorigin href="/assets/loader-circle-CdzgK4eH.js">
|
|
213
|
+
<link rel="modulepreload" crossorigin href="/assets/skeleton-P5oM14E1.js">
|
|
214
|
+
<link rel="modulepreload" crossorigin href="/assets/tag-chip-D-WsKoT1.js">
|
|
215
|
+
<link rel="modulepreload" crossorigin href="/assets/mcp-marketplace-page-Bt7CuOoq.js">
|
|
216
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CvrvblgX.css">
|
|
209
217
|
</head>
|
|
210
218
|
|
|
211
219
|
<body>
|
package/index.html
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
<meta name="apple-mobile-web-app-title" content="NextClaw" />
|
|
12
12
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
13
13
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
14
|
-
<meta name="theme-color" content="#
|
|
15
|
-
<meta name="color-scheme" content="light
|
|
14
|
+
<meta name="theme-color" content="#FFFFFF" />
|
|
15
|
+
<meta name="color-scheme" content="light" />
|
|
16
16
|
<style>
|
|
17
17
|
html,
|
|
18
18
|
body,
|
|
19
19
|
#root {
|
|
20
|
-
background: #
|
|
20
|
+
background: #ffffff;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
html[data-theme="minimal"],
|
|
@@ -26,6 +26,12 @@
|
|
|
26
26
|
background: #ffffff;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
html[data-theme="work"],
|
|
30
|
+
html[data-theme="work"] body,
|
|
31
|
+
html[data-theme="work"] #root {
|
|
32
|
+
background: #ffffff;
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
html[data-theme="warm"],
|
|
30
36
|
html[data-theme="warm"] body,
|
|
31
37
|
html[data-theme="warm"] #root {
|
|
@@ -68,6 +74,7 @@
|
|
|
68
74
|
const storedTheme = window.localStorage.getItem(storageKey);
|
|
69
75
|
const themeColors = {
|
|
70
76
|
natural: '#FAF9F7',
|
|
77
|
+
work: '#FFFFFF',
|
|
71
78
|
minimal: '#FFFFFF',
|
|
72
79
|
warm: '#FAF8F4',
|
|
73
80
|
cool: '#F8FAFC',
|
|
@@ -78,6 +85,7 @@
|
|
|
78
85
|
};
|
|
79
86
|
const themeAppearances = {
|
|
80
87
|
natural: 'light',
|
|
88
|
+
work: 'light',
|
|
81
89
|
minimal: 'light',
|
|
82
90
|
warm: 'light',
|
|
83
91
|
cool: 'light',
|
|
@@ -94,7 +102,7 @@
|
|
|
94
102
|
: storedTheme;
|
|
95
103
|
const nextTheme = Object.prototype.hasOwnProperty.call(themeColors, normalizedStoredTheme)
|
|
96
104
|
? normalizedStoredTheme
|
|
97
|
-
: '
|
|
105
|
+
: 'work';
|
|
98
106
|
if (storedTheme !== nextTheme) {
|
|
99
107
|
window.localStorage.setItem(storageKey, nextTheme);
|
|
100
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/ui",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
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/
|
|
32
|
-
"@nextclaw/
|
|
33
|
-
"@nextclaw/client
|
|
34
|
-
"@nextclaw/ncp-
|
|
35
|
-
"@nextclaw/
|
|
36
|
-
"@nextclaw/
|
|
37
|
-
"@nextclaw/
|
|
38
|
-
"@nextclaw/
|
|
31
|
+
"@nextclaw/client-sdk": "0.5.2",
|
|
32
|
+
"@nextclaw/ncp": "0.7.2",
|
|
33
|
+
"@nextclaw/ncp-http-agent-client": "0.4.2",
|
|
34
|
+
"@nextclaw/ncp-toolkit": "0.6.2",
|
|
35
|
+
"@nextclaw/shared": "0.4.2",
|
|
36
|
+
"@nextclaw/agent-chat": "0.3.1",
|
|
37
|
+
"@nextclaw/agent-chat-ui": "0.6.2",
|
|
38
|
+
"@nextclaw/ncp-react": "0.5.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@testing-library/react": "^16.3.0",
|
|
@@ -120,7 +120,35 @@ describe("Sidebar", () => {
|
|
|
120
120
|
const linkTexts = within(nav)
|
|
121
121
|
.getAllByRole("link")
|
|
122
122
|
.map((link) => link.textContent?.trim() || "");
|
|
123
|
-
|
|
123
|
+
const groupHeadings = within(nav)
|
|
124
|
+
.getAllByRole("heading", { level: 2 })
|
|
125
|
+
.map((heading) => heading.textContent?.trim() || "");
|
|
126
|
+
const groups = Array.from(nav.querySelectorAll("section"));
|
|
127
|
+
|
|
128
|
+
expect(groupHeadings).toEqual([
|
|
129
|
+
"Basic Configuration",
|
|
130
|
+
"Advanced Configuration",
|
|
131
|
+
]);
|
|
132
|
+
expect(groups).toHaveLength(2);
|
|
133
|
+
expect(
|
|
134
|
+
within(groups[0] as HTMLElement)
|
|
135
|
+
.getAllByRole("link")
|
|
136
|
+
.map((link) => link.textContent?.trim() || ""),
|
|
137
|
+
).toEqual(["Model", "Providers", "Channels"]);
|
|
138
|
+
expect(
|
|
139
|
+
within(groups[1] as HTMLElement)
|
|
140
|
+
.getAllByRole("link")
|
|
141
|
+
.map((link) => link.textContent?.trim() || ""),
|
|
142
|
+
).toEqual([
|
|
143
|
+
"Search Channels",
|
|
144
|
+
"Appearance",
|
|
145
|
+
"Security",
|
|
146
|
+
"Routing & Runtime",
|
|
147
|
+
"Updates",
|
|
148
|
+
"Remote Access",
|
|
149
|
+
"Secrets",
|
|
150
|
+
"MCP",
|
|
151
|
+
]);
|
|
124
152
|
expect(linkTexts).toEqual([
|
|
125
153
|
"Model",
|
|
126
154
|
"Providers",
|
|
@@ -19,8 +19,14 @@ import {
|
|
|
19
19
|
SIDEBAR_RAIL_SURFACE_CLASS,
|
|
20
20
|
} from "@/app/components/layout/sidebar-rail.styles";
|
|
21
21
|
|
|
22
|
-
type SidebarIcon = ComponentType<{ className?: string }>;
|
|
23
|
-
type SidebarItemDensity = "default" | "compact";
|
|
22
|
+
export type SidebarIcon = ComponentType<{ className?: string }>;
|
|
23
|
+
export type SidebarItemDensity = "default" | "compact";
|
|
24
|
+
|
|
25
|
+
export type SidebarNavListItem = {
|
|
26
|
+
target: string;
|
|
27
|
+
label: string;
|
|
28
|
+
icon: SidebarIcon;
|
|
29
|
+
};
|
|
24
30
|
|
|
25
31
|
type SidebarItemTone = {
|
|
26
32
|
row: string;
|
|
@@ -124,7 +130,7 @@ export function SidebarNavLinkItem({
|
|
|
124
130
|
"shrink-0 transition-colors",
|
|
125
131
|
isActive
|
|
126
132
|
? "text-gray-700"
|
|
127
|
-
: "text-muted-foreground
|
|
133
|
+
: "text-muted-foreground group-hover:text-gray-700",
|
|
128
134
|
)}
|
|
129
135
|
/>
|
|
130
136
|
<span className={collapsed ? "sr-only" : "min-w-0 flex-1 text-left"}>
|
|
@@ -140,6 +146,39 @@ export function SidebarNavLinkItem({
|
|
|
140
146
|
);
|
|
141
147
|
}
|
|
142
148
|
|
|
149
|
+
type SidebarNavigationListProps = {
|
|
150
|
+
isCollapsed: boolean;
|
|
151
|
+
items: SidebarNavListItem[];
|
|
152
|
+
density: SidebarItemDensity;
|
|
153
|
+
className: string;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export function SidebarNavigationList({
|
|
157
|
+
isCollapsed,
|
|
158
|
+
items,
|
|
159
|
+
density,
|
|
160
|
+
className,
|
|
161
|
+
}: SidebarNavigationListProps) {
|
|
162
|
+
return (
|
|
163
|
+
<ul className={className}>
|
|
164
|
+
{items.map((item) => (
|
|
165
|
+
<li
|
|
166
|
+
key={item.target}
|
|
167
|
+
className={isCollapsed ? "flex justify-center" : undefined}
|
|
168
|
+
>
|
|
169
|
+
<SidebarNavLinkItem
|
|
170
|
+
to={item.target}
|
|
171
|
+
label={item.label}
|
|
172
|
+
icon={item.icon}
|
|
173
|
+
density={density}
|
|
174
|
+
collapsed={isCollapsed}
|
|
175
|
+
/>
|
|
176
|
+
</li>
|
|
177
|
+
))}
|
|
178
|
+
</ul>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
143
182
|
type SidebarActionItemProps = {
|
|
144
183
|
label: string;
|
|
145
184
|
icon: SidebarIcon;
|
|
@@ -189,7 +228,7 @@ export function SidebarActionItem({
|
|
|
189
228
|
<Icon
|
|
190
229
|
className={cn(
|
|
191
230
|
collapsed ? SIDEBAR_RAIL_ICON_CLASS : tone.icon,
|
|
192
|
-
"shrink-0 text-muted-foreground
|
|
231
|
+
"shrink-0 text-muted-foreground transition-colors group-hover:text-gray-700",
|
|
193
232
|
)}
|
|
194
233
|
/>
|
|
195
234
|
<span
|
|
@@ -2,34 +2,35 @@ import { cn } from "@/shared/lib/utils";
|
|
|
2
2
|
import { t } from "@/shared/lib/i18n";
|
|
3
3
|
import { THEME_OPTIONS, type UiTheme } from "@/shared/lib/theme";
|
|
4
4
|
import {
|
|
5
|
-
MessageCircle,
|
|
6
5
|
BookOpen,
|
|
7
|
-
BrainCircuit,
|
|
8
|
-
AlarmClock,
|
|
9
6
|
Languages,
|
|
10
7
|
Palette,
|
|
11
8
|
KeyRound,
|
|
12
9
|
Settings,
|
|
13
10
|
ArrowLeft,
|
|
14
|
-
Bot,
|
|
15
11
|
PanelLeftClose,
|
|
16
12
|
PanelLeftOpen,
|
|
17
|
-
type LucideIcon,
|
|
18
13
|
} from "lucide-react";
|
|
19
14
|
import { NavLink } from "react-router-dom";
|
|
20
15
|
import { useDocBrowser } from "@/shared/components/doc-browser";
|
|
21
16
|
import { BrandHeader } from "@/shared/components/common/brand-header";
|
|
22
17
|
import {
|
|
23
18
|
SidebarActionItem,
|
|
19
|
+
SidebarNavigationList,
|
|
24
20
|
SidebarNavLinkItem,
|
|
25
21
|
SidebarSelectItem,
|
|
22
|
+
type SidebarItemDensity,
|
|
23
|
+
type SidebarNavListItem,
|
|
26
24
|
} from "@/app/components/layout/sidebar-items";
|
|
27
25
|
import { useTheme } from "@/app/components/theme-provider";
|
|
28
26
|
import { SelectItem } from "@/shared/components/ui/select";
|
|
29
27
|
import { IconActionButton } from "@/shared/components/ui/actions/icon-action-button";
|
|
30
28
|
import { useAppPresenter } from "@/app/components/app-presenter-provider";
|
|
31
29
|
import { useRemoteStatus } from "@/features/remote";
|
|
32
|
-
import {
|
|
30
|
+
import {
|
|
31
|
+
getMainSidebarNavItems,
|
|
32
|
+
getSettingsNavSections,
|
|
33
|
+
} from "@/app/configs/app-navigation.config";
|
|
33
34
|
import { useLanguagePreference } from "@/features/settings";
|
|
34
35
|
import { viewportLayoutManager } from "@/app/managers/viewport-layout.manager";
|
|
35
36
|
import { useViewportLayoutStore } from "@/app/stores/viewport-layout.store";
|
|
@@ -50,12 +51,38 @@ type SidebarProps = {
|
|
|
50
51
|
mode: SidebarMode;
|
|
51
52
|
};
|
|
52
53
|
|
|
53
|
-
type
|
|
54
|
-
target: string;
|
|
54
|
+
type SidebarNavSection = {
|
|
55
55
|
label: string;
|
|
56
|
-
|
|
56
|
+
items: SidebarNavListItem[];
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
type SidebarNavigationModel = {
|
|
60
|
+
items: SidebarNavListItem[];
|
|
61
|
+
sections?: SidebarNavSection[];
|
|
62
|
+
density: SidebarItemDensity;
|
|
57
63
|
};
|
|
58
64
|
|
|
65
|
+
type SidebarTranslate = (key: string) => string;
|
|
66
|
+
|
|
67
|
+
function resolveSidebarNavigation(
|
|
68
|
+
isSettingsMode: boolean,
|
|
69
|
+
translate: SidebarTranslate,
|
|
70
|
+
): SidebarNavigationModel {
|
|
71
|
+
if (!isSettingsMode) {
|
|
72
|
+
return {
|
|
73
|
+
items: getMainSidebarNavItems(translate),
|
|
74
|
+
density: "default",
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const sections = getSettingsNavSections(translate);
|
|
79
|
+
return {
|
|
80
|
+
items: sections.flatMap((section) => section.items),
|
|
81
|
+
sections,
|
|
82
|
+
density: "compact",
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
59
86
|
function SidebarCollapseToggle({
|
|
60
87
|
isCollapsed,
|
|
61
88
|
onToggle,
|
|
@@ -197,13 +224,23 @@ function SidebarNavigation({
|
|
|
197
224
|
isSettingsMode,
|
|
198
225
|
isCollapsed,
|
|
199
226
|
items,
|
|
227
|
+
sections,
|
|
200
228
|
density,
|
|
201
229
|
}: {
|
|
202
230
|
isSettingsMode: boolean;
|
|
203
231
|
isCollapsed: boolean;
|
|
204
|
-
items:
|
|
205
|
-
|
|
232
|
+
items: SidebarNavListItem[];
|
|
233
|
+
sections?: SidebarNavSection[];
|
|
234
|
+
density: SidebarItemDensity;
|
|
206
235
|
}) {
|
|
236
|
+
const listClassName = cn(
|
|
237
|
+
isCollapsed
|
|
238
|
+
? cn(SIDEBAR_RAIL_STACK_CLASS, "pb-3")
|
|
239
|
+
: isSettingsMode
|
|
240
|
+
? "space-y-0.5 pb-3"
|
|
241
|
+
: "space-y-1 pb-4",
|
|
242
|
+
);
|
|
243
|
+
|
|
207
244
|
return (
|
|
208
245
|
<nav
|
|
209
246
|
className={cn(
|
|
@@ -212,30 +249,34 @@ function SidebarNavigation({
|
|
|
212
249
|
SIDEBAR_SCROLL_EDGE_FADE_CLASS,
|
|
213
250
|
)}
|
|
214
251
|
>
|
|
215
|
-
|
|
216
|
-
className=
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
252
|
+
{sections && !isCollapsed ? (
|
|
253
|
+
<div className="space-y-3 pb-3">
|
|
254
|
+
{sections.map((section) => (
|
|
255
|
+
<section
|
|
256
|
+
key={section.label}
|
|
257
|
+
aria-label={section.label}
|
|
258
|
+
className="space-y-1"
|
|
259
|
+
>
|
|
260
|
+
<h2 className="px-3 text-[11px] font-semibold text-muted-foreground/70">
|
|
261
|
+
{section.label}
|
|
262
|
+
</h2>
|
|
263
|
+
<SidebarNavigationList
|
|
264
|
+
isCollapsed={isCollapsed}
|
|
265
|
+
items={section.items}
|
|
266
|
+
density={density}
|
|
267
|
+
className="space-y-0.5"
|
|
268
|
+
/>
|
|
269
|
+
</section>
|
|
270
|
+
))}
|
|
271
|
+
</div>
|
|
272
|
+
) : (
|
|
273
|
+
<SidebarNavigationList
|
|
274
|
+
isCollapsed={isCollapsed}
|
|
275
|
+
items={items}
|
|
276
|
+
density={density}
|
|
277
|
+
className={listClassName}
|
|
278
|
+
/>
|
|
279
|
+
)}
|
|
239
280
|
</nav>
|
|
240
281
|
);
|
|
241
282
|
}
|
|
@@ -258,7 +299,7 @@ export function Sidebar({ mode }: SidebarProps) {
|
|
|
258
299
|
const isSettingsMode = mode === "settings";
|
|
259
300
|
const currentThemeLabel = t(
|
|
260
301
|
THEME_OPTIONS.find((option) => option.value === theme)?.labelKey ??
|
|
261
|
-
"
|
|
302
|
+
"themeWork",
|
|
262
303
|
);
|
|
263
304
|
const accountEmail = remoteStatus.data?.account.email?.trim();
|
|
264
305
|
const accountConnected = Boolean(remoteStatus.data?.account.loggedIn);
|
|
@@ -267,31 +308,11 @@ export function Sidebar({ mode }: SidebarProps) {
|
|
|
267
308
|
if (theme !== nextTheme) setTheme(nextTheme);
|
|
268
309
|
};
|
|
269
310
|
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
target: "/chat/cron",
|
|
278
|
-
label: t("cron"),
|
|
279
|
-
icon: AlarmClock,
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
target: "/chat/skills",
|
|
283
|
-
label: t("marketplaceFilterSkills"),
|
|
284
|
-
icon: BrainCircuit,
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
target: "/agents",
|
|
288
|
-
label: t("agentsPageTitle"),
|
|
289
|
-
icon: Bot,
|
|
290
|
-
},
|
|
291
|
-
];
|
|
292
|
-
|
|
293
|
-
const navItems = isSettingsMode ? getSettingsNavItems(t) : mainNavItems;
|
|
294
|
-
const sidebarDensity = isSettingsMode ? "compact" : "default";
|
|
311
|
+
const {
|
|
312
|
+
items: navItems,
|
|
313
|
+
sections: settingsNavSections,
|
|
314
|
+
density: sidebarDensity,
|
|
315
|
+
} = resolveSidebarNavigation(isSettingsMode, t);
|
|
295
316
|
|
|
296
317
|
return (
|
|
297
318
|
<aside
|
|
@@ -314,6 +335,7 @@ export function Sidebar({ mode }: SidebarProps) {
|
|
|
314
335
|
isSettingsMode={isSettingsMode}
|
|
315
336
|
isCollapsed={isCollapsed}
|
|
316
337
|
items={navItems}
|
|
338
|
+
sections={settingsNavSections}
|
|
317
339
|
density={sidebarDensity}
|
|
318
340
|
/>
|
|
319
341
|
|