mirror of
https://github.com/iconify/iconify.git
synced 2025-01-06 07:20:40 +00:00
Move calculateSize function to internals in SVG framework
This commit is contained in:
parent
ce5fade7ae
commit
375863d9bb
@ -103,6 +103,15 @@ export type IconifyCacheType = 'local' | 'session' | 'all';
|
||||
* Important: any changes published in a release must be backwards compatible.
|
||||
*/
|
||||
export interface IconifyExposedInternals {
|
||||
/**
|
||||
* Calculate width knowing height and width/height ratio (or vice versa)
|
||||
*/
|
||||
calculateSize: (
|
||||
size: IconifyIconSize,
|
||||
ratio: number,
|
||||
precision?: number
|
||||
) => IconifyIconSize;
|
||||
|
||||
/**
|
||||
* Get internal API data, used by Icon Finder
|
||||
*/
|
||||
@ -167,15 +176,6 @@ export interface IconifyGlobal {
|
||||
*/
|
||||
replaceIDs: (body: string) => string;
|
||||
|
||||
/**
|
||||
* Calculate width knowing height and width/height ratio (or vice versa)
|
||||
*/
|
||||
calculateSize: (
|
||||
size: IconifyIconSize,
|
||||
ratio: number,
|
||||
precision?: number
|
||||
) => IconifyIconSize;
|
||||
|
||||
/* Add icons */
|
||||
/**
|
||||
* Add icon to storage
|
||||
@ -396,9 +396,6 @@ const Iconify: IconifyGlobal = {
|
||||
// Replace IDs in body
|
||||
replaceIDs: replaceIDs,
|
||||
|
||||
// Calculate size
|
||||
calculateSize: calcSize,
|
||||
|
||||
// Add icon
|
||||
addIcon: (name, data) => {
|
||||
const icon = getIconName(name);
|
||||
@ -453,6 +450,9 @@ const Iconify: IconifyGlobal = {
|
||||
|
||||
// Exposed internal functions
|
||||
_internal: {
|
||||
// Calculate size
|
||||
calculateSize: calcSize,
|
||||
|
||||
// Get API data
|
||||
getAPI: getRedundancyCache,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user