@graphiql/plugin-doc-explorer 1.0.0-beta.1 → 1.0.0-beta.3

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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/argument.js +88 -92
  3. package/dist/components/argument.js.map +1 -1
  4. package/dist/components/arguments-list.js +226 -237
  5. package/dist/components/arguments-list.js.map +1 -1
  6. package/dist/components/breadcrumb.js +59 -52
  7. package/dist/components/breadcrumb.js.map +1 -1
  8. package/dist/components/default-value.js +63 -74
  9. package/dist/components/default-value.js.map +1 -1
  10. package/dist/components/deprecation-reason.js +27 -21
  11. package/dist/components/deprecation-reason.js.map +1 -1
  12. package/dist/components/directive.js +20 -23
  13. package/dist/components/directive.js.map +1 -1
  14. package/dist/components/doc-explorer.js +219 -259
  15. package/dist/components/doc-explorer.js.map +1 -1
  16. package/dist/components/field-card.js +103 -97
  17. package/dist/components/field-card.js.map +1 -1
  18. package/dist/components/field-documentation.js +118 -135
  19. package/dist/components/field-documentation.js.map +1 -1
  20. package/dist/components/field-link.js +37 -39
  21. package/dist/components/field-link.js.map +1 -1
  22. package/dist/components/fields-list.js +216 -226
  23. package/dist/components/fields-list.js.map +1 -1
  24. package/dist/components/schema-documentation.js +263 -224
  25. package/dist/components/schema-documentation.js.map +1 -1
  26. package/dist/components/search-row.js +287 -268
  27. package/dist/components/search-row.js.map +1 -1
  28. package/dist/components/search.js +342 -345
  29. package/dist/components/search.js.map +1 -1
  30. package/dist/components/section.js +59 -69
  31. package/dist/components/section.js.map +1 -1
  32. package/dist/components/type-card.js +104 -107
  33. package/dist/components/type-card.js.map +1 -1
  34. package/dist/components/type-documentation.js +340 -363
  35. package/dist/components/type-documentation.js.map +1 -1
  36. package/dist/components/type-link.js +38 -39
  37. package/dist/components/type-link.js.map +1 -1
  38. package/dist/components/utils.js +15 -20
  39. package/dist/components/utils.js.map +1 -1
  40. package/dist/context.js +205 -285
  41. package/dist/context.js.map +1 -1
  42. package/dist/index.js +7 -31
  43. package/dist/schema-reference.js +48 -54
  44. package/dist/schema-reference.js.map +1 -1
  45. package/dist/style.css +24 -28
  46. package/package.json +25 -19
  47. package/dist/index.js.map +0 -1
@@ -1,391 +1,368 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { c } from "react-compiler-runtime";
3
- import { useState } from "react";
4
- import { isNamedType, isObjectType, isInterfaceType, isInputObjectType, isEnumType, isAbstractType } from "graphql";
5
- import { MarkdownContent, Button, useGraphiQL } from "@graphiql/react";
6
- import { Argument } from "./argument.js";
7
1
  import { DefaultValue } from "./default-value.js";
2
+ import { TypeLink } from "./type-link.js";
3
+ import { Argument } from "./argument.js";
8
4
  import { DeprecationReason } from "./deprecation-reason.js";
9
5
  import { FieldLink } from "./field-link.js";
10
6
  import { ExplorerSection } from "./section.js";
11
- import { TypeLink } from "./type-link.js";
12
7
  /* empty css */
