@graphql-markdown/docusaurus 1.34.0 → 1.35.1

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.
@@ -1 +1 @@
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,CA6CjB;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC"}
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;AAWzE;;;;;;;;GAQG;AACH,wBAA8B,yBAAyB,CACrD,CAAC,EAAE,WAAW,EACd,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC"}
package/dist/index.js CHANGED
@@ -1,43 +1,13 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
35
5
  Object.defineProperty(exports, "__esModule", { value: true });
36
6
  exports.createMDXFormatter = void 0;
37
7
  exports.default = pluginGraphQLDocGenerator;
38
8
  const utils_1 = require("@docusaurus/utils");
39
9
  const cli_1 = require("@graphql-markdown/cli");
40
- const logger_1 = __importStar(require("@graphql-markdown/logger"));
10
+ const logger_1 = __importDefault(require("@graphql-markdown/logger"));
41
11
  const NAME = "docusaurus-graphql-doc-generator";
42
12
  const LOGGER_MODULE = "@docusaurus/logger";
43
13
  const MDX_PACKAGE = "@graphql-markdown/docusaurus/mdx";
@@ -54,16 +24,6 @@ async function pluginGraphQLDocGenerator(_, options) {
54
24
  await (0, logger_1.default)(LOGGER_MODULE);
55
25
  return {
56
26
  name: NAME,
57
- /**
58
- * @experimental
59
- */
60
- async loadContent() {
61
- if (options.runOnBuild !== true) {
62
- return;
63
- }
64
- (0, logger_1.log)("`runOnBuild` option is deprecated and will be removed in a future release. Use the `graphql-to-doc` CLI command instead.", logger_1.LogLevel.warn);
65
- await (0, cli_1.runGraphQLMarkdown)(options, {}, LOGGER_MODULE);
66
- },
67
27
  /**
68
28
  * Extends Docusaurus CLI with GraphQL Documentation generator command.
69
29
  * This method adds a custom command to generate GraphQL documentation
@@ -73,6 +33,9 @@ async function pluginGraphQLDocGenerator(_, options) {
73
33
  * @returns void
74
34
  */
75
35
  extendCli(cli) {
36
+ // @graphql-markdown/cli uses commander v15; @docusaurus/types types extendCli
37
+ // with commander v5's Command. The two are structurally compatible at runtime
38
+ // but TypeScript sees them as different types due to dual-version resolution.
76
39
  cli.addCommand((0, cli_1.getGraphQLMarkdownCli)({
77
40
  ...options,
78
41
  docOptions: {
@@ -80,9 +43,9 @@ async function pluginGraphQLDocGenerator(_, options) {
80
43
  generatorFrameworkVersion: utils_1.DOCUSAURUS_VERSION,
81
44
  ...options.docOptions,
82
45
  },
83
- }, LOGGER_MODULE, options.mdxParser ?? MDX_PACKAGE));
46
+ }, LOGGER_MODULE, options.formatter ?? options.mdxParser ?? MDX_PACKAGE));
84
47
  },
85
48
  };
86
49
  }
87
- const mdx_1 = require("./mdx");
50
+ var mdx_1 = require("./mdx");
88
51
  Object.defineProperty(exports, "createMDXFormatter", { enumerable: true, get: function () { return mdx_1.createMDXFormatter; } });
@@ -15,7 +15,7 @@ export declare const beforeGenerateIndexMetafileHook: (event: {
15
15
  data: {
16
16
  dirPath: string;
17
17
  category: string;
18
- options?: Record<string, unknown> | undefined;
18
+ options?: Record<string, unknown>;
19
19
  };
20
20
  }) => Promise<void>;
21
21
  //# sourceMappingURL=category.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/mdx/category.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,UAAiB;IAC3D,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,CAAC;CACH,KAAG,OAAO,CAAC,IAAI,CA2Bf,CAAC"}
