nuxt.schema.d.ts
4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
export interface NuxtCustomSchema {
appConfig?: {
/**
* Nuxt Icon
*
* Configure Nuxt Icon module preferences.
*
*
* @studioIcon material-symbols:star
*/
icon?: {
/**
* Icon Size
*
* Set the default icon size.
*
*
* @studioIcon material-symbols:format-size-rounded
*/
size?: string | undefined,
/**
* CSS Class
*
* Set the default CSS class.
*
* @default ""
*
* @studioIcon material-symbols:css
*/
class?: string,
/**
* Default Attributes
*
* Attributes applied to every icon component.
*
* @default { "aria-hidden": true }
*
*
* @studioIcon material-symbols:settings
*/
attrs?: Record<string, string | number | boolean>,
/**
* Default Rendering Mode
*
* Set the default rendering mode for the icon component
*
* @default "css"
*
* @enum css,svg
*
* @studioIcon material-symbols:move-down-rounded
*/
mode?: string,
/**
* Icon aliases
*
* Define Icon aliases to update them easily without code changes.
*
*
* @studioIcon material-symbols:star-rounded
*/
aliases?: { [alias: string]: string },
/**
* CSS Selector Prefix
*
* Set the default CSS selector prefix.
*
* @default "i-"
*
* @studioIcon material-symbols:format-textdirection-l-to-r
*/
cssSelectorPrefix?: string,
/**
* CSS Layer Name
*
* Set the default CSS `@layer` name.
*
*
* @studioIcon material-symbols:layers
*/
cssLayer?: string | undefined,
/**
* Use CSS `:where()` Pseudo Selector
*
* Use CSS `:where()` pseudo selector to reduce specificity.
*
* @default true
*
* @studioIcon material-symbols:low-priority
*/
cssWherePseudo?: boolean,
/**
* Icon Collections
*
* List of known icon collections name. Used to resolve collection name ambiguity.
* e.g. `simple-icons-github` -> `simple-icons:github` instead of `simple:icons-github`
*
* When not provided, will use the full Iconify collection list.
*
*
* @studioIcon material-symbols:format-list-bulleted
*/
collections?: string[] | null,
/**
* Custom Icon Collections
*
*
* @studioIcon material-symbols:format-list-bulleted
*/
customCollections?: string[] | null,
/**
* Icon Provider
*
* Provider to use for fetching icons
*
* - `server` - Fetch icons with a server handler
* - `iconify` - Fetch icons with Iconify API, purely client-side
* - `none` - Do not fetch icons (use client bundle only)
*
* `server` by default; `iconify` when `ssr: false`
*
*
* @enum server,iconify,none
*
* @studioIcon material-symbols:cloud
*/
provider?: "server" | "iconify" | "none" | undefined,
/**
* Iconify API Endpoint URL
*
* Define a custom Iconify API endpoint URL. Useful if you want to use a self-hosted Iconify API. Learn more: https://iconify.design/docs/api.
*
* @default "https://api.iconify.design"
*
* @studioIcon material-symbols:api
*/
iconifyApiEndpoint?: string,
/**
* Fallback to Iconify API
*
* Fallback to Iconify API if server provider fails to found the collection.
*
* @default true
*
* @enum true,false,server-only,client-only
*
* @studioIcon material-symbols:public
*/
fallbackToApi?: boolean | "server-only" | "client-only",
/**
* Local API Endpoint Path
*
* Define a custom path for the local API endpoint.
*
* @default "/api/_nuxt_icon"
*
* @studioIcon material-symbols:api
*/
localApiEndpoint?: string,
/**
* Fetch Timeout
*
* Set the timeout for fetching icons.
*
* @default 1500
*
* @studioIcon material-symbols:timer
*/
fetchTimeout?: number,
/**
* Customize callback
*
* Customize icon content (replace stroke-width, colors, etc...).
*
*
* @studioIcon material-symbols:edit
*/
customize?: IconifyIconCustomizeCallback,
},
},
}
export type CustomAppConfig = Exclude<NuxtCustomSchema['appConfig'], undefined>
type _CustomAppConfig = CustomAppConfig
declare module '@nuxt/schema' {
interface NuxtConfig extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface NuxtOptions extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface CustomAppConfig extends _CustomAppConfig {}
}
declare module 'nuxt/schema' {
interface NuxtConfig extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface NuxtOptions extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface CustomAppConfig extends _CustomAppConfig {}
}