@forsakringskassan/docs-generator 2.35.3 → 2.35.5

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.mjs CHANGED
@@ -4,8 +4,8 @@ const require = $createRequire(import.meta.url);
4
4
 
5
5
  import fs from 'node:fs/promises';
6
6
  import path from 'node:path/posix';
7
- import { g as globSync, m as minimatch, M as MarkdownIt, d as dedent, b as closest, e as distance, f as fm, i as isCI, h as glob, j as moduleImporter, k as cliProgress, t as tinylr, w as watch, l as createInstance, n as fse, o as inter } from './vendor-BtGCZQy4.mjs';
8
- import { g as generateId, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, f as findTag, b as getOutputFilePath, d as htmlencode, e as exampleWorkerUrl, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-gWhxglZr.mjs';
7
+ import { g as globSync, m as minimatch, M as MarkdownIt, d as dedent, b as closest, e as distance, f as fm, i as isCI, h as glob, j as moduleImporter, k as cliProgress, t as tinylr, w as watch, l as createInstance, n as fse, o as inter } from './vendor-Q6b0E6UP.mjs';
8
+ import { g as generateId, p as parseInfostring, i as isDocumentPage, n as normalizePath, a as getFingerprint, h as hasTag, f as findTag, b as getOutputFilePath, d as htmlencode, e as exampleWorkerUrl, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-Bx9oXbtZ.mjs';
9
9
  import sp__default from 'node:path';
10
10
  import require$$1 from 'crypto';
11
11
  import 'node:crypto';
@@ -1605,6 +1605,9 @@ function getPropType(prop) {
1605
1605
  if (!type) {
1606
1606
  return null;
1607
1607
  }
1608
+ if (type.name === "string" && prop.values) {
1609
+ return prop.values.map((value) => `"${value}"`).join(" | ");
1610
+ }
1608
1611
  if (type.name === "Array") {
1609
1612
  const param = type;
1610
1613
  const element = param.elements?.[0];
@@ -1625,6 +1628,13 @@ function getPropType(prop) {
1625
1628
  const constituents = param.elements.map((it) => it.name).join(", ");
1626
1629
  return `[${constituents}]`;
1627
1630
  }
1631
+ if (type.name === "union") {
1632
+ const param = type;
1633
+ if (!param.elements) {
1634
+ return type.name;
1635
+ }
1636
+ return param.elements.map((it) => it.name).join(" | ");
1637
+ }
1628
1638
  return type.name;
1629
1639
  }
1630
1640
  function translateProps(props) {