13
- const TypeDocumentation = (t0) => {
14
- const $ = c(3);
15
- const {
16
- type,
17
- hideHeader
18
- } = t0;
19
- let t1;
20
- if ($[0] !== hideHeader || $[1] !== type) {
21
- t1 = isNamedType(type) ? /* @__PURE__ */ jsxs(Fragment, { children: [
22
- !hideHeader && type.description ? /* @__PURE__ */ jsx(MarkdownContent, { type: "description", children: type.description }) : null,
23
- !hideHeader && /* @__PURE__ */ jsx(ImplementsInterfaces, { type }),
24
- !hideHeader && /* @__PURE__ */ jsx(Fields, { type }),
25
- /* @__PURE__ */ jsx(EnumValues, { type }),
26
- /* @__PURE__ */ jsx(PossibleTypes, { type })
27
- ] }) : null;
28
- $[0] = hideHeader;
29
- $[1] = type;
30
- $[2] = t1;
31
- } else {
32
- t1 = $[2];
33
- }
34
- return t1;
8
+ import { c } from "react-compiler-runtime";
9
+ import { Button, MarkdownContent, useGraphiQL } from "@graphiql/react";
10
+ import { isAbstractType, isEnumType, isInputObjectType, isInterfaceType, isNamedType, isObjectType } from "graphql";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
+ import { useState } from "react";
13
+ //#region src/components/type-documentation.tsx
14
+ var TypeDocumentation = (t0) => {
15
+ const $ = c(3);
16
+ const { type, hideHeader } = t0;
17
+ let t1;
18
+ if ($[0] !== hideHeader || $[1] !== type) {
19
+ t1 = isNamedType(type) ? /* @__PURE__ */ jsxs(Fragment, { children: [
20
+ !hideHeader && type.description ? /* @__PURE__ */ jsx(MarkdownContent, {
21
+ type: "description",
22
+ children: type.description
23
+ }) : null,
24
+ !hideHeader && /* @__PURE__ */ jsx(ImplementsInterfaces, { type }),
25
+ !hideHeader && /* @__PURE__ */ jsx(Fields, { type }),
26
+ /* @__PURE__ */ jsx(EnumValues, { type }),
27
+ /* @__PURE__ */ jsx(PossibleTypes, { type })
28
+ ] }) : null;
29
+ $[0] = hideHeader;
30
+ $[1] = type;
31
+ $[2] = t1;
32
+ } else t1 = $[2];
33
+ return t1;
35
34
  };
36
- const ImplementsInterfaces = (t0) => {
37
- const $ = c(5);
38
- const {
39
- type
40
- } = t0;
41
- if (!isObjectType(type)) {
42
- return null;
43
- }
44
- let t1;
45
- if ($[0] !== type) {
46
- t1 = type.getInterfaces();
47
- $[0] = type;
48
- $[1] = t1;
49
- } else {
50
- t1 = $[1];
51
- }
52
- const interfaces = t1;
53
- let t2;
54
- if ($[2] !== interfaces.length || $[3] !== type) {
55
- t2 = interfaces.length > 0 ? /* @__PURE__ */ jsx(ExplorerSection, { title: "Implements", children: type.getInterfaces().map(_temp) }) : null;
56
- $[2] = interfaces.length;
57
- $[3] = type;
58
- $[4] = t2;
59
- } else {
60
- t2 = $[4];
61
- }
62
- return t2;
35
+ var ImplementsInterfaces = (t0) => {
36
+ const $ = c(5);
37
+ const { type } = t0;
38
+ if (!isObjectType(type)) return null;
39
+ let t1;
40
+ if ($[0] !== type) {
41
+ t1 = type.getInterfaces();
42
+ $[0] = type;
43
+ $[1] = t1;
44
+ } else t1 = $[1];
45
+ const interfaces = t1;
46
+ let t2;
47
+ if ($[2] !== interfaces.length || $[3] !== type) {
48
+ t2 = interfaces.length > 0 ? /* @__PURE__ */ jsx(ExplorerSection, {
49
+ title: "Implements",
50
+ children: type.getInterfaces().map(_temp)
51
+ }) : null;
52
+ $[2] = interfaces.length;
53
+ $[3] = type;
54
+ $[4] = t2;
55
+ } else t2 = $[4];
56
+ return t2;
63
57
  };
64
- const Fields = (t0) => {
65
- const $ = c(12);
66
- const {
67
- type
68
- } = t0;
69
- const [showDeprecated, setShowDeprecated] = useState(false);
70
- let t1;
71
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
72
- t1 = () => {
73
- setShowDeprecated(true);
74
- };
75
- $[0] = t1;
76
- } else {
77
- t1 = $[0];
78
- }
79
- const handleShowDeprecated = t1;
80
- if (!isObjectType(type) && !isInterfaceType(type) && !isInputObjectType(type)) {
81
- return null;
82
- }
83
- let deprecatedFields;
84
- let fields;
85
- let t2;
86
- if ($[1] !== type) {
87
- const fieldMap = type.getFields();
88
- fields = [];
89
- deprecatedFields = [];
90
- for (const field of Object.keys(fieldMap).map((name) => fieldMap[name])) {
91
- if (field.deprecationReason) {
92
- deprecatedFields.push(field);
93
- } else {
94
- fields.push(field);
95
- }
96
- }
97
- t2 = fields.length > 0 ? /* @__PURE__ */ jsx(ExplorerSection, { title: "Fields", children: fields.map(_temp2) }) : null;
98
- $[1] = type;
99
- $[2] = deprecatedFields;
100
- $[3] = fields;
101
- $[4] = t2;
102
- } else {
103
- deprecatedFields = $[2];
104
- fields = $[3];
105
- t2 = $[4];
106
- }
107
- let t3;
108
- if ($[5] !== deprecatedFields || $[6] !== fields.length || $[7] !== showDeprecated) {
109
- t3 = deprecatedFields.length > 0 ? showDeprecated || fields.length === 0 ? /* @__PURE__ */ jsx(ExplorerSection, { title: "Deprecated Fields", children: deprecatedFields.map(_temp3) }) : /* @__PURE__ */ jsx(Button, { type: "button", onClick: handleShowDeprecated, children: "Show Deprecated Fields" }) : null;
110
- $[5] = deprecatedFields;
111
- $[6] = fields.length;
112
- $[7] = showDeprecated;
113
- $[8] = t3;
114
- } else {
115
- t3 = $[8];
116
- }
117
- let t4;
118
- if ($[9] !== t2 || $[10] !== t3) {
119
- t4 = /* @__PURE__ */ jsxs(Fragment, { children: [
120
- t2,
121
- t3
122
- ] });
123
- $[9] = t2;
124
- $[10] = t3;
125
- $[11] = t4;
126
- } else {
127
- t4 = $[11];
128
- }
129
- return t4;
58
+ var Fields = (t0) => {
59
+ const $ = c(12);
60
+ const { type } = t0;
61
+ const [showDeprecated, setShowDeprecated] = useState(false);
62
+ let t1;
63
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
64
+ t1 = () => {
65
+ setShowDeprecated(true);
66
+ };
67
+ $[0] = t1;
68
+ } else t1 = $[0];
69
+ const handleShowDeprecated = t1;
70
+ if (!isObjectType(type) && !isInterfaceType(type) && !isInputObjectType(type)) return null;
71
+ let deprecatedFields;
72
+ let fields;
73
+ let t2;
74
+ if ($[1] !== type) {
75
+ const fieldMap = type.getFields();
76
+ fields = [];
77
+ deprecatedFields = [];
78
+ for (const field of Object.keys(fieldMap).map((name) => fieldMap[name])) if (field.deprecationReason) deprecatedFields.push(field);
79
+ else fields.push(field);
80
+ t2 = fields.length > 0 ? /* @__PURE__ */ jsx(ExplorerSection, {
81
+ title: "Fields",
82
+ children: fields.map(_temp2)
83
+ }) : null;
84
+ $[1] = type;
85
+ $[2] = deprecatedFields;
86
+ $[3] = fields;
87
+ $[4] = t2;
88
+ } else {
89
+ deprecatedFields = $[2];
90
+ fields = $[3];
91
+ t2 = $[4];
92
+ }
93
+ let t3;
94
+ if ($[5] !== deprecatedFields || $[6] !== fields.length || $[7] !== showDeprecated) {
95
+ t3 = deprecatedFields.length > 0 ? showDeprecated || fields.length === 0 ? /* @__PURE__ */ jsx(ExplorerSection, {
96
+ title: "Deprecated Fields",
97
+ children: deprecatedFields.map(_temp3)
98
+ }) : /* @__PURE__ */ jsx(Button, {
99
+ type: "button",
100
+ onClick: handleShowDeprecated,
101
+ children: "Show Deprecated Fields"
102
+ }) : null;
103
+ $[5] = deprecatedFields;
104
+ $[6] = fields.length;
105
+ $[7] = showDeprecated;
106
+ $[8] = t3;
107
+ } else t3 = $[8];
108
+ let t4;
109
+ if ($[9] !== t2 || $[10] !== t3) {
110
+ t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
111
+ $[9] = t2;
112
+ $[10] = t3;
113
+ $[11] = t4;
114
+ } else t4 = $[11];
115
+ return t4;
130
116
  };
131
- const Field = (t0) => {
132
- const $ = c(22);
133
- const {
134
- field
135
- } = t0;
136
- let t1;
137
- let t2;
138
- let t3;
139
- if ($[0] !== field) {
140
- const args = "args" in field ? field.args.filter(_temp4) : [];
141
- t3 = "graphiql-doc-explorer-item";
142
- t1 = /* @__PURE__ */ jsx(FieldLink, { field });
143
- t2 = args.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
144
- "(",
145
- /* @__PURE__ */ jsx("span", { children: args.map((arg_0) => args.length === 1 ? /* @__PURE__ */ jsx(Argument, { arg: arg_0, inline: true }, arg_0.name) : /* @__PURE__ */ jsx("div", { className: "graphiql-doc-explorer-argument-multiple", children: /* @__PURE__ */ jsx(Argument, { arg: arg_0, inline: true }) }, arg_0.name)) }),
146
- ")"
147
- ] }) : null;
148
- $[0] = field;
149
- $[1] = t1;
150
- $[2] = t2;
151
- $[3] = t3;
152
- } else {
153
- t1 = $[1];
154
- t2 = $[2];
155
- t3 = $[3];
156
- }
157
- let t4;
158
- if ($[4] !== field.type) {
159
- t4 = /* @__PURE__ */ jsx(TypeLink, { type: field.type });
160
- $[4] = field.type;
161
- $[5] = t4;
162
- } else {
163
- t4 = $[5];
164
- }
165
- let t5;
166
- if ($[6] !== field) {
167
- t5 = /* @__PURE__ */ jsx(DefaultValue, { field });
168
- $[6] = field;
169
- $[7] = t5;
170
- } else {
171
- t5 = $[7];
172
- }
173
- let t6;
174
- if ($[8] !== t1 || $[9] !== t2 || $[10] !== t4 || $[11] !== t5) {
175
- t6 = /* @__PURE__ */ jsxs("div", { children: [
176
- t1,
177
- t2,
178
- ": ",
179
- t4,
180
- t5
181
- ] });
182
- $[8] = t1;
183
- $[9] = t2;
184
- $[10] = t4;
185
- $[11] = t5;
186
- $[12] = t6;
187
- } else {
188
- t6 = $[12];
189
- }
190
- let t7;
191
- if ($[13] !== field.description) {
192
- t7 = field.description ? /* @__PURE__ */ jsx(MarkdownContent, { type: "description", onlyShowFirstChild: true, children: field.description }) : null;
193
- $[13] = field.description;
194
- $[14] = t7;
195
- } else {
196
- t7 = $[14];
197
- }
198
- let t8;
199
- if ($[15] !== field.deprecationReason) {
200
- t8 = /* @__PURE__ */ jsx(DeprecationReason, { children: field.deprecationReason });
201
- $[15] = field.deprecationReason;
202
- $[16] = t8;
203
- } else {
204
- t8 = $[16];
205
- }
206
- let t9;
207
- if ($[17] !== t3 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8) {
208
- t9 = /* @__PURE__ */ jsxs("div", { className: t3, children: [
209
- t6,
210
- t7,
211
- t8
212
- ] });
213
- $[17] = t3;
214
- $[18] = t6;
215
- $[19] = t7;
216
- $[20] = t8;
217
- $[21] = t9;
218
- } else {
219
- t9 = $[21];
220
- }
221
- return t9;
117
+ var Field = (t0) => {
118
+ const $ = c(22);
119
+ const { field } = t0;
120
+ let t1;
121
+ let t2;
122
+ let t3;
123
+ if ($[0] !== field) {
124
+ const args = "args" in field ? field.args.filter(_temp4) : [];
125
+ t3 = "graphiql-doc-explorer-item";
126
+ t1 = /* @__PURE__ */ jsx(FieldLink, { field });
127
+ t2 = args.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
128
+ "(",
129
+ /* @__PURE__ */ jsx("span", { children: args.map((arg_0) => args.length === 1 ? /* @__PURE__ */ jsx(Argument, {
130
+ arg: arg_0,
131
+ inline: true
132
+ }, arg_0.name) : /* @__PURE__ */ jsx("div", {
133
+ className: "graphiql-doc-explorer-argument-multiple",
134
+ children: /* @__PURE__ */ jsx(Argument, {
135
+ arg: arg_0,
136
+ inline: true
137
+ })
138
+ }, arg_0.name)) }),
139
+ ")"
140
+ ] }) : null;
141
+ $[0] = field;
142
+ $[1] = t1;
143
+ $[2] = t2;
144
+ $[3] = t3;
145
+ } else {
146
+ t1 = $[1];
147
+ t2 = $[2];
148
+ t3 = $[3];
149
+ }
150
+ let t4;
151
+ if ($[4] !== field.type) {
152
+ t4 = /* @__PURE__ */ jsx(TypeLink, { type: field.type });
153
+ $[4] = field.type;
154
+ $[5] = t4;
155
+ } else t4 = $[5];
156
+ let t5;
157
+ if ($[6] !== field) {
158
+ t5 = /* @__PURE__ */ jsx(DefaultValue, { field });
159
+ $[6] = field;
160
+ $[7] = t5;
161
+ } else t5 = $[7];
162
+ let t6;
163
+ if ($[8] !== t1 || $[9] !== t2 || $[10] !== t4 || $[11] !== t5) {
164
+ t6 = /* @__PURE__ */ jsxs("div", { children: [
165
+ t1,
166
+ t2,
167
+ ": ",
168
+ t4,
169
+ t5
170
+ ] });
171
+ $[8] = t1;
172
+ $[9] = t2;
173
+ $[10] = t4;
174
+ $[11] = t5;
175
+ $[12] = t6;
176
+ } else t6 = $[12];
177
+ let t7;
178
+ if ($[13] !== field.description) {
179
+ t7 = field.description ? /* @__PURE__ */ jsx(MarkdownContent, {
180
+ type: "description",
181
+ onlyShowFirstChild: true,
182
+ children: field.description
183
+ }) : null;
184
+ $[13] = field.description;
185
+ $[14] = t7;
186
+ } else t7 = $[14];
187
+ let t8;
188
+ if ($[15] !== field.deprecationReason) {
189
+ t8 = /* @__PURE__ */ jsx(DeprecationReason, { children: field.deprecationReason });
190
+ $[15] = field.deprecationReason;
191
+ $[16] = t8;
192
+ } else t8 = $[16];
193
+ let t9;
194
+ if ($[17] !== t3 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8) {
195
+ t9 = /* @__PURE__ */ jsxs("div", {
196
+ className: t3,
197
+ children: [
198
+ t6,
199
+ t7,
200
+ t8
201
+ ]
202
+ });
203
+ $[17] = t3;
204
+ $[18] = t6;
205
+ $[19] = t7;
206
+ $[20] = t8;
207
+ $[21] = t9;
208
+ } else t9 = $[21];
209
+ return t9;
222
210
  };
