@iconify/types
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "@iconify/types", | ||
"description": "Types for Iconify icons", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "Vjacheslav Trushkin", | ||
@@ -6,0 +6,0 @@ "license": "(Apache-2.0 OR GPL-2.0)", |
119
types.ts
/** | ||
* Icon dimensions | ||
* Icon dimensions. | ||
* | ||
@@ -28,3 +28,3 @@ * Used in: | ||
/** | ||
* Icon transformations | ||
* Icon transformations. | ||
* | ||
@@ -53,3 +53,3 @@ * Used in: | ||
/** | ||
* Combination of dimensions and transformations | ||
* Combination of dimensions and transformations. | ||
*/ | ||
@@ -61,3 +61,3 @@ export interface IconifyOptional | ||
/** | ||
* Alias | ||
* Alias. | ||
*/ | ||
@@ -74,3 +74,3 @@ export interface IconifyAlias extends IconifyOptional { | ||
/** | ||
* Icon | ||
* Icon. | ||
*/ | ||
@@ -86,3 +86,3 @@ export interface IconifyIcon extends IconifyOptional { | ||
/** | ||
* "icons" field of JSON file | ||
* "icons" field of JSON file. | ||
*/ | ||
@@ -95,3 +95,3 @@ export interface IconifyIcons { | ||
/** | ||
* "aliases" field of JSON file | ||
* "aliases" field of JSON file. | ||
*/ | ||
@@ -104,7 +104,106 @@ export interface IconifyAliases { | ||
/** | ||
* JSON structure | ||
* Icon set information block. | ||
*/ | ||
export interface IconifyInfo { | ||
// Icon set name. | ||
name: string; | ||
// Total number of icons. | ||
total?: number; | ||
// Version string. | ||
version?: string; | ||
// Author information. | ||
author: { | ||
// Author name. | ||
name: string; | ||
// Link to author's website or icon set website. | ||
url?: string; | ||
}; | ||
// License | ||
license: { | ||
// Human readable license. | ||
title: string; | ||
// SPDX license identifier. | ||
spdx?: string; | ||
// License URL. | ||
url?: string; | ||
}; | ||
// Array of icons that should be used for samples in icons list. | ||
samples: string[]; | ||
// Icon grid: number or array of numbers. | ||
height?: number | number[]; | ||
// Category on Iconify collections list. | ||
category?: string; | ||
// Palette status. True if icons have predefined color scheme, false if icons use currentColor. | ||
// Icon set should not mix icons with and without palette to simplify search. | ||
palette: boolean; | ||
} | ||
/** | ||
* Optional themes. | ||
*/ | ||
export interface IconifyThemes { | ||
// Key is unique string. | ||
[index: string]: { | ||
// Theme title. | ||
title: string; | ||
// Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme. | ||
prefix?: string; // Example: 'baseline-' | ||
suffix?: string; // Example: '-filled' | ||
}; | ||
} | ||
/** | ||
* Characters used in font. | ||
*/ | ||
export interface IconifyChars { | ||
// Index is character, such as "f000". | ||
// Value is icon name. | ||
[index: string]: string; | ||
} | ||
/** | ||
* Icon categories | ||
*/ | ||
export interface IconifyCategories { | ||
// Index is category title, such as "Weather". | ||
// Value is array of icons that belong to that category. | ||
// Each icon can belong to multiple categories or no categories. | ||
[index: string]: string[]; | ||
} | ||
/** | ||
* Meta data stored in JSON file, used for browsing icon set. | ||
*/ | ||
export interface IconifyMetaData { | ||
// Icon set information block. Used for public icon sets, can be skipped for private icon sets. | ||
info?: IconifyInfo; | ||
// Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font. | ||
chars?: IconifyChars; | ||
// Categories. Used for filtering icons. | ||
categories?: IconifyCategories; | ||
// Optional themes. | ||
themes?: IconifyThemes; | ||
} | ||
/** | ||
* JSON structure. | ||
* | ||
* All optional values can exist in root of JSON file, used as defaults | ||
* All optional values can exist in root of JSON file, used as defaults. | ||
*/ | ||
export interface IconifyJSON extends IconifyOptional { | ||
export interface IconifyJSON extends IconifyOptional, IconifyMetaData { | ||
// Prefix for icons in JSON file, required. | ||
@@ -111,0 +210,0 @@ prefix: string; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31357
177