@@ -1,85 +1,11 @@
1
1
  /**
2
2
  * @module mdx
3
3
  * This module provides utilities for generating MDX content in Docusaurus format.
4
- * It includes functions for creating badges, admonitions, bullet points, collapsible sections,
5
- * specification links, and other MDX-specific formatting for GraphQL documentation.
4
+ * Formatter implementation lives in \@graphql-markdown/formatters/docusaurus.
6
5
  *
7
6
  * @primaryExport
8
7
  * @packageDocumentation
9
8
  */
10
- import type { AdmonitionType, Badge, CollapsibleOption, Formatter, FrontMatterOptions, Maybe, MDXString, MetaInfo, TypeLink } from "@graphql-markdown/types";
11
- export { mdxDeclaration } from "./components";
9
+ export { createMDXFormatter, formatMDXAdmonition, formatMDXBadge, formatMDXBullet, formatMDXDetails, formatMDXFrontmatter, formatMDXLink, formatMDXNameEntity, formatMDXSpecifiedByLink, mdxDeclaration, } from "@graphql-markdown/formatters/docusaurus";
12
10
  export { beforeGenerateIndexMetafileHook } from "./category";
13
- /**
14
- * Formats a Badge inline-block in MDX format
15
- * @param param - The badge configuration object
16
- * @returns Formatted MDX string for the badge
17
- */
18
- export declare const formatMDXBadge: ({ text, classname }: Badge) => MDXString;
19
- /**
20
- * Formats an admonition block in MDX format
21
- * @param param - The admonition configuration object
22
- * @param meta - Optional metadata for generator configuration
23
- * @returns Formatted MDX string for the admonition
24
- */
25
- export declare const formatMDXAdmonition: ({ text, title, type }: AdmonitionType, meta: Maybe<MetaInfo>) => MDXString;
26
- /**
27
- * Creates a bullet point element in MDX format
28
- * @param text - Optional text to append after the bullet point
29
- * @returns Formatted MDX string for the bullet point
30
- */
31
- export declare const formatMDXBullet: (text?: string) => MDXString;
32
- /**
33
- * Creates a collapsible details section in MDX format
34
- * @param param - The collapsible section configuration
35
- * @returns Formatted MDX string for the collapsible section
36
- */
37
- export declare const formatMDXDetails: ({ dataOpen, dataClose, }: CollapsibleOption) => MDXString;
38
- /**
39
- * Creates a link to the specification documentation
40
- * @param url - The URL to the specification
41
- * @returns Formatted MDX string for the specification link
42
- */
43
- export declare const formatMDXSpecifiedByLink: (url: string) => MDXString;
44
- /**
45
- * Formats a name entity with optional parent type
46
- * @param name - The name to format
47
- * @param parentType - Optional parent type to prefix the name
48
- * @returns Formatted MDX string for the name entity
49
- */
50
- export declare const formatMDXNameEntity: (name: string, parentType?: Maybe<string>) => MDXString;
51
- /**
52
- * Formats a link in MDX format
53
- * @param param - The link configuration object
54
- * @returns Formatted MDX link object
55
- */
56
- export declare const formatMDXLink: ({ text, url }: TypeLink) => TypeLink;
57
- /**
58
- * Default frontmatter formatter for MDX.
59
- *
60
- * @param _props - The front matter options (unused)
61
- * @param formatted - The formatted front matter as an array of strings
62
- * @returns Formatted MDX string for the front matter
63
- */
64
- export declare const formatMDXFrontmatter: (_props: Maybe<FrontMatterOptions>, formatted: Maybe<string[]>) => MDXString;
65
- /**
66
- * Creates an MDX formatter for Docusaurus documentation.
67
- *
68
- * The MDX formatter produces MDX/HTML markup compatible with Docusaurus.
69
- * It uses helper components like `<Badge>`, `<Bullet>`, and `<SpecifiedBy>`,
70
- * and emits native `<details>/<summary>` blocks for collapsible sections.
71
- *
72
- * @param meta - Optional metadata for framework-specific formatting
73
- * @returns A complete Formatter implementation for MDX output
74
- *
75
- * @example
76
- * ```typescript
77
- * import { createMDXFormatter } from '@graphql-markdown/docusaurus';
78
- *
79
- * const formatter = createMDXFormatter({ generatorFrameworkName: 'docusaurus' });
80
- * const badge = formatter.formatMDXBadge({ text: 'Required' });
81
- * // '<Badge class="badge badge--secondary " text="Required"/>'
82
- * ```
83
- */
84
- export declare const createMDXFormatter: (meta?: Maybe<MetaInfo>) => Formatter;
85
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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,4DAO5B,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,uCAgB9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mdx/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,GACf,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC"}
package/dist/mdx/index.js CHANGED
@@ -2,142 +2,23 @@
2
2
  /**
3
3
  * @module mdx
4
4
  * This module provides utilities for generating MDX content in Docusaurus format.
5
- * It includes functions for creating badges, admonitions, bullet points, collapsible sections,
6
- * specification links, and other MDX-specific formatting for GraphQL documentation.
5
+ * Formatter implementation lives in \@graphql-markdown/formatters/docusaurus.
7
6
  *
8
7
  * @primaryExport
9
8
  * @packageDocumentation
10
9
  */
