@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{A as r,Cn as i,En as a,Et as o,Fr as s,G as c,Kn as l,Nr as u,Ot as d,Qn as f,Qt as p,Sn as m,Tn as h,Tt as ee,W as te,Xt as ne,Y as re,Yt as g,Zt as ie,an as ae,bn as _,c as v,er as y,i as b,in as oe,ir as se,j as ce,jn as x,kn as S,kr as C,or as w,sr as T,tn as le,vr as E,wt as ue,xn as D,yn as O,yr as de,zn as fe}from"./button-CX0sWAJl.js";import{i as pe,s as me,y as he}from"./fields-BobQ7zRF.js";var k=e(t(),1);function ge(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:o=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=f}=t,u=e.context.dataRef,d=k.useRef(void 0),p=te(),m=re(),h=k.useMemo(()=>{function t(t,n,r,i){let a=y(l,n,r);t&&i===`touch`&&c>0?m.start(c,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=u.current.openEvent,o=e.select(`domReferenceElement`)!==n;return t&&o||!t||!i?!0:a&&(typeof s==`function`?s():s)?!r(a.type):!1}return{onPointerDown(e){d.current=g(e.pointerType,!0)&&ie(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let s=d.current,c=i.nativeEvent,l=e.select(`open`);if(i.button!==0||r===`click`||g(s,!0)&&o)return;let u=n(l,i.currentTarget,e=>e===`click`||e===`mousedown`),f=a(c),m=ae(f);if(m||s===`virtual`){t(u,c,m?f:i.currentTarget,s);return}let h=i.currentTarget;p.request(()=>{t(u,c,h,s)})},onClick(i){if(r===`mousedown-only`)return;let a=d.current;r===`mousedown`&&a?d.current=void 0:g(a,!0)&&o||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,a)},onKeyDown(){d.current=void 0}}},[u,r,o,l,e,s,i,p,m,c]);return k.useMemo(()=>n?{reference:h}:C,[n,h])}function _e(e){let{open:t=!1,onOpenChange:n,elements:i={}}=e,a=s(),o=r()!=null,c=u(()=>new b({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new v,floatingId:a,syncOnly:!1,nested:o})).current;return w(()=>{let e={open:t,floatingId:a};i.reference!==void 0&&(e.referenceElement=i.reference,e.domReferenceElement=E(i.reference)?i.reference:null),i.floating!==void 0&&(e.floatingElement=i.floating),c.update(e)},[t,a,i.reference,i.floating,c]),c.context.onOpenChange=n,c.context.nested=o,c}function ve(e){return S&&e.movementX===0&&e.movementY===0}function A(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function j(e,t){return A(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ye(e,t,n){return A(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function be(e,t,n){return A(t,n?e===_:e===D,e===O)}function xe(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:A(t,n?e===D:e===_,e===m)}function M(e,t){let{listRef:n,activeIndex:s,onNavigate:u=()=>{},enabled:f=!0,selectedIndex:m=null,allowEscape:re=!1,loopFocus:g=!1,nested:_=!1,rtl:v=!1,virtual:b=!1,focusItemOnOpen:x=`auto`,focusItemOnHover:S=!0,openOnArrowKeyDown:C=!0,disabledIndices:E=void 0,orientation:D=`vertical`,triggerOrientation:O=D,parentOrientation:pe,id:me,resetOnPointerLeave:ge=!0,externalTree:_e,nestedReturnFocusRef:A,grid:M}=t,Se=M!=null,N=e.useState(`open`),P=e.useState(`floatingElement`),F=e.useState(`domReferenceElement`),Ce=e.context.dataRef,I=le(P),L=oe(F),R=c(I),z=r(),B=ce(_e),V=k.useRef(x),H=k.useRef(m??-1),U=k.useRef(null),W=k.useRef(!0),G=T(e=>{u(H.current===-1?null:H.current,e)}),K=k.useRef(!!P),we=k.useRef(N),q=k.useRef(!1),J=k.useRef(!1),Y=k.useRef(null),Te=c(E),X=c(N),Z=c(m),Ee=c(ge),De=te(),Oe=te(),ke=T(()=>{De.cancel();function e(e){b||(Y.current=he(e,{sync:q.current,preventScroll:!0}))}let t=n.current[H.current],r=J.current;t&&e(t),(q.current?e=>e():e=>De.request(e))(()=>{let i=n.current[H.current]||t;i&&(t||e(i),Ne&&(r||!W.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});w(()=>{Ce.current.orientation=D},[Ce,D]),w(()=>{N||(U.current=null),N&&x===`auto`||(V.current=x)},[N,x]),w(()=>{f&&(N&&P?(H.current=m??-1,V.current&&m!=null&&(J.current=!0,G())):K.current&&(H.current=-1,G()))},[f,N,P,m,G]),w(()=>{if(f){if(!N)q.current=!1;else if(P){if(s==null){if(q.current=!1,Z.current!=null)return;if(K.current&&(H.current=-1,ke()),(!we.current||!K.current)&&V.current&&(U.current!=null||V.current===!0&&U.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>Oe.request(e):queueMicrotask)(t),e+=1):(H.current=U.current==null||ye(U.current,O,v)||_?ee(n):ue(n),U.current=null,G())};t()}}else d(n.current,s)||(H.current=s,ke(),J.current=!1)}}},[f,N,P,s,Z,_,n,O,v,G,ke,Oe]),w(()=>{if(!f||P||!B||b||!K.current)return;let e=B.nodesRef.current,t=e.find(e=>e.id===z)?.context?.elements.floating,n=i(se(F??t??null)),r=e.some(e=>e.context&&h(e.context.elements.floating,n));t&&!r&&W.current&&t.focus({preventScroll:!0})},[f,P,F,B,z,b]),w(()=>{we.current=N,K.current=!!P});let Ae=s!=null,je=T(e=>{if(!X.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(H.current!==t||s!==t)&&(H.current=t,G(e))}),Q=T(()=>pe??B?.nodesRef.current.find(e=>e.id===z)?.context?.dataRef?.current.orientation),Me=T(()=>ee(n,Te.current)),$=T(t=>{if(W.current=!1,q.current=!0,t.which===229||!X.current&&t.currentTarget===R.current)return;if(_&&xe(t.key,D,v,Se)){j(t.key,Q())||p(t),e.setOpen(!1,y(l,t.nativeEvent));let n=A?.current??F;de(n)&&n.focus();return}s!=null&&s!==H.current&&!d(n.current,s)&&(H.current=s);let r=H.current,a=ee(n,E),c=ue(n,E);if(L||(t.key===`Home`&&(p(t),H.current=a,G(t)),t.key===`End`&&(p(t),H.current=c,G(t))),M!=null){let e=M(t,H.current,n,D,g,v,E,a,c);if(e!=null&&e!==H.current&&(H.current=e,G(t)),D===`both`)return}if(j(t.key,D)){p(t);let e=i(t.currentTarget.ownerDocument);if(N&&!b&&h(t.currentTarget,e)&&!n.current.some(t=>t!=null&&h(t,e))){H.current=ye(t.key,D,v)?a:c,G(t),s===H.current&&ke();return}let{index:l,wrapped:u}=o(n.current,r,{decrement:!ye(t.key,D,v),loopFocus:g,allowEscape:re,disabledIndices:E,minIndex:a,maxIndex:c});u&&(q.current=!1),H.current=l,G(t)}}),Ne=k.useMemo(()=>({onFocus(e){q.current=!0,je(e)},onClick({currentTarget:e}){b||e.focus({preventScroll:!0})},onMouseMove(e){ve(e)||(q.current=!0,J.current=!1,S&&je(e))},onPointerLeave(e){if(!X.current||!W.current||e.pointerType===`touch`)return;q.current=!0;let t=e.relatedTarget;if(S&&!n.current.includes(t)&&Ee.current&&(Y.current?.(),Y.current=null,H.current=-1,G(e),!b)){let e=R.current,t=i(se(e));e&&h(e,t)&&e.focus({preventScroll:!0})}}}),[je,X,R,S,n,G,Ee,b]),Pe=k.useMemo(()=>b&&N&&Ae&&{"aria-activedescendant":`${me}-${s}`},[b,N,Ae,me,s]),Fe=k.useMemo(()=>({...L?{}:Pe,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&N&&!b){let n=a(t.nativeEvent);if(n&&!h(R.current,n))return;p(t);let r=y(fe,t.nativeEvent);e.setOpen(!1,r);let i=A?.current??F;!r.isCanceled&&de(i)&&i.focus()}else $(t)},onPointerMove(e){ve(e)||(W.current=!0)}}),[Pe,$,R,L,e,N,b,F,A]),Ie=k.useMemo(()=>{function t(t){e.setOpen(!0,y(l,t.nativeEvent,t.currentTarget))}function n(e){x===`auto`&&ne(e.nativeEvent)&&(V.current=!b)}function r(e){V.current=x,x===`auto`&&ie(e.nativeEvent)&&(V.current=!0)}return{onKeyDown(n){let r=e.select(`open`);W.current=!1;let i=n.key.startsWith(`Arrow`),a=be(n.key,Q(),v),o=j(n.key,r?D:O),s=(_?a:o)||n.key===`Enter`||n.key.trim()===``;if(b&&r&&(!_||ae(n.currentTarget)))return $(n);if(r||C||!i){if(s){let e=j(n.key,Q());U.current=_&&e?null:n.key}_?a&&(p(n),r?(H.current=Me(),G(n),b&&R.current?.focus()):t(n)):o&&(Z.current!=null&&(H.current=Z.current),p(n),!r&&C?t(n):$(n),r&&G(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!b&&(H.current=-1,G(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[$,x,Me,_,G,e,C,D,O,Q,v,Z,b,R]),Le=k.useMemo(()=>({...Pe,...Ie}),[Pe,Ie]);return k.useMemo(()=>f?{reference:Le,floating:Fe,item:Ne,trigger:Ie}:{},[f,Le,Fe,Ie,Ne])}function Se(e){let t=k.useRef(!0);t.current&&(t.current=!1,e())}function N(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var P=(e,t)=>Object.is(e,t);function F(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Ce(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!N(e,t,(e,t)=>F(e,t,n)):e!==t}function I(e,t,n){return e?e.some(e=>e!==void 0&&F(t,e,n)):!1}function L(e,t,n){return e?e.findIndex(e=>e!==void 0&&F(e,t,n)):-1}function R(e,t){if(t!==P)return n=>I(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function z(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(R(t,n)):L(e,t,n);return i===-1?null:i}function B(e,t,n,r,i,a){return I(r,t,i)?a!=null&&e>a&&I(r,n[a],i)?a:e:e===a?z(n,r,i,!0):a}function V(e,t,n){return e.filter(e=>!F(t,e,n))}function H(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var U=n();function W(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function G(e){return W(e?.[0])}function K(e){return G(e)?e.flatMap(e=>e.items):e}function we(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(G(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function q(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return H(e)}function J(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?H(e.value):H(e)}function Y(e,t,n){function r(){return q(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=K(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Te(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,U.jsx)(k.Fragment,{children:Y(r,t,n)},i)),e),[])}function X(e){let t=k.useRef(``),n=k.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:k.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function Z(e,t){let{onClick:n,onPointerDown:r}=X(T((n,r)=>{(typeof e==`function`?e():e)||t(r||(x?`touch`:``))}));return k.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Ee(e){let[t,n]=k.useState(null),r=Z(e,n);return me(e,t=>{t&&!e&&n(null)}),k.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var De=20;function Oe(e,t,n,r){let[i,a]=k.useState(!1);w(()=>{if(!e||!t||n==null){a(!1);return}let r=se(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-De)},[e,t,n]),pe(e&&(!t||i),r)}export{ge as S,B as _,we as a,M as b,Y as c,F as d,P as f,V as g,Ce as h,K as i,q as l,z as m,Ee as n,G as o,L as p,Z as r,Te as s,Oe as t,J as u,I as v,_e as x,Se as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{B as r,C as i,F as a,H as o,I as s,L as c,N as l,O as u,R as d,S as f,U as p,V as m,b as h,k as g,w as _,x as v,z as y}from"./studio-queries-CFP_yTpr.js";var b=e(t(),1),x=n(),S=b.createContext(void 0),C=e=>{let t=b.useContext(S);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},w=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,x.jsx)(S.Provider,{value:e,children:t})),T=()=>u,E=()=>T(),D=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},O=new class extends D{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},k=o;function A(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=k,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var j=A(),M=new class extends D{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function N(e){return Math.min(1e3*2**e,3e4)}function P(e){return(e??`online`)!==`online`||M.isOnline()}var F=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function I(e){let t=!1,n=0,i,a=`pending`,o,s,c=new Promise((e,t)=>{o=e,s=t});c.catch(l);let u=()=>a!==`pending`,d=t=>{if(!u()){let n=new F(t);_(n),e.onCancel?.(n)}},f=()=>{t=!0},p=()=>{t=!1},m=()=>O.isFocused()&&(e.networkMode===`always`||M.isOnline())&&e.canRun(),h=()=>P(e.networkMode)&&e.canRun(),g=e=>{u()||(i?.(),a=`resolved`,o(e))},_=e=>{u()||(i?.(),a=`rejected`,s(e))},v=t=>new Promise(n=>{i=e=>{(u()||t())&&n(e)},e.onPause?.()}).then(()=>{i=void 0,u()||e.onContinue?.()}),y=()=>{if(u())return;let i,a=n===0?e.initialPromise:void 0;try{i=a??e.fn()}catch(e){i=Promise.reject(e)}Promise.resolve(i).then(g).catch(i=>{if(u())return;let a=e.retry??(E()?0:3),o=e.retryDelay??N,s=typeof o==`function`?o(n,i):o,c=a===!0||typeof a==`number`&&n<a||typeof a==`function`&&a(n,i);t||!c?_(i):(n++,e.onFail?.(n,i),r(s).then(()=>u()||m()?void 0:v(m)).then(()=>{t?_(i):y()}))})};return{promise:c,status:()=>a,cancel:d,continue:()=>(i?.(),c),cancelRetry:f,continueRetry:p,canStart:h,start:()=>(h()?y():v(h).then(y),c)}}var L=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),g(this.gcTime)&&(this.#e=p.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(E()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(p.clearTimeout(this.#e),this.#e=void 0)}};function R(e){return{onFetch:(t,n)=>{let r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,u=async()=>{let n=!1,u=t,d=e=>{h(e,()=>t.signal,()=>n=!0,u[_])},p=i(t.options,t.fetchOptions),m=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return d(e),e})(),o=await p(a),{maxPages:s}=t.options,c=i?f:v;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(a&&o.length){let e=a===`backward`,t=e?B:z,n={pages:o,pageParams:s};c=await m(n,t(r,n),e)}else{let t=e??o.length;do{let e=l===0?s[0]===void 0?r.initialPageParam:s[0]:z(r,c);if(l>0&&e==null)break;c=await m(c,e),l++}while(l<t)}return c};t.fetchFn=t.options.persister?()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):u}}}function z(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function B(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var V=class extends L{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=W(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=W(this.options);e.data!==void 0&&(this.setState(U(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=a(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(l).catch(l):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>s(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>s(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!m(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[_]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},a=()=>{let e=i(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},o=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:a};return r(e),e})();(this.#e===`infinite`?R(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:o.fetchOptions?.meta});let s=this.#a=I({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof F&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),c=(async()=>{try{let e=await s.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof F){if(e.silent){if(this.#a!==s&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===s&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=c,s.start(),c}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...H(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...U(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),j.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function U(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function W(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var G=class extends D{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),q(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return J(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return J(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof s(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!c(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Y(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||s(this.options.staleTime,this.#t)!==s(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return c(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l)),t}#h(e){return!E()&&s(this.options.enabled,this.#t)!==!1&&g(e)}#g(){this.#b();let e=s(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=m(this.#r.dataUpdatedAt,e)+1;this.#u=p.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return s(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=p.setInterval(()=>{(this.options.refetchIntervalInBackground||O.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(p.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(p.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,o=this.#i,c=this.#a,l=e===n?this.#n:e.state,{state:u}=e,d={...u},f=!1,p;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&q(e,t),o=i&&Y(e,n,t,r);(a||o)&&(d={...d,...H(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:h,status:g}=d;p=d.data;let _=!1;if(t.placeholderData!==void 0&&p===void 0&&g===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=i.data,_=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(g=`success`,p=a(i?.data,e,t),f=!0)}if(t.select&&p!==void 0&&!_){if(i&&p===o?.data&&t.select===this.#s)p=this.#c;else try{this.#s=t.select,p=t.select(p),p=a(i?.data,p,t),this.#c=p,this.#o=null}catch(e){this.#o=e}}else p===void 0&&(this.#o=null);this.#o&&(m=this.#o,p=this.#c,h=Date.now(),g=`error`,f=!1);let v=d.fetchStatus===`fetching`,y=g===`pending`,b=g===`error`,x=y&&v,S=p!==void 0;return{status:g,fetchStatus:d.fetchStatus,isPending:y,isSuccess:g===`success`,isError:b,isInitialLoading:x,isLoading:x,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:b&&!S,isPaused:d.fetchStatus===`paused`,isPlaceholderData:f,isRefetchError:b&&S,isStale:X(e,t),refetch:this.refetch,isEnabled:s(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),c(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();j.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function K(e,t){return s(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||s(t.retryOnMount,e)!==!1)}function q(e,t){return K(e,t)||e.state.data!==void 0&&J(e,t,t.refetchOnMount)}function J(e,t,n){if(s(t.enabled,e)!==!1&&s(t.staleTime,e)!==`static`){let r=s(n,e);return r===`always`||r!==!1&&X(e,t)}return!1}function Y(e,t,n,r){return(e!==t||s(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&X(e,n)}function X(e,t){return s(t.enabled,e)!==!1&&e.isStaleByTime(s(t.staleTime,e))}var Z=b.createContext(!1),Q=()=>b.useContext(Z);Z.Provider;function $(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ee=b.createContext($()),te=()=>b.useContext(ee),ne=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?d(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},re=e=>{b.useEffect(()=>{e.clearReset()},[e])},ie=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||d(n,[e.error,r])),ae=(e,t)=>t.state.data===void 0,oe=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},se=(e,t)=>e?.suspense&&t.isPending,ce=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function le(e,t,n){let r=Q(),i=te(),a=C(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,oe(o),ne(o,i,s),re(i);let[u]=b.useState(()=>new t(a,o)),d=u.getOptimisticResult(o);b.useEffect(()=>{u.setOptions(o)},[o,u]);let f=!r&&c;if(b.useSyncExternalStore(b.useCallback(e=>{let t=f?u.subscribe(j.batchCalls(e)):l;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),se(o,d))throw ce(o,u,i);if(ie({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return o.notifyOnChangeProps?d:u.trackResult(d)}export{L as a,j as c,w as d,C as f,V as i,O as l,ae as n,I as o,G as r,M as s,le as t,D as u};
|
|
1
|
+
import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{$ as r,A as i,H as a,J as o,K as s,L as c,M as l,N as u,Q as d,R as f,W as p,X as m,Y as h,Z as g,j as _,k as v,q as y}from"./studio-queries-BflKt9va.js";var b=e(t(),1),x=n(),S=b.createContext(void 0),C=e=>{let t=b.useContext(S);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},w=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,x.jsx)(S.Provider,{value:e,children:t})),T=()=>c,E=()=>T(),D=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},O=new class extends D{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},k=d;function A(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=k,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var j=A(),M=new class extends D{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function N(e){return Math.min(1e3*2**e,3e4)}function P(e){return(e??`online`)!==`online`||M.isOnline()}var F=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function I(e){let t=!1,n=0,r,i=`pending`,o,s,c=new Promise((e,t)=>{o=e,s=t});c.catch(a);let l=()=>i!==`pending`,u=t=>{if(!l()){let n=new F(t);_(n),e.onCancel?.(n)}},d=()=>{t=!0},f=()=>{t=!1},p=()=>O.isFocused()&&(e.networkMode===`always`||M.isOnline())&&e.canRun(),h=()=>P(e.networkMode)&&e.canRun(),g=e=>{l()||(r?.(),i=`resolved`,o(e))},_=e=>{l()||(r?.(),i=`rejected`,s(e))},v=t=>new Promise(n=>{r=e=>{(l()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,l()||e.onContinue?.()}),y=()=>{if(l())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(g).catch(r=>{if(l())return;let i=e.retry??(E()?0:3),a=e.retryDelay??N,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?_(r):(n++,e.onFail?.(n,r),m(o).then(()=>l()||p()?void 0:v(p)).then(()=>{t?_(r):y()}))})};return{promise:c,status:()=>i,cancel:u,continue:()=>(r?.(),c),cancelRetry:d,continueRetry:f,canStart:h,start:()=>(h()?y():v(h).then(y),c)}}var L=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),f(this.gcTime)&&(this.#e=r.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(E()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(r.clearTimeout(this.#e),this.#e=void 0)}};function R(e){return{onFetch:(t,n)=>{let r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},d=0,f=async()=>{let n=!1,f=t,p=e=>{v(e,()=>t.signal,()=>n=!0,f[u])},m=l(t.options,t.fetchOptions),h=async(e,r,a)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let o=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:a?`backward`:`forward`,meta:t.options.meta};return p(e),e})(),s=await m(o),{maxPages:c}=t.options,l=a?_:i;return{pages:l(e.pages,s,c),pageParams:l(e.pageParams,r,c)}};if(a&&o.length){let e=a===`backward`,t=e?B:z,n={pages:o,pageParams:s};c=await h(n,t(r,n),e)}else{let t=e??o.length;do{let e=d===0?s[0]===void 0?r.initialPageParam:s[0]:z(r,c);if(d>0&&e==null)break;c=await h(c,e),d++}while(d<t)}return c};t.fetchFn=t.options.persister?()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):f}}}function z(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function B(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var V=class extends L{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=W(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=W(this.options);e.data!==void 0&&(this.setState(U(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=p(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(a).catch(a):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>s(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===h||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>s(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!g(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[u]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=l(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?R(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=I({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof F&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof F){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...H(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...U(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),j.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function U(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function W(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var G=class extends D{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),q(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return J(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return J(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof s(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!y(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Y(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||s(this.options.staleTime,this.#t)!==s(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return y(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(a)),t}#h(e){return!E()&&s(this.options.enabled,this.#t)!==!1&&f(e)}#g(){this.#b();let e=s(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=g(this.#r.dataUpdatedAt,e)+1;this.#u=r.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return s(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=r.setInterval(()=>{(this.options.refetchIntervalInBackground||O.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(r.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(r.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,c=e===n?this.#n:e.state,{state:l}=e,u={...l},d=!1,f;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&q(e,t),o=i&&Y(e,n,t,r);(a||o)&&(u={...u,...H(l.data,e.options)}),t._optimisticResults===`isRestoring`&&(u.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:h,status:g}=u;f=u.data;let _=!1;if(t.placeholderData!==void 0&&f===void 0&&g===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,_=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(g=`success`,f=p(i?.data,e,t),d=!0)}if(t.select&&f!==void 0&&!_){if(i&&f===a?.data&&t.select===this.#s)f=this.#c;else try{this.#s=t.select,f=t.select(f),f=p(i?.data,f,t),this.#c=f,this.#o=null}catch(e){this.#o=e}}else f===void 0&&(this.#o=null);this.#o&&(m=this.#o,f=this.#c,h=Date.now(),g=`error`,d=!1);let v=u.fetchStatus===`fetching`,y=g===`pending`,b=g===`error`,x=y&&v,S=f!==void 0;return{status:g,fetchStatus:u.fetchStatus,isPending:y,isSuccess:g===`success`,isError:b,isInitialLoading:x,isLoading:x,data:f,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:b&&!S,isPaused:u.fetchStatus===`paused`,isPlaceholderData:d,isRefetchError:b&&S,isStale:X(e,t),refetch:this.refetch,isEnabled:s(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),y(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();j.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function K(e,t){return s(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||s(t.retryOnMount,e)!==!1)}function q(e,t){return K(e,t)||e.state.data!==void 0&&J(e,t,t.refetchOnMount)}function J(e,t,n){if(s(t.enabled,e)!==!1&&s(t.staleTime,e)!==`static`){let r=s(n,e);return r===`always`||r!==!1&&X(e,t)}return!1}function Y(e,t,n,r){return(e!==t||s(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&X(e,n)}function X(e,t){return s(t.enabled,e)!==!1&&e.isStaleByTime(s(t.staleTime,e))}var Z=b.createContext(!1),Q=()=>b.useContext(Z);Z.Provider;function $(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ee=b.createContext($()),te=()=>b.useContext(ee),ne=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?o(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},re=e=>{b.useEffect(()=>{e.clearReset()},[e])},ie=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||o(n,[e.error,r])),ae=(e,t)=>t.state.data===void 0,oe=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},se=(e,t)=>e?.suspense&&t.isPending,ce=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function le(e,t,n){let r=Q(),i=te(),o=C(n),s=o.defaultQueryOptions(e),c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,oe(s),ne(s,i,c),re(i);let[u]=b.useState(()=>new t(o,s)),d=u.getOptimisticResult(s);b.useEffect(()=>{u.setOptions(s)},[s,u]);let f=!r&&l;if(b.useSyncExternalStore(b.useCallback(e=>{let t=f?u.subscribe(j.batchCalls(e)):a;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),se(s,d))throw ce(s,u,i);if(ie({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw d.error;return s.notifyOnChangeProps?d:u.trackResult(d)}export{L as a,j as c,w as d,C as f,V as i,O as l,ae as n,I as o,G as r,M as s,le as t,D as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,f as n,o as r,u as i}from"./useBaseQuery-C2cjmeH2.js";import{a,n as o}from"./jsx-runtime-MZURdZre.js";import{F as s,H as c,J as l,q as u}from"./studio-queries-BflKt9va.js";var d=class extends e{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||f(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#r=r({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),a=this.state.status===`pending`,o=!i.canStart();try{if(a)t();else{this.#i({type:`pending`,variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:o})}this.state.isPaused&&i.canStart()&&t();let r=await i.start();return await this.#n.config.onSuccess?.(r,e,this.state.context,this,n),await this.options.onSuccess?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,e,this.state.context,n),this.#i({type:`success`,data:r}),r}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===i&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let n=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=n(this.state),t.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function f(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var p=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),u(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&s(t.mutationKey)!==s(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??f();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){t.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},m=a(o(),1);function h(e,r){let i=n(r),[a]=m.useState(()=>new p(i,e));m.useEffect(()=>{a.setOptions(e)},[a,e]);let o=m.useSyncExternalStore(m.useCallback(e=>a.subscribe(t.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),s=m.useCallback((...e)=>{a.mutate(e[0],e[1]).catch(c)},[a]);if(o.error&&l(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}export{d as n,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as e,a as t,it as n,lt as r,p as i,tt as a}from"./index-CysBCSxM.js";import{_ as o,at as s,f as c,g as l,h as u,i as d,it as f,m as p,p as m,r as h,u as g}from"./studio-queries-BflKt9va.js";import{t as _}from"./useMutation-DI6LbvVa.js";import{Lr as v,ct as y,n as b,r as x,rt as S,t as C,zr as w}from"./button-CX0sWAJl.js";import{f as T}from"./useBaseQuery-C2cjmeH2.js";import{a as E,n as D,t as O}from"./jsx-runtime-MZURdZre.js";import{a as k}from"./useSelector-AYcH7lB0.js";import{t as A}from"./markdown-view-jMiaBTSO.js";var j=E(D(),1);function M(e,t){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if(`shouldBlockFn`in e)return e;if(typeof e==`function`){let n=!!(t??!0);return{shouldBlockFn:async()=>n?await e():!1,enableBeforeUnload:n,withResolver:!1}}let n=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>n&&r!==void 0?await r():n,enableBeforeUnload:n,withResolver:r===void 0}}function N(e,t){let{shouldBlockFn:n,enableBeforeUnload:r=!0,disabled:i=!1,withResolver:a=!1}=M(e,t),o=k(),{history:s}=o,[c,l]=j.useState({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return j.useEffect(()=>i?void 0:s.block({blockerFn:async e=>{function t(e){let t=o.parseLocation(e),[,n,r]=o.getMatchedRoutes(t.pathname);return r===void 0?{routeId:`__notFound__`,fullPath:t.pathname,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}:{routeId:r.id,fullPath:r.fullPath,pathname:t.pathname,params:n,search:o.options.parseSearch(e.search)}}let r=t(e.currentLocation),i=t(e.nextLocation);if(r.routeId===`__notFound__`&&i.routeId!==`__notFound__`)return!1;let s=await n({action:e.action,current:r,next:i});if(!a)return s;if(!s)return!1;let c=await new Promise(t=>{l({status:`blocked`,current:r,next:i,action:e.action,proceed:()=>t(!1),reset:()=>t(!0)})});return l({status:`idle`,current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),c},enableBeforeUnload:r}),[n,r,i,a,s,o]),c}var P=O(),ee=(e,t)=>`/api/vault/events?${new URLSearchParams({companion:e,path:t})}`;function F(e,t,n){let r=(0,j.useRef)(n);(0,j.useEffect)(()=>{r.current=n}),(0,j.useEffect)(()=>{if(typeof EventSource>`u`)return;let n=new EventSource(ee(e,t));return n.addEventListener(`message`,e=>{try{r.current(JSON.parse(e.data))}catch{}}),()=>n.close()},[e,t])}function I({crumbs:e,children:t}){return(0,P.jsxs)(`div`,{className:`vault-bar sticky top-0 z-2 flex min-h-[52px] items-center gap-2 border-b border-rule-soft bg-[color-mix(in_srgb,var(--bg)_88%,transparent)] px-6 py-2 backdrop-blur-md max-sm:px-3`,children:[(0,P.jsx)(`div`,{className:`mr-auto flex min-w-0 items-center gap-1`,children:e}),t]})}var L=`vault-prose prose mx-auto w-full max-w-[68ch] px-10 pt-10 pb-28 max-sm:px-4`,R=b({variant:`default`,size:`sm`});function z({path:e}){return(0,P.jsxs)(`button`,{type:`button`,className:b({variant:`ghost`,size:`sm`}),"data-copy":e,"data-copy-label":`path`,"aria-label":`Copy path`,children:[(0,P.jsx)(x,{name:`copy`,className:`size-3.5`}),(0,P.jsx)(`span`,{className:`@max-[1000px]:hidden`,children:`Copy path`})]})}function B({companion:e,data:t,writable:n,search:r,crumbs:i}){let a=t.open;return a?n&&r.mode===`edit`?(0,P.jsx)(ne,{companion:e,data:t,crumbs:i},`${a.path}:edit`):(0,P.jsx)(H,{companion:e,data:t,writable:n,crumbs:i},`${a.path}:read`):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(I,{crumbs:i}),(0,P.jsxs)(`div`,{className:L,children:[(0,P.jsx)(`h1`,{className:`text-xl`,children:t.refusal?`File refused`:`Open a markdown file`}),(0,P.jsx)(`p`,{className:t.refusal?`vault-warning text-warn`:`empty text-muted`,children:t.refusal??`Choose a file from the tree to begin.`})]})]})}var V=e=>e.split(`/`).at(-1)??e;function H({companion:e,data:t,writable:n,crumbs:r}){let i=t.open,a=T(),[o,s]=(0,j.useState)(``);return F(e,i.path,t=>{t.kind===`removed`?s(`this file no longer exists on disk`):h(a,e)}),(0,P.jsxs)(`div`,{"data-vault-root":!0,"data-vault-mode":`read`,"data-vault-path":i.path,children:[(0,P.jsxs)(I,{crumbs:r,children:[(0,P.jsx)(z,{path:i.path}),n?(0,P.jsxs)(f,{className:R,id:`vault-mode-edit`,to:`/vault`,search:e=>({...e,mode:`edit`}),"data-vault-mode-link":!0,children:[(0,P.jsx)(x,{name:`pencil`,className:`size-3.5`}),`Edit`]}):(0,P.jsx)(`span`,{className:`text-xs text-muted`,title:`Start Studio with --writable to edit.`,children:`Read only`})]}),(0,P.jsxs)(`article`,{className:L,"aria-label":V(i.path),children:[(0,P.jsx)(A,{nodes:i.markdown}),(0,P.jsx)(`p`,{id:`vault-status`,className:`text-sm text-warn`,"aria-live":`polite`,children:o})]})]})}function te({companion:t,open:n,text:r}){let[i,a]=(0,j.useState)(r);(0,j.useEffect)(()=>{let e=setTimeout(()=>a(r),250);return()=>clearTimeout(e)},[r]);let o=e(`(min-width: 64rem)`),s=i===n.content,c=w({queryKey:[`vault-preview`,t,n.path,i],queryFn:()=>l({data:{companion:t,path:n.path,content:i}}),placeholderData:e=>e,enabled:o&&!s,gcTime:0}),u=s?n.markdown:c.data;return(0,P.jsxs)(`div`,{className:`vault-preview min-h-0 overflow-auto max-lg:hidden`,"aria-label":`Preview`,role:`region`,"data-vault-preview":!0,children:[(0,P.jsx)(`p`,{className:`m-0 px-7 pt-3 text-xs font-semibold text-muted`,children:`Preview`}),(0,P.jsx)(`div`,{className:`prose px-7 pt-2 pb-16 text-sm`,children:u?(0,P.jsx)(A,{nodes:u}):null})]})}function ne({companion:e,data:t,crumbs:n}){let r=t.open,i=T(),c=s(),[l,u]=(0,j.useState)(r.content),[d,p]=(0,j.useState)(r.content),[m,g]=(0,j.useState)(r.token),[y,b]=(0,j.useState)(``),[S,w]=(0,j.useState)(null),E=l!==d,D=(0,j.useRef)(E);(0,j.useEffect)(()=>{D.current=E},[E]);let O=a(e=>e.setDirty);(0,j.useEffect)(()=>O(E),[E,O]),(0,j.useEffect)(()=>()=>O(!1),[O]),N({shouldBlockFn:()=>D.current&&!window.confirm(`Discard unsaved changes?`),enableBeforeUnload:()=>D.current}),F(e,r.path,e=>{if(e.kind===`removed`){b(`this file no longer exists on disk`);return}let t={content:e.content??``,token:e.token??``};e.kind===`overwritten`?(w(t),b(`a version was overwritten; its content is available below`)):E?(w(t),b(`the file changed on disk; unsaved content is still in the editor`)):(u(t.content),p(t.content),g(t.token),b(`updated from disk`))});let k=_({mutationFn:()=>o({data:{companion:e,path:r.path,content:l,token:m}}),onSuccess:t=>{t.kind===`conflict`?(w({content:t.content,token:t.token}),b(t.reason||`save refused`)):(g(t.token),p(l),D.current=!1,O(!1),b(`saved`),h(i,e),c({to:`/vault`,search:e=>({...e,mode:void 0}),resetScroll:!1}))},onError:e=>b(e.message||`save failed`)});return(0,P.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,"data-vault-root":!0,"data-vault-mode":`edit`,"data-vault-path":r.path,children:[(0,P.jsxs)(I,{crumbs:n,children:[E?(0,P.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs text-warn`,children:[(0,P.jsx)(`span`,{className:`size-[7px] rounded-full bg-current`,"aria-hidden":`true`}),`Unsaved`]}):null,(0,P.jsxs)(f,{className:R,id:`vault-mode-read`,to:`/vault`,search:e=>({...e,mode:void 0}),"data-vault-mode-link":!0,children:[(0,P.jsx)(x,{name:`eye`,className:`size-3.5`}),`Read`]}),(0,P.jsx)(C,{variant:`primary`,size:`sm`,id:`vault-save`,onClick:()=>k.mutate(),disabled:k.isPending,children:`Save`})]}),(0,P.jsxs)(`div`,{className:y||S?`grid gap-2 border-b border-rule-soft px-6 py-2.5 text-sm`:`sr-only`,children:[(0,P.jsx)(`p`,{id:`vault-status`,className:`m-0 text-warn`,"aria-live":`polite`,children:y}),S?(0,P.jsxs)(`div`,{id:`vault-incoming`,className:`grid gap-2`,children:[(0,P.jsx)(`strong`,{id:`vault-incoming-title`,className:`text-sm`,children:`Incoming version`}),(0,P.jsx)(`pre`,{id:`vault-incoming-content`,className:`m-0 max-h-40 overflow-auto rounded-control border border-rule bg-surface p-3 font-mono text-xs whitespace-pre-wrap`,children:S.content}),(0,P.jsx)(C,{size:`sm`,id:`vault-recover`,className:`justify-self-start`,onClick:()=>{u(S.content),p(S.content),S.token&&g(S.token),w(null),b(`incoming version loaded into the editor`)},children:`Put incoming content back`})]}):null]}),(0,P.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-2 max-lg:grid-cols-1`,children:[(0,P.jsx)(`textarea`,{id:`vault-editor`,"data-vault-editor":!0,"data-vault-path":r.path,"aria-label":`Markdown source of ${V(r.path)}`,spellCheck:!1,value:l,onChange:e=>u(e.target.value),className:v(`min-h-[60vh] resize-none border-0 border-r border-rule-soft bg-transparent px-6 pt-4 pb-10 font-mono text-[0.86rem] leading-[1.75] text-text outline-none focus-visible:outline-none max-lg:border-r-0`)}),(0,P.jsx)(te,{companion:e,open:r,text:l})]})]})}var U=e=>e.split(`/`).filter(Boolean),W=`flex w-full min-w-0 items-center gap-2 rounded-[6px] border-0 bg-transparent px-2.5 py-1.5 text-left text-sm text-text no-underline hover:bg-surface aria-[current=page]:bg-accent-soft aria-[current=page]:font-semibold`;function G({entry:e,current:t,label:n}){return(0,P.jsxs)(f,{to:`/vault`,search:t=>({...t,path:e.path,dir:void 0,mode:void 0}),className:v(W,`vault-file`),"data-vault-entry":e.path,"aria-current":t?`page`:void 0,children:[(0,P.jsx)(x,{name:`doc`,className:v(`size-3.5`,t?`text-accent`:`text-muted`)}),(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:n??e.name})]})}function K({dir:e,className:t,children:n}){return(0,P.jsx)(f,{to:`/vault`,search:t=>({...t,path:void 0,dir:e??void 0,mode:void 0}),className:t,children:n})}function q({entry:e,companion:t,search:n}){return e.kind===`file`?(0,P.jsx)(G,{entry:e,current:n.path===e.path}):(0,P.jsx)(re,{entry:e,companion:t,search:n})}function re({entry:e,companion:t,search:n}){let[r,i]=(0,j.useState)(e.children!==void 0),a=w({...c(t,e.path),enabled:r&&e.children===void 0}),o=e.children??a.data?.entries;return(0,P.jsxs)(`details`,{className:`vault-directory group/dir`,open:r,"data-vault-dir":e.path,onToggle:e=>i(e.currentTarget.open),children:[(0,P.jsxs)(`summary`,{className:v(W,`cursor-pointer list-none font-semibold [&::-webkit-details-marker]:hidden`),"aria-current":n.dir===e.path?`page`:void 0,children:[(0,P.jsx)(x,{name:`right`,className:`size-3 text-muted transition-transform group-open/dir:rotate-90`}),(0,P.jsx)(x,{name:`folder`,className:`size-3.5 text-muted`}),(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]}),(0,P.jsxs)(`div`,{className:`vault-children grid gap-px pl-3.5`,children:[r&&o?o.map(e=>(0,P.jsx)(q,{entry:e,companion:t,search:n},e.path)):null,a.error?(0,P.jsx)(`p`,{className:`vault-warning m-0 px-2.5 py-1 text-xs text-warn`,children:a.error.message}):null]})]})}var J=`m-0 px-2.5 py-1.5 text-sm text-muted`,Y=`vault-warning m-0 px-2.5 py-1.5 text-xs text-warn`;function ie({data:e,companion:t,search:n}){return e.failure?(0,P.jsx)(`div`,{"data-vault-slot":`tree`,children:(0,P.jsxs)(`p`,{className:Y,children:[`The files could not be listed: `,e.failure]})}):e.tree===null?(0,P.jsx)(`div`,{"data-vault-slot":`tree`,"aria-busy":`true`,children:(0,P.jsx)(`p`,{className:v(J,`empty`),children:`Listing files…`})}):(0,P.jsxs)(`div`,{"data-vault-slot":`tree`,"data-vault-generation":e.generation??void 0,children:[(0,P.jsx)(ae,{data:e}),e.tree.length===0?(0,P.jsx)(`p`,{className:v(J,`empty`),children:`This companion has no markdown files.`}):(0,P.jsx)(`nav`,{className:`vault-tree grid gap-px`,"aria-label":`Markdown files`,children:e.tree.map(e=>(0,P.jsx)(q,{entry:e,companion:t,search:n},e.path))})]})}function ae({data:e}){return e.warning?(0,P.jsxs)(`p`,{className:Y,children:[e.warning,`. The tree may be out of date.`]}):e.watching?null:(0,P.jsx)(`p`,{className:Y,children:`The tree may be out of date.`})}function oe({companion:e,query:t,search:n}){let[r,i]=(0,j.useState)(t);(0,j.useEffect)(()=>{let e=setTimeout(()=>i(t),150);return()=>clearTimeout(e)},[t]);let a=w({...m(e,r),enabled:r.trim().length>0});if(!a.data)return null;let{shown:o,total:s}=a.data,c=s-o.length;return(0,P.jsxs)(`div`,{"data-vault-filter-results":!0,children:[o.length===0?(0,P.jsx)(`p`,{className:v(J,`empty`),children:`No files match.`}):(0,P.jsx)(`nav`,{className:`vault-tree vault-results grid gap-px`,"aria-label":`Matching files`,children:o.map(e=>(0,P.jsx)(G,{entry:e,current:n.path===e.path,label:e.path},e.path))}),c>0?(0,P.jsxs)(`p`,{className:J,"data-vault-more":!0,children:[c,` more match`,c===1?``:`es`,`; refine the filter.`]}):null]})}var X=`vault-crumb rounded-[6px] px-1.5 py-0.5 text-sm text-muted no-underline hover:bg-surface hover:text-text`;function se({rootName:e,search:t}){let n=U(t.path??t.dir??``);return(0,P.jsx)(`nav`,{className:`vault-breadcrumb min-w-0`,"aria-label":`Breadcrumb`,"data-vault-crumb":!0,children:(0,P.jsxs)(`ol`,{className:`m-0 flex min-w-0 list-none items-center gap-0.5 overflow-hidden p-0 text-sm text-muted`,children:[(0,P.jsx)(`li`,{className:`flex-none`,children:n.length===0?(0,P.jsx)(`span`,{"aria-current":`page`,className:`px-1.5 font-semibold text-text`,children:e}):(0,P.jsx)(K,{dir:null,className:X,children:e})}),n.map((e,t)=>{let r=n.slice(0,t+1).join(`/`),i=t===n.length-1;return(0,P.jsxs)(`li`,{className:v(`flex items-center gap-0.5`,i?`min-w-0`:`flex-none max-md:hidden`),children:[(0,P.jsx)(`span`,{"aria-hidden":`true`,children:`/`}),i?(0,P.jsx)(`span`,{"aria-current":`page`,className:`truncate px-1.5 font-semibold text-text`,children:e}):(0,P.jsx)(K,{dir:r,className:X,children:e})]},r)})]})})}function ce(e,t){let n=e;for(let e of U(t)){let t=n?.find(t=>t.kind===`directory`&&t.name===e);if(!t)return null;n=t.children}return n??null}function le({data:e,rootName:t}){let n=e.failure?(0,P.jsxs)(`p`,{className:Y,children:[`The files could not be listed: `,e.failure]}):e.tree===null?(0,P.jsx)(`p`,{className:v(J,`empty`),children:`Listing files…`}):null,r=e.dir?U(e.dir):[],i=r.at(-1)??t;if(n)return(0,P.jsx)(`div`,{"data-vault-slot":`listing`,className:`vault-listing mx-auto w-full max-w-[820px] px-10 py-8`,"aria-busy":e.tree===null,children:n});let a=(e.dir?ce(e.tree,e.dir):null)??e.tree;return(0,P.jsxs)(`div`,{"data-vault-slot":`listing`,className:`vault-listing mx-auto grid w-full max-w-[820px] gap-4 px-10 py-8 max-sm:px-4`,children:[(0,P.jsx)(`h1`,{className:`m-0 text-xl font-semibold`,children:i}),e.dirMissing?(0,P.jsx)(`p`,{className:Y,children:`That folder is not in the tree; showing the root.`}):null,a.length===0&&r.length===0?(0,P.jsx)(`p`,{className:v(J,`empty`),children:`This companion has no markdown files.`}):(0,P.jsx)(S,{title:`In this folder`,count:a.length,children:(0,P.jsxs)(`ul`,{className:`vault-rows m-0 list-none p-0`,"aria-label":`Folder contents`,children:[r.length>0?(0,P.jsx)(`li`,{children:(0,P.jsxs)(K,{dir:r.length>1?r.slice(0,-1).join(`/`):null,className:v(y,`vault-row py-1.5`),children:[(0,P.jsx)(x,{name:`left`,className:`text-muted`}),(0,P.jsx)(`span`,{children:`..`})]})}):null,a.map(e=>(0,P.jsx)(`li`,{children:e.kind===`directory`?(0,P.jsxs)(K,{dir:e.path,className:v(y,`vault-row py-1.5 font-semibold`),children:[(0,P.jsx)(x,{name:`folder`,className:`text-muted`}),(0,P.jsx)(`span`,{className:`truncate`,children:e.name})]}):(0,P.jsxs)(f,{to:`/vault`,search:t=>({...t,path:e.path,dir:void 0,mode:void 0}),className:v(y,`vault-row py-1.5`),children:[(0,P.jsx)(x,{name:`doc`,className:`text-muted`}),(0,P.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.path))]})})]})}function Z(e){return typeof e==`string`?e:(e.c??[]).map(Z).join(``)}function ue(e){return(e??[]).filter(e=>typeof e!=`string`&&e.t===`h2`).map((e,t)=>({index:t,text:Z(e)}))}var Q=e=>[...e?.querySelectorAll(`article .markdown-body h2`)??[]];function de(e,t,n){let[r,i]=(0,j.useState)(null);return(0,j.useEffect)(()=>{if(!t)return;let n=e.current,r=Q(n);if(r.length===0||typeof IntersectionObserver>`u`)return;let a=new IntersectionObserver(e=>{let t=e.find(e=>e.isIntersecting);t&&i(r.indexOf(t.target))},{root:n,rootMargin:`-60px 0px -70% 0px`});for(let e of r)a.observe(e);return()=>a.disconnect()},[e,t]),{current:r!==null&&r<n?r:0,go:t=>{Q(e.current)[t]?.scrollIntoView({behavior:`smooth`,block:`start`}),i(t)}}}function fe({headings:e,current:t,go:n}){return(0,P.jsxs)(`nav`,{className:`vault-outline min-h-0 overflow-auto border-l border-rule-soft px-5 pt-[72px] pb-6 @max-[1080px]:hidden`,"aria-label":`Outline`,children:[(0,P.jsx)(`h2`,{className:`m-0 mb-2 text-xs font-semibold text-muted`,children:`On this page`}),(0,P.jsx)(`ol`,{className:`m-0 grid list-none gap-0.5 p-0`,children:e.map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(`button`,{type:`button`,className:v(`block w-full truncate rounded-r-[8px] border-0 bg-transparent px-2.5 py-1 text-left text-sm text-text hover:bg-surface`,t===e.index&&`font-semibold text-accent shadow-[inset_2px_0_0_var(--accent)]`),"aria-current":t===e.index?`location`:void 0,onClick:()=>n(e.index),children:e.text})},e.index))})]})}var pe=[],$=(e,t)=>[e?`272px`:null,`minmax(0,1fr)`,t?`232px`:null].filter(Boolean).join(` `);function me({data:e,companion:t,search:r,stale:i,refresh:a,filter:o,setFilter:s,hidden:c}){return(0,P.jsxs)(`aside`,{hidden:c,className:`vault-tree-panel flex min-h-0 flex-col border-r border-rule @max-[720px]:max-h-[40vh] @max-[720px]:border-r-0 @max-[720px]:border-b`,id:`vault-tree-panel`,"aria-label":`Files`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between pt-3 pr-2.5 pb-2 pl-5`,children:[(0,P.jsx)(`strong`,{className:`text-sm`,children:`Files`}),(0,P.jsx)(n,{label:`Refresh tree`,side:`bottom`,children:(0,P.jsx)(C,{size:`icon-sm`,variant:`ghost`,"aria-label":a.isPending?`Refreshing…`:`Refresh tree`,onClick:()=>a.mutate(),disabled:a.isPending,children:(0,P.jsx)(x,{name:`refresh`,className:a.isPending?`animate-spin`:void 0})})})]}),(0,P.jsx)(`p`,{id:`vault-stale`,className:Y+` mx-2.5`,role:`status`,hidden:!i,children:`Files changed — refresh tree.`}),a.error?(0,P.jsx)(`p`,{className:Y+` mx-2.5`,role:`status`,children:a.error.message}):null,(0,P.jsxs)(`label`,{className:`mx-3.5 mb-2 flex h-[34px] items-center gap-2 rounded-control border border-rule bg-surface pr-2 pl-2.5 text-muted focus-within:border-accent`,children:[(0,P.jsx)(x,{name:`search`,className:`size-3.5`}),(0,P.jsx)(`input`,{type:`search`,id:`vault-filter`,className:`vault-filter min-w-0 flex-1 border-0 bg-transparent text-sm text-text outline-none placeholder:text-muted`,placeholder:`Go to file`,"aria-label":`Go to file`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Escape`&&s(``)}})]}),(0,P.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto px-2.5 pb-6`,children:o.trim()?(0,P.jsx)(oe,{companion:t,query:o,search:r}):(0,P.jsx)(ie,{data:e,companion:t,search:r})})]})}function he({companion:e,rootName:t,writable:r,search:o}){let s=T(),c=w(p(e,o)),l=w({...p(e,o,!0),enabled:!(!c.data||c.data.tree!==null||c.data.failure)}).data??c.data,[f,m]=(0,j.useState)(``),h=a(e=>e.latestGeneration),g=a(e=>e.treeHidden),v=a(e=>e.toggleTree),y=a(e=>e.hydrate);(0,j.useEffect)(y,[y]);let b=_({mutationFn:()=>u({data:{companion:e,path:o.path,dir:o.dir,refresh:!0,wait:!0}}),onSuccess:t=>void d(s,e,o,t)}),S=(0,j.useRef)(null),E=!!l?.open&&o.mode!==`edit`,D=E?ue(l?.open?.markdown):pe,O=de(S,E?l?.open?.markdown:void 0,D.length);if(!l)return(0,P.jsx)(i,{});let k=h!==null&&l.generation!==null&&h>l.generation,A=D.length>0,M=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{label:g?`Show files`:`Hide files`,side:`bottom`,children:(0,P.jsx)(C,{size:`icon-sm`,variant:`ghost`,id:`vault-tree-toggle`,"aria-controls":`vault-tree-panel`,"aria-expanded":!g,"aria-label":g?`Show files`:`Hide files`,onClick:v,children:(0,P.jsx)(x,{name:`sidebar`})})}),(0,P.jsx)(se,{rootName:t,search:o})]});return(0,P.jsx)(`div`,{className:`@container flex min-h-0 flex-1 flex-col`,children:(0,P.jsxs)(`section`,{className:`vault-layout grid min-h-0 flex-1 border-t border-rule @max-[720px]:grid-cols-1!`,style:{"--vault-wide":$(!0,A),"--vault-wide-bare":$(!1,A),"--vault-narrow":$(!0,!1),"--vault-narrow-bare":$(!1,!1)},"data-vault-layout":!0,children:[(0,P.jsx)(me,{data:l,companion:e,search:o,stale:k,refresh:b,filter:f,setFilter:m,hidden:g}),(0,P.jsx)(`div`,{ref:S,className:`vault-main min-h-0 min-w-0 overflow-auto scroll-smooth`,"data-vault-main":!0,"data-vault-pane":!0,children:o.path||l.open||l.refusal?(0,P.jsx)(B,{companion:e,data:l,writable:r,search:o,crumbs:M}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(I,{crumbs:M}),(0,P.jsx)(le,{data:l,rootName:t})]})}),A?(0,P.jsx)(fe,{headings:D,...O}):null]})})}function ge(){let e=t.useSearch(),{data:n}=r(g({companion:e.companion,studioMode:e.studioMode}));if(!e.companion||!n.selected)return null;let i=n.selected.path.split(/[\\/]/).findLast(Boolean)??`companion`;return(0,P.jsx)(he,{companion:e.companion,rootName:i,writable:n.writable,search:{path:e.path,dir:e.dir,mode:e.mode}})}export{ge as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Lr as e,it as t}from"./button-CX0sWAJl.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n();function i({warnings:n}){return n.length===0?null:(0,r.jsx)(`section`,{className:e(t,`pb-4`),"aria-label":`Warnings`,children:(0,r.jsxs)(`div`,{className:`warnings grid gap-1.5 rounded-card border border-[color-mix(in_srgb,var(--warn)_35%,var(--border))] bg-warn-soft px-4 py-3 text-sm`,children:[(0,r.jsx)(`h2`,{className:`m-0 text-sm font-semibold text-warn`,children:`Some data could not be read`}),(0,r.jsx)(`ul`,{className:`m-0 grid list-none gap-1 p-0`,children:n.map(e=>(0,r.jsx)(`li`,{children:e},e))})]})})}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Lr as e,et as t,it as n,ot as r,rt as i,tt as a,zr as o}from"./button-CX0sWAJl.js";import{D as s,T as c,i as l,k as u,m as d}from"./index-CysBCSxM.js";import{a as f}from"./studio-queries-BflKt9va.js";import{t as p}from"./companion-view-DINdPF-b.js";import{p as m}from"./studio-0ueISxwP.js";import{t as h}from"./warnings-B-rvoW8q.js";import{a as g,n as _,t as v}from"./jsx-runtime-MZURdZre.js";import{n as y,r as b,t as x}from"./panel-Csr49lBo.js";import{i as S,n as C,r as ee,t as w}from"./steps-CKUno4lh.js";var T=g(_(),1),E=e=>({id:e.id,kind:`stage`,step:e});function D(e){let t=e.map.map(e=>e.kind===`stage`?{nodes:[E(e.step)],optional:e.step.optional,phase:e.step.phase}:e.group===`human`?{nodes:[{id:C(e.steps[0]),kind:`review-group`,steps:e.steps}],optional:e.steps[0].optional,phase:e.steps[0].phase}:{nodes:e.steps.map(E),optional:!0,phase:e.steps[0].phase});return t.unshift({nodes:[{id:`start`,kind:`start`}],optional:!1,phase:t[0]?.phase??`plan`}),t}function O(e){return e.kind===`stage`?!!e.step.sessionBreakBefore:e.kind===`review-group`&&!!e.steps[0].sessionBreakBefore}function k(e){let t=[],n=(e,n,r)=>{for(let i of e)for(let e of n)t.push({from:i.id,to:e.id,kind:r,newSession:O(e)})};return e.forEach((t,r)=>{let i=e[r+1];i&&n(t.nodes,i.nodes,`flow`);let a=e[r-1];t.optional&&a&&i&&n(a.nodes,i.nodes,`bypass`)}),t}function A(e){let t=[];return e.forEach((e,n)=>{let r=t.at(-1);r?.phase===e.phase?r.to=n+1:t.push({phase:e.phase,label:w[e.phase],from:n,to:n+1})}),t}function j(e){let t=e.findIndex(e=>e.nodes.some(e=>e.id===`submit`));return t===-1?null:{from:0,to:t+1}}function M(e){let t=D(e),n=Math.max(1,...t.map(e=>e.nodes.length)),r=t.flatMap((e,t)=>e.nodes.map((r,i)=>e.nodes.length===1?{...r,column:t,row:0,rowSpan:n}:{...r,column:t,row:i,rowSpan:1}));return{columns:t.length,rows:n,nodes:r,edges:k(t),bands:A(t),cycle:j(t)}}var N=e=>e.rows*2+1;function P(e){return{along:e.column+.5,across:e.row*2+e.rowSpan}}var F=e=>Math.round(e*1e4)/1e4,I=(e,t)=>`${F(e/t*100)}%`,L=({along:e,across:t})=>`${F(t)} ${F(e)}`;function R(e,t){let n=t=>{let n=e.nodes.find(e=>e.id===t);if(!n)throw Error(`Unknown graph node: ${t}`);return P(n)};return[n(t.from),n(t.to)]}function z(e,t){let[n,r]=R(e,t);if(t.kind===`bypass`){let t=N(e);return`M ${L(n)} C ${L({along:n.along,across:t})}, ${L({along:r.along,across:t})}, ${L(r)}`}let i=(n.along+r.along)/2;return`M ${L(n)} C ${L({along:i,across:n.across})}, ${L({along:i,across:r.across})}, ${L(r)}`}function B(e,t){let[n,r]=R(e,t),i=(n.along+r.along)/2;return t.kind===`bypass`?{along:i,across:(n.across+r.across)/8+N(e)*3/4}:{along:i,across:(n.across+r.across)/2}}function V(e,t){return{x:I(t.across,N(e)),y:I(t.along,e.columns)}}function H(e,t){return{top:I(t.from,e.columns),height:I(t.to-t.from,e.columns)}}var U=v(),W={},G=[];function K({payload:e,counts:t=W,changesByStage:n=G}){let r=S({skills:e.skills&&e.skills.length>0?e.skills:void 0,topology:e.topology,workflow:e.workflow}),[i,a]=(0,T.useState)(r.paths[0].schema),o=r.paths.find(e=>e.schema===i)??r.paths[0];return(0,U.jsx)(`section`,{className:`workflow-delivery-path @container grid content-start gap-2`,"aria-label":`Delivery Path`,children:(0,U.jsx)(q,{path:o,paths:r.paths,onSchemaChange:a,counts:t,changesByStage:n})})}function q({path:t,paths:o,onSchemaChange:s,counts:c,changesByStage:l}){let[u,d]=(0,T.useState)(null),f=t.steps.find(e=>e.id===u)??null,p=l.filter(e=>e.changes.length>0);return(0,U.jsxs)(`div`,{className:e(n,`workflow-path grid grid-cols-[minmax(380px,520px)_minmax(260px,1fr)] items-start gap-10 pt-10 pb-12 @max-[880px]:grid-cols-1`),"data-workflow-schema-panel":t.schema,children:[(0,U.jsxs)(`div`,{className:`workflow-path-graph grid min-w-0 justify-items-center gap-9 px-8 pt-4`,children:[(0,U.jsx)(Z,{path:t,selected:u,onSelect:d,counts:c}),(0,U.jsx)(te,{})]}),(0,U.jsxs)(`div`,{className:`workflow-detail-overview grid content-start gap-5`,id:J(t),children:[(0,U.jsxs)(`div`,{className:`grid gap-2 text-sm leading-relaxed text-muted`,children:[(0,U.jsx)(`p`,{className:`workflow-description m-0 text-text`,children:t.description}),t.reviewsKnown?null:(0,U.jsx)(`p`,{className:`workflow-description m-0`,children:`The schema's artifacts could not be read, so its review stages are unknown.`}),(0,U.jsx)(`p`,{className:`workflow-description m-0`,children:`A workset is one or more changes published together: after Submit change, start again at the top for the next change, and publish once the workset is merged.`}),(0,U.jsx)(`p`,{className:`workflow-detail-hint m-0`,children:`Choose a stage to see what it does and the prompt that runs it.`})]}),p.length>0?(0,U.jsx)(i,{title:`Where your changes are`,children:(0,U.jsx)(`ul`,{className:`m-0 list-none p-0`,children:p.map(e=>(0,U.jsxs)(`li`,{className:`grid gap-1 border-t border-rule-soft px-4 py-2 first:border-t-0`,children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-2 text-sm font-semibold`,children:[e.label,(0,U.jsx)(a,{value:e.changes.length})]}),(0,U.jsx)(`span`,{className:`truncate font-mono text-xs text-muted`,children:e.changes.join(`, `)})]},e.node))})}):null]}),(0,U.jsx)(b,{items:t.steps.map(e=>e.id),current:f?.id??null,onSelect:d,title:f?`Stage ${f.label}`:`Stage`,children:f?(0,U.jsx)(re,{step:f,stepsKnown:t.stepsKnown,changes:l.find(e=>e.node===C(f))?.changes??[],children:f.kind===`human`?(0,U.jsx)(y,{title:`OpenSpec schema`,children:(0,U.jsxs)(`div`,{className:`grid gap-2`,"data-workflow-schema-root":!0,children:[o.length>1?(0,U.jsx)(r,{label:`OpenSpec schema`,value:t.schema,onChange:e=>{let t=o.find(t=>t.schema===e);t&&(t.steps.some(e=>e.id===u)||d(t.steps.find(e=>e.kind===`human`)?.id??null),s(e))},options:o.map(e=>({value:e.schema,label:e.label}))}):(0,U.jsx)(`code`,{className:`font-mono text-sm`,children:t.label}),(0,U.jsx)(`span`,{className:`text-sm text-muted`,children:t.tagline})]})}):null}):null})]})}var J=e=>`workflow-${e.schema}-overview`,Y=(e,t,n)=>e.startsWith(`reviews`)?`${n} ${n===1?`change waits`:`changes wait`} for review`:`${n} ${n===1?`change`:`changes`} at ${t}`;function X({count:e,name:t}){return e?(0,U.jsx)(`span`,{className:`workflow-graph-count absolute -top-2.5 -right-2.5 z-1 inline-grid h-5 min-w-5 place-items-center rounded-full border border-[color-mix(in_srgb,var(--accent)_45%,var(--border))] bg-accent-soft px-1.5 font-sans text-2xs font-bold text-text`,"aria-label":t,role:`img`,children:e}):null}function Z({path:e,label:t=`Delivery Path map`,selected:n=null,onSelect:r,counts:i=W}){let a=M(e),o=!r;return(0,U.jsxs)(`nav`,{className:`workflow-graph`,"aria-label":t,style:{"--graph-columns":String(a.columns),"--graph-rows":String(a.rows)},children:[(0,U.jsxs)(`div`,{className:`workflow-graph-bands`,"aria-hidden":`true`,children:[a.bands.map(e=>(0,U.jsx)(`div`,{className:`workflow-graph-band`,"data-band":e.phase,style:H(a,e),children:e.label},e.phase)),a.cycle?(0,U.jsx)(`div`,{className:`workflow-graph-cycle`,style:H(a,a.cycle),children:(0,U.jsx)(`span`,{children:`repeats for each change`})}):null,(0,U.jsx)(`div`,{className:`workflow-graph-workset`,children:(0,U.jsx)(`span`,{children:`workset`})})]}),(0,U.jsx)(ne,{graph:a}),(0,U.jsx)(`ol`,{className:`workflow-graph-nodes`,children:a.nodes.map(e=>e.kind===`start`?null:(0,U.jsx)(`li`,{className:`workflow-graph-node`,"data-node-kind":e.kind,style:{"--graph-row":String(e.column+1),"--graph-lane":String(e.row+1),"--graph-span":String(e.rowSpan)},children:e.kind===`stage`?(0,U.jsxs)(`span`,{className:`relative max-w-full`,children:[(0,U.jsx)($,{step:e.step,box:!0,plain:o,current:n===e.step.id,onSelect:r}),o?null:(0,U.jsx)(X,{count:i[e.id],name:Y(e.id,e.step.label,i[e.id]??0)})]}):(0,U.jsxs)(`div`,{className:`workflow-graph-box workflow-graph-group relative`,"data-map-group":`human`,"data-current":e.steps.some(e=>e.id===n)?`true`:void 0,children:[o?(0,U.jsx)(`span`,{className:`workflow-graph-group-label`,children:Q(e.steps)}):(0,U.jsx)(`button`,{type:`button`,className:`workflow-graph-group-label cursor-pointer rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent`,onClick:()=>r?.(e.steps[0].id),children:Q(e.steps)}),(0,U.jsx)(`ol`,{children:e.steps.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsx)($,{step:e,plain:o,current:n===e.id,onSelect:r})},e.id))}),o?null:(0,U.jsx)(X,{count:i[e.id],name:Y(e.id,Q(e.steps),i[e.id]??0)})]})},e.id))})]})}function Q(e){let[t]=e;return t?.kind===`human`?t.groupLabel:`Human review`}function te(){return(0,U.jsxs)(`ul`,{className:`workflow-graph-legend`,"aria-hidden":`true`,children:[(0,U.jsxs)(`li`,{children:[(0,U.jsx)(`i`,{className:`workflow-legend-optional`}),`optional`]}),(0,U.jsxs)(`li`,{children:[(0,U.jsx)(`i`,{className:`workflow-graph-openspec`}),`OpenSpec`]}),(0,U.jsxs)(`li`,{children:[(0,U.jsx)(`i`,{className:`workflow-legend-session`}),`new session`]}),(0,U.jsxs)(`li`,{children:[(0,U.jsx)(`i`,{className:`workflow-legend-skip`}),`can be skipped`]})]})}function ne({graph:e}){return(0,U.jsxs)(`svg`,{className:`workflow-graph-layer`,"aria-hidden":`true`,focusable:`false`,children:[(0,U.jsx)(`svg`,{viewBox:`0 0 ${N(e)} ${e.columns}`,preserveAspectRatio:`none`,overflow:`visible`,children:e.edges.map(t=>(0,U.jsx)(`path`,{className:`workflow-graph-edge`,d:z(e,t),"data-edge-kind":t.kind,"data-edge-from":t.from,"data-edge-to":t.to,"data-new-session":t.newSession?`true`:void 0},`${t.kind}-${t.from}-${t.to}`))}),e.nodes.map(t=>{if(t.kind!==`start`)return null;let{x:n,y:r}=V(e,P(t));return(0,U.jsx)(`circle`,{className:`workflow-graph-start`,cx:n,cy:r,r:`3.5`},t.id)}),e.edges.map(t=>{if(!t.newSession)return null;let{x:n,y:r}=V(e,B(e,t));return(0,U.jsx)(`circle`,{className:`workflow-graph-session`,"data-session-mark":t.to,cx:n,cy:r,r:`3.5`},`${t.from}-${t.to}`)})]})}function $({step:e,box:t,plain:n,current:r,onSelect:i}){let a={className:t?`workflow-graph-link workflow-graph-box`:`workflow-graph-link`,"data-map-stage":e.id,"data-stage-kind":e.kind,"data-optional":e.optional?`true`:void 0},o=(0,U.jsxs)(U.Fragment,{children:[e.badges.includes(`openspec`)?(0,U.jsx)(`span`,{className:`workflow-graph-openspec`,"aria-hidden":`true`}):null,e.kind===`human`?e.artifact:e.label]});return n?(0,U.jsx)(`span`,{...a,children:o}):(0,U.jsx)(`button`,{type:`button`,...a,"aria-label":e.kind===`human`?e.label:void 0,"aria-current":r?`true`:void 0,onClick:()=>i?.(e.id),children:o})}function re({step:e,stepsKnown:t,changes:n,children:r}){return(0,U.jsxs)(`article`,{className:`workflow-card`,"data-stage":e.id,"data-stage-kind":e.kind,"data-optional":e.optional?`true`:void 0,children:[(0,U.jsx)(x,{title:e.label,kicker:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:w[e.phase]}),e.optional?(0,U.jsx)(`span`,{children:`· optional`}):null,e.kind===`human`?(0,U.jsx)(`span`,{className:`text-why`,children:`· human review`}):null,e.badges.includes(`openspec`)?(0,U.jsx)(`span`,{children:`· OpenSpec`}):null]}),children:e.skill||e.sessionBreakBefore?(0,U.jsxs)(`p`,{className:`m-0 flex flex-wrap items-center gap-2 text-sm text-muted`,children:[e.skill?(0,U.jsx)(`code`,{className:`font-mono text-text`,children:e.skill}):null,e.sessionBreakBefore?(0,U.jsxs)(`span`,{className:`workflow-card-session inline-flex items-center gap-1.5 text-accent`,children:[(0,U.jsx)(`span`,{className:`size-2 rounded-full border-[1.5px] border-accent`,"aria-hidden":`true`}),`New session / clean chat`]}):null]}):null}),r,(0,U.jsxs)(y,{title:e.kind===`human`?`How it runs`:`Run`,children:[(0,U.jsx)(ie,{step:e}),e.missingSkill?(0,U.jsxs)(`p`,{className:`workflow-missing-skill m-0 text-sm text-warn`,role:`note`,children:[`Skill not reported for this companion:`,` `,(0,U.jsx)(`code`,{className:`font-mono`,children:e.missingSkill}),`. Run`,` `,(0,U.jsx)(`code`,{className:`font-mono`,children:`mate companion update`}),`; this stage is not complete.`]}):null]}),e.kind===`skill`&&t?(0,U.jsx)(y,{title:`Steps`,aside:e.source,children:(0,U.jsx)(`ol`,{className:`workflow-stage-steps m-0 grid list-decimal gap-1 pl-5 text-sm`,children:e.steps.map((e,t)=>(0,U.jsx)(`li`,{children:(0,U.jsx)(`code`,{className:`font-mono`,children:e.skill})},`${t}-${e.skill}`))})}):null,(0,U.jsx)(y,{title:`What`,children:(0,U.jsx)(`p`,{className:`m-0 text-sm leading-relaxed`,children:e.what})}),(0,U.jsx)(y,{title:`Why`,children:(0,U.jsx)(`p`,{className:`m-0 text-sm leading-relaxed`,children:e.why})}),n.length>0?(0,U.jsx)(y,{title:`Changes at this stage`,aside:String(n.length),children:(0,U.jsx)(`ul`,{className:`m-0 grid list-none gap-1 p-0`,children:n.map(e=>(0,U.jsx)(`li`,{className:`truncate font-mono text-sm`,children:e},e))})}):null]})}function ie({step:e}){return e.kind===`human`?(0,U.jsxs)(`p`,{className:`workflow-card-human m-0 text-sm`,children:[`Review `,e.artifact,` yourself — no skill, no prompt`]}):e.alternatives?.length?(0,U.jsx)(`div`,{className:`workflow-option-list grid gap-3`,children:e.alternatives.map(e=>(0,U.jsxs)(`div`,{className:`workflow-option grid gap-1.5`,children:[(0,U.jsx)(t,{text:e.prompt,copy:e.copyPrompt,label:`${e.name} prompt`}),(0,U.jsx)(`small`,{className:`text-xs text-muted`,children:e.description})]},e.name))}):e.prompt?(0,U.jsx)(t,{text:e.prompt,copy:e.copyPrompt??e.prompt,label:`${e.label} prompt`}):null}var ae=m();function oe(e,t){let n=e.map(e=>({name:e.name,stage:u(e,t).stageId})),r=s(t).map(e=>({node:e.kind===`review`?ee(e.id):e.id,label:e.label,changes:n.flatMap(t=>t.stage===e.id?[t.name]:[])})),i={};for(let e of r)e.changes.length>0&&(i[e.node]=e.changes.length);return{counts:i,byStage:r}}var se=[];function ce({payload:e,changes:t=se}){let{counts:n,byStage:r}=oe(t,e.workflow??ae);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(h,{warnings:e.warnings}),(0,U.jsx)(`div`,{className:`workflow-view`,children:(0,U.jsx)(K,{payload:e,counts:n,changesByStage:r})})]})}var le=function(){let e=l.useSearch(),t=d(),n=o({...f(`dashboard`,e),enabled:t});return(0,U.jsx)(p,{view:`workflow`,search:e,children:e=>(0,U.jsx)(ce,{payload:{skills:e.skills??[],topology:e.topology??null,warnings:e.warnings,workflow:e.workflow},changes:c(n.data?.changes??[],n.data?.submitted??[])})})};export{le as component};
|
|
@@ -37,61 +37,77 @@ function useMatch(opts) {
|
|
|
37
37
|
}
|
|
38
38
|
// \0%23tanstack-start-server-fn-resolver
|
|
39
39
|
var manifest = {
|
|
40
|
+
"129eb7026f249381cdf25972dd63a821750853b2ea77ea3a1fdd22b56f1b24ec": {
|
|
41
|
+
functionName: "setFrictionRecording_createServerFn_handler",
|
|
42
|
+
importer: () => import("./friction-CWOTjpCV.js")
|
|
43
|
+
},
|
|
44
|
+
"3d0d77471aa778cecabd4e5db91ab864e236510fba212a7e364cf9ee35750729": {
|
|
45
|
+
functionName: "getFriction_createServerFn_handler",
|
|
46
|
+
importer: () => import("./friction-CWOTjpCV.js")
|
|
47
|
+
},
|
|
40
48
|
"3fcb2bd7158d460f09117ddf736a3fc4d2e1cf934bfd85a7de1e60845d0163a6": {
|
|
41
49
|
functionName: "getGraph_createServerFn_handler",
|
|
42
|
-
importer: () => import("./graph-
|
|
50
|
+
importer: () => import("./graph-B11ITte0.js")
|
|
43
51
|
},
|
|
44
52
|
"5e73090d9c6425d4df9cce1d826a9c73a3d311894aa464b4ec5b9264b275b9b8": {
|
|
45
53
|
functionName: "getUsage_createServerFn_handler",
|
|
46
|
-
importer: () => import("./usage-
|
|
54
|
+
importer: () => import("./usage-Cwle9-xY.js")
|
|
47
55
|
},
|
|
48
56
|
"63d1e2171062e2d082e16522c162963c4da2a71c447f69f0937bd6e5e10b73ba": {
|
|
49
57
|
functionName: "saveVaultFile_createServerFn_handler",
|
|
50
|
-
importer: () => import("./vault-
|
|
58
|
+
importer: () => import("./vault-CEBBRLMb.js")
|
|
51
59
|
},
|
|
52
60
|
"7564d662d1e0ede6133407d7dde8d613b3b11718bc4f95160680342deeaf9cfd": {
|
|
53
61
|
functionName: "getVaultChildren_createServerFn_handler",
|
|
54
|
-
importer: () => import("./vault-
|
|
62
|
+
importer: () => import("./vault-CEBBRLMb.js")
|
|
55
63
|
},
|
|
56
64
|
"8a3086c4bf87fd353e471c38fe6c5e531cb9aa6b29b234d7edb6de5d143cf689": {
|
|
57
65
|
functionName: "getSkillPreview_createServerFn_handler",
|
|
58
|
-
importer: () => import("./skills-
|
|
66
|
+
importer: () => import("./skills-DGg0mWDM.js")
|
|
59
67
|
},
|
|
60
68
|
"990d830ca9afc020639551c43ec50904b734051c52b1ad91dbf739065b343bb3": {
|
|
61
69
|
functionName: "getReports_createServerFn_handler",
|
|
62
|
-
importer: () => import("./reports-
|
|
70
|
+
importer: () => import("./reports-B9k98oE6.js")
|
|
63
71
|
},
|
|
64
72
|
"99f4d57911b5959a331ed18424ab13369de22f8b2b142a146ea967742dfbc997": {
|
|
65
73
|
functionName: "getVaultMatches_createServerFn_handler",
|
|
66
|
-
importer: () => import("./vault-
|
|
74
|
+
importer: () => import("./vault-CEBBRLMb.js")
|
|
67
75
|
},
|
|
68
76
|
"9d1ee2ce056a1b26a05141623f6d836fa1c4c283e555132764a528a212e3c50a": {
|
|
69
77
|
functionName: "deleteCompanion_createServerFn_handler",
|
|
70
|
-
importer: () => import("./companions-
|
|
78
|
+
importer: () => import("./companions-Dr6IpNAb.js")
|
|
71
79
|
},
|
|
72
80
|
"a09876e9d912d4f3edfe004081679f011fcebe77cfe1b2b25cf6f3e6f1eafc6a": {
|
|
73
81
|
functionName: "getCompanionView_createServerFn_handler",
|
|
74
|
-
importer: () => import("./views-
|
|
82
|
+
importer: () => import("./views-UgO0Qz_g.js")
|
|
75
83
|
},
|
|
76
84
|
"b2e22d82aeef8a3802144ae67d3a53a4fff5860a1a0b957618e8dcc7c0ef36c8": {
|
|
77
85
|
functionName: "getGuide_createServerFn_handler",
|
|
78
|
-
importer: () => import("./guides-
|
|
86
|
+
importer: () => import("./guides-B8HdeK_C.js")
|
|
79
87
|
},
|
|
80
88
|
"b4cd58adfccec803b6c97478c78656e3acf554351ec97ef0ce550a10e235ebce": {
|
|
81
89
|
functionName: "getShell_createServerFn_handler",
|
|
82
|
-
importer: () => import("./shell-
|
|
90
|
+
importer: () => import("./shell-DLkP7wG9.js")
|
|
83
91
|
},
|
|
84
92
|
"c9e07976b298f1d1353d3422b03638f260b66975d28a1c8b07919923be8c488d": {
|
|
85
93
|
functionName: "previewVaultFile_createServerFn_handler",
|
|
86
|
-
importer: () => import("./vault-
|
|
94
|
+
importer: () => import("./vault-CEBBRLMb.js")
|
|
87
95
|
},
|
|
88
96
|
"cc0685774bfb5205a762c25bdd4b959c1f541584df4b67aac816fe529fa37c87": {
|
|
89
97
|
functionName: "getVault_createServerFn_handler",
|
|
90
|
-
importer: () => import("./vault-
|
|
98
|
+
importer: () => import("./vault-CEBBRLMb.js")
|
|
91
99
|
},
|
|
92
100
|
"ce3152edd0f9f5f9d010eb4e4217f988b6787024b3f6a48677370a325f4698aa": {
|
|
93
101
|
functionName: "addCompanion_createServerFn_handler",
|
|
94
|
-
importer: () => import("./companions-
|
|
102
|
+
importer: () => import("./companions-Dr6IpNAb.js")
|
|
103
|
+
},
|
|
104
|
+
"e257827a07a72fbb27ff303a6d721f51ae699f21ddaaa8fb7b1f33203d573c56": {
|
|
105
|
+
functionName: "markFriction_createServerFn_handler",
|
|
106
|
+
importer: () => import("./friction-CWOTjpCV.js")
|
|
107
|
+
},
|
|
108
|
+
"f1599335a08f9f65c30311d4e51c4cfad933345d616c61c8945d5183444c2503": {
|
|
109
|
+
functionName: "getFrictionRecording_createServerFn_handler",
|
|
110
|
+
importer: () => import("./friction-CWOTjpCV.js")
|
|
95
111
|
}
|
|
96
112
|
};
|
|
97
113
|
async function getServerFnById(id, access) {
|
|
@@ -4,6 +4,7 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
4
4
|
filePath: "src/routes/__root.tsx",
|
|
5
5
|
children: [
|
|
6
6
|
"/",
|
|
7
|
+
"/friction",
|
|
7
8
|
"/getting-started",
|
|
8
9
|
"/graph",
|
|
9
10
|
"/reports",
|
|
@@ -15,126 +16,141 @@ var tsrStartManifest = () => ({ routes: {
|
|
|
15
16
|
"/plugins/$service/$view"
|
|
16
17
|
],
|
|
17
18
|
preloads: [
|
|
18
|
-
"/assets/index-
|
|
19
|
+
"/assets/index-CysBCSxM.js",
|
|
19
20
|
"/assets/jsx-runtime-MZURdZre.js",
|
|
20
|
-
"/assets/button-
|
|
21
|
-
"/assets/useBaseQuery-
|
|
22
|
-
"/assets/studio-queries-
|
|
21
|
+
"/assets/button-CX0sWAJl.js",
|
|
22
|
+
"/assets/useBaseQuery-C2cjmeH2.js",
|
|
23
|
+
"/assets/studio-queries-BflKt9va.js",
|
|
23
24
|
"/assets/useSelector-AYcH7lB0.js",
|
|
24
|
-
"/assets/studio-
|
|
25
|
-
"/assets/
|
|
26
|
-
"/assets/queries-
|
|
27
|
-
"/assets/
|
|
28
|
-
"/assets/
|
|
25
|
+
"/assets/studio-0ueISxwP.js",
|
|
26
|
+
"/assets/prepaint-CKsXyJOR.js",
|
|
27
|
+
"/assets/queries-Dfp5deWj.js",
|
|
28
|
+
"/assets/search-CXosfvYh.js",
|
|
29
|
+
"/assets/react-BYUSgtBs.js",
|
|
30
|
+
"/assets/fields-BobQ7zRF.js",
|
|
31
|
+
"/assets/useMutation-DI6LbvVa.js",
|
|
29
32
|
"/assets/preload-helper-BLdHbfdN.js",
|
|
30
|
-
"/assets/guides-
|
|
33
|
+
"/assets/guides-D6T6W_jV.js",
|
|
34
|
+
"/assets/store-DyXbi6o9.js",
|
|
35
|
+
"/assets/useAnchoredPopupScrollLock-BBXJpX5L.js"
|
|
31
36
|
],
|
|
32
37
|
scripts: [{ attrs: {
|
|
33
38
|
type: "module",
|
|
34
39
|
async: !0,
|
|
35
|
-
src: "/assets/index-
|
|
40
|
+
src: "/assets/index-CysBCSxM.js"
|
|
36
41
|
} }]
|
|
37
42
|
},
|
|
38
43
|
"/": {
|
|
39
44
|
filePath: "src/routes/index.tsx",
|
|
40
45
|
children: void 0,
|
|
41
46
|
preloads: [
|
|
42
|
-
"/assets/routes-
|
|
43
|
-
"/assets/companion-view-
|
|
44
|
-
"/assets/panel-
|
|
45
|
-
"/assets/warnings-
|
|
46
|
-
"/assets/markdown-view-
|
|
47
|
+
"/assets/routes-DGilWbDE.js",
|
|
48
|
+
"/assets/companion-view-DINdPF-b.js",
|
|
49
|
+
"/assets/panel-Csr49lBo.js",
|
|
50
|
+
"/assets/warnings-B-rvoW8q.js",
|
|
51
|
+
"/assets/markdown-view-jMiaBTSO.js"
|
|
47
52
|
]
|
|
48
53
|
},
|
|
54
|
+
"/friction": {
|
|
55
|
+
filePath: "src/routes/friction.tsx",
|
|
56
|
+
children: void 0,
|
|
57
|
+
preloads: ["/assets/friction-YdYd3zaz.js", "/assets/select-DdebbX7K.js"]
|
|
58
|
+
},
|
|
49
59
|
"/getting-started": {
|
|
50
60
|
filePath: "src/routes/getting-started.tsx",
|
|
51
61
|
children: ["/getting-started/$topic", "/getting-started/"],
|
|
52
|
-
preloads: ["/assets/getting-started-
|
|
62
|
+
preloads: ["/assets/getting-started-CY7NEtTw.js"]
|
|
53
63
|
},
|
|
54
64
|
"/graph": {
|
|
55
65
|
filePath: "src/routes/graph.tsx",
|
|
56
66
|
children: void 0,
|
|
57
67
|
preloads: [
|
|
58
|
-
"/assets/graph-
|
|
59
|
-
"/assets/panel-
|
|
60
|
-
"/assets/specs-view-
|
|
61
|
-
"/assets/
|
|
62
|
-
"/assets/
|
|
63
|
-
"/assets/
|
|
68
|
+
"/assets/graph-DbNnR884.js",
|
|
69
|
+
"/assets/panel-Csr49lBo.js",
|
|
70
|
+
"/assets/specs-view-B_n0Pekv.js",
|
|
71
|
+
"/assets/select-DdebbX7K.js",
|
|
72
|
+
"/assets/combobox-BmA8RjOc.js",
|
|
73
|
+
"/assets/markdown-view-jMiaBTSO.js",
|
|
74
|
+
"/assets/warnings-B-rvoW8q.js"
|
|
64
75
|
]
|
|
65
76
|
},
|
|
66
77
|
"/reports": {
|
|
67
78
|
filePath: "src/routes/reports.tsx",
|
|
68
79
|
children: void 0,
|
|
69
|
-
preloads: ["/assets/reports-
|
|
80
|
+
preloads: ["/assets/reports-CLdgxxkg.js", "/assets/panel-Csr49lBo.js"]
|
|
70
81
|
},
|
|
71
82
|
"/skills": {
|
|
72
83
|
filePath: "src/routes/skills.tsx",
|
|
73
84
|
children: void 0,
|
|
74
85
|
preloads: [
|
|
75
|
-
"/assets/skills-
|
|
76
|
-
"/assets/companion-view-
|
|
77
|
-
"/assets/panel-
|
|
78
|
-
"/assets/steps-
|
|
79
|
-
"/assets/markdown-view-
|
|
86
|
+
"/assets/skills-C3zNkU8g.js",
|
|
87
|
+
"/assets/companion-view-DINdPF-b.js",
|
|
88
|
+
"/assets/panel-Csr49lBo.js",
|
|
89
|
+
"/assets/steps-CKUno4lh.js",
|
|
90
|
+
"/assets/markdown-view-jMiaBTSO.js"
|
|
80
91
|
]
|
|
81
92
|
},
|
|
82
93
|
"/specs": {
|
|
83
94
|
filePath: "src/routes/specs.tsx",
|
|
84
95
|
children: void 0,
|
|
85
96
|
preloads: [
|
|
86
|
-
"/assets/specs-
|
|
87
|
-
"/assets/companion-view-
|
|
88
|
-
"/assets/specs-view-
|
|
89
|
-
"/assets/
|
|
90
|
-
"/assets/
|
|
91
|
-
"/assets/
|
|
92
|
-
"/assets/
|
|
97
|
+
"/assets/specs-Dl8HfGlU.js",
|
|
98
|
+
"/assets/companion-view-DINdPF-b.js",
|
|
99
|
+
"/assets/specs-view-B_n0Pekv.js",
|
|
100
|
+
"/assets/select-DdebbX7K.js",
|
|
101
|
+
"/assets/combobox-BmA8RjOc.js",
|
|
102
|
+
"/assets/markdown-view-jMiaBTSO.js",
|
|
103
|
+
"/assets/panel-Csr49lBo.js",
|
|
104
|
+
"/assets/warnings-B-rvoW8q.js"
|
|
93
105
|
]
|
|
94
106
|
},
|
|
95
107
|
"/usage": {
|
|
96
108
|
filePath: "src/routes/usage.tsx",
|
|
97
109
|
children: void 0,
|
|
98
|
-
preloads: [
|
|
110
|
+
preloads: [
|
|
111
|
+
"/assets/usage-Blcl8kA_.js",
|
|
112
|
+
"/assets/combobox-BmA8RjOc.js",
|
|
113
|
+
"/assets/select-DdebbX7K.js"
|
|
114
|
+
]
|
|
99
115
|
},
|
|
100
116
|
"/vault": {
|
|
101
117
|
filePath: "src/routes/vault.tsx",
|
|
102
118
|
children: void 0,
|
|
103
|
-
preloads: ["/assets/vault-
|
|
119
|
+
preloads: ["/assets/vault-Cb9DmM1i.js", "/assets/markdown-view-jMiaBTSO.js"]
|
|
104
120
|
},
|
|
105
121
|
"/workflow": {
|
|
106
122
|
filePath: "src/routes/workflow.tsx",
|
|
107
123
|
children: void 0,
|
|
108
124
|
preloads: [
|
|
109
|
-
"/assets/workflow-
|
|
110
|
-
"/assets/companion-view-
|
|
111
|
-
"/assets/warnings-
|
|
112
|
-
"/assets/panel-
|
|
113
|
-
"/assets/steps-
|
|
125
|
+
"/assets/workflow-DN5T19jd.js",
|
|
126
|
+
"/assets/companion-view-DINdPF-b.js",
|
|
127
|
+
"/assets/warnings-B-rvoW8q.js",
|
|
128
|
+
"/assets/panel-Csr49lBo.js",
|
|
129
|
+
"/assets/steps-CKUno4lh.js"
|
|
114
130
|
]
|
|
115
131
|
},
|
|
116
132
|
"/getting-started/$topic": {
|
|
117
133
|
filePath: "src/routes/getting-started.$topic.tsx",
|
|
118
134
|
children: void 0,
|
|
119
135
|
preloads: [
|
|
120
|
-
"/assets/getting-started._topic-
|
|
121
|
-
"/assets/getting-started-
|
|
122
|
-
"/assets/markdown-view-
|
|
136
|
+
"/assets/getting-started._topic-DVB8e5R9.js",
|
|
137
|
+
"/assets/getting-started-djaQeWlu.js",
|
|
138
|
+
"/assets/markdown-view-jMiaBTSO.js"
|
|
123
139
|
]
|
|
124
140
|
},
|
|
125
141
|
"/getting-started/": {
|
|
126
142
|
filePath: "src/routes/getting-started.index.tsx",
|
|
127
143
|
children: void 0,
|
|
128
144
|
preloads: [
|
|
129
|
-
"/assets/getting-started.index-
|
|
130
|
-
"/assets/getting-started-
|
|
131
|
-
"/assets/markdown-view-
|
|
145
|
+
"/assets/getting-started.index-DQvLHEr1.js",
|
|
146
|
+
"/assets/getting-started-djaQeWlu.js",
|
|
147
|
+
"/assets/markdown-view-jMiaBTSO.js"
|
|
132
148
|
]
|
|
133
149
|
},
|
|
134
150
|
"/plugins/$service/$view": {
|
|
135
151
|
filePath: "src/routes/plugins.$service.$view.tsx",
|
|
136
152
|
children: void 0,
|
|
137
|
-
preloads: ["/assets/plugins._service._view-
|
|
153
|
+
preloads: ["/assets/plugins._service._view-CEA_CcPe.js"]
|
|
138
154
|
}
|
|
139
155
|
} });
|
|
140
156
|
export { tsrStartManifest };
|