@uniqbit/mate-core 1.0.0-canary.6 → 1.0.0-canary.7
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/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/src/cli/commands/doctor.ts +51 -0
- package/src/cli/commands/friction.ts +558 -0
- package/src/cli/commands/studio/connection.ts +53 -0
- package/src/cli/commands/studio/routes.ts +3 -0
- package/src/cli/commands/studio/selection.ts +10 -1
- package/src/cli/commands/studio/server.ts +31 -0
- package/src/cli/commands/studio/services.ts +25 -0
- package/src/cli/commands/triage.ts +151 -0
- package/src/cli/commands/vscode/release-vsix.json +2 -2
- package/src/cli/main.ts +35 -13
- package/src/cli/plugin-commands.ts +6 -1
- package/src/cli/usage.ts +10 -0
- package/src/create-mate.ts +11 -5
- package/src/distribution.ts +2 -0
- package/src/hooks/validate-artifact-path.ts +64 -14
- package/src/lib/friction/describe.ts +42 -0
- package/src/lib/friction/fields.ts +60 -0
- package/src/lib/friction/mark.ts +156 -0
- package/src/lib/friction/view/model.ts +67 -0
- package/src/lib/friction/view/read.ts +136 -0
- package/src/lib/friction/view/select.ts +54 -0
- package/src/lib/orchestrator/adapters/claude.ts +5 -4
- package/src/lib/orchestrator/adapters/opencode.ts +2 -0
- package/src/lib/orchestrator/root-context.ts +23 -6
- package/src/lib/package-paths.ts +23 -15
- package/src/lib/session-attribution.ts +3 -7
- package/src/lib/triage/context.ts +186 -0
- package/src/lib/triage/launch.ts +52 -0
- package/src/lib/triage/prepare.ts +97 -0
- package/src/lib/triage/session.ts +126 -0
- package/src/opencode/companion-hooks.ts +53 -5
- package/src/opencode/projected-guidance.ts +2 -0
- package/src/playbooks/companion-guidance.ts +2 -2
- package/src/plugin-api.ts +5 -0
- package/src/runtime/command-friction.ts +97 -0
- package/src/runtime/companion-guidance.ts +32 -15
- package/src/runtime/friction-fingerprint.ts +35 -0
- package/src/runtime/friction-log.ts +352 -0
- package/src/runtime/friction-recorder.ts +199 -0
- package/src/runtime/friction-retention.ts +1 -0
- package/src/runtime/friction-state.ts +110 -0
- package/src/runtime/friction-switch.ts +26 -0
- package/src/runtime/friction-vocabulary.ts +42 -0
- package/src/runtime/projected-guidance.ts +2 -1
- package/src/runtime/secret-values.ts +16 -0
- package/src/runtime/session-id.ts +24 -0
- package/src/runtime/session-prepare-runner.ts +3 -0
- package/src/runtime/workflow/next-handoff-process.ts +2 -1
- package/src/studio.ts +41 -0
- package/src/templates/triage/PLAYBOOK.md +112 -0
- package/src/tools/setup/capabilities/rtk.ts +19 -8
- package/src/tools/setup/plugin.ts +5 -0
- package/src/tools/setup/service.ts +4 -0
- package/src/tools/setup.ts +16 -2
- package/studio-dist/client/assets/app-aIwDxf48.css +2 -0
- package/studio-dist/client/assets/button-CX0sWAJl.js +1 -0
- package/studio-dist/client/assets/combobox-BmA8RjOc.js +1 -0
- package/studio-dist/client/assets/{companion-view-BVaZNtiI.js → companion-view-DINdPF-b.js} +1 -1
- package/studio-dist/client/assets/fields-BobQ7zRF.js +1 -0
- package/studio-dist/client/assets/friction-YdYd3zaz.js +1 -0
- package/studio-dist/client/assets/getting-started-CY7NEtTw.js +1 -0
- package/studio-dist/client/assets/getting-started-djaQeWlu.js +1 -0
- package/studio-dist/client/assets/getting-started._topic-DVB8e5R9.js +1 -0
- package/studio-dist/client/assets/getting-started.index-DQvLHEr1.js +1 -0
- package/studio-dist/client/assets/graph-DbNnR884.js +2 -0
- package/studio-dist/client/assets/{graph-canvas-DDuzsNSx.js → graph-canvas-DIcAqwtK.js} +1 -1
- package/studio-dist/client/assets/guides-D6T6W_jV.js +1 -0
- package/studio-dist/client/assets/index-CysBCSxM.js +40 -0
- package/studio-dist/client/assets/markdown-view-jMiaBTSO.js +1 -0
- package/studio-dist/client/assets/{panel-B8F8sOKQ.js → panel-Csr49lBo.js} +1 -1
- package/studio-dist/client/assets/plugins._service._view-CEA_CcPe.js +1 -0
- package/studio-dist/client/assets/prepaint-CKsXyJOR.js +27 -0
- package/studio-dist/client/assets/{queries-axYk2u9L.js → queries-Dfp5deWj.js} +1 -1
- package/studio-dist/client/assets/react-BYUSgtBs.js +1 -0
- package/studio-dist/client/assets/reports-CLdgxxkg.js +1 -0
- package/studio-dist/client/assets/routes-DGilWbDE.js +1 -0
- package/studio-dist/client/assets/search-CXosfvYh.js +1 -0
- package/studio-dist/client/assets/select-DdebbX7K.js +1 -0
- package/studio-dist/client/assets/skills-C3zNkU8g.js +1 -0
- package/studio-dist/client/assets/{specs-DU1kqcp5.js → specs-Dl8HfGlU.js} +1 -1
- package/studio-dist/client/assets/specs-view-B_n0Pekv.js +1 -0
- package/studio-dist/client/assets/{steps-DhIFuAZy.js → steps-CKUno4lh.js} +1 -1
- package/studio-dist/client/assets/store-DyXbi6o9.js +1 -0
- package/studio-dist/client/assets/{studio-BR9j15J0.js → studio-0ueISxwP.js} +8 -8
- package/studio-dist/client/assets/{studio-queries-CFP_yTpr.js → studio-queries-BflKt9va.js} +2 -2
- package/studio-dist/client/assets/{usage-CHmwtkoM.js → usage-Blcl8kA_.js} +16 -16
- package/studio-dist/client/assets/useAnchoredPopupScrollLock-BBXJpX5L.js +1 -0
- package/studio-dist/client/assets/{useBaseQuery-BlC-AZ35.js → useBaseQuery-C2cjmeH2.js} +1 -1
- package/studio-dist/client/assets/useMutation-DI6LbvVa.js +1 -0
- package/studio-dist/client/assets/vault-Cb9DmM1i.js +1 -0
- package/studio-dist/client/assets/warnings-B-rvoW8q.js +1 -0
- package/studio-dist/client/assets/workflow-DN5T19jd.js +1 -0
- package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-DAbZ6fzY.js → __23tanstack-start-server-fn-resolver-JoHQ5ihx.js} +30 -14
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +66 -50
- package/studio-dist/server/assets/{button-BfoNadNR.js → button-B7e1fRyW.js} +228 -3
- package/studio-dist/server/assets/combobox--S_OmUfh.js +483 -0
- package/studio-dist/server/assets/{companion-view-DHUjPpA0.js → companion-view-D-vGM55e.js} +2 -2
- package/studio-dist/server/assets/{companions-kBrJZAd6.js → companions-Dr6IpNAb.js} +1 -1
- package/studio-dist/server/assets/{fields-BD_c65T1.js → fields-B4qM2ZwC.js} +1 -1
- package/studio-dist/server/assets/friction-CWOTjpCV.js +62 -0
- package/studio-dist/server/assets/friction-sLxaWY-H.js +903 -0
- package/studio-dist/server/assets/{getting-started-7P0oyWaM.js → getting-started-Cq5Pcnsr.js} +2 -2
- package/studio-dist/server/assets/{getting-started._topic-B1mV0kGz.js → getting-started._topic-CmWdl3u3.js} +2 -2
- package/studio-dist/server/assets/{getting-started.index-CeGtvUsm.js → getting-started.index-AB8xpTFY.js} +2 -2
- package/studio-dist/server/assets/{graph-BWtmJOH2.js → graph-B11ITte0.js} +1 -1
- package/studio-dist/server/assets/{graph-DSDVEELZ.js → graph-C_Hn-Wf_.js} +7 -8
- package/studio-dist/server/assets/{graph-canvas-CID9Nksc.js → graph-canvas-BthrSmPS.js} +2 -2
- package/studio-dist/server/assets/{guides-Bm3RbUB-.js → guides-B8HdeK_C.js} +1 -1
- package/studio-dist/server/assets/{guides-BLJenHwQ.js → guides-BVQ4pt5B.js} +1 -1
- package/studio-dist/server/assets/{guides.server-rHHqRuzV.js → guides.server-DqFQAStf.js} +1 -1
- package/studio-dist/server/assets/{markdown-view-D3v9x-cM.js → markdown-view-rwiiVcPC.js} +1 -1
- package/studio-dist/server/assets/{panel-yqOl5GMU.js → panel-CUxRIpYL.js} +3 -3
- package/studio-dist/server/assets/{plugins._service._view-DwqJX7s9.js → plugins._service._view-BSvGnlhU.js} +6 -4
- package/studio-dist/server/assets/prepaint-B28ClcPN.js +45 -0
- package/studio-dist/server/assets/{queries-DYmGrhNO.js → queries-S_Pl90IG.js} +1 -1
- package/studio-dist/server/assets/react-CiBZPDs8.js +45 -0
- package/studio-dist/server/assets/{reports-C4Y_Jd-x.js → reports-B9k98oE6.js} +1 -1
- package/studio-dist/server/assets/{reports-7yaPz7aP.js → reports-CJpAItPk.js} +6 -7
- package/studio-dist/server/assets/{router-Dnoq5auE.js → router-DF0etoNa.js} +627 -1563
- package/studio-dist/server/assets/{routes-Cok4p3mK.js → routes-6ylCLkyg.js} +7 -8
- package/studio-dist/server/assets/{search-DUK7Jl6f.js → search-b-yQesv3.js} +25 -2
- package/studio-dist/server/assets/{combobox-oxUI6r4V.js → select-CjuKScan.js} +34 -514
- package/studio-dist/server/assets/{shell-DNVXedgE.js → shell-DLkP7wG9.js} +2 -2
- package/studio-dist/server/assets/{skills-pKmuAs0F.js → skills-DGg0mWDM.js} +1 -1
- package/studio-dist/server/assets/{skills-D8qdXSku.js → skills-zeU80A9S.js} +7 -8
- package/studio-dist/server/assets/{specs-DeHYUNFp.js → specs-DDBNT_v1.js} +4 -4
- package/studio-dist/server/assets/{specs-view-BGn-5Ik_.js → specs-view-exvmWdg0.js} +9 -9
- package/studio-dist/server/assets/{steps-CV7Yk7L7.js → steps-D1tYAyWZ.js} +1 -1
- package/studio-dist/server/assets/store-kS7zk0Hr.js +93 -0
- package/studio-dist/server/assets/{studio-CB94np48.js → studio-qRvQjRpz.js} +47 -2
- package/studio-dist/server/assets/{studio-queries-BqZGBE70.js → studio-queries-qOXOYoPt.js} +66 -8
- package/studio-dist/server/assets/{usage-M6Gi6Km7.js → usage-C2um7YiV.js} +12 -43
- package/studio-dist/server/assets/{usage-j5jR9gX9.js → usage-Cwle9-xY.js} +1 -1
- package/studio-dist/server/assets/useAnchoredPopupScrollLock-kQBB3y_b.js +756 -0
- package/studio-dist/server/assets/{useBaseQuery-Tv_QJt9r.js → useBaseQuery--iH3rd-T.js} +1 -1
- package/studio-dist/server/assets/useMutation-C-WO6hCM.js +690 -0
- package/studio-dist/server/assets/{vault-PqVmssmW.js → vault-B8vgVIH9.js} +6 -6
- package/studio-dist/server/assets/{vault-lBlvSyD4.js → vault-CEBBRLMb.js} +1 -1
- package/studio-dist/server/assets/{views-CsFp1i1G.js → views-UgO0Qz_g.js} +2 -2
- package/studio-dist/server/assets/{warnings-BDs34j_m.js → warnings-BxK4VfV5.js} +1 -2
- package/studio-dist/server/assets/{workflow-T0eEldsa.js → workflow-BrTK632u.js} +8 -9
- package/studio-dist/server/server.js +2 -2
- package/studio-dist/client/assets/app-BFVyWHGo.css +0 -2
- package/studio-dist/client/assets/button-D6LrRkOG.js +0 -1
- package/studio-dist/client/assets/combobox-Dk2MMZWE.js +0 -1
- package/studio-dist/client/assets/fields-D_FYhxQr.js +0 -1
- package/studio-dist/client/assets/getting-started-ByWRg7hC.js +0 -1
- package/studio-dist/client/assets/getting-started-DZSjYC-b.js +0 -1
- package/studio-dist/client/assets/getting-started._topic-C6OyQ4G6.js +0 -1
- package/studio-dist/client/assets/getting-started.index-BkmPHdEm.js +0 -1
- package/studio-dist/client/assets/graph-7jm2XzyL.js +0 -2
- package/studio-dist/client/assets/guides-D9VTjWXP.js +0 -1
- package/studio-dist/client/assets/index-BBmFpG4y.js +0 -40
- package/studio-dist/client/assets/markdown-view-RL5YvfZg.js +0 -1
- package/studio-dist/client/assets/plugins._service._view-CynxTbMx.js +0 -1
- package/studio-dist/client/assets/react-r45OnJCw.js +0 -27
- package/studio-dist/client/assets/reports-BCAyXh6p.js +0 -1
- package/studio-dist/client/assets/routes-BFPqq89E.js +0 -1
- package/studio-dist/client/assets/skills-DTks_uBx.js +0 -1
- package/studio-dist/client/assets/specs-view-omrd_5P3.js +0 -1
- package/studio-dist/client/assets/store-DJ5cncKA.js +0 -1
- package/studio-dist/client/assets/vault-DRg8MScm.js +0 -1
- package/studio-dist/client/assets/warnings-UHFy6HAp.js +0 -1
- package/studio-dist/client/assets/workflow-Bv9vSfVV.js +0 -1
- package/studio-dist/server/assets/react-BO0uMhpm.js +0 -89
- package/studio-dist/server/assets/store-CWDGIp6x.js +0 -280
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{B as r,Bt as i,Dn as a,E as o,Fn as s,G as c,Hn as l,Ht as u,J as d,Jn as f,K as ee,Kn as p,Kt as te,P as ne,Rt as m,Sr as re,Tr as h,U as g,Ut as _,Vt as v,W as ie,Y as ae,Yn as y,_n as b,_r as x,at as oe,br as se,ct as S,dn as C,er as ce,fn as le,ht as ue,ir as w,it as T,j as de,lr as E,lt as fe,mn as D,mr as O,ot as pe,pn as k,q as A,qn as me,qt as he,sr as j,ur as ge,ut as _e,vr as M,xr as N,yn as P,yr as F,z as ve,zt as ye}from"./button-D6LrRkOG.js";var I=e(t(),1),L=0;function be(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(L);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),M;let o=requestAnimationFrame(a);return L=o,()=>{L===o&&(cancelAnimationFrame(o),L=0)}}var R=`data-base-ui-inert`,z=new WeakMap,B=new WeakSet,V=new WeakMap,H=0;function xe(e){return e?ge(e)?e.host:xe(e.parentNode):null}var Se=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=xe(t);return e.contains(n)?n:null}).filter(e=>e!=null),U=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Ce=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{ce(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function W(e,t,n,{mark:r=!0}){let i=Se(t,e),a=r?Ce(t,U(i),new Set(i)):[],o=[],s=[];if(n){let e=Se(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Ce(t,U(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(z.get(e)||0)+1;z.set(e,r),o.push(e),r===1&&n&&B.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(V.get(e)||0)+1;V.set(e,t),s.push(e),t===1&&e.setAttribute(R,``)}),H+=1,()=>{o.forEach(e=>{let t=(z.get(e)||0)-1;z.set(e,t),t||(B.has(e)||e.removeAttribute(`aria-hidden`),B.delete(e))}),r&&s.forEach(e=>{let t=(V.get(e)||0)-1;V.set(e,t),t||e.removeAttribute(R)}),--H,H||(z=new WeakMap,B=new WeakSet,V=new WeakMap)}}function we(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=p(e[0]).body;return W(e,i,n,{mark:r})}var G=n();function Te(e,t){let n=w(D(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(m(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var K=20,q=[];function Ee(){q=q.filter(e=>e.deref()?.isConnected)}function De(e){Ee(),e&&ce(e)!==`body`&&(q.push(new WeakRef(e)),q.length>K&&(q=q.slice(-20)))}function Oe(){return Ee(),q[q.length-1]?.deref()}function ke(e){return e?fe(e)?e:_e(e)[0]||e:null}function Ae(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=T(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return fe(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function J(e){let{context:t,children:n,disabled:s=!1,initialFocus:d=!0,returnFocus:re=!0,explicitReturnFocus:h,restoreFocus:g=!1,modal:x=!0,closeOnFocusOut:w=!0,openInteractionType:T=``,nextFocusableElement:E,previousFocusableElement:O,beforeContentFocusGuardRef:me,externalTree:ge,getInsideElements:M}=e,N=t.useState(`open`),P=t.useState(`domReferenceElement`),F=t.useState(`floatingElement`),{events:L,dataRef:R}=t.context,z=y(()=>R.current.floatingContext?.nodeId),B=d===!1,V=te(P)&&B,H=c(d),xe=c(re),Se=c(h),U=c(T),Ce=c(N),W=de(ge),K=ne(),q=I.useRef(!1),J=I.useRef(!1),je=I.useRef(!1),Me=I.useRef(null),Ne=I.useRef(``),Pe=I.useRef(``),Fe=I.useRef(null),Ie=I.useRef(null),Le=se(Fe,me,K?.beforeInsideRef),Re=se(Ie,K?.afterInsideRef),ze=ae(),Y=ae(),Be=ie(),Ve=K!=null,X=_(F),Z=y((e=X)=>e?_e(e):[]),Q=y(()=>M?.().filter(e=>e!=null)??[]);I.useEffect(()=>{if(s||!x)return;function e(e){e.key===`Tab`&&k(X,C(p(X)))&&Z().length===0&&!V&&i(e)}let t=p(X);return A(t,`keydown`,e)},[s,X,x,V,Z]),I.useEffect(()=>{if(s||!N)return;let e=p(X);function t(){je.current=!1}function n(e){let t=D(e),n=Q(),r=k(F,t)||k(P,t)||k(K?.portalNode,t)||n.some(e=>e===t||k(e,t));je.current=!r,Pe.current=e.pointerType||`keyboard`,le(t,`[data-base-ui-click-trigger]`)&&(J.current=!0,Y.start(0,()=>{J.current=!1}))}function r(){Pe.current=`keyboard`}return ee(A(e,`pointerdown`,n,!0),A(e,`pointerup`,t,!0),A(e,`pointercancel`,t,!0),A(e,`keydown`,r,!0),t)},[s,F,P,X,N,K,Y,Q]),I.useEffect(()=>{if(s||!w)return;let e=p(X);function n(){J.current=!0,Y.start(0,()=>{J.current=!1})}function r(e){let t=D(e);fe(t)&&(Me.current=t)}function i(n){let r=n.relatedTarget,i=n.currentTarget,s=D(n);x&&r==null&&s!=null&&k(F,s)&&De(s),queueMicrotask(()=>{let c=z(),d=t.context.triggerElements,f=Q(),ee=r?.hasAttribute(ve(`focus-guard`))&&[Fe.current,Ie.current,K?.beforeInsideRef.current,K?.afterInsideRef.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,o(O),o(E)].includes(r),p=!(k(P,r)||k(F,r)||k(r,F)||k(K?.portalNode,r)||f.some(e=>e===r||k(e,r))||d.hasMatchingElement(e=>k(e,r))||ee||W&&(u(W.nodesRef.current,c).find(e=>k(e.context?.elements.floating,r)||k(e.context?.elements.domReference,r))||v(W.nodesRef.current,c).find(e=>[e.context?.elements.floating,_(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===P&&X&&Ae(X),g&&i!==P&&!ue(s)&&C(e)===e.body){if(j(X)&&(X.focus(),g===`popup`)){Be.request(()=>{X.focus()});return}let e=Z(),t=Me.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||X;j(n)&&n.focus()}R.current.insideReactTree?R.current.insideReactTree=!1:(V||!x)&&r&&p&&!J.current&&(V||r!==Oe())&&(q.current=!0,t.setOpen(!1,l(a,n)))})}function c(){je.current||(R.current.insideReactTree=!0,ze.start(0,()=>{R.current.insideReactTree=!1}))}let d=j(P)?P:null;if(F||d)return ee(d&&A(d,`focusout`,i),d&&A(d,`pointerdown`,n),F&&A(F,`focusin`,r),F&&A(F,`focusout`,i),F&&K&&A(F,`focusout`,c,!0))},[s,P,F,X,x,W,K,t,w,g,Z,V,z,R,ze,Y,Be,E,O,Q]),I.useEffect(()=>{if(s||!F||!N)return;let e=Array.from(K?.portalNode?.querySelectorAll(`[${ve(`portal`)}]`)||[]),t=(W?v(W.nodesRef.current,z()):[]).find(e=>te(e.context?.elements.domReference||null))?.context?.elements.domReference,n=we([F,...e,Fe.current,Ie.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,...Q(),t,o(O),o(E),V?P:null].filter(e=>e!=null),{ariaHidden:x||V,mark:!1}),r=we([F,...e].filter(e=>e!=null));return()=>{r(),n()}},[N,s,P,F,x,K,V,W,z,E,O,Q]),f(()=>{if(!N||s||!j(X))return;Ne.current=``,Pe.current=``;let e=p(X),t=C(e);queueMicrotask(()=>{let n=H.current,r=typeof n==`function`?n(U.current||``):n;if(r===void 0||r===!1||k(X,t))return;let i=null,a=()=>(i??=Z(X),i[0]||X),s;s=r===!0||r===null?a():o(r),s||=a();let c=k(X,C(e)),l=R.current.openEvent,u=l?.type===`mousedown`&&m(l);be(s,{sync:u,preventScroll:s===X,shouldFocus(){if(!Ce.current)return!1;if(c)return!0;let t=C(e);return!(t!==s&&k(X,t))}})})},[s,N,X,Z,H,U,Ce,R]);let $=I.useRef(null);f(()=>{if(s||!X){$.current=null;return}$.current&&=($.current.cancelled=!0,null);let e=p(X),t=C(e),n=U.current==null;De(t);function r(e){if(e.open||(Ne.current=Te(e.nativeEvent,Pe.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(ve(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(q.current=!0),e.reason===`outside-press`){if(e.nested)q.current=!1;else if(m(e.nativeEvent)||ye(e.nativeEvent))q.current=!1;else{let e=!1;p(X).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?q.current=!1:q.current=!0}}}L.on(`openchange`,r);function i(e){let r=xe.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=P?.isConnected?P:null,s=t?.isConnected&&ce(t)!==`body`?t:null,c=n?s||a:a||s;return c||=Oe()||null,typeof i==`boolean`?c:o(i)||c||null}return()=>{L.off(`openchange`,r);let t=C(e),n=Q(),a=k(F,t)||n.some(e=>e===t||k(e,t))||W&&u(W.nodesRef.current,z(),!1).some(e=>k(e.context?.elements.floating,t)),o=xe.current,s=Ne.current,c=i(s),l={cancelled:!1};$.current=l,queueMicrotask(()=>{$.current===l&&($.current=null);let n=ke(c),r=Se.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!q.current&&j(n)&&(r||n===t||t===e.body||a)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}q.current=!1})}},[s,F,X,xe,Se,U,L,W,P,z,Q]),f(()=>{if(!b||N||!F)return;let e=C(p(F));j(e)&&he(e)&&k(F,e)&&e.blur()},[N,F]),f(()=>{if(!s&&K)return K.setFocusManagerState({modal:x,closeOnFocusOut:w,open:N,onOpenChange:t.setOpen,domReference:P}),()=>{K.setFocusManagerState(null)}},[s,K,x,N,t,w,P]),f(()=>{if(!s&&X)return Ae(X),()=>{queueMicrotask(Ee)}},[s,X]);let He=!s&&(!x||!V)&&(Ve||x);return(0,G.jsxs)(I.Fragment,{children:[He&&(0,G.jsx)(r,{"data-type":`inside`,ref:Le,onFocus:e=>{if(x){let e=Z();be(e[e.length-1])}else K?.portalNode&&(q.current=!1,S(e,K.portalNode)?oe(P)?.focus():o(O??K.beforeOutsideRef)?.focus())}}),n,He&&(0,G.jsx)(r,{"data-type":`inside`,ref:Re,onFocus:e=>{x?be(Z()[0]):K?.portalNode&&(w&&(q.current=!0),S(e,K.portalNode)?pe(P)?.focus():o(E??K.afterOutsideRef)?.focus())}})]})}function je(e){return F(19)?e:e?`true`:void 0}var Me=`data-valid`,Ne=`data-invalid`,Pe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Fe={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Ie={disabled:!1,...Fe},Le={valid(e){return e===null?null:e?{[Me]:``}:{[Ne]:``}}},Re={invalid:void 0,name:void 0,validityData:{state:Pe,errors:[],error:``,value:``,initialValue:null},setValidityData:M,disabled:void 0,setTouched:M,setDirty:M,setFilled:M,setFocused:M,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Ie,registerFieldControl:M,validation:{getValidationProps:(e,t=x)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:M,getInputControl:()=>null,commit:async()=>{},change:M}},ze=I.createContext(Re);function Y(e=!0){let t=I.useContext(ze);if(t.setValidityData===M&&!e)throw Error(me(28));return t}function Be(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Y(),s=N(()=>Symbol());f(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),f(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Ve=I.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:M,validationMode:`onSubmit`,submitCountRef:{current:0}});function X(){return I.useContext(Ve)}var Z=I.createContext({controlId:void 0,registerControlId:M,resetControlId:M,labelId:void 0,setLabelId:M,messageIds:[],setMessageIds:M,getDescriptionProps:e=>e});function Q(){return I.useContext(Z)}function $(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Q(),o=re(),s=N(()=>Symbol()),c=I.useRef(!1),l=I.useRef(!1),u=y(()=>{c.current&&i!==M&&(c.current=!1,i(s.current,void 0))});return f(()=>{if(!n||i===M){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),f(()=>u,[u]),(n?r:void 0)??t??o}function He(e,t){let n=I.useRef(e),r=y(t);f(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Ue(e,t,n){let{setFocused:r,focusOwnerRef:i}=Y(),a=y(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return f(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var We=I.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Ge={},Ke={},qe=``;function Je(e,t){return E(e)?e:t}function Ye(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Je(t,n)).overflowY)}function Xe(e){if(typeof document>`u`)return!1;let t=p(e);return w(t).innerWidth-t.documentElement.clientWidth>0}function Ze(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=p(e),n=t.documentElement,r=t.body,i=Je(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Qe(e){let t=p(e),n=t.documentElement,r=t.body,i=Je(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function $e(e){let t=p(e),n=t.documentElement,r=t.body,i=w(n),a=0,o=0,s=!1,c=g.create();if(b&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ge={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},qe=n.style.scrollBehavior,Ke={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,ee=t.overflowX===`scroll`||c.overflowX===`scroll`,p=Math.max(0,i.innerWidth-r.clientWidth),te=Math.max(0,i.innerHeight-r.clientHeight),ne=parseFloat(c.marginTop)+parseFloat(c.marginBottom),m=parseFloat(c.marginLeft)+parseFloat(c.marginRight),re=Je(n,r);s=Ze(e),s?(n.style.scrollbarGutter=l,re.style.overflowY=`hidden`,re.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||ee)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:ne||te?`calc(100dvh - ${ne+te}px)`:`100dvh`,width:m||p?`calc(100vw - ${m+p}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Ge),Object.assign(r.style,Ke),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=qe)}function d(){u(),c.request(l)}l();let f=A(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var et=new class{lockCount=0;restore=null;timeoutLock=d.create();timeoutUnlock=d.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=p(e),n=t.documentElement,r=t.body,i=w(n);if(Ye(i,n,r)){let t=new i.MutationObserver(()=>{Ye(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=P||!Xe(e);this.restore=a?Qe(e):$e(e)}};function tt(e=!0,t=null){f(()=>{if(e)return et.acquire(t)},[e,t])}var nt=I.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:c=!1,onValueChange:u,defaultValue:d,autoFocus:ee=!1,style:p,...te}=e,{state:ne,name:m,disabled:re,setTouched:h,setDirty:g,validityData:_,setFilled:v,validationMode:ie,validation:b}=Y(),{clearErrors:x,elementRef:oe,submitCountRef:se}=X(),S=re||c,C=m??a,ce={...ne,disabled:S},{labelId:le}=Q(),ue=$({id:i}),w=o!==void 0,T=o==null?void 0:String(o),de=y(()=>b.inputRef.current?.value);Be(b.inputRef,ue,T,de,!S,a),f(()=>{let e=T??b.inputRef.current?.value;e!==void 0&&v(e!==``)},[T,d,b.inputRef,v]),He(T,()=>{T!==void 0&&(x(C),g(T!==(_.initialValue??``)),b.change(T))});let E=I.useRef(null),fe=Ue(S,E),D=ae();return O(`input`,e,{ref:[t,E],state:ce,props:[{id:ue,disabled:S,name:C,ref:b.inputRef,"aria-labelledby":le,autoFocus:ee,...w?{value:o}:{defaultValue:d},onChange(e){let t=e.currentTarget.value,n=l(s,e.nativeEvent);u?.(t,n),w||(g(t!==(_.initialValue??``)),v(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(x(C),b.change(t)))},onFocus(){fe(!0)},onBlur(e){if(h(!0),fe(!1),ie===`onBlur`){let t=e.currentTarget.value;b.commit(t),w&&queueMicrotask(()=>{let e=b.inputRef.current?.value;e!==void 0&&e!==t&&e!==(_.initialValue??``)&&b.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){h(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===oe.current&&!e.defaultPrevented){let t=e.currentTarget,n=se.current;D.start(0,()=>{se.current===n&&b.commit(t.value)})}else b.commit(t)}}},te,e=>b.getValidationProps(S,e)],stateAttributesMapping:Le})}),rt=I.forwardRef(function(e,t){return(0,G.jsx)(nt,{ref:t,...e})}),it=I.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return O(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function at({className:e,...t}){return(0,G.jsx)(`kbd`,{"data-slot":`kbd`,className:h(`inline-grid h-[18px] min-w-[18px] place-items-center rounded-[4px] border border-b-2 border-rule bg-page px-1 font-mono text-[0.66rem] leading-none font-semibold text-muted select-none`,e),...t})}var ot=`w-full min-w-0 rounded-control border border-rule bg-page px-3 text-sm text-text outline-none transition-colors placeholder:text-muted focus:border-accent disabled:cursor-not-allowed disabled:opacity-60`;function st({className:e,...t}){return(0,G.jsx)(rt,{"data-slot":`input`,className:h(ot,`h-9`,e),...t})}function ct({className:e,orientation:t=`horizontal`,...n}){return(0,G.jsx)(it,{"data-slot":`separator`,orientation:t,className:h(`shrink-0 bg-rule-soft data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,e),...n})}export{je as _,We as a,$ as c,Be as d,Re as f,Le as g,Fe as h,tt as i,Q as l,Y as m,at as n,Ue as o,ze as p,ct as r,He as s,st as t,X as u,J as v,be as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{St as e}from"./index-BBmFpG4y.js";var t=e;export{t as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as e}from"./studio-queries-CFP_yTpr.js";import{t}from"./markdown-view-RL5YvfZg.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n(),i=[{id:`start`,label:`Start here`,path:`/getting-started`},{id:`worktrees`,label:`Worktrees`,path:`/getting-started/worktrees`},{id:`vscode`,label:`VS Code & Cursor`,path:`/getting-started/vscode`}];function a({topic:n,guide:a,search:o}){let s={companion:o.companion,studioMode:o.studioMode};return(0,r.jsxs)(`div`,{className:`guide-reader min-w-0 px-6 max-sm:px-4`,children:[(0,r.jsx)(`nav`,{"aria-label":`Getting Started topics`,className:`mb-6 flex flex-wrap gap-2 border-b border-rule pb-3`,children:i.map(({id:t,label:i,path:a})=>(0,r.jsx)(e,{to:a,search:s,activeOptions:{exact:!0},"aria-current":n===t?`page`:void 0,className:`rounded-control px-3 py-2 text-sm text-muted hover:bg-surface hover:text-text aria-[current=page]:bg-accent-soft aria-[current=page]:font-semibold aria-[current=page]:text-accent`,children:i},t))}),(0,r.jsxs)(`article`,{className:`min-w-0 max-w-[70ch] pb-8`,"aria-label":a?.title??`Guide not found`,children:[a&&n!==`start`?(0,r.jsx)(`h2`,{className:`mb-4 text-lg font-semibold`,children:a.title}):null,a?(0,r.jsx)(t,{nodes:a.nodes,guideSearch:s}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`h2`,{className:`mb-2 text-lg font-semibold`,children:`Guide not found`}),(0,r.jsxs)(`p`,{children:[`This topic is not bundled with Studio.`,` `,(0,r.jsx)(e,{to:`/getting-started`,search:s,className:`text-accent underline`,children:`Return to Start here`}),`.`]})]})]})]})}export{a as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./getting-started-DZSjYC-b.js";import{n as t}from"./index-BBmFpG4y.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n(),i=function(){return(0,r.jsx)(e,{topic:t.useParams().topic,guide:t.useLoaderData(),search:t.useSearch()})};export{i as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./getting-started-DZSjYC-b.js";import{r as t}from"./index-BBmFpG4y.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n(),i=function(){return(0,r.jsx)(e,{topic:`start`,guide:t.useLoaderData(),search:t.useSearch()})};export{i as component};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-canvas-DDuzsNSx.js","assets/studio-BR9j15J0.js","assets/jsx-runtime-MZURdZre.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{Dr as e,Tr as t,r as n}from"./button-D6LrRkOG.js";import"./studio-BR9j15J0.js";import{a as r,i,n as a,t as o}from"./jsx-runtime-MZURdZre.js";import{c as s,o as c}from"./store-DJ5cncKA.js";import{J as l,o as u}from"./studio-queries-CFP_yTpr.js";import{n as d,r as f,t as p}from"./panel-B8F8sOKQ.js";import{a as m,i as h,o as g,s as _,t as v}from"./specs-view-omrd_5P3.js";import{t as y}from"./preload-helper-BLdHbfdN.js";import{u as b}from"./index-BBmFpG4y.js";var x=r(a(),1),S={repository:8,area:5,capability:2.5},C=e=>`e${e}`;function w(e,t){let n=2166136261^t;for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),16777619);return(n>>>0)%1e5/1e5}function T(e,t,n){let r=w(t,1)*Math.PI*2,i=n*(.35+.65*w(t,2));return{x:e.x+Math.cos(r)*i,y:e.y+Math.sin(r)*i}}function E(e){let t=e.nodes.map(()=>({x:0,y:0})),n=e.nodes.flatMap((e,t)=>e.kind===`repository`?[t]:[]),r=Math.sqrt(e.nodes.length)*10;n.forEach((e,i)=>{let a=i/Math.max(1,n.length)*Math.PI*2;t[e]=n.length===1?{x:0,y:0}:{x:Math.cos(a)*r,y:Math.sin(a)*r}});let i=new Map,a=new Map;return O(e,(e,t,n)=>{n===`in`&&a.set(e,t),n===`binds`&&!i.has(e)&&i.set(e,t)}),e.nodes.forEach((e,n)=>{if(e.kind!==`area`)return;let i=a.get(n);t[n]=T(i===void 0?{x:0,y:0}:t[i],e.id,r/2)}),e.nodes.forEach((e,n)=>{if(e.kind!==`capability`)return;let a=i.get(n);t[n]=a===void 0?T({x:0,y:0},e.id,r*1.4):T(t[a],e.id,r/5)}),t}function D(e,t){if(!t)return{positions:E(e),missing:e.nodes.length};let n=e.nodes.map(e=>t.get(e.id)),r=n.filter(e=>!e).length;if(r===0)return{positions:n,missing:r};let i=new Map,a=(e,t)=>{let r=n[t];if(n[e]||!r)return;let a=i.get(e)??{x:0,y:0,count:0};i.set(e,{x:a.x+r.x,y:a.y+r.y,count:a.count+1})};O(e,(e,t)=>{a(e,t),a(t,e)});let o=E(e);return{positions:n.map((t,n)=>{if(t)return t;let r=i.get(n);return r?T({x:r.x/r.count,y:r.y/r.count},e.nodes[n].id,1):o[n]}),missing:r}}function O(e,t){for(let n=0,r=0;n<e.edges.length;n+=4,r++)t(e.edges[n],e.edges[n+1],h[e.edges[n+2]],e.edges[n+3],r)}var k={hidden:new Set,minWeight:1};function A(e,t){return t.hidden.has(e.kind)?!1:e.kind!==`co-change`||e.weight>=t.minWeight}function j(e){return e.kind===`binds`||e.kind===`in`?.3:e.kind===`mentions`?1:Math.min(4,e.weight)}function M(e,t,n=8){let r=t.trim().toLowerCase();if(!r)return[];let i={capability:0,area:1,repository:2};return e.nodes.filter(e=>[e.label,e.area,e.repository].some(e=>e?.toLowerCase().includes(r))).toSorted((e,t)=>Number(t.label.toLowerCase()===r)-Number(e.label.toLowerCase()===r)||i[e.kind]-i[t.kind]||e.label.localeCompare(t.label)).slice(0,n)}function ee(e){let t=new Map(e.nodes.map((e,t)=>[e.id,t])),n=e.nodes.map(()=>[]);return O(e,(e,t,r,i,a)=>{n[e].push({other:t,kind:r,edge:a,outgoing:!0}),n[t].push({other:e,kind:r,edge:a,outgoing:!1})}),{byId:t,links:n}}function te(e,t,n){let r=new Set(e.history[n]);return e.history[t].flatMap(t=>r.has(t)?[e.archives[t]]:[])}function N(e,t){let n=t*4;return!Number.isInteger(t)||t<0||n>=e.edges.length?null:{source:e.edges[n],target:e.edges[n+1],kind:h[e.edges[n+2]],weight:e.edges[n+3]}}function P(e,t,n){if(`edge`in n){let t=N(e,n.edge);return t?`Connection ${e.nodes[t.source].label} and ${e.nodes[t.target].label}`:`Connection`}let r=t.byId.get(n.node);if(r===void 0)return`Graph`;let i=e.nodes[r];return`${F[i.kind]} ${i.label}`}var F={capability:`Spec`,area:`Area`,repository:`Repository`};function I(e){return e?`edge`in e?`edge:${e.edge}`:e.node:null}function L(e){return e.kind===`capability`?`spec`:e.kind===`area`?e.repository??``:`repository`}var R=o(),z={"proposal.md":`proposal`,"design.md":`design`,"tasks.md":`tasks`,"verification.md":`verification`},B=e=>e.label;function V({search:e,path:t,children:n}){return(0,R.jsx)(l,{className:`text-sm`,to:`/vault`,search:{companion:e.companion,studioMode:e.studioMode,path:t},children:n})}function H({archive:e,capabilities:t,search:n}){return(0,R.jsxs)(`li`,{className:`grid gap-1 border-t border-rule-soft py-2 first:border-t-0`,"data-archive":e.anchor,children:[(0,R.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate font-mono text-sm`,children:e.name}),(0,R.jsx)(`time`,{className:`ml-auto font-mono text-2xs text-muted`,dateTime:e.archivedOn,children:e.archivedOn})]}),(0,R.jsxs)(`span`,{className:`flex flex-wrap gap-x-3 gap-y-1`,children:[e.artifacts.map(t=>(0,R.jsx)(V,{search:n,path:g(e.anchor,t),children:z[t]??t},t)),t.map(r=>(0,R.jsx)(V,{search:n,path:g(e.anchor,`specs/${r}/spec.md`),children:t.length>1?`${r} delta`:`delta spec`},r))]})]})}function U({archives:e,capabilities:t,search:n,empty:r}){return e.length===0?(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:r}):(0,R.jsx)(`ul`,{className:`m-0 list-none p-0`,children:e.map(e=>(0,R.jsx)(H,{archive:e,capabilities:t,search:n},e.anchor))})}function W({nodes:e,onSelectNode:n}){return(0,R.jsx)(`ul`,{className:`m-0 grid list-none gap-0.5 p-0`,children:e.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsx)(`button`,{type:`button`,className:t(`w-full truncate rounded-[4px] border-0 bg-transparent px-1.5 py-0.5 text-left text-sm text-text hover:bg-surface`,e.kind===`capability`&&`font-mono`),"data-graph-node":e.id,onClick:()=>n(e.id),children:e.label})},e.id))})}function G(e,t,n,r,i){return t.links[n].flatMap(t=>t.kind===r&&(i===void 0||t.outgoing===i)?[e.nodes[t.other]]:[]).toSorted((e,t)=>e.label.localeCompare(t.label))}function K({wire:e,index:t,search:n,onSelectNode:r,node:i}){let a=B(e.nodes[i]),o=G(e,t,i,`binds`,!0).map(({repository:e,area:t})=>({repository:e,area:t})),s=e.history[i].map(t=>e.archives[t]),c=G(e,t,i,`mentions`,!0),l=G(e,t,i,`mentions`,!1),u=G(e,t,i,`co-change`);return(0,R.jsxs)(v,{spec:{capability:a,scopes:o},companion:n.companion,withStatus:!1,children:[(0,R.jsx)(d,{title:`History`,aside:`${s.length} archived`,children:(0,R.jsx)(U,{archives:s,capabilities:[a],search:n,empty:`No archived change names this spec.`})}),c.length+l.length+u.length>0?(0,R.jsxs)(d,{title:`Connected specs`,children:[c.length>0?(0,R.jsx)(q,{label:`Mentions`,nodes:c,onSelectNode:r}):null,l.length>0?(0,R.jsx)(q,{label:`Mentioned by`,nodes:l,onSelectNode:r}):null,u.length>0?(0,R.jsx)(q,{label:`Changed together`,nodes:u,onSelectNode:r}):null]}):null]})}function q({label:e,nodes:t,onSelectNode:n}){return(0,R.jsxs)(`div`,{className:`grid gap-1`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted`,children:e}),(0,R.jsx)(W,{nodes:t,onSelectNode:n})]})}function J({wire:e,index:t,onSelectNode:n,node:r}){let i=e.nodes[r],a=G(e,t,r,`binds`,!1),o=G(e,t,r,`in`,!0)[0];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{mono:i.area!==`.`,title:i.label,kicker:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`Area`}),o?(0,R.jsx)(`button`,{type:`button`,className:`ml-auto border-0 bg-transparent p-0 font-mono text-xs text-muted hover:text-text`,onClick:()=>n(o.id),children:o.label}):null]})}),(0,R.jsx)(d,{title:`Capabilities`,aside:a.length,children:(0,R.jsx)(W,{nodes:a,onSelectNode:n})})]})}function Y({wire:e,index:t,onSelectNode:n,node:r}){let i=e.nodes[r],a=G(e,t,r,`in`,!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{mono:!0,title:i.label,kicker:(0,R.jsx)(`span`,{children:`Repository`})}),a.map(r=>{let i=G(e,t,t.byId.get(r.id),`binds`,!1);return(0,R.jsxs)(d,{title:r.area===`.`?m:r.label,aside:i.length,children:[(0,R.jsx)(`button`,{type:`button`,className:`justify-self-start border-0 bg-transparent p-0 text-xs text-muted hover:text-text`,onClick:()=>n(r.id),children:`Open Area`}),(0,R.jsx)(W,{nodes:i,onSelectNode:n})]},r.id)})]})}var X={binds:`Binds`,in:`In repository`,mentions:`Mentions`,"co-change":`Changed together`};function Z({wire:e,search:t,onSelectNode:n,edge:r}){let i=N(e,r);if(!i)return(0,R.jsx)(`p`,{className:`m-0 px-5 py-4 text-sm text-muted`,children:`This connection is no longer in the graph.`});let a=e.nodes[i.source],o=e.nodes[i.target],s=i.kind===`co-change`?te(e,i.source,i.target):[];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{title:X[i.kind],kicker:i.kind===`co-change`?(0,R.jsx)(`span`,{children:`${i.weight} shared archived ${i.weight===1?`change`:`changes`}`}):null,children:(0,R.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5 font-mono text-sm`,children:[(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-accent`,onClick:()=>n(a.id),children:a.label}),(0,R.jsx)(`span`,{className:`text-muted`,"aria-hidden":`true`,children:i.kind===`co-change`?`↔`:`→`}),(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-accent`,onClick:()=>n(o.id),children:o.label})]})}),i.kind===`co-change`?(0,R.jsx)(d,{title:`Archived changes`,aside:s.length,children:(0,R.jsx)(U,{archives:s,capabilities:[a.label,o.label],search:t,empty:`No archive names both specs.`})}):null]})}function ne({selection:e,...t}){if(`edge`in e)return(0,R.jsx)(Z,{...t,edge:e.edge});let n=t.index.byId.get(e.node);if(n===void 0)return null;let r=t.wire.nodes[n].kind;return r===`capability`?(0,R.jsx)(K,{...t,node:n}):r===`area`?(0,R.jsx)(J,{...t,node:n}):(0,R.jsx)(Y,{...t,node:n})}var re=(0,x.lazy)(()=>y(()=>import(`./graph-canvas-DDuzsNSx.js`),__vite__mapDeps([0,1,2]))),ie={binds:`Areas`,in:`Repositories`,mentions:`Mentions`,"co-change":`Changed together`};function ae({search:n,node:r,onNodeChange:i}){let a=e({...u(n.companion??``),enabled:!!n.companion});return a.data?(0,R.jsx)(oe,{wire:a.data,search:n,node:r,onNodeChange:i}):a.isError?(0,R.jsx)(`section`,{className:t(s,`pb-10`),children:(0,R.jsxs)(c,{children:[`The spec graph could not be built: `,a.error.message]})}):(0,R.jsx)(`section`,{className:t(s,`pb-10`),children:(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Building the spec graph…`})})}function oe({wire:e,search:n,node:r,onNodeChange:i}){let a=(0,x.useMemo)(()=>ee(e),[e]),[o,l]=(0,x.useState)(k),[u,d]=(0,x.useState)(null),p=u?.wire===e?u.edge:null,[m,h]=(0,x.useState)(null),g=e.nodes.filter(e=>e.kind===`capability`).length,_=r!==void 0&&a.byId.has(r)?r:null,v=p===null?_?{node:_}:null:{edge:p},y=e=>{d(null),i(e??void 0)},b=e=>{y(e),h(t=>({id:e,nonce:(t?.nonce??0)+1}))};if(g===0)return(0,R.jsx)(`section`,{className:t(s,`pb-10`),children:(0,R.jsx)(c,{children:`No specs in this companion.`})});let S=I(v);return(0,R.jsxs)(`section`,{className:t(s,`flex min-h-[480px] flex-1 flex-col gap-2 pb-4`),"aria-label":`Spec graph`,"data-graph-view":!0,children:[(0,R.jsx)(se,{wire:e,filter:o,onFilter:l,onFocus:b}),(0,R.jsx)(Q,{wire:e,onSelectNode:b}),(0,R.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden rounded-card border border-rule`,children:[(0,R.jsx)(x.Suspense,{fallback:(0,R.jsx)(`p`,{className:`m-0 p-4 text-sm text-muted`,children:`Loading the renderer…`}),children:(0,R.jsx)(re,{wire:e,layoutKey:n.companion??``,filter:o,selected:_,focus:m,onSelectNode:y,onSelectEdge:t=>{i(void 0),d({wire:e,edge:t})}})}),(0,R.jsx)(ce,{})]}),(0,R.jsx)(f,{items:S?[S]:[],current:S,onSelect:e=>{e===null&&y(null)},wide:!0,title:v?P(e,a,v):`Graph`,children:v?(0,R.jsx)(ne,{selection:v,wire:e,index:a,search:n,onSelectNode:b}):null})]})}function se({wire:e,filter:t,onFilter:r,onFocus:i}){let[a,o]=(0,x.useState)(``),s=(0,x.useId)(),c=(0,x.useMemo)(()=>M(e,a),[e,a]),l=(0,x.useMemo)(()=>{let t=1;return O(e,(e,n,r,i)=>{r===`co-change`&&(t=Math.max(t,i))}),t},[e]),u=e=>{let n=new Set(t.hidden);n.has(e)?n.delete(e):n.add(e),r({...t,hidden:n})};return(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,role:`toolbar`,"aria-label":`Graph controls`,children:[(0,R.jsxs)(`form`,{className:`relative`,role:`search`,onSubmit:e=>{e.preventDefault(),c[0]&&(i(c[0].id),o(``))},children:[(0,R.jsxs)(`label`,{className:`flex h-8 items-center gap-2 rounded-control border border-rule bg-surface px-2.5`,children:[(0,R.jsx)(n,{name:`search`,className:`size-3.5 text-muted`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Find a spec, Area or repository`}),(0,R.jsx)(`input`,{className:`w-56 border-0 bg-transparent text-sm text-text outline-none placeholder:text-muted`,placeholder:`Find a spec, Area or repository`,value:a,onChange:e=>o(e.target.value),"aria-controls":s,"aria-autocomplete":`list`,"data-graph-search":!0})]}),c.length>0?(0,R.jsx)(`ul`,{id:s,className:`absolute top-9 left-0 z-20 m-0 grid w-80 list-none gap-0.5 rounded-control border border-rule bg-surface p-1 shadow-float`,"aria-label":`Matches`,children:c.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,className:`flex w-full items-baseline gap-2 rounded-[4px] border-0 bg-transparent px-2 py-1 text-left text-sm text-text hover:bg-page`,onClick:()=>{i(e.id),o(``)},children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:e.label}),(0,R.jsx)(`span`,{className:`ml-auto text-2xs text-muted`,children:L(e)})]})},e.id))}):null]}),(0,R.jsxs)(`fieldset`,{className:`m-0 flex flex-wrap items-center gap-3 border-0 p-0`,children:[(0,R.jsx)(`legend`,{className:`sr-only`,children:`Connections shown`}),h.map(e=>(0,R.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-xs text-muted`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:!t.hidden.has(e),onChange:()=>u(e),"data-graph-edge-kind":e}),ie[e]]},e))]}),l>1?(0,R.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-xs text-muted`,children:[`Changed together at least`,(0,R.jsx)(`input`,{type:`range`,min:1,max:l,value:t.minWeight,onChange:e=>r({...t,minWeight:Number(e.target.value)}),disabled:t.hidden.has(`co-change`),"data-graph-min-weight":!0}),(0,R.jsxs)(`span`,{className:`w-4 font-mono tabular-nums`,children:[t.minWeight,`×`]})]}):null]})}function Q({wire:e,onSelectNode:t}){if(e.unbound.length===0&&e.broken.length===0)return null;let n=[e.unbound.length>0?`${e.unbound.length} unbound ${e.unbound.length===1?`spec`:`specs`}`:null,e.broken.length>0?`${e.broken.length} broken ${e.broken.length===1?`link`:`links`}`:null].filter(Boolean);return(0,R.jsxs)(`details`,{className:`text-xs text-muted`,"data-graph-problems":!0,children:[(0,R.jsx)(`summary`,{className:`cursor-pointer text-warn`,children:n.join(` · `)}),(0,R.jsxs)(`div`,{className:`grid gap-2 pt-2`,children:[e.unbound.length>0?(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`m-0`,children:`They name no repository/Area pair, so they bind nothing:`}),(0,R.jsx)(`p`,{className:`m-0 flex flex-wrap gap-x-2 font-mono`,children:e.unbound.map(e=>(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-text hover:text-accent`,onClick:()=>t(_(e)),children:e},e))})]}):null,e.broken.length>0?(0,R.jsx)(`ul`,{className:`m-0 grid list-none gap-0.5 p-0 font-mono`,"aria-label":`Broken links`,children:e.broken.map(e=>(0,R.jsxs)(`li`,{children:[e.from,` → `,(0,R.jsx)(`span`,{className:`text-bad`,children:e.target})]},`${e.from}>${e.target}`))}):null]})]})}function ce(){return(0,R.jsxs)(`ul`,{className:`pointer-events-none absolute top-2 left-2 m-0 flex list-none gap-3 rounded-control bg-[color-mix(in_srgb,var(--panel)_85%,transparent)] px-2 py-1 text-2xs text-muted`,"aria-label":`Legend`,children:[(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-1.5 rounded-full bg-accent`,"aria-hidden":`true`}),` Spec`]}),(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-2 rounded-full bg-info`,"aria-hidden":`true`}),` Area`]}),(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-2.5 rounded-full bg-why`,"aria-hidden":`true`}),` Repository`]})]})}var le=i({component:()=>$}),$=function(){let e=b.useSearch(),t=b.useNavigate();return e.companion?(0,R.jsx)(ae,{search:{companion:e.companion,studioMode:e.studioMode},node:e.node,onNodeChange:e=>void t({search:t=>({...t,node:e}),replace:!1})}):null};export{O as a,E as c,$ as component,A as i,S as n,j as o,C as r,D as s,le as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e,et as t}from"./studio-queries-CFP_yTpr.js";var n=e({method:`GET`}).handler(t(`b2e22d82aeef8a3802144ae67d3a53a4fff5860a1a0b957618e8dcc7c0ef36c8`));export{n as t};
|