@graphql-markdown/formatters 1.1.3 → 1.2.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.
package/README.md CHANGED
@@ -1,16 +1,23 @@
1
1
  # @graphql-markdown/formatters
2
2
 
3
- Framework formatter presets for GraphQL-Markdown.
3
+ [![Latest Version](https://img.shields.io/npm/v/@graphql-markdown/formatters?style=flat)](https://www.npmjs.com/package/@graphql-markdown/formatters)
4
+ [![JSR](https://jsr.io/badges/@graphql-markdown/formatters)](https://jsr.io/@graphql-markdown/formatters)
5
+ [![GitHub License](https://img.shields.io/github/license/graphql-markdown/graphql-markdown?style=flat)](https://raw.githubusercontent.com/graphql-markdown/graphql-markdown/main/LICENSE)
6
+ [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=graphql-markdown_formatters&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=graphql-markdown_formatters)
7
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=graphql-markdown_formatters&metric=coverage)](https://sonarcloud.io/summary/new_code?id=graphql-markdown_formatters)
8
+ [![Mutation Score](https://img.shields.io/endpoint?label=mutation%20score&style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fgraphql-markdown%2Fgraphql-markdown%2Fmain%3Fmodule%3Dformatters)](https://dashboard.stryker-mutator.io/reports/github.com/graphql-markdown/graphql-markdown/main?module=formatters)
9
+
10
+ Framework formatter presets for [GraphQL-Markdown](https://graphql-markdown.dev).
4
11
 
5
12
  This package provides ready-to-use formatter presets for popular documentation frameworks, with each formatter in its own package subpath.
6
13
 
7
14
  ## Installation
8
15
 
9
- ```bash
16
+ ```shell
10
17
  npm install @graphql-markdown/formatters
11
18
  ```
12
19
 
13
- ## Quick Start
20
+ ## Usage
14
21
 
15
22
  Use any formatter in your GraphQL-Markdown configuration:
16
23
 
@@ -38,29 +45,35 @@ await runGraphQLMarkdown({
38
45
 
39
46
  The legacy `mdxParser` setting still works as a deprecated alias, but new configurations should use `formatter`.
40
47
 
41
- ## Supported Formatters
48
+ ## Supported formatters
42
49
 
43
50
  Each formatter has its own setup guide:
44
51
 
45
- | Framework | Package Path | Documentation |
46
- | --------- | ------------ | ------------- |
47
- | Astro Starlight | `@graphql-markdown/formatters/starlight` | [Guide](src/starlight/README.md) |
48
- | DocFX | `@graphql-markdown/formatters/docfx` | [Guide](src/docfx/README.md) |
49
- | Docusaurus | `@graphql-markdown/formatters/docusaurus` | [Guide](src/docusaurus/README.md) |
50
- | HonKit | `@graphql-markdown/formatters/honkit` | [Guide](src/honkit/README.md) |
51
- | Hugo | `@graphql-markdown/formatters/hugo` | [Guide](src/hugo/README.md) |
52
- | mdBook | `@graphql-markdown/formatters/mdbook` | [Guide](src/mdbook/README.md) |
53
- | MkDocs | `@graphql-markdown/formatters/mkdocs` | [Guide](src/mkdocs/README.md) |
54
- | Next.js + Fumadocs | `@graphql-markdown/formatters/fumadocs` | [Guide](src/fumadocs/README.md) |
55
- | Vocs | `@graphql-markdown/formatters/vocs` | [Guide](src/vocs/README.md) |
56
-
57
- ## Custom Formatter
52
+ | Framework | Package Path | Documentation |
53
+ | ------------------ | ----------------------------------------- | --------------------------------- |
54
+ | Astro Starlight | `@graphql-markdown/formatters/starlight` | [Guide](src/starlight/README.md) |
55
+ | DocFX | `@graphql-markdown/formatters/docfx` | [Guide](src/docfx/README.md) |
56
+ | Docusaurus | `@graphql-markdown/formatters/docusaurus` | [Guide](src/docusaurus/README.md) |
57
+ | HonKit | `@graphql-markdown/formatters/honkit` | [Guide](src/honkit/README.md) |
58
+ | Hugo | `@graphql-markdown/formatters/hugo` | [Guide](src/hugo/README.md) |
59
+ | mdBook | `@graphql-markdown/formatters/mdbook` | [Guide](src/mdbook/README.md) |
60
+ | Generic MDX | `@graphql-markdown/formatters/mdx` | [Guide](src/mdx/README.md) |
61
+ | MkDocs | `@graphql-markdown/formatters/mkdocs` | [Guide](src/mkdocs/README.md) |
62
+ | Next.js + Fumadocs | `@graphql-markdown/formatters/fumadocs` | [Guide](src/fumadocs/README.md) |
63
+ | Vocs | `@graphql-markdown/formatters/vocs` | [Guide](src/vocs/README.md) |
64
+
65
+ ## Custom formatter
58
66
 
59
67
  For frameworks not listed above, create a custom MDX module. See the [Integration Guide](https://graphql-markdown.dev/docs/advanced/integration-with-frameworks#custom-mdx-formatter) for the full formatter contract, the `formatMDXDetails` `\r` delimiter invariant, and examples of extending a preset.
60
68
 
69
+ ## Documentation
70
+
71
+ - [Integration with Frameworks](https://graphql-markdown.dev/docs/advanced/integration-with-frameworks)
72
+ - [Configuration Options](https://graphql-markdown.dev/docs/settings)
73
+
61
74
  ## Contributing
62
75
 
63
- ### Add a New Formatter
76
+ ### Add a new formatter
64
77
 
65
78
  1. Create the formatter module at `src/<name>/index.ts`.
66
79
  2. Create documentation at `src/<name>/README.md`.
@@ -68,13 +81,13 @@ For frameworks not listed above, create a custom MDX module. See the [Integratio
68
81
  4. Add a package subpath export for `./<name>` in `package.json` under `exports`.
69
82
  5. Add unit tests in `tests/unit/<name>/index.test.ts`.
70
83
 
71
- ### Formatter Contract
84
+ ### Formatter contract
72
85
 
73
86
  A formatter module exports `createMDXFormatter` and any subset of the standard formatter functions (`formatMDXBadge`, `formatMDXAdmonition`, `formatMDXBullet`, `formatMDXDetails`, `formatMDXFrontmatter`, `formatMDXLink`, `formatMDXNameEntity`, `formatMDXSpecifiedByLink`). Optional exports include `mdxDeclaration`, `mdxExtension`, and lifecycle hooks.
74
87
 
75
88
  See the [Integration Guide](https://graphql-markdown.dev/docs/advanced/integration-with-frameworks#custom-mdx-formatter) for the full contract, type signatures, and the `formatMDXDetails` `\r` delimiter invariant.
76
89
 
77
- ### Testing Checklist
90
+ ### Testing checklist
78
91
 
79
92
  Add tests that verify:
80
93
 
@@ -84,14 +97,14 @@ Add tests that verify:
84
97
 
85
98
  Run targeted tests while developing:
86
99
 
87
- ```bash
100
+ ```shell
88
101
  cd packages/formatters
89
102
  bun run test:unit -- tests/unit/<name>/index.test.ts
90
103
  ```
91
104
 
92
105
  Run package checks before opening a PR:
93
106
 
94
- ```bash
107
+ ```shell
95
108
  cd packages/formatters
96
109
  bun run lint
97
110
  bun run prettier
@@ -100,7 +113,13 @@ bun run test:unit
100
113
 
101
114
  For repository-wide validation:
102
115
 
103
- ```bash
116
+ ```shell
104
117
  cd /path/to/graphql-markdown
105
118
  bun run test
106
119
  ```
120
+
121
+ ## License
122
+
123
+ GraphQL-Markdown packages are 100% free and open-source, under the [MIT license](https://github.com/graphql-markdown/graphql-markdown/blob/main/LICENSE).
124
+
125
+ This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/graphql-markdown/graphql-markdown) to thank us for our work. By contributing to the Treeware forest, you'll be creating employment for local families and restoring wildlife habitats.
@@ -37,7 +37,7 @@ export declare const formatMDXFrontmatter: (props: Maybe<FrontMatterOptions>, fo
37
37
  * @returns The link unchanged
38
38
  */
39
39
  export declare const formatMDXLink: (link: TypeLink) => TypeLink;
40
- export { formatMDXBullet, formatMDXDetails, formatMDXNameEntity, formatMDXPermalink, formatMDXSpecifiedByLink, } from "../defaults";
40
+ export { formatMDXBullet, formatMDXDetails, formatMDXNameEntity, formatMDXPermalink, formatMDXSpecifiedByLink, } from "../defaults.ts";
41
41
  /**
42
42
  * Creates a DocFX formatter.
43
43
  * @param _meta - Unused metadata parameter
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docfx/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,SAAS,EACT,kBAAkB,EAClB,KAAK,EAEL,SAAS,EACT,QAAQ,EACR,sBAAsB,EACtB,QAAQ,EACT,MAAM,yBAAyB,CAAC;AA+BjC,sFAAsF;AACtF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIlD,CAAC;AAEF;;;;GAIG;AACH,eA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AAkB,CAAC,aACrB,KAAK,CAAC,MAAM,EAAE,CAAC,KACzB,SAgBF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,SAAU,QAAQ,KAAG,QAE9C,CAAC;AAEF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WAAY,KAAK,CAAC,QAAQ,CAAC,KAAG,SAY5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAG,KAAc,CAAC;AA0P3C,eAAO,MAAM,2BAA2B,EAAE,sBAiDzC,CAAC"}
@@ -13,8 +13,8 @@ exports.afterRenderTypeEntitiesHook = exports.mdxExtension = exports.createMDXFo
13
13
  const node_path_1 = require("node:path");
14
14
  const helpers_1 = require("@graphql-markdown/helpers");
15
15
  const utils_1 = require("@graphql-markdown/utils");
16
- const defaults_1 = require("../defaults");
17
- const output_1 = require("../output");
16
+ const defaults_ts_1 = require("../defaults.js");
17
+ const output_ts_1 = require("../output.js");
18
18
  /** Maps graphql-markdown admonition types to DocFX alert types. */
19
19
  const ALERT_TYPE_MAP = {
20
20
  note: "NOTE",
@@ -87,12 +87,12 @@ const formatMDXLink = (link) => {
87
87
  return link;
88
88
  };
89
89
  exports.formatMDXLink = formatMDXLink;
90
- var defaults_2 = require("../defaults");
91
- Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return defaults_2.formatMDXBullet; } });
92
- Object.defineProperty(exports, "formatMDXDetails", { enumerable: true, get: function () { return defaults_2.formatMDXDetails; } });
93
- Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return defaults_2.formatMDXNameEntity; } });
94
- Object.defineProperty(exports, "formatMDXPermalink", { enumerable: true, get: function () { return defaults_2.formatMDXPermalink; } });
95
- Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_2.formatMDXSpecifiedByLink; } });
90
+ var defaults_ts_2 = require("../defaults.js");
91
+ Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return defaults_ts_2.formatMDXBullet; } });
92
+ Object.defineProperty(exports, "formatMDXDetails", { enumerable: true, get: function () { return defaults_ts_2.formatMDXDetails; } });
93
+ Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return defaults_ts_2.formatMDXNameEntity; } });
94
+ Object.defineProperty(exports, "formatMDXPermalink", { enumerable: true, get: function () { return defaults_ts_2.formatMDXPermalink; } });
95
+ Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_ts_2.formatMDXSpecifiedByLink; } });
96
96
  /**
97
97
  * Creates a DocFX formatter.
98
98
  * @param _meta - Unused metadata parameter
@@ -102,13 +102,13 @@ const createMDXFormatter = (_meta) => {
102
102
  return {
103
103
  formatMDXBadge: exports.formatMDXBadge,
104
104
  formatMDXAdmonition: exports.formatMDXAdmonition,
105
- formatMDXBullet: defaults_1.formatMDXBullet,
106
- formatMDXDetails: defaults_1.formatMDXDetails,
105
+ formatMDXBullet: defaults_ts_1.formatMDXBullet,
106
+ formatMDXDetails: defaults_ts_1.formatMDXDetails,
107
107
  formatMDXFrontmatter: exports.formatMDXFrontmatter,
108
108
  formatMDXLink: exports.formatMDXLink,
109
- formatMDXNameEntity: defaults_1.formatMDXNameEntity,
110
- formatMDXPermalink: defaults_1.formatMDXPermalink,
111
- formatMDXSpecifiedByLink: defaults_1.formatMDXSpecifiedByLink,
109
+ formatMDXNameEntity: defaults_ts_1.formatMDXNameEntity,
110
+ formatMDXPermalink: defaults_ts_1.formatMDXPermalink,
111
+ formatMDXSpecifiedByLink: defaults_ts_1.formatMDXSpecifiedByLink,
112
112
  };
113
113
  };
114
114
  exports.createMDXFormatter = createMDXFormatter;
@@ -133,7 +133,7 @@ const isAbsoluteInternalLink = (content, urlStart) => {
133
133
  /**
134
134
  * Resolves an internal link to its relative path within the generated documentation.
135
135
  */
136
- const resolveLink = (urlWithHash, filePath, outputDir, normalizedBaseURL, baseSegment) => {
136
+ const resolveLink = (urlWithHash, filePath, outputDir, normalizedBaseURL, baseSegment, knownDocPaths) => {
137
137
  const sepIdx = urlWithHash.indexOf("#");
138
138
  const [urlPath, hash] = sepIdx < 0
139
139
  ? [urlWithHash, ""]
@@ -147,6 +147,7 @@ const resolveLink = (urlWithHash, filePath, outputDir, normalizedBaseURL, baseSe
147
147
  baseURL: normalizedBaseURL,
148
148
  currentFilePath: filePath,
149
149
  extension: exports.mdxExtension,
150
+ knownDocPaths,
150
151
  outputDir,
151
152
  targetUrlPath: urlPath.slice(baseIndex),
152
153
  });
@@ -156,7 +157,7 @@ const resolveLink = (urlWithHash, filePath, outputDir, normalizedBaseURL, baseSe
156
157
  * Rewrites all absolute internal links in the content to relative links
157
158
  * based on the file's location and the documentation structure.
158
159
  */
159
- const rewriteInternalLinks = (content, filePath, outputDir, baseURL) => {
160
+ const rewriteInternalLinks = (content, filePath, outputDir, baseURL, knownDocPaths) => {
160
161
  const normalizedBaseURL = baseURL.split("/").filter(Boolean).join("/");
161
162
  const baseSegment = `/${normalizedBaseURL}/`;
162
163
  // Use indexOf scanning instead of regex to avoid ReDoS on file content.
@@ -175,7 +176,7 @@ const rewriteInternalLinks = (content, filePath, outputDir, baseURL) => {
175
176
  pos = urlStart;
176
177
  continue;
177
178
  }
178
- out.push(content.slice(pos, markerPos), resolveLink(match.urlWithHash, filePath, outputDir, normalizedBaseURL, baseSegment));
179
+ out.push(content.slice(pos, markerPos), resolveLink(match.urlWithHash, filePath, outputDir, normalizedBaseURL, baseSegment, knownDocPaths));
179
180
  pos = match.closePos + 1;
180
181
  }
181
182
  return out.join("");
@@ -203,15 +204,15 @@ const queueFileUpdate = async (filePath, update) => {
203
204
  const updateToc = async (tocFilePath, name, href, outputAdapter) => {
204
205
  await queueFileUpdate(tocFilePath, async () => {
205
206
  const entry = `- name: ${name}${utils_1.MARKDOWN_EOL} href: ${href}`;
206
- const existing = await (0, output_1.readOptionalOutput)(tocFilePath, outputAdapter);
207
+ const existing = await (0, output_ts_1.readOptionalOutput)(tocFilePath, outputAdapter);
207
208
  if (typeof existing !== "string") {
208
- await (0, output_1.writeOutput)(tocFilePath, entry + utils_1.MARKDOWN_EOL, outputAdapter);
209
+ await (0, output_ts_1.writeOutput)(tocFilePath, entry + utils_1.MARKDOWN_EOL, outputAdapter);
209
210
  return;
210
211
  }
211
212
  if (existing.includes(`href: ${href}`)) {
212
213
  return;
213
214
  }
214
- await (0, output_1.writeOutput)(tocFilePath, existing.trimEnd() + utils_1.MARKDOWN_EOL + entry + utils_1.MARKDOWN_EOL, outputAdapter);
215
+ await (0, output_ts_1.writeOutput)(tocFilePath, existing.trimEnd() + utils_1.MARKDOWN_EOL + entry + utils_1.MARKDOWN_EOL, outputAdapter);
215
216
  });
216
217
  };
217
218
  // Tracks directories whose index.md has already been prepended to their toc.yml,
@@ -244,7 +245,7 @@ const addOverviewEntry = async (currentDir, tocPath, isRoot, outputAdapter) => {
244
245
  // the section index lives wherever the pages were written, which is not the
245
246
  // local filesystem when a custom adapter is configured
246
247
  const indexPath = (0, node_path_1.join)(currentDir, "index.md");
247
- if (typeof (await (0, output_1.readOptionalOutput)(indexPath, outputAdapter)) !== "string") {
248
+ if (typeof (await (0, output_ts_1.readOptionalOutput)(indexPath, outputAdapter)) !== "string") {
248
249
  return;
249
250
  }
250
251
  await updateToc(tocPath, `${(0, utils_1.capitalize)((0, node_path_1.basename)(currentDir))} Overview`, "index.md", outputAdapter);
@@ -285,12 +286,12 @@ const updateTocChain = async (page, outputAdapter) => {
285
286
  }
286
287
  };
287
288
  const afterRenderTypeEntitiesHook = async (event) => {
288
- const { baseURL, filePath, name, outputAdapter, outputDir } = event.data;
289
+ const { baseURL, filePath, knownDocPaths, name, outputAdapter, outputDir } = event.data;
289
290
  const pagePath = (0, node_path_1.relative)(outputDir, filePath);
290
291
  // Rewrite uid as a path-derived value to guarantee uniqueness across the site.
291
292
  // e.g. operations/queries/continent.md → uid: operations-queries-continent
292
293
  const uid = pagePath.replace(/\.mdx?$/, "").replaceAll(/[/\\]/g, "-");
293
- const content = await (0, output_1.readOutput)(filePath, outputAdapter);
294
+ const content = await (0, output_ts_1.readOutput)(filePath, outputAdapter);
294
295
  if (typeof content !== "string") {
295
296
  return;
296
297
  }
@@ -298,9 +299,9 @@ const afterRenderTypeEntitiesHook = async (event) => {
298
299
  // matches newlines, which would overlap with the `m`-flag line anchors and
299
300
  // cause polynomial backtracking when no "uid:" line is present.
300
301
  const withUid = content.replace(/^([ \t]*)uid:.*$/m, `$1uid: ${uid}`);
301
- const rewritten = rewriteInternalLinks(withUid, filePath, outputDir, baseURL);
302
+ const rewritten = rewriteInternalLinks(withUid, filePath, outputDir, baseURL, knownDocPaths);
302
303
  if (rewritten !== content) {
303
- await (0, output_1.writeOutput)(filePath, rewritten, outputAdapter);
304
+ await (0, output_ts_1.writeOutput)(filePath, rewritten, outputAdapter);
304
305
  }
305
306
  // A page outside the output root has no toc to belong to.
306
307
  if (pagePath.startsWith("..")) {
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.createMDXFormatter = exports.formatMDXPermalink = exports.formatMDXFrontmatter = exports.formatMDXLink = exports.formatMDXNameEntity = exports.formatMDXSpecifiedByLink = exports.formatMDXDetails = exports.formatMDXBullet = exports.formatMDXAdmonition = exports.formatMDXBadge = exports.mdxDeclaration = void 0;
12
12
  const helpers_1 = require("@graphql-markdown/helpers");
13
13
  const utils_1 = require("@graphql-markdown/utils");
14
- const defaults_1 = require("../defaults");
15
- const version_1 = require("../version");
14
+ const defaults_ts_1 = require("../defaults.js");
15
+ const version_ts_1 = require("../version.js");
16
16
  const LINK_MDX_EXTENSION = ".mdx";
17
17
  const DOCUSAURUS_FRAMEWORK = "docusaurus";
18
18
  /** Docusaurus version using the legacy `:::caution` admonition syntax. */
@@ -49,7 +49,7 @@ exports.formatMDXBadge = formatMDXBadge;
49
49
  * @returns Formatted admonition string
50
50
  */
51
51
  const formatMDXAdmonition = ({ text, title, type }, meta) => {
52
- if ((0, version_1.isFrameworkVersion)(meta, DOCUSAURUS_FRAMEWORK, LEGACY_ADMONITION_VERSION)) {
52
+ if ((0, version_ts_1.isFrameworkVersion)(meta, DOCUSAURUS_FRAMEWORK, LEGACY_ADMONITION_VERSION)) {
53
53
  const oldType = type === "warning" ? "caution" : type;
54
54
  return `${utils_1.MARKDOWN_EOP}:::${oldType} ${title}${text}:::`;
55
55
  }
@@ -138,10 +138,10 @@ exports.formatMDXFrontmatter = formatMDXFrontmatter;
138
138
  * @returns Formatted permalink string
139
139
  */
140
140
  const formatMDXPermalink = (id, meta) => {
141
- if ((0, version_1.isFrameworkVersionAtLeast)(meta, DOCUSAURUS_FRAMEWORK, MDX_COMMENT_HEADING_ID_VERSION)) {
141
+ if ((0, version_ts_1.isFrameworkVersionAtLeast)(meta, DOCUSAURUS_FRAMEWORK, MDX_COMMENT_HEADING_ID_VERSION)) {
142
142
  return `{/* #${id} */}`;
143
143
  }
144
- return (0, defaults_1.formatMDXEscapedPermalink)(id);
144
+ return (0, defaults_ts_1.formatMDXEscapedPermalink)(id);
145
145
  };
146
146
  exports.formatMDXPermalink = formatMDXPermalink;
147
147
  /**
@@ -42,7 +42,7 @@ export declare const formatMDXAdmonition: ({ text, title, type }: AdmonitionType
42
42
  * @returns Unmodified link
43
43
  */
44
44
  export declare const formatMDXLink: (link: TypeLink) => TypeLink;
45
- export { formatMDXBullet, formatMDXDetails, formatMDXFrontmatter, formatMDXNameEntity, formatMDXSpecifiedByLink, } from "../defaults";
45
+ export { formatMDXBullet, formatMDXDetails, formatMDXFrontmatter, formatMDXNameEntity, formatMDXSpecifiedByLink, } from "../defaults.ts";
46
46
  /**
47
47
  * Creates a Fumadocs formatter.
48
48
  * @param _meta - Unused metadata parameter
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fumadocs/index.ts"],"names":[],"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AAc,wBAAyB,KAAK,KAAG,SAG3D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BACP,cAAc,SAC9B,KAAK,CAAC,QAAQ,CAAC,KACrB,SAGF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,SAAU,QAAQ,KAAG,QAE9C,CAAC;AAEF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WAAY,KAAK,CAAC,QAAQ,CAAC,KAAG,SAY5D,CAAC"}
@@ -10,7 +10,7 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.createMDXFormatter = exports.formatMDXSpecifiedByLink = exports.formatMDXNameEntity = exports.formatMDXFrontmatter = exports.formatMDXDetails = exports.formatMDXBullet = exports.formatMDXLink = exports.formatMDXAdmonition = exports.formatMDXBadge = exports.mdxDeclaration = exports.mdxExtension = exports.formatMDXPermalink = void 0;
12
12
  const utils_1 = require("@graphql-markdown/utils");
13
- const defaults_1 = require("../defaults");
13
+ const defaults_ts_1 = require("../defaults.js");
14
14
  /**
15
15
  * Formats a permalink for a section header using the Fumadocs `[#id]` syntax.
16
16
  *
@@ -63,12 +63,12 @@ const formatMDXLink = (link) => {
63
63
  return link;
64
64
  };
65
65
  exports.formatMDXLink = formatMDXLink;
66
- var defaults_2 = require("../defaults");
67
- Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return defaults_2.formatMDXBullet; } });
68
- Object.defineProperty(exports, "formatMDXDetails", { enumerable: true, get: function () { return defaults_2.formatMDXDetails; } });
69
- Object.defineProperty(exports, "formatMDXFrontmatter", { enumerable: true, get: function () { return defaults_2.formatMDXFrontmatter; } });
70
- Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return defaults_2.formatMDXNameEntity; } });
71
- Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_2.formatMDXSpecifiedByLink; } });
66
+ var defaults_ts_2 = require("../defaults.js");
67
+ Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return defaults_ts_2.formatMDXBullet; } });
68
+ Object.defineProperty(exports, "formatMDXDetails", { enumerable: true, get: function () { return defaults_ts_2.formatMDXDetails; } });
69
+ Object.defineProperty(exports, "formatMDXFrontmatter", { enumerable: true, get: function () { return defaults_ts_2.formatMDXFrontmatter; } });
70
+ Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return defaults_ts_2.formatMDXNameEntity; } });
71
+ Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_ts_2.formatMDXSpecifiedByLink; } });
72
72
  /**
73
73
  * Creates a Fumadocs formatter.
74
74
  * @param _meta - Unused metadata parameter
@@ -78,13 +78,13 @@ const createMDXFormatter = (_meta) => {
78
78
  return {
79
79
  formatMDXBadge: exports.formatMDXBadge,
80
80
  formatMDXAdmonition: exports.formatMDXAdmonition,
81
- formatMDXBullet: defaults_1.formatMDXBullet,
82
- formatMDXDetails: defaults_1.formatMDXDetails,
83
- formatMDXFrontmatter: defaults_1.formatMDXFrontmatter,
81
+ formatMDXBullet: defaults_ts_1.formatMDXBullet,
82
+ formatMDXDetails: defaults_ts_1.formatMDXDetails,
83
+ formatMDXFrontmatter: defaults_ts_1.formatMDXFrontmatter,
84
84
  formatMDXLink: exports.formatMDXLink,
85
- formatMDXNameEntity: defaults_1.formatMDXNameEntity,
85
+ formatMDXNameEntity: defaults_ts_1.formatMDXNameEntity,
86
86
  formatMDXPermalink: exports.formatMDXPermalink,
87
- formatMDXSpecifiedByLink: defaults_1.formatMDXSpecifiedByLink,
87
+ formatMDXSpecifiedByLink: defaults_ts_1.formatMDXSpecifiedByLink,
88
88
  };
89
89
  };
90
90
  exports.createMDXFormatter = createMDXFormatter;
@@ -7,8 +7,8 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import type { AdmonitionType, Badge, CollapsibleOption, Formatter, FrontMatterOptions, Maybe, MDXString, MetaInfo, TypeLink } from "@graphql-markdown/types";
10
- import { formatMDXBullet, formatMDXPermalink } from "../defaults";
11
- export { formatMDXPermalink } from "../defaults";
10
+ import { formatMDXBullet, formatMDXPermalink } from "../defaults.ts";
11
+ export { formatMDXPermalink } from "../defaults.ts";
12
12
  export declare const __default: {
13
13
  formatMDXBullet: typeof formatMDXBullet;
14
14
  formatMDXPermalink: typeof formatMDXPermalink;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/honkit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;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;AAQjC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,SAAS;;;CAA0C,CAAC;AAEjE,uFAAuF;AACvF,eAAO,MAAM,YAAY,EAAG,KAAc,CAAC;AAS3C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,aAAc,KAAK,KAAG,SAKhD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BACP,cAAc,SAC9B,KAAK,CAAC,QAAQ,CAAC,KACrB,SAGF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,6BAG1B,iBAAiB,KAAG,SAEtB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,UACxB,KAAK,CAAC,kBAAkB,CAAC,aACrB,KAAK,CAAC,MAAM,EAAE,CAAC,KACzB,SAiBF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,kB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F;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,kBAAmB,QAAQ,KAAG,QAoBvD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,SACxB,MAAM,eACC,KAAK,CAAC,MAAM,CAAC,KACzB,SAEF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,QAAS,MAAM,KAAG,SAEtD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WAAY,KAAK,CAAC,QAAQ,CAAC,KAAG,SAY5D,CAAC"}
@@ -11,10 +11,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.createMDXFormatter = exports.formatMDXSpecifiedByLink = exports.formatMDXNameEntity = exports.formatMDXLink = exports.formatMDXFrontmatter = exports.formatMDXDetails = exports.formatMDXAdmonition = exports.formatMDXBadge = exports.mdxExtension = exports.__default = exports.formatMDXPermalink = void 0;
12
12
  const helpers_1 = require("@graphql-markdown/helpers");
13
13
  const utils_1 = require("@graphql-markdown/utils");
14
- const defaults_1 = require("../defaults");
15
- var defaults_2 = require("../defaults");
16
- Object.defineProperty(exports, "formatMDXPermalink", { enumerable: true, get: function () { return defaults_2.formatMDXPermalink; } });
17
- exports.__default = { formatMDXBullet: defaults_1.formatMDXBullet, formatMDXPermalink: defaults_1.formatMDXPermalink };
14
+ const defaults_ts_1 = require("../defaults.js");
15
+ var defaults_ts_2 = require("../defaults.js");
16
+ Object.defineProperty(exports, "formatMDXPermalink", { enumerable: true, get: function () { return defaults_ts_2.formatMDXPermalink; } });
17
+ exports.__default = { formatMDXBullet: defaults_ts_1.formatMDXBullet, formatMDXPermalink: defaults_ts_1.formatMDXPermalink };
18
18
  /** File extension used for generated pages — HonKit renders plain Markdown to HTML. */
