@graphql-markdown/docusaurus 1.31.2 → 1.33.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.
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/mdx/category.d.ts +9 -0
- package/dist/mdx/category.d.ts.map +1 -1
- package/dist/mdx/category.js +9 -0
- package/dist/mdx/components.d.ts +11 -0
- package/dist/mdx/components.d.ts.map +1 -1
- package/dist/mdx/components.js +11 -0
- package/dist/mdx/index.d.ts +1 -0
- package/dist/mdx/index.d.ts.map +1 -1
- package/dist/mdx/index.js +1 -0
- package/package.json +5 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Docusaurus integration for running GraphQL-Markdown and wiring CLI commands.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
1
6
|
import type { LoadContext, Plugin, PluginOptions } from "@docusaurus/types";
|
|
2
7
|
import type { GraphQLMarkdownCliOptions } from "@graphql-markdown/types";
|
|
3
8
|
/**
|
|
9
|
+
* Docusaurus plugin wrapper that wires GraphQL-Markdown into the build,
|
|
10
|
+
* optionally running the CLI during `docusaurus build` and registering
|
|
11
|
+
* the `graphql-to-doc` command on the local CLI.
|
|
4
12
|
*
|
|
13
|
+
* @param _ - Load context (unused).
|
|
14
|
+
* @param options - GraphQL-Markdown CLI options plus Docusaurus plugin options.
|
|
15
|
+
* @returns A configured Docusaurus plugin instance.
|
|
5
16
|
*/
|
|
6
17
|
export default function pluginGraphQLDocGenerator(_: LoadContext, options: GraphQLMarkdownCliOptions & Partial<PluginOptions>): Promise<Plugin>;
|
|
7
18
|
export { createMDXFormatter } from "./mdx";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAczE;;;;;;;;GAQG;AACH,wBAA8B,yBAAyB,CACrD,CAAC,EAAE,WAAW,EACd,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,MAAM,CAAC,CAyCjB;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,13 @@ const NAME = "docusaurus-graphql-doc-generator";
|
|
|
12
12
|
const LOGGER_MODULE = "@docusaurus/logger";
|
|
13
13
|
const MDX_PACKAGE = "@graphql-markdown/docusaurus/mdx";
|
|
14
14
|
/**
|
|
15
|
+
* Docusaurus plugin wrapper that wires GraphQL-Markdown into the build,
|
|
16
|
+
* optionally running the CLI during `docusaurus build` and registering
|
|
17
|
+
* the `graphql-to-doc` command on the local CLI.
|
|
15
18
|
*
|
|
19
|
+
* @param _ - Load context (unused).
|
|
20
|
+
* @param options - GraphQL-Markdown CLI options plus Docusaurus plugin options.
|
|
21
|
+
* @returns A configured Docusaurus plugin instance.
|
|
16
22
|
*/
|
|
17
23
|
async function pluginGraphQLDocGenerator(_, options) {
|
|
18
24
|
await (0, logger_1.default)(LOGGER_MODULE);
|
|
@@ -43,7 +49,7 @@ async function pluginGraphQLDocGenerator(_, options) {
|
|
|
43
49
|
generatorFrameworkVersion: utils_1.DOCUSAURUS_VERSION,
|
|
44
50
|
...options.docOptions,
|
|
45
51
|
},
|
|
46
|
-
}, LOGGER_MODULE, MDX_PACKAGE));
|
|
52
|
+
}, LOGGER_MODULE, options.mdxParser ?? MDX_PACKAGE));
|
|
47
53
|
},
|
|
48
54
|
};
|
|
49
55
|
}
|
package/dist/mdx/category.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module mdx
|
|
3
3
|
* This module provides utilities for generating MDX index files in Docusaurus format.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Hook that materializes a `_category_.yml` file before Docusaurus indexes
|
|
9
|
+
* a directory, ensuring generated bundles have labels, ordering, and
|
|
10
|
+
* optional generated-index metadata even when the folder was produced by the CLI.
|
|
11
|
+
*
|
|
12
|
+
* @param event - Hook payload containing the target directory, category name, and generator options.
|
|
4
13
|
*/
|
|
5
14
|
export declare const beforeGenerateIndexMetafileHook: (event: {
|
|
6
15
|
data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/mdx/category.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/mdx/category.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;;;mBAiC3C,CAAC"}
|
package/dist/mdx/category.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @module mdx
|
|
4
4
|
* This module provides utilities for generating MDX index files in Docusaurus format.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
5
7
|
*/
|
|
6
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
9
|
exports.beforeGenerateIndexMetafileHook = void 0;
|
|
@@ -13,6 +15,13 @@ var SidebarPosition;
|
|
|
13
15
|
SidebarPosition[SidebarPosition["FIRST"] = 1] = "FIRST";
|
|
14
16
|
SidebarPosition[SidebarPosition["LAST"] = 999] = "LAST";
|
|
15
17
|
})(SidebarPosition || (SidebarPosition = {}));
|
|
18
|
+
/**
|
|
19
|
+
* Hook that materializes a `_category_.yml` file before Docusaurus indexes
|
|
20
|
+
* a directory, ensuring generated bundles have labels, ordering, and
|
|
21
|
+
* optional generated-index metadata even when the folder was produced by the CLI.
|
|
22
|
+
*
|
|
23
|
+
* @param event - Hook payload containing the target directory, category name, and generator options.
|
|
24
|
+
*/
|
|
16
25
|
const beforeGenerateIndexMetafileHook = async (event) => {
|
|
17
26
|
const { dirPath, category, options } = event.data;
|
|
18
27
|
const filePath = (0, node_path_1.join)(dirPath, CATEGORY_YAML);
|
package/dist/mdx/components.d.ts
CHANGED
|
@@ -3,5 +3,16 @@
|
|
|
3
3
|
* This module provides MDX React components.
|
|
4
4
|
*/
|
|
5
5
|
import type { MDXString } from "@graphql-markdown/types";
|
|
6
|
+
/**
|
|
7
|
+
* MDX helper components injected into generated documents so Docusaurus
|
|
8
|
+
* can render badges, bullets, details, and SpecifiedBy links without
|
|
9
|
+
* requiring manual component registration in every project.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* String literal that declares the React helpers (`Bullet`, `SpecifiedBy`, etc.)
|
|
15
|
+
* which GraphQL-Markdown prepends to every generated MDX file.
|
|
16
|
+
*/
|
|
6
17
|
export declare const mdxDeclaration: MDXString;
|
|
7
18
|
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/mdx/components.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,eAAO,MAAM,cAAc,EAAE,SA4Bf,CAAC"}
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/mdx/components.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SA4Bf,CAAC"}
|
package/dist/mdx/components.js
CHANGED
|
@@ -5,6 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.mdxDeclaration = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* MDX helper components injected into generated documents so Docusaurus
|
|
10
|
+
* can render badges, bullets, details, and SpecifiedBy links without
|
|
11
|
+
* requiring manual component registration in every project.
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* String literal that declares the React helpers (`Bullet`, `SpecifiedBy`, etc.)
|
|
17
|
+
* which GraphQL-Markdown prepends to every generated MDX file.
|
|
18
|
+
*/
|
|
8
19
|
exports.mdxDeclaration = `
|
|
9
20
|
export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}> ● </span></>
|
|
10
21
|
|
package/dist/mdx/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* specification links, and other MDX-specific formatting for GraphQL documentation.
|
|
6
6
|
*
|
|
7
7
|
* @primaryExport
|
|
8
|
+
* @packageDocumentation
|
|
8
9
|
*/
|
|
9
10
|
import type { AdmonitionType, Badge, CollapsibleOption, Formatter, FrontMatterOptions, Maybe, MDXString, MetaInfo, TypeLink } from "@graphql-markdown/types";
|
|
10
11
|
export { mdxDeclaration } from "./components";
|
package/dist/mdx/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mdx/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mdx/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAWjC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,cAAc,2CAI1B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,6EAU/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,8BAE3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,4DAK5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,4BAEpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,yDAM/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,uCAKzB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,8EAShC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,kBAAkB,uCAU7B,CAAC"}
|
package/dist/mdx/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* specification links, and other MDX-specific formatting for GraphQL documentation.
|
|
7
7
|
*
|
|
8
8
|
* @primaryExport
|
|
9
|
+
* @packageDocumentation
|
|
9
10
|
*/
|
|
10
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
12
|
exports.createMDXFormatter = exports.formatMDXFrontmatter = exports.formatMDXLink = exports.formatMDXNameEntity = exports.formatMDXSpecifiedByLink = exports.formatMDXDetails = exports.formatMDXBullet = exports.formatMDXAdmonition = exports.formatMDXBadge = exports.beforeGenerateIndexMetafileHook = exports.mdxDeclaration = void 0;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/graphql-markdown/graphql-markdown/issues"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.33.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"build": "tsgo --build"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@graphql-markdown/cli": "^0.
|
|
67
|
+
"@graphql-markdown/cli": "^0.6.1",
|
|
68
68
|
"@graphql-markdown/logger": "^1.0.5",
|
|
69
|
-
"@graphql-markdown/utils": "^1.9.
|
|
69
|
+
"@graphql-markdown/utils": "^1.9.2",
|
|
70
70
|
"@docusaurus/utils": ">=3.9.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@docusaurus/types": "^3.7.0",
|
|
74
|
-
"@graphql-markdown/types": "^1.
|
|
74
|
+
"@graphql-markdown/types": "^1.10.1"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@docusaurus/logger": "*"
|
|
@@ -83,9 +83,7 @@
|
|
|
83
83
|
"node": ">=20"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
|
-
"
|
|
87
|
-
"access": "public",
|
|
88
|
-
"scripts": {}
|
|
86
|
+
"access": "public"
|
|
89
87
|
},
|
|
90
88
|
"typescript": {
|
|
91
89
|
"definition": "dist/index.d.ts"
|