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

@lightningjs/blits

Package Overview
Dependencies
Maintainers
7
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningjs/blits - npm Package Compare versions

Comparing version 0.4.2 to 0.5.0

2

boilerplate/package.json

@@ -34,4 +34,4 @@ {

"dependencies": {
"@lightningjs/blits": "^0.4.2"
"@lightningjs/blits": "^0.5.0"
}
}
# Changelog
# v0.5.0
_23 nov 2023_
- Introduced `wordwrap` and `maxlines` attributes on the Text-component, replacing the previous `w` and `h` attributes (breaking change!)
# v0.4.2

@@ -4,0 +10,0 @@

{
"name": "@lightningjs/blits",
"version": "0.4.2",
"version": "0.5.0",
"description": "Blits: The Lightning 3 App Development Framework",

@@ -5,0 +5,0 @@ "bin": "bin/index.cjs",

@@ -34,4 +34,4 @@ /*

contain="$_contain"
:w="$w"
:h="$h"
:wordWrap="$wordwrap"
:maxLines="$maxlines"
:textAlign="$align"

@@ -58,4 +58,4 @@ @loaded="$@loaded"

'align',
'w',
'h',
'wordwrap',
'maxlines',
'contain',

@@ -67,5 +67,8 @@ '@loaded',

_contain() {
return this.contain || (this.w && this.h ? 'both' : this.w ? 'width' : 'none')
return (
this.contain ||
(this.wordwrap && this.maxlines ? 'both' : this.wordwrap ? 'width' : 'none')
)
},
},
})

@@ -57,2 +57,4 @@ /*

delete props.z
'wordWrap' in props && (props.width = props.wordWrap)
delete props.wordWrap
},

@@ -165,2 +167,8 @@ parent(props) {

},
maxLines(props, setProperties, element) {
if (props.maxLines) {
props.height = props.maxLines * element.node.fontSize
}
delete props.maxLines
},
}

@@ -222,3 +230,3 @@

if (transformations[prop]) {
transformations[prop](props, this.setProperties)
transformations[prop](props, this.setProperties, this)
}

@@ -225,0 +233,0 @@

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