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,123 +0,0 @@
1
- import { C as f } from "./codemirror-CK47QajN.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-c_h-B3RW.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
- }
@@ -1 +0,0 @@
1
- "use strict";const f=require("./codemirror-P5arRD-4.js"),m=require("./forEachState-DY_pA9Bd.js"),a=require("./index-Of0v8HXf.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}
@@ -1,11 +0,0 @@
1
- import { C as a, G as t, M as r, T as C, c as T, p as g, s as i, v as o } from "./index-c_h-B3RW.mjs";
2
- export {
3
- a as CloseCode,
4
- t as GRAPHQL_TRANSPORT_WS_PROTOCOL,
5
- r as MessageType,
6
- C as TerminatedCloseEvent,
7
- T as createClient,
8
- g as parseMessage,
9
- i as stringifyMessage,
10
- o as validateMessage
11
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Of0v8HXf.js");exports.CloseCode=e.CloseCode;exports.GRAPHQL_TRANSPORT_WS_PROTOCOL=e.GRAPHQL_TRANSPORT_WS_PROTOCOL;exports.MessageType=e.MessageType;exports.TerminatedCloseEvent=e.TerminatedCloseEvent;exports.createClient=e.createClient;exports.parseMessage=e.parseMessage;exports.stringifyMessage=e.stringifyMessage;exports.validateMessage=e.validateMessage;