diff --git a/.gitignore b/.gitignore index 98bbe88db..02d5468bd 100644 --- a/.gitignore +++ b/.gitignore @@ -55,5 +55,6 @@ env/* keys # user-generated files -apps/package.json -locales/package.json \ No newline at end of file +apps +locales +!locales/en \ No newline at end of file diff --git a/docs/plugins/mdxListCountsPlugin.ts b/docs/plugins/mdxListCountsPlugin.ts index 8753d92a3..f45e62644 100644 --- a/docs/plugins/mdxListCountsPlugin.ts +++ b/docs/plugins/mdxListCountsPlugin.ts @@ -28,7 +28,7 @@ function mdxListCountsPlugin(): Plugin { const counts: Record = {} // Read all MDX files recursively - function readMdxFiles(dir: string, basePath = '') { + const readMdxFiles = (dir: string, basePath = '') => { const entries = fs.readdirSync(dir, { withFileTypes: true }) for (const entry of entries) { diff --git a/docs/src/components/Boilerplate/index.tsx b/docs/src/components/Boilerplate/index.tsx index 937560800..df651b1c9 100644 --- a/docs/src/components/Boilerplate/index.tsx +++ b/docs/src/components/Boilerplate/index.tsx @@ -26,7 +26,7 @@ function Boilerplate({ children }: { children: React.ReactNode }) { }, [location]) return ( -
+
location.pathname.startsWith(page)) ? '' : 'lg:w-[calc(100%-20rem)]'}`} + className={`flex w-full min-w-0 flex-col sm:pl-8 ${BLACKLISTED_PAGES.some(page => location.pathname.startsWith(page)) ? '' : 'lg:w-[calc(100%-20rem)]'}`} > {children} diff --git a/docs/src/contents/04.progress/components/Version.tsx b/docs/src/contents/04.progress/components/Version.tsx index 617e734ad..13c7b0176 100644 --- a/docs/src/contents/04.progress/components/Version.tsx +++ b/docs/src/contents/04.progress/components/Version.tsx @@ -2,7 +2,7 @@ import { Icon } from '@iconify/react' import dayjs from 'dayjs' import weekOfYear from 'dayjs/plugin/weekOfYear' import { Card } from 'lifeforge-ui' -import { useRef, useState } from 'react' +import { useState } from 'react' dayjs.extend(weekOfYear) @@ -23,10 +23,6 @@ function Version({ }) { const [collapsed, setCollapsed] = useState(!isLatest) - const [debouncedCollapsed, setDebouncedCollapsed] = useState(!isLatest) - - const timeoutRef = useRef(null) - const version = `${prefix} ${dayjs().year(year).format('YY')}w${week.toString().padStart(2, '0')}` // Start from January 4th of the year (guaranteed to be in week 1 per ISO 8601) @@ -37,34 +33,15 @@ function Version({ const endOfWeek = weekDate.endOf('week').format('DD MMM YYYY') - function toggleCollapsed() { - if (timeoutRef.current) { - clearTimeout(timeoutRef.current) - timeoutRef.current = null - } - - if (collapsed) { - // Expanding: immediately show content, then animate - setDebouncedCollapsed(false) - setCollapsed(false) - } else { - // Collapsing: animate first, then hide content after animation completes - setCollapsed(true) - timeoutRef.current = setTimeout(() => { - setDebouncedCollapsed(true) - }, 200) // Match the duration-200 animation - } - } - return (
setCollapsed(!collapsed)} >
@@ -88,13 +65,12 @@ function Version({
- {!debouncedCollapsed && ( -
{children}
- )} +
+
{children}
+
diff --git a/docs/vite.config.d.ts b/docs/vite.config.d.ts index 135c1dc0b..340562aff 100644 --- a/docs/vite.config.d.ts +++ b/docs/vite.config.d.ts @@ -1,2 +1,2 @@ -declare const _default: import('vite').UserConfig -export default _default +declare const _default: import("vite").UserConfig; +export default _default;