stepzen-graphiql 2.1.0 → 2.1.3-experimental.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +5 -0
  2. package/dist/babel-D4jPkB8I.js +15 -0
  3. package/dist/babel-JpECBl9w.mjs +7255 -0
  4. package/dist/components/ExplorerPage/ExplorerPage.d.ts +1 -1
  5. package/dist/components/ExplorerPage/GraphiQLInterface.d.ts +15 -6
  6. package/dist/components/ExplorerPage/Snippets.d.ts +0 -2
  7. package/dist/components/ExplorerPage/clearResponse.d.ts +1 -1
  8. package/dist/components/ExplorerPage/clearTooltip.d.ts +1 -1
  9. package/dist/estree-C0Hb5Q7V.mjs +4528 -0
  10. package/dist/estree-U7n5DgHH.js +44 -0
  11. package/dist/graphql-BTSjQZiC.js +28 -0
  12. package/dist/graphql-CBsByfto.js +28 -0
  13. package/dist/graphql-DDJE6tIl.mjs +157 -0
  14. package/dist/graphql-DrfUc9jr.mjs +1256 -0
  15. package/dist/graphql-DrfV554J.js +6 -0
  16. package/dist/graphql-QzAQRYwl.mjs +1221 -0
  17. package/dist/graphqlMode-DN1ezrYh.js +1 -0
  18. package/dist/graphqlMode-vV8mnLBW.mjs +262 -0
  19. package/dist/index-CjC6wsAG.js +1 -0
  20. package/dist/index-RniHQi68.mjs +84805 -0
  21. package/dist/index-gvW0eRXD.js +687 -0
  22. package/dist/index-tHknWeFg.mjs +295 -0
  23. package/dist/index.cjs.js +1 -1
  24. package/dist/index.es.js +1 -1
  25. package/dist/jsonMode-BW-tqoSY.js +15 -0
  26. package/dist/jsonMode-Cj0cONq6.mjs +2002 -0
  27. package/dist/lib/graphiql-helpers.d.ts +2 -2
  28. package/dist/lite-Dpvo4tIS.js +1 -0
  29. package/dist/lite-hj39DC-n.mjs +135 -0
  30. package/dist/monaco-editor-C-pj7hSk.mjs +17 -0
  31. package/dist/monaco-editor-CBZFMjO6.js +1 -0
  32. package/dist/mouseTarget-C-J1vBNL.mjs +9353 -0
  33. package/dist/mouseTarget-S3azYj9_.js +9 -0
  34. package/dist/standalone-BhI0QomE.mjs +2458 -0
  35. package/dist/standalone-YWSF5RH2.js +29 -0
  36. package/dist/style.css +2 -2
  37. package/dist/style2.css +1 -0
  38. package/dist/toggleHighContrast-BK2acAo4.mjs +97805 -0
  39. package/dist/toggleHighContrast-MyO5wNxT.js +726 -0
  40. package/package.json +13 -15
  41. package/dist/Range-CPFFy5pj.mjs +0 -26
  42. package/dist/Range-CUfOrqgY.js +0 -1
  43. package/dist/SchemaReference-DNGK8Gti.mjs +0 -146
  44. package/dist/SchemaReference-PZPPI4-g.js +0 -1
  45. package/dist/brace-fold-DFRMFuzG.mjs +0 -122
  46. package/dist/brace-fold-QYFeMqi4.js +0 -1
  47. package/dist/closebrackets-5W81jIxx.js +0 -2
  48. package/dist/closebrackets-BJdKNrct.mjs +0 -165
  49. package/dist/codemirror-CK47QajN.mjs +0 -27
  50. package/dist/codemirror-DMBo1i5w.js +0 -24
  51. package/dist/codemirror-DgPcZxSc.mjs +0 -6121
  52. package/dist/codemirror-P5arRD-4.js +0 -1
  53. package/dist/comment-DZX4WUX2.js +0 -2
  54. package/dist/comment-DaZ9yeFw.mjs +0 -150
  55. package/dist/dialog-BWHlvTdM.js +0 -1
  56. package/dist/dialog-BvB91RPq.mjs +0 -26
  57. package/dist/dialog-Ci1bnuc2.mjs +0 -74
  58. package/dist/dialog-Dh2DOTOu.js +0 -1
  59. package/dist/foldgutter-CEPGXQXV.mjs +0 -238
  60. package/dist/foldgutter-lfb5vdue.js +0 -1
  61. package/dist/forEachState-DA54msa8.mjs +0 -11
  62. package/dist/forEachState-DY_pA9Bd.js +0 -1
  63. package/dist/hint-BImUj9vL.mjs +0 -24
  64. package/dist/hint-BYh7bCzG.js +0 -1
  65. package/dist/hint-CeNacopx.mjs +0 -123
  66. package/dist/hint-Cqs-Eq99.js +0 -1
  67. package/dist/index-BXTilrNr.mjs +0 -11
  68. package/dist/index-BqePscbb.js +0 -1
  69. package/dist/index-Of0v8HXf.js +0 -650
  70. package/dist/index-c_h-B3RW.mjs +0 -89430
  71. package/dist/info-DKGfeFeR.mjs +0 -99
  72. package/dist/info-addon-0QldEyjg.js +0 -1
  73. package/dist/info-addon-BQBJGmtN.mjs +0 -66
  74. package/dist/info-euxfaXDv.js +0 -1
  75. package/dist/javascript-BMRweX7z.js +0 -1
  76. package/dist/javascript-CEIhlHWT.mjs +0 -26
  77. package/dist/javascript-RO_jaPiE.mjs +0 -707
  78. package/dist/javascript-poxRzxcy.js +0 -1
  79. package/dist/jsx-BY-uBax7.js +0 -1
  80. package/dist/jsx-CZtHOvZL.mjs +0 -414
  81. package/dist/jump-Bn-VPPJQ.js +0 -1
  82. package/dist/jump-BrK8-pOa.mjs +0 -85
  83. package/dist/jump-to-line-V4vHDeSQ.mjs +0 -61
  84. package/dist/jump-to-line-Zpc7tkYy.js +0 -1
  85. package/dist/lint-BBDtrEaL.js +0 -1
  86. package/dist/lint-BEn4QK3F.mjs +0 -216
  87. package/dist/lint-BgrfL8k7.js +0 -1
  88. package/dist/lint-CiQwkfWf.mjs +0 -112
  89. package/dist/lint-DxY_4HRh.js +0 -6
  90. package/dist/lint-naD3ldhf.mjs +0 -272
  91. package/dist/matchbrackets-BB4g2Y6d.mjs +0 -87
  92. package/dist/matchbrackets-DPv_MB7c.js +0 -1
  93. package/dist/matchbrackets-DhN7zJoS.js +0 -1
  94. package/dist/matchbrackets-eKECiv9B.mjs +0 -26
  95. package/dist/mode-CgGO246j.js +0 -1
  96. package/dist/mode-CwlRWrPi.mjs +0 -73
  97. package/dist/mode-DyP1DXNa.js +0 -1
  98. package/dist/mode-indent-9VnFlqY-.mjs +0 -8
  99. package/dist/mode-indent-m3TP74Ia.js +0 -1
  100. package/dist/mode-kdpxZ9Hq.mjs +0 -25
  101. package/dist/mode-r_2HfIrS.js +0 -1
  102. package/dist/mode-xgi1fEzL.mjs +0 -64
  103. package/dist/search-BuLFIkN5.mjs +0 -268
  104. package/dist/search-CclAH4eV.js +0 -2
  105. package/dist/searchcursor-B9F32jvl.mjs +0 -26
  106. package/dist/searchcursor-CV26OekK.js +0 -1
  107. package/dist/searchcursor-DHtNMOPb.mjs +0 -239
  108. package/dist/searchcursor-eGwb3e2h.js +0 -7
  109. package/dist/show-hint-BfWoiGzQ.mjs +0 -357
  110. package/dist/show-hint-CQ_VjC6w.js +0 -1
  111. package/dist/sublime-C6Rg9CL1.mjs +0 -563
  112. package/dist/sublime-DFk-sDtd.js +0 -6
