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

@lrnwebcomponents/parallax-image

Package Overview
Dependencies
Maintainers
4
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/parallax-image - npm Package Compare versions

Comparing version 0.0.31 to 0.0.32

build/es5-amd/demo/index.html

133

analysis.json

@@ -10,2 +10,51 @@ {

{
"name": "schemaResourceID",
"type": "string | null | undefined",
"description": "Unique Resource ID, generated when schemaMap processes.",
"privacy": "public",
"sourceRange": {
"file": "../@lrnwebcomponents/schema-behaviors/schema-behaviors.js",
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 29,
"column": 5
}
},
"metadata": {
"polymer": {
"attributeType": "String"
}
},
"defaultValue": "\"\"",
"inheritedFrom": "SchemaBehaviors.Schema"
},
{
"name": "schemaMap",
"type": "Object | null | undefined",
"description": "Schema Map for this element.",
"privacy": "public",
"sourceRange": {
"file": "../@lrnwebcomponents/schema-behaviors/schema-behaviors.js",
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 46,
"column": 5
}
},
"metadata": {
"polymer": {
"observer": "\"_schemaMapChanged\"",
"attributeType": "Object"
}
},
"defaultValue": "{\"prefix\":{\"oer\":\"http://oerschema.org/\",\"schema\":\"http://schema.org/\",\"dc\":\"http://purl.org/dc/terms/\",\"foaf\":\"http://xmlns.com/foaf/0.1/\",\"cc\":\"http://creativecommons.org/ns#\",\"bib\":\"http://bib.schema.org\"}}",
"inheritedFrom": "SchemaBehaviors.Schema"
},
{
"name": "imageBg",

@@ -57,2 +106,50 @@ "type": "string | null | undefined",

{
"name": "generateResourceID",
"description": "Generate a uinque ID",
"privacy": "public",
"sourceRange": {
"file": "../@lrnwebcomponents/schema-behaviors/schema-behaviors.js",
"start": {
"line": 51,
"column": 2
},
"end": {
"line": 68,
"column": 3
}
},
"metadata": {},
"params": [],
"inheritedFrom": "SchemaBehaviors.Schema"
},
{
"name": "_schemaMapChanged",
"description": "Notice the schema map has changed, reprocess attributes.",
"privacy": "protected",
"sourceRange": {
"file": "../@lrnwebcomponents/schema-behaviors/schema-behaviors.js",
"start": {
"line": 72,
"column": 2
},
"end": {
"line": 94,
"column": 3
}
},
"metadata": {},
"params": [
{
"name": "newValue"
},
{
"name": "oldValue"
}
],
"return": {
"type": "void"
},
"inheritedFrom": "SchemaBehaviors.Schema"
},
{
"name": "_urlTarget",

@@ -186,2 +283,38 @@ "description": "",

{
"name": "schema-resource-i-d",
"description": "Unique Resource ID, generated when schemaMap processes.",
"sourceRange": {
"file": "../@lrnwebcomponents/schema-behaviors/schema-behaviors.js",
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 29,
"column": 5
}
},
"metadata": {},
"type": "string | null | undefined",
"inheritedFrom": "SchemaBehaviors.Schema"
},
{
"name": "schema-map",
"description": "Schema Map for this element.",
"sourceRange": {
"file": "../@lrnwebcomponents/schema-behaviors/schema-behaviors.js",
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 46,
"column": 5
}
},
"metadata": {},
"type": "Object | null | undefined",
"inheritedFrom": "SchemaBehaviors.Schema"
},
{
"name": "image-bg",

@@ -188,0 +321,0 @@ "description": "Image",

10

package.json

@@ -19,3 +19,3 @@ {

},
"version": "0.0.31",
"version": "0.0.32",
"description": "Automated conversion of parallax-image/",

@@ -44,7 +44,9 @@ "repository": {

"dependencies": {
"@lrnwebcomponents/hax-body-behaviors": "^0.0.31",
"@lrnwebcomponents/hax-body-behaviors": "^0.0.32",
"@lrnwebcomponents/materializecss-styles": "^0.0.32",
"@lrnwebcomponents/schema-behaviors": "^0.0.32",
"@polymer/polymer": "^3.0.5"
},
"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^0.0.31",
"@lrnwebcomponents/deduping-fix": "^0.0.32",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",

@@ -69,3 +71,3 @@ "@polymer/iron-demo-helpers": "3.0.2",

],
"gitHead": "df7c0cfb6358da01b0a3c518a9bd700722411e9a"
"gitHead": "7aa2b90f1a43ae6ea6ee25e0f38d9a09a893218a"
}