11
10
  Object.defineProperty(exports, "__esModule", { value: true });
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;
13
- const utils_1 = require("@graphql-markdown/utils");
14
- const LINK_MDX_EXTENSION = ".mdx";
15
- const DEFAULT_CSS_CLASSNAME = "badge--secondary";
16
- const components_1 = require("./components");
17
- Object.defineProperty(exports, "mdxDeclaration", { enumerable: true, get: function () { return components_1.mdxDeclaration; } });
18
- const category_1 = require("./category");
11
+ exports.beforeGenerateIndexMetafileHook = exports.mdxDeclaration = exports.formatMDXSpecifiedByLink = exports.formatMDXNameEntity = exports.formatMDXLink = exports.formatMDXFrontmatter = exports.formatMDXDetails = exports.formatMDXBullet = exports.formatMDXBadge = exports.formatMDXAdmonition = exports.createMDXFormatter = void 0;
12
+ var docusaurus_1 = require("@graphql-markdown/formatters/docusaurus");
13
+ Object.defineProperty(exports, "createMDXFormatter", { enumerable: true, get: function () { return docusaurus_1.createMDXFormatter; } });
14
+ Object.defineProperty(exports, "formatMDXAdmonition", { enumerable: true, get: function () { return docusaurus_1.formatMDXAdmonition; } });
15
+ Object.defineProperty(exports, "formatMDXBadge", { enumerable: true, get: function () { return docusaurus_1.formatMDXBadge; } });
16
+ Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return docusaurus_1.formatMDXBullet; } });
17
+ Object.defineProperty(exports, "formatMDXDetails", { enumerable: true, get: function () { return docusaurus_1.formatMDXDetails; } });
18
+ Object.defineProperty(exports, "formatMDXFrontmatter", { enumerable: true, get: function () { return docusaurus_1.formatMDXFrontmatter; } });
19
+ Object.defineProperty(exports, "formatMDXLink", { enumerable: true, get: function () { return docusaurus_1.formatMDXLink; } });
20
+ Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return docusaurus_1.formatMDXNameEntity; } });
21
+ Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return docusaurus_1.formatMDXSpecifiedByLink; } });
22
+ Object.defineProperty(exports, "mdxDeclaration", { enumerable: true, get: function () { return docusaurus_1.mdxDeclaration; } });
23
+ var category_1 = require("./category");
19
24
  Object.defineProperty(exports, "beforeGenerateIndexMetafileHook", { enumerable: true, get: function () { return category_1.beforeGenerateIndexMetafileHook; } });
