kss-modern 0.0.47 → 1.0.0

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";
@@ -951,14 +952,13 @@ async function generateFullPageFile(data) {
951
952
  <meta charset="UTF-8">
952
953
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
953
954
  <meta name="generator" content="styleguide">
954
- ${typeof data.theme === "object" && "dark" in data.theme && "light" in data.theme ? `
955
- <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/fullpage.svg">
956
- ` : `
957
- <meta name="theme-color" content="${data.theme}">
958
- <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/fullpage-light.svg">
959
- `}
955
+ <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/fullpage.svg">
960
956
  ${data.ogImageUrl ? `<meta property="og:image" content="${data.ogImageUrl}">` : ""}
961
- <script type="module" src="/styleguide-assets/fullpage-C6RGJj3Q.js"><\/script>
957
+ ${typeof data.theme === "object" && "dark" in data.theme && "light" in data.theme ? `
958
+ <meta name="theme-color" media="(prefers-color-scheme: light)" content="${data.theme.light}">
959
+ <meta name="theme-color" media="(prefers-color-scheme: dark)" content="${data.theme.dark}">
960
+ ` : `<meta name="theme-color" content="${data.theme}">`}
961
+ <script type="module" src="/styleguide-assets/fullpage-Bu4DpBQh.js"><\/script>
962
962
  ${computedStyleTags}
963
963
  </head>
964
964
  <body${data.page.bodyclass ? ` class="${data.page.bodyclass}"` : ""}>
@@ -1755,14 +1755,12 @@ async function generatePreviewFile(data) {
1755
1755
  <meta charset="UTF-8">
1756
1756
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1757
1757
  <meta name="generator" content="styleguide">
1758
+ <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/preview.svg">
1759
+ ${data.ogImageUrl ? `<meta property="og:image" content="${data.ogImageUrl}">` : ""}
1758
1760
  ${typeof data.theme === "object" && "dark" in data.theme && "light" in data.theme ? `
1759
1761
  <meta name="theme-color" media="(prefers-color-scheme: light)" content="${data.theme.light}">
1760
1762
  <meta name="theme-color" media="(prefers-color-scheme: dark)" content="${data.theme.dark}">
1761
- <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/preview.svg">
1762
- ` : `
1763
- <meta name="theme-color" content="${data.theme}">
1764
- <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/preview-light.svg">
1765
- `}
1763
+ ` : `<meta name="theme-color" content="${data.theme}">`}
1766
1764
  <link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-BiyuVoXa.css">
1767
1765
  <script>
1768
1766
  //#region client/lib/iframe-resize.ts
@@ -1916,7 +1914,7 @@ document.addEventListener("DOMContentLoaded", () => {
1916
1914
  //#endregion
1917
1915
  ;
1918
1916
  <\/script>
1919
- <script type="module" src="/styleguide-assets/preview-C-vvDb9j.js"><\/script>
1917
+ <script type="module" src="/styleguide-assets/preview-8L8aaFj4.js"><\/script>
1920
1918
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
1921
1919
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
1922
1920
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
@@ -1,12 +1,8 @@
1
1
  {
2
- "_animate-C4Uc6ztd.js": {
3
- "file": "animate-C4Uc6ztd.js",
2
+ "_animate-BwJZPSbF.js": {
3
+ "file": "animate-BwJZPSbF.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,27 +16,24 @@
20
16
  "name": "utils"
21
17
  },
22
18
  "client/fullpage.ts": {
23
- "file": "fullpage-C6RGJj3Q.js",
19
+ "file": "fullpage-Bu4DpBQh.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"
33
26
  ]
34
27
  },
35
28
  "client/lib/clipboard.ts": {
36
- "file": "clipboard-BQf2MokQ.js",
29
+ "file": "clipboard-BqN2XQ0C.js",
37
30
  "name": "clipboard",
38
31
  "src": "client/lib/clipboard.ts",
39
32
  "isDynamicEntry": true,
40
33
  "imports": [
41
34
  "_signal-ZVBNTRLw.js",
42
35
  "_utils-DrMb1LbR.js",
43
- "_animate-C4Uc6ztd.js"
36
+ "_animate-BwJZPSbF.js"
44
37
  ]
45
38
  },
46
39
  "client/lib/editor-select.ts": {
@@ -50,24 +43,23 @@
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
  ]
62
54
  },
63
55
  "client/lib/icons.ts": {
64
- "file": "icons-v8DzEgTa.js",
56
+ "file": "icons-DICmq5xt.js",
65
57
  "name": "icons",
66
58
  "src": "client/lib/icons.ts",
67
59
  "isDynamicEntry": true,
68
60
  "imports": [
69
61
  "_utils-DrMb1LbR.js",
70
- "_animate-C4Uc6ztd.js"
62
+ "_animate-BwJZPSbF.js"
71
63
  ]
72
64
  },
73
65
  "client/preview-inline.ts": {
@@ -77,7 +69,7 @@
77
69
  "isEntry": true
78
70
  },
79
71
  "client/preview.ts": {
80
- "file": "preview-C-vvDb9j.js",
72
+ "file": "preview-8L8aaFj4.js",
81
73
  "name": "preview",
82
74
  "src": "client/preview.ts",
83
75
  "isEntry": true,
@@ -85,7 +77,7 @@
85
77
  "_code-highlight-ClkzHTGA.js",
86
78
  "_signal-ZVBNTRLw.js",
87
79
  "_utils-DrMb1LbR.js",
88
- "_animate-C4Uc6ztd.js"
80
+ "_animate-BwJZPSbF.js"
89
81
  ],
90
82
  "dynamicImports": [
91
83
  "client/lib/html-validator.ts",
@@ -95,21 +87,21 @@
95
87
  ]
96
88
  },
97
89
  "node_modules/axe-core/axe.js": {
98
- "file": "axe-C5lSZqFn.js",
90
+ "file": "axe-Cd_oCzvh.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-DfbHtzxK.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": {
@@ -11,7 +11,7 @@ function t(e, t) {
11
11
  var n = (e, t, n) => n > t ? t : n < e ? e : n, r = {}, i = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), a = (e) => typeof e == "object" && !!e, o = (e) => /^0[^.\s]+$/u.test(e);
12
12
  //#endregion
13
13
  //#region node_modules/motion-utils/dist/es/memo.mjs
14
- /* @__NO_SIDE_EFFECTS__ */
14
+ /*#__NO_SIDE_EFFECTS__*/
15
15
  function s(e) {
16
16
  let t;
17
17
  return () => (t === void 0 && (t = e()), t);
@@ -53,7 +53,7 @@ function y(e, t, n, r, i) {
53
53
  while (Math.abs(a) > _ && ++s < v);
54
54
  return o;
55
55
  }
56
- /* @__NO_SIDE_EFFECTS__ */
56
+ /*#__NO_SIDE_EFFECTS__*/
57
57
  function b(e, t, n, r) {
58
58
  if (e === t && n === r) return c;
59
59
  let i = (t) => y(t, 0, 1, e, n);
@@ -61,10 +61,10 @@ function b(e, t, n, r) {
61
61
  }
62
62
  //#endregion
63
63
  //#region node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
64
- var x = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, S = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => 1 - e(1 - t), C = /* @__PURE__ */ b(.33, 1.53, .69, .99), w = /* @__PURE__ */ S(C), T = /* @__PURE__ */ x(w), E = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? .5 * w(e) : .5 * (2 - 2 ** (-10 * (e - 1))), D = (e) => 1 - Math.sin(Math.acos(e)), ee = /* @__PURE__ */ S(D), te = /* @__PURE__ */ x(D), ne = /* @__PURE__ */ b(.42, 0, 1, 1), re = /* @__PURE__ */ b(0, 0, .58, 1), ie = /* @__PURE__ */ b(.42, 0, .58, 1), ae = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] != "number";
64
+ var x = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, S = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => 1 - e(1 - t), C = /*@__PURE__*/ b(.33, 1.53, .69, .99), w = /*@__PURE__*/ S(C), T = /*@__PURE__*/ x(w), E = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? .5 * w(e) : .5 * (2 - 2 ** (-10 * (e - 1))), D = (e) => 1 - Math.sin(Math.acos(e)), ee = /* @__PURE__ */ S(D), te = /* @__PURE__ */ x(D), ne = /*@__PURE__*/ b(.42, 0, 1, 1), re = /*@__PURE__*/ b(0, 0, .58, 1), ie = /*@__PURE__*/ b(.42, 0, .58, 1), ae = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] != "number";
65
65
  //#endregion
66
66
  //#region node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs
67
- /* @__NO_SIDE_EFFECTS__ */
67
+ /*#__NO_SIDE_EFFECTS__*/
68
68
  function oe(e, t) {
69
69
  return /* @__PURE__ */ ae(e) ? e[h(0, e.length, t)] : e;
70
70
  }
@@ -174,7 +174,7 @@ var k = {
174
174
  layout: 0,
175
175
  mainThread: 0,
176
176
  waapi: 0
177
- }, Se = (e) => (t) => typeof t == "string" && t.startsWith(e), Ce = /* @__PURE__ */ Se("--"), we = /* @__PURE__ */ Se("var(--"), Te = (e) => we(e) ? Ee.test(e.split("/*")[0].trim()) : !1, Ee = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
177
+ }, Se = (e) => (t) => typeof t == "string" && t.startsWith(e), Ce = /*@__PURE__*/ Se("--"), we = /*@__PURE__*/ Se("var(--"), Te = (e) => we(e) ? Ee.test(e.split("/*")[0].trim()) : !1, Ee = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
178
178
  function De(e) {
179
179
  return typeof e == "string" ? e.split("/*")[0].includes("var(--") : !1;
180
180
  }
@@ -211,8 +211,8 @@ var je = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(
211
211
  ...A,
212
212
  transform: (e) => Math.round(Pe(e))
213
213
  }, N = {
214
- test: /* @__PURE__ */ Me("rgb", "red"),
215
- parse: /* @__PURE__ */ Ne("red", "green", "blue"),
214
+ test: /*@__PURE__*/ Me("rgb", "red"),
215
+ parse: /*@__PURE__*/ Ne("red", "green", "blue"),
216
216
  transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + Fe.transform(e) + ", " + Fe.transform(t) + ", " + Fe.transform(n) + ", " + M(j.transform(r)) + ")"
217
217
  };
218
218
  //#endregion
@@ -227,20 +227,20 @@ function Ie(e) {
227
227
  };
228
228
  }
229
229
  var Le = {
230
- test: /* @__PURE__ */ Me("#"),
230
+ test: /*@__PURE__*/ Me("#"),
231
231
  parse: Ie,
232
232
  transform: N.transform
233
233
  }, P = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
234
234
  test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
235
235
  parse: parseFloat,
236
236
  transform: (t) => `${t}${e}`
237
- }), F = /* @__PURE__ */ P("deg"), I = /* @__PURE__ */ P("%"), L = /* @__PURE__ */ P("px"), Re = /* @__PURE__ */ P("vh"), ze = /* @__PURE__ */ P("vw"), Be = {
237
+ }), F = /*@__PURE__*/ P("deg"), I = /*@__PURE__*/ P("%"), L = /*@__PURE__*/ P("px"), Re = /*@__PURE__*/ P("vh"), ze = /*@__PURE__*/ P("vw"), Be = {
238
238
  ...I,
239
239
  parse: (e) => I.parse(e) / 100,
240
240
  transform: (e) => I.transform(e * 100)
241
241
  }, R = {
242
- test: /* @__PURE__ */ Me("hsl", "hue"),
243
- parse: /* @__PURE__ */ Ne("hue", "saturation", "lightness"),
242
+ test: /*@__PURE__*/ Me("hsl", "hue"),
243
+ parse: /*@__PURE__*/ Ne("hue", "saturation", "lightness"),
244
244
  transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + I.transform(M(t)) + ", " + I.transform(M(n)) + ", " + M(j.transform(r)) + ")"
245
245
  }, z = {
246
246
  test: (e) => N.test(e) || Le.test(e) || R.test(e),
@@ -1018,7 +1018,7 @@ function xn(e, t) {
1018
1018
  }
1019
1019
  //#endregion
1020
1020
  //#region node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs
1021
- var Sn = /* @__PURE__ */ xn(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Cn = /* @__PURE__ */ xn(() => {
1021
+ var Sn = /* @__PURE__ */ xn(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Cn = /*@__PURE__*/ xn(() => {
1022
1022
  try {
1023
1023
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1024
1024
  } catch {
@@ -1031,25 +1031,25 @@ var Sn = /* @__PURE__ */ xn(() => window.ScrollTimeline !== void 0, "scrollTimel
1031
1031
  easeIn: "ease-in",
1032
1032
  easeOut: "ease-out",
1033
1033
  easeInOut: "ease-in-out",
1034
- circIn: /* @__PURE__ */ wn([
1034
+ circIn: /*@__PURE__*/ wn([
1035
1035
  0,
1036
1036
  .65,
1037
1037
  .55,
1038
1038
  1
1039
1039
  ]),
1040
- circOut: /* @__PURE__ */ wn([
1040
+ circOut: /*@__PURE__*/ wn([
1041
1041
  .55,
1042
1042
  0,
1043
1043
  1,
1044
1044
  .45
1045
1045
  ]),
1046
- backIn: /* @__PURE__ */ wn([
1046
+ backIn: /*@__PURE__*/ wn([
1047
1047
  .31,
1048
1048
  .01,
1049
1049
  .66,
1050
1050
  -.59
1051
1051
  ]),
1052
- backOut: /* @__PURE__ */ wn([
1052
+ backOut: /*@__PURE__*/ wn([
1053
1053
  .33,
1054
1054
  1.53,
1055
1055
  .69,
@@ -1240,7 +1240,7 @@ var Un = new Set([
1240
1240
  "borderRightColor",
1241
1241
  "borderBottomColor",
1242
1242
  "borderLeftColor"
1243
- ]), Wn = /* @__PURE__ */ s(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1243
+ ]), Wn = /*@__PURE__*/ s(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1244
1244
  function Gn(e) {
1245
1245
  let { motionValue: t, name: n, repeatDelay: r, repeatType: i, damping: a, type: o, keyframes: s } = e;
1246
1246
  if (!(t?.owner?.current instanceof HTMLElement)) return !1;
@@ -1887,7 +1887,7 @@ var Ir = /\b([a-z-]*)\(.*?\)/gu, Lr = {
1887
1887
  WebkitFilter: Lr,
1888
1888
  mask: Rr,
1889
1889
  WebkitMask: Rr
1890
- }, Hr = (e) => Vr[e], Ur = /* @__PURE__ */ new Set([Lr, Rr]);
1890
+ }, Hr = (e) => Vr[e], Ur = /*@__PURE__*/ new Set([Lr, Rr]);
1891
1891
  function Wr(e, t) {
1892
1892
  let n = Hr(e);
1893
1893
  return Ur.has(n) || (n = V), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chunk-HEgqtunE.js";
1
+ import { t as e } from "./fullpage-Bu4DpBQh.js";
2
2
  //#region node_modules/axe-core/axe.js
3
3
  var t = /* @__PURE__ */ e(((e, t) => {
4
4
  (function e(n) {