kss-modern 0.0.24 → 0.0.26
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 +168 -98
- package/dist/node/lib/vite-pug/worker.mjs +3 -2
- package/dist/styleguide-assets/.vite/manifest.json +13 -13
- package/dist/styleguide-assets/assets/{worker-DbYry4sK.js → worker-CFzs3Fh6.js} +1 -1
- package/dist/styleguide-assets/{browser-Bjhprfz3.js → browser-BqQP8cHu.js} +75 -65
- package/dist/styleguide-assets/{clipboard-DULMn8xf.js → clipboard-DBgIvDdh.js} +1 -1
- package/dist/styleguide-assets/{fullpage-CfZ3ctFE.js → fullpage-B_jhNyDy.js} +33 -30
- package/dist/styleguide-assets/{html-validator-DLEAmrmB.js → html-validator-Bwn2prbo.js} +1 -1
- package/dist/styleguide-assets/{icons-s_oHNZd6.js → icons-BClyakEv.js} +1 -1
- package/dist/styleguide-assets/kss-modern-CML2MEgc.css +1 -0
- package/dist/styleguide-assets/preview-CA6batxs.js +1 -0
- package/dist/styleguide-assets/{preview-Cknxd_cP.js → preview-uakTJmZx.js} +1095 -1024
- package/package.json +10 -10
- package/dist/styleguide-assets/kss-modern-BpMIuK1b.css +0 -1
- package/dist/styleguide-assets/preview-CzDBmeSK.js +0 -1
package/dist/node/lib/index.mjs
CHANGED
|
@@ -12,6 +12,8 @@ import { Worker } from 'node:worker_threads';
|
|
|
12
12
|
import { readFileSync } from 'node:fs';
|
|
13
13
|
import chokidar from 'chokidar';
|
|
14
14
|
|
|
15
|
+
const sectionSanitizeId = (id2) => id2.toLowerCase().replaceAll(".", "-");
|
|
16
|
+
|
|
15
17
|
function isValidHexColor(hexCode) {
|
|
16
18
|
return /^#[0-9A-F]{6}$/i.test(hexCode);
|
|
17
19
|
}
|
|
@@ -169,70 +171,40 @@ function generateId() {
|
|
|
169
171
|
return value;
|
|
170
172
|
}
|
|
171
173
|
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
return false;
|
|
181
|
-
if (state.src.charCodeAt(pos + 1) !== 58)
|
|
182
|
-
return false;
|
|
183
|
-
if (state.src.charCodeAt(pos + 2) !== 58)
|
|
184
|
-
return false;
|
|
185
|
-
const markup = state.src.slice(pos, pos + 3);
|
|
186
|
-
const params = state.src.slice(pos + 3, max).trim();
|
|
187
|
-
const spaceIndex = params.indexOf(" ");
|
|
188
|
-
const type = spaceIndex === -1 ? params : params.slice(0, spaceIndex);
|
|
189
|
-
const title = spaceIndex === -1 ? "" : params.slice(spaceIndex + 1).trim();
|
|
190
|
-
if (!type || !defaultOptions.types.includes(type)) {
|
|
191
|
-
return false;
|
|
192
|
-
}
|
|
193
|
-
let nextLine = start + 1;
|
|
194
|
-
let foundClosing = false;
|
|
195
|
-
while (nextLine < end) {
|
|
196
|
-
const linePos = state.bMarks[nextLine] + state.tShift[nextLine];
|
|
197
|
-
const lineMax = state.eMarks[nextLine];
|
|
198
|
-
const line = state.src.slice(linePos, lineMax).trim();
|
|
199
|
-
if (line === ":::") {
|
|
200
|
-
foundClosing = true;
|
|
201
|
-
break;
|
|
174
|
+
const accordionRenderer = (bodyContent, props) => {
|
|
175
|
+
const type = props.type || "info";
|
|
176
|
+
const title = props.title || "Click to expand";
|
|
177
|
+
const open = props.open || false;
|
|
178
|
+
const accordionStyles = {
|
|
179
|
+
info: {
|
|
180
|
+
container: "border border-blue-200 dark:border-blue-800 bg-blue-50 dark:bg-blue-900/10",
|
|
181
|
+
summary: "text-blue-900 dark:text-blue-100 hover:bg-blue-100 dark:hover:bg-blue-900/20"
|
|
202
182
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
closeToken.markup = markup;
|
|
229
|
-
closeToken.map = [nextLine, nextLine + 1];
|
|
230
|
-
state.line = nextLine + 1;
|
|
231
|
-
return true;
|
|
232
|
-
}
|
|
233
|
-
function renderInfoOpen(tokens, idx) {
|
|
234
|
-
const token = tokens[idx];
|
|
235
|
-
const { type, title } = token.meta;
|
|
183
|
+
};
|
|
184
|
+
const styles = accordionStyles[type] || accordionStyles.info;
|
|
185
|
+
const openAttr = open ? " open" : "";
|
|
186
|
+
return `
|
|
187
|
+
<details class="group rounded-lg overflow-hidden ${styles.container}"${openAttr}>
|
|
188
|
+
<summary class="flex items-center justify-between gap-3 px-4 py-3 cursor-pointer select-none transition-colors ${styles.summary}">
|
|
189
|
+
<span class="font-bold text-sm flex-grow-1">${title}</span>
|
|
190
|
+
<span class="shrink-0">
|
|
191
|
+
<svg class="h-4 w-4 group-open:rotate-90 transition-transform" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor">
|
|
192
|
+
<path fill-rule="evenodd" d="M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd"></path>
|
|
193
|
+
</svg>
|
|
194
|
+
</span>
|
|
195
|
+
</summary>
|
|
196
|
+
<div class="p-4">
|
|
197
|
+
${bodyContent}
|
|
198
|
+
</div>
|
|
199
|
+
</details>
|
|
200
|
+
`;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const when = (condition, content) => condition ? content() : "";
|
|
204
|
+
|
|
205
|
+
const alertRenderer = (bodyContent, props) => {
|
|
206
|
+
const type = props.type || "info";
|
|
207
|
+
const title = props.title;
|
|
236
208
|
const alertStyles = {
|
|
237
209
|
info: {
|
|
238
210
|
container: "bg-blue-100 border border-blue-200 dark:bg-blue-900/20 dark:border-blue-900/40",
|
|
@@ -263,23 +235,109 @@ function renderInfoOpen(tokens, idx) {
|
|
|
263
235
|
${iconHtml}
|
|
264
236
|
</div>
|
|
265
237
|
<div class="ml-3">
|
|
266
|
-
|
|
267
|
-
<div class="mt-1 !text-sm ${styles.content}">
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
function renderInfoClose() {
|
|
271
|
-
return `
|
|
272
|
-
</div>
|
|
273
|
-
</div>
|
|
238
|
+
${when(title, () => `<p class="!text-sm !font-bold ${styles.title}">${title}</p>`)}
|
|
239
|
+
<div class="${title ? "mt-1" : ""} !text-sm ${styles.content}">
|
|
240
|
+
${bodyContent}
|
|
274
241
|
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
275
244
|
`;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
const defaultOptions = {
|
|
248
|
+
marker: ":::",
|
|
249
|
+
components: {}
|
|
250
|
+
};
|
|
251
|
+
function parseProps(propsStr) {
|
|
252
|
+
const props = {};
|
|
253
|
+
const regex = /(\w+)=(?:"([^"]*)"|'([^']*)'|(\w+))/g;
|
|
254
|
+
let match = regex.exec(propsStr);
|
|
255
|
+
while (match !== null) {
|
|
256
|
+
const key = match[1];
|
|
257
|
+
const value = match[2] || match[3] || match[4];
|
|
258
|
+
try {
|
|
259
|
+
props[key] = JSON.parse(value);
|
|
260
|
+
} catch {
|
|
261
|
+
props[key] = value;
|
|
262
|
+
}
|
|
263
|
+
match = regex.exec(propsStr);
|
|
264
|
+
}
|
|
265
|
+
return props;
|
|
276
266
|
}
|
|
277
|
-
function
|
|
278
|
-
|
|
267
|
+
function componentBlock(options) {
|
|
268
|
+
return (state, start, end, silent) => {
|
|
269
|
+
const pos = state.bMarks[start] + state.tShift[start];
|
|
270
|
+
const max = state.eMarks[start];
|
|
271
|
+
if (pos + 3 > max)
|
|
272
|
+
return false;
|
|
273
|
+
if (state.src.charCodeAt(pos) !== 58)
|
|
274
|
+
return false;
|
|
275
|
+
if (state.src.charCodeAt(pos + 1) !== 58)
|
|
276
|
+
return false;
|
|
277
|
+
if (state.src.charCodeAt(pos + 2) !== 58)
|
|
278
|
+
return false;
|
|
279
|
+
const markup = state.src.slice(pos, pos + 3);
|
|
280
|
+
const params = state.src.slice(pos + 3, max).trim();
|
|
281
|
+
const braceIndex = params.indexOf("{");
|
|
282
|
+
const componentName = braceIndex === -1 ? params : params.slice(0, braceIndex);
|
|
283
|
+
if (!componentName || !options.components[componentName]) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
let props = {};
|
|
287
|
+
if (braceIndex !== -1) {
|
|
288
|
+
const braceEnd = params.indexOf("}", braceIndex);
|
|
289
|
+
if (braceEnd !== -1) {
|
|
290
|
+
const propsStr = params.slice(braceIndex + 1, braceEnd);
|
|
291
|
+
props = parseProps(propsStr);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
let nextLine = start + 1;
|
|
295
|
+
let foundClosing = false;
|
|
296
|
+
while (nextLine < end) {
|
|
297
|
+
const linePos = state.bMarks[nextLine] + state.tShift[nextLine];
|
|
298
|
+
const lineMax = state.eMarks[nextLine];
|
|
299
|
+
const line = state.src.slice(linePos, lineMax).trim();
|
|
300
|
+
if (line === ":::") {
|
|
301
|
+
foundClosing = true;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
nextLine++;
|
|
305
|
+
}
|
|
306
|
+
if (!foundClosing) {
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
if (silent) {
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
const token = state.push("component", "div", 0);
|
|
313
|
+
token.info = componentName;
|
|
314
|
+
token.markup = markup;
|
|
315
|
+
token.map = [start, nextLine + 1];
|
|
316
|
+
token.meta = { componentName, props };
|
|
317
|
+
token.content = state.getLines(start + 1, nextLine, state.blkIndent, false);
|
|
318
|
+
state.line = nextLine + 1;
|
|
319
|
+
return true;
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
function createRenderer(md, options) {
|
|
323
|
+
return (tokens, idx, _options, env) => {
|
|
324
|
+
const token = tokens[idx];
|
|
325
|
+
const { componentName, props } = token.meta;
|
|
326
|
+
const contentTokens = md.parse(token.content, env);
|
|
327
|
+
const bodyContent = md.renderer.render(contentTokens, md.options, env);
|
|
328
|
+
const renderFn = options.components[componentName];
|
|
329
|
+
if (renderFn) {
|
|
330
|
+
return renderFn(bodyContent.trim(), props);
|
|
331
|
+
}
|
|
332
|
+
return "";
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
function markdownItComponent(md, options) {
|
|
336
|
+
const opts = { ...defaultOptions, ...options };
|
|
337
|
+
md.block.ruler.before("fence", "component", componentBlock(opts), {
|
|
279
338
|
alt: ["paragraph", "reference", "blockquote", "list"]
|
|
280
339
|
});
|
|
281
|
-
md.renderer.rules.
|
|
282
|
-
md.renderer.rules.info_close = renderInfoClose;
|
|
340
|
+
md.renderer.rules.component = createRenderer(md, opts);
|
|
283
341
|
}
|
|
284
342
|
|
|
285
343
|
let md;
|
|
@@ -305,7 +363,12 @@ function shiftHeadingLevels(markdownContent, rootHeadingLevel) {
|
|
|
305
363
|
async function parseMarkdown(data) {
|
|
306
364
|
if (!md) {
|
|
307
365
|
md = MarkdownItAsync({ linkify: true, typographer: true });
|
|
308
|
-
md.use(
|
|
366
|
+
md.use(markdownItComponent, {
|
|
367
|
+
components: {
|
|
368
|
+
alert: alertRenderer,
|
|
369
|
+
accordion: accordionRenderer
|
|
370
|
+
}
|
|
371
|
+
});
|
|
309
372
|
md.use(
|
|
310
373
|
fromAsyncCodeToHtml(
|
|
311
374
|
codeToHtml,
|
|
@@ -833,7 +896,7 @@ async function generateFullPageFile(data) {
|
|
|
833
896
|
<link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/fullpage-light.svg">
|
|
834
897
|
`}
|
|
835
898
|
${data.ogImageUrl ? `<meta property="og:image" content="${data.ogImageUrl}">` : ""}
|
|
836
|
-
<script type="module" src="/styleguide-assets/fullpage-
|
|
899
|
+
<script type="module" src="/styleguide-assets/fullpage-B_jhNyDy.js"><\/script>
|
|
837
900
|
${computedStyleTags}
|
|
838
901
|
</head>
|
|
839
902
|
<body${data.page.bodyclass ? ` class="${data.page.bodyclass}"` : ""}>
|
|
@@ -845,7 +908,6 @@ async function generateFullPageFile(data) {
|
|
|
845
908
|
await logicalWriteFile(data.filePath, content);
|
|
846
909
|
}
|
|
847
910
|
|
|
848
|
-
const sanitizeId = (id) => id.toLowerCase().replaceAll(".", "-");
|
|
849
911
|
function getHasSectionExternalFullpage(section) {
|
|
850
912
|
return section.markup.length > 0 && (section.icons === void 0 || section.icons.length === 0) && (section.colors === void 0 || section.colors.length === 0);
|
|
851
913
|
}
|
|
@@ -1103,11 +1165,11 @@ function getMainContentSectionWrapper(section, html) {
|
|
|
1103
1165
|
};
|
|
1104
1166
|
return `
|
|
1105
1167
|
<section
|
|
1106
|
-
id="section-${
|
|
1168
|
+
id="section-${sectionSanitizeId(section.id)}"
|
|
1107
1169
|
class="styleguide-section border-b px-4 py-10 border-b-styleguide-border scroll-mt-[50px] md:px-10"
|
|
1108
1170
|
>
|
|
1109
1171
|
<div class="flex items-center justify-between gap-6">
|
|
1110
|
-
<a class="relative group" href="#section-${
|
|
1172
|
+
<a class="relative group" href="#section-${sectionSanitizeId(section.id)}">
|
|
1111
1173
|
<svg class="absolute top-1/2 -left-6 -translate-y-1/2 opacity-0 transition size-[18px] group-hover:opacity-100 group-focus:opacity-100"
|
|
1112
1174
|
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
|
|
1113
1175
|
<path d="M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z"/>
|
|
@@ -1182,7 +1244,7 @@ function getMainContentRegular(section, config) {
|
|
|
1182
1244
|
<div class="mt-4 overflow-hidden rounded-2xl border border-styleguide-border">
|
|
1183
1245
|
<div class="w-full border-b p-6 bg-styleguide-bg-highlight border-styleguide-border">
|
|
1184
1246
|
<iframe
|
|
1185
|
-
id="preview-fullpage-${
|
|
1247
|
+
id="preview-fullpage-${sectionSanitizeId(section.id)}"
|
|
1186
1248
|
src="/${section.fullpageFileName}"
|
|
1187
1249
|
class="preview-iframe"
|
|
1188
1250
|
data-preview="true"
|
|
@@ -1249,7 +1311,7 @@ function getMainContentRegular(section, config) {
|
|
|
1249
1311
|
<button
|
|
1250
1312
|
class="inline-flex items-center gap-1.5 p-4 cursor-pointer active:scale-90 transition hover:text-styleguide-highlight duration-200"
|
|
1251
1313
|
type="button"
|
|
1252
|
-
data-code-audit-iframe="preview-fullpage-${
|
|
1314
|
+
data-code-audit-iframe="preview-fullpage-${sectionSanitizeId(section.id)}"
|
|
1253
1315
|
aria-controls="code-audit-dialog"
|
|
1254
1316
|
aria-expanded="false"
|
|
1255
1317
|
>
|
|
@@ -1275,7 +1337,7 @@ function getMainContentRegular(section, config) {
|
|
|
1275
1337
|
|
|
1276
1338
|
<div class="border-t p-6 text-sm bg-styleguide-bg-highlight border-styleguide-border">
|
|
1277
1339
|
<div
|
|
1278
|
-
id="code-fullpage-${
|
|
1340
|
+
id="code-fullpage-${sectionSanitizeId(section.id)}"
|
|
1279
1341
|
class="overflow-x-auto w-full code-highlight"
|
|
1280
1342
|
data-source-code="${encodeURIComponent(section.markup)}"
|
|
1281
1343
|
data-source-lang="html"
|
|
@@ -1359,7 +1421,7 @@ function getMainContentRegular(section, config) {
|
|
|
1359
1421
|
class="aspect-video size-full"
|
|
1360
1422
|
title="${section.header} Figma Design Preview"
|
|
1361
1423
|
allowfullscreen
|
|
1362
|
-
loading="
|
|
1424
|
+
loading="<replace-figma-iframe-loading-strategy>"
|
|
1363
1425
|
></iframe>
|
|
1364
1426
|
</div>
|
|
1365
1427
|
</div>
|
|
@@ -1374,7 +1436,7 @@ function getMainContentRegular(section, config) {
|
|
|
1374
1436
|
}
|
|
1375
1437
|
return `
|
|
1376
1438
|
<div class="mt-4">
|
|
1377
|
-
${renderTab(tabs)}
|
|
1439
|
+
${renderTab(tabs).replaceAll("<replace-figma-iframe-loading-strategy>", tabs.length > 1 ? "lazy" : "eager")}
|
|
1378
1440
|
</div>
|
|
1379
1441
|
`;
|
|
1380
1442
|
}
|
|
@@ -1511,10 +1573,10 @@ function getSearchHtml(sections) {
|
|
|
1511
1573
|
return `
|
|
1512
1574
|
<dialog
|
|
1513
1575
|
id="search-dialog"
|
|
1514
|
-
class="fixed inset-0 top-8 z-30 backdrop:hidden -mb-px size-full
|
|
1576
|
+
class="fixed inset-0 top-8 z-30 backdrop:hidden -mb-px size-full max-sm:max-h-none md:h-auto overflow-y-hidden max-w-none 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"
|
|
1515
1577
|
>
|
|
1516
1578
|
<h2 class="sr-only">Search</h2>
|
|
1517
|
-
<div class="border-b px-4 py-3 border-styleguide-border">
|
|
1579
|
+
<div class="h-[53px] border-b px-4 py-3 border-styleguide-border">
|
|
1518
1580
|
<label for="search-input" class="sr-only">Search styleguide</label>
|
|
1519
1581
|
<input
|
|
1520
1582
|
id="search-input"
|
|
@@ -1530,7 +1592,10 @@ function getSearchHtml(sections) {
|
|
|
1530
1592
|
>
|
|
1531
1593
|
</div>
|
|
1532
1594
|
|
|
1533
|
-
<nav
|
|
1595
|
+
<nav
|
|
1596
|
+
id="search-list"
|
|
1597
|
+
class="grid gap-4 px-4 py-3 text-sm overflow-y-auto max-h-[calc(100%-2rem-53px)] md:max-h-[calc(85dvh-53px)]"
|
|
1598
|
+
>
|
|
1534
1599
|
${sections.map((section) => `
|
|
1535
1600
|
<div class="search-category">
|
|
1536
1601
|
<h3 class="mb-2">${section.title}</h3>
|
|
@@ -1538,7 +1603,7 @@ function getSearchHtml(sections) {
|
|
|
1538
1603
|
${section.items.map((item) => `
|
|
1539
1604
|
<li
|
|
1540
1605
|
class="search-category__item search-category__item--active"
|
|
1541
|
-
data-search-keywords="${item.searchKeywords
|
|
1606
|
+
data-search-keywords="${encodeURIComponent(JSON.stringify(item.searchKeywords))}"
|
|
1542
1607
|
>
|
|
1543
1608
|
<a
|
|
1544
1609
|
class="flex items-center gap-4 px-1.5 py-2.5 group rounded-md hover:bg-[rgb(242,242,242)] focus:bg-[rgb(242,242,242)] dark:hover:bg-[rgb(26,26,26)] dark:focus:bg-[rgb(26,26,26)] transition"
|
|
@@ -1547,9 +1612,8 @@ function getSearchHtml(sections) {
|
|
|
1547
1612
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="transition-all size-5 group-hover:translate-x-0.5 group-focus:translate-x-0.5">
|
|
1548
1613
|
<path fill-rule="evenodd" d="M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z" clip-rule="evenodd" />
|
|
1549
1614
|
</svg>
|
|
1550
|
-
<span class="text-styleguide-highlight">
|
|
1551
|
-
|
|
1552
|
-
</span>
|
|
1615
|
+
<span class="text-styleguide-highlight">${item.label}</span>
|
|
1616
|
+
<span data-type="search-hint" class="text-styleguide-highlight"></span>
|
|
1553
1617
|
</a>
|
|
1554
1618
|
</li>
|
|
1555
1619
|
`).join("\n")}
|
|
@@ -1592,7 +1656,7 @@ async function generatePreviewFile(data) {
|
|
|
1592
1656
|
<meta name="theme-color" content="${data.theme}">
|
|
1593
1657
|
<link rel="icon" type="image/svg+xml" href="/styleguide-assets/favicon/preview-light.svg">
|
|
1594
1658
|
`}
|
|
1595
|
-
<link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-
|
|
1659
|
+
<link rel="stylesheet" type="text/css" href="/styleguide-assets/kss-modern-CML2MEgc.css">
|
|
1596
1660
|
<script>
|
|
1597
1661
|
async function g(t) {
|
|
1598
1662
|
const e = (o) => {
|
|
@@ -1697,7 +1761,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
1697
1761
|
});
|
|
1698
1762
|
;
|
|
1699
1763
|
<\/script>
|
|
1700
|
-
<script type="module" src="/styleguide-assets/preview-
|
|
1764
|
+
<script type="module" src="/styleguide-assets/preview-CA6batxs.js"><\/script>
|
|
1701
1765
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1702
1766
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
1703
1767
|
<link rel="preload" href="/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
@@ -1961,10 +2025,16 @@ async function buildStyleguide(config) {
|
|
|
1961
2025
|
searchSectionMapping[indexFirstLevel].items.push({
|
|
1962
2026
|
label: secondLevelSection.header,
|
|
1963
2027
|
searchKeywords: [
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
2028
|
+
{
|
|
2029
|
+
keywords: [secondLevelSection.header, secondLevelSection.description].filter(Boolean)
|
|
2030
|
+
},
|
|
2031
|
+
...secondLevelSection.sections.flatMap((thirdLevelSection) => {
|
|
2032
|
+
return {
|
|
2033
|
+
id: sectionSanitizeId(`section-${thirdLevelSection.id}`),
|
|
2034
|
+
keywords: [thirdLevelSection.header, thirdLevelSection.description].filter(Boolean)
|
|
2035
|
+
};
|
|
2036
|
+
})
|
|
2037
|
+
],
|
|
1968
2038
|
href: menuHref
|
|
1969
2039
|
});
|
|
1970
2040
|
menuSectionMapping[indexFirstLevel].items.push({
|
|
@@ -22,7 +22,9 @@ async function getBiome() {
|
|
|
22
22
|
instance.applyConfiguration(projectKey, {
|
|
23
23
|
html: {
|
|
24
24
|
formatter: {
|
|
25
|
-
lineWidth: 100
|
|
25
|
+
lineWidth: 100,
|
|
26
|
+
whitespaceSensitivity: "ignore",
|
|
27
|
+
attributePosition: "multiline"
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
});
|
|
@@ -77,7 +79,6 @@ async function compilePug(contentDir, mode, html) {
|
|
|
77
79
|
throw new Error(`${pugSourcePath} is not a valid .pug file`);
|
|
78
80
|
}
|
|
79
81
|
const pugFn = pug.compileFile(pugFilePath, {
|
|
80
|
-
pretty: true,
|
|
81
82
|
// define doctype to avoid self-closing tags on wrong places
|
|
82
83
|
doctype: "html"
|
|
83
84
|
});
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"__commonjsHelpers-C6fGbg64.js"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
|
-
"_preview-
|
|
15
|
-
"file": "preview-
|
|
14
|
+
"_preview-uakTJmZx.js": {
|
|
15
|
+
"file": "preview-uakTJmZx.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-B_jhNyDy.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-DBgIvDdh.js",
|
|
36
36
|
"name": "clipboard",
|
|
37
37
|
"src": "client/lib/clipboard.ts",
|
|
38
38
|
"isDynamicEntry": true,
|
|
39
39
|
"imports": [
|
|
40
|
-
"_preview-
|
|
40
|
+
"_preview-uakTJmZx.js"
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"client/lib/editor-select.ts": {
|
|
@@ -47,21 +47,21 @@
|
|
|
47
47
|
"isDynamicEntry": true
|
|
48
48
|
},
|
|
49
49
|
"client/lib/html-validator.ts": {
|
|
50
|
-
"file": "html-validator-
|
|
50
|
+
"file": "html-validator-Bwn2prbo.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-uakTJmZx.js"
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
"client/lib/icons.ts": {
|
|
59
|
-
"file": "icons-
|
|
59
|
+
"file": "icons-BClyakEv.js",
|
|
60
60
|
"name": "icons",
|
|
61
61
|
"src": "client/lib/icons.ts",
|
|
62
62
|
"isDynamicEntry": true,
|
|
63
63
|
"imports": [
|
|
64
|
-
"_preview-
|
|
64
|
+
"_preview-uakTJmZx.js"
|
|
65
65
|
]
|
|
66
66
|
},
|
|
67
67
|
"client/preview-inline.ts": {
|
|
@@ -71,16 +71,16 @@
|
|
|
71
71
|
"isEntry": true
|
|
72
72
|
},
|
|
73
73
|
"client/preview.ts": {
|
|
74
|
-
"file": "preview-
|
|
74
|
+
"file": "preview-CA6batxs.js",
|
|
75
75
|
"name": "preview",
|
|
76
76
|
"src": "client/preview.ts",
|
|
77
77
|
"isEntry": true,
|
|
78
78
|
"imports": [
|
|
79
|
-
"_preview-
|
|
79
|
+
"_preview-uakTJmZx.js"
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
82
|
"node_modules/html-validate/dist/esm/browser.js": {
|
|
83
|
-
"file": "browser-
|
|
83
|
+
"file": "browser-BqQP8cHu.js",
|
|
84
84
|
"name": "browser",
|
|
85
85
|
"src": "node_modules/html-validate/dist/esm/browser.js",
|
|
86
86
|
"isDynamicEntry": true,
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
]
|
|
90
90
|
},
|
|
91
91
|
"style.css": {
|
|
92
|
-
"file": "kss-modern-
|
|
92
|
+
"file": "kss-modern-CML2MEgc.css",
|
|
93
93
|
"src": "style.css"
|
|
94
94
|
}
|
|
95
95
|
}
|