20
- /**
21
- * Formats a Badge inline-block in MDX format
22
- * @param param - The badge configuration object
23
- * @returns Formatted MDX string for the badge
24
- */
25
- const formatMDXBadge = ({ text, classname }) => {
26
- const style = typeof classname === "string" ? `badge--${classname.toLowerCase()}` : "";
27
- return `<Badge class="badge ${DEFAULT_CSS_CLASSNAME} ${style}" text="${text}"/>`;
28
- };
29
- exports.formatMDXBadge = formatMDXBadge;
30
- /**
31
- * Formats an admonition block in MDX format
32
- * @param param - The admonition configuration object
33
- * @param meta - Optional metadata for generator configuration
34
- * @returns Formatted MDX string for the admonition
35
- */
36
- const formatMDXAdmonition = ({ text, title, type }, meta) => {
37
- const isDocusaurus = meta?.generatorFrameworkName === "docusaurus";
38
- if (isDocusaurus && meta.generatorFrameworkVersion?.startsWith("2")) {
39
- const oldType = type === "warning" ? "caution" : type;
40
- return `${utils_1.MARKDOWN_EOP}:::${oldType} ${title}${text}:::`;
41
- }
42
- return `${utils_1.MARKDOWN_EOP}:::${type}[${title}]${text}:::`;
43
- };
44
- exports.formatMDXAdmonition = formatMDXAdmonition;
45
- /**
46
- * Creates a bullet point element in MDX format
47
- * @param text - Optional text to append after the bullet point
48
- * @returns Formatted MDX string for the bullet point
49
- */
50
- const formatMDXBullet = (text = "") => {
51
- return `<Bullet />${text}`;
52
- };
53
- exports.formatMDXBullet = formatMDXBullet;
54
- /**
55
- * Creates a collapsible details section in MDX format
56
- * @param param - The collapsible section configuration
57
- * @returns Formatted MDX string for the collapsible section
58
- */
59
- const formatMDXDetails = ({ dataOpen, dataClose, }) => {
60
- const openLabel = (0, utils_1.escapeMDX)(`Hide ${dataOpen}`);
61
- const closeLabel = (0, utils_1.escapeMDX)(`Show ${dataClose}`);
62
- return `${utils_1.MARKDOWN_EOP}<details class="graphql-markdown-details">${utils_1.MARKDOWN_EOL}<summary>${utils_1.MARKDOWN_EOL}<span class="graphql-markdown-details-label-closed">${closeLabel}</span>${utils_1.MARKDOWN_EOL}<span class="graphql-markdown-details-label-open">${openLabel}</span>${utils_1.MARKDOWN_EOL}</summary>${utils_1.MARKDOWN_EOP}\r${utils_1.MARKDOWN_EOP}</details>${utils_1.MARKDOWN_EOP}`;
63
- };
64
- exports.formatMDXDetails = formatMDXDetails;
65
- /**
66
- * Creates a link to the specification documentation
67
- * @param url - The URL to the specification
68
- * @returns Formatted MDX string for the specification link
69
- */
70
- const formatMDXSpecifiedByLink = (url) => {
71
- return `<SpecifiedBy url="${url}"/>`;
72
- };
73
- exports.formatMDXSpecifiedByLink = formatMDXSpecifiedByLink;
74
- /**
75
- * Formats a name entity with optional parent type
76
- * @param name - The name to format
77
- * @param parentType - Optional parent type to prefix the name
78
- * @returns Formatted MDX string for the name entity
79
- */
80
- const formatMDXNameEntity = (name, parentType) => {
81
- const parentName = parentType ? `${parentType}.` : "";
82
- return `<code style={{ fontWeight: 'normal' }}>${(0, utils_1.escapeMDX)(parentName)}<b>${(0, utils_1.escapeMDX)(name)}</b></code>`;
83
- };
84
- exports.formatMDXNameEntity = formatMDXNameEntity;
85
- /**
86
- * Formats a link in MDX format
87
- * @param param - The link configuration object
88
- * @returns Formatted MDX link object
89
- */
90
- const formatMDXLink = ({ text, url }) => {
91
- return {
92
- text,
93
- url: `${url}${LINK_MDX_EXTENSION}`,
94
- };
95
- };
96
- exports.formatMDXLink = formatMDXLink;
97
- /**
98
- * Default frontmatter formatter for MDX.
99
- *
100
- * @param _props - The front matter options (unused)
101
- * @param formatted - The formatted front matter as an array of strings
102
- * @returns Formatted MDX string for the front matter
103
- */
104
- const formatMDXFrontmatter = (_props, formatted) => {
105
- return formatted
106
- ? [utils_1.FRONT_MATTER_DELIMITER, ...formatted, utils_1.FRONT_MATTER_DELIMITER].join(utils_1.MARKDOWN_EOL)
107
- : "";
108
- };
109
- exports.formatMDXFrontmatter = formatMDXFrontmatter;
110
- /**
111
- * Creates an MDX formatter for Docusaurus documentation.
112
- *
113
- * The MDX formatter produces MDX/HTML markup compatible with Docusaurus.
114
- * It uses helper components like `<Badge>`, `<Bullet>`, and `<SpecifiedBy>`,
115
- * and emits native `<details>/<summary>` blocks for collapsible sections.
116
- *
117
- * @param meta - Optional metadata for framework-specific formatting
118
- * @returns A complete Formatter implementation for MDX output
119
- *
120
- * @example
121
- * ```typescript
122
- * import { createMDXFormatter } from '@graphql-markdown/docusaurus';
123
- *
124
- * const formatter = createMDXFormatter({ generatorFrameworkName: 'docusaurus' });
125
- * const badge = formatter.formatMDXBadge({ text: 'Required' });
126
- * // '<Badge class="badge badge--secondary " text="Required"/>'
127
- * ```
128
- */
129
- const createMDXFormatter = (meta) => {
130
- return {
131
- formatMDXBadge: exports.formatMDXBadge,
132
- formatMDXAdmonition: (admonition, _meta) => {
133
- return (0, exports.formatMDXAdmonition)(admonition, meta ?? _meta);
134
- },
135
- formatMDXBullet: exports.formatMDXBullet,
136
- formatMDXDetails: exports.formatMDXDetails,
137
- formatMDXFrontmatter: exports.formatMDXFrontmatter,
138
- formatMDXLink: exports.formatMDXLink,
139
- formatMDXNameEntity: exports.formatMDXNameEntity,
140
- formatMDXSpecifiedByLink: exports.formatMDXSpecifiedByLink,
141
- };
142
- };
143
- exports.createMDXFormatter = createMDXFormatter;
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.34.0",
8
+ "version": "1.35.1",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -74,15 +74,16 @@
74
74
  "test:watch": "jest --watch"
