Skip to content

Commit 661e1a1

Browse files
authored
Merge branch 'main' into no-polyfill
2 parents 99c3e2f + 9ae5629 commit 661e1a1

File tree

7 files changed

+16
-55
lines changed

7 files changed

+16
-55
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { StorybookConfig } from '@storybook-vue/nuxt'
22

33
const config = {
4-
stories: ['../.storybook/*.mdx', '../app/**/*.stories.@(js|ts)'],
4+
stories: ['../app/**/*.stories.@(js|ts)'],
55
addons: ['@storybook/addon-a11y', '@storybook/addon-docs', '@storybook/addon-themes'],
66
framework: '@storybook-vue/nuxt',
77
staticDirs: ['./.public'],

.storybook/manager.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
import { addons } from 'storybook/manager-api'
2+
import { create } from 'storybook/theming'
23

3-
import npmxDark from './theme'
4+
const npmxTheme = create({
5+
brandTitle: 'npmx Storybook',
6+
brandImage: '/npmx-storybook.svg',
7+
})
48

59
addons.setConfig({
6-
theme: npmxDark,
7-
layoutCustomisations: {
8-
showToolbar: (state, defaultValue) => {
9-
if (state.viewMode === 'docs' && state.storyId) {
10-
const story = state.index?.[state.storyId]
11-
const tags = story?.tags || []
12-
if (tags.includes('hide-toolbar')) {
13-
return false
14-
}
15-
}
16-
return defaultValue
17-
},
18-
},
10+
theme: npmxTheme,
1911
})

.storybook/preview-head.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

.storybook/preview.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { currentLocales } from '../config/i18n'
44
import { fn } from 'storybook/test'
55
import { ACCENT_COLORS } from '../shared/utils/constants'
66

7-
import npmxDark from './theme'
8-
97
// related: https://github.com/npmx-dev/npmx.dev/blob/1431d24be555bca5e1ae6264434d49ca15173c43/test/nuxt/setup.ts#L12-L26
108
// Stub Nuxt specific globals
119
// @ts-expect-error - dynamic global name
@@ -27,9 +25,6 @@ const preview: Preview = {
2725
date: /Date$/i,
2826
},
2927
},
30-
docs: {
31-
theme: npmxDark,
32-
},
3328
},
3429
// Provides toolbars to switch things like theming and language
3530
globalTypes: {

.storybook/storybook-welcome.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.

.storybook/theme.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

i18n/locales/zh-CN.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"main_navigation": "主页",
8080
"popular_packages": "热门软件包",
8181
"settings": "设置",
82-
"compare": "比较包",
82+
"compare": "包对比",
8383
"back": "返回",
8484
"menu": "菜单",
8585
"mobile_menu": "导航菜单",
@@ -289,7 +289,7 @@
289289
"view_source": "查看源代码"
290290
},
291291
"links": {
292-
"main": "main",
292+
"main": "主页",
293293
"repo": "仓库",
294294
"homepage": "主页",
295295
"issues": "议题",
@@ -1052,15 +1052,15 @@
10521052
},
10531053
"compare": {
10541054
"packages": {
1055-
"title": "比较包",
1056-
"tagline": "并排比较 npm 包,帮助你选择合适的包",
1057-
"meta_title": "比较 {packages} - npmx",
1058-
"meta_title_empty": "比较包 - npmx",
1059-
"meta_description": "并排比较 {packages}",
1060-
"meta_description_empty": "并排比较 npm 包,帮助你选择合适的包",
1055+
"title": "包对比",
1056+
"tagline": "并排对比 npm 包,帮你选出最合适的",
1057+
"meta_title": "对比 {packages} - npmx",
1058+
"meta_title_empty": "包对比 - npmx",
1059+
"meta_description": "并排对比 {packages}",
1060+
"meta_description_empty": "并排对比 npm 包,帮你选出最合适的",
10611061
"section_packages": "",
10621062
"section_facets": "维度",
1063-
"section_comparison": "比较",
1063+
"section_comparison": "对比",
10641064
"copy_as_markdown": "复制为 Markdown",
10651065
"loading": "正在加载包数据…",
10661066
"error": "加载包数据失败。请重试。",

0 commit comments

Comments
 (0)