kss-modern 0.0.47 → 0.0.48

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.
@@ -130,22 +130,6 @@ async function generateFaviconFiles(outputPath, theme) {
130
130
  }
131
131
  }
132
132
 
133
- function log(message, style = "important") {
134
- const computedMessage = style === "important" ? `\x1B[38;2;63;94;90m${(/* @__PURE__ */ new Date()).toLocaleTimeString()} \x1B[38;2;32;252;143m[Styleguide]\x1B[0m ${message}` : `\x1B[38;2;63;94;90m${(/* @__PURE__ */ new Date()).toLocaleTimeString()} \x1B[38;2;32;252;143m[Styleguide]\x1B[0m \x1B[38;2;63;94;90m${message}`;
135
- console.log(computedMessage);
136
- }
137
- async function logicalWriteFile(filepath, content) {
138
- const dir = path.dirname(filepath);
139
- await fs.ensureDir(dir);
140
- const isFileExisting = await fs.exists(filepath);
141
- if (isFileExisting) {
142
- const oldContent = await fs.readFile(filepath, "utf-8");
143
- if (oldContent === content) {
144
- return;
145
- }
146
- }
147
- await fs.writeFile(filepath, content);
148
- }
149
133
  function fixAccessibilityIssues(html) {
150
134
  let parsedMarkup = html;
151
135
  const omitValue = ["required", "disabled", "checked", "selected", "multiple", "readonly", "open"];
@@ -205,6 +189,23 @@ function errorBlock(refId, message) {
205
189
  return `<pre class="kss-modern-insert-markup-error" data-section-ref="${sanitizeSpecialCharacters(refId)}">[insert-markup] ${sanitizeSpecialCharacters(message)}</pre>`;
206
190
  }
207
191
 
192
+ function log(message, style = "important") {
193
+ const computedMessage = style === "important" ? `\x1B[38;2;63;94;90m${(/* @__PURE__ */ new Date()).toLocaleTimeString()} \x1B[38;2;32;252;143m[Styleguide]\x1B[0m ${message}` : `\x1B[38;2;63;94;90m${(/* @__PURE__ */ new Date()).toLocaleTimeString()} \x1B[38;2;32;252;143m[Styleguide]\x1B[0m \x1B[38;2;63;94;90m${message}`;
194
+ console.log(computedMessage);
195
+ }
196
+ async function logicalWriteFile(filepath, content) {
197
+ const dir = path.dirname(filepath);
198
+ await fs.ensureDir(dir);
199
+ const isFileExisting = await fs.exists(filepath);
200
+ if (isFileExisting) {
201
+ const oldContent = await fs.readFile(filepath, "utf-8");
202
+ if (oldContent === content) {
203
+ return;
204
+ }
205
+ }
206
+ await fs.writeFile(filepath, content);
207
+ }
208
+
208
209
  const accordionRenderer = (bodyContent, props) => {
209
210
  const type = props.type || "info";
210
211
  const title = props.title || "Click to expand";
@@ -958,7 +959,7 @@ async function generateFullPageFile(data) {
958
959
  <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/fullpage-light.svg">
959
960
  `}
960
961
  ${data.ogImageUrl ? `<meta property="og:image" content="${data.ogImageUrl}">` : ""}
961
- <script type="module" src="/styleguide-assets/fullpage-C6RGJj3Q.js"><\/script>
962
+ <script type="module" src="/styleguide-assets/fullpage-B4TYMCjK.js"><\/script>
962
963
  ${computedStyleTags}
963
964
  </head>
964
965
  <body${data.page.bodyclass ? ` class="${data.page.bodyclass}"` : ""}>
@@ -1916,7 +1917,7 @@ document.addEventListener("DOMContentLoaded", () => {
1916
1917
  //#endregion
1917
1918
  ;
1918
1919
  <\/script>
1919
- <script type="module" src="/styleguide-assets/preview-C-vvDb9j.js"><\/script>
1920
+ <script type="module" src="/styleguide-assets/preview-B9hjQPp8.js"><\/script>
1920
1921
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
1921
1922
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
1922
1923
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
@@ -3,10 +3,6 @@
3
3
  "file": "animate-C4Uc6ztd.js",
4
4
  "name": "animate"
5
5
  },
6
- "_chunk-HEgqtunE.js": {
7
- "file": "chunk-HEgqtunE.js",
8
- "name": "chunk"
9
- },
10
6
  "_code-highlight-ClkzHTGA.js": {
11
7
  "file": "code-highlight-ClkzHTGA.js",
12
8
  "name": "code-highlight"
@@ -20,13 +16,10 @@
20
16
  "name": "utils"
21
17
  },
22
18
  "client/fullpage.ts": {
23
- "file": "fullpage-C6RGJj3Q.js",
19
+ "file": "fullpage-B4TYMCjK.js",
24
20
  "name": "fullpage",
25
21
  "src": "client/fullpage.ts",
26
22
  "isEntry": true,
27
- "imports": [
28
- "_chunk-HEgqtunE.js"
29
- ],
30
23
  "dynamicImports": [
31
24
  "node_modules/axe-core/axe.js",
32
25
  "node_modules/html-validate/dist/esm/browser.js"
@@ -50,12 +43,11 @@
50
43
  "isDynamicEntry": true
51
44
  },
52
45
  "client/lib/html-validator.ts": {
53
- "file": "html-validator-FKQo9Cxa.js",
46
+ "file": "html-validator-Cv_-JCAq.js",
54
47
  "name": "html-validator",
55
48
  "src": "client/lib/html-validator.ts",
56
49
  "isDynamicEntry": true,
57
50
  "imports": [
58
- "_chunk-HEgqtunE.js",
59
51
  "_code-highlight-ClkzHTGA.js",
60
52
  "_utils-DrMb1LbR.js"
61
53
  ]
@@ -77,7 +69,7 @@
77
69
  "isEntry": true
78
70
  },
79
71
  "client/preview.ts": {
80
- "file": "preview-C-vvDb9j.js",
72
+ "file": "preview-B9hjQPp8.js",
81
73
  "name": "preview",
82
74
  "src": "client/preview.ts",
83
75
  "isEntry": true,
@@ -95,21 +87,21 @@
95
87
  ]
96
88
  },
97
89
  "node_modules/axe-core/axe.js": {
98
- "file": "axe-C5lSZqFn.js",
90
+ "file": "axe-B_niXOpn.js",
99
91
  "name": "axe",
100
92
  "src": "node_modules/axe-core/axe.js",
101
93
  "isDynamicEntry": true,
102
94
  "imports": [
103
- "_chunk-HEgqtunE.js"
95
+ "client/fullpage.ts"
104
96
  ]
105
97
  },
106
98
  "node_modules/html-validate/dist/esm/browser.js": {
107
- "file": "browser-2AlPKSbJ.js",
99
+ "file": "browser-C209ZHDH.js",
108
100
  "name": "browser",
109
101
  "src": "node_modules/html-validate/dist/esm/browser.js",
110
102
  "isDynamicEntry": true,
111
103
  "imports": [
112
- "_chunk-HEgqtunE.js"
104
+ "client/fullpage.ts"
113
105
  ]
114
106
  },
115
107
  "style.css": {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chunk-HEgqtunE.js";
1
+ import { t as e } from "./fullpage-B4TYMCjK.js";
2
2
  //#region node_modules/axe-core/axe.js
3
3
  var t = /* @__PURE__ */ e(((e, t) => {
4
4
  (function e(n) {
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, n, r, t as i } from "./chunk-HEgqtunE.js";
1
+ import { a as e, i as t, n, r, t as i } from "./fullpage-B4TYMCjK.js";
2
2
  //#region node_modules/html-validate/node_modules/ajv/dist/compile/codegen/code.js
3
3
  var a = /* @__PURE__ */ i(((e) => {
4
4
  Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
@@ -1,6 +1,21 @@
1
- import { a as e } from "./chunk-HEgqtunE.js";
2
- //#region client/fullpage.ts
3
- var t = /\s*[>+~ ]\s*/, n = /^\s*>\s*/, r = class e {
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, n) => {
3
+ let r = {};
4
+ for (var i in e) t(r, i, {
5
+ get: e[i],
6
+ enumerable: !0
7
+ });
8
+ return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ }, l = (e, i, o, s) => {
10
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
+ get: ((e) => i[e]).bind(null, d),
12
+ enumerable: !(s = n(i, d)) || s.enumerable
13
+ });
14
+ return e;
15
+ }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
16
+ value: n,
17
+ enumerable: !0
18
+ }) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e), f = /\s*[>+~ ]\s*/, p = /^\s*>\s*/, m = class e {
4
19
  modifier;
5
20
  placeholder;
6
21
  constructor(e) {
@@ -49,30 +64,30 @@ var t = /\s*[>+~ ]\s*/, n = /^\s*>\s*/, r = class e {
49
64
  });
50
65
  }
51
66
  };
52
- window.frameElement ? (window.frameElement.getAttribute("data-preview") === "true" && document.documentElement.classList.add("styleguide-preview"), window.frameElement.hasAttribute("data-modifier") && r.fromIframe(), window.runAccessibilityTest = async () => {
53
- let [t, n] = await Promise.all([(async () => {
54
- let { default: t } = await import("./axe-C5lSZqFn.js").then((t) => /* @__PURE__ */ e(t.default, 1)), n = await t.run("body", { rules: {
67
+ window.frameElement ? (window.frameElement.getAttribute("data-preview") === "true" && document.documentElement.classList.add("styleguide-preview"), window.frameElement.hasAttribute("data-modifier") && m.fromIframe(), window.runAccessibilityTest = async () => {
68
+ let [e, t] = await Promise.all([(async () => {
69
+ let { default: e } = await import("./axe-B_niXOpn.js").then((e) => /* @__PURE__ */ u(e.default, 1)), t = await e.run("body", { rules: {
55
70
  "color-contrast": { enabled: !1 },
56
71
  region: { enabled: !1 },
57
72
  "landmark-one-main": { enabled: !1 }
58
73
  } }).catch(console.error);
59
- if (!n) throw Error("No results from runAccessibilityTest function");
60
- let r = /* @__PURE__ */ new Map(), i = (e) => {
61
- e.forEach((e) => {
62
- e.nodes.forEach((e) => {
63
- e.target.forEach((e) => {
64
- let n = t.utils.shadowSelect(e);
65
- n && r.set(e, n);
74
+ if (!t) throw Error("No results from runAccessibilityTest function");
75
+ let n = /* @__PURE__ */ new Map(), r = (t) => {
76
+ t.forEach((t) => {
77
+ t.nodes.forEach((t) => {
78
+ t.target.forEach((t) => {
79
+ let r = e.utils.shadowSelect(t);
80
+ r && n.set(t, r);
66
81
  });
67
82
  });
68
83
  });
69
84
  };
70
- return i(n.violations), i(n.inapplicable), i(n.passes), i(n.incomplete), {
71
- result: n,
72
- targetMap: r
85
+ return r(t.violations), r(t.inapplicable), r(t.passes), r(t.incomplete), {
86
+ result: t,
87
+ targetMap: n
73
88
  };
74
89
  })(), (async () => {
75
- let { HtmlValidate: e, StaticConfigLoader: t } = await import("./browser-2AlPKSbJ.js"), n = new e(new t()), r = await fetch(window.location.href);
90
+ let { HtmlValidate: e, StaticConfigLoader: t } = await import("./browser-C209ZHDH.js"), n = new e(new t()), r = await fetch(window.location.href);
76
91
  if (!r.ok) throw Error(`Failed to fetch document for html-validate: ${r.status} ${r.statusText}`);
77
92
  let i = await r.text(), { results: a } = await n.validateString(i, { rules: {
78
93
  "no-trailing-whitespace": "off",
@@ -85,27 +100,28 @@ window.frameElement ? (window.frameElement.getAttribute("data-preview") === "tru
85
100
  ruleDescription: t
86
101
  };
87
102
  }));
88
- })()]), r = new CustomEvent("accessibility-result", { detail: {
89
- axe: t,
90
- htmlValidate: n
103
+ })()]), n = new CustomEvent("accessibility-result", { detail: {
104
+ axe: e,
105
+ htmlValidate: t
91
106
  } });
92
- window.frameElement?.dispatchEvent(r);
93
- }) : new URLSearchParams(window.location.search).get("modifier") && r.fromUrl(), window.querySelectorAnywhere = (e) => {
94
- let r = document.querySelector(e);
95
- if (r) return r;
96
- let i = e.search(t);
97
- if (i > 0) {
98
- let t = e.slice(0, i), r = document.querySelector(t);
107
+ window.frameElement?.dispatchEvent(n);
108
+ }) : new URLSearchParams(window.location.search).get("modifier") && m.fromUrl(), window.querySelectorAnywhere = (e) => {
109
+ let t = document.querySelector(e);
110
+ if (t) return t;
111
+ let n = e.search(f);
112
+ if (n > 0) {
113
+ let t = e.slice(0, n), r = document.querySelector(t);
99
114
  if (r instanceof HTMLTemplateElement) {
100
- let t = e.slice(i).replace(n, ""), a = r.content.querySelector(t);
101
- if (a) return a;
115
+ let t = e.slice(n).replace(p, ""), i = r.content.querySelector(t);
116
+ if (i) return i;
102
117
  }
103
118
  }
104
- let a = Array.from(document.querySelectorAll("template"));
105
- for (let t of a) {
119
+ let r = Array.from(document.querySelectorAll("template"));
120
+ for (let t of r) {
106
121
  let n = t.content.querySelector(e);
107
122
  if (n) return n;
108
123
  }
109
124
  return null;
110
125
  };
111
126
  //#endregion
127
+ export { u as a, d as i, o as n, c as r, s as t };
@@ -1,25 +1,23 @@
1
- import { t as e } from "./chunk-HEgqtunE.js";
2
- import { t } from "./code-highlight-ClkzHTGA.js";
3
- import { n, t as r } from "./utils-DrMb1LbR.js";
4
- //#region lib/template-utils.ts
5
- var i = (e, t) => e ? t() : "";
6
- function a(e, t) {
7
- return e.map((e, n) => t(e, n)).join("");
8
- }
9
- (/* @__PURE__ */ e(((e, t) => {
10
- t.exports = {};
11
- })))();
12
- function o(e) {
1
+ import { t as e } from "./code-highlight-ClkzHTGA.js";
2
+ import { n as t, t as n } from "./utils-DrMb1LbR.js";
3
+ //#region lib/shared.ts
4
+ function r(e) {
13
5
  return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&#039;");
14
6
  }
15
- function* s() {
7
+ function* i() {
16
8
  let e = 0;
17
9
  for (;;) yield e++;
18
10
  }
19
- s();
11
+ i();
12
+ //#endregion
13
+ //#region lib/template-utils.ts
14
+ var a = (e, t) => e ? t() : "";
15
+ function o(e, t) {
16
+ return e.map((e, n) => t(e, n)).join("");
17
+ }
20
18
  //#endregion
21
19
  //#region client/lib/html-validator.ts
22
- var c = {
20
+ var s = {
23
21
  header: [
24
22
  "background: #ff5757",
25
23
  "color: white",
@@ -35,19 +33,19 @@ var c = {
35
33
  ].join(";"),
36
34
  messageStyle: ["color: #333", "font-style: italic"].join(";")
37
35
  };
38
- function l(e, t) {
39
- console.group("%cValidation Error", c.header), console.info("%c%o", c.elementStyle, t), console.info("%c%s", c.messageStyle, e), console.groupEnd();
36
+ function c(e, t) {
37
+ console.group("%cValidation Error", s.header), console.info("%c%o", s.elementStyle, t), console.info("%c%s", s.messageStyle, e), console.groupEnd();
40
38
  }
41
- async function u(e, s, u) {
42
- let d = e.getAttribute("data-code-audit-iframe");
39
+ async function l(i, l, u) {
40
+ let d = i.getAttribute("data-code-audit-iframe");
43
41
  if (!d) throw Error("No code audit template selector provided");
44
- let f = n(`#${d}`);
42
+ let f = t(`#${d}`);
45
43
  if (!f.contentWindow) throw Error("Code audit iframe has no content window");
46
- let p = n(".audit-results", s);
44
+ let p = t(".audit-results", l);
47
45
  window.validator = {
48
46
  referenceMap: /* @__PURE__ */ new Map(),
49
47
  logReference: (e) => {
50
- e.templateParent ? (console.group("%cElement inside <template>", c.header), console.info("%c<template>:", c.elementStyle, e.templateParent), console.info("%cAffected element:", c.elementStyle, e.element), console.groupEnd()) : console.info(e.element);
48
+ e.templateParent ? (console.group("%cElement inside <template>", s.header), console.info("%c<template>:", s.elementStyle, e.templateParent), console.info("%cAffected element:", s.elementStyle, e.element), console.groupEnd()) : console.info(e.element);
51
49
  },
52
50
  logReferenceAlert: (e) => {
53
51
  let t = e.textContent;
@@ -117,13 +115,13 @@ async function u(e, s, u) {
117
115
  }]
118
116
  });
119
117
  });
