Release 5.0.4 (#982)

This commit is contained in:
Rob Madole
2018-01-10 14:54:27 -06:00
committed by GitHub
parent 4578c38f1e
commit deaca8b496
180 changed files with 4837 additions and 4647 deletions

View File

@@ -0,0 +1,27 @@
# @fortawesome/fontawesome - SVG with JavaScript version
> "I came here to chew bubblegum and install Font Awesome 5 - and I'm all out of bubblegum"
[![npm](https://img.shields.io/npm/v/@fortawesome/fontawesome.svg?style=flat-square)](https://www.npmjs.com/package/@fortawesome/fontawesome)
## Installation
```
$ npm i --save @fortawesome/fontawesome
```
Or
```
$ yarn add @fortawesome/fontawesome
```
## Documentation
Get started [here](https://fontawesome.com/get-started/svg-with-js). Continue your journey [here](https://fontawesome.com/how-to-use/svg-with-js).
Or go straight to the [API documentation](https://fontawesome.com/how-to-use/font-awesome-api).
## 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.

View File

@@ -1,103 +1,101 @@
// tslint:disable-next-line:export-just-namespace
export = fontawesome;
export as namespace fontawesome;
import * as commonTypes from '@fortawesome/fontawesome-common-types';
declare namespace fontawesome {
type IconDefinition = commonTypes.IconDefinition;
type IconLookup = commonTypes.IconLookup;
type IconName = commonTypes.IconName;
type IconPrefix = commonTypes.IconPrefix;
const dom: DOM;
const library: Library;
const parse: { transform(transformString: string): Transform };
const config: Config;
function noAuto():void;
function findIconDefinition(iconLookup: IconLookup): IconDefinition;
function text(content: string, params?: Params): Text;
function layer(
assembler: (
addLayerCallback: (layerToAdd: IconLookup | IconLookup[]) => void
) => void
): Layer;
function icon(icon: IconName | IconLookup, params?: IconParams): Icon;
import {IconDefinition, IconLookup, IconName, IconPrefix} from '@fortawesome/fontawesome-common-types';
export {IconDefinition, IconLookup, IconName, IconPrefix} from '@fortawesome/fontawesome-common-types';
export const dom: DOM;
export const library: Library;
export const parse: { transform(transformString: string): Transform };
export const config: Config;
export function noAuto():void;
export function findIconDefinition(iconLookup: IconLookup): IconDefinition;
export function text(content: string, params?: Params): Text;
export function layer(
assembler: (
addLayerCallback: (layerToAdd: IconLookup | IconLookup[]) => void
) => void
): Layer;
export function icon(icon: IconName | IconLookup, params?: IconParams): Icon;
type IconProp = IconName | [IconPrefix, IconName] | IconLookup;
type FlipProp = "horizontal" | "vertical" | "both";
type SizeProp =
| "xs"
| "lg"
| "sm"
| "1x"
| "2x"
| "3x"
| "4x"
| "5x"
| "6x"
| "7x"
| "8x"
| "9x"
| "10x";
type PullProp = "left" | "right";
type RotateProp = 90 | 180 | 270;
type FaSymbol = string | boolean;
interface Config {
familyPrefix: IconPrefix;
replacementClass: string;
autoReplaceSvg: true;
autoAddCss: true;
autoA11y: true;
searchPseudoElements: false;
observeMutations: true;
keepOriginalSource: true;
measurePerformance: false;
showMissingIcons: true;
}
interface FontawesomeObject {
readonly abstract: object;
readonly html: string;
readonly node: HTMLCollection;
}
interface Icon extends FontawesomeObject, IconDefinition {
readonly type: "icon";
}
interface Text extends FontawesomeObject {
readonly type: "text";
}
interface Layer extends FontawesomeObject {
readonly type: "layer";
}
interface Attributes {
[key: string]: number | string;
}
interface Styles {
[key: string]: string;
}
interface Transform {
size?: number;
x?: number;
y?: number;
rotate?: number;
flipX?: boolean;
flipY?: boolean;
}
interface Params {
transform?: Transform;
title?: string;
classes?: string | string[];
attributes?: Attributes;
styles?: Styles;
}
interface IconParams extends Params {
symbol?: FaSymbol;
mask?: IconLookup;
}
interface DOM {
i2svg(params: { node: Node; callback: () => void }): void;
css(): string;
insertCss(): string;
}
interface Library {
add(...definitions: IconDefinition[]): void;
reset(): void;
}
export type IconProp = IconName | [IconPrefix, IconName] | IconLookup;
export type FlipProp = "horizontal" | "vertical" | "both";
export type SizeProp =
| "xs"
| "lg"
| "sm"
| "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: IconPrefix;
replacementClass: string;
autoReplaceSvg: boolean | 'nest';
autoAddCss: boolean;
autoA11y: boolean;
searchPseudoElements: boolean;
observeMutations: boolean;
keepOriginalSource: boolean;
measurePerformance: boolean;
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 Layer extends FontawesomeObject {
readonly type: "layer";
}
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 {
transform?: Transform;
title?: string;
classes?: string | string[];
attributes?: Attributes;
styles?: Styles;
}
export interface IconParams extends Params {
symbol?: FaSymbol;
mask?: IconLookup;
}
export interface DOM {
i2svg(params: { node: Node; callback: () => void }): void;
css(): string;
insertCss(): string;
}
export interface Library {
add(...definitions: IconDefinition[]): void;
reset(): void;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -47,9 +47,9 @@
"node": ">=6"
},
"dependencies": {
"@fortawesome/fontawesome-common-types": "^0.1.0"
"@fortawesome/fontawesome-common-types": "^0.1.1"
},
"version": "1.1.1",
"version": "1.1.2",
"name": "@fortawesome/fontawesome",
"main": "index.js",
"module": "index.es.js",

View File

@@ -1,5 +1,5 @@
/*!
* Font Awesome Pro 5.0.3 by @fontawesome - http://fontawesome.com
* Font Awesome Pro 5.0.4 by @fontawesome - http://fontawesome.com
* License - http://fontawesome.com/license (Commercial License)
*/
svg:not(:root).svg-inline--fa {
@@ -79,7 +79,7 @@ svg:not(:root).svg-inline--fa {
height: 1em;
position: relative;
text-align: center;
vertical-align: -12.5%;
vertical-align: -.125em;
width: 1em; }
.fa-layers svg.svg-inline--fa {
-webkit-transform-origin: center center;