2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-22 14:48:24 +00:00

Add function to share storage between different instances of components and various components

This commit is contained in:
Vjacheslav Trushkin 2022-01-09 10:21:53 +02:00
parent de6941c069
commit 4be4ab87bc
27 changed files with 137 additions and 84 deletions

View File

@ -1,15 +1,15 @@
{
"name": "@iconify/iconify-browser-tests",
"version": "2.1.0-beta.3",
"version": "2.1.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@iconify/iconify-browser-tests",
"version": "2.1.0-beta.3",
"version": "2.1.0",
"license": "(Apache-2.0 OR GPL-2.0)",
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@iconify/iconify": "^2.1.0",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^16.0.0",
@ -29,9 +29,9 @@
"dev": true
},
"node_modules/@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",
@ -1757,9 +1757,9 @@
"dev": true
},
"@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"requires": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -18,7 +18,7 @@
"build:dist": "rollup -c rollup.config.js"
},
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@iconify/iconify": "^2.1.0",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^16.0.0",

View File

@ -1,12 +1,12 @@
{
"name": "@iconify/core",
"version": "1.2.0",
"version": "1.2.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@iconify/core",
"version": "1.2.0",
"version": "1.2.2",
"license": "(Apache-2.0 OR GPL-2.0)",
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -2,7 +2,7 @@
"name": "@iconify/core",
"description": "Reusable files used by multiple Iconify packages",
"author": "Vjacheslav Trushkin <cyberalien@gmail.com> (https://iconify.design)",
"version": "1.2.0",
"version": "1.2.2",
"license": "(Apache-2.0 OR GPL-2.0)",
"bugs": "https://github.com/iconify/iconify/issues",
"homepage": "https://iconify.design/",

View File

@ -39,6 +39,15 @@ export interface IconifyStorageFunctions {
* Add icon set to storage
*/
addCollection: (data: IconifyJSON, provider?: string) => boolean;
/**
* Share storage (used to share icon data between various components or multiple instances of component)
*
* It works by moving storage to global variable, new instances of component attempt to detect global
* variable during load. Therefore, function should be called as soon as possible.
* Works only in browser, not usable in SSR.
*/
shareStorage: () => void;
}
/**

View File

@ -18,12 +18,51 @@ export interface IconStorage {
missing: Record<string, number>;
}
/**
* Storage format version
*/
const storageVersion = 1;
/**
* Storage by provider and prefix
*/
const storage: Record<string, Record<string, IconStorage>> = Object.create(
null
);
let storage: Record<string, Record<string, IconStorage>> = Object.create(null);
/**
* Share storage
*/
interface WindowWithStorage extends Window {
_iconifyStorage: {
version: number;
storage: Record<string, Record<string, IconStorage>>;
};
}
try {
const w = (window || self) as unknown as WindowWithStorage | undefined;
if (w?._iconifyStorage.version === storageVersion) {
storage = w._iconifyStorage.storage;
}
} catch (err) {
//
}
/**
* Share storage between components
*/
export function shareStorage(): void {
try {
const w = (window || self) as unknown as WindowWithStorage | undefined;
if (w && !w._iconifyStorage) {
w._iconifyStorage = {
version: storageVersion,
storage,
};
}
} catch (err) {
//
}
}
/**
* Create new storage

View File

@ -15,7 +15,7 @@
"ember-cli-htmlbars": "^5.7.1"
},
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.4",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-typescript": "^8.2.3",
@ -1663,9 +1663,9 @@
"dev": true
},
"node_modules/@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",
@ -6223,9 +6223,9 @@
"dev": true
},
"@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"requires": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -23,7 +23,7 @@
"build:cleanup": "node cleanup"
},
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.4",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-typescript": "^8.2.3",

View File

@ -15,7 +15,7 @@ import {
addCollection,
allowSimpleNames,
} from '@iconify/core/lib/storage/functions';
import { listIcons } from '@iconify/core/lib/storage/storage';
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
@ -233,7 +233,7 @@ export { _api };
export { addAPIProvider, loadIcons };
// IconifyStorageFunctions
export { iconExists, getIcon, listIcons, addIcon, addCollection };
export { iconExists, getIcon, listIcons, addIcon, addCollection, shareStorage };
// IconifyBuilderFunctions
export { replaceIDs, calculateSize, buildIcon };

View File

@ -12,7 +12,7 @@
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.12.0",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-node-resolve": "^10.0.0",
@ -664,9 +664,9 @@
"dev": true
},
"node_modules/@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",
@ -7928,9 +7928,9 @@
"dev": true
},
"@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"requires": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -72,7 +72,7 @@
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.12.0",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-node-resolve": "^10.0.0",

View File

@ -15,7 +15,7 @@ import {
addIcon,
addCollection,
} from '@iconify/core/lib/storage/functions';
import { listIcons } from '@iconify/core/lib/storage/storage';
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
@ -230,6 +230,7 @@ const Iconify: IconifyGlobal = {
listIcons,
addIcon,
addCollection,
shareStorage,
// IconifyBuilderFunctions
replaceIDs,
@ -267,7 +268,7 @@ export { _api };
export { addAPIProvider, loadIcons };
// IconifyStorageFunctions
export { iconExists, getIcon, listIcons, addIcon, addCollection };
export { iconExists, getIcon, listIcons, addIcon, addCollection, shareStorage };
// IconifyBuilderFunctions
export { replaceIDs, calculateSize, buildIcon };

View File

@ -15,7 +15,7 @@ import {
addIcon,
addCollection,
} from '@iconify/core/lib/storage/functions';
import { listIcons } from '@iconify/core/lib/storage/storage';
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
@ -69,6 +69,7 @@ const Iconify: IconifyGlobal = {
listIcons,
addIcon,
addCollection,
shareStorage,
// IconifyBuilderFunctions
replaceIDs,
@ -96,7 +97,7 @@ export default Iconify;
* Named exports
*/
// IconifyStorageFunctions
export { iconExists, getIcon, listIcons, addIcon, addCollection };
export { iconExists, getIcon, listIcons, addIcon, addCollection, shareStorage };
// IconifyBuilderFunctions
export { replaceIDs, calculateSize, buildIcon };

View File

@ -1,12 +1,12 @@
{
"name": "@iconify/react",
"version": "3.1.0",
"version": "3.1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@iconify/react",
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",
"dependencies": {
"cross-fetch": "^3.1.4"
@ -14,7 +14,7 @@
"devDependencies": {
"@babel/preset-env": "^7.16.0",
"@babel/preset-react": "^7.16.0",
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.19",
"@rollup/plugin-node-resolve": "^13.0.6",
"@types/react": "^17.0.3",
@ -1721,9 +1721,9 @@
"dev": true
},
"node_modules/@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",
@ -8716,9 +8716,9 @@
"dev": true
},
"@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"requires": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -42,7 +42,7 @@
"devDependencies": {
"@babel/preset-env": "^7.16.0",
"@babel/preset-react": "^7.16.0",
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.19",
"@rollup/plugin-node-resolve": "^13.0.6",
"@types/react": "^17.0.3",

View File

@ -18,7 +18,7 @@ import {
getIconData,
allowSimpleNames,
} from '@iconify/core/lib/storage/functions';
import { listIcons } from '@iconify/core/lib/storage/storage';
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
@ -464,7 +464,7 @@ export { _api };
export { addAPIProvider, loadIcons };
// IconifyStorageFunctions
export { iconExists, getIcon, listIcons, addIcon, addCollection };
export { iconExists, getIcon, listIcons, addIcon, addCollection, shareStorage };
// IconifyBuilderFunctions
export { replaceIDs, calculateSize, buildIcon };

View File

@ -12,7 +12,7 @@
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.19",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-typescript": "^8.3.0",
@ -707,9 +707,9 @@
"dev": true
},
"node_modules/@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",
@ -6506,9 +6506,9 @@
"dev": true
},
"@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"requires": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -26,7 +26,7 @@
"test": "jest"
},
"devDependencies": {
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.19",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-typescript": "^8.3.0",

View File

@ -8,6 +8,7 @@ import {
iconExists,
getIcon,
listIcons,
shareStorage,
addIcon,
addCollection,
calculateSize,
@ -24,6 +25,7 @@ export {
iconExists,
getIcon,
listIcons,
shareStorage,
addIcon,
addCollection,
calculateSize,

View File

@ -17,7 +17,7 @@ import {
getIconData,
allowSimpleNames,
} from '@iconify/core/lib/storage/functions';
import { listIcons } from '@iconify/core/lib/storage/storage';
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
@ -360,7 +360,7 @@ export { _api };
export { addAPIProvider, loadIcons };
// IconifyStorageFunctions
export { iconExists, getIcon, listIcons, addIcon, addCollection };
export { iconExists, getIcon, listIcons, addIcon, addCollection, shareStorage };
// IconifyBuilderFunctions
export { replaceIDs, calculateSize, buildIcon };

View File

@ -57,6 +57,7 @@ export {
listIcons,
addIcon,
addCollection,
shareStorage,
} from './functions';
export { calculateSize, replaceIDs, buildIcon } from './functions';

View File

@ -1,19 +1,19 @@
{
"name": "@iconify/vue",
"version": "3.1.0",
"version": "3.1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@iconify/vue",
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",
"dependencies": {
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"@babel/preset-env": "^7.15.6",
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.15.2",
"@rollup/plugin-node-resolve": "^13.0.0",
"@types/jest": "^27.0.2",
@ -1623,9 +1623,9 @@
"dev": true
},
"node_modules/@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",
@ -8862,9 +8862,9 @@
"dev": true
},
"@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"requires": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -38,7 +38,7 @@
},
"devDependencies": {
"@babel/preset-env": "^7.15.6",
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.15.2",
"@rollup/plugin-node-resolve": "^13.0.0",
"@types/jest": "^27.0.2",

View File

@ -27,7 +27,7 @@ import {
getIconData,
allowSimpleNames,
} from '@iconify/core/lib/storage/functions';
import { listIcons } from '@iconify/core/lib/storage/storage';
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
@ -400,7 +400,7 @@ export { _api };
export { addAPIProvider, loadIcons };
// IconifyStorageFunctions
export { iconExists, getIcon, listIcons, addIcon, addCollection };
export { iconExists, getIcon, listIcons, addIcon, addCollection, shareStorage };
// IconifyBuilderFunctions
export { replaceIDs, calculateSize, buildIcon };

View File

@ -1,19 +1,19 @@
{
"name": "@iconify/vue2",
"version": "1.1.0",
"version": "1.1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@iconify/vue2",
"version": "1.1.0",
"version": "1.1.1",
"license": "MIT",
"dependencies": {
"cross-fetch": "^3.1.4"
},
"devDependencies": {
"@babel/preset-env": "^7.16.0",
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.19",
"@rollup/plugin-node-resolve": "^13.0.6",
"@types/jest": "^27.0.2",
@ -1623,9 +1623,9 @@
"dev": true
},
"node_modules/@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"dependencies": {
"@iconify/api-redundancy": "^1.0.2",
@ -9006,9 +9006,9 @@
"dev": true
},
"@iconify/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.0.tgz",
"integrity": "sha512-0c88U7Gazq1RGvRYVMrD+lVxTPvMs+32udryaSn68PVVqa4zvGOG6GS2JN3Vnjrv0gBCMMMIe+D96J8iP40o/A==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@iconify/core/-/core-1.2.2.tgz",
"integrity": "sha512-wu8YBNgTU1mBKYARfVrYp7kCNKY2Ny+048r7e6afjEq18ZL3J848KXQty1tuq5s8siAWERVV8DoTK1YL3M2U/g==",
"dev": true,
"requires": {
"@iconify/api-redundancy": "^1.0.2",

View File

@ -38,7 +38,7 @@
},
"devDependencies": {
"@babel/preset-env": "^7.16.0",
"@iconify/core": "^1.2.0",
"@iconify/core": "^1.2.2",
"@microsoft/api-extractor": "^7.18.19",
"@rollup/plugin-node-resolve": "^13.0.6",
"@types/jest": "^27.0.2",

View File

@ -20,7 +20,7 @@ import {
getIconData,
allowSimpleNames,
} from '@iconify/core/lib/storage/functions';
import { listIcons } from '@iconify/core/lib/storage/storage';
import { listIcons, shareStorage } from '@iconify/core/lib/storage/storage';
import type { IconifyBuilderFunctions } from '@iconify/core/lib/builder/functions';
import { buildIcon } from '@iconify/core/lib/builder/functions';
import { replaceIDs } from '@iconify/utils/lib/svg/id';
@ -402,7 +402,7 @@ export { _api };
export { addAPIProvider, loadIcons };
// IconifyStorageFunctions
export { iconExists, getIcon, listIcons, addIcon, addCollection };
export { iconExists, getIcon, listIcons, addIcon, addCollection, shareStorage };
// IconifyBuilderFunctions
export { replaceIDs, calculateSize, buildIcon };