Skip to content

Commit 18321f5

Browse files
committed
chore: update dependency configuration, optimize package management, adjust file structure of component packages, rename components, fix document references
1 parent 1a3643d commit 18321f5

20 files changed

Lines changed: 329 additions & 579 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default defineConfig({
3434
types: types.map(type => path.resolve(process.cwd(), `./${type}`)),
3535
},
3636
},
37-
}),
37+
}) as any,
3838
],
3939
languages: ['js', 'jsx', 'ts', 'tsx'],
4040
config: (md) => {

docs/components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// @ts-nocheck
33
// Generated by unplugin-vue-components
44
// Read more: https://github.com/vuejs/core/pull/3399
5+
// biome-ignore lint: disable
56
export {}
67

78
/* prettier-ignore */

docs/components/form/field-item.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ When defining a Form, you can use ONLY_RENDER to mark a field as render-only, an
3636

3737
```ts
3838
import { defineForm, field, ONLY_RENDER } from 'naive-ultra'
39+
3940
const form = defineForm({
4041
[ONLY_RENDER()]: field({
4142
type: 'button',

docs/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,13 @@
2323
"vitepress-plugin-demo": "catalog:docs",
2424
"vitepress-plugin-group-icons": "catalog:docs",
2525
"vue": "catalog:share"
26+
},
27+
"pnpm": {
28+
"peerDependencyRules": {
29+
"ignoreMissing": [
30+
"@algolia/client-search",
31+
"search-insights"
32+
]
33+
}
2634
}
2735
}

docs/zh-CN/components/form/field-item.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Form Field 支持 Naive UI 大部分表单组件,包括输入框、选择器
3636

3737
```ts
3838
import { defineForm, field, ONLY_RENDER } from 'naive-ultra'
39+
3940
const form = defineForm({
4041
[ONLY_RENDER()]: field({
4142
type: 'button',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616
"devDependencies": {
1717
"@antfu/eslint-config": "catalog:cli",
1818
"@antfu/ni": "catalog:cli",
19-
"@antfu/utils": "catalog:inlined",
2019
"@types/node": "catalog:types",
2120
"bumpp": "catalog:cli",
2221
"eslint": "catalog:cli",
2322
"lint-staged": "catalog:cli",
2423
"pnpm": "catalog:cli",
2524
"simple-git-hooks": "catalog:cli",
2625
"tsup": "catalog:bundler",
27-
"tsup-define": "workspace:*",
26+
"tsup-config": "workspace:*",
2827
"tsx": "catalog:cli",
2928
"typescript": "catalog:cli",
3029
"unbuild": "catalog:bundler",
3130
"vite": "catalog:cli",
3231
"vitest": "catalog:tesing"
3332
},
33+
3434
"simple-git-hooks": {
3535
"pre-commit": "pnpm lint-staged"
3636
},

packages/components/actions/tsup.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { defineBuildConfig } from 'tsup-define'
1+
import { defineBuildConfig } from 'tsup-config'
22

33
export default defineBuildConfig({
44
format: ['cjs', 'esm', 'iife', 'iife-min'],
55
entry: ['src/index.ts'],
6-
name: 'pro-actions',
7-
globalName: 'NaiveProActions',
6+
name: 'ultra-actions',
7+
globalName: 'NaiveUltraActions',
88
globals: {
99
vue: 'Vue',
1010
},

packages/components/checkbox/tsup.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { defineBuildConfig } from 'tsup-define'
1+
import { defineBuildConfig } from 'tsup-config'
22

33
export default defineBuildConfig({
44
format: ['cjs', 'esm', 'iife', 'iife-min'],
55
entry: ['src/index.ts'],
6-
name: 'pro-table',
7-
globalName: 'NaiveProTable',
6+
name: 'ultra-table',
7+
globalName: 'NaiveUltraTable',
88
globals: {
99
'naive-ui': 'naive',
1010
'vue': 'Vue',

packages/components/dialog/tsup.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { defineBuildConfig } from 'tsup-define'
1+
import { defineBuildConfig } from 'tsup-config'
22

33
export default defineBuildConfig({
44
format: ['cjs', 'esm', 'iife', 'iife-min'],
55
entry: ['src/index.ts'],
6-
name: 'pro-table',
7-
globalName: 'NaiveProTable',
6+
name: 'ultra-table',
7+
globalName: 'NaiveUltraTable',
88
globals: {
99
'naive-ui': 'naive',
1010
'vue': 'Vue',

packages/components/form/src/types/config.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,21 @@ export interface FormItemMention {
7575
props?: NestedRefs<NaiveUI.MentionProps>
7676
}
7777

78-
export type FormItemComponents =
79-
FormItemDate |
80-
FormItemSelect |
81-
FormItemAutoComplete |
82-
FormItemCascader |
83-
FormItemInput |
84-
FormItemInputNumber |
85-
FormItemButton |
86-
FormItemSwitch |
87-
FormItemCheckboxGroup |
88-
FormItemRadioGroup |
89-
FormItemRate |
90-
FormItemSlider |
91-
FormItemTimePicker |
92-
FormItemMention
78+
export type FormItemComponents
79+
= FormItemDate
80+
| FormItemSelect
81+
| FormItemAutoComplete
82+
| FormItemCascader
83+
| FormItemInput
84+
| FormItemInputNumber
85+
| FormItemButton
86+
| FormItemSwitch
87+
| FormItemCheckboxGroup
88+
| FormItemRadioGroup
89+
| FormItemRate
90+
| FormItemSlider
91+
| FormItemTimePicker
92+
| FormItemMention
9393

9494
export type FormItemDefaultRender = (model: Ref<any>, config: FormItemConfig) => any
9595

0 commit comments

Comments
 (0)