19
19
  exports.mdxExtension = ".md";
20
20
  /** Shared default badge theme used across this preset. */
@@ -126,12 +126,12 @@ const createMDXFormatter = (_meta) => {
126
126
  return {
127
127
  formatMDXBadge: exports.formatMDXBadge,
128
128
  formatMDXAdmonition: exports.formatMDXAdmonition,
129
- formatMDXBullet: defaults_1.formatMDXBullet,
129
+ formatMDXBullet: defaults_ts_1.formatMDXBullet,
130
130
  formatMDXDetails: exports.formatMDXDetails,
131
131
  formatMDXFrontmatter: exports.formatMDXFrontmatter,
132
132
  formatMDXLink: exports.formatMDXLink,
133
133
  formatMDXNameEntity: exports.formatMDXNameEntity,
134
- formatMDXPermalink: defaults_1.formatMDXPermalink,
134
+ formatMDXPermalink: defaults_ts_1.formatMDXPermalink,
135
135
  formatMDXSpecifiedByLink: exports.formatMDXSpecifiedByLink,
136
136
  };
137
137
  };
@@ -45,7 +45,7 @@ export declare const formatMDXFrontmatter: (props: Maybe<FrontMatterOptions>, fo
45
45
  * @returns Link object with the cleaned URL
46
46
  */
47
47
  export declare const formatMDXLink: ({ text, url }: TypeLink) => TypeLink;
48
- export { formatMDXBullet, formatMDXNameEntity, formatMDXPermalink, formatMDXSpecifiedByLink, } from "../defaults";
48
+ export { formatMDXBullet, formatMDXNameEntity, formatMDXPermalink, formatMDXSpecifiedByLink, } from "../defaults.ts";
49
49
  /**
50
50
  * Creates a Hugo formatter.
51
51
  * @param _meta - Unused metadata parameter
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hugo/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,EAEL,SAAS,EACT,QAAQ,EACR,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAmCjC;;;;GAIG;AACH,eAAO,MAAM,cAAc,aAAc,KAAK,KAAG,SAEhD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BACP,cAAc,SAC9B,KAAK,CAAC,QAAQ,CAAC,KACrB,SAIF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,6BAG1B,iBA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,QAAQ,KAAG,QAKvD,CAAC;AAEF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WAAY,KAAK,CAAC,QAAQ,CAAC,KAAG,SAY5D,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,YAAY,EAAG,KAAc,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,yBAgB3C,CAAC"}
@@ -13,8 +13,8 @@ exports.beforeGenerateIndexMetafileHook = exports.mdxExtension = exports.createM
13
13
  const node_path_1 = require("node:path");
14
14
  const helpers_1 = require("@graphql-markdown/helpers");
15
15
  const utils_1 = require("@graphql-markdown/utils");
16
- const defaults_1 = require("../defaults");
17
- const output_1 = require("../output");
16
+ const defaults_ts_1 = require("../defaults.js");
17
+ const output_ts_1 = require("../output.js");
18
18
  /**
19
19
  * Maps graphql-markdown admonition types to Hugo GitHub-style alert types (Hugo 0.132+).
20
20
  * @see https://gohugo.io/render-hooks/blockquotes/#alerts
@@ -97,11 +97,11 @@ const formatMDXLink = ({ text, url }) => {
97
97
  };
98
98
  };
99
99
  exports.formatMDXLink = formatMDXLink;
100
- var defaults_2 = require("../defaults");
101
- Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return defaults_2.formatMDXBullet; } });
102
- Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return defaults_2.formatMDXNameEntity; } });
103
- Object.defineProperty(exports, "formatMDXPermalink", { enumerable: true, get: function () { return defaults_2.formatMDXPermalink; } });
104
- Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_2.formatMDXSpecifiedByLink; } });
100
+ var defaults_ts_2 = require("../defaults.js");
101
+ Object.defineProperty(exports, "formatMDXBullet", { enumerable: true, get: function () { return defaults_ts_2.formatMDXBullet; } });
102
+ Object.defineProperty(exports, "formatMDXNameEntity", { enumerable: true, get: function () { return defaults_ts_2.formatMDXNameEntity; } });
103
+ Object.defineProperty(exports, "formatMDXPermalink", { enumerable: true, get: function () { return defaults_ts_2.formatMDXPermalink; } });
104
+ Object.defineProperty(exports, "formatMDXSpecifiedByLink", { enumerable: true, get: function () { return defaults_ts_2.formatMDXSpecifiedByLink; } });
105
105
  /**
106
106
  * Creates a Hugo formatter.
107
107
  * @param _meta - Unused metadata parameter
@@ -111,13 +111,13 @@ const createMDXFormatter = (_meta) => {
111
111
  return {
112
112
  formatMDXBadge: exports.formatMDXBadge,
113
113
  formatMDXAdmonition: exports.formatMDXAdmonition,
114
- formatMDXBullet: defaults_1.formatMDXBullet,
114
+ formatMDXBullet: defaults_ts_1.formatMDXBullet,
115
115
  formatMDXDetails: exports.formatMDXDetails,
116
116
  formatMDXFrontmatter: exports.formatMDXFrontmatter,
117
117
  formatMDXLink: exports.formatMDXLink,
118
- formatMDXNameEntity: defaults_1.formatMDXNameEntity,
119
- formatMDXPermalink: defaults_1.formatMDXPermalink,
120
- formatMDXSpecifiedByLink: defaults_1.formatMDXSpecifiedByLink,
118
+ formatMDXNameEntity: defaults_ts_1.formatMDXNameEntity,
119
+ formatMDXPermalink: defaults_ts_1.formatMDXPermalink,
120
+ formatMDXSpecifiedByLink: defaults_ts_1.formatMDXSpecifiedByLink,
121
121
  };
122
122
  };
123
123
  exports.createMDXFormatter = createMDXFormatter;
@@ -136,6 +136,6 @@ const beforeGenerateIndexMetafileHook = async (event) => {
136
136
  const filePath = (0, node_path_1.join)(dirPath, "_index.md");
137
137
  const label = (0, utils_1.startCase)(category);
138
138
  const content = `${utils_1.FRONT_MATTER_DELIMITER}${utils_1.MARKDOWN_EOL}title: "${label}"${utils_1.MARKDOWN_EOL}type: docs${utils_1.MARKDOWN_EOL}bookCollapseSection: true${utils_1.MARKDOWN_EOL}${utils_1.FRONT_MATTER_DELIMITER}${utils_1.MARKDOWN_EOL}${utils_1.MARKDOWN_EOL}# ${label}${utils_1.MARKDOWN_EOL}${utils_1.MARKDOWN_EOL}`;
139
- await (0, output_1.writeOutput)(filePath, content, outputAdapter, dirPath);
139
+ await (0, output_ts_1.writeOutput)(filePath, content, outputAdapter, dirPath);
140
140
  };
141
141
  exports.beforeGenerateIndexMetafileHook = beforeGenerateIndexMetafileHook;
package/dist/index.d.ts CHANGED
@@ -14,13 +14,14 @@
14
14
  *
15
15
  * @packageDocumentation
16
16
  */
17
- export * as docusaurus from "./docusaurus/index";
18
- export * as docfx from "./docfx/index";
19
- export * as fumadocs from "./fumadocs/index";
20
- export * as honkit from "./honkit/index";
21
- export * as hugo from "./hugo/index";
22
- export * as mdbook from "./mdbook/index";
23
- export * as mkdocs from "./mkdocs/index";
24
- export * as starlight from "./starlight/index";
25
- export * as vocs from "./vocs/index";
17
+ export * as docusaurus from "./docusaurus/index.ts";
18
+ export * as docfx from "./docfx/index.ts";
19
+ export * as fumadocs from "./fumadocs/index.ts";
20
+ export * as honkit from "./honkit/index.ts";
21
+ export * as hugo from "./hugo/index.ts";
22
+ export * as mdbook from "./mdbook/index.ts";
23
+ export * as mdx from "./mdx/index.ts";
24
+ export * as mkdocs from "./mkdocs/index.ts";
25
+ export * as starlight from "./starlight/index.ts";
26
+ export * as vocs from "./vocs/index.ts";
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -49,13 +49,14 @@ var __importStar = (this && this.__importStar) || (function () {
49
49
  };
50
50
  })();
