Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amp-react-components

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-react-components - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## <small>1.5.4 (2019-10-24)</small>
* fix: remove ComponentScript ([44729a9](https://github.com/danhuang1202/amp-react-components/commit/44729a9))
* fix: remove import of ComponentScript ([7b5dbc2](https://github.com/danhuang1202/amp-react-components/commit/7b5dbc2))
## <small>1.5.3 (2019-10-21)</small>

@@ -2,0 +7,0 @@

27

es/components/AmpAnimation.js
import React from 'react';
function ComponentScript(_ref) {
var tag = _ref.tag,
attribute = _ref.attribute,
data = _ref.data;
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(data)
__html: JSON.stringify(animation)
}
});
return React.createElement(tag, attribute, script);
return React.createElement('amp-animation', {
id: id,
layout: 'nodisplay'
}, script);
}
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
return React.createElement(ComponentScript, {
tag: "amp-animation",
attribute: {
id: id,
layout: 'nodisplay'
},
data: animation
});
}
export default AmpAnimation;
import React from 'react';
function ComponentScript(_ref) {
var tag = _ref.tag,
attribute = _ref.attribute,
data = _ref.data;
function AmpState(_ref) {
var id = _ref.id,
state = _ref.state;
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(data)
__html: JSON.stringify(state)
}
});
return React.createElement(tag, attribute, script);
return React.createElement('amp-state', {
id: id
}, script);
}
function AmpState(_ref) {
var id = _ref.id,
state = _ref.state;
return React.createElement(ComponentScript, {
tag: "amp-state",
attribute: {
id: id
},
data: state
});
}
export default AmpState;

@@ -1218,28 +1218,17 @@ import React from 'react';

