@graphiql/plugin-doc-explorer 1.0.0 → 1.0.2

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 (46) hide show
  1. package/dist/components/argument.js +3 -4
  2. package/dist/components/argument.js.map +1 -1
  3. package/dist/components/arguments-list.js +66 -69
  4. package/dist/components/arguments-list.js.map +1 -1
  5. package/dist/components/breadcrumb.js +2 -3
  6. package/dist/components/breadcrumb.js.map +1 -1
  7. package/dist/components/default-value.d.ts +8 -0
  8. package/dist/components/default-value.js +38 -28
  9. package/dist/components/default-value.js.map +1 -1
  10. package/dist/components/deprecation-reason.js +2 -3
  11. package/dist/components/deprecation-reason.js.map +1 -1
  12. package/dist/components/directive.js +2 -3
  13. package/dist/components/directive.js.map +1 -1
  14. package/dist/components/doc-explorer.js +5 -6
  15. package/dist/components/doc-explorer.js.map +1 -1
  16. package/dist/components/field-card.js +4 -5
  17. package/dist/components/field-card.js.map +1 -1
  18. package/dist/components/field-documentation.js +3 -4
  19. package/dist/components/field-documentation.js.map +1 -1
  20. package/dist/components/field-link.js +2 -3
  21. package/dist/components/field-link.js.map +1 -1
  22. package/dist/components/fields-list.js +6 -7
  23. package/dist/components/fields-list.js.map +1 -1
  24. package/dist/components/schema-documentation.js +4 -5
  25. package/dist/components/schema-documentation.js.map +1 -1
  26. package/dist/components/search-row.js +71 -85
  27. package/dist/components/search-row.js.map +1 -1
  28. package/dist/components/search.js +107 -123
  29. package/dist/components/search.js.map +1 -1
  30. package/dist/components/section.js +2 -3
  31. package/dist/components/section.js.map +1 -1
  32. package/dist/components/type-card.js +3 -4
  33. package/dist/components/type-card.js.map +1 -1
  34. package/dist/components/type-documentation.js +7 -8
  35. package/dist/components/type-documentation.js.map +1 -1
  36. package/dist/components/type-link.js +3 -4
  37. package/dist/components/type-link.js.map +1 -1
  38. package/dist/components/utils.js +1 -2
  39. package/dist/components/utils.js.map +1 -1
  40. package/dist/context.d.ts +3 -1
  41. package/dist/context.js +23 -20
  42. package/dist/context.js.map +1 -1
  43. package/dist/schema-reference.js +1 -2
  44. package/dist/schema-reference.js.map +1 -1
  45. package/dist/style.css +42 -119
  46. package/package.json +18 -16
@@ -1,10 +1,10 @@
1
+ import { c } from "react-compiler-runtime";
2
+ import { MarkdownContent } from "@graphiql/react";
1
3
  import { DefaultValue } from "./default-value.js";
2
4
  import { TypeLink } from "./type-link.js";
3
5
  /* empty css */
4
- import { c } from "react-compiler-runtime";
5
- import { MarkdownContent } from "@graphiql/react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
- //#region src/components/argument.tsx
7
+ // src/components/argument.tsx
8
8
  var Argument = (t0) => {
9
9
  const $ = c(19);
10
10
  const { arg, showDefaultValue, inline } = t0;
@@ -86,7 +86,6 @@ var Argument = (t0) => {
86
86
  } else t7 = $[18];
87
87
  return t7;
88
88
  };
89
- //#endregion
90
89
  export { Argument };
91
90
 
92
91
  //# sourceMappingURL=argument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"argument.js","names":["FC","GraphQLArgument","MarkdownContent","DefaultValue","TypeLink","ArgumentProps","arg","showDefaultValue","inline","Argument","t0","$","_c","t1","name","t2","type","t3","t4","definition","t5","description","t6","deprecationReason","t7"],"sources":["../../src/components/argument.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { GraphQLArgument } from 'graphql';\nimport { MarkdownContent } from '@graphiql/react';\nimport { DefaultValue } from './default-value';\nimport { TypeLink } from './type-link';\nimport './argument.css';\n\ntype ArgumentProps = {\n /**\n * The argument that should be rendered.\n */\n arg: GraphQLArgument;\n /**\n * Toggle if the default value for the argument is shown (if there is one)\n * @default false\n */\n showDefaultValue?: boolean;\n /**\n * Toggle whether to render the whole argument including description and\n * deprecation reason (`false`) or to just render the argument name, type,\n * and default value in a single line (`true`).\n * @default false\n */\n inline?: boolean;\n};\n\nexport const Argument: FC<ArgumentProps> = ({\n arg,\n showDefaultValue,\n inline,\n}) => {\n const definition = (\n <span>\n <span className=\"graphiql-doc-explorer-argument-name\">{arg.name}</span>\n {': '}\n <TypeLink type={arg.type} />\n {showDefaultValue !== false && <DefaultValue field={arg} />}\n </span>\n );\n if (inline) {\n return definition;\n }\n return (\n <div className=\"graphiql-doc-explorer-argument\">\n {definition}\n {arg.description ? (\n <MarkdownContent type=\"description\">{arg.description}</MarkdownContent>\n ) : null}\n {arg.deprecationReason ? (\n <div className=\"graphiql-doc-explorer-argument-deprecation\">\n <div className=\"graphiql-doc-explorer-argument-deprecation-label\">\n Deprecated\n </div>\n <MarkdownContent type=\"deprecation\">\n {arg.deprecationReason}\n </MarkdownContent>\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;AA0BA,IAAaS,YAA8BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAN,KAAAC,kBAAAC,WAAAE;CAI3C,IAAAG;CAAA,IAAAF,EAAA,OAAAL,IAAAQ,MAAA;EAGKD,KAAA,oBAAA,QAAA;GAAgB,WAAA;GAAuCP,UAAAA,IAAGQ;EAAa,CAAA;EAAAH,EAAA,KAAAL,IAAAQ;EAAAH,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAI;CAAA,IAAAJ,EAAA,OAAAL,IAAAU,MAAA;EAEvED,KAAA,oBAAC,UAAD,EAAgB,MAAAT,IAAGU,KAAK,CAAA;EAAIL,EAAA,KAAAL,IAAAU;EAAAL,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAL,OAAAK,EAAA,OAAAJ,kBAAA;EAC3BU,KAAAV,qBAAqB,SAAS,oBAAC,cAAD,EAAqBD,OAAAA,IAAG,CAAA;EAAIK,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAE,MAAAF,EAAA,OAAAI,MAAAJ,EAAA,OAAAM,IAAA;EAJ7DC,KAAA,qBAAA,QAAA,EAAA,UAAA;GACEL;GACC;GACDE;GACCE;EACI,EAAA,CAAA;EAAAN,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;EAAAN,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CANT,MAAAQ,aACED;CAOF,IAAIV,QAAM,OACDW;CACR,IAAAC;CAAA,IAAAT,EAAA,QAAAL,IAAAe,aAAA;EAIID,KAAAd,IAAGe,cACF,oBAAC,iBAAD;GAAsB,MAAA;GAAef,UAAAA,IAAGe;EAAxB,CAAA,IADjB;EAEOV,EAAA,MAAAL,IAAAe;EAAAV,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,QAAAL,IAAAiB,mBAAA;EACPD,KAAAhB,IAAGiB,oBACF,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA,CACE,oBAAA,OAAA;IAAe,WAAA;IAAmD,UAAA;GAE5D,CAAA,GACN,oBAAC,iBAAD;IAAsB,MAAA;IACnBjB,UAAAA,IAAGiB;GADU,CAAA,CAGZ;EARP,CAAA,IAAA;EASOZ,EAAA,MAAAL,IAAAiB;EAAAZ,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,QAAAQ,cAAAR,EAAA,QAAAS,MAAAT,EAAA,QAAAW,IAAA;EAdVE,KAAA,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA;IACGL;IACAC;IAGAE;GAUG;;EAAAX,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;EAAAT,EAAA,MAAAW;EAAAX,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OAfNa;AAeM"}
