diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 64a7363..90e62aa 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -79,7 +79,7 @@ export { getIconsCSS, getIconsContentCSS } from './css/icons'; export type { CustomIconLoader, CustomCollections, - ExternalPkgInfo, + ExternalPkgName, IconCustomizer, IconCustomizations, IconifyLoaderOptions, diff --git a/packages/utils/src/loader/external-pkg.ts b/packages/utils/src/loader/external-pkg.ts index 8bc31fd..274700f 100644 --- a/packages/utils/src/loader/external-pkg.ts +++ b/packages/utils/src/loader/external-pkg.ts @@ -1,16 +1,16 @@ -import type { AutoInstall, CustomIconLoader, ExternalPkgInfo } from './types'; +import { AutoInstall, CustomIconLoader, ExternalPkgName } from './types'; import { loadCollectionFromFS } from './fs'; import { searchForIcon } from './modern'; import { warnOnce } from './warn'; /** - * Creates a CustomIconLoader collection from an external scoped package collection. + * Creates a CustomIconLoader collection from an external package collection. * - * @param packageName The scoped package name. + * @param packageName The package name. * @param autoInstall {AutoInstall} [autoInstall=false] - whether to automatically install */ export function createExternalPackageIconLoader( - packageName: ExternalPkgInfo, + packageName: ExternalPkgName, autoInstall: AutoInstall = false ) { let scope: string; diff --git a/packages/utils/src/loader/types.ts b/packages/utils/src/loader/types.ts index e320df9..d9b84a1 100644 --- a/packages/utils/src/loader/types.ts +++ b/packages/utils/src/loader/types.ts @@ -5,7 +5,7 @@ import type { IconifyJSON } from '@iconify/types'; /** * The external scoped package name: e.g. @my-collections/collection-a. */ -export type ExternalPkgInfo = string | [name: string, collection: string]; +export type ExternalPkgName = string | [scope: string, collection: string]; /** * Type for universal icon loader.