stepzen-graphiql 1.0.4

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 (101) hide show
  1. package/README.md +85 -0
  2. package/dist/GraphiQLExplorer.d.ts +10 -0
  3. package/dist/Range-CPFFy5pj.mjs +26 -0
  4. package/dist/Range-CUfOrqgY.js +1 -0
  5. package/dist/SchemaReference-94TE3IPs.mjs +146 -0
  6. package/dist/SchemaReference-DKgkDdcV.js +1 -0
  7. package/dist/brace-fold-9JQ5QTIN.mjs +122 -0
  8. package/dist/brace-fold-CUTcWTRf.js +1 -0
  9. package/dist/closebrackets-BL_z-rKi.mjs +165 -0
  10. package/dist/closebrackets-DHbhKDzk.js +2 -0
  11. package/dist/codemirror-CxfyhJc1.mjs +27 -0
  12. package/dist/codemirror-DMBo1i5w.js +24 -0
  13. package/dist/codemirror-DgPcZxSc.mjs +6121 -0
  14. package/dist/codemirror-Kv5dN_jU.js +1 -0
  15. package/dist/comment-CAsllqoy.js +2 -0
  16. package/dist/comment-DscvXuhU.mjs +150 -0
  17. package/dist/components/ExplorerPage/ExplorerHeader.d.ts +3 -0
  18. package/dist/components/ExplorerPage/ExplorerPage.d.ts +8 -0
  19. package/dist/components/ExplorerPage/GraphiQLInterface.d.ts +60 -0
  20. package/dist/components/ExplorerPage/Snippets.d.ts +17 -0
  21. package/dist/components/ExplorerPage/clearTooltip.d.ts +1 -0
  22. package/dist/components/exporterPlugin/CodeExporter.d.ts +93 -0
  23. package/dist/components/exporterPlugin/index.d.ts +7 -0
  24. package/dist/components/exporterPlugin/snippets/__helpers__/getOptionCombinations.d.ts +2 -0
  25. package/dist/components/exporterPlugin/snippets/index.d.ts +2 -0
  26. package/dist/components/exporterPlugin/snippets/javascript/fetch.d.ts +3 -0
  27. package/dist/components/exporterPlugin/snippets/javascript/reactApollo.d.ts +3 -0
  28. package/dist/components/exporterPlugin/toposort.d.ts +2 -0
  29. package/dist/components/exporterPlugin/useExporterPlugin.d.ts +19 -0
  30. package/dist/components/exporterPlugin/utils/capitalizeFirstLetter.d.ts +1 -0
  31. package/dist/components/exporterPlugin/utils/index.d.ts +7 -0
  32. package/dist/components/exporterPlugin/utils/jsCommentsFactory.d.ts +1 -0
  33. package/dist/contexts/EnvironmentContext.d.ts +37 -0
  34. package/dist/contexts/endpoint.d.ts +39 -0
  35. package/dist/dialog-BF69fCJO.js +1 -0
  36. package/dist/dialog-Ci1bnuc2.mjs +74 -0
  37. package/dist/dialog-Dh2DOTOu.js +1 -0
  38. package/dist/dialog-nXZjpybF.mjs +26 -0
  39. package/dist/foldgutter-DiGsqcNo.mjs +238 -0
  40. package/dist/foldgutter-Do6XNu8o.js +1 -0
  41. package/dist/forEachState-DA54msa8.mjs +11 -0
  42. package/dist/forEachState-DY_pA9Bd.js +1 -0
  43. package/dist/hint-BNpE1H1l.js +1 -0
  44. package/dist/hint-BQ9WwQj_.mjs +123 -0
  45. package/dist/hint-dA98kXsJ.js +1 -0
  46. package/dist/hint-ptEpgPx0.mjs +24 -0
  47. package/dist/index-BeOZF5ut.js +650 -0
  48. package/dist/index-GG9J9CZE.js +1 -0
  49. package/dist/index-Iqk59VQ1.mjs +89463 -0
  50. package/dist/index-_X52-Rov.mjs +11 -0
  51. package/dist/index.cjs.js +1 -0
  52. package/dist/index.d.ts +3 -0
  53. package/dist/index.es.js +4 -0
  54. package/dist/info-BhA0aX7P.js +1 -0
  55. package/dist/info-DavOVk27.mjs +99 -0
  56. package/dist/info-addon-BppfpWGs.js +1 -0
  57. package/dist/info-addon-jclzOzZb.mjs +66 -0
  58. package/dist/javascript-Bk78gZXV.js +1 -0
  59. package/dist/javascript-HLYdFIhF.mjs +26 -0
  60. package/dist/javascript-RO_jaPiE.mjs +707 -0
  61. package/dist/javascript-poxRzxcy.js +1 -0
  62. package/dist/jsx-C8WdRUVV.mjs +414 -0
  63. package/dist/jsx-LzpFIybc.js +1 -0
  64. package/dist/jump-BR4c9I5u.mjs +85 -0
  65. package/dist/jump-C3iGjDkY.js +1 -0
  66. package/dist/jump-to-line-BZOuAkwy.js +1 -0
  67. package/dist/jump-to-line-pXiAP2DT.mjs +61 -0
  68. package/dist/lib/constants.d.ts +6 -0
  69. package/dist/lib/graphiql-helpers.d.ts +86 -0
  70. package/dist/lib/helpers.d.ts +53 -0
  71. package/dist/lint-Aw1wLmnw.mjs +112 -0
  72. package/dist/lint-Bf0wS1Ab.js +1 -0
  73. package/dist/lint-DL7I1P7I.mjs +272 -0
  74. package/dist/lint-GZ9x3Nii.js +6 -0
  75. package/dist/lint-L3DNAS-R.mjs +216 -0
  76. package/dist/lint-azLq6zoS.js +1 -0
  77. package/dist/matchbrackets-BB4g2Y6d.mjs +87 -0
  78. package/dist/matchbrackets-DJZ2jVlm.js +1 -0
  79. package/dist/matchbrackets-DNVziiaa.mjs +26 -0
  80. package/dist/matchbrackets-DPv_MB7c.js +1 -0
  81. package/dist/mode-Bad_JbYc.js +1 -0
  82. package/dist/mode-BuM4vqHx.js +1 -0
  83. package/dist/mode-C9FNlffS.js +1 -0
  84. package/dist/mode-CtmJdiWw.mjs +73 -0
  85. package/dist/mode-CxFmwOoU.mjs +25 -0
  86. package/dist/mode-DQHzanY6.mjs +64 -0
  87. package/dist/mode-indent-9VnFlqY-.mjs +8 -0
  88. package/dist/mode-indent-m3TP74Ia.js +1 -0
  89. package/dist/search-BUZtJ7Zg.mjs +268 -0
  90. package/dist/search-DxgAMk6j.js +2 -0
  91. package/dist/searchcursor-BrHSjZde.mjs +26 -0
  92. package/dist/searchcursor-Cf1_qqgl.js +1 -0
  93. package/dist/searchcursor-DHtNMOPb.mjs +239 -0
  94. package/dist/searchcursor-eGwb3e2h.js +7 -0
  95. package/dist/show-hint-CYURLLrO.js +1 -0
  96. package/dist/show-hint-CmHZP7k_.mjs +357 -0
  97. package/dist/style.css +9 -0
  98. package/dist/sublime-BKhMEkpg.js +6 -0
  99. package/dist/sublime-Dmy11GSm.mjs +563 -0
  100. package/dist/types/config.d.ts +7 -0
  101. package/package.json +111 -0
