Skip to content

Commit

Permalink
🐛 fix(toc): fix top style
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jun 19, 2023
1 parent 72b27e5 commit 49162cf
Show file tree
Hide file tree
Showing 25 changed files with 467 additions and 411 deletions.
100 changes: 52 additions & 48 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,84 +2,67 @@ import { defineConfig } from 'dumi';

import { homepage, name } from './package.json';

const isProd = process.env.NODE_ENV === 'production';
const isProduction = process.env.NODE_ENV === 'production';
const isWin = process.platform === 'win32';

const themeConfig = {
title: 'Lobe UI',
name: 'UI',
description: 'Lobe UI is an open-source UI component library for building chatbot web apps',
footer: 'Made with 🤯 by LobeHub',
socialLinks: {
github: homepage,
},
apiHeader: {
// 组件库包名,可以从 package.json 中引入名称
pkg: name,
// 匹配路由,默认为 /api 或 /components
match: ['/components'],
// github 会匹配 themeConfig.github 字段
sourceUrl: `{github}/tree/master/src/{atomId}/index.tsx`,
docUrl: `{github}/tree/master/src/{atomId}/index.md`,
},
actions: [
{
text: 'Github',
icon: 'Github',
link: homepage,
openExternal: true,
text: 'Github',
},
{
text: 'Get Started',
link: '/components/action-icon',
text: 'Get Started',
type: 'primary',
},
],
apiHeader: {
docUrl: `{github}/tree/master/src/{atomId}/index.md`,

// 匹配路由,默认为 /api 或 /components
match: ['/components'],

// 组件库包名,可以从 package.json 中引入名称
pkg: name,
// github 会匹配 themeConfig.github 字段
sourceUrl: `{github}/tree/master/src/{atomId}/index.tsx`,
},
description: 'Lobe UI is an open-source UI component library for building chatbot web apps',

features: [
{
icon: 'Palette',
title: 'Themeable',
description:
'Provides a simple way to customize default themes, you can change the colors, fonts, breakpoints and everything you need.',
icon: 'Palette',
title: 'Themeable',
},
{
icon: 'Zap',
title: 'Fast',
description:
'voids unnecessary styles props at runtime, making it more performant than other UI libraries.',
icon: 'Zap',
title: 'Fast',
},
{
icon: 'MoonStar',
title: 'Light & Dark UI',
description:
'Automatic dark mode recognition, NextUI automatically changes the theme when detects HTML theme prop changes.',
icon: 'MoonStar',
title: 'Light & Dark UI',
},
],
footer: 'Made with 🤯 by LobeHub',
name: 'UI',
socialLinks: {
github: homepage,
},
title: 'Lobe UI',
};

export default defineConfig({
themeConfig,
locales: [{ id: 'en-US', name: 'English' }],
title: 'Lobe UI',
favicons: ['https://raw.githubusercontent.com/lobehub/favicon/main/dist/favicon.ico'],
npmClient: 'pnpm',
apiParser: isProduction ? {} : false,
base: '/',
publicPath: '/',
ssr: isProd ? {} : false,
apiParser: !isProd ? false : {},
resolve: !isProd
? undefined
: {
entryFile: './src/index.ts',
},
define: {
'process.env': process.env,
},
mfsu: isWin
? undefined
: {
exclude: ['@dqbd/tiktoken'],
},
chainWebpack(config: any) {
config.set('experiments', {
...config.get('experiments'),
Expand All @@ -99,15 +82,36 @@ export default defineConfig({
.type('webassembly/async')
.end();
},
define: {
'process.env': process.env,
},
extraBabelPlugins: [
[
'babel-plugin-styled-components',
{
minify: true,
transpileTemplateLiterals: true,
displayName: process.env.NODE_ENV === 'development',
minify: true,
pure: true,
transpileTemplateLiterals: true,
},
],
],
favicons: ['https://raw.githubusercontent.com/lobehub/favicon/main/dist/favicon.ico'],
locales: [{ id: 'en-US', name: 'English' }],
mfsu: isWin
? undefined
: {
exclude: ['@dqbd/tiktoken'],
},
npmClient: 'pnpm',
publicPath: '/',
resolve: isProduction
? {
entryFile: './src/index.ts',
}
: undefined,

ssr: isProduction ? {} : false,
themeConfig,
title: 'Lobe UI',
});
79 changes: 0 additions & 79 deletions packages/dumi-theme-lobehub/src/components/Burger/index.tsx

This file was deleted.

153 changes: 0 additions & 153 deletions packages/dumi-theme-lobehub/src/components/Burger/style.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/dumi-theme-lobehub/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export { ApiHeader, type ApiTitleProps } from './components/ApiHeader';
export { defineThemeConfig } from './config';
// 导出所有需要消费的 store
export { siteSelectors, type SiteStore, useSiteStore } from './store';
// 导出所有需要消费的类型
export * from './types';
Loading

1 comment on commit 49162cf

@vercel
Copy link

@vercel vercel bot commented on 49162cf Jun 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lobe-ui – ./

lobe-ui-lobehub.vercel.app
lobe-ui.vercel.app
lobe-ui-git-master-lobehub.vercel.app
ui.lobehub.com

Please sign in to comment.