diff --git a/packages/types/package-lock.json b/packages/types/package-lock.json index 08426ec..5ae1c9f 100644 --- a/packages/types/package-lock.json +++ b/packages/types/package-lock.json @@ -1,12 +1,12 @@ { "name": "@iconify/types", - "version": "1.0.7", + "version": "1.0.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@iconify/types", - "version": "1.0.7", + "version": "1.0.8", "license": "(Apache-2.0 OR GPL-2.0)", "devDependencies": { "typescript": "^4.1.2" diff --git a/packages/types/package.json b/packages/types/package.json index 18d5df3..431df52 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@iconify/types", "description": "Types for Iconify data", - "version": "1.0.7", + "version": "1.0.8", "author": "Vjacheslav Trushkin", "license": "(Apache-2.0 OR GPL-2.0)", "main": "./index.js", diff --git a/packages/types/types.ts b/packages/types/types.ts index 0e8d7c9..104ea14 100644 --- a/packages/types/types.ts +++ b/packages/types/types.ts @@ -218,11 +218,9 @@ export interface IconifyMetaData { } /** - * JSON structure. - * - * All optional values can exist in root of JSON file, used as defaults. + * JSON structure, contains only icon data */ -export interface IconifyJSON extends IconifyOptional, IconifyMetaData { +export interface IconifyJSONIconsData { // Prefix for icons in JSON file, required. prefix: string; @@ -234,7 +232,17 @@ export interface IconifyJSON extends IconifyOptional, IconifyMetaData { // Optional aliases. aliases?: IconifyAliases; +} +/** + * JSON structure. + * + * All optional values can exist in root of JSON file, used as defaults. + */ +export interface IconifyJSON + extends IconifyJSONIconsData, + IconifyOptional, + IconifyMetaData { // Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist. not_found?: string[]; @@ -242,3 +250,16 @@ export interface IconifyJSON extends IconifyOptional, IconifyMetaData { // If property exists in both icon and root, use value from icon. // This is used to reduce duplication. } + +/** + * Structure of exports '@iconify-json/*' packages. + * + * These are small packages, one per icon set, that split JSON structure into multiple files to reduce + * amount of data imported from package. + */ +export interface IconifyJSONPackageExports { + info: IconifyInfo; + icons: IconifyJSON; + metadata: IconifyMetaData; + chars: IconifyChars; +}