223
- const EnumValues = (t0) => {
224
- const $ = c(12);
225
- const {
226
- type
227
- } = t0;
228
- const [showDeprecated, setShowDeprecated] = useState(false);
229
- let t1;
230
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
231
- t1 = () => {
232
- setShowDeprecated(true);
233
- };
234
- $[0] = t1;
235
- } else {
236
- t1 = $[0];
237
- }
238
- const handleShowDeprecated = t1;
239
- if (!isEnumType(type)) {
240
- return null;
241
- }
242
- let deprecatedValues;
243
- let t2;
244
- let values;
245
- if ($[1] !== type) {
246
- values = [];
247
- deprecatedValues = [];
248
- for (const value of type.getValues()) {
249
- if (value.deprecationReason) {
250
- deprecatedValues.push(value);
251
- } else {
252
- values.push(value);
253
- }
254
- }
255
- t2 = values.length > 0 && /* @__PURE__ */ jsx(ExplorerSection, { title: "Enum Values", children: values.map(_temp5) });
256
- $[1] = type;
257
- $[2] = deprecatedValues;
258
- $[3] = t2;
259
- $[4] = values;
260
- } else {
261
- deprecatedValues = $[2];
262
- t2 = $[3];
263
- values = $[4];
264
- }
265
- let t3;
266
- if ($[5] !== deprecatedValues || $[6] !== showDeprecated || $[7] !== values.length) {
267
- t3 = deprecatedValues.length > 0 && (showDeprecated || !values.length ? /* @__PURE__ */ jsx(ExplorerSection, { title: "Deprecated Enum Values", children: deprecatedValues.map(_temp6) }) : /* @__PURE__ */ jsx(Button, { type: "button", onClick: handleShowDeprecated, children: "Show Deprecated Values" }));
268
- $[5] = deprecatedValues;
269
- $[6] = showDeprecated;
270
- $[7] = values.length;
271
- $[8] = t3;
272
- } else {
273
- t3 = $[8];
274
- }
275
- let t4;
276
- if ($[9] !== t2 || $[10] !== t3) {
277
- t4 = /* @__PURE__ */ jsxs(Fragment, { children: [
278
- t2,
279
- t3
280
- ] });
281
- $[9] = t2;
282
- $[10] = t3;
283
- $[11] = t4;
284
- } else {
285
- t4 = $[11];
286
- }
287
- return t4;
211
+ var EnumValues = (t0) => {
212
+ const $ = c(12);
213
+ const { type } = t0;
214
+ const [showDeprecated, setShowDeprecated] = useState(false);
215
+ let t1;
216
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
217
+ t1 = () => {
218
+ setShowDeprecated(true);
219
+ };
220
+ $[0] = t1;
221
+ } else t1 = $[0];
222
+ const handleShowDeprecated = t1;
223
+ if (!isEnumType(type)) return null;
224
+ let deprecatedValues;
225
+ let t2;
226
+ let values;
227
+ if ($[1] !== type) {
228
+ values = [];
229
+ deprecatedValues = [];
230
+ for (const value of type.getValues()) if (value.deprecationReason) deprecatedValues.push(value);
231
+ else values.push(value);
232
+ t2 = values.length > 0 && /* @__PURE__ */ jsx(ExplorerSection, {
233
+ title: "Enum Values",
234
+ children: values.map(_temp5)
235
+ });
236
+ $[1] = type;
237
+ $[2] = deprecatedValues;
238
+ $[3] = t2;
239
+ $[4] = values;
240
+ } else {
241
+ deprecatedValues = $[2];
242
+ t2 = $[3];
243
+ values = $[4];
244
+ }
245
+ let t3;
246
+ if ($[5] !== deprecatedValues || $[6] !== showDeprecated || $[7] !== values.length) {
247
+ t3 = deprecatedValues.length > 0 && (showDeprecated || !values.length ? /* @__PURE__ */ jsx(ExplorerSection, {
248
+ title: "Deprecated Enum Values",
249
+ children: deprecatedValues.map(_temp6)
250
+ }) : /* @__PURE__ */ jsx(Button, {
251
+ type: "button",
252
+ onClick: handleShowDeprecated,
253
+ children: "Show Deprecated Values"
254
+ }));
255
+ $[5] = deprecatedValues;
256
+ $[6] = showDeprecated;
257
+ $[7] = values.length;
258
+ $[8] = t3;
259
+ } else t3 = $[8];
260
+ let t4;
261
+ if ($[9] !== t2 || $[10] !== t3) {
262
+ t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
263
+ $[9] = t2;
264
+ $[10] = t3;
265
+ $[11] = t4;
266
+ } else t4 = $[11];
267
+ return t4;
288
268
  };