function ComponentScript(_ref) {
var tag = _ref.tag,
attribute = _ref.attribute,
data = _ref.data;
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(data)
__html: JSON.stringify(animation)
}
});
return React.createElement(tag, attribute, script);
return React.createElement('amp-animation', {
id: id,
layout: 'nodisplay'
}, script);
}
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
return React.createElement(ComponentScript, {
tag: "amp-animation",
attribute: {
id: id,
layout: 'nodisplay'
},
data: animation
});
}
function AmpMustache(_ref) {

@@ -1266,11 +1255,13 @@ var id = _ref.id,

state = _ref.state;
return React.createElement(ComponentScript, {
tag: "amp-state",
attribute: {
id: id
},
data: state
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(state)
}
});
return React.createElement('amp-state', {
id: id
}, script);
}
export { Amp3dGltf, Amp3qPlayer, AmpAccess, AmpAccessLaterpay, AmpAccessPoool, AmpAccordion, AmpActionMacro, AmpAd, AmpAdExit, AmpAddthis, AmpAnalytics, AmpAnim, AmpAnimation, AmpApesterMedia, AmpAppBanner, AmpAudio, AmpAutoAds, AmpAutocomplete, AmpBaseCarousel, AmpBeopinion, AmpBodymovinAnimation, AmpBridPlayer, AmpBrightcove, AmpBysideContent, AmpCallTracking, AmpCarousel, AmpConnatixPlayer, AmpConsent, AmpDailymotion, AmpDateCountdown, AmpDateDisplay, AmpDatePicker, AmpDelightPlayer, AmpDynamicCssClasses, AmpEmbedlyCard, AmpExperiment, AmpFacebook, AmpFacebookComments, AmpFacebookLike, AmpFacebookPage, AmpFitText, AmpFont, AmpForm, AmpFxCollection, AmpFxFlyingCarpet, AmpGeo, AmpGfycat, AmpGist, AmpGoogleDocumentEmbed, AmpGoogleVrviewImage, AmpHulu, AmpIframe, AmpImaVideo, AmpImageLightbox, AmpImageSlider, AmpImg, AmpImgur, AmpInputmask, AmpInstagram, AmpInstallServiceworker, AmpIzlesene, AmpJwplayer, AmpKalturaPlayer, AmpLightbox, AmpLightboxGallery, AmpLinkRewriter, AmpList, AmpLiveList, AmpMathml, AmpMegaphone, AmpMinuteMediaPlayer, AmpMowplayer, AmpMustache, AmpNextPage, AmpNexxtvPlayer, AmpO2Player, AmpOoyalaPlayer, AmpOrientationObserver, AmpPanZoom, AmpPinterest, AmpPixel, AmpPlaybuzz, AmpPositionObserver, AmpPowrPlayer, AmpReachPlayer, AmpRecaptchaInput, AmpReddit, AmpRiddleQuiz, AmpScript, AmpSelector, AmpShareTracking, AmpSidebar, AmpSkimlinks, AmpSmartlinks, AmpSocialShare, AmpSoundcloud, AmpSpringboardPlayer, AmpState, AmpStickyAd, AmpStory, AmpStoryAutoAds, AmpStoryBookend, AmpStoryCtaLayer, AmpStoryGridLayer, AmpStoryPage, AmpStoryPageAttachment, AmpSubscriptions, AmpSubscriptionsGoogle, AmpTimeago, AmpTruncateText, AmpTwitter, AmpUserLocation, AmpUserNotification, AmpVideo, AmpVideoDocking, AmpVideoIframe, AmpVimeo, AmpVine, AmpViqeoPlayer, AmpVizVega, AmpVk, AmpWebPush, AmpWistiaPlayer, AmpYotpo, AmpYoutube, ComponentScript, Script };
export { Amp3dGltf, Amp3qPlayer, AmpAccess, AmpAccessLaterpay, AmpAccessPoool, AmpAccordion, AmpActionMacro, AmpAd, AmpAdExit, AmpAddthis, AmpAnalytics, AmpAnim, AmpAnimation, AmpApesterMedia, AmpAppBanner, AmpAudio, AmpAutoAds, AmpAutocomplete, AmpBaseCarousel, AmpBeopinion, AmpBodymovinAnimation, AmpBridPlayer, AmpBrightcove, AmpBysideContent, AmpCallTracking, AmpCarousel, AmpConnatixPlayer, AmpConsent, AmpDailymotion, AmpDateCountdown, AmpDateDisplay, AmpDatePicker, AmpDelightPlayer, AmpDynamicCssClasses, AmpEmbedlyCard, AmpExperiment, AmpFacebook, AmpFacebookComments, AmpFacebookLike, AmpFacebookPage, AmpFitText, AmpFont, AmpForm, AmpFxCollection, AmpFxFlyingCarpet, AmpGeo, AmpGfycat, AmpGist, AmpGoogleDocumentEmbed, AmpGoogleVrviewImage, AmpHulu, AmpIframe, AmpImaVideo, AmpImageLightbox, AmpImageSlider, AmpImg, AmpImgur, AmpInputmask, AmpInstagram, AmpInstallServiceworker, AmpIzlesene, AmpJwplayer, AmpKalturaPlayer, AmpLightbox, AmpLightboxGallery, AmpLinkRewriter, AmpList, AmpLiveList, AmpMathml, AmpMegaphone, AmpMinuteMediaPlayer, AmpMowplayer, AmpMustache, AmpNextPage, AmpNexxtvPlayer, AmpO2Player, AmpOoyalaPlayer, AmpOrientationObserver, AmpPanZoom, AmpPinterest, AmpPixel, AmpPlaybuzz, AmpPositionObserver, AmpPowrPlayer, AmpReachPlayer, AmpRecaptchaInput, AmpReddit, AmpRiddleQuiz, AmpScript, AmpSelector, AmpShareTracking, AmpSidebar, AmpSkimlinks, AmpSmartlinks, AmpSocialShare, AmpSoundcloud, AmpSpringboardPlayer, AmpState, AmpStickyAd, AmpStory, AmpStoryAutoAds, AmpStoryBookend, AmpStoryCtaLayer, AmpStoryGridLayer, AmpStoryPage, AmpStoryPageAttachment, AmpSubscriptions, AmpSubscriptionsGoogle, AmpTimeago, AmpTruncateText, AmpTwitter, AmpUserLocation, AmpUserNotification, AmpVideo, AmpVideoDocking, AmpVideoIframe, AmpVimeo, AmpVine, AmpViqeoPlayer, AmpVizVega, AmpVk, AmpWebPush, AmpWistiaPlayer, AmpYotpo, AmpYoutube, Script };

@@ -7,28 +7,17 @@ 'use strict';

