@iconify/utils
Advanced tools
Comparing version 2.1.19 to 2.1.20
@@ -35,3 +35,3 @@ export { FullIconCustomisations, IconifyIconCustomisations, IconifyIconSize, IconifyIconSizeCustomisations, defaultIconCustomisations, defaultIconSizeCustomisations } from './customisations/defaults.js'; | ||
export { getIconsCSS, getIconsContentCSS } from './css/icons.js'; | ||
export { CustomCollections, CustomIconLoader, IconCustomizations, IconCustomizer, IconifyLoaderOptions, InlineCollection, UniversalIconLoader } from './loader/types.js'; | ||
export { CustomCollections, CustomIconLoader, ExternalPkgName, IconCustomizations, IconCustomizer, IconifyLoaderOptions, InlineCollection, UniversalIconLoader } from './loader/types.js'; | ||
export { mergeIconProps } from './loader/utils.js'; | ||
@@ -38,0 +38,0 @@ export { getCustomIcon } from './loader/custom.js'; |
@@ -6,4 +6,12 @@ import { IconifyJSON } from '@iconify/types'; | ||
declare function loadCollectionFromFS(name: string, autoInstall?: AutoInstall): Promise<IconifyJSON | undefined>; | ||
/** | ||
* Asynchronously loads a collection from the file system. | ||
* | ||
* @param name {string} the name of the collection, e.g. 'mdi' | ||
* @param autoInstall {AutoInstall} [autoInstall=false] - whether to automatically install | ||
* @param scope {string} [scope='@iconify-json'] - the scope of the collection, e.g. '@my-company-json' | ||
* @return {Promise<IconifyJSON | undefined>} the loaded IconifyJSON or undefined | ||
*/ | ||
declare function loadCollectionFromFS(name: string, autoInstall?: AutoInstall, scope?: string): Promise<IconifyJSON | undefined>; | ||
export { loadCollectionFromFS }; |
@@ -6,2 +6,8 @@ import { Awaitable } from '@antfu/utils'; | ||
/** | ||
* External package name. | ||
* | ||
* You can use scoped packages, for example, `@my-collections/collection-a` or normal packages `my-awaesome-collection`. | ||
*/ | ||
type ExternalPkgName = string | [scope: string, collection: string]; | ||
/** | ||
* Type for universal icon loader. | ||
@@ -135,2 +141,2 @@ */ | ||
export { AutoInstall, CustomCollections, CustomIconLoader, IconCustomizations, IconCustomizer, IconifyLoaderOptions, InlineCollection, UniversalIconLoader }; | ||
export { AutoInstall, CustomCollections, CustomIconLoader, ExternalPkgName, IconCustomizations, IconCustomizer, IconifyLoaderOptions, InlineCollection, UniversalIconLoader }; |
@@ -7,3 +7,4 @@ import { Awaitable } from '@antfu/utils'; | ||
declare function mergeIconProps(svg: string, collection: string, icon: string, options?: IconifyLoaderOptions, propsProvider?: () => Awaitable<Record<string, string>>, afterCustomizations?: (props: Record<string, string>) => void): Promise<string>; | ||
declare function getPossibleIconNames(icon: string): string[]; | ||
export { mergeIconProps }; | ||
export { getPossibleIconNames, mergeIconProps }; |
@@ -6,3 +6,3 @@ { | ||
"author": "Vjacheslav Trushkin", | ||
"version": "2.1.19", | ||
"version": "2.1.20", | ||
"license": "MIT", | ||
@@ -272,2 +272,7 @@ "bugs": "https://github.com/iconify/iconify/issues", | ||
}, | ||
"./lib/loader/external-pkg": { | ||
"types": "./lib/loader/external-pkg.d.ts", | ||
"require": "./lib/loader/external-pkg.cjs", | ||
"import": "./lib/loader/external-pkg.mjs" | ||
}, | ||
"./lib/loader/fs": { | ||
@@ -403,3 +408,3 @@ "types": "./lib/loader/fs.d.ts", | ||
"kolorist": "^1.8.0", | ||
"local-pkg": "^0.4.3", | ||
"local-pkg": "^0.5.0", | ||
"@iconify/types": "^2.0.0" | ||
@@ -428,4 +433,4 @@ }, | ||
"test:esm": "vitest --config vitest.config.mjs", | ||
"test": "pnpm run test:cjs && pnpm run test:esm" | ||
"test": "node ./scripts/prepare-tests.mjs && pnpm run test:cjs && pnpm run test:esm" | ||
} | ||
} |
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
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
339858
219
10629
8
+ Addedacorn@8.14.0(transitive)
+ Addedconfbox@0.1.8(transitive)
+ Addedlocal-pkg@0.5.0(transitive)
+ Addedmlly@1.7.3(transitive)
+ Addedpathe@1.1.2(transitive)
+ Addedpkg-types@1.2.1(transitive)
+ Addedufo@1.5.4(transitive)
- Removedlocal-pkg@0.4.3(transitive)
Updatedlocal-pkg@^0.5.0