first commit
This commit is contained in:
+165
@@ -0,0 +1,165 @@
|
||||
Fonticons, Inc. (https://fontawesome.com)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Font Awesome Free License
|
||||
|
||||
Font Awesome Free is free, open source, and GPL friendly. You can use it for
|
||||
commercial projects, open source projects, or really almost whatever you want.
|
||||
Full Font Awesome Free license: https://fontawesome.com/license/free.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
|
||||
|
||||
The Font Awesome Free download is licensed under a Creative Commons
|
||||
Attribution 4.0 International License and applies to all icons packaged
|
||||
as SVG and JS file types.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Fonts: SIL OFL 1.1 License
|
||||
|
||||
In the Font Awesome Free download, the SIL OFL license applies to all icons
|
||||
packaged as web and desktop font files.
|
||||
|
||||
Copyright (c) 2026 Fonticons, Inc. (https://fontawesome.com)
|
||||
with Reserved Font Name: "Font Awesome".
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
SIL OPEN FONT LICENSE
|
||||
Version 1.1 - 26 February 2007
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting — in part or in whole — any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Code: MIT License (https://opensource.org/licenses/MIT)
|
||||
|
||||
In the Font Awesome Free download, the MIT license applies to all non-font and
|
||||
non-icon files.
|
||||
|
||||
Copyright 2026 Fonticons, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Attribution
|
||||
|
||||
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
|
||||
Awesome Free files already contain embedded comments with sufficient
|
||||
attribution, so you shouldn't need to do anything additional when using these
|
||||
files normally.
|
||||
|
||||
We've kept attribution comments terse, so we ask that you do not actively work
|
||||
to remove them from files, especially code. They're a great way for folks to
|
||||
learn about Font Awesome.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Brand Icons
|
||||
|
||||
All brand icons are trademarks of their respective owners. The use of these
|
||||
trademarks does not indicate endorsement of the trademark holder by Font
|
||||
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
|
||||
to represent the company, product, or service to which they refer.**
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
# @fortawesome/fontawesome-svg-core - SVG with JavaScript version
|
||||
|
||||
> "I came here to chew bubblegum and install Font Awesome 7 - and I'm all out of bubblegum"
|
||||
|
||||
[](https://www.npmjs.com/package/@fortawesome/fontawesome-svg-core)
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ npm i --save @fortawesome/fontawesome-svg-core
|
||||
```
|
||||
|
||||
Or
|
||||
|
||||
```
|
||||
$ yarn add @fortawesome/fontawesome-svg-core
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Get started [here](https://docs.fontawesome.com/web/setup/get-started). Continue your journey [here](https://docs.fontawesome.com/web/setup/packages).
|
||||
|
||||
Or go straight to the [API documentation](https://docs.fontawesome.com/apis/javascript/get-started).
|
||||
|
||||
## Issues and support
|
||||
|
||||
Start with [GitHub issues](https://github.com/FortAwesome/Font-Awesome/issues) and ping us on [Twitter](https://twitter.com/fontawesome) if you need to.
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
IconDefinition,
|
||||
IconName,
|
||||
IconStyle,
|
||||
IconFamily
|
||||
} from '@fortawesome/fontawesome-common-types';
|
||||
|
||||
export type IconMacroParams = {
|
||||
name: IconName,
|
||||
style?: IconStyle,
|
||||
family?: IconFamily
|
||||
};
|
||||
|
||||
export function brands(iconName: IconName): IconDefinition;
|
||||
export function duotone(iconName: IconName): IconDefinition;
|
||||
export function light(iconName: IconName): IconDefinition;
|
||||
export function regular(iconName: IconName): IconDefinition;
|
||||
export function solid(iconName: IconName): IconDefinition;
|
||||
export function thin(iconName: IconName): IconDefinition;
|
||||
export function icon(params: IconMacroParams): IconDefinition;
|
||||
+275
@@ -0,0 +1,275 @@
|
||||
const { createMacro, MacroError } = require('babel-plugin-macros')
|
||||
const { addNamed } = require('@babel/helper-module-imports')
|
||||
const {
|
||||
FAFamilyIds,
|
||||
FAFamilyClassicId,
|
||||
FAFamilyDuotoneId
|
||||
} = require('@fortawesome-internal-tools/fontawesome-icons/canonical')
|
||||
const { FALegacyStyleIds } = require('@fortawesome-internal-tools/fontawesome-icons/legacy')
|
||||
|
||||
module.exports = createMacro(importer, {
|
||||
configName: 'fontawesome-svg-core'
|
||||
})
|
||||
|
||||
const styles = FALegacyStyleIds
|
||||
|
||||
const macroNames = [...styles, 'icon']
|
||||
|
||||
const families = FAFamilyIds.map((family) => family.toLowerCase())
|
||||
|
||||
function importer({ references, state, babel, source, config }) {
|
||||
const license = config !== undefined ? config.license : 'free'
|
||||
|
||||
if (!['free', 'pro'].includes(license)) {
|
||||
throw new Error("config license must be either 'free' or 'pro'")
|
||||
}
|
||||
|
||||
Object.keys(references).forEach((key) => {
|
||||
replace({
|
||||
macroName: key,
|
||||
license,
|
||||
references: references[key],
|
||||
state,
|
||||
babel,
|
||||
source
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function replace({ macroName, license, references, state, babel }) {
|
||||
references.forEach((nodePath) => {
|
||||
const { iconName, style, family } = resolveReplacement({ nodePath, babel, state, macroName })
|
||||
|
||||
const name = `fa${capitalize(camelCase(iconName))}`
|
||||
const importFrom = getImport({ family, style, license, name })
|
||||
|
||||
const importName = addNamed(nodePath, name, importFrom)
|
||||
|
||||
nodePath.parentPath.replaceWith(importName)
|
||||
})
|
||||
}
|
||||
|
||||
function getImport({ family, style, license, name }) {
|
||||
if (family) {
|
||||
return `@fortawesome/${family.toLowerCase()}-${style}-svg-icons/${name}`
|
||||
} else if (style === 'brands') {
|
||||
return `@fortawesome/free-brands-svg-icons/${name}`
|
||||
} else {
|
||||
return `@fortawesome/${license}-${style}-svg-icons/${name}`
|
||||
}
|
||||
}
|
||||
|
||||
function resolveReplacement({ nodePath, babel, state, macroName }) {
|
||||
if ('icon' === macroName) {
|
||||
return resolveReplacementIcon({ nodePath, babel, state, macroName })
|
||||
} else {
|
||||
return resolveReplacementLegacyStyle({ nodePath, babel, state, macroName })
|
||||
}
|
||||
}
|
||||
|
||||
// The macros corresonding to legacy style names: solid(), regular(), light(), thin(), duotone(), brands().
|
||||
function resolveReplacementLegacyStyle({ nodePath, babel, macroName }) {
|
||||
const { types: t } = babel
|
||||
const { parentPath } = nodePath
|
||||
|
||||
if (!styles.includes(macroName)) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`${macroName} is not a valid macro name. Use one of ${macroNames.join(', ')}`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (parentPath.node.arguments) {
|
||||
if (parentPath.node.arguments.length < 1) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`Received an invalid number of arguments for ${macroName} macro: must be exactly 1`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (parentPath.node.arguments.length > 1) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`Received an invalid number of arguments for ${macroName} macro: must be exactly 1`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (
|
||||
(parentPath.node.arguments.length === 1 || parentPath.node.arguments.length === 2) &&
|
||||
t.isStringLiteral(parentPath.node.arguments[0]) &&
|
||||
nodePath.parentPath.node.arguments[0].value.startsWith('fa-')
|
||||
) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`Don't begin the icon name with fa-, just use ${nodePath.parentPath.node.arguments[0].value.slice(3)}`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (
|
||||
(parentPath.node.arguments.length === 1 || parentPath.node.arguments.length === 2) &&
|
||||
!t.isStringLiteral(parentPath.node.arguments[0])
|
||||
) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
'Only string literals are supported when referencing icons (use a string here instead)',
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
} else {
|
||||
throw parentPath.buildCodeFrameError('Pass the icon name you would like to import as an argument.', MacroError)
|
||||
}
|
||||
|
||||
return {
|
||||
iconName: nodePath.parentPath.node.arguments[0].value,
|
||||
style: macroName,
|
||||
family: undefined
|
||||
}
|
||||
}
|
||||
|
||||
// The icon() macro.
|
||||
function resolveReplacementIcon({ nodePath, babel, macroName }) {
|
||||
const { types: t } = babel
|
||||
const { parentPath } = nodePath
|
||||
|
||||
if ('icon' !== macroName) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`${macroName} is not a valid macro name. Use one of ${macroNames.join(', ')}`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (parentPath.node.arguments.length !== 1) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`Received an invalid number of arguments for ${macroName} macro: must be exactly 1`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (!t.isObjectExpression(parentPath.node.arguments[0])) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
"Only object expressions are supported when referencing icons with this macro, like this: { name: 'star' }",
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
const properties = parentPath.node.arguments[0].properties || []
|
||||
|
||||
const namePropIndex = properties.findIndex((prop) => 'name' === prop.key.name)
|
||||
|
||||
const name =
|
||||
namePropIndex >= 0
|
||||
? getStringLiteralPropertyValue(t, parentPath, parentPath.node.arguments[0].properties[namePropIndex])
|
||||
: undefined
|
||||
|
||||
if (!name) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
'The object argument to the icon() macro must have a name property',
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
const stylePropIndex = properties.findIndex((prop) => 'style' === prop.key.name)
|
||||
|
||||
let style =
|
||||
stylePropIndex >= 0
|
||||
? getStringLiteralPropertyValue(t, parentPath, parentPath.node.arguments[0].properties[stylePropIndex])
|
||||
: undefined
|
||||
|
||||
if (style && !styles.includes(style)) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`Invalid style name: ${style}. It must be one of the following: ${styles.join(', ')}`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
const familyPropIndex = properties.findIndex((prop) => 'family' === prop.key.name)
|
||||
|
||||
let family =
|
||||
familyPropIndex >= 0
|
||||
? getStringLiteralPropertyValue(t, parentPath, parentPath.node.arguments[0].properties[familyPropIndex])
|
||||
: undefined
|
||||
|
||||
if (family && !families.includes(family)) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`Invalid family name: ${family}. It must be one of the following: ${families.join(', ')}`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (FAFamilyDuotoneId === style && family && FAFamilyClassicId !== family) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`duotone cannot be used as a style name with any family other than classic`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if ('brands' === style && family && FAFamilyClassicId !== family) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`brands cannot be used as a style name with any family other than classic`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
if (family && !style) {
|
||||
throw parentPath.buildCodeFrameError(`When a family is specified, a style must also be specified`, MacroError)
|
||||
}
|
||||
|
||||
if (FAFamilyDuotoneId === style || FAFamilyDuotoneId === family) {
|
||||
family = undefined
|
||||
style = FAFamilyDuotoneId
|
||||
}
|
||||
|
||||
if ('brands' === style) {
|
||||
family = undefined
|
||||
}
|
||||
|
||||
// defaults
|
||||
if (!style) {
|
||||
style = 'solid'
|
||||
}
|
||||
|
||||
if (FAFamilyClassicId === family) {
|
||||
family = undefined
|
||||
}
|
||||
|
||||
return {
|
||||
iconName: name,
|
||||
family,
|
||||
style
|
||||
}
|
||||
}
|
||||
|
||||
function getStringLiteralPropertyValue(t, parentPath, property) {
|
||||
if (!('object' === typeof t && 'function' === typeof t.isStringLiteral)) {
|
||||
throw Error('ERROR: invalid babel-types arg. This is probably a programming error in import.macro')
|
||||
}
|
||||
|
||||
if (!('object' === typeof property && 'object' === typeof property.value && 'object' == typeof property.key)) {
|
||||
throw Error('ERROR: invalid babel property arg. This is probably a programming error in import.macro')
|
||||
}
|
||||
|
||||
if (!('object' === typeof parentPath && 'function' === typeof parentPath.buildCodeFrameError)) {
|
||||
throw Error('ERROR: invalid babel parentPath arg. This is probably a programming error in import.macro')
|
||||
}
|
||||
|
||||
if (!t.isStringLiteral(property.value)) {
|
||||
throw parentPath.buildCodeFrameError(
|
||||
`Only string literals are supported for the ${property.key.name} property (use a string here instead)`,
|
||||
MacroError
|
||||
)
|
||||
}
|
||||
|
||||
return property.value.value
|
||||
}
|
||||
|
||||
function capitalize(str) {
|
||||
return str[0].toUpperCase() + str.slice(1)
|
||||
}
|
||||
|
||||
function camelCase(str) {
|
||||
return str
|
||||
.split('-')
|
||||
.map((s, index) => {
|
||||
return (index === 0 ? s[0].toLowerCase() : s[0].toUpperCase()) + s.slice(1).toLowerCase()
|
||||
})
|
||||
.join('')
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
import {IconDefinition, IconLookup, IconName, IconFamily, IconPrefix, CssStyleClass, IconStyle, IconPathData, IconPack} from '@fortawesome/fontawesome-common-types';
|
||||
export {IconDefinition, IconLookup, IconName, IconFamily, IconPrefix, CssStyleClass, IconStyle, IconPathData, IconPack} from '@fortawesome/fontawesome-common-types';
|
||||
export const dom: DOM;
|
||||
export const library: Library;
|
||||
export const parse: { transform(transformString: string): Transform, icon(parseIconString: string | { prefix: IconPrefix, iconName: IconName } | [string | IconPrefix, string | IconName]): IconLookup };
|
||||
export const config: Config;
|
||||
export function noAuto():void;
|
||||
export function findIconDefinition(iconLookup: IconLookup): IconDefinition;
|
||||
export function text(content: string, params?: TextParams): Text;
|
||||
export function counter(content: string | number, params?: CounterParams): Counter;
|
||||
export function toHtml(content: any): string;
|
||||
export function toHtml(abstractNodes: AbstractElement): string;
|
||||
export function layer(
|
||||
assembler: (
|
||||
addLayerCallback: (layerToAdd: IconOrText | IconOrText[]) => void
|
||||
) => void,
|
||||
params?: LayerParams
|
||||
): Layer;
|
||||
export function icon(icon: IconName | IconLookup, params?: IconParams): Icon;
|
||||
export type IconProp = IconName | [IconPrefix, IconName] | IconLookup;
|
||||
export type FlipProp = "horizontal" | "vertical" | "both";
|
||||
export type SizeProp =
|
||||
| "2xs"
|
||||
| "xs"
|
||||
| "sm"
|
||||
| "lg"
|
||||
| "xl"
|
||||
| "2xl"
|
||||
| "1x"
|
||||
| "2x"
|
||||
| "3x"
|
||||
| "4x"
|
||||
| "5x"
|
||||
| "6x"
|
||||
| "7x"
|
||||
| "8x"
|
||||
| "9x"
|
||||
| "10x";
|
||||
export type PullProp = "left" | "right";
|
||||
export type RotateProp = 90 | 180 | 270;
|
||||
export type FaSymbol = string | boolean;
|
||||
export interface Config {
|
||||
familyPrefix: string;
|
||||
cssPrefix: string;
|
||||
styleDefault: IconPrefix | CssStyleClass | IconStyle;
|
||||
familyDefault: IconFamily;
|
||||
replacementClass: string;
|
||||
autoReplaceSvg: boolean | 'nest';
|
||||
autoAddCss: boolean;
|
||||
searchPseudoElements: boolean;
|
||||
searchPseudoElementsWarnings: boolean;
|
||||
searchPseudoElementsFullScan: boolean;
|
||||
observeMutations: boolean;
|
||||
keepOriginalSource: boolean;
|
||||
measurePerformance: boolean;
|
||||
mutateApproach: "async" | "sync";
|
||||
showMissingIcons: boolean;
|
||||
}
|
||||
export interface AbstractElement {
|
||||
tag: string;
|
||||
attributes: any;
|
||||
children?: AbstractElement[];
|
||||
}
|
||||
export interface FontawesomeObject {
|
||||
readonly abstract: AbstractElement[];
|
||||
readonly html: string[];
|
||||
readonly node: HTMLCollection;
|
||||
}
|
||||
export interface Icon extends FontawesomeObject, IconDefinition {
|
||||
readonly type: "icon";
|
||||
}
|
||||
export interface Text extends FontawesomeObject {
|
||||
readonly type: "text";
|
||||
}
|
||||
export interface Counter extends FontawesomeObject {
|
||||
readonly type: "counter";
|
||||
}
|
||||
export interface Layer extends FontawesomeObject {
|
||||
readonly type: "layer";
|
||||
}
|
||||
type IconOrText = Icon | Text;
|
||||
export interface Attributes {
|
||||
[key: string]: number | string;
|
||||
}
|
||||
export interface Styles {
|
||||
[key: string]: string;
|
||||
}
|
||||
export interface Transform {
|
||||
size?: number;
|
||||
x?: number;
|
||||
y?: number;
|
||||
rotate?: number;
|
||||
flipX?: boolean;
|
||||
flipY?: boolean;
|
||||
}
|
||||
export interface Params {
|
||||
title?: string;
|
||||
titleId?: string;
|
||||
classes?: string | string[];
|
||||
attributes?: Attributes;
|
||||
styles?: Styles;
|
||||
}
|
||||
export interface CounterParams extends Params {
|
||||
}
|
||||
export interface LayerParams {
|
||||
classes?: string | string[];
|
||||
}
|
||||
export interface TextParams extends Params {
|
||||
transform?: Transform;
|
||||
}
|
||||
export interface IconParams extends Params {
|
||||
transform?: Transform;
|
||||
symbol?: FaSymbol;
|
||||
mask?: IconLookup;
|
||||
maskId?: string;
|
||||
}
|
||||
export interface DOM {
|
||||
i2svg(params?: { node: Node; callback?: () => void }): Promise<void>;
|
||||
css(): string;
|
||||
insertCss(): string;
|
||||
watch(): void;
|
||||
}
|
||||
type IconDefinitionOrPack = IconDefinition | IconPack;
|
||||
export interface Library {
|
||||
add(...definitions: Array<IconDefinitionOrPack | IconDefinitionOrPack[]>): void;
|
||||
reset(): void;
|
||||
}
|
||||
+3865
File diff suppressed because one or more lines are too long
+3844
File diff suppressed because one or more lines are too long
+74
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"description": "The iconic font, CSS, and SVG framework",
|
||||
"keywords": [
|
||||
"font",
|
||||
"awesome",
|
||||
"fontawesome",
|
||||
"icon",
|
||||
"svg",
|
||||
"bootstrap"
|
||||
],
|
||||
"homepage": "https://fontawesome.com",
|
||||
"bugs": {
|
||||
"url": "https://github.com/FortAwesome/Font-Awesome/issues"
|
||||
},
|
||||
"author": "The Font Awesome Team (https://github.com/orgs/FortAwesome/people)",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FortAwesome/Font-Awesome"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-common-types": "7.3.1"
|
||||
},
|
||||
"version": "7.3.1",
|
||||
"name": "@fortawesome/fontawesome-svg-core",
|
||||
"main": "index.js",
|
||||
"module": "index.mjs",
|
||||
"jsnext:main": "index.mjs",
|
||||
"style": "styles.css",
|
||||
"license": "MIT",
|
||||
"types": "./index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"module": "./index.mjs",
|
||||
"import": "./index.mjs",
|
||||
"require": "./index.js",
|
||||
"style": "./styles.css",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./index": {
|
||||
"types": "./index.d.ts",
|
||||
"module": "./index.mjs",
|
||||
"import": "./index.mjs",
|
||||
"require": "./index.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./index.js": {
|
||||
"types": "./index.d.ts",
|
||||
"module": "./index.mjs",
|
||||
"import": "./index.mjs",
|
||||
"require": "./index.js",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./plugins": {
|
||||
"types": "./index.d.ts",
|
||||
"module": "./plugins.mjs",
|
||||
"import": "./plugins.mjs",
|
||||
"default": "./plugins.mjs"
|
||||
},
|
||||
"./import.macro": "./import.macro.js",
|
||||
"./import.macro.js": "./import.macro.js",
|
||||
"./styles": "./styles.css",
|
||||
"./styles.css": "./styles.css",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./index.js",
|
||||
"./index.mjs",
|
||||
"./styles.css"
|
||||
]
|
||||
}
|
||||
+3828
File diff suppressed because one or more lines are too long
+1074
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user