kss-modern 0.0.21 → 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 +110 -5
- package/dist/styleguide-assets/.vite/manifest.json +27 -21
- package/dist/styleguide-assets/{axe-B2M3jwef.js → axe-A2Ows1Aj.js} +13363 -13160
- package/dist/styleguide-assets/{browser-ImNvK64W.js → browser-Bjhprfz3.js} +1924 -1906
- package/dist/styleguide-assets/{clipboard-CmSioy8N.js → clipboard-CQ7U7_P0.js} +1 -1
- package/dist/styleguide-assets/{client-fullpage-CUwCohIj.js → fullpage-BEOBUDsG.js} +7 -2
- package/dist/styleguide-assets/{html-validator-BlXeWTXJ.js → html-validator-M0X8x6ag.js} +114 -94
- package/dist/styleguide-assets/{icons-DfSfd5nI.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-DJu5Mg_E.js → preview-DxsvGJsw.js} +947 -1045
- package/dist/styleguide-assets/preview-inline-D_Sx3c3_.js +101 -0
- package/package.json +12 -12
- package/dist/styleguide-assets/client-Dr95NpXp.js +0 -1
- package/dist/styleguide-assets/kss-modern-CSsz22uP.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}"` : ""}>
|
|
@@ -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));
|
|
@@ -1591,8 +1592,112 @@ async function generatePreviewFile(data) {
|
|
|
1591
1592
|
<meta name="theme-color" content="${data.theme}">
|
|
1592
1593
|
<link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/preview-light.svg">
|
|
1593
1594
|
`}
|
|
1594
|
-
<link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-
|
|
1595
|
-
<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>
|
|
1596
1701
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1597
1702
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1598
1703
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
"file": "_commonjsHelpers-C6fGbg64.js",
|
|
4
4
|
"name": "_commonjsHelpers"
|
|
5
5
|
},
|
|
6
|
-
"_axe-
|
|
7
|
-
"file": "axe-
|
|
6
|
+
"_axe-A2Ows1Aj.js": {
|
|
7
|
+
"file": "axe-A2Ows1Aj.js",
|
|
8
8
|
"name": "axe",
|
|
9
9
|
"isDynamicEntry": true,
|
|
10
10
|
"imports": [
|
|
11
11
|
"__commonjsHelpers-C6fGbg64.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
|
-
"
|
|
15
|
-
"file": "
|
|
16
|
-
"name": "
|
|
14
|
+
"_preview-DxsvGJsw.js": {
|
|
15
|
+
"file": "preview-DxsvGJsw.js",
|
|
16
|
+
"name": "preview",
|
|
17
17
|
"dynamicImports": [
|
|
18
18
|
"client/lib/html-validator.ts",
|
|
19
19
|
"client/lib/icons.ts",
|
|
@@ -22,22 +22,22 @@
|
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
"client/fullpage.ts": {
|
|
25
|
-
"file": "
|
|
26
|
-
"name": "
|
|
25
|
+
"file": "fullpage-BEOBUDsG.js",
|
|
26
|
+
"name": "fullpage",
|
|
27
27
|
"src": "client/fullpage.ts",
|
|
28
28
|
"isEntry": true,
|
|
29
29
|
"dynamicImports": [
|
|
30
|
-
"_axe-
|
|
30
|
+
"_axe-A2Ows1Aj.js",
|
|
31
31
|
"node_modules/html-validate/dist/esm/browser.js"
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"client/lib/clipboard.ts": {
|
|
35
|
-
"file": "clipboard-
|
|
35
|
+
"file": "clipboard-CQ7U7_P0.js",
|
|
36
36
|
"name": "clipboard",
|
|
37
37
|
"src": "client/lib/clipboard.ts",
|
|
38
38
|
"isDynamicEntry": true,
|
|
39
39
|
"imports": [
|
|
40
|
-
"
|
|
40
|
+
"_preview-DxsvGJsw.js"
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"client/lib/editor-select.ts": {
|
|
@@ -47,34 +47,40 @@
|
|
|
47
47
|
"isDynamicEntry": true
|
|
48
48
|
},
|
|
49
49
|
"client/lib/html-validator.ts": {
|
|
50
|
-
"file": "html-validator-
|
|
50
|
+
"file": "html-validator-M0X8x6ag.js",
|
|
51
51
|
"name": "html-validator",
|
|
52
52
|
"src": "client/lib/html-validator.ts",
|
|
53
53
|
"isDynamicEntry": true,
|
|
54
54
|
"imports": [
|
|
55
|
-
"
|
|
55
|
+
"_preview-DxsvGJsw.js"
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
"client/lib/icons.ts": {
|
|
59
|
-
"file": "icons-
|
|
59
|
+
"file": "icons-IQYIngUi.js",
|
|
60
60
|
"name": "icons",
|
|
61
61
|
"src": "client/lib/icons.ts",
|
|
62
62
|
"isDynamicEntry": true,
|
|
63
63
|
"imports": [
|
|
64
|
-
"
|
|
64
|
+
"_preview-DxsvGJsw.js"
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
|
-
"client/
|
|
68
|
-
"file": "
|
|
69
|
-
"name": "
|
|
70
|
-
"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",
|
|
71
77
|
"isEntry": true,
|
|
72
78
|
"imports": [
|
|
73
|
-
"
|
|
79
|
+
"_preview-DxsvGJsw.js"
|
|
74
80
|
]
|
|
75
81
|
},
|
|
76
82
|
"node_modules/html-validate/dist/esm/browser.js": {
|
|
77
|
-
"file": "browser-
|
|
83
|
+
"file": "browser-Bjhprfz3.js",
|
|
78
84
|
"name": "browser",
|
|
79
85
|
"src": "node_modules/html-validate/dist/esm/browser.js",
|
|
80
86
|
"isDynamicEntry": true,
|
|
@@ -83,7 +89,7 @@
|
|
|
83
89
|
]
|
|
84
90
|
},
|
|
85
91
|
"style.css": {
|
|
86
|
-
"file": "kss-modern-
|
|
92
|
+
"file": "kss-modern-BpMIuK1b.css",
|
|
87
93
|
"src": "style.css"
|
|
88
94
|
}
|
|
89
95
|
}
|