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,238 @@
1
+ import { g as L } from "./index-Iqk59VQ1.mjs";
2
+ import { r as A } from "./codemirror-DgPcZxSc.mjs";
3
+ function j(w, k) {
4
+ for (var i = 0; i < k.length; i++) {
5
+ const d = k[i];
6
+ if (typeof d != "string" && !Array.isArray(d)) {
7
+ for (const p in d)
8
+ if (p !== "default" && !(p in w)) {
9
+ const F = Object.getOwnPropertyDescriptor(d, p);
10
+ F && Object.defineProperty(w, p, F.get ? F : {
11
+ enumerable: !0,
12
+ get: () => d[p]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ return Object.freeze(Object.defineProperty(w, Symbol.toStringTag, { value: "Module" }));
18
+ }
19
+ var b = { exports: {} }, U = { exports: {} }, N;
20
+ function q() {
21
+ return N || (N = 1, function(w, k) {
22
+ (function(i) {
23
+ i(A());
24
+ })(function(i) {
25
+ function d(e, o, r, a) {
26
+ if (r && r.call) {
27
+ var s = r;
28
+ r = null;
29
+ } else
30
+ var s = c(e, r, "rangeFinder");
31
+ typeof o == "number" && (o = i.Pos(o, 0));
32
+ var x = c(e, r, "minFoldSize");
33
+ function v(n) {
34
+ var u = s(e, o);
35
+ if (!u || u.to.line - u.from.line < x) return null;
36
+ if (a === "fold") return u;
37
+ for (var f = e.findMarksAt(u.from), l = 0; l < f.length; ++l)
38
+ if (f[l].__isFold) {
39
+ if (!n) return null;
40
+ u.cleared = !0, f[l].clear();
41
+ }
42
+ return u;
43
+ }
44
+ var g = v(!0);
45
+ if (c(e, r, "scanUp")) for (; !g && o.line > e.firstLine(); )
46
+ o = i.Pos(o.line - 1, 0), g = v(!1);
47
+ if (!(!g || g.cleared || a === "unfold")) {
48
+ var O = p(e, r, g);
49
+ i.on(O, "mousedown", function(n) {
50
+ t.clear(), i.e_preventDefault(n);
51
+ });
52
+ var t = e.markText(g.from, g.to, {
53
+ replacedWith: O,
54
+ clearOnEnter: c(e, r, "clearOnEnter"),
55
+ __isFold: !0
56
+ });
57
+ t.on("clear", function(n, u) {
58
+ i.signal(e, "unfold", e, n, u);
59
+ }), i.signal(e, "fold", e, g.from, g.to);
60
+ }
61
+ }
62
+ function p(e, o, r) {
63
+ var a = c(e, o, "widget");
64
+ if (typeof a == "function" && (a = a(r.from, r.to)), typeof a == "string") {
65
+ var s = document.createTextNode(a);
66
+ a = document.createElement("span"), a.appendChild(s), a.className = "CodeMirror-foldmarker";
67
+ } else a && (a = a.cloneNode(!0));
68
+ return a;
69
+ }
70
+ i.newFoldFunction = function(e, o) {
71
+ return function(r, a) {
72
+ d(r, a, { rangeFinder: e, widget: o });
73
+ };
74
+ }, i.defineExtension("foldCode", function(e, o, r) {
75
+ d(this, e, o, r);
76
+ }), i.defineExtension("isFolded", function(e) {
77
+ for (var o = this.findMarksAt(e), r = 0; r < o.length; ++r)
78
+ if (o[r].__isFold) return !0;
79
+ }), i.commands.toggleFold = function(e) {
80
+ e.foldCode(e.getCursor());
81
+ }, i.commands.fold = function(e) {
82
+ e.foldCode(e.getCursor(), null, "fold");
83
+ }, i.commands.unfold = function(e) {
84
+ e.foldCode(e.getCursor(), { scanUp: !1 }, "unfold");
85
+ }, i.commands.foldAll = function(e) {
86
+ e.operation(function() {
87
+ for (var o = e.firstLine(), r = e.lastLine(); o <= r; o++)
88
+ e.foldCode(i.Pos(o, 0), { scanUp: !1 }, "fold");
89
+ });
90
+ }, i.commands.unfoldAll = function(e) {
91
+ e.operation(function() {
92
+ for (var o = e.firstLine(), r = e.lastLine(); o <= r; o++)
93
+ e.foldCode(i.Pos(o, 0), { scanUp: !1 }, "unfold");
94
+ });
95
+ }, i.registerHelper("fold", "combine", function() {
96
+ var e = Array.prototype.slice.call(arguments, 0);
97
+ return function(o, r) {
98
+ for (var a = 0; a < e.length; ++a) {
99
+ var s = e[a](o, r);
100
+ if (s) return s;
101
+ }
102
+ };
103
+ }), i.registerHelper("fold", "auto", function(e, o) {
104
+ for (var r = e.getHelpers(o, "fold"), a = 0; a < r.length; a++) {
105
+ var s = r[a](e, o);
106
+ if (s) return s;
107
+ }
108
+ });
109
+ var F = {
110
+ rangeFinder: i.fold.auto,
111
+ widget: "↔",
112
+ minFoldSize: 0,
113
+ scanUp: !1,
114
+ clearOnEnter: !0
115
+ };
116
+ i.defineOption("foldOptions", null);
117
+ function c(e, o, r) {
118
+ if (o && o[r] !== void 0)
119
+ return o[r];
120
+ var a = e.options.foldOptions;
121
+ return a && a[r] !== void 0 ? a[r] : F[r];
122
+ }
123
+ i.defineExtension("foldOption", function(e, o) {
124
+ return c(this, e, o);
125
+ });
126
+ });
127
+ }()), U.exports;
128
+ }
129
+ var P;
130
+ function D() {
131
+ return P || (P = 1, function(w, k) {
132
+ (function(i) {
133
+ i(A(), q());
134
+ })(function(i) {
135
+ i.defineOption("foldGutter", !1, function(t, n, u) {
136
+ u && u != i.Init && (t.clearGutter(t.state.foldGutter.options.gutter), t.state.foldGutter = null, t.off("gutterClick", s), t.off("changes", v), t.off("viewportChange", g), t.off("fold", O), t.off("unfold", O), t.off("swapDoc", v), t.off("optionChange", x)), n && (t.state.foldGutter = new p(F(n)), a(t), t.on("gutterClick", s), t.on("changes", v), t.on("viewportChange", g), t.on("fold", O), t.on("unfold", O), t.on("swapDoc", v), t.on("optionChange", x));
137
+ });
138
+ var d = i.Pos;
139
+ function p(t) {
140
+ this.options = t, this.from = this.to = 0;
141
+ }
142
+ function F(t) {
143
+ return t === !0 && (t = {}), t.gutter == null && (t.gutter = "CodeMirror-foldgutter"), t.indicatorOpen == null && (t.indicatorOpen = "CodeMirror-foldgutter-open"), t.indicatorFolded == null && (t.indicatorFolded = "CodeMirror-foldgutter-folded"), t;
144
+ }
145
+ function c(t, n) {
146
+ for (var u = t.findMarks(d(n, 0), d(n + 1, 0)), f = 0; f < u.length; ++f)
147
+ if (u[f].__isFold) {
148
+ var l = u[f].find(-1);
149
+ if (l && l.line === n)
150
+ return u[f];
151
+ }
152
+ }
153
+ function e(t) {
154
+ if (typeof t == "string") {
155
+ var n = document.createElement("div");
156
+ return n.className = t + " CodeMirror-guttermarker-subtle", n;
157
+ } else
158
+ return t.cloneNode(!0);
159
+ }
160
+ function o(t, n, u) {
161
+ var f = t.state.foldGutter.options, l = n - 1, y = t.foldOption(f, "minFoldSize"), G = t.foldOption(f, "rangeFinder"), E = typeof f.indicatorFolded == "string" && r(f.indicatorFolded), S = typeof f.indicatorOpen == "string" && r(f.indicatorOpen);
162
+ t.eachLine(n, u, function(T) {
163
+ ++l;
164
+ var m = null, h = T.gutterMarkers;
165
+ if (h && (h = h[f.gutter]), c(t, l)) {
166
+ if (E && h && E.test(h.className)) return;
167
+ m = e(f.indicatorFolded);
168
+ } else {
169
+ var z = d(l, 0), _ = G && G(t, z);
170
+ if (_ && _.to.line - _.from.line >= y) {
171
+ if (S && h && S.test(h.className)) return;
172
+ m = e(f.indicatorOpen);
173
+ }
174
+ }
175
+ !m && !h || t.setGutterMarker(T, f.gutter, m);
176
+ });
177
+ }
178
+ function r(t) {
179
+ return new RegExp("(^|\\s)" + t + "(?:$|\\s)\\s*");
180
+ }
181
+ function a(t) {
182
+ var n = t.getViewport(), u = t.state.foldGutter;
183
+ u && (t.operation(function() {
184
+ o(t, n.from, n.to);
185
+ }), u.from = n.from, u.to = n.to);
186
+ }
187
+ function s(t, n, u) {
188
+ var f = t.state.foldGutter;
189
+ if (f) {
190
+ var l = f.options;
191
+ if (u == l.gutter) {
192
+ var y = c(t, n);
193
+ y ? y.clear() : t.foldCode(d(n, 0), l);
194
+ }
195
+ }
196
+ }
197
+ function x(t, n) {
198
+ n == "mode" && v(t);
199
+ }
200
+ function v(t) {
201
+ var n = t.state.foldGutter;
202
+ if (n) {
203
+ var u = n.options;
204
+ n.from = n.to = 0, clearTimeout(n.changeUpdate), n.changeUpdate = setTimeout(function() {
205
+ a(t);
206
+ }, u.foldOnChangeTimeSpan || 600);
207
+ }
208
+ }
209
+ function g(t) {
210
+ var n = t.state.foldGutter;
211
+ if (n) {
212
+ var u = n.options;
213
+ clearTimeout(n.changeUpdate), n.changeUpdate = setTimeout(function() {
214
+ var f = t.getViewport();
215
+ n.from == n.to || f.from - n.to > 20 || n.from - f.to > 20 ? a(t) : t.operation(function() {
216
+ f.from < n.from && (o(t, f.from, n.from), n.from = f.from), f.to > n.to && (o(t, n.to, f.to), n.to = f.to);
217
+ });
218
+ }, u.updateViewportTimeSpan || 400);
219
+ }
220
+ }
221
+ function O(t, n) {
222
+ var u = t.state.foldGutter;
223
+ if (u) {
224
+ var f = n.line;
225
+ f >= u.from && f < u.to && o(t, f, f + 1);
226
+ }
227
+ }
228
+ });
229
+ }()), b.exports;
230
+ }
231
+ var C = D();
232
+ const R = /* @__PURE__ */ L(C), I = /* @__PURE__ */ j({
233
+ __proto__: null,
234
+ default: R
235
+ }, [C]);
236
+ export {
237
+ I as f
238
+ };
@@ -0,0 +1 @@
1
+ "use strict";const z=require("./index-BeOZF5ut.js"),N=require("./codemirror-DMBo1i5w.js");function L(w,k){for(var i=0;i<k.length;i++){const d=k[i];if(typeof d!="string"&&!Array.isArray(d)){for(const c in d)if(c!=="default"&&!(c in w)){const F=Object.getOwnPropertyDescriptor(d,c);F&&Object.defineProperty(w,c,F.get?F:{enumerable:!0,get:()=>d[c]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var b={exports:{}},U={exports:{}},q;function j(){return q||(q=1,function(w,k){(function(i){i(N.requireCodemirror())})(function(i){function d(t,r,o,a){if(o&&o.call){var s=o;o=null}else var s=p(t,o,"rangeFinder");typeof r=="number"&&(r=i.Pos(r,0));var x=p(t,o,"minFoldSize");function v(n){var u=s(t,r);if(!u||u.to.line-u.from.line<x)return null;if(a==="fold")return u;for(var f=t.findMarksAt(u.from),l=0;l<f.length;++l)if(f[l].__isFold){if(!n)return null;u.cleared=!0,f[l].clear()}return u}var g=v(!0);if(p(t,o,"scanUp"))for(;!g&&r.line>t.firstLine();)r=i.Pos(r.line-1,0),g=v(!1);if(!(!g||g.cleared||a==="unfold")){var O=c(t,o,g);i.on(O,"mousedown",function(n){e.clear(),i.e_preventDefault(n)});var e=t.markText(g.from,g.to,{replacedWith:O,clearOnEnter:p(t,o,"clearOnEnter"),__isFold:!0});e.on("clear",function(n,u){i.signal(t,"unfold",t,n,u)}),i.signal(t,"fold",t,g.from,g.to)}}function c(t,r,o){var a=p(t,r,"widget");if(typeof a=="function"&&(a=a(o.from,o.to)),typeof a=="string"){var s=document.createTextNode(a);a=document.createElement("span"),a.appendChild(s),a.className="CodeMirror-foldmarker"}else a&&(a=a.cloneNode(!0));return a}i.newFoldFunction=function(t,r){return function(o,a){d(o,a,{rangeFinder:t,widget:r})}},i.defineExtension("foldCode",function(t,r,o){d(this,t,r,o)}),i.defineExtension("isFolded",function(t){for(var r=this.findMarksAt(t),o=0;o<r.length;++o)if(r[o].__isFold)return!0}),i.commands.toggleFold=function(t){t.foldCode(t.getCursor())},i.commands.fold=function(t){t.foldCode(t.getCursor(),null,"fold")},i.commands.unfold=function(t){t.foldCode(t.getCursor(),{scanUp:!1},"unfold")},i.commands.foldAll=function(t){t.operation(function(){for(var r=t.firstLine(),o=t.lastLine();r<=o;r++)t.foldCode(i.Pos(r,0),{scanUp:!1},"fold")})},i.commands.unfoldAll=function(t){t.operation(function(){for(var r=t.firstLine(),o=t.lastLine();r<=o;r++)t.foldCode(i.Pos(r,0),{scanUp:!1},"unfold")})},i.registerHelper("fold","combine",function(){var t=Array.prototype.slice.call(arguments,0);return function(r,o){for(var a=0;a<t.length;++a){var s=t[a](r,o);if(s)return s}}}),i.registerHelper("fold","auto",function(t,r){for(var o=t.getHelpers(r,"fold"),a=0;a<o.length;a++){var s=o[a](t,r);if(s)return s}});var F={rangeFinder:i.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};i.defineOption("foldOptions",null);function p(t,r,o){if(r&&r[o]!==void 0)return r[o];var a=t.options.foldOptions;return a&&a[o]!==void 0?a[o]:F[o]}i.defineExtension("foldOption",function(t,r){return p(this,t,r)})})}()),U.exports}var C;function D(){return C||(C=1,function(w,k){(function(i){i(N.requireCodemirror(),j())})(function(i){i.defineOption("foldGutter",!1,function(e,n,u){u&&u!=i.Init&&(e.clearGutter(e.state.foldGutter.options.gutter),e.state.foldGutter=null,e.off("gutterClick",s),e.off("changes",v),e.off("viewportChange",g),e.off("fold",O),e.off("unfold",O),e.off("swapDoc",v),e.off("optionChange",x)),n&&(e.state.foldGutter=new c(F(n)),a(e),e.on("gutterClick",s),e.on("changes",v),e.on("viewportChange",g),e.on("fold",O),e.on("unfold",O),e.on("swapDoc",v),e.on("optionChange",x))});var d=i.Pos;function c(e){this.options=e,this.from=this.to=0}function F(e){return e===!0&&(e={}),e.gutter==null&&(e.gutter="CodeMirror-foldgutter"),e.indicatorOpen==null&&(e.indicatorOpen="CodeMirror-foldgutter-open"),e.indicatorFolded==null&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function p(e,n){for(var u=e.findMarks(d(n,0),d(n+1,0)),f=0;f<u.length;++f)if(u[f].__isFold){var l=u[f].find(-1);if(l&&l.line===n)return u[f]}}function t(e){if(typeof e=="string"){var n=document.createElement("div");return n.className=e+" CodeMirror-guttermarker-subtle",n}else return e.cloneNode(!0)}function r(e,n,u){var f=e.state.foldGutter.options,l=n-1,y=e.foldOption(f,"minFoldSize"),m=e.foldOption(f,"rangeFinder"),E=typeof f.indicatorFolded=="string"&&o(f.indicatorFolded),S=typeof f.indicatorOpen=="string"&&o(f.indicatorOpen);e.eachLine(n,u,function(T){++l;var _=null,h=T.gutterMarkers;if(h&&(h=h[f.gutter]),p(e,l)){if(E&&h&&E.test(h.className))return;_=t(f.indicatorFolded)}else{var A=d(l,0),G=m&&m(e,A);if(G&&G.to.line-G.from.line>=y){if(S&&h&&S.test(h.className))return;_=t(f.indicatorOpen)}}!_&&!h||e.setGutterMarker(T,f.gutter,_)})}function o(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function a(e){var n=e.getViewport(),u=e.state.foldGutter;u&&(e.operation(function(){r(e,n.from,n.to)}),u.from=n.from,u.to=n.to)}function s(e,n,u){var f=e.state.foldGutter;if(f){var l=f.options;if(u==l.gutter){var y=p(e,n);y?y.clear():e.foldCode(d(n,0),l)}}}function x(e,n){n=="mode"&&v(e)}function v(e){var n=e.state.foldGutter;if(n){var u=n.options;n.from=n.to=0,clearTimeout(n.changeUpdate),n.changeUpdate=setTimeout(function(){a(e)},u.foldOnChangeTimeSpan||600)}}function g(e){var n=e.state.foldGutter;if(n){var u=n.options;clearTimeout(n.changeUpdate),n.changeUpdate=setTimeout(function(){var f=e.getViewport();n.from==n.to||f.from-n.to>20||n.from-f.to>20?a(e):e.operation(function(){f.from<n.from&&(r(e,f.from,n.from),n.from=f.from),f.to>n.to&&(r(e,n.to,f.to),n.to=f.to)})},u.updateViewportTimeSpan||400)}}function O(e,n){var u=e.state.foldGutter;if(u){var f=n.line;f>=u.from&&f<u.to&&r(e,f,f+1)}}})}()),b.exports}var P=D();const R=z.getDefaultExportFromCjs(P),V=L({__proto__:null,default:R},[P]);exports.foldgutter=V;
@@ -0,0 +1,11 @@
1
+ function l(o, i) {
2
+ const e = [];
3
+ let t = o;
4
+ for (; t != null && t.kind; )
5
+ e.push(t), t = t.prevState;
6
+ for (let a = e.length - 1; a >= 0; a--)
7
+ i(e[a]);
8
+ }
9
+ export {
10
+ l as f
11
+ };
@@ -0,0 +1 @@
1
+ "use strict";function r(i,o){const e=[];let t=i;for(;t!=null&&t.kind;)e.push(t),t=t.prevState;for(let a=e.length-1;a>=0;a--)o(e[a])}exports.forEachState=r;
@@ -0,0 +1 @@
1
+ "use strict";const f=require("./codemirror-Kv5dN_jU.js"),m=require("./forEachState-DY_pA9Bd.js"),a=require("./index-BeOZF5ut.js");function u(i,n,t){const r=g(t,h(n.string));if(!r)return;const e=n.type!==null&&/"|\w/.test(n.string[0])?n.start:n.end;return{list:r,from:{line:i.line,ch:e},to:{line:i.line,ch:n.end}}}function g(i,n){if(!n)return d(i,o=>!o.isDeprecated);const t=i.map(o=>({proximity:b(h(o.text),n),entry:o}));return d(d(t,o=>o.proximity<=2),o=>!o.entry.isDeprecated).sort((o,s)=>(o.entry.isDeprecated?1:0)-(s.entry.isDeprecated?1:0)||o.proximity-s.proximity||o.entry.text.length-s.entry.text.length).map(o=>o.entry)}function d(i,n){const t=i.filter(n);return t.length===0?i:t}function h(i){return i.toLowerCase().replaceAll(/\W/g,"")}function b(i,n){let t=x(n,i);return i.length>n.length&&(t-=i.length-n.length-1,t+=i.indexOf(n)===0?0:.5),t}function x(i,n){let t,r;const e=[],o=i.length,s=n.length;for(t=0;t<=o;t++)e[t]=[t];for(r=1;r<=s;r++)e[0][r]=r;for(t=1;t<=o;t++)for(r=1;r<=s;r++){const p=i[t-1]===n[r-1]?0:1;e[t][r]=Math.min(e[t-1][r]+1,e[t][r-1]+1,e[t-1][r-1]+p),t>1&&r>1&&i[t-1]===n[r-2]&&i[t-2]===n[r-1]&&(e[t][r]=Math.min(e[t][r],e[t-2][r-2]+p))}return e[o][s]}f.CodeMirror.registerHelper("hint","graphql-variables",(i,n)=>{const t=i.getCursor(),r=i.getTokenAt(t),e=L(t,r,n);return e!=null&&e.list&&e.list.length>0&&(e.from=f.CodeMirror.Pos(e.from.line,e.from.ch),e.to=f.CodeMirror.Pos(e.to.line,e.to.ch),f.CodeMirror.signal(i,"hasCompletion",i,e,r)),e});function L(i,n,t){const r=n.state.kind==="Invalid"?n.state.prevState:n.state,{kind:e,step:o}=r;if(e==="Document"&&o===0)return u(i,n,[{text:"{"}]);const{variableToType:s}=t;if(!s)return;const p=T(s,n.state);if(e==="Document"||e==="Variable"&&o===0){const c=Object.keys(s);return u(i,n,c.map(l=>({text:`"${l}": `,type:s[l]})))}if((e==="ObjectValue"||e==="ObjectField"&&o===0)&&p.fields){const c=Object.keys(p.fields).map(l=>p.fields[l]);return u(i,n,c.map(l=>({text:`"${l.name}": `,type:l.type,description:l.description})))}if(e==="StringValue"||e==="NumberValue"||e==="BooleanValue"||e==="NullValue"||e==="ListValue"&&o===1||e==="ObjectField"&&o===2||e==="Variable"&&o===2){const c=p.type?a.getNamedType(p.type):void 0;if(c instanceof a.GraphQLInputObjectType)return u(i,n,[{text:"{"}]);if(c instanceof a.GraphQLEnumType){const l=c.getValues();return u(i,n,l.map(y=>({text:`"${y.name}"`,type:c,description:y.description})))}if(c===a.GraphQLBoolean)return u(i,n,[{text:"true",type:a.GraphQLBoolean,description:"Not false."},{text:"false",type:a.GraphQLBoolean,description:"Not true."}])}}function T(i,n){const t={type:null,fields:null};return m.forEachState(n,r=>{switch(r.kind){case"Variable":{t.type=i[r.name];break}case"ListValue":{const e=t.type?a.getNullableType(t.type):void 0;t.type=e instanceof a.GraphQLList?e.ofType:null;break}case"ObjectValue":{const e=t.type?a.getNamedType(t.type):void 0;t.fields=e instanceof a.GraphQLInputObjectType?e.getFields():null;break}case"ObjectField":{const e=r.name&&t.fields?t.fields[r.name]:null;t.type=e==null?void 0:e.type;break}}}),t}
@@ -0,0 +1,123 @@
1
+ import { C as f } from "./codemirror-CxfyhJc1.mjs";
2
+ import { f as b } from "./forEachState-DA54msa8.mjs";
3
+ import { h as m, i as h, k as x, u, j as T, d as V } from "./index-Iqk59VQ1.mjs";
4
+ function p(i, n, t) {
5
+ const r = j(t, g(n.string));
6
+ if (!r)
7
+ return;
8
+ const e = n.type !== null && /"|\w/.test(n.string[0]) ? n.start : n.end;
9
+ return {
10
+ list: r,
11
+ from: { line: i.line, ch: e },
12
+ to: { line: i.line, ch: n.end }
13
+ };
14
+ }
15
+ function j(i, n) {
16
+ if (!n)
17
+ return d(i, (s) => !s.isDeprecated);
18
+ const t = i.map((s) => ({
19
+ proximity: L(g(s.text), n),
20
+ entry: s
21
+ }));
22
+ return d(d(t, (s) => s.proximity <= 2), (s) => !s.entry.isDeprecated).sort((s, l) => (s.entry.isDeprecated ? 1 : 0) - (l.entry.isDeprecated ? 1 : 0) || s.proximity - l.proximity || s.entry.text.length - l.entry.text.length).map((s) => s.entry);
23
+ }
24
+ function d(i, n) {
25
+ const t = i.filter(n);
26
+ return t.length === 0 ? i : t;
27
+ }
28
+ function g(i) {
29
+ return i.toLowerCase().replaceAll(/\W/g, "");
30
+ }
31
+ function L(i, n) {
32
+ let t = v(n, i);
33
+ return i.length > n.length && (t -= i.length - n.length - 1, t += i.indexOf(n) === 0 ? 0 : 0.5), t;
34
+ }
35
+ function v(i, n) {
36
+ let t, r;
37
+ const e = [], s = i.length, l = n.length;
38
+ for (t = 0; t <= s; t++)
39
+ e[t] = [t];
40
+ for (r = 1; r <= l; r++)
41
+ e[0][r] = r;
42
+ for (t = 1; t <= s; t++)
43
+ for (r = 1; r <= l; r++) {
44
+ const c = i[t - 1] === n[r - 1] ? 0 : 1;
45
+ e[t][r] = Math.min(e[t - 1][r] + 1, e[t][r - 1] + 1, e[t - 1][r - 1] + c), t > 1 && r > 1 && i[t - 1] === n[r - 2] && i[t - 2] === n[r - 1] && (e[t][r] = Math.min(e[t][r], e[t - 2][r - 2] + c));
46
+ }
47
+ return e[s][l];
48
+ }
49
+ f.registerHelper("hint", "graphql-variables", (i, n) => {
50
+ const t = i.getCursor(), r = i.getTokenAt(t), e = O(t, r, n);
51
+ return e != null && e.list && e.list.length > 0 && (e.from = f.Pos(e.from.line, e.from.ch), e.to = f.Pos(e.to.line, e.to.ch), f.signal(i, "hasCompletion", i, e, r)), e;
52
+ });
53
+ function O(i, n, t) {
54
+ const r = n.state.kind === "Invalid" ? n.state.prevState : n.state, { kind: e, step: s } = r;
55
+ if (e === "Document" && s === 0)
56
+ return p(i, n, [{ text: "{" }]);
57
+ const { variableToType: l } = t;
58
+ if (!l)
59
+ return;
60
+ const c = N(l, n.state);
61
+ if (e === "Document" || e === "Variable" && s === 0) {
62
+ const a = Object.keys(l);
63
+ return p(i, n, a.map((o) => ({
64
+ text: `"${o}": `,
65
+ type: l[o]
66
+ })));
67
+ }
68
+ if ((e === "ObjectValue" || e === "ObjectField" && s === 0) && c.fields) {
69
+ const a = Object.keys(c.fields).map((o) => c.fields[o]);
70
+ return p(i, n, a.map((o) => ({
71
+ text: `"${o.name}": `,
72
+ type: o.type,
73
+ description: o.description
74
+ })));
75
+ }
76
+ if (e === "StringValue" || e === "NumberValue" || e === "BooleanValue" || e === "NullValue" || e === "ListValue" && s === 1 || e === "ObjectField" && s === 2 || e === "Variable" && s === 2) {
77
+ const a = c.type ? m(c.type) : void 0;
78
+ if (a instanceof h)
79
+ return p(i, n, [{ text: "{" }]);
80
+ if (a instanceof x) {
81
+ const o = a.getValues();
82
+ return p(i, n, o.map((y) => ({
83
+ text: `"${y.name}"`,
84
+ type: a,
85
+ description: y.description
86
+ })));
87
+ }
88
+ if (a === u)
89
+ return p(i, n, [
90
+ { text: "true", type: u, description: "Not false." },
91
+ { text: "false", type: u, description: "Not true." }
92
+ ]);
93
+ }
94
+ }
95
+ function N(i, n) {
96
+ const t = {
97
+ type: null,
98
+ fields: null
99
+ };
100
+ return b(n, (r) => {
101
+ switch (r.kind) {
102
+ case "Variable": {
103
+ t.type = i[r.name];
104
+ break;
105
+ }
106
+ case "ListValue": {
107
+ const e = t.type ? T(t.type) : void 0;
108
+ t.type = e instanceof V ? e.ofType : null;
109
+ break;
110
+ }
111
+ case "ObjectValue": {
112
+ const e = t.type ? m(t.type) : void 0;
113
+ t.fields = e instanceof h ? e.getFields() : null;
114
+ break;
115
+ }
116
+ case "ObjectField": {
117
+ const e = r.name && t.fields ? t.fields[r.name] : null;
118
+ t.type = e == null ? void 0 : e.type;
119
+ break;
120
+ }
121
+ }
122
+ }), t;
123
+ }
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./codemirror-Kv5dN_jU.js");require("./show-hint-CYURLLrO.js");const g=require("./index-BeOZF5ut.js"),h=require("./Range-CUfOrqgY.js");s.CodeMirror.registerHelper("hint","graphql",(r,a)=>{const{schema:l,externalFragments:u,autocompleteOptions:p}=a;if(!l)return;const n=r.getCursor(),o=r.getTokenAt(n),c=o.type!==null&&/"|\w/.test(o.string[0])?o.start:o.end,d=new h.Position(n.line,c),e={list:g.getAutocompleteSuggestions(l,r.getValue(),d,o,u,p).map(t=>{var i;return{text:(i=t==null?void 0:t.rawInsert)!==null&&i!==void 0?i:t.label,type:t.type,description:t.documentation,isDeprecated:t.isDeprecated,deprecationReason:t.deprecationReason}}),from:{line:n.line,ch:c},to:{line:n.line,ch:o.end}};return e!=null&&e.list&&e.list.length>0&&(e.from=s.CodeMirror.Pos(e.from.line,e.from.ch),e.to=s.CodeMirror.Pos(e.to.line,e.to.ch),s.CodeMirror.signal(r,"hasCompletion",r,e,o)),e});
@@ -0,0 +1,24 @@
1
+ import { C as r } from "./codemirror-CxfyhJc1.mjs";
2
+ import "./show-hint-CmHZP7k_.mjs";
3
+ import { a as m } from "./index-Iqk59VQ1.mjs";
4
+ import { P as d } from "./Range-CPFFy5pj.mjs";
5
+ r.registerHelper("hint", "graphql", (n, c) => {
6
+ const { schema: i, externalFragments: p, autocompleteOptions: u } = c;
7
+ if (!i)
8
+ return;
9
+ const s = n.getCursor(), o = n.getTokenAt(s), a = o.type !== null && /"|\w/.test(o.string[0]) ? o.start : o.end, g = new d(s.line, a), t = {
10
+ list: m(i, n.getValue(), g, o, p, u).map((e) => {
11
+ var l;
12
+ return {
13
+ text: (l = e == null ? void 0 : e.rawInsert) !== null && l !== void 0 ? l : e.label,
14
+ type: e.type,
15
+ description: e.documentation,
16
+ isDeprecated: e.isDeprecated,
17
+ deprecationReason: e.deprecationReason
18
+ };
19
+ }),
20
+ from: { line: s.line, ch: a },
21
+ to: { line: s.line, ch: o.end }
22
+ };
23
+ return t != null && t.list && t.list.length > 0 && (t.from = r.Pos(t.from.line, t.from.ch), t.to = r.Pos(t.to.line, t.to.ch), r.signal(n, "hasCompletion", n, t, o)), t;
24
+ });