@graphql-yoga/graphiql 4.4.1-alpha-20250728151100-91888e7889bf7e137e4da519a7c404188d821710 → 4.4.1-alpha-20250728153604-2e6981dc9f8987167d2d47f8058a7243c07d0b5b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/yoga-graphiql.es.js +23 -20
- package/dist/yoga-graphiql.umd.js +1 -1
- package/package.json +1 -1
package/dist/yoga-graphiql.es.js
CHANGED
|
@@ -56885,7 +56885,7 @@ function Gpt(i) {
|
|
|
56885
56885
|
return i.endpoint && console.warn(
|
|
56886
56886
|
"You are using a custom fetcher and an endpoint. The endpoint will be ignored."
|
|
56887
56887
|
), i.fetcher;
|
|
56888
|
-
const
|
|
56888
|
+
const h = n.getExecutorAsync(t, {
|
|
56889
56889
|
subscriptionsProtocol: iw.GRAPHQL_SSE,
|
|
56890
56890
|
subscriptionsEndpoint: t,
|
|
56891
56891
|
// necessary because graphql-sse in graphql-tools url-loader defaults to endpoint+'/stream'
|
|
@@ -56895,32 +56895,32 @@ function Gpt(i) {
|
|
|
56895
56895
|
inputValueDeprecation: !0,
|
|
56896
56896
|
...i,
|
|
56897
56897
|
headers: i.additionalHeaders || {},
|
|
56898
|
-
fetch: (...
|
|
56898
|
+
fetch: (...f) => globalThis.fetch(...f)
|
|
56899
56899
|
});
|
|
56900
|
-
return function(
|
|
56901
|
-
const
|
|
56902
|
-
Sd(
|
|
56903
|
-
|
|
56900
|
+
return function(p, b) {
|
|
56901
|
+
const y = qpt(
|
|
56902
|
+
Sd(p.query),
|
|
56903
|
+
p.operationName ?? void 0
|
|
56904
56904
|
);
|
|
56905
|
-
return
|
|
56905
|
+
return h({
|
|
56906
56906
|
document: (
|
|
56907
56907
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56908
|
-
|
|
56908
|
+
y
|
|
56909
56909
|
),
|
|
56910
|
-
operationName:
|
|
56911
|
-
variables:
|
|
56910
|
+
operationName: p.operationName ?? void 0,
|
|
56911
|
+
variables: p.variables,
|
|
56912
56912
|
extensions: {
|
|
56913
|
-
headers:
|
|
56913
|
+
headers: b?.headers
|
|
56914
56914
|
}
|
|
56915
56915
|
});
|
|
56916
56916
|
};
|
|
56917
56917
|
}, [n, t, i.fetcher]), r = bdt({
|
|
56918
56918
|
showAttribution: !0
|
|
56919
|
-
}), {
|
|
56920
|
-
query:
|
|
56921
|
-
headers:
|
|
56922
|
-
variables:
|
|
56923
|
-
...
|
|
56919
|
+
}), o = new URL(location.href), a = o.searchParams.get("query") || i.query || e, {
|
|
56920
|
+
query: l = a,
|
|
56921
|
+
headers: u,
|
|
56922
|
+
variables: c,
|
|
56923
|
+
...d
|
|
56924
56924
|
} = i;
|
|
56925
56925
|
return /* @__PURE__ */ H.jsx("div", { className: "graphiql-container", children: /* @__PURE__ */ H.jsx(
|
|
56926
56926
|
bw,
|
|
@@ -56931,10 +56931,13 @@ function Gpt(i) {
|
|
|
56931
56931
|
inputValueDeprecation: !0,
|
|
56932
56932
|
isHeadersEditorEnabled: !0,
|
|
56933
56933
|
defaultEditorToolsVisibility: !0,
|
|
56934
|
-
initialQuery:
|
|
56935
|
-
defaultHeaders:
|
|
56936
|
-
initialVariables:
|
|
56937
|
-
|
|
56934
|
+
initialQuery: l,
|
|
56935
|
+
defaultHeaders: u,
|
|
56936
|
+
initialVariables: c,
|
|
56937
|
+
onEditQuery: (h, f) => {
|
|
56938
|
+
o.searchParams.set("query", h), history.replaceState({}, "", o), i.onEditQuery?.(h, f);
|
|
56939
|
+
},
|
|
56940
|
+
...d,
|
|
56938
56941
|
fetcher: s,
|
|
56939
56942
|
children: /* @__PURE__ */ H.jsx(bw.Logo, { children: /* @__PURE__ */ H.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
56940
56943
|
typeof i?.logo == "string" ? (
|
|
@@ -513,7 +513,7 @@ Values:
|
|
|
513
513
|
#
|
|
514
514
|
# Auto Complete: Ctrl-Space (or just start typing)
|
|
515
515
|
#
|
|
516
|
-
`,t=new URL(i.endpoint??location.pathname,location.href).toString(),n=O.useMemo(()=>new cft,[]),s=O.useMemo(()=>{if(i.fetcher)return i.endpoint&&console.warn("You are using a custom fetcher and an endpoint. The endpoint will be ignored."),i.fetcher;const
|
|
516
|
+
`,t=new URL(i.endpoint??location.pathname,location.href).toString(),n=O.useMemo(()=>new cft,[]),s=O.useMemo(()=>{if(i.fetcher)return i.endpoint&&console.warn("You are using a custom fetcher and an endpoint. The endpoint will be ignored."),i.fetcher;const h=n.getExecutorAsync(t,{subscriptionsProtocol:bC.GRAPHQL_SSE,subscriptionsEndpoint:t,credentials:"same-origin",specifiedByUrl:!0,directiveIsRepeatable:!0,inputValueDeprecation:!0,...i,headers:i.additionalHeaders||{},fetch:(...f)=>globalThis.fetch(...f)});return function(p,b){const y=fft(zc(p.query),p.operationName??void 0);return h({document:y,operationName:p.operationName??void 0,variables:p.variables,extensions:{headers:b?.headers}})}},[n,t,i.fetcher]),r=Vut({showAttribution:!0}),o=new URL(location.href),a=o.searchParams.get("query")||i.query||e,{query:l=a,headers:u,variables:c,...d}=i;return H.jsx("div",{className:"graphiql-container",children:H.jsx(cC,{shouldPersistHeaders:!0,plugins:[r],schemaDescription:!0,inputValueDeprecation:!0,isHeadersEditorEnabled:!0,defaultEditorToolsVisibility:!0,initialQuery:l,defaultHeaders:u,initialVariables:c,onEditQuery:(h,f)=>{o.searchParams.set("query",h),history.replaceState({},"",o),i.onEditQuery?.(h,f)},...d,fetcher:s,children:H.jsx(cC.Logo,{children:H.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[typeof i?.logo=="string"?H.jsx("div",{style:{width:40,display:"flex"},dangerouslySetInnerHTML:{__html:i.logo}}):H.jsx("div",{style:{width:40,display:"flex"},children:i?.logo||H.jsx(hft,{})}),typeof i?.title=="string"?H.jsx("span",{dangerouslySetInnerHTML:{__html:i.title}}):H.jsx("span",{children:i?.title||H.jsxs(H.Fragment,{children:["Yoga Graph",H.jsx("em",{children:"i"}),"QL"]})})]})})})})}function gft(i,e){xhe.createRoot(i).render(H.jsx(pft,{...e}))}globalThis.React=Rn;var mft=Object.create,cX=Object.defineProperty,_ft=Object.getOwnPropertyDescriptor,bft=Object.getOwnPropertyNames,yft=Object.getPrototypeOf,vft=Object.prototype.hasOwnProperty,Oxe=i=>{throw TypeError(i)},Cft=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),dX=(i,e)=>{for(var t in e)cX(i,t,{get:e[t],enumerable:!0})},wft=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of bft(e))!vft.call(i,s)&&s!==t&&cX(i,s,{get:()=>e[s],enumerable:!(n=_ft(e,s))||n.enumerable});return i},Sft=(i,e,t)=>(t=i!=null?mft(yft(i)):{},wft(cX(t,"default",{value:i,enumerable:!0}),i)),xft=(i,e,t)=>e.has(i)||Oxe("Cannot "+t),Dft=(i,e,t)=>e.has(i)?Oxe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),EN=(i,e,t)=>(xft(i,e,"access private method"),t),Eft=Cft(i=>{Object.defineProperty(i,"__esModule",{value:!0});function e(){return new Proxy({},{get:()=>r=>r})}var t=/\r\n|[\n\r\u2028\u2029]/;function n(r,o,a){let l=Object.assign({column:0,line:-1},r.start),u=Object.assign({},l,r.end),{linesAbove:c=2,linesBelow:d=3}=a||{},h=l.line,f=l.column,p=u.line,b=u.column,y=Math.max(h-(c+1),0),S=Math.min(o.length,p+d);h===-1&&(y=0),p===-1&&(S=o.length);let x=p-h,E={};if(x)for(let k=0;k<=x;k++){let A=k+h;if(!f)E[A]=!0;else if(k===0){let I=o[A-1].length;E[A]=[f,I-f+1]}else if(k===x)E[A]=[0,b];else{let I=o[A-k].length;E[A]=[0,I]}}else f===b?f?E[h]=[f,0]:E[h]=!0:E[h]=[f,b-f];return{start:y,end:S,markerLines:E}}function s(r,o,a={}){let l=e(),u=r.split(t),{start:c,end:d,markerLines:h}=n(o,u,a),f=o.start&&typeof o.start.column=="number",p=String(d).length,b=r.split(t,d).slice(c,d).map((y,S)=>{let x=c+1+S,E=` ${` ${x}`.slice(-p)} |`,k=h[x],A=!h[x+1];if(k){let I="";if(Array.isArray(k)){let P=y.slice(0,Math.max(k[0]-1,0)).replace(/[^\t]/g," "),B=k[1]||1;I=[`
|
|
517
517
|
`,l.gutter(E.replace(/\d/g," "))," ",P,l.marker("^").repeat(B)].join(""),A&&a.message&&(I+=" "+l.message(a.message))}return[l.marker(">"),l.gutter(E),y.length>0?` ${y}`:"",I].join("")}else return` ${l.gutter(E)}${y.length>0?` ${y}`:""}`}).join(`
|
|
518
518
|
`);return a.message&&!f&&(b=`${" ".repeat(p+1)}${a.message}
|
|
519
519
|
${b}`),b}i.codeFrameColumns=s}),Fxe={};dX(Fxe,{__debug:()=>JDe,check:()=>QDe,doc:()=>OX,format:()=>UX,formatWithCursor:()=>$X,getSupportInfo:()=>ZDe,util:()=>FX,version:()=>YDe});var Tft=(i,e,t,n)=>{if(!(i&&e==null))return e.replaceAll?e.replaceAll(t,n):t.global?e.replace(t,n):e.split(t).join(n)},I5=Tft,kft=class{diff(e,t,n={}){let s;typeof n=="function"?(s=n,n={}):"callback"in n&&(s=n.callback);let r=this.castInput(e,n),o=this.castInput(t,n),a=this.removeEmpty(this.tokenize(r,n)),l=this.removeEmpty(this.tokenize(o,n));return this.diffWithOptionsObj(a,l,n,s)}diffWithOptionsObj(e,t,n,s){var r;let o=x=>{if(x=this.postProcess(x,n),s){setTimeout(function(){s(x)},0);return}else return x},a=t.length,l=e.length,u=1,c=a+l;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let d=(r=n.timeout)!==null&&r!==void 0?r:1/0,h=Date.now()+d,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0,n);if(f[0].oldPos+1>=l&&p+1>=a)return o(this.buildValues(f[0].lastComponent,t,e));let b=-1/0,y=1/0,S=()=>{for(let x=Math.max(b,-u);x<=Math.min(y,u);x+=2){let E,k=f[x-1],A=f[x+1];k&&(f[x-1]=void 0);let I=!1;if(A){let B=A.oldPos-x;I=A&&0<=B&&B<a}let P=k&&k.oldPos+1<l;if(!I&&!P){f[x]=void 0;continue}if(!P||I&&k.oldPos<A.oldPos?E=this.addToPath(A,!0,!1,0,n):E=this.addToPath(k,!1,!0,1,n),p=this.extractCommon(E,t,e,x,n),E.oldPos+1>=l&&p+1>=a)return o(this.buildValues(E.lastComponent,t,e))||!0;f[x]=E,E.oldPos+1>=l&&(y=Math.min(y,x-1)),p+1>=a&&(b=Math.max(b,x+1))}u++};if(s)(function x(){setTimeout(function(){if(u>c||Date.now()>h)return s(void 0);S()||x()},0)})();else for(;u<=c&&Date.now()<=h;){let x=S();if(x)return x}}addToPath(e,t,n,s,r){let o=e.lastComponent;return o&&!r.oneChangePerToken&&o.added===t&&o.removed===n?{oldPos:e.oldPos+s,lastComponent:{count:o.count+1,added:t,removed:n,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+s,lastComponent:{count:1,added:t,removed:n,previousComponent:o}}}extractCommon(e,t,n,s,r){let o=t.length,a=n.length,l=e.oldPos,u=l-s,c=0;for(;u+1<o&&l+1<a&&this.equals(n[l+1],t[u+1],r);)u++,l++,c++,r.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return c&&!r.oneChangePerToken&&(e.lastComponent={count:c,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,u}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let s=[],r;for(;e;)s.push(e),r=e.previousComponent,delete e.previousComponent,e=r;s.reverse();let o=s.length,a=0,l=0,u=0;for(;a<o;a++){let c=s[a];if(c.removed)c.value=this.join(n.slice(u,u+c.count)),u+=c.count;else{if(!c.added&&this.useLongestToken){let d=t.slice(l,l+c.count);d=d.map(function(h,f){let p=n[u+f];return p.length>h.length?p:h}),c.value=this.join(d)}else c.value=this.join(t.slice(l,l+c.count));l+=c.count,c.added||(u+=c.count)}}return s}},Lft=class extends kft{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},Aft=new Lft;function Nft(i,e,t){return Aft.diff(i,e,t)}function Ift(i){let e=i.indexOf("\r");return e!==-1?i.charAt(e+1)===`
|
package/package.json
CHANGED