forked from simple-icons/simple-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdk.d.ts
83 lines (75 loc) · 2.46 KB
/
sdk.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* @fileoverview
* Types for Simple Icons SDK.
*/
import type {CustomLicense, SPDXLicense} from './types';
/**
* The data for a third-party extension.
*
* Includes the module and author of the extension,
* both including a name and URL.
*
* @see {@link https://github.com/simple-icons/simple-icons#third-party-extensions Third-Party Extensions}
*/
export type ThirdPartyExtension = {
module: ThirdPartyExtensionSubject;
author: ThirdPartyExtensionSubject;
};
type ThirdPartyExtensionSubject = {
name: string;
url: string;
};
/**
* The aliases for a Simple Icon.
*
* Corresponds to the `aliases` property in the *_data/simple-icons.json* file.
*
* @see {@link https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md#aliases Aliases}
*/
export type Aliases = {
aka?: string[];
dup?: DuplicateAlias[];
loc?: Record<string, string>;
};
type DuplicateAlias = {
title: string;
hex?: string;
guidelines?: string;
loc?: Record<string, string>;
};
/**
* The data for a Simple Icon.
*
* Corresponds to the data stored for each icon in the *_data/simple-icons.json* file.
*
* @see {@link https://github.com/mondeja/simple-icons/blob/utils-entrypoint/CONTRIBUTING.md#7-update-the-json-data-for-simpleiconsorg Update the JSON Data for SimpleIcons.org}
*/
export type IconData = {
title: string;
hex: string;
source: string;
slug?: string;
guidelines?: string;
license?: Omit<SPDXLicense, 'url'> | CustomLicense;
aliases?: Aliases;
};
/* The next code is autogenerated from sdk.mjs */
/* eslint-disable */
export const URL_REGEX: RegExp;
export const SVG_PATH_REGEX: RegExp;
export function getDirnameFromImportMeta(importMetaUrl: string): string;
export function getIconSlug(icon: IconData): string;
export function svgToPath(svg: string): string;
export function titleToSlug(title: string): string;
export function slugToVariableName(slug: string): string;
export function titleToHtmlFriendly(brandTitle: string): string;
export function htmlFriendlyToTitle(htmlFriendlyTitle: string): string;
export function getIconDataPath(rootDirectory?: string): string;
export function getIconsDataString(rootDirectory?: string): string;
export function getIconsData(rootDirectory?: string): IconData[];
export function normalizeNewlines(text: string): string;
export function normalizeColor(text: string): string;
export function getThirdPartyExtensions(
readmePath?: string,
): Promise<ThirdPartyExtension[]>;
export const collator: Intl.Collator;