Socket
Socket
Sign inDemoInstall

lit-element

Package Overview
Dependencies
Maintainers
11
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lit-element - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

14

CHANGELOG.md

@@ -20,2 +20,8 @@ # Change Log

## [2.5.0] - 2021-05-05
### Fixed
* Fixed an issue that was causing VS Code to mark `@state()` as deprecated ([#1192](https://github.com/lit/lit-element/pull/1192)).
## [2.5.0] - 2021-04-29

@@ -25,11 +31,11 @@

* Added the `@state()` decorator as an alias for `@internalProperty()`, and deprecated `@internalProperty()` which will be renamed to `@state` in lit-element 3.0. [#1162](https://github.com/Polymer/lit-element/issues/1162).
* Added the `@state()` decorator as an alias for `@internalProperty()`, and deprecated `@internalProperty()` which will be renamed to `@state` in lit-element 3.0 ([#1162](https://github.com/Polymer/lit-element/issues/1162)).
* Added `UpdatingElement.prototype.getUpdateComplete()` and deprecated `_getUpdateComplete()` for forward compibility with lit-element 3.0.
### Added
* Adds a `static shadowRootOptions` property for specifying shadow root options. This is a slightly simpler alternative to implementing a custom `createRenderRoot` method [#1147](https://github.com/Polymer/lit-element/issues/1147).
* Adds an export of `UpdatingElement` as `ReactiveElement` for forward-compatibility with lit-element 3.0 [#1177](https://github.com/Polymer/lit-element/issues/1177).
* Adds a `static shadowRootOptions` property for specifying shadow root options. This is a slightly simpler alternative to implementing a custom `createRenderRoot` method ([#1147](https://github.com/Polymer/lit-element/issues/1147)).
* Adds an export of `UpdatingElement` as `ReactiveElement` for forward-compatibility with lit-element 3.0 ([#1177](https://github.com/Polymer/lit-element/issues/1177)).
### Fixed
* Fixes an issue with `queryAssignedNodes` when applying a selector on a slot that included text nodes on older browsers not supporting Element.matches [#1088](https://github.com/Polymer/lit-element/issues/1088).
* Fixes an issue with `queryAssignedNodes` when applying a selector on a slot that included text nodes on older browsers not supporting Element.matches ([#1088](https://github.com/Polymer/lit-element/issues/1088)).

@@ -36,0 +42,0 @@ ## [2.4.0] - 2020-08-19

@@ -80,6 +80,6 @@ /**

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
* @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0.
* Please update to `state` now to be compatible with 3.0.
* @deprecated `internalProperty` has been renamed to `state` in lit-element
* 3.0. Please update to `state` now to be compatible with 3.0.
*/

@@ -93,6 +93,6 @@ export declare function internalProperty(options?: InternalPropertyDeclaration): (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any;

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
*/
export declare const state: typeof internalProperty;
export declare const state: (options?: InternalPropertyDeclaration<unknown> | undefined) => (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any;
/**

@@ -99,0 +99,0 @@ * A property decorator that converts a class property into a getter that

@@ -125,6 +125,6 @@ /**

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
* @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0.
* Please update to `state` now to be compatible with 3.0.
* @deprecated `internalProperty` has been renamed to `state` in lit-element
* 3.0. Please update to `state` now to be compatible with 3.0.
*/

@@ -140,6 +140,6 @@ export function internalProperty(options) {

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
*/
export const state = internalProperty;
export const state = (options) => internalProperty(options);
/**

@@ -146,0 +146,0 @@ * A property decorator that converts a class property into a getter that

@@ -68,3 +68,3 @@ /**

(window['litElementVersions'] || (window['litElementVersions'] = []))
.push('2.5.0');
.push('2.5.1');
/**

@@ -71,0 +71,0 @@ * Sentinal value used to avoid calling lit-html's render function when

{
"name": "lit-element",
"version": "2.5.0",
"version": "2.5.1",
"description": "A simple base class for creating fast, lightweight web components",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -31,28 +31,28 @@ # LitElement

```ts
import {LitElement, html, css, customElement, property} from 'lit-element';
import {LitElement, html, css, customElement, property} from 'lit-element';
// This decorator defines the element.
@customElement('my-element')
export class MyElement extends LitElement {
// This decorator defines the element.
@customElement('my-element')
export class MyElement extends LitElement {
// This decorator creates a property accessor that triggers rendering and
// an observed attribute.
@property()
mood = 'great';
// This decorator creates a property accessor that triggers rendering and
// an observed attribute.
@property()
mood = 'great';
static styles = css`
span {
color: green;
}`;
static styles = css`
span {
color: green;
}`;
// Render element DOM by returning a `lit-html` template.
render() {
return html`Web Components are <span>${this.mood}</span>!`;
}
// Render element DOM by returning a `lit-html` template.
render() {
return html`Web Components are <span>${this.mood}</span>!`;
}
}
}
```
```html
<my-element mood="awesome"></my-element>
<my-element mood="awesome"></my-element>
```

@@ -59,0 +59,0 @@

@@ -16,3 +16,3 @@ /**

/*
* IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
* IMPORTANT: For compatibility with tsickle and the Closure Compiler, all
* property decorators (but not class decorators) in this file that have

@@ -185,6 +185,6 @@ * an @ExportDecoratedItems annotation must be defined as a regular function,

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
* @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0.
* Please update to `state` now to be compatible with 3.0.
* @deprecated `internalProperty` has been renamed to `state` in lit-element
* 3.0. Please update to `state` now to be compatible with 3.0.
*/

@@ -201,6 +201,7 @@ export function internalProperty(options?: InternalPropertyDeclaration) {

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
*/
export const state = internalProperty;
export const state = (options?: InternalPropertyDeclaration) =>
internalProperty(options);

@@ -207,0 +208,0 @@ /**

@@ -78,3 +78,3 @@ /**

(window['litElementVersions'] || (window['litElementVersions'] = []))
.push('2.5.0');
.push('2.5.1');

@@ -81,0 +81,0 @@ export type CSSResultOrNative = CSSResult|CSSStyleSheet;

@@ -80,6 +80,6 @@ /**

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
* @deprecated `internalProperty` will be renamed to `state` in lit-element 3.0.
* Please update to `state` now to be compatible with 3.0.
* @deprecated `internalProperty` has been renamed to `state` in lit-element
* 3.0. Please update to `state` now to be compatible with 3.0.
*/

@@ -93,6 +93,6 @@ export declare function internalProperty(options?: InternalPropertyDeclaration): (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any;

* systems, they're solely for properties internal to the element. These
* properties may be renamed by optimization tools like closure compiler.
* properties may be renamed by optimization tools like the Closure Compiler.
* @category Decorator
*/
export declare const state: typeof internalProperty;
export declare const state: (options?: InternalPropertyDeclaration<unknown> | undefined) => (protoOrDescriptor: Object | ClassElement, name?: PropertyKey | undefined) => any;
/**

@@ -99,0 +99,0 @@ * A property decorator that converts a class property into a getter that

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