Comparing version 0.18.0 to 0.19.0
@@ -1,10 +0,12 @@ | ||
'use strict'; | ||
"use strict" | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
Object.defineProperty(exports, "__esModule", { value: true }) | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
function _interopDefault(ex) { | ||
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex | ||
} | ||
var React = _interopDefault(require('react')); | ||
var PropTypes = _interopDefault(require('prop-types')); | ||
var reactHelmet = require('react-helmet'); | ||
var React = _interopDefault(require("react")) | ||
var PropTypes = _interopDefault(require("prop-types")) | ||
var reactHelmet = require("react-helmet") | ||
@@ -17,23 +19,24 @@ function _defineProperty(obj, key, value) { | ||
configurable: true, | ||
writable: true | ||
}); | ||
writable: true, | ||
}) | ||
} else { | ||
obj[key] = value; | ||
obj[key] = value | ||
} | ||
return obj; | ||
return obj | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
var keys = Object.keys(object) | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
var symbols = Object.getOwnPropertySymbols(object) | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable | ||
}) | ||
keys.push.apply(keys, symbols) | ||
} | ||
return keys; | ||
return keys | ||
} | ||
@@ -43,101 +46,108 @@ | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var source = arguments[i] != null ? arguments[i] : {} | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
_defineProperty(target, key, source[key]) | ||
}) | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
Object.defineProperty( | ||
target, | ||
key, | ||
Object.getOwnPropertyDescriptor(source, key) | ||
) | ||
}) | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
if (source == null) return {} | ||
var target = {} | ||
var sourceKeys = Object.keys(source) | ||
var key, i | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
key = sourceKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
target[key] = source[key] | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
if (source == null) return {} | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var target = _objectWithoutPropertiesLoose(source, excluded) | ||
var key, i; | ||
var key, i | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source) | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
key = sourceSymbolKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue | ||
target[key] = source[key] | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
var authorMeta = function authorMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "author" | ||
}; | ||
}; | ||
name: "author", | ||
} | ||
} | ||
var defaultProps = { | ||
alternate: false | ||
}; | ||
alternate: false, | ||
} | ||
var ogLocaleMeta = function ogLocaleMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate | ||
return { | ||
content: content, | ||
property: alternate ? "og:locale" : "og:locale:alternate" | ||
}; | ||
}; | ||
property: alternate ? "og:locale" : "og:locale:alternate", | ||
} | ||
} | ||
ogLocaleMeta.defaultProps = defaultProps; | ||
ogLocaleMeta.defaultProps = defaultProps | ||
var ogUrlMeta = function ogUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:url" | ||
}; | ||
}; | ||
property: "og:url", | ||
} | ||
} | ||
var descriptionMeta = function descriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "description", | ||
property: "og:description" | ||
}; | ||
}; | ||
property: "og:description", | ||
} | ||
} | ||
var defaultProps$1 = { | ||
content: "Global" | ||
}; | ||
content: "Global", | ||
} | ||
/** | ||
@@ -149,35 +159,38 @@ * @param {"Global"|"Local"|"IU"} content The level or degree of distribution | ||
var distributionMeta = function distributionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$1, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$1, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
name: "distribution" | ||
}; | ||
}; | ||
name: "distribution", | ||
} | ||
} | ||
var geoPositionMeta = function geoPositionMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ";").concat(longitude), | ||
name: "geo.position" | ||
}; | ||
}; | ||
name: "geo.position", | ||
} | ||
} | ||
var geoPlaceName = function geoPlaceName(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.placename" | ||
}; | ||
}; | ||
name: "geo.placename", | ||
} | ||
} | ||
var googleSiteVerificationMeta = function googleSiteVerificationMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "google-site-verification" | ||
}; | ||
}; | ||
name: "google-site-verification", | ||
} | ||
} | ||
@@ -189,48 +202,48 @@ /** | ||
var content = _ref.content, | ||
type = _ref.type; | ||
var allowedTypes = ["article", "book"]; | ||
type = _ref.type | ||
var allowedTypes = ["article", "book"] | ||
return { | ||
content: Array.isArray(content) ? content.join(",") : content, | ||
name: "keywords", | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag") | ||
}; | ||
}; | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag"), | ||
} | ||
} | ||
var titleMeta = function titleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "title", | ||
property: "og:title" | ||
}; | ||
}; | ||
property: "og:title", | ||
} | ||
} | ||
var geoRegionMeta = function geoRegionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.region" | ||
}; | ||
}; | ||
name: "geo.region", | ||
} | ||
} | ||
var icbmMeta = function icbmMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ", ").concat(longitude), | ||
name: "ICBM" | ||
}; | ||
}; | ||
name: "ICBM", | ||
} | ||
} | ||
var ogSiteNameMeta = function ogSiteNameMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:site_name" | ||
}; | ||
}; | ||
property: "og:site_name", | ||
} | ||
} | ||
var defaultProps$2 = { | ||
content: "website" | ||
}; | ||
content: "website", | ||
} | ||
/** | ||
@@ -241,39 +254,42 @@ * @param {"actor"|"article"|"author"|"blog"|"book"|"city"|"company"|"country"|"food"|"game"|"hotel"|"movie"|"music:song"|"music.album"|"music.playlist"|"music.radio_station"|"politician"|"profile"|"restaurant"|"video.movie"|"video.episode"|"video.tv_show"|"video.other"|"website"} content | ||
var ogTypeMeta = function ogTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$2, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$2, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:type" | ||
}; | ||
}; | ||
ogTypeMeta.defaultProps = defaultProps$2; | ||
property: "og:type", | ||
} | ||
} | ||
ogTypeMeta.defaultProps = defaultProps$2 | ||
var articleSectionMeta = function articleSectionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "article:section" | ||
}; | ||
}; | ||
property: "article:section", | ||
} | ||
} | ||
var ogAudioMeta = function ogAudioMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:audio" | ||
}; | ||
}; | ||
property: "og:audio", | ||
} | ||
} | ||
var ogDeterminerMeta = function ogDeterminerMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:determiner" | ||
}; | ||
}; | ||
property: "og:determiner", | ||
} | ||
} | ||
var defaultProps$3 = { | ||
content: "summary" | ||
}; | ||
content: "summary", | ||
} | ||
/** | ||
@@ -285,4 +301,7 @@ * @param {"app"|"player"|"summary"|"summary_large_image"} content | ||
var twitterCardMeta = function twitterCardMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$3, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$3, | ||
content = _ref.content | ||
@@ -292,58 +311,58 @@ return { | ||
name: "twitter:card", | ||
property: "twitter:card" | ||
}; | ||
}; | ||
property: "twitter:card", | ||
} | ||
} | ||
twitterCardMeta.defaultProps = defaultProps$3; | ||
twitterCardMeta.defaultProps = defaultProps$3 | ||
var twitterCreatorMeta = function twitterCreatorMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterSiteMeta = function twitterSiteMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterDescriptionMeta = function twitterDescriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:description", | ||
property: "twitter:description" | ||
}; | ||
}; | ||
property: "twitter:description", | ||
} | ||
} | ||
var twitterTitleMeta = function twitterTitleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:title", | ||
property: "twitter:title" | ||
}; | ||
}; | ||
property: "twitter:title", | ||
} | ||
} | ||
var twitterUrlMeta = function twitterUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:url", | ||
property: "twitter:url" | ||
}; | ||
}; | ||
property: "twitter:url", | ||
} | ||
} | ||
var defaultProps$4 = { | ||
schema: "og" | ||
}; | ||
schema: "og", | ||
} | ||
/** | ||
@@ -356,5 +375,8 @@ * @param content | ||
var imageAltMeta = function imageAltMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema | ||
@@ -364,19 +386,19 @@ return { | ||
name: "".concat(schema, ":image:alt"), | ||
property: "".concat(schema, ":image:alt") | ||
}; | ||
}; | ||
imageAltMeta.defaultProps = defaultProps$4; | ||
property: "".concat(schema, ":image:alt"), | ||
} | ||
} | ||
imageAltMeta.defaultProps = defaultProps$4 | ||
var imageMeta = function imageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "image", | ||
property: "og:image" | ||
}; | ||
}; | ||
property: "og:image", | ||
} | ||
} | ||
var defaultProps$5 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -390,17 +412,20 @@ * @param {number|string} content | ||
var ogObjectDimensionMeta = function ogObjectDimensionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type | ||
return { | ||
content: isNaN(content) ? parseInt(content) : content, | ||
property: "og:".concat(type, ":").concat(property) | ||
}; | ||
}; | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5; | ||
property: "og:".concat(type, ":").concat(property), | ||
} | ||
} | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5 | ||
var defaultProps$6 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -413,187 +438,219 @@ * @param {string} content The mime type | ||
var ogObjectTypeMeta = function ogObjectTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type | ||
return { | ||
content: content, | ||
property: "og:".concat(type, ":type") | ||
}; | ||
}; | ||
ogObjectTypeMeta.defaultProps = defaultProps$6; | ||
property: "og:".concat(type, ":type"), | ||
} | ||
} | ||
ogObjectTypeMeta.defaultProps = defaultProps$6 | ||
var getImageMetaProps = function getImageMetaProps(image, index) { | ||
var key = "image".concat(key); | ||
var metaProps = {}; | ||
image.alt && (metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og" | ||
})); | ||
image.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image" | ||
})); | ||
image.url && (metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url | ||
})); | ||
image.type && (metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image" | ||
})); | ||
image.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image" | ||
})); | ||
return metaProps; | ||
}; | ||
var key = "image".concat(key) | ||
var metaProps = {} | ||
image.alt && | ||
(metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og", | ||
})) | ||
image.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image", | ||
})) | ||
image.url && | ||
(metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url, | ||
})) | ||
image.type && | ||
(metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image", | ||
})) | ||
image.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image", | ||
})) | ||
return metaProps | ||
} | ||
var ogVideoMeta = function ogVideoMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:video" | ||
}; | ||
}; | ||
property: "og:video", | ||
} | ||
} | ||
var getVideoProps = function getVideoProps(video, index) { | ||
var metaProps = {}; | ||
var key = "ogVideo".concat(index); | ||
video.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video" | ||
})); | ||
video.url && (metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url | ||
})); | ||
video.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video" | ||
})); | ||
return metaProps; | ||
}; | ||
var metaProps = {} | ||
var key = "ogVideo".concat(index) | ||
video.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video", | ||
})) | ||
video.url && | ||
(metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url, | ||
})) | ||
video.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video", | ||
})) | ||
return metaProps | ||
} | ||
var fbAppIdMeta = function fbAppIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:app_id" | ||
}; | ||
}; | ||
property: "fb:app_id", | ||
} | ||
} | ||
var fbProfileIdMeta = function fbProfileIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:profile_id" | ||
}; | ||
}; | ||
property: "fb:profile_id", | ||
} | ||
} | ||
var twitterImageMeta = function twitterImageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:image", | ||
property: "twitter:image" | ||
}; | ||
}; | ||
property: "twitter:image", | ||
} | ||
} | ||
var revisitAfterMeta = function revisitAfterMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "revisit-after" | ||
}; | ||
}; | ||
name: "revisit-after", | ||
} | ||
} | ||
var getMetaProps = function getMetaProps() { | ||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var metaProps = {}; | ||
var props = | ||
arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {} | ||
var metaProps = {} | ||
var articleSection = props.articleSection, | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = _props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = _props$twitterDescrip === void 0 ? props.description : _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = _props$twitterImage === void 0 ? images && images[0] : _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = _props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos; | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = | ||
_props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = | ||
_props$twitterDescrip === void 0 | ||
? props.description | ||
: _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = | ||
_props$twitterImage === void 0 | ||
? images && images[0] | ||
: _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = | ||
_props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos | ||
if (audio) { | ||
audio.url && (metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url | ||
})); | ||
audio.type && (metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio" | ||
})); | ||
audio.url && | ||
(metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url, | ||
})) | ||
audio.type && | ||
(metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio", | ||
})) | ||
} | ||
author && (metaProps.author = authorMeta({ | ||
content: author | ||
})); | ||
description && (metaProps.description = descriptionMeta({ | ||
content: description | ||
})); | ||
determiner && (metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner | ||
})); | ||
distribution && (metaProps.distribution = distributionMeta({ | ||
content: distribution | ||
})); | ||
fbAppId && (metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId | ||
})); | ||
fbProfileId && (metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId | ||
})); | ||
geoPlaceName$1 && (metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1 | ||
})); | ||
author && | ||
(metaProps.author = authorMeta({ | ||
content: author, | ||
})) | ||
description && | ||
(metaProps.description = descriptionMeta({ | ||
content: description, | ||
})) | ||
determiner && | ||
(metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner, | ||
})) | ||
distribution && | ||
(metaProps.distribution = distributionMeta({ | ||
content: distribution, | ||
})) | ||
fbAppId && | ||
(metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId, | ||
})) | ||
fbProfileId && | ||
(metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId, | ||
})) | ||
geoPlaceName$1 && | ||
(metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1, | ||
})) | ||
if (geoPosition) { | ||
metaProps.geoPosition = geoPositionMeta(geoPosition); | ||
metaProps.icbm = icbmMeta(geoPosition); | ||
metaProps.geoPosition = geoPositionMeta(geoPosition) | ||
metaProps.icbm = icbmMeta(geoPosition) | ||
} | ||
geoRegion && (metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion | ||
})); | ||
googleSiteVerification && (metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification | ||
})); | ||
keywords && (metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type | ||
})); | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)); | ||
geoRegion && | ||
(metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion, | ||
})) | ||
googleSiteVerification && | ||
(metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification, | ||
})) | ||
keywords && | ||
(metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type, | ||
})) | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)) | ||
@@ -603,83 +660,98 @@ if (locale) { | ||
alternate: false, | ||
content: locale | ||
}); | ||
localeAlternate && localeAlternate.forEach(function (content, index) { | ||
return metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content | ||
}); | ||
}); | ||
content: locale, | ||
}) | ||
localeAlternate && | ||
localeAlternate.forEach(function (content, index) { | ||
return (metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content, | ||
})) | ||
}) | ||
} | ||
revisitAfter && (metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter | ||
})); | ||
siteName && (metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName | ||
})); | ||
title && (metaProps.title = titleMeta({ | ||
content: title | ||
})); | ||
twitterCard && (metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard | ||
})); | ||
twitterCreator && (metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator | ||
})); | ||
twitterDescription && (metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription | ||
})); | ||
revisitAfter && | ||
(metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter, | ||
})) | ||
siteName && | ||
(metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName, | ||
})) | ||
title && | ||
(metaProps.title = titleMeta({ | ||
content: title, | ||
})) | ||
twitterCard && | ||
(metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard, | ||
})) | ||
twitterCreator && | ||
(metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator, | ||
})) | ||
twitterDescription && | ||
(metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription, | ||
})) | ||
if (twitterImage) { | ||
twitterImage.alt && (metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter" | ||
})); | ||
twitterImage.url && (metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url | ||
})); | ||
twitterImage.alt && | ||
(metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter", | ||
})) | ||
twitterImage.url && | ||
(metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url, | ||
})) | ||
} | ||
twitterSite && (metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite | ||
})); | ||
twitterSite && | ||
(metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite, | ||
})) | ||
if (type) { | ||
metaProps.ogType = ogTypeMeta({ | ||
content: type | ||
}); | ||
articleSection && (metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection | ||
})); | ||
content: type, | ||
}) | ||
articleSection && | ||
(metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection, | ||
})) | ||
} | ||
twitterTitle && (metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle | ||
})); | ||
twitterTitle && | ||
(metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle, | ||
})) | ||
if (url) { | ||
metaProps.ogUrl = ogUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
metaProps.twitterUrl = twitterUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
} | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)); | ||
return metaProps; | ||
}; | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)) | ||
return metaProps | ||
} | ||
var defaults = { | ||
siteMetadata: {} | ||
}; | ||
siteMetadata: {}, | ||
} | ||
var mergeProps = function mergeProps() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
return _objectSpread2({}, siteMetadata, {}, props); | ||
}; | ||
mergeProps.defaults = defaults; | ||
return _objectSpread2({}, siteMetadata, {}, props) | ||
} | ||
mergeProps.defaults = defaults | ||
@@ -698,22 +770,27 @@ /** | ||
var siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
var mergedProps = mergeProps(_objectSpread2({ | ||
siteMetadata: siteMetadata | ||
}, props)); | ||
var metaProps = getMetaProps(mergedProps); | ||
var mergedProps = mergeProps( | ||
_objectSpread2( | ||
{ | ||
siteMetadata: siteMetadata, | ||
}, | ||
props | ||
) | ||
) | ||
var metaProps = getMetaProps(mergedProps) | ||
var lang = mergedProps.lang, | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate; | ||
return /*#__PURE__*/React.createElement(reactHelmet.Helmet, { | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate | ||
return /*#__PURE__*/ React.createElement(reactHelmet.Helmet, { | ||
defer: false, | ||
htmlAttributes: { | ||
lang: lang | ||
lang: lang, | ||
}, | ||
meta: Object.values(metaProps).concat(meta), | ||
title: title, | ||
titleTemplate: titleTemplate | ||
}); | ||
}; | ||
titleTemplate: titleTemplate, | ||
}) | ||
} | ||
SEO.defaultProps = { | ||
@@ -724,4 +801,4 @@ images: [], | ||
type: ogTypeMeta.defaultProps.content, | ||
videos: [] | ||
}; | ||
videos: [], | ||
} | ||
SEO.propTypes = { | ||
@@ -737,5 +814,5 @@ author: PropTypes.string, | ||
titleTemplate: PropTypes.string, | ||
type: PropTypes.string | ||
}; | ||
type: PropTypes.string, | ||
} | ||
exports.SEO = SEO; | ||
exports.SEO = SEO |
@@ -1,4 +0,4 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Helmet } from 'react-helmet'; | ||
import React from "react" | ||
import PropTypes from "prop-types" | ||
import { Helmet } from "react-helmet" | ||
@@ -11,23 +11,24 @@ function _defineProperty(obj, key, value) { | ||
configurable: true, | ||
writable: true | ||
}); | ||
writable: true, | ||
}) | ||
} else { | ||
obj[key] = value; | ||
obj[key] = value | ||
} | ||
return obj; | ||
return obj | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
var keys = Object.keys(object) | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
var symbols = Object.getOwnPropertySymbols(object) | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable | ||
}) | ||
keys.push.apply(keys, symbols) | ||
} | ||
return keys; | ||
return keys | ||
} | ||
@@ -37,101 +38,108 @@ | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var source = arguments[i] != null ? arguments[i] : {} | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
_defineProperty(target, key, source[key]) | ||
}) | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
Object.defineProperty( | ||
target, | ||
key, | ||
Object.getOwnPropertyDescriptor(source, key) | ||
) | ||
}) | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
if (source == null) return {} | ||
var target = {} | ||
var sourceKeys = Object.keys(source) | ||
var key, i | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
key = sourceKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
target[key] = source[key] | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
if (source == null) return {} | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var target = _objectWithoutPropertiesLoose(source, excluded) | ||
var key, i; | ||
var key, i | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source) | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
key = sourceSymbolKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue | ||
target[key] = source[key] | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
var authorMeta = function authorMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "author" | ||
}; | ||
}; | ||
name: "author", | ||
} | ||
} | ||
var defaultProps = { | ||
alternate: false | ||
}; | ||
alternate: false, | ||
} | ||
var ogLocaleMeta = function ogLocaleMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate | ||
return { | ||
content: content, | ||
property: alternate ? "og:locale" : "og:locale:alternate" | ||
}; | ||
}; | ||
property: alternate ? "og:locale" : "og:locale:alternate", | ||
} | ||
} | ||
ogLocaleMeta.defaultProps = defaultProps; | ||
ogLocaleMeta.defaultProps = defaultProps | ||
var ogUrlMeta = function ogUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:url" | ||
}; | ||
}; | ||
property: "og:url", | ||
} | ||
} | ||
var descriptionMeta = function descriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "description", | ||
property: "og:description" | ||
}; | ||
}; | ||
property: "og:description", | ||
} | ||
} | ||
var defaultProps$1 = { | ||
content: "Global" | ||
}; | ||
content: "Global", | ||
} | ||
/** | ||
@@ -143,35 +151,38 @@ * @param {"Global"|"Local"|"IU"} content The level or degree of distribution | ||
var distributionMeta = function distributionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$1, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$1, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
name: "distribution" | ||
}; | ||
}; | ||
name: "distribution", | ||
} | ||
} | ||
var geoPositionMeta = function geoPositionMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ";").concat(longitude), | ||
name: "geo.position" | ||
}; | ||
}; | ||
name: "geo.position", | ||
} | ||
} | ||
var geoPlaceName = function geoPlaceName(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.placename" | ||
}; | ||
}; | ||
name: "geo.placename", | ||
} | ||
} | ||
var googleSiteVerificationMeta = function googleSiteVerificationMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "google-site-verification" | ||
}; | ||
}; | ||
name: "google-site-verification", | ||
} | ||
} | ||
@@ -183,48 +194,48 @@ /** | ||
var content = _ref.content, | ||
type = _ref.type; | ||
var allowedTypes = ["article", "book"]; | ||
type = _ref.type | ||
var allowedTypes = ["article", "book"] | ||
return { | ||
content: Array.isArray(content) ? content.join(",") : content, | ||
name: "keywords", | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag") | ||
}; | ||
}; | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag"), | ||
} | ||
} | ||
var titleMeta = function titleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "title", | ||
property: "og:title" | ||
}; | ||
}; | ||
property: "og:title", | ||
} | ||
} | ||
var geoRegionMeta = function geoRegionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.region" | ||
}; | ||
}; | ||
name: "geo.region", | ||
} | ||
} | ||
var icbmMeta = function icbmMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ", ").concat(longitude), | ||
name: "ICBM" | ||
}; | ||
}; | ||
name: "ICBM", | ||
} | ||
} | ||
var ogSiteNameMeta = function ogSiteNameMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:site_name" | ||
}; | ||
}; | ||
property: "og:site_name", | ||
} | ||
} | ||
var defaultProps$2 = { | ||
content: "website" | ||
}; | ||
content: "website", | ||
} | ||
/** | ||
@@ -235,39 +246,42 @@ * @param {"actor"|"article"|"author"|"blog"|"book"|"city"|"company"|"country"|"food"|"game"|"hotel"|"movie"|"music:song"|"music.album"|"music.playlist"|"music.radio_station"|"politician"|"profile"|"restaurant"|"video.movie"|"video.episode"|"video.tv_show"|"video.other"|"website"} content | ||
var ogTypeMeta = function ogTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$2, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$2, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:type" | ||
}; | ||
}; | ||
ogTypeMeta.defaultProps = defaultProps$2; | ||
property: "og:type", | ||
} | ||
} | ||
ogTypeMeta.defaultProps = defaultProps$2 | ||
var articleSectionMeta = function articleSectionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "article:section" | ||
}; | ||
}; | ||
property: "article:section", | ||
} | ||
} | ||
var ogAudioMeta = function ogAudioMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:audio" | ||
}; | ||
}; | ||
property: "og:audio", | ||
} | ||
} | ||
var ogDeterminerMeta = function ogDeterminerMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:determiner" | ||
}; | ||
}; | ||
property: "og:determiner", | ||
} | ||
} | ||
var defaultProps$3 = { | ||
content: "summary" | ||
}; | ||
content: "summary", | ||
} | ||
/** | ||
@@ -279,4 +293,7 @@ * @param {"app"|"player"|"summary"|"summary_large_image"} content | ||
var twitterCardMeta = function twitterCardMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$3, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$3, | ||
content = _ref.content | ||
@@ -286,58 +303,58 @@ return { | ||
name: "twitter:card", | ||
property: "twitter:card" | ||
}; | ||
}; | ||
property: "twitter:card", | ||
} | ||
} | ||
twitterCardMeta.defaultProps = defaultProps$3; | ||
twitterCardMeta.defaultProps = defaultProps$3 | ||
var twitterCreatorMeta = function twitterCreatorMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterSiteMeta = function twitterSiteMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterDescriptionMeta = function twitterDescriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:description", | ||
property: "twitter:description" | ||
}; | ||
}; | ||
property: "twitter:description", | ||
} | ||
} | ||
var twitterTitleMeta = function twitterTitleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:title", | ||
property: "twitter:title" | ||
}; | ||
}; | ||
property: "twitter:title", | ||
} | ||
} | ||
var twitterUrlMeta = function twitterUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:url", | ||
property: "twitter:url" | ||
}; | ||
}; | ||
property: "twitter:url", | ||
} | ||
} | ||
var defaultProps$4 = { | ||
schema: "og" | ||
}; | ||
schema: "og", | ||
} | ||
/** | ||
@@ -350,5 +367,8 @@ * @param content | ||
var imageAltMeta = function imageAltMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema | ||
@@ -358,19 +378,19 @@ return { | ||
name: "".concat(schema, ":image:alt"), | ||
property: "".concat(schema, ":image:alt") | ||
}; | ||
}; | ||
imageAltMeta.defaultProps = defaultProps$4; | ||
property: "".concat(schema, ":image:alt"), | ||
} | ||
} | ||
imageAltMeta.defaultProps = defaultProps$4 | ||
var imageMeta = function imageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "image", | ||
property: "og:image" | ||
}; | ||
}; | ||
property: "og:image", | ||
} | ||
} | ||
var defaultProps$5 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -384,17 +404,20 @@ * @param {number|string} content | ||
var ogObjectDimensionMeta = function ogObjectDimensionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type | ||
return { | ||
content: isNaN(content) ? parseInt(content) : content, | ||
property: "og:".concat(type, ":").concat(property) | ||
}; | ||
}; | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5; | ||
property: "og:".concat(type, ":").concat(property), | ||
} | ||
} | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5 | ||
var defaultProps$6 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -407,187 +430,219 @@ * @param {string} content The mime type | ||
var ogObjectTypeMeta = function ogObjectTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type | ||
return { | ||
content: content, | ||
property: "og:".concat(type, ":type") | ||
}; | ||
}; | ||
ogObjectTypeMeta.defaultProps = defaultProps$6; | ||
property: "og:".concat(type, ":type"), | ||
} | ||
} | ||
ogObjectTypeMeta.defaultProps = defaultProps$6 | ||
var getImageMetaProps = function getImageMetaProps(image, index) { | ||
var key = "image".concat(key); | ||
var metaProps = {}; | ||
image.alt && (metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og" | ||
})); | ||
image.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image" | ||
})); | ||
image.url && (metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url | ||
})); | ||
image.type && (metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image" | ||
})); | ||
image.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image" | ||
})); | ||
return metaProps; | ||
}; | ||
var key = "image".concat(key) | ||
var metaProps = {} | ||
image.alt && | ||
(metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og", | ||
})) | ||
image.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image", | ||
})) | ||
image.url && | ||
(metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url, | ||
})) | ||
image.type && | ||
(metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image", | ||
})) | ||
image.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image", | ||
})) | ||
return metaProps | ||
} | ||
var ogVideoMeta = function ogVideoMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:video" | ||
}; | ||
}; | ||
property: "og:video", | ||
} | ||
} | ||
var getVideoProps = function getVideoProps(video, index) { | ||
var metaProps = {}; | ||
var key = "ogVideo".concat(index); | ||
video.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video" | ||
})); | ||
video.url && (metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url | ||
})); | ||
video.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video" | ||
})); | ||
return metaProps; | ||
}; | ||
var metaProps = {} | ||
var key = "ogVideo".concat(index) | ||
video.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video", | ||
})) | ||
video.url && | ||
(metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url, | ||
})) | ||
video.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video", | ||
})) | ||
return metaProps | ||
} | ||
var fbAppIdMeta = function fbAppIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:app_id" | ||
}; | ||
}; | ||
property: "fb:app_id", | ||
} | ||
} | ||
var fbProfileIdMeta = function fbProfileIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:profile_id" | ||
}; | ||
}; | ||
property: "fb:profile_id", | ||
} | ||
} | ||
var twitterImageMeta = function twitterImageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:image", | ||
property: "twitter:image" | ||
}; | ||
}; | ||
property: "twitter:image", | ||
} | ||
} | ||
var revisitAfterMeta = function revisitAfterMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "revisit-after" | ||
}; | ||
}; | ||
name: "revisit-after", | ||
} | ||
} | ||
var getMetaProps = function getMetaProps() { | ||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var metaProps = {}; | ||
var props = | ||
arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {} | ||
var metaProps = {} | ||
var articleSection = props.articleSection, | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = _props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = _props$twitterDescrip === void 0 ? props.description : _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = _props$twitterImage === void 0 ? images && images[0] : _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = _props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos; | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = | ||
_props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = | ||
_props$twitterDescrip === void 0 | ||
? props.description | ||
: _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = | ||
_props$twitterImage === void 0 | ||
? images && images[0] | ||
: _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = | ||
_props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos | ||
if (audio) { | ||
audio.url && (metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url | ||
})); | ||
audio.type && (metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio" | ||
})); | ||
audio.url && | ||
(metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url, | ||
})) | ||
audio.type && | ||
(metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio", | ||
})) | ||
} | ||
author && (metaProps.author = authorMeta({ | ||
content: author | ||
})); | ||
description && (metaProps.description = descriptionMeta({ | ||
content: description | ||
})); | ||
determiner && (metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner | ||
})); | ||
distribution && (metaProps.distribution = distributionMeta({ | ||
content: distribution | ||
})); | ||
fbAppId && (metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId | ||
})); | ||
fbProfileId && (metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId | ||
})); | ||
geoPlaceName$1 && (metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1 | ||
})); | ||
author && | ||
(metaProps.author = authorMeta({ | ||
content: author, | ||
})) | ||
description && | ||
(metaProps.description = descriptionMeta({ | ||
content: description, | ||
})) | ||
determiner && | ||
(metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner, | ||
})) | ||
distribution && | ||
(metaProps.distribution = distributionMeta({ | ||
content: distribution, | ||
})) | ||
fbAppId && | ||
(metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId, | ||
})) | ||
fbProfileId && | ||
(metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId, | ||
})) | ||
geoPlaceName$1 && | ||
(metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1, | ||
})) | ||
if (geoPosition) { | ||
metaProps.geoPosition = geoPositionMeta(geoPosition); | ||
metaProps.icbm = icbmMeta(geoPosition); | ||
metaProps.geoPosition = geoPositionMeta(geoPosition) | ||
metaProps.icbm = icbmMeta(geoPosition) | ||
} | ||
geoRegion && (metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion | ||
})); | ||
googleSiteVerification && (metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification | ||
})); | ||
keywords && (metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type | ||
})); | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)); | ||
geoRegion && | ||
(metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion, | ||
})) | ||
googleSiteVerification && | ||
(metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification, | ||
})) | ||
keywords && | ||
(metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type, | ||
})) | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)) | ||
@@ -597,83 +652,98 @@ if (locale) { | ||
alternate: false, | ||
content: locale | ||
}); | ||
localeAlternate && localeAlternate.forEach(function (content, index) { | ||
return metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content | ||
}); | ||
}); | ||
content: locale, | ||
}) | ||
localeAlternate && | ||
localeAlternate.forEach(function (content, index) { | ||
return (metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content, | ||
})) | ||
}) | ||
} | ||
revisitAfter && (metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter | ||
})); | ||
siteName && (metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName | ||
})); | ||
title && (metaProps.title = titleMeta({ | ||
content: title | ||
})); | ||
twitterCard && (metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard | ||
})); | ||
twitterCreator && (metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator | ||
})); | ||
twitterDescription && (metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription | ||
})); | ||
revisitAfter && | ||
(metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter, | ||
})) | ||
siteName && | ||
(metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName, | ||
})) | ||
title && | ||
(metaProps.title = titleMeta({ | ||
content: title, | ||
})) | ||
twitterCard && | ||
(metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard, | ||
})) | ||
twitterCreator && | ||
(metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator, | ||
})) | ||
twitterDescription && | ||
(metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription, | ||
})) | ||
if (twitterImage) { | ||
twitterImage.alt && (metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter" | ||
})); | ||
twitterImage.url && (metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url | ||
})); | ||
twitterImage.alt && | ||
(metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter", | ||
})) | ||
twitterImage.url && | ||
(metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url, | ||
})) | ||
} | ||
twitterSite && (metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite | ||
})); | ||
twitterSite && | ||
(metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite, | ||
})) | ||
if (type) { | ||
metaProps.ogType = ogTypeMeta({ | ||
content: type | ||
}); | ||
articleSection && (metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection | ||
})); | ||
content: type, | ||
}) | ||
articleSection && | ||
(metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection, | ||
})) | ||
} | ||
twitterTitle && (metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle | ||
})); | ||
twitterTitle && | ||
(metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle, | ||
})) | ||
if (url) { | ||
metaProps.ogUrl = ogUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
metaProps.twitterUrl = twitterUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
} | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)); | ||
return metaProps; | ||
}; | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)) | ||
return metaProps | ||
} | ||
var defaults = { | ||
siteMetadata: {} | ||
}; | ||
siteMetadata: {}, | ||
} | ||
var mergeProps = function mergeProps() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
return _objectSpread2({}, siteMetadata, {}, props); | ||
}; | ||
mergeProps.defaults = defaults; | ||
return _objectSpread2({}, siteMetadata, {}, props) | ||
} | ||
mergeProps.defaults = defaults | ||
@@ -692,22 +762,27 @@ /** | ||
var siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
var mergedProps = mergeProps(_objectSpread2({ | ||
siteMetadata: siteMetadata | ||
}, props)); | ||
var metaProps = getMetaProps(mergedProps); | ||
var mergedProps = mergeProps( | ||
_objectSpread2( | ||
{ | ||
siteMetadata: siteMetadata, | ||
}, | ||
props | ||
) | ||
) | ||
var metaProps = getMetaProps(mergedProps) | ||
var lang = mergedProps.lang, | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate; | ||
return /*#__PURE__*/React.createElement(Helmet, { | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate | ||
return /*#__PURE__*/ React.createElement(Helmet, { | ||
defer: false, | ||
htmlAttributes: { | ||
lang: lang | ||
lang: lang, | ||
}, | ||
meta: Object.values(metaProps).concat(meta), | ||
title: title, | ||
titleTemplate: titleTemplate | ||
}); | ||
}; | ||
titleTemplate: titleTemplate, | ||
}) | ||
} | ||
SEO.defaultProps = { | ||
@@ -718,4 +793,4 @@ images: [], | ||
type: ogTypeMeta.defaultProps.content, | ||
videos: [] | ||
}; | ||
videos: [], | ||
} | ||
SEO.propTypes = { | ||
@@ -731,5 +806,5 @@ author: PropTypes.string, | ||
titleTemplate: PropTypes.string, | ||
type: PropTypes.string | ||
}; | ||
type: PropTypes.string, | ||
} | ||
export { SEO }; | ||
export { SEO } |
var metax = (function (exports, React, PropTypes, reactHelmet) { | ||
'use strict'; | ||
"use strict" | ||
React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React; | ||
PropTypes = PropTypes && Object.prototype.hasOwnProperty.call(PropTypes, 'default') ? PropTypes['default'] : PropTypes; | ||
React = | ||
React && Object.prototype.hasOwnProperty.call(React, "default") | ||
? React["default"] | ||
: React | ||
PropTypes = | ||
PropTypes && Object.prototype.hasOwnProperty.call(PropTypes, "default") | ||
? PropTypes["default"] | ||
: PropTypes | ||
@@ -13,23 +19,24 @@ function _defineProperty(obj, key, value) { | ||
configurable: true, | ||
writable: true | ||
}); | ||
writable: true, | ||
}) | ||
} else { | ||
obj[key] = value; | ||
obj[key] = value | ||
} | ||
return obj; | ||
return obj | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
var keys = Object.keys(object) | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
var symbols = Object.getOwnPropertySymbols(object) | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable | ||
}) | ||
keys.push.apply(keys, symbols) | ||
} | ||
return keys; | ||
return keys | ||
} | ||
@@ -39,101 +46,111 @@ | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var source = arguments[i] != null ? arguments[i] : {} | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
_defineProperty(target, key, source[key]) | ||
}) | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
Object.defineProperties( | ||
target, | ||
Object.getOwnPropertyDescriptors(source) | ||
) | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
Object.defineProperty( | ||
target, | ||
key, | ||
Object.getOwnPropertyDescriptor(source, key) | ||
) | ||
}) | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
if (source == null) return {} | ||
var target = {} | ||
var sourceKeys = Object.keys(source) | ||
var key, i | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
key = sourceKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
target[key] = source[key] | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
if (source == null) return {} | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var target = _objectWithoutPropertiesLoose(source, excluded) | ||
var key, i; | ||
var key, i | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source) | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
key = sourceSymbolKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue | ||
target[key] = source[key] | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
var authorMeta = function authorMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "author" | ||
}; | ||
}; | ||
name: "author", | ||
} | ||
} | ||
var defaultProps = { | ||
alternate: false | ||
}; | ||
alternate: false, | ||
} | ||
var ogLocaleMeta = function ogLocaleMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate | ||
return { | ||
content: content, | ||
property: alternate ? "og:locale" : "og:locale:alternate" | ||
}; | ||
}; | ||
property: alternate ? "og:locale" : "og:locale:alternate", | ||
} | ||
} | ||
ogLocaleMeta.defaultProps = defaultProps; | ||
ogLocaleMeta.defaultProps = defaultProps | ||
var ogUrlMeta = function ogUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:url" | ||
}; | ||
}; | ||
property: "og:url", | ||
} | ||
} | ||
var descriptionMeta = function descriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "description", | ||
property: "og:description" | ||
}; | ||
}; | ||
property: "og:description", | ||
} | ||
} | ||
var defaultProps$1 = { | ||
content: "Global" | ||
}; | ||
content: "Global", | ||
} | ||
/** | ||
@@ -145,35 +162,38 @@ * @param {"Global"|"Local"|"IU"} content The level or degree of distribution | ||
var distributionMeta = function distributionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$1, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$1, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
name: "distribution" | ||
}; | ||
}; | ||
name: "distribution", | ||
} | ||
} | ||
var geoPositionMeta = function geoPositionMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ";").concat(longitude), | ||
name: "geo.position" | ||
}; | ||
}; | ||
name: "geo.position", | ||
} | ||
} | ||
var geoPlaceName = function geoPlaceName(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.placename" | ||
}; | ||
}; | ||
name: "geo.placename", | ||
} | ||
} | ||
var googleSiteVerificationMeta = function googleSiteVerificationMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "google-site-verification" | ||
}; | ||
}; | ||
name: "google-site-verification", | ||
} | ||
} | ||
@@ -185,48 +205,48 @@ /** | ||
var content = _ref.content, | ||
type = _ref.type; | ||
var allowedTypes = ["article", "book"]; | ||
type = _ref.type | ||
var allowedTypes = ["article", "book"] | ||
return { | ||
content: Array.isArray(content) ? content.join(",") : content, | ||
name: "keywords", | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag") | ||
}; | ||
}; | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag"), | ||
} | ||
} | ||
var titleMeta = function titleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "title", | ||
property: "og:title" | ||
}; | ||
}; | ||
property: "og:title", | ||
} | ||
} | ||
var geoRegionMeta = function geoRegionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.region" | ||
}; | ||
}; | ||
name: "geo.region", | ||
} | ||
} | ||
var icbmMeta = function icbmMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ", ").concat(longitude), | ||
name: "ICBM" | ||
}; | ||
}; | ||
name: "ICBM", | ||
} | ||
} | ||
var ogSiteNameMeta = function ogSiteNameMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:site_name" | ||
}; | ||
}; | ||
property: "og:site_name", | ||
} | ||
} | ||
var defaultProps$2 = { | ||
content: "website" | ||
}; | ||
content: "website", | ||
} | ||
/** | ||
@@ -237,39 +257,42 @@ * @param {"actor"|"article"|"author"|"blog"|"book"|"city"|"company"|"country"|"food"|"game"|"hotel"|"movie"|"music:song"|"music.album"|"music.playlist"|"music.radio_station"|"politician"|"profile"|"restaurant"|"video.movie"|"video.episode"|"video.tv_show"|"video.other"|"website"} content | ||
var ogTypeMeta = function ogTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$2, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$2, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:type" | ||
}; | ||
}; | ||
ogTypeMeta.defaultProps = defaultProps$2; | ||
property: "og:type", | ||
} | ||
} | ||
ogTypeMeta.defaultProps = defaultProps$2 | ||
var articleSectionMeta = function articleSectionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "article:section" | ||
}; | ||
}; | ||
property: "article:section", | ||
} | ||
} | ||
var ogAudioMeta = function ogAudioMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:audio" | ||
}; | ||
}; | ||
property: "og:audio", | ||
} | ||
} | ||
var ogDeterminerMeta = function ogDeterminerMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:determiner" | ||
}; | ||
}; | ||
property: "og:determiner", | ||
} | ||
} | ||
var defaultProps$3 = { | ||
content: "summary" | ||
}; | ||
content: "summary", | ||
} | ||
/** | ||
@@ -281,4 +304,7 @@ * @param {"app"|"player"|"summary"|"summary_large_image"} content | ||
var twitterCardMeta = function twitterCardMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$3, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$3, | ||
content = _ref.content | ||
@@ -288,58 +314,58 @@ return { | ||
name: "twitter:card", | ||
property: "twitter:card" | ||
}; | ||
}; | ||
property: "twitter:card", | ||
} | ||
} | ||
twitterCardMeta.defaultProps = defaultProps$3; | ||
twitterCardMeta.defaultProps = defaultProps$3 | ||
var twitterCreatorMeta = function twitterCreatorMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterSiteMeta = function twitterSiteMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterDescriptionMeta = function twitterDescriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:description", | ||
property: "twitter:description" | ||
}; | ||
}; | ||
property: "twitter:description", | ||
} | ||
} | ||
var twitterTitleMeta = function twitterTitleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:title", | ||
property: "twitter:title" | ||
}; | ||
}; | ||
property: "twitter:title", | ||
} | ||
} | ||
var twitterUrlMeta = function twitterUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:url", | ||
property: "twitter:url" | ||
}; | ||
}; | ||
property: "twitter:url", | ||
} | ||
} | ||
var defaultProps$4 = { | ||
schema: "og" | ||
}; | ||
schema: "og", | ||
} | ||
/** | ||
@@ -352,5 +378,8 @@ * @param content | ||
var imageAltMeta = function imageAltMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema | ||
@@ -360,19 +389,19 @@ return { | ||
name: "".concat(schema, ":image:alt"), | ||
property: "".concat(schema, ":image:alt") | ||
}; | ||
}; | ||
imageAltMeta.defaultProps = defaultProps$4; | ||
property: "".concat(schema, ":image:alt"), | ||
} | ||
} | ||
imageAltMeta.defaultProps = defaultProps$4 | ||
var imageMeta = function imageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "image", | ||
property: "og:image" | ||
}; | ||
}; | ||
property: "og:image", | ||
} | ||
} | ||
var defaultProps$5 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -386,17 +415,20 @@ * @param {number|string} content | ||
var ogObjectDimensionMeta = function ogObjectDimensionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type | ||
return { | ||
content: isNaN(content) ? parseInt(content) : content, | ||
property: "og:".concat(type, ":").concat(property) | ||
}; | ||
}; | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5; | ||
property: "og:".concat(type, ":").concat(property), | ||
} | ||
} | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5 | ||
var defaultProps$6 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -409,187 +441,219 @@ * @param {string} content The mime type | ||
var ogObjectTypeMeta = function ogObjectTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type | ||
return { | ||
content: content, | ||
property: "og:".concat(type, ":type") | ||
}; | ||
}; | ||
ogObjectTypeMeta.defaultProps = defaultProps$6; | ||
property: "og:".concat(type, ":type"), | ||
} | ||
} | ||
ogObjectTypeMeta.defaultProps = defaultProps$6 | ||
var getImageMetaProps = function getImageMetaProps(image, index) { | ||
var key = "image".concat(key); | ||
var metaProps = {}; | ||
image.alt && (metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og" | ||
})); | ||
image.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image" | ||
})); | ||
image.url && (metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url | ||
})); | ||
image.type && (metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image" | ||
})); | ||
image.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image" | ||
})); | ||
return metaProps; | ||
}; | ||
var key = "image".concat(key) | ||
var metaProps = {} | ||
image.alt && | ||
(metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og", | ||
})) | ||
image.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image", | ||
})) | ||
image.url && | ||
(metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url, | ||
})) | ||
image.type && | ||
(metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image", | ||
})) | ||
image.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image", | ||
})) | ||
return metaProps | ||
} | ||
var ogVideoMeta = function ogVideoMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:video" | ||
}; | ||
}; | ||
property: "og:video", | ||
} | ||
} | ||
var getVideoProps = function getVideoProps(video, index) { | ||
var metaProps = {}; | ||
var key = "ogVideo".concat(index); | ||
video.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video" | ||
})); | ||
video.url && (metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url | ||
})); | ||
video.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video" | ||
})); | ||
return metaProps; | ||
}; | ||
var metaProps = {} | ||
var key = "ogVideo".concat(index) | ||
video.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video", | ||
})) | ||
video.url && | ||
(metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url, | ||
})) | ||
video.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video", | ||
})) | ||
return metaProps | ||
} | ||
var fbAppIdMeta = function fbAppIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:app_id" | ||
}; | ||
}; | ||
property: "fb:app_id", | ||
} | ||
} | ||
var fbProfileIdMeta = function fbProfileIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:profile_id" | ||
}; | ||
}; | ||
property: "fb:profile_id", | ||
} | ||
} | ||
var twitterImageMeta = function twitterImageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:image", | ||
property: "twitter:image" | ||
}; | ||
}; | ||
property: "twitter:image", | ||
} | ||
} | ||
var revisitAfterMeta = function revisitAfterMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "revisit-after" | ||
}; | ||
}; | ||
name: "revisit-after", | ||
} | ||
} | ||
var getMetaProps = function getMetaProps() { | ||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var metaProps = {}; | ||
var props = | ||
arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {} | ||
var metaProps = {} | ||
var articleSection = props.articleSection, | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = _props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = _props$twitterDescrip === void 0 ? props.description : _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = _props$twitterImage === void 0 ? images && images[0] : _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = _props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos; | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = | ||
_props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = | ||
_props$twitterDescrip === void 0 | ||
? props.description | ||
: _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = | ||
_props$twitterImage === void 0 | ||
? images && images[0] | ||
: _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = | ||
_props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos | ||
if (audio) { | ||
audio.url && (metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url | ||
})); | ||
audio.type && (metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio" | ||
})); | ||
audio.url && | ||
(metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url, | ||
})) | ||
audio.type && | ||
(metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio", | ||
})) | ||
} | ||
author && (metaProps.author = authorMeta({ | ||
content: author | ||
})); | ||
description && (metaProps.description = descriptionMeta({ | ||
content: description | ||
})); | ||
determiner && (metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner | ||
})); | ||
distribution && (metaProps.distribution = distributionMeta({ | ||
content: distribution | ||
})); | ||
fbAppId && (metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId | ||
})); | ||
fbProfileId && (metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId | ||
})); | ||
geoPlaceName$1 && (metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1 | ||
})); | ||
author && | ||
(metaProps.author = authorMeta({ | ||
content: author, | ||
})) | ||
description && | ||
(metaProps.description = descriptionMeta({ | ||
content: description, | ||
})) | ||
determiner && | ||
(metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner, | ||
})) | ||
distribution && | ||
(metaProps.distribution = distributionMeta({ | ||
content: distribution, | ||
})) | ||
fbAppId && | ||
(metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId, | ||
})) | ||
fbProfileId && | ||
(metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId, | ||
})) | ||
geoPlaceName$1 && | ||
(metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1, | ||
})) | ||
if (geoPosition) { | ||
metaProps.geoPosition = geoPositionMeta(geoPosition); | ||
metaProps.icbm = icbmMeta(geoPosition); | ||
metaProps.geoPosition = geoPositionMeta(geoPosition) | ||
metaProps.icbm = icbmMeta(geoPosition) | ||
} | ||
geoRegion && (metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion | ||
})); | ||
googleSiteVerification && (metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification | ||
})); | ||
keywords && (metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type | ||
})); | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)); | ||
geoRegion && | ||
(metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion, | ||
})) | ||
googleSiteVerification && | ||
(metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification, | ||
})) | ||
keywords && | ||
(metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type, | ||
})) | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)) | ||
@@ -599,83 +663,98 @@ if (locale) { | ||
alternate: false, | ||
content: locale | ||
}); | ||
localeAlternate && localeAlternate.forEach(function (content, index) { | ||
return metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content | ||
}); | ||
}); | ||
content: locale, | ||
}) | ||
localeAlternate && | ||
localeAlternate.forEach(function (content, index) { | ||
return (metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content, | ||
})) | ||
}) | ||
} | ||
revisitAfter && (metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter | ||
})); | ||
siteName && (metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName | ||
})); | ||
title && (metaProps.title = titleMeta({ | ||
content: title | ||
})); | ||
twitterCard && (metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard | ||
})); | ||
twitterCreator && (metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator | ||
})); | ||
twitterDescription && (metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription | ||
})); | ||
revisitAfter && | ||
(metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter, | ||
})) | ||
siteName && | ||
(metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName, | ||
})) | ||
title && | ||
(metaProps.title = titleMeta({ | ||
content: title, | ||
})) | ||
twitterCard && | ||
(metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard, | ||
})) | ||
twitterCreator && | ||
(metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator, | ||
})) | ||
twitterDescription && | ||
(metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription, | ||
})) | ||
if (twitterImage) { | ||
twitterImage.alt && (metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter" | ||
})); | ||
twitterImage.url && (metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url | ||
})); | ||
twitterImage.alt && | ||
(metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter", | ||
})) | ||
twitterImage.url && | ||
(metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url, | ||
})) | ||
} | ||
twitterSite && (metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite | ||
})); | ||
twitterSite && | ||
(metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite, | ||
})) | ||
if (type) { | ||
metaProps.ogType = ogTypeMeta({ | ||
content: type | ||
}); | ||
articleSection && (metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection | ||
})); | ||
content: type, | ||
}) | ||
articleSection && | ||
(metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection, | ||
})) | ||
} | ||
twitterTitle && (metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle | ||
})); | ||
twitterTitle && | ||
(metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle, | ||
})) | ||
if (url) { | ||
metaProps.ogUrl = ogUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
metaProps.twitterUrl = twitterUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
} | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)); | ||
return metaProps; | ||
}; | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)) | ||
return metaProps | ||
} | ||
var defaults = { | ||
siteMetadata: {} | ||
}; | ||
siteMetadata: {}, | ||
} | ||
var mergeProps = function mergeProps() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
return _objectSpread2({}, siteMetadata, {}, props); | ||
}; | ||
mergeProps.defaults = defaults; | ||
return _objectSpread2({}, siteMetadata, {}, props) | ||
} | ||
mergeProps.defaults = defaults | ||
@@ -694,22 +773,27 @@ /** | ||
var siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
var mergedProps = mergeProps(_objectSpread2({ | ||
siteMetadata: siteMetadata | ||
}, props)); | ||
var metaProps = getMetaProps(mergedProps); | ||
var mergedProps = mergeProps( | ||
_objectSpread2( | ||
{ | ||
siteMetadata: siteMetadata, | ||
}, | ||
props | ||
) | ||
) | ||
var metaProps = getMetaProps(mergedProps) | ||
var lang = mergedProps.lang, | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate; | ||
return /*#__PURE__*/React.createElement(reactHelmet.Helmet, { | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate | ||
return /*#__PURE__*/ React.createElement(reactHelmet.Helmet, { | ||
defer: false, | ||
htmlAttributes: { | ||
lang: lang | ||
lang: lang, | ||
}, | ||
meta: Object.values(metaProps).concat(meta), | ||
title: title, | ||
titleTemplate: titleTemplate | ||
}); | ||
}; | ||
titleTemplate: titleTemplate, | ||
}) | ||
} | ||
SEO.defaultProps = { | ||
@@ -720,4 +804,4 @@ images: [], | ||
type: ogTypeMeta.defaultProps.content, | ||
videos: [] | ||
}; | ||
videos: [], | ||
} | ||
SEO.propTypes = { | ||
@@ -733,9 +817,8 @@ author: PropTypes.string, | ||
titleTemplate: PropTypes.string, | ||
type: PropTypes.string | ||
}; | ||
type: PropTypes.string, | ||
} | ||
exports.SEO = SEO; | ||
exports.SEO = SEO | ||
return exports; | ||
}({}, React, PropTypes, Helmet)); | ||
return exports | ||
})({}, React, PropTypes, Helmet) |
@@ -1,9 +0,29 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('react-helmet')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'react', 'prop-types', 'react-helmet'], factory) : | ||
(global = global || self, factory(global.metax = {}, global.React, global.PropTypes, global.Helmet)); | ||
}(this, (function (exports, React, PropTypes, reactHelmet) { 'use strict'; | ||
;(function (global, factory) { | ||
typeof exports === "object" && typeof module !== "undefined" | ||
? factory( | ||
exports, | ||
require("react"), | ||
require("prop-types"), | ||
require("react-helmet") | ||
) | ||
: typeof define === "function" && define.amd | ||
? define(["exports", "react", "prop-types", "react-helmet"], factory) | ||
: ((global = global || self), | ||
factory( | ||
(global.metax = {}), | ||
global.React, | ||
global.PropTypes, | ||
global.Helmet | ||
)) | ||
})(this, function (exports, React, PropTypes, reactHelmet) { | ||
"use strict" | ||
React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React; | ||
PropTypes = PropTypes && Object.prototype.hasOwnProperty.call(PropTypes, 'default') ? PropTypes['default'] : PropTypes; | ||
React = | ||
React && Object.prototype.hasOwnProperty.call(React, "default") | ||
? React["default"] | ||
: React | ||
PropTypes = | ||
PropTypes && Object.prototype.hasOwnProperty.call(PropTypes, "default") | ||
? PropTypes["default"] | ||
: PropTypes | ||
@@ -16,23 +36,24 @@ function _defineProperty(obj, key, value) { | ||
configurable: true, | ||
writable: true | ||
}); | ||
writable: true, | ||
}) | ||
} else { | ||
obj[key] = value; | ||
obj[key] = value | ||
} | ||
return obj; | ||
return obj | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
var keys = Object.keys(object) | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
var symbols = Object.getOwnPropertySymbols(object) | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable | ||
}) | ||
keys.push.apply(keys, symbols) | ||
} | ||
return keys; | ||
return keys | ||
} | ||
@@ -42,101 +63,111 @@ | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var source = arguments[i] != null ? arguments[i] : {} | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
_defineProperty(target, key, source[key]) | ||
}) | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
Object.defineProperties( | ||
target, | ||
Object.getOwnPropertyDescriptors(source) | ||
) | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
Object.defineProperty( | ||
target, | ||
key, | ||
Object.getOwnPropertyDescriptor(source, key) | ||
) | ||
}) | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
if (source == null) return {} | ||
var target = {} | ||
var sourceKeys = Object.keys(source) | ||
var key, i | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
key = sourceKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
target[key] = source[key] | ||
} | ||
return target; | ||
return target | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
if (source == null) return {} | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var target = _objectWithoutPropertiesLoose(source, excluded) | ||
var key, i; | ||
var key, i | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source) | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
key = sourceSymbolKeys[i] | ||
if (excluded.indexOf(key) >= 0) continue | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue | ||
target[key] = source[key] | ||
} | ||
} | ||
return target; | ||
return target | ||
} | ||
var authorMeta = function authorMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "author" | ||
}; | ||
}; | ||
name: "author", | ||
} | ||
} | ||
var defaultProps = { | ||
alternate: false | ||
}; | ||
alternate: false, | ||
} | ||
var ogLocaleMeta = function ogLocaleMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps, | ||
content = _ref.content, | ||
alternate = _ref.alternate | ||
return { | ||
content: content, | ||
property: alternate ? "og:locale" : "og:locale:alternate" | ||
}; | ||
}; | ||
property: alternate ? "og:locale" : "og:locale:alternate", | ||
} | ||
} | ||
ogLocaleMeta.defaultProps = defaultProps; | ||
ogLocaleMeta.defaultProps = defaultProps | ||
var ogUrlMeta = function ogUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:url" | ||
}; | ||
}; | ||
property: "og:url", | ||
} | ||
} | ||
var descriptionMeta = function descriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "description", | ||
property: "og:description" | ||
}; | ||
}; | ||
property: "og:description", | ||
} | ||
} | ||
var defaultProps$1 = { | ||
content: "Global" | ||
}; | ||
content: "Global", | ||
} | ||
/** | ||
@@ -148,35 +179,38 @@ * @param {"Global"|"Local"|"IU"} content The level or degree of distribution | ||
var distributionMeta = function distributionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$1, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$1, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
name: "distribution" | ||
}; | ||
}; | ||
name: "distribution", | ||
} | ||
} | ||
var geoPositionMeta = function geoPositionMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ";").concat(longitude), | ||
name: "geo.position" | ||
}; | ||
}; | ||
name: "geo.position", | ||
} | ||
} | ||
var geoPlaceName = function geoPlaceName(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.placename" | ||
}; | ||
}; | ||
name: "geo.placename", | ||
} | ||
} | ||
var googleSiteVerificationMeta = function googleSiteVerificationMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "google-site-verification" | ||
}; | ||
}; | ||
name: "google-site-verification", | ||
} | ||
} | ||
@@ -188,48 +222,48 @@ /** | ||
var content = _ref.content, | ||
type = _ref.type; | ||
var allowedTypes = ["article", "book"]; | ||
type = _ref.type | ||
var allowedTypes = ["article", "book"] | ||
return { | ||
content: Array.isArray(content) ? content.join(",") : content, | ||
name: "keywords", | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag") | ||
}; | ||
}; | ||
property: allowedTypes.includes(type) && "".concat(type, ":tag"), | ||
} | ||
} | ||
var titleMeta = function titleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "title", | ||
property: "og:title" | ||
}; | ||
}; | ||
property: "og:title", | ||
} | ||
} | ||
var geoRegionMeta = function geoRegionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "geo.region" | ||
}; | ||
}; | ||
name: "geo.region", | ||
} | ||
} | ||
var icbmMeta = function icbmMeta(_ref) { | ||
var latitude = _ref.latitude, | ||
longitude = _ref.longitude; | ||
longitude = _ref.longitude | ||
return { | ||
content: "".concat(latitude, ", ").concat(longitude), | ||
name: "ICBM" | ||
}; | ||
}; | ||
name: "ICBM", | ||
} | ||
} | ||
var ogSiteNameMeta = function ogSiteNameMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:site_name" | ||
}; | ||
}; | ||
property: "og:site_name", | ||
} | ||
} | ||
var defaultProps$2 = { | ||
content: "website" | ||
}; | ||
content: "website", | ||
} | ||
/** | ||
@@ -240,39 +274,42 @@ * @param {"actor"|"article"|"author"|"blog"|"book"|"city"|"company"|"country"|"food"|"game"|"hotel"|"movie"|"music:song"|"music.album"|"music.playlist"|"music.radio_station"|"politician"|"profile"|"restaurant"|"video.movie"|"video.episode"|"video.tv_show"|"video.other"|"website"} content | ||
var ogTypeMeta = function ogTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$2, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$2, | ||
content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:type" | ||
}; | ||
}; | ||
ogTypeMeta.defaultProps = defaultProps$2; | ||
property: "og:type", | ||
} | ||
} | ||
ogTypeMeta.defaultProps = defaultProps$2 | ||
var articleSectionMeta = function articleSectionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "article:section" | ||
}; | ||
}; | ||
property: "article:section", | ||
} | ||
} | ||
var ogAudioMeta = function ogAudioMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:audio" | ||
}; | ||
}; | ||
property: "og:audio", | ||
} | ||
} | ||
var ogDeterminerMeta = function ogDeterminerMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:determiner" | ||
}; | ||
}; | ||
property: "og:determiner", | ||
} | ||
} | ||
var defaultProps$3 = { | ||
content: "summary" | ||
}; | ||
content: "summary", | ||
} | ||
/** | ||
@@ -284,4 +321,7 @@ * @param {"app"|"player"|"summary"|"summary_large_image"} content | ||
var twitterCardMeta = function twitterCardMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$3, | ||
content = _ref.content; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$3, | ||
content = _ref.content | ||
@@ -291,58 +331,58 @@ return { | ||
name: "twitter:card", | ||
property: "twitter:card" | ||
}; | ||
}; | ||
property: "twitter:card", | ||
} | ||
} | ||
twitterCardMeta.defaultProps = defaultProps$3; | ||
twitterCardMeta.defaultProps = defaultProps$3 | ||
var twitterCreatorMeta = function twitterCreatorMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:creator" : "twitter:creator:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterSiteMeta = function twitterSiteMeta(_ref) { | ||
var content = _ref.content; | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id"; | ||
var content = _ref.content | ||
var property = isNaN(content) ? "twitter:site" : "twitter:site:id" | ||
return { | ||
content: content, | ||
name: property, | ||
property: property | ||
}; | ||
}; | ||
property: property, | ||
} | ||
} | ||
var twitterDescriptionMeta = function twitterDescriptionMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:description", | ||
property: "twitter:description" | ||
}; | ||
}; | ||
property: "twitter:description", | ||
} | ||
} | ||
var twitterTitleMeta = function twitterTitleMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:title", | ||
property: "twitter:title" | ||
}; | ||
}; | ||
property: "twitter:title", | ||
} | ||
} | ||
var twitterUrlMeta = function twitterUrlMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:url", | ||
property: "twitter:url" | ||
}; | ||
}; | ||
property: "twitter:url", | ||
} | ||
} | ||
var defaultProps$4 = { | ||
schema: "og" | ||
}; | ||
schema: "og", | ||
} | ||
/** | ||
@@ -355,5 +395,8 @@ * @param content | ||
var imageAltMeta = function imageAltMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$4, | ||
content = _ref.content, | ||
schema = _ref.schema | ||
@@ -363,19 +406,19 @@ return { | ||
name: "".concat(schema, ":image:alt"), | ||
property: "".concat(schema, ":image:alt") | ||
}; | ||
}; | ||
imageAltMeta.defaultProps = defaultProps$4; | ||
property: "".concat(schema, ":image:alt"), | ||
} | ||
} | ||
imageAltMeta.defaultProps = defaultProps$4 | ||
var imageMeta = function imageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "image", | ||
property: "og:image" | ||
}; | ||
}; | ||
property: "og:image", | ||
} | ||
} | ||
var defaultProps$5 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -389,17 +432,20 @@ * @param {number|string} content | ||
var ogObjectDimensionMeta = function ogObjectDimensionMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$5, | ||
content = _ref.content, | ||
property = _ref.property, | ||
type = _ref.type | ||
return { | ||
content: isNaN(content) ? parseInt(content) : content, | ||
property: "og:".concat(type, ":").concat(property) | ||
}; | ||
}; | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5; | ||
property: "og:".concat(type, ":").concat(property), | ||
} | ||
} | ||
ogObjectDimensionMeta.defaultProps = defaultProps$5 | ||
var defaultProps$6 = { | ||
type: "image" | ||
}; | ||
type: "image", | ||
} | ||
/** | ||
@@ -412,187 +458,219 @@ * @param {string} content The mime type | ||
var ogObjectTypeMeta = function ogObjectTypeMeta() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type; | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaultProps$6, | ||
content = _ref.content, | ||
type = _ref.type | ||
return { | ||
content: content, | ||
property: "og:".concat(type, ":type") | ||
}; | ||
}; | ||
ogObjectTypeMeta.defaultProps = defaultProps$6; | ||
property: "og:".concat(type, ":type"), | ||
} | ||
} | ||
ogObjectTypeMeta.defaultProps = defaultProps$6 | ||
var getImageMetaProps = function getImageMetaProps(image, index) { | ||
var key = "image".concat(key); | ||
var metaProps = {}; | ||
image.alt && (metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og" | ||
})); | ||
image.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image" | ||
})); | ||
image.url && (metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url | ||
})); | ||
image.type && (metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image" | ||
})); | ||
image.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image" | ||
})); | ||
return metaProps; | ||
}; | ||
var key = "image".concat(key) | ||
var metaProps = {} | ||
image.alt && | ||
(metaProps["".concat(key, "Alt")] = imageAltMeta({ | ||
content: image.alt, | ||
schema: "og", | ||
})) | ||
image.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: image.height, | ||
property: "height", | ||
type: "image", | ||
})) | ||
image.url && | ||
(metaProps["".concat(key, "Url")] = imageMeta({ | ||
content: image.url, | ||
})) | ||
image.type && | ||
(metaProps["".concat(key, "Type")] = ogObjectTypeMeta({ | ||
content: image.type, | ||
type: "image", | ||
})) | ||
image.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: image.width, | ||
property: "width", | ||
type: "image", | ||
})) | ||
return metaProps | ||
} | ||
var ogVideoMeta = function ogVideoMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "og:video" | ||
}; | ||
}; | ||
property: "og:video", | ||
} | ||
} | ||
var getVideoProps = function getVideoProps(video, index) { | ||
var metaProps = {}; | ||
var key = "ogVideo".concat(index); | ||
video.height && (metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video" | ||
})); | ||
video.url && (metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url | ||
})); | ||
video.width && (metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video" | ||
})); | ||
return metaProps; | ||
}; | ||
var metaProps = {} | ||
var key = "ogVideo".concat(index) | ||
video.height && | ||
(metaProps["".concat(key, "Height")] = ogObjectDimensionMeta({ | ||
content: video.height, | ||
property: "height", | ||
type: "video", | ||
})) | ||
video.url && | ||
(metaProps.ogVideo = ogVideoMeta({ | ||
content: video.url, | ||
})) | ||
video.width && | ||
(metaProps["".concat(key, "Width")] = ogObjectDimensionMeta({ | ||
content: video.width, | ||
property: "width", | ||
type: "video", | ||
})) | ||
return metaProps | ||
} | ||
var fbAppIdMeta = function fbAppIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:app_id" | ||
}; | ||
}; | ||
property: "fb:app_id", | ||
} | ||
} | ||
var fbProfileIdMeta = function fbProfileIdMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
property: "fb:profile_id" | ||
}; | ||
}; | ||
property: "fb:profile_id", | ||
} | ||
} | ||
var twitterImageMeta = function twitterImageMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "twitter:image", | ||
property: "twitter:image" | ||
}; | ||
}; | ||
property: "twitter:image", | ||
} | ||
} | ||
var revisitAfterMeta = function revisitAfterMeta(_ref) { | ||
var content = _ref.content; | ||
var content = _ref.content | ||
return { | ||
content: content, | ||
name: "revisit-after" | ||
}; | ||
}; | ||
name: "revisit-after", | ||
} | ||
} | ||
var getMetaProps = function getMetaProps() { | ||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var metaProps = {}; | ||
var props = | ||
arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {} | ||
var metaProps = {} | ||
var articleSection = props.articleSection, | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = _props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = _props$twitterDescrip === void 0 ? props.description : _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = _props$twitterImage === void 0 ? images && images[0] : _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = _props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos; | ||
audio = props.audio, | ||
author = props.author, | ||
description = props.description, | ||
determiner = props.determiner, | ||
distribution = props.distribution, | ||
fbAppId = props.fbAppId, | ||
fbProfileId = props.fbProfileId, | ||
geoPlaceName$1 = props.geoPlaceName, | ||
geoPosition = props.geoPosition, | ||
geoRegion = props.geoRegion, | ||
_props$images = props.images, | ||
images = _props$images === void 0 ? [] : _props$images, | ||
keywords = props.keywords, | ||
googleSiteVerification = props.googleSiteVerification, | ||
locale = props.locale, | ||
_props$localeAlternat = props.localeAlternate, | ||
localeAlternate = | ||
_props$localeAlternat === void 0 ? [] : _props$localeAlternat, | ||
revisitAfter = props.revisitAfter, | ||
siteName = props.siteName, | ||
title = props.title, | ||
twitterCard = props.twitterCard, | ||
twitterCreator = props.twitterCreator, | ||
_props$twitterDescrip = props.twitterDescription, | ||
twitterDescription = | ||
_props$twitterDescrip === void 0 | ||
? props.description | ||
: _props$twitterDescrip, | ||
_props$twitterImage = props.twitterImage, | ||
twitterImage = | ||
_props$twitterImage === void 0 | ||
? images && images[0] | ||
: _props$twitterImage, | ||
twitterSite = props.twitterSite, | ||
_props$twitterTitle = props.twitterTitle, | ||
twitterTitle = | ||
_props$twitterTitle === void 0 ? props.title : _props$twitterTitle, | ||
_props$type = props.type, | ||
type = _props$type === void 0 ? "website" : _props$type, | ||
url = props.url, | ||
_props$videos = props.videos, | ||
videos = _props$videos === void 0 ? [] : _props$videos | ||
if (audio) { | ||
audio.url && (metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url | ||
})); | ||
audio.type && (metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio" | ||
})); | ||
audio.url && | ||
(metaProps.ogAudio = ogAudioMeta({ | ||
content: audio.url, | ||
})) | ||
audio.type && | ||
(metaProps.ogAudioType = ogObjectTypeMeta({ | ||
content: audio.type, | ||
type: "audio", | ||
})) | ||
} | ||
author && (metaProps.author = authorMeta({ | ||
content: author | ||
})); | ||
description && (metaProps.description = descriptionMeta({ | ||
content: description | ||
})); | ||
determiner && (metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner | ||
})); | ||
distribution && (metaProps.distribution = distributionMeta({ | ||
content: distribution | ||
})); | ||
fbAppId && (metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId | ||
})); | ||
fbProfileId && (metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId | ||
})); | ||
geoPlaceName$1 && (metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1 | ||
})); | ||
author && | ||
(metaProps.author = authorMeta({ | ||
content: author, | ||
})) | ||
description && | ||
(metaProps.description = descriptionMeta({ | ||
content: description, | ||
})) | ||
determiner && | ||
(metaProps.ogDeterminer = ogDeterminerMeta({ | ||
content: determiner, | ||
})) | ||
distribution && | ||
(metaProps.distribution = distributionMeta({ | ||
content: distribution, | ||
})) | ||
fbAppId && | ||
(metaProps.fbAppId = fbAppIdMeta({ | ||
content: fbAppId, | ||
})) | ||
fbProfileId && | ||
(metaProps.fbProfileId = fbProfileIdMeta({ | ||
content: fbProfileId, | ||
})) | ||
geoPlaceName$1 && | ||
(metaProps.geoPlaceName = geoPlaceName({ | ||
content: geoPlaceName$1, | ||
})) | ||
if (geoPosition) { | ||
metaProps.geoPosition = geoPositionMeta(geoPosition); | ||
metaProps.icbm = icbmMeta(geoPosition); | ||
metaProps.geoPosition = geoPositionMeta(geoPosition) | ||
metaProps.icbm = icbmMeta(geoPosition) | ||
} | ||
geoRegion && (metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion | ||
})); | ||
googleSiteVerification && (metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification | ||
})); | ||
keywords && (metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type | ||
})); | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)); | ||
geoRegion && | ||
(metaProps.geoRegion = geoRegionMeta({ | ||
content: geoRegion, | ||
})) | ||
googleSiteVerification && | ||
(metaProps.googleSiteVerification = googleSiteVerificationMeta({ | ||
content: googleSiteVerification, | ||
})) | ||
keywords && | ||
(metaProps.keywords = keywordsMeta({ | ||
content: keywords, | ||
type: type, | ||
})) | ||
images && Object.assign(metaProps, images.forEach(getImageMetaProps)) | ||
@@ -602,83 +680,98 @@ if (locale) { | ||
alternate: false, | ||
content: locale | ||
}); | ||
localeAlternate && localeAlternate.forEach(function (content, index) { | ||
return metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content | ||
}); | ||
}); | ||
content: locale, | ||
}) | ||
localeAlternate && | ||
localeAlternate.forEach(function (content, index) { | ||
return (metaProps["ogLocaleAlternate".concat(index)] = ogLocaleMeta({ | ||
alternate: true, | ||
content: content, | ||
})) | ||
}) | ||
} | ||
revisitAfter && (metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter | ||
})); | ||
siteName && (metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName | ||
})); | ||
title && (metaProps.title = titleMeta({ | ||
content: title | ||
})); | ||
twitterCard && (metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard | ||
})); | ||
twitterCreator && (metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator | ||
})); | ||
twitterDescription && (metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription | ||
})); | ||
revisitAfter && | ||
(metaProps.revisitAfter = revisitAfterMeta({ | ||
content: revisitAfter, | ||
})) | ||
siteName && | ||
(metaProps.ogSiteName = ogSiteNameMeta({ | ||
content: siteName, | ||
})) | ||
title && | ||
(metaProps.title = titleMeta({ | ||
content: title, | ||
})) | ||
twitterCard && | ||
(metaProps.twitterCard = twitterCardMeta({ | ||
content: twitterCard, | ||
})) | ||
twitterCreator && | ||
(metaProps.twitterCreator = twitterCreatorMeta({ | ||
content: twitterCreator, | ||
})) | ||
twitterDescription && | ||
(metaProps.twitterDescription = twitterDescriptionMeta({ | ||
content: twitterDescription, | ||
})) | ||
if (twitterImage) { | ||
twitterImage.alt && (metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter" | ||
})); | ||
twitterImage.url && (metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url | ||
})); | ||
twitterImage.alt && | ||
(metaProps.twitterImageAlt = imageAltMeta({ | ||
content: twitterImage.alt, | ||
schema: "twitter", | ||
})) | ||
twitterImage.url && | ||
(metaProps.twitterImage = twitterImageMeta({ | ||
content: twitterImage.url, | ||
})) | ||
} | ||
twitterSite && (metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite | ||
})); | ||
twitterSite && | ||
(metaProps.twitterSite = twitterSiteMeta({ | ||
content: twitterSite, | ||
})) | ||
if (type) { | ||
metaProps.ogType = ogTypeMeta({ | ||
content: type | ||
}); | ||
articleSection && (metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection | ||
})); | ||
content: type, | ||
}) | ||
articleSection && | ||
(metaProps.articleSection = articleSectionMeta({ | ||
content: articleSection, | ||
})) | ||
} | ||
twitterTitle && (metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle | ||
})); | ||
twitterTitle && | ||
(metaProps.twitterTitle = twitterTitleMeta({ | ||
content: twitterTitle, | ||
})) | ||
if (url) { | ||
metaProps.ogUrl = ogUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
metaProps.twitterUrl = twitterUrlMeta({ | ||
content: url | ||
}); | ||
content: url, | ||
}) | ||
} | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)); | ||
return metaProps; | ||
}; | ||
videos && Object.assign(metaProps, videos.forEach(getVideoProps)) | ||
return metaProps | ||
} | ||
var defaults = { | ||
siteMetadata: {} | ||
}; | ||
siteMetadata: {}, | ||
} | ||
var mergeProps = function mergeProps() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
var _ref = | ||
arguments.length > 0 && arguments[0] !== undefined | ||
? arguments[0] | ||
: defaults, | ||
siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
return _objectSpread2({}, siteMetadata, {}, props); | ||
}; | ||
mergeProps.defaults = defaults; | ||
return _objectSpread2({}, siteMetadata, {}, props) | ||
} | ||
mergeProps.defaults = defaults | ||
@@ -697,22 +790,27 @@ /** | ||
var siteMetadata = _ref.siteMetadata, | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]); | ||
props = _objectWithoutProperties(_ref, ["siteMetadata"]) | ||
var mergedProps = mergeProps(_objectSpread2({ | ||
siteMetadata: siteMetadata | ||
}, props)); | ||
var metaProps = getMetaProps(mergedProps); | ||
var mergedProps = mergeProps( | ||
_objectSpread2( | ||
{ | ||
siteMetadata: siteMetadata, | ||
}, | ||
props | ||
) | ||
) | ||
var metaProps = getMetaProps(mergedProps) | ||
var lang = mergedProps.lang, | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate; | ||
return /*#__PURE__*/React.createElement(reactHelmet.Helmet, { | ||
meta = mergedProps.meta, | ||
title = mergedProps.title, | ||
titleTemplate = mergedProps.titleTemplate | ||
return /*#__PURE__*/ React.createElement(reactHelmet.Helmet, { | ||
defer: false, | ||
htmlAttributes: { | ||
lang: lang | ||
lang: lang, | ||
}, | ||
meta: Object.values(metaProps).concat(meta), | ||
title: title, | ||
titleTemplate: titleTemplate | ||
}); | ||
}; | ||
titleTemplate: titleTemplate, | ||
}) | ||
} | ||
SEO.defaultProps = { | ||
@@ -723,4 +821,4 @@ images: [], | ||
type: ogTypeMeta.defaultProps.content, | ||
videos: [] | ||
}; | ||
videos: [], | ||
} | ||
SEO.propTypes = { | ||
@@ -736,9 +834,8 @@ author: PropTypes.string, | ||
titleTemplate: PropTypes.string, | ||
type: PropTypes.string | ||
}; | ||
type: PropTypes.string, | ||
} | ||
exports.SEO = SEO; | ||
exports.SEO = SEO | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
Object.defineProperty(exports, "__esModule", { value: true }) | ||
}) |
{ | ||
"name": "metax", | ||
"version": "0.18.0", | ||
"version": "0.19.0", | ||
"description": "Add SEO and other metadata tags to your Gatsby website.", | ||
@@ -55,3 +55,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "7b80a4450b5d9c93d2e1ba1a9e7d2e66d5e8e653" | ||
"gitHead": "a0a7cdf5786f0a8c250c786f990dfe6f61abfbe6" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
81520
2882
1