@iconify/tools 4.0.0-beta.9 → 4.0.0

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.
Files changed (221) hide show
  1. package/lib/colors/attribs.d.cts +27 -0
  2. package/lib/colors/attribs.d.mts +27 -0
  3. package/lib/colors/attribs.d.ts +1 -1
  4. package/lib/colors/detect.d.cts +16 -0
  5. package/lib/colors/detect.d.mts +16 -0
  6. package/lib/colors/parse.d.cts +60 -0
  7. package/lib/colors/parse.d.mts +60 -0
  8. package/lib/colors/parse.d.ts +1 -1
  9. package/lib/colors/validate.d.cts +20 -0
  10. package/lib/colors/validate.d.mts +20 -0
  11. package/lib/css/parse.d.cts +6 -0
  12. package/lib/css/parse.d.mts +6 -0
  13. package/lib/css/parser/error.d.cts +13 -0
  14. package/lib/css/parser/error.d.mts +13 -0
  15. package/lib/css/parser/error.d.ts +1 -1
  16. package/lib/css/parser/export.d.cts +8 -0
  17. package/lib/css/parser/export.d.mts +8 -0
  18. package/lib/css/parser/strings.d.cts +16 -0
  19. package/lib/css/parser/strings.d.mts +16 -0
  20. package/lib/css/parser/text.d.cts +20 -0
  21. package/lib/css/parser/text.d.mts +20 -0
  22. package/lib/css/parser/tokens.d.cts +9 -0
  23. package/lib/css/parser/tokens.d.mts +9 -0
  24. package/lib/css/parser/tree.d.cts +8 -0
  25. package/lib/css/parser/tree.d.mts +8 -0
  26. package/lib/css/parser/types.d.cts +52 -0
  27. package/lib/css/parser/types.d.mts +52 -0
  28. package/lib/css/parser/types.d.ts +1 -1
  29. package/lib/download/api/cache.d.cts +20 -0
  30. package/lib/download/api/cache.d.mts +20 -0
  31. package/lib/download/api/config.d.cts +18 -0
  32. package/lib/download/api/config.d.mts +18 -0
  33. package/lib/download/api/download.d.cts +8 -0
  34. package/lib/download/api/download.d.mts +8 -0
  35. package/lib/download/api/index.d.cts +8 -0
  36. package/lib/download/api/index.d.mts +8 -0
  37. package/lib/download/api/queue.d.cts +32 -0
  38. package/lib/download/api/queue.d.mts +32 -0
  39. package/lib/download/api/queue.d.ts +1 -1
  40. package/lib/download/api/types.d.cts +17 -0
  41. package/lib/download/api/types.d.mts +17 -0
  42. package/lib/download/api/types.d.ts +1 -1
  43. package/lib/download/git/branch.d.cts +8 -0
  44. package/lib/download/git/branch.d.mts +8 -0
  45. package/lib/download/git/hash.d.cts +8 -0
  46. package/lib/download/git/hash.d.mts +8 -0
  47. package/lib/download/git/index.d.cts +29 -0
  48. package/lib/download/git/index.d.mts +29 -0
  49. package/lib/download/git/index.d.ts +1 -1
  50. package/lib/download/git/reset.d.cts +6 -0
  51. package/lib/download/git/reset.d.mts +6 -0
  52. package/lib/download/github/hash.d.cts +8 -0
  53. package/lib/download/github/hash.d.mts +8 -0
  54. package/lib/download/github/index.d.cts +31 -0
  55. package/lib/download/github/index.d.mts +31 -0
  56. package/lib/download/github/index.d.ts +1 -1
  57. package/lib/download/github/types.d.cts +11 -0
  58. package/lib/download/github/types.d.mts +11 -0
  59. package/lib/download/github/types.d.ts +1 -1
  60. package/lib/download/gitlab/hash.d.cts +8 -0
  61. package/lib/download/gitlab/hash.d.mts +8 -0
  62. package/lib/download/gitlab/index.d.cts +31 -0
  63. package/lib/download/gitlab/index.d.mts +31 -0
  64. package/lib/download/gitlab/index.d.ts +1 -1
  65. package/lib/download/gitlab/types.d.cts +15 -0
  66. package/lib/download/gitlab/types.d.mts +15 -0
  67. package/lib/download/gitlab/types.d.ts +1 -1
  68. package/lib/download/helpers/untar.d.cts +6 -0
  69. package/lib/download/helpers/untar.d.mts +6 -0
  70. package/lib/download/helpers/unzip.d.cts +6 -0
  71. package/lib/download/helpers/unzip.d.mts +6 -0
  72. package/lib/download/index.d.cts +48 -0
  73. package/lib/download/index.d.mts +48 -0
  74. package/lib/download/index.d.ts +1 -1
  75. package/lib/download/npm/index.d.cts +30 -0
  76. package/lib/download/npm/index.d.mts +30 -0
  77. package/lib/download/npm/index.d.ts +1 -1
  78. package/lib/download/npm/types.d.cts +9 -0
  79. package/lib/download/npm/types.d.mts +9 -0
  80. package/lib/download/npm/types.d.ts +1 -1
  81. package/lib/download/npm/version.d.cts +16 -0
  82. package/lib/download/npm/version.d.mts +16 -0
  83. package/lib/download/npm/version.d.ts +1 -1
  84. package/lib/download/types/modified.d.cts +6 -0
  85. package/lib/download/types/modified.d.mts +6 -0
  86. package/lib/download/types/modified.d.ts +1 -1
  87. package/lib/download/types/sources.d.cts +12 -0
  88. package/lib/download/types/sources.d.mts +12 -0
  89. package/lib/download/types/sources.d.ts +1 -1
  90. package/lib/export/directory.d.cts +26 -0
  91. package/lib/export/directory.d.mts +26 -0
  92. package/lib/export/directory.d.ts +1 -1
  93. package/lib/export/helpers/custom-files.d.cts +12 -0
  94. package/lib/export/helpers/custom-files.d.mts +12 -0
  95. package/lib/export/helpers/custom-files.d.ts +1 -1
  96. package/lib/export/helpers/prepare.d.cts +19 -0
  97. package/lib/export/helpers/prepare.d.mts +19 -0
  98. package/lib/export/helpers/prepare.d.ts +1 -1
  99. package/lib/export/helpers/types-version.d.cts +6 -0
  100. package/lib/export/helpers/types-version.d.mts +6 -0
  101. package/lib/export/icon-package.d.cts +26 -0
  102. package/lib/export/icon-package.d.mts +26 -0
  103. package/lib/export/icon-package.d.ts +1 -3
  104. package/lib/export/json-package.d.cts +25 -0
  105. package/lib/export/json-package.d.mts +25 -0
  106. package/lib/export/json-package.d.ts +1 -1
  107. package/lib/icon-set/index.cjs +22 -0
  108. package/lib/icon-set/index.d.cts +162 -0
  109. package/lib/icon-set/index.d.mts +162 -0
  110. package/lib/icon-set/index.mjs +22 -0
  111. package/lib/icon-set/match.d.cts +15 -0
  112. package/lib/icon-set/match.d.mts +15 -0
  113. package/lib/icon-set/merge.d.cts +14 -0
  114. package/lib/icon-set/merge.d.mts +14 -0
  115. package/lib/icon-set/modified.d.cts +16 -0
  116. package/lib/icon-set/modified.d.mts +16 -0
  117. package/lib/icon-set/props.d.cts +13 -0
  118. package/lib/icon-set/props.d.mts +13 -0
  119. package/lib/icon-set/tags.d.cts +23 -0
  120. package/lib/icon-set/tags.d.mts +23 -0
  121. package/lib/icon-set/types.d.cts +75 -0
  122. package/lib/icon-set/types.d.mts +75 -0
  123. package/lib/icon-set/types.d.ts +1 -1
  124. package/lib/import/directory.d.cts +52 -0
  125. package/lib/import/directory.d.mts +52 -0
  126. package/lib/import/directory.d.ts +1 -1
  127. package/lib/import/figma/index.d.cts +20 -0
  128. package/lib/import/figma/index.d.mts +20 -0
  129. package/lib/import/figma/nodes.d.cts +18 -0
  130. package/lib/import/figma/nodes.d.mts +18 -0
  131. package/lib/import/figma/query.d.cts +42 -0
  132. package/lib/import/figma/query.d.mts +42 -0
  133. package/lib/import/figma/query.d.ts +1 -1
  134. package/lib/import/figma/types/api.d.cts +53 -0
  135. package/lib/import/figma/types/api.d.mts +53 -0
  136. package/lib/import/figma/types/api.d.ts +1 -1
  137. package/lib/import/figma/types/nodes.d.cts +44 -0
  138. package/lib/import/figma/types/nodes.d.mts +44 -0
  139. package/lib/import/figma/types/nodes.d.ts +1 -1
  140. package/lib/import/figma/types/options.d.cts +59 -0
  141. package/lib/import/figma/types/options.d.mts +59 -0
  142. package/lib/import/figma/types/options.d.ts +1 -1
  143. package/lib/import/figma/types/result.d.cts +44 -0
  144. package/lib/import/figma/types/result.d.mts +44 -0
  145. package/lib/import/figma/types/result.d.ts +1 -1
  146. package/lib/index.cjs +7 -5
  147. package/lib/index.d.cts +78 -0
  148. package/lib/index.d.mts +78 -0
  149. package/lib/index.d.ts +1 -0
  150. package/lib/index.mjs +6 -5
  151. package/lib/misc/bump-version.d.cts +6 -0
  152. package/lib/misc/bump-version.d.mts +6 -0
  153. package/lib/misc/cheerio.d.cts +9 -0
  154. package/lib/misc/cheerio.d.mts +9 -0
  155. package/lib/misc/cheerio.d.ts +1 -1
  156. package/lib/misc/compare-dirs.d.cts +11 -0
  157. package/lib/misc/compare-dirs.d.mts +11 -0
  158. package/lib/misc/compare-dirs.d.ts +1 -1
  159. package/lib/misc/exec.d.cts +12 -0
  160. package/lib/misc/exec.d.mts +12 -0
  161. package/lib/misc/exec.d.ts +1 -1
  162. package/lib/misc/keyword.d.cts +6 -0
  163. package/lib/misc/keyword.d.mts +6 -0
  164. package/lib/misc/scan.d.cts +33 -0
  165. package/lib/misc/scan.d.mts +33 -0
  166. package/lib/misc/scan.d.ts +1 -1
  167. package/lib/misc/write-json.d.cts +6 -0
  168. package/lib/misc/write-json.d.mts +6 -0
  169. package/lib/optimise/figma.d.cts +11 -0
  170. package/lib/optimise/figma.d.mts +11 -0
  171. package/lib/optimise/flags.d.cts +11 -0
  172. package/lib/optimise/flags.d.mts +11 -0
  173. package/lib/optimise/global-style.d.cts +11 -0
  174. package/lib/optimise/global-style.d.mts +11 -0
  175. package/lib/optimise/mask.d.cts +24 -0
  176. package/lib/optimise/mask.d.mts +24 -0
  177. package/lib/optimise/origin.d.cts +11 -0
  178. package/lib/optimise/origin.d.mts +11 -0
  179. package/lib/optimise/scale.d.cts +11 -0
  180. package/lib/optimise/scale.d.mts +11 -0
  181. package/lib/optimise/svgo.d.cts +37 -0
  182. package/lib/optimise/svgo.d.mts +37 -0
  183. package/lib/svg/analyse/error.d.cts +10 -0
  184. package/lib/svg/analyse/error.d.mts +10 -0
  185. package/lib/svg/analyse/types.d.cts +92 -0
  186. package/lib/svg/analyse/types.d.mts +92 -0
  187. package/lib/svg/analyse/types.d.ts +1 -1
  188. package/lib/svg/analyse.d.cts +15 -0
  189. package/lib/svg/analyse.d.mts +15 -0
  190. package/lib/svg/cleanup/attribs.d.cts +11 -0
  191. package/lib/svg/cleanup/attribs.d.mts +11 -0
  192. package/lib/svg/cleanup/bad-tags.d.cts +17 -0
  193. package/lib/svg/cleanup/bad-tags.d.mts +17 -0
  194. package/lib/svg/cleanup/bad-tags.d.ts +1 -1
  195. package/lib/svg/cleanup/inline-style.d.cts +11 -0
  196. package/lib/svg/cleanup/inline-style.d.mts +11 -0
  197. package/lib/svg/cleanup/root-style.d.cts +17 -0
  198. package/lib/svg/cleanup/root-style.d.mts +17 -0
  199. package/lib/svg/cleanup/root-svg.d.cts +11 -0
  200. package/lib/svg/cleanup/root-svg.d.mts +11 -0
  201. package/lib/svg/cleanup/svgo-style.d.cts +11 -0
  202. package/lib/svg/cleanup/svgo-style.d.mts +11 -0
  203. package/lib/svg/cleanup.d.cts +16 -0
  204. package/lib/svg/cleanup.d.mts +16 -0
  205. package/lib/svg/cleanup.d.ts +1 -1
  206. package/lib/svg/data/attributes.d.cts +77 -0
  207. package/lib/svg/data/attributes.d.mts +77 -0
  208. package/lib/svg/data/tags.d.cts +95 -0
  209. package/lib/svg/data/tags.d.mts +95 -0
  210. package/lib/svg/index.cjs +17 -0
  211. package/lib/svg/index.d.cts +52 -0
  212. package/lib/svg/index.d.mts +52 -0
  213. package/lib/svg/index.d.ts +5 -1
  214. package/lib/svg/index.mjs +18 -1
  215. package/lib/svg/parse-style.d.cts +58 -0
  216. package/lib/svg/parse-style.d.mts +58 -0
  217. package/lib/svg/parse-style.d.ts +1 -1
  218. package/lib/svg/parse.d.cts +30 -0
  219. package/lib/svg/parse.d.mts +30 -0
  220. package/lib/svg/parse.d.ts +1 -1
  221. package/package.json +14 -17