289
- const EnumValue = (t0) => {
290
- const $ = c(10);
291
- const {
292
- value
293
- } = t0;
294
- let t1;
295
- if ($[0] !== value.name) {
296
- t1 = /* @__PURE__ */ jsx("div", { className: "graphiql-doc-explorer-enum-value", children: value.name });
297
- $[0] = value.name;
298
- $[1] = t1;
299
- } else {
300
- t1 = $[1];
301
- }
302
- let t2;
303
- if ($[2] !== value.description) {
304
- t2 = value.description && /* @__PURE__ */ jsx(MarkdownContent, { type: "description", children: value.description });
305
- $[2] = value.description;
306
- $[3] = t2;
307
- } else {
308
- t2 = $[3];
309
- }
310
- let t3;
311
- if ($[4] !== value.deprecationReason) {
312
- t3 = value.deprecationReason && /* @__PURE__ */ jsx(MarkdownContent, { type: "deprecation", children: value.deprecationReason });
313
- $[4] = value.deprecationReason;
314
- $[5] = t3;
315
- } else {
316
- t3 = $[5];
317
- }
318
- let t4;
319
- if ($[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
320
- t4 = /* @__PURE__ */ jsxs("div", { className: "graphiql-doc-explorer-item", children: [
321
- t1,
322
- t2,
323
- t3
324
- ] });
325
- $[6] = t1;
326
- $[7] = t2;
327
- $[8] = t3;
328
- $[9] = t4;
329
- } else {
330
- t4 = $[9];
331
- }
332
- return t4;
269
+ var EnumValue = (t0) => {
270
+ const $ = c(10);
271
+ const { value } = t0;
272
+ let t1;
273
+ if ($[0] !== value.name) {
274
+ t1 = /* @__PURE__ */ jsx("div", {
275
+ className: "graphiql-doc-explorer-enum-value",
276
+ children: value.name
277
+ });
278
+ $[0] = value.name;
279
+ $[1] = t1;
280
+ } else t1 = $[1];
281
+ let t2;
282
+ if ($[2] !== value.description) {
283
+ t2 = value.description && /* @__PURE__ */ jsx(MarkdownContent, {
284
+ type: "description",
285
+ children: value.description
286
+ });
287
+ $[2] = value.description;
288
+ $[3] = t2;
289
+ } else t2 = $[3];
290
+ let t3;
291
+ if ($[4] !== value.deprecationReason) {
292
+ t3 = value.deprecationReason && /* @__PURE__ */ jsx(MarkdownContent, {
293
+ type: "deprecation",
294
+ children: value.deprecationReason
295
+ });
296
+ $[4] = value.deprecationReason;
297
+ $[5] = t3;
298
+ } else t3 = $[5];
299
+ let t4;
300
+ if ($[6] !== t1 || $[7] !== t2 || $[8] !== t3) {
301
+ t4 = /* @__PURE__ */ jsxs("div", {
302
+ className: "graphiql-doc-explorer-item",
303
+ children: [
304
+ t1,
305
+ t2,
306
+ t3
307
+ ]
308
+ });
309
+ $[6] = t1;
310
+ $[7] = t2;
311
+ $[8] = t3;
312
+ $[9] = t4;
313
+ } else t4 = $[9];
314
+ return t4;
333
315
  };
334
- const PossibleTypes = (t0) => {
335
- const $ = c(6);
336
- const {
337
- type
338
- } = t0;
339
- const schema = useGraphiQL(_temp7);
340
- if (!schema || !isAbstractType(type)) {
341
- return null;
342
- }
343
- const t1 = isInterfaceType(type) ? "Implementations" : "Possible Types";
344
- let t2;
345
- if ($[0] !== schema || $[1] !== type) {
346
- t2 = schema.getPossibleTypes(type).map(_temp8);
347
- $[0] = schema;
348
- $[1] = type;
349
- $[2] = t2;
350
- } else {
351
- t2 = $[2];
352
- }
353
- let t3;
354
- if ($[3] !== t1 || $[4] !== t2) {
355
- t3 = /* @__PURE__ */ jsx(ExplorerSection, { title: t1, children: t2 });
356
- $[3] = t1;
357
- $[4] = t2;
358
- $[5] = t3;
359
- } else {
360
- t3 = $[5];
361
- }
362
- return t3;
316
+ var PossibleTypes = (t0) => {
317
+ const $ = c(6);
318
+ const { type } = t0;
319
+ const schema = useGraphiQL(_temp7);
320
+ if (!schema || !isAbstractType(type)) return null;
321
+ const t1 = isInterfaceType(type) ? "Implementations" : "Possible Types";
322
+ let t2;
323
+ if ($[0] !== schema || $[1] !== type) {
324
+ t2 = schema.getPossibleTypes(type).map(_temp8);
325
+ $[0] = schema;
326
+ $[1] = type;
327
+ $[2] = t2;
328
+ } else t2 = $[2];
329
+ let t3;
330
+ if ($[3] !== t1 || $[4] !== t2) {
331
+ t3 = /* @__PURE__ */ jsx(ExplorerSection, {
332
+ title: t1,
333
+ children: t2
334
+ });
335
+ $[3] = t1;
336
+ $[4] = t2;
337
+ $[5] = t3;
338
+ } else t3 = $[5];
339
+ return t3;
363
340
  };
364
341
  function _temp(implementedInterface) {
365
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(TypeLink, { type: implementedInterface }) }, implementedInterface.name);
342
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(TypeLink, { type: implementedInterface }) }, implementedInterface.name);
366
343
  }
