sanity-plugin-iconify 3.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +401 -296
- package/dist/index.d.cts +89 -363
- package/dist/index.d.mts +89 -0
- package/dist/index.mjs +434 -0
- package/package.json +75 -49
- package/src/combobox/search-input.tsx +12 -2
- package/src/lib/api.ts +1 -0
- package/src/lib/icon-types.gen.ts +1 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -363
- package/dist/index.js +0 -362
- package/dist/index.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,363 +1,89 @@
|
|
|
1
|
-
import { BaseSchemaDefinition } from
|
|
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
|
-
hidden?:
|
|
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
|
-
// Display height for samples: 16 - 24
|
|
92
|
-
displayHeight?: number;
|
|
93
|
-
|
|
94
|
-
// Category on Iconify collections list.
|
|
95
|
-
category?: string;
|
|
96
|
-
|
|
97
|
-
// List of tags to group similar icon sets.
|
|
98
|
-
tags?: string[];
|
|
99
|
-
|
|
100
|
-
// Palette status. True if icons have predefined color scheme, false if icons use currentColor.
|
|
101
|
-
// Ideally, icon set should not mix icons with and without palette to simplify search.
|
|
102
|
-
palette?: boolean;
|
|
103
|
-
|
|
104
|
-
// If true, icon set should not appear in icon sets list.
|
|
105
|
-
hidden?: boolean;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export declare interface IconifyPluginConfig {
|
|
109
|
-
collections?: IconPrefix[];
|
|
110
|
-
showName?: boolean;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export declare interface IconifySearchResult {
|
|
114
|
-
icons: string[];
|
|
115
|
-
collections: Record<string, IconifyInfo>;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export declare type IconOptions = {
|
|
119
|
-
collections?: IconPrefix[];
|
|
120
|
-
showName?: boolean;
|
|
121
|
-
} & Pick<ObjectOptions, 'collapsed' | 'collapsible'>;
|
|
122
|
-
|
|
123
|
-
export declare type IconPrefix =
|
|
124
|
-
| 'material-symbols'
|
|
125
|
-
| 'material-symbols-light'
|
|
126
|
-
| 'ic'
|
|
127
|
-
| 'mdi'
|
|
128
|
-
| 'mdi-light'
|
|
129
|
-
| 'line-md'
|
|
130
|
-
| 'solar'
|
|
131
|
-
| 'tabler'
|
|
132
|
-
| 'boxicons'
|
|
133
|
-
| 'mingcute'
|
|
134
|
-
| 'ri'
|
|
135
|
-
| 'mynaui'
|
|
136
|
-
| 'iconamoon'
|
|
137
|
-
| 'iconoir'
|
|
138
|
-
| 'lucide'
|
|
139
|
-
| 'lucide-lab'
|
|
140
|
-
| 'uil'
|
|
141
|
-
| 'tdesign'
|
|
142
|
-
| 'si'
|
|
143
|
-
| 'majesticons'
|
|
144
|
-
| 'gg'
|
|
145
|
-
| 'flowbite'
|
|
146
|
-
| 'basil'
|
|
147
|
-
| 'pixelarticons'
|
|
148
|
-
| 'pixel'
|
|
149
|
-
| 'akar-icons'
|
|
150
|
-
| 'ci'
|
|
151
|
-
| 'proicons'
|
|
152
|
-
| 'typcn'
|
|
153
|
-
| 'meteor-icons'
|
|
154
|
-
| 'prime'
|
|
155
|
-
| 'circum'
|
|
156
|
-
| 'fe'
|
|
157
|
-
| 'eos-icons'
|
|
158
|
-
| 'bitcoin-icons'
|
|
159
|
-
| 'humbleicons'
|
|
160
|
-
| 'uim'
|
|
161
|
-
| 'uit'
|
|
162
|
-
| 'uis'
|
|
163
|
-
| 'gridicons'
|
|
164
|
-
| 'mi'
|
|
165
|
-
| 'cuida'
|
|
166
|
-
| 'weui'
|
|
167
|
-
| 'duo-icons'
|
|
168
|
-
| 'svg-spinners'
|
|
169
|
-
| 'hugeicons'
|
|
170
|
-
| 'lets-icons'
|
|
171
|
-
| 'streamline-ultimate'
|
|
172
|
-
| 'streamline-plump'
|
|
173
|
-
| 'streamline-sharp'
|
|
174
|
-
| 'mage'
|
|
175
|
-
| 'stash'
|
|
176
|
-
| 'lineicons'
|
|
177
|
-
| 'wordpress'
|
|
178
|
-
| 'icon-park-outline'
|
|
179
|
-
| 'icon-park-solid'
|
|
180
|
-
| 'icon-park-twotone'
|
|
181
|
-
| 'jam'
|
|
182
|
-
| 'streamline-cyber'
|
|
183
|
-
| 'guidance'
|
|
184
|
-
| 'carbon'
|
|
185
|
-
| 'ion'
|
|
186
|
-
| 'famicons'
|
|
187
|
-
| 'ant-design'
|
|
188
|
-
| 'lsicon'
|
|
189
|
-
| 'gravity-ui'
|
|
190
|
-
| 'cil'
|
|
191
|
-
| 'roentgen'
|
|
192
|
-
| 'ep'
|
|
193
|
-
| 'charm'
|
|
194
|
-
| 'quill'
|
|
195
|
-
| 'bytesize'
|
|
196
|
-
| 'bi'
|
|
197
|
-
| 'streamline-pixel'
|
|
198
|
-
| 'streamline-block'
|
|
199
|
-
| 'rivet-icons'
|
|
200
|
-
| 'nimbus'
|
|
201
|
-
| 'formkit'
|
|
202
|
-
| 'fluent'
|
|
203
|
-
| 'ph'
|
|
204
|
-
| 'glyphs'
|
|
205
|
-
| 'glyphs-poly'
|
|
206
|
-
| 'teenyicons'
|
|
207
|
-
| 'clarity'
|
|
208
|
-
| 'streamline-freehand'
|
|
209
|
-
| 'ix'
|
|
210
|
-
| 'octicon'
|
|
211
|
-
| 'memory'
|
|
212
|
-
| 'system-uicons'
|
|
213
|
-
| 'radix-icons'
|
|
214
|
-
| 'zondicons'
|
|
215
|
-
| 'uiw'
|
|
216
|
-
| 'codex'
|
|
217
|
-
| 'ei'
|
|
218
|
-
| 'heroicons'
|
|
219
|
-
| 'sidekickicons'
|
|
220
|
-
| 'pepicons-pop'
|
|
221
|
-
| 'pepicons-print'
|
|
222
|
-
| 'pepicons-pencil'
|
|
223
|
-
| 'f7'
|
|
224
|
-
| 'pajamas'
|
|
225
|
-
| 'garden'
|
|
226
|
-
| 'streamline'
|
|
227
|
-
| 'streamline-flex'
|
|
228
|
-
| 'fa7-solid'
|
|
229
|
-
| 'fa7-regular'
|
|
230
|
-
| 'picon'
|
|
231
|
-
| 'ooui'
|
|
232
|
-
| 'maki'
|
|
233
|
-
| 'temaki'
|
|
234
|
-
| 'oui'
|
|
235
|
-
| 'nrk'
|
|
236
|
-
| 'dinkie-icons'
|
|
237
|
-
| 'qlementine-icons'
|
|
238
|
-
| 'streamline-ultimate-color'
|
|
239
|
-
| 'streamline-plump-color'
|
|
240
|
-
| 'streamline-freehand-color'
|
|
241
|
-
| 'streamline-kameleon-color'
|
|
242
|
-
| 'streamline-stickies-color'
|
|
243
|
-
| 'fluent-color'
|
|
244
|
-
| 'streamline-color'
|
|
245
|
-
| 'streamline-flex-color'
|
|
246
|
-
| 'streamline-sharp-color'
|
|
247
|
-
| 'streamline-cyber-color'
|
|
248
|
-
| 'icon-park'
|
|
249
|
-
| 'marketeq'
|
|
250
|
-
| 'vscode-icons'
|
|
251
|
-
| 'codicon'
|
|
252
|
-
| 'material-icon-theme'
|
|
253
|
-
| 'file-icons'
|
|
254
|
-
| 'devicon'
|
|
255
|
-
| 'devicon-plain'
|
|
256
|
-
| 'catppuccin'
|
|
257
|
-
| 'skill-icons'
|
|
258
|
-
| 'unjs'
|
|
259
|
-
| 'simple-icons'
|
|
260
|
-
| 'logos'
|
|
261
|
-
| 'streamline-logos'
|
|
262
|
-
| 'cib'
|
|
263
|
-
| 'fa7-brands'
|
|
264
|
-
| 'bxl'
|
|
265
|
-
| 'nonicons'
|
|
266
|
-
| 'arcticons'
|
|
267
|
-
| 'cbi'
|
|
268
|
-
| 'brandico'
|
|
269
|
-
| 'entypo-social'
|
|
270
|
-
| 'token'
|
|
271
|
-
| 'token-branded'
|
|
272
|
-
| 'cryptocurrency'
|
|
273
|
-
| 'cryptocurrency-color'
|
|
274
|
-
| 'openmoji'
|
|
275
|
-
| 'twemoji'
|
|
276
|
-
| 'noto'
|
|
277
|
-
| 'fluent-emoji-flat'
|
|
278
|
-
| 'fluent-emoji-high-contrast'
|
|
279
|
-
| 'noto-v1'
|
|
280
|
-
| 'emojione'
|
|
281
|
-
| 'emojione-monotone'
|
|
282
|
-
| 'emojione-v1'
|
|
283
|
-
| 'fxemoji'
|
|
284
|
-
| 'streamline-emojis'
|
|
285
|
-
| 'circle-flags'
|
|
286
|
-
| 'flag'
|
|
287
|
-
| 'flagpack'
|
|
288
|
-
| 'cif'
|
|
289
|
-
| 'gis'
|
|
290
|
-
| 'map'
|
|
291
|
-
| 'geo'
|
|
292
|
-
| 'game-icons'
|
|
293
|
-
| 'fad'
|
|
294
|
-
| 'academicons'
|
|
295
|
-
| 'wi'
|
|
296
|
-
| 'meteocons'
|
|
297
|
-
| 'healthicons'
|
|
298
|
-
| 'medical-icon'
|
|
299
|
-
| 'covid'
|
|
300
|
-
| 'la'
|
|
301
|
-
| 'eva'
|
|
302
|
-
| 'dashicons'
|
|
303
|
-
| 'flat-color-icons'
|
|
304
|
-
| 'entypo'
|
|
305
|
-
| 'foundation'
|
|
306
|
-
| 'raphael'
|
|
307
|
-
| 'icons8'
|
|
308
|
-
| 'iwwa'
|
|
309
|
-
| 'gala'
|
|
310
|
-
| 'heroicons-outline'
|
|
311
|
-
| 'heroicons-solid'
|
|
312
|
-
| 'bx'
|
|
313
|
-
| 'bxs'
|
|
314
|
-
| 'fa6-solid'
|
|
315
|
-
| 'fa6-regular'
|
|
316
|
-
| 'fa6-brands'
|
|
317
|
-
| 'fa-solid'
|
|
318
|
-
| 'fa-regular'
|
|
319
|
-
| 'fa-brands'
|
|
320
|
-
| 'fa'
|
|
321
|
-
| 'fluent-mdl2'
|
|
322
|
-
| 'fontisto'
|
|
323
|
-
| 'icomoon-free'
|
|
324
|
-
| 'subway'
|
|
325
|
-
| 'oi'
|
|
326
|
-
| 'wpf'
|
|
327
|
-
| 'simple-line-icons'
|
|
328
|
-
| 'et'
|
|
329
|
-
| 'el'
|
|
330
|
-
| 'vaadin'
|
|
331
|
-
| 'grommet-icons'
|
|
332
|
-
| 'whh'
|
|
333
|
-
| 'si-glyph'
|
|
334
|
-
| 'zmdi'
|
|
335
|
-
| 'ls'
|
|
336
|
-
| 'bpmn'
|
|
337
|
-
| 'flat-ui'
|
|
338
|
-
| 'vs'
|
|
339
|
-
| 'topcoat'
|
|
340
|
-
| 'il'
|
|
341
|
-
| 'websymbol'
|
|
342
|
-
| 'fontelico'
|
|
343
|
-
| 'ps'
|
|
344
|
-
| 'feather'
|
|
345
|
-
| 'mono-icons'
|
|
346
|
-
| 'pepicons'
|
|
347
|
-
| 'fluent-emoji';
|
|
348
|
-
|
|
349
|
-
export declare interface IconRule extends RuleDef<IconRule, IconValue> {}
|
|
350
|
-
|
|
351
|
-
export declare type IconValue =
|
|
352
|
-
| {
|
|
353
|
-
name?: string;
|
|
354
|
-
}
|
|
355
|
-
| undefined;
|
|
356
|
-
|
|
357
|
-
export {};
|
|
358
|
-
|
|
359
|
-
declare module 'sanity' {
|
|
360
|
-
interface IntrinsicDefinitions {
|
|
361
|
-
icon: IconDefinition;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
1
|
+
import { BaseSchemaDefinition, BaseSchemaDefinition as BaseSchemaDefinition$1, ConditionalPropertyCallbackContext, FieldGroupDefinition, FieldsetDefinition, InitialValueProperty, ObjectOptions, RuleDef, ValidationBuilder } from "sanity";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Icon set information block.
|
|
6
|
+
*/
|
|
7
|
+
interface IconifyInfo {
|
|
8
|
+
// Icon set name.
|
|
9
|
+
name: string; // Total number of icons.
|
|
10
|
+
total?: number; // Version string.
|
|
11
|
+
version?: string; // Author information.
|
|
12
|
+
author: {
|
|
13
|
+
// Author name.
|
|
14
|
+
name: string; // Link to author's website or icon set website.
|
|
15
|
+
url?: string;
|
|
16
|
+
}; // License
|
|
17
|
+
license: {
|
|
18
|
+
// Human readable license.
|
|
19
|
+
title: string; // SPDX license identifier.
|
|
20
|
+
spdx?: string; // License URL.
|
|
21
|
+
url?: string;
|
|
22
|
+
}; // Array of icons that should be used for samples in icon sets list.
|
|
23
|
+
samples?: string[]; // Icon grid: number or array of numbers.
|
|
24
|
+
height?: number | number[]; // Display height for samples: 16 - 24
|
|
25
|
+
displayHeight?: number; // Category on Iconify collections list.
|
|
26
|
+
category?: string; // List of tags to group similar icon sets.
|
|
27
|
+
tags?: string[]; // Palette status. True if icons have predefined color scheme, false if icons use currentColor.
|
|
28
|
+
// Ideally, icon set should not mix icons with and without palette to simplify search.
|
|
29
|
+
palette?: boolean; // If true, icon set should not appear in icon sets list.
|
|
30
|
+
hidden?: boolean;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/lib/icon-types.gen.d.ts
|
|
34
|
+
type IconPrefix = 'material-symbols' | 'material-symbols-light' | 'ic' | 'mdi' | 'mdi-light' | 'line-md' | 'solar' | 'tabler' | 'boxicons' | 'mingcute' | 'ri' | 'mynaui' | 'iconamoon' | 'iconoir' | 'lucide' | 'lucide-lab' | 'uil' | 'tdesign' | 'si' | 'majesticons' | 'gg' | 'flowbite' | 'basil' | 'pixelarticons' | 'pixel' | 'akar-icons' | 'ci' | 'proicons' | 'typcn' | 'meteor-icons' | 'prime' | 'circum' | 'fe' | 'eos-icons' | 'bitcoin-icons' | 'humbleicons' | 'uim' | 'uit' | 'uis' | 'gridicons' | 'mi' | 'cuida' | 'weui' | 'duo-icons' | 'svg-spinners' | 'hugeicons' | 'lets-icons' | 'streamline-ultimate' | 'streamline-plump' | 'streamline-sharp' | 'mage' | 'stash' | 'lineicons' | 'wordpress' | 'icon-park-outline' | 'icon-park-solid' | 'icon-park-twotone' | 'jam' | 'streamline-cyber' | 'guidance' | 'carbon' | 'ion' | 'famicons' | 'ant-design' | 'lsicon' | 'gravity-ui' | 'cil' | 'at-icons' | 'ep' | 'charm' | 'quill' | 'bytesize' | 'bi' | 'streamline-pixel' | 'streamline-block' | 'rivet-icons' | 'nimbus' | 'formkit' | 'fluent' | 'ph' | 'glyphs' | 'glyphs-poly' | 'teenyicons' | 'clarity' | 'streamline-freehand' | 'ix' | 'octicon' | 'memory' | 'system-uicons' | 'radix-icons' | 'zondicons' | 'uiw' | 'codex' | 'ei' | 'heroicons' | 'sidekickicons' | 'pepicons-pop' | 'pepicons-print' | 'pepicons-pencil' | 'f7' | 'pajamas' | 'garden' | 'streamline' | 'streamline-flex' | 'fa7-solid' | 'fa7-regular' | 'picon' | 'ooui' | 'oui' | 'nrk' | 'dinkie-icons' | 'qlementine-icons' | 'streamline-ultimate-color' | 'streamline-plump-color' | 'streamline-freehand-color' | 'streamline-kameleon-color' | 'streamline-stickies-color' | 'fluent-color' | 'streamline-color' | 'streamline-flex-color' | 'streamline-sharp-color' | 'streamline-cyber-color' | 'icon-park' | 'marketeq' | 'vscode-icons' | 'codicon' | 'material-icon-theme' | 'file-icons' | 'devicon' | 'devicon-plain' | 'catppuccin' | 'skill-icons' | 'gcp' | 'unjs' | 'simple-icons' | 'logos' | 'streamline-logos' | 'cib' | 'fa7-brands' | 'bxl' | 'nonicons' | 'arcticons' | 'cbi' | 'brandico' | 'entypo-social' | 'token' | 'token-branded' | 'cryptocurrency' | 'cryptocurrency-color' | 'openmoji' | 'twemoji' | 'noto' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'fxemoji' | 'streamline-emojis' | 'circle-flags' | 'flag' | 'flagpack' | 'cif' | 'pinhead' | 'roentgen' | 'maki' | 'temaki' | 'gis' | 'map' | 'geo' | 'game-icons' | 'fad' | 'academicons' | 'wi' | 'meteocons' | 'healthicons' | 'medical-icon' | 'covid' | 'ginetex' | 'la' | 'eva' | 'dashicons' | 'flat-color-icons' | 'entypo' | 'foundation' | 'raphael' | 'icons8' | 'iwwa' | 'gala' | 'heroicons-outline' | 'heroicons-solid' | 'bx' | 'bxs' | 'fa6-solid' | 'fa6-regular' | 'fa6-brands' | 'fa-solid' | 'fa-regular' | 'fa-brands' | 'fa' | 'fluent-mdl2' | 'fontisto' | 'icomoon-free' | 'subway' | 'oi' | 'wpf' | 'simple-line-icons' | 'et' | 'el' | 'vaadin' | 'grommet-icons' | 'whh' | 'si-glyph' | 'zmdi' | 'ls' | 'bpmn' | 'flat-ui' | 'vs' | 'topcoat' | 'il' | 'websymbol' | 'fontelico' | 'ps' | 'feather' | 'mono-icons' | 'pepicons' | 'fluent-emoji';
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/lib/types.d.ts
|
|
37
|
+
type IconOptions = {
|
|
38
|
+
collections?: IconPrefix[];
|
|
39
|
+
showName?: boolean;
|
|
40
|
+
} & Pick<ObjectOptions, 'collapsed' | 'collapsible'>;
|
|
41
|
+
interface IconifyPluginConfig {
|
|
42
|
+
collections?: IconPrefix[];
|
|
43
|
+
showName?: boolean;
|
|
44
|
+
}
|
|
45
|
+
interface IconifySearchResult {
|
|
46
|
+
icons: string[];
|
|
47
|
+
collections: Record<string, IconifyInfo>;
|
|
48
|
+
}
|
|
49
|
+
type IconValue = {
|
|
50
|
+
name?: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
interface IconRule extends RuleDef<IconRule, IconValue> {}
|
|
53
|
+
type IconConditionalPropertyCallbackContext = Omit<ConditionalPropertyCallbackContext, 'value'> & {
|
|
54
|
+
value: IconValue;
|
|
55
|
+
};
|
|
56
|
+
type IconConditionalProperty = boolean | ((context: IconConditionalPropertyCallbackContext) => boolean) | undefined;
|
|
57
|
+
interface IconDefinition extends Omit<BaseSchemaDefinition$1, 'hidden' | 'readOnly'> {
|
|
58
|
+
type: 'icon';
|
|
59
|
+
groups?: FieldGroupDefinition[];
|
|
60
|
+
fieldsets?: FieldsetDefinition[];
|
|
61
|
+
options?: IconOptions;
|
|
62
|
+
hidden?: IconConditionalProperty;
|
|
63
|
+
readOnly?: IconConditionalProperty;
|
|
64
|
+
validation?: ValidationBuilder<IconRule, IconValue>;
|
|
65
|
+
initialValue?: InitialValueProperty<any, IconValue>;
|
|
66
|
+
}
|
|
67
|
+
declare module 'sanity' {
|
|
68
|
+
interface IntrinsicDefinitions {
|
|
69
|
+
icon: IconDefinition;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/iconify-plugin.d.ts
|
|
74
|
+
/**
|
|
75
|
+
* Usage in `sanity.config.ts` (or .js)
|
|
76
|
+
*
|
|
77
|
+
* ```ts
|
|
78
|
+
* import { defineConfig } from 'sanity'
|
|
79
|
+
* import { iconify } from 'sanity-plugin-iconify'
|
|
80
|
+
*
|
|
81
|
+
* export default defineConfig({
|
|
82
|
+
* // ...
|
|
83
|
+
* plugins: [iconify()],
|
|
84
|
+
* })
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
declare const iconify: import("sanity").Plugin<void | IconifyPluginConfig>;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { type BaseSchemaDefinition, type IconConditionalProperty, type IconConditionalPropertyCallbackContext, type IconDefinition, type IconOptions, type IconPrefix, type IconRule, type IconValue, type IconifyPluginConfig, type IconifySearchResult, iconify };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { BaseSchemaDefinition, BaseSchemaDefinition as BaseSchemaDefinition$1, ConditionalPropertyCallbackContext, FieldGroupDefinition, FieldsetDefinition, InitialValueProperty, ObjectOptions, RuleDef, ValidationBuilder } from "sanity";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/.pnpm/@iconify+types@2.0.0/node_modules/@iconify/types/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Icon set information block.
|
|
6
|
+
*/
|
|
7
|
+
interface IconifyInfo {
|
|
8
|
+
// Icon set name.
|
|
9
|
+
name: string; // Total number of icons.
|
|
10
|
+
total?: number; // Version string.
|
|
11
|
+
version?: string; // Author information.
|
|
12
|
+
author: {
|
|
13
|
+
// Author name.
|
|
14
|
+
name: string; // Link to author's website or icon set website.
|
|
15
|
+
url?: string;
|
|
16
|
+
}; // License
|
|
17
|
+
license: {
|
|
18
|
+
// Human readable license.
|
|
19
|
+
title: string; // SPDX license identifier.
|
|
20
|
+
spdx?: string; // License URL.
|
|
21
|
+
url?: string;
|
|
22
|
+
}; // Array of icons that should be used for samples in icon sets list.
|
|
23
|
+
samples?: string[]; // Icon grid: number or array of numbers.
|
|
24
|
+
height?: number | number[]; // Display height for samples: 16 - 24
|
|
25
|
+
displayHeight?: number; // Category on Iconify collections list.
|
|
26
|
+
category?: string; // List of tags to group similar icon sets.
|
|
27
|
+
tags?: string[]; // Palette status. True if icons have predefined color scheme, false if icons use currentColor.
|
|
28
|
+
// Ideally, icon set should not mix icons with and without palette to simplify search.
|
|
29
|
+
palette?: boolean; // If true, icon set should not appear in icon sets list.
|
|
30
|
+
hidden?: boolean;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/lib/icon-types.gen.d.ts
|
|
34
|
+
type IconPrefix = 'material-symbols' | 'material-symbols-light' | 'ic' | 'mdi' | 'mdi-light' | 'line-md' | 'solar' | 'tabler' | 'boxicons' | 'mingcute' | 'ri' | 'mynaui' | 'iconamoon' | 'iconoir' | 'lucide' | 'lucide-lab' | 'uil' | 'tdesign' | 'si' | 'majesticons' | 'gg' | 'flowbite' | 'basil' | 'pixelarticons' | 'pixel' | 'akar-icons' | 'ci' | 'proicons' | 'typcn' | 'meteor-icons' | 'prime' | 'circum' | 'fe' | 'eos-icons' | 'bitcoin-icons' | 'humbleicons' | 'uim' | 'uit' | 'uis' | 'gridicons' | 'mi' | 'cuida' | 'weui' | 'duo-icons' | 'svg-spinners' | 'hugeicons' | 'lets-icons' | 'streamline-ultimate' | 'streamline-plump' | 'streamline-sharp' | 'mage' | 'stash' | 'lineicons' | 'wordpress' | 'icon-park-outline' | 'icon-park-solid' | 'icon-park-twotone' | 'jam' | 'streamline-cyber' | 'guidance' | 'carbon' | 'ion' | 'famicons' | 'ant-design' | 'lsicon' | 'gravity-ui' | 'cil' | 'at-icons' | 'ep' | 'charm' | 'quill' | 'bytesize' | 'bi' | 'streamline-pixel' | 'streamline-block' | 'rivet-icons' | 'nimbus' | 'formkit' | 'fluent' | 'ph' | 'glyphs' | 'glyphs-poly' | 'teenyicons' | 'clarity' | 'streamline-freehand' | 'ix' | 'octicon' | 'memory' | 'system-uicons' | 'radix-icons' | 'zondicons' | 'uiw' | 'codex' | 'ei' | 'heroicons' | 'sidekickicons' | 'pepicons-pop' | 'pepicons-print' | 'pepicons-pencil' | 'f7' | 'pajamas' | 'garden' | 'streamline' | 'streamline-flex' | 'fa7-solid' | 'fa7-regular' | 'picon' | 'ooui' | 'oui' | 'nrk' | 'dinkie-icons' | 'qlementine-icons' | 'streamline-ultimate-color' | 'streamline-plump-color' | 'streamline-freehand-color' | 'streamline-kameleon-color' | 'streamline-stickies-color' | 'fluent-color' | 'streamline-color' | 'streamline-flex-color' | 'streamline-sharp-color' | 'streamline-cyber-color' | 'icon-park' | 'marketeq' | 'vscode-icons' | 'codicon' | 'material-icon-theme' | 'file-icons' | 'devicon' | 'devicon-plain' | 'catppuccin' | 'skill-icons' | 'gcp' | 'unjs' | 'simple-icons' | 'logos' | 'streamline-logos' | 'cib' | 'fa7-brands' | 'bxl' | 'nonicons' | 'arcticons' | 'cbi' | 'brandico' | 'entypo-social' | 'token' | 'token-branded' | 'cryptocurrency' | 'cryptocurrency-color' | 'openmoji' | 'twemoji' | 'noto' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'fxemoji' | 'streamline-emojis' | 'circle-flags' | 'flag' | 'flagpack' | 'cif' | 'pinhead' | 'roentgen' | 'maki' | 'temaki' | 'gis' | 'map' | 'geo' | 'game-icons' | 'fad' | 'academicons' | 'wi' | 'meteocons' | 'healthicons' | 'medical-icon' | 'covid' | 'ginetex' | 'la' | 'eva' | 'dashicons' | 'flat-color-icons' | 'entypo' | 'foundation' | 'raphael' | 'icons8' | 'iwwa' | 'gala' | 'heroicons-outline' | 'heroicons-solid' | 'bx' | 'bxs' | 'fa6-solid' | 'fa6-regular' | 'fa6-brands' | 'fa-solid' | 'fa-regular' | 'fa-brands' | 'fa' | 'fluent-mdl2' | 'fontisto' | 'icomoon-free' | 'subway' | 'oi' | 'wpf' | 'simple-line-icons' | 'et' | 'el' | 'vaadin' | 'grommet-icons' | 'whh' | 'si-glyph' | 'zmdi' | 'ls' | 'bpmn' | 'flat-ui' | 'vs' | 'topcoat' | 'il' | 'websymbol' | 'fontelico' | 'ps' | 'feather' | 'mono-icons' | 'pepicons' | 'fluent-emoji';
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/lib/types.d.ts
|
|
37
|
+
type IconOptions = {
|
|
38
|
+
collections?: IconPrefix[];
|
|
39
|
+
showName?: boolean;
|
|
40
|
+
} & Pick<ObjectOptions, 'collapsed' | 'collapsible'>;
|
|
41
|
+
interface IconifyPluginConfig {
|
|
42
|
+
collections?: IconPrefix[];
|
|
43
|
+
showName?: boolean;
|
|
44
|
+
}
|
|
45
|
+
interface IconifySearchResult {
|
|
46
|
+
icons: string[];
|
|
47
|
+
collections: Record<string, IconifyInfo>;
|
|
48
|
+
}
|
|
49
|
+
type IconValue = {
|
|
50
|
+
name?: string;
|
|
51
|
+
} | undefined;
|
|
52
|
+
interface IconRule extends RuleDef<IconRule, IconValue> {}
|
|
53
|
+
type IconConditionalPropertyCallbackContext = Omit<ConditionalPropertyCallbackContext, 'value'> & {
|
|
54
|
+
value: IconValue;
|
|
55
|
+
};
|
|
56
|
+
type IconConditionalProperty = boolean | ((context: IconConditionalPropertyCallbackContext) => boolean) | undefined;
|
|
57
|
+
interface IconDefinition extends Omit<BaseSchemaDefinition$1, 'hidden' | 'readOnly'> {
|
|
58
|
+
type: 'icon';
|
|
59
|
+
groups?: FieldGroupDefinition[];
|
|
60
|
+
fieldsets?: FieldsetDefinition[];
|
|
61
|
+
options?: IconOptions;
|
|
62
|
+
hidden?: IconConditionalProperty;
|
|
63
|
+
readOnly?: IconConditionalProperty;
|
|
64
|
+
validation?: ValidationBuilder<IconRule, IconValue>;
|
|
65
|
+
initialValue?: InitialValueProperty<any, IconValue>;
|
|
66
|
+
}
|
|
67
|
+
declare module 'sanity' {
|
|
68
|
+
interface IntrinsicDefinitions {
|
|
69
|
+
icon: IconDefinition;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/iconify-plugin.d.ts
|
|
74
|
+
/**
|
|
75
|
+
* Usage in `sanity.config.ts` (or .js)
|
|
76
|
+
*
|
|
77
|
+
* ```ts
|
|
78
|
+
* import { defineConfig } from 'sanity'
|
|
79
|
+
* import { iconify } from 'sanity-plugin-iconify'
|
|
80
|
+
*
|
|
81
|
+
* export default defineConfig({
|
|
82
|
+
* // ...
|
|
83
|
+
* plugins: [iconify()],
|
|
84
|
+
* })
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
declare const iconify: import("sanity").Plugin<void | IconifyPluginConfig>;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { type BaseSchemaDefinition, type IconConditionalProperty, type IconConditionalPropertyCallbackContext, type IconDefinition, type IconOptions, type IconPrefix, type IconRule, type IconValue, type IconifyPluginConfig, type IconifySearchResult, iconify };
|