51
51
  Object.defineProperty(exports, "__esModule", { value: true });
52
- exports.vocs = exports.starlight = exports.mkdocs = exports.mdbook = exports.hugo = exports.honkit = exports.fumadocs = exports.docfx = exports.docusaurus = void 0;
53
- exports.docusaurus = __importStar(require("./docusaurus/index"));
54
- exports.docfx = __importStar(require("./docfx/index"));
55
- exports.fumadocs = __importStar(require("./fumadocs/index"));
56
- exports.honkit = __importStar(require("./honkit/index"));
57
- exports.hugo = __importStar(require("./hugo/index"));
58
- exports.mdbook = __importStar(require("./mdbook/index"));
59
- exports.mkdocs = __importStar(require("./mkdocs/index"));
60
- exports.starlight = __importStar(require("./starlight/index"));
61
- exports.vocs = __importStar(require("./vocs/index"));
52
+ exports.vocs = exports.starlight = exports.mkdocs = exports.mdx = exports.mdbook = exports.hugo = exports.honkit = exports.fumadocs = exports.docfx = exports.docusaurus = void 0;
53
+ exports.docusaurus = __importStar(require("./docusaurus/index.js"));
54
+ exports.docfx = __importStar(require("./docfx/index.js"));
55
+ exports.fumadocs = __importStar(require("./fumadocs/index.js"));
56
+ exports.honkit = __importStar(require("./honkit/index.js"));
57
+ exports.hugo = __importStar(require("./hugo/index.js"));
58
+ exports.mdbook = __importStar(require("./mdbook/index.js"));
59
+ exports.mdx = __importStar(require("./mdx/index.js"));
60
+ exports.mkdocs = __importStar(require("./mkdocs/index.js"));
61
+ exports.starlight = __importStar(require("./starlight/index.js"));
62
+ exports.vocs = __importStar(require("./vocs/index.js"));
@@ -51,7 +51,7 @@ export declare const mdxExtension = ".md";
51
51
  * @returns The link with `.md` appended to extensionless absolute paths
52
52
  */
53
53
  export declare const formatMDXLink: (link: TypeLink) => TypeLink;
54
- export { formatMDXBullet, formatMDXNameEntity, formatMDXPermalink, formatMDXSpecifiedByLink, } from "../defaults";
54
+ export { formatMDXBullet, formatMDXNameEntity, formatMDXPermalink, formatMDXSpecifiedByLink, } from "../defaults.ts";
55
55
  /**
56
56
  * Rewrites absolute generated doc links to page-relative `.md` paths after each page is rendered.
57
57
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mdbook/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,cAAc,EACd,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,KAAK,EAEL,SAAS,EACT,QAAQ,EACR,eAAe,EACf,sBAAsB,EACtB,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAoBjC;;;;GAIG;AACH,eAAO,MAAM,cAAc,aAAc,KAAK,KAAG,SAEhD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,0BACP,cAAc,SAC9B,KAAK,CAAC,QAAQ,CAAC,KACrB,SAIF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,kBAE1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