{"_id":"@cogita/ui","_rev":"5-afe0626d365fa144fb0aad3f1a8a9a2b","name":"@cogita/ui","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"@cogita/ui","version":"0.0.1","keywords":["cogita","react","components","ui-kit","blog"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","_id":"@cogita/ui@0.0.1","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"homepage":"https://github.com/wu9o/cogita/tree/main/packages/ui#readme","bugs":{"url":"https://github.com/wu9o/cogita/issues"},"dist":{"shasum":"f74025124b28946af87c034eb1b83a73d09eb200","tarball":"https://registry.npmjs.org/@cogita/ui/-/ui-0.0.1.tgz","fileCount":12,"integrity":"sha512-55t9lXO7nZ9N3n7F3SQH+iTgGx+CdNERkrZcgYvzP+Jfit5Itd5jCNrCiX2rWfQuclV8Vft52whPZbjiN4vysQ==","signatures":[{"sig":"MEUCIHXymuKXT1hbs6pqcTB8YsNPh/Y+GmKlme9DiULbk4tHAiEAhbj8BTR0IDCV7m2ZDpwlIks7y3BLMo+vFuVKGPXXOyQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23133},"main":"./dist/index.js","type":"module","_from":"file:cogita-ui-0.0.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles":"./dist/styles/index.js","./package.json":"./package.json"},"scripts":{"dev":"rslib build -w","build":"rslib build"},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"_resolved":"/tmp/de2b8e6e0145ce6324c81d35f3661447/cogita-ui-0.0.1.tgz","_integrity":"sha512-55t9lXO7nZ9N3n7F3SQH+iTgGx+CdNERkrZcgYvzP+Jfit5Itd5jCNrCiX2rWfQuclV8Vft52whPZbjiN4vysQ==","repository":{"url":"git+https://github.com/wu9o/cogita.git","type":"git","directory":"packages/ui"},"_npmVersion":"10.8.2","description":"Shared, themeable UI components for the Cogita ecosystem.","directories":{},"sideEffects":["*.css","*.less","*.sass","*.scss","./dist/styles/index.js"],"_nodeVersion":"18.20.8","dependencies":{"@rspress/runtime":"^1.45.1","react-router-dom":"^7.8.1","@rspress/theme-default":"^1.45.1"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.1.1","react-dom":"^19.1.1","typescript":"^5.0.4","@rslib/core":"^0.11.2","@types/node":"^24.3.0","tailwindcss":"^3.4.17","@types/react":"^19.1.9","@cogita/config":"0.0.0","@types/react-dom":"^19.1.7","@rsbuild/plugin-sass":"~1.3.5","@rsbuild/plugin-svgr":"^1.2.2","@rsbuild/plugin-react":"~1.3.5","rsbuild-plugin-publint":"^0.3.3","@microsoft/api-extractor":"^7.52.10"},"peerDependencies":{"react":"^19.1.1","react-dom":"^19.1.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_0.0.1_1755451847250_0.774773036391263","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@cogita/ui","version":"0.0.2","keywords":["cogita","react","components","ui-kit","blog","theme","typescript","css-variables"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","_id":"@cogita/ui@0.0.2","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"homepage":"https://github.com/wu9o/cogita/tree/main/packages/ui#readme","bugs":{"url":"https://github.com/wu9o/cogita/issues"},"dist":{"shasum":"7322193515f97f21bac3af20a67a62d994153257","tarball":"https://registry.npmjs.org/@cogita/ui/-/ui-0.0.2.tgz","fileCount":16,"integrity":"sha512-B4Wq1wHaiWxG0zEfCDlDxQ3/3/2OSc+pkPA/dohCpwXVruS5wem+yd3i81g+SnOFjuzGMPkBWurB9PyeT7/Htg==","signatures":[{"sig":"MEYCIQD4Kxa9uze9pkp8h/Op38jEiLzSCx1V4imCGoQPy7UriAIhAKLIwnZWRBNIoF2ZLMGaInuzubUp6NSvSTLBBv9ksqqi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61725},"main":"./dist/index.js","type":"module","_from":"file:cogita-ui-0.0.2.tgz","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles":"./dist/styles/index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/wu9o","type":"github"},"scripts":{"dev":"rslib build -w","build":"rslib build"},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"_resolved":"/tmp/572024c825d19a8b7361613253866f01/cogita-ui-0.0.2.tgz","_integrity":"sha512-B4Wq1wHaiWxG0zEfCDlDxQ3/3/2OSc+pkPA/dohCpwXVruS5wem+yd3i81g+SnOFjuzGMPkBWurB9PyeT7/Htg==","repository":{"url":"git+https://github.com/wu9o/cogita.git","type":"git","directory":"packages/ui"},"_npmVersion":"10.8.2","description":"Shared, themeable UI components for building Cogita themes and plugins.","directories":{},"sideEffects":["*.css","*.less","*.sass","*.scss","./dist/styles/index.js"],"_nodeVersion":"18.20.8","dependencies":{"@rspress/runtime":"^1.45.1","react-router-dom":"^7.8.1","@rspress/theme-default":"^1.45.1"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.1.1","react-dom":"^19.1.1","typescript":"^5.0.4","@rslib/core":"^0.11.2","@types/node":"^24.3.0","tailwindcss":"^3.4.17","@types/react":"^19.1.9","@cogita/config":"0.0.0","@cogita/shared":"0.0.3","@types/react-dom":"^19.1.7","@rsbuild/plugin-sass":"~1.3.5","@rsbuild/plugin-svgr":"^1.2.2","@rsbuild/plugin-react":"~1.3.5","rsbuild-plugin-publint":"^0.3.3","@microsoft/api-extractor":"^7.52.10"},"peerDependencies":{"react":"^19.1.1","react-dom":"^19.1.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_0.0.2_1785985735760_0.6929976004678473","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@cogita/ui","version":"0.1.0","keywords":["cogita","react","components","ui-kit","blog","theme","typescript","css-variables"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","_id":"@cogita/ui@0.1.0","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"homepage":"https://github.com/wu9o/cogita/tree/main/packages/ui#readme","bugs":{"url":"https://github.com/wu9o/cogita/issues"},"dist":{"shasum":"274dd7c2bda87e1a800047094de99e649e9af0f7","tarball":"https://registry.npmjs.org/@cogita/ui/-/ui-0.1.0.tgz","fileCount":18,"integrity":"sha512-Jy9jcYZZGtIjgUTh6p5sgWJm8q/qr/MSbuOoCxQxxm3Fmy8infEA6FRAMUZ6+U66yALIQD0/NQPF6VdwZhw4mg==","signatures":[{"sig":"MEQCIDhFm7mIFg/JXZQl7utdAIDDxzwE7wKJ6FN86ZhciI8JAiBSPm/uIwwfmdQRLPMhud3vaEKC1yrWpGJv3G5/h9OPQA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72015},"main":"./dist/index.js","type":"module","_from":"file:cogita-ui-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles":"./dist/styles/index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/wu9o","type":"github"},"scripts":{"dev":"rslib build -w","build":"rslib build"},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"_resolved":"/tmp/f3ba50cf845713b006b2ade22f02be5e/cogita-ui-0.1.0.tgz","_integrity":"sha512-Jy9jcYZZGtIjgUTh6p5sgWJm8q/qr/MSbuOoCxQxxm3Fmy8infEA6FRAMUZ6+U66yALIQD0/NQPF6VdwZhw4mg==","repository":{"url":"git+https://github.com/wu9o/cogita.git","type":"git","directory":"packages/ui"},"_npmVersion":"10.8.2","description":"Shared, themeable UI components for building Cogita themes and plugins.","directories":{},"sideEffects":["*.css","*.less","*.sass","*.scss","./dist/styles/index.js"],"_nodeVersion":"18.20.8","dependencies":{"@rspress/runtime":"^1.45.1","react-router-dom":"^7.8.1","@rspress/theme-default":"^1.45.1"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.1.1","react-dom":"^19.1.1","typescript":"^5.0.4","@rslib/core":"^0.11.2","@types/node":"^24.3.0","tailwindcss":"^3.4.17","@types/react":"^19.1.9","@cogita/config":"0.0.0","@cogita/shared":"0.0.4","@types/react-dom":"^19.1.7","@rsbuild/plugin-sass":"~1.3.5","@rsbuild/plugin-svgr":"^1.2.2","@rsbuild/plugin-react":"~1.3.5","rsbuild-plugin-publint":"^0.3.3","@microsoft/api-extractor":"^7.52.10"},"peerDependencies":{"react":"^19.1.1","react-dom":"^19.1.1"},"_npmOperationalInternal":{"tmp":"tmp/ui_0.1.0_1787289196556_0.7542894474012307","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@cogita/ui","version":"0.1.1","keywords":["cogita","react","components","ui-kit","blog","theme","typescript","css-variables"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","_id":"@cogita/ui@0.1.1","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"homepage":"https://github.com/wu9o/cogita/tree/main/packages/ui#readme","bugs":{"url":"https://github.com/wu9o/cogita/issues"},"dist":{"shasum":"f729b808d658ac2ea045f3a7b20fb5dc2ac4babd","tarball":"https://registry.npmjs.org/@cogita/ui/-/ui-0.1.1.tgz","fileCount":23,"integrity":"sha512-pXNrPG5nH16qLmvKZx44whqrQuSxMUdoQNLxDzQumnSvsZf/tqebvM43h1HgR+pHka5eQWgiRCnrB9XR5RoiqA==","signatures":[{"sig":"MEYCIQDBjnuBFUgzZotK8atmM5NNVKcM5frogwmOi0k7M3IvRQIhAOk6/MNOPbPJn5jiCwJp/oaLblQLOnXO9x2EjKPashF8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32701},"main":"./dist/index.js","type":"module","_from":"file:cogita-ui-0.1.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles":"./dist/styles/index.js","./package.json":"./package.json"},"funding":{"url":"https://github.com/sponsors/wu9o","type":"github"},"scripts":{"dev":"rslib build -w","build":"rslib build"},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"_resolved":"/tmp/5c49df2524996cc0bf07c9673788209b/cogita-ui-0.1.1.tgz","_integrity":"sha512-pXNrPG5nH16qLmvKZx44whqrQuSxMUdoQNLxDzQumnSvsZf/tqebvM43h1HgR+pHka5eQWgiRCnrB9XR5RoiqA==","repository":{"url":"git+https://github.com/wu9o/cogita.git","type":"git","directory":"packages/ui"},"_npmVersion":"10.8.2","description":"Shared, themeable UI components for building Cogita themes and plugins.","directories":{},"sideEffects":["*.css","*.less","*.sass","*.scss","./dist/styles/index.js"],"_nodeVersion":"18.20.8","dependencies":{"@rspress/runtime":"^1.45.1","react-router-dom":"^7.8.1","@rspress/theme-default":"^1.45.1"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.1.1","react-dom":"^19.1.1","typescript":"^5.0.4","@rslib/core":"^0.11.2","@types/node":"^24.3.0","tailwindcss":"^3.4.17","@types/react":"^19.1.9","@cogita/config":"0.0.0","@cogita/shared":"0.10.0","@types/react-dom":"^19.1.7","@rsbuild/plugin-sass":"~1.3.5","@rsbuild/plugin-svgr":"^1.2.2","@rsbuild/plugin-react":"~1.3.5","rsbuild-plugin-publint":"^0.3.3","@microsoft/api-extractor":"^7.52.10"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ui_0.1.1_1787657084113_0.7104322579057398","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@cogita/ui","version":"0.1.2","description":"Shared, themeable UI components for building Cogita themes and plugins.","keywords":["cogita","react","components","ui-kit","blog","theme","typescript","css-variables"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/wu9o/cogita.git","directory":"packages/ui"},"bugs":{"url":"https://github.com/wu9o/cogita/issues"},"homepage":"https://github.com/wu9o/cogita/tree/main/packages/ui#readme","sideEffects":["*.css","*.less","*.sass","*.scss","./dist/styles/index.js"],"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles":"./dist/styles/index.js","./package.json":"./package.json"},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"funding":{"type":"github","url":"https://github.com/sponsors/wu9o"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"devDependencies":{"@microsoft/api-extractor":"^7.52.10","@rsbuild/plugin-react":"~1.3.5","@rsbuild/plugin-sass":"~1.3.5","@rsbuild/plugin-svgr":"^1.2.2","@rslib/core":"^0.11.2","@types/node":"^24.3.0","@types/react":"^19.1.9","@types/react-dom":"^19.1.7","react":"^19.1.1","react-dom":"^19.1.1","rsbuild-plugin-publint":"^0.3.3","tailwindcss":"^3.4.17","typescript":"^5.0.4","@cogita/config":"0.0.0","@cogita/shared":"0.13.0"},"dependencies":{"@rspress/runtime":"^1.45.1","@rspress/theme-default":"^1.45.1","react-router-dom":"^7.8.1"},"scripts":{"build":"rslib build","dev":"rslib build -w"},"_id":"@cogita/ui@0.1.2","_integrity":"sha512-qNmxJQhLicV/wbyA98EWLR1q62i7dL17gKaiElqIyCuMAvgJC7+OMujZmZQ9gSYhr5/zl3/6W2r6BrkEkfv8tA==","_resolved":"/tmp/578124b23661e62be3ebc9fe93816824/cogita-ui-0.1.2.tgz","_from":"file:cogita-ui-0.1.2.tgz","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-qNmxJQhLicV/wbyA98EWLR1q62i7dL17gKaiElqIyCuMAvgJC7+OMujZmZQ9gSYhr5/zl3/6W2r6BrkEkfv8tA==","shasum":"6069e5a155dad8e5861d2bff8143b2ad8a8adff1","tarball":"https://registry.npmjs.org/@cogita/ui/-/ui-0.1.2.tgz","fileCount":23,"unpackedSize":32934,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBNiY5wo6NUs8lHWB2j9lGnuKxMkK/JRk9X3VKwiU/k/AiBzNPTbAY8x4M4x3P0bY6t3HR/l8ew1K1LmHWyYJv809w=="}]},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"directories":{},"maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ui_0.1.2_1788404983768_0.6179037906700837"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-17T17:30:47.094Z","modified":"2026-09-03T03:09:44.263Z","0.0.1":"2025-08-17T17:30:47.446Z","0.0.2":"2026-08-06T03:08:55.927Z","0.1.0":"2026-08-21T05:13:16.726Z","0.1.1":"2026-08-25T11:24:44.239Z","0.1.2":"2026-09-03T03:09:43.901Z"},"bugs":{"url":"https://github.com/wu9o/cogita/issues"},"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","homepage":"https://github.com/wu9o/cogita/tree/main/packages/ui#readme","keywords":["cogita","react","components","ui-kit","blog","theme","typescript","css-variables"],"repository":{"type":"git","url":"git+https://github.com/wu9o/cogita.git","directory":"packages/ui"},"description":"Shared, themeable UI components for building Cogita themes and plugins.","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"readme":"# @cogita/ui\n\n[![npm version](https://badge.fury.io/js/@cogita%2Fui.svg)](https://badge.fury.io/js/@cogita%2Fui)\n[![React](https://img.shields.io/badge/React-18%2B-blue)](https://reactjs.org/)\n\n**中文** | [English](./README.md)\n\n> 用于构建 Cogita 主题和插件的共享、可主题化 UI 组件\n\n## 这是什么？\n\n`@cogita/ui` 提供了专为博客和内容网站设计的 React 组件集合。这些组件针对可读性、无障碍性和主题化进行了优化。\n\n## 安装\n\n```bash\n# 使用 pnpm\npnpm add @cogita/ui\n\n# 使用 npm  \nnpm install @cogita/ui\n\n# 使用 yarn\nyarn add @cogita/ui\n```\n\n**Peer 依赖：**\n```bash\npnpm add react react-dom @rspress/runtime @rspress/theme-default\n```\n\n## 快速开始\n\n### 基础使用\n\n```tsx\nimport { PostList, Button } from '@cogita/ui';\nimport type { Post } from '@cogita/ui';\n\nfunction BlogHome() {\n  const posts: Post[] = [\n    {\n      title: '我的第一篇文章',\n      route: '/posts/first-post', \n      createDate: '2024-01-01',\n      updateDate: '2024-01-01',\n      // ... 其他字段\n    }\n  ];\n\n  return (\n    <div>\n      <h1>我的博客</h1>\n      <PostList posts={posts} />\n      <Button variant=\"primary\" onClick={() => alert('你好！')}>\n        阅读更多\n      </Button>\n    </div>\n  );\n}\n```\n\n### 导入样式\n\n```tsx\n// 导入基础样式（通常在应用入口）\nimport '@cogita/ui/styles';\n\n// 或导入特定组件样式\nimport '@cogita/ui/components/PostList/style';\n```\n\n## 组件\n\n### 内容组件\n\n#### `PostList`\n\n显示博客文章列表，支持自定义渲染。\n\n```tsx\nimport { PostList } from '@cogita/ui';\n\n<PostList\n  posts={posts}\n  renderItem={(post) => (\n    <div>\n      <h2>{post.title}</h2>\n      <time>{post.createDate}</time>\n    </div>\n  )}\n/>\n```\n\n**Props：**\n- `posts: Post[]` - 文章数据数组\n- `renderItem?: (post: Post) => ReactNode` - 自定义渲染函数\n- `loading?: boolean` - 显示加载状态\n- `emptyText?: string` - 无文章时的文本\n\n#### `PostItem`\n\n单个文章项组件，在 PostList 中使用。\n\n```tsx\nimport { PostItem } from '@cogita/ui';\n\n<PostItem\n  post={post}\n  showExcerpt={true}\n  showTags={true}\n  titleLevel={2}\n/>\n```\n\n### 交互组件\n\n#### `Button`\n\n多功能按钮组件，支持多种变体。\n\n```tsx\nimport { Button } from '@cogita/ui';\n\n// 基础使用\n<Button onClick={handleClick}>点击我</Button>\n\n// 变体\n<Button variant=\"primary\">主要按钮</Button>\n<Button variant=\"secondary\">次要按钮</Button>\n<Button variant=\"ghost\">幽灵按钮</Button>\n\n// 尺寸\n<Button size=\"small\">小按钮</Button>\n<Button size=\"large\">大按钮</Button>\n\n// 状态\n<Button loading>加载中...</Button>\n<Button disabled>禁用</Button>\n```\n\n### 展示组件\n\n#### `TagList`\n\n显示标签，支持点击处理。\n\n```tsx\nimport { TagList } from '@cogita/ui';\n\n<TagList\n  tags={['React', 'TypeScript', 'Cogita']}\n  onTagClick={(tag) => console.log(tag)}\n/>\n```\n\n## 数据类型\n\n### `Post`\n\n主要文章数据接口。\n\n```tsx\ninterface Post {\n  title: string;\n  description?: string;\n  route: string;\n  url: string;\n  createDate: string;\n  updateDate: string;\n  tags?: string[];\n  categories?: string[];\n  author?: string;\n  cover?: string;\n}\n```\n\n## 主题化\n\n### CSS 变量\n\n使用 CSS 变量自定义外观：\n\n```css\n:root {\n  /* 颜色 */\n  --cogita-primary: #007acc;\n  --cogita-text-primary: #333;\n  --cogita-bg-primary: #fff;\n  \n  /* 间距 */\n  --cogita-space-sm: 8px;\n  --cogita-space-md: 16px;\n  --cogita-space-lg: 24px;\n  \n  /* 字体 */\n  --cogita-font-size-base: 16px;\n  --cogita-font-family: system-ui, sans-serif;\n}\n```\n\n### 暗色模式\n\n```css\n[data-theme='dark'] {\n  --cogita-primary: #58a6ff;\n  --cogita-text-primary: #f0f6fc;\n  --cogita-bg-primary: #0d1117;\n}\n```\n\n### 自定义组件样式\n\n```css\n.my-custom-post-list {\n  --cogita-post-item-padding: 24px;\n  --cogita-post-item-radius: 8px;\n}\n\n.my-custom-post-list .cogita-post-item {\n  background: var(--cogita-bg-secondary);\n  border: 1px solid var(--cogita-border);\n}\n```\n\n## 在主题中使用\n\n### 基础主题布局\n\n```tsx\n// themes/my-theme/src/layouts/Home.tsx\nimport { PostList } from '@cogita/ui';\nimport { allPosts } from 'virtual-posts-data';\n\nconst HomeLayout: React.FC = () => {\n  return (\n    <div className=\"theme-container\">\n      <header>\n        <h1>我的博客</h1>\n      </header>\n      <main>\n        <PostList posts={allPosts} />\n      </main>\n    </div>\n  );\n};\n```\n\n### 自定义渲染\n\n```tsx\n<PostList\n  posts={posts}\n  renderItem={(post) => (\n    <article className=\"custom-post\">\n      <h2>{post.title}</h2>\n      {post.cover && <img src={post.cover} alt={post.title} />}\n      <p>{post.description}</p>\n      <div className=\"post-meta\">\n        <time>{post.createDate}</time>\n        {post.tags && <TagList tags={post.tags} />}\n      </div>\n    </article>\n  )}\n/>\n```\n\n## 性能\n\n### Tree Shaking\n\n只导入需要的内容：\n\n```tsx\n// 推荐：按名称导入\nimport { PostList } from '@cogita/ui/PostList';\nimport { Button } from '@cogita/ui/Button';\n\n// 避免：完整导入\nimport { PostList, Button } from '@cogita/ui';\n```\n\n### 懒加载\n\n```tsx\nimport { lazy, Suspense } from 'react';\n\nconst HeavyComponent = lazy(() => import('@cogita/ui/HeavyComponent'));\n\nfunction MyPage() {\n  return (\n    <Suspense fallback={<div>加载中...</div>}>\n      <HeavyComponent />\n    </Suspense>\n  );\n}\n```\n\n## 开发\n\n```bash\n# 克隆仓库\ngit clone https://github.com/wu9o/cogita.git\ncd cogita\n\n# 安装依赖\npnpm install\n\n# 开发组件\npnpm --filter @cogita/ui dev\n\n# 构建组件\npnpm --filter @cogita/ui build\n\n# 运行测试\npnpm --filter @cogita/ui test\n```\n\n## 了解更多\n\n- 📖 [完整文档](../../docs-site/content/overview.md)\n- 🔧 [API 参考](../../docs-site/content/api/api-reference.md)\n- 💡 [最佳实践](../../docs-site/content/guides/best-practices.md)\n- 🎨 [主题开发](../../docs-site/content/theme-development.md)\n\n## 相关包\n\n- [🧠 @cogita/core](../core) - 核心博客引擎\n- [🚀 @cogita/cli](../cli) - 命令行界面\n- [🌟 @cogita/theme-lucid](../../themes/lucid) - 默认主题\n\n## 许可证\n\nMIT © [wu9o](https://github.com/wu9o)\n","readmeFilename":"README.md"}