Release 5.0.1 (#913)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Font Awesome Pro 5.0.0 by @fontawesome - http://fontawesome.com
|
||||
* Font Awesome Pro 5.0.1 by @fontawesome - http://fontawesome.com
|
||||
* License - http://fontawesome.com/license (Commercial License)
|
||||
*/
|
||||
var noop = function noop() {};
|
||||
@@ -229,6 +229,16 @@ function toArray(obj) {
|
||||
return array;
|
||||
}
|
||||
|
||||
function classArray(node) {
|
||||
if (node.classList) {
|
||||
return toArray(node.classList);
|
||||
} else {
|
||||
return (node.getAttribute('class') || '').split(' ').filter(function (i) {
|
||||
return i;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getIconName(familyPrefix, cls) {
|
||||
var parts = cls.split('-');
|
||||
var prefix = parts[0];
|
||||
@@ -553,7 +563,7 @@ function makeLayersTextAbstract(params) {
|
||||
|
||||
var noop$2 = function noop() {};
|
||||
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$2, measure: noop$2 };
|
||||
var preamble = 'FA "5.0.0"';
|
||||
var preamble = 'FA "5.0.1"';
|
||||
|
||||
var begin = function begin(name) {
|
||||
p.mark(preamble + ' ' + name + ' begins');
|
||||
@@ -569,6 +579,157 @@ var end = function end(name) {
|
||||
|
||||
var perf = { begin: begin, end: end };
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Internal helper to bind a function known to have 4 arguments
|
||||
* to a given context.
|
||||
*/
|
||||
var bindInternal4 = function bindInternal4 (func, thisContext) {
|
||||
return function (a, b, c, d) {
|
||||
return func.call(thisContext, a, b, c, d);
|
||||
};
|
||||
};
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* # Reduce
|
||||
*
|
||||
* A fast object `.reduce()` implementation.
|
||||
*
|
||||
* @param {Object} subject The object to reduce over.
|
||||
* @param {Function} fn The reducer function.
|
||||
* @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
|
||||
* @param {Object} thisContext The context for the reducer.
|
||||
* @return {mixed} The final result.
|
||||
*/
|
||||
var reduce = function fastReduceObject (subject, fn, initialValue, thisContext) {
|
||||
var keys = Object.keys(subject),
|
||||
length = keys.length,
|
||||
iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
|
||||
i, key, result;
|
||||
|
||||
if (initialValue === undefined) {
|
||||
i = 1;
|
||||
result = subject[keys[0]];
|
||||
}
|
||||
else {
|
||||
i = 0;
|
||||
result = initialValue;
|
||||
}
|
||||
|
||||
for (; i < length; i++) {
|
||||
key = keys[i];
|
||||
result = iterator(result, subject[key], key, subject);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
var styles$2 = namespace.styles;
|
||||
var shims = namespace.shims;
|
||||
|
||||
|
||||
var _byUnicode = {};
|
||||
var _byLigature = {};
|
||||
var _byOldName = {};
|
||||
|
||||
var build = function build() {
|
||||
var lookup = function lookup(reducer) {
|
||||
return reduce(styles$2, function (o, style, prefix) {
|
||||
o[prefix] = reduce(style, reducer, {});
|
||||
return o;
|
||||
}, {});
|
||||
};
|
||||
|
||||
_byUnicode = lookup(function (acc, icon, iconName) {
|
||||
acc[icon[3]] = iconName;
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
_byLigature = lookup(function (acc, icon, iconName) {
|
||||
var ligatures = icon[2];
|
||||
|
||||
acc[iconName] = iconName;
|
||||
|
||||
ligatures.forEach(function (ligature) {
|
||||
acc[ligature] = iconName;
|
||||
});
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
var hasRegular = 'far' in styles$2;
|
||||
|
||||
_byOldName = reduce(shims, function (acc, shim) {
|
||||
var oldName = shim[0];
|
||||
var prefix = shim[1];
|
||||
var iconName = shim[2];
|
||||
|
||||
if (prefix === 'far' && !hasRegular) {
|
||||
prefix = 'fas';
|
||||
}
|
||||
|
||||
acc[oldName] = { prefix: prefix, iconName: iconName };
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
|
||||
build();
|
||||
|
||||
function byUnicode(prefix, unicode) {
|
||||
return _byUnicode[prefix][unicode];
|
||||
}
|
||||
|
||||
function byLigature(prefix, ligature) {
|
||||
return _byLigature[prefix][ligature];
|
||||
}
|
||||
|
||||
function byOldName(name) {
|
||||
return _byOldName[name] || { prefix: null, iconName: null };
|
||||
}
|
||||
|
||||
var styles$1 = namespace.styles;
|
||||
|
||||
|
||||
var emptyCanonicalIcon = function emptyCanonicalIcon() {
|
||||
return { prefix: null, iconName: null, rest: [] };
|
||||
};
|
||||
|
||||
function getCanonicalIcon(values) {
|
||||
return values.reduce(function (acc, cls) {
|
||||
var iconName = getIconName(config.familyPrefix, cls);
|
||||
|
||||
if (styles$1[cls]) {
|
||||
acc.prefix = cls;
|
||||
} else if (iconName) {
|
||||
var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
|
||||
|
||||
acc.iconName = shim.iconName || iconName;
|
||||
acc.prefix = shim.prefix || acc.prefix;
|
||||
} else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {
|
||||
acc.rest.push(cls);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, emptyCanonicalIcon());
|
||||
}
|
||||
|
||||
function iconFromMapping(mapping, prefix, iconName) {
|
||||
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
||||
return {
|
||||
prefix: prefix,
|
||||
iconName: iconName,
|
||||
icon: mapping[prefix][iconName]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function toHtml(abstractNodes) {
|
||||
var tag = abstractNodes.tag,
|
||||
_abstractNodes$attrib = abstractNodes.attributes,
|
||||
@@ -603,7 +764,14 @@ var mutators = {
|
||||
var newOuterHTML = abstract.map(function (a) {
|
||||
return toHtml(a);
|
||||
}).join('\n');
|
||||
if (node.parentNode) node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
|
||||
|
||||
if (node.parentNode && node.outerHTML) {
|
||||
node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
|
||||
} else if (node.parentNode) {
|
||||
var newNode = document.createElement('span');
|
||||
node.parentNode.replaceChild(newNode, node);
|
||||
newNode.outerHTML = newOuterHTML;
|
||||
}
|
||||
},
|
||||
nest: function nest(mutation) {
|
||||
var node = mutation[0];
|
||||
@@ -611,7 +779,7 @@ var mutators = {
|
||||
|
||||
// If we already have a replaced node we do not want to continue nesting within it.
|
||||
// Short-circuit to the standard replacement
|
||||
if (~toArray(node.classList).indexOf(config.replacementClass)) {
|
||||
if (~classArray(node).indexOf(config.replacementClass)) {
|
||||
return mutators.replace(mutation);
|
||||
}
|
||||
|
||||
@@ -690,121 +858,6 @@ var styleParser = function (node) {
|
||||
return val;
|
||||
};
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Internal helper to bind a function known to have 4 arguments
|
||||
* to a given context.
|
||||
*/
|
||||
var bindInternal4 = function bindInternal4 (func, thisContext) {
|
||||
return function (a, b, c, d) {
|
||||
return func.call(thisContext, a, b, c, d);
|
||||
};
|
||||
};
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* # Reduce
|
||||
*
|
||||
* A fast object `.reduce()` implementation.
|
||||
*
|
||||
* @param {Object} subject The object to reduce over.
|
||||
* @param {Function} fn The reducer function.
|
||||
* @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
|
||||
* @param {Object} thisContext The context for the reducer.
|
||||
* @return {mixed} The final result.
|
||||
*/
|
||||
var reduce = function fastReduceObject (subject, fn, initialValue, thisContext) {
|
||||
var keys = Object.keys(subject),
|
||||
length = keys.length,
|
||||
iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
|
||||
i, key, result;
|
||||
|
||||
if (initialValue === undefined) {
|
||||
i = 1;
|
||||
result = subject[keys[0]];
|
||||
}
|
||||
else {
|
||||
i = 0;
|
||||
result = initialValue;
|
||||
}
|
||||
|
||||
for (; i < length; i++) {
|
||||
key = keys[i];
|
||||
result = iterator(result, subject[key], key, subject);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
var styles$1 = namespace.styles;
|
||||
var shims = namespace.shims;
|
||||
|
||||
|
||||
var _byUnicode = {};
|
||||
var _byLigature = {};
|
||||
var _byOldName = {};
|
||||
|
||||
var build = function build() {
|
||||
var lookup = function lookup(reducer) {
|
||||
return reduce(styles$1, function (o, style, prefix) {
|
||||
o[prefix] = reduce(style, reducer, {});
|
||||
return o;
|
||||
}, {});
|
||||
};
|
||||
|
||||
_byUnicode = lookup(function (acc, icon, iconName) {
|
||||
acc[icon[3]] = iconName;
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
_byLigature = lookup(function (acc, icon, iconName) {
|
||||
var ligatures = icon[2];
|
||||
|
||||
acc[iconName] = iconName;
|
||||
|
||||
ligatures.forEach(function (ligature) {
|
||||
acc[ligature] = iconName;
|
||||
});
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
var hasRegular = 'far' in styles$1;
|
||||
|
||||
_byOldName = reduce(shims, function (acc, shim) {
|
||||
var oldName = shim[0];
|
||||
var prefix = shim[1];
|
||||
var iconName = shim[2];
|
||||
|
||||
if (prefix === 'far' && !hasRegular) {
|
||||
prefix = 'fas';
|
||||
}
|
||||
|
||||
acc[oldName] = { prefix: prefix, iconName: iconName };
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
|
||||
build();
|
||||
|
||||
function byUnicode(prefix, unicode) {
|
||||
return _byUnicode[prefix][unicode];
|
||||
}
|
||||
|
||||
function byLigature(prefix, ligature) {
|
||||
return _byLigature[prefix][ligature];
|
||||
}
|
||||
|
||||
function byOldName(name) {
|
||||
return _byOldName[name] || { prefix: null, iconName: null };
|
||||
}
|
||||
|
||||
function toHex(unicode) {
|
||||
var result = '';
|
||||
|
||||
@@ -816,48 +869,12 @@ function toHex(unicode) {
|
||||
return result;
|
||||
}
|
||||
|
||||
var styles$2 = namespace.styles;
|
||||
|
||||
|
||||
var emptyCanonicalIcon = function emptyCanonicalIcon() {
|
||||
return { prefix: null, iconName: null, rest: [] };
|
||||
};
|
||||
|
||||
function getCanonicalIcon(values) {
|
||||
return values.reduce(function (acc, cls) {
|
||||
var iconName = getIconName(config.familyPrefix, cls);
|
||||
|
||||
if (styles$2[cls]) {
|
||||
acc.prefix = cls;
|
||||
} else if (iconName) {
|
||||
var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
|
||||
|
||||
acc.iconName = shim.iconName || iconName;
|
||||
acc.prefix = shim.prefix || acc.prefix;
|
||||
} else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {
|
||||
acc.rest.push(cls);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, emptyCanonicalIcon());
|
||||
}
|
||||
|
||||
function iconFromMapping(mapping, prefix, iconName) {
|
||||
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
||||
return {
|
||||
prefix: prefix,
|
||||
iconName: iconName,
|
||||
icon: mapping[prefix][iconName]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
var classParser = function (node) {
|
||||
var existingPrefix = node.getAttribute('data-prefix');
|
||||
var existingIconName = node.getAttribute('data-icon');
|
||||
var innerText = node.innerText !== undefined ? node.innerText.trim() : '';
|
||||
|
||||
var val = getCanonicalIcon(toArray(node.classList));
|
||||
var val = getCanonicalIcon(classArray(node));
|
||||
|
||||
if (existingPrefix && existingIconName) {
|
||||
val.prefix = existingPrefix;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Font Awesome Pro 5.0.0 by @fontawesome - http://fontawesome.com
|
||||
* Font Awesome Pro 5.0.1 by @fontawesome - http://fontawesome.com
|
||||
* License - http://fontawesome.com/license (Commercial License)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
@@ -235,6 +235,16 @@ function toArray(obj) {
|
||||
return array;
|
||||
}
|
||||
|
||||
function classArray(node) {
|
||||
if (node.classList) {
|
||||
return toArray(node.classList);
|
||||
} else {
|
||||
return (node.getAttribute('class') || '').split(' ').filter(function (i) {
|
||||
return i;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getIconName(familyPrefix, cls) {
|
||||
var parts = cls.split('-');
|
||||
var prefix = parts[0];
|
||||
@@ -559,7 +569,7 @@ function makeLayersTextAbstract(params) {
|
||||
|
||||
var noop$2 = function noop() {};
|
||||
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$2, measure: noop$2 };
|
||||
var preamble = 'FA "5.0.0"';
|
||||
var preamble = 'FA "5.0.1"';
|
||||
|
||||
var begin = function begin(name) {
|
||||
p.mark(preamble + ' ' + name + ' begins');
|
||||
@@ -575,6 +585,157 @@ var end = function end(name) {
|
||||
|
||||
var perf = { begin: begin, end: end };
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Internal helper to bind a function known to have 4 arguments
|
||||
* to a given context.
|
||||
*/
|
||||
var bindInternal4 = function bindInternal4 (func, thisContext) {
|
||||
return function (a, b, c, d) {
|
||||
return func.call(thisContext, a, b, c, d);
|
||||
};
|
||||
};
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* # Reduce
|
||||
*
|
||||
* A fast object `.reduce()` implementation.
|
||||
*
|
||||
* @param {Object} subject The object to reduce over.
|
||||
* @param {Function} fn The reducer function.
|
||||
* @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
|
||||
* @param {Object} thisContext The context for the reducer.
|
||||
* @return {mixed} The final result.
|
||||
*/
|
||||
var reduce = function fastReduceObject (subject, fn, initialValue, thisContext) {
|
||||
var keys = Object.keys(subject),
|
||||
length = keys.length,
|
||||
iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
|
||||
i, key, result;
|
||||
|
||||
if (initialValue === undefined) {
|
||||
i = 1;
|
||||
result = subject[keys[0]];
|
||||
}
|
||||
else {
|
||||
i = 0;
|
||||
result = initialValue;
|
||||
}
|
||||
|
||||
for (; i < length; i++) {
|
||||
key = keys[i];
|
||||
result = iterator(result, subject[key], key, subject);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
var styles$2 = namespace.styles;
|
||||
var shims = namespace.shims;
|
||||
|
||||
|
||||
var _byUnicode = {};
|
||||
var _byLigature = {};
|
||||
var _byOldName = {};
|
||||
|
||||
var build = function build() {
|
||||
var lookup = function lookup(reducer) {
|
||||
return reduce(styles$2, function (o, style, prefix) {
|
||||
o[prefix] = reduce(style, reducer, {});
|
||||
return o;
|
||||
}, {});
|
||||
};
|
||||
|
||||
_byUnicode = lookup(function (acc, icon, iconName) {
|
||||
acc[icon[3]] = iconName;
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
_byLigature = lookup(function (acc, icon, iconName) {
|
||||
var ligatures = icon[2];
|
||||
|
||||
acc[iconName] = iconName;
|
||||
|
||||
ligatures.forEach(function (ligature) {
|
||||
acc[ligature] = iconName;
|
||||
});
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
var hasRegular = 'far' in styles$2;
|
||||
|
||||
_byOldName = reduce(shims, function (acc, shim) {
|
||||
var oldName = shim[0];
|
||||
var prefix = shim[1];
|
||||
var iconName = shim[2];
|
||||
|
||||
if (prefix === 'far' && !hasRegular) {
|
||||
prefix = 'fas';
|
||||
}
|
||||
|
||||
acc[oldName] = { prefix: prefix, iconName: iconName };
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
|
||||
build();
|
||||
|
||||
function byUnicode(prefix, unicode) {
|
||||
return _byUnicode[prefix][unicode];
|
||||
}
|
||||
|
||||
function byLigature(prefix, ligature) {
|
||||
return _byLigature[prefix][ligature];
|
||||
}
|
||||
|
||||
function byOldName(name) {
|
||||
return _byOldName[name] || { prefix: null, iconName: null };
|
||||
}
|
||||
|
||||
var styles$1 = namespace.styles;
|
||||
|
||||
|
||||
var emptyCanonicalIcon = function emptyCanonicalIcon() {
|
||||
return { prefix: null, iconName: null, rest: [] };
|
||||
};
|
||||
|
||||
function getCanonicalIcon(values) {
|
||||
return values.reduce(function (acc, cls) {
|
||||
var iconName = getIconName(config.familyPrefix, cls);
|
||||
|
||||
if (styles$1[cls]) {
|
||||
acc.prefix = cls;
|
||||
} else if (iconName) {
|
||||
var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
|
||||
|
||||
acc.iconName = shim.iconName || iconName;
|
||||
acc.prefix = shim.prefix || acc.prefix;
|
||||
} else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {
|
||||
acc.rest.push(cls);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, emptyCanonicalIcon());
|
||||
}
|
||||
|
||||
function iconFromMapping(mapping, prefix, iconName) {
|
||||
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
||||
return {
|
||||
prefix: prefix,
|
||||
iconName: iconName,
|
||||
icon: mapping[prefix][iconName]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function toHtml(abstractNodes) {
|
||||
var tag = abstractNodes.tag,
|
||||
_abstractNodes$attrib = abstractNodes.attributes,
|
||||
@@ -609,7 +770,14 @@ var mutators = {
|
||||
var newOuterHTML = abstract.map(function (a) {
|
||||
return toHtml(a);
|
||||
}).join('\n');
|
||||
if (node.parentNode) node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
|
||||
|
||||
if (node.parentNode && node.outerHTML) {
|
||||
node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : '');
|
||||
} else if (node.parentNode) {
|
||||
var newNode = document.createElement('span');
|
||||
node.parentNode.replaceChild(newNode, node);
|
||||
newNode.outerHTML = newOuterHTML;
|
||||
}
|
||||
},
|
||||
nest: function nest(mutation) {
|
||||
var node = mutation[0];
|
||||
@@ -617,7 +785,7 @@ var mutators = {
|
||||
|
||||
// If we already have a replaced node we do not want to continue nesting within it.
|
||||
// Short-circuit to the standard replacement
|
||||
if (~toArray(node.classList).indexOf(config.replacementClass)) {
|
||||
if (~classArray(node).indexOf(config.replacementClass)) {
|
||||
return mutators.replace(mutation);
|
||||
}
|
||||
|
||||
@@ -696,121 +864,6 @@ var styleParser = function (node) {
|
||||
return val;
|
||||
};
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Internal helper to bind a function known to have 4 arguments
|
||||
* to a given context.
|
||||
*/
|
||||
var bindInternal4 = function bindInternal4 (func, thisContext) {
|
||||
return function (a, b, c, d) {
|
||||
return func.call(thisContext, a, b, c, d);
|
||||
};
|
||||
};
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* # Reduce
|
||||
*
|
||||
* A fast object `.reduce()` implementation.
|
||||
*
|
||||
* @param {Object} subject The object to reduce over.
|
||||
* @param {Function} fn The reducer function.
|
||||
* @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
|
||||
* @param {Object} thisContext The context for the reducer.
|
||||
* @return {mixed} The final result.
|
||||
*/
|
||||
var reduce = function fastReduceObject (subject, fn, initialValue, thisContext) {
|
||||
var keys = Object.keys(subject),
|
||||
length = keys.length,
|
||||
iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
|
||||
i, key, result;
|
||||
|
||||
if (initialValue === undefined) {
|
||||
i = 1;
|
||||
result = subject[keys[0]];
|
||||
}
|
||||
else {
|
||||
i = 0;
|
||||
result = initialValue;
|
||||
}
|
||||
|
||||
for (; i < length; i++) {
|
||||
key = keys[i];
|
||||
result = iterator(result, subject[key], key, subject);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
var styles$1 = namespace.styles;
|
||||
var shims = namespace.shims;
|
||||
|
||||
|
||||
var _byUnicode = {};
|
||||
var _byLigature = {};
|
||||
var _byOldName = {};
|
||||
|
||||
var build = function build() {
|
||||
var lookup = function lookup(reducer) {
|
||||
return reduce(styles$1, function (o, style, prefix) {
|
||||
o[prefix] = reduce(style, reducer, {});
|
||||
return o;
|
||||
}, {});
|
||||
};
|
||||
|
||||
_byUnicode = lookup(function (acc, icon, iconName) {
|
||||
acc[icon[3]] = iconName;
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
_byLigature = lookup(function (acc, icon, iconName) {
|
||||
var ligatures = icon[2];
|
||||
|
||||
acc[iconName] = iconName;
|
||||
|
||||
ligatures.forEach(function (ligature) {
|
||||
acc[ligature] = iconName;
|
||||
});
|
||||
|
||||
return acc;
|
||||
});
|
||||
|
||||
var hasRegular = 'far' in styles$1;
|
||||
|
||||
_byOldName = reduce(shims, function (acc, shim) {
|
||||
var oldName = shim[0];
|
||||
var prefix = shim[1];
|
||||
var iconName = shim[2];
|
||||
|
||||
if (prefix === 'far' && !hasRegular) {
|
||||
prefix = 'fas';
|
||||
}
|
||||
|
||||
acc[oldName] = { prefix: prefix, iconName: iconName };
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
|
||||
build();
|
||||
|
||||
function byUnicode(prefix, unicode) {
|
||||
return _byUnicode[prefix][unicode];
|
||||
}
|
||||
|
||||
function byLigature(prefix, ligature) {
|
||||
return _byLigature[prefix][ligature];
|
||||
}
|
||||
|
||||
function byOldName(name) {
|
||||
return _byOldName[name] || { prefix: null, iconName: null };
|
||||
}
|
||||
|
||||
function toHex(unicode) {
|
||||
var result = '';
|
||||
|
||||
@@ -822,48 +875,12 @@ function toHex(unicode) {
|
||||
return result;
|
||||
}
|
||||
|
||||
var styles$2 = namespace.styles;
|
||||
|
||||
|
||||
var emptyCanonicalIcon = function emptyCanonicalIcon() {
|
||||
return { prefix: null, iconName: null, rest: [] };
|
||||
};
|
||||
|
||||
function getCanonicalIcon(values) {
|
||||
return values.reduce(function (acc, cls) {
|
||||
var iconName = getIconName(config.familyPrefix, cls);
|
||||
|
||||
if (styles$2[cls]) {
|
||||
acc.prefix = cls;
|
||||
} else if (iconName) {
|
||||
var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};
|
||||
|
||||
acc.iconName = shim.iconName || iconName;
|
||||
acc.prefix = shim.prefix || acc.prefix;
|
||||
} else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {
|
||||
acc.rest.push(cls);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, emptyCanonicalIcon());
|
||||
}
|
||||
|
||||
function iconFromMapping(mapping, prefix, iconName) {
|
||||
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
||||
return {
|
||||
prefix: prefix,
|
||||
iconName: iconName,
|
||||
icon: mapping[prefix][iconName]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
var classParser = function (node) {
|
||||
var existingPrefix = node.getAttribute('data-prefix');
|
||||
var existingIconName = node.getAttribute('data-icon');
|
||||
var innerText = node.innerText !== undefined ? node.innerText.trim() : '';
|
||||
|
||||
var val = getCanonicalIcon(toArray(node.classList));
|
||||
var val = getCanonicalIcon(classArray(node));
|
||||
|
||||
if (existingPrefix && existingIconName) {
|
||||
val.prefix = existingPrefix;
|
||||
|
||||
@@ -1,9 +1,53 @@
|
||||
{
|
||||
"description": "The iconic font, CSS, and SVG framework",
|
||||
"keywords": [
|
||||
"font",
|
||||
"awesome",
|
||||
"fontawesome",
|
||||
"icon",
|
||||
"svg",
|
||||
"bootstrap"
|
||||
],
|
||||
"homepage": "https://fontawesome.com",
|
||||
"bugs": {
|
||||
"url": "http://github.com/FortAwesome/Font-Awesome/issues"
|
||||
},
|
||||
"author": {
|
||||
"name": "Dave Gandy",
|
||||
"email": "dave@fontawesome.com",
|
||||
"web": "http://twitter.com/davegandy"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Brian Talbot",
|
||||
"web": "http://twitter.com/talbs"
|
||||
},
|
||||
{
|
||||
"name": "Travis Chase",
|
||||
"web": "http://twitter.com/supercodepoet"
|
||||
},
|
||||
{
|
||||
"name": "Rob Madole",
|
||||
"web": "http://twitter.com/robmadole"
|
||||
},
|
||||
{
|
||||
"name": "Geremia Taglialatela",
|
||||
"web": "http://twitter.com/gtagliala"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FortAwesome/Font-Awesome"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"dependencies": {},
|
||||
"version": "1.0.1",
|
||||
"name": "@fortawesome/fontawesome",
|
||||
"main": "index.js",
|
||||
"module": "index.es.js",
|
||||
"repository": "https://github.com/FortAwesome/Font-Awesome-Pro",
|
||||
"jsnext:main": "index.es.js",
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"name": "@fortawesome/fontawesome"
|
||||
"style": "styles.css",
|
||||
"license": "UNLICENSED"
|
||||
}
|
||||
343
advanced-options/use-with-node-js/fontawesome/styles.css
vendored
Normal file
343
advanced-options/use-with-node-js/fontawesome/styles.css
vendored
Normal file
@@ -0,0 +1,343 @@
|
||||
/*!
|
||||
* Font Awesome Pro 5.0.1 by @fontawesome - http://fontawesome.com
|
||||
* License - http://fontawesome.com/license (Commercial License)
|
||||
*/
|
||||
svg:not(:root).svg-inline--fa {
|
||||
overflow: visible; }
|
||||
|
||||
.svg-inline--fa {
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: 1em;
|
||||
overflow: visible;
|
||||
vertical-align: -.125em; }
|
||||
.svg-inline--fa.fa-lg {
|
||||
vertical-align: -.225em; }
|
||||
.svg-inline--fa.fa-w-1 {
|
||||
width: 0.0625em; }
|
||||
.svg-inline--fa.fa-w-2 {
|
||||
width: 0.125em; }
|
||||
.svg-inline--fa.fa-w-3 {
|
||||
width: 0.1875em; }
|
||||
.svg-inline--fa.fa-w-4 {
|
||||
width: 0.25em; }
|
||||
.svg-inline--fa.fa-w-5 {
|
||||
width: 0.3125em; }
|
||||
.svg-inline--fa.fa-w-6 {
|
||||
width: 0.375em; }
|
||||
.svg-inline--fa.fa-w-7 {
|
||||
width: 0.4375em; }
|
||||
.svg-inline--fa.fa-w-8 {
|
||||
width: 0.5em; }
|
||||
.svg-inline--fa.fa-w-9 {
|
||||
width: 0.5625em; }
|
||||
.svg-inline--fa.fa-w-10 {
|
||||
width: 0.625em; }
|
||||
.svg-inline--fa.fa-w-11 {
|
||||
width: 0.6875em; }
|
||||
.svg-inline--fa.fa-w-12 {
|
||||
width: 0.75em; }
|
||||
.svg-inline--fa.fa-w-13 {
|
||||
width: 0.8125em; }
|
||||
.svg-inline--fa.fa-w-14 {
|
||||
width: 0.875em; }
|
||||
.svg-inline--fa.fa-w-15 {
|
||||
width: 0.9375em; }
|
||||
.svg-inline--fa.fa-w-16 {
|
||||
width: 1em; }
|
||||
.svg-inline--fa.fa-w-17 {
|
||||
width: 1.0625em; }
|
||||
.svg-inline--fa.fa-w-18 {
|
||||
width: 1.125em; }
|
||||
.svg-inline--fa.fa-w-19 {
|
||||
width: 1.1875em; }
|
||||
.svg-inline--fa.fa-w-20 {
|
||||
width: 1.25em; }
|
||||
.svg-inline--fa.fa-pull-left {
|
||||
margin-right: .3em;
|
||||
width: auto; }
|
||||
.svg-inline--fa.fa-pull-right {
|
||||
margin-left: .3em;
|
||||
width: auto; }
|
||||
.svg-inline--fa.fa-border {
|
||||
height: 1.5em; }
|
||||
.svg-inline--fa.fa-li {
|
||||
width: 2em; }
|
||||
.svg-inline--fa.fa-fw {
|
||||
width: 1.25em; }
|
||||
|
||||
.fa-layers svg.svg-inline--fa {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0; }
|
||||
|
||||
.fa-layers {
|
||||
display: inline-block;
|
||||
height: 1em;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
vertical-align: -12.5%;
|
||||
width: 1em; }
|
||||
.fa-layers svg.svg-inline--fa {
|
||||
-webkit-transform-origin: center center;
|
||||
transform-origin: center center; }
|
||||
|
||||
.fa-layers-text, .fa-layers-counter {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: center; }
|
||||
|
||||
.fa-layers-text {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
-webkit-transform-origin: center center;
|
||||
transform-origin: center center; }
|
||||
|
||||
.fa-layers-counter {
|
||||
background-color: #ff253a;
|
||||
border-radius: 1em;
|
||||
color: #fff;
|
||||
height: 1.5em;
|
||||
line-height: 1;
|
||||
max-width: 5em;
|
||||
min-width: 1.5em;
|
||||
overflow: hidden;
|
||||
padding: .25em;
|
||||
right: 0;
|
||||
text-overflow: ellipsis;
|
||||
top: 0;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: top right;
|
||||
transform-origin: top right; }
|
||||
|
||||
.fa-layers-bottom-right {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
top: auto;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: bottom right;
|
||||
transform-origin: bottom right; }
|
||||
|
||||
.fa-layers-bottom-left {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: auto;
|
||||
top: auto;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: bottom left;
|
||||
transform-origin: bottom left; }
|
||||
|
||||
.fa-layers-top-right {
|
||||
right: 0;
|
||||
top: 0;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: top right;
|
||||
transform-origin: top right; }
|
||||
|
||||
.fa-layers-top-left {
|
||||
left: 0;
|
||||
right: auto;
|
||||
top: 0;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: top left;
|
||||
transform-origin: top left; }
|
||||
|
||||
.fa-lg {
|
||||
font-size: 1.33333em;
|
||||
line-height: 0.75em;
|
||||
vertical-align: -.0667em; }
|
||||
|
||||
.fa-xs {
|
||||
font-size: .75em; }
|
||||
|
||||
.fa-sm {
|
||||
font-size: .875em; }
|
||||
|
||||
.fa-1x {
|
||||
font-size: 1em; }
|
||||
|
||||
.fa-2x {
|
||||
font-size: 2em; }
|
||||
|
||||
.fa-3x {
|
||||
font-size: 3em; }
|
||||
|
||||
.fa-4x {
|
||||
font-size: 4em; }
|
||||
|
||||
.fa-5x {
|
||||
font-size: 5em; }
|
||||
|
||||
.fa-6x {
|
||||
font-size: 6em; }
|
||||
|
||||
.fa-7x {
|
||||
font-size: 7em; }
|
||||
|
||||
.fa-8x {
|
||||
font-size: 8em; }
|
||||
|
||||
.fa-9x {
|
||||
font-size: 9em; }
|
||||
|
||||
.fa-10x {
|
||||
font-size: 10em; }
|
||||
|
||||
.fa-fw {
|
||||
text-align: center;
|
||||
width: 1.25em; }
|
||||
|
||||
.fa-ul {
|
||||
list-style-type: none;
|
||||
margin-left: 2.5em;
|
||||
padding-left: 0; }
|
||||
.fa-ul > li {
|
||||
position: relative; }
|
||||
|
||||
.fa-li {
|
||||
left: -2em;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 2em;
|
||||
line-height: inherit; }
|
||||
|
||||
.fa-border {
|
||||
border: solid 0.08em #eee;
|
||||
border-radius: .1em;
|
||||
padding: .2em .25em .15em; }
|
||||
|
||||
.fa-pull-left {
|
||||
float: left; }
|
||||
|
||||
.fa-pull-right {
|
||||
float: right; }
|
||||
|
||||
.fa.fa-pull-left,
|
||||
.fas.fa-pull-left,
|
||||
.far.fa-pull-left,
|
||||
.fal.fa-pull-left,
|
||||
.fab.fa-pull-left {
|
||||
margin-right: .3em; }
|
||||
|
||||
.fa.fa-pull-right,
|
||||
.fas.fa-pull-right,
|
||||
.far.fa-pull-right,
|
||||
.fal.fa-pull-right,
|
||||
.fab.fa-pull-right {
|
||||
margin-left: .3em; }
|
||||
|
||||
.fa-spin {
|
||||
-webkit-animation: fa-spin 2s infinite linear;
|
||||
animation: fa-spin 2s infinite linear; }
|
||||
|
||||
.fa-pulse {
|
||||
-webkit-animation: fa-spin 1s infinite steps(8);
|
||||
animation: fa-spin 1s infinite steps(8); }
|
||||
|
||||
@-webkit-keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
.fa-rotate-90 {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg); }
|
||||
|
||||
.fa-rotate-180 {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
|
||||
-webkit-transform: rotate(180deg);
|
||||
transform: rotate(180deg); }
|
||||
|
||||
.fa-rotate-270 {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
|
||||
-webkit-transform: rotate(270deg);
|
||||
transform: rotate(270deg); }
|
||||
|
||||
.fa-flip-horizontal {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
|
||||
-webkit-transform: scale(-1, 1);
|
||||
transform: scale(-1, 1); }
|
||||
|
||||
.fa-flip-vertical {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
||||
-webkit-transform: scale(1, -1);
|
||||
transform: scale(1, -1); }
|
||||
|
||||
.fa-flip-horizontal.fa-flip-vertical {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
||||
-webkit-transform: scale(-1, -1);
|
||||
transform: scale(-1, -1); }
|
||||
|
||||
:root .fa-rotate-90,
|
||||
:root .fa-rotate-180,
|
||||
:root .fa-rotate-270,
|
||||
:root .fa-flip-horizontal,
|
||||
:root .fa-flip-vertical {
|
||||
-webkit-filter: none;
|
||||
filter: none; }
|
||||
|
||||
.fa-stack {
|
||||
display: inline-block;
|
||||
height: 2em;
|
||||
position: relative;
|
||||
width: 2em; }
|
||||
|
||||
.fa-stack-1x,
|
||||
.fa-stack-2x {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0; }
|
||||
|
||||
.svg-inline--fa.fa-stack-1x {
|
||||
height: 1em;
|
||||
width: 1em; }
|
||||
|
||||
.svg-inline--fa.fa-stack-2x {
|
||||
height: 2em;
|
||||
width: 2em; }
|
||||
|
||||
.fa-inverse {
|
||||
color: #fff; }
|
||||
|
||||
.sr-only {
|
||||
border: 0;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px; }
|
||||
|
||||
.sr-only-focusable:active, .sr-only-focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
width: auto; }
|
||||
Reference in New Issue
Block a user