@iconify/utils
Advanced tools
Comparing version 2.1.9 to 2.1.10
import { IconifyIcon } from '@iconify/types'; | ||
import { IconCSSCommonCodeOptions, IconCSSItemOptions } from './types.js'; | ||
import { IconCSSCommonCodeOptions, IconCSSItemOptions, IconContentItemOptions } from './types.js'; | ||
/** | ||
* Generates common CSS rules for multiple icons | ||
* Generates common CSS rules for multiple icons, rendered as background/mask | ||
*/ | ||
declare function getCommonCSSRules(options: IconCSSCommonCodeOptions): Record<string, string>; | ||
/** | ||
* Generate CSS rules for one icon | ||
* Generate CSS rules for one icon, rendered as background/mask | ||
* | ||
@@ -14,3 +14,7 @@ * This function excludes common rules | ||
declare function generateItemCSSRules(icon: Required<IconifyIcon>, options: IconCSSItemOptions): Record<string, string>; | ||
/** | ||
* Generate content for one icon, rendered as content of pseudo-selector | ||
*/ | ||
declare function generateItemContent(icon: Required<IconifyIcon>, options: IconContentItemOptions): string; | ||
export { generateItemCSSRules, getCommonCSSRules }; | ||
export { generateItemCSSRules, generateItemContent, getCommonCSSRules }; |
import { IconifyIcon } from '@iconify/types'; | ||
import { IconCSSIconOptions } from './types.js'; | ||
import { IconCSSIconOptions, IconContentIconOptions } from './types.js'; | ||
/** | ||
* Get CSS for icon | ||
* Get CSS for icon, rendered as background or mask | ||
*/ | ||
declare function getIconCSS(icon: IconifyIcon, options?: IconCSSIconOptions): string; | ||
/** | ||
* Get CSS for icon, rendered as content | ||
*/ | ||
declare function getIconContentCSS(icon: IconifyIcon, options: IconContentIconOptions): string; | ||
export { getIconCSS }; | ||
export { getIconCSS, getIconContentCSS }; |
import { IconifyJSON } from '@iconify/types'; | ||
import { IconCSSIconSetOptions, CSSUnformattedItem } from './types.js'; | ||
import { IconCSSIconSetOptions, IconContentIconSetOptions, CSSUnformattedItem } from './types.js'; | ||
@@ -14,6 +14,10 @@ interface CSSData { | ||
/** | ||
* Get CSS for icon | ||
* Get CSS for icons as background/mask | ||
*/ | ||
declare function getIconsCSS(iconSet: IconifyJSON, names: string[], options?: IconCSSIconSetOptions): string; | ||
/** | ||
* Get CSS for icons as content | ||
*/ | ||
declare function getIconsContentCSS(iconSet: IconifyJSON, names: string[], options: IconContentIconSetOptions): string; | ||
export { getIconsCSS, getIconsCSSData }; | ||
export { getIconsCSS, getIconsCSSData, getIconsContentCSS }; |
@@ -26,2 +26,3 @@ /** | ||
color?: string; | ||
rules?: Record<string, string>; | ||
} | ||
@@ -47,2 +48,21 @@ /** | ||
/** | ||
* Selector for icon | ||
*/ | ||
interface IconContentIconSelectorOptions { | ||
iconSelector?: string; | ||
} | ||
/** | ||
* Options common for both multiple icons and single icon | ||
*/ | ||
interface IconContentSharedOptions { | ||
height: number; | ||
width?: number; | ||
color?: string; | ||
rules?: Record<string, string>; | ||
} | ||
/** | ||
* Options for generating data for one icon | ||
*/ | ||
type IconContentItemOptions = IconContentSharedOptions; | ||
/** | ||
* Formatting modes. Same as in SASS | ||
@@ -65,3 +85,3 @@ */ | ||
/** | ||
* Options for generating data for one icon | ||
* Options for generating data for one icon as background/mask | ||
*/ | ||
@@ -71,7 +91,17 @@ interface IconCSSIconOptions extends IconCSSSharedOptions, IconCSSIconSelectorOptions, IconCSSModeOptions, IconCSSFormatOptions { | ||
/** | ||
* Options for generating multiple icons | ||
* Options for generating data for one icon as content | ||
*/ | ||
interface IconContentIconOptions extends IconContentSharedOptions, IconContentIconSelectorOptions, IconCSSFormatOptions { | ||
} | ||
/** | ||
* Options for generating multiple icons as background/mask | ||
*/ | ||
interface IconCSSIconSetOptions extends IconCSSSharedOptions, IconCSSSelectorOptions, IconCSSModeOptions, IconCSSFormatOptions { | ||
} | ||
/** | ||
* Options for generating multiple icons as content | ||
*/ | ||
interface IconContentIconSetOptions extends IconContentSharedOptions, IconContentIconSelectorOptions, IconCSSFormatOptions { | ||
} | ||
export { CSSFormatMode, CSSUnformattedItem, IconCSSCommonCodeOptions, IconCSSFormatOptions, IconCSSIconOptions, IconCSSIconSelectorOptions, IconCSSIconSetOptions, IconCSSItemOptions, IconCSSMode, IconCSSModeOptions, IconCSSSelectorOptions, IconCSSSharedOptions }; | ||
export { CSSFormatMode, CSSUnformattedItem, IconCSSCommonCodeOptions, IconCSSFormatOptions, IconCSSIconOptions, IconCSSIconSelectorOptions, IconCSSIconSetOptions, IconCSSItemOptions, IconCSSMode, IconCSSModeOptions, IconCSSSelectorOptions, IconCSSSharedOptions, IconContentIconOptions, IconContentIconSelectorOptions, IconContentIconSetOptions, IconContentItemOptions, IconContentSharedOptions }; |
@@ -32,4 +32,4 @@ export { FullIconCustomisations, IconifyIconCustomisations, IconifyIconSize, IconifyIconSizeCustomisations, defaultIconCustomisations, defaultIconSizeCustomisations } from './customisations/defaults.js'; | ||
export { colorToString, compareColors, stringToColor } from './colors/index.js'; | ||
export { getIconCSS } from './css/icon.js'; | ||
export { getIconsCSS } from './css/icons.js'; | ||
export { getIconCSS, getIconContentCSS } from './css/icon.js'; | ||
export { getIconsCSS, getIconsContentCSS } from './css/icons.js'; | ||
export { CustomCollections, CustomIconLoader, IconCustomizations, IconCustomizer, IconifyLoaderOptions, InlineCollection, UniversalIconLoader } from './loader/types.js'; | ||
@@ -36,0 +36,0 @@ export { mergeIconProps } from './loader/utils.js'; |
@@ -6,3 +6,3 @@ { | ||
"author": "Vjacheslav Trushkin", | ||
"version": "2.1.9", | ||
"version": "2.1.10", | ||
"license": "MIT", | ||
@@ -9,0 +9,0 @@ "bugs": "https://github.com/iconify/iconify/issues", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
326965
10252