function ComponentScript(_ref) {
var tag = _ref.tag,
attribute = _ref.attribute,
data = _ref.data;
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(data)
__html: JSON.stringify(animation)
}
});
return React.createElement(tag, attribute, script);
return React.createElement('amp-animation', {
id: id,
layout: 'nodisplay'
}, script);
}
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
return React.createElement(ComponentScript, {
tag: "amp-animation",
attribute: {
id: id,
layout: 'nodisplay'
},
data: animation
});
}
module.exports = AmpAnimation;

@@ -7,27 +7,16 @@ 'use strict';

function ComponentScript(_ref) {
var tag = _ref.tag,
attribute = _ref.attribute,
data = _ref.data;
function AmpState(_ref) {
var id = _ref.id,
state = _ref.state;
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(data)
__html: JSON.stringify(state)
}
});
return React.createElement(tag, attribute, script);
return React.createElement('amp-state', {
id: id
}, script);
}
function AmpState(_ref) {
var id = _ref.id,
state = _ref.state;
return React.createElement(ComponentScript, {
tag: "amp-state",
attribute: {
id: id
},
data: state
});
}
module.exports = AmpState;

@@ -1224,28 +1224,17 @@ 'use strict';

function ComponentScript(_ref) {
var tag = _ref.tag,
attribute = _ref.attribute,
data = _ref.data;
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(data)
__html: JSON.stringify(animation)
}
});
return React.createElement(tag, attribute, script);
return React.createElement('amp-animation', {
id: id,
layout: 'nodisplay'
}, script);
}
function AmpAnimation(_ref) {
var id = _ref.id,
animation = _ref.animation;
return React.createElement(ComponentScript, {
tag: "amp-animation",
attribute: {
id: id,
layout: 'nodisplay'
},
data: animation
});
}
function AmpMustache(_ref) {

@@ -1272,9 +1261,11 @@ var id = _ref.id,

state = _ref.state;
return React.createElement(ComponentScript, {
tag: "amp-state",
attribute: {
id: id
},
data: state
var script = React.createElement('script', {
type: 'application/json',
dangerouslySetInnerHTML: {
__html: JSON.stringify(state)
}
});
return React.createElement('amp-state', {
id: id
}, script);
}

@@ -1407,3 +1398,2 @@

exports.AmpYoutube = AmpYoutube;
exports.ComponentScript = ComponentScript;
exports.Script = Script;
{
"name": "amp-react-components",
"version": "1.5.3",
"version": "1.5.4",
"description": "Render AMP components with React",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -126,4 +126,3 @@ import Amp3dGltf from './components/view/Amp3dGltf';

import AmpState from './components/util/AmpState';
import ComponentScript from './components/util/ComponentScript';
import Script from './components/util/Script';
export { Amp3dGltf, Amp3qPlayer, AmpAccessLaterpay, AmpAccessPoool, AmpAccordion, AmpActionMacro, AmpAd, AmpAdExit, AmpAddthis, AmpAnalytics, AmpAnim, AmpApesterMedia, AmpAppBanner, AmpAudio, AmpAutoAds, AmpAutocomplete, AmpBaseCarousel, AmpBeopinion, AmpBodymovinAnimation, AmpBridPlayer, AmpBrightcove, AmpBysideContent, AmpCallTracking, AmpCarousel, AmpConnatixPlayer, AmpConsent, AmpDailymotion, AmpDateCountdown, AmpDateDisplay, AmpDatePicker, AmpDelightPlayer, AmpDynamicCssClasses, AmpEmbedlyCard, AmpExperiment, AmpFacebook, AmpFacebookComments, AmpFacebookLike, AmpFacebookPage, AmpFitText, AmpFont, AmpForm, AmpFxCollection, AmpFxFlyingCarpet, AmpGeo, AmpGfycat, AmpGist, AmpGoogleDocumentEmbed, AmpGoogleVrviewImage, AmpHulu, AmpIframe, AmpImaVideo, AmpImageLightbox, AmpImageSlider, AmpImg, AmpImgur, AmpInputmask, AmpInstagram, AmpInstallServiceworker, AmpIzlesene, AmpJwplayer, AmpKalturaPlayer, AmpLightbox, AmpLightboxGallery, AmpLinkRewriter, AmpList, AmpLiveList, AmpMathml, AmpMegaphone, AmpMinuteMediaPlayer, AmpMowplayer, AmpNextPage, AmpNexxtvPlayer, AmpO2Player, AmpOoyalaPlayer, AmpOrientationObserver, AmpPanZoom, AmpPinterest, AmpPixel, AmpPlaybuzz, AmpPositionObserver, AmpPowrPlayer, AmpReachPlayer, AmpRecaptchaInput, AmpReddit, AmpRiddleQuiz, AmpScript, AmpSelector, AmpShareTracking, AmpSidebar, AmpSkimlinks, AmpSmartlinks, AmpSocialShare, AmpSoundcloud, AmpSpringboardPlayer, AmpStickyAd, AmpStory, AmpStoryAutoAds, AmpStoryBookend, AmpStoryCtaLayer, AmpStoryGridLayer, AmpStoryPage, AmpStoryPageAttachment, AmpSubscriptions, AmpSubscriptionsGoogle, AmpTimeago, AmpTruncateText, AmpTwitter, AmpUserLocation, AmpUserNotification, AmpVideo, AmpVideoDocking, AmpVideoIframe, AmpVimeo, AmpVine, AmpViqeoPlayer, AmpVizVega, AmpVk, AmpWebPush, AmpWistiaPlayer, AmpYotpo, AmpYoutube, AmpAccess, AmpAnimation, AmpMustache, AmpState, ComponentScript, Script };
export { Amp3dGltf, Amp3qPlayer, AmpAccessLaterpay, AmpAccessPoool, AmpAccordion, AmpActionMacro, AmpAd, AmpAdExit, AmpAddthis, AmpAnalytics, AmpAnim, AmpApesterMedia, AmpAppBanner, AmpAudio, AmpAutoAds, AmpAutocomplete, AmpBaseCarousel, AmpBeopinion, AmpBodymovinAnimation, AmpBridPlayer, AmpBrightcove, AmpBysideContent, AmpCallTracking, AmpCarousel, AmpConnatixPlayer, AmpConsent, AmpDailymotion, AmpDateCountdown, AmpDateDisplay, AmpDatePicker, AmpDelightPlayer, AmpDynamicCssClasses, AmpEmbedlyCard, AmpExperiment, AmpFacebook, AmpFacebookComments, AmpFacebookLike, AmpFacebookPage, AmpFitText, AmpFont, AmpForm, AmpFxCollection, AmpFxFlyingCarpet, AmpGeo, AmpGfycat, AmpGist, AmpGoogleDocumentEmbed, AmpGoogleVrviewImage, AmpHulu, AmpIframe, AmpImaVideo, AmpImageLightbox, AmpImageSlider, AmpImg, AmpImgur, AmpInputmask, AmpInstagram, AmpInstallServiceworker, AmpIzlesene, AmpJwplayer, AmpKalturaPlayer, AmpLightbox, AmpLightboxGallery, AmpLinkRewriter, AmpList, AmpLiveList, AmpMathml, AmpMegaphone, AmpMinuteMediaPlayer, AmpMowplayer, AmpNextPage, AmpNexxtvPlayer, AmpO2Player, AmpOoyalaPlayer, AmpOrientationObserver, AmpPanZoom, AmpPinterest, AmpPixel, AmpPlaybuzz, AmpPositionObserver, AmpPowrPlayer, AmpReachPlayer, AmpRecaptchaInput, AmpReddit, AmpRiddleQuiz, AmpScript, AmpSelector, AmpShareTracking, AmpSidebar, AmpSkimlinks, AmpSmartlinks, AmpSocialShare, AmpSoundcloud, AmpSpringboardPlayer, AmpStickyAd, AmpStory, AmpStoryAutoAds, AmpStoryBookend, AmpStoryCtaLayer, AmpStoryGridLayer, AmpStoryPage, AmpStoryPageAttachment, AmpSubscriptions, AmpSubscriptionsGoogle, AmpTimeago, AmpTruncateText, AmpTwitter, AmpUserLocation, AmpUserNotification, AmpVideo, AmpVideoDocking, AmpVideoIframe, AmpVimeo, AmpVine, AmpViqeoPlayer, AmpVizVega, AmpVk, AmpWebPush, AmpWistiaPlayer, AmpYotpo, AmpYoutube, AmpAccess, AmpAnimation, AmpMustache, AmpState, Script };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc