Socket
Socket
Sign inDemoInstall

@lrnwebcomponents/hax-body-behaviors

Package Overview
Dependencies
Maintainers
4
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/hax-body-behaviors - npm Package Compare versions

Comparing version 7.0.18 to 8.0.0

analysis.json

354

lib/HAXWiring.js

@@ -228,2 +228,3 @@ /**

editingElement: "core",
hideDefaultSettings: false,
canScale: false,

@@ -355,2 +356,8 @@ canPosition: false,

}
// @note really just for page-break but could see
// elements that are to LITERALLY be what is defined
// instead of mixing in our common settings
if (typeof props.hideDefaultSettings === typeof undefined) {
props.hideDefaultSettings = false;
}
if (typeof props.canScale === typeof undefined) {

@@ -418,3 +425,3 @@ props.canScale = true;

// apply standard set of props
props = this.standardAdvancedProps(props);
props = this.standardAdvancedProps(props, tag);
}

@@ -519,171 +526,173 @@ // support for advanced save options

*/
this.standardAdvancedProps = (props) => {
// specialized attribute to allow locking in hax of anything
props.settings.advanced.push({
attribute: "data-hax-lock",
title: "Lock editing",
description: "Prevent changes to this element and all its content",
inputMethod: "boolean",
});
props.settings.advanced.push({
attribute: "text-align",
title: "Text align",
description: "Horizontal alignment of text in the element.",
inputMethod: "select",
options: {
"": "",
left: "left",
center: "center",
right: "right",
justify: "justify",
},
});
props.settings.advanced.push({
attribute: "background-color",
title: "Background color",
description: "Accessible background colors for accenting content.",
inputMethod: "colorpicker",
required: false,
});
props.settings.advanced.push({
attribute: "font-size",
title: "Font size",
description: "Pre-selected font variation",
inputMethod: "select",
options: {
"x-small": "x-small",
small: "small",
"": "normal",
large: "large",
"x-large": "x-large",
"xx-large": "xx-large",
},
});
// allow styles to be modified this way
props.settings.advanced.push({
attribute: "padding-top",
title: "Padding top",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "padding-right",
title: "Padding right",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "padding-bottom",
title: "Padding bottom",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "padding-left",
title: "Padding left",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-top",
title: "Margin top",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-right",
title: "Margin right",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-bottom",
title: "Margin bottom",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-left",
title: "Margin left",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
// allow classes to be modified this way
props.settings.developer.push({
attribute: "class",
title: "Classes",
description: "CSS classes applied manually to the element",
inputMethod: "textfield",
});
// allow styles to be modified this way
props.settings.developer.push({
attribute: "style",
title: "Styles",
description: "Custom CSS styles as applied to the element",
inputMethod: "textfield",
});
// allow schema definitions
props.settings.developer.push({
attribute: "prefix",
title: "Schema: prefix",
description: "Schema prefixes",
inputMethod: "textfield",
});
props.settings.developer.push({
attribute: "typeof",
title: "Schema: TypeOf",
description: "typeof definition for Schema usage",
inputMethod: "textfield",
});
props.settings.developer.push({
attribute: "property",
title: "Schema: Property",
description: "typeof definition for Schema usage",
inputMethod: "textfield",
});
props.settings.developer.push({
attribute: "resource",
title: "Schema: Resource ID",
description: "Schema resource identifier",
inputMethod: "textfield",
});
// allow the id to be modified
props.settings.developer.push({
attribute: "id",
title: "ID",
description: "element ID, only set this if you know why",
inputMethod: "textfield",
});
// we need to support slot in the UI but actually shift it around under the hood
// this is so that shadow roots don't get mad when previewing
props.settings.developer.push({
attribute: "slot",
title: "slot",
description: "DOM slot area",
inputMethod: "textfield",
});
this.standardAdvancedProps = (props, tag) => {
if (!props.hideDefaultSettings) {
// specialized attribute to allow locking in hax of anything
props.settings.advanced.push({
attribute: "data-hax-lock",
title: "Lock editing",
description: "Prevent changes to this element and all its content",
inputMethod: "boolean",
});
props.settings.advanced.push({
attribute: "text-align",
title: "Text align",
description: "Horizontal alignment of text in the element.",
inputMethod: "select",
options: {
"": "",
left: "left",
center: "center",
right: "right",
justify: "justify",
},
});
props.settings.advanced.push({
attribute: "background-color",
title: "Background color",
description: "Accessible background colors for accenting content.",
inputMethod: "colorpicker",
required: false,
});
props.settings.advanced.push({
attribute: "font-size",
title: "Font size",
description: "Pre-selected font variation",
inputMethod: "select",
options: {
"x-small": "x-small",
small: "small",
"": "normal",
large: "large",
"x-large": "x-large",
"xx-large": "xx-large",
},
});
// allow styles to be modified this way
props.settings.advanced.push({
attribute: "padding-top",
title: "Padding top",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "padding-right",
title: "Padding right",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "padding-bottom",
title: "Padding bottom",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "padding-left",
title: "Padding left",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-top",
title: "Margin top",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-right",
title: "Margin right",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-bottom",
title: "Margin bottom",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
props.settings.advanced.push({
attribute: "margin-left",
title: "Margin left",
step: 8,
max: 128,
min: 0,
inputMethod: "slider",
suffix: "px",
});
// allow classes to be modified this way
props.settings.developer.push({
attribute: "class",
title: "Classes",
description: "CSS classes applied manually to the element",
inputMethod: "textfield",
});
// allow styles to be modified this way
props.settings.developer.push({
attribute: "style",
title: "Styles",
description: "Custom CSS styles as applied to the element",
inputMethod: "textfield",
});
// allow schema definitions
props.settings.developer.push({
attribute: "prefix",
title: "Schema: prefix",
description: "Schema prefixes",
inputMethod: "textfield",
});
props.settings.developer.push({
attribute: "typeof",
title: "Schema: TypeOf",
description: "typeof definition for Schema usage",
inputMethod: "textfield",
});
props.settings.developer.push({
attribute: "property",
title: "Schema: Property",
description: "typeof definition for Schema usage",
inputMethod: "textfield",
});
props.settings.developer.push({
attribute: "resource",
title: "Schema: Resource ID",
description: "Schema resource identifier",
inputMethod: "textfield",
});
// allow the id to be modified
props.settings.developer.push({
attribute: "id",
title: "ID",
description: "element ID, only set this if you know why",
inputMethod: "textfield",
});
// we need to support slot in the UI but actually shift it around under the hood
// this is so that shadow roots don't get mad when previewing
props.settings.developer.push({
attribute: "slot",
title: "slot",
description: "DOM slot area",
inputMethod: "textfield",
});
}
return props;

@@ -845,2 +854,5 @@ };

api: "1",
type: "element",
editingElement: "core",
hideDefaultSettings: false,
canScale: true,

@@ -855,3 +867,3 @@ canPosition: true,

color: "purple",
tags: ["Content"],
tags: ["Other"],
handles: [

@@ -858,0 +870,0 @@ {

@@ -15,3 +15,3 @@ {

},
"version": "7.0.18",
"version": "8.0.0",
"description": "Wire any element up to HAX",

@@ -40,4 +40,4 @@ "repository": {

"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^7.0.18",
"@lrnwebcomponents/storybook-utilities": "^7.0.18",
"@lrnwebcomponents/deduping-fix": "^8.0.0",
"@lrnwebcomponents/storybook-utilities": "^8.0.0",
"@open-wc/testing": "3.2.0",

@@ -60,3 +60,3 @@ "@polymer/iron-component-page": "github:PolymerElements/iron-component-page",

],
"gitHead": "b9873176f9fe50a77dcf25e44bf3450d26fbb37a"
"gitHead": "2791492ff7ab40c7d4c827c4b305e33c0a971230"
}
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