@@ -0,0 +1,48 @@
1
+ import { DownloadGitHubRepoOptions, DownloadGitHubRepoResult } from './github/index.mjs';
2
+ import { DownloadGitRepoOptions, DownloadGitRepoResult } from './git/index.mjs';
3
+ import { DownloadNPMPackageOptions, DownloadNPMPackageResult } from './npm/index.mjs';
4
+ import { DocumentNotModified } from './types/modified.mjs';
5
+ import { DownloadSourceType, DownloadSourceMixin } from './types/sources.mjs';
6
+ import { DownloadGitLabRepoOptions, DownloadGitLabRepoResult } from './gitlab/index.mjs';
7
+ import '../export/helpers/prepare.mjs';
8
+ import './github/types.mjs';
9
+ import './gitlab/types.mjs';
10
+
11
+ /**
12
+ * Options and result combinations
13
+ */
14
+ interface DownloadGitRepo {
15
+ options: DownloadGitRepoOptions & DownloadSourceMixin<'git'>;
16
+ result: DownloadGitRepoResult;
17
+ }
18
+ interface DownloadGitHubRepo {
19
+ options: DownloadGitHubRepoOptions & DownloadSourceMixin<'github'>;
20
+ result: DownloadGitHubRepoResult;
21
+ }
22
+ interface DownloadGitLabRepo {
23
+ options: DownloadGitLabRepoOptions & DownloadSourceMixin<'gitlab'>;
24
+ result: DownloadGitLabRepoResult;
25
+ }
26
+ interface DownloadNPMPackage {
27
+ options: DownloadNPMPackageOptions & DownloadSourceMixin<'npm'>;
28
+ result: DownloadNPMPackageResult;
29
+ }
30
+ /**
31
+ * Combinations based on type
32
+ */
33
+ type DownloadParamsMixin<T extends DownloadSourceType> = T extends 'git' ? DownloadGitRepo : T extends 'github' ? DownloadGitHubRepo : T extends 'gitlab' ? DownloadGitLabRepo : T extends 'npm' ? DownloadNPMPackage : never;
34
+ /**
35
+ * Combinations
36
+ */
37
+ type DownloadParams = DownloadGitRepo | DownloadGitHubRepo | DownloadGitLabRepo | DownloadNPMPackage;
38
+ /**
39
+ * Pick options or result from combinations
40
+ */
41
+ type DownloadOptions<T extends DownloadSourceType> = DownloadParamsMixin<T>['options'];
42
+ type DownloadResult<T extends DownloadSourceType> = Promise<DocumentNotModified | DownloadParamsMixin<T>['result']>;
43
+ declare function downloadPackage<T extends 'git'>(options: DownloadOptions<T>): DownloadResult<T>;
44
+ declare function downloadPackage<T extends 'github'>(options: DownloadOptions<T>): DownloadResult<T>;
45
+ declare function downloadPackage<T extends 'gitlab'>(options: DownloadOptions<T>): DownloadResult<T>;
46
+ declare function downloadPackage<T extends 'npm'>(options: DownloadOptions<T>): DownloadResult<T>;
47
+
48
+ export { type DownloadParams, type DownloadParamsMixin, downloadPackage };
@@ -45,4 +45,4 @@ declare function downloadPackage<T extends 'github'>(options: DownloadOptions<T>
45
45
  declare function downloadPackage<T extends 'gitlab'>(options: DownloadOptions<T>): DownloadResult<T>;
46
46
  declare function downloadPackage<T extends 'npm'>(options: DownloadOptions<T>): DownloadResult<T>;
47
47
 
48
- export { DownloadParams, DownloadParamsMixin, downloadPackage };
48
+ export { type DownloadParams, type DownloadParamsMixin, downloadPackage };
@@ -0,0 +1,30 @@
1
+ import { ExportTargetOptions } from '../../export/helpers/prepare.cjs';
2
+ import { DocumentNotModified } from '../types/modified.cjs';
3
+ import { DownloadSourceMixin } from '../types/sources.cjs';
4
+
5
+ interface IfModifiedSinceOption {
6
+ ifModifiedSince: string | true | DownloadNPMPackageResult;
7
+ }
8
+ /**
9
+ * Options for downloadNPMPackage()
10
+ */
11
+ interface DownloadNPMPackageOptions extends ExportTargetOptions, Partial<IfModifiedSinceOption> {
12
+ package: string;
13
+ tag?: string;
14
+ log?: boolean;
15
+ }
16
+ /**
17
+ * Result
18
+ */
19
+ interface DownloadNPMPackageResult extends DownloadSourceMixin<'npm'> {
20
+ rootDir: string;
21
+ contentsDir: string;
22
+ version: string;
23
+ }
24
+ /**
25
+ * Download NPM package
26
+ */
27
+ declare function downloadNPMPackage<T extends IfModifiedSinceOption & DownloadNPMPackageOptions>(options: T): Promise<DownloadNPMPackageResult | DocumentNotModified>;
28
+ declare function downloadNPMPackage(options: DownloadNPMPackageOptions): Promise<DownloadNPMPackageResult>;
29
+
30
+ export { type DownloadNPMPackageOptions, type DownloadNPMPackageResult, downloadNPMPackage };
@@ -0,0 +1,30 @@
1
+ import { ExportTargetOptions } from '../../export/helpers/prepare.mjs';
2
+ import { DocumentNotModified } from '../types/modified.mjs';
3
+ import { DownloadSourceMixin } from '../types/sources.mjs';
4
+
5
+ interface IfModifiedSinceOption {
6
+ ifModifiedSince: string | true | DownloadNPMPackageResult;
7
+ }
8
+ /**
9
+ * Options for downloadNPMPackage()
10
+ */
11
+ interface DownloadNPMPackageOptions extends ExportTargetOptions, Partial<IfModifiedSinceOption> {
12
+ package: string;
13
+ tag?: string;
14
+ log?: boolean;
15
+ }
16
+ /**
17
+ * Result
18
+ */
19
+ interface DownloadNPMPackageResult extends DownloadSourceMixin<'npm'> {
20
+ rootDir: string;
21
+ contentsDir: string;
22
+ version: string;
23
+ }
24
+ /**
25
+ * Download NPM package
26
+ */
27
+ declare function downloadNPMPackage<T extends IfModifiedSinceOption & DownloadNPMPackageOptions>(options: T): Promise<DownloadNPMPackageResult | DocumentNotModified>;
28
+ declare function downloadNPMPackage(options: DownloadNPMPackageOptions): Promise<DownloadNPMPackageResult>;
29
+
30
+ export { type DownloadNPMPackageOptions, type DownloadNPMPackageResult, downloadNPMPackage };
@@ -27,4 +27,4 @@ interface DownloadNPMPackageResult extends DownloadSourceMixin<'npm'> {
27
27
  declare function downloadNPMPackage<T extends IfModifiedSinceOption & DownloadNPMPackageOptions>(options: T): Promise<DownloadNPMPackageResult | DocumentNotModified>;
28
28
  declare function downloadNPMPackage(options: DownloadNPMPackageOptions): Promise<DownloadNPMPackageResult>;
29
29
 
30
- export { DownloadNPMPackageOptions, DownloadNPMPackageResult, downloadNPMPackage };
30
+ export { type DownloadNPMPackageOptions, type DownloadNPMPackageResult, downloadNPMPackage };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Package options
3
+ */
4
+ interface NPMPackageOptions {
5
+ package: string;
6
+ tag?: string;
7
+ }
8
+
9
+ export type { NPMPackageOptions };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Package options
3
+ */
4
+ interface NPMPackageOptions {
5
+ package: string;
6
+ tag?: string;
7
+ }
8
+
9
+ export type { NPMPackageOptions };
@@ -6,4 +6,4 @@ interface NPMPackageOptions {
6
6
  tag?: string;
7
7
  }
8
8
 
9
- export { NPMPackageOptions };
9
+ export type { NPMPackageOptions };
@@ -0,0 +1,16 @@
1
+ import { NPMPackageOptions } from './types.cjs';
2
+
3
+ interface GetNPMVersionResult {
4
+ version: string;
5
+ file?: string;
6
+ }
7
+ /**
8
+ * Get version of package from NPM registry
9
+ */
10
+ declare function getNPMVersion(options: NPMPackageOptions): Promise<GetNPMVersionResult>;
11
+ /**
12
+ * Get version of package from filename
13
+ */
14
+ declare function getPackageVersion(target: string): Promise<string>;
15
+
16
+ export { type GetNPMVersionResult, getNPMVersion, getPackageVersion };
@@ -0,0 +1,16 @@
1
+ import { NPMPackageOptions } from './types.mjs';
2
+
3
+ interface GetNPMVersionResult {
4
+ version: string;
5
+ file?: string;
6
+ }
7
+ /**
8
+ * Get version of package from NPM registry
9
+ */
10
+ declare function getNPMVersion(options: NPMPackageOptions): Promise<GetNPMVersionResult>;
11
+ /**
12
+ * Get version of package from filename
13
+ */
14
+ declare function getPackageVersion(target: string): Promise<string>;
15
+
16
+ export { type GetNPMVersionResult, getNPMVersion, getPackageVersion };
@@ -13,4 +13,4 @@ declare function getNPMVersion(options: NPMPackageOptions): Promise<GetNPMVersio
13
13
  */
14
14
  declare function getPackageVersion(target: string): Promise<string>;
15
15
 
16
- export { GetNPMVersionResult, getNPMVersion, getPackageVersion };
16
+ export { type GetNPMVersionResult, getNPMVersion, getPackageVersion };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Document wasn't modified
3
+ */
4
+ type DocumentNotModified = 'not_modified';
5
+
6
+ export type { DocumentNotModified };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Document wasn't modified
3
+ */
4
+ type DocumentNotModified = 'not_modified';
5
+
6
+ export type { DocumentNotModified };
@@ -3,4 +3,4 @@
3
3
  */
4
4
  type DocumentNotModified = 'not_modified';
5
5
 
6
- export { DocumentNotModified };
6
+ export type { DocumentNotModified };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Download types
3
+ */
4
+ type DownloadSourceType = 'git' | 'github' | 'gitlab' | 'npm';
5
+ /**
6
+ * Type in other objects
7
+ */
8
+ interface DownloadSourceMixin<T extends DownloadSourceType> {
9
+ downloadType: T;
10
+ }
11
+
12
+ export type { DownloadSourceMixin, DownloadSourceType };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Download types
3
+ */
4
+ type DownloadSourceType = 'git' | 'github' | 'gitlab' | 'npm';
5
+ /**
6
+ * Type in other objects
7
+ */
8
+ interface DownloadSourceMixin<T extends DownloadSourceType> {
9
+ downloadType: T;
10
+ }
11
+
12
+ export type { DownloadSourceMixin, DownloadSourceType };
@@ -9,4 +9,4 @@ interface DownloadSourceMixin<T extends DownloadSourceType> {
9
9
  downloadType: T;
10
10
  }
11
11
 
12
- export { DownloadSourceMixin, DownloadSourceType };
12
+ export type { DownloadSourceMixin, DownloadSourceType };
@@ -0,0 +1,26 @@
1
+ import { IconSet } from '../icon-set/index.cjs';
2
+ import { ExportTargetOptions } from './helpers/prepare.cjs';
3
+ import '@iconify/types';
4
+ import '@iconify/utils/lib/customisations/defaults';
5
+ import '../icon-set/types.cjs';
6
+ import '../svg/index.cjs';
7
+ import 'cheerio';
8
+ import '@iconify/utils/lib/icon-set/tree';
9
+
10
+ /**
11
+ * Options
12
+ */
13
+ interface ExportToDirectoryOptions extends ExportTargetOptions {
14
+ autoHeight?: boolean;
15
+ includeAliases?: boolean;
16
+ includeChars?: boolean;
17
+ log?: boolean;
18
+ }
19
+ /**
20
+ * Export icon set to directory
21
+ *
22
+ * Returns list of stored files
23
+ */
24
+ declare function exportToDirectory(iconSet: IconSet, options: ExportToDirectoryOptions): Promise<string[]>;
25
+
26
+ export { type ExportToDirectoryOptions, exportToDirectory };
@@ -0,0 +1,26 @@
1
+ import { IconSet } from '../icon-set/index.mjs';
2
+ import { ExportTargetOptions } from './helpers/prepare.mjs';
3
+ import '@iconify/types';
4
+ import '@iconify/utils/lib/customisations/defaults';
5
+ import '../icon-set/types.mjs';
6
+ import '../svg/index.mjs';
7
+ import 'cheerio';
8
+ import '@iconify/utils/lib/icon-set/tree';
9
+
10
+ /**
11
+ * Options
12
+ */
13
+ interface ExportToDirectoryOptions extends ExportTargetOptions {
14
+ autoHeight?: boolean;
15
+ includeAliases?: boolean;
16
+ includeChars?: boolean;
17
+ log?: boolean;
18
+ }
19
+ /**
20
+ * Export icon set to directory
21
+ *
22
+ * Returns list of stored files
23
+ */
24
+ declare function exportToDirectory(iconSet: IconSet, options: ExportToDirectoryOptions): Promise<string[]>;
25
+
26
+ export { type ExportToDirectoryOptions, exportToDirectory };
@@ -23,4 +23,4 @@ interface ExportToDirectoryOptions extends ExportTargetOptions {
23
23
  */
24
24
  declare function exportToDirectory(iconSet: IconSet, options: ExportToDirectoryOptions): Promise<string[]>;
25
25
 
26
- export { ExportToDirectoryOptions, exportToDirectory };
26
+ export { type ExportToDirectoryOptions, exportToDirectory };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Options
3
+ */
4
+ interface ExportOptionsWithCustomFiles {
5
+ customFiles?: Record<string, string | Record<string, unknown> | null>;
6
+ }
7
+ /**
8
+ * Write custom files
9
+ */
10
+ declare function exportCustomFiles(dir: string, options: ExportOptionsWithCustomFiles, result?: Set<string>): Promise<void>;
11
+
12
+ export { type ExportOptionsWithCustomFiles, exportCustomFiles };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Options
3
+ */
4
+ interface ExportOptionsWithCustomFiles {
5
+ customFiles?: Record<string, string | Record<string, unknown> | null>;
6
+ }
7
+ /**
8
+ * Write custom files
9
+ */
10
+ declare function exportCustomFiles(dir: string, options: ExportOptionsWithCustomFiles, result?: Set<string>): Promise<void>;
11
+
12
+ export { type ExportOptionsWithCustomFiles, exportCustomFiles };
@@ -9,4 +9,4 @@ interface ExportOptionsWithCustomFiles {
9
9
  */
10
10
  declare function exportCustomFiles(dir: string, options: ExportOptionsWithCustomFiles, result?: Set<string>): Promise<void>;
11
11
 
12
- export { ExportOptionsWithCustomFiles, exportCustomFiles };
12
+ export { type ExportOptionsWithCustomFiles, exportCustomFiles };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Common options for all functions that export to directory
3
+ */
4
+ interface ExportTargetOptions {
5
+ target: string;
6
+ cleanup?: boolean;
7
+ }
8
+ /**
9
+ * Normalize directory
10
+ */
11
+ declare function normalizeDir(dir: string): string;
12
+ /**
13
+ * Prepare directory for export
14
+ *
15
+ * Also normalizes directory and returns normalized value
16
+ */
17
+ declare function prepareDirectoryForExport(options: ExportTargetOptions): Promise<string>;
18
+
19
+ export { type ExportTargetOptions, normalizeDir, prepareDirectoryForExport };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Common options for all functions that export to directory
3
+ */
4
+ interface ExportTargetOptions {
5
+ target: string;
6
+ cleanup?: boolean;
7
+ }
8
+ /**
9
+ * Normalize directory
10
+ */
11
+ declare function normalizeDir(dir: string): string;
12
+ /**
13
+ * Prepare directory for export
14
+ *
15
+ * Also normalizes directory and returns normalized value
16
+ */
17
+ declare function prepareDirectoryForExport(options: ExportTargetOptions): Promise<string>;
18
+
19
+ export { type ExportTargetOptions, normalizeDir, prepareDirectoryForExport };
@@ -16,4 +16,4 @@ declare function normalizeDir(dir: string): string;
16
16
  */
17
17
  declare function prepareDirectoryForExport(options: ExportTargetOptions): Promise<string>;
18
18
 
19
- export { ExportTargetOptions, normalizeDir, prepareDirectoryForExport };
19
+ export { type ExportTargetOptions, normalizeDir, prepareDirectoryForExport };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get current version of Iconify Types package
3
+ */
4
+ declare function getTypesVersion(): Promise<string>;
5
+
6
+ export { getTypesVersion };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get current version of Iconify Types package
3
+ */
4
+ declare function getTypesVersion(): Promise<string>;
5
+
6
+ export { getTypesVersion };
@@ -0,0 +1,26 @@
1
+ import { IconSet } from '../icon-set/index.cjs';
2
+ import { ExportTargetOptions } from './helpers/prepare.cjs';
3
+ import { ExportOptionsWithCustomFiles } from './helpers/custom-files.cjs';
4
+ import '@iconify/types';
5
+ import '@iconify/utils/lib/customisations/defaults';
6
+ import '../icon-set/types.cjs';
7
+ import '../svg/index.cjs';
8
+ import 'cheerio';
9
+ import '@iconify/utils/lib/icon-set/tree';
10
+
11
+ /**
12
+ * Options
13
+ */
14
+ interface ExportIconPackageOptions extends ExportTargetOptions, ExportOptionsWithCustomFiles {
15
+ package?: Record<string, unknown>;
16
+ module?: boolean;
17
+ typesContent?: string;
18
+ }
19
+ /**
20
+ * Export icon set as single icon packages
21
+ *
22
+ * Was used for exporting `@iconify-icons/{prefix}` packages
23
+ */
24
+ declare function exportIconPackage(iconSet: IconSet, options: ExportIconPackageOptions): Promise<string[]>;
25
+
26
+ export { type ExportIconPackageOptions, exportIconPackage };
@@ -0,0 +1,26 @@
1
+ import { IconSet } from '../icon-set/index.mjs';
2
+ import { ExportTargetOptions } from './helpers/prepare.mjs';
3
+ import { ExportOptionsWithCustomFiles } from './helpers/custom-files.mjs';
4
+ import '@iconify/types';
5
+ import '@iconify/utils/lib/customisations/defaults';
6
+ import '../icon-set/types.mjs';
7
+ import '../svg/index.mjs';
8
+ import 'cheerio';
9
+ import '@iconify/utils/lib/icon-set/tree';
10
+
11
+ /**
12
+ * Options
13
+ */
14
+ interface ExportIconPackageOptions extends ExportTargetOptions, ExportOptionsWithCustomFiles {
15
+ package?: Record<string, unknown>;
16
+ module?: boolean;
17
+ typesContent?: string;
18
+ }
19
+ /**
20
+ * Export icon set as single icon packages
21
+ *
22
+ * Was used for exporting `@iconify-icons/{prefix}` packages
23
+ */
24
+ declare function exportIconPackage(iconSet: IconSet, options: ExportIconPackageOptions): Promise<string[]>;
25
+
26
+ export { type ExportIconPackageOptions, exportIconPackage };
@@ -20,9 +20,7 @@ interface ExportIconPackageOptions extends ExportTargetOptions, ExportOptionsWit
20
20
  * Export icon set as single icon packages
21
21
  *
22
22
  * Was used for exporting `@iconify-icons/{prefix}` packages
23
- *
24
- * @deprecated Packages with single icons are no longer maintained.
25
23
  */
26
24
  declare function exportIconPackage(iconSet: IconSet, options: ExportIconPackageOptions): Promise<string[]>;
27
25
 
28
- export { ExportIconPackageOptions, exportIconPackage };
26
+ export { type ExportIconPackageOptions, exportIconPackage };
@@ -0,0 +1,25 @@
1
+ import { IconSet } from '../icon-set/index.cjs';
2
+ import { ExportTargetOptions } from './helpers/prepare.cjs';
3
+ import { ExportOptionsWithCustomFiles } from './helpers/custom-files.cjs';
4
+ import '@iconify/types';
5
+ import '@iconify/utils/lib/customisations/defaults';
6
+ import '../icon-set/types.cjs';
7
+ import '../svg/index.cjs';
8
+ import 'cheerio';
9
+ import '@iconify/utils/lib/icon-set/tree';
10
+
11
+ /**
12
+ * Options
13
+ */
14
+ interface ExportJSONPackageOptions extends ExportTargetOptions, ExportOptionsWithCustomFiles {
15
+ package?: Record<string, unknown>;
16
+ customisePackage?: (contents: Record<string, unknown>) => void;
17
+ }
18
+ /**
19
+ * Export icon set as JSON package
20
+ *
21
+ * Used for exporting `@iconify-json/{prefix}` packages
22
+ */
23
+ declare function exportJSONPackage(iconSet: IconSet, options: ExportJSONPackageOptions): Promise<string[]>;
24
+
25
+ export { type ExportJSONPackageOptions, exportJSONPackage };
@@ -0,0 +1,25 @@
1
+ import { IconSet } from '../icon-set/index.mjs';
2
+ import { ExportTargetOptions } from './helpers/prepare.mjs';
3
+ import { ExportOptionsWithCustomFiles } from './helpers/custom-files.mjs';
4
+ import '@iconify/types';
5
+ import '@iconify/utils/lib/customisations/defaults';
6
+ import '../icon-set/types.mjs';
7
+ import '../svg/index.mjs';
8
+ import 'cheerio';
9
+ import '@iconify/utils/lib/icon-set/tree';
10
+
11
+ /**
12
+ * Options
13
+ */
14
+ interface ExportJSONPackageOptions extends ExportTargetOptions, ExportOptionsWithCustomFiles {
15
+ package?: Record<string, unknown>;
16
+ customisePackage?: (contents: Record<string, unknown>) => void;
17
+ }
18
+ /**
19
+ * Export icon set as JSON package
20
+ *
21
+ * Used for exporting `@iconify-json/{prefix}` packages
22
+ */
23
+ declare function exportJSONPackage(iconSet: IconSet, options: ExportJSONPackageOptions): Promise<string[]>;
24
+
25
+ export { type ExportJSONPackageOptions, exportJSONPackage };
@@ -22,4 +22,4 @@ interface ExportJSONPackageOptions extends ExportTargetOptions, ExportOptionsWit
22
22
  */
23
23
  declare function exportJSONPackage(iconSet: IconSet, options: ExportJSONPackageOptions): Promise<string[]>;
24
24
 
25
- export { ExportJSONPackageOptions, exportJSONPackage };
25
+ export { type ExportJSONPackageOptions, exportJSONPackage };
@@ -10,6 +10,12 @@ const utils = require('@iconify/utils');
10
10
  require('@iconify/utils/lib/misc/objects');
11
11
  require('cheerio');
12
12
 
13
+ var __defProp = Object.defineProperty;
14
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15
+ var __publicField = (obj, key, value) => {
16
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
17
+ return value;
18
+ };
13
19
  const themeKeys = ["prefixes", "suffixes"];
14
20
  function sortThemeKeys(keys) {
15
21
  return keys.sort(
@@ -21,6 +27,22 @@ class IconSet {
21
27
  * Load icon set
22
28
  */
23
29
  constructor(data) {
30
+ /**
31
+ * Properties. You can write directly to almost any property, but avoid writing to
32
+ * 'entries' and 'categories' properties, there are functions for that.
33
+ */
34
+ // Icon set prefix
35
+ __publicField(this, "prefix");
36
+ // Last modification time
37
+ __publicField(this, "lastModified");
38
+ // All icons
39
+ __publicField(this, "entries");
40
+ // Information block
41
+ __publicField(this, "info");
42
+ // Categories, using custom type. Use functions to update data
43
+ __publicField(this, "categories");
44
+ __publicField(this, "prefixes");
45
+ __publicField(this, "suffixes");
24
46
  this.load(data);
25
47
  }
26
48
  /**