@forsakringskassan/docs-generator 3.10.1 → 3.11.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/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-CXtEyRCU.mjs';
6
- import './vendor-DPuGyhL4.mjs';
5
+ export { S as SoftError, c as createMarkdownRenderer } from './create-markdown-renderer-C7-7Tads.mjs';
6
+ import './vendor-BesEHnwj.mjs';
7
7
  import 'node:url';
8
8
  import 'node:path';
9
9
  import 'fs';
@@ -27,27 +27,28 @@ onContentReady(() => {
27
27
  if (!el) {
28
28
  return;
29
29
  }
30
- if (!hasCookie("doc-hide-cookie-warning")) {
31
- showCookieWarning(el);
32
- const consentAllButton = document.querySelector(
33
- "#consent-all-button"
34
- );
35
- if (consentAllButton) {
36
- consentAllButton.addEventListener("click", () => {
37
- setCookie("doc-hide-cookie-warning");
38
- setCookie("doc-cookie-consent");
39
- hideCookieWarning(el);
40
- window.dispatchEvent(new Event("doc-cookie-consent"));
41
- });
42
- }
43
- const consentFunctionalButton = document.querySelector(
44
- "#consent-functional-button"
45
- );
46
- if (consentFunctionalButton) {
47
- consentFunctionalButton.addEventListener("click", () => {
48
- setCookie("doc-hide-cookie-warning");
49
- hideCookieWarning(el);
50
- });
51
- }
30
+ if (hasCookie("doc-hide-cookie-warning")) {
31
+ return;
32
+ }
33
+ showCookieWarning(el);
34
+ const consentAllButton = document.querySelector(
35
+ "#consent-all-button"
36
+ );
37
+ if (consentAllButton) {
38
+ consentAllButton.addEventListener("click", () => {
39
+ setCookie("doc-hide-cookie-warning");
40
+ setCookie("doc-cookie-consent");
41
+ hideCookieWarning(el);
42
+ window.dispatchEvent(new Event("doc-cookie-consent"));
43
+ });
44
+ }
45
+ const consentFunctionalButton = document.querySelector(
46
+ "#consent-functional-button"
47
+ );
48
+ if (consentFunctionalButton) {
49
+ consentFunctionalButton.addEventListener("click", () => {
50
+ setCookie("doc-hide-cookie-warning");
51
+ hideCookieWarning(el);
52
+ });
52
53
  }
53
54
  });
@@ -915,8 +915,7 @@ function setup() {
915
915
  );
916
916
  fragment.append(li);
917
917
  }
918
- results.replaceChildren();
919
- results.append(fragment);
918
+ results.replaceChildren(fragment);
920
919
  }
921
920
  function clickOutside(event) {
922
921
  const rect = dialog.getBoundingClientRect();
@@ -2156,8 +2156,7 @@ function updateVersionList(element, versions) {
2156
2156
  a.textContent = version;
2157
2157
  ul.append(item);
2158
2158
  }
2159
- element.replaceChildren();
2160
- element.append(ul);
2159
+ element.replaceChildren(ul);
2161
2160
  }
2162
2161
  function setErrorMessage(element) {
2163
2162
  if (!element) {
@@ -2165,8 +2164,7 @@ function setErrorMessage(element) {
2165
2164
  }
2166
2165
  const p = document.createElement("p");
2167
2166
  p.textContent = "Det gick inte att hitta n\xE5gra tidigare versioner!";
2168
- element.replaceChildren();
2169
- element.append(p);
2167
+ element.replaceChildren(p);
2170
2168
  }
2171
2169
  window.addEventListener("docs:navigation", () => {
2172
2170
  void initVersionProcessor();