@forsakringskassan/docs-generator 2.40.2 → 2.40.3

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.
@@ -2,7 +2,7 @@ import { createRequire as $createRequire } from "node:module";
2
2
 
3
3
  const require = $createRequire(import.meta.url);
4
4
 
5
- import { r as runAsWorker, f as format2, a as resolveConfig } from './vendor-CZRU56SE.mjs';
5
+ import { r as runAsWorker, f as format2, a as resolveConfig } from './vendor-tIJeYoyt.mjs';
6
6
  import 'node:url';
7
7
  import 'node:path';
8
8
  import 'fs';
@@ -54,4 +54,4 @@ async function formatCode(source, filepath) {
54
54
  runAsWorker(formatCode);
55
55
 
56
56
  export { formatCode };
57
- //# sourceMappingURL=format-code.worker-BvJxocoZ.mjs.map
57
+ //# sourceMappingURL=format-code.worker-hU0IS7DM.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-code.worker-BvJxocoZ.mjs","sources":["../src/utils/format-code.worker.ts"],"sourcesContent":["import { type Options, format as prettier, resolveConfig } from \"prettier\";\nimport { runAsWorker } from \"synckit\";\n\nconst configCache = new Map<string, Options | null>();\n\nasync function getConfig(filepath: string): Promise<Options | null> {\n const cached = configCache.get(filepath);\n if (cached !== undefined) {\n return cached;\n }\n const options = await resolveConfig(filepath);\n configCache.set(filepath, options);\n return options;\n}\n\n/**\n * @internal\n */\nexport async function formatCode(\n source: string,\n filepath: string,\n): Promise<string> {\n const options = await getConfig(filepath);\n const formatted = await prettier(source, { ...options, filepath });\n return formatted.trim();\n}\n\nrunAsWorker(formatCode);\n"],"names":["prettier"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,WAAA,uBAAkB,GAAA,EAA4B;AAEpD,eAAe,UAAU,QAAA,EAA2C;AAChE,EAAA,MAAM,MAAA,GAAS,WAAA,CAAY,GAAA,CAAI,QAAQ,CAAA;AACvC,EAAA,IAAI,WAAW,MAAA,EAAW;AACtB,IAAA,OAAO,MAAA;AAAA,EACX;AACA,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,CAAc,QAAQ,CAAA;AAC5C,EAAA,WAAA,CAAY,GAAA,CAAI,UAAU,OAAO,CAAA;AACjC,EAAA,OAAO,OAAA;AACX;AAKA,eAAsB,UAAA,CAClB,QACA,QAAA,EACe;AACf,EAAA,MAAM,OAAA,GAAU,MAAM,SAAA,CAAU,QAAQ,CAAA;AACxC,EAAA,MAAM,SAAA,GAAY,MAAMA,OAAA,CAAS,MAAA,EAAQ,EAAE,GAAG,OAAA,EAAS,UAAU,CAAA;AACjE,EAAA,OAAO,UAAU,IAAA,EAAK;AAC1B;AAEA,WAAA,CAAY,UAAU,CAAA;;;;"}
1
+ {"version":3,"file":"format-code.worker-hU0IS7DM.mjs","sources":["../src/utils/format-code.worker.ts"],"sourcesContent":["import { type Options, format as prettier, resolveConfig } from \"prettier\";\nimport { runAsWorker } from \"synckit\";\n\nconst configCache = new Map<string, Options | null>();\n\nasync function getConfig(filepath: string): Promise<Options | null> {\n const cached = configCache.get(filepath);\n if (cached !== undefined) {\n return cached;\n }\n const options = await resolveConfig(filepath);\n configCache.set(filepath, options);\n return options;\n}\n\n/**\n * @internal\n */\nexport async function formatCode(\n source: string,\n filepath: string,\n): Promise<string> {\n const options = await getConfig(filepath);\n const formatted = await prettier(source, { ...options, filepath });\n return formatted.trim();\n}\n\nrunAsWorker(formatCode);\n"],"names":["prettier"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAM,WAAA,uBAAkB,GAAA,EAA4B;AAEpD,eAAe,UAAU,QAAA,EAA2C;AAChE,EAAA,MAAM,MAAA,GAAS,WAAA,CAAY,GAAA,CAAI,QAAQ,CAAA;AACvC,EAAA,IAAI,WAAW,MAAA,EAAW;AACtB,IAAA,OAAO,MAAA;AAAA,EACX;AACA,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,CAAc,QAAQ,CAAA;AAC5C,EAAA,WAAA,CAAY,GAAA,CAAI,UAAU,OAAO,CAAA;AACjC,EAAA,OAAO,OAAA;AACX;AAKA,eAAsB,UAAA,CAClB,QACA,QAAA,EACe;AACf,EAAA,MAAM,OAAA,GAAU,MAAM,SAAA,CAAU,QAAQ,CAAA;AACxC,EAAA,MAAM,SAAA,GAAY,MAAMA,OAAA,CAAS,MAAA,EAAQ,EAAE,GAAG,OAAA,EAAS,UAAU,CAAA;AACjE,EAAA,OAAO,UAAU,IAAA,EAAK;AAC1B;AAEA,WAAA,CAAY,UAAU,CAAA;;;;"}
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 { t as ts, M as MarkdownIt, d as dedent, g as closest, h as distance, i as fm, j as isCI, Z as Ze, m as moduleImporter, k as cliProgress, l as tinylr, w as watch, n as createInstance, o as fse, p as inter } from './vendor-CZRU56SE.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 filePath, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-CRaoVgeB.mjs';
7
+ import { t as ts, M as MarkdownIt, d as dedent, g as closest, h as distance, i as fm, j as isCI, Z as Ze, m as moduleImporter, k as cliProgress, l as tinylr, w as watch, n as createInstance, o as fse, p as inter } from './vendor-tIJeYoyt.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 filePath, c as createMarkdownRenderer, j as generateExample } from './create-markdown-renderer-aMNI8hLC.mjs';
9
9
  import path__default from 'node:path';
10
10
  import crypto from 'node:crypto';
11
11
  import { exec, execSync } from 'node:child_process';
package/dist/markdown.mjs CHANGED
@@ -2,8 +2,8 @@ import { createRequire as $createRequire } from "node:module";
2
2
 
3
3
  const require = $createRequire(import.meta.url);
4
4
 
5
- export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-CRaoVgeB.mjs';
6
- import './vendor-CZRU56SE.mjs';
5
+ export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-aMNI8hLC.mjs';
6
+ import './vendor-tIJeYoyt.mjs';
7
7
  import 'node:url';
8
8
  import 'node:path';
9
9
  import 'fs';
package/dist/runtime.mjs CHANGED
@@ -1409,7 +1409,7 @@ function lookupGetter(object3, prop) {
1409
1409
  function createDOMPurify() {
1410
1410
  let window3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
1411
1411
  const DOMPurify = (root3) => createDOMPurify(root3);
1412
- DOMPurify.version = "3.3.3";
1412
+ DOMPurify.version = "3.4.0";
1413
1413
  DOMPurify.removed = [];
1414
1414
  if (!window3 || !window3.document || window3.document.nodeType !== NODE_TYPE.document || !window3.Element) {
1415
1415
  DOMPurify.isSupported = false;
@@ -1592,7 +1592,7 @@ function createDOMPurify() {
1592
1592
  NAMESPACE2 = cfg.NAMESPACE || HTML_NAMESPACE;
1593
1593
  MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
1594
1594
  HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
1595
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
1595
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || create(null);
1596
1596
  if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
1597
1597
  CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
1598
1598
  }
@@ -1631,12 +1631,8 @@ function createDOMPurify() {
1631
1631
  addToSet(ALLOWED_ATTR, xml);
1632
1632
  }
1633
1633
  }
1634
- if (!objectHasOwnProperty(cfg, "ADD_TAGS")) {
1635
- EXTRA_ELEMENT_HANDLING.tagCheck = null;
1636
- }
1637
- if (!objectHasOwnProperty(cfg, "ADD_ATTR")) {
1638
- EXTRA_ELEMENT_HANDLING.attributeCheck = null;
1639
- }
1634
+ EXTRA_ELEMENT_HANDLING.tagCheck = null;
1635
+ EXTRA_ELEMENT_HANDLING.attributeCheck = null;
1640
1636
  if (cfg.ADD_TAGS) {
1641
1637
  if (typeof cfg.ADD_TAGS === "function") {
1642
1638
  EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
@@ -1859,6 +1855,10 @@ function createDOMPurify() {
1859
1855
  _forceRemove(currentNode);
1860
1856
  return true;
1861
1857
  }
1858
+ if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === "style" && _isNode(currentNode.firstElementChild)) {
1859
+ _forceRemove(currentNode);
1860
+ return true;
1861
+ }
1862
1862
  if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
1863
1863
  _forceRemove(currentNode);
1864
1864
  return true;
@@ -1867,7 +1867,7 @@ function createDOMPurify() {
1867
1867
  _forceRemove(currentNode);
1868
1868
  return true;
1869
1869
  }
1870
- if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
1870
+ if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
1871
1871
  if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
1872
1872
  if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
1873
1873
  return false;
@@ -2047,7 +2047,7 @@ function createDOMPurify() {
2047
2047
  }
2048
2048
  _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
2049
2049
  };
2050
- const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
2050
+ const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
2051
2051
  let shadowNode = null;
2052
2052
  const shadowIterator = _createNodeIterator(fragment);
2053
2053
  _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
@@ -2126,13 +2126,21 @@ function createDOMPurify() {
2126
2126
  _sanitizeElements(currentNode);
2127
2127
  _sanitizeAttributes(currentNode);
2128
2128
  if (currentNode.content instanceof DocumentFragment3) {
2129
- _sanitizeShadowDOM(currentNode.content);
2129
+ _sanitizeShadowDOM2(currentNode.content);
2130
2130
  }
2131
2131
  }
2132
2132
  if (IN_PLACE) {
2133
2133
  return dirty;
2134
2134
  }
2135
2135
  if (RETURN_DOM) {
2136
+ if (SAFE_FOR_TEMPLATES) {
2137
+ body.normalize();
2138
+ let html2 = body.innerHTML;
2139
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
2140
+ html2 = stringReplace(html2, expr, " ");
2141
+ });
2142
+ body.innerHTML = html2;
2143
+ }
2136
2144
  if (RETURN_DOM_FRAGMENT) {
2137
2145
  returnNode = createDocumentFragment.call(body.ownerDocument);
2138
2146
  while (body.firstChild) {
@@ -2263,7 +2271,7 @@ var init_purify_es = __esm({
2263
2271
  text = freeze(["#text"]);
2264
2272
  html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
2265
2273
  svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
2266
- mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
2274
+ mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
2267
2275
  xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
2268
2276
  MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
2269
2277
  ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
@@ -2296,20 +2304,11 @@ var init_purify_es = __esm({
2296
2304
  });
2297
2305
  NODE_TYPE = {
2298
2306
  element: 1,
2299
- attribute: 2,
2300
2307
  text: 3,
2301
- cdataSection: 4,
2302
- entityReference: 5,
2303
- // Deprecated
2304
- entityNode: 6,
2305
2308
  // Deprecated
2306
2309
  progressingInstruction: 7,
2307
2310
  comment: 8,
2308
- document: 9,
2309
- documentType: 10,
2310
- documentFragment: 11,
2311
- notation: 12
2312
- // Deprecated
2311
+ document: 9
2313
2312
  };
2314
2313
  getGlobal = function getGlobal2() {
2315
2314
  return typeof window === "undefined" ? null : window;
@@ -166047,7 +166046,7 @@ export {
166047
166046
  /*! Bundled license information:
166048
166047
 
166049
166048
  dompurify/dist/purify.es.mjs:
166050
- (*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE *)
166049
+ (*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE *)
166051
166050
 
166052
166051
  mermaid/dist/chunks/mermaid.core/chunk-XPW4576I.mjs:
166053
166052
  (*! Bundled license information:
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.58.1"
8
+ "packageVersion": "7.58.2"
9
9
  }
10
10
  ]
11
11
  }