@alepha/devtools 0.14.1 → 0.14.3

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.
Files changed (76) hide show
  1. package/assets/devtools/{asset.Bhpm0ujk.css → asset.DbJSgVPr.css} +1 -1
  2. package/assets/devtools/chunk.B3_W5FaN.js +1 -0
  3. package/assets/devtools/chunk.BBrq-Wwo.js +7 -0
  4. package/assets/devtools/chunk.BC4Lys4j.js +1 -0
  5. package/assets/devtools/chunk.BNC0DJB8.js +1 -0
  6. package/assets/devtools/chunk.BOc4btAA.js +2 -0
  7. package/assets/devtools/chunk.BPjMdorr.js +1 -0
  8. package/assets/devtools/chunk.Bdi_dTor.js +1 -0
  9. package/assets/devtools/chunk.BeYM7pih.js +1 -0
  10. package/assets/devtools/{chunk.aHk99chr.js → chunk.BjjA59Pf.js} +1 -1
  11. package/assets/devtools/{chunk.BkBlh2Dt.js → chunk.ByuRJbSC.js} +1 -1
  12. package/assets/devtools/chunk.C1yl87Yo.js +1 -0
  13. package/assets/devtools/chunk.C5K_AIru.js +1 -0
  14. package/assets/devtools/chunk.C6NWzsJg.js +1 -0
  15. package/assets/devtools/chunk.CAWWjC4E.js +1 -0
  16. package/assets/devtools/chunk.CQ8PqHT0.js +1 -0
  17. package/assets/devtools/{chunk.CaVuq3Op.js → chunk.CYVZxO-p.js} +1 -1
  18. package/assets/devtools/{chunk.XGXwPH1e.js → chunk.ChDpavl2.js} +1 -1
  19. package/assets/devtools/chunk.DAVfKvCa.js +2 -0
  20. package/assets/devtools/chunk.DF8tZYh8.js +1 -0
  21. package/assets/devtools/{chunk.DPzX4t8Q.js → chunk.DI-f4xNk.js} +1 -1
  22. package/assets/devtools/{chunk.uTsm7un3.js → chunk.DLDchrhP.js} +1 -1
  23. package/assets/devtools/{chunk.Djkuv-DD.js → chunk.DN-SKgAD.js} +1 -1
  24. package/assets/devtools/{chunk.BVciOoK-.js → chunk.DcaVw31J.js} +1 -1
  25. package/assets/devtools/chunk.Dwv4A_H_.js +1 -0
  26. package/assets/devtools/chunk.DxjqPOcc.js +1 -0
  27. package/assets/devtools/{chunk.Duwrcaca.js → chunk.I1TSx4X4.js} +1 -1
  28. package/assets/devtools/chunk.INuuLdYd.js +1 -0
  29. package/assets/devtools/chunk.PWK2K2kI.js +1 -0
  30. package/assets/devtools/chunk.UAANdYnt.js +1 -0
  31. package/assets/devtools/chunk.XsVAJU_N.js +9 -0
  32. package/assets/devtools/chunk.iyc5GsVj.js +1 -0
  33. package/assets/devtools/chunk.mJxmm31y.js +1 -0
  34. package/assets/devtools/chunk.ospt8-RN.js +1 -0
  35. package/assets/devtools/entry.DBfTnVUe.js +75 -0
  36. package/assets/devtools/index.html +2 -2
  37. package/dist/index.d.ts +29 -0
  38. package/dist/index.js +15 -0
  39. package/dist/index.js.map +1 -1
  40. package/package.json +11 -11
  41. package/src/__tests__/DevCollectorProvider.spec.ts +7 -0
  42. package/src/api/providers/DevToolsDatabaseProvider.ts +16 -0
  43. package/src/ui/AppRouter.tsx +1 -1
  44. package/src/ui/components/DevAtomsViewer.tsx +2 -1
  45. package/src/ui/components/DevDashboard.tsx +13 -163
  46. package/src/ui/components/DevLayout.tsx +23 -48
  47. package/src/ui/components/DevTopicsViewer.tsx +3 -7
  48. package/src/ui/components/graph/DevDependencyGraph.tsx +123 -104
  49. package/src/ui/components/graph/GraphControls.tsx +31 -25
  50. package/src/ui/main.ts +8 -2
  51. package/assets/devtools/chunk.0pKzkQ-k.js +0 -1
  52. package/assets/devtools/chunk.B5eTVHku.js +0 -1
  53. package/assets/devtools/chunk.B9h7IAR1.js +0 -1
  54. package/assets/devtools/chunk.BChtaeaz.js +0 -1
  55. package/assets/devtools/chunk.BLm9NSIJ.js +0 -9
  56. package/assets/devtools/chunk.BRzkf5AB.js +0 -2
  57. package/assets/devtools/chunk.BiYuhEvJ.js +0 -1
  58. package/assets/devtools/chunk.BmVQcEyT.js +0 -1
  59. package/assets/devtools/chunk.ByjndBdY.js +0 -6
  60. package/assets/devtools/chunk.C8MW3asi.js +0 -1
  61. package/assets/devtools/chunk.CLYiSTOf.js +0 -1
  62. package/assets/devtools/chunk.CioNo4ZJ.js +0 -1
  63. package/assets/devtools/chunk.CjoaeVq1.js +0 -7
  64. package/assets/devtools/chunk.Ct5753mG.js +0 -1
  65. package/assets/devtools/chunk.D4sT5zWZ.js +0 -1
  66. package/assets/devtools/chunk.Ddpv5E_O.js +0 -1
  67. package/assets/devtools/chunk.DtstekP0.js +0 -1
  68. package/assets/devtools/chunk.R7-m7OZO.js +0 -1
  69. package/assets/devtools/chunk.VgeujX8m.js +0 -2
  70. package/assets/devtools/chunk.VjygskIP.js +0 -1
  71. package/assets/devtools/chunk.W1p_0xSo.js +0 -1
  72. package/assets/devtools/chunk.arBxf8N4.js +0 -1
  73. package/assets/devtools/chunk.bYKDU_ru.js +0 -1
  74. package/assets/devtools/chunk.cMS5bixD.js +0 -1
  75. package/assets/devtools/chunk.e1Pq7Nwk.js +0 -1
  76. package/assets/devtools/entry.Cjxjbqvs.js +0 -75
