@graphql-markdown/formatters 1.0.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.
Files changed (50) hide show
  1. package/README.md +106 -0
  2. package/dist/defaults.d.ts +63 -0
  3. package/dist/defaults.d.ts.map +1 -0
  4. package/dist/defaults.js +93 -0
  5. package/dist/docfx/index.d.ts +56 -0
  6. package/dist/docfx/index.d.ts.map +1 -0
  7. package/dist/docfx/index.js +184 -0
  8. package/dist/docfx.d.ts +20 -0
  9. package/dist/docfx.d.ts.map +1 -0
  10. package/dist/docfx.js +71 -0
  11. package/dist/docusaurus/index.d.ts +76 -0
  12. package/dist/docusaurus/index.d.ts.map +1 -0
  13. package/dist/docusaurus/index.js +139 -0
  14. package/dist/docusaurus.d.ts +20 -0
  15. package/dist/docusaurus.d.ts.map +1 -0
  16. package/dist/docusaurus.js +72 -0
  17. package/dist/fumadocs/index.d.ts +42 -0
  18. package/dist/fumadocs/index.d.ts.map +1 -0
  19. package/dist/fumadocs/index.js +80 -0
  20. package/dist/honkit/index.d.ts +75 -0
  21. package/dist/honkit/index.d.ts.map +1 -0
  22. package/dist/honkit/index.js +135 -0
  23. package/dist/hugo/index.d.ts +70 -0
  24. package/dist/hugo/index.d.ts.map +1 -0
  25. package/dist/hugo/index.js +143 -0
  26. package/dist/hugo.d.ts +20 -0
  27. package/dist/hugo.d.ts.map +1 -0
  28. package/dist/hugo.js +68 -0
  29. package/dist/index.d.ts +26 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +61 -0
  32. package/dist/mdbook/index.d.ts +69 -0
  33. package/dist/mdbook/index.d.ts.map +1 -0
  34. package/dist/mdbook/index.js +176 -0
  35. package/dist/mdbook.d.ts +20 -0
  36. package/dist/mdbook.d.ts.map +1 -0
  37. package/dist/mdbook.js +51 -0
  38. package/dist/mkdocs/index.d.ts +69 -0
  39. package/dist/mkdocs/index.d.ts.map +1 -0
  40. package/dist/mkdocs/index.js +138 -0
  41. package/dist/mkdocs.d.ts +19 -0
  42. package/dist/mkdocs.d.ts.map +1 -0
  43. package/dist/mkdocs.js +65 -0
  44. package/dist/starlight/index.d.ts +65 -0
  45. package/dist/starlight/index.d.ts.map +1 -0
  46. package/dist/starlight/index.js +113 -0
  47. package/dist/vocs/index.d.ts +55 -0
  48. package/dist/vocs/index.d.ts.map +1 -0
  49. package/dist/vocs/index.js +101 -0
  50. package/package.json +231 -0
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ /**
3
+ * Astro Starlight formatter for GraphQL documentation output.
4
+ *
5
+ * Produces MDX compatible with Astro Starlight using its native
6
+ * Aside and Badge components. Includes lifecycle hooks for generating
7
+ * index files for each category directory.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createMDXFormatter = exports.afterRenderTypeEntitiesHook = exports.beforeGenerateIndexMetafileHook = exports.formatMDXSpecifiedByLink = exports.formatMDXNameEntity = exports.formatMDXFrontmatter = exports.formatMDXDetails = exports.formatMDXBullet = exports.formatMDXLink = exports.formatMDXAdmonition = exports.formatMDXBadge = exports.mdxDeclaration = exports.mdxExtension = void 0;
13
+ const node_path_1 = require("node:path");
14
+ const promises_1 = require("node:fs/promises");
15
+ const helpers_1 = require("@graphql-markdown/helpers");
16
+ const utils_1 = require("@graphql-markdown/utils");
17
+ const defaults_1 = require("../defaults");
18
+ /** File extension used for generated pages. */
19
+ exports.mdxExtension = ".mdx";
20
+ /** MDX import statement prepended to every generated file to register Starlight components. */
21
+ exports.mdxDeclaration = `
22
+ import { Aside, Badge } from '@astrojs/starlight/components';
23
+ `;
24
+ /**
25
+ * Formats a badge using the Starlight `<Badge>` component.
26
+ * Maps `DEPRECATED` classname to the `caution` variant; all others use `default`.
27
+ * @param badge - Badge data containing text and optional classname
28
+ * @returns Formatted Starlight Badge component string
29
+ */
30
+ const formatMDXBadge = ({ text, classname }) => {
31
+ const variant = classname === "DEPRECATED" ? "caution" : "default";
32
+ return `<Badge variant="${variant}" text="${text}"/>`;
33
+ };
34
+ exports.formatMDXBadge = formatMDXBadge;
35
+ /**
36
+ * Formats an admonition using the Starlight `<Aside>` component.
37
+ * Maps `warning` type to `caution`; all other types use `note`.
38
+ * @param admonition - Admonition data with text, title, and type
39
+ * @param _meta - Unused metadata parameter
40
+ * @returns Formatted Starlight Aside component string
41
+ */
42
+ const formatMDXAdmonition = ({ text, title, type }, _meta) => {
43
+ const asideType = type === "warning" ? "caution" : "note";
44
+ return `${utils_1.MARKDOWN_EOP}<Aside type="${asideType}" title="${title}">${text}</Aside>`;
45
+ };
46
+ exports.formatMDXAdmonition = formatMDXAdmonition;
47
+ /**
48
+ * Appends `.mdx` to internal link URLs.
49
+ * @param link - Link data with URL and text
50
+ * @returns Link with `.mdx` extension appended to the URL
51
+ */
52
+ const formatMDXLink = ({ text, url }) => {
53
+ return {
54
+ text,
55
+ url: (0, helpers_1.appendLinkExtension)(url, exports.mdxExtension),
56
+ };
57
+ };
58
+ exports.formatMDXLink = formatMDXLink;
59
+ var defaults_2 = require("../defaults");
60
+ Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return defaults_2.formatMDXBullet; } });
61
+ Object.defineProperty(exports, "formatMDXDetails", { enumerable: true, get: function () { return defaults_2.formatMDXDetails; } });
62
+ Object.defineProperty(exports, "formatMDXFrontmatter", { enumerable: true, get: function () { return defaults_2.formatMDXFrontmatter; } });
63
+ Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return defaults_2.formatMDXNameEntity; } });
64
+ Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_2.formatMDXSpecifiedByLink; } });
65
+ const INDEX_MD = "index.md";
66
+ /**
67
+ * Lifecycle hook that creates an `index.md` file for a category directory
68
+ * before Starlight indexes it. Skips creation if the file already exists.
69
+ * @param event - Hook payload containing the target directory and category name
70
+ */
71
+ const beforeGenerateIndexMetafileHook = async (event) => {
72
+ const { dirPath, category } = event.data;
73
+ const filePath = (0, node_path_1.join)(dirPath, INDEX_MD);
74
+ if (await (0, utils_1.fileExists)(filePath)) {
75
+ return;
76
+ }
77
+ const label = (0, utils_1.startCase)(category);
78
+ await (0, utils_1.ensureDir)(dirPath);
79
+ await (0, utils_1.saveFile)(filePath, `---\ntitle: ${label}\n---\n`);
80
+ };
81
+ exports.beforeGenerateIndexMetafileHook = beforeGenerateIndexMetafileHook;
82
+ /**
83
+ * Lifecycle hook that appends a link entry to the category `index.md`
84
+ * after each type entity page is rendered.
85
+ * @param event - Hook payload containing the entity name and its output file path
86
+ */
87
+ const afterRenderTypeEntitiesHook = async (event) => {
88
+ const { name, filePath } = event.data;
89
+ const indexFilePath = (0, node_path_1.resolve)((0, node_path_1.dirname)(filePath), INDEX_MD);
90
+ const pageFileName = (0, node_path_1.basename)(filePath);
91
+ if (await (0, utils_1.fileExists)(indexFilePath)) {
92
+ await (0, promises_1.appendFile)(indexFilePath, `- [${name}](./${pageFileName})\n`);
93
+ }
94
+ };
95
+ exports.afterRenderTypeEntitiesHook = afterRenderTypeEntitiesHook;
96
+ /**
97
+ * Creates an Astro Starlight formatter.
98
+ * @param _meta - Unused metadata parameter
99
+ * @returns A complete {@link Formatter} implementation for Starlight MDX output
100
+ */
101
+ const createMDXFormatter = (_meta) => {
102
+ return {
103
+ formatMDXBadge: exports.formatMDXBadge,
104
+ formatMDXAdmonition: exports.formatMDXAdmonition,
105
+ formatMDXBullet: defaults_1.formatMDXBullet,
106
+ formatMDXDetails: defaults_1.formatMDXDetails,
107
+ formatMDXFrontmatter: defaults_1.formatMDXFrontmatter,
108
+ formatMDXLink: exports.formatMDXLink,
109
+ formatMDXNameEntity: defaults_1.formatMDXNameEntity,
110
+ formatMDXSpecifiedByLink: defaults_1.formatMDXSpecifiedByLink,
111
+ };
112
+ };
113
+ exports.createMDXFormatter = createMDXFormatter;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Vocs formatter for GraphQL documentation output.
3
+ *
4
+ * Produces MDX compatible with Vite/Vocs using its native callout syntax
5
+ * and Material UI Chip components for badges.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ import type { AdmonitionType, Badge, Formatter, Maybe, MDXString, MetaInfo, TypeLink } from "@graphql-markdown/types";
10
+ /** MDX import statement and inline component definitions prepended to every generated file. */
11
+ export declare const mdxDeclaration: MDXString;
12
+ /** File extension used for generated pages. */
13
+ export declare const mdxExtension: ".mdx";
14
+ /**
15
+ * Formats a badge using the Material UI `<Chip>` component.
16
+ * Maps `DEPRECATED` classname to `warning` color; all others use `info`.
17
+ * @param badge - Badge data containing text and optional classname
18
+ * @returns Formatted MUI Chip component string
19
+ */
20
+ export declare const formatMDXBadge: ({ text, classname }: Badge) => MDXString;
21
+ /**
22
+ * Formats an admonition using Vocs native callout syntax (`:::type[title]`).
23
+ * Maps `warning` type to `warning`; all other types use `info`.
24
+ * @param admonition - Admonition data with text, title, and type
25
+ * @param _meta - Unused metadata parameter
26
+ * @returns Formatted Vocs callout string
27
+ */
28
+ export declare const formatMDXAdmonition: ({ text, title, type }: AdmonitionType, _meta: Maybe<MetaInfo>) => MDXString;
29
+ /**
30
+ * Formats a bullet point using the inline `<Bullet/>` component defined in `mdxDeclaration`.
31
+ * @param text - Optional text to append after the bullet
32
+ * @returns Formatted Bullet component string
33
+ */
34
+ export declare const formatMDXBullet: (text?: string) => MDXString;
35
+ /**
36
+ * Appends `.mdx` to internal link URLs.
37
+ * @param link - Link data with URL and text
38
+ * @returns Link with `.mdx` extension appended to the URL
39
+ */
40
+ export declare const formatMDXLink: ({ text, url }: TypeLink) => TypeLink;
41
+ /**
42
+ * Formats a named entity as a JSX span with styled code elements.
43
+ * @param name - Entity name
44
+ * @param parentType - Optional parent type name for qualified references
45
+ * @returns Formatted JSX entity reference string
46
+ */
47
+ export declare const formatMDXNameEntity: (name: string, parentType?: Maybe<string>) => MDXString;
48
+ export { formatMDXDetails, formatMDXFrontmatter, formatMDXSpecifiedByLink, } from "../defaults";
49
+ /**
50
+ * Creates a Vocs formatter.
51
+ * @param _meta - Unused metadata parameter
52
+ * @returns A complete {@link Formatter} implementation for Vocs MDX output
53
+ */
54
+ export declare const createMDXFormatter: (_meta?: Maybe<MetaInfo>) => Formatter;
55
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vocs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,SAAS,EACT,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACT,MAAM,yBAAyB,CAAC;AASjC,+FAA+F;AAC/F,eAAO,MAAM,cAAc,EAAE,SAIf,CAAC;AAEf,+CAA+C;AAC/C,eAAO,MAAM,YAAY,EAAG,MAAe,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,wBAAyB,KAAK,KAAG,SAG3D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BACP,cAAc,SAC9B,KAAK,CAAC,QAAQ,CAAC,KACrB,SAGF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,qBAAgB,SAE3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,kBAAmB,QAAQ,KAAG,QAKvD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,SACxB,MAAM,eACC,KAAK,CAAC,MAAM,CAAC,KACzB,SAKF,CAAC;AAEF,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WAAY,KAAK,CAAC,QAAQ,CAAC,KAAG,SAW5D,CAAC"}
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ /**
3
+ * Vocs formatter for GraphQL documentation output.
4
+ *
5
+ * Produces MDX compatible with Vite/Vocs using its native callout syntax
6
+ * and Material UI Chip components for badges.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.createMDXFormatter = exports.formatMDXSpecifiedByLink = exports.formatMDXFrontmatter = exports.formatMDXDetails = exports.formatMDXNameEntity = exports.formatMDXLink = exports.formatMDXBullet = exports.formatMDXAdmonition = exports.formatMDXBadge = exports.mdxExtension = exports.mdxDeclaration = void 0;
12
+ const helpers_1 = require("@graphql-markdown/helpers");
13
+ const utils_1 = require("@graphql-markdown/utils");
14
+ const defaults_1 = require("../defaults");
15
+ /** MDX import statement and inline component definitions prepended to every generated file. */
16
+ exports.mdxDeclaration = `
17
+ import Chip from '@mui/material/Chip';
18
+
19
+ export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em' }}>&nbsp;●&nbsp;</span></>
20
+ `;
21
+ /** File extension used for generated pages. */
22
+ exports.mdxExtension = ".mdx";
23
+ /**
24
+ * Formats a badge using the Material UI `<Chip>` component.
25
+ * Maps `DEPRECATED` classname to `warning` color; all others use `info`.
26
+ * @param badge - Badge data containing text and optional classname
27
+ * @returns Formatted MUI Chip component string
28
+ */
29
+ const formatMDXBadge = ({ text, classname }) => {
30
+ const color = classname === "DEPRECATED" ? "warning" : "info";
31
+ return `<Chip color="${color}" label="${text}" size="small" variant="outlined"/>`;
32
+ };
33
+ exports.formatMDXBadge = formatMDXBadge;
34
+ /**
35
+ * Formats an admonition using Vocs native callout syntax (`:::type[title]`).
36
+ * Maps `warning` type to `warning`; all other types use `info`.
37
+ * @param admonition - Admonition data with text, title, and type
38
+ * @param _meta - Unused metadata parameter
39
+ * @returns Formatted Vocs callout string
40
+ */
41
+ const formatMDXAdmonition = ({ text, title, type }, _meta) => {
42
+ const calloutType = type === "warning" ? "warning" : "info";
43
+ return `${utils_1.MARKDOWN_EOP}:::${calloutType}[${title}]${text}:::`;
44
+ };
45
+ exports.formatMDXAdmonition = formatMDXAdmonition;
46
+ /**
47
+ * Formats a bullet point using the inline `<Bullet/>` component defined in `mdxDeclaration`.
48
+ * @param text - Optional text to append after the bullet
49
+ * @returns Formatted Bullet component string
50
+ */
51
+ const formatMDXBullet = (text = "") => {
52
+ return `<Bullet/>${text}`;
53
+ };
54
+ exports.formatMDXBullet = formatMDXBullet;
55
+ /**
56
+ * Appends `.mdx` to internal link URLs.
57
+ * @param link - Link data with URL and text
58
+ * @returns Link with `.mdx` extension appended to the URL
59
+ */
60
+ const formatMDXLink = ({ text, url }) => {
61
+ return {
62
+ text,
63
+ url: (0, helpers_1.appendLinkExtension)(url, exports.mdxExtension),
64
+ };
65
+ };
66
+ exports.formatMDXLink = formatMDXLink;
67
+ /**
68
+ * Formats a named entity as a JSX span with styled code elements.
69
+ * @param name - Entity name
70
+ * @param parentType - Optional parent type name for qualified references
71
+ * @returns Formatted JSX entity reference string
72
+ */
73
+ const formatMDXNameEntity = (name, parentType) => {
74
+ if (parentType) {
75
+ return `<span className="gqlmd-mdx-entity"><code className="gqlmd-mdx-entity-parent">${parentType}</code>.<code className="gqlmd-mdx-entity-name">${name}</code></span>`;
76
+ }
77
+ return `<span className="gqlmd-mdx-entity"><code className="gqlmd-mdx-entity-name">${name}</code></span>`;
78
+ };
79
+ exports.formatMDXNameEntity = formatMDXNameEntity;
80
+ var defaults_2 = require("../defaults");
81
+ Object.defineProperty(exports, "formatMDXDetails", { enumerable: true, get: function () { return defaults_2.formatMDXDetails; } });
82
+ Object.defineProperty(exports, "formatMDXFrontmatter", { enumerable: true, get: function () { return defaults_2.formatMDXFrontmatter; } });
83
+ Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_2.formatMDXSpecifiedByLink; } });
84
+ /**
85
+ * Creates a Vocs formatter.
86
+ * @param _meta - Unused metadata parameter
87
+ * @returns A complete {@link Formatter} implementation for Vocs MDX output
88
+ */
89
+ const createMDXFormatter = (_meta) => {
90
+ return {
91
+ formatMDXBadge: exports.formatMDXBadge,
92
+ formatMDXAdmonition: exports.formatMDXAdmonition,
93
+ formatMDXBullet: exports.formatMDXBullet,
94
+ formatMDXDetails: defaults_1.formatMDXDetails,
95
+ formatMDXFrontmatter: defaults_1.formatMDXFrontmatter,
96
+ formatMDXLink: exports.formatMDXLink,
97
+ formatMDXNameEntity: exports.formatMDXNameEntity,
98
+ formatMDXSpecifiedByLink: defaults_1.formatMDXSpecifiedByLink,
99
+ };
100
+ };
101
+ exports.createMDXFormatter = createMDXFormatter;
package/package.json ADDED
@@ -0,0 +1,231 @@
1
+ {
2
+ "name": "@graphql-markdown/formatters",
3
+ "homepage": "https://graphql-markdown.dev",
4
+ "description": "Formatter presets for Docusaurus, Starlight, Fumadocs, Vocs, HonKit, Hugo, MkDocs, DocFX, and mdBook.",
5
+ "bugs": {
6
+ "url": "https://github.com/graphql-markdown/graphql-markdown/issues"
7
+ },
8
+ "version": "1.0.0",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/graphql-markdown/graphql-markdown.git",
13
+ "directory": "packages/formatters"
14
+ },
15
+ "keywords": [
16
+ "graphql",
17
+ "graphql-markdown",
18
+ "docusaurus",
19
+ "starlight",
20
+ "fumadocs",
21
+ "vocs",
22
+ "honkit",
23
+ "hugo",
24
+ "mkdocs",
25
+ "docfx",
26
+ "mdbook",
27
+ "documentation",
28
+ "formatter"
29
+ ],
30
+ "author": {
31
+ "name": "Gregory Heitz"
32
+ },
33
+ "main": "dist/index.js",
34
+ "types": "dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "require": {
38
+ "types": "./dist/index.d.ts",
39
+ "default": "./dist/index.js"
40
+ },
41
+ "import": {
42
+ "types": "./dist/index.d.ts",
43
+ "default": "./dist/index.js"
44
+ },
45
+ "default": {
46
+ "types": "./dist/index.d.ts",
47
+ "default": "./dist/index.js"
48
+ }
49
+ },
50
+ "./docusaurus": {
51
+ "require": {
52
+ "types": "./dist/docusaurus/index.d.ts",
53
+ "default": "./dist/docusaurus/index.js"
54
+ },
55
+ "import": {
56
+ "types": "./dist/docusaurus/index.d.ts",
57
+ "default": "./dist/docusaurus/index.js"
58
+ },
59
+ "default": {
60
+ "types": "./dist/docusaurus/index.d.ts",
61
+ "default": "./dist/docusaurus/index.js"
62
+ }
63
+ },
64
+ "./docfx": {
65
+ "require": {
66
+ "types": "./dist/docfx/index.d.ts",
67
+ "default": "./dist/docfx/index.js"
68
+ },
69
+ "import": {
70
+ "types": "./dist/docfx/index.d.ts",
71
+ "default": "./dist/docfx/index.js"
72
+ },
73
+ "default": {
74
+ "types": "./dist/docfx/index.d.ts",
75
+ "default": "./dist/docfx/index.js"
76
+ }
77
+ },
78
+ "./fumadocs": {
79
+ "require": {
80
+ "types": "./dist/fumadocs/index.d.ts",
81
+ "default": "./dist/fumadocs/index.js"
82
+ },
83
+ "import": {
84
+ "types": "./dist/fumadocs/index.d.ts",
85
+ "default": "./dist/fumadocs/index.js"
86
+ },
87
+ "default": {
88
+ "types": "./dist/fumadocs/index.d.ts",
89
+ "default": "./dist/fumadocs/index.js"
90
+ }
91
+ },
92
+ "./honkit": {
93
+ "require": {
94
+ "types": "./dist/honkit/index.d.ts",
95
+ "default": "./dist/honkit/index.js"
96
+ },
97
+ "import": {
98
+ "types": "./dist/honkit/index.d.ts",
99
+ "default": "./dist/honkit/index.js"
100
+ },
101
+ "default": {
102
+ "types": "./dist/honkit/index.d.ts",
103
+ "default": "./dist/honkit/index.js"
104
+ }
105
+ },
106
+ "./hugo": {
107
+ "require": {
108
+ "types": "./dist/hugo/index.d.ts",
109
+ "default": "./dist/hugo/index.js"
110
+ },
111
+ "import": {
112
+ "types": "./dist/hugo/index.d.ts",
113
+ "default": "./dist/hugo/index.js"
114
+ },
115
+ "default": {
116
+ "types": "./dist/hugo/index.d.ts",
117
+ "default": "./dist/hugo/index.js"
118
+ }
119
+ },
120
+ "./mdbook": {
121
+ "require": {
122
+ "types": "./dist/mdbook/index.d.ts",
123
+ "default": "./dist/mdbook/index.js"
124
+ },
125
+ "import": {
126
+ "types": "./dist/mdbook/index.d.ts",
127
+ "default": "./dist/mdbook/index.js"
128
+ },
129
+ "default": {
130
+ "types": "./dist/mdbook/index.d.ts",
131
+ "default": "./dist/mdbook/index.js"
132
+ }
133
+ },
134
+ "./mkdocs": {
135
+ "require": {
136
+ "types": "./dist/mkdocs/index.d.ts",
137
+ "default": "./dist/mkdocs/index.js"
138
+ },
139
+ "import": {
140
+ "types": "./dist/mkdocs/index.d.ts",
141
+ "default": "./dist/mkdocs/index.js"
142
+ },
143
+ "default": {
144
+ "types": "./dist/mkdocs/index.d.ts",
145
+ "default": "./dist/mkdocs/index.js"
146
+ }
147
+ },
148
+ "./starlight": {
149
+ "require": {
150
+ "types": "./dist/starlight/index.d.ts",
151
+ "default": "./dist/starlight/index.js"
152
+ },
153
+ "import": {
154
+ "types": "./dist/starlight/index.d.ts",
155
+ "default": "./dist/starlight/index.js"
156
+ },
157
+ "default": {
158
+ "types": "./dist/starlight/index.d.ts",
159
+ "default": "./dist/starlight/index.js"
160
+ }
161
+ },
162
+ "./vocs": {
163
+ "require": {
164
+ "types": "./dist/vocs/index.d.ts",
165
+ "default": "./dist/vocs/index.js"
166
+ },
167
+ "import": {
168
+ "types": "./dist/vocs/index.d.ts",
169
+ "default": "./dist/vocs/index.js"
170
+ },
171
+ "default": {
172
+ "types": "./dist/vocs/index.d.ts",
173
+ "default": "./dist/vocs/index.js"
174
+ }
175
+ },
176
+ "./defaults": {
177
+ "require": {
178
+ "types": "./dist/defaults.d.ts",
179
+ "default": "./dist/defaults.js"
180
+ },
181
+ "import": {
182
+ "types": "./dist/defaults.d.ts",
183
+ "default": "./dist/defaults.js"
184
+ },
185
+ "default": {
186
+ "types": "./dist/defaults.d.ts",
187
+ "default": "./dist/defaults.js"
188
+ }
189
+ },
190
+ "./package.json": "./package.json"
191
+ },
192
+ "scripts": {
193
+ "stryker": "stryker run",
194
+ "clean": "tsgo --build --clean && rm -rf ./dist",
195
+ "docs": "typedoc --options typedoc.config.mjs",
196
+ "build": "tsgo --build",
197
+ "lint": "eslint --config ../../packages/tooling-config/eslint/config.ts \"{src,tests}/**/*.{ts,js,json,gql}\"",
198
+ "lint:fix": "eslint --config ../../packages/tooling-config/eslint/config.ts \"{src,tests}/**/*.{ts,js,json,gql}\" --fix",
199
+ "prettier": "prettier \"{src,tests}/**/*.{ts,js,json,md,gql}\" --check",
200
+ "prettier:fix": "prettier \"{src,tests}/**/*.{ts,js,json,md,gql}\" --write",
201
+ "ts:check": "tsgo --noEmit",
202
+ "test": "jest",
203
+ "test:unit": "jest --passWithNoTests --testPathPatterns=tests/unit",
204
+ "test:integration": "jest --passWithNoTests --testPathPatterns=tests/integration",
205
+ "test:ci": "jest --passWithNoTests --ci --silent --randomize --runInBand",
206
+ "test:watch": "jest --watch"
207
+ },
208
+ "dependencies": {
209
+ "@graphql-markdown/helpers": "^1.1.0",
210
+ "@graphql-markdown/types": "^1.13.0",
211
+ "@graphql-markdown/utils": "^1.12.0"
212
+ },
213
+ "devDependencies": {
214
+ "@graphql-markdown/tooling-config": "^1.0.0"
215
+ },
216
+ "directories": {
217
+ "test": "tests"
218
+ },
219
+ "engines": {
220
+ "node": ">=20"
221
+ },
222
+ "publishConfig": {
223
+ "access": "public"
224
+ },
225
+ "typescript": {
226
+ "definition": "dist/index.d.ts"
227
+ },
228
+ "files": [
229
+ "dist"
230
+ ]
231
+ }