@jean2/client 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/Match-BqRw2YHq.js +1 -0
- package/dist/assets/ServerContext-BIEwENov.js +1 -0
- package/dist/assets/SessionContent-D_iXMVdA.js +9 -0
- package/dist/assets/{SessionMenuButton-bQK4n-kR.js → SessionMenuButton-BQgLoVBs.js} +4 -4
- package/dist/assets/ThemeProvider-rIKaOoRR.js +1 -0
- package/dist/assets/_serverId-DA_laFNU.js +11 -0
- package/dist/assets/_serverId-palzB2Iu.js +1 -0
- package/dist/assets/_sessionId-BQ2Y70Im.js +1 -0
- package/dist/assets/_sessionId-cGj1IHAP.js +1 -0
- package/dist/assets/add-server-BZDIf0Oe.js +1 -0
- package/dist/assets/{alert-DgtoQIaS.js → alert-BsV_fzAT.js} +6 -6
- package/dist/assets/arrow-left-CYlgcbbR.js +1 -0
- package/dist/assets/badge-rLirH4Qz.js +1 -0
- package/dist/assets/confirmation-dialog-CWhG9whO.js +1 -0
- package/dist/assets/createLucideIcon-Cev6Iqjf.js +1 -0
- package/dist/assets/dialog-CpPDW758.js +45 -0
- package/dist/assets/http-namespace-CqSEyQlV.js +1 -0
- package/dist/assets/index-BsdM9bLP.css +2 -0
- package/dist/assets/index-ClGd9Hzj.js +10 -0
- package/dist/assets/{compiler-runtime-DZXZ41-q.js → jsx-runtime-CoWo_Ex4.js} +1 -1
- package/dist/assets/overview-CXMkI2gp.js +1 -0
- package/dist/assets/overview-CpOJtv4w.js +1 -0
- package/dist/assets/pin-hmPULAEn.js +1 -0
- package/dist/assets/popover-D3zF08_g.js +1 -0
- package/dist/assets/react-dom-lAXwbrYv.js +1 -0
- package/dist/assets/{refresh-cw-DJ3pEikS.js → refresh-cw-xwfazwVj.js} +1 -1
- package/dist/assets/routes-B1Je9R4P.js +1 -0
- package/dist/assets/serverDataStore-CvTJtC_B.js +1 -0
- package/dist/assets/star-BapJtpKo.js +1 -0
- package/dist/assets/switch-CbPMcC7k.js +1 -0
- package/dist/assets/triangle-alert-CZgUk-9i.js +1 -0
- package/dist/assets/useNavigate-B6IY_tUo.js +1 -0
- package/dist/assets/useRouter-D46Vvtt-.js +1 -0
- package/dist/assets/workspace-C8ZkuG8q.js +1 -0
- package/dist/assets/workspace-DAso8-D3.js +1 -0
- package/dist/index.html +11 -11
- package/dist/sw.js +1 -1
- package/package.json +4 -4
- package/dist/assets/ServerContext-DwL_fyZz.js +0 -1
- package/dist/assets/SessionContent-BtiY3mu_.js +0 -11
- package/dist/assets/ThemeProvider-ewislekS.js +0 -1
- package/dist/assets/_serverId-C48-o6-u.js +0 -1
- package/dist/assets/_serverId-D3aDURKI.js +0 -11
- package/dist/assets/_sessionId-CGhGqBYc.js +0 -1
- package/dist/assets/_sessionId-CvDJrnJN.js +0 -1
- package/dist/assets/add-server-CP5wqpVh.js +0 -1
- package/dist/assets/archive-CJqmerPG.js +0 -1
- package/dist/assets/arrow-left-CVfrLbQ4.js +0 -1
- package/dist/assets/badge-D8GOF5_2.js +0 -1
- package/dist/assets/button-BCE1SnDM.js +0 -45
- package/dist/assets/confirmation-dialog-jz6z4bio.js +0 -1
- package/dist/assets/createLucideIcon-mdFRYmiK.js +0 -1
- package/dist/assets/dialog-B-f8lUpV.js +0 -1
- package/dist/assets/http-namespace-DWmi6fC5.js +0 -1
- package/dist/assets/index-BtLxCr26.css +0 -2
- package/dist/assets/index-DJCUk1OY.js +0 -10
- package/dist/assets/mutation-BEKt1T6j.js +0 -1
- package/dist/assets/overview-B_ZDrH1J.js +0 -1
- package/dist/assets/overview-dKJbdHqg.js +0 -1
- package/dist/assets/platform-C9rqh4_A.js +0 -1
- package/dist/assets/popover-CVyjoKPS.js +0 -1
- package/dist/assets/queries-BTzP-7g4.js +0 -1
- package/dist/assets/react-dom-CZubyneS.js +0 -1
- package/dist/assets/routes-g7_8LIaN.js +0 -1
- package/dist/assets/sidebar-lTmDketj.js +0 -1
- package/dist/assets/triangle-alert-C32xrDjH.js +0 -1
- package/dist/assets/useNavigate-D0TSLH_-.js +0 -1
- package/dist/assets/useRouter-C_VHQC31.js +0 -1
- package/dist/assets/workspace-CQqKn4Z3.js +0 -1
- package/dist/assets/workspace-_n12Hx4o.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./jsx-runtime-CoWo_Ex4.js";import{t as n}from"./useRouter-D46Vvtt-.js";var r=e(),i=t();function a(e){let t=(0,r.c)(15),{error:a,reset:o}=e,s=n(),c;t[0]===s?c=t[1]:(c=()=>{s.navigate({to:`/`,replace:!0})},t[0]=s,t[1]=c);let l=c,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,i.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Server Connection Error`}),t[2]=u):u=t[2];let d=a instanceof Error?a.message:`An unknown error occurred`,f;t[3]===d?f=t[4]:(f=(0,i.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:d}),t[3]=d,t[4]=f);let p;t[5]===o?p=t[6]:(p=(0,i.jsx)(`button`,{onClick:()=>o(),className:`w-full px-4 py-2 rounded-md bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90`,children:`Retry`}),t[5]=o,t[6]=p);let m;t[7]===l?m=t[8]:(m=(0,i.jsx)(`button`,{onClick:l,className:`w-full px-4 py-2 rounded-md border border-border bg-background text-foreground text-sm font-medium hover:bg-accent`,children:`Back to Server Selection`}),t[7]=l,t[8]=m);let h;t[9]!==p||t[10]!==m?(h=(0,i.jsxs)(`div`,{className:`space-y-2 pt-2`,children:[p,m]}),t[9]=p,t[10]=m,t[11]=h):h=t[11];let g;return t[12]!==f||t[13]!==h?(g=(0,i.jsx)(`div`,{className:`flex w-full items-center justify-center min-h-screen bg-background text-foreground`,children:(0,i.jsxs)(`div`,{className:`text-center space-y-4 p-8 max-w-lg w-full`,children:[u,f,h]})}),t[12]=f,t[13]=h,t[14]=g):g=t[14],g}export{a as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./SessionContent-D_iXMVdA.js";var t=e;export{t as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./SessionContent-D_iXMVdA.js";var t=e;export{t as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./jsx-runtime-CoWo_Ex4.js";import{l as ee,n as i,r as a}from"./ServerContext-BIEwENov.js";import{t as o}from"./useRouter-D46Vvtt-.js";import{t as te}from"./useNavigate-B6IY_tUo.js";import{t as s}from"./arrow-left-CYlgcbbR.js";var c=e(),l=t(n(),1),u=r();function d(e){let t=(0,c.c)(58),{error:n}=e,r=te(),d=o(),{addServer:f,servers:p}=i(),[m,h]=(0,l.useState)(``),[g,ne]=(0,l.useState)(`localhost:8742`),[_,re]=(0,l.useState)(``),[v,y]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1),[S,C]=(0,l.useState)(null),[w,T]=(0,l.useState)(!1),E;t[0]!==f||t[1]!==m||t[2]!==r||t[3]!==p||t[4]!==_||t[5]!==g||t[6]!==b?(E=async e=>{e.preventDefault();let t=m.trim(),n=g.trim(),i=b?_.trim():``;if(!t){C(`Please enter a server name`);return}if(p.some(e=>e.name.toLowerCase()===t.toLowerCase())){C(`A server named "${t}" already exists`);return}if(!n){C(`Please enter a server URL`);return}if(b&&!i){C(`Please enter an API token.`);return}C(null),T(!0);let o=await a(n,i||void 0);if(T(!1),!o.success){C(o.error??`Connection failed`),o.authEnabled&&!b&&x(!0);return}r({to:`/server/$serverId`,params:{serverId:f(t,ee(n),i||void 0).id}})},t[0]=f,t[1]=m,t[2]=r,t[3]=p,t[4]=_,t[5]=g,t[6]=b,t[7]=E):E=t[7];let D=E,O;t[8]!==r||t[9]!==d.history?(O=()=>{d.history.length>1?d.history.back():r({to:`/`})},t[8]=r,t[9]=d.history,t[10]=O):O=t[10];let k=O,A;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,u.jsx)(s,{className:`w-5 h-5`}),t[11]=A):A=t[11];let j;t[12]===k?j=t[13]:(j=(0,u.jsx)(`button`,{type:`button`,onClick:k,className:`absolute left-4 top-1/2 -translate-y-1/2 p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent transition-colors`,"aria-label":`Go back`,children:A}),t[12]=k,t[13]=j);let M,N;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,u.jsx)(`h1`,{className:`text-2xl font-bold text-foreground`,children:`Add Server`}),N=(0,u.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Connect to a Jean2 server`}),t[14]=M,t[15]=N):(M=t[14],N=t[15]);let P;t[16]===j?P=t[17]:(P=(0,u.jsxs)(`div`,{className:`px-6 pt-6 pb-4 text-center border-b border-border relative`,children:[j,M,N]}),t[16]=j,t[17]=P);let F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,u.jsx)(`label`,{htmlFor:`serverName`,className:`text-sm font-medium text-foreground`,children:`Server Name`}),t[18]=F):F=t[18];let I;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>{h(e.target.value),C(null)},t[19]=I):I=t[19];let L;t[20]===m?L=t[21]:(L=(0,u.jsxs)(`div`,{className:`space-y-2`,children:[F,(0,u.jsx)(`input`,{id:`serverName`,type:`text`,value:m,onChange:I,placeholder:`Production`,className:`w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors`})]}),t[20]=m,t[21]=L);let R;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,u.jsx)(`label`,{htmlFor:`serverUrl`,className:`text-sm font-medium text-foreground`,children:`Server URL`}),t[22]=R):R=t[22];let z;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{ne(e.target.value),C(null)},t[23]=z):z=t[23];let B;t[24]===g?B=t[25]:(B=(0,u.jsxs)(`div`,{className:`space-y-2`,children:[R,(0,u.jsx)(`input`,{id:`serverUrl`,type:`text`,value:g,onChange:z,placeholder:`localhost:8742`,className:`w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors`})]}),t[24]=g,t[25]=B);let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,u.jsx)(`label`,{className:`text-sm font-medium text-foreground`,children:`API Token`}),t[26]=V):V=t[26];let H;t[27]===b?H=t[28]:(H=()=>x(!b),t[27]=b,t[28]=H);let U=`relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${b?`bg-primary`:`bg-muted`}`,W=`inline-block h-3.5 w-3.5 transform rounded-full bg-white transition-transform ${b?`translate-x-4.5`:`translate-x-0.5`}`,G;t[29]===W?G=t[30]:(G=(0,u.jsx)(`span`,{className:W}),t[29]=W,t[30]=G);let K;t[31]!==H||t[32]!==U||t[33]!==G?(K=(0,u.jsxs)(`div`,{className:`flex items-center justify-between`,children:[V,(0,u.jsx)(`button`,{type:`button`,onClick:H,className:U,children:G})]}),t[31]=H,t[32]=U,t[33]=G,t[34]=K):K=t[34];let q;t[35]!==v||t[36]!==_||t[37]!==b?(q=b&&(0,u.jsxs)(`div`,{className:`relative`,children:[(0,u.jsx)(`input`,{id:`token`,type:v?`text`:`password`,value:_,onChange:e=>{re(e.target.value),C(null)},placeholder:`Required if auth is enabled`,className:`w-full px-3 py-2 pr-10 bg-background border border-input rounded-lg text-foreground font-mono text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors`}),(0,u.jsx)(`button`,{type:`button`,onClick:()=>y(!v),className:`absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground transition-colors`,"aria-label":v?`Hide token`:`Show token`,children:v?(0,u.jsx)(`svg`,{className:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,u.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21`})}):(0,u.jsxs)(`svg`,{className:`w-5 h-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:[(0,u.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M15 12a3 3 0 11-6 0 3 3 0 016 0z`}),(0,u.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z`})]})})]}),t[35]=v,t[36]=_,t[37]=b,t[38]=q):q=t[38];let J;t[39]!==K||t[40]!==q?(J=(0,u.jsxs)(`div`,{className:`space-y-2`,children:[K,q]}),t[39]=K,t[40]=q,t[41]=J):J=t[41];let Y;t[42]!==n||t[43]!==S?(Y=(S||n)&&(0,u.jsx)(`div`,{className:`px-3 py-2 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm`,children:S||n}),t[42]=n,t[43]=S,t[44]=Y):Y=t[44];let X=w?`Connecting...`:`Add Server`,Z;t[45]!==w||t[46]!==X?(Z=(0,u.jsx)(`button`,{type:`submit`,disabled:w,className:`w-full py-2.5 bg-primary text-primary-foreground font-medium rounded-lg hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:X}),t[45]=w,t[46]=X,t[47]=Z):Z=t[47];let Q;t[48]!==D||t[49]!==L||t[50]!==B||t[51]!==J||t[52]!==Y||t[53]!==Z?(Q=(0,u.jsxs)(`form`,{onSubmit:D,className:`p-6 space-y-4`,children:[L,B,J,Y,Z]}),t[48]=D,t[49]=L,t[50]=B,t[51]=J,t[52]=Y,t[53]=Z,t[54]=Q):Q=t[54];let $;return t[55]!==Q||t[56]!==P?($=(0,u.jsx)(`div`,{className:`w-full h-full flex items-center justify-center bg-background dark:bg-gradient-to-br dark:from-muted dark:via-background dark:to-muted p-4`,children:(0,u.jsx)(`div`,{className:`w-full max-w-md`,children:(0,u.jsxs)(`div`,{className:`bg-card border border-border rounded-xl shadow-2xl overflow-hidden`,children:[P,Q]})})}),t[55]=Q,t[56]=P,t[57]=$):$=t[57],$}var f=d;export{f as component};
|