@a11d/lit 0.2.8 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Component/Component.d.ts +22 -22
- package/dist/Component/Component.js +35 -35
- package/dist/Component/index.d.ts +2 -2
- package/dist/Component/index.js +2 -2
- package/dist/Component/nothing.d.ts +2 -2
- package/dist/Component/nothing.js +2 -2
- package/dist/Controller/Controller.d.ts +9 -9
- package/dist/Controller/Controller.js +6 -6
- package/dist/Controller/index.d.ts +1 -1
- package/dist/Controller/index.js +1 -1
- package/dist/bundle.js +1 -1
- package/dist/event/EventDispatcher.d.ts +9 -9
- package/dist/event/EventDispatcher.js +1 -1
- package/dist/event/HTMLElementEventDispatcher.d.ts +12 -12
- package/dist/event/HTMLElementEventDispatcher.js +27 -27
- package/dist/event/PureEventDispatcher.d.ts +6 -6
- package/dist/event/PureEventDispatcher.js +16 -16
- package/dist/event/event.d.ts +1 -1
- package/dist/event/event.js +20 -20
- package/dist/event/index.d.ts +4 -4
- package/dist/event/index.js +4 -4
- package/dist/eventListener/EventListenerController.d.ts +23 -23
- package/dist/eventListener/EventListenerController.js +57 -57
- package/dist/eventListener/EventListenerTarget.d.ts +3 -3
- package/dist/eventListener/EventListenerTarget.js +1 -1
- package/dist/eventListener/eventListener.d.ts +12 -12
- package/dist/eventListener/eventListener.js +31 -31
- package/dist/eventListener/extractEventHandler.d.ts +1 -1
- package/dist/eventListener/extractEventHandler.js +9 -9
- package/dist/eventListener/index.d.ts +4 -4
- package/dist/eventListener/index.js +4 -4
- package/dist/index.d.ts +35 -35
- package/dist/index.js +35 -35
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +3 -3
- package/dist/query/query.d.ts +2 -2
- package/dist/query/query.js +9 -9
- package/dist/query/queryAll.d.ts +2 -2
- package/dist/query/queryAll.js +9 -9
- package/dist/query/queryAllAsNodeList.d.ts +2 -2
- package/dist/query/queryAllAsNodeList.js +2 -2
- package/dist/style/CustomPropertyStyleHandler.d.ts +5 -5
- package/dist/style/CustomPropertyStyleHandler.js +14 -14
- package/dist/style/index.d.ts +2 -2
- package/dist/style/index.js +2 -2
- package/dist/style/style.d.ts +16 -16
- package/dist/style/style.js +33 -32
- package/dist/test/ComponentTestFixture.d.ts +10 -10
- package/dist/test/ComponentTestFixture.js +28 -28
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/types.js +1 -1
- package/dist/updated/index.d.ts +3 -3
- package/dist/updated/index.js +3 -3
- package/dist/updated/property.d.ts +5 -5
- package/dist/updated/property.js +10 -10
- package/dist/updated/state.d.ts +6 -6
- package/dist/updated/state.js +10 -10
- package/dist/updated/updated.d.ts +3 -3
- package/dist/updated/updated.js +25 -25
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ReactiveElement } from 'lit';
|
|
2
|
-
import { Controller } from '../Controller/Controller.js';
|
|
3
|
-
import type { EventListenerTarget } from './EventListenerTarget.js';
|
|
4
|
-
export declare function extractEventTargets(this: any, target: EventListenerTarget | undefined): Promise<EventTarget[]>;
|
|
5
|
-
type Listener = EventListenerObject | ((e: any) => void);
|
|
6
|
-
type FullEventListenerControllerOptions = {
|
|
7
|
-
type: string;
|
|
8
|
-
listener: Listener;
|
|
9
|
-
target?: EventListenerTarget;
|
|
10
|
-
options?: EventListenerOptions | boolean;
|
|
11
|
-
};
|
|
12
|
-
type ShorthandEventListenerControllerOptions = [type: string, listener: Listener, options?: EventListenerOptions | boolean];
|
|
13
|
-
type EventListenerControllerOptions = ShorthandEventListenerControllerOptions | [FullEventListenerControllerOptions];
|
|
14
|
-
export declare class EventListenerController extends Controller {
|
|
15
|
-
protected readonly host: ReactiveElement;
|
|
16
|
-
protected readonly options: FullEventListenerControllerOptions;
|
|
17
|
-
constructor(host: ReactiveElement, ...options: EventListenerControllerOptions);
|
|
18
|
-
subscribe(): Promise<void>;
|
|
19
|
-
unsubscribe(): Promise<void>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
import { ReactiveElement } from 'lit';
|
|
2
|
+
import { Controller } from '../Controller/Controller.js';
|
|
3
|
+
import type { EventListenerTarget } from './EventListenerTarget.js';
|
|
4
|
+
export declare function extractEventTargets(this: any, target: EventListenerTarget | undefined): Promise<EventTarget[]>;
|
|
5
|
+
type Listener = EventListenerObject | ((e: any) => void);
|
|
6
|
+
type FullEventListenerControllerOptions = {
|
|
7
|
+
type: string;
|
|
8
|
+
listener: Listener;
|
|
9
|
+
target?: EventListenerTarget;
|
|
10
|
+
options?: EventListenerOptions | boolean;
|
|
11
|
+
};
|
|
12
|
+
type ShorthandEventListenerControllerOptions = [type: string, listener: Listener, options?: EventListenerOptions | boolean];
|
|
13
|
+
type EventListenerControllerOptions = ShorthandEventListenerControllerOptions | [FullEventListenerControllerOptions];
|
|
14
|
+
export declare class EventListenerController extends Controller {
|
|
15
|
+
protected readonly host: ReactiveElement;
|
|
16
|
+
protected readonly options: FullEventListenerControllerOptions;
|
|
17
|
+
constructor(host: ReactiveElement, ...options: EventListenerControllerOptions);
|
|
18
|
+
subscribe(): Promise<void>;
|
|
19
|
+
unsubscribe(): Promise<void>;
|
|
20
|
+
hostConnected(): Promise<void>;
|
|
21
|
+
hostDisconnected(): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { Controller } from '../Controller/Controller.js';
|
|
2
|
-
export async function extractEventTargets(target) {
|
|
3
|
-
const handle = (value) => {
|
|
4
|
-
return Symbol.iterator in value ? [...value] : [value];
|
|
5
|
-
};
|
|
6
|
-
if (target === undefined) {
|
|
7
|
-
return handle(this);
|
|
8
|
-
}
|
|
9
|
-
if (typeof target === 'function') {
|
|
10
|
-
let eventTarget = target.call(this);
|
|
11
|
-
if (eventTarget instanceof Promise) {
|
|
12
|
-
eventTarget = await eventTarget;
|
|
13
|
-
}
|
|
14
|
-
if (eventTarget instanceof EventTarget) {
|
|
15
|
-
return handle(eventTarget);
|
|
16
|
-
}
|
|
17
|
-
if (Symbol.iterator in eventTarget && [...eventTarget].every(t => t instanceof EventTarget)) {
|
|
18
|
-
return handle(eventTarget);
|
|
19
|
-
}
|
|
20
|
-
throw new TypeError(`${this.constructor}.target is not an EventTarget`);
|
|
21
|
-
}
|
|
22
|
-
return handle(target ?? this);
|
|
23
|
-
}
|
|
24
|
-
function extractOptions(options) {
|
|
25
|
-
const short = ((args) => typeof args[0] === 'string')(options);
|
|
26
|
-
return {
|
|
27
|
-
target: short ? undefined : options[0].target,
|
|
28
|
-
type: short ? options[0] : options[0].type,
|
|
29
|
-
listener: short ? options[1] : options[0].listener,
|
|
30
|
-
options: short ? options[2] : options[0].options,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export class EventListenerController extends Controller {
|
|
34
|
-
constructor(host, ...options) {
|
|
35
|
-
super(host);
|
|
36
|
-
this.host = host;
|
|
37
|
-
this.options = extractOptions(options);
|
|
38
|
-
}
|
|
39
|
-
async subscribe() {
|
|
40
|
-
const targets = await extractEventTargets.call(this.host, this.options.target);
|
|
41
|
-
for (const target of targets) {
|
|
42
|
-
target.
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
async unsubscribe() {
|
|
46
|
-
const targets = await extractEventTargets.call(this.host, this.options.target);
|
|
47
|
-
for (const target of targets) {
|
|
48
|
-
target?.
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
async
|
|
52
|
-
await this.subscribe();
|
|
53
|
-
}
|
|
54
|
-
async
|
|
55
|
-
await this.unsubscribe();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
import { Controller } from '../Controller/Controller.js';
|
|
2
|
+
export async function extractEventTargets(target) {
|
|
3
|
+
const handle = (value) => {
|
|
4
|
+
return Symbol.iterator in value ? [...value] : [value];
|
|
5
|
+
};
|
|
6
|
+
if (target === undefined) {
|
|
7
|
+
return handle(this);
|
|
8
|
+
}
|
|
9
|
+
if (typeof target === 'function') {
|
|
10
|
+
let eventTarget = target.call(this);
|
|
11
|
+
if (eventTarget instanceof Promise) {
|
|
12
|
+
eventTarget = await eventTarget;
|
|
13
|
+
}
|
|
14
|
+
if (eventTarget instanceof EventTarget) {
|
|
15
|
+
return handle(eventTarget);
|
|
16
|
+
}
|
|
17
|
+
if (Symbol.iterator in eventTarget && [...eventTarget].every(t => t instanceof EventTarget)) {
|
|
18
|
+
return handle(eventTarget);
|
|
19
|
+
}
|
|
20
|
+
throw new TypeError(`${this.constructor}.target is not an EventTarget`);
|
|
21
|
+
}
|
|
22
|
+
return handle(target ?? this);
|
|
23
|
+
}
|
|
24
|
+
function extractOptions(options) {
|
|
25
|
+
const short = ((args) => typeof args[0] === 'string')(options);
|
|
26
|
+
return {
|
|
27
|
+
target: short ? undefined : options[0].target,
|
|
28
|
+
type: short ? options[0] : options[0].type,
|
|
29
|
+
listener: short ? options[1] : options[0].listener,
|
|
30
|
+
options: short ? options[2] : options[0].options,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export class EventListenerController extends Controller {
|
|
34
|
+
constructor(host, ...options) {
|
|
35
|
+
super(host);
|
|
36
|
+
this.host = host;
|
|
37
|
+
this.options = extractOptions(options);
|
|
38
|
+
}
|
|
39
|
+
async subscribe() {
|
|
40
|
+
const targets = await extractEventTargets.call(this.host, this.options.target);
|
|
41
|
+
for (const target of targets) {
|
|
42
|
+
target.addEventListener(this.options.type, this.options.listener, this.options.options);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async unsubscribe() {
|
|
46
|
+
const targets = await extractEventTargets.call(this.host, this.options.target);
|
|
47
|
+
for (const target of targets) {
|
|
48
|
+
target?.removeEventListener(this.options.type, this.options.listener, this.options.options);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async hostConnected() {
|
|
52
|
+
await this.subscribe();
|
|
53
|
+
}
|
|
54
|
+
async hostDisconnected() {
|
|
55
|
+
await this.unsubscribe();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type Targets = EventTarget | Iterable<EventTarget>;
|
|
2
|
-
export type EventListenerTarget = Targets | ((this: any) => Targets | Promise<Targets>);
|
|
3
|
-
export {};
|
|
1
|
+
type Targets = EventTarget | Iterable<EventTarget>;
|
|
2
|
+
export type EventListenerTarget = Targets | ((this: any) => Targets | Promise<Targets>);
|
|
3
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { ReactiveElement } from 'lit';
|
|
2
|
-
import type { EventListenerTarget } from './EventListenerTarget.js';
|
|
3
|
-
type ShorthandEventListenerDecoratorOptions = [type: string, options?: EventListenerOptions | boolean];
|
|
4
|
-
type FullEventListenerDecoratorOptions = {
|
|
5
|
-
type: string;
|
|
6
|
-
target?: EventListenerTarget;
|
|
7
|
-
options?: EventListenerOptions | boolean;
|
|
8
|
-
};
|
|
9
|
-
type EventListenerDecoratorOptions = ShorthandEventListenerDecoratorOptions | [FullEventListenerDecoratorOptions];
|
|
10
|
-
export declare function extractOptions(args: EventListenerDecoratorOptions): FullEventListenerDecoratorOptions;
|
|
11
|
-
export declare const eventListener: (...eventListenerOptions: EventListenerDecoratorOptions) => (prototype: ReactiveElement, propertyKey: string, descriptor?: PropertyDescriptor) => void;
|
|
12
|
-
export {};
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
import type { EventListenerTarget } from './EventListenerTarget.js';
|
|
3
|
+
type ShorthandEventListenerDecoratorOptions = [type: string, options?: EventListenerOptions | boolean];
|
|
4
|
+
type FullEventListenerDecoratorOptions = {
|
|
5
|
+
type: string;
|
|
6
|
+
target?: EventListenerTarget;
|
|
7
|
+
options?: EventListenerOptions | boolean;
|
|
8
|
+
};
|
|
9
|
+
type EventListenerDecoratorOptions = ShorthandEventListenerDecoratorOptions | [FullEventListenerDecoratorOptions];
|
|
10
|
+
export declare function extractOptions(args: EventListenerDecoratorOptions): FullEventListenerDecoratorOptions;
|
|
11
|
+
export declare const eventListener: (...eventListenerOptions: EventListenerDecoratorOptions) => (prototype: ReactiveElement, propertyKey: string, descriptor?: PropertyDescriptor) => void;
|
|
12
|
+
export {};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { EventListenerController } from './EventListenerController.js';
|
|
2
|
-
export function extractOptions(args) {
|
|
3
|
-
const short = ((args) => typeof args[0] === 'string')(args);
|
|
4
|
-
return {
|
|
5
|
-
type: short ? args[0] : args[0].type,
|
|
6
|
-
target: short ? undefined : args[0].target,
|
|
7
|
-
options: short ? args[1] : args[0].options,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export const eventListener = (...eventListenerOptions) => {
|
|
11
|
-
return (prototype, propertyKey, descriptor) => {
|
|
12
|
-
const Constructor = prototype.constructor;
|
|
13
|
-
Constructor.addInitializer(element => {
|
|
14
|
-
element.addController(new class extends EventListenerController {
|
|
15
|
-
constructor() {
|
|
16
|
-
const { type, target, options } = extractOptions(eventListenerOptions);
|
|
17
|
-
super(element, { type, target, options, listener: undefined });
|
|
18
|
-
}
|
|
19
|
-
hostConnected() {
|
|
20
|
-
const unboundListener = !descriptor
|
|
21
|
-
? Object.getOwnPropertyDescriptor(element, propertyKey)?.value
|
|
22
|
-
: typeof descriptor.get === 'function'
|
|
23
|
-
? descriptor.get
|
|
24
|
-
: descriptor.value;
|
|
25
|
-
this.options.listener = unboundListener.bind(element);
|
|
26
|
-
return super.hostConnected();
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
};
|
|
1
|
+
import { EventListenerController } from './EventListenerController.js';
|
|
2
|
+
export function extractOptions(args) {
|
|
3
|
+
const short = ((args) => typeof args[0] === 'string')(args);
|
|
4
|
+
return {
|
|
5
|
+
type: short ? args[0] : args[0].type,
|
|
6
|
+
target: short ? undefined : args[0].target,
|
|
7
|
+
options: short ? args[1] : args[0].options,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export const eventListener = (...eventListenerOptions) => {
|
|
11
|
+
return (prototype, propertyKey, descriptor) => {
|
|
12
|
+
const Constructor = prototype.constructor;
|
|
13
|
+
Constructor.addInitializer(element => {
|
|
14
|
+
element.addController(new class extends EventListenerController {
|
|
15
|
+
constructor() {
|
|
16
|
+
const { type, target, options } = extractOptions(eventListenerOptions);
|
|
17
|
+
super(element, { type, target, options, listener: undefined });
|
|
18
|
+
}
|
|
19
|
+
hostConnected() {
|
|
20
|
+
const unboundListener = !descriptor
|
|
21
|
+
? Object.getOwnPropertyDescriptor(element, propertyKey)?.value
|
|
22
|
+
: typeof descriptor.get === 'function'
|
|
23
|
+
? descriptor.get
|
|
24
|
+
: descriptor.value;
|
|
25
|
+
this.options.listener = unboundListener.bind(element);
|
|
26
|
+
return super.hostConnected();
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const extractEventHandler: <TEvent extends Event = Event>(eventListener: EventListenerOrEventListenerObject) => (event: TEvent) => void;
|
|
1
|
+
export declare const extractEventHandler: <TEvent extends Event = Event>(eventListener: EventListenerOrEventListenerObject) => (event: TEvent) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const extractEventHandler = (eventListener) => {
|
|
2
|
-
return eventListener.type === 5
|
|
3
|
-
// @ts-expect-error - _$committedValue does actually exist on EventPart
|
|
4
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
5
|
-
? eventListener._$committedValue.bind(eventListener.element)
|
|
6
|
-
: typeof eventListener === 'function'
|
|
7
|
-
? eventListener
|
|
8
|
-
: eventListener.handleEvent;
|
|
9
|
-
};
|
|
1
|
+
export const extractEventHandler = (eventListener) => {
|
|
2
|
+
return eventListener.type === 5
|
|
3
|
+
// @ts-expect-error - _$committedValue does actually exist on EventPart
|
|
4
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
5
|
+
? eventListener._$committedValue.bind(eventListener.element)
|
|
6
|
+
: typeof eventListener === 'function'
|
|
7
|
+
? eventListener
|
|
8
|
+
: eventListener.handleEvent;
|
|
9
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './EventListenerTarget.js';
|
|
2
|
-
export * from './eventListener.js';
|
|
3
|
-
export * from './extractEventHandler.js';
|
|
4
|
-
export * from './EventListenerController.js';
|
|
1
|
+
export * from './EventListenerTarget.js';
|
|
2
|
+
export * from './eventListener.js';
|
|
3
|
+
export * from './extractEventHandler.js';
|
|
4
|
+
export * from './EventListenerController.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './EventListenerTarget.js';
|
|
2
|
-
export * from './eventListener.js';
|
|
3
|
-
export * from './extractEventHandler.js';
|
|
4
|
-
export * from './EventListenerController.js';
|
|
1
|
+
export * from './EventListenerTarget.js';
|
|
2
|
+
export * from './eventListener.js';
|
|
3
|
+
export * from './extractEventHandler.js';
|
|
4
|
+
export * from './EventListenerController.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export * from 'lit';
|
|
2
|
-
export { InternalPropertyDeclaration, QueryAssignedElementsOptions, QueryAssignedNodesOptions, eventOptions, queryAssignedElements, queryAssignedNodes, queryAsync } from 'lit/decorators.js';
|
|
3
|
-
export { withStatic, literal, unsafeStatic, html as staticHtml, svg as staticSvg } from 'lit/static-html.js';
|
|
4
|
-
export * from 'lit-html';
|
|
5
|
-
export * from 'lit-html/directive-helpers.js';
|
|
6
|
-
export * from 'lit-html/directive.js';
|
|
7
|
-
export * from 'lit-html/async-directive.js';
|
|
8
|
-
export * from 'lit-html/directives/async-append.js';
|
|
9
|
-
export * from 'lit-html/directives/async-replace.js';
|
|
10
|
-
export * from 'lit-html/directives/cache.js';
|
|
11
|
-
export * from 'lit-html/directives/choose.js';
|
|
12
|
-
export * from 'lit-html/directives/class-map.js';
|
|
13
|
-
export * from 'lit-html/directives/guard.js';
|
|
14
|
-
export * from 'lit-html/directives/if-defined.js';
|
|
15
|
-
export * from 'lit-html/directives/join.js';
|
|
16
|
-
export * from 'lit-html/directives/keyed.js';
|
|
17
|
-
export * from 'lit-html/directives/live.js';
|
|
18
|
-
export * from 'lit-html/directives/map.js';
|
|
19
|
-
export * from 'lit-html/directives/range.js';
|
|
20
|
-
export * from 'lit-html/directives/ref.js';
|
|
21
|
-
export * from 'lit-html/directives/repeat.js';
|
|
22
|
-
export * from 'lit-html/directives/style-map.js';
|
|
23
|
-
export * from 'lit-html/directives/template-content.js';
|
|
24
|
-
export * from 'lit-html/directives/unsafe-html.js';
|
|
25
|
-
export * from 'lit-html/directives/unsafe-svg.js';
|
|
26
|
-
export * from 'lit-html/directives/until.js';
|
|
27
|
-
export * from 'lit-html/directives/when.js';
|
|
28
|
-
import './types.js';
|
|
29
|
-
export { Component, nothing, component } from './Component/index.js';
|
|
30
|
-
export * from './Controller/index.js';
|
|
31
|
-
export * from './query/index.js';
|
|
32
|
-
export * from './style/index.js';
|
|
33
|
-
export * from './updated/index.js';
|
|
34
|
-
export * from './eventListener/index.js';
|
|
35
|
-
export * from './event/index.js';
|
|
1
|
+
export * from 'lit';
|
|
2
|
+
export { InternalPropertyDeclaration, QueryAssignedElementsOptions, QueryAssignedNodesOptions, eventOptions, queryAssignedElements, queryAssignedNodes, queryAsync } from 'lit/decorators.js';
|
|
3
|
+
export { withStatic, literal, unsafeStatic, html as staticHtml, svg as staticSvg } from 'lit/static-html.js';
|
|
4
|
+
export * from 'lit-html';
|
|
5
|
+
export * from 'lit-html/directive-helpers.js';
|
|
6
|
+
export * from 'lit-html/directive.js';
|
|
7
|
+
export * from 'lit-html/async-directive.js';
|
|
8
|
+
export * from 'lit-html/directives/async-append.js';
|
|
9
|
+
export * from 'lit-html/directives/async-replace.js';
|
|
10
|
+
export * from 'lit-html/directives/cache.js';
|
|
11
|
+
export * from 'lit-html/directives/choose.js';
|
|
12
|
+
export * from 'lit-html/directives/class-map.js';
|
|
13
|
+
export * from 'lit-html/directives/guard.js';
|
|
14
|
+
export * from 'lit-html/directives/if-defined.js';
|
|
15
|
+
export * from 'lit-html/directives/join.js';
|
|
16
|
+
export * from 'lit-html/directives/keyed.js';
|
|
17
|
+
export * from 'lit-html/directives/live.js';
|
|
18
|
+
export * from 'lit-html/directives/map.js';
|
|
19
|
+
export * from 'lit-html/directives/range.js';
|
|
20
|
+
export * from 'lit-html/directives/ref.js';
|
|
21
|
+
export * from 'lit-html/directives/repeat.js';
|
|
22
|
+
export * from 'lit-html/directives/style-map.js';
|
|
23
|
+
export * from 'lit-html/directives/template-content.js';
|
|
24
|
+
export * from 'lit-html/directives/unsafe-html.js';
|
|
25
|
+
export * from 'lit-html/directives/unsafe-svg.js';
|
|
26
|
+
export * from 'lit-html/directives/until.js';
|
|
27
|
+
export * from 'lit-html/directives/when.js';
|
|
28
|
+
import './types.js';
|
|
29
|
+
export { Component, nothing, component } from './Component/index.js';
|
|
30
|
+
export * from './Controller/index.js';
|
|
31
|
+
export * from './query/index.js';
|
|
32
|
+
export * from './style/index.js';
|
|
33
|
+
export * from './updated/index.js';
|
|
34
|
+
export * from './eventListener/index.js';
|
|
35
|
+
export * from './event/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export * from 'lit';
|
|
2
|
-
export { eventOptions, queryAssignedElements, queryAssignedNodes, queryAsync } from 'lit/decorators.js';
|
|
3
|
-
export { withStatic, literal, unsafeStatic, html as staticHtml, svg as staticSvg } from 'lit/static-html.js';
|
|
4
|
-
export * from 'lit-html';
|
|
5
|
-
export * from 'lit-html/directive-helpers.js';
|
|
6
|
-
export * from 'lit-html/directive.js';
|
|
7
|
-
export * from 'lit-html/async-directive.js';
|
|
8
|
-
export * from 'lit-html/directives/async-append.js';
|
|
9
|
-
export * from 'lit-html/directives/async-replace.js';
|
|
10
|
-
export * from 'lit-html/directives/cache.js';
|
|
11
|
-
export * from 'lit-html/directives/choose.js';
|
|
12
|
-
export * from 'lit-html/directives/class-map.js';
|
|
13
|
-
export * from 'lit-html/directives/guard.js';
|
|
14
|
-
export * from 'lit-html/directives/if-defined.js';
|
|
15
|
-
export * from 'lit-html/directives/join.js';
|
|
16
|
-
export * from 'lit-html/directives/keyed.js';
|
|
17
|
-
export * from 'lit-html/directives/live.js';
|
|
18
|
-
export * from 'lit-html/directives/map.js';
|
|
19
|
-
export * from 'lit-html/directives/range.js';
|
|
20
|
-
export * from 'lit-html/directives/ref.js';
|
|
21
|
-
export * from 'lit-html/directives/repeat.js';
|
|
22
|
-
export * from 'lit-html/directives/style-map.js';
|
|
23
|
-
export * from 'lit-html/directives/template-content.js';
|
|
24
|
-
export * from 'lit-html/directives/unsafe-html.js';
|
|
25
|
-
export * from 'lit-html/directives/unsafe-svg.js';
|
|
26
|
-
export * from 'lit-html/directives/until.js';
|
|
27
|
-
export * from 'lit-html/directives/when.js';
|
|
28
|
-
import './types.js';
|
|
29
|
-
export { Component, nothing, component } from './Component/index.js';
|
|
30
|
-
export * from './Controller/index.js';
|
|
31
|
-
export * from './query/index.js';
|
|
32
|
-
export * from './style/index.js';
|
|
33
|
-
export * from './updated/index.js';
|
|
34
|
-
export * from './eventListener/index.js';
|
|
35
|
-
export * from './event/index.js';
|
|
1
|
+
export * from 'lit';
|
|
2
|
+
export { eventOptions, queryAssignedElements, queryAssignedNodes, queryAsync } from 'lit/decorators.js';
|
|
3
|
+
export { withStatic, literal, unsafeStatic, html as staticHtml, svg as staticSvg } from 'lit/static-html.js';
|
|
4
|
+
export * from 'lit-html';
|
|
5
|
+
export * from 'lit-html/directive-helpers.js';
|
|
6
|
+
export * from 'lit-html/directive.js';
|
|
7
|
+
export * from 'lit-html/async-directive.js';
|
|
8
|
+
export * from 'lit-html/directives/async-append.js';
|
|
9
|
+
export * from 'lit-html/directives/async-replace.js';
|
|
10
|
+
export * from 'lit-html/directives/cache.js';
|
|
11
|
+
export * from 'lit-html/directives/choose.js';
|
|
12
|
+
export * from 'lit-html/directives/class-map.js';
|
|
13
|
+
export * from 'lit-html/directives/guard.js';
|
|
14
|
+
export * from 'lit-html/directives/if-defined.js';
|
|
15
|
+
export * from 'lit-html/directives/join.js';
|
|
16
|
+
export * from 'lit-html/directives/keyed.js';
|
|
17
|
+
export * from 'lit-html/directives/live.js';
|
|
18
|
+
export * from 'lit-html/directives/map.js';
|
|
19
|
+
export * from 'lit-html/directives/range.js';
|
|
20
|
+
export * from 'lit-html/directives/ref.js';
|
|
21
|
+
export * from 'lit-html/directives/repeat.js';
|
|
22
|
+
export * from 'lit-html/directives/style-map.js';
|
|
23
|
+
export * from 'lit-html/directives/template-content.js';
|
|
24
|
+
export * from 'lit-html/directives/unsafe-html.js';
|
|
25
|
+
export * from 'lit-html/directives/unsafe-svg.js';
|
|
26
|
+
export * from 'lit-html/directives/until.js';
|
|
27
|
+
export * from 'lit-html/directives/when.js';
|
|
28
|
+
import './types.js';
|
|
29
|
+
export { Component, nothing, component } from './Component/index.js';
|
|
30
|
+
export * from './Controller/index.js';
|
|
31
|
+
export * from './query/index.js';
|
|
32
|
+
export * from './style/index.js';
|
|
33
|
+
export * from './updated/index.js';
|
|
34
|
+
export * from './eventListener/index.js';
|
|
35
|
+
export * from './event/index.js';
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './query.js';
|
|
2
|
-
export * from './queryAll.js';
|
|
3
|
-
export * from './queryAllAsNodeList.js';
|
|
1
|
+
export * from './query.js';
|
|
2
|
+
export * from './queryAll.js';
|
|
3
|
+
export * from './queryAllAsNodeList.js';
|
package/dist/query/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './query.js';
|
|
2
|
-
export * from './queryAll.js';
|
|
3
|
-
export * from './queryAllAsNodeList.js';
|
|
1
|
+
export * from './query.js';
|
|
2
|
+
export * from './queryAll.js';
|
|
3
|
+
export * from './queryAllAsNodeList.js';
|
package/dist/query/query.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ReactiveElement } from 'lit';
|
|
2
|
-
export declare const query: (selector: string) => (prototype: ReactiveElement, propertyKey: PropertyKey) => void;
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
export declare const query: (selector: string) => (prototype: ReactiveElement, propertyKey: PropertyKey) => void;
|
package/dist/query/query.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const query = (selector) => {
|
|
2
|
-
return (prototype, propertyKey) => {
|
|
3
|
-
Object.defineProperty(prototype, propertyKey, {
|
|
4
|
-
get() {
|
|
5
|
-
return this.renderRoot?.querySelector(selector) ?? undefined;
|
|
6
|
-
}
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
export const query = (selector) => {
|
|
2
|
+
return (prototype, propertyKey) => {
|
|
3
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
4
|
+
get() {
|
|
5
|
+
return this.renderRoot?.querySelector(selector) ?? undefined;
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
};
|
package/dist/query/queryAll.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ReactiveElement } from 'lit';
|
|
2
|
-
export declare const queryAll: (selector: string) => (prototype: ReactiveElement, propertyKey: PropertyKey) => void;
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
export declare const queryAll: (selector: string) => (prototype: ReactiveElement, propertyKey: PropertyKey) => void;
|
package/dist/query/queryAll.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const queryAll = (selector) => {
|
|
2
|
-
return (prototype, propertyKey) => {
|
|
3
|
-
Object.defineProperty(prototype, propertyKey, {
|
|
4
|
-
get() {
|
|
5
|
-
return [...this.renderRoot?.querySelectorAll(selector) ?? []];
|
|
6
|
-
}
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
export const queryAll = (selector) => {
|
|
2
|
+
return (prototype, propertyKey) => {
|
|
3
|
+
Object.defineProperty(prototype, propertyKey, {
|
|
4
|
+
get() {
|
|
5
|
+
return [...this.renderRoot?.querySelectorAll(selector) ?? []];
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { queryAll as litQueryAll } from 'lit/decorators.js';
|
|
2
|
-
export declare const queryAllAsNodeList: typeof litQueryAll;
|
|
1
|
+
import { queryAll as litQueryAll } from 'lit/decorators.js';
|
|
2
|
+
export declare const queryAllAsNodeList: typeof litQueryAll;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { queryAll as litQueryAll } from 'lit/decorators.js';
|
|
2
|
-
export const queryAllAsNodeList = litQueryAll;
|
|
1
|
+
import { queryAll as litQueryAll } from 'lit/decorators.js';
|
|
2
|
+
export const queryAllAsNodeList = litQueryAll;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StyleEntry, StyleHandler } from './style.js';
|
|
2
|
-
export declare class CustomPropertyStyleHandler implements StyleHandler {
|
|
3
|
-
handles(_: HTMLElement, [key]: StyleEntry): boolean;
|
|
4
|
-
apply(element: HTMLElement, [key, value]: StyleEntry): void;
|
|
5
|
-
}
|
|
1
|
+
import { StyleEntry, StyleHandler } from './style.js';
|
|
2
|
+
export declare class CustomPropertyStyleHandler implements StyleHandler {
|
|
3
|
+
handles(_: HTMLElement, [key]: StyleEntry): boolean;
|
|
4
|
+
apply(element: HTMLElement, [key, value]: StyleEntry): void;
|
|
5
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { styleHandler } from './style.js';
|
|
3
|
-
let CustomPropertyStyleHandler = class CustomPropertyStyleHandler {
|
|
4
|
-
handles(_, [key]) {
|
|
5
|
-
return key.startsWith('--');
|
|
6
|
-
}
|
|
7
|
-
apply(element, [key, value]) {
|
|
8
|
-
element.style.setProperty(key, value);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
CustomPropertyStyleHandler = __decorate([
|
|
12
|
-
styleHandler()
|
|
13
|
-
], CustomPropertyStyleHandler);
|
|
14
|
-
export { CustomPropertyStyleHandler };
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { styleHandler } from './style.js';
|
|
3
|
+
let CustomPropertyStyleHandler = class CustomPropertyStyleHandler {
|
|
4
|
+
handles(_, [key]) {
|
|
5
|
+
return key.startsWith('--');
|
|
6
|
+
}
|
|
7
|
+
apply(element, [key, value]) {
|
|
8
|
+
element.style.setProperty(key, value);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
CustomPropertyStyleHandler = __decorate([
|
|
12
|
+
styleHandler()
|
|
13
|
+
], CustomPropertyStyleHandler);
|
|
14
|
+
export { CustomPropertyStyleHandler };
|
package/dist/style/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './style.js';
|
|
2
|
-
export * from './CustomPropertyStyleHandler.js';
|
|
1
|
+
export * from './style.js';
|
|
2
|
+
export * from './CustomPropertyStyleHandler.js';
|
package/dist/style/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './style.js';
|
|
2
|
-
export * from './CustomPropertyStyleHandler.js';
|
|
1
|
+
export * from './style.js';
|
|
2
|
+
export * from './CustomPropertyStyleHandler.js';
|
package/dist/style/style.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Directive, PartInfo } from '../index.js';
|
|
2
|
-
import type { StandardProperties } from 'csstype';
|
|
3
|
-
export type StyleEntry = [key: string, value: string];
|
|
4
|
-
export interface StyleHandler {
|
|
5
|
-
handles(element: HTMLElement, entry: StyleEntry): boolean;
|
|
6
|
-
apply(element: HTMLElement, entry: StyleEntry): void;
|
|
7
|
-
}
|
|
8
|
-
export declare const styleHandler: () => (Constructor: Constructor<StyleHandler>) => void;
|
|
9
|
-
export declare class StyleDirective extends Directive {
|
|
10
|
-
static readonly handlers: Set<StyleHandler>;
|
|
11
|
-
private static readonly defaultHandler;
|
|
12
|
-
private readonly element;
|
|
13
|
-
constructor(partInfo: PartInfo);
|
|
14
|
-
render(styles: StandardProperties | (Record<string, string> & {})): void;
|
|
15
|
-
}
|
|
16
|
-
export declare const style: (styles: StandardProperties<0 | (string & {}), string & {}> | Record<string, string>) => import("lit-html/directive.js").DirectiveResult<typeof StyleDirective>;
|
|
1
|
+
import { Directive, PartInfo } from '../index.js';
|
|
2
|
+
import type { StandardProperties } from 'csstype';
|
|
3
|
+
export type StyleEntry = [key: string, value: string];
|
|
4
|
+
export interface StyleHandler {
|
|
5
|
+
handles(element: HTMLElement, entry: StyleEntry): boolean;
|
|
6
|
+
apply(element: HTMLElement, entry: StyleEntry): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const styleHandler: () => (Constructor: Constructor<StyleHandler>) => void;
|
|
9
|
+
export declare class StyleDirective extends Directive {
|
|
10
|
+
static readonly handlers: Set<StyleHandler>;
|
|
11
|
+
private static readonly defaultHandler;
|
|
12
|
+
private readonly element;
|
|
13
|
+
constructor(partInfo: PartInfo);
|
|
14
|
+
render(styles: StandardProperties | (Record<string, string> & {})): void;
|
|
15
|
+
}
|
|
16
|
+
export declare const style: (styles: StandardProperties<0 | (string & {}), string & {}> | Record<string, string>) => import("lit-html/directive.js").DirectiveResult<typeof StyleDirective>;
|