@iconify/tools 3.0.1 → 3.0.3
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/lib/export/json-package.cjs +1 -0
- package/lib/export/json-package.mjs +1 -0
- package/lib/import/directory.cjs +26 -18
- package/lib/import/directory.mjs +26 -18
- package/lib/misc/keyword.cjs +1 -1
- package/lib/misc/keyword.mjs +1 -1
- package/license.txt +1 -1
- package/package.json +17 -17
- package/lib/colors/attribs.d.ts +0 -27
- package/lib/colors/detect.d.ts +0 -15
- package/lib/colors/parse.d.ts +0 -67
- package/lib/colors/validate.d.ts +0 -26
- package/lib/css/parse.d.ts +0 -6
- package/lib/css/parser/error.d.ts +0 -13
- package/lib/css/parser/export.d.ts +0 -8
- package/lib/css/parser/strings.d.ts +0 -16
- package/lib/css/parser/text.d.ts +0 -20
- package/lib/css/parser/tokens.d.ts +0 -9
- package/lib/css/parser/tree.d.ts +0 -8
- package/lib/css/parser/types.d.ts +0 -52
- package/lib/download/api/cache.d.ts +0 -20
- package/lib/download/api/download.d.ts +0 -8
- package/lib/download/api/index.d.ts +0 -8
- package/lib/download/api/types.d.ts +0 -17
- package/lib/download/git/branch.d.ts +0 -8
- package/lib/download/git/hash.d.ts +0 -8
- package/lib/download/git/index.d.ts +0 -29
- package/lib/download/git/reset.d.ts +0 -6
- package/lib/download/github/hash.d.ts +0 -8
- package/lib/download/github/index.d.ts +0 -31
- package/lib/download/github/types.d.ts +0 -11
- package/lib/download/gitlab/hash.d.ts +0 -8
- package/lib/download/gitlab/index.d.ts +0 -31
- package/lib/download/gitlab/types.d.ts +0 -15
- package/lib/download/helpers/untar.d.ts +0 -6
- package/lib/download/helpers/unzip.d.ts +0 -6
- package/lib/download/index.d.ts +0 -48
- package/lib/download/npm/index.d.ts +0 -30
- package/lib/download/npm/types.d.ts +0 -9
- package/lib/download/npm/version.d.ts +0 -16
- package/lib/download/types/modified.d.ts +0 -6
- package/lib/download/types/sources.d.ts +0 -12
- package/lib/export/directory.d.ts +0 -25
- package/lib/export/helpers/custom-files.d.ts +0 -12
- package/lib/export/helpers/prepare.d.ts +0 -19
- package/lib/export/helpers/types-version.d.ts +0 -6
- package/lib/export/icon-package.d.ts +0 -25
- package/lib/export/json-package.d.ts +0 -23
- package/lib/icon-set/index.d.ts +0 -161
- package/lib/icon-set/match.d.ts +0 -14
- package/lib/icon-set/merge.d.ts +0 -13
- package/lib/icon-set/modified.d.ts +0 -15
- package/lib/icon-set/props.d.ts +0 -13
- package/lib/icon-set/tags.d.ts +0 -22
- package/lib/icon-set/types.d.ts +0 -75
- package/lib/import/directory.d.ts +0 -51
- package/lib/import/figma/index.d.ts +0 -19
- package/lib/import/figma/nodes.d.ts +0 -17
- package/lib/import/figma/query.d.ts +0 -28
- package/lib/import/figma/types/api.d.ts +0 -53
- package/lib/import/figma/types/nodes.d.ts +0 -43
- package/lib/import/figma/types/options.d.ts +0 -58
- package/lib/import/figma/types/result.d.ts +0 -43
- package/lib/index.d.ts +0 -72
- package/lib/misc/bump-version.d.ts +0 -6
- package/lib/misc/cheerio.d.ts +0 -7
- package/lib/misc/compare-dirs.d.ts +0 -11
- package/lib/misc/exec.d.ts +0 -12
- package/lib/misc/keyword.d.ts +0 -6
- package/lib/misc/scan.d.ts +0 -33
- package/lib/misc/write-json.d.ts +0 -6
- package/lib/optimise/flags.d.ts +0 -10
- package/lib/optimise/global-style.d.ts +0 -10
- package/lib/optimise/origin.d.ts +0 -10
- package/lib/optimise/scale.d.ts +0 -10
- package/lib/optimise/svgo.d.ts +0 -36
- package/lib/svg/analyse/error.d.ts +0 -8
- package/lib/svg/analyse/types.d.ts +0 -89
- package/lib/svg/analyse.d.ts +0 -13
- package/lib/svg/cleanup/attribs.d.ts +0 -10
- package/lib/svg/cleanup/bad-tags.d.ts +0 -16
- package/lib/svg/cleanup/inline-style.d.ts +0 -10
- package/lib/svg/cleanup/root-style.d.ts +0 -16
- package/lib/svg/cleanup/root-svg.d.ts +0 -10
- package/lib/svg/cleanup/svgo-style.d.ts +0 -10
- package/lib/svg/cleanup.d.ts +0 -15
- package/lib/svg/data/attributes.d.ts +0 -77
- package/lib/svg/data/tags.d.ts +0 -95
- package/lib/svg/index.d.ts +0 -47
- package/lib/svg/parse-style.d.ts +0 -63
- package/lib/svg/parse.d.ts +0 -36
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ExportTargetOptions } from '../../export/helpers/prepare.js';
|
|
2
|
-
import { DocumentNotModified } from '../types/modified.js';
|
|
3
|
-
import { GitHubAPIOptions } from './types.js';
|
|
4
|
-
import { DownloadSourceMixin } from '../types/sources.js';
|
|
5
|
-
|
|
6
|
-
interface IfModifiedSinceOption {
|
|
7
|
-
ifModifiedSince: string | DownloadGitHubRepoResult;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Options for downloadGitHubRepo()
|
|
11
|
-
*/
|
|
12
|
-
interface DownloadGitHubRepoOptions extends ExportTargetOptions, GitHubAPIOptions, Partial<IfModifiedSinceOption> {
|
|
13
|
-
cleanupOldFiles?: boolean;
|
|
14
|
-
cleanupOldDirectories?: boolean;
|
|
15
|
-
log?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Result
|
|
19
|
-
*/
|
|
20
|
-
interface DownloadGitHubRepoResult extends DownloadSourceMixin<'github'> {
|
|
21
|
-
rootDir: string;
|
|
22
|
-
contentsDir: string;
|
|
23
|
-
hash: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Download GitHub repo using API
|
|
27
|
-
*/
|
|
28
|
-
declare function downloadGitHubRepo<T extends IfModifiedSinceOption & DownloadGitHubRepoOptions>(options: T): Promise<DownloadGitHubRepoResult | DocumentNotModified>;
|
|
29
|
-
declare function downloadGitHubRepo(options: DownloadGitHubRepoOptions): Promise<DownloadGitHubRepoResult>;
|
|
30
|
-
|
|
31
|
-
export { DownloadGitHubRepoOptions, DownloadGitHubRepoResult, downloadGitHubRepo };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ExportTargetOptions } from '../../export/helpers/prepare.js';
|
|
2
|
-
import { DocumentNotModified } from '../types/modified.js';
|
|
3
|
-
import { GitLabAPIOptions } from './types.js';
|
|
4
|
-
import { DownloadSourceMixin } from '../types/sources.js';
|
|
5
|
-
|
|
6
|
-
interface IfModifiedSinceOption {
|
|
7
|
-
ifModifiedSince: string | DownloadGitLabRepoResult;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Options for downloadGitLabRepo()
|
|
11
|
-
*/
|
|
12
|
-
interface DownloadGitLabRepoOptions extends ExportTargetOptions, GitLabAPIOptions, Partial<IfModifiedSinceOption> {
|
|
13
|
-
cleanupOldFiles?: boolean;
|
|
14
|
-
cleanupOldDirectories?: boolean;
|
|
15
|
-
log?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Result
|
|
19
|
-
*/
|
|
20
|
-
interface DownloadGitLabRepoResult extends DownloadSourceMixin<'gitlab'> {
|
|
21
|
-
rootDir: string;
|
|
22
|
-
contentsDir: string;
|
|
23
|
-
hash: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Download GitLab repo using API
|
|
27
|
-
*/
|
|
28
|
-
declare function downloadGitLabRepo<T extends IfModifiedSinceOption & DownloadGitLabRepoOptions>(options: T): Promise<DownloadGitLabRepoResult | DocumentNotModified>;
|
|
29
|
-
declare function downloadGitLabRepo(options: DownloadGitLabRepoOptions): Promise<DownloadGitLabRepoResult>;
|
|
30
|
-
|
|
31
|
-
export { DownloadGitLabRepoOptions, DownloadGitLabRepoResult, downloadGitLabRepo };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API options
|
|
3
|
-
*/
|
|
4
|
-
interface GitLabAPIOptions {
|
|
5
|
-
uri?: string;
|
|
6
|
-
token: string;
|
|
7
|
-
project: string;
|
|
8
|
-
branch: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Default base URI for GitLab API
|
|
12
|
-
*/
|
|
13
|
-
declare const defaultGitLabBaseURI = "https://gitlab.com/api/v4/projects";
|
|
14
|
-
|
|
15
|
-
export { GitLabAPIOptions, defaultGitLabBaseURI };
|
package/lib/download/index.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DownloadGitHubRepoOptions, DownloadGitHubRepoResult } from './github/index.js';
|
|
2
|
-
import { DownloadGitRepoOptions, DownloadGitRepoResult } from './git/index.js';
|
|
3
|
-
import { DownloadNPMPackageOptions, DownloadNPMPackageResult } from './npm/index.js';
|
|
4
|
-
import { DocumentNotModified } from './types/modified.js';
|
|
5
|
-
import { DownloadSourceType, DownloadSourceMixin } from './types/sources.js';
|
|
6
|
-
import { DownloadGitLabRepoOptions, DownloadGitLabRepoResult } from './gitlab/index.js';
|
|
7
|
-
import '../export/helpers/prepare.js';
|
|
8
|
-
import './github/types.js';
|
|
9
|
-
import './gitlab/types.js';
|
|
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 { DownloadParams, DownloadParamsMixin, downloadPackage };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ExportTargetOptions } from '../../export/helpers/prepare.js';
|
|
2
|
-
import { DocumentNotModified } from '../types/modified.js';
|
|
3
|
-
import { DownloadSourceMixin } from '../types/sources.js';
|
|
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 { DownloadNPMPackageOptions, DownloadNPMPackageResult, downloadNPMPackage };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NPMPackageOptions } from './types.js';
|
|
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 { GetNPMVersionResult, getNPMVersion, getPackageVersion };
|
|
@@ -1,12 +0,0 @@
|
|
|
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 { DownloadSourceMixin, DownloadSourceType };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { IconSet } from '../icon-set/index.js';
|
|
2
|
-
import { ExportTargetOptions } from './helpers/prepare.js';
|
|
3
|
-
import '@iconify/types';
|
|
4
|
-
import '@iconify/utils/lib/customisations/defaults';
|
|
5
|
-
import '../icon-set/types.js';
|
|
6
|
-
import '../svg/index.js';
|
|
7
|
-
import '@iconify/utils/lib/icon-set/tree';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Options
|
|
11
|
-
*/
|
|
12
|
-
interface ExportToDirectoryOptions extends ExportTargetOptions {
|
|
13
|
-
autoHeight?: boolean;
|
|
14
|
-
includeAliases?: boolean;
|
|
15
|
-
includeChars?: boolean;
|
|
16
|
-
log?: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Export icon set to directory
|
|
20
|
-
*
|
|
21
|
-
* Returns list of stored files
|
|
22
|
-
*/
|
|
23
|
-
declare function exportToDirectory(iconSet: IconSet, options: ExportToDirectoryOptions): Promise<string[]>;
|
|
24
|
-
|
|
25
|
-
export { ExportToDirectoryOptions, exportToDirectory };
|
|
@@ -1,12 +0,0 @@
|
|
|
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 { ExportOptionsWithCustomFiles, exportCustomFiles };
|
|
@@ -1,19 +0,0 @@
|
|
|
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 { ExportTargetOptions, normalizeDir, prepareDirectoryForExport };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { IconSet } from '../icon-set/index.js';
|
|
2
|
-
import { ExportTargetOptions } from './helpers/prepare.js';
|
|
3
|
-
import { ExportOptionsWithCustomFiles } from './helpers/custom-files.js';
|
|
4
|
-
import '@iconify/types';
|
|
5
|
-
import '@iconify/utils/lib/customisations/defaults';
|
|
6
|
-
import '../icon-set/types.js';
|
|
7
|
-
import '../svg/index.js';
|
|
8
|
-
import '@iconify/utils/lib/icon-set/tree';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Options
|
|
12
|
-
*/
|
|
13
|
-
interface ExportIconPackageOptions extends ExportTargetOptions, ExportOptionsWithCustomFiles {
|
|
14
|
-
package?: Record<string, unknown>;
|
|
15
|
-
module?: boolean;
|
|
16
|
-
typesContent?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Export icon set as single icon packages
|
|
20
|
-
*
|
|
21
|
-
* Used for exporting `@iconify-icons/{prefix}` packages
|
|
22
|
-
*/
|
|
23
|
-
declare function exportIconPackage(iconSet: IconSet, options: ExportIconPackageOptions): Promise<string[]>;
|
|
24
|
-
|
|
25
|
-
export { ExportIconPackageOptions, exportIconPackage };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IconSet } from '../icon-set/index.js';
|
|
2
|
-
import { ExportTargetOptions } from './helpers/prepare.js';
|
|
3
|
-
import { ExportOptionsWithCustomFiles } from './helpers/custom-files.js';
|
|
4
|
-
import '@iconify/types';
|
|
5
|
-
import '@iconify/utils/lib/customisations/defaults';
|
|
6
|
-
import '../icon-set/types.js';
|
|
7
|
-
import '../svg/index.js';
|
|
8
|
-
import '@iconify/utils/lib/icon-set/tree';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Options
|
|
12
|
-
*/
|
|
13
|
-
interface ExportJSONPackageOptions extends ExportTargetOptions, ExportOptionsWithCustomFiles {
|
|
14
|
-
package?: Record<string, unknown>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Export icon set as JSON package
|
|
18
|
-
*
|
|
19
|
-
* Used for exporting `@iconify-json/{prefix}` packages
|
|
20
|
-
*/
|
|
21
|
-
declare function exportJSONPackage(iconSet: IconSet, options: ExportJSONPackageOptions): Promise<string[]>;
|
|
22
|
-
|
|
23
|
-
export { ExportJSONPackageOptions, exportJSONPackage };
|
package/lib/icon-set/index.d.ts
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { IconifyInfo, IconifyJSON } from '@iconify/types';
|
|
2
|
-
import { IconifyIconCustomisations } from '@iconify/utils/lib/customisations/defaults';
|
|
3
|
-
import { IconSetIconEntry, IconCategory, IconSetIconType, IconSetAsyncForEachCallback, IconSetSyncForEachCallback, ResolvedIconifyIcon, CommonIconProps, CheckThemeResult } from './types.js';
|
|
4
|
-
import { SVG } from '../svg/index.js';
|
|
5
|
-
import { ParentIconsTree } from '@iconify/utils/lib/icon-set/tree';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Sort theme keys: long keys first
|
|
9
|
-
*
|
|
10
|
-
* Applies changes to parameter, but also returns it
|
|
11
|
-
*/
|
|
12
|
-
declare function sortThemeKeys(keys: string[]): string[];
|
|
13
|
-
/**
|
|
14
|
-
* Export icon set
|
|
15
|
-
*/
|
|
16
|
-
declare class IconSet {
|
|
17
|
-
/**
|
|
18
|
-
* Properties. You can write directly to almost any property, but avoid writing to
|
|
19
|
-
* 'entries' and 'categories' properties, there are functions for that.
|
|
20
|
-
*/
|
|
21
|
-
prefix: string;
|
|
22
|
-
lastModified: number;
|
|
23
|
-
entries: Record<string, IconSetIconEntry>;
|
|
24
|
-
info: IconifyInfo | undefined;
|
|
25
|
-
categories: Set<IconCategory>;
|
|
26
|
-
prefixes: Record<string, string>;
|
|
27
|
-
suffixes: Record<string, string>;
|
|
28
|
-
/**
|
|
29
|
-
* Load icon set
|
|
30
|
-
*/
|
|
31
|
-
constructor(data: IconifyJSON);
|
|
32
|
-
/**
|
|
33
|
-
* Load icon set
|
|
34
|
-
*/
|
|
35
|
-
load(data: IconifyJSON): void;
|
|
36
|
-
/**
|
|
37
|
-
* Update last modification time
|
|
38
|
-
*/
|
|
39
|
-
updateLastModified(value?: number): void;
|
|
40
|
-
/**
|
|
41
|
-
* List icons
|
|
42
|
-
*/
|
|
43
|
-
list(types?: IconSetIconType[]): string[];
|
|
44
|
-
/**
|
|
45
|
-
* forEach function to loop through all entries.
|
|
46
|
-
* Supports asynchronous callbacks.
|
|
47
|
-
*
|
|
48
|
-
* Callback should return false to stop loop.
|
|
49
|
-
*/
|
|
50
|
-
forEach(callback: IconSetAsyncForEachCallback, types?: IconSetIconType[]): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Synchronous version of forEach function to loop through all entries.
|
|
53
|
-
*
|
|
54
|
-
* Callback should return false to stop loop.
|
|
55
|
-
*/
|
|
56
|
-
forEachSync(callback: IconSetSyncForEachCallback, types?: IconSetIconType[]): void;
|
|
57
|
-
/**
|
|
58
|
-
* Get parent icons tree
|
|
59
|
-
*
|
|
60
|
-
* Returns parent icons list for each icon, null if failed to resolve.
|
|
61
|
-
* In parent icons list, first element is a direct parent, last is icon. Does not include item.
|
|
62
|
-
*
|
|
63
|
-
* Examples:
|
|
64
|
-
* 'alias3': ['alias2', 'alias1', 'icon']
|
|
65
|
-
* 'icon': []
|
|
66
|
-
* 'bad-icon': null
|
|
67
|
-
*/
|
|
68
|
-
getTree(names?: string[]): ParentIconsTree;
|
|
69
|
-
/**
|
|
70
|
-
* Resolve icon
|
|
71
|
-
*/
|
|
72
|
-
resolve(name: string, full: false): ResolvedIconifyIcon | null;
|
|
73
|
-
resolve(name: string): ResolvedIconifyIcon | null;
|
|
74
|
-
resolve(name: string, full: true): Required<ResolvedIconifyIcon> | null;
|
|
75
|
-
/**
|
|
76
|
-
* Generate HTML
|
|
77
|
-
*/
|
|
78
|
-
toString(name: string, customisations?: IconifyIconCustomisations): string | null;
|
|
79
|
-
/**
|
|
80
|
-
* Get SVG instance for icon
|
|
81
|
-
*/
|
|
82
|
-
toSVG(name: string): SVG | null;
|
|
83
|
-
/**
|
|
84
|
-
* Export icon set
|
|
85
|
-
*/
|
|
86
|
-
export(validate?: boolean): IconifyJSON;
|
|
87
|
-
/**
|
|
88
|
-
* Get characters map
|
|
89
|
-
*/
|
|
90
|
-
chars(names?: string[]): Record<string, string>;
|
|
91
|
-
/**
|
|
92
|
-
* Filter icons
|
|
93
|
-
*/
|
|
94
|
-
_filter(callback: (name: string, item: IconSetIconEntry, icon?: ResolvedIconifyIcon) => boolean): string[];
|
|
95
|
-
/**
|
|
96
|
-
* Count icons
|
|
97
|
-
*/
|
|
98
|
-
count(): number;
|
|
99
|
-
/**
|
|
100
|
-
* Find category by title
|
|
101
|
-
*/
|
|
102
|
-
findCategory(title: string, add: boolean): IconCategory | null;
|
|
103
|
-
/**
|
|
104
|
-
* Count icons in category, remove category if empty
|
|
105
|
-
*
|
|
106
|
-
* Hidden icons and aliases do not count
|
|
107
|
-
*/
|
|
108
|
-
listCategory(category: IconCategory | string): string[] | null;
|
|
109
|
-
/**
|
|
110
|
-
* Check if icon exists
|
|
111
|
-
*/
|
|
112
|
-
exists(name: string): boolean;
|
|
113
|
-
/**
|
|
114
|
-
* Remove icons. Returns number of removed icons
|
|
115
|
-
*
|
|
116
|
-
* If removeDependencies is a string, it represents new parent for all aliases of removed icon. New parent cannot be alias or variation.
|
|
117
|
-
*/
|
|
118
|
-
remove(name: string, removeDependencies?: boolean | string): number;
|
|
119
|
-
/**
|
|
120
|
-
* Remove icon
|
|
121
|
-
*/
|
|
122
|
-
rename(oldName: string, newName: string): boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Add/update item
|
|
125
|
-
*/
|
|
126
|
-
setItem(name: string, item: IconSetIconEntry): boolean;
|
|
127
|
-
/**
|
|
128
|
-
* Add/update icon
|
|
129
|
-
*/
|
|
130
|
-
setIcon(name: string, icon: ResolvedIconifyIcon): boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Add/update alias without props
|
|
133
|
-
*/
|
|
134
|
-
setAlias(name: string, parent: string): boolean;
|
|
135
|
-
/**
|
|
136
|
-
* Add/update alias with props
|
|
137
|
-
*/
|
|
138
|
-
setVariation(name: string, parent: string, props: CommonIconProps): boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Icon from SVG. Updates old icon if it exists
|
|
141
|
-
*/
|
|
142
|
-
fromSVG(name: string, svg: SVG): boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Add or remove character for icon
|
|
145
|
-
*/
|
|
146
|
-
toggleCharacter(iconName: string, char: string, add: boolean): boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Add or remove category for icon
|
|
149
|
-
*/
|
|
150
|
-
toggleCategory(iconName: string, category: string, add: boolean): boolean;
|
|
151
|
-
/**
|
|
152
|
-
* Find icons that belong to theme
|
|
153
|
-
*/
|
|
154
|
-
checkTheme(prefix: boolean): CheckThemeResult;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Create blank icon set
|
|
158
|
-
*/
|
|
159
|
-
declare function blankIconSet(prefix: string): IconSet;
|
|
160
|
-
|
|
161
|
-
export { IconSet, blankIconSet, sortThemeKeys };
|
package/lib/icon-set/match.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FullIconifyIcon } from '@iconify/utils/lib/icon/defaults';
|
|
2
|
-
import { IconSet } from './index.js';
|
|
3
|
-
import '@iconify/types';
|
|
4
|
-
import '@iconify/utils/lib/customisations/defaults';
|
|
5
|
-
import './types.js';
|
|
6
|
-
import '../svg/index.js';
|
|
7
|
-
import '@iconify/utils/lib/icon-set/tree';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Find matching icon in icon set
|
|
11
|
-
*/
|
|
12
|
-
declare function findMatchingIcon(iconSet: IconSet, icon: FullIconifyIcon): string | null;
|
|
13
|
-
|
|
14
|
-
export { findMatchingIcon };
|
package/lib/icon-set/merge.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IconSet } from './index.js';
|
|
2
|
-
import '@iconify/types';
|
|
3
|
-
import '@iconify/utils/lib/customisations/defaults';
|
|
4
|
-
import './types.js';
|
|
5
|
-
import '../svg/index.js';
|
|
6
|
-
import '@iconify/utils/lib/icon-set/tree';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Merge icon sets
|
|
10
|
-
*/
|
|
11
|
-
declare function mergeIconSets(oldIcons: IconSet, newIcons: IconSet): IconSet;
|
|
12
|
-
|
|
13
|
-
export { mergeIconSets };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IconSet } from './index.js';
|
|
2
|
-
import '@iconify/types';
|
|
3
|
-
import '@iconify/utils/lib/customisations/defaults';
|
|
4
|
-
import './types.js';
|
|
5
|
-
import '../svg/index.js';
|
|
6
|
-
import '@iconify/utils/lib/icon-set/tree';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Check if icons in an icon set were updated.
|
|
10
|
-
*
|
|
11
|
-
* This function checks only icons, not metadata. It also ignores icon visibility.
|
|
12
|
-
*/
|
|
13
|
-
declare function hasIconDataBeenModified(set1: IconSet, set2: IconSet): boolean;
|
|
14
|
-
|
|
15
|
-
export { hasIconDataBeenModified };
|
package/lib/icon-set/props.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CommonIconProps } from './types.js';
|
|
2
|
-
import '@iconify/types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Common properties for icon and alias
|
|
6
|
-
*/
|
|
7
|
-
declare const defaultCommonProps: Required<CommonIconProps>;
|
|
8
|
-
/**
|
|
9
|
-
* Filter icon props: copies properties, removing undefined and default entries
|
|
10
|
-
*/
|
|
11
|
-
declare function filterProps(data: CommonIconProps, reference: CommonIconProps, compareDefaultValues: boolean): CommonIconProps;
|
|
12
|
-
|
|
13
|
-
export { defaultCommonProps, filterProps };
|
package/lib/icon-set/tags.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { IconSet } from './index.js';
|
|
2
|
-
import '@iconify/types';
|
|
3
|
-
import '@iconify/utils/lib/customisations/defaults';
|
|
4
|
-
import './types.js';
|
|
5
|
-
import '../svg/index.js';
|
|
6
|
-
import '@iconify/utils/lib/icon-set/tree';
|
|
7
|
-
|
|
8
|
-
declare const paletteTags: {
|
|
9
|
-
monotone: string;
|
|
10
|
-
palette: string;
|
|
11
|
-
};
|
|
12
|
-
declare const sizeTags: {
|
|
13
|
-
square: string;
|
|
14
|
-
gridPrefix: string;
|
|
15
|
-
heightPrefix: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Add tags to icon set
|
|
19
|
-
*/
|
|
20
|
-
declare function addTagsToIconSet(iconSet: IconSet, customTags?: string[]): string[];
|
|
21
|
-
|
|
22
|
-
export { addTagsToIconSet, paletteTags, sizeTags };
|