@alepha/devtools 0.14.3 → 0.14.4
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/assets/devtools/actions.html +37 -0
- package/assets/devtools/actions.html.br +0 -0
- package/assets/devtools/actions.html.gz +0 -0
- package/assets/devtools/asset.BZV40eAE.css.br +0 -0
- package/assets/devtools/asset.BZV40eAE.css.gz +0 -0
- package/assets/devtools/asset.DbJSgVPr.css.br +0 -0
- package/assets/devtools/asset.DbJSgVPr.css.gz +0 -0
- package/assets/devtools/atoms.html +37 -0
- package/assets/devtools/atoms.html.br +0 -0
- package/assets/devtools/atoms.html.gz +0 -0
- package/assets/devtools/caches.html +37 -0
- package/assets/devtools/caches.html.br +0 -0
- package/assets/devtools/caches.html.gz +0 -0
- package/assets/devtools/{chunk.XsVAJU_N.js → chunk.5EOPWu_h.js} +1 -1
- package/assets/devtools/chunk.5EOPWu_h.js.br +0 -0
- package/assets/devtools/chunk.5EOPWu_h.js.gz +0 -0
- package/assets/devtools/{chunk.Dwv4A_H_.js → chunk.B-FEo0lV.js} +1 -1
- package/assets/devtools/chunk.B-FEo0lV.js.br +0 -0
- package/assets/devtools/chunk.B-FEo0lV.js.gz +0 -0
- package/assets/devtools/{chunk.I1TSx4X4.js → chunk.BCBZ1wAk.js} +1 -1
- package/assets/devtools/chunk.BCBZ1wAk.js.br +0 -0
- package/assets/devtools/chunk.BCBZ1wAk.js.gz +0 -0
- package/assets/devtools/{chunk.ChDpavl2.js → chunk.BKZ6YEV4.js} +1 -1
- package/assets/devtools/chunk.BKZ6YEV4.js.br +0 -0
- package/assets/devtools/chunk.BKZ6YEV4.js.gz +0 -0
- package/assets/devtools/{chunk.DN-SKgAD.js → chunk.BQQ5nN1l.js} +1 -1
- package/assets/devtools/chunk.BQQ5nN1l.js.br +0 -0
- package/assets/devtools/chunk.BQQ5nN1l.js.gz +0 -0
- package/assets/devtools/{chunk.CAWWjC4E.js → chunk.BX7p74D8.js} +1 -1
- package/assets/devtools/chunk.BX7p74D8.js.br +0 -0
- package/assets/devtools/chunk.BX7p74D8.js.gz +0 -0
- package/assets/devtools/{chunk.DF8tZYh8.js → chunk.BZpSlmHc.js} +1 -1
- package/assets/devtools/chunk.BZpSlmHc.js.br +0 -0
- package/assets/devtools/chunk.BZpSlmHc.js.gz +0 -0
- package/assets/devtools/{chunk.DcaVw31J.js → chunk.BgMi2Pqe.js} +1 -1
- package/assets/devtools/chunk.BgMi2Pqe.js.br +0 -0
- package/assets/devtools/chunk.BgMi2Pqe.js.gz +0 -0
- package/assets/devtools/chunk.BjFrJKj1.js.br +2 -0
- package/assets/devtools/chunk.BjFrJKj1.js.gz +0 -0
- package/assets/devtools/{chunk.ByuRJbSC.js → chunk.BjOMCPQ3.js} +1 -1
- package/assets/devtools/chunk.BjOMCPQ3.js.br +0 -0
- package/assets/devtools/chunk.BjOMCPQ3.js.gz +0 -0
- package/assets/devtools/chunk.BlqFPyLh.js.br +0 -0
- package/assets/devtools/chunk.BlqFPyLh.js.gz +0 -0
- package/assets/devtools/{chunk.DLDchrhP.js → chunk.BqEqrty9.js} +1 -1
- package/assets/devtools/chunk.BqEqrty9.js.br +0 -0
- package/assets/devtools/chunk.BqEqrty9.js.gz +0 -0
- package/assets/devtools/{chunk.BPjMdorr.js → chunk.BuGWOypT.js} +1 -1
- package/assets/devtools/chunk.BuGWOypT.js.br +0 -0
- package/assets/devtools/chunk.BuGWOypT.js.gz +0 -0
- package/assets/devtools/{chunk.UAANdYnt.js → chunk.C3geCUq9.js} +1 -1
- package/assets/devtools/chunk.C3geCUq9.js.br +0 -0
- package/assets/devtools/chunk.C3geCUq9.js.gz +0 -0
- package/assets/devtools/{chunk.BjjA59Pf.js → chunk.CEbDj1NR.js} +1 -1
- package/assets/devtools/chunk.CEbDj1NR.js.br +0 -0
- package/assets/devtools/chunk.CEbDj1NR.js.gz +0 -0
- package/assets/devtools/{chunk.BC4Lys4j.js → chunk.CIYikik4.js} +1 -1
- package/assets/devtools/chunk.CIYikik4.js.br +0 -0
- package/assets/devtools/chunk.CIYikik4.js.gz +0 -0
- package/assets/devtools/{chunk.Bdi_dTor.js → chunk.CQO49DQF.js} +1 -1
- package/assets/devtools/chunk.CQO49DQF.js.br +0 -0
- package/assets/devtools/chunk.CQO49DQF.js.gz +0 -0
- package/assets/devtools/{chunk.C1yl87Yo.js → chunk.CWwJDVEM.js} +1 -1
- package/assets/devtools/chunk.CWwJDVEM.js.br +0 -0
- package/assets/devtools/chunk.CWwJDVEM.js.gz +0 -0
- package/assets/devtools/{chunk.CYVZxO-p.js → chunk.CZ4J9K5b.js} +1 -1
- package/assets/devtools/chunk.CZ4J9K5b.js.br +4 -0
- package/assets/devtools/chunk.CZ4J9K5b.js.gz +0 -0
- package/assets/devtools/{chunk.mJxmm31y.js → chunk.CoD2sLa1.js} +1 -1
- package/assets/devtools/chunk.CoD2sLa1.js.br +0 -0
- package/assets/devtools/chunk.CoD2sLa1.js.gz +0 -0
- package/assets/devtools/{chunk.CQ8PqHT0.js → chunk.CsxSstrk.js} +1 -1
- package/assets/devtools/chunk.CsxSstrk.js.br +0 -0
- package/assets/devtools/chunk.CsxSstrk.js.gz +0 -0
- package/assets/devtools/{chunk.BeYM7pih.js → chunk.D0jFBu2p.js} +1 -1
- package/assets/devtools/chunk.D0jFBu2p.js.br +0 -0
- package/assets/devtools/chunk.D0jFBu2p.js.gz +0 -0
- package/assets/devtools/{chunk.BNC0DJB8.js → chunk.D7ro5_n3.js} +1 -1
- package/assets/devtools/chunk.D7ro5_n3.js.br +0 -0
- package/assets/devtools/chunk.D7ro5_n3.js.gz +0 -0
- package/assets/devtools/{chunk.BBrq-Wwo.js → chunk.W-1mjDd7.js} +1 -1
- package/assets/devtools/chunk.W-1mjDd7.js.br +0 -0
- package/assets/devtools/chunk.W-1mjDd7.js.gz +0 -0
- package/assets/devtools/{chunk.B3_W5FaN.js → chunk._3YEef80.js} +1 -1
- package/assets/devtools/chunk._3YEef80.js.br +0 -0
- package/assets/devtools/chunk._3YEef80.js.gz +0 -0
- package/assets/devtools/{chunk.DI-f4xNk.js → chunk._t5z0lP9.js} +1 -1
- package/assets/devtools/chunk._t5z0lP9.js.br +0 -0
- package/assets/devtools/chunk._t5z0lP9.js.gz +0 -0
- package/assets/devtools/{chunk.DxjqPOcc.js → chunk.albVVSQX.js} +1 -1
- package/assets/devtools/chunk.albVVSQX.js.br +0 -0
- package/assets/devtools/chunk.albVVSQX.js.gz +0 -0
- package/assets/devtools/{chunk.C5K_AIru.js → chunk.bPNpu2iW.js} +1 -1
- package/assets/devtools/chunk.bPNpu2iW.js.br +0 -0
- package/assets/devtools/chunk.bPNpu2iW.js.gz +0 -0
- package/assets/devtools/{chunk.DAVfKvCa.js → chunk.fWijEdcZ.js} +1 -1
- package/assets/devtools/chunk.fWijEdcZ.js.br +0 -0
- package/assets/devtools/chunk.fWijEdcZ.js.gz +0 -0
- package/assets/devtools/{chunk.ospt8-RN.js → chunk.ffYG67rk.js} +1 -1
- package/assets/devtools/chunk.ffYG67rk.js.br +0 -0
- package/assets/devtools/chunk.ffYG67rk.js.gz +0 -0
- package/assets/devtools/{chunk.C6NWzsJg.js → chunk.lo8X57tY.js} +1 -1
- package/assets/devtools/chunk.lo8X57tY.js.br +0 -0
- package/assets/devtools/chunk.lo8X57tY.js.gz +0 -0
- package/assets/devtools/{chunk.PWK2K2kI.js → chunk.rqjDVBSo.js} +1 -1
- package/assets/devtools/chunk.rqjDVBSo.js.br +0 -0
- package/assets/devtools/chunk.rqjDVBSo.js.gz +0 -0
- package/assets/devtools/{chunk.INuuLdYd.js → chunk.u4exfSZ6.js} +1 -1
- package/assets/devtools/chunk.u4exfSZ6.js.br +0 -0
- package/assets/devtools/chunk.u4exfSZ6.js.gz +0 -0
- package/assets/devtools/chunk.uyVen0u2.js.br +0 -0
- package/assets/devtools/chunk.uyVen0u2.js.gz +0 -0
- package/assets/devtools/{chunk.iyc5GsVj.js → chunk.xjh83uy1.js} +1 -1
- package/assets/devtools/chunk.xjh83uy1.js.br +0 -0
- package/assets/devtools/chunk.xjh83uy1.js.gz +0 -0
- package/assets/devtools/{chunk.BOc4btAA.js → chunk.yZM2qlCX.js} +1 -1
- package/assets/devtools/chunk.yZM2qlCX.js.br +0 -0
- package/assets/devtools/chunk.yZM2qlCX.js.gz +0 -0
- package/assets/devtools/db.html +34 -0
- package/assets/devtools/db.html.br +0 -0
- package/assets/devtools/db.html.gz +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js +79 -0
- package/assets/devtools/entry.BWhdC3SJ.js.br +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js.gz +0 -0
- package/assets/devtools/env.html +35 -0
- package/assets/devtools/env.html.br +0 -0
- package/assets/devtools/env.html.gz +0 -0
- package/assets/devtools/graph.html +38 -0
- package/assets/devtools/graph.html.br +0 -0
- package/assets/devtools/graph.html.gz +0 -0
- package/assets/devtools/index.html +28 -8
- package/assets/devtools/index.html.br +0 -0
- package/assets/devtools/index.html.gz +0 -0
- package/assets/devtools/logs.html +38 -0
- package/assets/devtools/logs.html.br +0 -0
- package/assets/devtools/logs.html.gz +0 -0
- package/assets/devtools/queues.html +30 -0
- package/assets/devtools/queues.html.br +0 -0
- package/assets/devtools/queues.html.gz +0 -0
- package/assets/devtools/topics.html +38 -0
- package/assets/devtools/topics.html.br +0 -0
- package/assets/devtools/topics.html.gz +0 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +0 -4
- package/assets/devtools/entry.DBfTnVUe.js +0 -75
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as a}from"./entry.
|
|
1
|
+
import{w as a}from"./entry.BWhdC3SJ.js";const e=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],o=a("outline","key","Key",e);export{o as I};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{av as Me,a3 as $e,b1 as Ae,r as i,c as Ke,f as k,b as E,bd as We,ah as Z,j as b,be as G,aL as J,bf as He,B as j,bg as Ue,e as Xe,b9 as Ye,bc as qe,d as Be,bh as Q,$ as Le,bi as Ze,bj as X,az as Y,n as Ge,bk as Je,bl as Qe,bm as er,bn as q,bo as B,bp as L,bq as rr,br as tr,o as or,q as ee,ax as nr,aj as sr,_ as ar,bs as ir,bt as lr,s as re,bu as cr,a0 as dr,t as ur,v as fr}from"./entry.DBfTnVUe.js";import{n as pr}from"./chunk.BjFrJKj1.js";import{u as wr}from"./chunk.CAWWjC4E.js";function Sr(e,n){const o=Me(),t=$e(Ae),[l,p]=i.useState(!1),[u,a]=i.useState(),[s,v]=i.useState(),d=i.useRef(!1),c=i.useRef(void 0),r=i.useRef(void 0),m=i.useRef(!0),w=i.useRef(void 0);i.useEffect(()=>()=>{m.current=!1,c.current&&(t.clearTimeout(c.current),c.current=void 0),w.current&&(t.clearInterval(w.current),w.current=void 0),r.current&&(r.current.abort(),r.current=void 0)},[]);const y=i.useCallback(async(...x)=>{if(d.current)return;r.current&&r.current.abort();const P=new AbortController;r.current=P,d.current=!0,p(!0),a(void 0),await o.events.emit("react:action:begin",{type:"custom",id:e.id});try{const g=await e.handler(...x,{signal:P.signal});return v(g),!m.current||P.signal.aborted?void 0:(await o.events.emit("react:action:success",{type:"custom",id:e.id}),e.onSuccess&&await e.onSuccess(g),g)}catch(g){if(g instanceof Error&&g.name==="AbortError"||!m.current)return;const C=g;if(a(C),await o.events.emit("react:action:error",{type:"custom",id:e.id,error:C}),e.onError)await e.onError(C);else throw C}finally{d.current=!1,p(!1),await o.events.emit("react:action:end",{type:"custom",id:e.id}),r.current===P&&(r.current=void 0)}},[...n,e.id,e.onError,e.onSuccess]),h=i.useCallback(async(...x)=>e.debounce?(c.current&&t.clearTimeout(c.current),new Promise(P=>{c.current=t.createTimeout(async()=>{const g=await y(...x);P(g)},e.debounce??0)})):y(...x),[y,e.debounce]),O=i.useCallback(()=>{c.current&&(t.clearTimeout(c.current),c.current=void 0),r.current&&(r.current.abort(),r.current=void 0),m.current&&(d.current=!1,p(!1))},[]);return i.useEffect(()=>{e.runOnInit&&h()},n),i.useEffect(()=>{if(e.runEvery)return w.current=t.createInterval(()=>h(),e.runEvery,!0),()=>{w.current&&(t.clearInterval(w.current),w.current=void 0)}},[h,e.runEvery]),{run:h,loading:l,error:u,cancel:O,result:s}}function gr(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||pr:o=>{o.key==="Escape"&&(e(o),n.onTrigger?.())}}const[vr,te]=Ke("Popover component was not found in the tree");var oe={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const I=k((e,n)=>{const o=E("PopoverDropdown",null,e),{className:t,style:l,vars:p,children:u,onKeyDownCapture:a,variant:s,classNames:v,styles:d,...c}=o,r=te(),m=We({opened:r.opened,shouldReturnFocus:r.returnFocus}),w=r.withRoles?{"aria-labelledby":r.getTargetId(),id:r.getDropdownId(),role:"dialog",tabIndex:-1}:{},y=Z(n,r.floating);return r.disabled?null:b.jsx(G,{...r.portalProps,withinPortal:r.withinPortal,children:b.jsx(J,{mounted:r.opened,...r.transitionProps,transition:r.transitionProps?.transition||"fade",duration:r.transitionProps?.duration??150,keepMounted:r.keepMounted,exitDuration:typeof r.transitionProps?.exitDuration=="number"?r.transitionProps.exitDuration:r.transitionProps?.duration,children:h=>b.jsx(He,{active:r.trapFocus&&r.opened,innerRef:y,children:b.jsxs(j,{...w,...c,variant:s,onKeyDownCapture:gr(()=>{r.onClose?.(),r.onDismiss?.()},{active:r.closeOnEscape,onTrigger:m,onKeyDown:a}),"data-position":r.placement,"data-fixed":r.floatingStrategy==="fixed"||void 0,...r.getStyles("dropdown",{className:t,props:o,classNames:v,styles:d,style:[{...h,zIndex:r.zIndex,top:r.y??0,left:r.x??0,width:r.width==="target"?void 0:Xe(r.width),...r.referenceHidden?{display:"none"}:null},r.resolvedStyles.dropdown,d?.dropdown,l]}),children:[u,b.jsx(Ue,{ref:r.arrowRef,arrowX:r.arrowX,arrowY:r.arrowY,visible:r.withArrow,position:r.placement,arrowSize:r.arrowSize,arrowRadius:r.arrowRadius,arrowOffset:r.arrowOffset,arrowPosition:r.arrowPosition,...r.getStyles("arrow",{props:o,classNames:v,styles:d})})]})})})})});I.classes=oe;I.displayName="@mantine/core/PopoverDropdown";const mr={refProp:"ref",popupType:"dialog"},ne=k((e,n)=>{const{children:o,refProp:t,popupType:l,...p}=E("PopoverTarget",mr,e),u=Ye(o);if(!u)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=p,s=te(),v=Z(s.reference,qe(u),n),d=s.withRoles?{"aria-haspopup":l,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{},c=u.props;return i.cloneElement(u,{...a,...d,...s.targetProps,className:Be(s.targetProps.className,a.className,c.className),[t]:v,...s.controlled?null:{onClick:()=>{s.onToggle(),c.onClick?.()}}})});ne.displayName="@mantine/core/PopoverTarget";function hr(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function br(e,n,o){const t=hr(e.middlewares),l=[Je(e.offset),Qe()];return e.dropdownVisible&&o!=="test"&&e.preventPositionChangeWhenVisible&&(t.flip=!1),t.shift&&l.push(er(typeof t.shift=="boolean"?{limiter:q(),padding:5}:{limiter:q(),padding:5,...t.shift})),t.flip&&l.push(typeof t.flip=="boolean"?B():B(t.flip)),t.inline&&l.push(typeof t.inline=="boolean"?L():L(t.inline)),l.push(rr({element:e.arrowRef,padding:e.arrowOffset})),(t.size||e.width==="target")&&l.push(tr({...typeof t.size=="boolean"?{}:t.size,apply({rects:p,availableWidth:u,availableHeight:a,...s}){const d=n().refs.floating.current?.style??{};t.size&&(typeof t.size=="object"&&t.size.apply?t.size.apply({rects:p,availableWidth:u,availableHeight:a,...s}):Object.assign(d,{maxWidth:`${u}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(d,{width:`${p.reference.width}px`})}})),l}function yr(e){const n=Q(),[o,t]=Le({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),l=i.useRef(o),p=()=>{o&&!e.disabled&&t(!1)},u=()=>{e.disabled||t(!o)},a=Ze({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:br(e,()=>a,n),whileElementsMounted:e.keepMounted?void 0:X});return i.useEffect(()=>{if(!(!a.refs.reference.current||!a.refs.floating.current)&&o)return X(a.refs.reference.current,a.refs.floating.current,a.update)},[o,a.update]),Y(()=>{e.onPositionChange?.(a.placement),e.positionRef.current=a.placement},[a.placement,e.preventPositionChangeWhenVisible]),Y(()=>{o!==l.current&&(o?e.onOpen?.():e.onClose?.()),l.current=o},[o,e.onClose,e.onOpen]),Ge(()=>{let s=-1;return o&&(s=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(s)}},[o,e.position]),{floating:a,controlled:typeof e.opened=="boolean",opened:o,onClose:p,onToggle:u}}const Pr={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:or("popover"),__staticSelector:"Popover",width:"max-content"},xr=re((e,{radius:n,shadow:o})=>({dropdown:{"--popover-radius":n===void 0?void 0:dr(n),"--popover-shadow":cr(o)}}));function D(e){const n=E("Popover",Pr,e),{children:o,position:t,offset:l,onPositionChange:p,positionDependencies:u,opened:a,transitionProps:s,onExitTransitionEnd:v,onEnterTransitionEnd:d,width:c,middlewares:r,withArrow:m,arrowSize:w,arrowOffset:y,arrowRadius:h,arrowPosition:O,unstyled:x,classNames:P,styles:g,closeOnClickOutside:C,withinPortal:N,portalProps:ie,closeOnEscape:le,clickOutsideEvents:ce,trapFocus:de,onClose:ue,onDismiss:S,onOpen:fe,onChange:pe,zIndex:we,radius:ge,shadow:ve,id:me,defaultOpened:F,__staticSelector:_,withRoles:he,disabled:V,returnFocus:be,variant:ye,keepMounted:M,vars:Pe,floatingStrategy:$,withOverlay:xe,overlayProps:T,hideDetached:Re,attributes:Ce,preventPositionChangeWhenVisible:z,...Ee}=n,A=ee({name:_,props:n,classes:oe,classNames:P,styles:g,unstyled:x,attributes:Ce,rootSelector:"dropdown",vars:Pe,varsResolver:xr}),{resolvedStyles:De}=nr({classNames:P,styles:g,props:n}),[Oe,K]=i.useState(a??F??!1),W=i.useRef(t),H=i.useRef(null),[Se,Te]=i.useState(null),[ze,je]=i.useState(null),{dir:ke}=sr(),Ie=Q(),U=ar(me),f=yr({middlewares:r,width:c,position:ir(ke,t),offset:typeof l=="number"?l+(m?w/2:0):l,arrowRef:H,arrowOffset:y,onPositionChange:p,positionDependencies:u,opened:a,defaultOpened:F,onChange:pe,onOpen:fe,onClose:ue,onDismiss:S,strategy:$,dropdownVisible:Oe,setDropdownVisible:K,positionRef:W,disabled:V,preventPositionChangeWhenVisible:z,keepMounted:M});wr(()=>{C&&(f.onClose(),S?.())},ce,[Se,ze]);const Ne=i.useCallback(R=>{Te(R),f.floating.refs.setReference(R)},[f.floating.refs.setReference]),Fe=i.useCallback(R=>{je(R),f.floating.refs.setFloating(R)},[f.floating.refs.setFloating]),_e=i.useCallback(()=>{s?.onExited?.(),v?.(),K(!1),z||(W.current=t)},[s?.onExited,v,z,t]),Ve=i.useCallback(()=>{s?.onEntered?.(),d?.()},[s?.onEntered,d]);return b.jsxs(vr,{value:{returnFocus:be,disabled:V,controlled:f.controlled,reference:Ne,floating:Fe,x:f.floating.x,y:f.floating.y,arrowX:f.floating?.middlewareData?.arrow?.x,arrowY:f.floating?.middlewareData?.arrow?.y,opened:f.opened,arrowRef:H,transitionProps:{...s,onExited:_e,onEntered:Ve},width:c,withArrow:m,arrowSize:w,arrowOffset:y,arrowRadius:h,arrowPosition:O,placement:f.floating.placement,trapFocus:de,withinPortal:N,portalProps:ie,zIndex:we,radius:ge,shadow:ve,closeOnEscape:le,onDismiss:S,onClose:f.onClose,onToggle:f.onToggle,getTargetId:()=>`${U}-target`,getDropdownId:()=>`${U}-dropdown`,withRoles:he,targetProps:Ee,__staticSelector:_,classNames:P,styles:g,unstyled:x,variant:ye,keepMounted:M,getStyles:A,resolvedStyles:De,floatingStrategy:$,referenceHidden:Re&&Ie!=="test"?f.floating.middlewareData.hide?.referenceHidden:!1},children:[o,xe&&b.jsx(J,{transition:"fade",mounted:f.opened,duration:s?.duration||250,exitDuration:s?.exitDuration||250,children:R=>b.jsx(G,{withinPortal:N,children:b.jsx(lr,{...T,...A("overlay",{className:T?.className,style:[R,T?.style]})})})})]})}D.Target=ne;D.Dropdown=I;D.displayName="@mantine/core/Popover";D.extend=e=>e;var se={root:"m_3eebeb36",label:"m_9e365f20"};const Rr={orientation:"horizontal"},Cr=re((e,{color:n,variant:o,size:t})=>({root:{"--divider-color":n?fr(n,e):void 0,"--divider-border-style":o,"--divider-size":ur(t,"divider-size")}})),ae=k((e,n)=>{const o=E("Divider",Rr,e),{classNames:t,className:l,style:p,styles:u,unstyled:a,vars:s,color:v,orientation:d,label:c,labelPosition:r,mod:m,attributes:w,...y}=o,h=ee({name:"Divider",classes:se,props:o,className:l,style:p,classNames:t,styles:u,unstyled:a,attributes:w,vars:s,varsResolver:Cr});return b.jsx(j,{ref:n,mod:[{orientation:d,"with-label":!!c},m],...h("root"),...y,role:"separator",children:c&&b.jsx(j,{component:"span",mod:{position:r},...h("label"),children:c})})});ae.classes=se;ae.displayName="@mantine/core/Divider";export{ae as D,D as P,Sr as u};
|
|
1
|
+
import{av as Me,a3 as $e,b1 as Ae,r as i,c as Ke,f as k,b as E,bd as We,ah as Z,j as b,be as G,aL as J,bf as He,B as j,bg as Ue,e as Xe,b9 as Ye,bc as qe,d as Be,bh as Q,$ as Le,bi as Ze,bj as X,az as Y,n as Ge,bk as Je,bl as Qe,bm as er,bn as q,bo as B,bp as L,bq as rr,br as tr,o as or,q as ee,ax as nr,aj as sr,_ as ar,bs as ir,bt as lr,s as re,bu as cr,a0 as dr,t as ur,v as fr}from"./entry.BWhdC3SJ.js";import{n as pr}from"./chunk.BjFrJKj1.js";import{u as wr}from"./chunk.BX7p74D8.js";function Sr(e,n){const o=Me(),t=$e(Ae),[l,p]=i.useState(!1),[u,a]=i.useState(),[s,v]=i.useState(),d=i.useRef(!1),c=i.useRef(void 0),r=i.useRef(void 0),m=i.useRef(!0),w=i.useRef(void 0);i.useEffect(()=>()=>{m.current=!1,c.current&&(t.clearTimeout(c.current),c.current=void 0),w.current&&(t.clearInterval(w.current),w.current=void 0),r.current&&(r.current.abort(),r.current=void 0)},[]);const y=i.useCallback(async(...x)=>{if(d.current)return;r.current&&r.current.abort();const P=new AbortController;r.current=P,d.current=!0,p(!0),a(void 0),await o.events.emit("react:action:begin",{type:"custom",id:e.id});try{const g=await e.handler(...x,{signal:P.signal});return v(g),!m.current||P.signal.aborted?void 0:(await o.events.emit("react:action:success",{type:"custom",id:e.id}),e.onSuccess&&await e.onSuccess(g),g)}catch(g){if(g instanceof Error&&g.name==="AbortError"||!m.current)return;const C=g;if(a(C),await o.events.emit("react:action:error",{type:"custom",id:e.id,error:C}),e.onError)await e.onError(C);else throw C}finally{d.current=!1,p(!1),await o.events.emit("react:action:end",{type:"custom",id:e.id}),r.current===P&&(r.current=void 0)}},[...n,e.id,e.onError,e.onSuccess]),h=i.useCallback(async(...x)=>e.debounce?(c.current&&t.clearTimeout(c.current),new Promise(P=>{c.current=t.createTimeout(async()=>{const g=await y(...x);P(g)},e.debounce??0)})):y(...x),[y,e.debounce]),O=i.useCallback(()=>{c.current&&(t.clearTimeout(c.current),c.current=void 0),r.current&&(r.current.abort(),r.current=void 0),m.current&&(d.current=!1,p(!1))},[]);return i.useEffect(()=>{e.runOnInit&&h()},n),i.useEffect(()=>{if(e.runEvery)return w.current=t.createInterval(()=>h(),e.runEvery,!0),()=>{w.current&&(t.clearInterval(w.current),w.current=void 0)}},[h,e.runEvery]),{run:h,loading:l,error:u,cancel:O,result:s}}function gr(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||pr:o=>{o.key==="Escape"&&(e(o),n.onTrigger?.())}}const[vr,te]=Ke("Popover component was not found in the tree");var oe={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const I=k((e,n)=>{const o=E("PopoverDropdown",null,e),{className:t,style:l,vars:p,children:u,onKeyDownCapture:a,variant:s,classNames:v,styles:d,...c}=o,r=te(),m=We({opened:r.opened,shouldReturnFocus:r.returnFocus}),w=r.withRoles?{"aria-labelledby":r.getTargetId(),id:r.getDropdownId(),role:"dialog",tabIndex:-1}:{},y=Z(n,r.floating);return r.disabled?null:b.jsx(G,{...r.portalProps,withinPortal:r.withinPortal,children:b.jsx(J,{mounted:r.opened,...r.transitionProps,transition:r.transitionProps?.transition||"fade",duration:r.transitionProps?.duration??150,keepMounted:r.keepMounted,exitDuration:typeof r.transitionProps?.exitDuration=="number"?r.transitionProps.exitDuration:r.transitionProps?.duration,children:h=>b.jsx(He,{active:r.trapFocus&&r.opened,innerRef:y,children:b.jsxs(j,{...w,...c,variant:s,onKeyDownCapture:gr(()=>{r.onClose?.(),r.onDismiss?.()},{active:r.closeOnEscape,onTrigger:m,onKeyDown:a}),"data-position":r.placement,"data-fixed":r.floatingStrategy==="fixed"||void 0,...r.getStyles("dropdown",{className:t,props:o,classNames:v,styles:d,style:[{...h,zIndex:r.zIndex,top:r.y??0,left:r.x??0,width:r.width==="target"?void 0:Xe(r.width),...r.referenceHidden?{display:"none"}:null},r.resolvedStyles.dropdown,d?.dropdown,l]}),children:[u,b.jsx(Ue,{ref:r.arrowRef,arrowX:r.arrowX,arrowY:r.arrowY,visible:r.withArrow,position:r.placement,arrowSize:r.arrowSize,arrowRadius:r.arrowRadius,arrowOffset:r.arrowOffset,arrowPosition:r.arrowPosition,...r.getStyles("arrow",{props:o,classNames:v,styles:d})})]})})})})});I.classes=oe;I.displayName="@mantine/core/PopoverDropdown";const mr={refProp:"ref",popupType:"dialog"},ne=k((e,n)=>{const{children:o,refProp:t,popupType:l,...p}=E("PopoverTarget",mr,e),u=Ye(o);if(!u)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=p,s=te(),v=Z(s.reference,qe(u),n),d=s.withRoles?{"aria-haspopup":l,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{},c=u.props;return i.cloneElement(u,{...a,...d,...s.targetProps,className:Be(s.targetProps.className,a.className,c.className),[t]:v,...s.controlled?null:{onClick:()=>{s.onToggle(),c.onClick?.()}}})});ne.displayName="@mantine/core/PopoverTarget";function hr(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function br(e,n,o){const t=hr(e.middlewares),l=[Je(e.offset),Qe()];return e.dropdownVisible&&o!=="test"&&e.preventPositionChangeWhenVisible&&(t.flip=!1),t.shift&&l.push(er(typeof t.shift=="boolean"?{limiter:q(),padding:5}:{limiter:q(),padding:5,...t.shift})),t.flip&&l.push(typeof t.flip=="boolean"?B():B(t.flip)),t.inline&&l.push(typeof t.inline=="boolean"?L():L(t.inline)),l.push(rr({element:e.arrowRef,padding:e.arrowOffset})),(t.size||e.width==="target")&&l.push(tr({...typeof t.size=="boolean"?{}:t.size,apply({rects:p,availableWidth:u,availableHeight:a,...s}){const d=n().refs.floating.current?.style??{};t.size&&(typeof t.size=="object"&&t.size.apply?t.size.apply({rects:p,availableWidth:u,availableHeight:a,...s}):Object.assign(d,{maxWidth:`${u}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(d,{width:`${p.reference.width}px`})}})),l}function yr(e){const n=Q(),[o,t]=Le({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),l=i.useRef(o),p=()=>{o&&!e.disabled&&t(!1)},u=()=>{e.disabled||t(!o)},a=Ze({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:br(e,()=>a,n),whileElementsMounted:e.keepMounted?void 0:X});return i.useEffect(()=>{if(!(!a.refs.reference.current||!a.refs.floating.current)&&o)return X(a.refs.reference.current,a.refs.floating.current,a.update)},[o,a.update]),Y(()=>{e.onPositionChange?.(a.placement),e.positionRef.current=a.placement},[a.placement,e.preventPositionChangeWhenVisible]),Y(()=>{o!==l.current&&(o?e.onOpen?.():e.onClose?.()),l.current=o},[o,e.onClose,e.onOpen]),Ge(()=>{let s=-1;return o&&(s=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(s)}},[o,e.position]),{floating:a,controlled:typeof e.opened=="boolean",opened:o,onClose:p,onToggle:u}}const Pr={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:or("popover"),__staticSelector:"Popover",width:"max-content"},xr=re((e,{radius:n,shadow:o})=>({dropdown:{"--popover-radius":n===void 0?void 0:dr(n),"--popover-shadow":cr(o)}}));function D(e){const n=E("Popover",Pr,e),{children:o,position:t,offset:l,onPositionChange:p,positionDependencies:u,opened:a,transitionProps:s,onExitTransitionEnd:v,onEnterTransitionEnd:d,width:c,middlewares:r,withArrow:m,arrowSize:w,arrowOffset:y,arrowRadius:h,arrowPosition:O,unstyled:x,classNames:P,styles:g,closeOnClickOutside:C,withinPortal:N,portalProps:ie,closeOnEscape:le,clickOutsideEvents:ce,trapFocus:de,onClose:ue,onDismiss:S,onOpen:fe,onChange:pe,zIndex:we,radius:ge,shadow:ve,id:me,defaultOpened:F,__staticSelector:_,withRoles:he,disabled:V,returnFocus:be,variant:ye,keepMounted:M,vars:Pe,floatingStrategy:$,withOverlay:xe,overlayProps:T,hideDetached:Re,attributes:Ce,preventPositionChangeWhenVisible:z,...Ee}=n,A=ee({name:_,props:n,classes:oe,classNames:P,styles:g,unstyled:x,attributes:Ce,rootSelector:"dropdown",vars:Pe,varsResolver:xr}),{resolvedStyles:De}=nr({classNames:P,styles:g,props:n}),[Oe,K]=i.useState(a??F??!1),W=i.useRef(t),H=i.useRef(null),[Se,Te]=i.useState(null),[ze,je]=i.useState(null),{dir:ke}=sr(),Ie=Q(),U=ar(me),f=yr({middlewares:r,width:c,position:ir(ke,t),offset:typeof l=="number"?l+(m?w/2:0):l,arrowRef:H,arrowOffset:y,onPositionChange:p,positionDependencies:u,opened:a,defaultOpened:F,onChange:pe,onOpen:fe,onClose:ue,onDismiss:S,strategy:$,dropdownVisible:Oe,setDropdownVisible:K,positionRef:W,disabled:V,preventPositionChangeWhenVisible:z,keepMounted:M});wr(()=>{C&&(f.onClose(),S?.())},ce,[Se,ze]);const Ne=i.useCallback(R=>{Te(R),f.floating.refs.setReference(R)},[f.floating.refs.setReference]),Fe=i.useCallback(R=>{je(R),f.floating.refs.setFloating(R)},[f.floating.refs.setFloating]),_e=i.useCallback(()=>{s?.onExited?.(),v?.(),K(!1),z||(W.current=t)},[s?.onExited,v,z,t]),Ve=i.useCallback(()=>{s?.onEntered?.(),d?.()},[s?.onEntered,d]);return b.jsxs(vr,{value:{returnFocus:be,disabled:V,controlled:f.controlled,reference:Ne,floating:Fe,x:f.floating.x,y:f.floating.y,arrowX:f.floating?.middlewareData?.arrow?.x,arrowY:f.floating?.middlewareData?.arrow?.y,opened:f.opened,arrowRef:H,transitionProps:{...s,onExited:_e,onEntered:Ve},width:c,withArrow:m,arrowSize:w,arrowOffset:y,arrowRadius:h,arrowPosition:O,placement:f.floating.placement,trapFocus:de,withinPortal:N,portalProps:ie,zIndex:we,radius:ge,shadow:ve,closeOnEscape:le,onDismiss:S,onClose:f.onClose,onToggle:f.onToggle,getTargetId:()=>`${U}-target`,getDropdownId:()=>`${U}-dropdown`,withRoles:he,targetProps:Ee,__staticSelector:_,classNames:P,styles:g,unstyled:x,variant:ye,keepMounted:M,getStyles:A,resolvedStyles:De,floatingStrategy:$,referenceHidden:Re&&Ie!=="test"?f.floating.middlewareData.hide?.referenceHidden:!1},children:[o,xe&&b.jsx(J,{transition:"fade",mounted:f.opened,duration:s?.duration||250,exitDuration:s?.exitDuration||250,children:R=>b.jsx(G,{withinPortal:N,children:b.jsx(lr,{...T,...A("overlay",{className:T?.className,style:[R,T?.style]})})})})]})}D.Target=ne;D.Dropdown=I;D.displayName="@mantine/core/Popover";D.extend=e=>e;var se={root:"m_3eebeb36",label:"m_9e365f20"};const Rr={orientation:"horizontal"},Cr=re((e,{color:n,variant:o,size:t})=>({root:{"--divider-color":n?fr(n,e):void 0,"--divider-border-style":o,"--divider-size":ur(t,"divider-size")}})),ae=k((e,n)=>{const o=E("Divider",Rr,e),{classNames:t,className:l,style:p,styles:u,unstyled:a,vars:s,color:v,orientation:d,label:c,labelPosition:r,mod:m,attributes:w,...y}=o,h=ee({name:"Divider",classes:se,props:o,className:l,style:p,classNames:t,styles:u,unstyled:a,attributes:w,vars:s,varsResolver:Cr});return b.jsx(j,{ref:n,mod:[{orientation:d,"with-label":!!c},m],...h("root"),...y,role:"separator",children:c&&b.jsx(j,{component:"span",mod:{position:r},...h("label"),children:c})})});ae.classes=se;ae.displayName="@mantine/core/Divider";export{ae as D,D as P,Sr as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as T,a3 as J,a4 as R,r as u,j as e,F as m,T as o,B as j,H as f,V as z,af as C,z as B,ad as k,ae as D,aa as I,a6 as A,ag as M}from"./entry.
|
|
1
|
+
import{w as T,a3 as J,a4 as R,r as u,j as e,F as m,T as o,B as j,H as f,V as z,af as C,z as B,ad as k,ae as D,aa as I,a6 as A,ag as M}from"./entry.BWhdC3SJ.js";import{J as w}from"./chunk.bPNpu2iW.js";import{d as O}from"./chunk.BKZ6YEV4.js";import{S as y,B as E}from"./chunk.BqEqrty9.js";import{T as b}from"./chunk.CQO49DQF.js";import{S as N,I as L,N as F}from"./chunk.5EOPWu_h.js";import{T as $}from"./chunk._t5z0lP9.js";import"./chunk.BlqFPyLh.js";import"./chunk.BX7p74D8.js";import"./chunk.BjFrJKj1.js";import"./chunk.D7ro5_n3.js";import"./chunk.uyVen0u2.js";const _=[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]],P=T("outline","device-floppy","DeviceFloppy",_);const H=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],U=T("outline","edit","Edit",H),X=({atoms:t,selectedAtom:n,onSelectAtom:i,search:x,onSearchChange:l})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(j,{p:"sm",style:{borderBottom:`1px solid ${f.colors.border}`},children:e.jsx(C,{placeholder:"Search atoms...",leftSection:e.jsx(B,{size:14}),size:"xs",value:x,onChange:r=>l(r.target.value)})}),e.jsx(k,{style:{flex:1},children:e.jsxs(j,{children:[e.jsxs(o,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:f.colors.background,borderBottom:`1px solid ${f.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Atoms (",t.length,")"]}),t.map(r=>{const h=n?.name===r.name,s=r.currentValue!==void 0;return e.jsxs(m,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>i(r),style:{cursor:"pointer",backgroundColor:h?"#228be615":void 0,borderLeft:h?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${f.colors.border}`},children:[e.jsx(z,{size:14,opacity:.5}),e.jsx(o,{size:"sm",style:{flex:1},truncate:!0,children:r.name}),s&&e.jsx(E,{size:"xs",variant:"light",color:"green",children:"set"})]},r.name)})]})})]}),V=({schema:t,value:n,onChange:i,path:x=""})=>{if(!t)return null;let l=t;if(t.anyOf){const s=t.anyOf.find(c=>c.type!=="null");s&&(l=s)}const r=l.type,h=l.format;if(r==="object"&&l.properties)return e.jsx(y,{gap:"sm",children:Object.entries(l.properties).map(([s,c])=>e.jsxs(j,{children:[e.jsxs(o,{size:"sm",fw:500,mb:4,children:[c.title||s,c.description&&e.jsx(o,{span:!0,size:"xs",c:"dimmed",ml:"xs",children:c.description})]}),e.jsx(V,{schema:c,value:n?.[s],onChange:d=>i({...n,[s]:d}),path:x?`${x}.${s}`:s})]},s))});if(r==="array"){const s=n??[];return e.jsxs(y,{gap:"xs",children:[s.map((c,d)=>e.jsxs(m,{gap:"xs",align:"center",children:[e.jsx(j,{style:{flex:1},children:e.jsx(V,{schema:l.items,value:c,onChange:g=>{const v=[...s];v[d]=g,i(v)},path:`${x}[${d}]`})}),e.jsx(I,{size:"sm",variant:"light",color:"red",onClick:()=>{const g=s.filter((v,p)=>p!==d);i(g)},children:e.jsx(M,{size:14})})]},d)),e.jsx(A,{size:"xs",variant:"light",onClick:()=>i([...s,void 0]),children:"Add item"})]})}return r==="boolean"?e.jsx(N,{checked:n??!1,onChange:s=>i(s.currentTarget.checked)}):r==="number"||r==="integer"?e.jsx(F,{size:"sm",value:n??"",onChange:s=>i(s===""?void 0:s),allowDecimal:r==="number"}):l.enum?e.jsxs("select",{value:n??"",onChange:s=>i(s.target.value||void 0),style:{padding:"6px 10px",borderRadius:4,border:`1px solid ${f.colors.border}`,backgroundColor:f.colors.surface,width:"100%"},children:[e.jsx("option",{value:"",children:"Select..."}),l.enum.map(s=>e.jsx("option",{value:s,children:s},s))]}):h==="date"||h==="date-time"?e.jsx(C,{size:"sm",type:h==="date"?"date":"datetime-local",value:n??"",onChange:s=>i(s.target.value||void 0)}):h==="textarea"||l.multiline?e.jsx($,{size:"sm",value:n??"",onChange:s=>i(s.target.value||void 0),autosize:!0,minRows:2,maxRows:6}):e.jsx(C,{size:"sm",value:n??"",onChange:s=>i(s.target.value||void 0)})},q=({atom:t})=>e.jsx(k,{h:"100%",p:"md",children:e.jsxs(y,{gap:"lg",children:[t.description&&e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(o,{size:"sm",c:"dimmed",children:t.description})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),t.currentValue!==void 0?e.jsx(w,{data:t.currentValue,maxDepth:3}):e.jsx(o,{size:"sm",c:"dimmed",fs:"italic",children:"(not set - using default)"})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Default Value"}),t.defaultValue!==void 0?e.jsx(w,{data:t.defaultValue,maxDepth:3}):e.jsx(o,{size:"sm",c:"dimmed",fs:"italic",children:"(no default)"})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(w,{data:t.schema,maxDepth:2})]})]})}),G=({atom:t,onSave:n})=>{const[i,x]=u.useState(t.currentValue??t.defaultValue),[l,r]=u.useState(!1),[h,s]=u.useState(""),[c,d]=u.useState(null);u.useEffect(()=>{const a=t.currentValue??t.defaultValue;x(a),s(JSON.stringify(a,null,2)),d(null)},[t]);const g=a=>{s(a);try{const S=JSON.parse(a);x(S),d(null)}catch{d("Invalid JSON")}},v=()=>{n(i)},p=()=>{const a=t.defaultValue;x(a),s(JSON.stringify(a,null,2)),d(null)};return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(j,{p:"sm",style:{borderBottom:`1px solid ${f.colors.border}`},children:e.jsxs(m,{align:"center",justify:"space-between",children:[e.jsx(m,{gap:"xs",align:"center",children:e.jsx(N,{size:"xs",label:"JSON mode",checked:l,onChange:a=>r(a.currentTarget.checked)})}),e.jsxs(m,{gap:"xs",children:[e.jsx(D,{label:"Reset to default",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:p,children:e.jsx(L,{size:14})})}),e.jsx(A,{size:"xs",leftSection:e.jsx(P,{size:14}),onClick:v,disabled:l&&!!c,children:"Save"})]})]})}),e.jsx(k,{style:{flex:1},p:"md",children:l?e.jsxs(y,{gap:"xs",children:[e.jsx($,{value:h,onChange:a=>g(a.target.value),autosize:!0,minRows:10,maxRows:20,error:c,styles:{input:{fontFamily:"monospace"}}}),c&&e.jsx(o,{size:"xs",c:"red",children:c})]}):e.jsx(V,{schema:t.schema,value:i,onChange:x})})]})},K=({atom:t,onSave:n})=>{const i=t.currentValue!==void 0;return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(j,{px:"md",py:"sm",style:{borderBottom:`1px solid ${f.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(z,{size:18,opacity:.7}),e.jsx(o,{size:"md",fw:600,children:t.name}),e.jsx(E,{size:"xs",variant:"light",color:i?"green":"gray",children:i?"has value":"default"})]})}),e.jsxs(b,{defaultValue:"info",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(b.List,{px:"md",children:[e.jsx(b.Tab,{value:"info",children:"Info"}),e.jsx(b.Tab,{value:"edit",leftSection:e.jsx(U,{size:14}),children:"Edit"})]}),e.jsx(b.Panel,{value:"info",style:{flex:1,overflow:"hidden"},children:e.jsx(q,{atom:t})}),e.jsx(b.Panel,{value:"edit",style:{flex:1,overflow:"hidden"},children:e.jsx(G,{atom:t,onSave:x=>n(t,x)})})]})]})},Q=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(z,{size:48,opacity:.3}),e.jsx(o,{size:"sm",children:"Select an atom to view its details"})]})}),W=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(z,{size:48,opacity:.3}),e.jsx(o,{children:"No atoms found"}),e.jsx(o,{size:"sm",c:"dimmed",children:"Use $atom primitive to define state atoms"})]})}),de=()=>{const t=J(R),[n,i]=u.useState([]),[x,l]=u.useState(!0),[r,h]=u.useState(null),[s,c]=u.useState(""),d=u.useCallback(()=>{t.fetch("/devtools/api/metadata",{schema:{response:O}}).then(p=>{if(i(p.data.atoms),l(!1),r){const a=p.data.atoms.find(S=>S.name===r.name);a&&h(a)}})},[r?.name]);u.useEffect(()=>{d()},[]);const g=u.useMemo(()=>{if(!s)return n;const p=s.toLowerCase();return n.filter(a=>a.name.toLowerCase().includes(p))},[n,s]),v=u.useCallback(async(p,a)=>{try{await t.fetch("/devtools/api/atoms",{method:"POST",body:JSON.stringify({name:p.name,value:a})}),d()}catch(S){console.error("Failed to save atom:",S)}},[d]);return x?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(o,{c:"dimmed",children:"Loading..."})}):n.length===0?e.jsx(W,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(j,{w:260,style:{borderRight:`1px solid ${f.colors.border}`,backgroundColor:f.colors.surface},children:e.jsx(X,{atoms:g,selectedAtom:r,onSelectAtom:h,search:s,onSearchChange:c})}),e.jsx(j,{style:{flex:1,overflow:"hidden"},children:r?e.jsx(K,{atom:r,onSave:v}):e.jsx(Q,{})})]})};export{de as DevAtomsViewer,de as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as e}from"./entry.
|
|
1
|
+
import{w as e}from"./entry.BWhdC3SJ.js";const a=[["path",{d:"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3",key:"svg-0"}],["path",{d:"M3 15a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -2",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],o=e("outline","server","Server",a);export{o as I};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as C,q as W,j as e,B as o,t as G,aJ as R,aC as x,aG as q}from"./entry.
|
|
1
|
+
import{r as C,q as W,j as e,B as o,t as G,aJ as R,aC as x,aG as q}from"./entry.BWhdC3SJ.js";var u={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const J=u,w=C.forwardRef(({__staticSelector:t,__stylesApiProps:l,className:s,classNames:f,styles:_,unstyled:h,children:I,label:i,description:d,id:p,disabled:b,error:n,size:r,labelPosition:j="left",bodyElement:c="div",labelElement:m="label",variant:v,style:y,vars:D,mod:S,attributes:F,...g},B)=>{const a=W({name:t,props:l,className:s,style:y,classes:u,classNames:f,styles:_,unstyled:h,attributes:F});return e.jsx(o,{...a("root"),ref:B,__vars:{"--label-fz":R(r),"--label-lh":G(r,"label-lh")},mod:[{"label-position":j},S],variant:v,size:r,...g,children:e.jsxs(o,{component:c,htmlFor:c==="label"?p:void 0,...a("body"),children:[I,e.jsxs("div",{...a("labelWrapper"),"data-disabled":b||void 0,children:[i&&e.jsx(o,{component:m,htmlFor:m==="label"?p:void 0,...a("label"),"data-disabled":b||void 0,children:i}),d&&e.jsx(x.Description,{size:r,__inheritStyles:!1,...a("description"),children:d}),n&&typeof n!="boolean"&&e.jsx(x.Error,{size:r,__inheritStyles:!1,...a("error"),children:n})]})]})})});w.displayName="@mantine/core/InlineInput";function N({children:t,role:l}){const s=q();return s?e.jsx("div",{role:l,"aria-labelledby":s.labelId,"aria-describedby":s.describedBy,children:t}):e.jsx(e.Fragment,{children:t})}export{N as I,w as a,J as b};
|
|
Binary file
|
|
Binary file
|