@farming-labs/theme 0.0.2-beta.19 → 0.0.2-beta.20
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 +14 -8
- package/package.json +2 -2
package/dist/docs-layout.mjs
CHANGED
|
@@ -309,21 +309,27 @@ function TypographyStyle({ typography }) {
|
|
|
309
309
|
function LayoutStyle({ layout }) {
|
|
310
310
|
if (!layout) return null;
|
|
311
311
|
const rootVars = [];
|
|
312
|
-
const
|
|
312
|
+
const desktopRootVars = [];
|
|
313
|
+
const desktopGridVars = [];
|
|
313
314
|
if (layout.sidebarWidth) {
|
|
314
315
|
const v = `--fd-sidebar-width: ${layout.sidebarWidth}px`;
|
|
315
|
-
|
|
316
|
-
|
|
316
|
+
desktopRootVars.push(`${v};`);
|
|
317
|
+
desktopGridVars.push(`${v} !important;`);
|
|
317
318
|
}
|
|
318
319
|
if (layout.contentWidth) rootVars.push(`--fd-content-width: ${layout.contentWidth}px;`);
|
|
319
320
|
if (layout.tocWidth) {
|
|
320
321
|
const v = `--fd-toc-width: ${layout.tocWidth}px`;
|
|
321
|
-
|
|
322
|
-
|
|
322
|
+
desktopRootVars.push(`${v};`);
|
|
323
|
+
desktopGridVars.push(`${v} !important;`);
|
|
324
|
+
}
|
|
325
|
+
if (rootVars.length === 0 && desktopRootVars.length === 0) return null;
|
|
326
|
+
const parts = [];
|
|
327
|
+
if (rootVars.length > 0) parts.push(`:root {\n ${rootVars.join("\n ")}\n}`);
|
|
328
|
+
if (desktopRootVars.length > 0) {
|
|
329
|
+
const inner = [`:root {\n ${desktopRootVars.join("\n ")}\n }`];
|
|
330
|
+
if (desktopGridVars.length > 0) inner.push(`[style*="fd-sidebar-col"] {\n ${desktopGridVars.join("\n ")}\n }`);
|
|
331
|
+
parts.push(`@media (min-width: 1024px) {\n ${inner.join("\n ")}\n}`);
|
|
323
332
|
}
|
|
324
|
-
if (rootVars.length === 0) return null;
|
|
325
|
-
const parts = [`:root {\n ${rootVars.join("\n ")}\n}`];
|
|
326
|
-
if (gridVars.length > 0) parts.push(`[style*="fd-sidebar-col"] {\n ${gridVars.join("\n ")}\n}`);
|
|
327
333
|
return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: parts.join("\n") } });
|
|
328
334
|
}
|
|
329
335
|
function createDocsLayout(config) {
|
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.20",
|
|
4
4
|
"description": "Theme package for @farming-labs/docs — layout, provider, MDX components, and styles",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -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.20"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@farming-labs/docs": ">=0.0.1",
|