@farming-labs/theme 0.0.2-beta.24 → 0.0.2-beta.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/docs-layout.mjs +12 -4
- package/package.json +2 -2
- package/styles/base.css +11 -3
- package/styles/pixel-border.css +7 -1
package/dist/docs-layout.mjs
CHANGED
|
@@ -229,7 +229,7 @@ function resolveSidebar(sidebar) {
|
|
|
229
229
|
if (sidebar === false) return { enabled: false };
|
|
230
230
|
return {
|
|
231
231
|
enabled: sidebar.enabled !== false,
|
|
232
|
-
|
|
232
|
+
componentFn: typeof sidebar.component === "function" ? sidebar.component : void 0,
|
|
233
233
|
footer: sidebar.footer,
|
|
234
234
|
banner: sidebar.banner,
|
|
235
235
|
collapsible: sidebar.collapsible,
|
|
@@ -343,7 +343,8 @@ function createDocsLayout(config) {
|
|
|
343
343
|
const forcedTheme = themeSwitch.enabled === false && toggleConfig?.default && toggleConfig.default !== "system" ? toggleConfig.default : void 0;
|
|
344
344
|
const resolvedSidebar = resolveSidebar(config.sidebar);
|
|
345
345
|
const sidebarFlat = resolvedSidebar.flat;
|
|
346
|
-
const
|
|
346
|
+
const sidebarComponentFn = resolvedSidebar.componentFn;
|
|
347
|
+
const { flat: _sidebarFlat, componentFn: _componentFn, ...sidebarProps } = resolvedSidebar;
|
|
347
348
|
const breadcrumbConfig = config.breadcrumb;
|
|
348
349
|
const breadcrumbEnabled = breadcrumbConfig === void 0 || breadcrumbConfig === true || typeof breadcrumbConfig === "object" && breadcrumbConfig.enabled !== false;
|
|
349
350
|
const colors = config.theme?._userColorOverrides;
|
|
@@ -380,14 +381,21 @@ function createDocsLayout(config) {
|
|
|
380
381
|
const lastModifiedMap = buildLastModifiedMap(config.entry);
|
|
381
382
|
const descriptionMap = buildDescriptionMap(config.entry);
|
|
382
383
|
return function DocsLayoutWrapper({ children }) {
|
|
384
|
+
const tree = buildTree(config, !!sidebarFlat);
|
|
385
|
+
const finalSidebarProps = { ...sidebarProps };
|
|
386
|
+
if (sidebarComponentFn) finalSidebarProps.component = sidebarComponentFn({
|
|
387
|
+
tree,
|
|
388
|
+
collapsible: sidebarProps.collapsible !== false,
|
|
389
|
+
flat: !!sidebarFlat
|
|
390
|
+
});
|
|
383
391
|
return /* @__PURE__ */ jsxs(DocsLayout, {
|
|
384
|
-
tree
|
|
392
|
+
tree,
|
|
385
393
|
nav: {
|
|
386
394
|
title: navTitle,
|
|
387
395
|
url: navUrl
|
|
388
396
|
},
|
|
389
397
|
themeSwitch,
|
|
390
|
-
sidebar:
|
|
398
|
+
sidebar: finalSidebarProps,
|
|
391
399
|
...aiMode === "sidebar-icon" && aiEnabled ? { searchToggle: { components: { lg: /* @__PURE__ */ jsx(SidebarSearchWithAI, {}) } } } : {},
|
|
392
400
|
children: [
|
|
393
401
|
/* @__PURE__ */ jsx(ColorStyle, { colors }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/theme",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.26",
|
|
4
4
|
"description": "Theme package for @farming-labs/docs — layout, provider, MDX components, and styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"next": ">=14.0.0",
|
|
99
99
|
"tsdown": "^0.20.3",
|
|
100
100
|
"typescript": "^5.9.3",
|
|
101
|
-
"@farming-labs/docs": "0.0.2-beta.
|
|
101
|
+
"@farming-labs/docs": "0.0.2-beta.26"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@farming-labs/docs": ">=0.0.1",
|
package/styles/base.css
CHANGED
|
@@ -390,8 +390,9 @@ figure.shiki:has(figcaption) figcaption {
|
|
|
390
390
|
|
|
391
391
|
.fd-page-footer {
|
|
392
392
|
display: flex;
|
|
393
|
+
flex-wrap: wrap;
|
|
393
394
|
align-items: center;
|
|
394
|
-
gap: 1rem;
|
|
395
|
+
gap: 0.75rem 1rem;
|
|
395
396
|
margin-top: auto;
|
|
396
397
|
padding-top: 1.5rem;
|
|
397
398
|
border-top: 1px solid var(--color-fd-border, hsl(0 0% 80% / 50%));
|
|
@@ -409,6 +410,13 @@ figure.shiki:has(figcaption) figcaption {
|
|
|
409
410
|
margin-left: auto;
|
|
410
411
|
}
|
|
411
412
|
|
|
413
|
+
@media (max-width: 640px) {
|
|
414
|
+
.fd-last-updated-footer {
|
|
415
|
+
margin-left: 0;
|
|
416
|
+
width: 100%;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
412
420
|
.fd-llms-txt-links {
|
|
413
421
|
display: inline-flex;
|
|
414
422
|
align-items: center;
|
|
@@ -427,8 +435,8 @@ figure.shiki:has(figcaption) figcaption {
|
|
|
427
435
|
}
|
|
428
436
|
|
|
429
437
|
.fd-llms-txt-link:hover {
|
|
430
|
-
|
|
431
|
-
border-color: var(--color-fd-foreground, hsl(0 0% 10%));
|
|
438
|
+
color: var(--color-fd-foreground, hsl(0 0% 10%));
|
|
439
|
+
border-color: var(--color-fd-foreground, hsl(0 0% 10%));
|
|
432
440
|
text-decoration: none;
|
|
433
441
|
}
|
|
434
442
|
|
package/styles/pixel-border.css
CHANGED
|
@@ -460,11 +460,17 @@ figure.shiki > div:first-child {
|
|
|
460
460
|
.fd-page-action-menu {
|
|
461
461
|
border-radius: 0 !important;
|
|
462
462
|
box-shadow: 0 4px 24px hsl(0 0% 0% / 0.5);
|
|
463
|
+
padding: 0px !important;
|
|
464
|
+
box-shadow: 2px 2px 0 0 var(--color-fd-border, #262626);
|
|
463
465
|
}
|
|
464
466
|
|
|
465
467
|
.fd-page-action-menu-item {
|
|
466
468
|
border-radius: 0 !important;
|
|
467
|
-
font-size: 0.
|
|
469
|
+
font-size: 0.68rem;
|
|
470
|
+
border-top: 1px solid var(--color-fd-border, #262626);
|
|
471
|
+
text-transform: uppercase;
|
|
472
|
+
color: var(--color-fd-muted-foreground, hsl(0 0% 45%));
|
|
473
|
+
font-family: var(--fd-font-mono, var(--font-geist-mono, ui-monospace, monospace)) !important;
|
|
468
474
|
}
|
|
469
475
|
|
|
470
476
|
/* ─── AI Chat (pixel-border — zero radius, pixel-art, monospace) ── */
|