2

parallax-image.amd.js

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

define(["exports","./node_modules/@polymer/polymer/polymer-element.js","./node_modules/@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js"],function(_exports,_polymerElement,_HAXWiring){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.ParallaxImage=void 0;function _templateObject_83487370d70211e8a07c4b799b265af4(){var data=babelHelpers.taggedTemplateLiteral(["\n<style>:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n</style>\n<slot></slot>"]);_templateObject_83487370d70211e8a07c4b799b265af4=function(){return data};return data}var ParallaxImage=function(_PolymerElement){babelHelpers.inherits(ParallaxImage,_PolymerElement);function ParallaxImage(){babelHelpers.classCallCheck(this,ParallaxImage);return babelHelpers.possibleConstructorReturn(this,(ParallaxImage.__proto__||Object.getPrototypeOf(ParallaxImage)).apply(this,arguments))}babelHelpers.createClass(ParallaxImage,[{key:"connectedCallback",value:function connectedCallback(){babelHelpers.get(ParallaxImage.prototype.__proto__||Object.getPrototypeOf(ParallaxImage.prototype),"connectedCallback",this).call(this);this.HAXWiring=new _HAXWiring.HAXWiring;this.HAXWiring.setHaxProperties(ParallaxImage.haxProperties,ParallaxImage.tag,this)}}],[{key:"template",get:function get(){return(0,_polymerElement.html)(_templateObject_83487370d70211e8a07c4b799b265af4())}},{key:"haxProperties",get:function get(){return{canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Parallax image",description:"Automated conversion of parallax-image/",icon:"icons:android",color:"green",groups:["Image"],handles:[{type:"todo:read-the-docs-for-usage"}],meta:{author:"btopro",owner:"The Pennsylvania State University"}},settings:{quick:[],configure:[],advanced:[]}}}},{key:"properties",get:function get(){return{}}},{key:"tag",get:function get(){return"parallax-image"}}]);return ParallaxImage}(_polymerElement.PolymerElement);_exports.ParallaxImage=ParallaxImage;window.customElements.define(ParallaxImage.tag,ParallaxImage)});
define(["./node_modules/@polymer/polymer/polymer-legacy.js","./node_modules/@lrnwebcomponents/materializecss-styles/materializecss-styles.js","./node_modules/@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js","./node_modules/@lrnwebcomponents/schema-behaviors/schema-behaviors.js"],function(_polymerLegacy){"use strict";function _templateObject_66226e80e70711e8b7294bd5427cabb0(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n :host {\n display: block;\n --parallax-image-background: '';\n --parallax-title-background: rgba(0, 0, 0, 0.3);\n --parallax-title-font: #fff;\n }\n\n .parallax_container {\n height: 400px;\n width: 100%;\n overflow: hidden;\n display: flex;\n justify-content: center;\n }\n\n .parallax {\n background-image: var(--parallax-image-background);\n background-attachment: fixed;\n background-position: top center;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n height: 100%;\n justify-content: center;\n }\n\n #bgParallax {\n display: flex;\n align-items: center;\n }\n\n .title {\n background: var(--parallax-title-background);\n display: block;\n padding: 20px 15px;\n text-align: center;\n width: 40%;\n color: var(--parallax-title-font);\n font-size: 32px;\n position: absolute;\n margin-top: 120px;\n }\n\n @media screen and (max-width: 900px) {\n .title {\n font-size: 16px;\n }\n }\n </style>\n\n <a href=\"[[url]]\" target$=\"[[_urlTarget(url)]]\">\n <div class=\"parallax_container\">\n <div id=\"bgParallax\" class=\"parallax\">\n <div class=\"title\" id=\"titleParallax\">\n <slot name=\"parallax_heading\"></slot>\n </div>\n </div>\n </div>\n </a>\n"]);_templateObject_66226e80e70711e8b7294bd5427cabb0=function(){return data};return data}(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_66226e80e70711e8b7294bd5427cabb0()),is:"parallax-image",behaviors:[HAXBehaviors.PropertiesBehaviors,MaterializeCSSBehaviors.ColorBehaviors,SchemaBehaviors.Schema],properties:{imageBg:{type:String,value:"",reflectToAttribute:!0},url:{type:String,value:"",reflectToAttribute:!0}},observers:["__updateStyles(imageBg)"],_urlTarget:function _urlTarget(url){if(url){var external=this._outsideLink(url);if(external){return"_blank"}}return!1},_outsideLink:function _outsideLink(url){if(0!=url.indexOf("http"))return!1;var loc=location.href,path=location.pathname,root=loc.substring(0,loc.indexOf(path));return 0!=url.indexOf(root)},attached:function attached(){this.setHaxProperties({canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Sample gizmo",description:"The user will be able to see this for selection in a UI.",icon:"av:play-circle-filled",color:"grey",groups:["Video","Media"],handles:[{type:"video",url:"source"}],meta:{author:"Your organization on github"}},settings:{quick:[{property:"title",title:"Title",description:"The title of the element",inputMethod:"textfield",icon:"editor:title"}],configure:[{property:"title",title:"Title",description:"The title of the element",inputMethod:"textfield",icon:"editor:title"}],advanced:[]}})},__updateStyles:function __updateStyles(imageBg){this.updateStyles({"--parallax-image-background":"url(".concat(imageBg,")")})},ready:function ready(){var bgParallax=this.$.bgParallax,titleParallax=this.$.titleParallax;window.addEventListener("scroll",function(){var yParallaxPosition=-.2*window.scrollY;bgParallax.style.backgroundPosition="center ".concat(yParallaxPosition,"px");titleParallax.style.transform="translate3D(0, ".concat(1.4*yParallaxPosition,"px, 0)")})}})});

@@ -1,10 +0,62 @@

import{html,PolymerElement}from"./node_modules/@polymer/polymer/polymer-element.js";import{HAXWiring}from"./node_modules/@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js";export{ParallaxImage};class ParallaxImage extends PolymerElement{static get template(){return html`
<style>:host {
display: block;
}
import{html,Polymer}from"./node_modules/@polymer/polymer/polymer-legacy.js";import"./node_modules/@lrnwebcomponents/materializecss-styles/materializecss-styles.js";import"./node_modules/@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js";import"./node_modules/@lrnwebcomponents/schema-behaviors/schema-behaviors.js";Polymer({_template:html`
<style>
:host {
display: block;
--parallax-image-background: '';
--parallax-title-background: rgba(0, 0, 0, 0.3);
--parallax-title-font: #fff;
}
:host([hidden]) {
display: none;
}
</style>
<slot></slot>`}static get haxProperties(){return{canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Parallax image",description:"Automated conversion of parallax-image/",icon:"icons:android",color:"green",groups:["Image"],handles:[{type:"todo:read-the-docs-for-usage"}],meta:{author:"btopro",owner:"The Pennsylvania State University"}},settings:{quick:[],configure:[],advanced:[]}}}static get properties(){return{}}static get tag(){return"parallax-image"}connectedCallback(){super.connectedCallback();this.HAXWiring=new HAXWiring;this.HAXWiring.setHaxProperties(ParallaxImage.haxProperties,ParallaxImage.tag,this)}}window.customElements.define(ParallaxImage.tag,ParallaxImage);
.parallax_container {
height: 400px;
width: 100%;
overflow: hidden;
display: flex;
justify-content: center;
}
.parallax {
background-image: var(--parallax-image-background);
background-attachment: fixed;
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
width: 100%;
height: 100%;
justify-content: center;
}
#bgParallax {
display: flex;
align-items: center;
}
.title {
background: var(--parallax-title-background);
display: block;
padding: 20px 15px;
text-align: center;
width: 40%;
color: var(--parallax-title-font);
font-size: 32px;
position: absolute;
margin-top: 120px;
}
@media screen and (max-width: 900px) {
.title {
font-size: 16px;
}
}
</style>
<a href="[[url]]" target$="[[_urlTarget(url)]]">
<div class="parallax_container">
<div id="bgParallax" class="parallax">
<div class="title" id="titleParallax">
<slot name="parallax_heading"></slot>
</div>
</div>
</div>
</a>
`,is:"parallax-image",behaviors:[HAXBehaviors.PropertiesBehaviors,MaterializeCSSBehaviors.ColorBehaviors,SchemaBehaviors.Schema],properties:{imageBg:{type:String,value:"",reflectToAttribute:!0},url:{type:String,value:"",reflectToAttribute:!0}},observers:["__updateStyles(imageBg)"],_urlTarget:function(url){if(url){const external=this._outsideLink(url);if(external){return"_blank"}}return!1},_outsideLink:function(url){if(0!=url.indexOf("http"))return!1;var loc=location.href,path=location.pathname,root=loc.substring(0,loc.indexOf(path));return 0!=url.indexOf(root)},attached:function(){this.setHaxProperties({canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Sample gizmo",description:"The user will be able to see this for selection in a UI.",icon:"av:play-circle-filled",color:"grey",groups:["Video","Media"],handles:[{type:"video",url:"source"}],meta:{author:"Your organization on github"}},settings:{quick:[{property:"title",title:"Title",description:"The title of the element",inputMethod:"textfield",icon:"editor:title"}],configure:[{property:"title",title:"Title",description:"The title of the element",inputMethod:"textfield",icon:"editor:title"}],advanced:[]}})},__updateStyles:function(imageBg){this.updateStyles({"--parallax-image-background":`url(${imageBg})`})},ready:function(){const bgParallax=this.$.bgParallax,titleParallax=this.$.titleParallax;window.addEventListener("scroll",()=>{const yParallaxPosition=-.2*window.scrollY;bgParallax.style.backgroundPosition=`center ${yParallaxPosition}px`;titleParallax.style.transform=`translate3D(0, ${1.4*yParallaxPosition}px, 0)`})}});

@@ -57,3 +57,3 @@ import { html, Polymer } from "@polymer/polymer/polymer-legacy.js";

color: var(--parallax-title-font);
font-size: 2em;
font-size: 32px;
position: absolute;

@@ -65,3 +65,3 @@ margin-top: 120px;

.title {
font-size: 1em;
font-size: 16px;
}

@@ -71,3 +71,3 @@ }

<a href="[[url]]" target\$="[[_urlTarget(url)]]">
<a href="[[url]]" target$="[[_urlTarget(url)]]">
<div class="parallax_container">

@@ -74,0 +74,0 @@ <div id="bgParallax" class="parallax">

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@polymer/polymer/polymer-element.js"),require("@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js")):"function"==typeof define&&define.amd?define(["exports","@polymer/polymer/polymer-element.js","@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js"],t):t(e.ParallaxImage={},e.polymerElement_js,e.HAXWiring_js)}(this,function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(){var e,t,n=(e=["\n<style>:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n</style>\n<slot></slot>"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return l=function(){return n},n}var u=function(e){function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a(this,o(u).apply(this,arguments))}var s,f,p;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(u,t.PolymerElement),s=u,p=[{key:"template",get:function(){return t.html(l())}},{key:"haxProperties",get:function(){return{canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Parallax image",description:"Automated conversion of parallax-image/",icon:"icons:android",color:"green",groups:["Image"],handles:[{type:"todo:read-the-docs-for-usage"}],meta:{author:"btopro",owner:"The Pennsylvania State University"}},settings:{quick:[],configure:[],advanced:[]}}}},{key:"properties",get:function(){return{}}},{key:"tag",get:function(){return"parallax-image"}}],(f=[{key:"connectedCallback",value:function(){c(o(u.prototype),"connectedCallback",this).call(this),this.HAXWiring=new n.HAXWiring,this.HAXWiring.setHaxProperties(u.haxProperties,u.tag,this)}}])&&r(s.prototype,f),p&&r(s,p),u}();window.customElements.define(u.tag,u),e.ParallaxImage=u,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("@polymer/polymer/polymer-legacy.js"),require("@lrnwebcomponents/materializecss-styles/materializecss-styles.js"),require("@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js"),require("@lrnwebcomponents/schema-behaviors/schema-behaviors.js")):"function"==typeof define&&define.amd?define(["@polymer/polymer/polymer-legacy.js","@lrnwebcomponents/materializecss-styles/materializecss-styles.js","@lrnwebcomponents/hax-body-behaviors/lib/HAXWiring.js","@lrnwebcomponents/schema-behaviors/schema-behaviors.js"],t):t(e.polymerLegacy_js)}(this,function(e){"use strict";function t(){var e,n,a=(e=['\n <style>\n :host {\n display: block;\n --parallax-image-background: \'\';\n --parallax-title-background: rgba(0, 0, 0, 0.3);\n --parallax-title-font: #fff;\n }\n\n .parallax_container {\n height: 400px;\n width: 100%;\n overflow: hidden;\n display: flex;\n justify-content: center;\n }\n\n .parallax {\n background-image: var(--parallax-image-background);\n background-attachment: fixed;\n background-position: top center;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n height: 100%;\n justify-content: center;\n }\n\n #bgParallax {\n display: flex;\n align-items: center;\n }\n\n .title {\n background: var(--parallax-title-background);\n display: block;\n padding: 20px 15px;\n text-align: center;\n width: 40%;\n color: var(--parallax-title-font);\n font-size: 32px;\n position: absolute;\n margin-top: 120px;\n }\n\n @media screen and (max-width: 900px) {\n .title {\n font-size: 16px;\n }\n }\n </style>\n\n <a href="[[url]]" target$="[[_urlTarget(url)]]">\n <div class="parallax_container">\n <div id="bgParallax" class="parallax">\n <div class="title" id="titleParallax">\n <slot name="parallax_heading"></slot>\n </div>\n </div>\n </div>\n </a>\n'],n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}})));return t=function(){return a},a}e.Polymer({_template:e.html(t()),is:"parallax-image",behaviors:[HAXBehaviors.PropertiesBehaviors,MaterializeCSSBehaviors.ColorBehaviors,SchemaBehaviors.Schema],properties:{imageBg:{type:String,value:"",reflectToAttribute:!0},url:{type:String,value:"",reflectToAttribute:!0}},observers:["__updateStyles(imageBg)"],_urlTarget:function(e){if(e&&this._outsideLink(e))return"_blank";return!1},_outsideLink:function(e){if(0!=e.indexOf("http"))return!1;var t=location.href,n=location.pathname,a=t.substring(0,t.indexOf(n));return 0!=e.indexOf(a)},attached:function(){this.setHaxProperties({canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Sample gizmo",description:"The user will be able to see this for selection in a UI.",icon:"av:play-circle-filled",color:"grey",groups:["Video","Media"],handles:[{type:"video",url:"source"}],meta:{author:"Your organization on github"}},settings:{quick:[{property:"title",title:"Title",description:"The title of the element",inputMethod:"textfield",icon:"editor:title"}],configure:[{property:"title",title:"Title",description:"The title of the element",inputMethod:"textfield",icon:"editor:title"}],advanced:[]}})},__updateStyles:function(e){this.updateStyles({"--parallax-image-background":"url(".concat(e,")")})},ready:function(){var e=this.$.bgParallax,t=this.$.titleParallax;window.addEventListener("scroll",function(n){var a=-.2*window.scrollY,i=1.4*a;e.style.backgroundPosition="center ".concat(a,"px"),t.style.transform="translate3D(0, ".concat(i,"px, 0)")})}})});
//# sourceMappingURL=parallax-image.umd.js.map

@@ -57,3 +57,3 @@ import { html, Polymer } from "@polymer/polymer/polymer-legacy.js";

color: var(--parallax-title-font);
font-size: 2em;
font-size: 32px;
position: absolute;

@@ -65,3 +65,3 @@ margin-top: 120px;

.title {
font-size: 1em;
font-size: 16px;
}

@@ -71,3 +71,3 @@ }

<a href="[[url]]" target\$="[[_urlTarget(url)]]">
<a href="[[url]]" target$="[[_urlTarget(url)]]">
<div class="parallax_container">

@@ -74,0 +74,0 @@ <div id="bgParallax" class="parallax">

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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