This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

12
node_modules/@iconify/utils/lib/misc/licenses.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
interface LicenseInfo {
attribution: boolean;
commercial: boolean;
sameLicense?: boolean;
}
/**
* Data for open source licenses used by icon sets in `@iconify/json` package and smaller packages
*
* Key is SPDX license identifier
*/
declare const licensesData: Record<string, LicenseInfo>;
export { LicenseInfo, licensesData };

55
node_modules/@iconify/utils/lib/misc/licenses.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
const freeLicense = {
attribution: false,
commercial: true
};
const freeSameLicense = {
attribution: false,
commercial: true,
sameLicense: true
};
const attribLicense = {
attribution: true,
commercial: true
};
const attribSameLicense = {
attribution: true,
commercial: true,
sameLicense: true
};
const attribNonCommercialLicense = {
attribution: true,
commercial: false
};
const attribNonCommercialSameLicense = {
attribution: true,
commercial: false,
sameLicense: true
};
/**
* Data for open source licenses used by icon sets in `@iconify/json` package and smaller packages
*
* Key is SPDX license identifier
*/
const licensesData = {
"Apache-2.0": freeLicense,
"MIT": freeLicense,
"MPL-2.0": freeLicense,
"CC0-1.0": freeLicense,
"CC-BY-3.0": attribLicense,
"CC-BY-SA-3.0": attribSameLicense,
"CC-BY-4.0": attribLicense,
"CC-BY-SA-4.0": attribSameLicense,
"CC-BY-NC-4.0": attribNonCommercialLicense,
"CC-BY-NC-SA-4.0": attribNonCommercialSameLicense,
"ISC": freeLicense,
"OFL-1.1": freeLicense,
"GPL-2.0-only": freeSameLicense,
"GPL-2.0-or-later": freeSameLicense,
"GPL-3.0": freeSameLicense,
"GPL-3.0-or-later": freeSameLicense,
"Unlicense": freeLicense,
"BSD-2-Clause": freeLicense,
"BSD-3-Clause": freeLicense
};
export { licensesData };

15
node_modules/@iconify/utils/lib/misc/objects.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
/**
* Compares two objects, returns true if identical
*
* Reference object contains keys
*/
declare function compareObjects<T extends Record<string, unknown>>(obj1: T, obj2: T, ref?: T): boolean;
/**
* Unmerge objects, removing items that match in both objects
*/
declare function unmergeObjects<T extends Record<string, unknown>>(obj1: T, obj2: T): T;
/**
* Get common properties in 2 objects
*/
declare function commonObjectProps<T extends Record<string, unknown>>(item: unknown, reference: T): Partial<T>;
export { commonObjectProps, compareObjects, unmergeObjects };

27
node_modules/@iconify/utils/lib/misc/objects.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/**
* Compares two objects, returns true if identical
*
* Reference object contains keys
*/
function compareObjects(obj1, obj2, ref = obj1) {
for (const key in ref) if (obj1[key] !== obj2[key]) return false;
return Object.keys(obj1).length === Object.keys(obj2).length;
}
/**
* Unmerge objects, removing items that match in both objects
*/
function unmergeObjects(obj1, obj2) {
const result = { ...obj1 };
for (const key in obj2) if (result[key] === obj2[key]) delete result[key];
return result;
}
/**
* Get common properties in 2 objects
*/
function commonObjectProps(item, reference) {
const result = Object.create(null);
for (const key in reference) if (key in item) result[key] = item[key];
return result;
}
export { commonObjectProps, compareObjects, unmergeObjects };

17
node_modules/@iconify/utils/lib/misc/strings.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
/**
* Convert string to camelCase
*/
declare function camelize(str: string): string;
/**
* Convert string to PascaleCase
*/
declare function pascalize(str: string): string;
/**
* Convert camelCase string to kebab-case
*/
declare function camelToKebab(key: string): string;
/**
* Convert camelCase string to snake-case
*/
declare function snakelize(str: string): string;
export { camelToKebab, camelize, pascalize, snakelize };

29
node_modules/@iconify/utils/lib/misc/strings.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
/**
* Convert string to camelCase
*/
function camelize(str) {
return str.replace(/-([a-z0-9])/g, (g) => g[1].toUpperCase());
}
/**
* Convert string to PascaleCase
*/
function pascalize(str) {
const camel = camelize(str);
return camel.slice(0, 1).toUpperCase() + camel.slice(1);
}
/**
* Convert camelCase string to kebab-case
*/
function camelToKebab(key) {
const result = key.replace(/:/g, "-").replace(/([A-Z])/g, " $1").trim();
return result.split(/\s+/g).join("-").toLowerCase();
}
/**
* Convert camelCase string to snake-case
*/
function snakelize(str) {
const kebab = camelToKebab(str);
return kebab.replace(/-/g, "_");
}
export { camelToKebab, camelize, pascalize, snakelize };

7
node_modules/@iconify/utils/lib/misc/title.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
/**
* Sanitises title, removing any unwanted characters that might break XML.
*
* This is a very basic funciton, not full parser.
*/
declare function sanitiseTitleAttribute(content: string): string;
export { sanitiseTitleAttribute };

10
node_modules/@iconify/utils/lib/misc/title.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
/**
* Sanitises title, removing any unwanted characters that might break XML.
*
* This is a very basic funciton, not full parser.
*/
function sanitiseTitleAttribute(content) {
return content.replace(/[<>&]+/g, "");
}
export { sanitiseTitleAttribute };