@@ -0,0 +1,216 @@
1
+ import { g as P } from "./index-Iqk59VQ1.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
+ };
@@ -0,0 +1 @@
1
+ "use strict";const V=require("./codemirror-Kv5dN_jU.js"),m=require("./index-BeOZF5ut.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))}
@@ -0,0 +1,87 @@
1
+ import { r as E } from "./codemirror-DgPcZxSc.mjs";
2
+ var H = { exports: {} }, M;
3
+ function F() {
4
+ return M || (M = 1, function(S, q) {
5
+ (function(f) {
6
+ f(E());
7
+ })(function(f) {
8
+ var m = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8), o = f.Pos, d = { "(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<", "<": ">>", ">": "<<" };
9
+ function B(t) {
10
+ return t && t.bracketRegex || /[(){}[\]]/;
11
+ }
12
+ function L(t, r, e) {
13
+ var i = t.getLineHandle(r.line), n = r.ch - 1, l = e && e.afterCursor;
14
+ l == null && (l = /(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));
15
+ var h = B(e), u = !l && n >= 0 && h.test(i.text.charAt(n)) && d[i.text.charAt(n)] || h.test(i.text.charAt(n + 1)) && d[i.text.charAt(++n)];
16
+ if (!u) return null;
17
+ var a = u.charAt(1) == ">" ? 1 : -1;
18
+ if (e && e.strict && a > 0 != (n == r.ch)) return null;
19
+ var g = t.getTokenTypeAt(o(r.line, n + 1)), s = y(t, o(r.line, n + (a > 0 ? 1 : 0)), a, g, e);
20
+ return s == null ? null : {
21
+ from: o(r.line, n),
22
+ to: s && s.pos,
23
+ match: s && s.ch == u.charAt(0),
24
+ forward: a > 0
25
+ };
26
+ }
27
+ function y(t, r, e, i, n) {
28
+ for (var l = n && n.maxScanLineLength || 1e4, h = n && n.maxScanLines || 1e3, u = [], a = B(n), g = e > 0 ? Math.min(r.line + h, t.lastLine() + 1) : Math.max(t.firstLine() - 1, r.line - h), s = r.line; s != g; s += e) {
29
+ var c = t.getLine(s);
30
+ if (c) {
31
+ var k = e > 0 ? 0 : c.length - 1, T = e > 0 ? c.length : -1;
32
+ if (!(c.length > l))
33
+ for (s == r.line && (k = r.ch - (e < 0 ? 1 : 0)); k != T; k += e) {
34
+ var x = c.charAt(k);
35
+ if (a.test(x) && (i === void 0 || (t.getTokenTypeAt(o(s, k + 1)) || "") == (i || ""))) {
36
+ var b = d[x];
37
+ if (b && b.charAt(1) == ">" == e > 0) u.push(x);
38
+ else if (u.length) u.pop();
39
+ else return { pos: o(s, k), ch: x };
40
+ }
41
+ }
42
+ }
43
+ }
44
+ return s - e == (e > 0 ? t.lastLine() : t.firstLine()) ? !1 : null;
45
+ }
46
+ function A(t, r, e) {
47
+ for (var i = t.state.matchBrackets.maxHighlightLineLength || 1e3, n = e && e.highlightNonMatching, l = [], h = t.listSelections(), u = 0; u < h.length; u++) {
48
+ var a = h[u].empty() && L(t, h[u].head, e);
49
+ if (a && (a.match || n !== !1) && t.getLine(a.from.line).length <= i) {
50
+ var g = a.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
51
+ l.push(t.markText(a.from, o(a.from.line, a.from.ch + 1), { className: g })), a.to && t.getLine(a.to.line).length <= i && l.push(t.markText(a.to, o(a.to.line, a.to.ch + 1), { className: g }));
52
+ }
53
+ }
54
+ if (l.length) {
55
+ m && t.state.focused && t.focus();
56
+ var s = function() {
57
+ t.operation(function() {
58
+ for (var c = 0; c < l.length; c++) l[c].clear();
59
+ });
60
+ };
61
+ if (r) setTimeout(s, 800);
62
+ else return s;
63
+ }
64
+ }
65
+ function v(t) {
66
+ t.operation(function() {
67
+ t.state.matchBrackets.currentlyHighlighted && (t.state.matchBrackets.currentlyHighlighted(), t.state.matchBrackets.currentlyHighlighted = null), t.state.matchBrackets.currentlyHighlighted = A(t, !1, t.state.matchBrackets);
68
+ });
69
+ }
70
+ function p(t) {
71
+ t.state.matchBrackets && t.state.matchBrackets.currentlyHighlighted && (t.state.matchBrackets.currentlyHighlighted(), t.state.matchBrackets.currentlyHighlighted = null);
72
+ }
73
+ f.defineOption("matchBrackets", !1, function(t, r, e) {
74
+ e && e != f.Init && (t.off("cursorActivity", v), t.off("focus", v), t.off("blur", p), p(t)), r && (t.state.matchBrackets = typeof r == "object" ? r : {}, t.on("cursorActivity", v), t.on("focus", v), t.on("blur", p));
75
+ }), f.defineExtension("matchBrackets", function() {
76
+ A(this, !0);
77
+ }), f.defineExtension("findMatchingBracket", function(t, r, e) {
78
+ return (e || typeof r == "boolean") && (e ? (e.strict = r, r = e) : r = r ? { strict: !0 } : null), L(this, t, r);
79
+ }), f.defineExtension("scanForBracket", function(t, r, e, i) {
80
+ return y(this, t, r, e, i);
81
+ });
82
+ });
83
+ }()), H.exports;
84
+ }
85
+ export {
86
+ F as r
87
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./index-BeOZF5ut.js"),i=require("./matchbrackets-DPv_MB7c.js");function u(r,o){for(var c=0;c<o.length;c++){const e=o[c];if(typeof e!="string"&&!Array.isArray(e)){for(const t in e)if(t!=="default"&&!(t in r)){const a=Object.getOwnPropertyDescriptor(e,t);a&&Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var s=i.requireMatchbrackets();const f=n.getDefaultExportFromCjs(s),b=u({__proto__:null,default:f},[s]);exports.matchbrackets=b;
@@ -0,0 +1,26 @@
1
+ import { g as n } from "./index-Iqk59VQ1.mjs";
2
+ import { r as f } from "./matchbrackets-BB4g2Y6d.mjs";
3
+ function i(r, c) {
4
+ for (var o = 0; o < c.length; o++) {
5
+ const e = c[o];
6
+ if (typeof e != "string" && !Array.isArray(e)) {
7
+ for (const t in e)
8
+ if (t !== "default" && !(t in r)) {
9
+ const a = Object.getOwnPropertyDescriptor(e, t);
10
+ a && Object.defineProperty(r, t, a.get ? a : {
11
+ enumerable: !0,
12
+ get: () => e[t]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
18
+ }
19
+ var s = f();
20
+ const m = /* @__PURE__ */ n(s), b = /* @__PURE__ */ i({
21
+ __proto__: null,
22
+ default: m
23
+ }, [s]);
24
+ export {
25
+ b as m
26
+ };
@@ -0,0 +1 @@
1
+ "use strict";const E=require("./codemirror-DMBo1i5w.js");var H={exports:{}},M;function S(){return M||(M=1,function(q,R){(function(f){f(E.requireCodemirror())})(function(f){var m=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),o=f.Pos,d={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function p(t){return t&&t.bracketRegex||/[(){}[\]]/}function L(t,r,e){var s=t.getLineHandle(r.line),n=r.ch-1,h=e&&e.afterCursor;h==null&&(h=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var l=p(e),u=!h&&n>=0&&l.test(s.text.charAt(n))&&d[s.text.charAt(n)]||l.test(s.text.charAt(n+1))&&d[s.text.charAt(++n)];if(!u)return null;var a=u.charAt(1)==">"?1:-1;if(e&&e.strict&&a>0!=(n==r.ch))return null;var g=t.getTokenTypeAt(o(r.line,n+1)),i=y(t,o(r.line,n+(a>0?1:0)),a,g,e);return i==null?null:{from:o(r.line,n),to:i&&i.pos,match:i&&i.ch==u.charAt(0),forward:a>0}}function y(t,r,e,s,n){for(var h=n&&n.maxScanLineLength||1e4,l=n&&n.maxScanLines||1e3,u=[],a=p(n),g=e>0?Math.min(r.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,r.line-l),i=r.line;i!=g;i+=e){var c=t.getLine(i);if(c){var k=e>0?0:c.length-1,T=e>0?c.length:-1;if(!(c.length>h))for(i==r.line&&(k=r.ch-(e<0?1:0));k!=T;k+=e){var x=c.charAt(k);if(a.test(x)&&(s===void 0||(t.getTokenTypeAt(o(i,k+1))||"")==(s||""))){var b=d[x];if(b&&b.charAt(1)==">"==e>0)u.push(x);else if(u.length)u.pop();else return{pos:o(i,k),ch:x}}}}}return i-e==(e>0?t.lastLine():t.firstLine())?!1:null}function A(t,r,e){for(var s=t.state.matchBrackets.maxHighlightLineLength||1e3,n=e&&e.highlightNonMatching,h=[],l=t.listSelections(),u=0;u<l.length;u++){var a=l[u].empty()&&L(t,l[u].head,e);if(a&&(a.match||n!==!1)&&t.getLine(a.from.line).length<=s){var g=a.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(t.markText(a.from,o(a.from.line,a.from.ch+1),{className:g})),a.to&&t.getLine(a.to.line).length<=s&&h.push(t.markText(a.to,o(a.to.line,a.to.ch+1),{className:g}))}}if(h.length){m&&t.state.focused&&t.focus();var i=function(){t.operation(function(){for(var c=0;c<h.length;c++)h[c].clear()})};if(r)setTimeout(i,800);else return i}}function v(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=A(t,!1,t.state.matchBrackets)})}function B(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}f.defineOption("matchBrackets",!1,function(t,r,e){e&&e!=f.Init&&(t.off("cursorActivity",v),t.off("focus",v),t.off("blur",B),B(t)),r&&(t.state.matchBrackets=typeof r=="object"?r:{},t.on("cursorActivity",v),t.on("focus",v),t.on("blur",B))}),f.defineExtension("matchBrackets",function(){A(this,!0)}),f.defineExtension("findMatchingBracket",function(t,r,e){return(e||typeof r=="boolean")&&(e?(e.strict=r,r=e):r=r?{strict:!0}:null),L(this,t,r)}),f.defineExtension("scanForBracket",function(t,r,e,s){return y(this,t,r,e,s)})})}()),H.exports}exports.requireMatchbrackets=S;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("./codemirror-Kv5dN_jU.js"),e=require("./index-BeOZF5ut.js"),l=require("./mode-indent-m3TP74Ia.js");a.CodeMirror.defineMode("graphql-results",t=>{const r=e.onlineParser({eatWhitespace:u=>u.eatSpace(),lexRules:n,parseRules:s,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:r.startState,token:r.token,indent:l.indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const n={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},s={Document:[e.p("{"),e.list("Entry",e.p(",")),e.p("}")],Entry:[e.t("String","def"),e.p(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[e.t("Number","number")],StringValue:[e.t("String","string")],BooleanValue:[e.t("Keyword","builtin")],NullValue:[e.t("Keyword","keyword")],ListValue:[e.p("["),e.list("Value",e.p(",")),e.p("]")],ObjectValue:[e.p("{"),e.list("ObjectField",e.p(",")),e.p("}")],ObjectField:[e.t("String","property"),e.p(":"),"Value"]};
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./codemirror-Kv5dN_jU.js"),e=require("./index-BeOZF5ut.js"),o=require("./mode-indent-m3TP74Ia.js"),i=r=>{const t=e.onlineParser({eatWhitespace:s=>s.eatWhile(e.isIgnored),lexRules:e.LexRules,parseRules:e.ParseRules,editorConfig:{tabSize:r.tabSize}});return{config:r,startState:t.startState,token:t.token,indent:o.indent,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}};n.CodeMirror.defineMode("graphql",i);
@@ -0,0 +1 @@
1
+ "use strict";const l=require("./codemirror-Kv5dN_jU.js"),e=require("./index-BeOZF5ut.js"),n=require("./mode-indent-m3TP74Ia.js");l.CodeMirror.defineMode("graphql-variables",t=>{const r=e.onlineParser({eatWhitespace:a=>a.eatSpace(),lexRules:i,parseRules:s,editorConfig:{tabSize:t.tabSize}});return{config:t,startState:r.startState,token:r.token,indent:n.indent,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const i={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},s={Document:[e.p("{"),e.list("Variable",e.opt(e.p(","))),e.p("}")],Variable:[u("variable"),e.p(":"),"Value"],Value(t){switch(t.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(t.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(t.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[e.t("Number","number")],StringValue:[e.t("String","string")],BooleanValue:[e.t("Keyword","builtin")],NullValue:[e.t("Keyword","keyword")],ListValue:[e.p("["),e.list("Value",e.opt(e.p(","))),e.p("]")],ObjectValue:[e.p("{"),e.list("ObjectField",e.opt(e.p(","))),e.p("}")],ObjectField:[u("attribute"),e.p(":"),"Value"]};function u(t){return{style:t,match:r=>r.kind==="String",update(r,a){r.name=a.value.slice(1,-1)}}}
@@ -0,0 +1,73 @@
1
+ import { C as i } from "./codemirror-CxfyhJc1.mjs";
2
+ import { o, e, l, t, f as n } from "./index-Iqk59VQ1.mjs";
3
+ import { i as c } from "./mode-indent-9VnFlqY-.mjs";
4
+ i.defineMode("graphql-variables", (a) => {
5
+ const r = o({
6
+ eatWhitespace: (u) => u.eatSpace(),
7
+ lexRules: b,
8
+ parseRules: d,
9
+ editorConfig: { tabSize: a.tabSize }
10
+ });
11
+ return {
12
+ config: a,
13
+ startState: r.startState,
14
+ token: r.token,
15
+ indent: c,
16
+ electricInput: /^\s*[}\]]/,
17
+ fold: "brace",
18
+ closeBrackets: {
19
+ pairs: '[]{}""',
20
+ explode: "[]{}"
21
+ }
22
+ };
23
+ });
24
+ const b = {
25
+ Punctuation: /^\[|]|\{|\}|:|,/,
26
+ Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
27
+ String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
28
+ Keyword: /^true|false|null/
29
+ }, d = {
30
+ Document: [e("{"), l("Variable", n(e(","))), e("}")],
31
+ Variable: [s("variable"), e(":"), "Value"],
32
+ Value(a) {
33
+ switch (a.kind) {
34
+ case "Number":
35
+ return "NumberValue";
36
+ case "String":
37
+ return "StringValue";
38
+ case "Punctuation":
39
+ switch (a.value) {
40
+ case "[":
41
+ return "ListValue";
42
+ case "{":
43
+ return "ObjectValue";
44
+ }
45
+ return null;
46
+ case "Keyword":
47
+ switch (a.value) {
48
+ case "true":
49
+ case "false":
50
+ return "BooleanValue";
51
+ case "null":
52
+ return "NullValue";
53
+ }
54
+ return null;
55
+ }
56
+ },
57
+ NumberValue: [t("Number", "number")],
58
+ StringValue: [t("String", "string")],
59
+ BooleanValue: [t("Keyword", "builtin")],
60
+ NullValue: [t("Keyword", "keyword")],
61
+ ListValue: [e("["), l("Value", n(e(","))), e("]")],
62
+ ObjectValue: [e("{"), l("ObjectField", n(e(","))), e("}")],
63
+ ObjectField: [s("attribute"), e(":"), "Value"]
64
+ };
65
+ function s(a) {
66
+ return {
67
+ style: a,
68
+ match: (r) => r.kind === "String",
69
+ update(r, u) {
70
+ r.name = u.value.slice(1, -1);
71
+ }
72
+ };
73
+ }
@@ -0,0 +1,25 @@
1
+ import { C as a } from "./codemirror-CxfyhJc1.mjs";
2
+ import { o as s, P as o, L as i, r as l } from "./index-Iqk59VQ1.mjs";
3
+ import { i as n } from "./mode-indent-9VnFlqY-.mjs";
4
+ const p = (e) => {
5
+ const r = s({
6
+ eatWhitespace: (t) => t.eatWhile(l),
7
+ lexRules: i,
8
+ parseRules: o,
9
+ editorConfig: { tabSize: e.tabSize }
10
+ });
11
+ return {
12
+ config: e,
13
+ startState: r.startState,
14
+ token: r.token,
15
+ indent: n,
16
+ electricInput: /^\s*[})\]]/,
17
+ fold: "brace",
18
+ lineComment: "#",
19
+ closeBrackets: {
20
+ pairs: '()[]{}""',
21
+ explode: "()[]{}"
22
+ }
23
+ };
24
+ };
25
+ a.defineMode("graphql", p);
@@ -0,0 +1,64 @@
1
+ import { C as n } from "./codemirror-CxfyhJc1.mjs";
2
+ import { o as s, t, e, l as a } from "./index-Iqk59VQ1.mjs";
3
+ import { i } from "./mode-indent-9VnFlqY-.mjs";
4
+ n.defineMode("graphql-results", (r) => {
5
+ const u = s({
6
+ eatWhitespace: (l) => l.eatSpace(),
7
+ lexRules: o,
8
+ parseRules: c,
9
+ editorConfig: { tabSize: r.tabSize }
10
+ });
11
+ return {
12
+ config: r,
13
+ startState: u.startState,
14
+ token: u.token,
15
+ indent: i,
16
+ electricInput: /^\s*[}\]]/,
17
+ fold: "brace",
18
+ closeBrackets: {
19
+ pairs: '[]{}""',
20
+ explode: "[]{}"
21
+ }
22
+ };
23
+ });
24
+ const o = {
25
+ Punctuation: /^\[|]|\{|\}|:|,/,
26
+ Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,
27
+ String: /^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,
28
+ Keyword: /^true|false|null/
29
+ }, c = {
30
+ Document: [e("{"), a("Entry", e(",")), e("}")],
31
+ Entry: [t("String", "def"), e(":"), "Value"],
32
+ Value(r) {
33
+ switch (r.kind) {
34
+ case "Number":
35
+ return "NumberValue";
36
+ case "String":
37
+ return "StringValue";
38
+ case "Punctuation":
39
+ switch (r.value) {
40
+ case "[":
41
+ return "ListValue";
42
+ case "{":
43
+ return "ObjectValue";
44
+ }
45
+ return null;
46
+ case "Keyword":
47
+ switch (r.value) {
48
+ case "true":
49
+ case "false":
50
+ return "BooleanValue";
51
+ case "null":
52
+ return "NullValue";
53
+ }
54
+ return null;
55
+ }
56
+ },
57
+ NumberValue: [t("Number", "number")],
58
+ StringValue: [t("String", "string")],
59
+ BooleanValue: [t("Keyword", "builtin")],
60
+ NullValue: [t("Keyword", "keyword")],
61
+ ListValue: [e("["), a("Value", e(",")), e("]")],
62
+ ObjectValue: [e("{"), a("ObjectField", e(",")), e("}")],
63
+ ObjectField: [t("String", "property"), e(":"), "Value"]
64
+ };
@@ -0,0 +1,8 @@
1
+ function d(i, l) {
2
+ var e, n;
3
+ const { levels: t, indentLevel: o } = i;
4
+ return ((!t || t.length === 0 ? o : t.at(-1) - (!((e = this.electricInput) === null || e === void 0) && e.test(l) ? 1 : 0)) || 0) * (((n = this.config) === null || n === void 0 ? void 0 : n.indentUnit) || 0);
5
+ }
6
+ export {
7
+ d as i
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";function d(i,l){var n,t;const{levels:e,indentLevel:v}=i;return((!e||e.length===0?v:e.at(-1)-(!((n=this.electricInput)===null||n===void 0)&&n.test(l)?1:0))||0)*(((t=this.config)===null||t===void 0?void 0:t.indentUnit)||0)}exports.indent=d;