367
344
  function _temp2(field_0) {
368
- return /* @__PURE__ */ jsx(Field, { field: field_0 }, field_0.name);
345
+ return /* @__PURE__ */ jsx(Field, { field: field_0 }, field_0.name);
369
346
  }
370
347
  function _temp3(field_1) {
371
- return /* @__PURE__ */ jsx(Field, { field: field_1 }, field_1.name);
348
+ return /* @__PURE__ */ jsx(Field, { field: field_1 }, field_1.name);
372
349
  }
373
350
  function _temp4(arg) {
374
- return !arg.deprecationReason;
351
+ return !arg.deprecationReason;
375
352
  }
376
353
  function _temp5(value_0) {
377
- return /* @__PURE__ */ jsx(EnumValue, { value: value_0 }, value_0.name);
354
+ return /* @__PURE__ */ jsx(EnumValue, { value: value_0 }, value_0.name);
378
355
  }
379
356
  function _temp6(value_1) {
380
- return /* @__PURE__ */ jsx(EnumValue, { value: value_1 }, value_1.name);
357
+ return /* @__PURE__ */ jsx(EnumValue, { value: value_1 }, value_1.name);
381
358
  }
382
359
  function _temp7(state) {
383
- return state.schema;
360
+ return state.schema;
384
361
  }
385
362
  function _temp8(possibleType) {
386
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(TypeLink, { type: possibleType }) }, possibleType.name);
363
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(TypeLink, { type: possibleType }) }, possibleType.name);
387
364
  }
388
- export {
389
- TypeDocumentation
390
- };
391
- //# sourceMappingURL=type-documentation.js.map
365
+ //#endregion
366
+ export { TypeDocumentation };
367
+
368
+ //# sourceMappingURL=type-documentation.js.map