kss-modern 0.0.20 → 0.0.22
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 +114 -8
- package/dist/styleguide-assets/.vite/manifest.json +46 -21
- package/dist/styleguide-assets/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/styleguide-assets/assets/{worker-zgOBb1zJ.js → worker-DbYry4sK.js} +1 -1
- package/dist/styleguide-assets/axe-A2Ows1Aj.js +23808 -0
- package/dist/styleguide-assets/{browser-KlOfx-vG.js → browser-Bjhprfz3.js} +1858 -1813
- package/dist/styleguide-assets/clipboard-CQ7U7_P0.js +171 -0
- package/dist/styleguide-assets/fullpage-BEOBUDsG.js +109 -0
- package/dist/styleguide-assets/html-validator-M0X8x6ag.js +249 -0
- package/dist/styleguide-assets/{icons-BMUnz9Fy.js → icons-IQYIngUi.js} +1 -1
- package/dist/styleguide-assets/kss-modern-BpMIuK1b.css +1 -0
- package/dist/styleguide-assets/preview-BqaqMVtQ.js +1 -0
- package/dist/styleguide-assets/{main-DysniEvV.js → preview-DxsvGJsw.js} +1088 -1343
- package/dist/styleguide-assets/preview-inline-D_Sx3c3_.js +101 -0
- package/package.json +14 -12
- package/dist/styleguide-assets/client-DqS0770n.js +0 -1
- package/dist/styleguide-assets/client-fullpage-DjIkCnMm.js +0 -59
- package/dist/styleguide-assets/clipboard-Tvfm0Nqe.js +0 -19
- package/dist/styleguide-assets/html-validator-bX8Fj2mZ.js +0 -135
- package/dist/styleguide-assets/kss-modern-BIqlRJ0X.css +0 -1
package/dist/node/lib/index.mjs
CHANGED
|
@@ -833,7 +833,7 @@ async function generateFullPageFile(data) {
|
|
|
833
833
|
<link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/fullpage-light.svg">
|
|
834
834
|
`}
|
|
835
835
|
${data.ogImageUrl ? `<meta property="og:image" content="${data.ogImageUrl}">` : ""}
|
|
836
|
-
<script type="module" src="/styleguide-assets/
|
|
836
|
+
<script type="module" src="/styleguide-assets/fullpage-BEOBUDsG.js"><\/script>
|
|
837
837
|
${computedStyleTags}
|
|
838
838
|
</head>
|
|
839
839
|
<body${data.page.bodyclass ? ` class="${data.page.bodyclass}"` : ""}>
|
|
@@ -998,7 +998,7 @@ function getCodeAuditDialog() {
|
|
|
998
998
|
return `
|
|
999
999
|
<dialog
|
|
1000
1000
|
id="code-audit-dialog"
|
|
1001
|
-
class="fixed
|
|
1001
|
+
class="fixed inset-0 top-8 z-30 py-6 backdrop:hidden -mb-px size-full md:h-auto md:max-h-[85dvh] max-w-none overflow-y-auto rounded-t-2xl border bg-styleguide-bg border-styleguide-border text-styleguide md:max-w-[720px] md:top-12 md:bottom-auto md:left-1/2 md:-translate-x-1/2 md:rounded-2xl mx-0 lg:top-24"
|
|
1002
1002
|
>
|
|
1003
1003
|
<h2 class="flex items-center gap-2 mb-4 px-6">
|
|
1004
1004
|
<svg class="-mt-0.5 h-4 transition duration-200" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88" aria-hidden="true"><title>accessibility</title><path fill="currentcolor" d="M61.44,0A61.46,61.46,0,1,1,18,18,61.21,61.21,0,0,1,61.44,0Zm-.39,74.18L52.1,98.91a4.94,4.94,0,0,1-2.58,2.83A5,5,0,0,1,42.7,95.5l6.24-17.28a26.3,26.3,0,0,0,1.17-4,40.64,40.64,0,0,0,.54-4.18c.24-2.53.41-5.27.54-7.9s.22-5.18.29-7.29c.09-2.63-.62-2.8-2.73-3.3l-.44-.1-18-3.39A5,5,0,0,1,27.08,46a5,5,0,0,1,5.05-7.74l19.34,3.63c.77.07,1.52.16,2.31.25a57.64,57.64,0,0,0,7.18.53A81.13,81.13,0,0,0,69.9,42c.9-.1,1.75-.21,2.6-.29l18.25-3.42A5,5,0,0,1,94.5,39a5,5,0,0,1,1.3,7,5,5,0,0,1-3.21,2.09L75.15,51.37c-.58.13-1.1.22-1.56.29-1.82.31-2.72.47-2.61,3.06.08,1.89.31,4.15.61,6.51.35,2.77.81,5.71,1.29,8.4.31,1.77.6,3.19,1,4.55s.79,2.75,1.39,4.42l6.11,16.9a5,5,0,0,1-6.82,6.24,4.94,4.94,0,0,1-2.58-2.83L63,74.23,62,72.4l-1,1.78Zm.39-53.52a8.83,8.83,0,1,1-6.24,2.59,8.79,8.79,0,0,1,6.24-2.59Zm36.35,4.43a51.42,51.42,0,1,0,15,36.35,51.27,51.27,0,0,0-15-36.35Z"/></svg>
|
|
@@ -1007,7 +1007,7 @@ function getCodeAuditDialog() {
|
|
|
1007
1007
|
</span>
|
|
1008
1008
|
</h2>
|
|
1009
1009
|
|
|
1010
|
-
<
|
|
1010
|
+
<ol class="audit-results"></ol>
|
|
1011
1011
|
</dialog>
|
|
1012
1012
|
`;
|
|
1013
1013
|
}
|
|
@@ -1140,9 +1140,10 @@ function getMainContentRegular(section, config) {
|
|
|
1140
1140
|
if (config.mode === "development" && config.launchInEditor) {
|
|
1141
1141
|
const computedRootPath = config.launchInEditor && typeof config.launchInEditor === "object" && "rootDir" in config.launchInEditor ? config.launchInEditor.rootDir : process.cwd();
|
|
1142
1142
|
const cssFilePath = ensureStartingSlash(path.join(computedRootPath, section.source.css.file));
|
|
1143
|
+
const cssLineNumber = section.source.css.line + 1;
|
|
1143
1144
|
openInEditorPaths.css = {
|
|
1144
|
-
vscode: `vscode://file//${cssFilePath}:${
|
|
1145
|
-
phpstorm: `phpstorm://open?file=${cssFilePath}&line=${
|
|
1145
|
+
vscode: `vscode://file//${cssFilePath}:${cssLineNumber}`,
|
|
1146
|
+
phpstorm: `phpstorm://open?file=${cssFilePath}&line=${cssLineNumber}`
|
|
1146
1147
|
};
|
|
1147
1148
|
if (section.source.markup && section.source.markup.file) {
|
|
1148
1149
|
const htmlFilePath = ensureStartingSlash(path.join(computedRootPath, section.source.markup.file));
|
|
@@ -1277,6 +1278,7 @@ function getMainContentRegular(section, config) {
|
|
|
1277
1278
|
id="code-fullpage-${sanitizeId(section.id)}"
|
|
1278
1279
|
class="overflow-x-auto w-full code-highlight"
|
|
1279
1280
|
data-source-code="${encodeURIComponent(section.markup)}"
|
|
1281
|
+
data-source-lang="html"
|
|
1280
1282
|
></div>
|
|
1281
1283
|
</div>
|
|
1282
1284
|
</details>
|
|
@@ -1509,7 +1511,7 @@ function getSearchHtml(sections) {
|
|
|
1509
1511
|
return `
|
|
1510
1512
|
<dialog
|
|
1511
1513
|
id="search-dialog"
|
|
1512
|
-
class="fixed
|
|
1514
|
+
class="fixed inset-0 top-8 z-30 backdrop:hidden -mb-px size-full md:h-auto md:max-h-[85dvh] max-w-none overflow-y-auto rounded-t-2xl border bg-styleguide-bg border-styleguide-border text-styleguide md:max-w-[720px] md:top-12 md:bottom-auto md:left-1/2 md:-translate-x-1/2 md:rounded-2xl mx-0 lg:top-24"
|
|
1513
1515
|
>
|
|
1514
1516
|
<h2 class="sr-only">Search</h2>
|
|
1515
1517
|
<div class="border-b px-4 py-3 border-styleguide-border">
|
|
@@ -1590,8 +1592,112 @@ async function generatePreviewFile(data) {
|
|
|
1590
1592
|
<meta name="theme-color" content="${data.theme}">
|
|
1591
1593
|
<link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/preview-light.svg">
|
|
1592
1594
|
`}
|
|
1593
|
-
<link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-
|
|
1594
|
-
<script
|
|
1595
|
+
<link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-BpMIuK1b.css">
|
|
1596
|
+
<script>
|
|
1597
|
+
async function g(t) {
|
|
1598
|
+
const e = (o) => {
|
|
1599
|
+
const n = o.contentWindow?.document;
|
|
1600
|
+
if (!n)
|
|
1601
|
+
return !1;
|
|
1602
|
+
const s = n.body && n.body.children.length > 0, a = n.readyState === "complete";
|
|
1603
|
+
return s && a && n.body.children.length > 0;
|
|
1604
|
+
};
|
|
1605
|
+
await Promise.allSettled(
|
|
1606
|
+
t.map((o) => new Promise((n) => {
|
|
1607
|
+
const s = setInterval(() => {
|
|
1608
|
+
if (e(o))
|
|
1609
|
+
return clearInterval(s), n();
|
|
1610
|
+
}, 100);
|
|
1611
|
+
setTimeout(() => (clearInterval(s), n()), 5e3);
|
|
1612
|
+
}))
|
|
1613
|
+
);
|
|
1614
|
+
}
|
|
1615
|
+
function u(t) {
|
|
1616
|
+
const e = t.contentWindow?.document;
|
|
1617
|
+
if (!e)
|
|
1618
|
+
throw new Error("iFrame was not fully loaded yet");
|
|
1619
|
+
t.style.height = "0px", t.offsetHeight;
|
|
1620
|
+
const o = Math.max(
|
|
1621
|
+
e.documentElement.scrollHeight,
|
|
1622
|
+
e.body.scrollHeight,
|
|
1623
|
+
e.documentElement.offsetHeight,
|
|
1624
|
+
e.body.offsetHeight,
|
|
1625
|
+
e.documentElement.clientHeight,
|
|
1626
|
+
e.body.clientHeight
|
|
1627
|
+
);
|
|
1628
|
+
t.style.height = \`\${o}px\`;
|
|
1629
|
+
}
|
|
1630
|
+
function y() {
|
|
1631
|
+
document.body.classList.add("js-loaded");
|
|
1632
|
+
}
|
|
1633
|
+
const E = async (t) => {
|
|
1634
|
+
if (await g(t), t.forEach((e) => {
|
|
1635
|
+
u(e);
|
|
1636
|
+
const o = e.contentWindow;
|
|
1637
|
+
if (!o)
|
|
1638
|
+
return;
|
|
1639
|
+
new ResizeObserver(() => u(e)).observe(o.document.body);
|
|
1640
|
+
}), window.addEventListener("resize", () => {
|
|
1641
|
+
t.forEach((e) => u(e));
|
|
1642
|
+
}), window.location.hash) {
|
|
1643
|
+
const e = document.querySelector(window.location.hash);
|
|
1644
|
+
e && (await new Promise((o) => setTimeout(o, 200)), e.scrollIntoView());
|
|
1645
|
+
}
|
|
1646
|
+
y();
|
|
1647
|
+
}, f = "in2theme", l = {
|
|
1648
|
+
normal: "theme-normal",
|
|
1649
|
+
light: "theme-light",
|
|
1650
|
+
dark: "theme-dark"
|
|
1651
|
+
};
|
|
1652
|
+
function v(t) {
|
|
1653
|
+
const e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1654
|
+
function o() {
|
|
1655
|
+
const c = localStorage.getItem(f);
|
|
1656
|
+
return c || localStorage.setItem(f, "normal"), c;
|
|
1657
|
+
}
|
|
1658
|
+
function n() {
|
|
1659
|
+
const c = o();
|
|
1660
|
+
let d = l[c];
|
|
1661
|
+
c === "normal" && e.matches && (d = l.dark);
|
|
1662
|
+
const m = (r) => {
|
|
1663
|
+
Object.values(l).forEach((i) => r.classList.remove(i)), r.classList.remove("dark");
|
|
1664
|
+
}, h = (r) => {
|
|
1665
|
+
r.classList.add(d), d === l.dark && r.classList.add("dark");
|
|
1666
|
+
};
|
|
1667
|
+
m(t), h(t);
|
|
1668
|
+
const w = document.querySelectorAll("iframe");
|
|
1669
|
+
w && w.forEach((r) => {
|
|
1670
|
+
m(r), h(r);
|
|
1671
|
+
}), m(document.body), h(document.body), Array.from(document.querySelectorAll("iframe")).filter((r) => r.src.includes("embed.figma.com")).forEach((r) => {
|
|
1672
|
+
const i = new URL(r.src);
|
|
1673
|
+
c === "normal" ? i.searchParams.set("theme", "system") : i.searchParams.set("theme", c), r.src = i.href;
|
|
1674
|
+
}), setTimeout(() => {
|
|
1675
|
+
document.body.classList.add("allow-transitions");
|
|
1676
|
+
}, 500);
|
|
1677
|
+
}
|
|
1678
|
+
e.addEventListener("change", () => {
|
|
1679
|
+
o() === "normal" && n();
|
|
1680
|
+
}), n(), t.addEventListener("change", () => {
|
|
1681
|
+
const c = t.querySelector('input[name="theme"]:checked');
|
|
1682
|
+
if (!c)
|
|
1683
|
+
throw new Error("No selected theme found");
|
|
1684
|
+
const d = c.value;
|
|
1685
|
+
localStorage.setItem(f, d), n();
|
|
1686
|
+
});
|
|
1687
|
+
const s = o(), a = t.querySelector(\`input[value="\${s}"]\`);
|
|
1688
|
+
if (!a)
|
|
1689
|
+
throw new Error("No current theme input found");
|
|
1690
|
+
a.checked = !0;
|
|
1691
|
+
}
|
|
1692
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
1693
|
+
const t = document.querySelector(".theme-select");
|
|
1694
|
+
t && v(t);
|
|
1695
|
+
const e = Array.from(document.querySelectorAll(".preview-iframe"));
|
|
1696
|
+
e.length > 0 ? E(e).catch(console.error) : y();
|
|
1697
|
+
});
|
|
1698
|
+
;
|
|
1699
|
+
<\/script>
|
|
1700
|
+
<script type="module" src="/styleguide-assets/preview-BqaqMVtQ.js"><\/script>
|
|
1595
1701
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1596
1702
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1597
1703
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"file": "
|
|
4
|
-
"name": "
|
|
2
|
+
"__commonjsHelpers-C6fGbg64.js": {
|
|
3
|
+
"file": "_commonjsHelpers-C6fGbg64.js",
|
|
4
|
+
"name": "_commonjsHelpers"
|
|
5
|
+
},
|
|
6
|
+
"_axe-A2Ows1Aj.js": {
|
|
7
|
+
"file": "axe-A2Ows1Aj.js",
|
|
8
|
+
"name": "axe",
|
|
9
|
+
"isDynamicEntry": true,
|
|
10
|
+
"imports": [
|
|
11
|
+
"__commonjsHelpers-C6fGbg64.js"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"_preview-DxsvGJsw.js": {
|
|
15
|
+
"file": "preview-DxsvGJsw.js",
|
|
16
|
+
"name": "preview",
|
|
5
17
|
"dynamicImports": [
|
|
6
18
|
"client/lib/html-validator.ts",
|
|
7
19
|
"client/lib/icons.ts",
|
|
@@ -10,18 +22,22 @@
|
|
|
10
22
|
]
|
|
11
23
|
},
|
|
12
24
|
"client/fullpage.ts": {
|
|
13
|
-
"file": "
|
|
14
|
-
"name": "
|
|
25
|
+
"file": "fullpage-BEOBUDsG.js",
|
|
26
|
+
"name": "fullpage",
|
|
15
27
|
"src": "client/fullpage.ts",
|
|
16
|
-
"isEntry": true
|
|
28
|
+
"isEntry": true,
|
|
29
|
+
"dynamicImports": [
|
|
30
|
+
"_axe-A2Ows1Aj.js",
|
|
31
|
+
"node_modules/html-validate/dist/esm/browser.js"
|
|
32
|
+
]
|
|
17
33
|
},
|
|
18
34
|
"client/lib/clipboard.ts": {
|
|
19
|
-
"file": "clipboard-
|
|
35
|
+
"file": "clipboard-CQ7U7_P0.js",
|
|
20
36
|
"name": "clipboard",
|
|
21
37
|
"src": "client/lib/clipboard.ts",
|
|
22
38
|
"isDynamicEntry": true,
|
|
23
39
|
"imports": [
|
|
24
|
-
"
|
|
40
|
+
"_preview-DxsvGJsw.js"
|
|
25
41
|
]
|
|
26
42
|
},
|
|
27
43
|
"client/lib/editor-select.ts": {
|
|
@@ -31,40 +47,49 @@
|
|
|
31
47
|
"isDynamicEntry": true
|
|
32
48
|
},
|
|
33
49
|
"client/lib/html-validator.ts": {
|
|
34
|
-
"file": "html-validator-
|
|
50
|
+
"file": "html-validator-M0X8x6ag.js",
|
|
35
51
|
"name": "html-validator",
|
|
36
52
|
"src": "client/lib/html-validator.ts",
|
|
37
53
|
"isDynamicEntry": true,
|
|
38
|
-
"
|
|
39
|
-
"
|
|
54
|
+
"imports": [
|
|
55
|
+
"_preview-DxsvGJsw.js"
|
|
40
56
|
]
|
|
41
57
|
},
|
|
42
58
|
"client/lib/icons.ts": {
|
|
43
|
-
"file": "icons-
|
|
59
|
+
"file": "icons-IQYIngUi.js",
|
|
44
60
|
"name": "icons",
|
|
45
61
|
"src": "client/lib/icons.ts",
|
|
46
62
|
"isDynamicEntry": true,
|
|
47
63
|
"imports": [
|
|
48
|
-
"
|
|
64
|
+
"_preview-DxsvGJsw.js"
|
|
49
65
|
]
|
|
50
66
|
},
|
|
51
|
-
"client/
|
|
52
|
-
"file": "
|
|
53
|
-
"name": "
|
|
54
|
-
"src": "client/
|
|
67
|
+
"client/preview-inline.ts": {
|
|
68
|
+
"file": "preview-inline-D_Sx3c3_.js",
|
|
69
|
+
"name": "preview-inline",
|
|
70
|
+
"src": "client/preview-inline.ts",
|
|
71
|
+
"isEntry": true
|
|
72
|
+
},
|
|
73
|
+
"client/preview.ts": {
|
|
74
|
+
"file": "preview-BqaqMVtQ.js",
|
|
75
|
+
"name": "preview",
|
|
76
|
+
"src": "client/preview.ts",
|
|
55
77
|
"isEntry": true,
|
|
56
78
|
"imports": [
|
|
57
|
-
"
|
|
79
|
+
"_preview-DxsvGJsw.js"
|
|
58
80
|
]
|
|
59
81
|
},
|
|
60
82
|
"node_modules/html-validate/dist/esm/browser.js": {
|
|
61
|
-
"file": "browser-
|
|
83
|
+
"file": "browser-Bjhprfz3.js",
|
|
62
84
|
"name": "browser",
|
|
63
85
|
"src": "node_modules/html-validate/dist/esm/browser.js",
|
|
64
|
-
"isDynamicEntry": true
|
|
86
|
+
"isDynamicEntry": true,
|
|
87
|
+
"imports": [
|
|
88
|
+
"__commonjsHelpers-C6fGbg64.js"
|
|
89
|
+
]
|
|
65
90
|
},
|
|
66
91
|
"style.css": {
|
|
67
|
-
"file": "kss-modern-
|
|
92
|
+
"file": "kss-modern-BpMIuK1b.css",
|
|
68
93
|
"src": "style.css"
|
|
69
94
|
}
|
|
70
95
|
}
|