-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
71 lines (67 loc) · 1.69 KB
/
index.d.ts
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
type Dict<T = any> = Record<string, T>
type DictStr = Record<string, string>
/**
* La definición de un icono de makeSprites es un array con 3 elementos:
*
* 0. El `d` del elemento `path` o el markup completo si no es un solo path\*
* 1. Propiedad `width`, lo mismo que para `viewBox` del `symbol` contenedor.
* 2. Propiedad `height`, igual que el anterior.
*
* NOTE: Se asume que es el markup completo cuando la cadena empieza por `<`.
*
* @example
* ```json
* {
* "alert": ["M28, M34...z", 64, 64],
* "other": ["<path d=\"M28, M34...z\">", 64, 64]
* }
* ```
*/
export type IconDef = [string, number, number]
/**
* Formato del objeto con las equivalencias de los iconos requeridos.
* Leído por omisión del icons.json en la raiz del repo.
*/
export type IconIds = Dict<DictStr>
/**
* User's options.
*/
export type MakeSpritesOptions = {
/**
* Groups with icon `{iconName:ID}`
* @default {}
*/
iconIDs?: IconIds
/**
* Group for additional icon definitions
* @default "ext"
*/
extraId?: string
/**
* Additional icon definitions (for `extraDefs` group)
* @default {}
*/
extraDefs?: Dict<IconDef>
/**
* The name of the sprite SVG file, relative to cwd.
* @default "./sprites.svg"
*/
svgOutputPath?: string
/**
* Definitions filename, relative to cwd.
* @default "./sprites.svg"
*/
tsOutputPath?: string
/**
* The sprite SVG template filename, relative to cwd.
* @default "./sprites.svg"
*/
svgTemplate?: string
/**
* Definitions template filename, relative to cwd.
* @default "./sprites.svg"
*/
tsTemplate?: string
}
declare function makeSprites (options?: MakeSpritesOptions): void
export { makeSprites }