75
75
  },
76
76
  "dependencies": {
77
- "@graphql-markdown/cli": "^0.7.1",
78
- "@graphql-markdown/logger": "^1.0.6",
79
- "@graphql-markdown/types": "^1.12.0",
80
- "@graphql-markdown/utils": "^1.11.0",
81
- "@docusaurus/utils": ">=3.9.2"
77
+ "@graphql-markdown/cli": "",
78
+ "@graphql-markdown/formatters": "",
79
+ "@graphql-markdown/logger": "",
80
+ "@graphql-markdown/types": "",
81
+ "@graphql-markdown/utils": "",
82
+ "@docusaurus/utils": "3.10.1"
82
83
  },
83
84
  "devDependencies": {
84
- "@docusaurus/types": "^3.7.0",
85
- "@graphql-markdown/tooling-config": "^1.0.0"
85
+ "@docusaurus/types": "3.10.1",
86
+ "@graphql-markdown/tooling-config": ""
86
87
  },
87
88
  "peerDependencies": {
88
89
  "@docusaurus/logger": "*"
@@ -91,7 +92,7 @@
91
92
  "test": "tests"
92
93
  },
93
94
  "engines": {
94
- "node": ">=20"
95
+ "node": ">=22.12.0"
95
96
  },
96
97
  "publishConfig": {
97
98
  "access": "public"
@@ -1,18 +0,0 @@
1
- /**
2
- * @module mdx
3
- * This module provides MDX React components.
4
- */
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
- */
17
- export declare const mdxDeclaration: MDXString;
18
- //# sourceMappingURL=components.d.ts.map
@@ -1 +0,0 @@
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,SAQf,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- /**
3
- * @module mdx
4
- * This module provides MDX React components.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
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
- */
19
- exports.mdxDeclaration = `
20
- export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}>&nbsp;●&nbsp;</span></>
21
-
22
- export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>
23
-
24
- export const Badge = (props) => <><span className={props.class}>{props.text}</span></>
25
-
26
-
27
- `;