Socket
Socket
Sign inDemoInstall

lit-element

Package Overview
Dependencies
Maintainers
14
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 3.3.2 to 4.0.0-pre.0

1

development/index.d.ts

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

export * from './lit-element.js';
export * from './decorators.js';
//# sourceMappingURL=index.d.ts.map

@@ -9,7 +9,2 @@ /**

export * from './lit-element.js';
export * from './decorators.js';
console.warn("The main 'lit-element' module entrypoint is deprecated. Please update " +
"your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' " +
"or import from 'lit-element/lit-element.ts'. See " +
'https://lit.dev/msg/deprecated-import-path for more information.');
//# sourceMappingURL=index.js.map

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

}
export declare const UpdatingElement: typeof ReactiveElement;
/**

@@ -77,0 +76,0 @@ * Base element class that manages element properties and attributes, and

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

*/
var _a, _b, _c;
/**

@@ -54,5 +53,2 @@ * The main LitElement module, which defines the {@linkcode LitElement} base

export * from 'lit-html';
// For backwards compatibility export ReactiveElement as UpdatingElement. Note,
// IE transpilation requires exporting like this.
export const UpdatingElement = ReactiveElement;
const DEV_MODE = true;

@@ -63,3 +59,3 @@ let issueWarning;

// are loaded.
const issuedWarnings = ((_a = globalThis.litIssuedWarnings) !== null && _a !== void 0 ? _a : (globalThis.litIssuedWarnings = new Set()));
const issuedWarnings = (globalThis.litIssuedWarnings ??= new Set());
// Issue a warning, if we haven't already.

@@ -83,3 +79,3 @@ issueWarning = (code, warning) => {

*/
export class LitElement extends ReactiveElement {
class LitElement extends ReactiveElement {
constructor() {

@@ -97,4 +93,2 @@ super(...arguments);

createRenderRoot() {
var _a;
var _b;
const renderRoot = super.createRenderRoot();

@@ -106,3 +100,3 @@ // When adoptedStyleSheets are shimmed, they are inserted into the

// the shadowRoot.
(_a = (_b = this.renderOptions).renderBefore) !== null && _a !== void 0 ? _a : (_b.renderBefore = renderRoot.firstChild);
this.renderOptions.renderBefore ??= renderRoot.firstChild;
return renderRoot;

@@ -149,5 +143,4 @@ }

connectedCallback() {
var _a;
super.connectedCallback();
(_a = this.__childPart) === null || _a === void 0 ? void 0 : _a.setConnected(true);
this.__childPart?.setConnected(true);
}

@@ -174,5 +167,4 @@ /**

disconnectedCallback() {
var _a;
super.disconnectedCallback();
(_a = this.__childPart) === null || _a === void 0 ? void 0 : _a.setConnected(false);
this.__childPart?.setConnected(false);
}

@@ -200,4 +192,5 @@ /**

LitElement['_$litElement$'] = true;
export { LitElement };
// Install hydration if available
(_b = globalThis.litElementHydrateSupport) === null || _b === void 0 ? void 0 : _b.call(globalThis, { LitElement });
globalThis.litElementHydrateSupport?.({ LitElement });
// Apply polyfills if available

@@ -207,29 +200,3 @@ const polyfillSupport = DEV_MODE

: globalThis.litElementPolyfillSupport;
polyfillSupport === null || polyfillSupport === void 0 ? void 0 : polyfillSupport({ LitElement });
// DEV mode warnings
if (DEV_MODE) {
/* eslint-disable @typescript-eslint/no-explicit-any */
// Note, for compatibility with closure compilation, this access
// needs to be as a string property index.
LitElement['finalize'] = function () {
const finalized = ReactiveElement.finalize.call(this);
if (!finalized) {
return false;
}
const warnRemovedOrRenamed = (obj, name, renamed = false) => {
if (obj.hasOwnProperty(name)) {
const ctorName = (typeof obj === 'function' ? obj : obj.constructor)
.name;
issueWarning(renamed ? 'renamed-api' : 'removed-api', `\`${name}\` is implemented on class ${ctorName}. It ` +
`has been ${renamed ? 'renamed' : 'removed'} ` +
`in this version of LitElement.`);
}
};
warnRemovedOrRenamed(this, 'render');
warnRemovedOrRenamed(this, 'getStyles', true);
warnRemovedOrRenamed(this.prototype, 'adoptStyles');
return true;
};
/* eslint-enable @typescript-eslint/no-explicit-any */
}
polyfillSupport?.({ LitElement });
/**

@@ -263,3 +230,3 @@ * END USERS SHOULD NOT RELY ON THIS OBJECT.

// This line will be used in regexes to search for LitElement usage.
((_c = globalThis.litElementVersions) !== null && _c !== void 0 ? _c : (globalThis.litElementVersions = [])).push('3.3.2');
(globalThis.litElementVersions ??= []).push('4.0.0-pre.0');
if (DEV_MODE && globalThis.litElementVersions.length > 1) {

@@ -266,0 +233,0 @@ issueWarning('multiple-versions', `Multiple versions of Lit loaded. Loading multiple versions ` +

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

export * from './lit-element.js';
export * from './decorators.js';
//# sourceMappingURL=index.d.ts.map

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

export*from"@lit/reactive-element";export*from"lit-html";export{LitElement,UpdatingElement,_$LE}from"./lit-element.js";export*from"@lit/reactive-element/decorators/base.js";export*from"@lit/reactive-element/decorators/custom-element.js";export*from"@lit/reactive-element/decorators/property.js";export*from"@lit/reactive-element/decorators/state.js";export*from"@lit/reactive-element/decorators/event-options.js";export*from"@lit/reactive-element/decorators/query.js";export*from"@lit/reactive-element/decorators/query-all.js";export*from"@lit/reactive-element/decorators/query-async.js";export*from"@lit/reactive-element/decorators/query-assigned-elements.js";export*from"@lit/reactive-element/decorators/query-assigned-nodes.js";
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/console.warn("The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information.");
export*from"@lit/reactive-element";export*from"lit-html";export{LitElement,_$LE}from"./lit-element.js";
//# sourceMappingURL=index.js.map

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

}
export declare const UpdatingElement: typeof ReactiveElement;
/**

@@ -77,0 +76,0 @@ * Base element class that manages element properties and attributes, and

4

lit-element.js

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

import{ReactiveElement as t}from"@lit/reactive-element";export*from"@lit/reactive-element";import{render as e,noChange as i}from"lit-html";export*from"lit-html";
import{ReactiveElement as t}from"@lit/reactive-element";export*from"@lit/reactive-element";import{render as e,noChange as r}from"lit-html";export*from"lit-html";
/**

@@ -6,3 +6,3 @@ * @license

* SPDX-License-Identifier: BSD-3-Clause
*/var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push("3.3.2");export{s as LitElement,r as UpdatingElement,h as _$LE};
*/class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}s.finalized=!0,s._$litElement$=!0,globalThis.litElementHydrateSupport?.({LitElement:s});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:s});const o={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push("4.0.0-pre.0");export{s as LitElement,o as _$LE};
//# sourceMappingURL=lit-element.js.map
{
"name": "lit-element",
"version": "3.3.2",
"version": "4.0.0-pre.0",
"publishConfig": {

@@ -76,7 +76,2 @@ "access": "public"

},
"./experimental-hydrate-support.js": {
"types": "./development/experimental-hydrate-support.d.ts",
"development": "./development/experimental-hydrate-support.js",
"default": "./experimental-hydrate-support.js"
},
"./lit-element.js": {

@@ -168,3 +163,2 @@ "types": "./development/lit-element.d.ts",

"decorators.js{,.map}",
"experimental-hydrate-support.js{,.map}",
"index.js{,.map}",

@@ -250,3 +244,2 @@ "lit-element.js{,.map}",

"/decorators.{d.ts,d.ts.map,js,js.map}",
"/experimental-hydrate-support.{d.ts,d.ts.map,js,js.map}",
"/index.{d.ts,d.ts.map,js,js.map}",

@@ -261,12 +254,11 @@ "/lit-element.{d.ts,d.ts.map,js,js.map}",

"dependencies": {
"@lit-labs/ssr-dom-shim": "^1.1.0",
"@lit/reactive-element": "^1.3.0",
"lit-html": "^2.7.0"
"@lit/reactive-element": "^2.0.0-pre.0",
"lit-html": "^3.0.0-pre.0"
},
"devDependencies": {
"@lit-internal/scripts": "^1.0.0",
"@lit-labs/testing": "^0.2.0",
"@lit-internal/scripts": "^1.0.1-pre.0",
"@lit-labs/testing": "^0.2.2-pre.0",
"@webcomponents/shadycss": "^1.8.0",
"@webcomponents/template": "^1.4.4",
"@webcomponents/webcomponentsjs": "^2.6.0",
"@webcomponents/webcomponentsjs": "^2.8.0",
"tslib": "^2.0.3"

@@ -273,0 +265,0 @@ },

@@ -14,4 +14,16 @@ # LitElement 3.0

This is a stable release of `lit-element` 3.0.0 (part of the Lit 2.0 release). If upgrading from previous versions of `lit-element`, please see the [Upgrade Guide](https://lit.dev/docs/releases/upgrade/) for a step-by-step guide on upgrading.
This is a pre-release of Lit 3.0, the next major version of Lit.
Lit 3.0 has very few breaking changes from Lit 2.0:
- Drops support for IE11
- Published as ES2021
- Removes a couple of deprecated Lit 1.x APIs
Lit 3.0 should require no changes to upgrade from Lit 2.0 for the vast majority of users. Once the full release is published, most apps and libraries will be able to extend their npm version ranges to include both 2.x and 3.x, like `"^2.7.0 || ^3.0.0"`.
Lit 2.x and 3.0 are _interoperable_: templates, base classes, directives, decorators, etc., from one version of Lit will work with those from another.
Please file any issues you find on our [issue tracker](https://github.com/lit/lit/issues).
## Documentation

@@ -18,0 +30,0 @@

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

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

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