Socket
Socket
Sign inDemoInstall

lit-element

Package Overview
Dependencies
Maintainers
13
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.2.3-next.1 to 3.3.0

10

development/experimental-hydrate-support.js

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

import { hydrate } from 'lit-html/experimental-hydrate.js';
import { HYDRATE_INTERNALS_ATTR_PREFIX } from '@lit-labs/ssr-dom-shim';
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -58,2 +59,11 @@ globalThis.litElementHydrateSupport = ({ LitElement, }) => {

this._$needsHydration = false;
// Remove aria attributes added by internals shim during SSR
for (let i = 0; i < this.attributes.length; i++) {
const attr = this.attributes[i];
if (attr.name.startsWith(HYDRATE_INTERNALS_ATTR_PREFIX)) {
const ariaAttr = attr.name.slice(HYDRATE_INTERNALS_ATTR_PREFIX.length);
this.removeAttribute(ariaAttr);
this.removeAttribute(attr.name);
}
}
hydrate(value, this.renderRoot, this.renderOptions);

@@ -60,0 +70,0 @@ }

2

development/lit-element.js

@@ -253,3 +253,3 @@ /**

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

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

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

import{render as t}from"lit-html";import{hydrate as i}from"lit-html/experimental-hydrate.js";
import{render as t}from"lit-html";import{hydrate as i}from"lit-html/experimental-hydrate.js";import{HYDRATE_INTERNALS_ATTR_PREFIX as s}from"@lit-labs/ssr-dom-shim";
/**

@@ -7,3 +7,3 @@ * @license

*/
globalThis.litElementHydrateSupport=({LitElement:s})=>{const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s),"observedAttributes").get;Object.defineProperty(s,"observedAttributes",{get(){return[...e.call(this),"defer-hydration"]}});const h=s.prototype.attributeChangedCallback;s.prototype.attributeChangedCallback=function(t,i,s){"defer-hydration"===t&&null===s&&n.call(this),h.call(this,t,i,s)};const n=s.prototype.connectedCallback;s.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||n.call(this)};const o=s.prototype.createRenderRoot;s.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):o.call(this)};const r=Object.getPrototypeOf(s.prototype).update;s.prototype.update=function(s){const e=this.render();r.call(this,s),this._$AG?(this._$AG=!1,i(e,this.renderRoot,this.renderOptions)):t(e,this.renderRoot,this.renderOptions)}};
globalThis.litElementHydrateSupport=({LitElement:h})=>{const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(h),"observedAttributes").get;Object.defineProperty(h,"observedAttributes",{get(){return[...e.call(this),"defer-hydration"]}});const o=h.prototype.attributeChangedCallback;h.prototype.attributeChangedCallback=function(t,i,s){"defer-hydration"===t&&null===s&&n.call(this),o.call(this,t,i,s)};const n=h.prototype.connectedCallback;h.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||n.call(this)};const r=h.prototype.createRenderRoot;h.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):r.call(this)};const c=Object.getPrototypeOf(h.prototype).update;h.prototype.update=function(h){const e=this.render();if(c.call(this,h),this._$AG){this._$AG=!1;for(let t=0;t<this.attributes.length;t++){const i=this.attributes[t];if(i.name.startsWith(s)){const t=i.name.slice(s.length);this.removeAttribute(t),this.removeAttribute(i.name)}}i(e,this.renderRoot,this.renderOptions)}else t(e,this.renderRoot,this.renderOptions)}};
//# sourceMappingURL=experimental-hydrate-support.js.map

@@ -6,3 +6,3 @@ 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";

* 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.2.3-next.1");export{s as LitElement,r as UpdatingElement,h as _$LE};
*/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.0");export{s as LitElement,r as UpdatingElement,h as _$LE};
//# sourceMappingURL=lit-element.js.map
{
"name": "lit-element",
"version": "3.2.3-next.1",
"version": "3.3.0",
"publishConfig": {

@@ -126,3 +126,4 @@ "access": "public"

"../lit-html:build:ts:types",
"../reactive-element:build:ts:types"
"../reactive-element:build:ts:types",
"../labs/testing:build:ts:utils"
],

@@ -213,2 +214,7 @@ "files": [

],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],

@@ -224,2 +230,7 @@ "output": []

],
"env": {
"BROWSERS": {
"external": true
}
},
"files": [],

@@ -250,10 +261,12 @@ "output": []

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

@@ -260,0 +273,0 @@ },

@@ -6,4 +6,4 @@ # LitElement 3.0

[![Build Status](https://github.com/lit/lit/workflows/Tests/badge.svg)](https://github.com/lit/lit/actions?query=workflow%3ATests)
[![Published on npm](https://img.shields.io/npm/v/lit-element/next)](https://www.npmjs.com/package/lit-element)
[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-4a154b.svg)](https://www.polymer-project.org/slack-invite)
[![Published on npm](https://img.shields.io/npm/v/lit-element.svg?logo=npm)](https://www.npmjs.com/package/lit-element)
[![Join our Discord](https://img.shields.io/badge/discord-join%20chat-5865F2.svg?logo=discord&logoColor=fff)](https://lit.dev/discord/)
[![Mentioned in Awesome Lit](https://awesome.re/mentioned-badge.svg)](https://github.com/web-padawan/awesome-lit)

@@ -10,0 +10,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

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