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.0 to 3.2.1

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.0');
((_c = globalThis.litElementVersions) !== null && _c !== void 0 ? _c : (globalThis.litElementVersions = [])).push('3.2.1');
if (DEV_MODE && globalThis.litElementVersions.length > 1) {

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

@@ -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._$Dt=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._$Dt=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||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.0");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.2.1");export{s as LitElement,r as UpdatingElement,h as _$LE};
//# sourceMappingURL=lit-element.js.map
{
"name": "lit-element",
"version": "3.2.0",
"version": "3.2.1",
"publishConfig": {

@@ -83,21 +83,128 @@ "access": "public"

"scripts": {
"build": "npm run clean && npm run build:ts && rollup -c",
"build:watch": "rollup -c --watch",
"build:bundle": "npm run clean:bundle && tsc --build && rollup -c rollup.bundle.config.js",
"build:ts": "tsc --build && treemirror development . '**/*.d.ts{,.map}'",
"build:ts:watch": "tsc --build --watch",
"check-version": "node scripts/check-version-tracker.js",
"checksize": "rollup -c --environment=CHECKSIZE",
"clean": "rm -rf {decorators,experimental-hydrate-support,index,lit-element,polyfill-support,private-ssr-support,lit.min}.{js,js.map,d.ts} test/ decorators/ development/ *.tsbuildinfo",
"dev": "scripts/dev.sh",
"build": "wireit",
"build:rollup": "wireit",
"build:ts": "wireit",
"build:ts:types": "wireit",
"check-version": "wireit",
"checksize": "wireit",
"prepublishOnly": "npm run check-version",
"publish-dev": "npm test && VERSION=${npm_package_version%-*}-dev.`git rev-parse --short HEAD` && npm version --no-git-tag-version $VERSION && npm publish --tag dev",
"regen-package-lock": "rm -rf node_modules package-lock.json; npm install",
"release": "np --any-branch --yolo",
"test": "npm run test:dev && npm run test:prod",
"test:dev": "cd ../tests && npx wtr '../lit-element/development/**/*_test.(js|html)'",
"test:prod": "MODE=prod npm run test:dev",
"test:prod:watch": "MODE=prod npm run test:dev -- --watch",
"test:watch": "npm run test:dev -- --watch"
"test": "wireit",
"test:dev": "wireit",
"test:prod": "wireit"
},
"wireit": {
"build": {
"dependencies": [
"build:rollup",
"build:ts",
"build:ts:types",
"../lit-html:build",
"../reactive-element:build"
]
},
"build:ts": {
"#comment": "Note this also builds polyfill-support via a TypeScript project reference.",
"command": "tsc --build --pretty",
"clean": "if-file-deleted",
"dependencies": [
"../lit-html:build:ts:types",
"../reactive-element:build:ts:types"
],
"files": [
"src/**/*.ts",
"tsconfig.json",
"tsconfig.polyfill-support.json"
],
"output": [
"development/**/*.{js,js.map,d.ts,d.ts.map}",
"tsconfig.tsbuildinfo",
"tsconfig.polyfill-support.tsbuildinfo"
]
},
"build:ts:types": {
"command": "treemirror development . \"**/*.d.ts{,.map}\"",
"dependencies": [
"../internal-scripts:build",
"build:ts"
],
"files": [],
"output": [
"*.d.ts{,.map}",
"decorators/*.d.ts{,.map}"
]
},
"build:rollup": {
"command": "rollup -c",
"dependencies": [
"build:ts",
"../lit-html:build:rollup",
"../reactive-element:build:rollup"
],
"files": [
"rollup.config.js",
"../../rollup-common.js",
"src/test/*_test.html",
"src/test/polyfill-support/*_test.html"
],
"output": [
"decorators.js{,.map}",
"experimental-hydrate-support.js{,.map}",
"index.js{,.map}",
"lit-element.js{,.map}",
"polyfill-support.js{,.map}",
"private-ssr-support.js{,.map}",
"decorators/*.js{,.map}",
"test/*_test.html",
"development/test/*_test.html",
"test/polyfill-support/*_test.html",
"development/test/polyfill-support/*_test.html"
]
},
"checksize": {
"command": "rollup -c --environment=CHECKSIZE",
"dependencies": [
"build:ts"
],
"files": [
"rollup.config.js",
"../../rollup-common.js"
],
"output": []
},
"check-version": {
"command": "node scripts/check-version-tracker.js",
"files": [
"scripts/check-version-tracker.js",
"package.json",
"src/lit-element.ts"
],
"output": []
},
"test": {
"dependencies": [
"test:dev",
"test:prod",
"check-version"
]
},
"test:dev": {
"command": "MODE=dev node ../tests/run-web-tests.js \"development/**/*_test.(js|html)\" --config ../tests/web-test-runner.config.js",
"dependencies": [
"build:ts",
"../tests:build"
],
"files": [],
"output": []
},
"test:prod": {
"command": "MODE=prod node ../tests/run-web-tests.js \"development/**/*_test.(js|html)\" --config ../tests/web-test-runner.config.js",
"dependencies": [
"build:ts",
"build:rollup",
"../tests:build"
],
"files": [],
"output": []
}
},
"files": [

@@ -127,5 +234,5 @@ "/decorators.{d.ts,d.ts.map,js,js.map}",

"downlevel-dts": "^0.7.0",
"internal-scripts": "^1.0.0",
"@lit-internal/scripts": "^1.0.0",
"mocha": "^9.1.1",
"rollup": "^2.26.4",
"rollup": "^2.70.2",
"tslib": "^2.0.3",

@@ -132,0 +239,0 @@ "typescript": "^4.3.5"

@@ -1,14 +0,7 @@

!function(i){"function"==typeof define&&define.amd?define(i):i()}((function(){"use strict";var i,n;i=function(){
!function(i){"function"==typeof define&&define.amd?define(i):i()}((function(){"use strict";
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var i,n="__scoped";null!==(i=globalThis.reactiveElementPolyfillSupport)&&void 0!==i||(globalThis.reactiveElementPolyfillSupport=function(i){var o=i.ReactiveElement;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var t=o.prototype;window.ShadyDOM&&window.ShadyDOM.inUse&&!0===window.ShadyDOM.noPatch&&window.ShadyDOM.patchElementProto(t);var d=t.createRenderRoot;t.createRenderRoot=function(){var i,o,t,e=this.localName;if(window.ShadyCSS.nativeShadow)return d.call(this);if(!this.constructor.hasOwnProperty(n)){this.constructor[n]=!0;var u=this.constructor.elementStyles.map((function(i){return i instanceof CSSStyleSheet?Array.from(i.cssRules).reduce((function(i,n){return i+n.cssText}),""):i.cssText}));null===(o=null===(i=window.ShadyCSS)||void 0===i?void 0:i.ScopingShim)||void 0===o||o.prepareAdoptedCssText(u,e),void 0===this.constructor._$AJ&&window.ShadyCSS.prepareTemplateStyles(document.createElement("template"),e)}return null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions)};var e=t.connectedCallback;t.connectedCallback=function(){e.call(this),this.hasUpdated&&window.ShadyCSS.styleElement(this)};var u=t._$AE;t._$AE=function(i){this.hasUpdated||window.ShadyCSS.styleElement(this),u.call(this,i)}}})},"function"==typeof define&&define.amd?define(i):i(),function(i){"function"==typeof define&&define.amd?define(i):i()}((function(){
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var i,n=new Set,o=new Map;null!==(i=globalThis.litHtmlPolyfillSupport)&&void 0!==i||(globalThis.litHtmlPolyfillSupport=function(i,t){if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var d=function(i){return void 0!==i&&!n.has(i)},e=function(i){var n=o.get(i);return void 0===n&&o.set(i,n=[]),n},u=new Map,v=i.createElement;i.createElement=function(n,o){var t=v.call(i,n,o),u=null==o?void 0:o.scope;if(void 0!==u&&(window.ShadyCSS.nativeShadow||window.ShadyCSS.prepareTemplateDom(t,u),d(u))){var w=e(u),r=t.content.querySelectorAll("style");w.push.apply(w,Array.from(r).map((function(i){var n;return null===(n=i.parentNode)||void 0===n||n.removeChild(i),i.textContent})))}return t};var w=document.createDocumentFragment(),r=document.createComment(""),l=t.prototype,s=l._$AI;l._$AI=function(i,t){var u,v,l;void 0===t&&(t=this);var f=this._$AA.parentNode,a=null===(u=this.options)||void 0===u?void 0:u.scope;if(f instanceof ShadowRoot&&d(a)){var h=this._$AA,c=this._$AB;w.appendChild(r),this._$AA=r,this._$AB=null,s.call(this,i,t);var y=(null===(v=i)||void 0===v?void 0:v._$litType$)?this._$AH._$AD.el:document.createElement("template");if(function(i,t){var d,u=e(i),v=0!==u.length;v&&((d=document.createElement("style")).textContent=u.join("\n"),t.content.appendChild(d)),n.add(i),o.delete(i),window.ShadyCSS.prepareTemplateStyles(t,i),v&&window.ShadyCSS.nativeShadow&&null!==(d=t.content.querySelector("style"))&&t.content.appendChild(d)}(a,y),w.removeChild(r),null===(l=window.ShadyCSS)||void 0===l?void 0:l.nativeShadow){var p=y.content.querySelector("style");null!==p&&w.appendChild(p.cloneNode(!0))}f.insertBefore(w,c),this._$AA=h,this._$AB=c}else s.call(this,i,t)},l._$AC=function(n){var o,t=null===(o=this.options)||void 0===o?void 0:o.scope,d=u.get(t);void 0===d&&u.set(t,d=new Map);var e=d.get(n.strings);return void 0===e&&d.set(n.strings,e=new i(n,this.options)),e}}})})),null!==(n=globalThis.litElementPolyfillSupport)&&void 0!==n||(globalThis.litElementPolyfillSupport=function(i){var n=i.LitElement;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){n._$AJ=!0;var o=n.prototype,t=o.createRenderRoot;o.createRenderRoot=function(){return this.renderOptions.scope=this.localName,t.call(this)}}})}));
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/var i,n,o="__scoped";null!==(i=globalThis.reactiveElementPolyfillSupport)&&void 0!==i||(globalThis.reactiveElementPolyfillSupport=function(i){var n=i.ReactiveElement;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var t=n.prototype;window.ShadyDOM&&window.ShadyDOM.inUse&&!0===window.ShadyDOM.noPatch&&window.ShadyDOM.patchElementProto(t);var d=t.createRenderRoot;t.createRenderRoot=function(){var i,n,t,w=this.localName;if(window.ShadyCSS.nativeShadow)return d.call(this);if(!this.constructor.hasOwnProperty(o)){this.constructor[o]=!0;var v=this.constructor.elementStyles.map((function(i){return i instanceof CSSStyleSheet?Array.from(i.cssRules).reduce((function(i,n){return i+n.cssText}),""):i.cssText}));null===(n=null===(i=window.ShadyCSS)||void 0===i?void 0:i.ScopingShim)||void 0===n||n.prepareAdoptedCssText(v,w),void 0===this.constructor._$AJ&&window.ShadyCSS.prepareTemplateStyles(document.createElement("template"),w)}return null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions)};var w=t.connectedCallback;t.connectedCallback=function(){w.call(this),this.hasUpdated&&window.ShadyCSS.styleElement(this)};var v=t._$AE;t._$AE=function(i){this.hasUpdated||window.ShadyCSS.styleElement(this),v.call(this,i)}}});var t,d=new Set,w=new Map;null!==(n=globalThis.litHtmlPolyfillSupport)&&void 0!==n||(globalThis.litHtmlPolyfillSupport=function(i,n){if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){var o=function(i){return void 0!==i&&!d.has(i)},t=function(i){var n=w.get(i);return void 0===n&&w.set(i,n=[]),n},v=new Map,l=i.createElement;i.createElement=function(n,d){var w=l.call(i,n,d),v=null==d?void 0:d.scope;if(void 0!==v&&(window.ShadyCSS.nativeShadow||window.ShadyCSS.prepareTemplateDom(w,v),o(v))){var r=t(v),u=w.content.querySelectorAll("style");r.push.apply(r,Array.from(u).map((function(i){var n;return null===(n=i.parentNode)||void 0===n||n.removeChild(i),i.textContent})))}return w};var r=document.createDocumentFragment(),u=document.createComment(""),s=n.prototype,e=s._$AI;s._$AI=function(i,n){var v,l;void 0===n&&(n=this);var s=this._$AA.parentNode,a=null===(v=this.options)||void 0===v?void 0:v.scope;if(s instanceof ShadowRoot&&o(a)){var h=this._$AA,f=this._$AB;r.appendChild(u),this._$AA=u,this._$AB=null,e.call(this,i,n);var c=(null==i?void 0:i._$litType$)?this._$AH._$AD.el:document.createElement("template");if(function(i,n){var o,v=t(i),l=0!==v.length;l&&((o=document.createElement("style")).textContent=v.join("\n"),n.content.appendChild(o)),d.add(i),w.delete(i),window.ShadyCSS.prepareTemplateStyles(n,i),l&&window.ShadyCSS.nativeShadow&&null!==(o=n.content.querySelector("style"))&&n.content.appendChild(o)}(a,c),r.removeChild(u),null===(l=window.ShadyCSS)||void 0===l?void 0:l.nativeShadow){var y=c.content.querySelector("style");null!==y&&r.appendChild(y.cloneNode(!0))}s.insertBefore(r,f),this._$AA=h,this._$AB=f}else e.call(this,i,n)},s._$AC=function(n){var o,t=null===(o=this.options)||void 0===o?void 0:o.scope,d=v.get(t);void 0===d&&v.set(t,d=new Map);var w=d.get(n.strings);return void 0===w&&d.set(n.strings,w=new i(n,this.options)),w}}}),null!==(t=globalThis.litElementPolyfillSupport)&&void 0!==t||(globalThis.litElementPolyfillSupport=function(i){var n=i.LitElement;if(void 0!==window.ShadyCSS&&(!window.ShadyCSS.nativeShadow||window.ShadyCSS.ApplyShim)){n._$AJ=!0;var o=n.prototype,t=o.createRenderRoot;o.createRenderRoot=function(){return this.renderOptions.scope=this.localName,t.call(this)}}})}));
//# sourceMappingURL=polyfill-support.js.map

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