@fortawesome/fontawesome
Advanced tools
Comparing version 0.0.13 to 0.0.14
528
index.es.js
@@ -149,2 +149,13 @@ var noop = function noop() {}; | ||
var d = UNITS_IN_GRID; | ||
var meaninglessTransform = { | ||
size: 16, | ||
x: 0, | ||
y: 0, | ||
rotate: 0, | ||
flipX: false, | ||
flipY: false | ||
}; | ||
function isReserved(name) { | ||
@@ -209,3 +220,3 @@ return ~RESERVED_CLASSES.indexOf(name); | ||
function joinAttributes(attributes) { | ||
return Object.keys(attributes).reduce(function (acc, attributeName) { | ||
return Object.keys(attributes || {}).reduce(function (acc, attributeName) { | ||
return acc + (attributeName + '="' + attributes[attributeName] + '" '); | ||
@@ -216,3 +227,3 @@ }, ''); | ||
function joinStyles(styles) { | ||
return Object.keys(styles).reduce(function (acc, styleName) { | ||
return Object.keys(styles || {}).reduce(function (acc, styleName) { | ||
return acc + (styleName + ': ' + styles[styleName] + ';'); | ||
@@ -222,69 +233,55 @@ }, ''); | ||
function toHtml(abstractNodes) { | ||
var tag = abstractNodes.tag, | ||
_abstractNodes$attrib = abstractNodes.attributes, | ||
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib, | ||
_abstractNodes$childr = abstractNodes.children, | ||
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr; | ||
function transformIsMeaningful(transform) { | ||
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY; | ||
} | ||
function transformForSvg(_ref) { | ||
var transform = _ref.transform, | ||
containerWidth = _ref.containerWidth, | ||
iconWidth = _ref.iconWidth; | ||
if (typeof abstractNodes === 'string') { | ||
return htmlEscape(abstractNodes); | ||
} else { | ||
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>'; | ||
} | ||
var outer = { | ||
transform: 'translate(' + containerWidth / 2 + ' 256)' | ||
}; | ||
var innerTranslate = 'translate(' + transform.x * 32 + ', ' + transform.y * 32 + ') '; | ||
var innerScale = 'scale(' + transform.size / 16 * (transform.flipX ? -1 : 1) + ', ' + transform.size / 16 * (transform.flipY ? -1 : 1) + ') '; | ||
var innerRotate = 'rotate(' + transform.rotate + ' 0 0)'; | ||
var inner = { | ||
transform: innerTranslate + ' ' + innerScale + ' ' + innerRotate | ||
}; | ||
var path = { | ||
transform: 'translate(' + iconWidth / 2 * -1 + ' -256)' | ||
}; | ||
return { | ||
outer: outer, | ||
inner: inner, | ||
path: path | ||
}; | ||
} | ||
function MissingIcon(error) { | ||
this.name = 'MissingIcon'; | ||
this.message = error || 'Icon unavailable'; | ||
this.stack = new Error().stack; | ||
} | ||
function transformForCss(_ref2) { | ||
var transform = _ref2.transform, | ||
_ref2$width = _ref2.width, | ||
width = _ref2$width === undefined ? UNITS_IN_GRID : _ref2$width, | ||
_ref2$height = _ref2.height, | ||
height = _ref2$height === undefined ? UNITS_IN_GRID : _ref2$height, | ||
_ref2$startCentered = _ref2.startCentered, | ||
startCentered = _ref2$startCentered === undefined ? false : _ref2$startCentered; | ||
MissingIcon.prototype = Object.create(Error.prototype); | ||
MissingIcon.prototype.constructor = MissingIcon; | ||
var val = ''; | ||
var FILL = { fill: 'currentColor' }; | ||
var ANIMATION_BASE = { | ||
attributeType: 'XML', | ||
repeatCount: 'indefinite', | ||
dur: '2s' | ||
}; | ||
var RING = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z' | ||
}) | ||
}; | ||
var OPACITY_ANIMATE = _extends({}, ANIMATION_BASE, { | ||
attributeName: 'opacity' | ||
}); | ||
var DOT = { | ||
tag: 'circle', | ||
attributes: _extends({}, FILL, { | ||
cx: '256', | ||
cy: '364', | ||
r: '28' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, ANIMATION_BASE, { attributeName: 'r', values: '28;14;28;28;14;28;' }) }, { tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;1;1;0;1;' }) }] | ||
}; | ||
var QUESTION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '1', | ||
d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;0;0;0;1;' }) }] | ||
}; | ||
var EXCLAMATION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '0', | ||
d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '0;0;1;1;0;0;' }) }] | ||
}; | ||
if (startCentered && IS_IE) { | ||
val += 'translate(' + (transform.x / d - width / 2) + 'em, ' + (transform.y / d - height / 2) + 'em) '; | ||
} else if (startCentered) { | ||
val += 'translate(calc(-50% + ' + transform.x / d + 'em), calc(-50% + ' + transform.y / d + 'em)) '; | ||
} else { | ||
val += 'translate(' + transform.x / d + 'em, ' + transform.y / d + 'em) '; | ||
} | ||
var missing = { tag: 'g', children: [RING, DOT, QUESTION, EXCLAMATION] }; | ||
val += 'scale(' + transform.size / d * (transform.flipX ? -1 : 1) + ', ' + transform.size / d * (transform.flipY ? -1 : 1) + ') '; | ||
val += 'rotate(' + transform.rotate + 'deg) '; | ||
return val; | ||
} | ||
var ALL_SPACE = { | ||
@@ -298,3 +295,5 @@ x: 0, | ||
var makeIconComposition = function (_ref) { | ||
var main = _ref.main, | ||
var children = _ref.children, | ||
attributes = _ref.attributes, | ||
main = _ref.main, | ||
compose = _ref.compose, | ||
@@ -308,11 +307,4 @@ transform = _ref.transform; | ||
var groupTranslate = 'translate(' + transform.x * 32 + ', ' + transform.y * 32 + ') '; | ||
var groupScale = 'scale(' + transform.size / 16 * (transform.flipX ? -1 : 1) + ', ' + transform.size / 16 * (transform.flipY ? -1 : 1) + ') '; | ||
var groupRotate = 'rotate(' + transform.rotate + ' 0 0)'; | ||
var groupTransform = { | ||
transform: groupTranslate + ' ' + groupScale + ' ' + groupRotate | ||
}; | ||
var mainTransform = { | ||
transform: 'translate(' + mainWidth / 2 * -1 + ' -256)' | ||
}; | ||
var trans = transformForSvg({ transform: transform, containerWidth: composeWidth, iconWidth: mainWidth }); | ||
var maskRect = { | ||
@@ -326,10 +318,8 @@ tag: 'rect', | ||
tag: 'g', | ||
attributes: _extends({}, groupTransform), | ||
children: [{ tag: 'path', attributes: _extends({}, mainPath.attributes, mainTransform, { fill: 'black' }) }] | ||
attributes: _extends({}, trans.inner), | ||
children: [{ tag: 'path', attributes: _extends({}, mainPath.attributes, trans.path, { fill: 'black' }) }] | ||
}; | ||
var maskOuterGroup = { | ||
tag: 'g', | ||
attributes: { | ||
transform: 'translate(' + composeWidth / 2 + ' 256)' | ||
}, | ||
attributes: _extends({}, trans.outer), | ||
children: [maskInnerGroup] | ||
@@ -353,79 +343,99 @@ }; | ||
return [defs, { tag: 'rect', attributes: _extends({ fill: 'currentColor', 'clip-path': 'url(#' + clipId + ')', mask: 'url(#' + maskId + ')' }, ALL_SPACE) }]; | ||
}; | ||
children.push(defs, { tag: 'rect', attributes: _extends({ fill: 'currentColor', 'clip-path': 'url(#' + clipId + ')', mask: 'url(#' + maskId + ')' }, ALL_SPACE) }); | ||
var d = UNITS_IN_GRID; | ||
var packs$1 = namespace.packs; | ||
var meaninglessTransform = { | ||
size: 16, | ||
x: 0, | ||
y: 0, | ||
rotate: 0, | ||
flipX: false, | ||
flipY: false | ||
return { | ||
children: children, | ||
attributes: attributes | ||
}; | ||
}; | ||
function transformIsMeaningful(transform) { | ||
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY; | ||
} | ||
var makeIconStandard = function (_ref) { | ||
var attributes = _ref.attributes, | ||
main = _ref.main, | ||
transform = _ref.transform, | ||
styles = _ref.styles; | ||
function transformToCss(transform) { | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var _options$startCentere = options.startCentered, | ||
startCentered = _options$startCentere === undefined ? false : _options$startCentere, | ||
_options$width = options.width, | ||
width = _options$width === undefined ? d : _options$width, | ||
_options$height = options.height, | ||
height = _options$height === undefined ? d : _options$height; | ||
var styleString = joinStyles(styles); | ||
var nextChildren = []; | ||
if (styleString.length > 0) { | ||
attributes['style'] = styleString; | ||
} | ||
var val = ''; | ||
if (startCentered && IS_IE) { | ||
val += 'translate(' + (transform.x / d - width / 2) + 'em, ' + (transform.y / d - height / 2) + 'em) '; | ||
} else if (startCentered) { | ||
val += 'translate(calc(-50% + ' + transform.x / d + 'em), calc(-50% + ' + transform.y / d + 'em)) '; | ||
if (transformIsMeaningful(transform)) { | ||
var trans = transformForSvg({ transform: transform, containerWidth: main.width, iconWidth: main.width }); | ||
nextChildren.push({ | ||
tag: 'g', | ||
attributes: _extends({}, trans.outer), | ||
children: [{ | ||
tag: 'g', | ||
attributes: _extends({}, trans.inner), | ||
children: [{ | ||
tag: main.icon.tag, | ||
children: main.icon.children, | ||
attributes: _extends({}, main.icon.attributes, trans.path) | ||
}] | ||
}] | ||
}); | ||
} else { | ||
val += 'translate(' + transform.x / d + 'em, ' + transform.y / d + 'em) '; | ||
nextChildren.push(main.icon); | ||
} | ||
val += 'scale(' + transform.size / d * (transform.flipX ? -1 : 1) + ', ' + transform.size / d * (transform.flipY ? -1 : 1) + ') '; | ||
val += 'rotate(' + transform.rotate + 'deg) '; | ||
return { | ||
children: nextChildren, | ||
attributes: attributes | ||
}; | ||
}; | ||
return val; | ||
} | ||
var asIcon = function (_ref) { | ||
var children = _ref.children, | ||
main = _ref.main, | ||
compose = _ref.compose, | ||
attributes = _ref.attributes, | ||
styles = _ref.styles, | ||
transform = _ref.transform; | ||
function findIcon(iconName, prefix) { | ||
var val = { | ||
found: false, | ||
width: 512, | ||
height: 512, | ||
icon: missing | ||
}; | ||
if (transformIsMeaningful(transform) && main.found && !compose.found) { | ||
var width = main.width, | ||
height = main.height; | ||
if (iconName && prefix && packs$1[prefix] && packs$1[prefix][iconName]) { | ||
var icon = packs$1[prefix][iconName]; | ||
var width = icon[0]; | ||
var height = icon[1]; | ||
var vectorData = icon.slice(4); | ||
val = { | ||
found: true, | ||
width: width, | ||
height: height, | ||
icon: { tag: 'path', attributes: { fill: 'currentColor', d: vectorData[0] } } | ||
var offset = { | ||
x: width / height / 2, | ||
y: 0.5 | ||
}; | ||
} else if (iconName && prefix && !config.showMissingIcons) { | ||
throw new MissingIcon('Icon is missing for prefix ' + prefix + ' with icon name ' + iconName); | ||
attributes['style'] = joinStyles(_extends({}, styles, { | ||
'transform-origin': offset.x + transform.x / 16 + 'em ' + (offset.y + transform.y / 16) + 'em' | ||
})); | ||
} | ||
return val; | ||
} | ||
return [{ | ||
tag: 'svg', | ||
attributes: attributes, | ||
children: children | ||
}]; | ||
}; | ||
var asSymbol = function (_ref) { | ||
var prefix = _ref.prefix, | ||
iconName = _ref.iconName, | ||
children = _ref.children, | ||
attributes = _ref.attributes; | ||
return [{ | ||
tag: 'svg', | ||
attributes: { | ||
style: 'display: none;' | ||
}, | ||
children: [{ | ||
tag: 'symbol', | ||
attributes: _extends({}, attributes, { id: prefix + '-' + config.familyPrefix + '-' + iconName }), | ||
children: children | ||
}] | ||
}]; | ||
}; | ||
function makeInlineSvgAbstract(params) { | ||
var _params$icons = params.icons, | ||
mainIcon = _params$icons.main, | ||
composeIcon = _params$icons.compose, | ||
main = _params$icons.main, | ||
compose = _params$icons.compose, | ||
prefix = params.prefix, | ||
@@ -437,3 +447,3 @@ iconName = params.iconName, | ||
var _ref = composeIcon.found ? composeIcon : mainIcon, | ||
var _ref = compose.found ? compose : main, | ||
width = _ref.width, | ||
@@ -445,39 +455,37 @@ height = _ref.height; | ||
var attributes = _extends({}, extra.attributes, { | ||
'data-prefix': prefix, | ||
'data-icon': iconName, | ||
'class': attrClass, | ||
'role': 'img', | ||
'xmlns': 'http://www.w3.org/2000/svg', | ||
'viewBox': '0 0 ' + width + ' ' + height | ||
var content = { | ||
children: [], | ||
attributes: _extends({}, extra.attributes, { | ||
'data-prefix': prefix, | ||
'data-icon': iconName, | ||
'class': attrClass, | ||
'role': 'img', | ||
'xmlns': 'http://www.w3.org/2000/svg', | ||
'viewBox': '0 0 ' + width + ' ' + height | ||
}) | ||
}; | ||
if (title) content.children.push({ tag: 'title', attributes: { id: content.attributes['aria-labelledby'] || 'title-' + nextUniqueId() }, children: [title] }); | ||
var args = _extends({}, content, { | ||
prefix: prefix, | ||
iconName: iconName, | ||
main: main, | ||
compose: compose, | ||
transform: transform, | ||
styles: extra.styles | ||
}); | ||
var children = []; | ||
var _ref2 = compose.found && main.found ? makeIconComposition(args) : makeIconStandard(args), | ||
children = _ref2.children, | ||
attributes = _ref2.attributes; | ||
if (title) children.push({ tag: 'title', attributes: { id: attributes['aria-labelledby'] || 'title-' + nextUniqueId() }, children: [title] }); | ||
args.children = children; | ||
args.attributes = attributes; | ||
if (composeIcon.found && mainIcon.found) { | ||
children.push.apply(children, makeIconComposition({ main: mainIcon, compose: composeIcon, transform: transform })); | ||
if (content.attributes.hasOwnProperty('data-fa-symbol')) { | ||
return asSymbol(args); | ||
} else { | ||
var styles = _extends({}, extra.styles); | ||
if (transformIsMeaningful(transform)) { | ||
styles['transform'] = transformToCss(transform); | ||
styles['-webkit-transform'] = styles['transform']; | ||
} | ||
var styleString = joinStyles(styles); | ||
if (styleString.length > 0) { | ||
attributes['style'] = styleString; | ||
} | ||
children.push(mainIcon.icon); | ||
return asIcon(args); | ||
} | ||
return [{ | ||
tag: 'svg', | ||
attributes: attributes, | ||
children: children | ||
}]; | ||
} | ||
@@ -501,3 +509,3 @@ | ||
if (transformIsMeaningful(transform)) { | ||
styles['transform'] = transformToCss(transform, { startCentered: true, width: width, height: height }); | ||
styles['transform'] = transformForCss({ transform: transform, startCentered: true, width: width, height: height }); | ||
styles['-webkit-transform'] = styles['transform']; | ||
@@ -527,31 +535,5 @@ } | ||
function makeInlineSvgHtml(params) { | ||
var prefix = params.prefix, | ||
iconName = params.iconName, | ||
compose = params.compose; | ||
var abstract = makeInlineSvgAbstract(_extends({}, params, { | ||
icons: { | ||
main: findIcon(iconName, prefix), | ||
compose: findIcon(compose.iconName, compose.prefix) | ||
} | ||
})); | ||
return abstract.map(function (a) { | ||
return toHtml(a); | ||
}).join('\n'); | ||
} | ||
function makeLayersTextHtml(params) { | ||
var abstract = makeLayersTextAbstract(params); | ||
return abstract.map(function (a) { | ||
return toHtml(a); | ||
}).join('\n'); | ||
} | ||
var noop$1 = function noop() {}; | ||
var p = config.measurePerformance && PERFORMANCE ? PERFORMANCE : { mark: noop$1, measure: noop$1 }; | ||
var preamble = 'FA "5.0.0-beta6"'; | ||
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$1, measure: noop$1 }; | ||
var preamble = 'FA "5.0.0-beta7"'; | ||
@@ -572,2 +554,46 @@ var begin = function begin(name) { | ||
function toHtml(abstractNodes) { | ||
var tag = abstractNodes.tag, | ||
_abstractNodes$attrib = abstractNodes.attributes, | ||
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib, | ||
_abstractNodes$childr = abstractNodes.children, | ||
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr; | ||
if (typeof abstractNodes === 'string') { | ||
return htmlEscape(abstractNodes); | ||
} else { | ||
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>'; | ||
} | ||
} | ||
function getMutator() { | ||
if (config.autoReplaceSvg === true) { | ||
return mutators.replace; | ||
} | ||
var mutator = mutators[config.autoReplaceSvg]; | ||
return mutator || mutators.replace; | ||
} | ||
var mutators = { | ||
replace: function replace(mutation) { | ||
var node = mutation[0]; | ||
var abstract = mutation[1]; | ||
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 + ' -->' : ''); | ||
}, | ||
nest: function nest(mutation) { | ||
var node = mutation[0]; | ||
var abstract = mutation[1]; | ||
var newInnerHTML = abstract.map(function (a) { | ||
return toHtml(a); | ||
}).join('\n'); | ||
node.innerHTML = newInnerHTML; | ||
} | ||
}; | ||
function perform(mutations, callback) { | ||
@@ -577,11 +603,7 @@ if (!WINDOW.requestAnimationFrame) return; | ||
WINDOW.requestAnimationFrame(function () { | ||
var mutator = getMutator(); | ||
var end = perf.begin('mutate'); | ||
mutations.map(function (mutation) { | ||
var node = mutation[0]; | ||
var newOuterHTML = mutation[1]; | ||
mutations.map(mutator); | ||
if (node.parentNode) node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : ''); | ||
}); | ||
if (typeof callback === 'function') { | ||
@@ -667,3 +689,3 @@ callback(); | ||
var packs$3 = namespace.packs; | ||
var packs$2 = namespace.packs; | ||
var shims = namespace.shims; | ||
@@ -678,3 +700,3 @@ | ||
var lookup = function lookup(reducer) { | ||
return reduce(packs$3, function (o, pack, prefix) { | ||
return reduce(packs$2, function (o, pack, prefix) { | ||
o[prefix] = reduce(pack, reducer, {}); | ||
@@ -703,3 +725,3 @@ return o; | ||
var hasRegular = 'far' in packs$3; | ||
var hasRegular = 'far' in packs$2; | ||
@@ -746,3 +768,3 @@ _byOldName = reduce(shims, function (acc, shim) { | ||
var packs$4 = namespace.packs; | ||
var packs$3 = namespace.packs; | ||
@@ -758,3 +780,3 @@ | ||
if (packs$4[cls]) { | ||
if (packs$3[cls]) { | ||
acc.prefix = cls; | ||
@@ -929,2 +951,54 @@ } else if (iconName) { | ||
function MissingIcon(error) { | ||
this.name = 'MissingIcon'; | ||
this.message = error || 'Icon unavailable'; | ||
this.stack = new Error().stack; | ||
} | ||
MissingIcon.prototype = Object.create(Error.prototype); | ||
MissingIcon.prototype.constructor = MissingIcon; | ||
var FILL = { fill: 'currentColor' }; | ||
var ANIMATION_BASE = { | ||
attributeType: 'XML', | ||
repeatCount: 'indefinite', | ||
dur: '2s' | ||
}; | ||
var RING = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z' | ||
}) | ||
}; | ||
var OPACITY_ANIMATE = _extends({}, ANIMATION_BASE, { | ||
attributeName: 'opacity' | ||
}); | ||
var DOT = { | ||
tag: 'circle', | ||
attributes: _extends({}, FILL, { | ||
cx: '256', | ||
cy: '364', | ||
r: '28' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, ANIMATION_BASE, { attributeName: 'r', values: '28;14;28;28;14;28;' }) }, { tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;1;1;0;1;' }) }] | ||
}; | ||
var QUESTION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '1', | ||
d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;0;0;0;1;' }) }] | ||
}; | ||
var EXCLAMATION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '0', | ||
d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '0;0;1;1;0;0;' }) }] | ||
}; | ||
var missing = { tag: 'g', children: [RING, DOT, QUESTION, EXCLAMATION] }; | ||
var packs = namespace.packs; | ||
@@ -934,2 +1008,29 @@ | ||
function findIcon(iconName, prefix) { | ||
var val = { | ||
found: false, | ||
width: 512, | ||
height: 512, | ||
icon: missing | ||
}; | ||
if (iconName && prefix && packs[prefix] && packs[prefix][iconName]) { | ||
var icon = packs[prefix][iconName]; | ||
var width = icon[0]; | ||
var height = icon[1]; | ||
var vectorData = icon.slice(4); | ||
val = { | ||
found: true, | ||
width: width, | ||
height: height, | ||
icon: { tag: 'path', attributes: { fill: 'currentColor', d: vectorData[0] } } | ||
}; | ||
} else if (iconName && prefix && !config.showMissingIcons) { | ||
throw new MissingIcon('Icon is missing for prefix ' + prefix + ' with icon name ' + iconName); | ||
} | ||
return val; | ||
} | ||
function generateSvgReplacementMutation(node, nodeMeta) { | ||
@@ -944,3 +1045,7 @@ var iconName = nodeMeta.iconName, | ||
return [node, makeInlineSvgHtml({ | ||
return [node, makeInlineSvgAbstract({ | ||
icons: { | ||
main: findIcon(iconName, prefix), | ||
compose: findIcon(compose.iconName, compose.prefix) | ||
}, | ||
prefix: prefix, | ||
@@ -961,3 +1066,2 @@ iconName: iconName, | ||
var val = null; | ||
var width = null; | ||
@@ -977,3 +1081,3 @@ var height = null; | ||
val = [node, makeLayersTextHtml({ | ||
return [node, makeLayersTextAbstract({ | ||
content: node.innerHTML, | ||
@@ -986,4 +1090,2 @@ width: width, | ||
})]; | ||
return val; | ||
} | ||
@@ -1038,3 +1140,3 @@ | ||
var baseStyles = ".svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -12.5%; }\n .svg-inline--fa.fa-lg {\n vertical-align: -25%; }\n .svg-inline--fa.fa-w-1 {\n width: 0.0625em; }\n .svg-inline--fa.fa-w-2 {\n width: 0.125em; }\n .svg-inline--fa.fa-w-3 {\n width: 0.1875em; }\n .svg-inline--fa.fa-w-4 {\n width: 0.25em; }\n .svg-inline--fa.fa-w-5 {\n width: 0.3125em; }\n .svg-inline--fa.fa-w-6 {\n width: 0.375em; }\n .svg-inline--fa.fa-w-7 {\n width: 0.4375em; }\n .svg-inline--fa.fa-w-8 {\n width: 0.5em; }\n .svg-inline--fa.fa-w-9 {\n width: 0.5625em; }\n .svg-inline--fa.fa-w-10 {\n width: 0.625em; }\n .svg-inline--fa.fa-w-11 {\n width: 0.6875em; }\n .svg-inline--fa.fa-w-12 {\n width: 0.75em; }\n .svg-inline--fa.fa-w-13 {\n width: 0.8125em; }\n .svg-inline--fa.fa-w-14 {\n width: 0.875em; }\n .svg-inline--fa.fa-w-15 {\n width: 0.9375em; }\n .svg-inline--fa.fa-w-16 {\n width: 1em; }\n .svg-inline--fa.fa-w-17 {\n width: 1.0625em; }\n .svg-inline--fa.fa-w-18 {\n width: 1.125em; }\n .svg-inline--fa.fa-w-19 {\n width: 1.1875em; }\n .svg-inline--fa.fa-w-20 {\n width: 1.25em; }\n .svg-inline--fa.fa-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa.fa-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa.fa-border {\n height: 1.5em; }\n .svg-inline--fa.fa-li {\n top: auto;\n width: 1.875em; }\n .svg-inline--fa.fa-fw {\n width: 1.25em; }\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -12.5%;\n width: 1em; }\n .fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-text, .fa-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -15%; }\n\n.fa-xs {\n font-size: .75em; }\n\n.fa-sm {\n font-size: .875em; }\n\n.fa-1x {\n font-size: 1em; }\n\n.fa-2x {\n font-size: 2em; }\n\n.fa-3x {\n font-size: 3em; }\n\n.fa-4x {\n font-size: 4em; }\n\n.fa-5x {\n font-size: 5em; }\n\n.fa-6x {\n font-size: 6em; }\n\n.fa-7x {\n font-size: 7em; }\n\n.fa-8x {\n font-size: 8em; }\n\n.fa-9x {\n font-size: 9em; }\n\n.fa-10x {\n font-size: 10em; }\n\n.fa-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa-ul {\n list-style-type: none;\n margin-left: 1.875em;\n padding-left: 0; }\n .fa-ul > li {\n position: relative; }\n\n.fa-li {\n left: -1.875em;\n position: absolute;\n text-align: center;\n top: 0.14286em;\n width: 1.875em; }\n .fa-li.fa-lg {\n left: -1.625em; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n"; | ||
var baseStyles = "svg:not(:root).svg-inline--fa {\n overflow: visible; }\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -12.5%; }\n .svg-inline--fa.fa-lg {\n vertical-align: -25%; }\n .svg-inline--fa.fa-w-1 {\n width: 0.0625em; }\n .svg-inline--fa.fa-w-2 {\n width: 0.125em; }\n .svg-inline--fa.fa-w-3 {\n width: 0.1875em; }\n .svg-inline--fa.fa-w-4 {\n width: 0.25em; }\n .svg-inline--fa.fa-w-5 {\n width: 0.3125em; }\n .svg-inline--fa.fa-w-6 {\n width: 0.375em; }\n .svg-inline--fa.fa-w-7 {\n width: 0.4375em; }\n .svg-inline--fa.fa-w-8 {\n width: 0.5em; }\n .svg-inline--fa.fa-w-9 {\n width: 0.5625em; }\n .svg-inline--fa.fa-w-10 {\n width: 0.625em; }\n .svg-inline--fa.fa-w-11 {\n width: 0.6875em; }\n .svg-inline--fa.fa-w-12 {\n width: 0.75em; }\n .svg-inline--fa.fa-w-13 {\n width: 0.8125em; }\n .svg-inline--fa.fa-w-14 {\n width: 0.875em; }\n .svg-inline--fa.fa-w-15 {\n width: 0.9375em; }\n .svg-inline--fa.fa-w-16 {\n width: 1em; }\n .svg-inline--fa.fa-w-17 {\n width: 1.0625em; }\n .svg-inline--fa.fa-w-18 {\n width: 1.125em; }\n .svg-inline--fa.fa-w-19 {\n width: 1.1875em; }\n .svg-inline--fa.fa-w-20 {\n width: 1.25em; }\n .svg-inline--fa.fa-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa.fa-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa.fa-border {\n height: 1.5em; }\n .svg-inline--fa.fa-li {\n top: auto;\n width: 1.875em; }\n .svg-inline--fa.fa-fw {\n width: 1.25em; }\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -12.5%;\n width: 1em; }\n .fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-text, .fa-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -15%; }\n\n.fa-xs {\n font-size: .75em; }\n\n.fa-sm {\n font-size: .875em; }\n\n.fa-1x {\n font-size: 1em; }\n\n.fa-2x {\n font-size: 2em; }\n\n.fa-3x {\n font-size: 3em; }\n\n.fa-4x {\n font-size: 4em; }\n\n.fa-5x {\n font-size: 5em; }\n\n.fa-6x {\n font-size: 6em; }\n\n.fa-7x {\n font-size: 7em; }\n\n.fa-8x {\n font-size: 8em; }\n\n.fa-9x {\n font-size: 9em; }\n\n.fa-10x {\n font-size: 10em; }\n\n.fa-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa-ul {\n list-style-type: none;\n margin-left: 1.875em;\n padding-left: 0; }\n .fa-ul > li {\n position: relative; }\n\n.fa-li {\n left: -1.875em;\n position: absolute;\n text-align: center;\n top: 0.14286em;\n width: 1.875em; }\n .fa-li.fa-lg {\n left: -1.625em; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n"; | ||
@@ -1041,0 +1143,0 @@ var styles = function () { |
528
index.js
@@ -155,2 +155,13 @@ (function (global, factory) { | ||
var d = UNITS_IN_GRID; | ||
var meaninglessTransform = { | ||
size: 16, | ||
x: 0, | ||
y: 0, | ||
rotate: 0, | ||
flipX: false, | ||
flipY: false | ||
}; | ||
function isReserved(name) { | ||
@@ -215,3 +226,3 @@ return ~RESERVED_CLASSES.indexOf(name); | ||
function joinAttributes(attributes) { | ||
return Object.keys(attributes).reduce(function (acc, attributeName) { | ||
return Object.keys(attributes || {}).reduce(function (acc, attributeName) { | ||
return acc + (attributeName + '="' + attributes[attributeName] + '" '); | ||
@@ -222,3 +233,3 @@ }, ''); | ||
function joinStyles(styles) { | ||
return Object.keys(styles).reduce(function (acc, styleName) { | ||
return Object.keys(styles || {}).reduce(function (acc, styleName) { | ||
return acc + (styleName + ': ' + styles[styleName] + ';'); | ||
@@ -228,69 +239,55 @@ }, ''); | ||
function toHtml(abstractNodes) { | ||
var tag = abstractNodes.tag, | ||
_abstractNodes$attrib = abstractNodes.attributes, | ||
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib, | ||
_abstractNodes$childr = abstractNodes.children, | ||
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr; | ||
function transformIsMeaningful(transform) { | ||
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY; | ||
} | ||
function transformForSvg(_ref) { | ||
var transform = _ref.transform, | ||
containerWidth = _ref.containerWidth, | ||
iconWidth = _ref.iconWidth; | ||
if (typeof abstractNodes === 'string') { | ||
return htmlEscape(abstractNodes); | ||
} else { | ||
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>'; | ||
} | ||
var outer = { | ||
transform: 'translate(' + containerWidth / 2 + ' 256)' | ||
}; | ||
var innerTranslate = 'translate(' + transform.x * 32 + ', ' + transform.y * 32 + ') '; | ||
var innerScale = 'scale(' + transform.size / 16 * (transform.flipX ? -1 : 1) + ', ' + transform.size / 16 * (transform.flipY ? -1 : 1) + ') '; | ||
var innerRotate = 'rotate(' + transform.rotate + ' 0 0)'; | ||
var inner = { | ||
transform: innerTranslate + ' ' + innerScale + ' ' + innerRotate | ||
}; | ||
var path = { | ||
transform: 'translate(' + iconWidth / 2 * -1 + ' -256)' | ||
}; | ||
return { | ||
outer: outer, | ||
inner: inner, | ||
path: path | ||
}; | ||
} | ||
function MissingIcon(error) { | ||
this.name = 'MissingIcon'; | ||
this.message = error || 'Icon unavailable'; | ||
this.stack = new Error().stack; | ||
} | ||
function transformForCss(_ref2) { | ||
var transform = _ref2.transform, | ||
_ref2$width = _ref2.width, | ||
width = _ref2$width === undefined ? UNITS_IN_GRID : _ref2$width, | ||
_ref2$height = _ref2.height, | ||
height = _ref2$height === undefined ? UNITS_IN_GRID : _ref2$height, | ||
_ref2$startCentered = _ref2.startCentered, | ||
startCentered = _ref2$startCentered === undefined ? false : _ref2$startCentered; | ||
MissingIcon.prototype = Object.create(Error.prototype); | ||
MissingIcon.prototype.constructor = MissingIcon; | ||
var val = ''; | ||
var FILL = { fill: 'currentColor' }; | ||
var ANIMATION_BASE = { | ||
attributeType: 'XML', | ||
repeatCount: 'indefinite', | ||
dur: '2s' | ||
}; | ||
var RING = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z' | ||
}) | ||
}; | ||
var OPACITY_ANIMATE = _extends({}, ANIMATION_BASE, { | ||
attributeName: 'opacity' | ||
}); | ||
var DOT = { | ||
tag: 'circle', | ||
attributes: _extends({}, FILL, { | ||
cx: '256', | ||
cy: '364', | ||
r: '28' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, ANIMATION_BASE, { attributeName: 'r', values: '28;14;28;28;14;28;' }) }, { tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;1;1;0;1;' }) }] | ||
}; | ||
var QUESTION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '1', | ||
d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;0;0;0;1;' }) }] | ||
}; | ||
var EXCLAMATION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '0', | ||
d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '0;0;1;1;0;0;' }) }] | ||
}; | ||
if (startCentered && IS_IE) { | ||
val += 'translate(' + (transform.x / d - width / 2) + 'em, ' + (transform.y / d - height / 2) + 'em) '; | ||
} else if (startCentered) { | ||
val += 'translate(calc(-50% + ' + transform.x / d + 'em), calc(-50% + ' + transform.y / d + 'em)) '; | ||
} else { | ||
val += 'translate(' + transform.x / d + 'em, ' + transform.y / d + 'em) '; | ||
} | ||
var missing = { tag: 'g', children: [RING, DOT, QUESTION, EXCLAMATION] }; | ||
val += 'scale(' + transform.size / d * (transform.flipX ? -1 : 1) + ', ' + transform.size / d * (transform.flipY ? -1 : 1) + ') '; | ||
val += 'rotate(' + transform.rotate + 'deg) '; | ||
return val; | ||
} | ||
var ALL_SPACE = { | ||
@@ -304,3 +301,5 @@ x: 0, | ||
var makeIconComposition = function (_ref) { | ||
var main = _ref.main, | ||
var children = _ref.children, | ||
attributes = _ref.attributes, | ||
main = _ref.main, | ||
compose = _ref.compose, | ||
@@ -314,11 +313,4 @@ transform = _ref.transform; | ||
var groupTranslate = 'translate(' + transform.x * 32 + ', ' + transform.y * 32 + ') '; | ||
var groupScale = 'scale(' + transform.size / 16 * (transform.flipX ? -1 : 1) + ', ' + transform.size / 16 * (transform.flipY ? -1 : 1) + ') '; | ||
var groupRotate = 'rotate(' + transform.rotate + ' 0 0)'; | ||
var groupTransform = { | ||
transform: groupTranslate + ' ' + groupScale + ' ' + groupRotate | ||
}; | ||
var mainTransform = { | ||
transform: 'translate(' + mainWidth / 2 * -1 + ' -256)' | ||
}; | ||
var trans = transformForSvg({ transform: transform, containerWidth: composeWidth, iconWidth: mainWidth }); | ||
var maskRect = { | ||
@@ -332,10 +324,8 @@ tag: 'rect', | ||
tag: 'g', | ||
attributes: _extends({}, groupTransform), | ||
children: [{ tag: 'path', attributes: _extends({}, mainPath.attributes, mainTransform, { fill: 'black' }) }] | ||
attributes: _extends({}, trans.inner), | ||
children: [{ tag: 'path', attributes: _extends({}, mainPath.attributes, trans.path, { fill: 'black' }) }] | ||
}; | ||
var maskOuterGroup = { | ||
tag: 'g', | ||
attributes: { | ||
transform: 'translate(' + composeWidth / 2 + ' 256)' | ||
}, | ||
attributes: _extends({}, trans.outer), | ||
children: [maskInnerGroup] | ||
@@ -359,79 +349,99 @@ }; | ||
return [defs, { tag: 'rect', attributes: _extends({ fill: 'currentColor', 'clip-path': 'url(#' + clipId + ')', mask: 'url(#' + maskId + ')' }, ALL_SPACE) }]; | ||
}; | ||
children.push(defs, { tag: 'rect', attributes: _extends({ fill: 'currentColor', 'clip-path': 'url(#' + clipId + ')', mask: 'url(#' + maskId + ')' }, ALL_SPACE) }); | ||
var d = UNITS_IN_GRID; | ||
var packs$1 = namespace.packs; | ||
var meaninglessTransform = { | ||
size: 16, | ||
x: 0, | ||
y: 0, | ||
rotate: 0, | ||
flipX: false, | ||
flipY: false | ||
return { | ||
children: children, | ||
attributes: attributes | ||
}; | ||
}; | ||
function transformIsMeaningful(transform) { | ||
return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY; | ||
} | ||
var makeIconStandard = function (_ref) { | ||
var attributes = _ref.attributes, | ||
main = _ref.main, | ||
transform = _ref.transform, | ||
styles = _ref.styles; | ||
function transformToCss(transform) { | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var _options$startCentere = options.startCentered, | ||
startCentered = _options$startCentere === undefined ? false : _options$startCentere, | ||
_options$width = options.width, | ||
width = _options$width === undefined ? d : _options$width, | ||
_options$height = options.height, | ||
height = _options$height === undefined ? d : _options$height; | ||
var styleString = joinStyles(styles); | ||
var nextChildren = []; | ||
if (styleString.length > 0) { | ||
attributes['style'] = styleString; | ||
} | ||
var val = ''; | ||
if (startCentered && IS_IE) { | ||
val += 'translate(' + (transform.x / d - width / 2) + 'em, ' + (transform.y / d - height / 2) + 'em) '; | ||
} else if (startCentered) { | ||
val += 'translate(calc(-50% + ' + transform.x / d + 'em), calc(-50% + ' + transform.y / d + 'em)) '; | ||
if (transformIsMeaningful(transform)) { | ||
var trans = transformForSvg({ transform: transform, containerWidth: main.width, iconWidth: main.width }); | ||
nextChildren.push({ | ||
tag: 'g', | ||
attributes: _extends({}, trans.outer), | ||
children: [{ | ||
tag: 'g', | ||
attributes: _extends({}, trans.inner), | ||
children: [{ | ||
tag: main.icon.tag, | ||
children: main.icon.children, | ||
attributes: _extends({}, main.icon.attributes, trans.path) | ||
}] | ||
}] | ||
}); | ||
} else { | ||
val += 'translate(' + transform.x / d + 'em, ' + transform.y / d + 'em) '; | ||
nextChildren.push(main.icon); | ||
} | ||
val += 'scale(' + transform.size / d * (transform.flipX ? -1 : 1) + ', ' + transform.size / d * (transform.flipY ? -1 : 1) + ') '; | ||
val += 'rotate(' + transform.rotate + 'deg) '; | ||
return { | ||
children: nextChildren, | ||
attributes: attributes | ||
}; | ||
}; | ||
return val; | ||
} | ||
var asIcon = function (_ref) { | ||
var children = _ref.children, | ||
main = _ref.main, | ||
compose = _ref.compose, | ||
attributes = _ref.attributes, | ||
styles = _ref.styles, | ||
transform = _ref.transform; | ||
function findIcon(iconName, prefix) { | ||
var val = { | ||
found: false, | ||
width: 512, | ||
height: 512, | ||
icon: missing | ||
}; | ||
if (transformIsMeaningful(transform) && main.found && !compose.found) { | ||
var width = main.width, | ||
height = main.height; | ||
if (iconName && prefix && packs$1[prefix] && packs$1[prefix][iconName]) { | ||
var icon = packs$1[prefix][iconName]; | ||
var width = icon[0]; | ||
var height = icon[1]; | ||
var vectorData = icon.slice(4); | ||
val = { | ||
found: true, | ||
width: width, | ||
height: height, | ||
icon: { tag: 'path', attributes: { fill: 'currentColor', d: vectorData[0] } } | ||
var offset = { | ||
x: width / height / 2, | ||
y: 0.5 | ||
}; | ||
} else if (iconName && prefix && !config.showMissingIcons) { | ||
throw new MissingIcon('Icon is missing for prefix ' + prefix + ' with icon name ' + iconName); | ||
attributes['style'] = joinStyles(_extends({}, styles, { | ||
'transform-origin': offset.x + transform.x / 16 + 'em ' + (offset.y + transform.y / 16) + 'em' | ||
})); | ||
} | ||
return val; | ||
} | ||
return [{ | ||
tag: 'svg', | ||
attributes: attributes, | ||
children: children | ||
}]; | ||
}; | ||
var asSymbol = function (_ref) { | ||
var prefix = _ref.prefix, | ||
iconName = _ref.iconName, | ||
children = _ref.children, | ||
attributes = _ref.attributes; | ||
return [{ | ||
tag: 'svg', | ||
attributes: { | ||
style: 'display: none;' | ||
}, | ||
children: [{ | ||
tag: 'symbol', | ||
attributes: _extends({}, attributes, { id: prefix + '-' + config.familyPrefix + '-' + iconName }), | ||
children: children | ||
}] | ||
}]; | ||
}; | ||
function makeInlineSvgAbstract(params) { | ||
var _params$icons = params.icons, | ||
mainIcon = _params$icons.main, | ||
composeIcon = _params$icons.compose, | ||
main = _params$icons.main, | ||
compose = _params$icons.compose, | ||
prefix = params.prefix, | ||
@@ -443,3 +453,3 @@ iconName = params.iconName, | ||
var _ref = composeIcon.found ? composeIcon : mainIcon, | ||
var _ref = compose.found ? compose : main, | ||
width = _ref.width, | ||
@@ -451,39 +461,37 @@ height = _ref.height; | ||
var attributes = _extends({}, extra.attributes, { | ||
'data-prefix': prefix, | ||
'data-icon': iconName, | ||
'class': attrClass, | ||
'role': 'img', | ||
'xmlns': 'http://www.w3.org/2000/svg', | ||
'viewBox': '0 0 ' + width + ' ' + height | ||
var content = { | ||
children: [], | ||
attributes: _extends({}, extra.attributes, { | ||
'data-prefix': prefix, | ||
'data-icon': iconName, | ||
'class': attrClass, | ||
'role': 'img', | ||
'xmlns': 'http://www.w3.org/2000/svg', | ||
'viewBox': '0 0 ' + width + ' ' + height | ||
}) | ||
}; | ||
if (title) content.children.push({ tag: 'title', attributes: { id: content.attributes['aria-labelledby'] || 'title-' + nextUniqueId() }, children: [title] }); | ||
var args = _extends({}, content, { | ||
prefix: prefix, | ||
iconName: iconName, | ||
main: main, | ||
compose: compose, | ||
transform: transform, | ||
styles: extra.styles | ||
}); | ||
var children = []; | ||
var _ref2 = compose.found && main.found ? makeIconComposition(args) : makeIconStandard(args), | ||
children = _ref2.children, | ||
attributes = _ref2.attributes; | ||
if (title) children.push({ tag: 'title', attributes: { id: attributes['aria-labelledby'] || 'title-' + nextUniqueId() }, children: [title] }); | ||
args.children = children; | ||
args.attributes = attributes; | ||
if (composeIcon.found && mainIcon.found) { | ||
children.push.apply(children, makeIconComposition({ main: mainIcon, compose: composeIcon, transform: transform })); | ||
if (content.attributes.hasOwnProperty('data-fa-symbol')) { | ||
return asSymbol(args); | ||
} else { | ||
var styles = _extends({}, extra.styles); | ||
if (transformIsMeaningful(transform)) { | ||
styles['transform'] = transformToCss(transform); | ||
styles['-webkit-transform'] = styles['transform']; | ||
} | ||
var styleString = joinStyles(styles); | ||
if (styleString.length > 0) { | ||
attributes['style'] = styleString; | ||
} | ||
children.push(mainIcon.icon); | ||
return asIcon(args); | ||
} | ||
return [{ | ||
tag: 'svg', | ||
attributes: attributes, | ||
children: children | ||
}]; | ||
} | ||
@@ -507,3 +515,3 @@ | ||
if (transformIsMeaningful(transform)) { | ||
styles['transform'] = transformToCss(transform, { startCentered: true, width: width, height: height }); | ||
styles['transform'] = transformForCss({ transform: transform, startCentered: true, width: width, height: height }); | ||
styles['-webkit-transform'] = styles['transform']; | ||
@@ -533,31 +541,5 @@ } | ||
function makeInlineSvgHtml(params) { | ||
var prefix = params.prefix, | ||
iconName = params.iconName, | ||
compose = params.compose; | ||
var abstract = makeInlineSvgAbstract(_extends({}, params, { | ||
icons: { | ||
main: findIcon(iconName, prefix), | ||
compose: findIcon(compose.iconName, compose.prefix) | ||
} | ||
})); | ||
return abstract.map(function (a) { | ||
return toHtml(a); | ||
}).join('\n'); | ||
} | ||
function makeLayersTextHtml(params) { | ||
var abstract = makeLayersTextAbstract(params); | ||
return abstract.map(function (a) { | ||
return toHtml(a); | ||
}).join('\n'); | ||
} | ||
var noop$1 = function noop() {}; | ||
var p = config.measurePerformance && PERFORMANCE ? PERFORMANCE : { mark: noop$1, measure: noop$1 }; | ||
var preamble = 'FA "5.0.0-beta6"'; | ||
var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { mark: noop$1, measure: noop$1 }; | ||
var preamble = 'FA "5.0.0-beta7"'; | ||
@@ -578,2 +560,46 @@ var begin = function begin(name) { | ||
function toHtml(abstractNodes) { | ||
var tag = abstractNodes.tag, | ||
_abstractNodes$attrib = abstractNodes.attributes, | ||
attributes = _abstractNodes$attrib === undefined ? {} : _abstractNodes$attrib, | ||
_abstractNodes$childr = abstractNodes.children, | ||
children = _abstractNodes$childr === undefined ? [] : _abstractNodes$childr; | ||
if (typeof abstractNodes === 'string') { | ||
return htmlEscape(abstractNodes); | ||
} else { | ||
return '<' + tag + ' ' + joinAttributes(attributes) + '>' + children.map(toHtml).join('') + '</' + tag + '>'; | ||
} | ||
} | ||
function getMutator() { | ||
if (config.autoReplaceSvg === true) { | ||
return mutators.replace; | ||
} | ||
var mutator = mutators[config.autoReplaceSvg]; | ||
return mutator || mutators.replace; | ||
} | ||
var mutators = { | ||
replace: function replace(mutation) { | ||
var node = mutation[0]; | ||
var abstract = mutation[1]; | ||
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 + ' -->' : ''); | ||
}, | ||
nest: function nest(mutation) { | ||
var node = mutation[0]; | ||
var abstract = mutation[1]; | ||
var newInnerHTML = abstract.map(function (a) { | ||
return toHtml(a); | ||
}).join('\n'); | ||
node.innerHTML = newInnerHTML; | ||
} | ||
}; | ||
function perform(mutations, callback) { | ||
@@ -583,11 +609,7 @@ if (!WINDOW.requestAnimationFrame) return; | ||
WINDOW.requestAnimationFrame(function () { | ||
var mutator = getMutator(); | ||
var end = perf.begin('mutate'); | ||
mutations.map(function (mutation) { | ||
var node = mutation[0]; | ||
var newOuterHTML = mutation[1]; | ||
mutations.map(mutator); | ||
if (node.parentNode) node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? '<!-- ' + node.outerHTML + ' -->' : ''); | ||
}); | ||
if (typeof callback === 'function') { | ||
@@ -673,3 +695,3 @@ callback(); | ||
var packs$3 = namespace.packs; | ||
var packs$2 = namespace.packs; | ||
var shims = namespace.shims; | ||
@@ -684,3 +706,3 @@ | ||
var lookup = function lookup(reducer) { | ||
return reduce(packs$3, function (o, pack, prefix) { | ||
return reduce(packs$2, function (o, pack, prefix) { | ||
o[prefix] = reduce(pack, reducer, {}); | ||
@@ -709,3 +731,3 @@ return o; | ||
var hasRegular = 'far' in packs$3; | ||
var hasRegular = 'far' in packs$2; | ||
@@ -752,3 +774,3 @@ _byOldName = reduce(shims, function (acc, shim) { | ||
var packs$4 = namespace.packs; | ||
var packs$3 = namespace.packs; | ||
@@ -764,3 +786,3 @@ | ||
if (packs$4[cls]) { | ||
if (packs$3[cls]) { | ||
acc.prefix = cls; | ||
@@ -935,2 +957,54 @@ } else if (iconName) { | ||
function MissingIcon(error) { | ||
this.name = 'MissingIcon'; | ||
this.message = error || 'Icon unavailable'; | ||
this.stack = new Error().stack; | ||
} | ||
MissingIcon.prototype = Object.create(Error.prototype); | ||
MissingIcon.prototype.constructor = MissingIcon; | ||
var FILL = { fill: 'currentColor' }; | ||
var ANIMATION_BASE = { | ||
attributeType: 'XML', | ||
repeatCount: 'indefinite', | ||
dur: '2s' | ||
}; | ||
var RING = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z' | ||
}) | ||
}; | ||
var OPACITY_ANIMATE = _extends({}, ANIMATION_BASE, { | ||
attributeName: 'opacity' | ||
}); | ||
var DOT = { | ||
tag: 'circle', | ||
attributes: _extends({}, FILL, { | ||
cx: '256', | ||
cy: '364', | ||
r: '28' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, ANIMATION_BASE, { attributeName: 'r', values: '28;14;28;28;14;28;' }) }, { tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;1;1;0;1;' }) }] | ||
}; | ||
var QUESTION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '1', | ||
d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '1;0;0;0;0;1;' }) }] | ||
}; | ||
var EXCLAMATION = { | ||
tag: 'path', | ||
attributes: _extends({}, FILL, { | ||
opacity: '0', | ||
d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z' | ||
}), | ||
children: [{ tag: 'animate', attributes: _extends({}, OPACITY_ANIMATE, { values: '0;0;1;1;0;0;' }) }] | ||
}; | ||
var missing = { tag: 'g', children: [RING, DOT, QUESTION, EXCLAMATION] }; | ||
var packs = namespace.packs; | ||
@@ -940,2 +1014,29 @@ | ||
function findIcon(iconName, prefix) { | ||
var val = { | ||
found: false, | ||
width: 512, | ||
height: 512, | ||
icon: missing | ||
}; | ||
if (iconName && prefix && packs[prefix] && packs[prefix][iconName]) { | ||
var icon = packs[prefix][iconName]; | ||
var width = icon[0]; | ||
var height = icon[1]; | ||
var vectorData = icon.slice(4); | ||
val = { | ||
found: true, | ||
width: width, | ||
height: height, | ||
icon: { tag: 'path', attributes: { fill: 'currentColor', d: vectorData[0] } } | ||
}; | ||
} else if (iconName && prefix && !config.showMissingIcons) { | ||
throw new MissingIcon('Icon is missing for prefix ' + prefix + ' with icon name ' + iconName); | ||
} | ||
return val; | ||
} | ||
function generateSvgReplacementMutation(node, nodeMeta) { | ||
@@ -950,3 +1051,7 @@ var iconName = nodeMeta.iconName, | ||
return [node, makeInlineSvgHtml({ | ||
return [node, makeInlineSvgAbstract({ | ||
icons: { | ||
main: findIcon(iconName, prefix), | ||
compose: findIcon(compose.iconName, compose.prefix) | ||
}, | ||
prefix: prefix, | ||
@@ -967,3 +1072,2 @@ iconName: iconName, | ||
var val = null; | ||
var width = null; | ||
@@ -983,3 +1087,3 @@ var height = null; | ||
val = [node, makeLayersTextHtml({ | ||
return [node, makeLayersTextAbstract({ | ||
content: node.innerHTML, | ||
@@ -992,4 +1096,2 @@ width: width, | ||
})]; | ||
return val; | ||
} | ||
@@ -1044,3 +1146,3 @@ | ||
var baseStyles = ".svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -12.5%; }\n .svg-inline--fa.fa-lg {\n vertical-align: -25%; }\n .svg-inline--fa.fa-w-1 {\n width: 0.0625em; }\n .svg-inline--fa.fa-w-2 {\n width: 0.125em; }\n .svg-inline--fa.fa-w-3 {\n width: 0.1875em; }\n .svg-inline--fa.fa-w-4 {\n width: 0.25em; }\n .svg-inline--fa.fa-w-5 {\n width: 0.3125em; }\n .svg-inline--fa.fa-w-6 {\n width: 0.375em; }\n .svg-inline--fa.fa-w-7 {\n width: 0.4375em; }\n .svg-inline--fa.fa-w-8 {\n width: 0.5em; }\n .svg-inline--fa.fa-w-9 {\n width: 0.5625em; }\n .svg-inline--fa.fa-w-10 {\n width: 0.625em; }\n .svg-inline--fa.fa-w-11 {\n width: 0.6875em; }\n .svg-inline--fa.fa-w-12 {\n width: 0.75em; }\n .svg-inline--fa.fa-w-13 {\n width: 0.8125em; }\n .svg-inline--fa.fa-w-14 {\n width: 0.875em; }\n .svg-inline--fa.fa-w-15 {\n width: 0.9375em; }\n .svg-inline--fa.fa-w-16 {\n width: 1em; }\n .svg-inline--fa.fa-w-17 {\n width: 1.0625em; }\n .svg-inline--fa.fa-w-18 {\n width: 1.125em; }\n .svg-inline--fa.fa-w-19 {\n width: 1.1875em; }\n .svg-inline--fa.fa-w-20 {\n width: 1.25em; }\n .svg-inline--fa.fa-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa.fa-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa.fa-border {\n height: 1.5em; }\n .svg-inline--fa.fa-li {\n top: auto;\n width: 1.875em; }\n .svg-inline--fa.fa-fw {\n width: 1.25em; }\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -12.5%;\n width: 1em; }\n .fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-text, .fa-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -15%; }\n\n.fa-xs {\n font-size: .75em; }\n\n.fa-sm {\n font-size: .875em; }\n\n.fa-1x {\n font-size: 1em; }\n\n.fa-2x {\n font-size: 2em; }\n\n.fa-3x {\n font-size: 3em; }\n\n.fa-4x {\n font-size: 4em; }\n\n.fa-5x {\n font-size: 5em; }\n\n.fa-6x {\n font-size: 6em; }\n\n.fa-7x {\n font-size: 7em; }\n\n.fa-8x {\n font-size: 8em; }\n\n.fa-9x {\n font-size: 9em; }\n\n.fa-10x {\n font-size: 10em; }\n\n.fa-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa-ul {\n list-style-type: none;\n margin-left: 1.875em;\n padding-left: 0; }\n .fa-ul > li {\n position: relative; }\n\n.fa-li {\n left: -1.875em;\n position: absolute;\n text-align: center;\n top: 0.14286em;\n width: 1.875em; }\n .fa-li.fa-lg {\n left: -1.625em; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n"; | ||
var baseStyles = "svg:not(:root).svg-inline--fa {\n overflow: visible; }\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -12.5%; }\n .svg-inline--fa.fa-lg {\n vertical-align: -25%; }\n .svg-inline--fa.fa-w-1 {\n width: 0.0625em; }\n .svg-inline--fa.fa-w-2 {\n width: 0.125em; }\n .svg-inline--fa.fa-w-3 {\n width: 0.1875em; }\n .svg-inline--fa.fa-w-4 {\n width: 0.25em; }\n .svg-inline--fa.fa-w-5 {\n width: 0.3125em; }\n .svg-inline--fa.fa-w-6 {\n width: 0.375em; }\n .svg-inline--fa.fa-w-7 {\n width: 0.4375em; }\n .svg-inline--fa.fa-w-8 {\n width: 0.5em; }\n .svg-inline--fa.fa-w-9 {\n width: 0.5625em; }\n .svg-inline--fa.fa-w-10 {\n width: 0.625em; }\n .svg-inline--fa.fa-w-11 {\n width: 0.6875em; }\n .svg-inline--fa.fa-w-12 {\n width: 0.75em; }\n .svg-inline--fa.fa-w-13 {\n width: 0.8125em; }\n .svg-inline--fa.fa-w-14 {\n width: 0.875em; }\n .svg-inline--fa.fa-w-15 {\n width: 0.9375em; }\n .svg-inline--fa.fa-w-16 {\n width: 1em; }\n .svg-inline--fa.fa-w-17 {\n width: 1.0625em; }\n .svg-inline--fa.fa-w-18 {\n width: 1.125em; }\n .svg-inline--fa.fa-w-19 {\n width: 1.1875em; }\n .svg-inline--fa.fa-w-20 {\n width: 1.25em; }\n .svg-inline--fa.fa-pull-left {\n margin-right: .3em;\n width: auto; }\n .svg-inline--fa.fa-pull-right {\n margin-left: .3em;\n width: auto; }\n .svg-inline--fa.fa-border {\n height: 1.5em; }\n .svg-inline--fa.fa-li {\n top: auto;\n width: 1.875em; }\n .svg-inline--fa.fa-fw {\n width: 1.25em; }\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -12.5%;\n width: 1em; }\n .fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-text, .fa-layers-counter {\n display: inline-block;\n position: absolute;\n text-align: center; }\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center; }\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: .25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right; }\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left; }\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right; }\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left; }\n\n.fa-lg {\n font-size: 1.33333em;\n line-height: 0.75em;\n vertical-align: -15%; }\n\n.fa-xs {\n font-size: .75em; }\n\n.fa-sm {\n font-size: .875em; }\n\n.fa-1x {\n font-size: 1em; }\n\n.fa-2x {\n font-size: 2em; }\n\n.fa-3x {\n font-size: 3em; }\n\n.fa-4x {\n font-size: 4em; }\n\n.fa-5x {\n font-size: 5em; }\n\n.fa-6x {\n font-size: 6em; }\n\n.fa-7x {\n font-size: 7em; }\n\n.fa-8x {\n font-size: 8em; }\n\n.fa-9x {\n font-size: 9em; }\n\n.fa-10x {\n font-size: 10em; }\n\n.fa-fw {\n text-align: center;\n width: 1.25em; }\n\n.fa-ul {\n list-style-type: none;\n margin-left: 1.875em;\n padding-left: 0; }\n .fa-ul > li {\n position: relative; }\n\n.fa-li {\n left: -1.875em;\n position: absolute;\n text-align: center;\n top: 0.14286em;\n width: 1.875em; }\n .fa-li.fa-lg {\n left: -1.625em; }\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: .1em;\n padding: .2em .25em .15em; }\n\n.fa-pull-left {\n float: left; }\n\n.fa-pull-right {\n float: right; }\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: .3em; }\n\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: .3em; }\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear; }\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8); }\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n.fa-rotate-90 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg); }\n\n.fa-rotate-180 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg); }\n\n.fa-rotate-270 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg); }\n\n.fa-flip-horizontal {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1); }\n\n.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1); }\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1); }\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none; }\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2em; }\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0; }\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1em; }\n\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2em; }\n\n.fa-inverse {\n color: #fff; }\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px; }\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto; }\n"; | ||
@@ -1047,0 +1149,0 @@ var styles = function () { |
@@ -7,4 +7,4 @@ { | ||
"license": "MIT", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"name": "@fortawesome/fontawesome" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103025
2318