@@ -1 +0,0 @@
1
- "use strict";const V=require("./codemirror-P5arRD-4.js"),m=require("./index-Of0v8HXf.js");function q(e){f=e,w=e.length,i=c=g=-1,s(),x();const n=j();return d("EOF"),n}let f,w,i,c,g,r,u;function j(){const e=i,n=[];if(d("{"),!E("}")){do n.push(I());while(E(","));d("}")}return{kind:"Object",start:e,end:g,members:n}}function I(){const e=i,n=u==="String"?B():null;d("String"),d(":");const t=L();return{kind:"Member",start:e,end:g,key:n,value:t}}function C(){const e=i,n=[];if(d("["),!E("]")){do n.push(L());while(E(","));d("]")}return{kind:"Array",start:e,end:g,values:n}}function L(){switch(u){case"[":return C();case"{":return j();case"String":case"Number":case"Boolean":case"Null":const e=B();return x(),e}d("Value")}function B(){return{kind:u,start:i,end:c,value:JSON.parse(f.slice(i,c))}}function d(e){if(u===e){x();return}let n;if(u==="EOF")n="[end of file]";else if(c-i>1)n="`"+f.slice(i,c)+"`";else{const t=f.slice(i).match(/^.+?\b/);n="`"+(t?t[0]:f[i])+"`"}throw b(`Expected ${e} but found ${n}.`)}class G extends Error{constructor(n,t){super(n),this.position=t}}function b(e){return new G(e,{start:i,end:c})}function E(e){if(u===e)return x(),!0}function s(){return c<w&&(c++,r=c===w?0:f.charCodeAt(c)),r}function x(){for(g=c;r===9||r===10||r===13||r===32;)s();if(r===0){u="EOF";return}switch(i=c,r){case 34:return u="String",M();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return u="Number",v();case 102:if(f.slice(i,i+5)!=="false")break;c+=4,s(),u="Boolean";return;case 110:if(f.slice(i,i+4)!=="null")break;c+=3,s(),u="Null";return;case 116:if(f.slice(i,i+4)!=="true")break;c+=3,s(),u="Boolean";return}u=f[i],s()}function M(){for(s();r!==34&&r>31;)if(r===92)switch(r=s(),r){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:s();break;case 117:s(),N(),N(),N(),N();break;default:throw b("Bad character escape sequence.")}else{if(c===w)throw b("Unterminated string.");s()}if(r===34){s();return}throw b("Unterminated string.")}function N(){if(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102)return s();throw b("Expected hexadecimal digit.")}function v(){r===45&&s(),r===48?s():O(),r===46&&(s(),O()),(r===69||r===101)&&(r=s(),(r===43||r===45)&&s(),O())}function O(){if(r<48||r>57)throw b("Expected decimal digit.");do s();while(r>=48&&r<=57)}V.CodeMirror.registerHelper("lint","graphql-variables",(e,n,t)=>{if(!e)return[];let l;try{l=q(e)}catch(a){if(a instanceof G)return[$(t,a.position,a.message)];throw a}const{variableToType:o}=n;return o?D(t,o,l):[]});function D(e,n,t){var l;const o=[];for(const a of t.members)if(a){const p=(l=a.key)===null||l===void 0?void 0:l.value,h=n[p];if(h)for(const[y,Q]of k(h,a.value))o.push($(e,y,Q));else o.push($(e,a.key,`Variable "$${p}" does not appear in any GraphQL query.`))}return o}function k(e,n){if(!e||!n)return[];if(e instanceof m.GraphQLNonNull)return n.kind==="Null"?[[n,`Type "${e}" is non-nullable and cannot be null.`]]:k(e.ofType,n);if(n.kind==="Null")return[];if(e instanceof m.GraphQLList){const t=e.ofType;if(n.kind==="Array"){const l=n.values||[];return F(l,o=>k(t,o))}return k(t,n)}if(e instanceof m.GraphQLInputObjectType){if(n.kind!=="Object")return[[n,`Type "${e}" must be an Object.`]];const t=Object.create(null),l=F(n.members,o=>{var a;const p=(a=o==null?void 0:o.key)===null||a===void 0?void 0:a.value;t[p]=!0;const h=e.getFields()[p];if(!h)return[[o.key,`Type "${e}" does not have a field "${p}".`]];const y=h?h.type:void 0;return k(y,o.value)});for(const o of Object.keys(e.getFields())){const a=e.getFields()[o];!t[o]&&a.type instanceof m.GraphQLNonNull&&!a.defaultValue&&l.push([n,`Object of type "${e}" is missing required field "${o}".`])}return l}return e.name==="Boolean"&&n.kind!=="Boolean"||e.name==="String"&&n.kind!=="String"||e.name==="ID"&&n.kind!=="Number"&&n.kind!=="String"||e.name==="Float"&&n.kind!=="Number"||e.name==="Int"&&(n.kind!=="Number"||(n.value|0)!==n.value)?[[n,`Expected value of type "${e}".`]]:(e instanceof m.GraphQLEnumType||e instanceof m.GraphQLScalarType)&&(n.kind!=="String"&&n.kind!=="Number"&&n.kind!=="Boolean"&&n.kind!=="Null"||H(e.parseValue(n.value)))?[[n,`Expected value of type "${e}".`]]:[]}function $(e,n,t){return{message:t,severity:"error",type:"validation",from:e.posFromIndex(n.start),to:e.posFromIndex(n.end)}}function H(e){return e==null||e!==e}function F(e,n){return Array.prototype.concat.apply([],e.map(n))}
@@ -1,216 +0,0 @@
1
- import { g as P } from "./index-c_h-B3RW.mjs";
2
- import { r as W } from "./codemirror-DgPcZxSc.mjs";
3
- function U(v, m) {
4
- for (var l = 0; l < m.length; l++) {
5
- const f = m[l];
6
- if (typeof f != "string" && !Array.isArray(f)) {
7
- for (const p in f)
8
- if (p !== "default" && !(p in v)) {
9
- const g = Object.getOwnPropertyDescriptor(f, p);
10
- g && Object.defineProperty(v, p, g.get ? g : {
11
- enumerable: !0,
12
- get: () => f[p]
13
- });
14
- }
15
- }
16
- }
17
- return Object.freeze(Object.defineProperty(v, Symbol.toStringTag, { value: "Module" }));
18
- }
19
- var x = { exports: {} }, E;
20
- function q() {
21
- return E || (E = 1, function(v, m) {
22
- (function(l) {
23
- l(W());
24
- })(function(l) {
25
- var f = "CodeMirror-lint-markers", p = "CodeMirror-lint-line-";
26
- function g(t, e, r) {
27
- var n = document.createElement("div");
28
- n.className = "CodeMirror-lint-tooltip cm-s-" + t.options.theme, n.appendChild(r.cloneNode(!0)), t.state.lint.options.selfContain ? t.getWrapperElement().appendChild(n) : document.body.appendChild(n);
29
- function i(o) {
30
- if (!n.parentNode) return l.off(document, "mousemove", i);
31
- var a = Math.max(0, o.clientY - n.offsetHeight - 5), s = Math.max(0, Math.min(o.clientX + 5, n.ownerDocument.defaultView.innerWidth - n.offsetWidth));
32
- n.style.top = a + "px", n.style.left = s + "px";
33
- }
34
- return l.on(document, "mousemove", i), i(e), n.style.opacity != null && (n.style.opacity = 1), n;
35
- }
36
- function L(t) {
37
- t.parentNode && t.parentNode.removeChild(t);
38
- }
39
- function b(t) {
40
- t.parentNode && (t.style.opacity == null && L(t), t.style.opacity = 0, setTimeout(function() {
41
- L(t);
42
- }, 600));
43
- }
44
- function O(t, e, r, n) {
45
- var i = g(t, e, r);
46
- function o() {
47
- l.off(n, "mouseout", o), i && (b(i), i = null);
48
- }
49
- var a = setInterval(function() {
50
- if (i) for (var s = n; ; s = s.parentNode) {
51
- if (s && s.nodeType == 11 && (s = s.host), s == document.body) return;
52
- if (!s) {
53
- o();
54
- break;
55
- }
56
- }
57
- if (!i) return clearInterval(a);
58
- }, 400);
59
- l.on(n, "mouseout", o);
60
- }
61
- function _(t, e, r) {
62
- this.marked = [], e instanceof Function && (e = { getAnnotations: e }), (!e || e === !0) && (e = {}), this.options = {}, this.linterOptions = e.options || {};
63
- for (var n in y) this.options[n] = y[n];
64
- for (var n in e)
65
- y.hasOwnProperty(n) ? e[n] != null && (this.options[n] = e[n]) : e.options || (this.linterOptions[n] = e[n]);
66
- this.timeout = null, this.hasGutter = r, this.onMouseOver = function(i) {
67
- H(t, i);
68
- }, this.waitingFor = 0;
69
- }
70
- var y = {
71
- highlightLines: !1,
72
- tooltips: !0,
73
- delay: 500,
74
- lintOnChange: !0,
75
- getAnnotations: null,
76
- async: !1,
77
- selfContain: null,
78
- formatAnnotation: null,
79
- onUpdateLinting: null
80
- };
81
- function T(t) {
82
- var e = t.state.lint;
83
- e.hasGutter && t.clearGutter(f), e.options.highlightLines && A(t);
84
- for (var r = 0; r < e.marked.length; ++r)
85
- e.marked[r].clear();
86
- e.marked.length = 0;
87
- }
88
- function A(t) {
89
- t.eachLine(function(e) {
90
- var r = e.wrapClass && /\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);
91
- r && t.removeLineClass(e, "wrap", r[0]);
92
- });
93
- }
94
- function F(t, e, r, n, i) {
95
- var o = document.createElement("div"), a = o;
96
- return o.className = "CodeMirror-lint-marker CodeMirror-lint-marker-" + r, n && (a = o.appendChild(document.createElement("div")), a.className = "CodeMirror-lint-marker CodeMirror-lint-marker-multiple"), i != !1 && l.on(a, "mouseover", function(s) {
97
- O(t, s, e, a);
98
- }), o;
99
- }
100
- function D(t, e) {
101
- return t == "error" ? t : e;
102
- }
103
- function G(t) {
104
- for (var e = [], r = 0; r < t.length; ++r) {
105
- var n = t[r], i = n.from.line;
106
- (e[i] || (e[i] = [])).push(n);
107
- }
108
- return e;
109
- }
110
- function M(t) {
111
- var e = t.severity;
112
- e || (e = "error");
113
- var r = document.createElement("div");
114
- return r.className = "CodeMirror-lint-message CodeMirror-lint-message-" + e, typeof t.messageHTML < "u" ? r.innerHTML = t.messageHTML : r.appendChild(document.createTextNode(t.message)), r;
115
- }
116
- function I(t, e) {
117
- var r = t.state.lint, n = ++r.waitingFor;
118
- function i() {
119
- n = -1, t.off("change", i);
120
- }
121
- t.on("change", i), e(t.getValue(), function(o, a) {
122
- t.off("change", i), r.waitingFor == n && (a && o instanceof l && (o = a), t.operation(function() {
123
- k(t, o);
124
- }));
125
- }, r.linterOptions, t);
126
- }
127
- function C(t) {
128
- var e = t.state.lint;
129
- if (e) {
130
- var r = e.options, n = r.getAnnotations || t.getHelper(l.Pos(0, 0), "lint");
131
- if (n)
132
- if (r.async || n.async)
133
- I(t, n);
134
- else {
135
- var i = n(t.getValue(), e.linterOptions, t);
136
- if (!i) return;
137
- i.then ? i.then(function(o) {
138
- t.operation(function() {
139
- k(t, o);
140
- });
141
- }) : t.operation(function() {
142
- k(t, i);
143
- });
144
- }
145
- }
146
- }
147
- function k(t, e) {
148
- var r = t.state.lint;
149
- if (r) {
150
- var n = r.options;
151
- T(t);
152
- for (var i = G(e), o = 0; o < i.length; ++o) {
153
- var a = i[o];
154
- if (a) {
155
- for (var s = null, d = r.hasGutter && document.createDocumentFragment(), h = 0; h < a.length; ++h) {
156
- var u = a[h], c = u.severity;
157
- c || (c = "error"), s = D(s, c), n.formatAnnotation && (u = n.formatAnnotation(u)), r.hasGutter && d.appendChild(M(u)), u.to && r.marked.push(t.markText(u.from, u.to, {
158
- className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + c,
159
- __annotation: u
160
- }));
161
- }
162
- r.hasGutter && t.setGutterMarker(o, f, F(
163
- t,
164
- d,
165
- s,
166
- a.length > 1,
167
- n.tooltips
168
- )), n.highlightLines && t.addLineClass(o, "wrap", p + s);
169
- }
170
- }
171
- n.onUpdateLinting && n.onUpdateLinting(e, i, t);
172
- }
173
- }
174
- function w(t) {
175
- var e = t.state.lint;
176
- e && (clearTimeout(e.timeout), e.timeout = setTimeout(function() {
177
- C(t);
178
- }, e.options.delay));
179
- }
180
- function j(t, e, r) {
181
- for (var n = r.target || r.srcElement, i = document.createDocumentFragment(), o = 0; o < e.length; o++) {
182
- var a = e[o];
183
- i.appendChild(M(a));
184
- }
185
- O(t, r, i, n);
186
- }
187
- function H(t, e) {
188
- var r = e.target || e.srcElement;
189
- if (/\bCodeMirror-lint-mark-/.test(r.className)) {
190
- for (var n = r.getBoundingClientRect(), i = (n.left + n.right) / 2, o = (n.top + n.bottom) / 2, a = t.findMarksAt(t.coordsChar({ left: i, top: o }, "client")), s = [], d = 0; d < a.length; ++d) {
191
- var h = a[d].__annotation;
192
- h && s.push(h);
193
- }
194
- s.length && j(t, s, e);
195
- }
196
- }
197
- l.defineOption("lint", !1, function(t, e, r) {
198
- if (r && r != l.Init && (T(t), t.state.lint.options.lintOnChange !== !1 && t.off("change", w), l.off(t.getWrapperElement(), "mouseover", t.state.lint.onMouseOver), clearTimeout(t.state.lint.timeout), delete t.state.lint), e) {
199
- for (var n = t.getOption("gutters"), i = !1, o = 0; o < n.length; ++o) n[o] == f && (i = !0);
200
- var a = t.state.lint = new _(t, e, i);
201
- a.options.lintOnChange && t.on("change", w), a.options.tooltips != !1 && a.options.tooltips != "gutter" && l.on(t.getWrapperElement(), "mouseover", a.onMouseOver), C(t);
202
- }
203
- }), l.defineExtension("performLint", function() {
204
- C(this);
205
- });
206
- });
207
- }()), x.exports;
208
- }
209
- var N = q();
210
- const R = /* @__PURE__ */ P(N), $ = /* @__PURE__ */ U({
211
- __proto__: null,
212
- default: R
213
- }, [N]);
214
- export {
215
- $ as l
216
- };
@@ -1 +0,0 @@
1
- "use strict";const H=require("./index-Of0v8HXf.js"),P=require("./codemirror-DMBo1i5w.js");function W(v,m){for(var l=0;l<m.length;l++){const f=m[l];if(typeof f!="string"&&!Array.isArray(f)){for(const p in f)if(p!=="default"&&!(p in v)){const g=Object.getOwnPropertyDescriptor(f,p);g&&Object.defineProperty(v,p,g.get?g:{enumerable:!0,get:()=>f[p]})}}}return Object.freeze(Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}))}var x={exports:{}},E;function U(){return E||(E=1,function(v,m){(function(l){l(P.requireCodemirror())})(function(l){var f="CodeMirror-lint-markers",p="CodeMirror-lint-line-";function g(t,e,r){var n=document.createElement("div");n.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,n.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(n):document.body.appendChild(n);function i(o){if(!n.parentNode)return l.off(document,"mousemove",i);var a=Math.max(0,o.clientY-n.offsetHeight-5),s=Math.max(0,Math.min(o.clientX+5,n.ownerDocument.defaultView.innerWidth-n.offsetWidth));n.style.top=a+"px",n.style.left=s+"px"}return l.on(document,"mousemove",i),i(e),n.style.opacity!=null&&(n.style.opacity=1),n}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function b(t){t.parentNode&&(t.style.opacity==null&&L(t),t.style.opacity=0,setTimeout(function(){L(t)},600))}function O(t,e,r,n){var i=g(t,e,r);function o(){l.off(n,"mouseout",o),i&&(b(i),i=null)}var a=setInterval(function(){if(i)for(var s=n;;s=s.parentNode){if(s&&s.nodeType==11&&(s=s.host),s==document.body)return;if(!s){o();break}}if(!i)return clearInterval(a)},400);l.on(n,"mouseout",o)}function _(t,e,r){this.marked=[],e instanceof Function&&(e={getAnnotations:e}),(!e||e===!0)&&(e={}),this.options={},this.linterOptions=e.options||{};for(var n in y)this.options[n]=y[n];for(var n in e)y.hasOwnProperty(n)?e[n]!=null&&(this.options[n]=e[n]):e.options||(this.linterOptions[n]=e[n]);this.timeout=null,this.hasGutter=r,this.onMouseOver=function(i){q(t,i)},this.waitingFor=0}var y={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function T(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(f),e.options.highlightLines&&A(t);for(var r=0;r<e.marked.length;++r)e.marked[r].clear();e.marked.length=0}function A(t){t.eachLine(function(e){var r=e.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);r&&t.removeLineClass(e,"wrap",r[0])})}function F(t,e,r,n,i){var o=document.createElement("div"),a=o;return o.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,n&&(a=o.appendChild(document.createElement("div")),a.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),i!=!1&&l.on(a,"mouseover",function(s){O(t,s,e,a)}),o}function D(t,e){return t=="error"?t:e}function G(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=n.from.line;(e[i]||(e[i]=[])).push(n)}return e}function M(t){var e=t.severity;e||(e="error");var r=document.createElement("div");return r.className="CodeMirror-lint-message CodeMirror-lint-message-"+e,typeof t.messageHTML<"u"?r.innerHTML=t.messageHTML:r.appendChild(document.createTextNode(t.message)),r}function I(t,e){var r=t.state.lint,n=++r.waitingFor;function i(){n=-1,t.off("change",i)}t.on("change",i),e(t.getValue(),function(o,a){t.off("change",i),r.waitingFor==n&&(a&&o instanceof l&&(o=a),t.operation(function(){k(t,o)}))},r.linterOptions,t)}function C(t){var e=t.state.lint;if(e){var r=e.options,n=r.getAnnotations||t.getHelper(l.Pos(0,0),"lint");if(n)if(r.async||n.async)I(t,n);else{var i=n(t.getValue(),e.linterOptions,t);if(!i)return;i.then?i.then(function(o){t.operation(function(){k(t,o)})}):t.operation(function(){k(t,i)})}}}function k(t,e){var r=t.state.lint;if(r){var n=r.options;T(t);for(var i=G(e),o=0;o<i.length;++o){var a=i[o];if(a){for(var s=null,d=r.hasGutter&&document.createDocumentFragment(),h=0;h<a.length;++h){var u=a[h],c=u.severity;c||(c="error"),s=D(s,c),n.formatAnnotation&&(u=n.formatAnnotation(u)),r.hasGutter&&d.appendChild(M(u)),u.to&&r.marked.push(t.markText(u.from,u.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+c,__annotation:u}))}r.hasGutter&&t.setGutterMarker(o,f,F(t,d,s,a.length>1,n.tooltips)),n.highlightLines&&t.addLineClass(o,"wrap",p+s)}}n.onUpdateLinting&&n.onUpdateLinting(e,i,t)}}function w(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){C(t)},e.options.delay))}function j(t,e,r){for(var n=r.target||r.srcElement,i=document.createDocumentFragment(),o=0;o<e.length;o++){var a=e[o];i.appendChild(M(a))}O(t,r,i,n)}function q(t,e){var r=e.target||e.srcElement;if(/\bCodeMirror-lint-mark-/.test(r.className)){for(var n=r.getBoundingClientRect(),i=(n.left+n.right)/2,o=(n.top+n.bottom)/2,a=t.findMarksAt(t.coordsChar({left:i,top:o},"client")),s=[],d=0;d<a.length;++d){var h=a[d].__annotation;h&&s.push(h)}s.length&&j(t,s,e)}}l.defineOption("lint",!1,function(t,e,r){if(r&&r!=l.Init&&(T(t),t.state.lint.options.lintOnChange!==!1&&t.off("change",w),l.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),e){for(var n=t.getOption("gutters"),i=!1,o=0;o<n.length;++o)n[o]==f&&(i=!0);var a=t.state.lint=new _(t,e,i);a.options.lintOnChange&&t.on("change",w),a.options.tooltips!=!1&&a.options.tooltips!="gutter"&&l.on(t.getWrapperElement(),"mouseover",a.onMouseOver),C(t)}}),l.defineExtension("performLint",function(){C(this)})})}()),x.exports}var N=U();const R=H.getDefaultExportFromCjs(N),V=W({__proto__:null,default:R},[N]);exports.lint=V;
@@ -1,112 +0,0 @@
1
- import { C as g } from "./codemirror-CK47QajN.mjs";
2
- import { x as w, N as C, E as S, y as E, K as D, z as Q, A as b, B as L, o as N, D as G, F as P } from "./index-c_h-B3RW.mjs";
3
- import { R, P as d } from "./Range-CPFFy5pj.mjs";
4
- function T(t, a, s, c, o) {
5
- const n = w.filter((e) => !(e === C || e === S));
6
- return s && Array.prototype.push.apply(n, s), E(t, a, n).filter((e) => {
7
- if (e.message.includes("Unknown directive") && e.nodes) {
8
- const r = e.nodes[0];
9
- if (r && r.kind === D.DIRECTIVE) {
10
- const l = r.name.value;
11
- if (l === "arguments" || l === "argumentDefinitions")
12
- return !1;
13
- }
14
- }
15
- return !0;
16
- });
17
- }
18
- const m = {
19
- Error: "Error",
20
- Warning: "Warning"
21
- }, h = {
22
- [m.Error]: 1,
23
- [m.Warning]: 2
24
- }, f = (t, a) => {
25
- if (!t)
26
- throw new Error(a);
27
- };
28
- function I(t, a = null, s, c, o) {
29
- var n, i;
30
- let e = null, r = "";
31
- o && (r = typeof o == "string" ? o : o.reduce((u, p) => u + Q(p) + `
32
-
33
- `, ""));
34
- const l = r ? `${t}
35
-
36
- ${r}` : t;
37
- try {
38
- e = b(l);
39
- } catch (u) {
40
- if (u instanceof L) {
41
- const p = k((i = (n = u.locations) === null || n === void 0 ? void 0 : n[0]) !== null && i !== void 0 ? i : { line: 0 }, l);
42
- return [
43
- {
44
- severity: h.Error,
45
- message: u.message,
46
- source: "GraphQL: Syntax",
47
- range: p
48
- }
49
- ];
50
- }
51
- throw u;
52
- }
53
- return V(e, a, s);
54
- }
55
- function V(t, a = null, s, c) {
56
- if (!a)
57
- return [];
58
- const o = T(a, t, s).flatMap((i) => v(i, h.Error, "Validation")), n = E(a, t, [
59
- P
60
- ]).flatMap((i) => v(i, h.Warning, "Deprecation"));
61
- return o.concat(n);
62
- }
63
- function v(t, a, s) {
64
- if (!t.nodes)
65
- return [];
66
- const c = [];
67
- for (const [o, n] of t.nodes.entries()) {
68
- const i = n.kind !== "Variable" && "name" in n && n.name !== void 0 ? n.name : "variable" in n && n.variable !== void 0 ? n.variable : n;
69
- if (i) {
70
- f(t.locations, "GraphQL validation error requires locations.");
71
- const e = t.locations[o], r = x(i), l = e.column + (r.end - r.start);
72
- c.push({
73
- source: `GraphQL: ${s}`,
74
- message: t.message,
75
- severity: a,
76
- range: new R(new d(e.line - 1, e.column - 1), new d(e.line - 1, l))
77
- });
78
- }
79
- }
80
- return c;
81
- }
82
- function k(t, a) {
83
- const s = N(), c = s.startState(), o = a.split(`
84
- `);
85
- f(o.length >= t.line, "Query text must have more lines than where the error happened");
86
- let n = null;
87
- for (let l = 0; l < t.line; l++)
88
- for (n = new G(o[l]); !n.eol() && s.token(n, c) !== "invalidchar"; )
89
- ;
90
- f(n, "Expected Parser stream to be available.");
91
- const i = t.line - 1, e = n.getStartOfToken(), r = n.getCurrentPosition();
92
- return new R(new d(i, e), new d(i, r));
93
- }
94
- function x(t) {
95
- const s = t.loc;
96
- return f(s, "Expected ASTNode to have a location."), s;
97
- }
98
- const y = ["error", "warning", "information", "hint"], A = {
99
- "GraphQL: Validation": "validation",
100
- "GraphQL: Deprecation": "deprecation",
101
- "GraphQL: Syntax": "syntax"
102
- };
103
- g.registerHelper("lint", "graphql", (t, a) => {
104
- const { schema: s, validationRules: c, externalFragments: o } = a;
105
- return I(t, s, c, void 0, o).map((e) => ({
106
- message: e.message,
107
- severity: e.severity ? y[e.severity - 1] : y[0],
108
- type: e.source ? A[e.source] : void 0,
109
- from: g.Pos(e.range.start.line, e.range.start.character),
110
- to: g.Pos(e.range.end.line, e.range.end.character)
111
- }));
112
- });
@@ -1,6 +0,0 @@
1
- "use strict";const h=require("./codemirror-P5arRD-4.js"),l=require("./index-Of0v8HXf.js"),g=require("./Range-CUfOrqgY.js");function R(t,i,a,u,r){const n=l.specifiedRules.filter(e=>!(e===l.NoUnusedFragmentsRule||e===l.ExecutableDefinitionsRule));return a&&Array.prototype.push.apply(n,a),l.validate(t,i,n).filter(e=>{if(e.message.includes("Unknown directive")&&e.nodes){const s=e.nodes[0];if(s&&s.kind===l.Kind.DIRECTIVE){const c=s.name.value;if(c==="arguments"||c==="argumentDefinitions")return!1}}return!0})}const v={Error:"Error",Warning:"Warning"},m={[v.Error]:1,[v.Warning]:2},f=(t,i)=>{if(!t)throw new Error(i)};function w(t,i=null,a,u,r){var n,o;let e=null,s="";r&&(s=typeof r=="string"?r:r.reduce((d,p)=>d+l.print(p)+`
2
-
3
- `,""));const c=s?`${t}
4
-
5
- ${s}`:t;try{e=l.parse(c)}catch(d){if(d instanceof l.GraphQLError){const p=S((o=(n=d.locations)===null||n===void 0?void 0:n[0])!==null&&o!==void 0?o:{line:0},c);return[{severity:m.Error,message:d.message,source:"GraphQL: Syntax",range:p}]}throw d}return C(e,i,a)}function C(t,i=null,a,u){if(!i)return[];const r=R(i,t,a).flatMap(o=>y(o,m.Error,"Validation")),n=l.validate(i,t,[l.NoDeprecatedCustomRule]).flatMap(o=>y(o,m.Warning,"Deprecation"));return r.concat(n)}function y(t,i,a){if(!t.nodes)return[];const u=[];for(const[r,n]of t.nodes.entries()){const o=n.kind!=="Variable"&&"name"in n&&n.name!==void 0?n.name:"variable"in n&&n.variable!==void 0?n.variable:n;if(o){f(t.locations,"GraphQL validation error requires locations.");const e=t.locations[r],s=P(o),c=e.column+(s.end-s.start);u.push({source:`GraphQL: ${a}`,message:t.message,severity:i,range:new g.Range(new g.Position(e.line-1,e.column-1),new g.Position(e.line-1,c))})}}return u}function S(t,i){const a=l.onlineParser(),u=a.startState(),r=i.split(`
6
- `);f(r.length>=t.line,"Query text must have more lines than where the error happened");let n=null;for(let c=0;c<t.line;c++)for(n=new l.CharacterStream(r[c]);!n.eol()&&a.token(n,u)!=="invalidchar";);f(n,"Expected Parser stream to be available.");const o=t.line-1,e=n.getStartOfToken(),s=n.getCurrentPosition();return new g.Range(new g.Position(o,e),new g.Position(o,s))}function P(t){const a=t.loc;return f(a,"Expected ASTNode to have a location."),a}const E=["error","warning","information","hint"],Q={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};h.CodeMirror.registerHelper("lint","graphql",(t,i)=>{const{schema:a,validationRules:u,externalFragments:r}=i;return w(t,a,u,void 0,r).map(e=>({message:e.message,severity:e.severity?E[e.severity-1]:E[0],type:e.source?Q[e.source]:void 0,from:h.CodeMirror.Pos(e.range.start.line,e.range.start.character),to:h.CodeMirror.Pos(e.range.end.line,e.range.end.character)}))});
@@ -1,272 +0,0 @@
1
- import { C as Q } from "./codemirror-CK47QajN.mjs";
2
- import { b as $, d as I, i as q, k as C, w as M } from "./index-c_h-B3RW.mjs";
3
- function v(e) {
4
- l = e, N = e.length, i = c = k = -1, s(), E();
5
- const n = j();
6
- return d("EOF"), n;
7
- }
8
- let l, N, i, c, k, r, u;
9
- function j() {
10
- const e = i, n = [];
11
- if (d("{"), !w("}")) {
12
- do
13
- n.push(D());
14
- while (w(","));
15
- d("}");
16
- }
17
- return {
18
- kind: "Object",
19
- start: e,
20
- end: k,
21
- members: n
22
- };
23
- }
24
- function D() {
25
- const e = i, n = u === "String" ? B() : null;
26
- d("String"), d(":");
27
- const t = L();
28
- return {
29
- kind: "Member",
30
- start: e,
31
- end: k,
32
- key: n,
33
- value: t
34
- };
35
- }
36
- function H() {
37
- const e = i, n = [];
38
- if (d("["), !w("]")) {
39
- do
40
- n.push(L());
41
- while (w(","));
42
- d("]");
43
- }
44
- return {
45
- kind: "Array",
46
- start: e,
47
- end: k,
48
- values: n
49
- };
50
- }
51
- function L() {
52
- switch (u) {
53
- case "[":
54
- return H();
55
- case "{":
56
- return j();
57
- case "String":
58
- case "Number":
59
- case "Boolean":
60
- case "Null":
61
- const e = B();
62
- return E(), e;
63
- }
64
- d("Value");
65
- }
66
- function B() {
67
- return { kind: u, start: i, end: c, value: JSON.parse(l.slice(i, c)) };
68
- }
69
- function d(e) {
70
- if (u === e) {
71
- E();
72
- return;
73
- }
74
- let n;
75
- if (u === "EOF")
76
- n = "[end of file]";
77
- else if (c - i > 1)
78
- n = "`" + l.slice(i, c) + "`";
79
- else {
80
- const t = l.slice(i).match(/^.+?\b/);
81
- n = "`" + (t ? t[0] : l[i]) + "`";
82
- }
83
- throw m(`Expected ${e} but found ${n}.`);
84
- }
85
- class V extends Error {
86
- constructor(n, t) {
87
- super(n), this.position = t;
88
- }
89
- }
90
- function m(e) {
91
- return new V(e, { start: i, end: c });
92
- }
93
- function w(e) {
94
- if (u === e)
95
- return E(), !0;
96
- }
97
- function s() {
98
- return c < N && (c++, r = c === N ? 0 : l.charCodeAt(c)), r;
99
- }
100
- function E() {
101
- for (k = c; r === 9 || r === 10 || r === 13 || r === 32; )
102
- s();
103
- if (r === 0) {
104
- u = "EOF";
105
- return;
106
- }
107
- switch (i = c, r) {
108
- case 34:
109
- return u = "String", J();
110
- case 45:
111
- case 48:
112
- case 49:
113
- case 50:
114
- case 51:
115
- case 52:
116
- case 53:
117
- case 54:
118
- case 55:
119
- case 56:
120
- case 57:
121
- return u = "Number", U();
122
- case 102:
123
- if (l.slice(i, i + 5) !== "false")
124
- break;
125
- c += 4, s(), u = "Boolean";
126
- return;
127
- case 110:
128
- if (l.slice(i, i + 4) !== "null")
129
- break;
130
- c += 3, s(), u = "Null";
131
- return;
132
- case 116:
133
- if (l.slice(i, i + 4) !== "true")
134
- break;
135
- c += 3, s(), u = "Boolean";
136
- return;
137
- }
138
- u = l[i], s();
139
- }
140
- function J() {
141
- for (s(); r !== 34 && r > 31; )
142
- if (r === 92)
143
- switch (r = s(), r) {
144
- case 34:
145
- case 47:
146
- case 92:
147
- case 98:
148
- case 102:
149
- case 110:
150
- case 114:
151
- case 116:
152
- s();
153
- break;
154
- case 117:
155
- s(), g(), g(), g(), g();
156
- break;
157
- default:
158
- throw m("Bad character escape sequence.");
159
- }
160
- else {
161
- if (c === N)
162
- throw m("Unterminated string.");
163
- s();
164
- }
165
- if (r === 34) {
166
- s();
167
- return;
168
- }
169
- throw m("Unterminated string.");
170
- }
171
- function g() {
172
- if (r >= 48 && r <= 57 || r >= 65 && r <= 70 || r >= 97 && r <= 102)
173
- return s();
174
- throw m("Expected hexadecimal digit.");
175
- }
176
- function U() {
177
- r === 45 && s(), r === 48 ? s() : y(), r === 46 && (s(), y()), (r === 69 || r === 101) && (r = s(), (r === 43 || r === 45) && s(), y());
178
- }
179
- function y() {
180
- if (r < 48 || r > 57)
181
- throw m("Expected decimal digit.");
182
- do
183
- s();
184
- while (r >= 48 && r <= 57);
185
- }
186
- Q.registerHelper("lint", "graphql-variables", (e, n, t) => {
187
- if (!e)
188
- return [];
189
- let f;
190
- try {
191
- f = v(e);
192
- } catch (o) {
193
- if (o instanceof V)
194
- return [O(t, o.position, o.message)];
195
- throw o;
196
- }
197
- const { variableToType: a } = n;
198
- return a ? _(t, a, f) : [];
199
- });
200
- function _(e, n, t) {
201
- var f;
202
- const a = [];
203
- for (const o of t.members)
204
- if (o) {
205
- const p = (f = o.key) === null || f === void 0 ? void 0 : f.value, h = n[p];
206
- if (h)
207
- for (const [x, G] of b(h, o.value))
208
- a.push(O(e, x, G));
209
- else
210
- a.push(O(e, o.key, `Variable "$${p}" does not appear in any GraphQL query.`));
211
- }
212
- return a;
213
- }
214
- function b(e, n) {
215
- if (!e || !n)
216
- return [];
217
- if (e instanceof $)
218
- return n.kind === "Null" ? [[n, `Type "${e}" is non-nullable and cannot be null.`]] : b(e.ofType, n);
219
- if (n.kind === "Null")
220
- return [];
221
- if (e instanceof I) {
222
- const t = e.ofType;
223
- if (n.kind === "Array") {
224
- const f = n.values || [];
225
- return F(f, (a) => b(t, a));
226
- }
227
- return b(t, n);
228
- }
229
- if (e instanceof q) {
230
- if (n.kind !== "Object")
231
- return [[n, `Type "${e}" must be an Object.`]];
232
- const t = /* @__PURE__ */ Object.create(null), f = F(n.members, (a) => {
233
- var o;
234
- const p = (o = a == null ? void 0 : a.key) === null || o === void 0 ? void 0 : o.value;
235
- t[p] = !0;
236
- const h = e.getFields()[p];
237
- if (!h)
238
- return [
239
- [
240
- a.key,
241
- `Type "${e}" does not have a field "${p}".`
242
- ]
243
- ];
244
- const x = h ? h.type : void 0;
245
- return b(x, a.value);
246
- });
247
- for (const a of Object.keys(e.getFields())) {
248
- const o = e.getFields()[a];
249
- !t[a] && o.type instanceof $ && !o.defaultValue && f.push([
250
- n,
251
- `Object of type "${e}" is missing required field "${a}".`
252
- ]);
253
- }
254
- return f;
255
- }
256
- return e.name === "Boolean" && n.kind !== "Boolean" || e.name === "String" && n.kind !== "String" || e.name === "ID" && n.kind !== "Number" && n.kind !== "String" || e.name === "Float" && n.kind !== "Number" || e.name === "Int" && (n.kind !== "Number" || (n.value | 0) !== n.value) ? [[n, `Expected value of type "${e}".`]] : (e instanceof C || e instanceof M) && (n.kind !== "String" && n.kind !== "Number" && n.kind !== "Boolean" && n.kind !== "Null" || P(e.parseValue(n.value))) ? [[n, `Expected value of type "${e}".`]] : [];
257
- }
258
- function O(e, n, t) {
259
- return {
260
- message: t,
261
- severity: "error",
262
- type: "validation",
263
- from: e.posFromIndex(n.start),
264
- to: e.posFromIndex(n.end)
265
- };
266
- }
267
- function P(e) {
268
- return e == null || e !== e;
269
- }
270
- function F(e, n) {
271
- return Array.prototype.concat.apply([], e.map(n));
272
- }