first commit
This commit is contained in:
28
node_modules/@lit/reactive-element/LICENSE
generated
vendored
Normal file
28
node_modules/@lit/reactive-element/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2017 Google LLC. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
91
node_modules/@lit/reactive-element/README.md
generated
vendored
Normal file
91
node_modules/@lit/reactive-element/README.md
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
# ReactiveElement 1.0
|
||||
|
||||
[](https://github.com/lit/lit/actions?query=workflow%3ATests)
|
||||
[](https://www.npmjs.com/package/@lit/reactive-element)
|
||||
[](https://lit.dev/discord/)
|
||||
[](https://github.com/web-padawan/awesome-lit)
|
||||
|
||||
# ReactiveElement
|
||||
|
||||
A simple low level base class for creating fast, lightweight web components.
|
||||
|
||||
## About this release
|
||||
|
||||
This is a stable release of `@lit/reactive-element` 1.0.0 (part of the Lit 2.0 release). If upgrading from previous versions of `UpdatingElement`, please see the [Upgrade Guide](https://lit.dev/docs/releases/upgrade/).
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation is available at [lit.dev](https://lit.dev/docs/api/ReactiveElement/).
|
||||
|
||||
## Overview
|
||||
|
||||
`ReactiveElement` is a base class for writing web components that react to changes in properties and attributes. `ReactiveElement` adds reactive properties and a batching, asynchronous update lifecycle to the standard web component APIs. Subclasses can respond to changes and update the DOM to reflect the element state.
|
||||
|
||||
`ReactiveElement` doesn't include a DOM template system, but can easily be extended to add one by overriding the `update()` method to call the template library. `LitElement` is such an extension that adds `lit-html` templating.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
ReactiveElement,
|
||||
html,
|
||||
css,
|
||||
customElement,
|
||||
property,
|
||||
PropertyValues,
|
||||
} from '@lit/reactive-element';
|
||||
|
||||
// This decorator defines the element.
|
||||
@customElement('my-element')
|
||||
export class MyElement extends ReactiveElement {
|
||||
// This decorator creates a property accessor that triggers rendering and
|
||||
// an observed attribute.
|
||||
@property()
|
||||
mood = 'great';
|
||||
|
||||
static styles = css`
|
||||
span {
|
||||
color: green;
|
||||
}
|
||||
`;
|
||||
|
||||
contentEl?: HTMLSpanElement;
|
||||
|
||||
// One time setup of shadowRoot content.
|
||||
createRenderRoot() {
|
||||
const shadowRoot = super.createRenderRoot();
|
||||
shadowRoot.innerHTML = `Web Components are <span></span>!`;
|
||||
this.contentEl = shadowRoot.firstElementChild;
|
||||
return shadowRoot;
|
||||
}
|
||||
|
||||
// Use a DOM rendering library of your choice or manually update the DOM.
|
||||
update(changedProperties: PropertyValues) {
|
||||
super.update(changedProperties);
|
||||
this.contentEl.textContent = this.mood;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
<my-element mood="awesome"></my-element>
|
||||
```
|
||||
|
||||
Note, this example uses decorators to create properties. Decorators are a proposed
|
||||
standard currently available in [TypeScript](https://www.typescriptlang.org/) or [Babel](https://babeljs.io/docs/en/babel-plugin-proposal-decorators). ReactiveElement also supports a [vanilla JavaScript method](https://lit.dev/docs/components/properties/#declaring-properties-in-a-static-properties-field) of declaring reactive properties.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ npm install @lit/reactive-element
|
||||
```
|
||||
|
||||
Or use from `lit`:
|
||||
|
||||
```bash
|
||||
$ npm install lit
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Please see [CONTRIBUTING.md](../../CONTRIBUTING.md).
|
67
node_modules/@lit/reactive-element/css-tag.d.ts
generated
vendored
Normal file
67
node_modules/@lit/reactive-element/css-tag.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/**
|
||||
* Whether the current browser supports `adoptedStyleSheets`.
|
||||
*/
|
||||
export declare const supportsAdoptingStyleSheets: boolean;
|
||||
/**
|
||||
* A CSSResult or native CSSStyleSheet.
|
||||
*
|
||||
* In browsers that support constructible CSS style sheets, CSSStyleSheet
|
||||
* object can be used for styling along side CSSResult from the `css`
|
||||
* template tag.
|
||||
*/
|
||||
export declare type CSSResultOrNative = CSSResult | CSSStyleSheet;
|
||||
export declare type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;
|
||||
/**
|
||||
* A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.
|
||||
*/
|
||||
export declare type CSSResultGroup = CSSResultOrNative | CSSResultArray;
|
||||
/**
|
||||
* A container for a string of CSS text, that may be used to create a CSSStyleSheet.
|
||||
*
|
||||
* CSSResult is the return value of `css`-tagged template literals and
|
||||
* `unsafeCSS()`. In order to ensure that CSSResults are only created via the
|
||||
* `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.
|
||||
*/
|
||||
export declare class CSSResult {
|
||||
['_$cssResult$']: boolean;
|
||||
readonly cssText: string;
|
||||
private _styleSheet?;
|
||||
private _strings;
|
||||
private constructor();
|
||||
get styleSheet(): CSSStyleSheet | undefined;
|
||||
toString(): string;
|
||||
}
|
||||
/**
|
||||
* Wrap a value for interpolation in a {@linkcode css} tagged template literal.
|
||||
*
|
||||
* This is unsafe because untrusted CSS text can be used to phone home
|
||||
* or exfiltrate data to an attacker controlled site. Take care to only use
|
||||
* this with trusted input.
|
||||
*/
|
||||
export declare const unsafeCSS: (value: unknown) => CSSResult;
|
||||
/**
|
||||
* A template literal tag which can be used with LitElement's
|
||||
* {@linkcode LitElement.styles} property to set element styles.
|
||||
*
|
||||
* For security reasons, only literal string values and number may be used in
|
||||
* embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}
|
||||
* may be used inside an expression.
|
||||
*/
|
||||
export declare const css: (strings: TemplateStringsArray, ...values: (CSSResultGroup | number)[]) => CSSResult;
|
||||
/**
|
||||
* Applies the given styles to a `shadowRoot`. When Shadow DOM is
|
||||
* available but `adoptedStyleSheets` is not, styles are appended to the
|
||||
* `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).
|
||||
* Note, when shimming is used, any styles that are subsequently placed into
|
||||
* the shadowRoot should be placed *before* any shimmed adopted styles. This
|
||||
* will match spec behavior that gives adopted sheets precedence over styles in
|
||||
* shadowRoot.
|
||||
*/
|
||||
export declare const adoptStyles: (renderRoot: ShadowRoot, styles: Array<CSSResultOrNative>) => void;
|
||||
export declare const getCompatibleStyle: (s: CSSResultOrNative) => CSSResultOrNative;
|
||||
//# sourceMappingURL=css-tag.d.ts.map
|
1
node_modules/@lit/reactive-element/css-tag.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/css-tag.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"css-tag.d.ts","sourceRoot":"","sources":["../src/css-tag.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,OAIJ,CAAC;AAEvC;;;;;;GAMG;AACH,oBAAY,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAC;AAE1D,oBAAY,cAAc,GAAG,KAAK,CAAC,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAMhE;;;;;;GAMG;AACH,qBAAa,SAAS;IAEpB,CAAC,cAAc,CAAC,UAAQ;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,WAAW,CAAC,CAAgB;IACpC,OAAO,CAAC,QAAQ,CAAmC;IAEnD,OAAO;IAgBP,IAAI,UAAU,IAAI,aAAa,GAAG,SAAS,CAoB1C;IAED,QAAQ,IAAI,MAAM;CAGnB;AAyBD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,UAAW,OAAO,cAKrC,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,YACL,oBAAoB,aAClB,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,KACrC,SAaF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,eACV,UAAU,UACd,MAAM,iBAAiB,CAAC,SAkBjC,CAAC;AAUF,eAAO,MAAM,kBAAkB,MAGrB,iBAAiB,sBAEwC,CAAC"}
|
7
node_modules/@lit/reactive-element/css-tag.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/css-tag.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
const t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==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=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new o("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>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[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),o=t.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=e.cssText,s.appendChild(n)}))},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{o as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};
|
||||
//# sourceMappingURL=css-tag.js.map
|
1
node_modules/@lit/reactive-element/css-tag.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/css-tag.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
16
node_modules/@lit/reactive-element/decorators.d.ts
generated
vendored
Normal file
16
node_modules/@lit/reactive-element/decorators.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
export * from './decorators/base.js';
|
||||
export * from './decorators/custom-element.js';
|
||||
export * from './decorators/property.js';
|
||||
export * from './decorators/state.js';
|
||||
export * from './decorators/event-options.js';
|
||||
export * from './decorators/query.js';
|
||||
export * from './decorators/query-all.js';
|
||||
export * from './decorators/query-async.js';
|
||||
export * from './decorators/query-assigned-elements.js';
|
||||
export * from './decorators/query-assigned-nodes.js';
|
||||
//# sourceMappingURL=decorators.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC"}
|
2
node_modules/@lit/reactive-element/decorators.js
generated
vendored
Normal file
2
node_modules/@lit/reactive-element/decorators.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export{decorateProperty,legacyPrototypeMethod,standardPrototypeMethod}from"./decorators/base.js";export{customElement}from"./decorators/custom-element.js";export{property}from"./decorators/property.js";export{state}from"./decorators/state.js";export{eventOptions}from"./decorators/event-options.js";export{query}from"./decorators/query.js";export{queryAll}from"./decorators/query-all.js";export{queryAsync}from"./decorators/query-async.js";export{queryAssignedElements}from"./decorators/query-assigned-elements.js";export{queryAssignedNodes}from"./decorators/query-assigned-nodes.js";
|
||||
//# sourceMappingURL=decorators.js.map
|
1
node_modules/@lit/reactive-element/decorators.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decorators.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
56
node_modules/@lit/reactive-element/decorators/base.d.ts
generated
vendored
Normal file
56
node_modules/@lit/reactive-element/decorators/base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* Generates a public interface type that removes private and protected fields.
|
||||
* This allows accepting otherwise compatible versions of the type (e.g. from
|
||||
* multiple copies of the same package in `node_modules`).
|
||||
*/
|
||||
export declare type Interface<T> = {
|
||||
[K in keyof T]: T[K];
|
||||
};
|
||||
export declare type Constructor<T> = {
|
||||
new (...args: any[]): T;
|
||||
};
|
||||
export interface ClassDescriptor {
|
||||
kind: 'class';
|
||||
elements: ClassElement[];
|
||||
finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;
|
||||
}
|
||||
export interface ClassElement {
|
||||
kind: 'field' | 'method';
|
||||
key: PropertyKey;
|
||||
placement: 'static' | 'prototype' | 'own';
|
||||
initializer?: Function;
|
||||
extras?: ClassElement[];
|
||||
finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;
|
||||
descriptor?: PropertyDescriptor;
|
||||
}
|
||||
export declare const legacyPrototypeMethod: (descriptor: PropertyDescriptor, proto: Object, name: PropertyKey) => void;
|
||||
export declare const standardPrototypeMethod: (descriptor: PropertyDescriptor, element: ClassElement) => {
|
||||
kind: string;
|
||||
placement: string;
|
||||
key: PropertyKey;
|
||||
descriptor: PropertyDescriptor;
|
||||
};
|
||||
/**
|
||||
* Helper for decorating a property that is compatible with both TypeScript
|
||||
* and Babel decorators. The optional `finisher` can be used to perform work on
|
||||
* the class. The optional `descriptor` should return a PropertyDescriptor
|
||||
* to install for the given property.
|
||||
*
|
||||
* @param finisher {function} Optional finisher method; receives the element
|
||||
* constructor and property key as arguments and has no return value.
|
||||
* @param descriptor {function} Optional descriptor method; receives the
|
||||
* property key as an argument and returns a property descriptor to define for
|
||||
* the given property.
|
||||
* @returns {ClassElement|void}
|
||||
*/
|
||||
export declare const decorateProperty: ({ finisher, descriptor, }: {
|
||||
finisher?: ((ctor: typeof ReactiveElement, property: PropertyKey) => void) | null | undefined;
|
||||
descriptor?: ((property: PropertyKey) => PropertyDescriptor) | undefined;
|
||||
}) => (protoOrDescriptor: Interface<ReactiveElement> | ClassElement, name?: PropertyKey) => void | any;
|
||||
//# sourceMappingURL=base.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/base.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/base.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/decorators/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAEvD;;;;GAIG;AACH,oBAAY,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,CAAC;AAEF,oBAAY,WAAW,CAAC,CAAC,IAAI;IAE3B,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB,CAAC;AAGF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;CAChE;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,GAAG,EAAE,WAAW,CAAC;IACjB,SAAS,EAAE,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC;IAC1C,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAC/D,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,eAAO,MAAM,qBAAqB,eACpB,kBAAkB,SACvB,MAAM,QACP,WAAW,SAGlB,CAAC;AAEF,eAAO,MAAM,uBAAuB,eACtB,kBAAkB,WACrB,YAAY;;;;;CAMrB,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;uBAMb,sBAAsB,YAAY,WAAW,KAAK,IAAI;6BAE1C,WAAW,KAAK,kBAAkB;0BAGvC,UAAU,eAAe,CAAC,GAAG,YAAY,SACrD,WAAW,KAGjB,IAAI,GAAG,GAmCT,CAAC"}
|
7
node_modules/@lit/reactive-element/decorators/base.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/base.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
const e=(e,t,o)=>{Object.defineProperty(t,o,e)},t=(e,t)=>({kind:"method",placement:"prototype",key:t.key,descriptor:e}),o=({finisher:e,descriptor:t})=>(o,n)=>{var r;if(void 0===n){const n=null!==(r=o.originalKey)&&void 0!==r?r:o.key,i=null!=t?{kind:"method",placement:"prototype",key:n,descriptor:t(o.key)}:{...o,key:n};return null!=e&&(i.finisher=function(t){e(t,n)}),i}{const r=o.constructor;void 0!==t&&Object.defineProperty(o,n,t(n)),null==e||e(r,n)}};export{o as decorateProperty,e as legacyPrototypeMethod,t as standardPrototypeMethod};
|
||||
//# sourceMappingURL=base.js.map
|
1
node_modules/@lit/reactive-element/decorators/base.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/base.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"base.js","sources":["../src/decorators/base.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\n\n/**\n * Generates a public interface type that removes private and protected fields.\n * This allows accepting otherwise compatible versions of the type (e.g. from\n * multiple copies of the same package in `node_modules`).\n */\nexport type Interface<T> = {\n [K in keyof T]: T[K];\n};\n\nexport type Constructor<T> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n};\n\n// From the TC39 Decorators proposal\nexport interface ClassDescriptor {\n kind: 'class';\n elements: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;\n}\n\n// From the TC39 Decorators proposal\nexport interface ClassElement {\n kind: 'field' | 'method';\n key: PropertyKey;\n placement: 'static' | 'prototype' | 'own';\n initializer?: Function;\n extras?: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;\n descriptor?: PropertyDescriptor;\n}\n\nexport const legacyPrototypeMethod = (\n descriptor: PropertyDescriptor,\n proto: Object,\n name: PropertyKey\n) => {\n Object.defineProperty(proto, name, descriptor);\n};\n\nexport const standardPrototypeMethod = (\n descriptor: PropertyDescriptor,\n element: ClassElement\n) => ({\n kind: 'method',\n placement: 'prototype',\n key: element.key,\n descriptor,\n});\n\n/**\n * Helper for decorating a property that is compatible with both TypeScript\n * and Babel decorators. The optional `finisher` can be used to perform work on\n * the class. The optional `descriptor` should return a PropertyDescriptor\n * to install for the given property.\n *\n * @param finisher {function} Optional finisher method; receives the element\n * constructor and property key as arguments and has no return value.\n * @param descriptor {function} Optional descriptor method; receives the\n * property key as an argument and returns a property descriptor to define for\n * the given property.\n * @returns {ClassElement|void}\n */\nexport const decorateProperty =\n ({\n finisher,\n descriptor,\n }: {\n finisher?:\n | ((ctor: typeof ReactiveElement, property: PropertyKey) => void)\n | null;\n descriptor?: (property: PropertyKey) => PropertyDescriptor;\n }) =>\n (\n protoOrDescriptor: Interface<ReactiveElement> | ClassElement,\n name?: PropertyKey\n // Note TypeScript requires the return type to be `void|any`\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): void | any => {\n // TypeScript / Babel legacy mode\n if (name !== undefined) {\n const ctor = (protoOrDescriptor as ReactiveElement)\n .constructor as typeof ReactiveElement;\n if (descriptor !== undefined) {\n Object.defineProperty(protoOrDescriptor, name, descriptor(name));\n }\n finisher?.(ctor, name!);\n // Babel standard mode\n } else {\n // Note, the @property decorator saves `key` as `originalKey`\n // so try to use it here.\n const key =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (protoOrDescriptor as any).originalKey ??\n (protoOrDescriptor as ClassElement).key;\n const info: ClassElement =\n descriptor != undefined\n ? {\n kind: 'method',\n placement: 'prototype',\n key,\n descriptor: descriptor((protoOrDescriptor as ClassElement).key),\n }\n : {...(protoOrDescriptor as ClassElement), key};\n if (finisher != undefined) {\n info.finisher = function <ReactiveElement>(\n ctor: Constructor<ReactiveElement>\n ) {\n finisher(ctor as unknown as typeof ReactiveElement, key);\n };\n }\n return info;\n }\n };\n"],"names":["legacyPrototypeMethod","descriptor","proto","name","Object","defineProperty","standardPrototypeMethod","element","kind","placement","key","decorateProperty","finisher","protoOrDescriptor","undefined","_a","originalKey","info","ctor","constructor"],"mappings":";;;;;AAwCa,MAAAA,EAAwB,CACnCC,EACAC,EACAC,KAEAC,OAAOC,eAAeH,EAAOC,EAAMF,EAAW,EAGnCK,EAA0B,CACrCL,EACAM,KACI,CACJC,KAAM,SACNC,UAAW,YACXC,IAAKH,EAAQG,IACbT,eAgBWU,EACX,EACEC,WACAX,gBAOF,CACEY,EACAV,WAKA,QAAaW,IAATX,EAQG,CAGL,MAAMO,UAEJK,EAACF,EAA0BG,2BAC1BH,EAAmCH,IAChCO,EACUH,MAAdb,EACI,CACEO,KAAM,SACNC,UAAW,YACXC,MACAT,WAAYA,EAAYY,EAAmCH,MAE7D,IAAKG,EAAoCH,OAQ/C,OAPgBI,MAAZF,IACFK,EAAKL,SAAW,SACdM,GAEAN,EAASM,EAA2CR,EACtD,GAEKO,CACR,CAhCuB,CACtB,MAAMC,EAAQL,EACXM,iBACgBL,IAAfb,GACFG,OAAOC,eAAeQ,EAAmBV,EAAMF,EAAWE,IAE5DS,SAAAA,EAAWM,EAAMf,EAElB,CAwBA"}
|
27
node_modules/@lit/reactive-element/decorators/custom-element.d.ts
generated
vendored
Normal file
27
node_modules/@lit/reactive-element/decorators/custom-element.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ClassDescriptor } from './base.js';
|
||||
/**
|
||||
* Allow for custom element classes with private constructors
|
||||
*/
|
||||
declare type CustomElementClass = Omit<typeof HTMLElement, 'new'>;
|
||||
/**
|
||||
* Class decorator factory that defines the decorated class as a custom element.
|
||||
*
|
||||
* ```js
|
||||
* @customElement('my-element')
|
||||
* class MyElement extends LitElement {
|
||||
* render() {
|
||||
* return html``;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
* @param tagName The tag name of the custom element to define.
|
||||
*/
|
||||
export declare const customElement: (tagName: string) => (classOrDescriptor: CustomElementClass | ClassDescriptor) => any;
|
||||
export {};
|
||||
//# sourceMappingURL=custom-element.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"custom-element.d.ts","sourceRoot":"","sources":["../../src/decorators/custom-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAc,eAAe,EAAC,MAAM,WAAW,CAAC;AAEvD;;GAEG;AACH,aAAK,kBAAkB,GAAG,IAAI,CAAC,OAAO,WAAW,EAAE,KAAK,CAAC,CAAC;AA4B1D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,YACd,MAAM,yBACI,kBAAkB,GAAG,eAAe,QAGkB,CAAC"}
|
7
node_modules/@lit/reactive-element/decorators/custom-element.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/custom-element.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
const e=e=>n=>"function"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return{kind:t,elements:s,finisher(n){customElements.define(e,n)}}})(e,n);export{e as customElement};
|
||||
//# sourceMappingURL=custom-element.js.map
|
1
node_modules/@lit/reactive-element/decorators/custom-element.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/custom-element.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"custom-element.js","sources":["../src/decorators/custom-element.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport {Constructor, ClassDescriptor} from './base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nconst legacyCustomElement = (tagName: string, clazz: CustomElementClass) => {\n customElements.define(tagName, clazz as CustomElementConstructor);\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return clazz as any;\n};\n\nconst standardCustomElement = (\n tagName: string,\n descriptor: ClassDescriptor\n) => {\n const {kind, elements} = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz: Constructor<HTMLElement>) {\n customElements.define(tagName, clazz);\n },\n };\n};\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @customElement('my-element')\n * class MyElement extends LitElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n * @category Decorator\n * @param tagName The tag name of the custom element to define.\n */\nexport const customElement =\n (tagName: string) =>\n (classOrDescriptor: CustomElementClass | ClassDescriptor) =>\n typeof classOrDescriptor === 'function'\n ? legacyCustomElement(tagName, classOrDescriptor)\n : standardCustomElement(tagName, classOrDescriptor as ClassDescriptor);\n"],"names":["customElement","tagName","classOrDescriptor","clazz","customElements","define","legacyCustomElement","descriptor","kind","elements","finisher","standardCustomElement"],"mappings":";;;;;AAmBA,MAwCaA,EACVC,GACAC,GAC8B,mBAAtBA,EA3CiB,EAACD,EAAiBE,KAC5CC,eAAeC,OAAOJ,EAASE,GAOxBA,GAoCDG,CAAoBL,EAASC,GAjCP,EAC5BD,EACAM,KAEA,MAAMC,KAACA,EAAIC,SAAEA,GAAYF,EACzB,MAAO,CACLC,OACAC,WAEAC,SAASP,GACPC,eAAeC,OAAOJ,EAASE,EAChC,EACF,EAsBKQ,CAAsBV,EAASC"}
|
38
node_modules/@lit/reactive-element/decorators/event-options.d.ts
generated
vendored
Normal file
38
node_modules/@lit/reactive-element/decorators/event-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* Adds event listener options to a method used as an event listener in a
|
||||
* lit-html template.
|
||||
*
|
||||
* @param options An object that specifies event listener options as accepted by
|
||||
* `EventTarget#addEventListener` and `EventTarget#removeEventListener`.
|
||||
*
|
||||
* Current browsers support the `capture`, `passive`, and `once` options. See:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* clicked = false;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div @click=${this._onClick}>
|
||||
* <button></button>
|
||||
* </div>
|
||||
* `;
|
||||
* }
|
||||
*
|
||||
* @eventOptions({capture: true})
|
||||
* _onClick(e) {
|
||||
* this.clicked = true;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function eventOptions(options: AddEventListenerOptions): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=event-options.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/event-options.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/event-options.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"event-options.d.ts","sourceRoot":"","sources":["../../src/decorators/event-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,uBAAuB,iJAU5D"}
|
7
node_modules/@lit/reactive-element/decorators/event-options.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/event-options.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import{decorateProperty as r}from"./base.js";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/function e(e){return r({finisher:(r,t)=>{Object.assign(r.prototype[t],e)}})}export{e as eventOptions};
|
||||
//# sourceMappingURL=event-options.js.map
|
1
node_modules/@lit/reactive-element/decorators/event-options.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/event-options.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"event-options.js","sources":["../src/decorators/event-options.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n/**\n * Adds event listener options to a method used as an event listener in a\n * lit-html template.\n *\n * @param options An object that specifies event listener options as accepted by\n * `EventTarget#addEventListener` and `EventTarget#removeEventListener`.\n *\n * Current browsers support the `capture`, `passive`, and `once` options. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters\n *\n * ```ts\n * class MyElement {\n * clicked = false;\n *\n * render() {\n * return html`\n * <div @click=${this._onClick}>\n * <button></button>\n * </div>\n * `;\n * }\n *\n * @eventOptions({capture: true})\n * _onClick(e) {\n * this.clicked = true;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function eventOptions(options: AddEventListenerOptions) {\n return decorateProperty({\n finisher: (ctor: typeof ReactiveElement, name: PropertyKey) => {\n Object.assign(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ctor.prototype[name as keyof ReactiveElement] as any,\n options\n );\n },\n });\n}\n"],"names":["eventOptions","options","decorateProperty","finisher","ctor","name","Object","assign","prototype"],"mappings":";;;;;GA8CM,SAAUA,EAAaC,GAC3B,OAAOC,EAAiB,CACtBC,SAAU,CAACC,EAA8BC,KACvCC,OAAOC,OAELH,EAAKI,UAAUH,GACfJ,EACD,GAGP"}
|
41
node_modules/@lit/reactive-element/decorators/property.d.ts
generated
vendored
Normal file
41
node_modules/@lit/reactive-element/decorators/property.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { PropertyDeclaration } from '../reactive-element.js';
|
||||
import { ClassElement } from './base.js';
|
||||
/**
|
||||
* A property decorator which creates a reactive property that reflects a
|
||||
* corresponding attribute value. When a decorated property is set
|
||||
* the element will update and render. A {@linkcode PropertyDeclaration} may
|
||||
* optionally be supplied to configure property features.
|
||||
*
|
||||
* This decorator should only be used for public fields. As public fields,
|
||||
* properties should be considered as primarily settable by element users,
|
||||
* either via attribute or the property itself.
|
||||
*
|
||||
* Generally, properties that are changed by the element should be private or
|
||||
* protected fields and should use the {@linkcode state} decorator.
|
||||
*
|
||||
* However, sometimes element code does need to set a public property. This
|
||||
* should typically only be done in response to user interaction, and an event
|
||||
* should be fired informing the user; for example, a checkbox sets its
|
||||
* `checked` property when clicked and fires a `changed` event. Mutating public
|
||||
* properties should typically not be done for non-primitive (object or array)
|
||||
* properties. In other cases when an element needs to manage state, a private
|
||||
* property decorated via the {@linkcode state} decorator should be used. When
|
||||
* needed, state properties can be initialized via public properties to
|
||||
* facilitate complex interactions.
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @property({ type: Boolean })
|
||||
* clicked = false;
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
* @ExportDecoratedItems
|
||||
*/
|
||||
export declare function property(options?: PropertyDeclaration): (protoOrDescriptor: Object | ClassElement, name?: PropertyKey) => any;
|
||||
//# sourceMappingURL=property.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/property.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/property.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../src/decorators/property.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAC,mBAAmB,EAAkB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AA4DvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,uBAEzB,MAAM,GAAG,YAAY,SAAS,WAAW,KAAG,GAAG,CAI3E"}
|
7
node_modules/@lit/reactive-element/decorators/property.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/property.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
const i=(i,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}},e=(i,e,n)=>{e.constructor.createProperty(n,i)};function n(n){return(t,o)=>void 0!==o?e(n,t,o):i(n,t)}export{n as property};
|
||||
//# sourceMappingURL=property.js.map
|
1
node_modules/@lit/reactive-element/decorators/property.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/property.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
32
node_modules/@lit/reactive-element/decorators/query-all.d.ts
generated
vendored
Normal file
32
node_modules/@lit/reactive-element/decorators/query-all.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter
|
||||
* that executes a querySelectorAll on the element's renderRoot.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
*
|
||||
* See:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAll('div')
|
||||
* divs: NodeListOf<HTMLDivElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAll(selector: string): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query-all.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/query-all.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-all.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-all.d.ts","sourceRoot":"","sources":["../../src/decorators/query-all.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,iJAUxC"}
|
7
node_modules/@lit/reactive-element/decorators/query-all.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/query-all.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import{decorateProperty as r}from"./base.js";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/function e(e){return r({descriptor:r=>({get(){var r,o;return null!==(o=null===(r=this.renderRoot)||void 0===r?void 0:r.querySelectorAll(e))&&void 0!==o?o:[]},enumerable:!0,configurable:!0})})}export{e as queryAll};
|
||||
//# sourceMappingURL=query-all.js.map
|
1
node_modules/@lit/reactive-element/decorators/query-all.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-all.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-all.js","sources":["../src/decorators/query-all.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n/**\n * A property decorator that converts a class property into a getter\n * that executes a querySelectorAll on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n *\n * ```ts\n * class MyElement {\n * @queryAll('div')\n * divs: NodeListOf<HTMLDivElement>;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAll(selector: string) {\n return decorateProperty({\n descriptor: (_name: PropertyKey) => ({\n get(this: ReactiveElement) {\n return this.renderRoot?.querySelectorAll(selector) ?? [];\n },\n enumerable: true,\n configurable: true,\n }),\n });\n}\n"],"names":["queryAll","selector","decorateProperty","descriptor","_name","get","_b","_a","this","renderRoot","querySelectorAll","enumerable","configurable"],"mappings":";;;;;GAwCM,SAAUA,EAASC,GACvB,OAAOC,EAAiB,CACtBC,WAAaC,IAAwB,CACnCC,cACE,OAAsD,QAA/CC,EAAe,QAAfC,EAAAC,KAAKC,kBAAU,IAAAF,OAAA,EAAAA,EAAEG,iBAAiBT,UAAa,IAAAK,EAAAA,EAAA,EACvD,EACDK,YAAY,EACZC,cAAc,KAGpB"}
|
50
node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts
generated
vendored
Normal file
50
node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import type { ReactiveElement } from '../reactive-element.js';
|
||||
import type { QueryAssignedNodesOptions } from './query-assigned-nodes.js';
|
||||
/**
|
||||
* Options for the {@linkcode queryAssignedElements} decorator. Extends the
|
||||
* options that can be passed into
|
||||
* [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).
|
||||
*/
|
||||
export interface QueryAssignedElementsOptions extends QueryAssignedNodesOptions {
|
||||
/**
|
||||
* CSS selector used to filter the elements returned. For example, a selector
|
||||
* of `".item"` will only include elements with the `item` class.
|
||||
*/
|
||||
selector?: string;
|
||||
}
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns the `assignedElements` of the given `slot`. Provides a declarative
|
||||
* way to use
|
||||
* [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).
|
||||
*
|
||||
* Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAssignedElements({ slot: 'list' })
|
||||
* listItems!: Array<HTMLElement>;
|
||||
* @queryAssignedElements()
|
||||
* unnamedSlotEls!: Array<HTMLElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <slot name="list"></slot>
|
||||
* <slot></slot>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Note, the type of this property should be annotated as `Array<HTMLElement>`.
|
||||
*
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAssignedElements(options?: QueryAssignedElementsOptions): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query-assigned-elements.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-assigned-elements.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-elements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AAmBzE;;;;GAIG;AACH,MAAM,WAAW,4BACf,SAAQ,yBAAyB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,4BAA4B,iJAmB3E"}
|
7
node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import{decorateProperty as o}from"./base.js";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r="slot"+(l?`[name=${l}]`:":not([name])"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};
|
||||
//# sourceMappingURL=query-assigned-elements.js.map
|
1
node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-assigned-elements.js","sources":["../src/decorators/query-assigned-elements.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {decorateProperty} from './base.js';\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\n\nconst NODE_MODE = false;\nconst global = NODE_MODE ? globalThis : window;\n\n/**\n * A tiny module scoped polyfill for HTMLSlotElement.assignedElements.\n */\nconst slotAssignedElements =\n global.HTMLSlotElement?.prototype.assignedElements != null\n ? (slot: HTMLSlotElement, opts?: AssignedNodesOptions) =>\n slot.assignedElements(opts)\n : (slot: HTMLSlotElement, opts?: AssignedNodesOptions) =>\n slot\n .assignedNodes(opts)\n .filter(\n (node): node is Element => node.nodeType === Node.ELEMENT_NODE\n );\n\n/**\n * Options for the {@linkcode queryAssignedElements} decorator. Extends the\n * options that can be passed into\n * [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n */\nexport interface QueryAssignedElementsOptions\n extends QueryAssignedNodesOptions {\n /**\n * CSS selector used to filter the elements returned. For example, a selector\n * of `\".item\"` will only include elements with the `item` class.\n */\n selector?: string;\n}\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedElements({ slot: 'list' })\n * listItems!: Array<HTMLElement>;\n * @queryAssignedElements()\n * unnamedSlotEls!: Array<HTMLElement>;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * <slot></slot>\n * `;\n * }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array<HTMLElement>`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(options?: QueryAssignedElementsOptions) {\n const {slot, selector} = options ?? {};\n return decorateProperty({\n descriptor: (_name: PropertyKey) => ({\n get(this: ReactiveElement) {\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n const slotEl =\n this.renderRoot?.querySelector<HTMLSlotElement>(slotSelector);\n const elements =\n slotEl != null ? slotAssignedElements(slotEl, options) : [];\n if (selector) {\n return elements.filter((node) => node.matches(selector));\n }\n return elements;\n },\n enumerable: true,\n configurable: true,\n }),\n });\n}\n"],"names":["slotAssignedElements","_a","window","HTMLSlotElement","prototype","assignedElements","slot","opts","assignedNodes","filter","node","nodeType","Node","ELEMENT_NODE","queryAssignedElements","options","selector","decorateProperty","descriptor","_name","get","slotSelector","slotEl","this","renderRoot","querySelector","elements","matches","enumerable","configurable"],"mappings":";;;;;SAmBA,MAKMA,EACkD,OAAhC,QAAtBC,EANsCC,OAM/BC,uBAAe,IAAAF,OAAA,EAAAA,EAAEG,UAAUC,kBAC9B,CAACC,EAAuBC,IACtBD,EAAKD,iBAAiBE,GACxB,CAACD,EAAuBC,IACtBD,EACGE,cAAcD,GACdE,QACEC,GAA0BA,EAAKC,WAAaC,KAAKC,eA8CxD,SAAUC,EAAsBC,GACpC,MAAMT,KAACA,EAAIU,SAAEA,GAAYD,QAAAA,EAAW,GACpC,OAAOE,EAAiB,CACtBC,WAAaC,IAAwB,CACnCC,YACE,MAAMC,EAAe,QAAOf,EAAO,SAASA,KAAU,gBAChDgB,EACW,QAAfrB,EAAAsB,KAAKC,kBAAU,IAAAvB,OAAA,EAAAA,EAAEwB,cAA+BJ,GAC5CK,EACM,MAAVJ,EAAiBtB,EAAqBsB,EAAQP,GAAW,GAC3D,OAAIC,EACKU,EAASjB,QAAQC,GAASA,EAAKiB,QAAQX,KAEzCU,CACR,EACDE,YAAY,EACZC,cAAc,KAGpB"}
|
80
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts
generated
vendored
Normal file
80
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/**
|
||||
* Options for the {@linkcode queryAssignedNodes} decorator. Extends the options
|
||||
* that can be passed into [HTMLSlotElement.assignedNodes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes).
|
||||
*/
|
||||
export interface QueryAssignedNodesOptions extends AssignedNodesOptions {
|
||||
/**
|
||||
* Name of the slot to query. Leave empty for the default slot.
|
||||
*/
|
||||
slot?: string;
|
||||
}
|
||||
declare type TSDecoratorReturnType = void | any;
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns the `assignedNodes` of the given `slot`.
|
||||
*
|
||||
* Can be passed an optional {@linkcode QueryAssignedNodesOptions} object.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAssignedNodes({slot: 'list', flatten: true})
|
||||
* listItems!: Array<Node>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <slot name="list"></slot>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Note the type of this property should be annotated as `Array<Node>`.
|
||||
*
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAssignedNodes(options?: QueryAssignedNodesOptions): TSDecoratorReturnType;
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns the `assignedNodes` of the given named `slot`.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAssignedNodes('list', true, '.item')
|
||||
* listItems!: Array<HTMLElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <slot name="list"></slot>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Note the type of this property should be annotated as `Array<Node>` if used
|
||||
* without a `selector` or `Array<HTMLElement>` if a selector is provided.
|
||||
* Use {@linkcode queryAssignedElements @queryAssignedElements} to list only
|
||||
* elements, and optionally filter the element list using a CSS selector.
|
||||
*
|
||||
* @param slotName A string name of the slot.
|
||||
* @param flatten A boolean which when true flattens the assigned nodes,
|
||||
* meaning any assigned nodes that are slot elements are replaced with their
|
||||
* assigned nodes.
|
||||
* @param selector A CSS selector used to filter the elements returned.
|
||||
*
|
||||
* @category Decorator
|
||||
* @deprecated Prefer passing in a single options object, i.e. `{slot: 'list'}`.
|
||||
* If using `selector` please use `@queryAssignedElements`.
|
||||
* `@queryAssignedNodes('', false, '.item')` is functionally identical to
|
||||
* `@queryAssignedElements({slot: '', flatten: false, selector: '.item'})` or
|
||||
* `@queryAssignedElements({selector: '.item'})`.
|
||||
*/
|
||||
export declare function queryAssignedNodes(slotName?: string, flatten?: boolean, selector?: string): TSDecoratorReturnType;
|
||||
export {};
|
||||
//# sourceMappingURL=query-assigned-nodes.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-assigned-nodes.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-nodes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,aAAK,qBAAqB,GAAG,IAAI,GAAG,GAAG,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,CAAC,EAAE,yBAAyB,GAClC,qBAAqB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,qBAAqB,CAAC"}
|
7
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import{decorateProperty as e}from"./base.js";import{queryAssignedElements as t}from"./query-assigned-elements.js";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/function o(o,n,r){let l,s=o;return"object"==typeof o?(s=o.slot,l=o):l={flatten:n},r?t({slot:s,flatten:n,selector:r}):e({descriptor:e=>({get(){var e,t;const o="slot"+(s?`[name=${s}]`:":not([name])"),n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(o);return null!==(t=null==n?void 0:n.assignedNodes(l))&&void 0!==t?t:[]},enumerable:!0,configurable:!0})})}export{o as queryAssignedNodes};
|
||||
//# sourceMappingURL=query-assigned-nodes.js.map
|
1
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
node_modules/@lit/reactive-element/decorators/query-async.d.ts
generated
vendored
Normal file
40
node_modules/@lit/reactive-element/decorators/query-async.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns a promise that resolves to the result of a querySelector on the
|
||||
* element's renderRoot done after the element's `updateComplete` promise
|
||||
* resolves. When the queried property may change with element state, this
|
||||
* decorator can be used instead of requiring users to await the
|
||||
* `updateComplete` before accessing the property.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
*
|
||||
* See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAsync('#first')
|
||||
* first: Promise<HTMLDivElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // external usage
|
||||
* async doSomethingWithFirst() {
|
||||
* (await aMyElement.first).doSomething();
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAsync(selector: string): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query-async.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/query-async.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-async.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-async.d.ts","sourceRoot":"","sources":["../../src/decorators/query-async.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAQvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,iJAW1C"}
|
8
node_modules/@lit/reactive-element/decorators/query-async.js
generated
vendored
Normal file
8
node_modules/@lit/reactive-element/decorators/query-async.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import{decorateProperty as r}from"./base.js";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
function e(e){return r({descriptor:r=>({async get(){var r;return await this.updateComplete,null===(r=this.renderRoot)||void 0===r?void 0:r.querySelector(e)},enumerable:!0,configurable:!0})})}export{e as queryAsync};
|
||||
//# sourceMappingURL=query-async.js.map
|
1
node_modules/@lit/reactive-element/decorators/query-async.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query-async.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-async.js","sources":["../src/decorators/query-async.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n// Note, in the future, we may extend this decorator to support the use case\n// where the queried element may need to do work to become ready to interact\n// with (e.g. load some implementation code). If so, we might elect to\n// add a second argument defining a function that can be run to make the\n// queried element loaded/updated/ready.\n/**\n * A property decorator that converts a class property into a getter that\n * returns a promise that resolves to the result of a querySelector on the\n * element's renderRoot done after the element's `updateComplete` promise\n * resolves. When the queried property may change with element state, this\n * decorator can be used instead of requiring users to await the\n * `updateComplete` before accessing the property.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @queryAsync('#first')\n * first: Promise<HTMLDivElement>;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n *\n * // external usage\n * async doSomethingWithFirst() {\n * (await aMyElement.first).doSomething();\n * }\n * ```\n * @category Decorator\n */\nexport function queryAsync(selector: string) {\n return decorateProperty({\n descriptor: (_name: PropertyKey) => ({\n async get(this: ReactiveElement) {\n await this.updateComplete;\n return this.renderRoot?.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n }),\n });\n}\n"],"names":["queryAsync","selector","decorateProperty","descriptor","_name","async","this","updateComplete","_a","renderRoot","querySelector","enumerable","configurable"],"mappings":";;;;;;AAqDM,SAAUA,EAAWC,GACzB,OAAOC,EAAiB,CACtBC,WAAaC,IAAwB,CACnCC,kBAEE,aADMC,KAAKC,uBACJC,EAAAF,KAAKG,iCAAYC,cAAcT,EACvC,EACDU,YAAY,EACZC,cAAc,KAGpB"}
|
33
node_modules/@lit/reactive-element/decorators/query.d.ts
generated
vendored
Normal file
33
node_modules/@lit/reactive-element/decorators/query.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* executes a querySelector on the element's renderRoot.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
* @param cache An optional boolean which when true performs the DOM query only
|
||||
* once and caches the result.
|
||||
*
|
||||
* See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @query('#first')
|
||||
* first: HTMLDivElement;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function query(selector: string, cache?: boolean): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/query.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/decorators/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,iJA8BtD"}
|
7
node_modules/@lit/reactive-element/decorators/query.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/query.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import{decorateProperty as o}from"./base.js";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/function i(i,n){return o({descriptor:o=>{const t={get(){var o,n;return null!==(n=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==n?n:null},enumerable:!0,configurable:!0};if(n){const n="symbol"==typeof o?Symbol():"__"+o;t.get=function(){var o,t;return void 0===this[n]&&(this[n]=null!==(t=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(i))&&void 0!==t?t:null),this[n]}}return t}})}export{i as query};
|
||||
//# sourceMappingURL=query.js.map
|
1
node_modules/@lit/reactive-element/decorators/query.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/query.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query.js","sources":["../src/decorators/query.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first: HTMLDivElement;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean) {\n return decorateProperty({\n descriptor: (name: PropertyKey) => {\n const descriptor = {\n get(this: ReactiveElement) {\n return this.renderRoot?.querySelector(selector) ?? null;\n },\n enumerable: true,\n configurable: true,\n };\n if (cache) {\n const key = typeof name === 'symbol' ? Symbol() : `__${name}`;\n descriptor.get = function (this: ReactiveElement) {\n if (\n (this as unknown as {[key: string]: Element | null})[\n key as string\n ] === undefined\n ) {\n (this as unknown as {[key: string]: Element | null})[\n key as string\n ] = this.renderRoot?.querySelector(selector) ?? null;\n }\n return (this as unknown as {[key: string]: Element | null})[\n key as string\n ];\n };\n }\n return descriptor;\n },\n });\n}\n"],"names":["query","selector","cache","decorateProperty","descriptor","name","get","_b","_a","this","renderRoot","querySelector","enumerable","configurable","key","Symbol","undefined"],"mappings":";;;;;GAyCgB,SAAAA,EAAMC,EAAkBC,GACtC,OAAOC,EAAiB,CACtBC,WAAaC,IACX,MAAMD,EAAa,CACjBE,cACE,OAAmD,QAA5CC,EAAe,QAAfC,EAAAC,KAAKC,kBAAU,IAAAF,OAAA,EAAAA,EAAEG,cAAcV,UAAa,IAAAM,EAAAA,EAAA,IACpD,EACDK,YAAY,EACZC,cAAc,GAEhB,GAAIX,EAAO,CACT,MAAMY,EAAsB,iBAATT,EAAoBU,SAAW,KAAKV,EACvDD,EAAWE,IAAM,mBAUf,YANQU,IAFLP,KACCK,KAGDL,KACCK,GAC0C,QAAxCP,EAAe,UAAfE,KAAKC,kBAAU,IAAAF,OAAA,EAAAA,EAAEG,cAAcV,UAAS,IAAAM,EAAAA,EAAI,MAE1CE,KACNK,EAEJ,CACD,CACD,OAAOV,CAAU,GAGvB"}
|
25
node_modules/@lit/reactive-element/decorators/state.d.ts
generated
vendored
Normal file
25
node_modules/@lit/reactive-element/decorators/state.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
export interface InternalPropertyDeclaration<Type = unknown> {
|
||||
/**
|
||||
* A function that indicates if a property should be considered changed when
|
||||
* it is set. The function should take the `newValue` and `oldValue` and
|
||||
* return `true` if an update should be requested.
|
||||
*/
|
||||
hasChanged?(value: Type, oldValue: Type): boolean;
|
||||
}
|
||||
/**
|
||||
* Declares a private or protected reactive property that still triggers
|
||||
* updates to the element when it changes. It does not reflect from the
|
||||
* corresponding attribute.
|
||||
*
|
||||
* Properties declared this way must not be used from HTML or HTML templating
|
||||
* systems, they're solely for properties internal to the element. These
|
||||
* properties may be renamed by optimization tools like closure compiler.
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function state(options?: InternalPropertyDeclaration): (protoOrDescriptor: Object | import("./base.js").ClassElement, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=state.d.ts.map
|
1
node_modules/@lit/reactive-element/decorators/state.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/state.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/decorators/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,WAAW,2BAA2B,CAAC,IAAI,GAAG,OAAO;IACzD;;;;OAIG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC;CACnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,2BAA2B,yGAK1D"}
|
7
node_modules/@lit/reactive-element/decorators/state.js
generated
vendored
Normal file
7
node_modules/@lit/reactive-element/decorators/state.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import{property as r}from"./property.js";
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/function t(t){return r({...t,state:!0})}export{t as state};
|
||||
//# sourceMappingURL=state.js.map
|
1
node_modules/@lit/reactive-element/decorators/state.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/decorators/state.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"state.js","sources":["../src/decorators/state.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {property} from './property.js';\n\nexport interface InternalPropertyDeclaration<Type = unknown> {\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * Declares a private or protected reactive property that still triggers\n * updates to the element when it changes. It does not reflect from the\n * corresponding attribute.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function state(options?: InternalPropertyDeclaration) {\n return property({\n ...options,\n state: true,\n });\n}\n"],"names":["state","options","property"],"mappings":";;;;;GAkCM,SAAUA,EAAMC,GACpB,OAAOC,EAAS,IACXD,EACHD,OAAO,GAEX"}
|
67
node_modules/@lit/reactive-element/development/css-tag.d.ts
generated
vendored
Normal file
67
node_modules/@lit/reactive-element/development/css-tag.d.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/**
|
||||
* Whether the current browser supports `adoptedStyleSheets`.
|
||||
*/
|
||||
export declare const supportsAdoptingStyleSheets: boolean;
|
||||
/**
|
||||
* A CSSResult or native CSSStyleSheet.
|
||||
*
|
||||
* In browsers that support constructible CSS style sheets, CSSStyleSheet
|
||||
* object can be used for styling along side CSSResult from the `css`
|
||||
* template tag.
|
||||
*/
|
||||
export declare type CSSResultOrNative = CSSResult | CSSStyleSheet;
|
||||
export declare type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;
|
||||
/**
|
||||
* A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.
|
||||
*/
|
||||
export declare type CSSResultGroup = CSSResultOrNative | CSSResultArray;
|
||||
/**
|
||||
* A container for a string of CSS text, that may be used to create a CSSStyleSheet.
|
||||
*
|
||||
* CSSResult is the return value of `css`-tagged template literals and
|
||||
* `unsafeCSS()`. In order to ensure that CSSResults are only created via the
|
||||
* `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.
|
||||
*/
|
||||
export declare class CSSResult {
|
||||
['_$cssResult$']: boolean;
|
||||
readonly cssText: string;
|
||||
private _styleSheet?;
|
||||
private _strings;
|
||||
private constructor();
|
||||
get styleSheet(): CSSStyleSheet | undefined;
|
||||
toString(): string;
|
||||
}
|
||||
/**
|
||||
* Wrap a value for interpolation in a {@linkcode css} tagged template literal.
|
||||
*
|
||||
* This is unsafe because untrusted CSS text can be used to phone home
|
||||
* or exfiltrate data to an attacker controlled site. Take care to only use
|
||||
* this with trusted input.
|
||||
*/
|
||||
export declare const unsafeCSS: (value: unknown) => CSSResult;
|
||||
/**
|
||||
* A template literal tag which can be used with LitElement's
|
||||
* {@linkcode LitElement.styles} property to set element styles.
|
||||
*
|
||||
* For security reasons, only literal string values and number may be used in
|
||||
* embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}
|
||||
* may be used inside an expression.
|
||||
*/
|
||||
export declare const css: (strings: TemplateStringsArray, ...values: (CSSResultGroup | number)[]) => CSSResult;
|
||||
/**
|
||||
* Applies the given styles to a `shadowRoot`. When Shadow DOM is
|
||||
* available but `adoptedStyleSheets` is not, styles are appended to the
|
||||
* `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).
|
||||
* Note, when shimming is used, any styles that are subsequently placed into
|
||||
* the shadowRoot should be placed *before* any shimmed adopted styles. This
|
||||
* will match spec behavior that gives adopted sheets precedence over styles in
|
||||
* shadowRoot.
|
||||
*/
|
||||
export declare const adoptStyles: (renderRoot: ShadowRoot, styles: Array<CSSResultOrNative>) => void;
|
||||
export declare const getCompatibleStyle: (s: CSSResultOrNative) => CSSResultOrNative;
|
||||
//# sourceMappingURL=css-tag.d.ts.map
|
1
node_modules/@lit/reactive-element/development/css-tag.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/css-tag.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"css-tag.d.ts","sourceRoot":"","sources":["../src/css-tag.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,OAIJ,CAAC;AAEvC;;;;;;GAMG;AACH,oBAAY,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAC;AAE1D,oBAAY,cAAc,GAAG,KAAK,CAAC,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAMhE;;;;;;GAMG;AACH,qBAAa,SAAS;IAEpB,CAAC,cAAc,CAAC,UAAQ;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,WAAW,CAAC,CAAgB;IACpC,OAAO,CAAC,QAAQ,CAAmC;IAEnD,OAAO;IAgBP,IAAI,UAAU,IAAI,aAAa,GAAG,SAAS,CAoB1C;IAED,QAAQ,IAAI,MAAM;CAGnB;AAyBD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,UAAW,OAAO,cAKrC,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,YACL,oBAAoB,aAClB,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,KACrC,SAaF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,eACV,UAAU,UACd,MAAM,iBAAiB,CAAC,SAkBjC,CAAC;AAUF,eAAO,MAAM,kBAAkB,MAGrB,iBAAiB,sBAEwC,CAAC"}
|
132
node_modules/@lit/reactive-element/development/css-tag.js
generated
vendored
Normal file
132
node_modules/@lit/reactive-element/development/css-tag.js
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
const NODE_MODE = false;
|
||||
const global = NODE_MODE ? globalThis : window;
|
||||
/**
|
||||
* Whether the current browser supports `adoptedStyleSheets`.
|
||||
*/
|
||||
export const supportsAdoptingStyleSheets = global.ShadowRoot &&
|
||||
(global.ShadyCSS === undefined || global.ShadyCSS.nativeShadow) &&
|
||||
'adoptedStyleSheets' in Document.prototype &&
|
||||
'replace' in CSSStyleSheet.prototype;
|
||||
const constructionToken = Symbol();
|
||||
const cssTagCache = new WeakMap();
|
||||
/**
|
||||
* A container for a string of CSS text, that may be used to create a CSSStyleSheet.
|
||||
*
|
||||
* CSSResult is the return value of `css`-tagged template literals and
|
||||
* `unsafeCSS()`. In order to ensure that CSSResults are only created via the
|
||||
* `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.
|
||||
*/
|
||||
export class CSSResult {
|
||||
constructor(cssText, strings, safeToken) {
|
||||
// This property needs to remain unminified.
|
||||
this['_$cssResult$'] = true;
|
||||
if (safeToken !== constructionToken) {
|
||||
throw new Error('CSSResult is not constructable. Use `unsafeCSS` or `css` instead.');
|
||||
}
|
||||
this.cssText = cssText;
|
||||
this._strings = strings;
|
||||
}
|
||||
// This is a getter so that it's lazy. In practice, this means stylesheets
|
||||
// are not created until the first element instance is made.
|
||||
get styleSheet() {
|
||||
// If `supportsAdoptingStyleSheets` is true then we assume CSSStyleSheet is
|
||||
// constructable.
|
||||
let styleSheet = this._styleSheet;
|
||||
const strings = this._strings;
|
||||
if (supportsAdoptingStyleSheets && styleSheet === undefined) {
|
||||
const cacheable = strings !== undefined && strings.length === 1;
|
||||
if (cacheable) {
|
||||
styleSheet = cssTagCache.get(strings);
|
||||
}
|
||||
if (styleSheet === undefined) {
|
||||
(this._styleSheet = styleSheet = new CSSStyleSheet()).replaceSync(this.cssText);
|
||||
if (cacheable) {
|
||||
cssTagCache.set(strings, styleSheet);
|
||||
}
|
||||
}
|
||||
}
|
||||
return styleSheet;
|
||||
}
|
||||
toString() {
|
||||
return this.cssText;
|
||||
}
|
||||
}
|
||||
const textFromCSSResult = (value) => {
|
||||
// This property needs to remain unminified.
|
||||
if (value['_$cssResult$'] === true) {
|
||||
return value.cssText;
|
||||
}
|
||||
else if (typeof value === 'number') {
|
||||
return value;
|
||||
}
|
||||
else {
|
||||
throw new Error(`Value passed to 'css' function must be a 'css' function result: ` +
|
||||
`${value}. Use 'unsafeCSS' to pass non-literal values, but take care ` +
|
||||
`to ensure page security.`);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Wrap a value for interpolation in a {@linkcode css} tagged template literal.
|
||||
*
|
||||
* This is unsafe because untrusted CSS text can be used to phone home
|
||||
* or exfiltrate data to an attacker controlled site. Take care to only use
|
||||
* this with trusted input.
|
||||
*/
|
||||
export const unsafeCSS = (value) => new CSSResult(typeof value === 'string' ? value : String(value), undefined, constructionToken);
|
||||
/**
|
||||
* A template literal tag which can be used with LitElement's
|
||||
* {@linkcode LitElement.styles} property to set element styles.
|
||||
*
|
||||
* For security reasons, only literal string values and number may be used in
|
||||
* embedded expressions. To incorporate non-literal values {@linkcode unsafeCSS}
|
||||
* may be used inside an expression.
|
||||
*/
|
||||
export const css = (strings, ...values) => {
|
||||
const cssText = strings.length === 1
|
||||
? strings[0]
|
||||
: values.reduce((acc, v, idx) => acc + textFromCSSResult(v) + strings[idx + 1], strings[0]);
|
||||
return new CSSResult(cssText, strings, constructionToken);
|
||||
};
|
||||
/**
|
||||
* Applies the given styles to a `shadowRoot`. When Shadow DOM is
|
||||
* available but `adoptedStyleSheets` is not, styles are appended to the
|
||||
* `shadowRoot` to [mimic spec behavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).
|
||||
* Note, when shimming is used, any styles that are subsequently placed into
|
||||
* the shadowRoot should be placed *before* any shimmed adopted styles. This
|
||||
* will match spec behavior that gives adopted sheets precedence over styles in
|
||||
* shadowRoot.
|
||||
*/
|
||||
export const adoptStyles = (renderRoot, styles) => {
|
||||
if (supportsAdoptingStyleSheets) {
|
||||
renderRoot.adoptedStyleSheets = styles.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
|
||||
}
|
||||
else {
|
||||
styles.forEach((s) => {
|
||||
const style = document.createElement('style');
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const nonce = global['litNonce'];
|
||||
if (nonce !== undefined) {
|
||||
style.setAttribute('nonce', nonce);
|
||||
}
|
||||
style.textContent = s.cssText;
|
||||
renderRoot.appendChild(style);
|
||||
});
|
||||
}
|
||||
};
|
||||
const cssResultFromStyleSheet = (sheet) => {
|
||||
let cssText = '';
|
||||
for (const rule of sheet.cssRules) {
|
||||
cssText += rule.cssText;
|
||||
}
|
||||
return unsafeCSS(cssText);
|
||||
};
|
||||
export const getCompatibleStyle = supportsAdoptingStyleSheets ||
|
||||
(NODE_MODE && global.CSSStyleSheet === undefined)
|
||||
? (s) => s
|
||||
: (s) => s instanceof CSSStyleSheet ? cssResultFromStyleSheet(s) : s;
|
||||
//# sourceMappingURL=css-tag.js.map
|
1
node_modules/@lit/reactive-element/development/css-tag.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/css-tag.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
16
node_modules/@lit/reactive-element/development/decorators.d.ts
generated
vendored
Normal file
16
node_modules/@lit/reactive-element/development/decorators.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
export * from './decorators/base.js';
|
||||
export * from './decorators/custom-element.js';
|
||||
export * from './decorators/property.js';
|
||||
export * from './decorators/state.js';
|
||||
export * from './decorators/event-options.js';
|
||||
export * from './decorators/query.js';
|
||||
export * from './decorators/query-all.js';
|
||||
export * from './decorators/query-async.js';
|
||||
export * from './decorators/query-assigned-elements.js';
|
||||
export * from './decorators/query-assigned-nodes.js';
|
||||
//# sourceMappingURL=decorators.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC"}
|
22
node_modules/@lit/reactive-element/development/decorators.js
generated
vendored
Normal file
22
node_modules/@lit/reactive-element/development/decorators.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/*
|
||||
* IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
|
||||
* property decorators (but not class decorators) in this file that have
|
||||
* an @ExportDecoratedItems annotation must be defined as a regular function,
|
||||
* not an arrow function.
|
||||
*/
|
||||
export * from './decorators/base.js';
|
||||
export * from './decorators/custom-element.js';
|
||||
export * from './decorators/property.js';
|
||||
export * from './decorators/state.js';
|
||||
export * from './decorators/event-options.js';
|
||||
export * from './decorators/query.js';
|
||||
export * from './decorators/query-all.js';
|
||||
export * from './decorators/query-async.js';
|
||||
export * from './decorators/query-assigned-elements.js';
|
||||
export * from './decorators/query-assigned-nodes.js';
|
||||
//# sourceMappingURL=decorators.js.map
|
1
node_modules/@lit/reactive-element/development/decorators.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nexport * from './decorators/base.js';\nexport * from './decorators/custom-element.js';\nexport * from './decorators/property.js';\nexport * from './decorators/state.js';\nexport * from './decorators/event-options.js';\nexport * from './decorators/query.js';\nexport * from './decorators/query-all.js';\nexport * from './decorators/query-async.js';\nexport * from './decorators/query-assigned-elements.js';\nexport * from './decorators/query-assigned-nodes.js';\n"]}
|
56
node_modules/@lit/reactive-element/development/decorators/base.d.ts
generated
vendored
Normal file
56
node_modules/@lit/reactive-element/development/decorators/base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* Generates a public interface type that removes private and protected fields.
|
||||
* This allows accepting otherwise compatible versions of the type (e.g. from
|
||||
* multiple copies of the same package in `node_modules`).
|
||||
*/
|
||||
export declare type Interface<T> = {
|
||||
[K in keyof T]: T[K];
|
||||
};
|
||||
export declare type Constructor<T> = {
|
||||
new (...args: any[]): T;
|
||||
};
|
||||
export interface ClassDescriptor {
|
||||
kind: 'class';
|
||||
elements: ClassElement[];
|
||||
finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;
|
||||
}
|
||||
export interface ClassElement {
|
||||
kind: 'field' | 'method';
|
||||
key: PropertyKey;
|
||||
placement: 'static' | 'prototype' | 'own';
|
||||
initializer?: Function;
|
||||
extras?: ClassElement[];
|
||||
finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;
|
||||
descriptor?: PropertyDescriptor;
|
||||
}
|
||||
export declare const legacyPrototypeMethod: (descriptor: PropertyDescriptor, proto: Object, name: PropertyKey) => void;
|
||||
export declare const standardPrototypeMethod: (descriptor: PropertyDescriptor, element: ClassElement) => {
|
||||
kind: string;
|
||||
placement: string;
|
||||
key: PropertyKey;
|
||||
descriptor: PropertyDescriptor;
|
||||
};
|
||||
/**
|
||||
* Helper for decorating a property that is compatible with both TypeScript
|
||||
* and Babel decorators. The optional `finisher` can be used to perform work on
|
||||
* the class. The optional `descriptor` should return a PropertyDescriptor
|
||||
* to install for the given property.
|
||||
*
|
||||
* @param finisher {function} Optional finisher method; receives the element
|
||||
* constructor and property key as arguments and has no return value.
|
||||
* @param descriptor {function} Optional descriptor method; receives the
|
||||
* property key as an argument and returns a property descriptor to define for
|
||||
* the given property.
|
||||
* @returns {ClassElement|void}
|
||||
*/
|
||||
export declare const decorateProperty: ({ finisher, descriptor, }: {
|
||||
finisher?: ((ctor: typeof ReactiveElement, property: PropertyKey) => void) | null | undefined;
|
||||
descriptor?: ((property: PropertyKey) => PropertyDescriptor) | undefined;
|
||||
}) => (protoOrDescriptor: Interface<ReactiveElement> | ClassElement, name?: PropertyKey) => void | any;
|
||||
//# sourceMappingURL=base.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/base.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/base.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/decorators/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAEvD;;;;GAIG;AACH,oBAAY,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,CAAC;AAEF,oBAAY,WAAW,CAAC,CAAC,IAAI;IAE3B,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB,CAAC;AAGF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;CAChE;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;IACzB,GAAG,EAAE,WAAW,CAAC;IACjB,SAAS,EAAE,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAC;IAC1C,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAC/D,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,eAAO,MAAM,qBAAqB,eACpB,kBAAkB,SACvB,MAAM,QACP,WAAW,SAGlB,CAAC;AAEF,eAAO,MAAM,uBAAuB,eACtB,kBAAkB,WACrB,YAAY;;;;;CAMrB,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;uBAMb,sBAAsB,YAAY,WAAW,KAAK,IAAI;6BAE1C,WAAW,KAAK,kBAAkB;0BAGvC,UAAU,eAAe,CAAC,GAAG,YAAY,SACrD,WAAW,KAGjB,IAAI,GAAG,GAmCT,CAAC"}
|
65
node_modules/@lit/reactive-element/development/decorators/base.js
generated
vendored
Normal file
65
node_modules/@lit/reactive-element/development/decorators/base.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
export const legacyPrototypeMethod = (descriptor, proto, name) => {
|
||||
Object.defineProperty(proto, name, descriptor);
|
||||
};
|
||||
export const standardPrototypeMethod = (descriptor, element) => ({
|
||||
kind: 'method',
|
||||
placement: 'prototype',
|
||||
key: element.key,
|
||||
descriptor,
|
||||
});
|
||||
/**
|
||||
* Helper for decorating a property that is compatible with both TypeScript
|
||||
* and Babel decorators. The optional `finisher` can be used to perform work on
|
||||
* the class. The optional `descriptor` should return a PropertyDescriptor
|
||||
* to install for the given property.
|
||||
*
|
||||
* @param finisher {function} Optional finisher method; receives the element
|
||||
* constructor and property key as arguments and has no return value.
|
||||
* @param descriptor {function} Optional descriptor method; receives the
|
||||
* property key as an argument and returns a property descriptor to define for
|
||||
* the given property.
|
||||
* @returns {ClassElement|void}
|
||||
*/
|
||||
export const decorateProperty = ({ finisher, descriptor, }) => (protoOrDescriptor, name
|
||||
// Note TypeScript requires the return type to be `void|any`
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
) => {
|
||||
var _a;
|
||||
// TypeScript / Babel legacy mode
|
||||
if (name !== undefined) {
|
||||
const ctor = protoOrDescriptor
|
||||
.constructor;
|
||||
if (descriptor !== undefined) {
|
||||
Object.defineProperty(protoOrDescriptor, name, descriptor(name));
|
||||
}
|
||||
finisher === null || finisher === void 0 ? void 0 : finisher(ctor, name);
|
||||
// Babel standard mode
|
||||
}
|
||||
else {
|
||||
// Note, the @property decorator saves `key` as `originalKey`
|
||||
// so try to use it here.
|
||||
const key =
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(_a = protoOrDescriptor.originalKey) !== null && _a !== void 0 ? _a : protoOrDescriptor.key;
|
||||
const info = descriptor != undefined
|
||||
? {
|
||||
kind: 'method',
|
||||
placement: 'prototype',
|
||||
key,
|
||||
descriptor: descriptor(protoOrDescriptor.key),
|
||||
}
|
||||
: { ...protoOrDescriptor, key };
|
||||
if (finisher != undefined) {
|
||||
info.finisher = function (ctor) {
|
||||
finisher(ctor, key);
|
||||
};
|
||||
}
|
||||
return info;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=base.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/base.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/base.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
27
node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts
generated
vendored
Normal file
27
node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ClassDescriptor } from './base.js';
|
||||
/**
|
||||
* Allow for custom element classes with private constructors
|
||||
*/
|
||||
declare type CustomElementClass = Omit<typeof HTMLElement, 'new'>;
|
||||
/**
|
||||
* Class decorator factory that defines the decorated class as a custom element.
|
||||
*
|
||||
* ```js
|
||||
* @customElement('my-element')
|
||||
* class MyElement extends LitElement {
|
||||
* render() {
|
||||
* return html``;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
* @param tagName The tag name of the custom element to define.
|
||||
*/
|
||||
export declare const customElement: (tagName: string) => (classOrDescriptor: CustomElementClass | ClassDescriptor) => any;
|
||||
export {};
|
||||
//# sourceMappingURL=custom-element.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"custom-element.d.ts","sourceRoot":"","sources":["../../src/decorators/custom-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAc,eAAe,EAAC,MAAM,WAAW,CAAC;AAEvD;;GAEG;AACH,aAAK,kBAAkB,GAAG,IAAI,CAAC,OAAO,WAAW,EAAE,KAAK,CAAC,CAAC;AA4B1D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,YACd,MAAM,yBACI,kBAAkB,GAAG,eAAe,QAGkB,CAAC"}
|
44
node_modules/@lit/reactive-element/development/decorators/custom-element.js
generated
vendored
Normal file
44
node_modules/@lit/reactive-element/development/decorators/custom-element.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
const legacyCustomElement = (tagName, clazz) => {
|
||||
customElements.define(tagName, clazz);
|
||||
// Cast as any because TS doesn't recognize the return type as being a
|
||||
// subtype of the decorated class when clazz is typed as
|
||||
// `Constructor<HTMLElement>` for some reason.
|
||||
// `Constructor<HTMLElement>` is helpful to make sure the decorator is
|
||||
// applied to elements however.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
return clazz;
|
||||
};
|
||||
const standardCustomElement = (tagName, descriptor) => {
|
||||
const { kind, elements } = descriptor;
|
||||
return {
|
||||
kind,
|
||||
elements,
|
||||
// This callback is called once the class is otherwise fully defined
|
||||
finisher(clazz) {
|
||||
customElements.define(tagName, clazz);
|
||||
},
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Class decorator factory that defines the decorated class as a custom element.
|
||||
*
|
||||
* ```js
|
||||
* @customElement('my-element')
|
||||
* class MyElement extends LitElement {
|
||||
* render() {
|
||||
* return html``;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
* @param tagName The tag name of the custom element to define.
|
||||
*/
|
||||
export const customElement = (tagName) => (classOrDescriptor) => typeof classOrDescriptor === 'function'
|
||||
? legacyCustomElement(tagName, classOrDescriptor)
|
||||
: standardCustomElement(tagName, classOrDescriptor);
|
||||
//# sourceMappingURL=custom-element.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/custom-element.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/custom-element.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"custom-element.js","sourceRoot":"","sources":["../../src/decorators/custom-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH,MAAM,mBAAmB,GAAG,CAAC,OAAe,EAAE,KAAyB,EAAE,EAAE;IACzE,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,KAAiC,CAAC,CAAC;IAClE,sEAAsE;IACtE,wDAAwD;IACxD,8CAA8C;IAC9C,sEAAsE;IACtE,+BAA+B;IAC/B,8DAA8D;IAC9D,OAAO,KAAY,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAC5B,OAAe,EACf,UAA2B,EAC3B,EAAE;IACF,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAC,GAAG,UAAU,CAAC;IACpC,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,oEAAoE;QACpE,QAAQ,CAAC,KAA+B;YACtC,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACxC,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GACxB,CAAC,OAAe,EAAE,EAAE,CACpB,CAAC,iBAAuD,EAAE,EAAE,CAC1D,OAAO,iBAAiB,KAAK,UAAU;IACrC,CAAC,CAAC,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACjD,CAAC,CAAC,qBAAqB,CAAC,OAAO,EAAE,iBAAoC,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\nimport {Constructor, ClassDescriptor} from './base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nconst legacyCustomElement = (tagName: string, clazz: CustomElementClass) => {\n customElements.define(tagName, clazz as CustomElementConstructor);\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return clazz as any;\n};\n\nconst standardCustomElement = (\n tagName: string,\n descriptor: ClassDescriptor\n) => {\n const {kind, elements} = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz: Constructor<HTMLElement>) {\n customElements.define(tagName, clazz);\n },\n };\n};\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @customElement('my-element')\n * class MyElement extends LitElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n * @category Decorator\n * @param tagName The tag name of the custom element to define.\n */\nexport const customElement =\n (tagName: string) =>\n (classOrDescriptor: CustomElementClass | ClassDescriptor) =>\n typeof classOrDescriptor === 'function'\n ? legacyCustomElement(tagName, classOrDescriptor)\n : standardCustomElement(tagName, classOrDescriptor as ClassDescriptor);\n"]}
|
38
node_modules/@lit/reactive-element/development/decorators/event-options.d.ts
generated
vendored
Normal file
38
node_modules/@lit/reactive-element/development/decorators/event-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* Adds event listener options to a method used as an event listener in a
|
||||
* lit-html template.
|
||||
*
|
||||
* @param options An object that specifies event listener options as accepted by
|
||||
* `EventTarget#addEventListener` and `EventTarget#removeEventListener`.
|
||||
*
|
||||
* Current browsers support the `capture`, `passive`, and `once` options. See:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* clicked = false;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div @click=${this._onClick}>
|
||||
* <button></button>
|
||||
* </div>
|
||||
* `;
|
||||
* }
|
||||
*
|
||||
* @eventOptions({capture: true})
|
||||
* _onClick(e) {
|
||||
* this.clicked = true;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function eventOptions(options: AddEventListenerOptions): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=event-options.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/event-options.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/event-options.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"event-options.d.ts","sourceRoot":"","sources":["../../src/decorators/event-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,uBAAuB,iJAU5D"}
|
46
node_modules/@lit/reactive-element/development/decorators/event-options.js
generated
vendored
Normal file
46
node_modules/@lit/reactive-element/development/decorators/event-options.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { decorateProperty } from './base.js';
|
||||
/**
|
||||
* Adds event listener options to a method used as an event listener in a
|
||||
* lit-html template.
|
||||
*
|
||||
* @param options An object that specifies event listener options as accepted by
|
||||
* `EventTarget#addEventListener` and `EventTarget#removeEventListener`.
|
||||
*
|
||||
* Current browsers support the `capture`, `passive`, and `once` options. See:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* clicked = false;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div @click=${this._onClick}>
|
||||
* <button></button>
|
||||
* </div>
|
||||
* `;
|
||||
* }
|
||||
*
|
||||
* @eventOptions({capture: true})
|
||||
* _onClick(e) {
|
||||
* this.clicked = true;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export function eventOptions(options) {
|
||||
return decorateProperty({
|
||||
finisher: (ctor, name) => {
|
||||
Object.assign(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
ctor.prototype[name], options);
|
||||
},
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=event-options.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/event-options.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/event-options.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"event-options.js","sourceRoot":"","sources":["../../src/decorators/event-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,YAAY,CAAC,OAAgC;IAC3D,OAAO,gBAAgB,CAAC;QACtB,QAAQ,EAAE,CAAC,IAA4B,EAAE,IAAiB,EAAE,EAAE;YAC5D,MAAM,CAAC,MAAM;YACX,8DAA8D;YAC9D,IAAI,CAAC,SAAS,CAAC,IAA6B,CAAQ,EACpD,OAAO,CACR,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n/**\n * Adds event listener options to a method used as an event listener in a\n * lit-html template.\n *\n * @param options An object that specifies event listener options as accepted by\n * `EventTarget#addEventListener` and `EventTarget#removeEventListener`.\n *\n * Current browsers support the `capture`, `passive`, and `once` options. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters\n *\n * ```ts\n * class MyElement {\n * clicked = false;\n *\n * render() {\n * return html`\n * <div @click=${this._onClick}>\n * <button></button>\n * </div>\n * `;\n * }\n *\n * @eventOptions({capture: true})\n * _onClick(e) {\n * this.clicked = true;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function eventOptions(options: AddEventListenerOptions) {\n return decorateProperty({\n finisher: (ctor: typeof ReactiveElement, name: PropertyKey) => {\n Object.assign(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ctor.prototype[name as keyof ReactiveElement] as any,\n options\n );\n },\n });\n}\n"]}
|
41
node_modules/@lit/reactive-element/development/decorators/property.d.ts
generated
vendored
Normal file
41
node_modules/@lit/reactive-element/development/decorators/property.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { PropertyDeclaration } from '../reactive-element.js';
|
||||
import { ClassElement } from './base.js';
|
||||
/**
|
||||
* A property decorator which creates a reactive property that reflects a
|
||||
* corresponding attribute value. When a decorated property is set
|
||||
* the element will update and render. A {@linkcode PropertyDeclaration} may
|
||||
* optionally be supplied to configure property features.
|
||||
*
|
||||
* This decorator should only be used for public fields. As public fields,
|
||||
* properties should be considered as primarily settable by element users,
|
||||
* either via attribute or the property itself.
|
||||
*
|
||||
* Generally, properties that are changed by the element should be private or
|
||||
* protected fields and should use the {@linkcode state} decorator.
|
||||
*
|
||||
* However, sometimes element code does need to set a public property. This
|
||||
* should typically only be done in response to user interaction, and an event
|
||||
* should be fired informing the user; for example, a checkbox sets its
|
||||
* `checked` property when clicked and fires a `changed` event. Mutating public
|
||||
* properties should typically not be done for non-primitive (object or array)
|
||||
* properties. In other cases when an element needs to manage state, a private
|
||||
* property decorated via the {@linkcode state} decorator should be used. When
|
||||
* needed, state properties can be initialized via public properties to
|
||||
* facilitate complex interactions.
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @property({ type: Boolean })
|
||||
* clicked = false;
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
* @ExportDecoratedItems
|
||||
*/
|
||||
export declare function property(options?: PropertyDeclaration): (protoOrDescriptor: Object | ClassElement, name?: PropertyKey) => any;
|
||||
//# sourceMappingURL=property.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/property.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/property.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../src/decorators/property.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAC,mBAAmB,EAAkB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AA4DvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,uBAEzB,MAAM,GAAG,YAAY,SAAS,WAAW,KAAG,GAAG,CAI3E"}
|
92
node_modules/@lit/reactive-element/development/decorators/property.js
generated
vendored
Normal file
92
node_modules/@lit/reactive-element/development/decorators/property.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
const standardProperty = (options, element) => {
|
||||
// When decorating an accessor, pass it through and add property metadata.
|
||||
// Note, the `hasOwnProperty` check in `createProperty` ensures we don't
|
||||
// stomp over the user's accessor.
|
||||
if (element.kind === 'method' &&
|
||||
element.descriptor &&
|
||||
!('value' in element.descriptor)) {
|
||||
return {
|
||||
...element,
|
||||
finisher(clazz) {
|
||||
clazz.createProperty(element.key, options);
|
||||
},
|
||||
};
|
||||
}
|
||||
else {
|
||||
// createProperty() takes care of defining the property, but we still
|
||||
// must return some kind of descriptor, so return a descriptor for an
|
||||
// unused prototype field. The finisher calls createProperty().
|
||||
return {
|
||||
kind: 'field',
|
||||
key: Symbol(),
|
||||
placement: 'own',
|
||||
descriptor: {},
|
||||
// store the original key so subsequent decorators have access to it.
|
||||
originalKey: element.key,
|
||||
// When @babel/plugin-proposal-decorators implements initializers,
|
||||
// do this instead of the initializer below. See:
|
||||
// https://github.com/babel/babel/issues/9260 extras: [
|
||||
// {
|
||||
// kind: 'initializer',
|
||||
// placement: 'own',
|
||||
// initializer: descriptor.initializer,
|
||||
// }
|
||||
// ],
|
||||
initializer() {
|
||||
if (typeof element.initializer === 'function') {
|
||||
this[element.key] = element.initializer.call(this);
|
||||
}
|
||||
},
|
||||
finisher(clazz) {
|
||||
clazz.createProperty(element.key, options);
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
const legacyProperty = (options, proto, name) => {
|
||||
proto.constructor.createProperty(name, options);
|
||||
};
|
||||
/**
|
||||
* A property decorator which creates a reactive property that reflects a
|
||||
* corresponding attribute value. When a decorated property is set
|
||||
* the element will update and render. A {@linkcode PropertyDeclaration} may
|
||||
* optionally be supplied to configure property features.
|
||||
*
|
||||
* This decorator should only be used for public fields. As public fields,
|
||||
* properties should be considered as primarily settable by element users,
|
||||
* either via attribute or the property itself.
|
||||
*
|
||||
* Generally, properties that are changed by the element should be private or
|
||||
* protected fields and should use the {@linkcode state} decorator.
|
||||
*
|
||||
* However, sometimes element code does need to set a public property. This
|
||||
* should typically only be done in response to user interaction, and an event
|
||||
* should be fired informing the user; for example, a checkbox sets its
|
||||
* `checked` property when clicked and fires a `changed` event. Mutating public
|
||||
* properties should typically not be done for non-primitive (object or array)
|
||||
* properties. In other cases when an element needs to manage state, a private
|
||||
* property decorated via the {@linkcode state} decorator should be used. When
|
||||
* needed, state properties can be initialized via public properties to
|
||||
* facilitate complex interactions.
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @property({ type: Boolean })
|
||||
* clicked = false;
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
* @ExportDecoratedItems
|
||||
*/
|
||||
export function property(options) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
return (protoOrDescriptor, name) => name !== undefined
|
||||
? legacyProperty(options, protoOrDescriptor, name)
|
||||
: standardProperty(options, protoOrDescriptor);
|
||||
}
|
||||
//# sourceMappingURL=property.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/property.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/property.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
32
node_modules/@lit/reactive-element/development/decorators/query-all.d.ts
generated
vendored
Normal file
32
node_modules/@lit/reactive-element/development/decorators/query-all.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter
|
||||
* that executes a querySelectorAll on the element's renderRoot.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
*
|
||||
* See:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAll('div')
|
||||
* divs: NodeListOf<HTMLDivElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAll(selector: string): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query-all.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-all.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-all.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-all.d.ts","sourceRoot":"","sources":["../../src/decorators/query-all.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,iJAUxC"}
|
43
node_modules/@lit/reactive-element/development/decorators/query-all.js
generated
vendored
Normal file
43
node_modules/@lit/reactive-element/development/decorators/query-all.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { decorateProperty } from './base.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter
|
||||
* that executes a querySelectorAll on the element's renderRoot.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
*
|
||||
* See:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAll('div')
|
||||
* divs: NodeListOf<HTMLDivElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export function queryAll(selector) {
|
||||
return decorateProperty({
|
||||
descriptor: (_name) => ({
|
||||
get() {
|
||||
var _a, _b;
|
||||
return (_b = (_a = this.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selector)) !== null && _b !== void 0 ? _b : [];
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
}),
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=query-all.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-all.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-all.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-all.js","sourceRoot":"","sources":["../../src/decorators/query-all.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,OAAO,gBAAgB,CAAC;QACtB,UAAU,EAAE,CAAC,KAAkB,EAAE,EAAE,CAAC,CAAC;YACnC,GAAG;;gBACD,OAAO,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,gBAAgB,CAAC,QAAQ,CAAC,mCAAI,EAAE,CAAC;YAC3D,CAAC;YACD,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACnB,CAAC;KACH,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n/**\n * A property decorator that converts a class property into a getter\n * that executes a querySelectorAll on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll\n *\n * ```ts\n * class MyElement {\n * @queryAll('div')\n * divs: NodeListOf<HTMLDivElement>;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function queryAll(selector: string) {\n return decorateProperty({\n descriptor: (_name: PropertyKey) => ({\n get(this: ReactiveElement) {\n return this.renderRoot?.querySelectorAll(selector) ?? [];\n },\n enumerable: true,\n configurable: true,\n }),\n });\n}\n"]}
|
50
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.d.ts
generated
vendored
Normal file
50
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import type { ReactiveElement } from '../reactive-element.js';
|
||||
import type { QueryAssignedNodesOptions } from './query-assigned-nodes.js';
|
||||
/**
|
||||
* Options for the {@linkcode queryAssignedElements} decorator. Extends the
|
||||
* options that can be passed into
|
||||
* [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).
|
||||
*/
|
||||
export interface QueryAssignedElementsOptions extends QueryAssignedNodesOptions {
|
||||
/**
|
||||
* CSS selector used to filter the elements returned. For example, a selector
|
||||
* of `".item"` will only include elements with the `item` class.
|
||||
*/
|
||||
selector?: string;
|
||||
}
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns the `assignedElements` of the given `slot`. Provides a declarative
|
||||
* way to use
|
||||
* [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).
|
||||
*
|
||||
* Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAssignedElements({ slot: 'list' })
|
||||
* listItems!: Array<HTMLElement>;
|
||||
* @queryAssignedElements()
|
||||
* unnamedSlotEls!: Array<HTMLElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <slot name="list"></slot>
|
||||
* <slot></slot>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Note, the type of this property should be annotated as `Array<HTMLElement>`.
|
||||
*
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAssignedElements(options?: QueryAssignedElementsOptions): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query-assigned-elements.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-assigned-elements.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-elements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AAmBzE;;;;GAIG;AACH,MAAM,WAAW,4BACf,SAAQ,yBAAyB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,4BAA4B,iJAmB3E"}
|
72
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.js
generated
vendored
Normal file
72
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2021 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
var _a;
|
||||
/*
|
||||
* IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
|
||||
* property decorators (but not class decorators) in this file that have
|
||||
* an @ExportDecoratedItems annotation must be defined as a regular function,
|
||||
* not an arrow function.
|
||||
*/
|
||||
import { decorateProperty } from './base.js';
|
||||
const NODE_MODE = false;
|
||||
const global = NODE_MODE ? globalThis : window;
|
||||
/**
|
||||
* A tiny module scoped polyfill for HTMLSlotElement.assignedElements.
|
||||
*/
|
||||
const slotAssignedElements = ((_a = global.HTMLSlotElement) === null || _a === void 0 ? void 0 : _a.prototype.assignedElements) != null
|
||||
? (slot, opts) => slot.assignedElements(opts)
|
||||
: (slot, opts) => slot
|
||||
.assignedNodes(opts)
|
||||
.filter((node) => node.nodeType === Node.ELEMENT_NODE);
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns the `assignedElements` of the given `slot`. Provides a declarative
|
||||
* way to use
|
||||
* [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).
|
||||
*
|
||||
* Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAssignedElements({ slot: 'list' })
|
||||
* listItems!: Array<HTMLElement>;
|
||||
* @queryAssignedElements()
|
||||
* unnamedSlotEls!: Array<HTMLElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <slot name="list"></slot>
|
||||
* <slot></slot>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Note, the type of this property should be annotated as `Array<HTMLElement>`.
|
||||
*
|
||||
* @category Decorator
|
||||
*/
|
||||
export function queryAssignedElements(options) {
|
||||
const { slot, selector } = options !== null && options !== void 0 ? options : {};
|
||||
return decorateProperty({
|
||||
descriptor: (_name) => ({
|
||||
get() {
|
||||
var _a;
|
||||
const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;
|
||||
const slotEl = (_a = this.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelector(slotSelector);
|
||||
const elements = slotEl != null ? slotAssignedElements(slotEl, options) : [];
|
||||
if (selector) {
|
||||
return elements.filter((node) => node.matches(selector));
|
||||
}
|
||||
return elements;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
}),
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=query-assigned-elements.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-elements.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-assigned-elements.js","sourceRoot":"","sources":["../../src/decorators/query-assigned-elements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH;;;;;GAKG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAK3C,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;AAE/C;;GAEG;AACH,MAAM,oBAAoB,GACxB,CAAA,MAAA,MAAM,CAAC,eAAe,0CAAE,SAAS,CAAC,gBAAgB,KAAI,IAAI;IACxD,CAAC,CAAC,CAAC,IAAqB,EAAE,IAA2B,EAAE,EAAE,CACrD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IAC/B,CAAC,CAAC,CAAC,IAAqB,EAAE,IAA2B,EAAE,EAAE,CACrD,IAAI;SACD,aAAa,CAAC,IAAI,CAAC;SACnB,MAAM,CACL,CAAC,IAAI,EAAmB,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY,CAC/D,CAAC;AAgBZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAsC;IAC1E,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAC,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAC;IACvC,OAAO,gBAAgB,CAAC;QACtB,UAAU,EAAE,CAAC,KAAkB,EAAE,EAAE,CAAC,CAAC;YACnC,GAAG;;gBACD,MAAM,YAAY,GAAG,OAAO,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;gBACvE,MAAM,MAAM,GACV,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAkB,YAAY,CAAC,CAAC;gBAChE,MAAM,QAAQ,GACZ,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC9D,IAAI,QAAQ,EAAE;oBACZ,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;iBAC1D;gBACD,OAAO,QAAQ,CAAC;YAClB,CAAC;YACD,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACnB,CAAC;KACH,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {decorateProperty} from './base.js';\n\nimport type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\n\nconst NODE_MODE = false;\nconst global = NODE_MODE ? globalThis : window;\n\n/**\n * A tiny module scoped polyfill for HTMLSlotElement.assignedElements.\n */\nconst slotAssignedElements =\n global.HTMLSlotElement?.prototype.assignedElements != null\n ? (slot: HTMLSlotElement, opts?: AssignedNodesOptions) =>\n slot.assignedElements(opts)\n : (slot: HTMLSlotElement, opts?: AssignedNodesOptions) =>\n slot\n .assignedNodes(opts)\n .filter(\n (node): node is Element => node.nodeType === Node.ELEMENT_NODE\n );\n\n/**\n * Options for the {@linkcode queryAssignedElements} decorator. Extends the\n * options that can be passed into\n * [HTMLSlotElement.assignedElements](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n */\nexport interface QueryAssignedElementsOptions\n extends QueryAssignedNodesOptions {\n /**\n * CSS selector used to filter the elements returned. For example, a selector\n * of `\".item\"` will only include elements with the `item` class.\n */\n selector?: string;\n}\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedElements` of the given `slot`. Provides a declarative\n * way to use\n * [`HTMLSlotElement.assignedElements`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements).\n *\n * Can be passed an optional {@linkcode QueryAssignedElementsOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedElements({ slot: 'list' })\n * listItems!: Array<HTMLElement>;\n * @queryAssignedElements()\n * unnamedSlotEls!: Array<HTMLElement>;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * <slot></slot>\n * `;\n * }\n * }\n * ```\n *\n * Note, the type of this property should be annotated as `Array<HTMLElement>`.\n *\n * @category Decorator\n */\nexport function queryAssignedElements(options?: QueryAssignedElementsOptions) {\n const {slot, selector} = options ?? {};\n return decorateProperty({\n descriptor: (_name: PropertyKey) => ({\n get(this: ReactiveElement) {\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n const slotEl =\n this.renderRoot?.querySelector<HTMLSlotElement>(slotSelector);\n const elements =\n slotEl != null ? slotAssignedElements(slotEl, options) : [];\n if (selector) {\n return elements.filter((node) => node.matches(selector));\n }\n return elements;\n },\n enumerable: true,\n configurable: true,\n }),\n });\n}\n"]}
|
80
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.d.ts
generated
vendored
Normal file
80
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.d.ts
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/**
|
||||
* Options for the {@linkcode queryAssignedNodes} decorator. Extends the options
|
||||
* that can be passed into [HTMLSlotElement.assignedNodes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes).
|
||||
*/
|
||||
export interface QueryAssignedNodesOptions extends AssignedNodesOptions {
|
||||
/**
|
||||
* Name of the slot to query. Leave empty for the default slot.
|
||||
*/
|
||||
slot?: string;
|
||||
}
|
||||
declare type TSDecoratorReturnType = void | any;
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns the `assignedNodes` of the given `slot`.
|
||||
*
|
||||
* Can be passed an optional {@linkcode QueryAssignedNodesOptions} object.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAssignedNodes({slot: 'list', flatten: true})
|
||||
* listItems!: Array<Node>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <slot name="list"></slot>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Note the type of this property should be annotated as `Array<Node>`.
|
||||
*
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAssignedNodes(options?: QueryAssignedNodesOptions): TSDecoratorReturnType;
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns the `assignedNodes` of the given named `slot`.
|
||||
*
|
||||
* Example usage:
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAssignedNodes('list', true, '.item')
|
||||
* listItems!: Array<HTMLElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <slot name="list"></slot>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Note the type of this property should be annotated as `Array<Node>` if used
|
||||
* without a `selector` or `Array<HTMLElement>` if a selector is provided.
|
||||
* Use {@linkcode queryAssignedElements @queryAssignedElements} to list only
|
||||
* elements, and optionally filter the element list using a CSS selector.
|
||||
*
|
||||
* @param slotName A string name of the slot.
|
||||
* @param flatten A boolean which when true flattens the assigned nodes,
|
||||
* meaning any assigned nodes that are slot elements are replaced with their
|
||||
* assigned nodes.
|
||||
* @param selector A CSS selector used to filter the elements returned.
|
||||
*
|
||||
* @category Decorator
|
||||
* @deprecated Prefer passing in a single options object, i.e. `{slot: 'list'}`.
|
||||
* If using `selector` please use `@queryAssignedElements`.
|
||||
* `@queryAssignedNodes('', false, '.item')` is functionally identical to
|
||||
* `@queryAssignedElements({slot: '', flatten: false, selector: '.item'})` or
|
||||
* `@queryAssignedElements({selector: '.item'})`.
|
||||
*/
|
||||
export declare function queryAssignedNodes(slotName?: string, flatten?: boolean, selector?: string): TSDecoratorReturnType;
|
||||
export {};
|
||||
//# sourceMappingURL=query-assigned-nodes.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-assigned-nodes.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-nodes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID,aAAK,qBAAqB,GAAG,IAAI,GAAG,GAAG,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,CAAC,EAAE,yBAAyB,GAClC,qBAAqB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,OAAO,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,qBAAqB,CAAC"}
|
47
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.js
generated
vendored
Normal file
47
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/*
|
||||
* IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
|
||||
* property decorators (but not class decorators) in this file that have
|
||||
* an @ExportDecoratedItems annotation must be defined as a regular function,
|
||||
* not an arrow function.
|
||||
*/
|
||||
import { decorateProperty } from './base.js';
|
||||
import { queryAssignedElements } from './query-assigned-elements.js';
|
||||
export function queryAssignedNodes(slotOrOptions, flatten, selector) {
|
||||
// Normalize the overloaded arguments.
|
||||
let slot = slotOrOptions;
|
||||
let assignedNodesOptions;
|
||||
if (typeof slotOrOptions === 'object') {
|
||||
slot = slotOrOptions.slot;
|
||||
assignedNodesOptions = slotOrOptions;
|
||||
}
|
||||
else {
|
||||
assignedNodesOptions = { flatten };
|
||||
}
|
||||
// For backwards compatibility, queryAssignedNodes with a selector behaves
|
||||
// exactly like queryAssignedElements with a selector.
|
||||
if (selector) {
|
||||
return queryAssignedElements({
|
||||
slot: slot,
|
||||
flatten,
|
||||
selector,
|
||||
});
|
||||
}
|
||||
return decorateProperty({
|
||||
descriptor: (_name) => ({
|
||||
get() {
|
||||
var _a, _b;
|
||||
const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;
|
||||
const slotEl = (_a = this.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelector(slotSelector);
|
||||
return (_b = slotEl === null || slotEl === void 0 ? void 0 : slotEl.assignedNodes(assignedNodesOptions)) !== null && _b !== void 0 ? _b : [];
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
}),
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=query-assigned-nodes.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-assigned-nodes.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
40
node_modules/@lit/reactive-element/development/decorators/query-async.d.ts
generated
vendored
Normal file
40
node_modules/@lit/reactive-element/development/decorators/query-async.d.ts
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns a promise that resolves to the result of a querySelector on the
|
||||
* element's renderRoot done after the element's `updateComplete` promise
|
||||
* resolves. When the queried property may change with element state, this
|
||||
* decorator can be used instead of requiring users to await the
|
||||
* `updateComplete` before accessing the property.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
*
|
||||
* See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAsync('#first')
|
||||
* first: Promise<HTMLDivElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // external usage
|
||||
* async doSomethingWithFirst() {
|
||||
* (await aMyElement.first).doSomething();
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function queryAsync(selector: string): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query-async.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-async.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-async.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-async.d.ts","sourceRoot":"","sources":["../../src/decorators/query-async.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAQvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,iJAW1C"}
|
57
node_modules/@lit/reactive-element/development/decorators/query-async.js
generated
vendored
Normal file
57
node_modules/@lit/reactive-element/development/decorators/query-async.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { decorateProperty } from './base.js';
|
||||
// Note, in the future, we may extend this decorator to support the use case
|
||||
// where the queried element may need to do work to become ready to interact
|
||||
// with (e.g. load some implementation code). If so, we might elect to
|
||||
// add a second argument defining a function that can be run to make the
|
||||
// queried element loaded/updated/ready.
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* returns a promise that resolves to the result of a querySelector on the
|
||||
* element's renderRoot done after the element's `updateComplete` promise
|
||||
* resolves. When the queried property may change with element state, this
|
||||
* decorator can be used instead of requiring users to await the
|
||||
* `updateComplete` before accessing the property.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
*
|
||||
* See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @queryAsync('#first')
|
||||
* first: Promise<HTMLDivElement>;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // external usage
|
||||
* async doSomethingWithFirst() {
|
||||
* (await aMyElement.first).doSomething();
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export function queryAsync(selector) {
|
||||
return decorateProperty({
|
||||
descriptor: (_name) => ({
|
||||
async get() {
|
||||
var _a;
|
||||
await this.updateComplete;
|
||||
return (_a = this.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelector(selector);
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
}),
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=query-async.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/query-async.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query-async.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query-async.js","sourceRoot":"","sources":["../../src/decorators/query-async.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAE3C,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,wEAAwE;AACxE,wCAAwC;AACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,gBAAgB,CAAC;QACtB,UAAU,EAAE,CAAC,KAAkB,EAAE,EAAE,CAAC,CAAC;YACnC,KAAK,CAAC,GAAG;;gBACP,MAAM,IAAI,CAAC,cAAc,CAAC;gBAC1B,OAAO,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;YAClD,CAAC;YACD,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACnB,CAAC;KACH,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n// Note, in the future, we may extend this decorator to support the use case\n// where the queried element may need to do work to become ready to interact\n// with (e.g. load some implementation code). If so, we might elect to\n// add a second argument defining a function that can be run to make the\n// queried element loaded/updated/ready.\n/**\n * A property decorator that converts a class property into a getter that\n * returns a promise that resolves to the result of a querySelector on the\n * element's renderRoot done after the element's `updateComplete` promise\n * resolves. When the queried property may change with element state, this\n * decorator can be used instead of requiring users to await the\n * `updateComplete` before accessing the property.\n *\n * @param selector A DOMString containing one or more selectors to match.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @queryAsync('#first')\n * first: Promise<HTMLDivElement>;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n *\n * // external usage\n * async doSomethingWithFirst() {\n * (await aMyElement.first).doSomething();\n * }\n * ```\n * @category Decorator\n */\nexport function queryAsync(selector: string) {\n return decorateProperty({\n descriptor: (_name: PropertyKey) => ({\n async get(this: ReactiveElement) {\n await this.updateComplete;\n return this.renderRoot?.querySelector(selector);\n },\n enumerable: true,\n configurable: true,\n }),\n });\n}\n"]}
|
33
node_modules/@lit/reactive-element/development/decorators/query.d.ts
generated
vendored
Normal file
33
node_modules/@lit/reactive-element/development/decorators/query.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { ReactiveElement } from '../reactive-element.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* executes a querySelector on the element's renderRoot.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
* @param cache An optional boolean which when true performs the DOM query only
|
||||
* once and caches the result.
|
||||
*
|
||||
* See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @query('#first')
|
||||
* first: HTMLDivElement;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function query(selector: string, cache?: boolean): (protoOrDescriptor: import("./base.js").ClassElement | import("./base.js").Interface<ReactiveElement>, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=query.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/query.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/decorators/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAGvD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,iJA8BtD"}
|
57
node_modules/@lit/reactive-element/development/decorators/query.js
generated
vendored
Normal file
57
node_modules/@lit/reactive-element/development/decorators/query.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
import { decorateProperty } from './base.js';
|
||||
/**
|
||||
* A property decorator that converts a class property into a getter that
|
||||
* executes a querySelector on the element's renderRoot.
|
||||
*
|
||||
* @param selector A DOMString containing one or more selectors to match.
|
||||
* @param cache An optional boolean which when true performs the DOM query only
|
||||
* once and caches the result.
|
||||
*
|
||||
* See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
|
||||
*
|
||||
* ```ts
|
||||
* class MyElement {
|
||||
* @query('#first')
|
||||
* first: HTMLDivElement;
|
||||
*
|
||||
* render() {
|
||||
* return html`
|
||||
* <div id="first"></div>
|
||||
* <div id="second"></div>
|
||||
* `;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @category Decorator
|
||||
*/
|
||||
export function query(selector, cache) {
|
||||
return decorateProperty({
|
||||
descriptor: (name) => {
|
||||
const descriptor = {
|
||||
get() {
|
||||
var _a, _b;
|
||||
return (_b = (_a = this.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelector(selector)) !== null && _b !== void 0 ? _b : null;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
};
|
||||
if (cache) {
|
||||
const key = typeof name === 'symbol' ? Symbol() : `__${name}`;
|
||||
descriptor.get = function () {
|
||||
var _a, _b;
|
||||
if (this[key] === undefined) {
|
||||
this[key] = (_b = (_a = this.renderRoot) === null || _a === void 0 ? void 0 : _a.querySelector(selector)) !== null && _b !== void 0 ? _b : null;
|
||||
}
|
||||
return this[key];
|
||||
};
|
||||
}
|
||||
return descriptor;
|
||||
},
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=query.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/query.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/query.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../src/decorators/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,KAAK,CAAC,QAAgB,EAAE,KAAe;IACrD,OAAO,gBAAgB,CAAC;QACtB,UAAU,EAAE,CAAC,IAAiB,EAAE,EAAE;YAChC,MAAM,UAAU,GAAG;gBACjB,GAAG;;oBACD,OAAO,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAC,QAAQ,CAAC,mCAAI,IAAI,CAAC;gBAC1D,CAAC;gBACD,UAAU,EAAE,IAAI;gBAChB,YAAY,EAAE,IAAI;aACnB,CAAC;YACF,IAAI,KAAK,EAAE;gBACT,MAAM,GAAG,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC9D,UAAU,CAAC,GAAG,GAAG;;oBACf,IACG,IAAmD,CAClD,GAAa,CACd,KAAK,SAAS,EACf;wBACC,IAAmD,CAClD,GAAa,CACd,GAAG,MAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,CAAC,QAAQ,CAAC,mCAAI,IAAI,CAAC;qBACtD;oBACD,OAAQ,IAAmD,CACzD,GAAa,CACd,CAAC;gBACJ,CAAC,CAAC;aACH;YACD,OAAO,UAAU,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {ReactiveElement} from '../reactive-element.js';\nimport {decorateProperty} from './base.js';\n\n/**\n * A property decorator that converts a class property into a getter that\n * executes a querySelector on the element's renderRoot.\n *\n * @param selector A DOMString containing one or more selectors to match.\n * @param cache An optional boolean which when true performs the DOM query only\n * once and caches the result.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector\n *\n * ```ts\n * class MyElement {\n * @query('#first')\n * first: HTMLDivElement;\n *\n * render() {\n * return html`\n * <div id=\"first\"></div>\n * <div id=\"second\"></div>\n * `;\n * }\n * }\n * ```\n * @category Decorator\n */\nexport function query(selector: string, cache?: boolean) {\n return decorateProperty({\n descriptor: (name: PropertyKey) => {\n const descriptor = {\n get(this: ReactiveElement) {\n return this.renderRoot?.querySelector(selector) ?? null;\n },\n enumerable: true,\n configurable: true,\n };\n if (cache) {\n const key = typeof name === 'symbol' ? Symbol() : `__${name}`;\n descriptor.get = function (this: ReactiveElement) {\n if (\n (this as unknown as {[key: string]: Element | null})[\n key as string\n ] === undefined\n ) {\n (this as unknown as {[key: string]: Element | null})[\n key as string\n ] = this.renderRoot?.querySelector(selector) ?? null;\n }\n return (this as unknown as {[key: string]: Element | null})[\n key as string\n ];\n };\n }\n return descriptor;\n },\n });\n}\n"]}
|
25
node_modules/@lit/reactive-element/development/decorators/state.d.ts
generated
vendored
Normal file
25
node_modules/@lit/reactive-element/development/decorators/state.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
export interface InternalPropertyDeclaration<Type = unknown> {
|
||||
/**
|
||||
* A function that indicates if a property should be considered changed when
|
||||
* it is set. The function should take the `newValue` and `oldValue` and
|
||||
* return `true` if an update should be requested.
|
||||
*/
|
||||
hasChanged?(value: Type, oldValue: Type): boolean;
|
||||
}
|
||||
/**
|
||||
* Declares a private or protected reactive property that still triggers
|
||||
* updates to the element when it changes. It does not reflect from the
|
||||
* corresponding attribute.
|
||||
*
|
||||
* Properties declared this way must not be used from HTML or HTML templating
|
||||
* systems, they're solely for properties internal to the element. These
|
||||
* properties may be renamed by optimization tools like closure compiler.
|
||||
* @category Decorator
|
||||
*/
|
||||
export declare function state(options?: InternalPropertyDeclaration): (protoOrDescriptor: Object | import("./base.js").ClassElement, name?: PropertyKey | undefined) => any;
|
||||
//# sourceMappingURL=state.d.ts.map
|
1
node_modules/@lit/reactive-element/development/decorators/state.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/state.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/decorators/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,WAAW,2BAA2B,CAAC,IAAI,GAAG,OAAO;IACzD;;;;OAIG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC;CACnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,2BAA2B,yGAK1D"}
|
29
node_modules/@lit/reactive-element/development/decorators/state.js
generated
vendored
Normal file
29
node_modules/@lit/reactive-element/development/decorators/state.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/*
|
||||
* IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all
|
||||
* property decorators (but not class decorators) in this file that have
|
||||
* an @ExportDecoratedItems annotation must be defined as a regular function,
|
||||
* not an arrow function.
|
||||
*/
|
||||
import { property } from './property.js';
|
||||
/**
|
||||
* Declares a private or protected reactive property that still triggers
|
||||
* updates to the element when it changes. It does not reflect from the
|
||||
* corresponding attribute.
|
||||
*
|
||||
* Properties declared this way must not be used from HTML or HTML templating
|
||||
* systems, they're solely for properties internal to the element. These
|
||||
* properties may be renamed by optimization tools like closure compiler.
|
||||
* @category Decorator
|
||||
*/
|
||||
export function state(options) {
|
||||
return property({
|
||||
...options,
|
||||
state: true,
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=state.js.map
|
1
node_modules/@lit/reactive-element/development/decorators/state.js.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/decorators/state.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/decorators/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAWvC;;;;;;;;;GASG;AACH,MAAM,UAAU,KAAK,CAAC,OAAqC;IACzD,OAAO,QAAQ,CAAC;QACd,GAAG,OAAO;QACV,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\n\nimport {property} from './property.js';\n\nexport interface InternalPropertyDeclaration<Type = unknown> {\n /**\n * A function that indicates if a property should be considered changed when\n * it is set. The function should take the `newValue` and `oldValue` and\n * return `true` if an update should be requested.\n */\n hasChanged?(value: Type, oldValue: Type): boolean;\n}\n\n/**\n * Declares a private or protected reactive property that still triggers\n * updates to the element when it changes. It does not reflect from the\n * corresponding attribute.\n *\n * Properties declared this way must not be used from HTML or HTML templating\n * systems, they're solely for properties internal to the element. These\n * properties may be renamed by optimization tools like closure compiler.\n * @category Decorator\n */\nexport function state(options?: InternalPropertyDeclaration) {\n return property({\n ...options,\n state: true,\n });\n}\n"]}
|
18
node_modules/@lit/reactive-element/development/polyfill-support.d.ts
generated
vendored
Normal file
18
node_modules/@lit/reactive-element/development/polyfill-support.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
/**
|
||||
* ReactiveElement patch to support browsers without native web components.
|
||||
*
|
||||
* This module should be used in addition to loading the web components
|
||||
* polyfills via @webcomponents/webcomponentjs. When using those polyfills
|
||||
* support for polyfilled Shadow DOM is automatic via the ShadyDOM polyfill, but
|
||||
* support for Shadow DOM like css scoping is opt-in. This module uses ShadyCSS
|
||||
* to scope styles defined via the `static styles` property.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export {};
|
||||
//# sourceMappingURL=polyfill-support.d.ts.map
|
1
node_modules/@lit/reactive-element/development/polyfill-support.d.ts.map
generated
vendored
Normal file
1
node_modules/@lit/reactive-element/development/polyfill-support.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"polyfill-support.d.ts","sourceRoot":"","sources":["../src/polyfill-support.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC"}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user