@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.
- package/LICENSE +21 -0
- package/dist/components/argument.js +88 -92
- package/dist/components/argument.js.map +1 -1
- package/dist/components/arguments-list.js +226 -237
- package/dist/components/arguments-list.js.map +1 -1
- package/dist/components/breadcrumb.js +59 -52
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/default-value.js +63 -74
- package/dist/components/default-value.js.map +1 -1
- package/dist/components/deprecation-reason.js +27 -21
- package/dist/components/deprecation-reason.js.map +1 -1
- package/dist/components/directive.js +20 -23
- package/dist/components/directive.js.map +1 -1
- package/dist/components/doc-explorer.js +219 -259
- package/dist/components/doc-explorer.js.map +1 -1
- package/dist/components/field-card.js +103 -97
- package/dist/components/field-card.js.map +1 -1
- package/dist/components/field-documentation.js +118 -135
- package/dist/components/field-documentation.js.map +1 -1
- package/dist/components/field-link.js +37 -39
- package/dist/components/field-link.js.map +1 -1
- package/dist/components/fields-list.js +216 -226
- package/dist/components/fields-list.js.map +1 -1
- package/dist/components/schema-documentation.js +263 -224
- package/dist/components/schema-documentation.js.map +1 -1
- package/dist/components/search-row.js +287 -268
- package/dist/components/search-row.js.map +1 -1
- package/dist/components/search.js +342 -345
- package/dist/components/search.js.map +1 -1
- package/dist/components/section.js +59 -69
- package/dist/components/section.js.map +1 -1
- package/dist/components/type-card.js +104 -107
- package/dist/components/type-card.js.map +1 -1
- package/dist/components/type-documentation.js +340 -363
- package/dist/components/type-documentation.js.map +1 -1
- package/dist/components/type-link.js +38 -39
- package/dist/components/type-link.js.map +1 -1
- package/dist/components/utils.js +15 -20
- package/dist/components/utils.js.map +1 -1
- package/dist/context.js +205 -285
- package/dist/context.js.map +1 -1
- package/dist/index.js +7 -31
- package/dist/schema-reference.js +48 -54
- package/dist/schema-reference.js.map +1 -1
- package/dist/style.css +24 -28
- package/package.json +25 -19
- package/dist/index.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) GraphQL Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,96 +1,92 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { MarkdownContent } from "@graphiql/react";
|
|
4
1
|
import { DefaultValue } from "./default-value.js";
|
|
5
2
|
import { TypeLink } from "./type-link.js";
|
|
6
3
|
/* empty css */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return t7;
|
|
92
|
-
};
|
|
93
|
-
export {
|
|
94
|
-
Argument
|
|
4
|
+
import { c } from "react-compiler-runtime";
|
|
5
|
+
import { MarkdownContent } from "@graphiql/react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/argument.tsx
|
|
8
|
+
var Argument = (t0) => {
|
|
9
|
+
const $ = c(19);
|
|
10
|
+
const { arg, showDefaultValue, inline } = t0;
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== arg.name) {
|
|
13
|
+
t1 = /* @__PURE__ */ jsx("span", {
|
|
14
|
+
className: "graphiql-doc-explorer-argument-name",
|
|
15
|
+
children: arg.name
|
|
16
|
+
});
|
|
17
|
+
$[0] = arg.name;
|
|
18
|
+
$[1] = t1;
|
|
19
|
+
} else t1 = $[1];
|
|
20
|
+
let t2;
|
|
21
|
+
if ($[2] !== arg.type) {
|
|
22
|
+
t2 = /* @__PURE__ */ jsx(TypeLink, { type: arg.type });
|
|
23
|
+
$[2] = arg.type;
|
|
24
|
+
$[3] = t2;
|
|
25
|
+
} else t2 = $[3];
|
|
26
|
+
let t3;
|
|
27
|
+
if ($[4] !== arg || $[5] !== showDefaultValue) {
|
|
28
|
+
t3 = showDefaultValue !== false && /* @__PURE__ */ jsx(DefaultValue, { field: arg });
|
|
29
|
+
$[4] = arg;
|
|
30
|
+
$[5] = showDefaultValue;
|
|
31
|
+
$[6] = t3;
|
|
32
|
+
} else t3 = $[6];
|
|
33
|
+
let t4;
|
|
34
|
+
if ($[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
|
|
35
|
+
t4 = /* @__PURE__ */ jsxs("span", { children: [
|
|
36
|
+
t1,
|
|
37
|
+
": ",
|
|
38
|
+
t2,
|
|
39
|
+
t3
|
|
40
|
+
] });
|
|
41
|
+
$[7] = t1;
|
|
42
|
+
$[8] = t2;
|
|
43
|
+
$[9] = t3;
|
|
44
|
+
$[10] = t4;
|
|
45
|
+
} else t4 = $[10];
|
|
46
|
+
const definition = t4;
|
|
47
|
+
if (inline) return definition;
|
|
48
|
+
let t5;
|
|
49
|
+
if ($[11] !== arg.description) {
|
|
50
|
+
t5 = arg.description ? /* @__PURE__ */ jsx(MarkdownContent, {
|
|
51
|
+
type: "description",
|
|
52
|
+
children: arg.description
|
|
53
|
+
}) : null;
|
|
54
|
+
$[11] = arg.description;
|
|
55
|
+
$[12] = t5;
|
|
56
|
+
} else t5 = $[12];
|
|
57
|
+
let t6;
|
|
58
|
+
if ($[13] !== arg.deprecationReason) {
|
|
59
|
+
t6 = arg.deprecationReason ? /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
className: "graphiql-doc-explorer-argument-deprecation",
|
|
61
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
62
|
+
className: "graphiql-doc-explorer-argument-deprecation-label",
|
|
63
|
+
children: "Deprecated"
|
|
64
|
+
}), /* @__PURE__ */ jsx(MarkdownContent, {
|
|
65
|
+
type: "deprecation",
|
|
66
|
+
children: arg.deprecationReason
|
|
67
|
+
})]
|
|
68
|
+
}) : null;
|
|
69
|
+
$[13] = arg.deprecationReason;
|
|
70
|
+
$[14] = t6;
|
|
71
|
+
} else t6 = $[14];
|
|
72
|
+
let t7;
|
|
73
|
+
if ($[15] !== definition || $[16] !== t5 || $[17] !== t6) {
|
|
74
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
75
|
+
className: "graphiql-doc-explorer-argument",
|
|
76
|
+
children: [
|
|
77
|
+
definition,
|
|
78
|
+
t5,
|
|
79
|
+
t6
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
$[15] = definition;
|
|
83
|
+
$[16] = t5;
|
|
84
|
+
$[17] = t6;
|
|
85
|
+
$[18] = t7;
|
|
86
|
+
} else t7 = $[18];
|
|
87
|
+
return t7;
|
|
95
88
|
};
|
|
96
|
-
//#
|
|
89
|
+
//#endregion
|
|
90
|
+
export { Argument };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=argument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"argument.js","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"],"
|
|
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,qBAAgB,SAAc,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,EAA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