mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 07:21:46 +01:00
fix(unplugin): add declared types for #build/app.config
This commit is contained in:
6
app.config.d.ts
vendored
Normal file
6
app.config.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
declare module '#build/app.config' {
|
||||
import type { AppConfigUI } from '@nuxt/ui/unplugin'
|
||||
|
||||
const _default: { ui?: AppConfigUI }
|
||||
export default _default
|
||||
}
|
||||
@@ -37,7 +37,8 @@
|
||||
}
|
||||
},
|
||||
"imports": {
|
||||
"#build/ui/*": "./.nuxt/ui/*.ts"
|
||||
"#build/ui/*": "./.nuxt/ui/*.ts",
|
||||
"#build/app-config": "./app-config.d.ts"
|
||||
},
|
||||
"bin": {
|
||||
"nuxt-ui": "./cli/index.mjs"
|
||||
@@ -47,6 +48,7 @@
|
||||
"types": "./dist/types.d.ts",
|
||||
"files": [
|
||||
".nuxt/ui",
|
||||
"app-config.d.ts",
|
||||
"dist",
|
||||
"cli",
|
||||
"vue-plugin.d.ts"
|
||||
|
||||
@@ -24,7 +24,7 @@ import type { DeepPartial } from './runtime/types/utils'
|
||||
type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone'
|
||||
type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {})
|
||||
|
||||
type AppConfigUI = {
|
||||
export type AppConfigUI = {
|
||||
// TODO: add type hinting for colors from `options.theme.colors`
|
||||
colors?: Record<string, Color> & { neutral?: NeutralColor }
|
||||
icons?: Partial<typeof icons>
|
||||
|
||||
Reference in New Issue
Block a user