@codedrifters/configulator 0.0.309 → 0.0.310
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/lib/index.d.mts +22 -3
- package/lib/index.d.ts +22 -3
- package/lib/index.js +26 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +26 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -35383,7 +35383,7 @@ function buildStarlightConfig(options) {
|
|
|
35383
35383
|
config.social = options.social;
|
|
35384
35384
|
}
|
|
35385
35385
|
if (options.sidebar !== void 0) {
|
|
35386
|
-
config.sidebar = options.sidebar;
|
|
35386
|
+
config.sidebar = options.sidebar.map(translateSidebarItem);
|
|
35387
35387
|
}
|
|
35388
35388
|
if (options.customCss !== void 0) {
|
|
35389
35389
|
config.customCss = options.customCss;
|
|
@@ -35396,6 +35396,31 @@ function buildStarlightConfig(options) {
|
|
|
35396
35396
|
}
|
|
35397
35397
|
return config;
|
|
35398
35398
|
}
|
|
35399
|
+
function translateSidebarItem(item) {
|
|
35400
|
+
if (item === null || typeof item !== "object") {
|
|
35401
|
+
return item;
|
|
35402
|
+
}
|
|
35403
|
+
const record = item;
|
|
35404
|
+
if (typeof record.label === "string" && record.autogenerate !== void 0 && record.items === void 0) {
|
|
35405
|
+
const translated = {
|
|
35406
|
+
label: record.label,
|
|
35407
|
+
items: [{ autogenerate: record.autogenerate }]
|
|
35408
|
+
};
|
|
35409
|
+
if (record.collapsed !== void 0) {
|
|
35410
|
+
translated.collapsed = record.collapsed;
|
|
35411
|
+
}
|
|
35412
|
+
return translated;
|
|
35413
|
+
}
|
|
35414
|
+
if (Array.isArray(record.items)) {
|
|
35415
|
+
return {
|
|
35416
|
+
...record,
|
|
35417
|
+
items: record.items.map(
|
|
35418
|
+
translateSidebarItem
|
|
35419
|
+
)
|
|
35420
|
+
};
|
|
35421
|
+
}
|
|
35422
|
+
return item;
|
|
35423
|
+
}
|
|
35399
35424
|
var DEFAULT_INDEX_MDX = `---
|
|
35400
35425
|
title: Welcome
|
|
35401
35426
|
description: Starlight-powered documentation site.
|