nextclaw 0.18.9 → 0.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/app/index.js +10 -8
- package/package.json +12 -12
- package/resources/USAGE.md +6 -0
- package/ui-dist/assets/{api-BIg--UMJ.js → api-C51456xV.js} +1 -1
- package/ui-dist/assets/{app-manager-provider-BfKiVYea.js → app-manager-provider-D_cKqqRG.js} +1 -1
- package/ui-dist/assets/{app-navigation.config-xIjCAn-R.js → app-navigation.config-Dve1W20Y.js} +1 -1
- package/ui-dist/assets/{book-open-CUd69I2f.js → book-open-B4mOKdz8.js} +1 -1
- package/ui-dist/assets/{channels-list-page-5wQy-UW7.js → channels-list-page-WJ7d4zMI.js} +1 -1
- package/ui-dist/assets/chat-BxA-mw53.js +58 -0
- package/ui-dist/assets/{chat-page-DX8OMxQ_.js → chat-page-DLFTPfmu.js} +1 -1
- package/ui-dist/assets/{chunk-JZWAC4HX-THqEFwu9.js → chunk-JZWAC4HX-ptDyT_1C.js} +1 -1
- package/ui-dist/assets/{config-split-page-UJSTBsEU.js → config-split-page-B3PRA_AV.js} +1 -1
- package/ui-dist/assets/{createLucideIcon-DVAlgDOi.js → createLucideIcon-C_GFKVuW.js} +1 -1
- package/ui-dist/assets/{desktop-update-config-DdVgauFR.js → desktop-update-config-CzGi43xw.js} +1 -1
- package/ui-dist/assets/{dialog-t7OAmObC.js → dialog-BHcaU6NE.js} +1 -1
- package/ui-dist/assets/{dist-DWPNydLC.js → dist-DtBFqZ6_.js} +1 -1
- package/ui-dist/assets/{doc-browser-t96ibd-b.js → doc-browser-CoKIUCJj.js} +1 -1
- package/ui-dist/assets/{doc-browser-DznuT-CU.js → doc-browser-CwgI7ipB.js} +1 -1
- package/ui-dist/assets/doc-browser-DYKpRqe-.js +1 -0
- package/ui-dist/assets/{doc-browser-context-zXaTjrpA.js → doc-browser-context-Dib9sS83.js} +1 -1
- package/ui-dist/assets/{es2015-BRVsmfFO.js → es2015-BlNhrQUG.js} +1 -1
- package/ui-dist/assets/{external-link-D1Xqff6i.js → external-link-DP2IJ7AM.js} +1 -1
- package/ui-dist/assets/{folder-B_fuaX3x.js → folder-BPwc278w.js} +1 -1
- package/ui-dist/assets/{hash-BRvv_UUq.js → hash-CvcvtMBq.js} +1 -1
- package/ui-dist/assets/i18n-BnNAQpVM.js +1 -0
- package/ui-dist/assets/index-CAYF44Dz.js +2 -0
- package/ui-dist/assets/index-mRmSAB-e.css +1 -0
- package/ui-dist/assets/{key-round-DFVNXZcD.js → key-round-BQXmPSxD.js} +1 -1
- package/ui-dist/assets/loader-circle-C6gg2m2a.js +1 -0
- package/ui-dist/assets/{logo-badge-CRVKkIl9.js → logo-badge-uB4SwANR.js} +1 -1
- package/ui-dist/assets/{logos-BVCi_7_I.js → logos-BcELLmYh.js} +1 -1
- package/ui-dist/assets/marketplace-page-0sEdt5sA.js +1 -0
- package/ui-dist/assets/{marketplace-page-apq5LpYx.js → marketplace-page-DiqqX25V.js} +1 -1
- package/ui-dist/assets/mcp-marketplace-page-B8vmu9xe.js +1 -0
- package/ui-dist/assets/{mcp-marketplace-page-DiqTAdRJ.js → mcp-marketplace-page-C_akqPwv.js} +1 -1
- package/ui-dist/assets/message-square-CLVODA23.js +1 -0
- package/ui-dist/assets/{model-config-cth12uRn.js → model-config-B0L43HTL.js} +1 -1
- package/ui-dist/assets/{notice-card-CXY09tsa.js → notice-card-C9PFAR67.js} +1 -1
- package/ui-dist/assets/play-DeNVUA5C.js +1 -0
- package/ui-dist/assets/plus-BptLViq1.js +1 -0
- package/ui-dist/assets/{popover-CbQxrchk.js → popover-B8msg2FQ.js} +1 -1
- package/ui-dist/assets/{provider-scoped-model-input-CZEB2m98.js → provider-scoped-model-input-DeAo2Y65.js} +1 -1
- package/ui-dist/assets/{providers-list-Dsj2BYPm.js → providers-list-5_VShcn7.js} +1 -1
- package/ui-dist/assets/{refresh-ccw-C-ytTHiq.js → refresh-ccw-CeG203yU.js} +1 -1
- package/ui-dist/assets/remote-pzp4oLcL.js +1 -0
- package/ui-dist/assets/{rotate-cw-ClSrRUa0.js → rotate-cw-F7aThvYj.js} +1 -1
- package/ui-dist/assets/{runtime-config-page-y8HmA9qr.js → runtime-config-page-B-y_0HIS.js} +1 -1
- package/ui-dist/assets/{save-KxhpE3Zr.js → save-7ztImRj7.js} +1 -1
- package/ui-dist/assets/{search-Bz3Q64sr.js → search-DZSNKEGp.js} +1 -1
- package/ui-dist/assets/{search-config-C_xRBv_i.js → search-config-DJTm9Fno.js} +1 -1
- package/ui-dist/assets/{secrets-config-BOL024Fj.js → secrets-config-DKFeFii1.js} +1 -1
- package/ui-dist/assets/{select-tRTLG4FK.js → select-DRDejPLk.js} +1 -1
- package/ui-dist/assets/{sessions-config-page-Ck6nbIFq.js → sessions-config-page-CZGqS32n.js} +1 -1
- package/ui-dist/assets/{setting-row-DMDgBCC7.js → setting-row-BcF6eTW0.js} +1 -1
- package/ui-dist/assets/{settings-Cto6z-Ij.js → settings-DjvNMJde.js} +1 -1
- package/ui-dist/assets/skeleton-5Mg6vZHN.js +1 -0
- package/ui-dist/assets/{sparkles-xZ74eW0P.js → sparkles-CyDTgTM4.js} +1 -1
- package/ui-dist/assets/{status-dot-Bobpfutv.js → status-dot-aQU9Mia4.js} +1 -1
- package/ui-dist/assets/{tabs-custom-C3Mf-NLb.js → tabs-custom-C4P7g4vR.js} +1 -1
- package/ui-dist/assets/{tag-chip-BZ14i5b1.js → tag-chip-CVIqyMv7.js} +1 -1
- package/ui-dist/assets/{theme-provider-D6Cgm6i-.js → theme-provider-dHqcWU-j.js} +1 -1
- package/ui-dist/assets/{tooltip-7lsLGcL9.js → tooltip-C6VPreZ7.js} +1 -1
- package/ui-dist/assets/{trash-2-WFSNa5oj.js → trash-2-C1cdqL6V.js} +1 -1
- package/ui-dist/assets/{use-config-CXu7dFzw.js → use-config-DFja1sda.js} +1 -1
- package/ui-dist/assets/{use-confirm-dialog-Df1SozKw.js → use-confirm-dialog-DvIbSUX3.js} +1 -1
- package/ui-dist/assets/{use-infinite-scroll-loader-BogRuzgz.js → use-infinite-scroll-loader-D8h0k-iL.js} +1 -1
- package/ui-dist/assets/{use-viewport-layout-CWlW5b-T.js → use-viewport-layout-D-pjxsyz.js} +1 -1
- package/ui-dist/assets/x-BjMO7v8q.js +1 -0
- package/ui-dist/index.html +39 -39
- package/ui-dist/assets/chat-C7Ywus_K.js +0 -60
- package/ui-dist/assets/doc-browser-BIggpN8Z.js +0 -1
- package/ui-dist/assets/i18n-CF_jgT_-.js +0 -1
- package/ui-dist/assets/index-CLxN8vXZ.js +0 -2
- package/ui-dist/assets/index-N3hjuljD.css +0 -1
- package/ui-dist/assets/loader-circle-DEz3bHGb.js +0 -1
- package/ui-dist/assets/marketplace-page-DVmk8dZk.js +0 -1
- package/ui-dist/assets/mcp-marketplace-page-CskrJuKU.js +0 -1
- package/ui-dist/assets/message-square-CLhDWybk.js +0 -1
- package/ui-dist/assets/play-CnnPm8ca.js +0 -1
- package/ui-dist/assets/plus-CdYMdiws.js +0 -1
- package/ui-dist/assets/remote-DMMC2PSo.js +0 -1
- package/ui-dist/assets/skeleton-BwfJfVK3.js +0 -1
- package/ui-dist/assets/x-BvS2y4e_.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,i as t,m as n,p as r,u as i}from"./i18n-CF_jgT_-.js";import{At as a,Ct as o,Pt as s,St as c,Tt as l,bt as u,gt as d,wt as ee,xt as te,yt as ne}from"./api-BIg--UMJ.js";import{r as re}from"./chunk-JZWAC4HX-THqEFwu9.js";import{t as f}from"./createLucideIcon-DVAlgDOi.js";import{i as p,n as m,t as h}from"./select-tRTLG4FK.js";import{t as g}from"./x-BvS2y4e_.js";import{t as _}from"./use-config-CXu7dFzw.js";import{n as v,r as ie,t as ae}from"./popover-CbQxrchk.js";var oe=f(`AlarmClock`,[[`circle`,{cx:`12`,cy:`13`,r:`8`,key:`3y4lt7`}],[`path`,{d:`M12 9v4l2 2`,key:`1c63tq`}],[`path`,{d:`M5 3 2 6`,key:`18tl5t`}],[`path`,{d:`m22 6-3-3`,key:`1opdir`}],[`path`,{d:`M6.38 18.7 4 21`,key:`17xu3x`}],[`path`,{d:`M17.64 18.67 20 21`,key:`kv2oe2`}]]),se=f(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ce=f(`BrainCircuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),y=f(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),le=f(`Languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),ue=f(`MessageCircle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),de=f(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),b=f(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),fe=f(`Smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),pe=f(`Wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`,key:`cbrjhi`}]]),x=`nextclaw.ui.theme`,me=[{value:`warm`,labelKey:`themeWarm`},{value:`cool`,labelKey:`themeCool`}],S=`warm`,C=!1,w=new Set;function T(e){return e===`warm`||e===`cool`}function E(e){typeof document>`u`||document.documentElement.setAttribute(`data-theme`,e)}function D(){if(typeof window>`u`)return`warm`;try{let e=window.localStorage.getItem(x);if(T(e))return e}catch{}return`warm`}function O(){return C||=(S=D(),E(S),!0),S}function k(){return C?S:O()}function A(e){if(O(),e!==S){if(S=e,E(S),typeof window<`u`)try{window.localStorage.setItem(x,S)}catch{}w.forEach(e=>e(S))}}function j(e){return w.add(e),()=>{w.delete(e)}}var M=r(),N={healthy:`bg-emerald-500 shadow-[0_0_0_3px_rgba(16,185,129,0.14)]`,attention:`bg-amber-400 shadow-[0_0_0_3px_rgba(251,191,36,0.16)]`,inactive:`bg-gray-300 shadow-[0_0_0_3px_rgba(156,163,175,0.12)]`};function P(){let e=d(),n=e.actionLabel===t(`runtimeStatusRestartAction`),r=async()=>{if(n)try{let e=await ne.runRuntimeControlAction(`restart-service`);s.success(e.message)}catch(e){let n=e instanceof Error?e.message:t(`runtimeControlActionFailed`);s.error(`${t(`runtimeControlActionFailed`)}: ${n}`)}};return(0,M.jsxs)(ae,{children:[(0,M.jsx)(ie,{asChild:!0,children:(0,M.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-full p-0.5 transition-transform hover:scale-105`,"aria-label":e.title,title:e.title,"data-testid":`runtime-status-entry`,children:(0,M.jsx)(`span`,{className:i(`h-2.5 w-2.5 rounded-full`,N[e.tone])})})}),(0,M.jsxs)(v,{align:`start`,sideOffset:10,className:`w-[290px] space-y-3 rounded-2xl border border-gray-200 bg-white p-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`div`,{className:`text-sm font-semibold text-gray-900`,children:e.title}),(0,M.jsx)(`p`,{className:`text-xs leading-5 text-gray-600`,children:e.description})]}),e.reasonLines.length>0?(0,M.jsx)(`div`,{className:`space-y-2`,children:e.reasonLines.map(e=>(0,M.jsx)(`div`,{className:`rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-900`,children:e},e))}):null,e.actionLabel?(0,M.jsxs)(`div`,{className:`flex items-center justify-between border-t border-gray-100 pt-1`,children:[(0,M.jsx)(`span`,{className:`text-[11px] text-gray-500`,children:t(`runtimeStatusActionHint`)}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>void r(),disabled:e.isBusy,className:`text-sm font-semibold text-sky-600 transition-colors hover:text-sky-700 disabled:text-gray-400`,children:e.isBusy?t(`runtimeStatusRestartingAction`):e.actionLabel})]}):null]})]})}function F({className:e,suffix:t}){let{data:n}=_(),r=n?.name??`NextClaw`,i=n?.productVersion?.trim(),a=t??(0,M.jsx)(P,{});return(0,M.jsxs)(`div`,{className:e??`flex items-center gap-2.5`,children:[(0,M.jsx)(`div`,{className:`h-7 w-7 rounded-lg overflow-hidden flex items-center justify-center`,children:(0,M.jsx)(`img`,{src:`/logo.svg`,alt:r,className:`h-full w-full object-contain`})}),(0,M.jsxs)(`div`,{className:`flex items-baseline gap-2 min-w-0`,children:[(0,M.jsx)(`span`,{className:`truncate text-[15px] font-semibold tracking-[-0.01em] text-gray-800`,children:r}),i?(0,M.jsxs)(`span`,{className:`text-[13px] font-medium text-gray-500`,children:[`v`,i]}):null,a?(0,M.jsx)(`span`,{className:`inline-flex items-center shrink-0`,children:a}):null]})]})}var I={default:{row:`gap-3 px-3 py-2.5 text-[14px]`,icon:`h-[17px] w-[17px]`,value:`text-xs`,gap:`gap-3`},compact:{row:`gap-2.5 px-3 py-2 text-[13px]`,icon:`h-4 w-4`,value:`text-[11px]`,gap:`gap-2.5`}};function L(e){return I[e]}function R({to:e,label:t,icon:n,density:r=`default`,className:a}){let o=L(r);return(0,M.jsx)(re,{to:e,className:({isActive:e})=>i(`group flex w-full items-center rounded-xl font-medium transition-colors duration-base`,o.row,e?`bg-gray-200 text-gray-900 shadow-sm`:`text-gray-600 hover:bg-gray-200/60 hover:text-gray-900`,a),children:({isActive:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(n,{className:i(o.icon,`transition-colors`,e?`text-gray-900`:`text-gray-500 group-hover:text-gray-800`)}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 text-left`,children:t})]})})}function z({label:e,icon:t,onClick:n,density:r=`default`,className:a,labelClassName:o,trailing:s,trailingClassName:c,testId:l,trailingTestId:u}){let d=L(r);return(0,M.jsxs)(`button`,{type:`button`,onClick:n,className:i(`flex w-full items-center rounded-xl font-medium text-gray-600 transition-all duration-base hover:bg-gray-200/60 hover:text-gray-800`,d.row,a),"data-testid":l,children:[(0,M.jsx)(t,{className:i(d.icon,`shrink-0 text-gray-400`)}),(0,M.jsx)(`span`,{className:i(`min-w-0 flex-1 text-left`,o),children:e}),s?(0,M.jsx)(`span`,{className:i(`shrink-0 text-gray-500`,d.value,c),"data-testid":u,children:s}):null]})}function he({label:e,icon:t,value:n,valueLabel:r,onValueChange:a,density:o=`default`,children:s}){let c=L(o);return(0,M.jsxs)(h,{value:n,onValueChange:a,children:[(0,M.jsxs)(p,{className:i(`h-auto w-full rounded-xl border-0 bg-transparent font-medium text-gray-600 shadow-none hover:bg-gray-200/60 focus:ring-0`,c.row),children:[(0,M.jsxs)(`div`,{className:i(`flex min-w-0 items-center`,c.gap),children:[(0,M.jsx)(t,{className:i(c.icon,`text-gray-400`)}),(0,M.jsx)(`span`,{className:`text-left`,children:e})]}),(0,M.jsx)(`span`,{className:i(`ml-auto text-gray-500`,c.value),children:r})]}),(0,M.jsx)(m,{children:s})]})}var B=`nextclaw-pwa-install-banner-dismissed`,V=`nextclaw-pwa-install-banner-dismissed-until`;function H(){let e=W();return e?e.getItem(`nextclaw-pwa-install-banner-dismissed`)===`1`?!0:_e(e):!1}function ge(){let e=W();e?.setItem(B,`1`),e?.removeItem(V)}function U(){let e=W();e?.removeItem(B),e?.removeItem(V)}function W(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function _e(e){let t=e.getItem(V);if(!t)return!1;let n=Number.parseInt(t,10);return e.removeItem(V),!Number.isFinite(n)||n<=Date.now()?!1:(e.setItem(B,`1`),!0)}function G(){return{initialized:!1,installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`,dismissedInstallPrompt:H(),updateAvailable:!1,registrationFailed:!1}}var K=u(()=>G()),q=`nextclaw-pwa-dev-sw-reset`,J=new class{constructor(){this.started=!1,this.registration=null,this.reloadWhenControllerChanges=!1,this.start=async()=>{if(!(this.started||typeof window>`u`)&&(this.started=!0,!(!(`serviceWorker`in navigator)||!this.isEligibleInstallContext()))){if(this.isDevelopmentServer()){await this.cleanupDevelopmentRegistrations();return}try{let e=await navigator.serviceWorker.register(`/sw.js`);this.registration=e,this.bindRegistration(e),navigator.serviceWorker.addEventListener(`controllerchange`,this.handleControllerChange),await this.syncUpdateAvailability()}catch{K.setState({registrationFailed:!0})}}},this.syncUpdateAvailability=async()=>{if(typeof window>`u`||!(`serviceWorker`in navigator)||typeof navigator.serviceWorker.getRegistration!=`function`){K.setState({updateAvailable:!1});return}let e=this.registration??await navigator.serviceWorker.getRegistration(`/sw.js`)??null;K.setState({updateAvailable:this.shouldSurfaceUpdate(e)})},this.applyUpdate=async()=>{let e=this.registration??await navigator.serviceWorker.getRegistration(`/sw.js`)??null;if(!e){window.location.reload();return}e.waiting||await e.update();let t=e.waiting;if(!t){window.location.reload();return}this.reloadWhenControllerChanges=!0,t.postMessage({type:`SKIP_WAIT`})},this.stop=()=>{!this.started||typeof window>`u`||!(`serviceWorker`in navigator)||(navigator.serviceWorker.removeEventListener(`controllerchange`,this.handleControllerChange),this.started=!1,this.registration=null,this.reloadWhenControllerChanges=!1)},this.bindRegistration=e=>{e.addEventListener(`updatefound`,()=>{let t=e.installing;t&&t.addEventListener(`statechange`,()=>{t.state===`installed`&&this.syncUpdateAvailability()})})},this.handleControllerChange=()=>{this.reloadWhenControllerChanges&&(this.reloadWhenControllerChanges=!1,window.location.reload())},this.isEligibleInstallContext=()=>window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>!1,this.shouldSurfaceUpdate=e=>!e?.waiting||!navigator.serviceWorker.controller?!1:K.getState().installability===`installed`,this.cleanupDevelopmentRegistrations=async()=>{if(typeof navigator.serviceWorker.getRegistrations!=`function`)return;let e=(await navigator.serviceWorker.getRegistrations()).filter(e=>[e.active?.scriptURL,e.installing?.scriptURL,e.waiting?.scriptURL].filter(e=>!!e).some(e=>e.endsWith(`/sw.js`)));if(e.length===0){this.clearDevResetMarker();return}if(await Promise.all(e.map(async e=>await e.unregister())),await this.clearNextClawCaches(),navigator.serviceWorker.controller&&!this.hasDevResetMarker()){this.setDevResetMarker(),window.location.reload();return}this.clearDevResetMarker()},this.clearNextClawCaches=async()=>{if(typeof window>`u`||!(`caches`in window)||typeof caches.keys!=`function`)return;let e=await caches.keys();await Promise.all(e.filter(e=>e.startsWith(`nextclaw-ui-`)).map(async e=>await caches.delete(e)))},this.hasDevResetMarker=()=>{try{return window.sessionStorage.getItem(q)===`1`}catch{return!1}},this.setDevResetMarker=()=>{try{window.sessionStorage.setItem(q,`1`)}catch{}},this.clearDevResetMarker=()=>{try{window.sessionStorage.removeItem(q)}catch{}}}},Y=new class{constructor(){this.started=!1,this.deferredPrompt=null,this.displayModeMediaQuery=null,this.start=()=>{this.started||typeof window>`u`||(this.started=!0,window.addEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.addEventListener(`appinstalled`,this.handleAppInstalled),typeof window.matchMedia==`function`&&(this.displayModeMediaQuery=window.matchMedia(`(display-mode: standalone)`),this.bindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged)),this.refreshState())},this.stop=()=>{!this.started||typeof window>`u`||(window.removeEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.removeEventListener(`appinstalled`,this.handleAppInstalled),this.displayModeMediaQuery&&=(this.unbindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged),null),this.deferredPrompt=null,this.started=!1)},this.resetForTests=()=>{this.stop(),K.setState(G())},this.refreshState=()=>{let e=this.resolveInstallability();K.setState(t=>({...t,initialized:!0,installability:e.installability,installMethod:e.installMethod,blockedReason:e.blockedReason,dismissedInstallPrompt:H()})),J.syncUpdateAvailability()},this.dismissInstallPrompt=()=>{ge(),K.setState({dismissedInstallPrompt:!0})},this.promptInstall=async()=>{let e=this.resolveInstallability();if(e.installability!==`available`)return`unavailable`;if(e.installMethod===`manual`||!this.deferredPrompt)return`manual`;this.deferredPrompt.prompt();let n=await this.deferredPrompt.userChoice;return this.deferredPrompt=null,n.outcome===`accepted`?(U(),this.refreshState(),s.success(t(`pwaInstallAccepted`)),`accepted`):(this.dismissInstallPrompt(),this.refreshState(),`dismissed`)},this.handleBeforeInstallPrompt=e=>{e.preventDefault(),this.deferredPrompt=e,this.refreshState()},this.handleAppInstalled=()=>{this.deferredPrompt=null,U(),K.setState({dismissedInstallPrompt:!0}),s.success(t(`pwaInstalledToast`)),this.refreshState()},this.handleDisplayModeChanged=()=>{this.refreshState()},this.resolveInstallability=()=>this.isDevelopmentServer()?{installability:`unsupported`,installMethod:`none`,blockedReason:`dev-server`}:this.hasDesktopHost()?{installability:`suppressed`,installMethod:`none`,blockedReason:`desktop-host`}:this.isStandalone()?{installability:`installed`,installMethod:`none`,blockedReason:null}:this.hasInstallSurfaceSupport()?this.isEligibleInstallContext()?{installability:`available`,installMethod:this.deferredPrompt?`prompt`:`manual`,blockedReason:null}:{installability:`unsupported`,installMethod:`none`,blockedReason:`insecure-context`}:{installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`},this.hasDesktopHost=()=>typeof window<`u`&&!!window.nextclawDesktop,this.hasInstallSurfaceSupport=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&`serviceWorker`in navigator,this.isEligibleInstallContext=()=>typeof window>`u`?!1:window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>typeof window<`u`&&!1,this.isStandalone=()=>{if(typeof window>`u`)return!1;let e=window.navigator;return typeof window.matchMedia==`function`&&window.matchMedia(`(display-mode: standalone)`).matches||e.standalone===!0},this.bindDisplayModeListener=(e,t)=>{if(`addEventListener`in e){e.addEventListener(`change`,t);return}e.addListener?.(t)},this.unbindDisplayModeListener=(e,t)=>{if(`removeEventListener`in e){e.removeEventListener(`change`,t);return}e.removeListener?.(t)}}};function ve(){let e=K(e=>e.installability);return(0,M.jsx)(`span`,{className:i(`inline-flex items-center rounded-full border px-3 py-1 text-xs font-medium`,e===`installed`?`bg-emerald-50 text-emerald-700 border-emerald-200`:e===`available`?`bg-amber-50 text-amber-700 border-amber-200`:`bg-gray-100 text-gray-600 border-gray-200`),children:ye(e)})}function ye(e){return t(e===`available`?`pwaInstallStatusAvailable`:e===`installed`?`pwaInstallStatusInstalled`:e===`suppressed`?`pwaInstallStatusDesktopHost`:`pwaInstallStatusUnavailable`)}function be(e,n,r){return t(e===`installed`?`pwaInstallCardInstalled`:e===`suppressed`?`pwaInstallCardSuppressed`:e===`available`&&n===`prompt`?`pwaInstallCardPrompt`:e===`available`?`pwaInstallCardManual`:r===`insecure-context`?`pwaInstallCardInsecureContext`:r===`dev-server`?`pwaInstallCardDevServer`:`pwaInstallCardUnsupported`)}function xe(){let e=K(e=>e.installability),n=K(e=>e.installMethod),r=K(e=>e.blockedReason);return(0,M.jsxs)(te,{children:[(0,M.jsxs)(ee,{className:`flex flex-row items-start justify-between gap-4 space-y-0`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(l,{children:t(`pwaInstallTitle`)}),(0,M.jsx)(o,{children:t(`pwaInstallDescription`)})]}),(0,M.jsx)(ve,{})]}),(0,M.jsxs)(c,{className:`space-y-4`,children:[(0,M.jsx)(`div`,{className:`rounded-2xl border border-gray-200 bg-gray-50/90 p-4`,children:(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-700`,children:be(e,n,r)})}),e===`available`&&n===`prompt`?(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,M.jsxs)(a,{type:`button`,className:`gap-2`,onClick:()=>{Y.promptInstall()},children:[(0,M.jsx)(y,{className:`h-4 w-4`}),t(`pwaInstallAction`)]}),(0,M.jsx)(`p`,{className:`text-sm text-gray-500`,children:t(`pwaInstallPromptHint`)})]}):null,e===`available`&&n===`manual`?(0,M.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-dashed border-gray-300 bg-white p-4`,children:[(0,M.jsx)(fe,{className:`mt-0.5 h-4 w-4 text-gray-500`}),(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:t(`pwaInstallManualHint`)})]}):null]})]})}function Se(){let e=K(e=>e.installability),n=K(e=>e.installMethod),r=K(e=>e.dismissedInstallPrompt);return e!==`available`||n!==`prompt`||r?null:(0,M.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-50 w-[min(420px,calc(100vw-2rem))] rounded-[26px] border border-gray-200 bg-white/95 p-5 shadow-2xl backdrop-blur-xl`,children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:t(`pwaInstallBannerTitle`)}),(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:t(`pwaInstallBannerDescription`)})]}),(0,M.jsx)(`button`,{type:`button`,"aria-label":t(`pwaInstallDismiss`),className:`rounded-full p-1 text-gray-400 transition hover:bg-gray-100 hover:text-gray-600`,onClick:()=>{Y.dismissInstallPrompt()},children:(0,M.jsx)(g,{className:`h-4 w-4`})})]}),(0,M.jsxs)(`div`,{className:`mt-4 flex items-center gap-3`,children:[(0,M.jsxs)(a,{type:`button`,size:`sm`,className:`gap-2`,onClick:()=>{Y.promptInstall()},children:[(0,M.jsx)(y,{className:`h-4 w-4`}),t(`pwaInstallAction`)]}),(0,M.jsx)(a,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{Y.dismissInstallPrompt()},children:t(`pwaInstallDismiss`)})]})]})}function Ce(){let e=K(e=>e.updateAvailable),n=K(e=>e.installability);return!e||n!==`installed`?null:(0,M.jsxs)(`div`,{className:`fixed top-5 right-5 z-50 w-[min(420px,calc(100vw-2rem))] rounded-[26px] border border-gray-200 bg-white/95 p-5 shadow-2xl backdrop-blur-xl`,children:[(0,M.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:t(`pwaUpdateBannerTitle`)}),(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:t(`pwaUpdateBannerDescription`)})]})}),(0,M.jsx)(`div`,{className:`mt-4`,children:(0,M.jsxs)(a,{type:`button`,size:`sm`,className:`gap-2`,onClick:()=>{J.applyUpdate()},children:[(0,M.jsx)(b,{className:`h-4 w-4`}),t(`pwaUpdateAction`)]})})]})}var X=!1;function we(){X||typeof window>`u`||(X=!0,Y.start(),J.start())}var Te={warm:`#F9F8F5`,cool:`#F8FAFB`},Z=new class{constructor(){this.syncTheme=e=>{if(typeof document>`u`)return;let t=Te[e];this.updateThemeMeta(t),this.updateSurfaceBackgrounds(t),document.documentElement.style.colorScheme=`light`},this.syncCurrentTheme=()=>{if(typeof document>`u`)return;let e=document.documentElement.getAttribute(`data-theme`)===`cool`?`cool`:`warm`;this.syncTheme(e)},this.updateThemeMeta=e=>{let t=document.querySelector(`meta[name="theme-color"]`);t instanceof HTMLMetaElement&&(t.content=e)},this.updateSurfaceBackgrounds=e=>{document.documentElement.style.backgroundColor=e,document.body.style.backgroundColor=e;let t=document.getElementById(`root`);t&&(t.style.backgroundColor=e)}}},Q=e(n(),1),$=(0,Q.createContext)(null);function Ee({children:e}){let[t,n]=(0,Q.useState)(()=>O());(0,Q.useEffect)(()=>{Z.syncTheme(t)},[t]),(0,Q.useEffect)(()=>j(e=>{n(e)}),[]);let r=(0,Q.useCallback)(e=>{A(e),n(k())},[]),i=(0,Q.useMemo)(()=>({theme:t,setTheme:r}),[t,r]);return(0,M.jsx)($.Provider,{value:i,children:e})}function De(){let e=(0,Q.useContext)($);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}export{y as _,xe as a,oe as b,R as c,me as d,pe as f,le as g,ue as h,Se as i,he as l,de as m,De as n,Ce as o,b as p,we as r,z as s,Ee as t,F as u,ce as v,se as y};
|
|
1
|
+
import{_ as e,i as t,m as n,p as r,u as i}from"./i18n-BnNAQpVM.js";import{At as a,Ct as o,Pt as s,St as c,Tt as l,bt as u,gt as d,wt as ee,xt as te,yt as ne}from"./api-C51456xV.js";import{r as re}from"./chunk-JZWAC4HX-ptDyT_1C.js";import{t as f}from"./createLucideIcon-C_GFKVuW.js";import{i as p,n as m,t as h}from"./select-DRDejPLk.js";import{t as g}from"./x-BjMO7v8q.js";import{t as _}from"./use-config-DFja1sda.js";import{n as v,r as ie,t as ae}from"./popover-B8msg2FQ.js";var oe=f(`AlarmClock`,[[`circle`,{cx:`12`,cy:`13`,r:`8`,key:`3y4lt7`}],[`path`,{d:`M12 9v4l2 2`,key:`1c63tq`}],[`path`,{d:`M5 3 2 6`,key:`18tl5t`}],[`path`,{d:`m22 6-3-3`,key:`1opdir`}],[`path`,{d:`M6.38 18.7 4 21`,key:`17xu3x`}],[`path`,{d:`M17.64 18.67 20 21`,key:`kv2oe2`}]]),se=f(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ce=f(`BrainCircuit`,[[`path`,{d:`M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z`,key:`l5xja`}],[`path`,{d:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`path`,{d:`M6.003 5.125A3 3 0 0 0 6.401 6.5`,key:`105sqy`}],[`path`,{d:`M3.477 10.896a4 4 0 0 1 .585-.396`,key:`ql3yin`}],[`path`,{d:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),y=f(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),le=f(`Languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),ue=f(`MessageCircle`,[[`path`,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,key:`vv11sd`}]]),de=f(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),b=f(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),fe=f(`Smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),pe=f(`Wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`,key:`cbrjhi`}]]),x=`nextclaw.ui.theme`,me=[{value:`warm`,labelKey:`themeWarm`},{value:`cool`,labelKey:`themeCool`}],S=`warm`,C=!1,w=new Set;function T(e){return e===`warm`||e===`cool`}function E(e){typeof document>`u`||document.documentElement.setAttribute(`data-theme`,e)}function D(){if(typeof window>`u`)return`warm`;try{let e=window.localStorage.getItem(x);if(T(e))return e}catch{}return`warm`}function O(){return C||=(S=D(),E(S),!0),S}function k(){return C?S:O()}function A(e){if(O(),e!==S){if(S=e,E(S),typeof window<`u`)try{window.localStorage.setItem(x,S)}catch{}w.forEach(e=>e(S))}}function j(e){return w.add(e),()=>{w.delete(e)}}var M=r(),N={healthy:`bg-emerald-500 shadow-[0_0_0_3px_rgba(16,185,129,0.14)]`,attention:`bg-amber-400 shadow-[0_0_0_3px_rgba(251,191,36,0.16)]`,inactive:`bg-gray-300 shadow-[0_0_0_3px_rgba(156,163,175,0.12)]`};function P(){let e=d(),n=e.actionLabel===t(`runtimeStatusRestartAction`),r=async()=>{if(n)try{let e=await ne.runRuntimeControlAction(`restart-service`);s.success(e.message)}catch(e){let n=e instanceof Error?e.message:t(`runtimeControlActionFailed`);s.error(`${t(`runtimeControlActionFailed`)}: ${n}`)}};return(0,M.jsxs)(ae,{children:[(0,M.jsx)(ie,{asChild:!0,children:(0,M.jsx)(`button`,{type:`button`,className:`inline-flex items-center justify-center rounded-full p-0.5 transition-transform hover:scale-105`,"aria-label":e.title,title:e.title,"data-testid":`runtime-status-entry`,children:(0,M.jsx)(`span`,{className:i(`h-2.5 w-2.5 rounded-full`,N[e.tone])})})}),(0,M.jsxs)(v,{align:`start`,sideOffset:10,className:`w-[290px] space-y-3 rounded-2xl border border-gray-200 bg-white p-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`div`,{className:`text-sm font-semibold text-gray-900`,children:e.title}),(0,M.jsx)(`p`,{className:`text-xs leading-5 text-gray-600`,children:e.description})]}),e.reasonLines.length>0?(0,M.jsx)(`div`,{className:`space-y-2`,children:e.reasonLines.map(e=>(0,M.jsx)(`div`,{className:`rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-900`,children:e},e))}):null,e.actionLabel?(0,M.jsxs)(`div`,{className:`flex items-center justify-between border-t border-gray-100 pt-1`,children:[(0,M.jsx)(`span`,{className:`text-[11px] text-gray-500`,children:t(`runtimeStatusActionHint`)}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>void r(),disabled:e.isBusy,className:`text-sm font-semibold text-sky-600 transition-colors hover:text-sky-700 disabled:text-gray-400`,children:e.isBusy?t(`runtimeStatusRestartingAction`):e.actionLabel})]}):null]})]})}function F({className:e,suffix:t}){let{data:n}=_(),r=n?.name??`NextClaw`,i=n?.productVersion?.trim(),a=t??(0,M.jsx)(P,{});return(0,M.jsxs)(`div`,{className:e??`flex items-center gap-2.5`,children:[(0,M.jsx)(`div`,{className:`h-7 w-7 rounded-lg overflow-hidden flex items-center justify-center`,children:(0,M.jsx)(`img`,{src:`/logo.svg`,alt:r,className:`h-full w-full object-contain`})}),(0,M.jsxs)(`div`,{className:`flex items-baseline gap-2 min-w-0`,children:[(0,M.jsx)(`span`,{className:`truncate text-[15px] font-semibold tracking-[-0.01em] text-gray-800`,children:r}),i?(0,M.jsxs)(`span`,{className:`text-[13px] font-medium text-gray-500`,children:[`v`,i]}):null,a?(0,M.jsx)(`span`,{className:`inline-flex items-center shrink-0`,children:a}):null]})]})}var I={default:{row:`gap-3 px-3 py-2.5 text-[14px]`,icon:`h-[17px] w-[17px]`,value:`text-xs`,gap:`gap-3`},compact:{row:`gap-2.5 px-3 py-2 text-[13px]`,icon:`h-4 w-4`,value:`text-[11px]`,gap:`gap-2.5`}};function L(e){return I[e]}function R({to:e,label:t,icon:n,density:r=`default`,className:a}){let o=L(r);return(0,M.jsx)(re,{to:e,className:({isActive:e})=>i(`group flex w-full items-center rounded-xl font-medium transition-colors duration-base`,o.row,e?`bg-gray-200 text-gray-900 shadow-sm`:`text-gray-600 hover:bg-gray-200/60 hover:text-gray-900`,a),children:({isActive:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(n,{className:i(o.icon,`transition-colors`,e?`text-gray-900`:`text-gray-500 group-hover:text-gray-800`)}),(0,M.jsx)(`span`,{className:`min-w-0 flex-1 text-left`,children:t})]})})}function z({label:e,icon:t,onClick:n,density:r=`default`,className:a,labelClassName:o,trailing:s,trailingClassName:c,testId:l,trailingTestId:u}){let d=L(r);return(0,M.jsxs)(`button`,{type:`button`,onClick:n,className:i(`flex w-full items-center rounded-xl font-medium text-gray-600 transition-all duration-base hover:bg-gray-200/60 hover:text-gray-800`,d.row,a),"data-testid":l,children:[(0,M.jsx)(t,{className:i(d.icon,`shrink-0 text-gray-400`)}),(0,M.jsx)(`span`,{className:i(`min-w-0 flex-1 text-left`,o),children:e}),s?(0,M.jsx)(`span`,{className:i(`shrink-0 text-gray-500`,d.value,c),"data-testid":u,children:s}):null]})}function he({label:e,icon:t,value:n,valueLabel:r,onValueChange:a,density:o=`default`,children:s}){let c=L(o);return(0,M.jsxs)(h,{value:n,onValueChange:a,children:[(0,M.jsxs)(p,{className:i(`h-auto w-full rounded-xl border-0 bg-transparent font-medium text-gray-600 shadow-none hover:bg-gray-200/60 focus:ring-0`,c.row),children:[(0,M.jsxs)(`div`,{className:i(`flex min-w-0 items-center`,c.gap),children:[(0,M.jsx)(t,{className:i(c.icon,`text-gray-400`)}),(0,M.jsx)(`span`,{className:`text-left`,children:e})]}),(0,M.jsx)(`span`,{className:i(`ml-auto text-gray-500`,c.value),children:r})]}),(0,M.jsx)(m,{children:s})]})}var B=`nextclaw-pwa-install-banner-dismissed`,V=`nextclaw-pwa-install-banner-dismissed-until`;function H(){let e=W();return e?e.getItem(`nextclaw-pwa-install-banner-dismissed`)===`1`?!0:_e(e):!1}function ge(){let e=W();e?.setItem(B,`1`),e?.removeItem(V)}function U(){let e=W();e?.removeItem(B),e?.removeItem(V)}function W(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function _e(e){let t=e.getItem(V);if(!t)return!1;let n=Number.parseInt(t,10);return e.removeItem(V),!Number.isFinite(n)||n<=Date.now()?!1:(e.setItem(B,`1`),!0)}function G(){return{initialized:!1,installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`,dismissedInstallPrompt:H(),updateAvailable:!1,registrationFailed:!1}}var K=u(()=>G()),q=`nextclaw-pwa-dev-sw-reset`,J=new class{constructor(){this.started=!1,this.registration=null,this.reloadWhenControllerChanges=!1,this.start=async()=>{if(!(this.started||typeof window>`u`)&&(this.started=!0,!(!(`serviceWorker`in navigator)||!this.isEligibleInstallContext()))){if(this.isDevelopmentServer()){await this.cleanupDevelopmentRegistrations();return}try{let e=await navigator.serviceWorker.register(`/sw.js`);this.registration=e,this.bindRegistration(e),navigator.serviceWorker.addEventListener(`controllerchange`,this.handleControllerChange),await this.syncUpdateAvailability()}catch{K.setState({registrationFailed:!0})}}},this.syncUpdateAvailability=async()=>{if(typeof window>`u`||!(`serviceWorker`in navigator)||typeof navigator.serviceWorker.getRegistration!=`function`){K.setState({updateAvailable:!1});return}let e=this.registration??await navigator.serviceWorker.getRegistration(`/sw.js`)??null;K.setState({updateAvailable:this.shouldSurfaceUpdate(e)})},this.applyUpdate=async()=>{let e=this.registration??await navigator.serviceWorker.getRegistration(`/sw.js`)??null;if(!e){window.location.reload();return}e.waiting||await e.update();let t=e.waiting;if(!t){window.location.reload();return}this.reloadWhenControllerChanges=!0,t.postMessage({type:`SKIP_WAIT`})},this.stop=()=>{!this.started||typeof window>`u`||!(`serviceWorker`in navigator)||(navigator.serviceWorker.removeEventListener(`controllerchange`,this.handleControllerChange),this.started=!1,this.registration=null,this.reloadWhenControllerChanges=!1)},this.bindRegistration=e=>{e.addEventListener(`updatefound`,()=>{let t=e.installing;t&&t.addEventListener(`statechange`,()=>{t.state===`installed`&&this.syncUpdateAvailability()})})},this.handleControllerChange=()=>{this.reloadWhenControllerChanges&&(this.reloadWhenControllerChanges=!1,window.location.reload())},this.isEligibleInstallContext=()=>window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>!1,this.shouldSurfaceUpdate=e=>!e?.waiting||!navigator.serviceWorker.controller?!1:K.getState().installability===`installed`,this.cleanupDevelopmentRegistrations=async()=>{if(typeof navigator.serviceWorker.getRegistrations!=`function`)return;let e=(await navigator.serviceWorker.getRegistrations()).filter(e=>[e.active?.scriptURL,e.installing?.scriptURL,e.waiting?.scriptURL].filter(e=>!!e).some(e=>e.endsWith(`/sw.js`)));if(e.length===0){this.clearDevResetMarker();return}if(await Promise.all(e.map(async e=>await e.unregister())),await this.clearNextClawCaches(),navigator.serviceWorker.controller&&!this.hasDevResetMarker()){this.setDevResetMarker(),window.location.reload();return}this.clearDevResetMarker()},this.clearNextClawCaches=async()=>{if(typeof window>`u`||!(`caches`in window)||typeof caches.keys!=`function`)return;let e=await caches.keys();await Promise.all(e.filter(e=>e.startsWith(`nextclaw-ui-`)).map(async e=>await caches.delete(e)))},this.hasDevResetMarker=()=>{try{return window.sessionStorage.getItem(q)===`1`}catch{return!1}},this.setDevResetMarker=()=>{try{window.sessionStorage.setItem(q,`1`)}catch{}},this.clearDevResetMarker=()=>{try{window.sessionStorage.removeItem(q)}catch{}}}},Y=new class{constructor(){this.started=!1,this.deferredPrompt=null,this.displayModeMediaQuery=null,this.start=()=>{this.started||typeof window>`u`||(this.started=!0,window.addEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.addEventListener(`appinstalled`,this.handleAppInstalled),typeof window.matchMedia==`function`&&(this.displayModeMediaQuery=window.matchMedia(`(display-mode: standalone)`),this.bindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged)),this.refreshState())},this.stop=()=>{!this.started||typeof window>`u`||(window.removeEventListener(`beforeinstallprompt`,this.handleBeforeInstallPrompt),window.removeEventListener(`appinstalled`,this.handleAppInstalled),this.displayModeMediaQuery&&=(this.unbindDisplayModeListener(this.displayModeMediaQuery,this.handleDisplayModeChanged),null),this.deferredPrompt=null,this.started=!1)},this.resetForTests=()=>{this.stop(),K.setState(G())},this.refreshState=()=>{let e=this.resolveInstallability();K.setState(t=>({...t,initialized:!0,installability:e.installability,installMethod:e.installMethod,blockedReason:e.blockedReason,dismissedInstallPrompt:H()})),J.syncUpdateAvailability()},this.dismissInstallPrompt=()=>{ge(),K.setState({dismissedInstallPrompt:!0})},this.promptInstall=async()=>{let e=this.resolveInstallability();if(e.installability!==`available`)return`unavailable`;if(e.installMethod===`manual`||!this.deferredPrompt)return`manual`;this.deferredPrompt.prompt();let n=await this.deferredPrompt.userChoice;return this.deferredPrompt=null,n.outcome===`accepted`?(U(),this.refreshState(),s.success(t(`pwaInstallAccepted`)),`accepted`):(this.dismissInstallPrompt(),this.refreshState(),`dismissed`)},this.handleBeforeInstallPrompt=e=>{e.preventDefault(),this.deferredPrompt=e,this.refreshState()},this.handleAppInstalled=()=>{this.deferredPrompt=null,U(),K.setState({dismissedInstallPrompt:!0}),s.success(t(`pwaInstalledToast`)),this.refreshState()},this.handleDisplayModeChanged=()=>{this.refreshState()},this.resolveInstallability=()=>this.isDevelopmentServer()?{installability:`unsupported`,installMethod:`none`,blockedReason:`dev-server`}:this.hasDesktopHost()?{installability:`suppressed`,installMethod:`none`,blockedReason:`desktop-host`}:this.isStandalone()?{installability:`installed`,installMethod:`none`,blockedReason:null}:this.hasInstallSurfaceSupport()?this.isEligibleInstallContext()?{installability:`available`,installMethod:this.deferredPrompt?`prompt`:`manual`,blockedReason:null}:{installability:`unsupported`,installMethod:`none`,blockedReason:`insecure-context`}:{installability:`unsupported`,installMethod:`none`,blockedReason:`missing-browser-support`},this.hasDesktopHost=()=>typeof window<`u`&&!!window.nextclawDesktop,this.hasInstallSurfaceSupport=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&`serviceWorker`in navigator,this.isEligibleInstallContext=()=>typeof window>`u`?!1:window.isSecureContext||this.isTrustedLocalhost(window.location.hostname),this.isTrustedLocalhost=e=>e===`localhost`||e===`127.0.0.1`||e===`::1`||e===`[::1]`,this.isDevelopmentServer=()=>typeof window<`u`&&!1,this.isStandalone=()=>{if(typeof window>`u`)return!1;let e=window.navigator;return typeof window.matchMedia==`function`&&window.matchMedia(`(display-mode: standalone)`).matches||e.standalone===!0},this.bindDisplayModeListener=(e,t)=>{if(`addEventListener`in e){e.addEventListener(`change`,t);return}e.addListener?.(t)},this.unbindDisplayModeListener=(e,t)=>{if(`removeEventListener`in e){e.removeEventListener(`change`,t);return}e.removeListener?.(t)}}};function ve(){let e=K(e=>e.installability);return(0,M.jsx)(`span`,{className:i(`inline-flex items-center rounded-full border px-3 py-1 text-xs font-medium`,e===`installed`?`bg-emerald-50 text-emerald-700 border-emerald-200`:e===`available`?`bg-amber-50 text-amber-700 border-amber-200`:`bg-gray-100 text-gray-600 border-gray-200`),children:ye(e)})}function ye(e){return t(e===`available`?`pwaInstallStatusAvailable`:e===`installed`?`pwaInstallStatusInstalled`:e===`suppressed`?`pwaInstallStatusDesktopHost`:`pwaInstallStatusUnavailable`)}function be(e,n,r){return t(e===`installed`?`pwaInstallCardInstalled`:e===`suppressed`?`pwaInstallCardSuppressed`:e===`available`&&n===`prompt`?`pwaInstallCardPrompt`:e===`available`?`pwaInstallCardManual`:r===`insecure-context`?`pwaInstallCardInsecureContext`:r===`dev-server`?`pwaInstallCardDevServer`:`pwaInstallCardUnsupported`)}function xe(){let e=K(e=>e.installability),n=K(e=>e.installMethod),r=K(e=>e.blockedReason);return(0,M.jsxs)(te,{children:[(0,M.jsxs)(ee,{className:`flex flex-row items-start justify-between gap-4 space-y-0`,children:[(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(l,{children:t(`pwaInstallTitle`)}),(0,M.jsx)(o,{children:t(`pwaInstallDescription`)})]}),(0,M.jsx)(ve,{})]}),(0,M.jsxs)(c,{className:`space-y-4`,children:[(0,M.jsx)(`div`,{className:`rounded-2xl border border-gray-200 bg-gray-50/90 p-4`,children:(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-700`,children:be(e,n,r)})}),e===`available`&&n===`prompt`?(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,M.jsxs)(a,{type:`button`,className:`gap-2`,onClick:()=>{Y.promptInstall()},children:[(0,M.jsx)(y,{className:`h-4 w-4`}),t(`pwaInstallAction`)]}),(0,M.jsx)(`p`,{className:`text-sm text-gray-500`,children:t(`pwaInstallPromptHint`)})]}):null,e===`available`&&n===`manual`?(0,M.jsxs)(`div`,{className:`flex items-start gap-3 rounded-2xl border border-dashed border-gray-300 bg-white p-4`,children:[(0,M.jsx)(fe,{className:`mt-0.5 h-4 w-4 text-gray-500`}),(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:t(`pwaInstallManualHint`)})]}):null]})]})}function Se(){let e=K(e=>e.installability),n=K(e=>e.installMethod),r=K(e=>e.dismissedInstallPrompt);return e!==`available`||n!==`prompt`||r?null:(0,M.jsxs)(`div`,{className:`fixed bottom-5 right-5 z-50 w-[min(420px,calc(100vw-2rem))] rounded-[26px] border border-gray-200 bg-white/95 p-5 shadow-2xl backdrop-blur-xl`,children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:t(`pwaInstallBannerTitle`)}),(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:t(`pwaInstallBannerDescription`)})]}),(0,M.jsx)(`button`,{type:`button`,"aria-label":t(`pwaInstallDismiss`),className:`rounded-full p-1 text-gray-400 transition hover:bg-gray-100 hover:text-gray-600`,onClick:()=>{Y.dismissInstallPrompt()},children:(0,M.jsx)(g,{className:`h-4 w-4`})})]}),(0,M.jsxs)(`div`,{className:`mt-4 flex items-center gap-3`,children:[(0,M.jsxs)(a,{type:`button`,size:`sm`,className:`gap-2`,onClick:()=>{Y.promptInstall()},children:[(0,M.jsx)(y,{className:`h-4 w-4`}),t(`pwaInstallAction`)]}),(0,M.jsx)(a,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{Y.dismissInstallPrompt()},children:t(`pwaInstallDismiss`)})]})]})}function Ce(){let e=K(e=>e.updateAvailable),n=K(e=>e.installability);return!e||n!==`installed`?null:(0,M.jsxs)(`div`,{className:`fixed top-5 right-5 z-50 w-[min(420px,calc(100vw-2rem))] rounded-[26px] border border-gray-200 bg-white/95 p-5 shadow-2xl backdrop-blur-xl`,children:[(0,M.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsx)(`p`,{className:`text-sm font-semibold text-gray-900`,children:t(`pwaUpdateBannerTitle`)}),(0,M.jsx)(`p`,{className:`text-sm leading-6 text-gray-600`,children:t(`pwaUpdateBannerDescription`)})]})}),(0,M.jsx)(`div`,{className:`mt-4`,children:(0,M.jsxs)(a,{type:`button`,size:`sm`,className:`gap-2`,onClick:()=>{J.applyUpdate()},children:[(0,M.jsx)(b,{className:`h-4 w-4`}),t(`pwaUpdateAction`)]})})]})}var X=!1;function we(){X||typeof window>`u`||(X=!0,Y.start(),J.start())}var Te={warm:`#F9F8F5`,cool:`#F8FAFB`},Z=new class{constructor(){this.syncTheme=e=>{if(typeof document>`u`)return;let t=Te[e];this.updateThemeMeta(t),this.updateSurfaceBackgrounds(t),document.documentElement.style.colorScheme=`light`},this.syncCurrentTheme=()=>{if(typeof document>`u`)return;let e=document.documentElement.getAttribute(`data-theme`)===`cool`?`cool`:`warm`;this.syncTheme(e)},this.updateThemeMeta=e=>{let t=document.querySelector(`meta[name="theme-color"]`);t instanceof HTMLMetaElement&&(t.content=e)},this.updateSurfaceBackgrounds=e=>{document.documentElement.style.backgroundColor=e,document.body.style.backgroundColor=e;let t=document.getElementById(`root`);t&&(t.style.backgroundColor=e)}}},Q=e(n(),1),$=(0,Q.createContext)(null);function Ee({children:e}){let[t,n]=(0,Q.useState)(()=>O());(0,Q.useEffect)(()=>{Z.syncTheme(t)},[t]),(0,Q.useEffect)(()=>j(e=>{n(e)}),[]);let r=(0,Q.useCallback)(e=>{A(e),n(k())},[]),i=(0,Q.useMemo)(()=>({theme:t,setTheme:r}),[t,r]);return(0,M.jsx)($.Provider,{value:i,children:e})}function De(){let e=(0,Q.useContext)($);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}export{y as _,xe as a,oe as b,R as c,me as d,pe as f,le as g,ue as h,Se as i,he as l,de as m,De as n,Ce as o,b as p,we as r,z as s,Ee as t,F as u,ce as v,se as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,m as t,p as n,u as r}from"./i18n-
|
|
1
|
+
import{_ as e,m as t,p as n,u as r}from"./i18n-BnNAQpVM.js";import{_ as i,c as a,d as o,f as s,g as c,h as l,i as u,o as d,u as f}from"./es2015-BlNhrQUG.js";import{t as p}from"./dist-DtBFqZ6_.js";import{C as m,E as h,S as g,T as _,w as v,x as y}from"./select-DRDejPLk.js";var b=e(t(),1),x=n(),[S,C]=l(`Tooltip`,[h]),w=h(),T=`TooltipProvider`,E=700,D=`tooltip.open`,[O,k]=S(T),A=e=>{let{__scopeTooltip:t,delayDuration:n=E,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,x.jsx)(O,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};A.displayName=T;var j=`Tooltip`,[ee,M]=S(j),N=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:c,delayDuration:l}=e,u=k(j,e.__scopeTooltip),d=w(t),[f,p]=b.useState(null),m=s(),h=b.useRef(0),g=c??u.disableHoverableContent,v=l??u.delayDuration,y=b.useRef(!1),[S,C]=o({prop:r,defaultProp:i??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(D))):u.onClose(),a?.(e)},caller:j}),T=b.useMemo(()=>S?y.current?`delayed-open`:`instant-open`:`closed`,[S]),E=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,C(!0)},[C]),O=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),A=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,C(!0),h.current=0},v)},[v,C]);return b.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,x.jsx)(_,{...d,children:(0,x.jsx)(ee,{scope:t,contentId:m,open:S,stateAttribute:T,trigger:f,onTriggerChange:p,onTriggerEnter:b.useCallback(()=>{u.isOpenDelayedRef.current?A():E()},[u.isOpenDelayedRef,A,E]),onTriggerLeave:b.useCallback(()=>{g?O():(window.clearTimeout(h.current),h.current=0)},[O,g]),onOpen:E,onClose:O,disableHoverableContent:g,children:n})})};N.displayName=j;var P=`TooltipTrigger`,F=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,o=M(P,n),s=k(P,n),l=w(n),u=c(t,b.useRef(null),o.onTriggerChange),d=b.useRef(!1),f=b.useRef(!1),p=b.useCallback(()=>d.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,p),[p]),(0,x.jsx)(g,{asChild:!0,...l,children:(0,x.jsx)(a.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:i(e.onPointerMove,e=>{e.pointerType!==`touch`&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:i(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:i(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener(`pointerup`,p,{once:!0})}),onFocus:i(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:i(e.onBlur,o.onClose),onClick:i(e.onClick,o.onClose)})})});F.displayName=P;var I=`TooltipPortal`,[L,R]=S(I,{forceMount:void 0}),z=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=M(I,t);return(0,x.jsx)(L,{scope:t,forceMount:n,children:(0,x.jsx)(p,{present:n||a.open,children:(0,x.jsx)(u,{asChild:!0,container:i,children:r})})})};z.displayName=I;var B=`TooltipContent`,V=b.forwardRef((e,t)=>{let n=R(B,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=M(B,e.__scopeTooltip);return(0,x.jsx)(p,{present:r||o.open,children:o.disableHoverableContent?(0,x.jsx)(K,{side:i,...a,ref:t}):(0,x.jsx)(H,{side:i,...a,ref:t})})}),H=b.forwardRef((e,t)=>{let n=M(B,e.__scopeTooltip),r=k(B,e.__scopeTooltip),i=b.useRef(null),a=c(t,i),[o,s]=b.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=b.useCallback(()=>{s(null),f(!1)},[f]),m=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=re(r,ne(r,n.getBoundingClientRect())),a=ie(t.getBoundingClientRect());s(oe([...i,...a])),f(!0)},[f]);return b.useEffect(()=>()=>p(),[p]),b.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]),b.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!ae(n,o);r?p():i&&(p(),u())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,o,u,p]),(0,x.jsx)(K,{...e,ref:a})}),[U,W]=S(j,{isInside:!1}),G=f(`TooltipContent`),K=b.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=M(B,n),l=w(n),{onClose:u}=c;return b.useEffect(()=>(document.addEventListener(D,u),()=>document.removeEventListener(D,u)),[u]),b.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,x.jsx)(d,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,x.jsxs)(v,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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,x.jsx)(G,{children:r}),(0,x.jsx)(U,{scope:n,isInside:!0,children:(0,x.jsx)(y,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});V.displayName=B;var q=`TooltipArrow`,te=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=w(n);return W(q,n).isInside?null:(0,x.jsx)(m,{...i,...r,ref:t})});te.displayName=q;function ne(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 re(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 ie(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 ae(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 oe(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),se(t)}function se(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=A,Y=N,X=F,Z=z,Q=V,ce=J,le=Y,ue=X,$=b.forwardRef(({className:e,sideOffset:t=4,...n},i)=>(0,x.jsx)(Z,{children:(0,x.jsx)(Q,{ref:i,sideOffset:t,className:r(`z-[var(--z-tooltip)] 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),...n})}));$.displayName=Q.displayName;export{Q as a,Y as c,ue as i,X as l,$ as n,Z as o,ce as r,J as s,le as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-C_GFKVuW.js";var t=e(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./i18n-
|
|
1
|
+
import{i as e}from"./i18n-BnNAQpVM.js";import{$ as t,B as n,F as r,Ft as i,G as a,I as o,It as s,J as c,K as l,L as u,N as d,P as f,Pt as p,Q as m,R as h,U as g,V as _,W as v,X as y,Y as b,Z as x,_ as S,et as C,g as w,h as T,m as E,p as D,q as O,v as k,y as A,z as j,zt as M}from"./api-C51456xV.js";function ee(){return s({queryKey:[`config`],queryFn:h,staleTime:3e4,refetchOnWindowFocus:!0})}function N(){return s({queryKey:[`app-meta`],queryFn:u,staleTime:1/0})}function P(){return s({queryKey:[`config-meta`],queryFn:j,staleTime:1/0})}function F(){return s({queryKey:[`config-schema`],queryFn:n,staleTime:1/0})}function I(){let t=M();return i({mutationFn:y,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),p.success(e(`configSaved`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function L(){let n=M();return i({mutationFn:({data:e})=>t(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`config`]}),n.invalidateQueries({queryKey:[`config-meta`]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function R(){let t=M();return i({mutationFn:({provider:e,data:t})=>x(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),p.success(e(`configSaved`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function z(){let t=M();return i({mutationFn:({data:e})=>d(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),p.success(e(`configSaved`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function B(){let t=M();return i({mutationFn:({provider:e})=>r(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),p.success(e(`configSaved`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function V(){return i({mutationFn:({provider:e,data:t})=>c(e,t)})}function H(){return i({mutationFn:({provider:e,data:t})=>O(e,t)})}function U(){return i({mutationFn:({provider:e,data:t})=>v(e,t)})}function W(){return i({mutationFn:({provider:e})=>g(e)})}function G(){let t=M();return i({mutationFn:({channel:e,data:t})=>b(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),p.success(e(`configSavedApplying`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function K(){let t=M();return i({mutationFn:({data:e})=>m(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function q(){let t=M();return i({mutationFn:({data:e})=>C(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function J(){return i({mutationFn:({actionId:e,data:t})=>o(e,t),onError:t=>{p.error(e(`error`)+`: `+t.message)}})}function Y(e){return s({queryKey:[`ncp-sessions`,e?.limit??null],queryFn:()=>k(e),staleTime:5e3,retry:!1})}function X(e,t=200){return s({queryKey:[`ncp-session-messages`,e,t],queryFn:()=>w(e,t),enabled:!!e,staleTime:5e3,retry:!1})}function Z(e){return s({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>S(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,staleTime:5e3,retry:!1})}function Q(){let t=M();return i({mutationFn:({sessionId:e})=>T(e),onSuccess:(n,r)=>{D(t,r.sessionId),t.removeQueries({queryKey:[`ncp-session-messages`,r.sessionId]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function $(){let t=M();return i({mutationFn:({sessionId:e,data:t})=>A(e,t),onSuccess:n=>{E(t,n),t.invalidateQueries({queryKey:[`ncp-session-skills`,n.sessionId]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function te(e={all:!0}){return s({queryKey:[`cron`,e],queryFn:()=>_(e),staleTime:1e4})}function ne(){let t=M();return i({mutationFn:({id:e})=>f(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function re(){let t=M();return i({mutationFn:({id:e,enabled:t})=>l(e,{enabled:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}function ie(){let t=M();return i({mutationFn:({id:e,force:t})=>a(e,{force:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),p.success(e(`configSavedApplied`))},onError:t=>{p.error(e(`configSaveFailed`)+`: `+t.message)}})}export{R as C,q as E,$ as S,L as T,H as _,z as a,G as b,Q as c,W as d,X as f,ie as g,U as h,F as i,B as l,Y as m,ee as n,te as o,Z as p,P as r,ne as s,N as t,J as u,V as v,K as w,I as x,re as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,i as t,m as n,p as r}from"./i18n-
|
|
1
|
+
import{_ as e,i as t,m as n,p as r}from"./i18n-BnNAQpVM.js";import{At as i}from"./api-C51456xV.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./dialog-BHcaU6NE.js";var d=e(n(),1),f=r(),p=({open:e,onOpenChange:n,title:r,description:d,confirmLabel:p=t(`confirm`),cancelLabel:m=t(`cancel`),variant:h=`default`,onConfirm:g,onCancel:_})=>(0,f.jsx)(u,{open:e,onOpenChange:n,children:(0,f.jsxs)(s,{className:`[&>:last-child]:hidden`,onCloseAutoFocus:e=>e.preventDefault(),children:[(0,f.jsxs)(a,{children:[(0,f.jsx)(c,{children:r}),d?(0,f.jsx)(l,{children:d}):null]}),(0,f.jsxs)(o,{className:`gap-2 sm:gap-0`,children:[(0,f.jsx)(i,{type:`button`,variant:`outline`,onClick:()=>{_(),n(!1)},children:m}),(0,f.jsx)(i,{type:`button`,variant:h===`destructive`?`destructive`:`default`,onClick:()=>{g(),n(!1)},children:p})]})]})}),m={open:!1,title:``,description:``,confirmLabel:t(`confirm`),cancelLabel:t(`cancel`),variant:`default`,resolve:null};function h(){let[e,n]=(0,d.useState)(m),r=(0,d.useCallback)(e=>new Promise(r=>{n({open:!0,title:e.title,description:e.description??``,confirmLabel:e.confirmLabel??t(`confirm`),cancelLabel:e.cancelLabel??t(`cancel`),variant:e.variant??`default`,resolve:e=>{r(e),n(e=>({...e,open:!1,resolve:null}))}})}),[]),i=(0,d.useCallback)(e=>{n(t=>(!e&&t.resolve&&t.resolve(!1),{...t,open:e,resolve:e?t.resolve:null}))},[]);return{confirm:r,ConfirmDialog:(0,d.useCallback)(()=>(0,f.jsx)(p,{open:e.open,onOpenChange:i,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,i])}}export{h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,i as t,m as n,p as r}from"./i18n-
|
|
1
|
+
import{_ as e,i as t,m as n,p as r}from"./i18n-BnNAQpVM.js";import{Bt as i,Ht as a,Lt as o,Ut as s,Vt as c}from"./api-C51456xV.js";import{t as l}from"./createLucideIcon-C_GFKVuW.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-DRDejPLk.js";import{t as h}from"./skeleton-5Mg6vZHN.js";var g=class extends s{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:a()})}getOptimisticResult(e){return e.behavior=a(),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:a,isRefetching:o,isError:s,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=s&&u===`forward`,f=a&&u===`forward`,p=s&&u===`backward`,m=a&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,n.data),hasPreviousPage:c(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:o&&!f&&!m}}};function _(e,t){return o(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=r();function x({scope:e,searchText:n,searchPlaceholder:r,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:n,onChange:e=>a(e.target.value),placeholder:r,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:t(`marketplaceSortRelevance`)}),(0,b.jsx)(p,{value:`updated`,children:t(`marketplaceSortUpdated`)})]})]})]})})}function S({count:e}){return(0,b.jsx)(b.Fragment,{children:Array.from({length:e},(e,t)=>(0,b.jsx)(`article`,{className:`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:n,sentinelRef:r}){return!e&&!n?null:(0,b.jsxs)(`div`,{className:`py-4`,children:[e&&(0,b.jsx)(`div`,{ref:r,className:`h-1 w-full`,"aria-hidden":`true`}),n&&(0,b.jsx)(`div`,{"data-testid":`marketplace-loading-more`,className:`pt-3 text-center text-xs text-gray-500`,children:t(`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(n(),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 +1 @@
|
|
|
1
|
-
import{_ as e,m as t}from"./i18n-
|
|
1
|
+
import{_ as e,m as t}from"./i18n-BnNAQpVM.js";import{bt as n}from"./api-C51456xV.js";function r(e){return typeof e!=`number`||!Number.isFinite(e)?`desktop`:e<=767?`mobile`:`desktop`}function i(){let e=typeof window>`u`?null:window.innerWidth??null;return{mode:r(e),width:e}}var a=n(()=>i()),o=new class{constructor(){this.consumerCount=0,this.started=!1,this.attach=()=>(this.consumerCount+=1,this.consumerCount===1&&this.start(),()=>{this.consumerCount=Math.max(0,this.consumerCount-1),this.consumerCount===0&&this.stop()}),this.start=()=>{this.started||typeof window>`u`||(this.started=!0,window.addEventListener(`resize`,this.handleViewportChange),window.addEventListener(`orientationchange`,this.handleViewportChange),this.syncFromWindow())},this.stop=()=>{!this.started||typeof window>`u`||(window.removeEventListener(`resize`,this.handleViewportChange),window.removeEventListener(`orientationchange`,this.handleViewportChange),this.started=!1)},this.getSnapshot=()=>a.getState(),this.resetForTests=()=>{this.consumerCount=0,this.stop(),a.setState(i())},this.handleViewportChange=()=>{this.syncFromWindow()},this.syncFromWindow=()=>{if(typeof window>`u`)return;let e=window.innerWidth??null;a.setState({width:e,mode:r(e)})}}},s=e(t(),1);function c(){(0,s.useEffect)(()=>o.attach(),[]);let e=a(e=>e.mode);return{mode:e,isMobile:e===`mobile`,isDesktop:e===`desktop`}}export{o as n,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-C_GFKVuW.js";var t=e(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
|
package/ui-dist/index.html
CHANGED
|
@@ -78,45 +78,45 @@
|
|
|
78
78
|
})();
|
|
79
79
|
</script>
|
|
80
80
|
<title>NextClaw</title>
|
|
81
|
-
<script type="module" crossorigin src="/assets/index-
|
|
82
|
-
<link rel="modulepreload" crossorigin href="/assets/i18n-
|
|
83
|
-
<link rel="modulepreload" crossorigin href="/assets/api-
|
|
84
|
-
<link rel="modulepreload" crossorigin href="/assets/es2015-
|
|
85
|
-
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-
|
|
86
|
-
<link rel="modulepreload" crossorigin href="/assets/select-
|
|
87
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
88
|
-
<link rel="modulepreload" crossorigin href="/assets/x-
|
|
89
|
-
<link rel="modulepreload" crossorigin href="/assets/dialog-
|
|
90
|
-
<link rel="modulepreload" crossorigin href="/assets/popover-
|
|
91
|
-
<link rel="modulepreload" crossorigin href="/assets/tooltip-
|
|
92
|
-
<link rel="modulepreload" crossorigin href="/assets/chunk-JZWAC4HX-
|
|
93
|
-
<link rel="modulepreload" crossorigin href="/assets/use-config-
|
|
94
|
-
<link rel="modulepreload" crossorigin href="/assets/theme-provider-
|
|
95
|
-
<link rel="modulepreload" crossorigin href="/assets/search-
|
|
96
|
-
<link rel="modulepreload" crossorigin href="/assets/book-open-
|
|
97
|
-
<link rel="modulepreload" crossorigin href="/assets/external-link-
|
|
98
|
-
<link rel="modulepreload" crossorigin href="/assets/folder-
|
|
99
|
-
<link rel="modulepreload" crossorigin href="/assets/logos-
|
|
100
|
-
<link rel="modulepreload" crossorigin href="/assets/loader-circle-
|
|
101
|
-
<link rel="modulepreload" crossorigin href="/assets/plus-
|
|
102
|
-
<link rel="modulepreload" crossorigin href="/assets/refresh-ccw-
|
|
103
|
-
<link rel="modulepreload" crossorigin href="/assets/settings-
|
|
104
|
-
<link rel="modulepreload" crossorigin href="/assets/sparkles-
|
|
105
|
-
<link rel="modulepreload" crossorigin href="/assets/trash-2-
|
|
106
|
-
<link rel="modulepreload" crossorigin href="/assets/doc-browser-context-
|
|
107
|
-
<link rel="modulepreload" crossorigin href="/assets/doc-browser-
|
|
108
|
-
<link rel="modulepreload" crossorigin href="/assets/doc-browser-
|
|
109
|
-
<link rel="modulepreload" crossorigin href="/assets/use-viewport-layout-
|
|
110
|
-
<link rel="modulepreload" crossorigin href="/assets/logo-badge-
|
|
111
|
-
<link rel="modulepreload" crossorigin href="/assets/skeleton-
|
|
112
|
-
<link rel="modulepreload" crossorigin href="/assets/chat-
|
|
113
|
-
<link rel="modulepreload" crossorigin href="/assets/key-round-
|
|
114
|
-
<link rel="modulepreload" crossorigin href="/assets/message-square-
|
|
115
|
-
<link rel="modulepreload" crossorigin href="/assets/app-navigation.config-
|
|
116
|
-
<link rel="modulepreload" crossorigin href="/assets/notice-card-
|
|
117
|
-
<link rel="modulepreload" crossorigin href="/assets/status-dot-
|
|
118
|
-
<link rel="modulepreload" crossorigin href="/assets/app-manager-provider-
|
|
119
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
81
|
+
<script type="module" crossorigin src="/assets/index-CAYF44Dz.js"></script>
|
|
82
|
+
<link rel="modulepreload" crossorigin href="/assets/i18n-BnNAQpVM.js">
|
|
83
|
+
<link rel="modulepreload" crossorigin href="/assets/api-C51456xV.js">
|
|
84
|
+
<link rel="modulepreload" crossorigin href="/assets/es2015-BlNhrQUG.js">
|
|
85
|
+
<link rel="modulepreload" crossorigin href="/assets/createLucideIcon-C_GFKVuW.js">
|
|
86
|
+
<link rel="modulepreload" crossorigin href="/assets/select-DRDejPLk.js">
|
|
87
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-DtBFqZ6_.js">
|
|
88
|
+
<link rel="modulepreload" crossorigin href="/assets/x-BjMO7v8q.js">
|
|
89
|
+
<link rel="modulepreload" crossorigin href="/assets/dialog-BHcaU6NE.js">
|
|
90
|
+
<link rel="modulepreload" crossorigin href="/assets/popover-B8msg2FQ.js">
|
|
91
|
+
<link rel="modulepreload" crossorigin href="/assets/tooltip-C6VPreZ7.js">
|
|
92
|
+
<link rel="modulepreload" crossorigin href="/assets/chunk-JZWAC4HX-ptDyT_1C.js">
|
|
93
|
+
<link rel="modulepreload" crossorigin href="/assets/use-config-DFja1sda.js">
|
|
94
|
+
<link rel="modulepreload" crossorigin href="/assets/theme-provider-dHqcWU-j.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="/assets/search-DZSNKEGp.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="/assets/book-open-B4mOKdz8.js">
|
|
97
|
+
<link rel="modulepreload" crossorigin href="/assets/external-link-DP2IJ7AM.js">
|
|
98
|
+
<link rel="modulepreload" crossorigin href="/assets/folder-BPwc278w.js">
|
|
99
|
+
<link rel="modulepreload" crossorigin href="/assets/logos-BcELLmYh.js">
|
|
100
|
+
<link rel="modulepreload" crossorigin href="/assets/loader-circle-C6gg2m2a.js">
|
|
101
|
+
<link rel="modulepreload" crossorigin href="/assets/plus-BptLViq1.js">
|
|
102
|
+
<link rel="modulepreload" crossorigin href="/assets/refresh-ccw-CeG203yU.js">
|
|
103
|
+
<link rel="modulepreload" crossorigin href="/assets/settings-DjvNMJde.js">
|
|
104
|
+
<link rel="modulepreload" crossorigin href="/assets/sparkles-CyDTgTM4.js">
|
|
105
|
+
<link rel="modulepreload" crossorigin href="/assets/trash-2-C1cdqL6V.js">
|
|
106
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-context-Dib9sS83.js">
|
|
107
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-CoKIUCJj.js">
|
|
108
|
+
<link rel="modulepreload" crossorigin href="/assets/doc-browser-CwgI7ipB.js">
|
|
109
|
+
<link rel="modulepreload" crossorigin href="/assets/use-viewport-layout-D-pjxsyz.js">
|
|
110
|
+
<link rel="modulepreload" crossorigin href="/assets/logo-badge-uB4SwANR.js">
|
|
111
|
+
<link rel="modulepreload" crossorigin href="/assets/skeleton-5Mg6vZHN.js">
|
|
112
|
+
<link rel="modulepreload" crossorigin href="/assets/chat-BxA-mw53.js">
|
|
113
|
+
<link rel="modulepreload" crossorigin href="/assets/key-round-BQXmPSxD.js">
|
|
114
|
+
<link rel="modulepreload" crossorigin href="/assets/message-square-CLVODA23.js">
|
|
115
|
+
<link rel="modulepreload" crossorigin href="/assets/app-navigation.config-Dve1W20Y.js">
|
|
116
|
+
<link rel="modulepreload" crossorigin href="/assets/notice-card-C9PFAR67.js">
|
|
117
|
+
<link rel="modulepreload" crossorigin href="/assets/status-dot-aQU9Mia4.js">
|
|
118
|
+
<link rel="modulepreload" crossorigin href="/assets/app-manager-provider-D_cKqqRG.js">
|
|
119
|
+
<link rel="stylesheet" crossorigin href="/assets/index-mRmSAB-e.css">
|
|
120
120
|
</head>
|
|
121
121
|
|
|
122
122
|
<body>
|