@@ -1,9 +0,0 @@
1
- import{an as me,r as F,j as G,f as _e,b as Ae,q as We,s as Ze,av as ot,a0 as Te,aC as ut,U as Me,a3 as He,ay as st,d as lt,au as Ne,t as ge,aB as Xe,aG as ct,$ as ft,B as je,v as dt,a1 as vt,w as mt}from"./entry.Cjxjbqvs.js";import{n as Oe}from"./chunk.BjFrJKj1.js";import{I as gt,a as ht,b as pt}from"./chunk.C8MW3asi.js";function qe(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r}var be;(function(e){e.event="event",e.props="prop"})(be||(be={}));function ie(){}function bt(e){var t,r=void 0;return function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];return t&&a.length===t.length&&a.every(function(i,l){return i===t[l]})||(t=a,r=e.apply(void 0,a)),r}}function Se(e){return!!(e||"").match(/\d/)}function he(e){return e==null}function St(e){return typeof e=="number"&&isNaN(e)}function Je(e){return he(e)||St(e)||typeof e=="number"&&!isFinite(e)}function Qe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function wt(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function xt(e,t,r){var a=wt(r),n=e.search(/[1-9]/);return n=n===-1?e.length:n,e.substring(0,n)+e.substring(n,e.length).replace(a,"$1"+t)}function Nt(e){var t=F.useRef(e);t.current=e;var r=F.useRef(function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];return t.current.apply(t,a)});return r.current}function Be(e,t){t===void 0&&(t=!0);var r=e[0]==="-",a=r&&t;e=e.replace("-","");var n=e.split("."),i=n[0],l=n[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:a}}function yt(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),a=r[0].replace(/^0+/,"")||"0",n=r[1]||"";return(t?"-":"")+a+(n?"."+n:"")}function Ye(e,t,r){for(var a="",n=r?"0":"",i=0;i<=t-1;i++)a+=e[i]||n;return a}function Le(e,t){return Array(t+1).join(e)}function et(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var a=t.split(/[eE]/g),n=a[0],i=a[1];if(i=Number(i),!i)return r+n;n=n.replace(".","");var l=1+i,S=n.length;return l<0?n="0."+Le("0",Math.abs(l))+n:l>=S?n=n+Le("0",l-S):n=(n.substring(0,l)||"0")+"."+n.substring(l),r+n}function Ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var a=(e.indexOf(".")!==-1||r)&&t,n=Be(e),i=n.beforeDecimal,l=n.afterDecimal,S=n.hasNegation,N=parseFloat("0."+(l||"0")),w=l.length<=t?"0."+l:N.toFixed(t),x=w.split("."),g=i;i&&Number(x[0])&&(g=i.split("").reverse().reduce(function(C,D,m){return C.length>m?(Number(C[0])+Number(D)).toString()+C.substring(1,C.length):D+C},x[0]));var d=Ye(x[1]||"",t,r),h=S?"-":"",f=a?".":"";return""+h+g+f+d}function ce(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var tt=bt(function(e,t){for(var r=0,a=0,n=e.length,i=t.length;e[r]===t[r]&&r<n;)r++;for(;e[n-1-a]===t[i-1-a]&&i-a>r&&n-a>r;)a++;return{from:{start:r,end:n-a},to:{start:r,end:i-a}}}),Vt=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ct(e,t,r){return Math.min(Math.max(e,t),r)}function De(e){return Math.max(e.selectionStart,e.selectionEnd)}function Dt(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function It(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Rt(e){var t=e.currentValue,r=e.formattedValue,a=e.currentValueIndex,n=e.formattedValueIndex;return t[a]===r[n]}function Et(e,t,r,a,n,i,l){l===void 0&&(l=Rt);var S=n.findIndex(function(Z){return Z}),N=e.slice(0,S);!t&&!r.startsWith(N)&&(t=N,r=N+r,a=a+N.length);for(var w=r.length,x=e.length,g={},d=new Array(w),h=0;h<w;h++){d[h]=-1;for(var f=0,C=x;f<C;f++){var D=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:f});if(D&&g[f]!==!0){d[h]=f,g[f]=!0;break}}}for(var m=a;m<w&&(d[m]===-1||!i(r[m]));)m++;var k=m===w||d[m]===-1?x:d[m];for(m=a-1;m>0&&d[m]===-1;)m--;var M=m===-1||d[m]===-1?0:d[m]+1;return M>k?k:a-M<k-a?M:k}function Ke(e,t,r,a){var n=e.length;if(t=Ct(t,0,n),a==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=n&&!r[t];)t++;t>n&&(t=r.lastIndexOf(!0))}return t===-1&&(t=n),t}function _t(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,a=t.length;r<a;r++)t[r]=!!(Se(e[r])||Se(e[r-1]));return t}function rt(e,t,r,a,n,i){i===void 0&&(i=ie);var l=Nt(function(f,C){var D,m;return Je(f)?(m="",D=""):typeof f=="number"||C?(m=typeof f=="number"?et(f):f,D=a(m)):(m=n(f,void 0),D=a(m)),{formattedValue:D,numAsString:m}}),S=F.useState(function(){return l(he(e)?t:e,r)}),N=S[0],w=S[1],x=function(f,C){f.formattedValue!==N.formattedValue&&w({formattedValue:f.formattedValue,numAsString:f.value}),i(f,C)},g=e,d=r;he(e)&&(g=N.numAsString,d=!0);var h=l(g,d);return F.useMemo(function(){w(h)},[h.formattedValue]),[N,x]}function At(e){return e.replace(/[^0-9]/g,"")}function Tt(e){return e}function Bt(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var a=e.customInput,n=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=Tt);var S=e.removeFormatting;S===void 0&&(S=At);var N=e.defaultValue,w=e.valueIsNumericString,x=e.onValueChange,g=e.isAllowed,d=e.onChange;d===void 0&&(d=ie);var h=e.onKeyDown;h===void 0&&(h=ie);var f=e.onMouseUp;f===void 0&&(f=ie);var C=e.onFocus;C===void 0&&(C=ie);var D=e.onBlur;D===void 0&&(D=ie);var m=e.value,k=e.getCaretBoundary;k===void 0&&(k=_t);var M=e.isValidInputCharacter;M===void 0&&(M=Se);var Z=e.isCharacterSame,j=qe(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),J=rt(m,N,!!w,l,S,x),$=J[0],I=$.formattedValue,O=$.numAsString,K=J[1],U=F.useRef(),H=F.useRef({formattedValue:I,numAsString:O}),z=function(o,s){H.current={formattedValue:o.formattedValue,numAsString:o.value},K(o,s)},Q=F.useState(!1),q=Q[0],v=Q[1],c=F.useRef(null),R=F.useRef({setCaretTimeout:null,focusTimeout:null});F.useEffect(function(){return v(!0),function(){clearTimeout(R.current.setCaretTimeout),clearTimeout(R.current.focusTimeout)}},[]);var T=l,B=function(o,s){var p=parseFloat(s);return{formattedValue:o,value:s,floatValue:isNaN(p)?void 0:p}},y=function(o,s,p){o.selectionStart===0&&o.selectionEnd===o.value.length||(ce(o,s),R.current.setCaretTimeout=setTimeout(function(){o.value===p&&o.selectionStart!==s&&ce(o,s)},0))},P=function(o,s,p){return Ke(o,s,k(o),p)},Y=function(o,s,p){var _=k(s),L=Et(s,I,o,p,_,M,Z);return L=Ke(s,L,_),L},X=function(o){var s=o.formattedValue;s===void 0&&(s="");var p=o.input,_=o.source,L=o.event,E=o.numAsString,V;if(p){var W=o.inputValue||p.value,ee=De(p);p.value=s,V=Y(W,s,ee),V!==void 0&&y(p,V,s)}s!==I&&z(B(s,E),{event:L,source:_})};F.useEffect(function(){var o=H.current,s=o.formattedValue,p=o.numAsString;(I!==s||O!==p)&&z(B(I,O),{event:void 0,source:be.props})},[I,O]);var oe=c.current?De(c.current):void 0,fe=typeof window<"u"?F.useLayoutEffect:F.useEffect;fe(function(){var o=c.current;if(I!==H.current.formattedValue&&o){var s=Y(H.current.formattedValue,I,oe);o.value=I,y(o,s,I)}},[I]);var A=function(o,s,p){var _=s.target,L=U.current?Vt(U.current,_.selectionEnd):tt(I,o),E=Object.assign(Object.assign({},L),{lastValue:I}),V=S(o,E),W=T(V);if(V=S(W,void 0),g&&!g(B(W,V))){var ee=s.target,u=De(ee),b=Y(o,I,u);return ee.value=I,y(ee,b,I),!1}return X({formattedValue:W,numAsString:V,inputValue:o,event:s,source:p,input:s.target}),!0},ae=function(o,s){s===void 0&&(s=0);var p=o.selectionStart,_=o.selectionEnd;U.current={selectionStart:p,selectionEnd:_+s}},we=function(o){var s=o.target,p=s.value,_=A(p,o,be.event);_&&d(o),U.current=void 0},te=function(o){var s=o.target,p=o.key,_=s.selectionStart,L=s.selectionEnd,E=s.value;E===void 0&&(E="");var V;p==="ArrowLeft"||p==="Backspace"?V=Math.max(_-1,0):p==="ArrowRight"?V=Math.min(_+1,E.length):p==="Delete"&&(V=_);var W=0;p==="Delete"&&_===L&&(W=1);var ee=p==="ArrowLeft"||p==="ArrowRight";if(V===void 0||_!==L&&!ee){h(o),ae(s,W);return}var u=V;if(ee){var b=p==="ArrowLeft"?"left":"right";u=P(E,V,b),u!==V&&o.preventDefault()}else p==="Delete"&&!M(E[V])?u=P(E,V,"right"):p==="Backspace"&&!M(E[V])&&(u=P(E,V,"left"));u!==V&&y(s,u,E),h(o),ae(s,W)},ue=function(o){var s=o.target,p=function(){var _=s.selectionStart,L=s.selectionEnd,E=s.value;if(E===void 0&&(E=""),_===L){var V=P(E,_);V!==_&&y(s,V,E)}};p(),requestAnimationFrame(function(){p()}),f(o),ae(s)},pe=function(o){o.persist&&o.persist();var s=o.target,p=o.currentTarget;c.current=s,R.current.focusTimeout=setTimeout(function(){var _=s.selectionStart,L=s.selectionEnd,E=s.value;E===void 0&&(E="");var V=P(E,_);V!==_&&!(_===0&&L===E.length)&&y(s,V,E),C(Object.assign(Object.assign({},o),{currentTarget:p}))},0)},Ve=function(o){c.current=null,clearTimeout(R.current.focusTimeout),clearTimeout(R.current.setCaretTimeout),D(o)},se=q&&Dt()?"numeric":void 0,de=Object.assign({inputMode:se},j,{type:t,value:I,onChange:we,onKeyDown:te,onMouseUp:ue,onFocus:pe,onBlur:Ve});if(r==="text")return n?me.createElement(me.Fragment,null,n(I,j)||null):me.createElement("span",Object.assign({},j,{ref:i}),I);if(a){var ve=a;return me.createElement(ve,Object.assign({},de,{ref:i}))}return me.createElement("input",Object.assign({},de,{ref:i}))}function $e(e,t){var r=t.decimalScale,a=t.fixedDecimalScale,n=t.prefix;n===void 0&&(n="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,S=t.thousandsGroupStyle;if(S===void 0&&(S="thousand"),e===""||e==="-")return e;var N=ye(t),w=N.thousandSeparator,x=N.decimalSeparator,g=r!==0&&e.indexOf(".")!==-1||r&&a,d=Be(e,l),h=d.beforeDecimal,f=d.afterDecimal,C=d.addNegation;return r!==void 0&&(f=Ye(f,r,!!a)),w&&(h=xt(h,w,S)),n&&(h=n+h),i&&(f=f+i),C&&(h="-"+h),e=h+(g&&x||"")+f,e}function ye(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,a=e.allowedDecimalSeparators;return r===!0&&(r=","),a||(a=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:a}}function Pt(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),a=new RegExp("(-)(.)*(-)"),n=r.test(e),i=a.test(e);return e=e.replace(/-/g,""),n&&!i&&t&&(e="-"+e),e}function kt(e,t){return new RegExp("(^-)|[0-9]|"+Qe(e),"g")}function Ft(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Mt(e,t,r){var a;t===void 0&&(t=It(e));var n=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var S=r.decimalScale,N=t.from,w=t.to,x=w.start,g=w.end,d=ye(r),h=d.allowedDecimalSeparators,f=d.decimalSeparator,C=e[g]===f;if(Se(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(g-x===1&&h.indexOf(e[x])!==-1){var D=S===0?"":f;e=e.substring(0,x)+D+e.substring(x+1,e.length)}var m=function(c,R,T){var B=!1,y=!1;i.startsWith("-")?B=!1:c.startsWith("--")?(B=!1,y=!0):l.startsWith("-")&&c.length===l.length?B=!1:c[0]==="-"&&(B=!0);var P=B?1:0;return y&&(P=2),P&&(c=c.substring(P),R-=P,T-=P),{value:c,start:R,end:T,hasNegation:B}},k=m(e,x,g),M=k.hasNegation;a=k,e=a.value,x=a.start,g=a.end;var Z=m(t.lastValue,N.start,N.end),j=Z.start,J=Z.end,$=Z.value,I=e.substring(x,g);e.length&&$.length&&(j>$.length-l.length||J<i.length)&&!(I&&l.startsWith(I))&&(e=$);var O=0;e.startsWith(i)?O+=i.length:x<i.length&&(O=x),e=e.substring(O),g-=O;var K=e.length,U=e.length-l.length;e.endsWith(l)?K=U:(g>U||g>e.length-l.length)&&(K=g),e=e.substring(0,K),e=Pt(M?"-"+e:e,n),e=(e.match(kt(f))||[]).join("");var H=e.indexOf(f);e=e.replace(new RegExp(Qe(f),"g"),function(c,R){return R===H?".":""});var z=Be(e,n),Q=z.beforeDecimal,q=z.afterDecimal,v=z.addNegation;return w.end-w.start<N.end-N.start&&Q===""&&C&&!parseFloat(q)&&(e=v?"-":""),e}function jt(e,t){var r=t.prefix;r===void 0&&(r="");var a=t.suffix;a===void 0&&(a="");var n=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";n.fill(!1,0,r.length+(i?1:0));var l=e.length;return n.fill(!1,l-a.length+1,l+1),n}function Ot(e){var t=ye(e),r=t.thousandSeparator,a=t.decimalSeparator,n=e.prefix;n===void 0&&(n="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===a)throw new Error(`
2
- Decimal separator can't be same as thousand separator.
3
- thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
- decimalSeparator: `+a+` (default value for decimalSeparator is .)
5
- `);return n.startsWith("-")&&i&&(console.error(`
6
- Prefix can't start with '-' when allowNegative is true.
7
- prefix: `+n+`
8
- allowNegative: `+i+`
9
- `),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function Lt(e){e=Ot(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,a=e.allowLeadingZeros,n=e.onKeyDown;n===void 0&&(n=ie);var i=e.onBlur;i===void 0&&(i=ie);var l=e.thousandSeparator,S=e.decimalScale,N=e.fixedDecimalScale,w=e.prefix;w===void 0&&(w="");var x=e.defaultValue,g=e.value,d=e.valueIsNumericString,h=e.onValueChange,f=qe(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),C=ye(e),D=C.decimalSeparator,m=C.allowedDecimalSeparators,k=function(v){return $e(v,e)},M=function(v,c){return Mt(v,c,e)},Z=he(g)?x:g,j=d??Ft(Z,w,t);he(g)?he(x)||(j=j||typeof x=="number"):j=j||typeof g=="number";var J=function(v){return Je(v)?v:(typeof v=="number"&&(v=et(v)),j&&typeof S=="number"?Ge(v,S,!!N):v)},$=rt(J(g),J(x),!!j,k,M,h),I=$[0],O=I.numAsString,K=I.formattedValue,U=$[1],H=function(v){var c=v.target,R=v.key,T=c.selectionStart,B=c.selectionEnd,y=c.value;if(y===void 0&&(y=""),(R==="Backspace"||R==="Delete")&&B<w.length){v.preventDefault();return}if(T!==B){n(v);return}R==="Backspace"&&y[0]==="-"&&T===w.length+1&&r&&ce(c,1),S&&N&&(R==="Backspace"&&y[T-1]===D?(ce(c,T-1),v.preventDefault()):R==="Delete"&&y[T]===D&&v.preventDefault()),m?.includes(R)&&y[T]===D&&ce(c,T+1);var P=l===!0?",":l;R==="Backspace"&&y[T-1]===P&&ce(c,T-1),R==="Delete"&&y[T]===P&&ce(c,T+1),n(v)},z=function(v){var c=O;if(c.match(/\d/g)||(c=""),a||(c=yt(c)),N&&S&&(c=Ge(c,S,N)),c!==O){var R=$e(c,e);U({formattedValue:R,value:c,floatValue:parseFloat(c)},{event:v,source:be.event})}i(v)},Q=function(v){return v===D?!0:Se(v)},q=function(v){var c=v.currentValue,R=v.lastValue,T=v.formattedValue,B=v.currentValueIndex,y=v.formattedValueIndex,P=c[B],Y=T[y],X=tt(R,c),oe=X.to,fe=function(A){return M(A).indexOf(".")+w.length};return g===0&&N&&S&&c[oe.start]===D&&fe(c)<B&&fe(T)>y?!1:B>=oe.start&&B<oe.end&&m&&m.includes(P)&&Y===D?!0:P===Y};return Object.assign(Object.assign({},f),{value:K,valueIsNumericString:!1,isValidInputCharacter:Q,isCharacterSame:q,onValueChange:U,format:k,removeFormatting:M,getCaretBoundary:function(v){return jt(v,e)},onKeyDown:H,onBlur:z})}function Gt(e){var t=Lt(e);return me.createElement(Bt,Object.assign({},t))}function Ue({direction:e,style:t,...r}){return G.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:G.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var Re={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const Kt=/^(0\.0*|-0(\.0*)?)$/,$t=/^-?0\d+(\.\d+)?\.?$/,Ut=/\.\d*0$/;function Ee(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function Ie(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||Ee(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function zt(e){return e.toString().replace(".","").length}function Wt(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&zt(t)<14&&t!==""}function ze(e,t,r){if(e===void 0)return!0;const a=t===void 0||e>=t,n=r===void 0||e<=r;return a&&n}const Zt={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},Ht=Ze((e,{size:t})=>({controls:{"--ni-chevron-size":ge(t,"ni-chevron-size")}}));function Xt(e,t,r){const a=e.toString().replace(/^0+(?=\d)/,""),n=parseFloat(a);return Number.isNaN(n)?a:n>Number.MAX_SAFE_INTEGER?t!==void 0?t:a:Ne(n,r,t)}const at=_e((e,t)=>{const r=Ae("NumberInput",Zt,e),{className:a,classNames:n,styles:i,unstyled:l,vars:S,onChange:N,onValueChange:w,value:x,defaultValue:g,max:d,min:h,step:f,hideControls:C,rightSection:D,isAllowed:m,clampBehavior:k,onBlur:M,allowDecimal:Z,decimalScale:j,onKeyDown:J,onKeyDownCapture:$,handlersRef:I,startValue:O,disabled:K,rightSectionPointerEvents:U,allowNegative:H,readOnly:z,size:Q,rightSectionWidth:q,stepHoldInterval:v,stepHoldDelay:c,allowLeadingZeros:R,withKeyboardEvents:T,trimLeadingZeroesOnBlur:B,allowedDecimalSeparators:y,attributes:P,...Y}=r,X=We({name:"NumberInput",classes:Re,props:r,classNames:n,styles:i,unstyled:l,attributes:P,vars:S,varsResolver:Ht}),{resolvedClassNames:oe,resolvedStyles:fe}=ot({classNames:n,styles:i,props:r}),[A,ae]=Te({value:x,defaultValue:g,finalValue:"",onChange:N}),we=c!==void 0&&v!==void 0,te=F.useRef(null),ue=F.useRef(null),pe=F.useRef(0),Ve=(u,b)=>{b.source==="event"&&ae(Wt(u.floatValue,u.value)&&!Kt.test(u.value)&&!(R&&$t.test(u.value))&&!Ut.test(u.value)?u.floatValue:u.value),w?.(u,b)},se=u=>{const b=String(u).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},de=u=>{te.current&&typeof u<"u"&&te.current.setSelectionRange(u,u)},ve=F.useRef(Oe);ve.current=()=>{if(!Ie(A))return;let u;const b=se(A),Ce=se(f),xe=Math.max(b,Ce),re=10**xe;if(!Ee(A)&&(typeof A!="number"||Number.isNaN(A)))u=Ne(O,h,d);else if(d!==void 0){const le=(Math.round(Number(A)*re)+Math.round(f*re))/re;u=le<=d?le:d}else u=(Math.round(Number(A)*re)+Math.round(f*re))/re;const ne=u.toFixed(xe);ae(parseFloat(ne)),w?.({floatValue:parseFloat(ne),formattedValue:ne,value:ne},{source:"increment"}),setTimeout(()=>de(te.current?.value.length),0)};const o=F.useRef(Oe);o.current=()=>{if(!Ie(A))return;let u;const b=h!==void 0?h:H?Number.MIN_SAFE_INTEGER:0,Ce=se(A),xe=se(f),re=Math.max(Ce,xe),ne=10**re;if(!Ee(A)&&typeof A!="number"||Number.isNaN(A))u=Ne(O,b,d);else{const Fe=(Math.round(Number(A)*ne)-Math.round(f*ne))/ne;u=b!==void 0&&Fe<b?b:Fe}const le=u.toFixed(re);ae(parseFloat(le)),w?.({floatValue:parseFloat(le),formattedValue:le,value:le},{source:"decrement"}),setTimeout(()=>de(te.current?.value.length),0)};const s=u=>{J?.(u),!(z||!T)&&(u.key==="ArrowUp"&&(u.preventDefault(),ve.current?.()),u.key==="ArrowDown"&&(u.preventDefault(),o.current?.()))},p=u=>{if($?.(u),u.key==="Backspace"){const b=te.current;b&&b.selectionStart===0&&b.selectionStart===b.selectionEnd&&(u.preventDefault(),window.setTimeout(()=>de(0),0))}},_=u=>{let b=A;k==="blur"&&typeof b=="number"&&(b=Ne(b,h,d)),B&&typeof b=="string"&&se(b)<15&&(b=Xt(b,d,h)),A!==b&&ae(b),M?.(u)};ut(I,{increment:ve.current,decrement:o.current});const L=u=>{u?ve.current?.():o.current?.(),pe.current+=1},E=u=>{if(L(u),we){const b=typeof v=="number"?v:v(pe.current);ue.current=window.setTimeout(()=>E(u),b)}},V=(u,b)=>{u.preventDefault(),te.current?.focus(),L(b),we&&(ue.current=window.setTimeout(()=>E(b),c))},W=()=>{ue.current&&window.clearTimeout(ue.current),ue.current=null,pe.current=0},ee=G.jsxs("div",{...X("controls"),children:[G.jsx(Me,{...X("control"),tabIndex:-1,"aria-hidden":!0,disabled:K||typeof A=="number"&&d!==void 0&&A>=d,mod:{direction:"up"},onMouseDown:u=>u.preventDefault(),onPointerDown:u=>{V(u,!0)},onPointerUp:W,onPointerLeave:W,children:G.jsx(Ue,{direction:"up"})}),G.jsx(Me,{...X("control"),tabIndex:-1,"aria-hidden":!0,disabled:K||typeof A=="number"&&h!==void 0&&A<=h,mod:{direction:"down"},onMouseDown:u=>u.preventDefault(),onPointerDown:u=>{V(u,!1)},onPointerUp:W,onPointerLeave:W,children:G.jsx(Ue,{direction:"down"})})]});return G.jsx(He,{component:Gt,allowNegative:H,className:lt(Re.root,a),size:Q,inputMode:"decimal",...Y,readOnly:z,disabled:K,value:A,getInputRef:st(t,te),onValueChange:Ve,rightSection:C||z||!Ie(A)?D:D||ee,classNames:oe,styles:fe,unstyled:l,__staticSelector:"NumberInput",decimalScale:Z?j:0,onKeyDown:s,onKeyDownCapture:p,rightSectionPointerEvents:U??(K?"none":void 0),rightSectionWidth:q??`var(--ni-right-section-width-${Q||"sm"})`,allowLeadingZeros:R,allowedDecimalSeparators:y,onBlur:_,attributes:P,isAllowed:u=>k==="strict"?m?m(u)&&ze(u.floatValue,h,d):ze(u.floatValue,h,d):m?m(u):!0})});at.classes={...He.classes,...Re};at.displayName="@mantine/core/NumberInput";const nt=F.createContext(null),qt=nt.Provider,Jt=()=>F.useContext(nt),Pe=_e((e,t)=>{const{value:r,defaultValue:a,onChange:n,size:i,wrapperProps:l,children:S,readOnly:N,disabled:w,...x}=Ae("SwitchGroup",null,e),[g,d]=Te({value:r,defaultValue:a,finalValue:[],onChange:n}),h=f=>{const C=f.currentTarget.value;!N&&d(g.includes(C)?g.filter(D=>D!==C):[...g,C])};return G.jsx(qt,{value:{value:g,onChange:h,size:i,disabled:w},children:G.jsx(Xe.Wrapper,{size:i,ref:t,...l,...x,labelElement:"div",__staticSelector:"SwitchGroup",children:G.jsx(gt,{role:"group",children:S})})})});Pe.classes=Xe.Wrapper.classes;Pe.displayName="@mantine/core/SwitchGroup";var it={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const Qt={labelPosition:"right",withThumbIndicator:!0},Yt=Ze((e,{radius:t,color:r,size:a})=>({root:{"--switch-radius":t===void 0?void 0:vt(t),"--switch-height":ge(a,"switch-height"),"--switch-width":ge(a,"switch-width"),"--switch-thumb-size":ge(a,"switch-thumb-size"),"--switch-label-font-size":ge(a,"switch-label-font-size"),"--switch-track-label-padding":ge(a,"switch-track-label-padding"),"--switch-color":r?dt(r,e):void 0}})),ke=_e((e,t)=>{const r=Ae("Switch",Qt,e),{classNames:a,className:n,style:i,styles:l,unstyled:S,vars:N,color:w,label:x,offLabel:g,onLabel:d,id:h,size:f,radius:C,wrapperProps:D,thumbIcon:m,checked:k,defaultChecked:M,onChange:Z,labelPosition:j,description:J,error:$,disabled:I,variant:O,rootRef:K,mod:U,withThumbIndicator:H,attributes:z,...Q}=r,q=Jt(),v=f||q?.size,c=We({name:"Switch",props:r,classes:it,className:n,style:i,classNames:a,styles:l,unstyled:S,attributes:z,vars:N,varsResolver:Yt}),{styleProps:R,rest:T}=ct(Q),B=ft(h),y={checked:q?.value.includes(T.value)??k,onChange:X=>{q?.onChange(X),Z?.(X)},disabled:q?.disabled??I},[P,Y]=Te({value:y.checked??k,defaultValue:M,finalValue:!1});return G.jsxs(ht,{...c("root"),__staticSelector:"Switch",__stylesApiProps:r,id:B,size:v,labelPosition:j,label:x,description:J,error:$,disabled:y.disabled,bodyElement:"label",labelElement:"span",classNames:a,styles:l,unstyled:S,"data-checked":y.checked,variant:O,ref:K,mod:U,...R,...D,children:[G.jsx("input",{...T,...y,checked:P,"data-checked":y.checked,onChange:X=>{y.onChange?.(X),Y(X.currentTarget.checked)},id:B,ref:t,type:"checkbox",role:"switch",...c("input")}),G.jsxs(je,{"aria-hidden":"true",component:"span",mod:{error:$,"label-position":j,"without-labels":!d&&!g},...c("track"),children:[G.jsx(je,{component:"span",mod:{"reduce-motion":!0,"with-thumb-indicator":H&&!m},...c("thumb"),children:m}),G.jsx("span",{...c("trackLabel"),children:P?d:g})]})]})});ke.classes={...it,...pt};ke.displayName="@mantine/core/Switch";ke.Group=Pe;const er=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],nr=mt("outline","refresh","Refresh",er);export{nr as I,at as N,ke as S};
@@ -1,2 +0,0 @@
1
- import{c as W,f as B,b as N,j as e,U as xe,B as w,_ as fe,$ as ve,a0 as Q,q as je,s as ge,a1 as ye,e as be,a2 as Se,r as f,a3 as Ce,T as b,Y as X,Z as Y,a4 as A,a5 as Ie,a6 as Z,a7 as ze,a8 as ee,a9 as se,aa as te,ab as oe,ac as re,ad as Ae,G as we,H as G,F as J,K as Pe,ae as Te,z as Ne}from"./entry.Cjxjbqvs.js";import{d as Ee}from"./chunk.XGXwPH1e.js";import{B as k,S as O}from"./chunk.uTsm7un3.js";import{C as U}from"./chunk.B5eTVHku.js";import{T as Re}from"./chunk.DPzX4t8Q.js";import{I as _e}from"./chunk.R7-m7OZO.js";import{g as V,T as z}from"./chunk.Ct5753mG.js";import{A as ne}from"./chunk.Duwrcaca.js";import{c as Oe}from"./chunk.BlqFPyLh.js";import{I as Be}from"./chunk.VjygskIP.js";import{I as ke}from"./chunk.CioNo4ZJ.js";import{S as Le}from"./chunk.e1Pq7Nwk.js";import"./chunk.uyVen0u2.js";const[Je,$]=W("Accordion component was not found in the tree"),[Ue,ae]=W("Accordion.Item component was not found in the tree");var E={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const D=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,chevron:c,icon:m,onClick:u,onKeyDown:n,children:r,disabled:i,mod:h,...p}=N("AccordionControl",null,s),{value:y}=ae(),a=$(),S=a.isItemActive(y),R=typeof a.order=="number",T=`h${a.order}`,v=e.jsxs(xe,{...p,...a.getStyles("control",{className:d,classNames:t,style:x,styles:l,variant:a.variant}),unstyled:a.unstyled,mod:["accordion-control",{active:S,"chevron-position":a.chevronPosition,disabled:i},h],ref:o,onClick:P=>{u?.(P),a.onChange(y)},type:"button",disabled:i,"aria-expanded":S,"aria-controls":a.getRegionId(y),id:a.getControlId(y),onKeyDown:Oe({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:a.loop,orientation:"vertical",onKeyDown:n}),children:[e.jsx(w,{component:"span",mod:{rotate:!a.disableChevronRotation&&S,position:a.chevronPosition},...a.getStyles("chevron",{classNames:t,styles:l}),children:c||a.chevron}),e.jsx("span",{...a.getStyles("label",{classNames:t,styles:l}),children:r}),m&&e.jsx(w,{component:"span",mod:{"chevron-position":a.chevronPosition},...a.getStyles("icon",{classNames:t,styles:l}),children:m})]});return R?e.jsx(T,{...a.getStyles("itemTitle",{classNames:t,styles:l}),children:v}):v});D.displayName="@mantine/core/AccordionControl";D.classes=E;const M=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,value:c,mod:m,...u}=N("AccordionItem",null,s),n=$();return e.jsx(Ue,{value:{value:c},children:e.jsx(w,{ref:o,mod:[{active:n.isItemActive(c)},m],...n.getStyles("item",{className:d,classNames:t,styles:l,style:x,variant:n.variant}),...u})})});M.displayName="@mantine/core/AccordionItem";M.classes=E;const F=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,children:c,...m}=N("AccordionPanel",null,s),{value:u}=ae(),n=$();return e.jsx(fe,{ref:o,...n.getStyles("panel",{className:d,classNames:t,style:x,styles:l}),...m,in:n.isItemActive(u),transitionDuration:n.transitionDuration??200,role:"region",id:n.getRegionId(u),"aria-labelledby":n.getControlId(u),children:e.jsx("div",{...n.getStyles("content",{classNames:t,styles:l}),children:c})})});F.displayName="@mantine/core/AccordionPanel";F.classes=E;const $e={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},De=ge((s,{transitionDuration:o,chevronSize:t,radius:d})=>({root:{"--accordion-transition-duration":o===void 0?void 0:`${o}ms`,"--accordion-chevron-size":t===void 0?void 0:be(t),"--accordion-radius":d===void 0?void 0:ye(d)}}));function j(s){const o=N("Accordion",$e,s),{classNames:t,className:d,style:x,styles:l,unstyled:g,vars:c,children:m,multiple:u,value:n,defaultValue:r,onChange:i,id:h,loop:p,transitionDuration:y,disableChevronRotation:a,chevronPosition:S,chevronSize:R,order:T,chevron:v,variant:P,radius:Qe,chevronIconSize:le,attributes:ie,...ce}=o,L=ve(h),[C,de]=Q({value:n,defaultValue:r,finalValue:u?[]:null,onChange:i}),ue=I=>Array.isArray(C)?C.includes(I):I===C,me=I=>{const he=Array.isArray(C)?C.includes(I)?C.filter(pe=>pe!==I):[...C,I]:I===C?null:I;de(he)},q=je({name:"Accordion",classes:E,props:o,className:d,style:x,classNames:t,styles:l,unstyled:g,attributes:ie,vars:c,varsResolver:De});return e.jsx(Je,{value:{isItemActive:ue,onChange:me,getControlId:V(`${L}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:V(`${L}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:v===null?null:v||e.jsx(ne,{size:le}),transitionDuration:y,disableChevronRotation:a,chevronPosition:S,order:T,loop:p,getStyles:q,variant:P,unstyled:g},children:e.jsx(w,{...q("root"),id:L,...ce,variant:P,"data-accordion":!0,children:m})})}const Me=s=>s;j.extend=Me;j.withProps=Se(j);j.classes=E;j.displayName="@mantine/core/Accordion";j.Item=M;j.Panel=F;j.Control=D;j.Chevron=ne;function K(s,o){if(typeof s=="string"&&s.trim().length===0)return!0;try{return o(s),!0}catch{return!1}}const Fe={serialize:JSON.stringify,deserialize:JSON.parse,size:"sm"},H=B((s,o)=>{const{value:t,defaultValue:d,onChange:x,formatOnBlur:l,validationError:g,serialize:c,deserialize:m,onFocus:u,onBlur:n,readOnly:r,error:i,...h}=N("JsonInput",Fe,s),[p,y]=Q({value:t,defaultValue:d,finalValue:"",onChange:x}),[a,S]=f.useState(K(p,m)),R=v=>{u?.(v),S(!0)},T=v=>{typeof n=="function"&&n(v);const P=K(v.currentTarget.value,m);l&&!r&&P&&v.currentTarget.value.trim()!==""&&y(c(m(v.currentTarget.value),null,2)),S(P)};return e.jsx(Re,{value:p,onChange:v=>y(v.currentTarget.value),onFocus:R,onBlur:T,ref:o,readOnly:r,...h,autoComplete:"off",__staticSelector:"JsonInput",error:a?i:g||!0,"data-monospace":!0})});H.classes=Ce.classes;H.displayName="@mantine/core/JsonInput";const He=(s,o)=>{const t=[`curl -X ${s.method.toUpperCase()}`];return t.push(` '${window.location.origin}${s.fullPath}'`),s.body,t.join(` \\
2
- `)},qe={GET:"teal",POST:"blue",PUT:"orange",PATCH:"yellow",DELETE:"red"},Ge=({method:s})=>e.jsx(k,{variant:"light",color:qe[s.toUpperCase()]||"gray",size:"sm",radius:"sm",w:60,children:s.toUpperCase()}),_=({schema:s,label:o})=>s?e.jsxs(w,{children:[e.jsx(b,{size:"xs",fw:500,c:"dimmed",mb:4,children:o}),e.jsx(U,{block:!0,style:{fontSize:11,maxHeight:200,overflow:"auto"},children:JSON.stringify(s,null,2)})]}):null,Ve=({action:s})=>{const o=X(Y),[t,d]=f.useState("{}"),[x,l]=f.useState(null),[g,c]=f.useState(!1),[m,u]=f.useState(null),[n,r]=f.useState(null),i=f.useCallback(async()=>{c(!0),r(null),l(null);const h=performance.now();try{let p;if(s.body&&t)try{p=JSON.parse(t)}catch{r("Invalid JSON body"),c(!1);return}const y=await o.fetch(s.fullPath,{method:s.method.toUpperCase(),body:p?JSON.stringify(p):void 0,headers:p?{"Content-Type":"application/json"}:void 0});u(Math.round(performance.now()-h)),l(JSON.stringify(y.data,null,2))}catch(p){u(Math.round(performance.now()-h)),r(p instanceof Error?p.message:"Request failed")}finally{c(!1)}},[o,s,t]);return e.jsxs(O,{gap:"md",children:[s.body&&e.jsx(H,{label:"Request Body",placeholder:'{"key": "value"}',value:t,onChange:d,minRows:4,maxRows:10,autosize:!0,formatOnBlur:!0,validationError:"Invalid JSON"}),e.jsxs(A,{children:[e.jsx(Ie,{leftSection:g?e.jsx(Z,{size:14}):e.jsx(_e,{size:14}),onClick:i,disabled:g,size:"sm",children:"Execute"}),m!==null&&e.jsxs(b,{size:"xs",c:"dimmed",children:[m,"ms"]})]}),n&&e.jsx(ze,{p:"sm",bg:"var(--mantine-color-red-light)",children:e.jsx(b,{size:"sm",c:"red",children:n})}),x&&e.jsxs(w,{children:[e.jsxs(A,{justify:"space-between",mb:4,children:[e.jsx(b,{size:"xs",fw:500,c:"dimmed",children:"Response"}),e.jsx(ee,{value:x,children:({copied:h,copy:p})=>e.jsx(se,{size:"xs",variant:"subtle",onClick:p,children:h?e.jsx(te,{size:12}):e.jsx(oe,{size:12})})})]}),e.jsx(re,{h:200,children:e.jsx(U,{block:!0,style:{fontSize:11},children:x})})]})]})},Ke=({action:s})=>{const o=f.useMemo(()=>He(s),[s]);return e.jsxs(j.Item,{value:s.fullPath,opacity:s.disabled?.5:1,children:[e.jsx(j.Control,{children:e.jsxs(A,{gap:"sm",wrap:"nowrap",children:[e.jsx(Ge,{method:s.method}),e.jsx(b,{size:"sm",ff:"monospace",style:{wordBreak:"break-all"},children:s.fullPath}),s.secure&&e.jsx(Ae,{label:"Requires authentication",children:e.jsx(Be,{size:14,opacity:.5})}),s.disabled&&e.jsx(k,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsx(j.Panel,{children:e.jsxs(O,{gap:"md",children:[(s.description||s.summary)&&e.jsx(b,{size:"sm",c:"dimmed",children:s.description||s.summary}),e.jsxs(z,{defaultValue:"schema",variant:"outline",children:[e.jsxs(z.List,{children:[e.jsx(z.Tab,{value:"schema",size:"xs",children:"Schema"}),e.jsx(z.Tab,{value:"try",size:"xs",children:"Try It"}),e.jsx(z.Tab,{value:"curl",size:"xs",leftSection:e.jsx(ke,{size:12}),children:"cURL"})]}),e.jsx(z.Panel,{value:"schema",pt:"md",children:e.jsxs(O,{gap:"md",children:[e.jsxs(A,{gap:"xl",align:"flex-start",children:[e.jsx(_,{schema:s.params,label:"Path Parameters"}),e.jsx(_,{schema:s.query,label:"Query Parameters"})]}),e.jsx(_,{schema:s.body,label:"Request Body"}),e.jsx(_,{schema:s.response,label:"Response"}),!s.params&&!s.query&&!s.body&&!s.response&&e.jsx(b,{size:"sm",c:"dimmed",children:"No schema defined"})]})}),e.jsx(z.Panel,{value:"try",pt:"md",children:e.jsx(Ve,{action:s})}),e.jsx(z.Panel,{value:"curl",pt:"md",children:e.jsxs(w,{pos:"relative",children:[e.jsx(ee,{value:o,children:({copied:t,copy:d})=>e.jsx(se,{size:"sm",variant:"subtle",onClick:d,pos:"absolute",top:8,right:8,children:t?e.jsx(te,{size:14}):e.jsx(oe,{size:14})})}),e.jsx(U,{block:!0,style:{fontSize:11},children:o})]})})]})]})})]})},We=({group:s,actions:o})=>e.jsxs(w,{children:[e.jsxs(A,{gap:"xs",mb:"xs",children:[e.jsx(we,{size:14,opacity:.5}),e.jsx(b,{size:"xs",fw:600,tt:"uppercase",c:"dimmed",children:s}),e.jsx(k,{variant:"light",color:"gray",size:"xs",children:o.length})]}),e.jsx(j,{variant:"separated",styles:{item:{backgroundColor:G.colors.surface,border:`1px solid ${G.colors.border}`}},children:o.map(t=>e.jsx(Ke,{action:t},t.fullPath))})]}),ds=()=>{const s=X(Y),[o,t]=f.useState([]),[d,x]=f.useState(!0),[l,g]=f.useState(""),[c,m]=f.useState("all");f.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:Ee}}).then(r=>{t(r.data.actions),x(!1)})},[]);const u=f.useMemo(()=>o.filter(r=>{if(r.hide||c!=="all"&&r.method.toUpperCase()!==c)return!1;if(l){const i=l.toLowerCase();return r.fullPath.toLowerCase().includes(i)||r.name.toLowerCase().includes(i)||r.group.toLowerCase().includes(i)||r.description?.toLowerCase().includes(i)}return!0}),[o,l,c]),n=f.useMemo(()=>{const r={};for(const i of u){const h=i.group||"Other";r[h]||(r[h]=[]),r[h].push(i)}return Object.entries(r).sort(([i],[h])=>i.localeCompare(h))},[u]);return d?e.jsx(J,{align:"center",justify:"center",h:"100%",children:e.jsx(Z,{size:"sm"})}):e.jsxs(J,{direction:"column",gap:"md",w:"100%",h:"100%",p:"xl",children:[e.jsx(A,{justify:"space-between",wrap:"nowrap",children:e.jsxs(A,{gap:"sm",children:[e.jsx(Pe,{size:24,opacity:.7}),e.jsx(b,{size:"lg",fw:500,children:"Actions"}),e.jsx(k,{variant:"light",color:"gray",size:"sm",children:u.length})]})}),e.jsxs(A,{gap:"sm",children:[e.jsx(Te,{placeholder:"Search actions...",leftSection:e.jsx(Ne,{size:14}),value:l,onChange:r=>g(r.currentTarget.value),style:{flex:1},size:"sm"}),e.jsx(Le,{size:"xs",value:c,onChange:m,data:[{label:"All",value:"all"},{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]})]}),e.jsx(re,{flex:1,offsetScrollbars:!0,children:n.length===0?e.jsx(J,{align:"center",justify:"center",h:200,children:e.jsx(b,{c:"dimmed",children:"No actions found"})}):e.jsx(O,{gap:"md",children:n.map(([r,i])=>e.jsx(We,{group:r,actions:i},r))})})]})};export{ds as DevActionsExplorer,ds as default};
@@ -1 +0,0 @@
1
- import{b9 as o}from"./entry.Cjxjbqvs.js";function a(t,r){return t in r?o(r[t]):o(t)}function s(t,r){const n=t.map(e=>({value:e,px:a(e,r)}));return n.sort((e,u)=>e.px-u.px),n}export{s as a,a as g};
@@ -1 +0,0 @@
1
- import{w as T,Y as J,Z as R,r as u,j as e,F as m,T as o,B as j,H as f,V as z,ae as C,z as B,ac as k,af as w,ad as D,a9 as I,a5 as A,ag as M}from"./entry.Cjxjbqvs.js";import{d as O}from"./chunk.XGXwPH1e.js";import{S as y,B as E}from"./chunk.uTsm7un3.js";import{T as b}from"./chunk.Ct5753mG.js";import{S as N,I as L,N as F}from"./chunk.BLm9NSIJ.js";import{T as $}from"./chunk.DPzX4t8Q.js";import"./chunk.BlqFPyLh.js";import"./chunk.BjFrJKj1.js";import"./chunk.C8MW3asi.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:"M12 14m-2 0a2 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.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],U=T("outline","edit","Edit",H),X=({atoms:t,selectedAtom:r,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:n=>l(n.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(n=>{const h=r?.name===n.name,s=n.currentValue!==void 0;return e.jsxs(m,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>i(n),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:n.name}),s&&e.jsx(E,{size:"xs",variant:"light",color:"green",children:"set"})]},n.name)})]})})]}),V=({schema:t,value:r,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 n=l.type,h=l.format;if(n==="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:r?.[s],onChange:d=>i({...r,[s]:d}),path:x?`${x}.${s}`:s})]},s))});if(n==="array"){const s=r??[];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 n==="boolean"?e.jsx(N,{checked:r??!1,onChange:s=>i(s.currentTarget.checked)}):n==="number"||n==="integer"?e.jsx(F,{size:"sm",value:r??"",onChange:s=>i(s===""?void 0:s),allowDecimal:n==="number"}):l.enum?e.jsxs("select",{value:r??"",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:r??"",onChange:s=>i(s.target.value||void 0)}):h==="textarea"||l.multiline?e.jsx($,{size:"sm",value:r??"",onChange:s=>i(s.target.value||void 0),autosize:!0,minRows:2,maxRows:6}):e.jsx(C,{size:"sm",value:r??"",onChange:s=>i(s.target.value||void 0)})},Y=({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})]})]})}),Z=({atom:t,onSave:r})=>{const[i,x]=u.useState(t.currentValue??t.defaultValue),[l,n]=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=()=>{r(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=>n(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})})]})},q=({atom:t,onSave:r})=>{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(Y,{atom:t})}),e.jsx(b.Panel,{value:"edit",style:{flex:1,overflow:"hidden"},children:e.jsx(Z,{atom:t,onSave:x=>r(t,x)})})]})]})},G=()=>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"})]})}),K=()=>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"})]})}),oe=()=>{const t=J(R),[r,i]=u.useState([]),[x,l]=u.useState(!0),[n,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),n){const a=p.data.atoms.find(S=>S.name===n.name);a&&h(a)}})},[n?.name]);u.useEffect(()=>{d()},[]);const g=u.useMemo(()=>{if(!s)return r;const p=s.toLowerCase();return r.filter(a=>a.name.toLowerCase().includes(p))},[r,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..."})}):r.length===0?e.jsx(K,{}):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:n,onSelectAtom:h,search:s,onSearchChange:c})}),e.jsx(j,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(q,{atom:n,onSave:v}):e.jsx(G,{})})]})};export{oe as DevAtomsViewer,oe as default};
@@ -1,6 +0,0 @@
1
- import{w as l,Y as m,Z as h,r,j as e,F as a,T as o,K as p,Q as u,L as g,O as x,P as v,S as k,V as j,H as i,B as b}from"./entry.Cjxjbqvs.js";import{d as y}from"./chunk.XGXwPH1e.js";import{I as z}from"./chunk.VjygskIP.js";import{I as f}from"./chunk.CioNo4ZJ.js";import{I}from"./chunk.Ddpv5E_O.js";import{I as M}from"./chunk.0pKzkQ-k.js";import{S}from"./chunk.B9h7IAR1.js";import"./chunk.BiYuhEvJ.js";const C=[["path",{d:"M12 7m-8 0a8 4 0 1 0 16 0a8 4 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 7c0 .664 .088 1.324 .263 1.965l2.737 10.035c.5 1.5 2.239 2 5 2s4.5 -.5 5 -2c.333 -1 1.246 -4.345 2.737 -10.035a7.45 7.45 0 0 0 .263 -1.965",key:"svg-1"}]],E=l("outline","bucket","Bucket",C);const _=[["path",{d:"M4 5m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M16 3l0 4",key:"svg-1"}],["path",{d:"M8 3l0 4",key:"svg-2"}],["path",{d:"M4 11l16 0",key:"svg-3"}],["path",{d:"M8 15h2v2h-2z",key:"svg-4"}]],A=l("outline","calendar-event","CalendarEvent",_);const T=[["path",{d:"M7 16.5l-5 -3l5 -3l5 3v5.5l-5 3z",key:"svg-0"}],["path",{d:"M2 13.5v5.5l5 3",key:"svg-1"}],["path",{d:"M7 16.545l5 -3.03",key:"svg-2"}],["path",{d:"M17 16.5l-5 -3l5 -3l5 3v5.5l-5 3z",key:"svg-3"}],["path",{d:"M12 19l5 3",key:"svg-4"}],["path",{d:"M17 16.5l5 -3",key:"svg-5"}],["path",{d:"M12 13.5v-5.5l-5 -3l5 -3l5 3v5.5",key:"svg-6"}],["path",{d:"M7 5.03v5.455",key:"svg-7"}],["path",{d:"M12 8l5 -3",key:"svg-8"}]],w=l("outline","packages","Packages",T),B=({label:n,count:s,icon:c})=>e.jsxs(a,{direction:"column",align:"center",justify:"center",p:"xl",style:{borderRadius:12,border:`1px solid ${i.colors.border}`,cursor:"pointer",transition:"all 0.2s ease"},bg:i.colors.surface,className:"devtools-card",children:[e.jsx(b,{opacity:.5,mb:"md",children:c}),e.jsxs(o,{size:"sm",c:"dimmed",children:[e.jsx(o,{span:!0,fw:600,size:"lg",c:"var(--mantine-color-text)",children:s})," ",n]})]}),H=()=>{const n=m(h),[s,c]=r.useState(null);if(r.useEffect(()=>{n.fetch("/devtools/api/metadata",{schema:{response:y}}).then(t=>c(t.data))},[]),!s)return e.jsx(a,{align:"center",justify:"center",h:"100%",children:e.jsx(o,{c:"dimmed",children:"Loading..."})});const d=[{label:"actions",count:s.actions.length,icon:e.jsx(p,{size:48,stroke:1.2})},{label:"entities",count:s.entities.length,icon:e.jsx(u,{size:48,stroke:1.2})},{label:"queues",count:s.queues.length,icon:e.jsx(g,{size:48,stroke:1.2})},{label:"schedulers",count:s.schedulers.length,icon:e.jsx(A,{size:48,stroke:1.2})},{label:"topics",count:s.topics.length,icon:e.jsx(x,{size:48,stroke:1.2})},{label:"buckets",count:s.buckets.length,icon:e.jsx(E,{size:48,stroke:1.2})},{label:"realms",count:s.realms.length,icon:e.jsx(z,{size:48,stroke:1.2})},{label:"caches",count:s.caches.length,icon:e.jsx(v,{size:48,stroke:1.2})},{label:"commands",count:s.commands.length,icon:e.jsx(f,{size:48,stroke:1.2})},{label:"env schemas",count:s.envs.length,icon:e.jsx(k,{size:48,stroke:1.2})},{label:"atoms",count:s.atoms.length,icon:e.jsx(j,{size:48,stroke:1.2})},{label:"modules",count:s.modules.length,icon:e.jsx(w,{size:48,stroke:1.2})},{label:"services",count:s.providers.length,icon:e.jsx(I,{size:48,stroke:1.2})}].filter(t=>t.count>0);return e.jsxs(a,{direction:"column",align:"center",justify:"center",flex:1,w:"100%",gap:"xl",children:[e.jsx("style",{children:`
2
- .devtools-card:hover {
3
- border-color: var(--mantine-color-dimmed);
4
- transform: translateY(-2px);
5
- }
6
- `}),e.jsxs(a,{direction:"column",align:"center",gap:4,mb:"md",children:[e.jsxs(a,{align:"center",gap:"sm",children:[e.jsx(M,{size:40,stroke:1.5,opacity:.8}),e.jsx(o,{size:"2rem",fw:300,style:{letterSpacing:"-0.02em"},children:"Alepha DevTools"})]}),e.jsx(o,{size:"xs",c:"dimmed",children:"Explore your Alepha application metadata"})]}),e.jsx(S,{cols:{base:2,sm:3,md:4},spacing:"md",children:d.map(t=>e.jsx(B,{...t},t.label))})]})};export{H as DevDashboard,H as default};
@@ -1 +0,0 @@
1
- import{r as W,q as C,j as e,B as o,t as R,aI as q,aB as x,aF as w}from"./entry.Cjxjbqvs.js";var u={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const N=u,D=W.forwardRef(({__staticSelector:t,__stylesApiProps:l,className:s,classNames:f,styles:I,unstyled:_,children:h,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:E,mod:F,attributes:S,...g},B)=>{const a=C({name:t,props:l,className:s,style:y,classes:u,classNames:f,styles:I,unstyled:_,attributes:S});return e.jsx(o,{...a("root"),ref:B,__vars:{"--label-fz":q(r),"--label-lh":R(r,"label-lh")},mod:[{"label-position":j},F],variant:v,size:r,...g,children:e.jsxs(o,{component:c,htmlFor:c==="label"?p:void 0,...a("body"),children:[h,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})]})]})})});D.displayName="@mantine/core/InlineInput";function k({children:t,role:l}){const s=w();return s?e.jsx("div",{role:l,"aria-labelledby":s.labelId,"aria-describedby":s.describedBy,children:t}):e.jsx(e.Fragment,{children:t})}export{k as I,D as a,N as b};
@@ -1 +0,0 @@
1
- import{w as C,Y as O,Z as R,r as x,j as e,F as m,T as i,B as c,H as j,ae as D,z as B,ac as z,O as S,E as F,G as _,af as w,ad as v,a5 as $,a9 as I}from"./entry.Cjxjbqvs.js";import{d as A}from"./chunk.XGXwPH1e.js";import{S as f,B as T}from"./chunk.uTsm7un3.js";import{I as H}from"./chunk.Ddpv5E_O.js";import{T as g}from"./chunk.Ct5753mG.js";import{I as J}from"./chunk.R7-m7OZO.js";import{I as V,a as G}from"./chunk.BkBlh2Dt.js";import{T as Y}from"./chunk.DPzX4t8Q.js";import"./chunk.BlqFPyLh.js";import"./chunk.uyVen0u2.js";const Z=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],q=C("outline","folder-open","FolderOpen",Z);const K=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],Q=C("outline","folder","Folder",K);const U=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",U),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},E=s=>M[s]??M.default,W=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},N=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?E(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(F,{size:12,opacity:.5}):e.jsx(_,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(q,{size:14,opacity:.5}):e.jsx(Q,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(T,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const P=h.children.size>0,k=y.children.size>0;return P&&!k?-1:!P&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(N,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},X=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>W(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(D,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(N,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(J,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs",copyable:!1})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(Y,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=E(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(H,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),ue=()=>{const s=O(R),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:A}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(X,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{ue as DevTopicsViewer,ue as default};
@@ -1 +0,0 @@
1
- import{w as e}from"./entry.Cjxjbqvs.js";const o=[["path",{d:"M5 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M12 19l7 0",key:"svg-1"}]],n=e("outline","terminal","Terminal",o);export{n as I};