fix: remove node_modules and bin/ from tracking, update .gitignore
node_modules/ (1,135 files, 468k lines) and bin/core-agent were
accidentally committed in bb88604. Removed from tracking and added
to .gitignore.
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
3522a3bea5
commit
749647c895
1137 changed files with 3 additions and 467898 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -2,3 +2,6 @@
|
||||||
.vscode/
|
.vscode/
|
||||||
*.log
|
*.log
|
||||||
.core/
|
.core/
|
||||||
|
node_modules/
|
||||||
|
bin/
|
||||||
|
dist/
|
||||||
|
|
|
||||||
BIN
bin/core-agent
BIN
bin/core-agent
Binary file not shown.
1
ui/node_modules/.bin/tsc
generated
vendored
1
ui/node_modules/.bin/tsc
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
../typescript/bin/tsc
|
|
||||||
1
ui/node_modules/.bin/tsserver
generated
vendored
1
ui/node_modules/.bin/tsserver
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
../typescript/bin/tsserver
|
|
||||||
74
ui/node_modules/.package-lock.json
generated
vendored
74
ui/node_modules/.package-lock.json
generated
vendored
|
|
@ -1,74 +0,0 @@
|
||||||
{
|
|
||||||
"name": "core-agent-panel",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"node_modules/@lit-labs/ssr-dom-shim": {
|
|
||||||
"version": "1.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.5.1.tgz",
|
|
||||||
"integrity": "sha512-Aou5UdlSpr5whQe8AA/bZG0jMj96CoJIWbGfZ91qieWu5AWUMKw8VR/pAkQkJYvBNhmCcWnZlyyk5oze8JIqYA==",
|
|
||||||
"license": "BSD-3-Clause"
|
|
||||||
},
|
|
||||||
"node_modules/@lit/reactive-element": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A==",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"dependencies": {
|
|
||||||
"@lit-labs/ssr-dom-shim": "^1.5.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/trusted-types": {
|
|
||||||
"version": "2.0.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
|
|
||||||
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/lit": {
|
|
||||||
"version": "3.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/lit/-/lit-3.3.2.tgz",
|
|
||||||
"integrity": "sha512-NF9zbsP79l4ao2SNrH3NkfmFgN/hBYSQo90saIVI1o5GpjAdCPVstVzO1MrLOakHoEhYkrtRjPK6Ob521aoYWQ==",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"dependencies": {
|
|
||||||
"@lit/reactive-element": "^2.1.0",
|
|
||||||
"lit-element": "^4.2.0",
|
|
||||||
"lit-html": "^3.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/lit-element": {
|
|
||||||
"version": "4.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.2.2.tgz",
|
|
||||||
"integrity": "sha512-aFKhNToWxoyhkNDmWZwEva2SlQia+jfG0fjIWV//YeTaWrVnOxD89dPKfigCUspXFmjzOEUQpOkejH5Ly6sG0w==",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"dependencies": {
|
|
||||||
"@lit-labs/ssr-dom-shim": "^1.5.0",
|
|
||||||
"@lit/reactive-element": "^2.1.0",
|
|
||||||
"lit-html": "^3.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/lit-html": {
|
|
||||||
"version": "3.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.2.tgz",
|
|
||||||
"integrity": "sha512-Qy9hU88zcmaxBXcc10ZpdK7cOLXvXpRoBxERdtqV9QOrfpMZZ6pSYP91LhpPtap3sFMUiL7Tw2RImbe0Al2/kw==",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/trusted-types": "^2.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/typescript": {
|
|
||||||
"version": "5.9.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
|
||||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"bin": {
|
|
||||||
"tsc": "bin/tsc",
|
|
||||||
"tsserver": "bin/tsserver"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.17"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
96
ui/node_modules/@lit-labs/ssr-dom-shim/README.md
generated
vendored
96
ui/node_modules/@lit-labs/ssr-dom-shim/README.md
generated
vendored
|
|
@ -1,96 +0,0 @@
|
||||||
# @lit-labs/ssr-dom-shim
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This package provides minimal implementations of `Element`, `HTMLElement`,
|
|
||||||
`EventTarget`, `Event`, `CustomEvent`, `CustomElementRegistry`, and
|
|
||||||
`customElements`, designed to be used when Server Side Rendering (SSR) web
|
|
||||||
components from Node, including Lit components.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
### Usage from Lit
|
|
||||||
|
|
||||||
Lit itself automatically imports these shims when running in Node, so Lit users
|
|
||||||
should typically not need to directly depend on or import from this package.
|
|
||||||
|
|
||||||
See the [lit.dev SSR docs](https://lit.dev/docs/ssr/overview/) for general
|
|
||||||
information about server-side rendering with Lit.
|
|
||||||
|
|
||||||
### Usage in other contexts
|
|
||||||
|
|
||||||
Other libraries or frameworks who wish to support SSR are welcome to also depend
|
|
||||||
on these shims. (This package is planned to eventually move to
|
|
||||||
`@webcomponents/ssr-dom-shim` to better reflect this use case). There are two
|
|
||||||
main patterns for providing access to these shims to users:
|
|
||||||
|
|
||||||
1. Assigning shims to `globalThis`, ensuring that assignment occurs before
|
|
||||||
user-code runs.
|
|
||||||
|
|
||||||
2. Importing shims directly from the module that provides your base class, using
|
|
||||||
the `node` [export
|
|
||||||
condition](https://nodejs.org/api/packages.html#conditional-exports) to
|
|
||||||
ensure this only happens when running in Node, and not in the browser.
|
|
||||||
|
|
||||||
Lit takes approach #2 for all of the shims except for `customElements`, `Event`
|
|
||||||
and `CustomEvent`, so that users who have imported `lit` are able to call
|
|
||||||
`customElements.define` or `new Event(...)`/`new CustomEvent(...)` in their
|
|
||||||
components from Node.
|
|
||||||
|
|
||||||
### Exports
|
|
||||||
|
|
||||||
The main module exports the following values. Note that no globals are set by
|
|
||||||
this module.
|
|
||||||
|
|
||||||
- [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)
|
|
||||||
- [`addEventListener`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
|
||||||
- [`dispatchEvent`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent)
|
|
||||||
- [`removeEventListener`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
|
||||||
- [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element)
|
|
||||||
- (Inherits from EventTarget)
|
|
||||||
- [`attachShadow`](https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow)
|
|
||||||
- [`shadowRoot`](https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot)
|
|
||||||
- [`attributes`](https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes)
|
|
||||||
- [`hasAttribute`](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttribute)
|
|
||||||
- [`getAttribute`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute)
|
|
||||||
- [`setAttribute`](https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute)
|
|
||||||
- [`removeAttribute`](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute)
|
|
||||||
- [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement)
|
|
||||||
- (Inherits from Element)
|
|
||||||
- [`CustomElementRegistry`](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry)
|
|
||||||
- [`customElements`](https://developer.mozilla.org/en-US/docs/Web/API/Window/customElements)
|
|
||||||
- [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event)
|
|
||||||
- [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent)
|
|
||||||
- [`MediaList`](https://developer.mozilla.org/en-US/docs/Web/API/MediaList)
|
|
||||||
- [`StyleSheet`](https://developer.mozilla.org/en-US/docs/Web/API/StyleSheet)
|
|
||||||
- [`CSSRule`](https://developer.mozilla.org/en-US/docs/Web/API/CSSRule)
|
|
||||||
- [`CSSRuleList`](https://developer.mozilla.org/en-US/docs/Web/API/CSSRuleList)
|
|
||||||
- [`CSSStyleSheet`](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet)
|
|
||||||
- (Inherits from StyleSheet)
|
|
||||||
- [`replace`](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/replace)
|
|
||||||
- [`replaceSync`](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/replaceSync)
|
|
||||||
|
|
||||||
### CSS Node.js customization hook
|
|
||||||
|
|
||||||
`@lit-labs/ssr-dom-shim/register-css-hook.js` implements/registers a
|
|
||||||
[Node.js customization hook](https://nodejs.org/api/module.html#customization-hooks)
|
|
||||||
(Node.js >= 18.6.0) to import CSS files/modules as instances of `CSSStyleSheet`.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
import styles from 'my-styles.css' with {type: 'css'};
|
|
||||||
// styles is now an instance of CSSStyleSheet
|
|
||||||
```
|
|
||||||
|
|
||||||
This can either be used as a parameter with the Node.js CLI
|
|
||||||
(e.g. `node --import @lit-labs/ssr-dom-shim/register-css-hook.js my-script.js` or via
|
|
||||||
environment variable `NODE_OPTIONS="--import @lit-labs/ssr-dom-shim/register-css-hook.js"`)
|
|
||||||
or imported inline, and it will apply to any module dynamically imported afterwards
|
|
||||||
(e.g. `import @lit-labs/ssr-dom-shim/register-css-hook.js` and
|
|
||||||
subsequently `await import('./my-component.js')`).
|
|
||||||
|
|
||||||
- [Node.js Customization Hooks](https://nodejs.org/api/module.html#customization-hooks)
|
|
||||||
- [Import Attributes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with)
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Please see [CONTRIBUTING.md](../../../CONTRIBUTING.md).
|
|
||||||
14
ui/node_modules/@lit-labs/ssr-dom-shim/index.d.ts
generated
vendored
14
ui/node_modules/@lit-labs/ssr-dom-shim/index.d.ts
generated
vendored
|
|
@ -1,14 +0,0 @@
|
||||||
import { EventTargetShimMeta } from './lib/events.js';
|
|
||||||
export { ariaMixinAttributes, ElementInternals, HYDRATE_INTERNALS_ATTR_PREFIX, } from './lib/element-internals.js';
|
|
||||||
export { CSSRule, CSSRuleList, CSSStyleSheet, MediaList, StyleSheet, } from './lib/css.js';
|
|
||||||
export { CustomEvent, Event, EventTarget } from './lib/events.js';
|
|
||||||
export type HTMLElementWithEventMeta = HTMLElement & EventTargetShimMeta;
|
|
||||||
declare const ElementShimWithRealType: typeof Element;
|
|
||||||
export { ElementShimWithRealType as Element };
|
|
||||||
declare const HTMLElementShimWithRealType: typeof HTMLElement;
|
|
||||||
export { HTMLElementShimWithRealType as HTMLElement };
|
|
||||||
type RealCustomElementRegistryClass = (typeof globalThis)['CustomElementRegistry'];
|
|
||||||
declare const CustomElementRegistryShimWithRealType: RealCustomElementRegistryClass;
|
|
||||||
export { CustomElementRegistryShimWithRealType as CustomElementRegistry };
|
|
||||||
export declare const customElements: globalThis.CustomElementRegistry;
|
|
||||||
//# sourceMappingURL=index.d.ts.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/index.d.ts.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/index.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAIL,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,SAAS,EACT,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,WAAW,EAAE,KAAK,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAShE,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG,mBAAmB,CAAC;AA2GzE,QAAA,MAAM,uBAAuB,EAA4B,OAAO,OAAO,CAAC;AACxE,OAAO,EAAC,uBAAuB,IAAI,OAAO,EAAC,CAAC;AAG5C,QAAA,MAAM,2BAA2B,EACF,OAAO,WAAW,CAAC;AAClD,OAAO,EAAC,2BAA2B,IAAI,WAAW,EAAC,CAAC;AAmCpD,KAAK,8BAA8B,GACjC,CAAC,OAAO,UAAU,CAAC,CAAC,uBAAuB,CAAC,CAAC;AAwG/C,QAAA,MAAM,qCAAqC,EACN,8BAA8B,CAAC;AACpE,OAAO,EAAC,qCAAqC,IAAI,qBAAqB,EAAC,CAAC;AAExE,eAAO,MAAM,cAAc,kCAA8C,CAAC"}
|
|
||||||
216
ui/node_modules/@lit-labs/ssr-dom-shim/index.js
generated
vendored
216
ui/node_modules/@lit-labs/ssr-dom-shim/index.js
generated
vendored
|
|
@ -1,216 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import { ElementInternalsShim } from './lib/element-internals.js';
|
|
||||||
import { EventTargetShim, EventShim, CustomEventShim, } from './lib/events.js';
|
|
||||||
export { ariaMixinAttributes, ElementInternals, HYDRATE_INTERNALS_ATTR_PREFIX, } from './lib/element-internals.js';
|
|
||||||
export { CSSRule, CSSRuleList, CSSStyleSheet, MediaList, StyleSheet, } from './lib/css.js';
|
|
||||||
export { CustomEvent, Event, EventTarget } from './lib/events.js';
|
|
||||||
// In an empty Node.js vm, we need to patch the global context.
|
|
||||||
// TODO: Remove these globalThis assignments when we remove support
|
|
||||||
// for vm modules (--experimental-vm-modules).
|
|
||||||
globalThis.Event ??= EventShim;
|
|
||||||
globalThis.CustomEvent ??= CustomEventShim;
|
|
||||||
const attributes = new WeakMap();
|
|
||||||
const attributesForElement = (element) => {
|
|
||||||
let attrs = attributes.get(element);
|
|
||||||
if (attrs === undefined) {
|
|
||||||
attributes.set(element, (attrs = new Map()));
|
|
||||||
}
|
|
||||||
return attrs;
|
|
||||||
};
|
|
||||||
// The typings around the exports below are a little funky:
|
|
||||||
//
|
|
||||||
// 1. We want the `name` of the shim classes to match the real ones at runtime,
|
|
||||||
// hence e.g. `class Element`.
|
|
||||||
// 2. We can't shadow the global types with a simple class declaration, because
|
|
||||||
// then we can't reference the global types for casting, hence e.g.
|
|
||||||
// `const ElementShim = class Element`.
|
|
||||||
// 3. We want to export the classes typed as the real ones, hence e.g.
|
|
||||||
// `const ElementShimWithRealType = ElementShim as object as typeof Element;`.
|
|
||||||
// 4. We want the exported names to match the real ones, hence e.g.
|
|
||||||
// `export {ElementShimWithRealType as Element}`.
|
|
||||||
const ElementShim = class Element extends EventTargetShim {
|
|
||||||
constructor() {
|
|
||||||
super(...arguments);
|
|
||||||
this.__shadowRootMode = null;
|
|
||||||
this.__shadowRoot = null;
|
|
||||||
this.__internals = null;
|
|
||||||
}
|
|
||||||
get attributes() {
|
|
||||||
return Array.from(attributesForElement(this)).map(([name, value]) => ({
|
|
||||||
name,
|
|
||||||
value,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
get shadowRoot() {
|
|
||||||
if (this.__shadowRootMode === 'closed') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return this.__shadowRoot;
|
|
||||||
}
|
|
||||||
get localName() {
|
|
||||||
return this.constructor.__localName;
|
|
||||||
}
|
|
||||||
get tagName() {
|
|
||||||
return this.localName?.toUpperCase();
|
|
||||||
}
|
|
||||||
setAttribute(name, value) {
|
|
||||||
// Emulate browser behavior that silently casts all values to string. E.g.
|
|
||||||
// `42` becomes `"42"` and `{}` becomes `"[object Object]""`.
|
|
||||||
attributesForElement(this).set(name, String(value));
|
|
||||||
}
|
|
||||||
removeAttribute(name) {
|
|
||||||
attributesForElement(this).delete(name);
|
|
||||||
}
|
|
||||||
toggleAttribute(name, force) {
|
|
||||||
// Steps reference https://dom.spec.whatwg.org/#dom-element-toggleattribute
|
|
||||||
if (this.hasAttribute(name)) {
|
|
||||||
// Step 5
|
|
||||||
if (force === undefined || !force) {
|
|
||||||
this.removeAttribute(name);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Step 4
|
|
||||||
if (force === undefined || force) {
|
|
||||||
// Step 4.1
|
|
||||||
this.setAttribute(name, '');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Step 4.2
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Step 6
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
hasAttribute(name) {
|
|
||||||
return attributesForElement(this).has(name);
|
|
||||||
}
|
|
||||||
attachShadow(init) {
|
|
||||||
const shadowRoot = { host: this };
|
|
||||||
this.__shadowRootMode = init.mode;
|
|
||||||
if (init && init.mode === 'open') {
|
|
||||||
this.__shadowRoot = shadowRoot;
|
|
||||||
}
|
|
||||||
return shadowRoot;
|
|
||||||
}
|
|
||||||
attachInternals() {
|
|
||||||
if (this.__internals !== null) {
|
|
||||||
throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': ` +
|
|
||||||
`ElementInternals for the specified element was already attached.`);
|
|
||||||
}
|
|
||||||
const internals = new ElementInternalsShim(this);
|
|
||||||
this.__internals = internals;
|
|
||||||
return internals;
|
|
||||||
}
|
|
||||||
getAttribute(name) {
|
|
||||||
const value = attributesForElement(this).get(name);
|
|
||||||
return value ?? null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const ElementShimWithRealType = ElementShim;
|
|
||||||
export { ElementShimWithRealType as Element };
|
|
||||||
const HTMLElementShim = class HTMLElement extends ElementShim {
|
|
||||||
};
|
|
||||||
const HTMLElementShimWithRealType = HTMLElementShim;
|
|
||||||
export { HTMLElementShimWithRealType as HTMLElement };
|
|
||||||
// For convenience, we provide a global instance of a HTMLElement as an event
|
|
||||||
// target. This facilitates registering global event handlers
|
|
||||||
// (e.g. for @lit/context ContextProvider).
|
|
||||||
// We use this in in the SSR render function.
|
|
||||||
// Note, this is a bespoke element and not simply `document` or `window` since
|
|
||||||
// user code relies on these being undefined in the server environment.
|
|
||||||
globalThis.litServerRoot ??= Object.defineProperty(new HTMLElementShimWithRealType(), 'localName', {
|
|
||||||
// Patch localName (and tagName) to return a unique name.
|
|
||||||
get() {
|
|
||||||
return 'lit-server-root';
|
|
||||||
},
|
|
||||||
});
|
|
||||||
function promiseWithResolvers() {
|
|
||||||
let resolve;
|
|
||||||
let reject;
|
|
||||||
const promise = new Promise((res, rej) => {
|
|
||||||
resolve = res;
|
|
||||||
reject = rej;
|
|
||||||
});
|
|
||||||
return { promise, resolve: resolve, reject: reject };
|
|
||||||
}
|
|
||||||
class CustomElementRegistry {
|
|
||||||
constructor() {
|
|
||||||
this.__definitions = new Map();
|
|
||||||
this.__reverseDefinitions = new Map();
|
|
||||||
this.__pendingWhenDefineds = new Map();
|
|
||||||
}
|
|
||||||
define(name, ctor) {
|
|
||||||
if (this.__definitions.has(name)) {
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
|
||||||
console.warn(`'CustomElementRegistry' already has "${name}" defined. ` +
|
|
||||||
`This may have been caused by live reload or hot module ` +
|
|
||||||
`replacement in which case it can be safely ignored.\n` +
|
|
||||||
`Make sure to test your application with a production build as ` +
|
|
||||||
`repeat registrations will throw in production.`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': ` +
|
|
||||||
`the name "${name}" has already been used with this registry`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (this.__reverseDefinitions.has(ctor)) {
|
|
||||||
throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': ` +
|
|
||||||
`the constructor has already been used with this registry for the ` +
|
|
||||||
`tag name ${this.__reverseDefinitions.get(ctor)}`);
|
|
||||||
}
|
|
||||||
// Provide tagName and localName for the component.
|
|
||||||
ctor.__localName = name;
|
|
||||||
this.__definitions.set(name, {
|
|
||||||
ctor,
|
|
||||||
// Note it's important we read `observedAttributes` in case it is a getter
|
|
||||||
// with side-effects, as is the case in Lit, where it triggers class
|
|
||||||
// finalization.
|
|
||||||
//
|
|
||||||
// TODO(aomarks) To be spec compliant, we should also capture the
|
|
||||||
// registration-time lifecycle methods like `connectedCallback`. For them
|
|
||||||
// to be actually accessible to e.g. the Lit SSR element renderer, though,
|
|
||||||
// we'd need to introduce a new API for accessing them (since `get` only
|
|
||||||
// returns the constructor).
|
|
||||||
observedAttributes: ctor.observedAttributes ?? [],
|
|
||||||
});
|
|
||||||
this.__reverseDefinitions.set(ctor, name);
|
|
||||||
this.__pendingWhenDefineds.get(name)?.resolve(ctor);
|
|
||||||
this.__pendingWhenDefineds.delete(name);
|
|
||||||
}
|
|
||||||
get(name) {
|
|
||||||
const definition = this.__definitions.get(name);
|
|
||||||
return definition?.ctor;
|
|
||||||
}
|
|
||||||
getName(ctor) {
|
|
||||||
return this.__reverseDefinitions.get(ctor) ?? null;
|
|
||||||
}
|
|
||||||
upgrade(_element) {
|
|
||||||
// In SSR this doesn't make a lot of sense, so we do nothing.
|
|
||||||
throw new Error(`customElements.upgrade is not currently supported in SSR. ` +
|
|
||||||
`Please file a bug if you need it.`);
|
|
||||||
}
|
|
||||||
async whenDefined(name) {
|
|
||||||
const definition = this.__definitions.get(name);
|
|
||||||
if (definition) {
|
|
||||||
return definition.ctor;
|
|
||||||
}
|
|
||||||
let withResolvers = this.__pendingWhenDefineds.get(name);
|
|
||||||
if (!withResolvers) {
|
|
||||||
withResolvers = promiseWithResolvers();
|
|
||||||
this.__pendingWhenDefineds.set(name, withResolvers);
|
|
||||||
}
|
|
||||||
return withResolvers.promise;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const CustomElementRegistryShimWithRealType = CustomElementRegistry;
|
|
||||||
export { CustomElementRegistryShimWithRealType as CustomElementRegistry };
|
|
||||||
export const customElements = new CustomElementRegistryShimWithRealType();
|
|
||||||
//# sourceMappingURL=index.js.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/index.js.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
10
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.d.ts
generated
vendored
10
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.d.ts
generated
vendored
|
|
@ -1,10 +0,0 @@
|
||||||
import type { LoadHook } from 'node:module';
|
|
||||||
/**
|
|
||||||
* When an attempt is made to import a CSS file/module, code is
|
|
||||||
* generated to read the corresponding file, add it to a CSSStyleSheet
|
|
||||||
* instance and return that instance as the default export.
|
|
||||||
*
|
|
||||||
* https://nodejs.org/api/module.html#loadurl-context-nextload
|
|
||||||
*/
|
|
||||||
export declare const load: LoadHook;
|
|
||||||
//# sourceMappingURL=css-hook.d.ts.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.d.ts.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"css-hook.d.ts","sourceRoot":"","sources":["../src/lib/css-hook.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,QAsBlB,CAAC"}
|
|
||||||
32
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.js
generated
vendored
32
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.js
generated
vendored
|
|
@ -1,32 +0,0 @@
|
||||||
import { readFile } from 'node:fs/promises';
|
|
||||||
/**
|
|
||||||
* When an attempt is made to import a CSS file/module, code is
|
|
||||||
* generated to read the corresponding file, add it to a CSSStyleSheet
|
|
||||||
* instance and return that instance as the default export.
|
|
||||||
*
|
|
||||||
* https://nodejs.org/api/module.html#loadurl-context-nextload
|
|
||||||
*/
|
|
||||||
export const load = async (url, context, nextLoad) => {
|
|
||||||
if (context.importAttributes.type === 'css') {
|
|
||||||
const content = await readFile(new URL(url), 'utf-8');
|
|
||||||
const code = `
|
|
||||||
import {CSSStyleSheet} from '@lit-labs/ssr-dom-shim';
|
|
||||||
const sheet = new CSSStyleSheet();
|
|
||||||
sheet.replaceSync(${JSON.stringify(content)});
|
|
||||||
export default sheet;
|
|
||||||
`;
|
|
||||||
return { format: 'module', shortCircuit: true, source: code };
|
|
||||||
}
|
|
||||||
else if (new URL(url).pathname.endsWith('.css')) {
|
|
||||||
try {
|
|
||||||
return await nextLoad(url, context);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
console.warn(`Tried to import ${url} without import attributes!\n` +
|
|
||||||
`(e.g. use "import s from './a.css' with {type: 'css'}" instead of "import s from './a.css'")`);
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return await nextLoad(url, context);
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=css-hook.js.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.js.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css-hook.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"css-hook.js","sourceRoot":"","sources":["../src/lib/css-hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAG1C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,IAAI,GAAa,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;IAC7D,IAAI,OAAO,CAAC,gBAAgB,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG;;;0BAGS,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;;KAE5C,CAAC;QACF,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;IAC9D,CAAC;SAAM,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACtC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CACV,mBAAmB,GAAG,+BAA+B;gBACnD,8FAA8F,CACjG,CAAC;YACF,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IACD,OAAO,MAAM,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC,CAAC","sourcesContent":["import {readFile} from 'node:fs/promises';\nimport type {LoadHook} from 'node:module';\n\n/**\n * When an attempt is made to import a CSS file/module, code is\n * generated to read the corresponding file, add it to a CSSStyleSheet\n * instance and return that instance as the default export.\n *\n * https://nodejs.org/api/module.html#loadurl-context-nextload\n */\nexport const load: LoadHook = async (url, context, nextLoad) => {\n if (context.importAttributes.type === 'css') {\n const content = await readFile(new URL(url), 'utf-8');\n const code = `\n import {CSSStyleSheet} from '@lit-labs/ssr-dom-shim';\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(${JSON.stringify(content)});\n export default sheet;\n `;\n return {format: 'module', shortCircuit: true, source: code};\n } else if (new URL(url).pathname.endsWith('.css')) {\n try {\n return await nextLoad(url, context);\n } catch (e) {\n console.warn(\n `Tried to import ${url} without import attributes!\\n` +\n `(e.g. use \"import s from './a.css' with {type: 'css'}\" instead of \"import s from './a.css'\")`\n );\n throw e;\n }\n }\n return await nextLoad(url, context);\n};\n"]}
|
|
||||||
16
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.d.ts
generated
vendored
16
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.d.ts
generated
vendored
|
|
@ -1,16 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2024 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
declare const MediaListShimWithRealType: typeof MediaList;
|
|
||||||
export { MediaListShimWithRealType as MediaList };
|
|
||||||
declare const StyleSheetShimWithRealType: typeof StyleSheet;
|
|
||||||
export { StyleSheetShimWithRealType as StyleSheet };
|
|
||||||
declare const CSSRuleShimWithRealType: typeof CSSRule;
|
|
||||||
export { CSSRuleShimWithRealType as CSSRule };
|
|
||||||
declare const CSSRuleListShimWithRealType: typeof CSSRuleList;
|
|
||||||
export { CSSRuleListShimWithRealType as CSSRuleList };
|
|
||||||
declare const CSSStyleSheetShimWithRealType: typeof CSSStyleSheet;
|
|
||||||
export { CSSStyleSheetShimWithRealType as CSSStyleSheet, CSSStyleSheetShimWithRealType as CSSStyleSheetShim, };
|
|
||||||
//# sourceMappingURL=css.d.ts.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.d.ts.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/lib/css.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkCH,QAAA,MAAM,yBAAyB,EAA8B,OAAO,SAAS,CAAC;AAC9E,OAAO,EAAC,yBAAyB,IAAI,SAAS,EAAC,CAAC;AA4BhD,QAAA,MAAM,0BAA0B,EACF,OAAO,UAAU,CAAC;AAChD,OAAO,EAAC,0BAA0B,IAAI,UAAU,EAAC,CAAC;AA2ClD,QAAA,MAAM,uBAAuB,EAA4B,OAAO,OAAO,CAAC;AACxE,OAAO,EAAC,uBAAuB,IAAI,OAAO,EAAC,CAAC;AAa5C,QAAA,MAAM,2BAA2B,EACF,OAAO,WAAW,CAAC;AAClD,OAAO,EAAC,2BAA2B,IAAI,WAAW,EAAC,CAAC;AA0CpD,QAAA,MAAM,6BAA6B,EACF,OAAO,aAAa,CAAC;AACtD,OAAO,EACL,6BAA6B,IAAI,aAAa,EAC9C,6BAA6B,IAAI,iBAAiB,GACnD,CAAC"}
|
|
||||||
145
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.js
generated
vendored
145
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.js
generated
vendored
|
|
@ -1,145 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2024 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
var _a;
|
|
||||||
const MediaListShim = class MediaList extends Array {
|
|
||||||
get mediaText() {
|
|
||||||
return this.join(', ');
|
|
||||||
}
|
|
||||||
toString() {
|
|
||||||
return this.mediaText;
|
|
||||||
}
|
|
||||||
appendMedium(medium) {
|
|
||||||
if (!this.includes(medium)) {
|
|
||||||
this.push(medium);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
deleteMedium(medium) {
|
|
||||||
const index = this.indexOf(medium);
|
|
||||||
if (index !== -1) {
|
|
||||||
this.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
item(index) {
|
|
||||||
return this[index] ?? null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const MediaListShimWithRealType = MediaListShim;
|
|
||||||
export { MediaListShimWithRealType as MediaList };
|
|
||||||
const StyleSheetShim = class StyleSheet {
|
|
||||||
constructor() {
|
|
||||||
this.__media = new MediaListShim();
|
|
||||||
this.disabled = false;
|
|
||||||
}
|
|
||||||
get href() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
get media() {
|
|
||||||
return this.__media;
|
|
||||||
}
|
|
||||||
get ownerNode() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
get parentStyleSheet() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
get title() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
get type() {
|
|
||||||
return 'text/css';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const StyleSheetShimWithRealType = StyleSheetShim;
|
|
||||||
export { StyleSheetShimWithRealType as StyleSheet };
|
|
||||||
const CSSRuleShim = (_a = class CSSRule {
|
|
||||||
constructor() {
|
|
||||||
this.STYLE_RULE = 1;
|
|
||||||
this.CHARSET_RULE = 2;
|
|
||||||
this.IMPORT_RULE = 3;
|
|
||||||
this.MEDIA_RULE = 4;
|
|
||||||
this.FONT_FACE_RULE = 5;
|
|
||||||
this.PAGE_RULE = 6;
|
|
||||||
this.NAMESPACE_RULE = 10;
|
|
||||||
this.KEYFRAMES_RULE = 7;
|
|
||||||
this.KEYFRAME_RULE = 8;
|
|
||||||
this.SUPPORTS_RULE = 12;
|
|
||||||
this.COUNTER_STYLE_RULE = 11;
|
|
||||||
this.FONT_FEATURE_VALUES_RULE = 14;
|
|
||||||
this.__parentStyleSheet = null;
|
|
||||||
this.cssText = '';
|
|
||||||
}
|
|
||||||
get parentRule() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
get parentStyleSheet() {
|
|
||||||
return this.__parentStyleSheet;
|
|
||||||
}
|
|
||||||
get type() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_a.STYLE_RULE = 1,
|
|
||||||
_a.CHARSET_RULE = 2,
|
|
||||||
_a.IMPORT_RULE = 3,
|
|
||||||
_a.MEDIA_RULE = 4,
|
|
||||||
_a.FONT_FACE_RULE = 5,
|
|
||||||
_a.PAGE_RULE = 6,
|
|
||||||
_a.NAMESPACE_RULE = 10,
|
|
||||||
_a.KEYFRAMES_RULE = 7,
|
|
||||||
_a.KEYFRAME_RULE = 8,
|
|
||||||
_a.SUPPORTS_RULE = 12,
|
|
||||||
_a.COUNTER_STYLE_RULE = 11,
|
|
||||||
_a.FONT_FEATURE_VALUES_RULE = 14,
|
|
||||||
_a);
|
|
||||||
const CSSRuleShimWithRealType = CSSRuleShim;
|
|
||||||
export { CSSRuleShimWithRealType as CSSRule };
|
|
||||||
const CSSRuleListShim = class CSSRuleList extends Array {
|
|
||||||
item(index) {
|
|
||||||
return this[index] ?? null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const CSSRuleListShimWithRealType = CSSRuleListShim;
|
|
||||||
export { CSSRuleListShimWithRealType as CSSRuleList };
|
|
||||||
const CSSStyleSheetShim = class CSSStyleSheet extends StyleSheetShim {
|
|
||||||
constructor() {
|
|
||||||
super(...arguments);
|
|
||||||
this.__rules = new CSSRuleListShim();
|
|
||||||
}
|
|
||||||
get cssRules() {
|
|
||||||
return this.__rules;
|
|
||||||
}
|
|
||||||
get ownerRule() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
get rules() {
|
|
||||||
return this.cssRules;
|
|
||||||
}
|
|
||||||
addRule(_selector, _style, _index) {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
deleteRule(_index) {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
insertRule(_rule, _index) {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
removeRule(_index) {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
replace(text) {
|
|
||||||
this.replaceSync(text);
|
|
||||||
return Promise.resolve(this);
|
|
||||||
}
|
|
||||||
replaceSync(text) {
|
|
||||||
this.__rules.length = 0;
|
|
||||||
const rule = new CSSRuleShim();
|
|
||||||
rule.cssText = text;
|
|
||||||
this.__rules.push(rule);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const CSSStyleSheetShimWithRealType = CSSStyleSheetShim;
|
|
||||||
export { CSSStyleSheetShimWithRealType as CSSStyleSheet, CSSStyleSheetShimWithRealType as CSSStyleSheetShim, };
|
|
||||||
//# sourceMappingURL=css.js.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.js.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/css.js.map
generated
vendored
File diff suppressed because one or more lines are too long
87
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.d.ts
generated
vendored
87
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.d.ts
generated
vendored
|
|
@ -1,87 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2023 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
type StringKeys<T extends object> = {
|
|
||||||
[K in keyof T]: T[K] extends string | null ? K : never;
|
|
||||||
}[keyof T];
|
|
||||||
type ARIAAttributeMap = {
|
|
||||||
[K in StringKeys<ARIAMixin>]: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Map of ARIAMixin properties to attributes
|
|
||||||
*/
|
|
||||||
export declare const ariaMixinAttributes: ARIAAttributeMap;
|
|
||||||
export declare const ElementInternalsShim: {
|
|
||||||
new (_host: HTMLElement): {
|
|
||||||
ariaActiveDescendantElement: null;
|
|
||||||
ariaAtomic: string;
|
|
||||||
ariaAutoComplete: string;
|
|
||||||
ariaBrailleLabel: string;
|
|
||||||
ariaBrailleRoleDescription: string;
|
|
||||||
ariaBusy: string;
|
|
||||||
ariaChecked: string;
|
|
||||||
ariaColCount: string;
|
|
||||||
ariaColIndex: string;
|
|
||||||
ariaColIndexText: string;
|
|
||||||
ariaColSpan: string;
|
|
||||||
ariaControlsElements: null;
|
|
||||||
ariaCurrent: string;
|
|
||||||
ariaDescribedByElements: null;
|
|
||||||
ariaDescription: string;
|
|
||||||
ariaDetailsElements: null;
|
|
||||||
ariaDisabled: string;
|
|
||||||
ariaErrorMessageElements: null;
|
|
||||||
ariaExpanded: string;
|
|
||||||
ariaFlowToElements: null;
|
|
||||||
ariaHasPopup: string;
|
|
||||||
ariaHidden: string;
|
|
||||||
ariaInvalid: string;
|
|
||||||
ariaKeyShortcuts: string;
|
|
||||||
ariaLabel: string;
|
|
||||||
ariaLabelledByElements: null;
|
|
||||||
ariaLevel: string;
|
|
||||||
ariaLive: string;
|
|
||||||
ariaModal: string;
|
|
||||||
ariaMultiLine: string;
|
|
||||||
ariaMultiSelectable: string;
|
|
||||||
ariaOrientation: string;
|
|
||||||
ariaOwnsElements: null;
|
|
||||||
ariaPlaceholder: string;
|
|
||||||
ariaPosInSet: string;
|
|
||||||
ariaPressed: string;
|
|
||||||
ariaReadOnly: string;
|
|
||||||
ariaRelevant: string;
|
|
||||||
ariaRequired: string;
|
|
||||||
ariaRoleDescription: string;
|
|
||||||
ariaRowCount: string;
|
|
||||||
ariaRowIndex: string;
|
|
||||||
ariaRowIndexText: string;
|
|
||||||
ariaRowSpan: string;
|
|
||||||
ariaSelected: string;
|
|
||||||
ariaSetSize: string;
|
|
||||||
ariaSort: string;
|
|
||||||
ariaValueMax: string;
|
|
||||||
ariaValueMin: string;
|
|
||||||
ariaValueNow: string;
|
|
||||||
ariaValueText: string;
|
|
||||||
role: string;
|
|
||||||
__host: HTMLElement;
|
|
||||||
get shadowRoot(): ShadowRoot;
|
|
||||||
checkValidity(): boolean;
|
|
||||||
form: null;
|
|
||||||
labels: NodeListOf<HTMLLabelElement>;
|
|
||||||
reportValidity(): boolean;
|
|
||||||
setFormValue(): void;
|
|
||||||
setValidity(): void;
|
|
||||||
states: Set<string>;
|
|
||||||
validationMessage: string;
|
|
||||||
validity: ValidityState;
|
|
||||||
willValidate: boolean;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
declare const ElementInternalsShimWithRealType: typeof ElementInternals;
|
|
||||||
export { ElementInternalsShimWithRealType as ElementInternals };
|
|
||||||
export declare const HYDRATE_INTERNALS_ATTR_PREFIX = "hydrate-internals-";
|
|
||||||
//# sourceMappingURL=element-internals.d.ts.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.d.ts.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"element-internals.d.ts","sourceRoot":"","sources":["../src/lib/element-internals.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,UAAU,CAAC,CAAC,SAAS,MAAM,IAAI;KACjC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK;CACvD,CAAC,MAAM,CAAC,CAAC,CAAC;AAKX,KAAK,gBAAgB,GAAG;KACrB,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,GAAG,MAAM;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBA6CjC,CAAC;AAOF,eAAO,MAAM,oBAAoB;gBA+DZ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBARtB,WAAW;;;;gBAqBO,UAAU,CAAC,gBAAgB,CAAC;;wBAItC,IAAI;uBACL,IAAI;;;kBAGF,aAAa;;;CAE/B,CAAC;AAEF,QAAA,MAAM,gCAAgC,EACF,OAAO,gBAAgB,CAAC;AAC5D,OAAO,EAAC,gCAAgC,IAAI,gBAAgB,EAAC,CAAC;AAE9D,eAAO,MAAM,6BAA6B,uBAAuB,CAAC"}
|
|
||||||
143
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js
generated
vendored
143
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js
generated
vendored
|
|
@ -1,143 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2023 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Map of ARIAMixin properties to attributes
|
|
||||||
*/
|
|
||||||
export const ariaMixinAttributes = {
|
|
||||||
ariaAtomic: 'aria-atomic',
|
|
||||||
ariaAutoComplete: 'aria-autocomplete',
|
|
||||||
ariaBrailleLabel: 'aria-braillelabel',
|
|
||||||
ariaBrailleRoleDescription: 'aria-brailleroledescription',
|
|
||||||
ariaBusy: 'aria-busy',
|
|
||||||
ariaChecked: 'aria-checked',
|
|
||||||
ariaColCount: 'aria-colcount',
|
|
||||||
ariaColIndex: 'aria-colindex',
|
|
||||||
ariaColIndexText: 'aria-colindextext',
|
|
||||||
ariaColSpan: 'aria-colspan',
|
|
||||||
ariaCurrent: 'aria-current',
|
|
||||||
ariaDescription: 'aria-description',
|
|
||||||
ariaDisabled: 'aria-disabled',
|
|
||||||
ariaExpanded: 'aria-expanded',
|
|
||||||
ariaHasPopup: 'aria-haspopup',
|
|
||||||
ariaHidden: 'aria-hidden',
|
|
||||||
ariaInvalid: 'aria-invalid',
|
|
||||||
ariaKeyShortcuts: 'aria-keyshortcuts',
|
|
||||||
ariaLabel: 'aria-label',
|
|
||||||
ariaLevel: 'aria-level',
|
|
||||||
ariaLive: 'aria-live',
|
|
||||||
ariaModal: 'aria-modal',
|
|
||||||
ariaMultiLine: 'aria-multiline',
|
|
||||||
ariaMultiSelectable: 'aria-multiselectable',
|
|
||||||
ariaOrientation: 'aria-orientation',
|
|
||||||
ariaPlaceholder: 'aria-placeholder',
|
|
||||||
ariaPosInSet: 'aria-posinset',
|
|
||||||
ariaPressed: 'aria-pressed',
|
|
||||||
ariaReadOnly: 'aria-readonly',
|
|
||||||
ariaRelevant: 'aria-relevant',
|
|
||||||
ariaRequired: 'aria-required',
|
|
||||||
ariaRoleDescription: 'aria-roledescription',
|
|
||||||
ariaRowCount: 'aria-rowcount',
|
|
||||||
ariaRowIndex: 'aria-rowindex',
|
|
||||||
ariaRowIndexText: 'aria-rowindextext',
|
|
||||||
ariaRowSpan: 'aria-rowspan',
|
|
||||||
ariaSelected: 'aria-selected',
|
|
||||||
ariaSetSize: 'aria-setsize',
|
|
||||||
ariaSort: 'aria-sort',
|
|
||||||
ariaValueMax: 'aria-valuemax',
|
|
||||||
ariaValueMin: 'aria-valuemin',
|
|
||||||
ariaValueNow: 'aria-valuenow',
|
|
||||||
ariaValueText: 'aria-valuetext',
|
|
||||||
role: 'role',
|
|
||||||
};
|
|
||||||
// Shim the global element internals object
|
|
||||||
// Methods should be fine as noops and properties can generally
|
|
||||||
// be while on the server.
|
|
||||||
export const ElementInternalsShim = class ElementInternals {
|
|
||||||
get shadowRoot() {
|
|
||||||
// Grab the shadow root instance from the Element shim
|
|
||||||
// to ensure that the shadow root is always available
|
|
||||||
// to the internals instance even if the mode is 'closed'
|
|
||||||
return this.__host
|
|
||||||
.__shadowRoot;
|
|
||||||
}
|
|
||||||
constructor(_host) {
|
|
||||||
this.ariaActiveDescendantElement = null;
|
|
||||||
this.ariaAtomic = '';
|
|
||||||
this.ariaAutoComplete = '';
|
|
||||||
this.ariaBrailleLabel = '';
|
|
||||||
this.ariaBrailleRoleDescription = '';
|
|
||||||
this.ariaBusy = '';
|
|
||||||
this.ariaChecked = '';
|
|
||||||
this.ariaColCount = '';
|
|
||||||
this.ariaColIndex = '';
|
|
||||||
this.ariaColIndexText = '';
|
|
||||||
this.ariaColSpan = '';
|
|
||||||
this.ariaControlsElements = null;
|
|
||||||
this.ariaCurrent = '';
|
|
||||||
this.ariaDescribedByElements = null;
|
|
||||||
this.ariaDescription = '';
|
|
||||||
this.ariaDetailsElements = null;
|
|
||||||
this.ariaDisabled = '';
|
|
||||||
this.ariaErrorMessageElements = null;
|
|
||||||
this.ariaExpanded = '';
|
|
||||||
this.ariaFlowToElements = null;
|
|
||||||
this.ariaHasPopup = '';
|
|
||||||
this.ariaHidden = '';
|
|
||||||
this.ariaInvalid = '';
|
|
||||||
this.ariaKeyShortcuts = '';
|
|
||||||
this.ariaLabel = '';
|
|
||||||
this.ariaLabelledByElements = null;
|
|
||||||
this.ariaLevel = '';
|
|
||||||
this.ariaLive = '';
|
|
||||||
this.ariaModal = '';
|
|
||||||
this.ariaMultiLine = '';
|
|
||||||
this.ariaMultiSelectable = '';
|
|
||||||
this.ariaOrientation = '';
|
|
||||||
this.ariaOwnsElements = null;
|
|
||||||
this.ariaPlaceholder = '';
|
|
||||||
this.ariaPosInSet = '';
|
|
||||||
this.ariaPressed = '';
|
|
||||||
this.ariaReadOnly = '';
|
|
||||||
this.ariaRelevant = '';
|
|
||||||
this.ariaRequired = '';
|
|
||||||
this.ariaRoleDescription = '';
|
|
||||||
this.ariaRowCount = '';
|
|
||||||
this.ariaRowIndex = '';
|
|
||||||
this.ariaRowIndexText = '';
|
|
||||||
this.ariaRowSpan = '';
|
|
||||||
this.ariaSelected = '';
|
|
||||||
this.ariaSetSize = '';
|
|
||||||
this.ariaSort = '';
|
|
||||||
this.ariaValueMax = '';
|
|
||||||
this.ariaValueMin = '';
|
|
||||||
this.ariaValueNow = '';
|
|
||||||
this.ariaValueText = '';
|
|
||||||
this.role = '';
|
|
||||||
this.form = null;
|
|
||||||
this.labels = [];
|
|
||||||
this.states = new Set();
|
|
||||||
this.validationMessage = '';
|
|
||||||
this.validity = {};
|
|
||||||
this.willValidate = true;
|
|
||||||
this.__host = _host;
|
|
||||||
}
|
|
||||||
checkValidity() {
|
|
||||||
// TODO(augustjk) Consider actually implementing logic.
|
|
||||||
// See https://github.com/lit/lit/issues/3740
|
|
||||||
console.warn('`ElementInternals.checkValidity()` was called on the server.' +
|
|
||||||
'This method always returns true.');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
reportValidity() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
setFormValue() { }
|
|
||||||
setValidity() { }
|
|
||||||
};
|
|
||||||
const ElementInternalsShimWithRealType = ElementInternalsShim;
|
|
||||||
export { ElementInternalsShimWithRealType as ElementInternals };
|
|
||||||
export const HYDRATE_INTERNALS_ATTR_PREFIX = 'hydrate-internals-';
|
|
||||||
//# sourceMappingURL=element-internals.js.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js.map
generated
vendored
File diff suppressed because one or more lines are too long
34
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.d.ts
generated
vendored
34
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.d.ts
generated
vendored
|
|
@ -1,34 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2023 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* This is a basic implementation of an EventTarget, Event and CustomEvent.
|
|
||||||
*
|
|
||||||
* This is not fully spec compliant (e.g. validation),
|
|
||||||
* but should work well enough for our use cases.
|
|
||||||
*
|
|
||||||
* @see https://dom.spec.whatwg.org/#eventtarget
|
|
||||||
* @see https://dom.spec.whatwg.org/#event
|
|
||||||
* @see https://dom.spec.whatwg.org/#customevent
|
|
||||||
*/
|
|
||||||
export interface EventTargetShimMeta {
|
|
||||||
/**
|
|
||||||
* The event target parent represents the previous event target for an event
|
|
||||||
* in capture phase and the next event target for a bubbling event.
|
|
||||||
* Note that this is not the element parent
|
|
||||||
*/
|
|
||||||
__eventTargetParent: globalThis.EventTarget | undefined;
|
|
||||||
/**
|
|
||||||
* The host event target/element of this event target, if this event target
|
|
||||||
* is inside a Shadow DOM.
|
|
||||||
*/
|
|
||||||
__host: globalThis.EventTarget | undefined;
|
|
||||||
}
|
|
||||||
declare const EventTargetShimWithRealType: typeof globalThis.EventTarget;
|
|
||||||
export { EventTargetShimWithRealType as EventTarget, EventTargetShimWithRealType as EventTargetShim, };
|
|
||||||
declare const EventShimWithRealType: typeof Event;
|
|
||||||
declare const CustomEventShimWithRealType: typeof CustomEvent;
|
|
||||||
export { EventShimWithRealType as Event, EventShimWithRealType as EventShim, CustomEventShimWithRealType as CustomEvent, CustomEventShimWithRealType as CustomEventShim, };
|
|
||||||
//# sourceMappingURL=events.d.ts.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.d.ts.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/lib/events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;GASG;AAEH,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,mBAAmB,EAAE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC;IACxD;;;OAGG;IACH,MAAM,EAAE,UAAU,CAAC,WAAW,GAAG,SAAS,CAAC;CAC5C;AAyPD,QAAA,MAAM,2BAA2B,EACN,OAAO,UAAU,CAAC,WAAW,CAAC;AACzD,OAAO,EACL,2BAA2B,IAAI,WAAW,EAC1C,2BAA2B,IAAI,eAAe,GAC/C,CAAC;AAkLF,QAAA,MAAM,qBAAqB,EAA0B,OAAO,KAAK,CAAC;AAClE,QAAA,MAAM,2BAA2B,EACF,OAAO,WAAW,CAAC;AAClD,OAAO,EACL,qBAAqB,IAAI,KAAK,EAC9B,qBAAqB,IAAI,SAAS,EAClC,2BAA2B,IAAI,WAAW,EAC1C,2BAA2B,IAAI,eAAe,GAC/C,CAAC"}
|
|
||||||
375
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.js
generated
vendored
375
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.js
generated
vendored
|
|
@ -1,375 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2023 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
||||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
||||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
||||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
||||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
||||||
};
|
|
||||||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
||||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
||||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
||||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
||||||
};
|
|
||||||
var _Event_cancelable, _Event_bubbles, _Event_composed, _Event_defaultPrevented, _Event_timestamp, _Event_propagationStopped, _Event_type, _Event_target, _Event_isBeingDispatched, _a, _CustomEvent_detail, _b;
|
|
||||||
const isCaptureEventListener = (options) => (typeof options === 'boolean' ? options : (options?.capture ?? false));
|
|
||||||
// Event phases
|
|
||||||
const NONE = 0;
|
|
||||||
const CAPTURING_PHASE = 1;
|
|
||||||
const AT_TARGET = 2;
|
|
||||||
const BUBBLING_PHASE = 3;
|
|
||||||
// Shim the global EventTarget object
|
|
||||||
class EventTarget {
|
|
||||||
constructor() {
|
|
||||||
this.__eventListeners = new Map();
|
|
||||||
this.__captureEventListeners = new Map();
|
|
||||||
}
|
|
||||||
addEventListener(type, callback, options) {
|
|
||||||
if (callback === undefined || callback === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const eventListenersMap = isCaptureEventListener(options)
|
|
||||||
? this.__captureEventListeners
|
|
||||||
: this.__eventListeners;
|
|
||||||
let eventListeners = eventListenersMap.get(type);
|
|
||||||
if (eventListeners === undefined) {
|
|
||||||
eventListeners = new Map();
|
|
||||||
eventListenersMap.set(type, eventListeners);
|
|
||||||
}
|
|
||||||
else if (eventListeners.has(callback)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const normalizedOptions = typeof options === 'object' && options ? options : {};
|
|
||||||
normalizedOptions.signal?.addEventListener('abort', () => this.removeEventListener(type, callback, options));
|
|
||||||
eventListeners.set(callback, normalizedOptions ?? {});
|
|
||||||
}
|
|
||||||
removeEventListener(type, callback, options) {
|
|
||||||
if (callback === undefined || callback === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const eventListenersMap = isCaptureEventListener(options)
|
|
||||||
? this.__captureEventListeners
|
|
||||||
: this.__eventListeners;
|
|
||||||
const eventListeners = eventListenersMap.get(type);
|
|
||||||
if (eventListeners !== undefined) {
|
|
||||||
eventListeners.delete(callback);
|
|
||||||
if (!eventListeners.size) {
|
|
||||||
eventListenersMap.delete(type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dispatchEvent(event) {
|
|
||||||
const composedPath = [this];
|
|
||||||
let parent = this.__eventTargetParent;
|
|
||||||
if (event.composed) {
|
|
||||||
while (parent) {
|
|
||||||
composedPath.push(parent);
|
|
||||||
parent = parent.__eventTargetParent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// If the event is not composed and the event was dispatched inside
|
|
||||||
// shadow DOM, we need to stop before the host of the shadow DOM.
|
|
||||||
while (parent && parent !== this.__host) {
|
|
||||||
composedPath.push(parent);
|
|
||||||
parent = parent.__eventTargetParent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// We need to patch various properties that would either be empty or wrong
|
|
||||||
// in this scenario.
|
|
||||||
let stopPropagation = false;
|
|
||||||
let stopImmediatePropagation = false;
|
|
||||||
let eventPhase = NONE;
|
|
||||||
let target = null;
|
|
||||||
let tmpTarget = null;
|
|
||||||
let currentTarget = null;
|
|
||||||
const originalStopPropagation = event.stopPropagation;
|
|
||||||
const originalStopImmediatePropagation = event.stopImmediatePropagation;
|
|
||||||
Object.defineProperties(event, {
|
|
||||||
target: {
|
|
||||||
get() {
|
|
||||||
return target ?? tmpTarget;
|
|
||||||
},
|
|
||||||
...enumerableProperty,
|
|
||||||
},
|
|
||||||
srcElement: {
|
|
||||||
get() {
|
|
||||||
return event.target;
|
|
||||||
},
|
|
||||||
...enumerableProperty,
|
|
||||||
},
|
|
||||||
currentTarget: {
|
|
||||||
get() {
|
|
||||||
return currentTarget;
|
|
||||||
},
|
|
||||||
...enumerableProperty,
|
|
||||||
},
|
|
||||||
eventPhase: {
|
|
||||||
get() {
|
|
||||||
return eventPhase;
|
|
||||||
},
|
|
||||||
...enumerableProperty,
|
|
||||||
},
|
|
||||||
composedPath: {
|
|
||||||
value: () => composedPath,
|
|
||||||
...enumerableProperty,
|
|
||||||
},
|
|
||||||
stopPropagation: {
|
|
||||||
value: () => {
|
|
||||||
stopPropagation = true;
|
|
||||||
originalStopPropagation.call(event);
|
|
||||||
},
|
|
||||||
...enumerableProperty,
|
|
||||||
},
|
|
||||||
stopImmediatePropagation: {
|
|
||||||
value: () => {
|
|
||||||
stopImmediatePropagation = true;
|
|
||||||
originalStopImmediatePropagation.call(event);
|
|
||||||
},
|
|
||||||
...enumerableProperty,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
// An event handler can either be a function, an object with a handleEvent
|
|
||||||
// method or null. This function takes care to call the event handler
|
|
||||||
// correctly.
|
|
||||||
const invokeEventListener = (listener, options, eventListenerMap) => {
|
|
||||||
if (typeof listener === 'function') {
|
|
||||||
listener(event);
|
|
||||||
}
|
|
||||||
else if (typeof listener?.handleEvent === 'function') {
|
|
||||||
listener.handleEvent(event);
|
|
||||||
}
|
|
||||||
if (options.once) {
|
|
||||||
eventListenerMap.delete(listener);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// When an event is finished being dispatched, which can be after the event
|
|
||||||
// tree has been traversed or stopPropagation/stopImmediatePropagation has
|
|
||||||
// been called. Once that is the case, the currentTarget and eventPhase
|
|
||||||
// need to be reset and a value, representing whether the event has not
|
|
||||||
// been prevented, needs to be returned.
|
|
||||||
const finishDispatch = () => {
|
|
||||||
currentTarget = null;
|
|
||||||
eventPhase = NONE;
|
|
||||||
return !event.defaultPrevented;
|
|
||||||
};
|
|
||||||
// An event starts with the capture order, where it starts from the top.
|
|
||||||
// This is done even if bubbles is set to false, which is the default.
|
|
||||||
const captureEventPath = composedPath.slice().reverse();
|
|
||||||
// If the event target, which dispatches the event, is either in the light DOM
|
|
||||||
// or the event is not composed, the target is always itself. If that is not
|
|
||||||
// the case, the target needs to be retargeted: https://dom.spec.whatwg.org/#retarget
|
|
||||||
target = !this.__host || !event.composed ? this : null;
|
|
||||||
const retarget = (eventTargets) => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
||||||
tmpTarget = this;
|
|
||||||
while (tmpTarget.__host && eventTargets.includes(tmpTarget.__host)) {
|
|
||||||
tmpTarget = tmpTarget.__host;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
for (const eventTarget of captureEventPath) {
|
|
||||||
if (!target && (!tmpTarget || tmpTarget === eventTarget.__host)) {
|
|
||||||
retarget(captureEventPath.slice(captureEventPath.indexOf(eventTarget)));
|
|
||||||
}
|
|
||||||
currentTarget = eventTarget;
|
|
||||||
eventPhase = eventTarget === event.target ? AT_TARGET : CAPTURING_PHASE;
|
|
||||||
const captureEventListeners = eventTarget.__captureEventListeners.get(event.type);
|
|
||||||
if (captureEventListeners) {
|
|
||||||
for (const [listener, options] of captureEventListeners) {
|
|
||||||
invokeEventListener(listener, options, captureEventListeners);
|
|
||||||
if (stopImmediatePropagation) {
|
|
||||||
// Event.stopImmediatePropagation() stops any following invocation
|
|
||||||
// of an event handler even on the same event target.
|
|
||||||
return finishDispatch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (stopPropagation) {
|
|
||||||
// Event.stopPropagation() stops any following invocation
|
|
||||||
// of an event handler for any following event targets.
|
|
||||||
return finishDispatch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const bubbleEventPath = event.bubbles ? composedPath : [this];
|
|
||||||
tmpTarget = null;
|
|
||||||
for (const eventTarget of bubbleEventPath) {
|
|
||||||
if (!target &&
|
|
||||||
(!tmpTarget || eventTarget === tmpTarget.__host)) {
|
|
||||||
retarget(bubbleEventPath.slice(0, bubbleEventPath.indexOf(eventTarget) + 1));
|
|
||||||
}
|
|
||||||
currentTarget = eventTarget;
|
|
||||||
eventPhase = eventTarget === event.target ? AT_TARGET : BUBBLING_PHASE;
|
|
||||||
const captureEventListeners = eventTarget.__eventListeners.get(event.type);
|
|
||||||
if (captureEventListeners) {
|
|
||||||
for (const [listener, options] of captureEventListeners) {
|
|
||||||
invokeEventListener(listener, options, captureEventListeners);
|
|
||||||
if (stopImmediatePropagation) {
|
|
||||||
// Event.stopImmediatePropagation() stops any following invocation
|
|
||||||
// of an event handler even on the same event target.
|
|
||||||
return finishDispatch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (stopPropagation) {
|
|
||||||
// Event.stopPropagation() stops any following invocation
|
|
||||||
// of an event handler for any following event targets.
|
|
||||||
return finishDispatch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return finishDispatch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const EventTargetShimWithRealType = EventTarget;
|
|
||||||
export { EventTargetShimWithRealType as EventTarget, EventTargetShimWithRealType as EventTargetShim, };
|
|
||||||
const enumerableProperty = { __proto__: null };
|
|
||||||
enumerableProperty.enumerable = true;
|
|
||||||
Object.freeze(enumerableProperty);
|
|
||||||
// TODO: Remove this when we remove support for vm modules (--experimental-vm-modules).
|
|
||||||
const EventShim = (_a = class Event {
|
|
||||||
constructor(type, options = {}) {
|
|
||||||
_Event_cancelable.set(this, false);
|
|
||||||
_Event_bubbles.set(this, false);
|
|
||||||
_Event_composed.set(this, false);
|
|
||||||
_Event_defaultPrevented.set(this, false);
|
|
||||||
_Event_timestamp.set(this, Date.now());
|
|
||||||
_Event_propagationStopped.set(this, false);
|
|
||||||
_Event_type.set(this, void 0);
|
|
||||||
_Event_target.set(this, void 0);
|
|
||||||
_Event_isBeingDispatched.set(this, void 0);
|
|
||||||
this.NONE = NONE;
|
|
||||||
this.CAPTURING_PHASE = CAPTURING_PHASE;
|
|
||||||
this.AT_TARGET = AT_TARGET;
|
|
||||||
this.BUBBLING_PHASE = BUBBLING_PHASE;
|
|
||||||
if (arguments.length === 0)
|
|
||||||
throw new Error(`The type argument must be specified`);
|
|
||||||
if (typeof options !== 'object' || !options) {
|
|
||||||
throw new Error(`The "options" argument must be an object`);
|
|
||||||
}
|
|
||||||
const { bubbles, cancelable, composed } = options;
|
|
||||||
__classPrivateFieldSet(this, _Event_cancelable, !!cancelable, "f");
|
|
||||||
__classPrivateFieldSet(this, _Event_bubbles, !!bubbles, "f");
|
|
||||||
__classPrivateFieldSet(this, _Event_composed, !!composed, "f");
|
|
||||||
__classPrivateFieldSet(this, _Event_type, `${type}`, "f");
|
|
||||||
__classPrivateFieldSet(this, _Event_target, null, "f");
|
|
||||||
__classPrivateFieldSet(this, _Event_isBeingDispatched, false, "f");
|
|
||||||
}
|
|
||||||
initEvent(_type, _bubbles, _cancelable) {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
stopImmediatePropagation() {
|
|
||||||
this.stopPropagation();
|
|
||||||
}
|
|
||||||
preventDefault() {
|
|
||||||
__classPrivateFieldSet(this, _Event_defaultPrevented, true, "f");
|
|
||||||
}
|
|
||||||
get target() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
||||||
}
|
|
||||||
get currentTarget() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
||||||
}
|
|
||||||
get srcElement() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
||||||
}
|
|
||||||
get type() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_type, "f");
|
|
||||||
}
|
|
||||||
get cancelable() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_cancelable, "f");
|
|
||||||
}
|
|
||||||
get defaultPrevented() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_cancelable, "f") && __classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
||||||
}
|
|
||||||
get timeStamp() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_timestamp, "f");
|
|
||||||
}
|
|
||||||
composedPath() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? [__classPrivateFieldGet(this, _Event_target, "f")] : [];
|
|
||||||
}
|
|
||||||
get returnValue() {
|
|
||||||
return !__classPrivateFieldGet(this, _Event_cancelable, "f") || !__classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
||||||
}
|
|
||||||
get bubbles() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_bubbles, "f");
|
|
||||||
}
|
|
||||||
get composed() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_composed, "f");
|
|
||||||
}
|
|
||||||
get eventPhase() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? _a.AT_TARGET : _a.NONE;
|
|
||||||
}
|
|
||||||
get cancelBubble() {
|
|
||||||
return __classPrivateFieldGet(this, _Event_propagationStopped, "f");
|
|
||||||
}
|
|
||||||
set cancelBubble(value) {
|
|
||||||
if (value) {
|
|
||||||
__classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stopPropagation() {
|
|
||||||
__classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
||||||
}
|
|
||||||
get isTrusted() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_Event_cancelable = new WeakMap(),
|
|
||||||
_Event_bubbles = new WeakMap(),
|
|
||||||
_Event_composed = new WeakMap(),
|
|
||||||
_Event_defaultPrevented = new WeakMap(),
|
|
||||||
_Event_timestamp = new WeakMap(),
|
|
||||||
_Event_propagationStopped = new WeakMap(),
|
|
||||||
_Event_type = new WeakMap(),
|
|
||||||
_Event_target = new WeakMap(),
|
|
||||||
_Event_isBeingDispatched = new WeakMap(),
|
|
||||||
_a.NONE = NONE,
|
|
||||||
_a.CAPTURING_PHASE = CAPTURING_PHASE,
|
|
||||||
_a.AT_TARGET = AT_TARGET,
|
|
||||||
_a.BUBBLING_PHASE = BUBBLING_PHASE,
|
|
||||||
_a);
|
|
||||||
Object.defineProperties(EventShim.prototype, {
|
|
||||||
initEvent: enumerableProperty,
|
|
||||||
stopImmediatePropagation: enumerableProperty,
|
|
||||||
preventDefault: enumerableProperty,
|
|
||||||
target: enumerableProperty,
|
|
||||||
currentTarget: enumerableProperty,
|
|
||||||
srcElement: enumerableProperty,
|
|
||||||
type: enumerableProperty,
|
|
||||||
cancelable: enumerableProperty,
|
|
||||||
defaultPrevented: enumerableProperty,
|
|
||||||
timeStamp: enumerableProperty,
|
|
||||||
composedPath: enumerableProperty,
|
|
||||||
returnValue: enumerableProperty,
|
|
||||||
bubbles: enumerableProperty,
|
|
||||||
composed: enumerableProperty,
|
|
||||||
eventPhase: enumerableProperty,
|
|
||||||
cancelBubble: enumerableProperty,
|
|
||||||
stopPropagation: enumerableProperty,
|
|
||||||
isTrusted: enumerableProperty,
|
|
||||||
});
|
|
||||||
// TODO: Remove this when we remove support for vm modules (--experimental-vm-modules).
|
|
||||||
const CustomEventShim = (_b = class CustomEvent extends EventShim {
|
|
||||||
constructor(type, options = {}) {
|
|
||||||
super(type, options);
|
|
||||||
_CustomEvent_detail.set(this, void 0);
|
|
||||||
__classPrivateFieldSet(this, _CustomEvent_detail, options?.detail ?? null, "f");
|
|
||||||
}
|
|
||||||
initCustomEvent(_type, _bubbles, _cancelable, _detail) {
|
|
||||||
throw new Error('Method not implemented.');
|
|
||||||
}
|
|
||||||
get detail() {
|
|
||||||
return __classPrivateFieldGet(this, _CustomEvent_detail, "f");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
_CustomEvent_detail = new WeakMap(),
|
|
||||||
_b);
|
|
||||||
Object.defineProperties(CustomEventShim.prototype, {
|
|
||||||
detail: enumerableProperty,
|
|
||||||
});
|
|
||||||
const EventShimWithRealType = EventShim;
|
|
||||||
const CustomEventShimWithRealType = CustomEventShim;
|
|
||||||
export { EventShimWithRealType as Event, EventShimWithRealType as EventShim, CustomEventShimWithRealType as CustomEvent, CustomEventShimWithRealType as CustomEventShim, };
|
|
||||||
//# sourceMappingURL=events.js.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.js.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/lib/events.js.map
generated
vendored
File diff suppressed because one or more lines are too long
69
ui/node_modules/@lit-labs/ssr-dom-shim/package.json
generated
vendored
69
ui/node_modules/@lit-labs/ssr-dom-shim/package.json
generated
vendored
|
|
@ -1,69 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@lit-labs/ssr-dom-shim",
|
|
||||||
"version": "1.5.1",
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"description": "DOM shim for Lit Server Side Rendering (SSR)",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"author": "Google LLC",
|
|
||||||
"homepage": "https://github.com/lit/lit/tree/main/packages/labs/ssr-dom-shim",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/lit/lit.git",
|
|
||||||
"directory": "packages/labs/ssr-dom-shim"
|
|
||||||
},
|
|
||||||
"main": "index.js",
|
|
||||||
"typings": "index.d.ts",
|
|
||||||
"type": "module",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"types": "./index.d.ts",
|
|
||||||
"default": "./index.js"
|
|
||||||
},
|
|
||||||
"./register-css-hook.js": {
|
|
||||||
"types": "./register-css-hook.d.ts",
|
|
||||||
"default": "./register-css-hook.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"index.{d.ts,d.ts.map,js,js.map}",
|
|
||||||
"register-css-hook.{d.ts,d.ts.map,js,js.map}",
|
|
||||||
"lib/"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"build": "wireit",
|
|
||||||
"build:ts": "wireit",
|
|
||||||
"test": "wireit"
|
|
||||||
},
|
|
||||||
"wireit": {
|
|
||||||
"build": {
|
|
||||||
"dependencies": [
|
|
||||||
"build:ts"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"build:ts": {
|
|
||||||
"command": "tsc --build --pretty",
|
|
||||||
"clean": "if-file-deleted",
|
|
||||||
"files": [
|
|
||||||
"src/**/*.ts",
|
|
||||||
"tsconfig.json"
|
|
||||||
],
|
|
||||||
"output": [
|
|
||||||
"lib/",
|
|
||||||
"index.{d.ts,d.ts.map,js,js.map}",
|
|
||||||
"tsconfig.tsbuildinfo"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"test": {
|
|
||||||
"command": "uvu test \"_test\\.js$\"",
|
|
||||||
"dependencies": [
|
|
||||||
"build"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"NODE_OPTIONS": "--enable-source-maps --import ./register-css-hook.js"
|
|
||||||
},
|
|
||||||
"output": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
7
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.d.ts
generated
vendored
7
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.d.ts
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2024 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
export {};
|
|
||||||
//# sourceMappingURL=register-css-hook.d.ts.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.d.ts.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"register-css-hook.d.ts","sourceRoot":"","sources":["src/register-css-hook.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
||||||
39
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.js
generated
vendored
39
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.js
generated
vendored
|
|
@ -1,39 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2024 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
try {
|
|
||||||
// Detect whether the environment supports importing CSS files.
|
|
||||||
const cssImportsSupported = await import('./detection.css', {
|
|
||||||
with: { type: 'css' },
|
|
||||||
})
|
|
||||||
.then(() => true)
|
|
||||||
.catch(() => false);
|
|
||||||
// Avoid breaking non-Node.js environments by checking for the
|
|
||||||
// existance of register on the node:module import.
|
|
||||||
const nodeModule = cssImportsSupported ? null : await import('node:module');
|
|
||||||
if (nodeModule && 'register' in nodeModule.default) {
|
|
||||||
/**
|
|
||||||
* This module registers a Node.js Hook for loading CSS
|
|
||||||
* files as CSSStyleSheet instances.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* import styles from 'my-styles.css' with {type: 'css'};
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with
|
|
||||||
* @see https://nodejs.org/api/module.html#customization-hooks
|
|
||||||
*/
|
|
||||||
nodeModule.default.register('./lib/css-hook.js', {
|
|
||||||
parentURL: import.meta.url,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
/* empty */
|
|
||||||
}
|
|
||||||
export {};
|
|
||||||
//# sourceMappingURL=register-css-hook.js.map
|
|
||||||
1
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.js.map
generated
vendored
1
ui/node_modules/@lit-labs/ssr-dom-shim/register-css-hook.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"register-css-hook.js","sourceRoot":"","sources":["src/register-css-hook.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,IAAI,CAAC;IACH,+DAA+D;IAC/D,MAAM,mBAAmB,GAAG,MAAM,MAAM,CAAC,iBAAiB,EAAE;QAC1D,IAAI,EAAE,EAAC,IAAI,EAAE,KAAK,EAAC;KACpB,CAAC;SACC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;SAChB,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;IAEtB,8DAA8D;IAC9D,mDAAmD;IACnD,MAAM,UAAU,GAAG,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IAC5E,IAAI,UAAU,IAAI,UAAU,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;QACnD;;;;;;;;;;;;WAYG;QACH,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,EAAE;YAC/C,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG;SAC3B,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAAC,MAAM,CAAC;IACP,WAAW;AACb,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2024 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\ntry {\n // Detect whether the environment supports importing CSS files.\n const cssImportsSupported = await import('./detection.css', {\n with: {type: 'css'},\n })\n .then(() => true)\n .catch(() => false);\n\n // Avoid breaking non-Node.js environments by checking for the\n // existance of register on the node:module import.\n const nodeModule = cssImportsSupported ? null : await import('node:module');\n if (nodeModule && 'register' in nodeModule.default) {\n /**\n * This module registers a Node.js Hook for loading CSS\n * files as CSSStyleSheet instances.\n *\n * @example\n *\n * ```ts\n * import styles from 'my-styles.css' with {type: 'css'};\n * ```\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with\n * @see https://nodejs.org/api/module.html#customization-hooks\n */\n nodeModule.default.register('./lib/css-hook.js', {\n parentURL: import.meta.url,\n });\n }\n} catch {\n /* empty */\n}\n"]}
|
|
||||||
28
ui/node_modules/@lit/reactive-element/LICENSE
generated
vendored
28
ui/node_modules/@lit/reactive-element/LICENSE
generated
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
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.
|
|
||||||
85
ui/node_modules/@lit/reactive-element/README.md
generated
vendored
85
ui/node_modules/@lit/reactive-element/README.md
generated
vendored
|
|
@ -1,85 +0,0 @@
|
||||||
# ReactiveElement
|
|
||||||
|
|
||||||
A simple low level base class for creating fast, lightweight web components.
|
|
||||||
|
|
||||||
[](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)
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
Full documentation is available at [lit.dev/docs/api/ReactiveElement/](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
ui/node_modules/@lit/reactive-element/css-tag.d.ts
generated
vendored
67
ui/node_modules/@lit/reactive-element/css-tag.d.ts
generated
vendored
|
|
@ -1,67 +0,0 @@
|
||||||
/**
|
|
||||||
* @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 type CSSResultOrNative = CSSResult | CSSStyleSheet;
|
|
||||||
export type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;
|
|
||||||
/**
|
|
||||||
* A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.
|
|
||||||
*/
|
|
||||||
export 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 the native feature](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets).
|
|
||||||
* 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
ui/node_modules/@lit/reactive-element/css-tag.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/css-tag.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"css-tag.d.ts","sourceRoot":"","sources":["../src/css-tag.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,OAIJ,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,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,GAAI,OAAO,OAAO,cAKrC,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,GACd,SAAS,oBAAoB,EAC7B,GAAG,QAAQ,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,KACrC,SAaF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GACtB,YAAY,UAAU,EACtB,QAAQ,KAAK,CAAC,iBAAiB,CAAC,SAkBjC,CAAC;AAUF,eAAO,MAAM,kBAAkB,MAGrB,iBAAiB,sBAEwC,CAAC"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/css-tag.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/css-tag.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};
|
|
||||||
//# sourceMappingURL=css-tag.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/css-tag.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/css-tag.js.map
generated
vendored
File diff suppressed because one or more lines are too long
15
ui/node_modules/@lit/reactive-element/decorators.d.ts
generated
vendored
15
ui/node_modules/@lit/reactive-element/decorators.d.ts
generated
vendored
|
|
@ -1,15 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
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
ui/node_modules/@lit/reactive-element/decorators.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,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
ui/node_modules/@lit/reactive-element/decorators.js
generated
vendored
2
ui/node_modules/@lit/reactive-element/decorators.js
generated
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
export{customElement}from"./decorators/custom-element.js";export{property,standardProperty}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
ui/node_modules/@lit/reactive-element/decorators.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"decorators.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
||||||
17
ui/node_modules/@lit/reactive-element/decorators/base.d.ts
generated
vendored
17
ui/node_modules/@lit/reactive-element/decorators/base.d.ts
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Generates a public interface type that removes private and protected fields.
|
|
||||||
* This allows accepting otherwise incompatible versions of the type (e.g. from
|
|
||||||
* multiple copies of the same package in `node_modules`).
|
|
||||||
*/
|
|
||||||
export type Interface<T> = {
|
|
||||||
[K in keyof T]: T[K];
|
|
||||||
};
|
|
||||||
export type Constructor<T> = {
|
|
||||||
new (...args: any[]): T;
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=base.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/base.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/base.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/decorators/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAE3B,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB,CAAC"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/base.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/base.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
const e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};
|
|
||||||
//# sourceMappingURL=base.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/base.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/base.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"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\n/**\n * Generates a public interface type that removes private and protected fields.\n * This allows accepting otherwise incompatible 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/**\n * Wraps up a few best practices when returning a property descriptor from a\n * decorator.\n *\n * Marks the defined property as configurable, and enumerable, and handles\n * the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular\n * apps).\n *\n * @internal\n */\nexport const desc = (\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>,\n descriptor: PropertyDescriptor\n) => {\n // For backwards compatibility, we keep them configurable and enumerable.\n descriptor.configurable = true;\n descriptor.enumerable = true;\n if (\n // We check for Reflect.decorate each time, in case the zombiefill\n // is applied via lazy loading some Angular code.\n (Reflect as typeof Reflect & {decorate?: unknown}).decorate &&\n typeof name !== 'object'\n ) {\n // If we're called as a legacy decorator, and Reflect.decorate is present\n // then we have no guarantees that the returned descriptor will be\n // defined on the class, so we must apply it directly ourselves.\n\n Object.defineProperty(obj, name, descriptor);\n }\n return descriptor;\n};\n"],"names":["desc","obj","name","descriptor","configurable","enumerable","Reflect","decorate","Object","defineProperty"],"mappings":";;;;;AA8BO,MAAMA,EAAO,CAClBC,EACAC,EACAC,KAGAA,EAAWC,cAAe,EAC1BD,EAAWE,YAAa,EAIrBC,QAAkDC,UACnC,iBAATL,GAMPM,OAAOC,eAAeR,EAAKC,EAAMC,GAE5BA"}
|
|
||||||
31
ui/node_modules/@lit/reactive-element/decorators/custom-element.d.ts
generated
vendored
31
ui/node_modules/@lit/reactive-element/decorators/custom-element.d.ts
generated
vendored
|
|
@ -1,31 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { Constructor } from './base.js';
|
|
||||||
/**
|
|
||||||
* Allow for custom element classes with private constructors
|
|
||||||
*/
|
|
||||||
type CustomElementClass = Omit<typeof HTMLElement, 'new'>;
|
|
||||||
export type CustomElementDecorator = {
|
|
||||||
(cls: CustomElementClass): void;
|
|
||||||
(target: CustomElementClass, context: ClassDecoratorContext<Constructor<HTMLElement>>): void;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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) => CustomElementDecorator;
|
|
||||||
export {};
|
|
||||||
//# sourceMappingURL=custom-element.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/custom-element.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"custom-element.d.ts","sourceRoot":"","sources":["../../src/decorators/custom-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAAC,OAAO,WAAW,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG;IAEnC,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAGhC,CACE,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,qBAAqB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,GACvD,IAAI,CAAC;CACT,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,GACvB,SAAS,MAAM,KAAG,sBAelB,CAAC"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/custom-element.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/custom-element.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
const t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};
|
|
||||||
//# sourceMappingURL=custom-element.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/custom-element.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/custom-element.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"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 */\n\nimport type {Constructor} from './base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport type CustomElementDecorator = {\n // legacy\n (cls: CustomElementClass): void;\n\n // standard\n (\n target: CustomElementClass,\n context: ClassDecoratorContext<Constructor<HTMLElement>>\n ): void;\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): CustomElementDecorator =>\n (\n classOrTarget: CustomElementClass | Constructor<HTMLElement>,\n context?: ClassDecoratorContext<Constructor<HTMLElement>>\n ) => {\n if (context !== undefined) {\n context.addInitializer(() => {\n customElements.define(\n tagName,\n classOrTarget as CustomElementConstructor\n );\n });\n } else {\n customElements.define(tagName, classOrTarget as CustomElementConstructor);\n }\n };\n"],"names":["customElement","tagName","classOrTarget","context","undefined","addInitializer","customElements","define"],"mappings":";;;;;AA6CO,MAAMA,EACVC,GACD,CACEC,EACAC,UAEgBC,IAAZD,EACFA,EAAQE,eAAe,KACrBC,eAAeC,OACbN,EACAC,KAIJI,eAAeC,OAAON,EAASC"}
|
|
||||||
43
ui/node_modules/@lit/reactive-element/decorators/event-options.d.ts
generated
vendored
43
ui/node_modules/@lit/reactive-element/decorators/event-options.d.ts
generated
vendored
|
|
@ -1,43 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { ReactiveElement } from '../reactive-element.js';
|
|
||||||
import type { Interface } from './base.js';
|
|
||||||
export type EventOptionsDecorator = {
|
|
||||||
(proto: Interface<ReactiveElement>, name: PropertyKey): void | any;
|
|
||||||
<C, V extends (this: C, ...args: any) => any>(value: V, _context: ClassMethodDecoratorContext<C, V>): void;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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): EventOptionsDecorator;
|
|
||||||
//# sourceMappingURL=event-options.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/event-options.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/event-options.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"event-options.d.ts","sourceRoot":"","sources":["../../src/decorators/event-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG;IAElC,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,GAGhB,IAAI,GAAG,GAAG,CAAC;IAId,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,EAC1C,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,2BAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1C,IAAI,CAAC;CACT,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,uBAAuB,GAC/B,qBAAqB,CAYvB"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/event-options.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/event-options.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
function t(t){return(n,o)=>{const c="function"==typeof n?n:n[o];Object.assign(c,t)}}export{t as eventOptions};
|
|
||||||
//# sourceMappingURL=event-options.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/event-options.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/event-options.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"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 type {ReactiveElement} from '../reactive-element.js';\nimport type {Interface} from './base.js';\n\nexport type EventOptionsDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\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\n // standard\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n <C, V extends (this: C, ...args: any) => any>(\n value: V,\n _context: ClassMethodDecoratorContext<C, V>\n ): void;\n};\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(\n options: AddEventListenerOptions\n): EventOptionsDecorator {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (<C, V extends (this: C, ...args: any) => any>(\n protoOrValue: V,\n nameOrContext: PropertyKey | ClassMethodDecoratorContext<C, V>\n ) => {\n const method =\n typeof protoOrValue === 'function'\n ? protoOrValue\n : protoOrValue[nameOrContext as keyof ReactiveElement];\n Object.assign(method, options);\n }) as EventOptionsDecorator;\n}\n"],"names":["eventOptions","options","protoOrValue","nameOrContext","method","Object","assign"],"mappings":";;;;;AA+DM,SAAUA,EACdC,GAGA,MAAA,CACEC,EACAC,KAEA,MAAMC,EACoB,mBAAjBF,EACHA,EACAA,EAAaC,GACnBE,OAAOC,OAAOF,EAAQH,EACvB,CACH"}
|
|
||||||
55
ui/node_modules/@lit/reactive-element/decorators/property.d.ts
generated
vendored
55
ui/node_modules/@lit/reactive-element/decorators/property.d.ts
generated
vendored
|
|
@ -1,55 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import { type PropertyDeclaration, type ReactiveElement } from '../reactive-element.js';
|
|
||||||
import type { Interface } from './base.js';
|
|
||||||
export type PropertyDecorator = {
|
|
||||||
<C extends Interface<ReactiveElement>, V>(target: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
|
|
||||||
<C extends Interface<ReactiveElement>, V>(target: (value: V) => void, context: ClassSetterDecoratorContext<C, V>): (this: C, value: V) => void;
|
|
||||||
(protoOrDescriptor: Object, name: PropertyKey, descriptor?: PropertyDescriptor): any;
|
|
||||||
};
|
|
||||||
type StandardPropertyContext<C, V> = (ClassAccessorDecoratorContext<C, V> | ClassSetterDecoratorContext<C, V>) & {
|
|
||||||
metadata: object;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Wraps a class accessor or setter so that `requestUpdate()` is called with the
|
|
||||||
* property name and old value when the accessor is set.
|
|
||||||
*/
|
|
||||||
export declare const standardProperty: <C extends Interface<ReactiveElement>, V>(options: PropertyDeclaration | undefined, target: ClassAccessorDecoratorTarget<C, V> | ((value: V) => void), context: StandardPropertyContext<C, V>) => ClassAccessorDecoratorResult<C, V> | ((this: C, value: V) => void);
|
|
||||||
/**
|
|
||||||
* A class field or accessor 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): PropertyDecorator;
|
|
||||||
export {};
|
|
||||||
//# sourceMappingURL=property.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/property.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/property.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../src/decorators/property.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAGrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AA+BzC,MAAM,MAAM,iBAAiB,GAAG;IAE9B,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EAC1C,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAGtC,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC1B,OAAO,EAAE,2BAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,GACzC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAG/B,CACE,iBAAiB,EAAE,MAAM,EACzB,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAE9B,GAAG,CAAC;CACR,CAAC;AA+BF,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CACjC,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GACnC,2BAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,CACpC,GAAG;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC;AAEvB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,EACtE,SAAS,mBAAmB,YAA6B,EACzD,QAAQ,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,EACjE,SAAS,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,KACrC,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,CAwDnE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,iBAAiB,CA4BzE"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/property.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/property.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
import{notEqual as t,defaultConverter as e}from"../reactive-element.js";
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),"accessor"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error("Unsupported decorator location: "+n)};function n(t){return(e,o)=>"object"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};
|
|
||||||
//# sourceMappingURL=property.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/property.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/property.js.map
generated
vendored
File diff suppressed because one or more lines are too long
37
ui/node_modules/@lit/reactive-element/decorators/query-all.d.ts
generated
vendored
37
ui/node_modules/@lit/reactive-element/decorators/query-all.d.ts
generated
vendored
|
|
@ -1,37 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { ReactiveElement } from '../reactive-element.js';
|
|
||||||
import { type Interface } from './base.js';
|
|
||||||
export type QueryAllDecorator = {
|
|
||||||
(proto: Interface<ReactiveElement>, name: PropertyKey, descriptor?: PropertyDescriptor): void | any;
|
|
||||||
<C extends Interface<ReactiveElement>, V extends NodeList>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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): QueryAllDecorator;
|
|
||||||
//# sourceMappingURL=query-all.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-all.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-all.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"query-all.d.ts","sourceRoot":"","sources":["../../src/decorators/query-all.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG;IAE9B,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,QAAQ,EACvD,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAMF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAa5D"}
|
|
||||||
8
ui/node_modules/@lit/reactive-element/decorators/query-all.js
generated
vendored
8
ui/node_modules/@lit/reactive-element/decorators/query-all.js
generated
vendored
|
|
@ -1,8 +0,0 @@
|
||||||
import{desc as t}from"./base.js";
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
let e;function r(r){return(n,o)=>t(n,o,{get(){return(this.renderRoot??(e??=document.createDocumentFragment())).querySelectorAll(r)}})}export{r as queryAll};
|
|
||||||
//# sourceMappingURL=query-all.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-all.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-all.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"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 */\nimport type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAllDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\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\n // standard\n <C extends Interface<ReactiveElement>, V extends NodeList>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n};\n\n// Shared fragment used to generate empty NodeLists when a render root is\n// undefined\nlet fragment: DocumentFragment;\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): QueryAllDecorator {\n return ((\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>\n ) => {\n return desc(obj, name, {\n get(this: ReactiveElement) {\n const container =\n this.renderRoot ?? (fragment ??= document.createDocumentFragment());\n return container.querySelectorAll(selector);\n },\n });\n }) as QueryAllDecorator;\n}\n"],"names":["fragment","queryAll","selector","obj","name","desc","get","this","renderRoot","document","createDocumentFragment","querySelectorAll"],"mappings":";;;;;;AAkCA,IAAIA,EA0BE,SAAUC,EAASC,GACvB,MAAA,CACEC,EACAC,IAEOC,EAAKF,EAAKC,EAAM,CACrB,GAAAE,GAGE,OADEC,KAAKC,aAAeR,IAAaS,SAASC,2BAC3BC,iBAAiBT,EACpC,GAGN"}
|
|
||||||
55
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts
generated
vendored
55
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts
generated
vendored
|
|
@ -1,55 +0,0 @@
|
||||||
/**
|
|
||||||
* @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';
|
|
||||||
import { type Interface } from './base.js';
|
|
||||||
export type QueryAssignedElementsDecorator = {
|
|
||||||
(proto: Interface<ReactiveElement>, name: PropertyKey, descriptor?: PropertyDescriptor): void | any;
|
|
||||||
<C extends Interface<ReactiveElement>, V extends Array<Element>>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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): QueryAssignedElementsDecorator;
|
|
||||||
//# sourceMappingURL=query-assigned-elements.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"query-assigned-elements.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-elements.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,8BAA8B,GAAG;IAE3C,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAC7D,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,4BACf,SAAQ,yBAAyB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,4BAA4B,GACrC,8BAA8B,CAoBhC"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
import{desc as t}from"./base.js";
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2021 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/function o(o){return(e,n)=>{const{slot:r,selector:s}=o??{},c="slot"+(r?`[name=${r}]`:":not([name])");return t(e,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter(t=>t.matches(s))}})}}export{o as queryAssignedElements};
|
|
||||||
//# sourceMappingURL=query-assigned-elements.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"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 type {ReactiveElement} from '../reactive-element.js';\nimport type {QueryAssignedNodesOptions} from './query-assigned-nodes.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAssignedElementsDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\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\n // standard\n <C extends Interface<ReactiveElement>, V extends Array<Element>>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\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(\n options?: QueryAssignedElementsOptions\n): QueryAssignedElementsDecorator {\n return (<V extends Array<Element>>(\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>\n ) => {\n const {slot, selector} = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get(this: ReactiveElement): V {\n const slotEl =\n this.renderRoot?.querySelector<HTMLSlotElement>(slotSelector);\n const elements = slotEl?.assignedElements(options) ?? [];\n return (\n selector === undefined\n ? elements\n : elements.filter((node) => node.matches(selector))\n ) as V;\n },\n });\n }) as QueryAssignedElementsDecorator;\n}\n"],"names":["queryAssignedElements","options","obj","name","slot","selector","slotSelector","desc","get","slotEl","this","renderRoot","querySelector","elements","assignedElements","undefined","filter","node","matches"],"mappings":";;;;;GA6EM,SAAUA,EACdC,GAEA,MAAA,CACEC,EACAC,KAEA,MAAMC,KAACA,EAAIC,SAAEA,GAAYJ,GAAW,CAAA,EAC9BK,EAAe,QAAOF,EAAO,SAASA,KAAU,gBACtD,OAAOG,EAAKL,EAAKC,EAAM,CACrB,GAAAK,GACE,MAAMC,EACJC,KAAKC,YAAYC,cAA+BN,GAC5CO,EAAWJ,GAAQK,iBAAiBb,IAAY,GACtD,YACec,IAAbV,EACIQ,EACAA,EAASG,OAAQC,GAASA,EAAKC,QAAQb,GAE/C,GAEH,CACH"}
|
|
||||||
49
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts
generated
vendored
49
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts
generated
vendored
|
|
@ -1,49 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { ReactiveElement } from '../reactive-element.js';
|
|
||||||
import { type Interface } from './base.js';
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
export type QueryAssignedNodesDecorator = {
|
|
||||||
(proto: Interface<ReactiveElement>, name: PropertyKey, descriptor?: PropertyDescriptor): void | any;
|
|
||||||
<C extends Interface<ReactiveElement>, V extends Array<Node>>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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>`. Use the
|
|
||||||
* queryAssignedElements decorator to list only elements, and optionally filter
|
|
||||||
* the element list using a CSS selector.
|
|
||||||
*
|
|
||||||
* @category Decorator
|
|
||||||
*/
|
|
||||||
export declare function queryAssignedNodes(options?: QueryAssignedNodesOptions): QueryAssignedNodesDecorator;
|
|
||||||
//# sourceMappingURL=query-assigned-nodes.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"query-assigned-nodes.d.ts","sourceRoot":"","sources":["../../src/decorators/query-assigned-nodes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,2BAA2B,GAAG;IAExC,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,EAC1D,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,CAAC,EAAE,yBAAyB,GAClC,2BAA2B,CAgB7B"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
import{desc as t}from"./base.js";
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/function n(n){return(o,r)=>{const{slot:e}=n??{},s="slot"+(e?`[name=${e}]`:":not([name])");return t(o,r,{get(){const t=this.renderRoot?.querySelector(s);return t?.assignedNodes(n)??[]}})}}export{n as queryAssignedNodes};
|
|
||||||
//# sourceMappingURL=query-assigned-nodes.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"query-assigned-nodes.js","sources":["../src/decorators/query-assigned-nodes.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 type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\n/**\n * Options for the {@linkcode queryAssignedNodes} decorator. Extends the options\n * that can be passed into [HTMLSlotElement.assignedNodes](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedNodes).\n */\nexport interface QueryAssignedNodesOptions extends AssignedNodesOptions {\n /**\n * Name of the slot to query. Leave empty for the default slot.\n */\n slot?: string;\n}\n\nexport type QueryAssignedNodesDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\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\n // standard\n <C extends Interface<ReactiveElement>, V extends Array<Node>>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n};\n\n/**\n * A property decorator that converts a class property into a getter that\n * returns the `assignedNodes` of the given `slot`.\n *\n * Can be passed an optional {@linkcode QueryAssignedNodesOptions} object.\n *\n * Example usage:\n * ```ts\n * class MyElement {\n * @queryAssignedNodes({slot: 'list', flatten: true})\n * listItems!: Array<Node>;\n *\n * render() {\n * return html`\n * <slot name=\"list\"></slot>\n * `;\n * }\n * }\n * ```\n *\n * Note the type of this property should be annotated as `Array<Node>`. Use the\n * queryAssignedElements decorator to list only elements, and optionally filter\n * the element list using a CSS selector.\n *\n * @category Decorator\n */\nexport function queryAssignedNodes(\n options?: QueryAssignedNodesOptions\n): QueryAssignedNodesDecorator {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (<V extends Array<Node>>(\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>\n ) => {\n const {slot} = options ?? {};\n const slotSelector = `slot${slot ? `[name=${slot}]` : ':not([name])'}`;\n return desc(obj, name, {\n get(this: ReactiveElement): V {\n const slotEl =\n this.renderRoot?.querySelector<HTMLSlotElement>(slotSelector);\n return (slotEl?.assignedNodes(options) ?? []) as unknown as V;\n },\n });\n }) as QueryAssignedNodesDecorator;\n}\n"],"names":["queryAssignedNodes","options","obj","name","slot","slotSelector","desc","get","slotEl","this","renderRoot","querySelector","assignedNodes"],"mappings":";;;;;GAqEM,SAAUA,EACdC,GAGA,MAAA,CACEC,EACAC,KAEA,MAAMC,KAACA,GAAQH,GAAW,CAAA,EACpBI,EAAe,QAAOD,EAAO,SAASA,KAAU,gBACtD,OAAOE,EAAKJ,EAAKC,EAAM,CACrB,GAAAI,GACE,MAAMC,EACJC,KAAKC,YAAYC,cAA+BN,GAClD,OAAQG,GAAQI,cAAcX,IAAY,EAC5C,GAEH,CACH"}
|
|
||||||
45
ui/node_modules/@lit/reactive-element/decorators/query-async.d.ts
generated
vendored
45
ui/node_modules/@lit/reactive-element/decorators/query-async.d.ts
generated
vendored
|
|
@ -1,45 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { ReactiveElement } from '../reactive-element.js';
|
|
||||||
import { type Interface } from './base.js';
|
|
||||||
export type QueryAsyncDecorator = {
|
|
||||||
(proto: Interface<ReactiveElement>, name: PropertyKey, descriptor?: PropertyDescriptor): void | any;
|
|
||||||
<C extends Interface<ReactiveElement>, V extends Promise<Element | null>>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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): QueryAsyncDecorator;
|
|
||||||
//# sourceMappingURL=query-async.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-async.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-async.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"query-async.d.ts","sourceRoot":"","sources":["../../src/decorators/query-async.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG;IAEhC,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EACtE,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAOF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAWnC,mBAAmB,CAC1B"}
|
|
||||||
8
ui/node_modules/@lit/reactive-element/decorators/query-async.js
generated
vendored
8
ui/node_modules/@lit/reactive-element/decorators/query-async.js
generated
vendored
|
|
@ -1,8 +0,0 @@
|
||||||
import{desc as t}from"./base.js";
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
function r(r){return(n,e)=>t(n,e,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(r)??null}})}export{r as queryAsync};
|
|
||||||
//# sourceMappingURL=query-async.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query-async.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query-async.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"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 type {ReactiveElement} from '../reactive-element.js';\nimport {desc, type Interface} from './base.js';\n\nexport type QueryAsyncDecorator = {\n // legacy\n (\n proto: Interface<ReactiveElement>,\n name: PropertyKey,\n descriptor?: PropertyDescriptor\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\n // standard\n <C extends Interface<ReactiveElement>, V extends Promise<Element | null>>(\n value: ClassAccessorDecoratorTarget<C, V>,\n context: ClassAccessorDecoratorContext<C, V>\n ): ClassAccessorDecoratorResult<C, V>;\n};\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 ((\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>\n ) => {\n return desc(obj, name, {\n async get(this: ReactiveElement) {\n await this.updateComplete;\n return this.renderRoot?.querySelector(selector) ?? null;\n },\n });\n }) as QueryAsyncDecorator;\n}\n"],"names":["queryAsync","selector","obj","name","desc","get","this","updateComplete","renderRoot","querySelector"],"mappings":";;;;;;AAsEM,SAAUA,EAAWC,GACzB,MAAA,CACEC,EACAC,IAEOC,EAAKF,EAAKC,EAAM,CACrB,SAAME,GAEJ,aADMC,KAAKC,eACJD,KAAKE,YAAYC,cAAcR,IAAa,IACrD,GAGN"}
|
|
||||||
38
ui/node_modules/@lit/reactive-element/decorators/query.d.ts
generated
vendored
38
ui/node_modules/@lit/reactive-element/decorators/query.d.ts
generated
vendored
|
|
@ -1,38 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { ReactiveElement } from '../reactive-element.js';
|
|
||||||
import { type Interface } from './base.js';
|
|
||||||
export type QueryDecorator = {
|
|
||||||
(proto: Interface<ReactiveElement>, name: PropertyKey, descriptor?: PropertyDescriptor): void | any;
|
|
||||||
<C extends Interface<ReactiveElement>, V extends Element | null>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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): QueryDecorator;
|
|
||||||
//# sourceMappingURL=query.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/decorators/query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAO,KAAK,SAAS,EAAC,MAAM,WAAW,CAAC;AA8B/C,MAAM,MAAM,cAAc,GAAG;IAE3B,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,EACjB,UAAU,CAAC,EAAE,kBAAkB,GAG9B,IAAI,GAAG,GAAG,CAAC;IAGd,CAAC,CAAC,SAAS,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,OAAO,GAAG,IAAI,EAC7D,KAAK,EAAE,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,EACzC,OAAO,EAAE,6BAA6B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3C,4BAA4B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,cAAc,CA4EvE"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/query.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/query.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
import{desc as t}from"./base.js";
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}="object"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};
|
|
||||||
//# sourceMappingURL=query.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/query.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/query.js.map
generated
vendored
File diff suppressed because one or more lines are too long
29
ui/node_modules/@lit/reactive-element/decorators/state.d.ts
generated
vendored
29
ui/node_modules/@lit/reactive-element/decorators/state.d.ts
generated
vendored
|
|
@ -1,29 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
export interface StateDeclaration<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;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @deprecated use StateDeclaration
|
|
||||||
*/
|
|
||||||
export type InternalPropertyDeclaration<Type = unknown> = StateDeclaration<Type>;
|
|
||||||
/**
|
|
||||||
* 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?: StateDeclaration): import("./property.js").PropertyDecorator;
|
|
||||||
//# sourceMappingURL=state.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/state.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/state.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/decorators/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,OAAO;IAC9C;;;;OAIG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,OAAO,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,CAAC,IAAI,GAAG,OAAO,IACpD,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAEzB;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,gBAAgB,6CAS/C"}
|
|
||||||
7
ui/node_modules/@lit/reactive-element/decorators/state.js
generated
vendored
7
ui/node_modules/@lit/reactive-element/decorators/state.js
generated
vendored
|
|
@ -1,7 +0,0 @@
|
||||||
import{property as t}from"./property.js";
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};
|
|
||||||
//# sourceMappingURL=state.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/decorators/state.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/decorators/state.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"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 StateDeclaration<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 * @deprecated use StateDeclaration\n */\nexport type InternalPropertyDeclaration<Type = unknown> =\n StateDeclaration<Type>;\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?: StateDeclaration) {\n return property({\n ...options,\n // Add both `state` and `attribute` because we found a third party\n // controller that is keying off of PropertyOptions.state to determine\n // whether a field is a private internal property or not.\n state: true,\n attribute: false,\n });\n}\n"],"names":["state","options","property","attribute"],"mappings":";;;;;GAwCM,SAAUA,EAAMC,GACpB,OAAOC,EAAS,IACXD,EAIHD,OAAO,EACPG,WAAW,GAEf"}
|
|
||||||
67
ui/node_modules/@lit/reactive-element/development/css-tag.d.ts
generated
vendored
67
ui/node_modules/@lit/reactive-element/development/css-tag.d.ts
generated
vendored
|
|
@ -1,67 +0,0 @@
|
||||||
/**
|
|
||||||
* @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 type CSSResultOrNative = CSSResult | CSSStyleSheet;
|
|
||||||
export type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;
|
|
||||||
/**
|
|
||||||
* A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.
|
|
||||||
*/
|
|
||||||
export 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 the native feature](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets).
|
|
||||||
* 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
ui/node_modules/@lit/reactive-element/development/css-tag.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/css-tag.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"css-tag.d.ts","sourceRoot":"","sources":["../src/css-tag.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,OAIJ,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,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,GAAI,OAAO,OAAO,cAKrC,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,GACd,SAAS,oBAAoB,EAC7B,GAAG,QAAQ,CAAC,cAAc,GAAG,MAAM,CAAC,EAAE,KACrC,SAaF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,GACtB,YAAY,UAAU,EACtB,QAAQ,KAAK,CAAC,iBAAiB,CAAC,SAkBjC,CAAC;AAUF,eAAO,MAAM,kBAAkB,MAGrB,iBAAiB,sBAEwC,CAAC"}
|
|
||||||
133
ui/node_modules/@lit/reactive-element/development/css-tag.js
generated
vendored
133
ui/node_modules/@lit/reactive-element/development/css-tag.js
generated
vendored
|
|
@ -1,133 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2019 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
const NODE_MODE = false;
|
|
||||||
// Allows minifiers to rename references to globalThis
|
|
||||||
const global = globalThis;
|
|
||||||
/**
|
|
||||||
* 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 the native feature](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets).
|
|
||||||
* 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 {
|
|
||||||
for (const s of styles) {
|
|
||||||
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
ui/node_modules/@lit/reactive-element/development/css-tag.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/css-tag.js.map
generated
vendored
File diff suppressed because one or more lines are too long
15
ui/node_modules/@lit/reactive-element/development/decorators.d.ts
generated
vendored
15
ui/node_modules/@lit/reactive-element/development/decorators.d.ts
generated
vendored
|
|
@ -1,15 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
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
ui/node_modules/@lit/reactive-element/development/decorators.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/decorators.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,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"}
|
|
||||||
18
ui/node_modules/@lit/reactive-element/development/decorators.js
generated
vendored
18
ui/node_modules/@lit/reactive-element/development/decorators.js
generated
vendored
|
|
@ -1,18 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
// This module exports decorators that are compatible both with standard
|
|
||||||
// decorators as implemented by TypeScript 5.2 and Babel, and with TypeScript's
|
|
||||||
// experimentalDecorators option.
|
|
||||||
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
ui/node_modules/@lit/reactive-element/development/decorators.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/decorators.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../src/decorators.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wEAAwE;AACxE,+EAA+E;AAC/E,iCAAiC;AAEjC,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// This module exports decorators that are compatible both with standard\n// decorators as implemented by TypeScript 5.2 and Babel, and with TypeScript's\n// experimentalDecorators option.\n\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"]}
|
|
||||||
17
ui/node_modules/@lit/reactive-element/development/decorators/base.d.ts
generated
vendored
17
ui/node_modules/@lit/reactive-element/development/decorators/base.d.ts
generated
vendored
|
|
@ -1,17 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Generates a public interface type that removes private and protected fields.
|
|
||||||
* This allows accepting otherwise incompatible versions of the type (e.g. from
|
|
||||||
* multiple copies of the same package in `node_modules`).
|
|
||||||
*/
|
|
||||||
export type Interface<T> = {
|
|
||||||
[K in keyof T]: T[K];
|
|
||||||
};
|
|
||||||
export type Constructor<T> = {
|
|
||||||
new (...args: any[]): T;
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=base.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/development/decorators/base.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/decorators/base.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/decorators/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KACxB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAE3B,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB,CAAC"}
|
|
||||||
32
ui/node_modules/@lit/reactive-element/development/decorators/base.js
generated
vendored
32
ui/node_modules/@lit/reactive-element/development/decorators/base.js
generated
vendored
|
|
@ -1,32 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Wraps up a few best practices when returning a property descriptor from a
|
|
||||||
* decorator.
|
|
||||||
*
|
|
||||||
* Marks the defined property as configurable, and enumerable, and handles
|
|
||||||
* the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular
|
|
||||||
* apps).
|
|
||||||
*
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
export const desc = (obj, name, descriptor) => {
|
|
||||||
// For backwards compatibility, we keep them configurable and enumerable.
|
|
||||||
descriptor.configurable = true;
|
|
||||||
descriptor.enumerable = true;
|
|
||||||
if (
|
|
||||||
// We check for Reflect.decorate each time, in case the zombiefill
|
|
||||||
// is applied via lazy loading some Angular code.
|
|
||||||
Reflect.decorate &&
|
|
||||||
typeof name !== 'object') {
|
|
||||||
// If we're called as a legacy decorator, and Reflect.decorate is present
|
|
||||||
// then we have no guarantees that the returned descriptor will be
|
|
||||||
// defined on the class, so we must apply it directly ourselves.
|
|
||||||
Object.defineProperty(obj, name, descriptor);
|
|
||||||
}
|
|
||||||
return descriptor;
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=base.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/development/decorators/base.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/decorators/base.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/decorators/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,GAAW,EACX,IAAmE,EACnE,UAA8B,EAC9B,EAAE;IACF,yEAAyE;IACzE,UAAU,CAAC,YAAY,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC;IAC7B;IACE,kEAAkE;IAClE,iDAAiD;IAChD,OAAiD,CAAC,QAAQ;QAC3D,OAAO,IAAI,KAAK,QAAQ,EACxB,CAAC;QACD,yEAAyE;QACzE,kEAAkE;QAClE,gEAAgE;QAEhE,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\n/**\n * Generates a public interface type that removes private and protected fields.\n * This allows accepting otherwise incompatible 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/**\n * Wraps up a few best practices when returning a property descriptor from a\n * decorator.\n *\n * Marks the defined property as configurable, and enumerable, and handles\n * the case where we have a busted Reflect.decorate zombiefill (e.g. in Angular\n * apps).\n *\n * @internal\n */\nexport const desc = (\n obj: object,\n name: PropertyKey | ClassAccessorDecoratorContext<unknown, unknown>,\n descriptor: PropertyDescriptor\n) => {\n // For backwards compatibility, we keep them configurable and enumerable.\n descriptor.configurable = true;\n descriptor.enumerable = true;\n if (\n // We check for Reflect.decorate each time, in case the zombiefill\n // is applied via lazy loading some Angular code.\n (Reflect as typeof Reflect & {decorate?: unknown}).decorate &&\n typeof name !== 'object'\n ) {\n // If we're called as a legacy decorator, and Reflect.decorate is present\n // then we have no guarantees that the returned descriptor will be\n // defined on the class, so we must apply it directly ourselves.\n\n Object.defineProperty(obj, name, descriptor);\n }\n return descriptor;\n};\n"]}
|
|
||||||
31
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts
generated
vendored
31
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts
generated
vendored
|
|
@ -1,31 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { Constructor } from './base.js';
|
|
||||||
/**
|
|
||||||
* Allow for custom element classes with private constructors
|
|
||||||
*/
|
|
||||||
type CustomElementClass = Omit<typeof HTMLElement, 'new'>;
|
|
||||||
export type CustomElementDecorator = {
|
|
||||||
(cls: CustomElementClass): void;
|
|
||||||
(target: CustomElementClass, context: ClassDecoratorContext<Constructor<HTMLElement>>): void;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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) => CustomElementDecorator;
|
|
||||||
export {};
|
|
||||||
//# sourceMappingURL=custom-element.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"custom-element.d.ts","sourceRoot":"","sources":["../../src/decorators/custom-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAAC,OAAO,WAAW,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG;IAEnC,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAGhC,CACE,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,qBAAqB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,GACvD,IAAI,CAAC;CACT,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,GACvB,SAAS,MAAM,KAAG,sBAelB,CAAC"}
|
|
||||||
30
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.js
generated
vendored
30
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.js
generated
vendored
|
|
@ -1,30 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* 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) => (classOrTarget, context) => {
|
|
||||||
if (context !== undefined) {
|
|
||||||
context.addInitializer(() => {
|
|
||||||
customElements.define(tagName, classOrTarget);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
customElements.define(tagName, classOrTarget);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
//# sourceMappingURL=custom-element.js.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.js.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/decorators/custom-element.js.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"custom-element.js","sourceRoot":"","sources":["../../src/decorators/custom-element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA2BH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GACxB,CAAC,OAAe,EAA0B,EAAE,CAC5C,CACE,aAA4D,EAC5D,OAAyD,EACzD,EAAE;IACF,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE;YAC1B,cAAc,CAAC,MAAM,CACnB,OAAO,EACP,aAAyC,CAC1C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAyC,CAAC,CAAC;IAC5E,CAAC;AACH,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 */\n\nimport type {Constructor} from './base.js';\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport type CustomElementDecorator = {\n // legacy\n (cls: CustomElementClass): void;\n\n // standard\n (\n target: CustomElementClass,\n context: ClassDecoratorContext<Constructor<HTMLElement>>\n ): void;\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): CustomElementDecorator =>\n (\n classOrTarget: CustomElementClass | Constructor<HTMLElement>,\n context?: ClassDecoratorContext<Constructor<HTMLElement>>\n ) => {\n if (context !== undefined) {\n context.addInitializer(() => {\n customElements.define(\n tagName,\n classOrTarget as CustomElementConstructor\n );\n });\n } else {\n customElements.define(tagName, classOrTarget as CustomElementConstructor);\n }\n };\n"]}
|
|
||||||
43
ui/node_modules/@lit/reactive-element/development/decorators/event-options.d.ts
generated
vendored
43
ui/node_modules/@lit/reactive-element/development/decorators/event-options.d.ts
generated
vendored
|
|
@ -1,43 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
import type { ReactiveElement } from '../reactive-element.js';
|
|
||||||
import type { Interface } from './base.js';
|
|
||||||
export type EventOptionsDecorator = {
|
|
||||||
(proto: Interface<ReactiveElement>, name: PropertyKey): void | any;
|
|
||||||
<C, V extends (this: C, ...args: any) => any>(value: V, _context: ClassMethodDecoratorContext<C, V>): void;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* 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): EventOptionsDecorator;
|
|
||||||
//# sourceMappingURL=event-options.d.ts.map
|
|
||||||
1
ui/node_modules/@lit/reactive-element/development/decorators/event-options.d.ts.map
generated
vendored
1
ui/node_modules/@lit/reactive-element/development/decorators/event-options.d.ts.map
generated
vendored
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"file":"event-options.d.ts","sourceRoot":"","sources":["../../src/decorators/event-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG;IAElC,CACE,KAAK,EAAE,SAAS,CAAC,eAAe,CAAC,EACjC,IAAI,EAAE,WAAW,GAGhB,IAAI,GAAG,GAAG,CAAC;IAId,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,EAC1C,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,2BAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1C,IAAI,CAAC;CACT,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,uBAAuB,GAC/B,qBAAqB,CAYvB"}
|
|
||||||
45
ui/node_modules/@lit/reactive-element/development/decorators/event-options.js
generated
vendored
45
ui/node_modules/@lit/reactive-element/development/decorators/event-options.js
generated
vendored
|
|
@ -1,45 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright 2017 Google LLC
|
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* 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) {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
return ((protoOrValue, nameOrContext) => {
|
|
||||||
const method = typeof protoOrValue === 'function'
|
|
||||||
? protoOrValue
|
|
||||||
: protoOrValue[nameOrContext];
|
|
||||||
Object.assign(method, options);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=event-options.js.map
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue