summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/node/node_modules/@lit/reactive-element/css-tag.js
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2024-05-06 12:49:24 +0200
committerMichal Klocek <michal.klocek@qt.io>2024-05-07 09:51:27 +0000
commit6c04301ecbe57a84d6cc82776b9de9d27fd10076 (patch)
treeed50ecf908d5dec121b5646c69f9da2e6415965f /chromium/third_party/node/node_modules/@lit/reactive-element/css-tag.js
parentbdd23a0120a16de636b411a50c92cd273c4e80fa (diff)
Missing node module sources
* lit-html * lit-element * lit-reactive-element * lit-directive Change-Id: Idb8413411ad45acd9350e5f155c39c9789f15b95 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/558486 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/node/node_modules/@lit/reactive-element/css-tag.js')
-rw-r--r--chromium/third_party/node/node_modules/@lit/reactive-element/css-tag.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/third_party/node/node_modules/@lit/reactive-element/css-tag.js b/chromium/third_party/node/node_modules/@lit/reactive-element/css-tag.js
new file mode 100644
index 00000000000..20aee2a2ac6
--- /dev/null
+++ b/chromium/third_party/node/node_modules/@lit/reactive-element/css-tag.js
@@ -0,0 +1,7 @@
+/**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};
+//# sourceMappingURL=css-tag.js.map