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.
- package/dist/node/lib/index.mjs +63 -61
- package/dist/styleguide-assets/.vite/manifest.json +13 -13
- package/dist/styleguide-assets/assets/{worker-B3CfVIRM.js → worker-5lU37JTq.js} +798 -798
- package/dist/styleguide-assets/{browser-NN7v9uwW.js → browser-B1euiU0Y.js} +174 -166
- package/dist/styleguide-assets/{clipboard-CqnSM003.js → clipboard-fIRT4e5F.js} +1 -1
- package/dist/styleguide-assets/{fullpage-Dq-R_v0z.js → fullpage-BDAI1D-W.js} +1 -1
- package/dist/styleguide-assets/{html-validator-BX35WeTe.js → html-validator-Bb9twirU.js} +1 -1
- package/dist/styleguide-assets/{icons-TyOa-vP5.js → icons-XzCNGhMu.js} +1 -1
- package/dist/styleguide-assets/{preview-CSRIz9iH.js → preview-D7dbEILL.js} +1168 -1092
- package/dist/styleguide-assets/preview-DqYxDUCI.js +1 -0
- package/dist/styleguide-assets/preview-inline-DP77Lbj_.js +147 -0
- package/package.json +10 -10
- package/dist/styleguide-assets/preview-CchyT0S6.js +0 -1
- package/dist/styleguide-assets/preview-inline-Ck0PRwv3.js +0 -145
package/dist/node/lib/index.mjs
CHANGED
|
@@ -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-
|
|
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,
|
|
1745
|
-
t.textContent =
|
|
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
|
|
1750
|
-
if (!
|
|
1749
|
+
const o = e.querySelector(".preview-resize-handle");
|
|
1750
|
+
if (!o)
|
|
1751
1751
|
return;
|
|
1752
|
-
let s = 0,
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
}),
|
|
1756
|
-
if (!
|
|
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
|
|
1759
|
-
if (
|
|
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
|
|
1763
|
-
e.style.width = \`\${
|
|
1762
|
+
const c = m(a);
|
|
1763
|
+
e.style.width = \`\${c.width}px\`;
|
|
1764
1764
|
}
|
|
1765
|
-
if (
|
|
1766
|
-
const
|
|
1767
|
-
f(
|
|
1765
|
+
if (n) {
|
|
1766
|
+
const c = e.offsetWidth, y = m(c);
|
|
1767
|
+
f(n, c, y.label);
|
|
1768
1768
|
}
|
|
1769
|
-
}),
|
|
1769
|
+
}), o.addEventListener("lostpointercapture", () => {
|
|
1770
1770
|
e.classList.remove("is-resizing");
|
|
1771
|
-
const
|
|
1772
|
-
e.offsetWidth >=
|
|
1773
|
-
}),
|
|
1774
|
-
e.style.width = "", e.classList.remove("is-resized"),
|
|
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 = (
|
|
1781
|
-
const s =
|
|
1780
|
+
const e = (o) => {
|
|
1781
|
+
const s = o.contentWindow?.document;
|
|
1782
1782
|
if (!s)
|
|
1783
1783
|
return !1;
|
|
1784
|
-
const
|
|
1785
|
-
return
|
|
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((
|
|
1789
|
-
const
|
|
1790
|
-
if (e(
|
|
1791
|
-
return clearInterval(
|
|
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(
|
|
1793
|
+
setTimeout(() => (clearInterval(i), s()), E);
|
|
1794
1794
|
}))
|
|
1795
1795
|
);
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
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
|
|
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 = \`\${
|
|
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
|
-
|
|
1818
|
-
const
|
|
1819
|
-
if (!
|
|
1817
|
+
h(e);
|
|
1818
|
+
const o = e.contentWindow;
|
|
1819
|
+
if (!o)
|
|
1820
1820
|
return;
|
|
1821
|
-
new ResizeObserver(() =>
|
|
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) =>
|
|
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((
|
|
1828
|
+
e && (await new Promise((o) => setTimeout(o, 200)), e.scrollIntoView());
|
|
1827
1829
|
}
|
|
1828
1830
|
p();
|
|
1829
|
-
},
|
|
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
|
|
1837
|
-
const
|
|
1838
|
-
return
|
|
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
|
|
1842
|
-
let
|
|
1843
|
-
|
|
1844
|
-
const
|
|
1845
|
-
Object.values(
|
|
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
|
-
|
|
1848
|
-
|
|
1849
|
-
}), Array.from(document.querySelectorAll("iframe")).filter((
|
|
1850
|
-
const
|
|
1851
|
-
|
|
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
|
|
1858
|
-
|
|
1859
|
-
const
|
|
1860
|
-
if (!
|
|
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",
|
|
1864
|
+
localStorage.setItem("in2theme", n.value), s();
|
|
1863
1865
|
}), e.addEventListener("change", () => {
|
|
1864
|
-
|
|
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-
|
|
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-
|
|
15
|
-
"file": "preview-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
55
|
+
"_preview-D7dbEILL.js"
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
"client/lib/icons.ts": {
|
|
59
|
-
"file": "icons-
|
|
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-
|
|
64
|
+
"_preview-D7dbEILL.js"
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
"client/preview-inline.ts": {
|
|
68
|
-
"file": "preview-inline-
|
|
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-
|
|
74
|
+
"file": "preview-DqYxDUCI.js",
|
|
75
75
|
"name": "preview",
|
|
76
76
|
"src": "client/preview.ts",
|
|
77
77
|
"isEntry": true,
|
|
78
78
|
"imports": [
|
|
79
|
-
"_preview-
|
|
79
|
+
"_preview-D7dbEILL.js"
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
82
|
"node_modules/html-validate/dist/esm/browser.js": {
|
|
83
|
-
"file": "browser-
|
|
83
|
+
"file": "browser-B1euiU0Y.js",
|
|
84
84
|
"name": "browser",
|
|
85
85
|
"src": "node_modules/html-validate/dist/esm/browser.js",
|
|
86
86
|
"isDynamicEntry": true,
|