kss-modern 0.0.35 → 0.0.36

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.
@@ -918,7 +918,7 @@ async function generateFullPageFile(data) {
918
918
  <link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/fullpage-light.svg">
919
919
  `}
920
920
  ${data.ogImageUrl ? `<meta property="og:image" content="${data.ogImageUrl}">` : ""}
921
- <script type="module" src="/styleguide-assets/fullpage-Dq-R_v0z.js"><\/script>
921
+ <script type="module" src="/styleguide-assets/fullpage-BDAI1D-W.js"><\/script>
922
922
  ${computedStyleTags}
923
923
  </head>
924
924
  <body${data.page.bodyclass ? ` class="${data.page.bodyclass}"` : ""}>
@@ -1741,65 +1741,65 @@ function g(t) {
1741
1741
  const e = document.createElement("div");
1742
1742
  return e.className = "absolute -bottom-3 -right-0.5 text-[11px] leading-none font-mono opacity-0 pointer-events-none whitespace-nowrap transition-opacity duration-150", t.appendChild(e), e;
1743
1743
  }
1744
- function f(t, e, n) {
1745
- t.textContent = n ?? \`\${Math.round(e)}px\`, t.style.opacity = n ? "0.6" : "0.4";
1744
+ function f(t, e, o) {
1745
+ t.textContent = o ?? \`\${Math.round(e)}px\`, t.style.opacity = o ? "0.6" : "0.4";
1746
1746
  }
1747
1747
  function b() {
1748
1748
  document.querySelectorAll(".preview-resize-container").forEach((e) => {
1749
- const n = e.querySelector(".preview-resize-handle");
1750
- if (!n)
1749
+ const o = e.querySelector(".preview-resize-handle");
1750
+ if (!o)
1751
1751
  return;
1752
- let s = 0, a = 0, o = null;
1753
- n.addEventListener("pointerdown", (i) => {
1754
- i.preventDefault(), s = i.clientX, a = e.offsetWidth, n.setPointerCapture(i.pointerId), e.classList.add("is-resizing"), o || (o = g(e)), f(o, a, null);
1755
- }), n.addEventListener("pointermove", (i) => {
1756
- if (!n.hasPointerCapture(i.pointerId))
1752
+ let s = 0, i = 0, n = null;
1753
+ o.addEventListener("pointerdown", (r) => {
1754
+ r.preventDefault(), s = r.clientX, i = e.offsetWidth, o.setPointerCapture(r.pointerId), e.classList.add("is-resizing"), n || (n = g(e)), f(n, i, null);
1755
+ }), o.addEventListener("pointermove", (r) => {
1756
+ if (!o.hasPointerCapture(r.pointerId))
1757
1757
  return;
1758
- const c = i.clientX - s, r = e.parentElement?.clientWidth ?? e.offsetWidth, l = Math.max(200, Math.min(a + c, r));
1759
- if (l >= r)
1758
+ const d = r.clientX - s, l = e.parentElement?.clientWidth ?? e.offsetWidth, a = Math.max(200, Math.min(i + d, l));
1759
+ if (a >= l)
1760
1760
  e.style.width = "";
1761
1761
  else {
1762
- const d = m(l);
1763
- e.style.width = \`\${d.width}px\`;
1762
+ const c = m(a);
1763
+ e.style.width = \`\${c.width}px\`;
1764
1764
  }
1765
- if (o) {
1766
- const d = e.offsetWidth, y = m(d);
1767
- f(o, d, y.label);
1765
+ if (n) {
1766
+ const c = e.offsetWidth, y = m(c);
1767
+ f(n, c, y.label);
1768
1768
  }
1769
- }), n.addEventListener("lostpointercapture", () => {
1769
+ }), o.addEventListener("lostpointercapture", () => {
1770
1770
  e.classList.remove("is-resizing");
1771
- const i = e.parentElement?.clientWidth ?? 0;
1772
- e.offsetWidth >= i ? (e.style.width = "", e.classList.remove("is-resized"), o && (o.style.opacity = "")) : (e.classList.add("is-resized"), o && (o.style.opacity = "0.4"));
1773
- }), n.addEventListener("dblclick", () => {
1774
- e.style.width = "", e.classList.remove("is-resized"), o && (o.style.opacity = "");
1771
+ const r = e.parentElement?.clientWidth ?? 0;
1772
+ e.offsetWidth >= r ? (e.style.width = "", e.classList.remove("is-resized"), n && (n.style.opacity = "")) : (e.classList.add("is-resized"), n && (n.style.opacity = "0.4"));
1773
+ }), o.addEventListener("dblclick", () => {
1774
+ e.style.width = "", e.classList.remove("is-resized"), n && (n.style.opacity = "");
1775
1775
  });
1776
1776
  });
1777
1777
  }
1778
1778
  const E = 5e3;
1779
1779
  async function L(t) {
1780
- const e = (n) => {
1781
- const s = n.contentWindow?.document;
1780
+ const e = (o) => {
1781
+ const s = o.contentWindow?.document;
1782
1782
  if (!s)
1783
1783
  return !1;
1784
- const a = s.body && s.body.children.length > 0, o = s.readyState === "complete";
1785
- return a && o && s.body.children.length > 0;
1784
+ const i = s.body && s.body.children.length > 0, n = s.readyState === "complete";
1785
+ return i && n && s.body.children.length > 0;
1786
1786
  };
1787
1787
  await Promise.allSettled(
1788
- t.map((n) => new Promise((s) => {
1789
- const a = setInterval(() => {
1790
- if (e(n))
1791
- return clearInterval(a), s();
1788
+ t.map((o) => new Promise((s) => {
1789
+ const i = setInterval(() => {
1790
+ if (e(o))
1791
+ return clearInterval(i), s();
1792
1792
  }, 100);
1793
- setTimeout(() => (clearInterval(a), s()), E);
1793
+ setTimeout(() => (clearInterval(i), s()), E);
1794
1794
  }))
1795
1795
  );
1796
1796
  }
1797
- function u(t) {
1797
+ function h(t) {
1798
1798
  const e = t.contentWindow?.document;
1799
1799
  if (!e)
1800
1800
  throw new Error("iFrame was not fully loaded yet");
1801
1801
  t.style.height = "0px", t.offsetHeight;
1802
- const n = Math.max(
1802
+ const o = Math.max(
1803
1803
  e.documentElement.scrollHeight,
1804
1804
  e.body.scrollHeight,
1805
1805
  e.documentElement.offsetHeight,
@@ -1807,61 +1807,63 @@ function u(t) {
1807
1807
  e.documentElement.clientHeight,
1808
1808
  e.body.clientHeight
1809
1809
  );
1810
- t.style.height = \`\${n}px\`;
1810
+ t.style.height = \`\${o}px\`;
1811
1811
  }
1812
1812
  function p() {
1813
1813
  document.body.classList.add("js-loaded");
1814
1814
  }
1815
1815
  const I = async (t) => {
1816
1816
  if (await L(t), t.forEach((e) => {
1817
- u(e);
1818
- const n = e.contentWindow;
1819
- if (!n)
1817
+ h(e);
1818
+ const o = e.contentWindow;
1819
+ if (!o)
1820
1820
  return;
1821
- new ResizeObserver(() => u(e)).observe(n.document.body);
1821
+ new ResizeObserver(() => h(e)).observe(o.document.body), o.document.body.querySelectorAll("details").forEach((i) => {
1822
+ i.addEventListener("toggle", () => h(e));
1823
+ });
1822
1824
  }), window.addEventListener("resize", () => {
1823
- t.forEach((e) => u(e));
1825
+ t.forEach((e) => h(e));
1824
1826
  }), window.location.hash) {
1825
1827
  const e = document.querySelector(window.location.hash);
1826
- e && (await new Promise((n) => setTimeout(n, 200)), e.scrollIntoView());
1828
+ e && (await new Promise((o) => setTimeout(o, 200)), e.scrollIntoView());
1827
1829
  }
1828
1830
  p();
1829
- }, h = {
1831
+ }, u = {
1830
1832
  normal: "theme-normal",
1831
1833
  light: "theme-light",
1832
1834
  dark: "theme-dark"
1833
1835
  };
1834
1836
  function S(t) {
1835
1837
  const e = window.matchMedia("(prefers-color-scheme: dark)");
1836
- function n() {
1837
- const o = localStorage.getItem("in2theme");
1838
- return o || (localStorage.setItem("in2theme", "normal"), "normal");
1838
+ function o() {
1839
+ const n = localStorage.getItem("in2theme");
1840
+ return n || (localStorage.setItem("in2theme", "normal"), "normal");
1839
1841
  }
1840
1842
  function s() {
1841
- const o = n();
1842
- let i = h[o] ?? h.normal;
1843
- o === "normal" && e.matches && (i = h.dark);
1844
- const c = (r) => {
1845
- Object.values(h).forEach((l) => r.classList.remove(l));
1843
+ const n = o();
1844
+ let r = u[n] ?? u.normal;
1845
+ n === "normal" && e.matches && (r = u.dark);
1846
+ const d = (l) => {
1847
+ Object.values(u).forEach((a) => l.classList.remove(a));
1846
1848
  };
1847
- c(t), t.classList.add(i), c(document.body), document.body.classList.add(i), document.querySelectorAll("iframe").forEach((r) => {
1848
- c(r), r.classList.add(i);
1849
- }), Array.from(document.querySelectorAll("iframe")).filter((r) => r.src.includes("embed.figma.com")).forEach((r) => {
1850
- const l = new URL(r.src);
1851
- l.searchParams.set("theme", o === "normal" ? "system" : o), r.src = l.href;
1849
+ d(t), t.classList.add(r), d(document.body), document.body.classList.add(r), document.querySelectorAll("iframe").forEach((l) => {
1850
+ d(l), l.classList.add(r);
1851
+ }), Array.from(document.querySelectorAll("iframe")).filter((l) => l.src.includes("embed.figma.com")).forEach((l) => {
1852
+ const a = new URL(l.src);
1853
+ a.searchParams.set("theme", n === "normal" ? "system" : n), l.src = a.href;
1852
1854
  }), setTimeout(() => {
1853
1855
  document.body.classList.add("allow-transitions");
1854
1856
  }, 500);
1855
1857
  }
1856
1858
  s();
1857
- const a = t.querySelector(\`input[value="\${n()}"]\`);
1858
- a && (a.checked = !0), t.addEventListener("change", () => {
1859
- const o = t.querySelector('input[name="theme"]:checked');
1860
- if (!o)
1859
+ const i = t.querySelector(\`input[value="\${o()}"]\`);
1860
+ i && (i.checked = !0), t.addEventListener("change", () => {
1861
+ const n = t.querySelector('input[name="theme"]:checked');
1862
+ if (!n)
1861
1863
  throw new Error("No selected theme found");
1862
- localStorage.setItem("in2theme", o.value), s();
1864
+ localStorage.setItem("in2theme", n.value), s();
1863
1865
  }), e.addEventListener("change", () => {
1864
- n() === "normal" && s();
1866
+ o() === "normal" && s();
1865
1867
  });
1866
1868
  }
1867
1869
  document.addEventListener("DOMContentLoaded", () => {
@@ -1872,7 +1874,7 @@ document.addEventListener("DOMContentLoaded", () => {
1872
1874
  });
1873
1875
  ;
1874
1876
  <\/script>
1875
- <script type="module" src="/styleguide-assets/preview-CchyT0S6.js"><\/script>
1877
+ <script type="module" src="/styleguide-assets/preview-DqYxDUCI.js"><\/script>
1876
1878
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
1877
1879
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
1878
1880
  <link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
@@ -11,8 +11,8 @@
11
11
  "__commonjsHelpers-C6fGbg64.js"
12
12
  ]
13
13
  },
14
- "_preview-CSRIz9iH.js": {
15
- "file": "preview-CSRIz9iH.js",
14
+ "_preview-D7dbEILL.js": {
15
+ "file": "preview-D7dbEILL.js",
16
16
  "name": "preview",
17
17
  "dynamicImports": [
18
18
  "client/lib/html-validator.ts",
@@ -22,7 +22,7 @@
22
22
  ]
23
23
  },
24
24
  "client/fullpage.ts": {
25
- "file": "fullpage-Dq-R_v0z.js",
25
+ "file": "fullpage-BDAI1D-W.js",
26
26
  "name": "fullpage",
27
27
  "src": "client/fullpage.ts",
28
28
  "isEntry": true,
@@ -32,12 +32,12 @@
32
32
  ]
33
33
  },
34
34
  "client/lib/clipboard.ts": {
35
- "file": "clipboard-CqnSM003.js",
35
+ "file": "clipboard-fIRT4e5F.js",
36
36
  "name": "clipboard",
37
37
  "src": "client/lib/clipboard.ts",
38
38
  "isDynamicEntry": true,
39
39
  "imports": [
40
- "_preview-CSRIz9iH.js"
40
+ "_preview-D7dbEILL.js"
41
41
  ]
42
42
  },
43
43
  "client/lib/editor-select.ts": {
@@ -47,40 +47,40 @@
47
47
  "isDynamicEntry": true
48
48
  },
49
49
  "client/lib/html-validator.ts": {
50
- "file": "html-validator-BX35WeTe.js",
50
+ "file": "html-validator-Bb9twirU.js",
51
51
  "name": "html-validator",
52
52
  "src": "client/lib/html-validator.ts",
53
53
  "isDynamicEntry": true,
54
54
  "imports": [
55
- "_preview-CSRIz9iH.js"
55
+ "_preview-D7dbEILL.js"
56
56
  ]
57
57
  },
58
58
  "client/lib/icons.ts": {
59
- "file": "icons-TyOa-vP5.js",
59
+ "file": "icons-XzCNGhMu.js",
60
60
  "name": "icons",
61
61
  "src": "client/lib/icons.ts",
62
62
  "isDynamicEntry": true,
63
63
  "imports": [
64
- "_preview-CSRIz9iH.js"
64
+ "_preview-D7dbEILL.js"
65
65
  ]
66
66
  },
67
67
  "client/preview-inline.ts": {
68
- "file": "preview-inline-Ck0PRwv3.js",
68
+ "file": "preview-inline-DP77Lbj_.js",
69
69
  "name": "preview-inline",
70
70
  "src": "client/preview-inline.ts",
71
71
  "isEntry": true
72
72
  },
73
73
  "client/preview.ts": {
74
- "file": "preview-CchyT0S6.js",
74
+ "file": "preview-DqYxDUCI.js",
75
75
  "name": "preview",
76
76
  "src": "client/preview.ts",
77
77
  "isEntry": true,
78
78
  "imports": [
79
- "_preview-CSRIz9iH.js"
79
+ "_preview-D7dbEILL.js"
80
80
  ]
81
81
  },
82
82
  "node_modules/html-validate/dist/esm/browser.js": {
83
- "file": "browser-NN7v9uwW.js",
83
+ "file": "browser-B1euiU0Y.js",
84
84
  "name": "browser",
85
85
  "src": "node_modules/html-validate/dist/esm/browser.js",
86
86
  "isDynamicEntry": true,