120
- let v = m.axe.targetMap, y = (e, t, n) => {
118
+ let v = m.axe.targetMap, y = (e, t, i) => {
121
119
  let s = e.charAt(0).toUpperCase() + e.slice(1), c = [
122
120
  "critical",
123
121
  "serious",
124
122
  "moderate",
125
123
  "minor"
126
- ], l = n.toSorted((e, t) => c.indexOf(e.impact || "minor") - c.indexOf(t.impact || "minor")), u = (e) => {
124
+ ], l = i.toSorted((e, t) => c.indexOf(e.impact || "minor") - c.indexOf(t.impact || "minor")), u = (e) => {
127
125
  if (e.isConnected) return;
128
126
  let t = f.contentDocument?.querySelectorAll("template");
129
127
  if (t) return Array.from(t).find((t) => t.content.contains(e));
@@ -131,12 +129,12 @@ async function u(e, s, u) {
131
129
  let t = e.target.map((e) => v.get(e)).filter(Boolean);
132
130
  if (t.length === 0) throw Error(`No elements found for axe-core target: ${e.target}`);
133
131
  return `
134
- ${a(t, (t) => {
135
- let n = r.next().value, i = { element: t };
136
- return i.templateParent = u(t), window.validator.referenceMap.set(n, i), `
132
+ ${o(t, (t) => {
133
+ let r = n.next().value, i = { element: t };
134
+ return i.templateParent = u(t), window.validator.referenceMap.set(r, i), `
137
135
  <button
138
136
  class="block font-mono py-1.5 text-[13px] text-blue-600 text-sm cursor-pointer text-left"
139
- onclick="window.validator.logReference(window.validator.referenceMap.get('${n}')); window.validator.logReferenceAlert(this)"
137
+ onclick="window.validator.logReference(window.validator.referenceMap.get('${r}')); window.validator.logReferenceAlert(this)"
140
138
  >
141
139
  ${e.target.join(" ")}
142
140
  </button>
@@ -146,10 +144,10 @@ async function u(e, s, u) {
146
144
  }, p = (e) => {
147
145
  let t = f.contentWindow?.querySelectorAnywhere(e.selector);
148
146
  if (!t) throw Error(`Element not found for selector: ${e.selector}`);
149
- let n = { element: t };
150
- n.templateParent = u(t);
151
- let i = r.next().value;
152
- return window.validator.referenceMap.set(i, n), `
147
+ let r = { element: t };
148
+ r.templateParent = u(t);
149
+ let i = n.next().value;
150
+ return window.validator.referenceMap.set(i, r), `
153
151
  <button
154
152
  type="button"
155
153
  class="block font-mono py-1.5 text-[13px] text-blue-600 text-sm cursor-pointer text-left"
@@ -160,26 +158,26 @@ async function u(e, s, u) {
160
158
  `;
161
159
  };
162
160
  return `
163
- ${i(l.length > 0, () => `
161
+ ${a(l.length > 0, () => `
164
162
  <li>
165
163
  <details${["violations", "incomplete"].includes(e) ? " open" : ""}>
166
164
  <summary class="cursor-pointer">
167
165
  <h3 class="px-6 py-4 text-sm font-semibold leading-[1]">
168
166
  <span class="mr-2" aria-hidden="true">${t}</span>
169
167
  <span class="text-styleguide-highlight">${s}:</span>
170
- <span class="ml-2">(${n.length})</span>
168
+ <span class="ml-2">(${i.length})</span>
171
169
  </h3>
172
170
  </summary>
173
171
 
174
172
  <div class="px-6 pb-6 text-sm code-audit-container">
175
173
  <ol>
176
- ${a(l, (t) => `
174
+ ${o(l, (t) => `
177
175
  <li class="ml-6 border-b border-styleguide-border">
178
176
  <details class="group">
179
177
  <summary class="flex cursor-pointer group-open:text-styleguide-highlight justify-between items-center py-4 text-sm gap-2 transition">
180
178
  <span>
181
179
  <span class="font-semibold">${t.id}</span>
182
- ${i(t.impact && ["violations", "incomplete"].includes(e), () => `<span>${t.impact}</span>`)}
180
+ ${a(t.impact && ["violations", "incomplete"].includes(e), () => `<span>${t.impact}</span>`)}
183
181
  </span>
184
182
 
185
183
  <svg class="h-4 w-4 group-open:rotate-90 transition-transform" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
@@ -190,7 +188,7 @@ async function u(e, s, u) {
190
188
  <div class="pt-2 pb-6 text-sm code-audit-container">
191
189
  <div class="markdown-container mb-3">
192
190
  <p>
193
- ${o(t.description).replace(/`([^`]+)`/g, "<code>$1</code>")}
191
+ ${r(t.description).replace(/`([^`]+)`/g, "<code>$1</code>")}
194
192
  </p>
195
193
  </div>
196
194
 
@@ -208,14 +206,14 @@ async function u(e, s, u) {
208
206
  </a>
209
207
  </p>
210
208
 
211
- ${i(["violations", "incomplete"].includes(e) && t.nodes.length > 0, () => `
209
+ ${a(["violations", "incomplete"].includes(e) && t.nodes.length > 0, () => `
212
210
  <h3 class="font-semibold mb-2">Affected nodes (${t.nodes.length}):</h3>
213
211
 
214
212
  <ol class="!pl-0 !list-none">
215
- ${a(t.nodes, (e) => `
213
+ ${o(t.nodes, (e) => `
216
214
  <li>
217
- ${i(e.type === "axe", () => `${d(e)}`)}
218
- ${i(e.type === "htmlvalidate", () => `${p(e)}`)}
215
+ ${a(e.type === "axe", () => `${d(e)}`)}
216
+ ${a(e.type === "htmlvalidate", () => `${p(e)}`)}
219
217
  </li>
220
218
  `)}
221
219
  </ol>
@@ -236,7 +234,7 @@ async function u(e, s, u) {
236
234
  ${y("incomplete", x, h.incomplete)}
237
235
  ${y("passes", "🟢", h.passes)}
238
236
  ${y("inapplicable", "⚪", h.inapplicable)}
239
- `, p.querySelectorAll("[data-source-code]").forEach((e) => t(e)), p.querySelectorAll("[data-iframe-selector]").forEach((e) => {
237
+ `, p.querySelectorAll("[data-source-code]").forEach((t) => e(t)), p.querySelectorAll("[data-iframe-selector]").forEach((e) => {
240
238
  let t = e.getAttribute("data-iframe-selector");
241
239
  if (!t) throw Error("No message found");
242
240
  e.addEventListener("click", async () => {
@@ -246,7 +244,7 @@ async function u(e, s, u) {
246
244
  let r = f.contentDocument?.querySelectorAll(n);
247
245
  if (!r) throw Error("No elements found");
248
246
  r.forEach((e) => {
249
- l(t, e), e.style.outline = "2px solid red", e.scrollIntoView({
247
+ c(t, e), e.style.outline = "2px solid red", e.scrollIntoView({
250
248
  behavior: "smooth",
251
249
  block: "center"
252
250
  }), setTimeout(() => e.style.outline = "", 5e3);
@@ -255,4 +253,4 @@ async function u(e, s, u) {
255
253
  });
256
254
  }
257
255
  //#endregion
258
- export { u as auditCode };
256
+ export { l as auditCode };
@@ -638,7 +638,7 @@ H.length > 0 && H.forEach((e) => {
638
638
  });
639
639
  var U = document.querySelectorAll("[data-code-audit-iframe]"), W = document.querySelector("#code-audit-dialog"), G = document.querySelector(".dialog-backdrop");
640
640
  U.length > 0 && W && G && (async () => {
641
- let { auditCode: e } = await import("./html-validator-FKQo9Cxa.js"), { show: t, close: n } = o(W, G);
641
+ let { auditCode: e } = await import("./html-validator-Cv_-JCAq.js"), { show: t, close: n } = o(W, G);
642
642
  U.forEach((r) => r.addEventListener("click", async () => {
643
643
  U.forEach((e) => e.setAttribute("aria-expanded", "false")), r.setAttribute("disabled", ""), await e(r, W, n), r.removeAttribute("disabled"), r.setAttribute("aria-expanded", "true"), await t(void 0, () => {
644
644
  U.forEach((e) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kss-modern",
3
3
  "type": "module",
4
- "version": "0.0.47",
4
+ "version": "0.0.48",
5
5
  "description": "Modern KSS compatible styleguide generator",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,20 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, n) => {
3
- let r = {};
4
- for (var i in e) t(r, i, {
5
- get: e[i],
6
- enumerable: !0
7
- });
8
- return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
9
- }, l = (e, i, o, s) => {
10
- if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
11
- get: ((e) => i[e]).bind(null, d),
12
- enumerable: !(s = n(i, d)) || s.enumerable
13
- });
14
- return e;
15
- }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
16
- value: n,
17
- enumerable: !0
18
- }) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e);
19
- //#endregion
20
- export { u as a, d as i, o as n, c as r, s as t };