1
+ {"version":3,"file":"argument.js","names":["arg","showDefaultValue","inline","Argument","t0","$","_c","t1","name","t2","type","t3","t4","definition","t5","description","t6","deprecationReason","t7","_jsx","_jsxs"],"sources":["../../src/components/argument.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { GraphQLArgument } from 'graphql';\nimport { MarkdownContent } from '@graphiql/react';\nimport { DefaultValue } from './default-value';\nimport { TypeLink } from './type-link';\nimport './argument.css';\n\ntype ArgumentProps = {\n /**\n * The argument that should be rendered.\n */\n arg: GraphQLArgument;\n /**\n * Toggle if the default value for the argument is shown (if there is one)\n * @default false\n */\n showDefaultValue?: boolean;\n /**\n * Toggle whether to render the whole argument including description and\n * deprecation reason (`false`) or to just render the argument name, type,\n * and default value in a single line (`true`).\n * @default false\n */\n inline?: boolean;\n};\n\nexport const Argument: FC<ArgumentProps> = ({\n arg,\n showDefaultValue,\n inline,\n}) => {\n const definition = (\n <span>\n <span className=\"graphiql-doc-explorer-argument-name\">{arg.name}</span>\n {': '}\n <TypeLink type={arg.type} />\n {showDefaultValue !== false && <DefaultValue field={arg} />}\n </span>\n );\n if (inline) {\n return definition;\n }\n return (\n <div className=\"graphiql-doc-explorer-argument\">\n {definition}\n {arg.description ? (\n <MarkdownContent type=\"description\">{arg.description}</MarkdownContent>\n ) : null}\n {arg.deprecationReason ? (\n <div className=\"graphiql-doc-explorer-argument-deprecation\">\n <div className=\"graphiql-doc-explorer-argument-deprecation-label\">\n Deprecated\n </div>\n <MarkdownContent type=\"deprecation\">\n {arg.deprecationReason}\n </MarkdownContent>\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;AA0BA,IAAaG,YAA8BC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAN,KAAAC,kBAAAC,WAAAE;CAI3C,IAAAG;CAAA,IAAAF,EAAA,OAAAL,IAAAQ,MAAA;EAGKD,KAAAY,oBAAA,QAAA;GAAgB,WAAA;GAAuCnB,UAAAA,IAAGQ;EAAY,CAAA;EAACH,EAAA,KAAAL,IAAAQ;EAAAH,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAI;CAAA,IAAAJ,EAAA,OAAA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Z,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,QAAAQ,cAAAR,EAAA,QAAAS,MAAAT,EAAA,QAAAW,IAAA;EAdVE,KAAAE,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA;IACGP;IACAC;IAGAE;GAUE;;EAACX,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;EAAAT,EAAA,MAAAW;EAAAX,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OAfNa;AAeM"}
@@ -1,13 +1,14 @@
1
- import { renderType } from "./utils.js";
2
- import { TypeLink } from "./type-link.js";
3
- import { DeprecationReason } from "./deprecation-reason.js";
4
- /* empty css */
5
1
  import { c } from "react-compiler-runtime";
2
+ import { useState } from "react";
3
+ import { print } from "graphql";
6
4
  import { Button, ChevronDownIcon, ChevronUpIcon } from "@graphiql/react";
7
- import { astFromValue, print } from "graphql";
5
+ import { getDefaultValueAST } from "./default-value.js";
6
+ import { DeprecationReason } from "./deprecation-reason.js";
7
+ import { TypeLink } from "./type-link.js";
8
+ import { renderType } from "./utils.js";
9
+ /* empty css */
8
10
  import { jsx, jsxs } from "react/jsx-runtime";
9
- import { useState } from "react";
10
- //#region src/components/arguments-list.tsx
11
+ // src/components/arguments-list.tsx
11
12
  var ArgumentsList = (t0) => {
12
13
  const $ = c(18);
13
14
  const { title, args } = t0;
@@ -97,7 +98,7 @@ var ShowDeprecatedArgumentsButton = (t0) => {
97
98
  return t1;
98
99
  };
99
100
  var ArgumentRow = (t0) => {
100
- const $ = c(34);
101
+ const $ = c(31);
101
102
  const { arg } = t0;
102
103
  let t1;
103
104
  let t2;
@@ -105,71 +106,68 @@ var ArgumentRow = (t0) => {
105
106
  let t4;
106
107
  let t5;
107
108
  let t6;
108
- if ($[0] !== arg.defaultValue || $[1] !== arg.deprecationReason || $[2] !== arg.name || $[3] !== arg.type) {
109
- const defaultAst = arg.defaultValue === void 0 ? null : astFromValue(arg.defaultValue, arg.type);
109
+ if ($[0] !== arg) {
110
+ const defaultAst = getDefaultValueAST(arg);
110
111
  const t7 = Boolean(arg.deprecationReason) ? "graphiql-doc-explorer-argument--deprecated" : "";
111
112
  let t8;
112
- if ($[10] !== t7) {
113
+ if ($[7] !== t7) {
113
114
  t8 = ["graphiql-doc-explorer-argument", t7].filter(Boolean);
114
- $[10] = t7;
115
- $[11] = t8;
116
- } else t8 = $[11];
115
+ $[7] = t7;
116
+ $[8] = t8;
117
+ } else t8 = $[8];
117
118
  t6 = t8.join(" ");
118
119
  t1 = "graphiql-doc-explorer-argument-sig";
119
- if ($[12] !== arg.name) {
120
+ if ($[9] !== arg.name) {
120
121
  t2 = /* @__PURE__ */ jsx("span", {
121
122
  className: "graphiql-doc-explorer-argument-name",
122
123
  children: arg.name
123
124
  });
124
- $[12] = arg.name;
125
- $[13] = t2;
126
- } else t2 = $[13];
127
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
125
+ $[9] = arg.name;
126
+ $[10] = t2;
127
+ } else t2 = $[10];
128
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
128
129
  t3 = /* @__PURE__ */ jsx("span", {
129
130
  className: "graphiql-doc-explorer-argument-colon",
130
131
  "aria-hidden": "true",
131
132
  children: ":"
132
133
  });
133
- $[14] = t3;
134
- } else t3 = $[14];
134
+ $[11] = t3;
135
+ } else t3 = $[11];
135
136
  let t9;
136
- if ($[15] !== arg.type) {
137
+ if ($[12] !== arg.type) {
137
138
  t9 = renderType(arg.type, _temp3);
138
- $[15] = arg.type;
139
- $[16] = t9;
140
- } else t9 = $[16];
141
- if ($[17] !== t9) {
139
+ $[12] = arg.type;
140
+ $[13] = t9;
141
+ } else t9 = $[13];
142
+ if ($[14] !== t9) {
142
143
  t4 = /* @__PURE__ */ jsx("span", {
143
144
  className: "graphiql-doc-explorer-argument-type",
144
145
  children: t9
145
146
  });
146
- $[17] = t9;
147
- $[18] = t4;
148
- } else t4 = $[18];
147
+ $[14] = t9;
148
+ $[15] = t4;
149
+ } else t4 = $[15];
149
150
  t5 = defaultAst && /* @__PURE__ */ jsxs("span", {
150
151
  className: "graphiql-doc-explorer-argument-default",
151
152
  children: ["= ", print(defaultAst)]
152
153
  });
153
- $[0] = arg.defaultValue;
154
- $[1] = arg.deprecationReason;
155
- $[2] = arg.name;
156
- $[3] = arg.type;
157
- $[4] = t1;
158
- $[5] = t2;
159
- $[6] = t3;
160
- $[7] = t4;
161
- $[8] = t5;
162
- $[9] = t6;
154
+ $[0] = arg;
155
+ $[1] = t1;
156
+ $[2] = t2;
157
+ $[3] = t3;
158
+ $[4] = t4;
159
+ $[5] = t5;
160
+ $[6] = t6;
163
161
  } else {
164
- t1 = $[4];
165
- t2 = $[5];
166
- t3 = $[6];
167
- t4 = $[7];
168
- t5 = $[8];
169
- t6 = $[9];
162
+ t1 = $[1];
163
+ t2 = $[2];
164
+ t3 = $[3];
165
+ t4 = $[4];
166
+ t5 = $[5];
167
+ t6 = $[6];
170
168
  }
171
169
  let t7;
172
- if ($[19] !== t1 || $[20] !== t2 || $[21] !== t3 || $[22] !== t4 || $[23] !== t5) {
170
+ if ($[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5) {
173
171
  t7 = /* @__PURE__ */ jsxs("div", {
174
172
  className: t1,
175
173
  children: [
@@ -179,33 +177,33 @@ var ArgumentRow = (t0) => {
179
177
  t5
180
178
  ]
181
179
  });
182
- $[19] = t1;
183
- $[20] = t2;
184
- $[21] = t3;
185
- $[22] = t4;
186
- $[23] = t5;
187
- $[24] = t7;
188
- } else t7 = $[24];
180
+ $[16] = t1;
181
+ $[17] = t2;
182
+ $[18] = t3;
183
+ $[19] = t4;
184
+ $[20] = t5;
185
+ $[21] = t7;
186
+ } else t7 = $[21];
189
187
  let t8;
190
- if ($[25] !== arg.description) {
188
+ if ($[22] !== arg.description) {
191
189
  t8 = arg.description && /* @__PURE__ */ jsx("div", {
192
190
  className: "graphiql-doc-explorer-argument-desc",
193
191
  children: arg.description
194
192
  });
195
- $[25] = arg.description;
196
- $[26] = t8;
197
- } else t8 = $[26];
193
+ $[22] = arg.description;
194
+ $[23] = t8;
195
+ } else t8 = $[23];
198
196
  let t9;
199
- if ($[27] !== arg.deprecationReason) {
197
+ if ($[24] !== arg.deprecationReason) {
200
198
  t9 = arg.deprecationReason ? /* @__PURE__ */ jsx(DeprecationReason, {
201
199
  preview: false,
202
200
  children: arg.deprecationReason
203
201
  }) : null;
204
- $[27] = arg.deprecationReason;
205
- $[28] = t9;
206
- } else t9 = $[28];
202
+ $[24] = arg.deprecationReason;
203
+ $[25] = t9;
204
+ } else t9 = $[25];
207
205
  let t10;
208
- if ($[29] !== t6 || $[30] !== t7 || $[31] !== t8 || $[32] !== t9) {
206
+ if ($[26] !== t6 || $[27] !== t7 || $[28] !== t8 || $[29] !== t9) {
209
207
  t10 = /* @__PURE__ */ jsxs("div", {
210
208
  className: t6,
211
209
  children: [
@@ -214,12 +212,12 @@ var ArgumentRow = (t0) => {
214
212
  t9
215
213
  ]
216
214
  });
217
- $[29] = t6;
218
- $[30] = t7;
219
- $[31] = t8;
220
- $[32] = t9;
221
- $[33] = t10;
222
- } else t10 = $[33];
215
+ $[26] = t6;
216
+ $[27] = t7;
217
+ $[28] = t8;
218
+ $[29] = t9;
219
+ $[30] = t10;
220
+ } else t10 = $[30];
223
221
  return t10;
224
222
  };
225
223
  function _temp(e) {
@@ -231,7 +229,6 @@ function _temp2(arg) {
231
229
  function _temp3(namedType) {
232
230
  return /* @__PURE__ */ jsx(TypeLink, { type: namedType });
233
231
  }
234
- //#endregion
235
232
  export { ArgumentsList, ShowDeprecatedArgumentsButton };
236
233
 
237
234
  //# sourceMappingURL=arguments-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"arguments-list.js","names":["FC","useState","astFromValue","print","GraphQLArgument","Button","ChevronDownIcon","ChevronUpIcon","DeprecationReason","TypeLink","renderType","ArgumentsListProps","title","args","ArgumentsList","t0","$","_c","expanded","setExpanded","length","t1","Symbol","for","_temp","t2","t3","t4","t5","t6","map","_temp2","t7","ShowDeprecatedArgumentsButtonProps","onClick","ShowDeprecatedArgumentsButton","ArgumentRowProps","arg","ArgumentRow","defaultValue","deprecationReason","name","type","defaultAst","undefined","isDeprecated","Boolean","t8","filter","join","t9","_temp3","description","t10","e","namedType"],"sources":["../../src/components/arguments-list.tsx"],"sourcesContent":["import { FC, useState } from 'react';\nimport { astFromValue, print, type GraphQLArgument } from 'graphql';\nimport { Button, ChevronDownIcon, ChevronUpIcon } from '@graphiql/react';\nimport { DeprecationReason } from './deprecation-reason';\nimport { TypeLink } from './type-link';\nimport { renderType } from './utils';\nimport './arguments-list.css';\n\ntype ArgumentsListProps = {\n title: 'ARGUMENTS' | 'DEPRECATED ARGUMENTS';\n args: GraphQLArgument[];\n};\n\nexport const ArgumentsList: FC<ArgumentsListProps> = ({ title, args }) => {\n const [expanded, setExpanded] = useState(true);\n\n if (args.length === 0) {\n return null;\n }\n\n return (\n <div className=\"graphiql-doc-explorer-arguments-list\">\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-arguments-list-header\"\n onClick={() => setExpanded(e => !e)}\n aria-expanded={expanded}\n >\n {expanded ? (\n <ChevronDownIcon aria-hidden=\"true\" />\n ) : (\n <ChevronUpIcon aria-hidden=\"true\" />\n )}\n <span>\n {title}{' '}\n <span className=\"graphiql-doc-explorer-arguments-list-count\">\n · {args.length}\n </span>\n </span>\n </button>\n {expanded && (\n <div className=\"graphiql-doc-explorer-arguments-list-body\">\n {args.map(arg => (\n <ArgumentRow key={arg.name} arg={arg} />\n ))}\n </div>\n )}\n </div>\n );\n};\n\ntype ShowDeprecatedArgumentsButtonProps = {\n onClick: () => void;\n};\n\nexport const ShowDeprecatedArgumentsButton: FC<\n ShowDeprecatedArgumentsButtonProps\n> = ({ onClick }) => (\n <Button\n type=\"button\"\n onClick={onClick}\n className=\"graphiql-doc-explorer-arguments-list-show-deprecated\"\n >\n Show Deprecated Arguments\n </Button>\n);\n\ntype ArgumentRowProps = {\n arg: GraphQLArgument;\n};\n\nconst ArgumentRow: FC<ArgumentRowProps> = ({ arg }) => {\n const defaultAst =\n arg.defaultValue === undefined\n ? null\n : astFromValue(arg.defaultValue, arg.type);\n const isDeprecated = Boolean(arg.deprecationReason);\n\n return (\n <div\n className={[\n 'graphiql-doc-explorer-argument',\n isDeprecated ? 'graphiql-doc-explorer-argument--deprecated' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <div className=\"graphiql-doc-explorer-argument-sig\">\n <span className=\"graphiql-doc-explorer-argument-name\">{arg.name}</span>\n <span\n className=\"graphiql-doc-explorer-argument-colon\"\n aria-hidden=\"true\"\n >\n :\n </span>\n <span className=\"graphiql-doc-explorer-argument-type\">\n {renderType(arg.type, namedType => (\n <TypeLink type={namedType} />\n ))}\n </span>\n {defaultAst && (\n <span className=\"graphiql-doc-explorer-argument-default\">\n = {print(defaultAst)}\n </span>\n )}\n </div>\n {arg.description && (\n <div className=\"graphiql-doc-explorer-argument-desc\">\n {arg.description}\n </div>\n )}\n {arg.deprecationReason ? (\n <DeprecationReason preview={false}>\n {arg.deprecationReason}\n </DeprecationReason>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;AAaA,IAAac,iBAAwCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAL,OAAAC,SAAAE;CACpD,MAAA,CAAAG,UAAAC,eAAgClB,SAAS,IAAI;CAE7C,IAAIY,KAAIO,WAAY,GAAC,OACZ;CACR,IAAAC;CAAA,IAAAL,EAAA,OAAAM,OAAAC,IAAA,2BAAA,GAAA;EAOcF,WAAMF,YAAYK,KAAO;EAACR,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAE,UAAA;EAGlCO,KAAAP,WACC,oBAAC,iBAAD,EAA6B,eAAA,OAAM,CAAA,IAEnC,oBAAC,eAAD,EAA2B,eAAA,OAAM,C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{"version":3,"file":"arguments-list.js","names":["useState","print","getDefaultValueAST","renderType","title","args","ArgumentsList","t0","$","_c","expanded","setExpanded","length","t1","Symbol","for","_temp","t2","t3","t4","t5","t6","map","_temp2","t7","onClick","ShowDeprecatedArgumentsButton","arg","ArgumentRow","defaultAst","isDeprecated","Boolean","deprecationReason","t8","filter","join","name","t9","type","_temp3","description","t10","e","namedType","_jsx","_jsxs"],"sources":["../../src/components/arguments-list.tsx"],"sourcesContent":["import { FC, useState } from 'react';\nimport { print, type GraphQLArgument } from 'graphql';\nimport { Button, ChevronDownIcon, ChevronUpIcon } from '@graphiql/react';\nimport { getDefaultValueAST } from './default-value';\nimport { DeprecationReason } from './deprecation-reason';\nimport { TypeLink } from './type-link';\nimport { renderType } from './utils';\nimport './arguments-list.css';\n\ntype ArgumentsListProps = {\n title: 'ARGUMENTS' | 'DEPRECATED ARGUMENTS';\n args: GraphQLArgument[];\n};\n\nexport const ArgumentsList: FC<ArgumentsListProps> = ({ title, args }) => {\n const [expanded, setExpanded] = useState(true);\n\n if (args.length === 0) {\n return null;\n }\n\n return (\n <div className=\"graphiql-doc-explorer-arguments-list\">\n <button\n type=\"button\"\n className=\"graphiql-doc-explorer-arguments-list-header\"\n onClick={() => setExpanded(e => !e)}\n aria-expanded={expanded}\n >\n {expanded ? (\n <ChevronDownIcon aria-hidden=\"true\" />\n ) : (\n <ChevronUpIcon aria-hidden=\"true\" />\n )}\n <span>\n {title}{' '}\n <span className=\"graphiql-doc-explorer-arguments-list-count\">\n · {args.length}\n </span>\n </span>\n </button>\n {expanded && (\n <div className=\"graphiql-doc-explorer-arguments-list-body\">\n {args.map(arg => (\n <ArgumentRow key={arg.name} arg={arg} />\n ))}\n </div>\n )}\n </div>\n );\n};\n\ntype ShowDeprecatedArgumentsButtonProps = {\n onClick: () => void;\n};\n\nexport const ShowDeprecatedArgumentsButton: FC<\n ShowDeprecatedArgumentsButtonProps\n> = ({ onClick }) => (\n <Button\n type=\"button\"\n onClick={onClick}\n className=\"graphiql-doc-explorer-arguments-list-show-deprecated\"\n >\n Show Deprecated Arguments\n </Button>\n);\n\ntype ArgumentRowProps = {\n arg: GraphQLArgument;\n};\n\nconst ArgumentRow: FC<ArgumentRowProps> = ({ arg }) => {\n const defaultAst = getDefaultValueAST(arg);\n const isDeprecated = Boolean(arg.deprecationReason);\n\n return (\n <div\n className={[\n 'graphiql-doc-explorer-argument',\n isDeprecated ? 'graphiql-doc-explorer-argument--deprecated' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <div className=\"graphiql-doc-explorer-argument-sig\">\n <span className=\"graphiql-doc-explorer-argument-name\">{arg.name}</span>\n <span\n className=\"graphiql-doc-explorer-argument-colon\"\n aria-hidden=\"true\"\n >\n :\n </span>\n <span className=\"graphiql-doc-explorer-argument-type\">\n {renderType(arg.type, namedType => (\n <TypeLink type={namedType} />\n ))}\n </span>\n {defaultAst && (\n <span className=\"graphiql-doc-explorer-argument-default\">\n = {print(defaultAst)}\n </span>\n )}\n </div>\n {arg.description && (\n <div className=\"graphiql-doc-explorer-argument-desc\">\n {arg.description}\n </div>\n )}\n {arg.deprecationReason ? (\n <DeprecationReason preview={false}>\n {arg.deprecationReason}\n </DeprecationReason>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAcA,IAAaM,iBAAwCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAL,OAAAC,SAAAE;CACpD,MAAA,CAAAG,UAAAC,eAAgCX,SAAS,IAAI;CAE7C,IAAIK,KAAIO,WAAY,GAAC,OACZ;CACR,IAAAC;CAAA,IAAAL,EAAA,OAAAM,OAAAC,IAAA,2BAAA,GAAA;EAOcF,WAAMF,YAAYK,KAAO;EAACR,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAE,UAAA;EAGlCO,KAAAP,WACCkC,oBAAC,iBAAD,EAA6B,eAAA,OAAO,CAAA,IAEpCA,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;CAAA,IAAAzB,EAAA,QAAAmB,IAAAa,aAAA;EACLP,KAAAN,IAAGa,eACFI,oBAAA,OAAA;GAAe,WAAA;GACZjB,UAAAA,IAAGa;EACD,CAAA;EACNhC,EAAA,MAAAmB,IAAAa;EAAAhC,EAAA,MAAAyB;CAAA,OAAAA,KAAAzB,EAAA;CAAA,IAAA6B;CAAA,IAAA7B,EAAA,QAAAmB,IAAAK,mBAAA;EACAK,KAAAV,IAAGK,oBACFY,oBAAC,mBAAD;GAA4B,SAAA;GACzBjB,UAAAA,IAAGK;EACa,CAAA,IAHpB;EAIOxB,EAAA,MAAAmB,IAAAK;EAAAxB,EAAA,MAAA6B;CAAA,OAAAA,KAAA7B,EAAA;CAAA,IAAAiC;CAAA,IAAAjC,EAAA,QAAAa,MAAAb,EAAA,QAAAgB,MAAAhB,EAAA,QAAAyB,MAAAzB,EAAA,QAAA6B,IAAA;EApCVI,MAAAI,qBAAA,OAAA;GACa,WAAAxB;GADb,UAAA;IAQEG;IAmBCS;IAKAI;GAKE;;EAAC7B,EAAA,MAAAa;EAAAb,EAAA,MAAAgB;EAAAhB,EAAA,MAAAyB;EAAAzB,EAAA,MAAA6B;EAAA7B,EAAA,MAAAiC;CAAA,OAAAA,MAAAjC,EAAA;CAAA,OArCNiC;AAqCM;AApG2C,SAAAzB,MAAA0B,GAAA;CAAA,OAYb,CAACA;AAAC;AAZW,SAAAnB,OAAAI,KAAA;CAAA,OA8BzCiB,oBAAC,aAAD,EAAiCjB,IAAK,GAApBA,IAAGS,IAAiB;AAAE;AA4BV,SAAAG,OAAAI,WAAA;CAAA,OAuB9BC,oBAAC,UAAD,EAAgBD,MAAAA,UAAW,CAAA;AAAE"}
@@ -1,7 +1,7 @@
1
- /* empty css */
2
1
  import { c } from "react-compiler-runtime";
2
+ /* empty css */
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/components/breadcrumb.tsx
4
+ // src/components/breadcrumb.tsx
5
5
  var Breadcrumb = (t0) => {
6
6
  const $ = c(8);
7
7
  const { navStack, onNavigateTo } = t0;
@@ -55,7 +55,6 @@ var Breadcrumb = (t0) => {
55
55
  } else t2 = $[7];
56
56
  return t2;
57
57
  };
58
- //#endregion
59
58
  export { Breadcrumb };
60
59
 
61
60
  //# sourceMappingURL=breadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","names":["FC","DocExplorerNavStack","BreadcrumbProps","navStack","onNavigateTo","index","Breadcrumb","t0","$","_c","length","t1","t2","item","isLast","depthClass","name","event","preventDefault","map"],"sources":["../../src/components/breadcrumb.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { DocExplorerNavStack } from '../context';\nimport './breadcrumb.css';\n\ntype BreadcrumbProps = {\n navStack: DocExplorerNavStack;\n onNavigateTo: (index: number) => void;\n};\n\nexport const Breadcrumb: FC<BreadcrumbProps> = ({ navStack, onNavigateTo }) => {\n if (navStack.length <= 1) {\n return null;\n }\n\n return (\n <nav\n className=\"graphiql-doc-explorer-breadcrumb\"\n aria-label=\"Schema navigation path\"\n >\n {navStack.map((item, index) => {\n const isLast = index === navStack.length - 1;\n const depthClass =\n index === 0\n ? 'graphiql-doc-explorer-breadcrumb-root'\n : isLast\n ? 'graphiql-doc-explorer-breadcrumb-current'\n : 'graphiql-doc-explorer-breadcrumb-intermediate';\n\n return (\n <span\n key={index}\n className=\"graphiql-doc-explorer-breadcrumb-segment\"\n >\n {index > 0 && (\n <span\n className=\"graphiql-doc-explorer-breadcrumb-sep\"\n aria-hidden=\"true\"\n >\n ›\n </span>\n )}\n {isLast ? (\n <span className={depthClass}>{item.name}</span>\n ) : (\n <a\n href=\"#\"\n className={depthClass}\n onClick={event => {\n event.preventDefault();\n onNavigateTo(index);\n }}\n aria-label={`Go back to ${item.name}`}\n >\n {item.name}\n </a>\n )}\n </span>\n );\n })}\n </nav>\n );\n};\n"],"mappings":";;;;AASA,IAAaM,cAAkCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MA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breadcrumb","t0","$","_c","length","t1","t2","item","isLast","depthClass","name","event","preventDefault","map","_jsxs","_jsx"],"sources":["../../src/components/breadcrumb.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { DocExplorerNavStack } from '../context';\nimport './breadcrumb.css';\n\ntype BreadcrumbProps = {\n navStack: DocExplorerNavStack;\n onNavigateTo: (index: number) => void;\n};\n\nexport const Breadcrumb: FC<BreadcrumbProps> = ({ navStack, onNavigateTo }) => {\n if (navStack.length <= 1) {\n return null;\n }\n\n return (\n <nav\n className=\"graphiql-doc-explorer-breadcrumb\"\n aria-label=\"Schema navigation path\"\n >\n {navStack.map((item, index) => {\n const isLast = index === navStack.length - 1;\n const depthClass =\n index === 0\n ? 'graphiql-doc-explorer-breadcrumb-root'\n : isLast\n ? 'graphiql-doc-explorer-breadcrumb-current'\n : 'graphiql-doc-explorer-breadcrumb-intermediate';\n\n return (\n <span\n key={index}\n className=\"graphiql-doc-explorer-breadcrumb-segment\"\n >\n {index > 0 && (\n <span\n className=\"graphiql-doc-explorer-breadcrumb-sep\"\n aria-hidden=\"true\"\n >\n ›\n </span>\n )}\n {isLast ? (\n <span className={depthClass}>{item.name}</span>\n ) : (\n <a\n href=\"#\"\n className={depthClass}\n onClick={event => {\n event.preventDefault();\n onNavigateTo(index);\n }}\n aria-label={`Go back to ${item.name}`}\n >\n {item.name}\n </a>\n )}\n </span>\n );\n })}\n </nav>\n );\n};\n"],"mappings":";;;;AASA,IAAaG,cAAkCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAN,UAAAC,iBAAAG;CAC9C,IAAIJ,SAAQO,UAAW,GAAC,OACf;CACR,IAAAC;CAAA,IAAAH,EAAA,OAAAL,YAAAK,EAAA,OAAAJ,cAAA;EAAA,IAAAQ;EAAA,IAAAJ,EAAA,OAAAL,SAAAO,UAAAF,EAAA,OAAAJ,cAAA;GAOiBQ,MAAAC,MAAAR,UAAA;IACZ,MAAAS,SAAeT,UAAUF,SAAQO,SAAU;IAC3C,MAAAK,aACEV,UAAU,IAAV,0CAEIS,SAAA,6CAAA;IAEkD,OAGtDM,qBAAA,QAAA;KAEY,WAAA;KAFZ,UAAA,CAIGf,QAAQ,KACPgB,oBAAA,QAAA;MACY,WAAA;MACE,eAAA;MACb,UAAA;KAEK,CAAA,GAEPP,SACCO,oBAAA,QAAA;MAAiBN,WAAAA;MAAaF,UAAAA,KAAIG;KAAY,CAAA,IAE9CK,oBAAA,KAAA;MACO,MAAA;MACMN,WAAAA;MACF,UAAAE,UAAA;OACPA,MAAKC,eAAgB;OACrBd,aAAaC,KAAK;MAAC;MAET,cAAA,cAAcQ,KAAIG;MAE7BH,UAAAA,KAAIG;KACJ,CAAA,CAED;IA1BCX,GAAAA,KA0BD;GAAC;GAEVG,EAAA,KAAAL,SAAAO;GAAAF,EAAA,KAAAJ;GAAAI,EAAA,KAAAI;EAAA,OAAAA,KAAAJ,EAAA;EAvCAG,KAAAR,SAAQgB,IAAKP,EAuCb;EAACJ,EAAA,KAAAL;EAAAK,EAAA,KAAAJ;EAAAI,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,IAAAI;CAAA,IAAAJ,EAAA,OAAAG,IAAA;EA3CJC,KAAAS,oBAAA,OAAA;GACY,WAAA;GACC,cAAA;GAEVV,UAAAA;EAwCE,CAAA;EAACH,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OA5CNI;AA4CM"}
@@ -1,5 +1,13 @@
1
1
  import { FC } from 'react';
2
+ import { ValueNode } from 'graphql';
2
3
  import { DocExplorerFieldDef } from '../context';
4
+ /**
5
+ * graphql 17 stores defaults in `default`: `{ literal }` from SDL and
6
+ * introspection, `{ value }` from code. It leaves the deprecated
7
+ * `defaultValue` undefined in the `literal` case. graphql 16 has only
8
+ * `defaultValue`.
9
+ */
10
+ export declare const getDefaultValueAST: (field: DocExplorerFieldDef) => ValueNode | null | undefined;
3
11
  type DefaultValueProps = {
4
12
  /**
5
13
  * The field or argument for which to render the default value.
@@ -1,24 +1,36 @@
1
- /* empty css */
2
1
  import { c } from "react-compiler-runtime";
3
2
  import { astFromValue, print } from "graphql";
3
+ /* empty css */
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/default-value.tsx
5
+ // src/components/default-value.tsx
6
6
  var printDefault = (ast) => {
7
7
  if (!ast) return "";
8
8
  return print(ast);
9
9
  };
10
+ /**
11
+ * graphql 17 stores defaults in `default`: `{ literal }` from SDL and
12
+ * introspection, `{ value }` from code. It leaves the deprecated
13
+ * `defaultValue` undefined in the `literal` case. graphql 16 has only
14
+ * `defaultValue`.
15
+ */
16
+ var getDefaultValueAST = (field) => {
17
+ if (!("defaultValue" in field)) return null;
18
+ const { default: defaultInput } = field;
19
+ if (defaultInput) return defaultInput.literal ?? astFromValue(defaultInput.value, field.type);
20
+ if (field.defaultValue === void 0) return null;
21
+ return astFromValue(field.defaultValue, field.type);
22
+ };
10
23
  var DefaultValue = (t0) => {
11
- const $ = c(12);
24
+ const $ = c(11);
12
25
  const { field } = t0;
13
- if (!("defaultValue" in field) || field.defaultValue === void 0) return null;
14
26
  let t1;
15
27
  let t2;
16
28
  let t3;
17
29
  let t4;
18
- if ($[0] !== field.defaultValue || $[1] !== field.type) {
30
+ if ($[0] !== field) {
19
31
  t4 = Symbol.for("react.early_return_sentinel");
20
32
  bb0: {
21
- const ast = astFromValue(field.defaultValue, field.type);
33
+ const ast = getDefaultValueAST(field);
22
34
  if (!ast) {
23
35
  t4 = null;
24
36
  break bb0;
@@ -27,39 +39,37 @@ var DefaultValue = (t0) => {
27
39
  t1 = "graphiql-doc-explorer-default-value";
28
40
  t2 = printDefault(ast);
29
41
  }
30
- $[0] = field.defaultValue;
31
- $[1] = field.type;
32
- $[2] = t1;
33
- $[3] = t2;
34
- $[4] = t3;
35
- $[5] = t4;
42
+ $[0] = field;
43
+ $[1] = t1;
44
+ $[2] = t2;
45
+ $[3] = t3;
46
+ $[4] = t4;
36
47
  } else {
37
- t1 = $[2];
38
- t2 = $[3];
39
- t3 = $[4];
40
- t4 = $[5];
48
+ t1 = $[1];
49
+ t2 = $[2];
50
+ t3 = $[3];
51
+ t4 = $[4];
41
52
  }
42
53
  if (t4 !== Symbol.for("react.early_return_sentinel")) return t4;
43
54
  let t5;
44
- if ($[6] !== t1 || $[7] !== t2) {
55
+ if ($[5] !== t1 || $[6] !== t2) {
45
56
  t5 = /* @__PURE__ */ jsx("span", {
46
57
  className: t1,
47
58
  children: t2
48
59
  });
49
- $[6] = t1;
50
- $[7] = t2;
51
- $[8] = t5;
52
- } else t5 = $[8];
60
+ $[5] = t1;
61
+ $[6] = t2;
62
+ $[7] = t5;
63
+ } else t5 = $[7];
53
64
  let t6;
54
- if ($[9] !== t3 || $[10] !== t5) {
65
+ if ($[8] !== t3 || $[9] !== t5) {
55
66
  t6 = /* @__PURE__ */ jsxs(Fragment, { children: [t3, t5] });
56
- $[9] = t3;
57
- $[10] = t5;
58
- $[11] = t6;
59
- } else t6 = $[11];
67
+ $[8] = t3;
68
+ $[9] = t5;
69
+ $[10] = t6;
70
+ } else t6 = $[10];
60
71
  return t6;
61
72
  };
62
- //#endregion
63
- export { DefaultValue };
73
+ export { DefaultValue, getDefaultValueAST };
64
74
 
65
75
  //# sourceMappingURL=default-value.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-value.js","names":["FC","astFromValue","print","ValueNode","DocExplorerFieldDef","printDefault","ast","DefaultValueProps","field","DefaultValue","t0","$","_c","defaultValue","undefined","t1","t2","t3","t4","type","Symbol","for","bb0","t5","t6"],"sources":["../../src/components/default-value.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { astFromValue, print, ValueNode } from 'graphql';\nimport type { DocExplorerFieldDef } from '../context';\nimport './default-value.css';\n\nconst printDefault = (ast?: ValueNode | null): string => {\n if (!ast) {\n return '';\n }\n return print(ast);\n};\n\ntype DefaultValueProps = {\n /**\n * The field or argument for which to render the default value.\n */\n field: DocExplorerFieldDef;\n};\n\nexport const DefaultValue: FC<DefaultValueProps> = ({ field }) => {\n if (!('defaultValue' in field) || field.defaultValue === undefined) {\n return null;\n }\n const ast = astFromValue(field.defaultValue, field.type);\n if (!ast) {\n return null;\n }\n return (\n <>\n {' = '}\n <span className=\"graphiql-doc-explorer-default-value\">\n {printDefault(ast)}\n </span>\n </>\n );\n};\n"],"mappings":";;;;;AAKA,IAAMK,gBAAgBC,QAAmC;CACvD,IAAI,CAACA,KACH,OAAO;CAET,OAAOJ,MAAMI,GAAG;AAClB;AASA,IAAaG,gBAAsCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAJ,UAAAE;CAClD,IAAI,EAAE,kBAAkBF,UAAUA,MAAKK,iBAAkBC,KAAAA,GAAS,OACzD;CACR,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAP,EAAA,OAAAH,MAAAK,gBAAAF,EAAA,OAAAH,MAAAW,MAAA;EAGQD,KAAAE,OAAIC,IAAJ,6BAAG;EAACC,KAAA;GAFb,MAAAhB,MAAYL,aAAaO,MAAKK,cAAeL,MAAKW,IAAK;GACvD,IAAI,CAACb,KAAG;IACCY,KAAA;IAAA,MAAAI;GAAI;GAIRL,KAAA;GACeF,KAAA;GACbC,KAAAX,aAAaC,GAAG;EAAC;EAAAK,EAAA,KAAAH,MAAAK;EAAAF,EAAA,KAAAH,MAAAW;EAAAR,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAA;EAAAH,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;EAAAM,KAAAN,EAAA;EAAAO,KAAAP,EAAA;CAAA;CAAA,IAAAO,OAAAE,OAAAC,IAAA,6BAAA,GAAA,OAAAH;CAAA,IAAAK;CAAA,IAAAZ,EAAA,OAAAI,MAAAJ,EAAA,OAAAK,IAAA;EADpBO,KAAA,oBAAA,QAAA;GAAgB,WAAAR;GACbC,UAAAA;EACI,CAAA;EAAAL,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAM,MAAAN,EAAA,QAAAY,IAAA;EAJTC,KAAA,qBAAA,UAAA,EAAA,UAAA,CACGP,IACDM,EAEO,EAAA,CAAA;EACNZ,EAAA,KAAAM;EAAAN,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OALHa;AAKG"}
1
+ {"version":3,"file":"default-value.js","names":["astFromValue","print","printDefault","ast","getDefaultValueAST","field","default","defaultInput","value","literal","type","defaultValue","undefined","DefaultValue","t0","$","_c","t1","t2","t3","t4","Symbol","for","bb0","t5","t6","_jsx","_jsxs","_Fragment"],"sources":["../../src/components/default-value.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport {\n astFromValue,\n print,\n type ConstValueNode,\n type ValueNode,\n} from 'graphql';\nimport type { DocExplorerFieldDef } from '../context';\nimport './default-value.css';\n\nconst printDefault = (ast?: ValueNode | null): string => {\n if (!ast) {\n return '';\n }\n return print(ast);\n};\n\n/**\n * graphql 17 stores defaults in `default`: `{ literal }` from SDL and\n * introspection, `{ value }` from code. It leaves the deprecated\n * `defaultValue` undefined in the `literal` case. graphql 16 has only\n * `defaultValue`.\n */\nexport const getDefaultValueAST = (\n field: DocExplorerFieldDef,\n): ValueNode | null | undefined => {\n if (!('defaultValue' in field)) {\n return null;\n }\n // Not in the graphql 16 types.\n const { default: defaultInput } = field as {\n default?: { value?: unknown; literal?: ConstValueNode };\n };\n if (defaultInput) {\n return defaultInput.literal ?? astFromValue(defaultInput.value, field.type);\n }\n if (field.defaultValue === undefined) {\n return null;\n }\n return astFromValue(field.defaultValue, field.type);\n};\n\ntype DefaultValueProps = {\n /**\n * The field or argument for which to render the default value.\n */\n field: DocExplorerFieldDef;\n};\n\nexport const DefaultValue: FC<DefaultValueProps> = ({ field }) => {\n const ast = getDefaultValueAST(field);\n if (!ast) {\n return null;\n }\n return (\n <>\n {' = '}\n <span className=\"graphiql-doc-explorer-default-value\">\n {printDefault(ast)}\n </span>\n </>\n );\n};\n"],"mappings":";;;;;AAUA,IAAME,gBAAgBC,QAAmC;CACvD,IAAI,CAACA,KACH,OAAO;CAET,OAAOF,MAAME,GAAG;AAClB;;;;;;;AAQA,IAAaC,sBACXC,UACiC;CACjC,IAAI,EAAE,kBAAkBA,QACtB,OAAO;CAGT,MAAM,EAAEC,SAASC,iBAAiBF;CAGlC,IAAIE,cACF,OAAOA,aAAaE,WAAWT,aAAaO,aAAaC,OAAOH,MAAMK,IAAI;CAE5E,IAAIL,MAAMM,iBAAiBC,KAAAA,GACzB,OAAO;CAET,OAAOZ,aAAaK,MAAMM,cAAcN,MAAMK,IAAI;AACpD;AASA,IAAaG,gBAAsCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAX,UAAAS;CAAS,IAAAG;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAL,EAAA,OAAAV,OAAA;EAGlDe,KAAAC,OAAIC,IAAJ,6BAAG;EAACC,KAAA;GAFb,MAAApB,MAAYC,mBAAmBC,KAAK;GACpC,IAAI,CAACF,KAAG;IACCiB,KAAA;IAAA,MAAAG;GAAI;GAIRJ,KAAA;GACeF,KAAA;GACbC,KAAAhB,aAAaC,GAAG;EAAC;EAAAY,EAAA,KAAAV;EAAAU,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;CAAA,OAAA;EAAAH,KAAAF,EAAA;EAAAG,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;CAAA;CAAA,IAAAK,OAAAC,OAAAC,IAAA,6BAAA,GAAA,OAAAF;CAAA,IAAAI;CAAA,IAAAT,EAAA,OAAAE,MAAAF,EAAA,OAAAG,IAAA;EADpBM,KAAAE,oBAAA,QAAA;GAAgB,WAAAT;GACbC,UAAAA;EACG,CAAA;EAACH,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAI,MAAAJ,EAAA,OAAAS,IAAA;EAJTC,KAAAE,qBAAAC,UAAA,EAAA,UAAA,CACGT,IACDK,EAEO,EAAA,CAAA;EACNT,EAAA,KAAAI;EAAAJ,EAAA,KAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OALHU;AAKG"}
@@ -1,8 +1,8 @@
1
- /* empty css */
2
1
  import { c } from "react-compiler-runtime";
3
2
  import { MarkdownContent } from "@graphiql/react";
3
+ /* empty css */
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/deprecation-reason.tsx
5
+ // src/components/deprecation-reason.tsx
6
6
  var DeprecationReason = (props) => {
7
7
  const $ = c(3);
8
8
  let t0;
@@ -24,7 +24,6 @@ var DeprecationReason = (props) => {
24
24
  } else t0 = $[2];
25
25
  return t0;
26
26
  };
27
- //#endregion
28
27
  export { DeprecationReason };
29
28
 
30
29
  //# sourceMappingURL=deprecation-reason.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deprecation-reason.js","names":["FC","MarkdownContent","DeprecationReasonProps","children","preview","DeprecationReason","props","$","_c","t0"],"sources":["../../src/components/deprecation-reason.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { MarkdownContent } from '@graphiql/react';\nimport './deprecation-reason.css';\n\ntype DeprecationReasonProps = {\n /**\n * The deprecation reason as Markdown string.\n */\n children?: string | null;\n preview?: boolean;\n};\n\nexport const DeprecationReason: FC<DeprecationReasonProps> = props => {\n return props.children ? (\n <div className=\"graphiql-doc-explorer-deprecation\">\n <div className=\"graphiql-doc-explorer-deprecation-label\">Deprecated</div>\n <MarkdownContent\n type=\"deprecation\"\n onlyShowFirstChild={props.preview ?? true}\n >\n {props.children}\n </MarkdownContent>\n </div>\n ) : null;\n};\n"],"mappings":";;;;;AAYA,IAAaK,qBAAgDC,UAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,MAAAH,YAAAI,EAAA,OAAAD,MAAAF,SAAA;EACpDK,KAAAH,MAAKH,WACV,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA,CACE,oBAAA,OAAA;IAAe,WAAA;IAA0C,UAAA;GAAgB,CAAA,GACzE,oBAAC,iBAAD;IACO,MAAA;IACe,oBAAAG,MAAKF,WAAL;IAEnBE,UAAAA,MAAKH;GAJQ,CAAA,CAMZ;EATD,CAAA,IAAA;EAUCI,EAAA,KAAAD,MAAAH;EAAAI,EAAA,KAAAD,MAAAF;EAAAG,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAVDE;AAUC"}
1
+ {"version":3,"file":"deprecation-reason.js","names":["children","preview","DeprecationReason","props","$","_c","t0","_jsxs","_jsx"],"sources":["../../src/components/deprecation-reason.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { MarkdownContent } from '@graphiql/react';\nimport './deprecation-reason.css';\n\ntype DeprecationReasonProps = {\n /**\n * The deprecation reason as Markdown string.\n */\n children?: string | null;\n preview?: boolean;\n};\n\nexport const DeprecationReason: FC<DeprecationReasonProps> = props => {\n return props.children ? (\n <div className=\"graphiql-doc-explorer-deprecation\">\n <div className=\"graphiql-doc-explorer-deprecation-label\">Deprecated</div>\n <MarkdownContent\n type=\"deprecation\"\n onlyShowFirstChild={props.preview ?? true}\n >\n {props.children}\n </MarkdownContent>\n </div>\n ) : null;\n};\n"],"mappings":";;;;;AAYA,IAAaE,qBAAgDC,UAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,MAAAH,YAAAI,EAAA,OAAAD,MAAAF,SAAA;EACpDK,KAAAH,MAAKH,WACVO,qBAAA,OAAA;GAAe,WAAA;GAAf,UAAA,CACEC,oBAAA,OAAA;IAAe,WAAA;IAA0C,UAAA;GAAe,CAAA,GACxEA,oBAAC,iBAAD;IACO,MAAA;IACe,oBAAAL,MAAKF,WAAL;IAEnBE,UAAAA,MAAKH;GACS,CAAA,CACd;EATA,CAAA,IAAA;EAUCI,EAAA,KAAAD,MAAAH;EAAAI,EAAA,KAAAD,MAAAF;EAAAG,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAVDE;AAUC"}
@@ -1,7 +1,7 @@
1
- /* empty css */
2
1
  import { c } from "react-compiler-runtime";
2
+ /* empty css */
3
3
  import { jsxs } from "react/jsx-runtime";
4
- //#region src/components/directive.tsx
4
+ // src/components/directive.tsx
5
5
  var Directive = (t0) => {
6
6
  const $ = c(2);
7
7
  const { directive } = t0;
@@ -16,7 +16,6 @@ var Directive = (t0) => {
16
16
  } else t1 = $[1];
17
17
  return t1;
18
18
  };
19
- //#endregion
20
19
  export { Directive };
21
20
 
22
21
  //# sourceMappingURL=directive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"directive.js","names":["FC","DirectiveNode","DirectiveProps","directive","Directive","t0","$","_c","t1","name","value"],"sources":["../../src/components/directive.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { DirectiveNode } from 'graphql';\nimport './directive.css';\n\ntype DirectiveProps = {\n /**\n * The directive that should be rendered.\n */\n directive: DirectiveNode;\n};\n\nexport const Directive: FC<DirectiveProps> = ({ directive }) => {\n return (\n <span className=\"graphiql-doc-explorer-directive\">\n @{directive.name.value}\n </span>\n );\n};\n"],"mappings":";;;;AAWA,IAAaI,aAAgCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAJ,cAAAE;CAAa,IAAAG;CAAA,IAAAF,EAAA,OAAAH,UAAAM,KAAAC,OAAA;EAEvDF,KAAA,qBAAA,QAAA;GAAgB,WAAA;GAAhB,UAAA,CAAkD,KAC9CL,UAASM,KAAKC,KACX;;EAAAJ,EAAA,KAAAH,UAAAM,KAAAC;EAAAJ,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAFPE;AAEO"}
1
+ {"version":3,"file":"directive.js","names":["directive","Directive","t0","$","_c","t1","name","value","_jsxs"],"sources":["../../src/components/directive.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport type { DirectiveNode } from 'graphql';\nimport './directive.css';\n\ntype DirectiveProps = {\n /**\n * The directive that should be rendered.\n */\n directive: DirectiveNode;\n};\n\nexport const Directive: FC<DirectiveProps> = ({ directive }) => {\n return (\n <span className=\"graphiql-doc-explorer-directive\">\n @{directive.name.value}\n </span>\n );\n};\n"],"mappings":";;;;AAWA,IAAaC,aAAgCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAJ,cAAAE;CAAa,IAAAG;CAAA,IAAAF,EAAA,OAAAH,UAAAM,KAAAC,OAAA;EAEvDF,KAAAG,qBAAA,QAAA;GAAgB,WAAA;GAAhB,UAAA,CAAkD,KAC9CR,UAASM,KAAKC,KACZ;;EAACJ,EAAA,KAAAH,UAAAM,KAAAC;EAAAJ,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAFPE;AAEO"}
@@ -1,3 +1,6 @@
1
+ import { c } from "react-compiler-runtime";
2
+ import { isEnumType, isInputObjectType, isInterfaceType, isObjectType, isType, isUnionType } from "graphql";
3
+ import { PanelHeader, Spinner, pick, useGraphiQL } from "@graphiql/react";
1
4
  import { useDocExplorer, useDocExplorerActions } from "../context.js";
2
5
  import { Breadcrumb } from "./breadcrumb.js";
3
6
  import { FieldDocumentation } from "./field-documentation.js";
@@ -7,11 +10,8 @@ import { SearchRow } from "./search-row.js";
7
10
  import { TypeCard } from "./type-card.js";
8
11
  import { TypeDocumentation } from "./type-documentation.js";
9
12
  /* empty css */
10
- import { c } from "react-compiler-runtime";
11
- import { PanelHeader, Spinner, pick, useGraphiQL } from "@graphiql/react";
12
- import { isEnumType, isInputObjectType, isInterfaceType, isObjectType, isType, isUnionType } from "graphql";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- //#region src/components/doc-explorer.tsx
14
+ // src/components/doc-explorer.tsx
15
15
  var DocExplorer = () => {
16
16
  const $ = c(37);
17
17
  let t0;
@@ -151,7 +151,7 @@ var DocExplorer = () => {
151
151
  let t5;
152
152
  if ($[33] !== t2 || $[34] !== t3 || $[35] !== t4) {
153
153
  t5 = /* @__PURE__ */ jsxs("section", {
154
- className: "graphiql-doc-explorer",
154
+ className: "graphiql-doc-explorer graphiql-side-panel-content",
155
155
  "aria-label": "Documentation Explorer",
156
156
  children: [
157
157
  t1,
@@ -224,7 +224,6 @@ var TypeView = (t0) => {
224
224
  } else t6 = $[15];
225
225
  return t6;
226
226
  };
227
- //#endregion
228
227
  export { DocExplorer };
229
228
 
230
229
  //# sourceMappingURL=doc-explorer.js.map