diff --git a/app.config.d.ts b/app.config.d.ts new file mode 100644 index 00000000..a32d632a --- /dev/null +++ b/app.config.d.ts @@ -0,0 +1,6 @@ +declare module '#build/app.config' { + import type { AppConfigUI } from '@nuxt/ui/unplugin' + + const _default: { ui?: AppConfigUI } + export default _default +} diff --git a/package.json b/package.json index 922f797d..c03e252f 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/unplugin.ts b/src/unplugin.ts index ad604351..d0cc9571 100644 --- a/src/unplugin.ts +++ b/src/unplugin.ts @@ -24,7 +24,7 @@ import type { DeepPartial } from './runtime/types/utils' type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone' type Color = Exclude | (string & {}) -type AppConfigUI = { +export type AppConfigUI = { // TODO: add type hinting for colors from `options.theme.colors` colors?: Record & { neutral?: NeutralColor } icons?: Partial