diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index b74928ff01e..2c372832476 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -2,8 +2,8 @@ name: Crowdin Action on: push: - path: ["i18n/**"] - branches: [main] + path: [ "i18n/**" ] + branches: [ main ] permissions: write-all @@ -23,10 +23,10 @@ jobs: localization_branch_name: l10n_crowdin_translations create_pull_request: true - pull_request_title: "New Crowdin translations" - pull_request_body: "New Crowdin pull request with translations" - pull_request_base_branch_name: "main" + pull_request_title: 'New Crowdin translations' + pull_request_body: 'New Crowdin pull request with translations' + pull_request_base_branch_name: 'main' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file diff --git a/.yarn/releases/yarn-3.4.1.cjs b/.yarn/releases/yarn-3.4.1.cjs index ea821a333c9..2bdb752d860 100755 --- a/.yarn/releases/yarn-3.4.1.cjs +++ b/.yarn/releases/yarn-3.4.1.cjs @@ -1,7 +1,7 @@ #!/usr/bin/env node /* eslint-disable */ //prettier-ignore -;(()=>{var Mue=Object.create;var Wb=Object.defineProperty;var Kue=Object.getOwnPropertyDescriptor;var Uue=Object.getOwnPropertyNames;var Hue=Object.getPrototypeOf,Gue=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Yue=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ut=(r,e)=>{for(var t in e)Wb(r,t,{get:e[t],enumerable:!0})},jue=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Uue(e))!Gue.call(r,n)&&n!==t&&Wb(r,n,{get:()=>e[n],enumerable:!(i=Kue(e,n))||i.enumerable});return r};var Pe=(r,e,t)=>(t=r!=null?Mue(Hue(r)):{},jue(e||!r||!r.__esModule?Wb(t,"default",{value:r,enumerable:!0}):t,r));var _1=w((O7e,X1)=>{X1.exports=V1;V1.sync=uge;var W1=J("fs");function cge(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{tK.exports=$1;$1.sync=gge;var Z1=J("fs");function $1(r,e,t){Z1.stat(r,function(i,n){t(i,i?!1:eK(n,e))})}function gge(r,e){return eK(Z1.statSync(r),e)}function eK(r,e){return r.isFile()&&fge(r,e)}function fge(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var nK=w((U7e,iK)=>{var K7e=J("fs"),_E;process.platform==="win32"||global.TESTING_WINDOWS?_E=_1():_E=rK();iK.exports=uS;uS.sync=hge;function uS(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){uS(r,e||{},function(s,o){s?n(s):i(o)})})}_E(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function hge(r,e){try{return _E.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var uK=w((H7e,cK)=>{var Ig=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",sK=J("path"),pge=Ig?";":":",oK=nK(),aK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),AK=(r,e)=>{let t=e.colon||pge,i=r.match(/\//)||Ig&&r.match(/\\/)?[""]:[...Ig?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Ig?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Ig?n.split(t):[""];return Ig&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},lK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=AK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(aK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=sK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];oK(c+p,{pathExt:s},(C,y)=>{if(!C&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},dge=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=AK(r,e),s=[];for(let o=0;o{"use strict";var gK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};gS.exports=gK;gS.exports.default=gK});var CK=w((Y7e,dK)=>{"use strict";var hK=J("path"),Cge=uK(),mge=fK();function pK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Cge.sync(r.command,{path:t[mge({env:t})],pathExt:e?hK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=hK.resolve(n?r.options.cwd:"",o)),o}function Ege(r){return pK(r)||pK(r,!0)}dK.exports=Ege});var mK=w((j7e,hS)=>{"use strict";var fS=/([()\][%!^"`<>&|;, *?])/g;function Ige(r){return r=r.replace(fS,"^$1"),r}function yge(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(fS,"^$1"),e&&(r=r.replace(fS,"^$1")),r}hS.exports.command=Ige;hS.exports.argument=yge});var IK=w((q7e,EK)=>{"use strict";EK.exports=/^#!(.*)/});var wK=w((J7e,yK)=>{"use strict";var wge=IK();yK.exports=(r="")=>{let e=r.match(wge);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var QK=w((W7e,BK)=>{"use strict";var pS=J("fs"),Bge=wK();function Qge(r){let t=Buffer.alloc(150),i;try{i=pS.openSync(r,"r"),pS.readSync(i,t,0,150,0),pS.closeSync(i)}catch{}return Bge(t.toString())}BK.exports=Qge});var xK=w((z7e,vK)=>{"use strict";var bge=J("path"),bK=CK(),SK=mK(),Sge=QK(),vge=process.platform==="win32",xge=/\.(?:com|exe)$/i,Pge=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Dge(r){r.file=bK(r);let e=r.file&&Sge(r.file);return e?(r.args.unshift(r.file),r.command=e,bK(r)):r.file}function kge(r){if(!vge)return r;let e=Dge(r),t=!xge.test(e);if(r.options.forceShell||t){let i=Pge.test(e);r.command=bge.normalize(r.command),r.command=SK.command(r.command),r.args=r.args.map(s=>SK.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function Rge(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:kge(i)}vK.exports=Rge});var kK=w((V7e,DK)=>{"use strict";var dS=process.platform==="win32";function CS(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Fge(r,e){if(!dS)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=PK(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function PK(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawn"):null}function Nge(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawnSync"):null}DK.exports={hookChildProcess:Fge,verifyENOENT:PK,verifyENOENTSync:Nge,notFoundError:CS}});var IS=w((X7e,yg)=>{"use strict";var RK=J("child_process"),mS=xK(),ES=kK();function FK(r,e,t){let i=mS(r,e,t),n=RK.spawn(i.command,i.args,i.options);return ES.hookChildProcess(n,i),n}function Lge(r,e,t){let i=mS(r,e,t),n=RK.spawnSync(i.command,i.args,i.options);return n.error=n.error||ES.verifyENOENTSync(n.status,i),n}yg.exports=FK;yg.exports.spawn=FK;yg.exports.sync=Lge;yg.exports._parse=mS;yg.exports._enoent=ES});var LK=w((_7e,NK)=>{"use strict";function Tge(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ml(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ml)}Tge(Ml,Error);Ml.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ie=me(">>",!1),de=">&",tt=me(">&",!1),Pt=">",It=me(">",!1),Or="<<<",ii=me("<<<",!1),gi="<&",hr=me("<&",!1),fi="<",ni=me("<",!1),Ls=function(m){return{type:"argument",segments:[].concat(...m)}},pr=function(m){return m},Ei="$'",_n=me("$'",!1),oa="'",aA=me("'",!1),eg=function(m){return[{type:"text",text:m}]},Zn='""',AA=me('""',!1),aa=function(){return{type:"text",text:""}},up='"',lA=me('"',!1),cA=function(m){return m},wr=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},wl=function(m){return{type:"shell",shell:m,quoted:!0}},tg=function(m){return{type:"variable",...m,quoted:!0}},po=function(m){return{type:"text",text:m}},rg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},gp=function(m){return{type:"shell",shell:m,quoted:!1}},fp=function(m){return{type:"variable",...m,quoted:!1}},vr=function(m){return{type:"glob",pattern:m}},se=/^[^']/,Co=Je(["'"],!0,!1),Dn=function(m){return m.join("")},ig=/^[^$"]/,Qt=Je(["$",'"'],!0,!1),Bl=`\\ +(()=>{var Mue=Object.create;var Wb=Object.defineProperty;var Kue=Object.getOwnPropertyDescriptor;var Uue=Object.getOwnPropertyNames;var Hue=Object.getPrototypeOf,Gue=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Yue=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ut=(r,e)=>{for(var t in e)Wb(r,t,{get:e[t],enumerable:!0})},jue=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Uue(e))!Gue.call(r,n)&&n!==t&&Wb(r,n,{get:()=>e[n],enumerable:!(i=Kue(e,n))||i.enumerable});return r};var Pe=(r,e,t)=>(t=r!=null?Mue(Hue(r)):{},jue(e||!r||!r.__esModule?Wb(t,"default",{value:r,enumerable:!0}):t,r));var _1=w((O7e,X1)=>{X1.exports=V1;V1.sync=uge;var W1=J("fs");function cge(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{tK.exports=$1;$1.sync=gge;var Z1=J("fs");function $1(r,e,t){Z1.stat(r,function(i,n){t(i,i?!1:eK(n,e))})}function gge(r,e){return eK(Z1.statSync(r),e)}function eK(r,e){return r.isFile()&&fge(r,e)}function fge(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var nK=w((U7e,iK)=>{var K7e=J("fs"),_E;process.platform==="win32"||global.TESTING_WINDOWS?_E=_1():_E=rK();iK.exports=uS;uS.sync=hge;function uS(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){uS(r,e||{},function(s,o){s?n(s):i(o)})})}_E(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function hge(r,e){try{return _E.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var uK=w((H7e,cK)=>{var Ig=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",sK=J("path"),pge=Ig?";":":",oK=nK(),aK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),AK=(r,e)=>{let t=e.colon||pge,i=r.match(/\//)||Ig&&r.match(/\\/)?[""]:[...Ig?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Ig?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Ig?n.split(t):[""];return Ig&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},lK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=AK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(aK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=sK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];oK(c+p,{pathExt:s},(C,y)=>{if(!C&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},dge=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=AK(r,e),s=[];for(let o=0;o{"use strict";var gK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};gS.exports=gK;gS.exports.default=gK});var CK=w((Y7e,dK)=>{"use strict";var hK=J("path"),Cge=uK(),mge=fK();function pK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Cge.sync(r.command,{path:t[mge({env:t})],pathExt:e?hK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=hK.resolve(n?r.options.cwd:"",o)),o}function Ege(r){return pK(r)||pK(r,!0)}dK.exports=Ege});var mK=w((j7e,hS)=>{"use strict";var fS=/([()\][%!^"`<>&|;, *?])/g;function Ige(r){return r=r.replace(fS,"^$1"),r}function yge(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(fS,"^$1"),e&&(r=r.replace(fS,"^$1")),r}hS.exports.command=Ige;hS.exports.argument=yge});var IK=w((q7e,EK)=>{"use strict";EK.exports=/^#!(.*)/});var wK=w((J7e,yK)=>{"use strict";var wge=IK();yK.exports=(r="")=>{let e=r.match(wge);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var QK=w((W7e,BK)=>{"use strict";var pS=J("fs"),Bge=wK();function Qge(r){let t=Buffer.alloc(150),i;try{i=pS.openSync(r,"r"),pS.readSync(i,t,0,150,0),pS.closeSync(i)}catch{}return Bge(t.toString())}BK.exports=Qge});var xK=w((z7e,vK)=>{"use strict";var bge=J("path"),bK=CK(),SK=mK(),Sge=QK(),vge=process.platform==="win32",xge=/\.(?:com|exe)$/i,Pge=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Dge(r){r.file=bK(r);let e=r.file&&Sge(r.file);return e?(r.args.unshift(r.file),r.command=e,bK(r)):r.file}function kge(r){if(!vge)return r;let e=Dge(r),t=!xge.test(e);if(r.options.forceShell||t){let i=Pge.test(e);r.command=bge.normalize(r.command),r.command=SK.command(r.command),r.args=r.args.map(s=>SK.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function Rge(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:kge(i)}vK.exports=Rge});var kK=w((V7e,DK)=>{"use strict";var dS=process.platform==="win32";function CS(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Fge(r,e){if(!dS)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=PK(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function PK(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawn"):null}function Nge(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawnSync"):null}DK.exports={hookChildProcess:Fge,verifyENOENT:PK,verifyENOENTSync:Nge,notFoundError:CS}});var IS=w((X7e,yg)=>{"use strict";var RK=J("child_process"),mS=xK(),ES=kK();function FK(r,e,t){let i=mS(r,e,t),n=RK.spawn(i.command,i.args,i.options);return ES.hookChildProcess(n,i),n}function Lge(r,e,t){let i=mS(r,e,t),n=RK.spawnSync(i.command,i.args,i.options);return n.error=n.error||ES.verifyENOENTSync(n.status,i),n}yg.exports=FK;yg.exports.spawn=FK;yg.exports.sync=Lge;yg.exports._parse=mS;yg.exports._enoent=ES});var LK=w((_7e,NK)=>{"use strict";function Tge(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ml(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ml)}Tge(Ml,Error);Ml.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ie=me(">>",!1),de=">&",tt=me(">&",!1),Pt=">",It=me(">",!1),Or="<<<",ii=me("<<<",!1),gi="<&",hr=me("<&",!1),fi="<",ni=me("<",!1),Ls=function(m){return{type:"argument",segments:[].concat(...m)}},pr=function(m){return m},Ei="$'",_n=me("$'",!1),oa="'",aA=me("'",!1),eg=function(m){return[{type:"text",text:m}]},Zn='""',AA=me('""',!1),aa=function(){return{type:"text",text:""}},up='"',lA=me('"',!1),cA=function(m){return m},wr=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},wl=function(m){return{type:"shell",shell:m,quoted:!0}},tg=function(m){return{type:"variable",...m,quoted:!0}},po=function(m){return{type:"text",text:m}},rg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},gp=function(m){return{type:"shell",shell:m,quoted:!1}},fp=function(m){return{type:"variable",...m,quoted:!1}},vr=function(m){return{type:"glob",pattern:m}},se=/^[^']/,Co=Je(["'"],!0,!1),Dn=function(m){return m.join("")},ig=/^[^$"]/,Qt=Je(["$",'"'],!0,!1),Bl=`\\ `,kn=me(`\\ `,!1),$n=function(){return""},es="\\",gt=me("\\",!1),mo=/^[\\$"`]/,At=Je(["\\","$",'"',"`"],!1,!1),an=function(m){return m},S="\\a",Tt=me("\\a",!1),ng=function(){return"a"},Ql="\\b",hp=me("\\b",!1),pp=function(){return"\b"},dp=/^[Ee]/,Cp=Je(["E","e"],!1,!1),mp=function(){return"\x1B"},G="\\f",yt=me("\\f",!1),uA=function(){return"\f"},ji="\\n",bl=me("\\n",!1),Xe=function(){return` `},Aa="\\r",sg=me("\\r",!1),bE=function(){return"\r"},Ep="\\t",SE=me("\\t",!1),ar=function(){return" "},Rn="\\v",Sl=me("\\v",!1),Ip=function(){return"\v"},Ts=/^[\\'"?]/,la=Je(["\\","'",'"',"?"],!1,!1),An=function(m){return String.fromCharCode(parseInt(m,16))},Te="\\x",og=me("\\x",!1),vl="\\u",Os=me("\\u",!1),xl="\\U",gA=me("\\U",!1),ag=function(m){return String.fromCodePoint(parseInt(m,16))},Ag=/^[0-7]/,ca=Je([["0","7"]],!1,!1),ua=/^[0-9a-fA-f]/,rt=Je([["0","9"],["a","f"],["A","f"]],!1,!1),Eo=nt(),fA="-",Pl=me("-",!1),Ms="+",Dl=me("+",!1),vE=".",yp=me(".",!1),lg=function(m,b,N){return{type:"number",value:(m==="-"?-1:1)*parseFloat(b.join("")+"."+N.join(""))}},wp=function(m,b){return{type:"number",value:(m==="-"?-1:1)*parseInt(b.join(""))}},xE=function(m){return{type:"variable",...m}},kl=function(m){return{type:"variable",name:m}},PE=function(m){return m},cg="*",hA=me("*",!1),Rr="/",DE=me("/",!1),Ks=function(m,b,N){return{type:b==="*"?"multiplication":"division",right:N}},Us=function(m,b){return b.reduce((N,U)=>({left:N,...U}),m)},ug=function(m,b,N){return{type:b==="+"?"addition":"subtraction",right:N}},pA="$((",R=me("$((",!1),q="))",Ce=me("))",!1),Ke=function(m){return m},Re="$(",ze=me("$(",!1),dt=function(m){return m},Ft="${",Fn=me("${",!1),Db=":-",$M=me(":-",!1),e1=function(m,b){return{name:m,defaultValue:b}},kb=":-}",t1=me(":-}",!1),r1=function(m){return{name:m,defaultValue:[]}},Rb=":+",i1=me(":+",!1),n1=function(m,b){return{name:m,alternativeValue:b}},Fb=":+}",s1=me(":+}",!1),o1=function(m){return{name:m,alternativeValue:[]}},Nb=function(m){return{name:m}},a1="$",A1=me("$",!1),l1=function(m){return e.isGlobPattern(m)},c1=function(m){return m},Lb=/^[a-zA-Z0-9_]/,Tb=Je([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ob=function(){return T()},Mb=/^[$@*?#a-zA-Z0-9_\-]/,Kb=Je(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),u1=/^[(){}<>$|&; \t"']/,gg=Je(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Ub=/^[<>&; \t"']/,Hb=Je(["<",">","&",";"," "," ",'"',"'"],!1,!1),kE=/^[ \t]/,RE=Je([" "," "],!1,!1),Q=0,Me=0,dA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function T(){return r.substring(Me,Q)}function _(){return Et(Me,Q)}function te(m,b){throw b=b!==void 0?b:Et(Me,Q),ki([lt(m)],r.substring(Me,Q),b)}function Be(m,b){throw b=b!==void 0?b:Et(Me,Q),Nn(m,b)}function me(m,b){return{type:"literal",text:m,ignoreCase:b}}function Je(m,b,N){return{type:"class",parts:m,inverted:b,ignoreCase:N}}function nt(){return{type:"any"}}function wt(){return{type:"end"}}function lt(m){return{type:"other",description:m}}function it(m){var b=dA[m],N;if(b)return b;for(N=m-1;!dA[N];)N--;for(b=dA[N],b={line:b.line,column:b.column};Nd&&(d=Q,E=[]),E.push(m))}function Nn(m,b){return new Ml(m,null,null,b)}function ki(m,b,N){return new Ml(Ml.buildMessage(m,b),m,b,N)}function CA(){var m,b;return m=Q,b=Mr(),b===t&&(b=null),b!==t&&(Me=m,b=s(b)),m=b,m}function Mr(){var m,b,N,U,ce;if(m=Q,b=Kr(),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=ga(),U!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Me=m,b=o(b,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;if(m===t)if(m=Q,b=Kr(),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=ga(),U===t&&(U=null),U!==t?(Me=m,b=a(b,U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function ts(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=Mr(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=l(N),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function ga(){var m;return r.charCodeAt(Q)===59?(m=c,Q++):(m=t,I===0&&Qe(u)),m===t&&(r.charCodeAt(Q)===38?(m=g,Q++):(m=t,I===0&&Qe(f))),m}function Kr(){var m,b,N;return m=Q,b=g1(),b!==t?(N=yue(),N===t&&(N=null),N!==t?(Me=m,b=h(b,N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function yue(){var m,b,N,U,ce,Se,ht;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=wue(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Kr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=p(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function wue(){var m;return r.substr(Q,2)===C?(m=C,Q+=2):(m=t,I===0&&Qe(y)),m===t&&(r.substr(Q,2)===B?(m=B,Q+=2):(m=t,I===0&&Qe(v))),m}function g1(){var m,b,N;return m=Q,b=bue(),b!==t?(N=Bue(),N===t&&(N=null),N!==t?(Me=m,b=D(b,N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function Bue(){var m,b,N,U,ce,Se,ht;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=Que(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=g1(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=L(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function Que(){var m;return r.substr(Q,2)===H?(m=H,Q+=2):(m=t,I===0&&Qe(j)),m===t&&(r.charCodeAt(Q)===124?(m=$,Q++):(m=t,I===0&&Qe(V))),m}function FE(){var m,b,N,U,ce,Se;if(m=Q,b=Q1(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Qe(Z)),N!==t)if(U=p1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(Me=m,b=A(b,U),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;else Q=m,m=t;if(m===t)if(m=Q,b=Q1(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Qe(Z)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=ae(b),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function bue(){var m,b,N,U,ce,Se,ht,Bt,Jr,hi,rs;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(r.charCodeAt(Q)===40?(N=ge,Q++):(N=t,I===0&&Qe(re)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(Q)===41?(ht=O,Q++):(ht=t,I===0&&Qe(F)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Bp();hi!==t;)Jr.push(hi),hi=Bp();if(Jr!==t){for(hi=[],rs=He();rs!==t;)hi.push(rs),rs=He();hi!==t?(Me=m,b=ue(ce,Jr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(r.charCodeAt(Q)===123?(N=he,Q++):(N=t,I===0&&Qe(ke)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(Q)===125?(ht=Fe,Q++):(ht=t,I===0&&Qe(Ne)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Bp();hi!==t;)Jr.push(hi),hi=Bp();if(Jr!==t){for(hi=[],rs=He();rs!==t;)hi.push(rs),rs=He();hi!==t?(Me=m,b=oe(ce,Jr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){for(N=[],U=FE();U!==t;)N.push(U),U=FE();if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t){if(ce=[],Se=h1(),Se!==t)for(;Se!==t;)ce.push(Se),Se=h1();else ce=t;if(ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=le(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){if(N=[],U=FE(),U!==t)for(;U!==t;)N.push(U),U=FE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=we(N),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}}}return m}function f1(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){if(N=[],U=NE(),U!==t)for(;U!==t;)N.push(U),U=NE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=fe(N),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t;return m}function h1(){var m,b,N;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t?(N=Bp(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();b!==t?(N=NE(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t)}return m}function Bp(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();return b!==t?(qe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(ne)),N===t&&(N=null),N!==t?(U=Sue(),U!==t?(ce=NE(),ce!==t?(Me=m,b=Y(N,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function Sue(){var m;return r.substr(Q,2)===pe?(m=pe,Q+=2):(m=t,I===0&&Qe(ie)),m===t&&(r.substr(Q,2)===de?(m=de,Q+=2):(m=t,I===0&&Qe(tt)),m===t&&(r.charCodeAt(Q)===62?(m=Pt,Q++):(m=t,I===0&&Qe(It)),m===t&&(r.substr(Q,3)===Or?(m=Or,Q+=3):(m=t,I===0&&Qe(ii)),m===t&&(r.substr(Q,2)===gi?(m=gi,Q+=2):(m=t,I===0&&Qe(hr)),m===t&&(r.charCodeAt(Q)===60?(m=fi,Q++):(m=t,I===0&&Qe(ni))))))),m}function NE(){var m,b,N;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();return b!==t?(N=p1(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function p1(){var m,b,N;if(m=Q,b=[],N=d1(),N!==t)for(;N!==t;)b.push(N),N=d1();else b=t;return b!==t&&(Me=m,b=Ls(b)),m=b,m}function d1(){var m,b;return m=Q,b=vue(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=xue(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=Pue(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=Due(),b!==t&&(Me=m,b=pr(b)),m=b))),m}function vue(){var m,b,N,U;return m=Q,r.substr(Q,2)===Ei?(b=Ei,Q+=2):(b=t,I===0&&Qe(_n)),b!==t?(N=Fue(),N!==t?(r.charCodeAt(Q)===39?(U=oa,Q++):(U=t,I===0&&Qe(aA)),U!==t?(Me=m,b=eg(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function xue(){var m,b,N,U;return m=Q,r.charCodeAt(Q)===39?(b=oa,Q++):(b=t,I===0&&Qe(aA)),b!==t?(N=kue(),N!==t?(r.charCodeAt(Q)===39?(U=oa,Q++):(U=t,I===0&&Qe(aA)),U!==t?(Me=m,b=eg(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function Pue(){var m,b,N,U;if(m=Q,r.substr(Q,2)===Zn?(b=Zn,Q+=2):(b=t,I===0&&Qe(AA)),b!==t&&(Me=m,b=aa()),m=b,m===t)if(m=Q,r.charCodeAt(Q)===34?(b=up,Q++):(b=t,I===0&&Qe(lA)),b!==t){for(N=[],U=C1();U!==t;)N.push(U),U=C1();N!==t?(r.charCodeAt(Q)===34?(U=up,Q++):(U=t,I===0&&Qe(lA)),U!==t?(Me=m,b=cA(N),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function Due(){var m,b,N;if(m=Q,b=[],N=m1(),N!==t)for(;N!==t;)b.push(N),N=m1();else b=t;return b!==t&&(Me=m,b=cA(b)),m=b,m}function C1(){var m,b;return m=Q,b=w1(),b!==t&&(Me=m,b=wr(b)),m=b,m===t&&(m=Q,b=B1(),b!==t&&(Me=m,b=wl(b)),m=b,m===t&&(m=Q,b=qb(),b!==t&&(Me=m,b=tg(b)),m=b,m===t&&(m=Q,b=Rue(),b!==t&&(Me=m,b=po(b)),m=b))),m}function m1(){var m,b;return m=Q,b=w1(),b!==t&&(Me=m,b=rg(b)),m=b,m===t&&(m=Q,b=B1(),b!==t&&(Me=m,b=gp(b)),m=b,m===t&&(m=Q,b=qb(),b!==t&&(Me=m,b=fp(b)),m=b,m===t&&(m=Q,b=Tue(),b!==t&&(Me=m,b=vr(b)),m=b,m===t&&(m=Q,b=Lue(),b!==t&&(Me=m,b=po(b)),m=b)))),m}function kue(){var m,b,N;for(m=Q,b=[],se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co));N!==t;)b.push(N),se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co));return b!==t&&(Me=m,b=Dn(b)),m=b,m}function Rue(){var m,b,N;if(m=Q,b=[],N=E1(),N===t&&(ig.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Qt))),N!==t)for(;N!==t;)b.push(N),N=E1(),N===t&&(ig.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Qt)));else b=t;return b!==t&&(Me=m,b=Dn(b)),m=b,m}function E1(){var m,b,N;return m=Q,r.substr(Q,2)===Bl?(b=Bl,Q+=2):(b=t,I===0&&Qe(kn)),b!==t&&(Me=m,b=$n()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(mo.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(At)),N!==t?(Me=m,b=an(N),m=b):(Q=m,m=t)):(Q=m,m=t)),m}function Fue(){var m,b,N;for(m=Q,b=[],N=I1(),N===t&&(se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co)));N!==t;)b.push(N),N=I1(),N===t&&(se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co)));return b!==t&&(Me=m,b=Dn(b)),m=b,m}function I1(){var m,b,N;return m=Q,r.substr(Q,2)===S?(b=S,Q+=2):(b=t,I===0&&Qe(Tt)),b!==t&&(Me=m,b=ng()),m=b,m===t&&(m=Q,r.substr(Q,2)===Ql?(b=Ql,Q+=2):(b=t,I===0&&Qe(hp)),b!==t&&(Me=m,b=pp()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(dp.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Cp)),N!==t?(Me=m,b=mp(),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===G?(b=G,Q+=2):(b=t,I===0&&Qe(yt)),b!==t&&(Me=m,b=uA()),m=b,m===t&&(m=Q,r.substr(Q,2)===ji?(b=ji,Q+=2):(b=t,I===0&&Qe(bl)),b!==t&&(Me=m,b=Xe()),m=b,m===t&&(m=Q,r.substr(Q,2)===Aa?(b=Aa,Q+=2):(b=t,I===0&&Qe(sg)),b!==t&&(Me=m,b=bE()),m=b,m===t&&(m=Q,r.substr(Q,2)===Ep?(b=Ep,Q+=2):(b=t,I===0&&Qe(SE)),b!==t&&(Me=m,b=ar()),m=b,m===t&&(m=Q,r.substr(Q,2)===Rn?(b=Rn,Q+=2):(b=t,I===0&&Qe(Sl)),b!==t&&(Me=m,b=Ip()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(Ts.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(la)),N!==t?(Me=m,b=an(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Nue()))))))))),m}function Nue(){var m,b,N,U,ce,Se,ht,Bt,Jr,hi,rs,Jb;return m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(N=Gb(),N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Te?(b=Te,Q+=2):(b=t,I===0&&Qe(og)),b!==t?(N=Q,U=Q,ce=Gb(),ce!==t?(Se=Ln(),Se!==t?(ce=[ce,Se],U=ce):(Q=U,U=t)):(Q=U,U=t),U===t&&(U=Gb()),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===vl?(b=vl,Q+=2):(b=t,I===0&&Qe(Os)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(Se=Ln(),Se!==t?(ht=Ln(),ht!==t?(Bt=Ln(),Bt!==t?(ce=[ce,Se,ht,Bt],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===xl?(b=xl,Q+=2):(b=t,I===0&&Qe(gA)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(Se=Ln(),Se!==t?(ht=Ln(),ht!==t?(Bt=Ln(),Bt!==t?(Jr=Ln(),Jr!==t?(hi=Ln(),hi!==t?(rs=Ln(),rs!==t?(Jb=Ln(),Jb!==t?(ce=[ce,Se,ht,Bt,Jr,hi,rs,Jb],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=ag(N),m=b):(Q=m,m=t)):(Q=m,m=t)))),m}function Gb(){var m;return Ag.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(ca)),m}function Ln(){var m;return ua.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(rt)),m}function Lue(){var m,b,N,U,ce;if(m=Q,b=[],N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Qe(gt)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=b1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t)),N!==t)for(;N!==t;)b.push(N),N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Qe(gt)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=b1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t));else b=t;return b!==t&&(Me=m,b=Dn(b)),m=b,m}function Yb(){var m,b,N,U,ce,Se;if(m=Q,r.charCodeAt(Q)===45?(b=fA,Q++):(b=t,I===0&&Qe(Pl)),b===t&&(r.charCodeAt(Q)===43?(b=Ms,Q++):(b=t,I===0&&Qe(Dl))),b===t&&(b=null),b!==t){if(N=[],qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne));else N=t;if(N!==t)if(r.charCodeAt(Q)===46?(U=vE,Q++):(U=t,I===0&&Qe(yp)),U!==t){if(ce=[],qe.test(r.charAt(Q))?(Se=r.charAt(Q),Q++):(Se=t,I===0&&Qe(ne)),Se!==t)for(;Se!==t;)ce.push(Se),qe.test(r.charAt(Q))?(Se=r.charAt(Q),Q++):(Se=t,I===0&&Qe(ne));else ce=t;ce!==t?(Me=m,b=lg(b,N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;if(m===t){if(m=Q,r.charCodeAt(Q)===45?(b=fA,Q++):(b=t,I===0&&Qe(Pl)),b===t&&(r.charCodeAt(Q)===43?(b=Ms,Q++):(b=t,I===0&&Qe(Dl))),b===t&&(b=null),b!==t){if(N=[],qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne));else N=t;N!==t?(Me=m,b=wp(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;if(m===t&&(m=Q,b=qb(),b!==t&&(Me=m,b=xE(b)),m=b,m===t&&(m=Q,b=Rl(),b!==t&&(Me=m,b=kl(b)),m=b,m===t)))if(m=Q,r.charCodeAt(Q)===40?(b=ge,Q++):(b=t,I===0&&Qe(re)),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=y1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.charCodeAt(Q)===41?(Se=O,Q++):(Se=t,I===0&&Qe(F)),Se!==t?(Me=m,b=PE(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t}return m}function jb(){var m,b,N,U,ce,Se,ht,Bt;if(m=Q,b=Yb(),b!==t){for(N=[],U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===42?(Se=cg,Q++):(Se=t,I===0&&Qe(hA)),Se===t&&(r.charCodeAt(Q)===47?(Se=Rr,Q++):(Se=t,I===0&&Qe(DE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=Yb(),Bt!==t?(Me=U,ce=Ks(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===42?(Se=cg,Q++):(Se=t,I===0&&Qe(hA)),Se===t&&(r.charCodeAt(Q)===47?(Se=Rr,Q++):(Se=t,I===0&&Qe(DE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=Yb(),Bt!==t?(Me=U,ce=Ks(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Me=m,b=Us(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function y1(){var m,b,N,U,ce,Se,ht,Bt;if(m=Q,b=jb(),b!==t){for(N=[],U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===43?(Se=Ms,Q++):(Se=t,I===0&&Qe(Dl)),Se===t&&(r.charCodeAt(Q)===45?(Se=fA,Q++):(Se=t,I===0&&Qe(Pl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=jb(),Bt!==t?(Me=U,ce=ug(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===43?(Se=Ms,Q++):(Se=t,I===0&&Qe(Dl)),Se===t&&(r.charCodeAt(Q)===45?(Se=fA,Q++):(Se=t,I===0&&Qe(Pl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=jb(),Bt!==t?(Me=U,ce=ug(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Me=m,b=Us(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function w1(){var m,b,N,U,ce,Se;if(m=Q,r.substr(Q,3)===pA?(b=pA,Q+=3):(b=t,I===0&&Qe(R)),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=y1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.substr(Q,2)===q?(Se=q,Q+=2):(Se=t,I===0&&Qe(Ce)),Se!==t?(Me=m,b=Ke(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;return m}function B1(){var m,b,N,U;return m=Q,r.substr(Q,2)===Re?(b=Re,Q+=2):(b=t,I===0&&Qe(ze)),b!==t?(N=Mr(),N!==t?(r.charCodeAt(Q)===41?(U=O,Q++):(U=t,I===0&&Qe(F)),U!==t?(Me=m,b=dt(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function qb(){var m,b,N,U,ce,Se;return m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,2)===Db?(U=Db,Q+=2):(U=t,I===0&&Qe($M)),U!==t?(ce=f1(),ce!==t?(r.charCodeAt(Q)===125?(Se=Fe,Q++):(Se=t,I===0&&Qe(Ne)),Se!==t?(Me=m,b=e1(N,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,3)===kb?(U=kb,Q+=3):(U=t,I===0&&Qe(t1)),U!==t?(Me=m,b=r1(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,2)===Rb?(U=Rb,Q+=2):(U=t,I===0&&Qe(i1)),U!==t?(ce=f1(),ce!==t?(r.charCodeAt(Q)===125?(Se=Fe,Q++):(Se=t,I===0&&Qe(Ne)),Se!==t?(Me=m,b=n1(N,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,3)===Fb?(U=Fb,Q+=3):(U=t,I===0&&Qe(s1)),U!==t?(Me=m,b=o1(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.charCodeAt(Q)===125?(U=Fe,Q++):(U=t,I===0&&Qe(Ne)),U!==t?(Me=m,b=Nb(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.charCodeAt(Q)===36?(b=a1,Q++):(b=t,I===0&&Qe(A1)),b!==t?(N=Rl(),N!==t?(Me=m,b=Nb(N),m=b):(Q=m,m=t)):(Q=m,m=t)))))),m}function Tue(){var m,b,N;return m=Q,b=Oue(),b!==t?(Me=Q,N=l1(b),N?N=void 0:N=t,N!==t?(Me=m,b=c1(b),m=b):(Q=m,m=t)):(Q=m,m=t),m}function Oue(){var m,b,N,U,ce;if(m=Q,b=[],N=Q,U=Q,I++,ce=S1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N!==t)for(;N!==t;)b.push(N),N=Q,U=Q,I++,ce=S1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t);else b=t;return b!==t&&(Me=m,b=Dn(b)),m=b,m}function Q1(){var m,b,N;if(m=Q,b=[],Lb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Tb)),N!==t)for(;N!==t;)b.push(N),Lb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Tb));else b=t;return b!==t&&(Me=m,b=Ob()),m=b,m}function Rl(){var m,b,N;if(m=Q,b=[],Mb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Kb)),N!==t)for(;N!==t;)b.push(N),Mb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Kb));else b=t;return b!==t&&(Me=m,b=Ob()),m=b,m}function b1(){var m;return u1.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(gg)),m}function S1(){var m;return Ub.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(Hb)),m}function He(){var m,b;if(m=[],kE.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Qe(RE)),b!==t)for(;b!==t;)m.push(b),kE.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Qe(RE));else m=t;return m}if(k=n(),k!==t&&Q===r.length)return k;throw k!==t&&Q{"use strict";function Mge(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ul(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ul)}Mge(Ul,Error);Ul.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ne))}function Ne(ne,Y){return new Ul(ne,null,null,Y)}function oe(ne,Y,pe){return new Ul(Ul.buildMessage(ne,Y),ne,Y,pe)}function le(){var ne,Y,pe,ie;return ne=v,Y=we(),Y!==t?(r.charCodeAt(v)===47?(pe=s,v++):(pe=t,$===0&&Fe(o)),pe!==t?(ie=we(),ie!==t?(D=ne,Y=a(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=we(),Y!==t&&(D=ne,Y=l(Y)),ne=Y),ne}function we(){var ne,Y,pe,ie;return ne=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(pe=c,v++):(pe=t,$===0&&Fe(u)),pe!==t?(ie=qe(),ie!==t?(D=ne,Y=g(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=fe(),Y!==t&&(D=ne,Y=f(Y)),ne=Y),ne}function fe(){var ne,Y,pe,ie,de;return ne=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Fe(u)),Y!==t?(pe=Ae(),pe!==t?(r.charCodeAt(v)===47?(ie=s,v++):(ie=t,$===0&&Fe(o)),ie!==t?(de=Ae(),de!==t?(D=ne,Y=h(),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=Ae(),Y!==t&&(D=ne,Y=h()),ne=Y),ne}function Ae(){var ne,Y,pe;if(ne=v,Y=[],p.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(C)),pe!==t)for(;pe!==t;)Y.push(pe),p.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(C));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}function qe(){var ne,Y,pe;if(ne=v,Y=[],y.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(B)),pe!==t)for(;pe!==t;)Y.push(pe),y.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(B));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function UK(r){return typeof r>"u"||r===null}function Uge(r){return typeof r=="object"&&r!==null}function Hge(r){return Array.isArray(r)?r:UK(r)?[]:[r]}function Gge(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function Op(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Op.prototype=Object.create(Error.prototype);Op.prototype.constructor=Op;Op.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};HK.exports=Op});var jK=w((pXe,YK)=>{"use strict";var GK=Gl();function SS(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}SS.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r diff --git a/crowdin.yml b/crowdin.yml index 6d4480dcc20..ef32981523c 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -13,4 +13,4 @@ files: - source: /services/**/* translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name% - source: /docs/**/* - translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name% + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name% \ No newline at end of file diff --git a/dashboard-sidebar.js b/dashboard-sidebar.js index 71f8f72d350..972e459caa7 100644 --- a/dashboard-sidebar.js +++ b/dashboard-sidebar.js @@ -19,3 +19,4 @@ const sidebar = { }; module.exports = sidebar; + diff --git a/docusaurus.config.js b/docusaurus.config.js index d61ebe39b49..cf683e6c010 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -137,7 +137,7 @@ const config = { }, ], "./src/plugins/plugin-json-rpc.ts", - isProd ? + isProd ? [ "docusaurus-plugin-segment", { @@ -353,4 +353,4 @@ const config = { }), }; -module.exports = config; \ No newline at end of file +module.exports = config; diff --git a/package.json b/package.json index 285576e4c7d..f6c4685eab8 100644 --- a/package.json +++ b/package.json @@ -105,4 +105,4 @@ "$root$": false } } -} \ No newline at end of file +} diff --git a/services-sidebar.js b/services-sidebar.js index 852d38976c8..c34523850f1 100644 --- a/services-sidebar.js +++ b/services-sidebar.js @@ -28,7 +28,7 @@ const sidebar = { link: { type: "generated-index", slug: "/tutorials" }, collapsed: true, items: [{ type: "autogenerated", dirName: "tutorials" }], - }, + }, { type: "category", label: "Reference", @@ -40,3 +40,4 @@ const sidebar = { }; module.exports = sidebar; + diff --git a/src/components/Banner/banner.module.css b/src/components/Banner/banner.module.css index 13a4d57b8aa..4a614c6bce8 100644 --- a/src/components/Banner/banner.module.css +++ b/src/components/Banner/banner.module.css @@ -1,38 +1,36 @@ -.banner { - /* Change this to your preferred color */ - padding: 20px; - text-align: center; - margin-bottom: 20px; - box-shadow: inset 0 0 10px rgb(180 179 179 / 50%); /* Light grey shading */ - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background-color: var(--ifm-background-color); - color: var(--ifm-font-color-base); - border-bottom: 2px solid transparent; - border-right: 2px solid transparent; - transition: - border-color 0.3s ease, - box-shadow 0.3s ease; - border-radius: 15px; -} +.banner { /* Change this to your preferred color */ + padding: 20px; + text-align: center; + margin-bottom: 20px; + box-shadow: + inset 0 0 10px rgb(180 179 179 / 50%); /* Light grey shading */ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: var(--ifm-background-color); + color: var(--ifm-font-color-base); + border-bottom: 2px solid transparent; + border-right: 2px solid transparent; + transition: border-color 0.3s ease, box-shadow 0.3s ease; + border-radius: 15px; + } -.button { - display: inline-block; - padding: 10px 20px; - text-decoration: none; - transition: background-color 0.3s ease; - margin-top: 20px; - text-align: center; - color: var(--ifm-color-white); - background-color: #f8883b; - border-radius: 0.3rem; - font-weight: bold; - font-size: 0.9rem; -} - -.button:hover { - color: var(--ifm-color-white); - background-color: #faa66c; -} + .button { + display: inline-block; + padding: 10px 20px; + text-decoration: none; + transition: background-color 0.3s ease; + margin-top: 20px; + text-align: center; + color: var(--ifm-color-white); + background-color: #F8883B; + border-radius: 0.3rem; + font-weight: bold; + font-size: 0.90rem; + } + + .button:hover { + color: var(--ifm-color-white); + background-color: #FAA66C; + } \ No newline at end of file diff --git a/src/components/Banner/index.tsx b/src/components/Banner/index.tsx index 83a1cb0fce4..296c16609ee 100644 --- a/src/components/Banner/index.tsx +++ b/src/components/Banner/index.tsx @@ -13,8 +13,7 @@ const Banner: React.FC = ({ children }) => { + rel="noopener noreferrer">
Sign up  = ({ children }) => { height="13.5" aria-hidden="true" viewBox="0 0 24 24" - className="iconExternalLink_node_modules-@docusaurus-theme-classic-lib-theme-Icon-ExternalLink-styles-module" - > + className="iconExternalLink_node_modules-@docusaurus-theme-classic-lib-theme-Icon-ExternalLink-styles-module"> -
-

{title}

-
+

{title}

{description}
); -} +} \ No newline at end of file diff --git a/src/components/CardList/CardListItem/index.tsx b/src/components/CardList/CardListItem/index.tsx index 005cb07d69b..71b4164c47a 100644 --- a/src/components/CardList/CardListItem/index.tsx +++ b/src/components/CardList/CardListItem/index.tsx @@ -20,23 +20,32 @@ export default function CardListItem({ item }: CardListItemProps): JSX.Element { <> {item.title && (

- {item.icon && } + {item.icon && ( + + )} {item.title}

)} - {item.description &&

{item.description}

} + {item.description && ( +

+ {item.description} +

+ )} ); - - const rootClassName = clsx("card", "padding--lg", styles.cardContainer, { - [styles.flaskOnly]: item.flaskOnly, - }); + + const rootClassName = clsx( + "card", + "padding--lg", + styles.cardContainer, + { + [styles.flaskOnly]: item.flaskOnly, + }, + ); if (item.href) { return ( - - {cardContent} - + {cardContent} ); } diff --git a/src/components/CardList/CardListItem/styles.module.css b/src/components/CardList/CardListItem/styles.module.css index 466f00d15f9..27026e266c3 100644 --- a/src/components/CardList/CardListItem/styles.module.css +++ b/src/components/CardList/CardListItem/styles.module.css @@ -21,8 +21,8 @@ content: "Flask"; border-bottom-left-radius: var(--ifm-card-border-radius); position: absolute; - top: 0; - right: 0; + top:0; + right:0; padding: 0.1rem 0.75rem; font-weight: 500; background-color: var(--mm-flask-background-color); @@ -48,4 +48,4 @@ width: 24px; height: 24px; margin-right: 8px; -} +} \ No newline at end of file diff --git a/src/components/CardSection.tsx b/src/components/CardSection.tsx index 179a6edfbe9..e22b4972ae6 100644 --- a/src/components/CardSection.tsx +++ b/src/components/CardSection.tsx @@ -5,42 +5,30 @@ const CardList: CardItem[] = [ { title: "Wallet", link: "/wallet", - description: ( - <> - Integrate your dapp with MetaMask using the Wallet API. You can interact - with your users' Ethereum accounts from multiple dapp platforms. - - ), + description: (<> + Integrate your dapp with MetaMask using the Wallet API. You can interact with your users' Ethereum accounts from multiple dapp platforms. + ), }, { title: "Snaps", link: "/snaps", - description: ( - <> - Extend the functionality of MetaMask using Snaps. You can create a Snap - to add support for custom networks, account types, APIs, and more. - - ), + description: (<> + Extend the functionality of MetaMask using Snaps. You can create a Snap to add support for custom networks, account types, APIs, and more. + ), }, { title: "Services", link: "/services", - description: ( - <> - Power your dapp or Snap using services provided by MetaMask and Infura. - This includes APIs aimed at optimizing essential development tasks. - - ), + description: (<> + Power your dapp or Snap using services provided by MetaMask and Infura. This includes APIs aimed at optimizing essential development tasks. + ), }, { title: "Infura dashboard", link: "/developer-tools/dashboard", - description: ( - <> - Use the Infura dashboard as a central hub for managing your Infura API - keys, monitoring usage, and accessing account and billing information. - - ), + description: (<> + Use the Infura dashboard as a central hub for managing your Infura API keys, monitoring usage, and accessing account and billing information. + ), }, ]; @@ -48,9 +36,7 @@ export default function CardSection(): JSX.Element { return (
- {CardList.map((props, idx) => ( - - ))} + {CardList.map((props, idx) => ())}
); diff --git a/src/components/CodeTerminal/AlertMsg.jsx b/src/components/CodeTerminal/AlertMsg.jsx index b348112712b..c8be69d6eda 100644 --- a/src/components/CodeTerminal/AlertMsg.jsx +++ b/src/components/CodeTerminal/AlertMsg.jsx @@ -28,9 +28,8 @@ export const INFO_MSG = { <> Your request has been sent to the network endpoint you selected which returned a response with the requested information. Let’s see how it - performed in stats or - dive into{" "} - stats docs. + performed in stats or dive + into stats docs. ), }, @@ -52,8 +51,8 @@ export const INFO_MSG = { description: ( <> You don’t have any API Keys yet.{" "} - Create an API key to access - your keys and send requests. + Create an API key to access your + keys and send requests. ), }, @@ -63,8 +62,7 @@ export const INFO_MSG = { title: "Access Denied", description: ( <> - The API key selected is not authorized for this specific product. To - enable access, please add this product to your API key through the{" "} + The API key selected is not authorized for this specific product. To enable access, please add this product to your API key through the{" "} Infura Dashboard ), diff --git a/src/components/CodeTerminal/CodeTerminal.jsx b/src/components/CodeTerminal/CodeTerminal.jsx index c6fe8575ed6..bf3efe77205 100644 --- a/src/components/CodeTerminal/CodeTerminal.jsx +++ b/src/components/CodeTerminal/CodeTerminal.jsx @@ -5,7 +5,7 @@ import ControlPanel from "./ControlPanel"; import { INFO_MSG } from "./AlertMsg"; import MessageBox from "@site/src/components/MessageBox/MessageBox"; import { INIT_REQ_SET } from "@site/src/lib/constants"; -import Heading from "@theme/Heading"; +import Heading from '@theme/Heading' const CodeTerminal = () => { const { user, keys, loading: keysLoading } = useUser(); @@ -24,12 +24,8 @@ const CodeTerminal = () => { const keysOptions = useMemo(() => { if (keys.length > 0) { changeSelectHandler( - { - label: keys[0].name, - value: keys[0].id, - private: keys[0].private || "", - }, - "apiKey" + { label: keys[0].name, value: keys[0].id, private: keys[0].private || "" }, + "apiKey", ); return keys.map((item) => ({ label: item.name, @@ -93,7 +89,7 @@ const CodeTerminal = () => { if (endpointUrl.isExpansionNetwork) { URL = `https://${endpointUrl.url}`; params = { - method: "GET", + method: "GET" }; } try { @@ -103,9 +99,7 @@ const CodeTerminal = () => { setMsgParams({ ...INFO_MSG.REQ_SUCCESS }); setResponseReg(JSON.stringify(response, null, 2)); } else { - res.status === 401 - ? setMsgParams({ ...INFO_MSG.NO_ACCESS }) - : setMsgParams({ ...INFO_MSG.REQ_ERROR }); + res.status === 401 ? setMsgParams({ ...INFO_MSG.NO_ACCESS }) : setMsgParams({ ...INFO_MSG.REQ_ERROR }); setResponseReg(undefined); } } catch { @@ -123,9 +117,7 @@ const CodeTerminal = () => { title={msgParams.title} description={msgParams.description} /> - - Connect to a network - + Connect to a network {keysOptions.length > 0 && ( { } if (initValues?.netName?.value === NETWORKS.PALM) { const noEthMethods = initMethods.filter( - (method) => method.value !== "eth_maxPriorityFeePerGas" + (method) => method.value !== "eth_maxPriorityFeePerGas", ); updatedOptions.methods = [...noEthMethods]; } diff --git a/src/components/CodeTerminal/TerminalViewBox.jsx b/src/components/CodeTerminal/TerminalViewBox.jsx index eda58637d5d..e599aab84e3 100644 --- a/src/components/CodeTerminal/TerminalViewBox.jsx +++ b/src/components/CodeTerminal/TerminalViewBox.jsx @@ -14,30 +14,28 @@ const TerminalViewBox = ({ response, isExpansionNetwork = false, }) => { + const exampleRequest = useMemo(() => { - const prepareParams = - params.length === 0 - ? "" - : params.map((param) => { - if ("boolean" === typeof param) return `${param}`; - return `"${param}"`; - }); + const prepareParams = params.length === 0 ? "" : params.map(param => { + if ('boolean' === typeof param) return `${param}` + return `"${param}"` + }); if (isExpansionNetwork) { return `curl -X 'GET' \\\n'https://${url}'`; } - return `curl https://${url}/v3/${id} \\\n -X POST \\\n -H "Content-Type: application/json" \\\n -d '{\n "jsonrpc": "2.0",\n "method": "${method}",\n "params": [${params.length === 0 ? "" : prepareParams}],\n "id": 1\n }'`; + return `curl https://${url}/v3/${id} \\\n -X POST \\\n -H "Content-Type: application/json" \\\n -d '{\n "jsonrpc": "2.0",\n "method": "${method}",\n "params": [${params.length === 0 ? "" : prepareParams}],\n "id": 1\n }'` }, [url, id, method, params, isExpansionNetwork]); return (
- {exampleRequest} + + {exampleRequest} + {!hideFooter && ( -
+
{logged && (
- {response && ( -
{response}
- )} + {response &&
{response}
}
)}
@@ -57,8 +55,7 @@ const TerminalViewBox = ({ + rel="noreferrer"> create an account {" "} and reload the page to edit real requests diff --git a/src/components/Icon/Icon.jsx b/src/components/Icon/Icon.jsx index c64dc60c0b4..9d1f64ddc6c 100644 --- a/src/components/Icon/Icon.jsx +++ b/src/components/Icon/Icon.jsx @@ -10,8 +10,7 @@ const Icon = ({ name, classes }) => { height="16" viewBox="0 0 16 16" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="16" viewBox="0 0 20 16" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="14" viewBox="0 0 16 14" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="14" viewBox="0 0 14 14" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="13" viewBox="0 0 15 13" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="25" viewBox="0 0 22 25" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="24" viewBox="0 0 24 24" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="24" viewBox="0 0 24 24" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="15" viewBox="0 0 9 15" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> { height="13" viewBox="0 0 15 13" fill="none" - xmlns="http://www.w3.org/2000/svg" - > + xmlns="http://www.w3.org/2000/svg"> (
Install MetaMask -

- Install MetaMask for your browser to enable interactive features -

- - Install MetaMask - +

Install MetaMask for your browser to enable interactive features

+ Install MetaMask
); -export const AuthBox = ({ - metamaskProviders = [], - selectedProvider, - handleConnect, -}: AuthBoxProps) => { +export const AuthBox = ({ metamaskProviders = [], selectedProvider, handleConnect }: AuthBoxProps) => { if (metamaskProviders.length === 0) { - return ; + return } if (metamaskProviders.length > 0) { - return null; + return null } return ( @@ -48,9 +40,7 @@ export const AuthBox = ({ width="30" />
{provider.info.name}
- {selectedProvider === i && ( - - )} + {selectedProvider === i && }
))} diff --git a/src/components/ParserOpenRPC/AuthBox/styles.module.css b/src/components/ParserOpenRPC/AuthBox/styles.module.css index 566c4efd249..d7d2a8e8eff 100644 --- a/src/components/ParserOpenRPC/AuthBox/styles.module.css +++ b/src/components/ParserOpenRPC/AuthBox/styles.module.css @@ -2,7 +2,7 @@ text-align: center; padding: 16px; border-radius: 8px; - border: 1px solid #848c96; + border: 1px solid #848C96; margin-bottom: 24px; } diff --git a/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx b/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx index 8b06e1c5d34..0ffbb410ff6 100644 --- a/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx +++ b/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx @@ -1,9 +1,5 @@ import clsx from "clsx"; -import { - useCollapsible, - Collapsible, - useColorMode, -} from "@docusaurus/theme-common"; +import { useCollapsible, Collapsible, useColorMode } from "@docusaurus/theme-common"; import styles from "./styles.module.css"; import React, { useEffect } from "react"; @@ -12,10 +8,7 @@ interface CollapseBoxProps { isInitCollapsed?: boolean; } -export const CollapseBox = ({ - children, - isInitCollapsed = false, -}: CollapseBoxProps) => { +export const CollapseBox = ({ children, isInitCollapsed = false }: CollapseBoxProps) => { const { collapsed, toggleCollapsed } = useCollapsible({ initialState: true }); const { colorMode } = useColorMode(); useEffect(() => { @@ -24,35 +17,15 @@ export const CollapseBox = ({ } }, [isInitCollapsed]); return ( -
+
- - {children} - + {children}
); }; diff --git a/src/components/ParserOpenRPC/CollapseBox/styles.module.css b/src/components/ParserOpenRPC/CollapseBox/styles.module.css index f7dcb0bb5fa..d4bf3588b08 100644 --- a/src/components/ParserOpenRPC/CollapseBox/styles.module.css +++ b/src/components/ParserOpenRPC/CollapseBox/styles.module.css @@ -5,12 +5,12 @@ } .collapsedWrapperView { - border-color: #848c96; + border-color: #848C96; } .collapseBtn { background: none; - color: #1098fc; + color: #1098FC; font-size: 14px; line-height: 1; display: inline-flex; @@ -18,7 +18,7 @@ align-items: center; min-width: 190px; border-radius: 999px; - border: 1px solid #0376c9; + border: 1px solid #0376C9; padding: 12px 22px; margin-bottom: 1px; cursor: pointer; @@ -31,20 +31,20 @@ width: 10px; height: 10px; margin: 0 0 0 5px; - border-top: 2px solid #0376c9; - border-right: 2px solid #0376c9; + border-top: 2px solid #0376C9; + border-right: 2px solid #0376C9; transform: rotate(45deg); /*transition: transform .2s ease;*/ } .collapseBtn:hover { color: #141618; - background-color: #0376c9; + background-color: #0376C9; } .collapsedBtnLightHover:hover { color: #fff; - background-color: #036ab5; + background-color: #036AB5; } .collapseBtn:hover .collapseIcon { @@ -65,18 +65,18 @@ } .collapsedBtnView:hover { - color: #0376c9; + color: #0376C9; text-decoration: underline; - background-color: #24272a; + background-color: #24272A; } .collapsedBtnView.collapsedBtnLightHover:hover { - background-color: #f2f4f6; + background-color: #F2F4F6; } .collapsedBtnView:hover .collapseIcon { - border-top-color: #0376c9; - border-right-color: #0376c9; + border-top-color: #0376C9; + border-right-color: #0376C9; } .collapsedIconView { diff --git a/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx b/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx index 3e6e4ac52ce..c2d51be2925 100644 --- a/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx @@ -2,7 +2,7 @@ import React from "react"; const parseMarkdown = (content: string) => { return content - .replace(/\[(.*?)\]\((.*?)\)/g, '$1') + .replace(/\[(.*?)\]\((.*?)\)/g, "$1") .replace(/`(.*?)`/g, "$1"); }; diff --git a/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx b/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx index 87c8d128488..789160a40b6 100644 --- a/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx @@ -109,21 +109,14 @@ const renderSchema = (schemaItem, schemas, name) => { const match = description.match(regex); return match ? match[1] : ""; }; - const blockEnum = - title && - description && - (title === "Block tag" || title === "subscriptionType"); + const blockEnum = title && description && (title === "Block tag" || title === "subscriptionType"); return (
Possible enum values
{enumValues.map((value, index) => (
{value}
- {blockEnum && ( -
- -
- )} + {blockEnum &&
}
))}
@@ -137,16 +130,9 @@ const renderSchema = (schemaItem, schemas, name) => { title={name || schemaItem.schema.title} type={schemaItem.schema.enum ? "enum" : schemaItem.schema.type} required={!!schemaItem.required} - description={ - schemaItem.schema.description || schemaItem.schema.title || "" - } + description={schemaItem.schema.description || schemaItem.schema.title || ""} /> - {schemaItem.schema.enum && - renderEnum( - schemaItem.schema.enum, - schemaItem.schema.title, - schemaItem.schema.description - )} + {schemaItem.schema.enum && renderEnum(schemaItem.schema.enum, schemaItem.schema.title, schemaItem.schema.description)}
); } @@ -157,14 +143,9 @@ const renderSchema = (schemaItem, schemas, name) => { title={name || schemaItem.title} type={schemaItem.enum ? "enum" : schemaItem.type} required={!!schemaItem.required} - description={ - schemaItem.enum && schemaItem.title === "Block tag" - ? "" - : schemaItem.description || schemaItem.title - } + description={schemaItem.enum && schemaItem.title === "Block tag" ? "" : schemaItem.description || schemaItem.title} /> - {schemaItem.enum && - renderEnum(schemaItem.enum, schemaItem.title, schemaItem.description)} + {schemaItem.enum && renderEnum(schemaItem.enum, schemaItem.title, schemaItem.description)}
); }; @@ -184,5 +165,9 @@ export const renderParamSchemas = (inputSchema, schemas) => { }; export const renderResultSchemas = (inputSchema, schemas) => { - return <>{renderSchema(inputSchema, schemas, inputSchema.name)}; + return ( + <> + {renderSchema(inputSchema, schemas, inputSchema.name)} + + ); }; diff --git a/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx b/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx index 0b35699b749..187b03f769d 100644 --- a/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx @@ -13,12 +13,7 @@ interface TagProps { name: string; } -export const SchemaProperty = ({ - title, - type, - required, - description, -}: SchemaPropertyProps) => { +export const SchemaProperty = ({ title, type, required, description }: SchemaPropertyProps) => { return (
{ const bgStyle = { - MetaMask: "#4DB6AC", - Restricted: "#FFECB3", - Deprecated: "#7E57C2", + "MetaMask": "#4DB6AC", + "Restricted": "#FFECB3", + "Deprecated": "#7E57C2", }; return (
{name}
diff --git a/src/components/ParserOpenRPC/DetailsBox/index.tsx b/src/components/ParserOpenRPC/DetailsBox/index.tsx index 8f2afb5dafd..c41453a1cfc 100644 --- a/src/components/ParserOpenRPC/DetailsBox/index.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/index.tsx @@ -4,10 +4,7 @@ import { MDContent } from "./MDContent"; import { renderParamSchemas, renderResultSchemas } from "./RenderParams"; import clsx from "clsx"; import styles from "./styles.module.css"; -import { - MethodParam, - SchemaComponents, -} from "@site/src/components/ParserOpenRPC/interfaces"; +import { MethodParam, SchemaComponents } from "@site/src/components/ParserOpenRPC/interfaces"; import { Tag } from "@site/src/components/ParserOpenRPC/DetailsBox/SchemaProperty"; interface TagItem { @@ -21,51 +18,35 @@ interface DetailsBoxProps { params: MethodParam[]; components: SchemaComponents; result: any; - tags: TagItem[]; + tags: TagItem[] } -export default function DetailsBox({ - method, - description, - params, - components, - result, - tags, -}: DetailsBoxProps) { +export default function DetailsBox({ method, description, params, components, result, tags }: DetailsBoxProps) { return ( <> {tags.length > 0 && (
- {tags.map((tag) => ( -
- -
- ))} + {tags.map(tag =>
)}
)} {method} Parameters {params.length === 0 ? (
This method does not accept any parameters
) : ( - <>{params && renderParamSchemas(params, components)} + <> + {params && renderParamSchemas(params, components)} + )} Returns @@ -77,4 +58,4 @@ export default function DetailsBox({ {result && renderResultSchemas(result, components)} ); -} +} \ No newline at end of file diff --git a/src/components/ParserOpenRPC/DetailsBox/styles.module.css b/src/components/ParserOpenRPC/DetailsBox/styles.module.css index cc1a3f5c1ec..194d0876e31 100644 --- a/src/components/ParserOpenRPC/DetailsBox/styles.module.css +++ b/src/components/ParserOpenRPC/DetailsBox/styles.module.css @@ -1,21 +1,21 @@ .paramWrapper { - border-bottom: 1px solid #848c96; + border-bottom: 1px solid #848C96; padding-bottom: 1.5rem; margin-bottom: 1rem; } .borderWrapper { - border-bottom: 1px solid #848c96; + border-bottom: 1px solid #848C96; padding-top: 2rem; padding-bottom: 1rem; } .textAltColor { - color: #6a737d; + color: #6A737D; } .textErrorColor { - color: #d73847; + color: #D73847; } .paramItemWrapper { @@ -27,21 +27,21 @@ } .borderTopLine { - border-top: 1px solid #848c96; + border-top: 1px solid #848C96; } .borderBottomLine { - border-bottom: 1px solid #848c96; + border-bottom: 1px solid #848C96; } .enumWrapper { - border: 1px solid #848c96; + border: 1px solid #848C96; border-radius: 8px; margin-bottom: 2rem; } .enumItem { - border-top: 1px solid #848c96; + border-top: 1px solid #848C96; padding: 16px; } @@ -50,7 +50,7 @@ font-size: 12px; line-height: 1; padding: 4px; - border: 1px solid #bbc0c5; + border: 1px solid #BBC0C5; border-radius: 4px; } @@ -72,5 +72,5 @@ color: #141618; padding: 4px 8px; border-radius: 6px; - background-color: #ffcdd2; + background-color: #FFCDD2; } diff --git a/src/components/ParserOpenRPC/ErrorsBox/index.tsx b/src/components/ParserOpenRPC/ErrorsBox/index.tsx index e38c73430af..dce3db24eca 100644 --- a/src/components/ParserOpenRPC/ErrorsBox/index.tsx +++ b/src/components/ParserOpenRPC/ErrorsBox/index.tsx @@ -14,27 +14,17 @@ interface ErrorsBoxProps { errors: ErrorItem[]; } -export default function ErrorsBox({ errors }: ErrorsBoxProps) { +export default function ErrorsBox ({ errors }: ErrorsBoxProps) { const { colorMode } = useColorMode(); if (errors.length === 0) return null; return ( <> - + Errors
-
+
Code
Message
diff --git a/src/components/ParserOpenRPC/ErrorsBox/styles.module.css b/src/components/ParserOpenRPC/ErrorsBox/styles.module.css index 4225ef6fcd9..0bcddc3d240 100644 --- a/src/components/ParserOpenRPC/ErrorsBox/styles.module.css +++ b/src/components/ParserOpenRPC/ErrorsBox/styles.module.css @@ -1,27 +1,27 @@ .errWrapper { - border: 1px solid #848c96; + border: 1px solid #848C96; border-radius: 8px; overflow: hidden; } .errRow { display: flex; - border-bottom: 1px solid #848c96; + border-bottom: 1px solid #848C96; } .errRowHeading { display: flex; - border-bottom: 1px solid #848c96; + border-bottom: 1px solid #848C96; font-size: 18px; font-weight: 700; } .errRowHeadingDarkView { - background-color: #24272a; + background-color: #24272A; } .errRowHeadingLightView { - background-color: #f2f4f6; + background-color: #F2F4F6; } .secondaryHeading { @@ -39,7 +39,7 @@ justify-content: center; width: 80px; min-height: 48px; - border-right: 1px solid #848c96; + border-right: 1px solid #848C96; } .errColMsg { diff --git a/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx b/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx index 8730c23cd85..b008d7c4151 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx @@ -10,12 +10,7 @@ export const ConditionalField = (props: FieldTemplateProps) => { const [isOpened, setIsOpened] = useState(false); const [selectedTypeSchema, setSelectedTypeSchema] = useState(null); const [isEditView, setIsEditView] = useState(false); - const { - setIsDrawerContentFixed, - setDrawerLabel, - isComplexTypeView, - setIsComplexTypeView, - } = useContext(ParserOpenRPCContext); + const { setIsDrawerContentFixed, setDrawerLabel, isComplexTypeView, setIsComplexTypeView } = useContext(ParserOpenRPCContext); const { formData, schema, name, onChange } = props; const listItems = schema?.anyOf ? schema?.anyOf : schema?.oneOf; const checkForNullTypeSchema = (type) => type === "null"; @@ -24,47 +19,40 @@ export const ConditionalField = (props: FieldTemplateProps) => { setIsDrawerContentFixed(true); setIsEditView(true); setIsComplexTypeView(true); - }; + } const onDropdownOptionClick = (e) => { - const selectedSchema = listItems.find( - ({ title }) => title === e.target.dataset.value - ); + const selectedSchema = listItems.find(({ title }) => title === e.target.dataset.value); const isNullTypeSchema = checkForNullTypeSchema(selectedSchema?.type); if (isNullTypeSchema) { onChange(null); } else { - setSelectedTypeSchema( - listItems.find(({ title }) => title === e.target.dataset.value) - ); + setSelectedTypeSchema(listItems.find(({ title }) => title === e.target.dataset.value)); showComplexTypeView(); } setIsOpened(false); - }; + } const selectWidgetProps = { ...props, schema: selectedTypeSchema, label: name, value: formData, ...(selectedTypeSchema?.enum && { - options: { - enumOptions: selectedTypeSchema?.enum.map((item) => ({ - label: item, - value: item, - })), - }, - }), - }; + options:{ + enumOptions: selectedTypeSchema?.enum.map(item => ({ label: item, value: item })) + } + }) + } const baseInputProps = { ...props, - schema: selectedTypeSchema, - }; + schema: selectedTypeSchema + } useEffect(() => { - if (!isComplexTypeView) { + if(!isComplexTypeView) { setIsEditView(false); setSelectedTypeSchema(null); } - }, [isComplexTypeView]); + }, [isComplexTypeView]) return listItems?.length > 0 ? ( <> @@ -73,43 +61,15 @@ export const ConditionalField = (props: FieldTemplateProps) => {
-
+
{formData === undefined ? "" : String(formData)} - { - setIsOpened(!isOpened); - }} - > + { setIsOpened(!isOpened); }}> {schema?.anyOf ? "anyOf" : "oneOf"} - - + + -
    +
      {listItems?.map((listItem, index) => (
    • {
- {isComplexTypeView && - isEditView && - selectedTypeSchema && - selectedTypeSchema.type !== "null" ? ( + {isComplexTypeView && isEditView && selectedTypeSchema && selectedTypeSchema.type !== "null" ?
- {selectedTypeSchema?.enum ? ( - - ) : ( - - )} + {selectedTypeSchema?.enum ? : }
- ) : null} + : null + } ) : null; -}; +} diff --git a/src/components/ParserOpenRPC/InteractiveBox/index.tsx b/src/components/ParserOpenRPC/InteractiveBox/index.tsx index 65a85bb9bec..3236bb53404 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/index.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/index.tsx @@ -1,19 +1,10 @@ import React, { useContext, useEffect, useRef, useState } from "react"; import Form from "@rjsf/core"; import clsx from "clsx"; -import { - RJSFSchema, - UiSchema, - RegistryWidgetsType, - RegistryFieldsType, -} from "@rjsf/utils"; +import {RJSFSchema, UiSchema, RegistryWidgetsType, RegistryFieldsType} from "@rjsf/utils"; import validator from "@rjsf/validator-ajv8"; import $RefParser from "@apidevtools/json-schema-ref-parser"; -import { - MethodExample, - MethodParam, - SchemaComponents, -} from "@site/src/components/ParserOpenRPC/interfaces"; +import { MethodExample, MethodParam, SchemaComponents } from "@site/src/components/ParserOpenRPC/interfaces"; import styles from "./styles.module.css"; import global from "../global.module.css"; import { BaseInputTemplate } from "@site/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate"; @@ -30,18 +21,18 @@ interface InteractiveBoxProps { components: SchemaComponents; examples: MethodExample[]; onParamChange: (data) => void; - drawerLabel?: string | null; + drawerLabel?: string | null closeComplexTypeView?: () => void; } export default function InteractiveBox({ - params, - components, - examples, - onParamChange, - drawerLabel, - closeComplexTypeView, -}: InteractiveBoxProps) { + params, + components, + examples, + onParamChange, + drawerLabel, + closeComplexTypeView +}:InteractiveBoxProps) { const [parsedSchema, setParsedSchema] = useState(null); const [defaultFormData, setDefaultFormData] = useState({}); const [isFormReseted, setIsFormReseted] = useState(false); @@ -49,19 +40,13 @@ export default function InteractiveBox({ const { colorMode } = useColorMode(); const { isComplexTypeView } = useContext(ParserOpenRPCContext); - const defaultExampleFormData = examples - ? Object.fromEntries( - examples[0].params.map(({ name, value }) => [name, value]) - ) - : {}; + const defaultExampleFormData = examples ? Object.fromEntries(examples[0].params.map(({ name, value }) => [name, value])) : {}; const schema: RJSFSchema = { - components: { - schemas: components, + "components": { + "schemas": components, }, - type: "object", - properties: Object.fromEntries( - params.map(({ name, schema }) => [name, schema]) - ), + "type": "object", + "properties": Object.fromEntries(params.map(({ name, schema }) => [name, schema])), }; const uiSchema: UiSchema = { "ui:globalOptions": { @@ -74,7 +59,7 @@ export default function InteractiveBox({ ArrayFieldTemplate, FieldErrorTemplate: () => null, ErrorListTemplate: () => null, - }; + } const widgets: RegistryWidgetsType = { CheckboxWidget: DropdownWidget, SelectWidget: SelectWidget, @@ -94,13 +79,13 @@ export default function InteractiveBox({ formRef?.current?.reset(); } }; - const isLightTheme = colorMode === "light"; + const isLightTheme = colorMode === "light" useEffect(() => { const dereferenceSchema = async () => { try { if (schema) { - setParsedSchema((await $RefParser.dereference(schema)) as RJSFSchema); + setParsedSchema(await $RefParser.dereference(schema) as RJSFSchema); } } catch (error) { console.error("Error of parsing schema:", error); @@ -119,13 +104,13 @@ export default function InteractiveBox({ }; const cloneAndSetNullIfExists = (obj, key) => { - if (typeof obj !== "object" || obj === null) return obj; + if (typeof obj !== 'object' || obj === null) return obj; const newObj = Array.isArray(obj) ? [] : {}; - for (const prop in obj) { + for (let prop in obj) { if (obj.hasOwnProperty(prop)) { if (prop === key) { newObj[prop] = []; - } else if (typeof obj[prop] === "object" && obj[prop] !== null) { + } else if (typeof obj[prop] === 'object' && obj[prop] !== null) { newObj[prop] = cloneAndSetNullIfExists(obj[prop], key); } else { newObj[prop] = obj[prop]; @@ -133,21 +118,25 @@ export default function InteractiveBox({ } } return newObj; - }; + } const handleCancelClick = () => { if (drawerLabel) { const upData = cloneAndSetNullIfExists(defaultFormData, drawerLabel); - setDefaultFormData(upData); + setDefaultFormData(upData) } closeComplexTypeView(); - }; + } return parsedSchema ? ( <>
-
Parameter
-
Value
+
+ Parameter +
+
+ Value +
{ - onChangeHandler(data.formData); - }} + onChange={(data) => { onChangeHandler(data.formData); }} templates={templates} uiSchema={uiSchema} widgets={widgets} ref={formRef} fields={fields} > -
+
- @@ -190,33 +164,21 @@ export default function InteractiveBox({ className={styles.footerButtonLeft} onClick={handleClearForm} > - +
- {isComplexTypeView ? ( + {isComplexTypeView ?
- - -
- ) : null} +
: + null + }
diff --git a/src/components/ParserOpenRPC/InteractiveBox/styles.module.css b/src/components/ParserOpenRPC/InteractiveBox/styles.module.css index 3ad7ea4669d..10db77046b6 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/styles.module.css +++ b/src/components/ParserOpenRPC/InteractiveBox/styles.module.css @@ -6,8 +6,8 @@ width: 50%; padding: 16px; line-height: 1.5; - background-color: #292a36; - color: #ffffff; + background-color: #292A36; + color: #FFFFFF; } .tableRow { display: flex; @@ -17,8 +17,8 @@ .tableColumn { width: 50%; line-height: 24px; - background-color: #292a36; - color: #ffffff; + background-color: #292A36; + color: #FFFFFF; } .tableColumnParam { display: flex; @@ -149,7 +149,7 @@ width: 100%; padding: 16px; background-color: rgba(36, 39, 42, 1); - color: #ffffff; + color: #FFFFFF; white-space: nowrap; } .dropdownItem:hover { @@ -168,10 +168,10 @@ bottom: 0; } .tableFooterRowDark { - background-color: #24272a; + background-color: #24272A; } .tableFooterRowLight { - background-color: #f2f4f6; + background-color: #F2F4F6; } .tableButton { display: flex; @@ -193,7 +193,7 @@ top: 0; width: 100%; height: 332px; - background-color: #292a36; + background-color: #292A36; overflow-y: scroll; z-index: 1; } @@ -205,7 +205,7 @@ padding: 12px 72px 12px 16px; font-size: 14px; line-height: 24px; - color: #ffffff; + color: #FFFFFF; border-radius: 0; border: 2px solid transparent; text-overflow: ellipsis; @@ -216,8 +216,8 @@ border: 2px solid rgba(16, 152, 252, 1); outline: none; } -.formControl[type="number"]::-webkit-inner-spin-button, -.formControl[type="number"]::-webkit-outer-spin-button { +.formControl[type=number]::-webkit-inner-spin-button, +.formControl[type=number]::-webkit-outer-spin-button { opacity: 0; } .formControlNumberUp { @@ -249,7 +249,7 @@ border-radius: 0; } .footerButtonRight { - padding: 5px 16px !important; + padding: 5px 16px!important; } .footerButtonRightOutline { margin-right: 16px; @@ -297,7 +297,7 @@ padding: 0; border: 0; outline: none; - color: #bbc0c5; + color: #BBC0C5; font-size: 14px; line-height: 1; cursor: pointer; @@ -309,8 +309,8 @@ width: 20px; height: 20px; border-radius: 50%; - background-color: #bbc0c5; - color: #292a36; + background-color: #BBC0C5; + color: #292A36; font-size: 20px; line-height: 1; margin-right: 10px; @@ -327,5 +327,5 @@ .arrayItemRowWrap { position: relative; padding-left: 40px; - border-bottom: 1px dashed #848c96; + border-bottom: 1px dashed #848C96; } diff --git a/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx b/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx index 008985110dd..7d5d37b739f 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx @@ -6,49 +6,33 @@ import styles from "@site/src/components/ParserOpenRPC/InteractiveBox/styles.mod import clsx from "clsx"; import { ParserOpenRPCContext } from "@site/src/components/ParserOpenRPC"; -export const ArrayFieldTemplate = ({ - items, - canAdd, - onAddClick, - title, - schema, - formData, -}: ArrayFieldTemplateProps) => { +export const ArrayFieldTemplate = ({ items, canAdd, onAddClick, title, schema, formData }: ArrayFieldTemplateProps) => { const [isComplexArrayEditView, setIsComplexArrayEditView] = useState(false); - const { - setIsDrawerContentFixed, - setDrawerLabel, - isComplexTypeView, - setIsComplexTypeView, - } = useContext(ParserOpenRPCContext); + const { setIsDrawerContentFixed, setDrawerLabel, isComplexTypeView, setIsComplexTypeView } = useContext(ParserOpenRPCContext); const { collapsed, toggleCollapsed } = useCollapsible({ initialState: true }); const itemsType = schema?.items?.type; - const isSimpleArray = - itemsType === "string" || - itemsType === "boolean" || - itemsType === "number" || - itemsType === "integer"; + const isSimpleArray = itemsType === "string" || itemsType === "boolean" || itemsType === "number" || itemsType === "integer"; const addComplexArray = () => { - if (formData?.length === 0) { + if(formData?.length === 0) { onAddClick(); } setDrawerLabel(title); setIsDrawerContentFixed(true); setIsComplexArrayEditView(true); setIsComplexTypeView(true); - }; + } const addSimpleArray = () => { toggleCollapsed(); - if (collapsed && formData?.length === 0) { + if(collapsed && formData?.length === 0) { onAddClick(); } - }; + } useEffect(() => { if (!isComplexTypeView) { setIsComplexArrayEditView(false); } - }, [isComplexTypeView]); + }, [isComplexTypeView]) return (
@@ -57,82 +41,51 @@ export const ArrayFieldTemplate = ({
-
+
{JSON.stringify(formData, null, " ")}
+ className={clsx(styles.tableColumnType, styles.tableColumnTypeDropdown)} + onClick={isSimpleArray ? addSimpleArray : addComplexArray}> {schema.type} - + isSimpleArray ? + collapsed && styles.chevronIconDown : + styles.chevronIconRight + ) + }/>
- {isComplexTypeView && isComplexArrayEditView && !isSimpleArray ? ( + {isComplexTypeView && isComplexArrayEditView && !isSimpleArray ?
{items.map(({ children, index, onDropIndexClick, hasRemove }) => (
- {hasRemove ? ( - - ) : null} + {hasRemove ? + : + null + } {children}
))} - {canAdd ? ( - - ) : null} -
- ) : ( + {canAdd ? + : + null + } +
: <> {items.map((el, i) => { @@ -140,33 +93,22 @@ export const ArrayFieldTemplate = ({ ...el.children.props, isArray: true, value: formData, - }; + } const { index, hasRemove, onDropIndexClick, schema } = el; - const isNumber = - schema.type === "number" || schema.type === "integer"; + const isNumber = schema.type === "number" || schema.type === "integer"; return ( -
- - {i + 1} - +
+ {i+1} {hasRemove && ( + className={clsx(styles.deleteIcon, styles.deleteIconCentered)} + > + )}
- ); + ) })} {canAdd && (
@@ -182,7 +124,7 @@ export const ArrayFieldTemplate = ({ )} - )} + }
); -}; +} diff --git a/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx b/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx index 48e9923c11a..b1da31440a9 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx @@ -6,34 +6,31 @@ import { Tooltip } from "@site/src/components/ParserOpenRPC/Tooltip"; import debounce from "lodash.debounce"; interface ExtendedInputProps extends BaseInputTemplateProps { - isArray?: boolean; + isArray?: boolean } export const BaseInputTemplate = ({ - schema, - id, - name, - value = "", - disabled, - onChange, - rawErrors, - hideError, - required, - formContext, - isArray, -}: ExtendedInputProps) => { + schema, + id, + name, + value = "", + disabled, + onChange, + rawErrors, + hideError, + required, + formContext, + isArray + }: ExtendedInputProps) => { const isNumber = schema.type === "number" || schema.type === "integer"; const [isFocused, setIsFocused] = useState(false); const [inputValue, setInputValue] = useState(isNumber ? 0 : ""); const { isFormReseted } = formContext; const hasErrors = rawErrors?.length > 0 && !hideError && value !== ""; - const debouncedOnChange = useCallback( - debounce((e, isInputNumber = false) => { - onChange(isInputNumber ? e : e?.target?.value); - }, 300), - [] - ); + const debouncedOnChange = useCallback(debounce((e, isInputNumber = false) => { + onChange(isInputNumber ? e : e?.target?.value); + }, 300), []); const onInputChange = (e) => { setInputValue(e?.target?.value); debouncedOnChange(e); @@ -55,69 +52,37 @@ export const BaseInputTemplate = ({
{!isArray && (
-
)}
- {hasErrors && !isNumber ? ( - - ) : null} + {hasErrors && !isNumber ? : null} { - setIsFocused(true); - }} - onBlur={() => { - setIsFocused(false); - }} + onFocus={() => { setIsFocused(true); }} + onBlur={() => { setIsFocused(false); }} /> {schema.type} {isNumber ? ( <> { - onInputNumberChange(Number((+inputValue || 0) + 1)); - }} + className={clsx(styles.tableColumnIcon, styles.chevronIcon, styles.formControlNumberUp)} + onClick={() => { onInputNumberChange(Number((+inputValue || 0) + 1)); }} /> { - inputValue >= 1 && - onInputNumberChange(Number((+inputValue || 0) - 1)); - }} + className={clsx(styles.tableColumnIcon, styles.chevronIcon, styles.chevronIconDown, styles.formControlNumberDown)} + onClick={() => { inputValue >= 1 && onInputNumberChange(Number((+inputValue || 0) - 1)); }} /> ) : null} diff --git a/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx b/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx index 62c132dd593..c59974c6951 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx @@ -3,60 +3,26 @@ import { WidgetProps } from "@rjsf/utils"; import clsx from "clsx"; import styles from "@site/src/components/ParserOpenRPC/InteractiveBox/styles.module.css"; -export const DropdownWidget = ({ - name, - value, - onChange, - schema, - options, -}: WidgetProps) => { +export const DropdownWidget = ({ name, value, onChange, schema, options }: WidgetProps) => { const [isOpened, setIsOpened] = useState(false); - + return (
-
+
{value === undefined ? "" : String(value)} - { - setIsOpened(!isOpened); - }} - > + { setIsOpened(!isOpened); }}> {schema.type} - - + + -
    +
      {options.enumOptions.map(({ value }, index) => ( -
    • { @@ -73,4 +39,4 @@ export const DropdownWidget = ({
); -}; +}; \ No newline at end of file diff --git a/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx b/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx index 29e115da4f9..7ce49d2f520 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx @@ -3,63 +3,27 @@ import { WidgetProps } from "@rjsf/utils"; import clsx from "clsx"; import styles from "@site/src/components/ParserOpenRPC/InteractiveBox/styles.module.css"; -export const SelectWidget = ({ - value, - onChange, - schema, - options, - label, -}: WidgetProps) => { +export const SelectWidget = ({ value, onChange, schema, options, label }: WidgetProps) => { const [isOpened, setIsOpened] = useState(false); - const emptyValue = - value === undefined || - !options?.enumOptions.some(({ label }) => label === value); - + const emptyValue = value === undefined || !options?.enumOptions.some(({ label }) => label === value); + return (
-
+
{emptyValue ? "" : String(value)} - { - setIsOpened(!isOpened); - }} - > + { setIsOpened(!isOpened); }}> - {schema?.enum ? "enum" : schema?.type} - - + {schema?.enum ? 'enum' : schema?.type} + + -
    +
      {options?.enumOptions?.map(({ label, value }, index) => ( -
    • { diff --git a/src/components/ParserOpenRPC/ModalDrawer/index.tsx b/src/components/ParserOpenRPC/ModalDrawer/index.tsx index e380a7ec50e..16208dab86a 100644 --- a/src/components/ParserOpenRPC/ModalDrawer/index.tsx +++ b/src/components/ParserOpenRPC/ModalDrawer/index.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useRef } from "react"; +import React, {useState, useEffect, useRef} from "react"; import clsx from "clsx"; import { useColorMode } from "@docusaurus/theme-common"; import styles from "./styles.module.css"; @@ -12,14 +12,7 @@ interface ModalDrawerProps { headerLabel?: string | null; } -export const ModalDrawer = ({ - title, - isOpen, - onClose, - children, - isContentFixed = false, - headerLabel, -}: ModalDrawerProps) => { +export const ModalDrawer = ({ title, isOpen, onClose, children, isContentFixed = false, headerLabel }: ModalDrawerProps) => { const [showModal, setShowModal] = useState(isOpen); const contentRef = useRef(null); const { colorMode } = useColorMode(); @@ -35,35 +28,16 @@ export const ModalDrawer = ({ }, [isContentFixed]); return ( -
      -
      +
      +
      {title} - {headerLabel ? ( - {headerLabel} - ) : null} + {headerLabel ? {headerLabel} : null}
      - +
      {children} diff --git a/src/components/ParserOpenRPC/ModalDrawer/styles.module.css b/src/components/ParserOpenRPC/ModalDrawer/styles.module.css index 5c9af9526cc..6453f9c8355 100644 --- a/src/components/ParserOpenRPC/ModalDrawer/styles.module.css +++ b/src/components/ParserOpenRPC/ModalDrawer/styles.module.css @@ -1,5 +1,5 @@ .modalContainer { - border: 1px solid #848c96; + border: 1px solid #848C96; border-radius: 8px 8px 0 0; position: absolute; z-index: 10; @@ -9,11 +9,11 @@ min-height: 512px; opacity: 0; transform: translate(0, 100%); - transition-property: "transform", "opacity"; - transition-duration: 0.4s; + transition-property: 'transform', 'opacity'; + transition-duration: .4s; transition-timing-function: ease; overflow: hidden; - background-color: #292a36; + background-color: #292A36; } .modalContainerOpen { @@ -27,11 +27,11 @@ align-items: center; justify-content: space-between; min-height: 56px; - background-color: #24272a; + background-color: #24272A; } .modalHeaderLight { - background-color: #f2f4f6 !important; + background-color: #F2F4F6 !important; } .modalTitle { @@ -68,7 +68,7 @@ justify-content: center; margin-left: 8px; padding: 2px 8px; - border: 1px solid #848c96; + border: 1px solid #848C96; border-radius: 999px; font-size: 12px; line-height: 18px; diff --git a/src/components/ParserOpenRPC/RequestBox/index.tsx b/src/components/ParserOpenRPC/RequestBox/index.tsx index 81c44591acd..d5a92b4d8d7 100644 --- a/src/components/ParserOpenRPC/RequestBox/index.tsx +++ b/src/components/ParserOpenRPC/RequestBox/index.tsx @@ -5,6 +5,7 @@ import { MethodParam } from "@site/src/components/ParserOpenRPC/interfaces"; import styles from "./styles.module.css"; import global from "../global.module.css"; + interface RequestBoxProps { isMetamaskInstalled: boolean; method: string; @@ -15,22 +16,14 @@ interface RequestBoxProps { submitRequest: () => void; } -export default function RequestBox({ - isMetamaskInstalled, - method, - params, - response, - paramsData, - openModal, - submitRequest, -}: RequestBoxProps) { +export default function RequestBox({ isMetamaskInstalled, method, params, response, paramsData, openModal, submitRequest }: RequestBoxProps) { const exampleRequest = useMemo(() => { const preparedParams = JSON.stringify(paramsData, null, 2); return `await window.ethereum.request({\n "method": "${method}",\n "params": ${preparedParams},\n});`; }, [method, paramsData]); const exampleResponse = useMemo(() => { - if (!response || response === null) return false; + if (!response || response === null) return false return JSON.stringify(response, null, 2); }, [response]); @@ -78,4 +71,4 @@ export default function RequestBox({ )} ); -} +} \ No newline at end of file diff --git a/src/components/ParserOpenRPC/RequestBox/styles.module.css b/src/components/ParserOpenRPC/RequestBox/styles.module.css index c45bc42d05e..ffca9f28b9c 100644 --- a/src/components/ParserOpenRPC/RequestBox/styles.module.css +++ b/src/components/ParserOpenRPC/RequestBox/styles.module.css @@ -1,13 +1,13 @@ .cardWrapper { border-radius: 8px; - border: 1px solid #848c96; - background-color: #292a36; + border: 1px solid #848C96; + background-color: #292A36; margin-bottom: 24px; overflow: hidden; } .cardHeader { - border-bottom: 1px solid #848c96; + border-bottom: 1px solid #848C96; padding: 16px; } @@ -18,6 +18,6 @@ .cardFooter { display: flex; justify-content: flex-end; - border-top: 1px solid #848c96; + border-top: 1px solid #848C96; padding: 16px; } diff --git a/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css b/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css index d4094efc55c..f899638b910 100644 --- a/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css +++ b/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css @@ -1,7 +1,7 @@ .tooltipContainer { - max-width: 180px; - font-size: 16px; + max-width: 180px; + font-size: 16px; } .tooltipContainer:first-letter { - text-transform: capitalize; + text-transform: capitalize; } diff --git a/src/components/ParserOpenRPC/Tooltip/index.tsx b/src/components/ParserOpenRPC/Tooltip/index.tsx index af50008bdcb..40348046f92 100644 --- a/src/components/ParserOpenRPC/Tooltip/index.tsx +++ b/src/components/ParserOpenRPC/Tooltip/index.tsx @@ -13,10 +13,12 @@ export const Tooltip = ({ children, message, disabled }: TooltipProps) => ( {message}
      } + html={( +
      {message}
      + )} position="top" interactive={true} > {children} -); +) diff --git a/src/components/ParserOpenRPC/global.module.css b/src/components/ParserOpenRPC/global.module.css index bf91492a98c..a64fbcc95b7 100644 --- a/src/components/ParserOpenRPC/global.module.css +++ b/src/components/ParserOpenRPC/global.module.css @@ -1,9 +1,9 @@ .root { - --font-family-sans: "Euclid Circular B", "Roboto", sans-serif; + --font-family-sans: 'Euclid Circular B', 'Roboto', sans-serif; } .primaryBtn { - background: #1098fc; + background: #1098FC; color: #141618; font-size: 14px; line-height: 1; @@ -15,23 +15,23 @@ padding: 12px 16px; cursor: pointer; font-family: var(--font-family-sans); - transition-property: "box-shadow", "background-color"; - transition-duration: 0.2s; + transition-property: 'box-shadow', 'background-color'; + transition-duration: .2s; transition-timing-function: ease; } .primaryBtn:hover { text-decoration: none; color: #141618; - background-color: #26a2fc; - box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.4); + background-color: #26A2FC; + box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.40); } .primaryBtn:disabled { cursor: not-allowed; text-decoration: none; color: #141618; - background-color: #0376c9; + background-color: #0376C9; box-shadow: none; } @@ -49,8 +49,8 @@ .secondaryBtn:hover { text-decoration: none; color: #141618; - background-color: #26a2fc; - box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.4); + background-color: #26A2FC; + box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.40); } .secondaryBtn:disabled { @@ -63,7 +63,7 @@ .linkBtn { background: none; border: 0; - color: #1098fc; + color: #1098FC; font-size: 14px; line-height: 1; font-weight: 500; diff --git a/src/components/ParserOpenRPC/index.tsx b/src/components/ParserOpenRPC/index.tsx index 37d820aec23..49d336e367e 100644 --- a/src/components/ParserOpenRPC/index.tsx +++ b/src/components/ParserOpenRPC/index.tsx @@ -1,4 +1,4 @@ -import React, { createContext, useMemo, useState } from "react"; +import React, { createContext, useMemo, useState } from 'react' import { usePluginData } from "@docusaurus/useGlobalData"; import { ResponseItem, NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"; import DetailsBox from "@site/src/components/ParserOpenRPC/DetailsBox"; @@ -11,12 +11,9 @@ import global from "./global.module.css"; import modalDrawerStyles from "./ModalDrawer/styles.module.css"; import clsx from "clsx"; import { useColorMode } from "@docusaurus/theme-common"; -import { - trackClickForSegment, - trackInputChangeForSegment, -} from "@site/src/lib/segmentAnalytics"; +import { trackClickForSegment, trackInputChangeForSegment } from "@site/src/lib/segmentAnalytics"; import { useLocation } from "@docusaurus/router"; -import { useSyncProviders } from "@site/src/hooks/useSyncProviders.ts"; +import { useSyncProviders } from "@site/src/hooks/useSyncProviders.ts" interface ParserProps { network: NETWORK_NAMES; @@ -24,14 +21,13 @@ interface ParserProps { } interface ParserOpenRPCContextProps { - setIsDrawerContentFixed?: (isFixed: boolean) => void; + setIsDrawerContentFixed?: (isFixed: boolean) => void setDrawerLabel?: (label: string) => void; isComplexTypeView: boolean; setIsComplexTypeView: (isComplexTypeView: boolean) => void; } -export const ParserOpenRPCContext = - createContext(null); +export const ParserOpenRPCContext = createContext(null) export default function ParserOpenRPC({ network, method }: ParserProps) { if (!method || !network) return null; @@ -47,49 +43,33 @@ export default function ParserOpenRPC({ network, method }: ParserProps) { trackClickForSegment({ eventName: "Customize Request", clickType: "Customize Request", - userExperience: "B", - }); + userExperience: "B" + }) }; const closeModal = () => setModalOpen(false); - const { netData } = usePluginData("plugin-json-rpc") as { - netData?: ResponseItem[]; - }; - const currentNetwork = netData?.find((net) => net.name === network); + const { netData } = usePluginData("plugin-json-rpc") as { netData?: ResponseItem[] }; + const currentNetwork = netData?.find(net => net.name === network); if (!currentNetwork && currentNetwork.error) return null; const currentMethodData = useMemo(() => { const findReferencedItem = (items, refPath, componentType) => { - return ( - items - ?.map((item) => { - if (item?.name || (item?.code && item?.message)) return item; - if (item?.$ref) { - const ref = item.$ref.replace(refPath, ""); - return currentNetwork.data.components[componentType][ref]; - } - return null; - }) - .filter(Boolean) || [] - ); + return items?.map(item => { + if (item?.name || (item?.code && item?.message)) return item; + if (item?.$ref) { + const ref = item.$ref.replace(refPath, ""); + return currentNetwork.data.components[componentType][ref]; + } + return null; + }).filter(Boolean) || []; }; - const currentMethod = currentNetwork.data.methods?.find( - (met) => met.name === method - ); + const currentMethod = currentNetwork.data.methods?.find(met => met.name === method); if (!currentMethod) return null; - const errors = findReferencedItem( - currentMethod.errors, - "#/components/errors/", - "errors" - ); - const tags = findReferencedItem( - currentMethod.tags, - "#/components/tags/", - "tags" - ); + const errors = findReferencedItem(currentMethod.errors, "#/components/errors/", "errors"); + const tags = findReferencedItem(currentMethod.tags, "#/components/tags/", "tags"); return { description: currentMethod.summary || currentMethod.description || null, @@ -109,54 +89,44 @@ export default function ParserOpenRPC({ network, method }: ParserProps) { const [selectedWallet, setSelectedWallet] = useState(0); const providers = useSyncProviders(); - const handleConnect = (i: number) => { + const handleConnect = (i:number) => { setSelectedWallet(i); - }; + } const metamaskProviders = useMemo(() => { - const isMetamasks = providers.filter((pr) => - pr?.info?.name?.includes("MetaMask") - ); + const isMetamasks = providers.filter(pr => pr?.info?.name?.includes("MetaMask")); if (isMetamasks.length > 1) { - const indexWallet = isMetamasks.findIndex( - (item) => item.info.name === "MetaMask" - ); + const indexWallet = isMetamasks.findIndex(item => item.info.name === "MetaMask"); setSelectedWallet(indexWallet); } return isMetamasks; }, [providers]); const onParamsChangeHandle = (data) => { - if ( - typeof data !== "object" || - data === null || - Object.keys(data).length === 0 - ) { + if (typeof data !== 'object' || data === null || Object.keys(data).length === 0) { setParamsData([]); } setParamsData(Object.values(data)); trackInputChangeForSegment({ eventName: "Request Configuration Started", - userExperience: "B", - }); - }; + userExperience: "B" + }) + } const onSubmitRequestHandle = async () => { - if (metamaskProviders.length === 0) return; + if (metamaskProviders.length === 0) return try { - const response = await metamaskProviders[selectedWallet].provider.request( - { - method: method, - params: paramsData, - } - ); + const response = await metamaskProviders[selectedWallet].provider.request({ + method: method, + params: paramsData + }) setReqResult(response); trackClickForSegment({ eventName: "Request Sent", clickType: "Request Sent", userExperience: "B", - ...(response?.code && { responseStatus: response.code }), - }); + ...(response?.code && { responseStatus: response.code }) + }) } catch (e) { setReqResult(e); } @@ -166,21 +136,16 @@ export default function ParserOpenRPC({ network, method }: ParserProps) { setIsComplexTypeView(false); setIsDrawerContentFixed(false); setDrawerLabel(null); - }; + } const onModalClose = () => { closeModal(); closeComplexTypeView(); - }; + } return (
      @@ -197,29 +162,18 @@ export default function ParserOpenRPC({ network, method }: ParserProps) {
      Editing Param - ) : ( - "Customize request" - ) - } + : + "Customize request"} isOpen={isModalOpen} onClose={onModalClose} isContentFixed={isDrawerContentFixed} @@ -256,4 +210,4 @@ export default function ParserOpenRPC({ network, method }: ParserProps) {
      ); -} +} \ No newline at end of file diff --git a/src/components/ParserOpenRPC/interfaces.ts b/src/components/ParserOpenRPC/interfaces.ts index 9c63a5c7881..a2452623273 100644 --- a/src/components/ParserOpenRPC/interfaces.ts +++ b/src/components/ParserOpenRPC/interfaces.ts @@ -53,4 +53,4 @@ export interface MethodExample { name: string; params: MethodExampleParam[]; result: MethodExampleResult; -} +} \ No newline at end of file diff --git a/src/components/Pill/index.tsx b/src/components/Pill/index.tsx index 16412ce180e..d82b6298975 100644 --- a/src/components/Pill/index.tsx +++ b/src/components/Pill/index.tsx @@ -4,15 +4,14 @@ import styles from "./styles.module.css"; const colors = new Set(["green", "red", "yellow", "blue"]); + type PillProps = PropsWithChildren<{ color: "green" | "red" | "yellow" | "blue"; }>; export default function Pill({ color, children }: PillProps) { if (!colors.has(color)) { - throw new Error( - `Invalid color: ${color}. Available colors are: ${Array.from(colors).join(", ")}` - ); + throw new Error(`Invalid color: ${color}. Available colors are: ${Array.from(colors).join(", ")}`); } return ( diff --git a/src/components/Pill/styles.module.css b/src/components/Pill/styles.module.css index e674b801670..032039eafb7 100644 --- a/src/components/Pill/styles.module.css +++ b/src/components/Pill/styles.module.css @@ -21,4 +21,4 @@ .pill--yellow { color: var(--brand-colors-yellow-yellow700); background: var(--brand-colors-yellow-yellow300); -} +} \ No newline at end of file diff --git a/src/components/Sections/SectionAPIs.jsx b/src/components/Sections/SectionAPIs.jsx index d0aa79fe1ae..82869c4b937 100644 --- a/src/components/Sections/SectionAPIs.jsx +++ b/src/components/Sections/SectionAPIs.jsx @@ -1,15 +1,13 @@ import React from "react"; import { API_LINKS } from "@site/src/lib/data"; import Link from "@docusaurus/Link"; -import Heading from "@theme/Heading"; +import Heading from '@theme/Heading' const SectionAPIs = () => { return (
      - - Blockchain APIs - + Blockchain APIs
        {API_LINKS.blockchain.map((item) => (
      • @@ -19,9 +17,7 @@ const SectionAPIs = () => {
      - - Decentralize storage APIs - + Decentralize storage APIs
        {API_LINKS.storage.map((item) => (
      • @@ -34,4 +30,4 @@ const SectionAPIs = () => { ); }; -export default SectionAPIs; +export default SectionAPIs; \ No newline at end of file diff --git a/src/components/Sections/SectionNetworks.jsx b/src/components/Sections/SectionNetworks.jsx index 9c518b38d08..52f50304d42 100644 --- a/src/components/Sections/SectionNetworks.jsx +++ b/src/components/Sections/SectionNetworks.jsx @@ -31,13 +31,12 @@ const SectionNetworks = () => { ? index === 4 ? "opacity-30" : index === 3 - ? "opacity-60" - : "" + ? "opacity-60" + : "" : "" }`} key={name} - to={href} - > + to={href}>
        {`${name}
        @@ -57,7 +56,7 @@ const SectionNetworks = () => { ? index <= 4 || !isNetworksListCollapsed ? renderNetworkCard(item, index) : null - : renderNetworkCard(item, index) + : renderNetworkCard(item, index), )}
      {isMobile && ( @@ -72,4 +71,4 @@ const SectionNetworks = () => { ); }; -export default SectionNetworks; +export default SectionNetworks; \ No newline at end of file diff --git a/src/components/YoutubeEmbed.module.css b/src/components/YoutubeEmbed.module.css index 6d3a8712288..7fcb2ebbc65 100644 --- a/src/components/YoutubeEmbed.module.css +++ b/src/components/YoutubeEmbed.module.css @@ -11,4 +11,4 @@ width: 100%; height: 100%; border-radius: 8px; -} +} \ No newline at end of file diff --git a/src/components/YoutubeEmbed.tsx b/src/components/YoutubeEmbed.tsx index 15715101346..9cb11dc6ba9 100644 --- a/src/components/YoutubeEmbed.tsx +++ b/src/components/YoutubeEmbed.tsx @@ -1,16 +1,16 @@ import React from "react"; -import styles from "./YoutubeEmbed.module.css"; +import styles from "./YoutubeEmbed.module.css"; interface YoutubeEmbedProps { - url: string; + url: string; } const YoutubeEmbed: React.FC = ({ url }) => { return ( -
      - {" "} - {} - +
      { + } +
      ); }; diff --git a/src/css/custom.css b/src/css/custom.css index ed7f5313ae8..e38636458df 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -37,7 +37,7 @@ --mm-flask-border-color: hsl(280, 45%, 45%); } -[data-theme="light"] .DocSearch { +[data-theme='light'] .DocSearch { /* --docsearch-primary-color: var(--ifm-color-primary); */ /* --docsearch-text-color: var(--ifm-font-color-base); */ --docsearch-muted-color: var(--ifm-color-secondary-darkest); @@ -55,7 +55,7 @@ --docsearch-footer-background: var(--ifm-color-white); } -[data-theme="dark"] .DocSearch { +[data-theme='dark'] .DocSearch { --docsearch-text-color: var(--ifm-font-color-base); --docsearch-muted-color: var(--ifm-color-secondary-darkest); --docsearch-container-background: rgba(47, 55, 69, 0.7); @@ -97,13 +97,11 @@ h4 { font-weight: 500; } -.navbar__brand:hover, -.navbar__brand:active { +.navbar__brand:hover, .navbar__brand:active { color: var(--ifm-navbar-link-color); } -[data-theme="dark"] .navbar__brand:hover, -.navbar__brand:active { +[data-theme="dark"] .navbar__brand:hover, .navbar__brand:active { color: var(--ifm-navbar-link-color); } @@ -152,10 +150,8 @@ svg { background-color: unset; cursor: pointer; padding: 0; - transition: color var(--ifm-transition-fast) - var(--ifm-transition-timing-default); - font: var(--ifm-font-size-base) / var(--ifm-line-height-base) - var(--ifm-font-family-base); + transition: color var(--ifm-transition-fast) var(--ifm-transition-timing-default); + font: var(--ifm-font-size-base) / var(--ifm-line-height-base) var(--ifm-font-family-base); line-height: 2; } @@ -169,13 +165,13 @@ svg { } p > .ReactPlayer { - border-radius: 3px; - overflow: hidden; + border-radius: 3px; + overflow: hidden; } p > video { border-radius: 8px; - overflow: hidden; + overflow: hidden; } .menu__link { @@ -266,11 +262,11 @@ code { } html[data-theme="light"] .api-card { - border-color: #e5e5e5; + border-color: #E5E5E5; } html[data-theme="light"] .api-card .logo-wrap { - background-color: #f1f1f1; + background-color: #F1F1F1; } html[data-theme="light"] .api-card:hover { @@ -278,11 +274,11 @@ html[data-theme="light"] .api-card:hover { } .w-lg-50 { - width: 50%; + width: 50% } .w-lg-25 { - width: 25%; + width: 25% } .opacity-30 { @@ -320,8 +316,8 @@ button:hover { background-color: rgba(20, 22, 24, 1); } -[data-theme="light"] .tippy-popper[x-placement^="top"] [x-arrow] { - border-top-color: rgba(20, 22, 24, 1); +[data-theme="light"] .tippy-popper[x-placement^=top] [x-arrow] { + border-top-color: rgba(20, 22, 24, 1); } [data-theme="light"] .tippy-popper[x-placement^=bottom] [x-arrow] { @@ -333,7 +329,7 @@ button:hover { color: rgba(20, 22, 24, 1); } -[data-theme="dark"] .tippy-popper[x-placement^="top"] [x-arrow] { +[data-theme="dark"] .tippy-popper[x-placement^=top] [x-arrow] { border-top-color: rgba(255, 255, 255, 1); } diff --git a/src/hooks/store.ts b/src/hooks/store.ts index 1c4e59f87a4..2556b9d107b 100644 --- a/src/hooks/store.ts +++ b/src/hooks/store.ts @@ -1,6 +1,6 @@ -declare global { +declare global{ interface WindowEventMap { - "eip6963:announceProvider": CustomEvent; + "eip6963:announceProvider": CustomEvent } } @@ -15,18 +15,9 @@ export interface EIP1193Provider { isStatus?: boolean; host?: string; path?: string; - sendAsync?: ( - request: { method: string; params?: Array }, - callback: (error: Error | null, response: unknown) => void - ) => void; - send?: ( - request: { method: string; params?: Array }, - callback: (error: Error | null, response: unknown) => void - ) => void; - request: (request: { - method: string; - params?: Array; - }) => Promise; + sendAsync?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void; + send?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void; + request: (request: { method: string, params?: Array }) => Promise; } export interface EIP6963ProviderDetail { @@ -38,23 +29,21 @@ type EIP6963AnnounceProviderEvent = { detail: { info: EIP6963ProviderInfo; provider: EIP1193Provider; - }; -}; + } +} -let providers: EIP6963ProviderDetail[] = []; +let providers: EIP6963ProviderDetail[] = [] export const store = { - value: () => providers, - subscribe: (callback: () => void) => { - function onAnnouncement(event: EIP6963AnnounceProviderEvent) { - if (providers.map((p) => p.info.uuid).includes(event.detail.info.uuid)) - return; - providers = [...providers, event.detail]; - callback(); + value: ()=> providers, + subscribe: (callback: ()=> void) => { + function onAnnouncement(event: EIP6963AnnounceProviderEvent){ + if(providers.map(p => p.info.uuid).includes(event.detail.info.uuid)) return + providers = [...providers, event.detail] + callback() } window.addEventListener("eip6963:announceProvider", onAnnouncement); window.dispatchEvent(new Event("eip6963:requestProvider")); - return () => - window.removeEventListener("eip6963:announceProvider", onAnnouncement); - }, -}; + return () => window.removeEventListener("eip6963:announceProvider", onAnnouncement) + } +} \ No newline at end of file diff --git a/src/hooks/useSyncProviders.ts b/src/hooks/useSyncProviders.ts index d3493d5543b..b9db3eff98f 100644 --- a/src/hooks/useSyncProviders.ts +++ b/src/hooks/useSyncProviders.ts @@ -1,5 +1,4 @@ import { useSyncExternalStore } from "react"; import { store } from "./store"; -export const useSyncProviders = () => - useSyncExternalStore(store.subscribe, store.value, store.value); +export const useSyncProviders = ()=> useSyncExternalStore(store.subscribe, store.value, store.value) \ No newline at end of file diff --git a/src/hooks/useUser.js b/src/hooks/useUser.js index c205f2ce4c7..1dc80ce3c36 100644 --- a/src/hooks/useUser.js +++ b/src/hooks/useUser.js @@ -13,10 +13,7 @@ export default function useUser() { if (response?.data) { setUser(response.data); const userId = response.data.id; - const upData = await fetch( - `${API_URL}/api/v1/users/${userId}/projects`, - GET_OPTIONS - ); + const upData = await fetch(`${API_URL}/api/v1/users/${userId}/projects`, GET_OPTIONS); if (upData.ok) { const upProjects = await upData.json(); const keysArr = upProjects?.result?.projects; @@ -32,16 +29,16 @@ export default function useUser() { if (response?.error) { setUser(undefined); setKeys([]); - } + } } catch (e) { setUser(undefined); setKeys([]); } finally { setLoading(false); } - }; + } useEffect(() => { - getUserInfo(); + getUserInfo() }, []); return { user, diff --git a/src/lib/constants.js b/src/lib/constants.js index 3b0319a7c76..0a7fe4eabd0 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -357,7 +357,10 @@ export const NETWORKS_NAMES = [ label: "Ethereum", value: NETWORKS.ETHEREUM, complexEndpoint: false, - networksTypes: [NETWORKS_TYPES.mainnet, NETWORKS_TYPES.sepolia], + networksTypes: [ + NETWORKS_TYPES.mainnet, + NETWORKS_TYPES.sepolia, + ], }, { label: "Linea", @@ -448,4 +451,4 @@ export const GET_OPTIONS = { mode: "cors", cache: "no-cache", headers: NO_CACHE, -}; +} diff --git a/src/lib/segmentAnalytics.js b/src/lib/segmentAnalytics.js index 1a02339bd56..fc47a9323e9 100644 --- a/src/lib/segmentAnalytics.js +++ b/src/lib/segmentAnalytics.js @@ -1,8 +1,12 @@ -export const trackPageViewForSegment = ({ name, path, userExperience }) => { +export const trackPageViewForSegment = ({ + name, + path, + userExperience +}) => { if (window.analytics) { window.analytics.page("Page viewed", name, { ...(path && { path: path }), - ...(userExperience && { user_experience: userExperience }), + ...(userExperience && { user_experience: userExperience }) }); } }; @@ -32,10 +36,10 @@ export const trackInputChangeForSegment = ({ timestamp, }) => { if (window.analytics) { - window.analytics.track("Input changed", { + window.analytics.track(`Input changed`, { ...(eventName && { event_name: eventName }), ...(userExperience && { user_experience: userExperience }), ...(timestamp && { timestamp: timestamp }), }); } -}; +}; \ No newline at end of file diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 10887ff1ed7..4ad03f86dbf 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -29,12 +29,12 @@ html[data-theme="dark"] .forceColor { } .homepageButton { - background-color: #1098fc; + background-color: #1098FC; border-radius: 0.3rem; } .homepageButton:hover { - background-color: #43aefc; + background-color: #43AEFC; } .devBannerButton { @@ -46,16 +46,16 @@ html[data-theme="dark"] .forceColor { .devBannerButton:hover { background-color: #1c1e21; - color: #fff; + color: #FFF; } html[data-theme="dark"] .devBannerButton { - border-color: #fff; + border-color: #FFF; border-width: 1px; } html[data-theme="dark"] .devBannerButton:hover { - background-color: #fff; + background-color: #FFF; color: #1c1e21; } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 18fa0f2b055..cec632cbd8b 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -14,16 +14,10 @@ function HomepageHeader() {

      {siteConfig.title}

      -

      - Integrate with and extend upon the world's leading self-custodial - crypto wallet. +

      + Integrate with and extend upon the world's leading self-custodial crypto wallet.

      - + Get started
      @@ -35,45 +29,15 @@ function DevBanner() { return (
      -

      +

      {"Contribute to MetaMask"}

      -

      - Join the MetaMask developer community and learn how to contribute to - the MetaMask project itself. +

      + Join the MetaMask developer community and learn how to contribute to the MetaMask project itself.

      - + Contribute  - +
      @@ -82,7 +46,8 @@ function DevBanner() { export default function Home(): JSX.Element { return ( - +
      diff --git a/src/plugins/launchdarkly/index.ts b/src/plugins/launchdarkly/index.ts index 6cf02f5dd13..f3e424e81e6 100644 --- a/src/plugins/launchdarkly/index.ts +++ b/src/plugins/launchdarkly/index.ts @@ -18,4 +18,4 @@ const LDPlugin = () => { }; }; -export default LDPlugin; +export default LDPlugin \ No newline at end of file diff --git a/src/plugins/launchdarkly/ldClient.ts b/src/plugins/launchdarkly/ldClient.ts index 7f40e4b2eec..502fd39bf8f 100644 --- a/src/plugins/launchdarkly/ldClient.ts +++ b/src/plugins/launchdarkly/ldClient.ts @@ -2,6 +2,7 @@ import { initialize } from "launchdarkly-js-client-sdk"; import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment"; import siteConfig from "@generated/docusaurus.config"; + export default (function () { if (!ExecutionEnvironment.canUseDOM) { return null; @@ -14,7 +15,7 @@ export default (function () { anonymous: true, key: "ld-anonymous-user-key", }; - + const ldClient = initialize(LD_CLIENT_ID as string, context, { allAttributesPrivate: true, bootstrap: "localStorage", @@ -22,7 +23,7 @@ export default (function () { ldClient.on("ready", () => { console.log("LaunchDarkly client ready"); - }); + }); return ldClient; })(); diff --git a/src/plugins/plugin-json-rpc.ts b/src/plugins/plugin-json-rpc.ts index 2cb8574fab2..d8ef1e415b3 100644 --- a/src/plugins/plugin-json-rpc.ts +++ b/src/plugins/plugin-json-rpc.ts @@ -14,9 +14,7 @@ async function fetchData(url: string, name: string): Promise { } } -async function fetchMultipleData( - requests: { url: string; name: string }[] -): Promise { +async function fetchMultipleData(requests: {url: string; name: string}[]): Promise { const promises = requests.map(({ url, name }) => fetchData(url, name)); const responses = await Promise.all(promises); return responses; @@ -26,18 +24,12 @@ const RPC_NETWORK_URL = "https://sot-network-methods.vercel.app/specs"; export enum NETWORK_NAMES { linea = "linea", - metamask = "metamask", + metamask = "metamask" } const requests = [ - { - url: `${RPC_NETWORK_URL}/${NETWORK_NAMES.linea}`, - name: NETWORK_NAMES.linea, - }, - { - url: "https://metamask.github.io/api-specs/0.9.3/openrpc.json", - name: NETWORK_NAMES.metamask, - }, + { url: `${RPC_NETWORK_URL}/${NETWORK_NAMES.linea}`, name: NETWORK_NAMES.linea }, + { url: "https://metamask.github.io/api-specs/0.9.3/openrpc.json", name: NETWORK_NAMES.metamask }, ]; export default function useNetworksMethodPlugin() { @@ -46,7 +38,7 @@ export default function useNetworksMethodPlugin() { async contentLoaded({ actions }) { const { setGlobalData } = actions; await fetchMultipleData(requests) - .then((responseArray) => { + .then(responseArray => { setGlobalData({ netData: responseArray }); }) .catch(() => { @@ -54,4 +46,4 @@ export default function useNetworksMethodPlugin() { }); }, }; -} +} \ No newline at end of file diff --git a/src/theme/Admonition/index.tsx b/src/theme/Admonition/index.tsx index 71a4255cde9..4f7ebbd85fc 100644 --- a/src/theme/Admonition/index.tsx +++ b/src/theme/Admonition/index.tsx @@ -8,7 +8,7 @@ import "./index.css"; type AdmonitionProps = Omit & { type: AdmonitionPropsRaw["type"] | "flaskOnly"; -}; +} declare function AdmonitionComponent(props: AdmonitionProps): JSX.Element; @@ -17,12 +17,12 @@ type Props = WrapperProps; export default function AdmonitionWrapper(props: Props): JSX.Element { if (props.type === "flaskOnly") { return ( - } title="Flask Only"> - This feature is experimental and only available in{" "} - - MetaMask Flask - - , the canary distribution of MetaMask. + } + title="Flask Only" + > + This feature is experimental and only available in MetaMask Flask, the canary distribution of MetaMask. ); } diff --git a/src/theme/DocCard/index.tsx b/src/theme/DocCard/index.tsx index 37791c5337d..2eca88a9af2 100644 --- a/src/theme/DocCard/index.tsx +++ b/src/theme/DocCard/index.tsx @@ -1,10 +1,7 @@ import React, { type ReactNode } from "react"; import clsx from "clsx"; import Link from "@docusaurus/Link"; -import { - useDocById, - findFirstSidebarItemLink, -} from "@docusaurus/theme-common/internal"; +import { useDocById, findFirstSidebarItemLink } from "@docusaurus/theme-common/internal"; import isInternalUrl from "@docusaurus/isInternalUrl"; import { translate } from "@docusaurus/Translate"; import type { Props } from "@theme/DocCard"; @@ -13,6 +10,7 @@ import cardListItemStyles from "@site/src/components/CardList/CardListItem/style import styles from "./styles.module.css"; + import type { PropSidebarItemCategory, PropSidebarItemLink, @@ -30,9 +28,13 @@ function CardContainer({ return ( {children} @@ -60,8 +62,7 @@ function CardLayout({ {description && (

      + title={description}> {description}

      )} @@ -96,14 +97,14 @@ function CardCategory({ description: "The default description for a category card in the generated index about how many items this category includes", }, - { count: item.items.length } + { count: item.items.length }, ) } /> ); } -function CardLink({ item }: { item: PropSidebarItemLink }): JSX.Element { +function CardLink({ item }: {item: PropSidebarItemLink}): JSX.Element { const icon = isInternalUrl(item.href) ? "📄️" : "🔗"; const doc = useDocById(item.docId ?? undefined); return ( @@ -119,11 +120,11 @@ function CardLink({ item }: { item: PropSidebarItemLink }): JSX.Element { export default function DocCard({ item }: Props): JSX.Element { switch (item.type) { - case "link": - return ; - case "category": - return ; - default: - throw new Error(`unknown item type ${JSON.stringify(item)}`); + case "link": + return ; + case "category": + return ; + default: + throw new Error(`unknown item type ${JSON.stringify(item)}`); } } diff --git a/src/theme/DocItem/Footer/index.jsx b/src/theme/DocItem/Footer/index.jsx index ea8e638cd16..e36894d137c 100644 --- a/src/theme/DocItem/Footer/index.jsx +++ b/src/theme/DocItem/Footer/index.jsx @@ -38,8 +38,7 @@ export default function DocItemFooter() { } return (
      + className={clsx(ThemeClassNames.docs.docFooter, "docusaurus-mt-lg")}> {canDisplayEditMetaRow && ( + "row margin-bottom--sm", + )}>
      @@ -28,9 +27,8 @@ export default function DocItemTags() { className={clsx( ThemeClassNames.docs.docFooter, "docusaurus-mt-lg", - "margin-top--sm" - )} - > + "margin-top--sm", + )}> {canDisplayTagsRow && }
      ); diff --git a/src/theme/DocPaginator/index.js b/src/theme/DocPaginator/index.js index 1b272cf6808..56ba8a99723 100644 --- a/src/theme/DocPaginator/index.js +++ b/src/theme/DocPaginator/index.js @@ -1,5 +1,7 @@ + function DocPaginator() { return null; } export default DocPaginator; + diff --git a/src/theme/DocSidebarItem/index.module.css b/src/theme/DocSidebarItem/index.module.css index 7f839d545e3..83f7bc1e7fc 100644 --- a/src/theme/DocSidebarItem/index.module.css +++ b/src/theme/DocSidebarItem/index.module.css @@ -1,7 +1,5 @@ .flaskOnly > :global(a.menu__link::after), -.flaskOnly - > :global(.menu__list-item-collapsible) - > :global(a.menu__link::after) { +.flaskOnly > :global(.menu__list-item-collapsible) > :global(a.menu__link::after) { content: "Flask"; margin-left: 0.5em; background-color: var(--mm-flask-background-color); diff --git a/src/theme/DocSidebarItem/index.tsx b/src/theme/DocSidebarItem/index.tsx index 83316893636..9dd1e52def2 100644 --- a/src/theme/DocSidebarItem/index.tsx +++ b/src/theme/DocSidebarItem/index.tsx @@ -18,9 +18,12 @@ export default function DocSidebarItemWrapper(props: Props): JSX.Element { {...props} item={{ ...itemProps, - className: clsx(className, { - [styles.flaskOnly]: itemProps.customProps?.flask_only, - }), + className: clsx( + className, + { + [styles.flaskOnly]: itemProps.customProps?.flask_only, + }, + ), }} /> diff --git a/src/theme/Layout/index.tsx b/src/theme/Layout/index.tsx index e2e1d196728..10714da4a0c 100644 --- a/src/theme/Layout/index.tsx +++ b/src/theme/Layout/index.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useMemo } from "react"; -import BrowserOnly from "@docusaurus/BrowserOnly"; +import BrowserOnly from '@docusaurus/BrowserOnly'; import { usePluginData } from "@docusaurus/useGlobalData"; import ldClient from "launchdarkly"; import { useLocation } from "@docusaurus/router"; @@ -13,31 +13,23 @@ const REF_PATH = "/wallet/reference/"; const EXEPT_METHODS = [ "wallet_requestPermissions", "wallet_revokePermissions", - "eth_signTypedData_v4", + "eth_signTypedData_v4" ]; export default function LayoutWrapper({ children }) { const location = useLocation(); - const { netData } = usePluginData("plugin-json-rpc") as { - netData?: ResponseItem[]; - }; + const { netData } = usePluginData("plugin-json-rpc") as { netData?: ResponseItem[] }; const [ldReady, setLdReady] = useState(false); const [newReferenceEnabled, setNewReferenceEnabled] = useState(false); - const metamaskNetwork = netData?.find( - (net) => net.name === NETWORK_NAMES.metamask - ); - const metamaskMethods = - metamaskNetwork?.data?.methods?.map((item) => item.name) || []; + const metamaskNetwork = netData?.find(net => net.name === NETWORK_NAMES.metamask); + const metamaskMethods = metamaskNetwork?.data?.methods?.map((item) => item.name) || []; const referencePageName = useMemo(() => { const currentPath = location.pathname; if (currentPath.includes(REF_PATH) && metamaskMethods.length > 0) { const methodPath = currentPath.replace(REF_PATH, "").replace("/", ""); - const page = metamaskMethods.find( - (name) => - name.toLowerCase() === methodPath && !EXEPT_METHODS.includes(name) - ); + const page = metamaskMethods.find(name => name.toLowerCase() === methodPath && !EXEPT_METHODS.includes(name)); return page; } return false; @@ -59,31 +51,30 @@ export default function LayoutWrapper({ children }) { return ( - {() => { - return ( - <> - {newReferenceEnabled && ldReady && referencePageName ? ( - -
      - {children?.props?.children[0]?.type === "aside" && ( - <>{children.props.children[0]} - )} -
      -
      - + { + () => { + return ( + <> + {newReferenceEnabled && ldReady && referencePageName ? ( + +
      + {children?.props?.children[0]?.type === "aside" && ( + <>{children.props.children[0]} + )} +
      +
      + +
      -
      - - ) : ( - {children} - )} - - ); - }} + + ) : ( + {children} + )} + + ) + } + } ); } diff --git a/src/theme/MDXComponents.tsx b/src/theme/MDXComponents.tsx index dc8f8efd564..54f2fa20829 100644 --- a/src/theme/MDXComponents.tsx +++ b/src/theme/MDXComponents.tsx @@ -2,8 +2,9 @@ import Pill from "@site/src/components/Pill"; import MDXComponents from "@theme-original/MDXComponents"; + export default { // Re-use the default mapping ...MDXComponents, Pill, -}; +}; \ No newline at end of file diff --git a/static/js/getfeedback.js b/static/js/getfeedback.js index 0db90a5597e..5b0d6a9849b 100644 --- a/static/js/getfeedback.js +++ b/static/js/getfeedback.js @@ -46,7 +46,7 @@ window.usabilla || "", - ].join("") + ].join(""), ); l.close(); } catch (m) { diff --git a/tsconfig.json b/tsconfig.json index 16408830682..60773147be6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,11 +4,13 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "launchdarkly": [ - "./node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js" - ] + "launchdarkly": ["./node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js"] } }, - "include": ["./**/*"], - "exclude": ["node_modules"] + "include": [ + "./**/*" + ], + "exclude": [ + "node_modules" + ], } diff --git a/vercel.json b/vercel.json index 3a4b3624c0d..2d6684b8aaf 100644 --- a/vercel.json +++ b/vercel.json @@ -475,4 +475,4 @@ "destination": "/snaps/reference/entry-points" } ] -} +} \ No newline at end of file