@bodil/dom 0.1.6 → 0.1.7
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/package.json +1 -1
- package/dist/component.d.ts +0 -165
- package/dist/component.js +0 -419
- package/dist/component.js.map +0 -1
- package/dist/component.test.d.ts +0 -1
- package/dist/component.test.js +0 -207
- package/dist/component.test.js.map +0 -1
- package/dist/css.d.ts +0 -14
- package/dist/css.js +0 -63
- package/dist/css.js.map +0 -1
- package/dist/decorators/attribute.d.ts +0 -48
- package/dist/decorators/attribute.js +0 -142
- package/dist/decorators/attribute.js.map +0 -1
- package/dist/decorators/attribute.test.d.ts +0 -1
- package/dist/decorators/attribute.test.js +0 -274
- package/dist/decorators/attribute.test.js.map +0 -1
- package/dist/decorators/connect.d.ts +0 -9
- package/dist/decorators/connect.js +0 -44
- package/dist/decorators/connect.js.map +0 -1
- package/dist/decorators/connect.test.d.ts +0 -1
- package/dist/decorators/connect.test.js +0 -196
- package/dist/decorators/connect.test.js.map +0 -1
- package/dist/decorators/reactive.d.ts +0 -8
- package/dist/decorators/reactive.js +0 -45
- package/dist/decorators/reactive.js.map +0 -1
- package/dist/decorators/reactive.test.d.ts +0 -1
- package/dist/decorators/reactive.test.js +0 -113
- package/dist/decorators/reactive.test.js.map +0 -1
- package/dist/decorators/require.d.ts +0 -3
- package/dist/decorators/require.js +0 -6
- package/dist/decorators/require.js.map +0 -1
- package/dist/decorators/require.test.d.ts +0 -1
- package/dist/decorators/require.test.js +0 -117
- package/dist/decorators/require.test.js.map +0 -1
- package/dist/decorators/types.d.ts +0 -7
- package/dist/decorators/types.js +0 -2
- package/dist/decorators/types.js.map +0 -1
- package/dist/dom.d.ts +0 -92
- package/dist/dom.js +0 -354
- package/dist/dom.js.map +0 -1
- package/dist/emitter.d.ts +0 -83
- package/dist/emitter.js +0 -57
- package/dist/emitter.js.map +0 -1
- package/dist/event.d.ts +0 -70
- package/dist/event.js +0 -14
- package/dist/event.js.map +0 -1
- package/dist/event.test.d.ts +0 -1
- package/dist/event.test.js +0 -20
- package/dist/event.test.js.map +0 -1
- package/dist/geometry.d.ts +0 -48
- package/dist/geometry.js +0 -117
- package/dist/geometry.js.map +0 -1
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -11
- package/dist/index.js.map +0 -1
- package/dist/scheduler.d.ts +0 -2
- package/dist/scheduler.js +0 -54
- package/dist/scheduler.js.map +0 -1
- package/dist/slot.d.ts +0 -32
- package/dist/slot.js +0 -70
- package/dist/slot.js.map +0 -1
- package/dist/test-global.d.ts +0 -0
- package/dist/test-global.js +0 -5
- package/dist/test-global.js.map +0 -1
package/package.json
CHANGED
package/dist/component.d.ts
DELETED
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { type Disposifiable } from "@bodil/core/disposable";
|
|
2
|
-
import { Signal } from "@bodil/signal";
|
|
3
|
-
import { type CSSResult, type CSSResultOrNative, type ReactiveController, type ReactiveControllerHost, type RenderOptions } from "lit";
|
|
4
|
-
import type { Constructor } from "type-fest";
|
|
5
|
-
import { type AttributeConfig } from "./decorators/attribute";
|
|
6
|
-
import { EmitterElement } from "./emitter";
|
|
7
|
-
import { type QuerySlotOptions } from "./slot";
|
|
8
|
-
export type { ReactiveController, ReactiveControllerHost } from "lit";
|
|
9
|
-
export { attribute, attributeGetter, attributeSetter, type AttributeOptions, type AttributeGetterSetterOptions, type AttributeType, } from "./decorators/attribute";
|
|
10
|
-
export { connect, connectEffect, type ConnectFunction, type ConnectFunctionReturnValue, } from "./decorators/connect";
|
|
11
|
-
export { reactive } from "./decorators/reactive";
|
|
12
|
-
export { require } from "./decorators/require";
|
|
13
|
-
export { EmitterElement } from "./emitter";
|
|
14
|
-
export type { CustomEventTypes, Emits, EmitsSuper, ElementEmits } from "./emitter";
|
|
15
|
-
export type { QuerySlotOptions } from "./slot";
|
|
16
|
-
export type UpdateConfig = {
|
|
17
|
-
viewTransition?: boolean;
|
|
18
|
-
};
|
|
19
|
-
declare const finalised: unique symbol;
|
|
20
|
-
export type Deps = Array<typeof HTMLElement>;
|
|
21
|
-
export type CSSStyleSpec = CSSResult | CSSStyleSheet | string;
|
|
22
|
-
export type CSSStyleSpecArray = Array<CSSStyleSpec | CSSStyleSpecArray>;
|
|
23
|
-
export type CSSStyleSpecDeclaration = CSSStyleSpec | CSSStyleSpecArray;
|
|
24
|
-
export declare class ComponentUpdateLoopError extends Error {
|
|
25
|
-
constructor(message?: string, options?: ErrorOptions);
|
|
26
|
-
}
|
|
27
|
-
export declare abstract class Component extends EmitterElement implements ReactiveControllerHost, Disposable {
|
|
28
|
-
#private;
|
|
29
|
-
static deps: Deps;
|
|
30
|
-
static styles?: CSSStyleSpecDeclaration;
|
|
31
|
-
static shadowRootOptions: ShadowRootInit;
|
|
32
|
-
static initialisers: Set<() => void>;
|
|
33
|
-
/** @ignore */
|
|
34
|
-
protected static attributeConfig: Map<string, AttributeConfig>;
|
|
35
|
-
/** @ignore */
|
|
36
|
-
protected static elementStyles: Array<CSSResultOrNative>;
|
|
37
|
-
/** @ignore */
|
|
38
|
-
protected static requiredProperties: Set<string | symbol>;
|
|
39
|
-
private static [finalised];
|
|
40
|
-
renderOptions: RenderOptions;
|
|
41
|
-
emits: object;
|
|
42
|
-
readonly renderRoot: ShadowRoot | HTMLElement;
|
|
43
|
-
get isUpdatePending(): boolean;
|
|
44
|
-
get updateComplete(): Promise<boolean>;
|
|
45
|
-
get hasStabilised(): Promise<void>;
|
|
46
|
-
get abortSignal(): AbortSignal;
|
|
47
|
-
static addInitialiser(init: () => void): void;
|
|
48
|
-
static get observedAttributes(): Array<string>;
|
|
49
|
-
private static finalise;
|
|
50
|
-
constructor();
|
|
51
|
-
protected connectedCallback(): void;
|
|
52
|
-
protected disconnectedCallback(): void;
|
|
53
|
-
setAttributeQuietly(name: string, value: string | null): void;
|
|
54
|
-
protected attributeChangedCallback(name: string, old: string | null, valueString: string | null): void;
|
|
55
|
-
$signal<K extends keyof this & string, V extends this[K]>(prop: K): Signal<V>;
|
|
56
|
-
addController(controller: ReactiveController): void;
|
|
57
|
-
removeController(controller: ReactiveController): void;
|
|
58
|
-
protected createRenderRoot(): HTMLElement | ShadowRoot;
|
|
59
|
-
requestUpdate(opts?: UpdateConfig): void;
|
|
60
|
-
hasRequiredProperties(): Signal.Computed<boolean>;
|
|
61
|
-
protected performUpdate(): Promise<void>;
|
|
62
|
-
protected update(): void;
|
|
63
|
-
protected findChildComponents(root?: Element | ShadowRoot): IteratorObject<Component>;
|
|
64
|
-
protected stabilise(): Promise<void>;
|
|
65
|
-
protected updated(): void;
|
|
66
|
-
protected firstUpdated(): void;
|
|
67
|
-
protected stabilised(): void;
|
|
68
|
-
protected initialised(): void;
|
|
69
|
-
protected firstInitialised(): void;
|
|
70
|
-
protected render(): unknown;
|
|
71
|
-
[Symbol.dispose](): void;
|
|
72
|
-
/**
|
|
73
|
-
* Attach a {@link Disposable} to the component's connected/disconnected
|
|
74
|
-
* lifecycle state.
|
|
75
|
-
*
|
|
76
|
-
* This causes the {@link Disposable} to be disposed automatically when the
|
|
77
|
-
* component is disconnected. The common pattern for this is for resources,
|
|
78
|
-
* such as event listeners, allocated in {@link Component.connectedCallback}
|
|
79
|
-
* to be registered for automatic deallocation during
|
|
80
|
-
* {@link Component.disconnectedCallback}.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* protected override connectedCallback() {
|
|
84
|
-
* super.connectedCallback();
|
|
85
|
-
* this.useWhileConnected(this.on("click", this.handleClick.bind(this)));
|
|
86
|
-
* }
|
|
87
|
-
*/
|
|
88
|
-
useWhileConnected(disposifiable: undefined): undefined;
|
|
89
|
-
useWhileConnected(disposifiable: null): null;
|
|
90
|
-
useWhileConnected(disposifiable: Disposifiable): Disposable;
|
|
91
|
-
useWhileConnected(disposifiable: Disposifiable | undefined): Disposable | undefined;
|
|
92
|
-
useWhileConnected(disposifiable: Disposifiable | null | undefined): Disposable | null | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* Attach an event listener to an event on this component.
|
|
95
|
-
*
|
|
96
|
-
* @returns A {@link Disposable} to subsequently detach the event listener.
|
|
97
|
-
*/
|
|
98
|
-
on<K extends keyof HTMLElementEventMap>(type: K, callback: (event: HTMLElementEventMap[K]) => void, options?: AddEventListenerOptions | boolean): Disposable;
|
|
99
|
-
/**
|
|
100
|
-
* If an element that is either inside this element's shadow root or is a
|
|
101
|
-
* child of this element (ie. slotted) currently has focus, return that
|
|
102
|
-
* element. Otherwise, return null.
|
|
103
|
-
*/
|
|
104
|
-
getFocusedElement(): Element | null;
|
|
105
|
-
query<El extends keyof HTMLElementTagNameMap>(selector: El): HTMLElementTagNameMap[El] | null;
|
|
106
|
-
query<El extends keyof SVGElementTagNameMap>(selector: El): SVGElementTagNameMap[El] | null;
|
|
107
|
-
query<El extends keyof MathMLElementTagNameMap>(selector: El): MathMLElementTagNameMap[El] | null;
|
|
108
|
-
/** @deprecated */
|
|
109
|
-
query<El extends keyof HTMLElementDeprecatedTagNameMap>(selector: El): HTMLElementDeprecatedTagNameMap[El] | null;
|
|
110
|
-
query(selector: string): Element | null;
|
|
111
|
-
queryAll<El extends keyof HTMLElementTagNameMap>(selector: El): NodeListOf<HTMLElementTagNameMap[El]>;
|
|
112
|
-
queryAll<El extends keyof SVGElementTagNameMap>(selector: El): NodeListOf<SVGElementTagNameMap[El]>;
|
|
113
|
-
queryAll<El extends keyof MathMLElementTagNameMap>(selector: El): NodeListOf<MathMLElementTagNameMap[El]>;
|
|
114
|
-
/** @deprecated */
|
|
115
|
-
queryAll<El extends keyof HTMLElementDeprecatedTagNameMap>(selector: El): NodeListOf<HTMLElementDeprecatedTagNameMap[El]>;
|
|
116
|
-
queryAll(selector: string): NodeListOf<Element>;
|
|
117
|
-
querySlot(options: QuerySlotOptions & {
|
|
118
|
-
nodes: true;
|
|
119
|
-
reactive: true;
|
|
120
|
-
}): Signal.Computed<Array<Node>>;
|
|
121
|
-
querySlot(options: QuerySlotOptions & {
|
|
122
|
-
nodes: true;
|
|
123
|
-
}): Array<Node>;
|
|
124
|
-
querySlot<T>(options: QuerySlotOptions & {
|
|
125
|
-
reactive: true;
|
|
126
|
-
instanceOf: Constructor<T>;
|
|
127
|
-
}): Signal.Computed<Array<T>>;
|
|
128
|
-
querySlot(options: QuerySlotOptions & {
|
|
129
|
-
reactive: true;
|
|
130
|
-
}): Signal.Computed<Array<Element>>;
|
|
131
|
-
querySlot<T>(options: QuerySlotOptions & {
|
|
132
|
-
instanceOf: Constructor<T>;
|
|
133
|
-
}): Array<T>;
|
|
134
|
-
querySlot<El extends keyof HTMLElementTagNameMap>(options: QuerySlotOptions & {
|
|
135
|
-
reactive: true;
|
|
136
|
-
selector: El;
|
|
137
|
-
}): Signal.Computed<Array<HTMLElementTagNameMap[El]>>;
|
|
138
|
-
querySlot<El extends keyof HTMLElementTagNameMap>(options: QuerySlotOptions & {
|
|
139
|
-
selector: El;
|
|
140
|
-
}): Array<HTMLElementTagNameMap[El]>;
|
|
141
|
-
querySlot<El extends keyof SVGElementTagNameMap>(options: QuerySlotOptions & {
|
|
142
|
-
reactive: true;
|
|
143
|
-
selector: El;
|
|
144
|
-
}): Signal.Computed<Array<SVGElementTagNameMap[El]>>;
|
|
145
|
-
querySlot<El extends keyof SVGElementTagNameMap>(options: QuerySlotOptions & {
|
|
146
|
-
selector: El;
|
|
147
|
-
}): Array<SVGElementTagNameMap[El]>;
|
|
148
|
-
querySlot<El extends keyof MathMLElementTagNameMap>(options: QuerySlotOptions & {
|
|
149
|
-
reactive: true;
|
|
150
|
-
selector: El;
|
|
151
|
-
}): Signal.Computed<Array<MathMLElementTagNameMap[El]>>;
|
|
152
|
-
querySlot<El extends keyof MathMLElementTagNameMap>(options: QuerySlotOptions & {
|
|
153
|
-
selector: El;
|
|
154
|
-
}): Array<MathMLElementTagNameMap[El]>;
|
|
155
|
-
/** @deprecated */
|
|
156
|
-
querySlot<El extends keyof HTMLElementDeprecatedTagNameMap>(options: QuerySlotOptions & {
|
|
157
|
-
reactive: true;
|
|
158
|
-
selector: El;
|
|
159
|
-
}): Signal.Computed<Array<HTMLElementDeprecatedTagNameMap[El]>>;
|
|
160
|
-
/** @deprecated */
|
|
161
|
-
querySlot<El extends keyof HTMLElementDeprecatedTagNameMap>(options: QuerySlotOptions & {
|
|
162
|
-
selector: El;
|
|
163
|
-
}): Array<HTMLElementDeprecatedTagNameMap[El]>;
|
|
164
|
-
querySlot(options?: QuerySlotOptions): Array<Element>;
|
|
165
|
-
}
|
package/dist/component.js
DELETED
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { isIterable, isNullish } from "@bodil/core/assert";
|
|
3
|
-
import { DisposableContext, toDisposable } from "@bodil/core/disposable";
|
|
4
|
-
import { Signal } from "@bodil/signal";
|
|
5
|
-
import { adoptStyles, getCompatibleStyle, nothing, render, unsafeCSS, } from "lit";
|
|
6
|
-
import { attributeConfig, fromAttribute } from "./decorators/attribute";
|
|
7
|
-
import { connectedJobs } from "./decorators/connect";
|
|
8
|
-
import { reactiveFields, signalForObject } from "./decorators/reactive";
|
|
9
|
-
import { requiredProperties } from "./decorators/require";
|
|
10
|
-
import { childElements } from "./dom";
|
|
11
|
-
import { EmitterElement } from "./emitter";
|
|
12
|
-
import { eventListener } from "./event";
|
|
13
|
-
import { scheduler } from "./scheduler";
|
|
14
|
-
import { findSlot, getOrSetQuery, getOrSetSignal, listsEqual, SlotChangeController, } from "./slot";
|
|
15
|
-
export { attribute, attributeGetter, attributeSetter, } from "./decorators/attribute";
|
|
16
|
-
export { connect, connectEffect, } from "./decorators/connect";
|
|
17
|
-
export { reactive } from "./decorators/reactive";
|
|
18
|
-
export { require } from "./decorators/require";
|
|
19
|
-
export { EmitterElement } from "./emitter";
|
|
20
|
-
Symbol.metadata ??= Symbol.for("Symbol.metadata");
|
|
21
|
-
const finalised = Symbol("finalised");
|
|
22
|
-
function processCSSStyleSpec(spec) {
|
|
23
|
-
return getCompatibleStyle(typeof spec === "string" ? unsafeCSS(spec) : spec);
|
|
24
|
-
}
|
|
25
|
-
export class ComponentUpdateLoopError extends Error {
|
|
26
|
-
constructor(message, options) {
|
|
27
|
-
super(message, options);
|
|
28
|
-
this.name = "ComponentUpdateLoopError";
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export class Component extends EmitterElement {
|
|
32
|
-
static { this.deps = []; }
|
|
33
|
-
static { this.shadowRootOptions = { mode: "open" }; }
|
|
34
|
-
static { this.initialisers = new Set(); }
|
|
35
|
-
/** @ignore */
|
|
36
|
-
static { this.attributeConfig = new Map(); }
|
|
37
|
-
/** @ignore */
|
|
38
|
-
static { this.elementStyles = []; }
|
|
39
|
-
/** @ignore */
|
|
40
|
-
static { this.requiredProperties = new Set(); }
|
|
41
|
-
static { this[_a] = true; }
|
|
42
|
-
#controllers;
|
|
43
|
-
#connectedContext;
|
|
44
|
-
#dirty;
|
|
45
|
-
#isUpdatePending;
|
|
46
|
-
#updateSignal;
|
|
47
|
-
#updateSignalWatcher;
|
|
48
|
-
#updateResult;
|
|
49
|
-
#stabilised;
|
|
50
|
-
#rootPart;
|
|
51
|
-
#firstUpdate;
|
|
52
|
-
#initialised;
|
|
53
|
-
#viewTransitionRequested;
|
|
54
|
-
#ignoreAttributeUpdates;
|
|
55
|
-
get isUpdatePending() {
|
|
56
|
-
return this.#isUpdatePending;
|
|
57
|
-
}
|
|
58
|
-
get updateComplete() {
|
|
59
|
-
return this.#updateResult.promise;
|
|
60
|
-
}
|
|
61
|
-
get hasStabilised() {
|
|
62
|
-
return this.#stabilised.promise;
|
|
63
|
-
}
|
|
64
|
-
#abortController;
|
|
65
|
-
get abortSignal() {
|
|
66
|
-
return this.#abortController.signal;
|
|
67
|
-
}
|
|
68
|
-
static addInitialiser(init) {
|
|
69
|
-
if (!Object.hasOwn(this, "initialisers")) {
|
|
70
|
-
this.initialisers = new Set();
|
|
71
|
-
}
|
|
72
|
-
this.initialisers.add(init);
|
|
73
|
-
}
|
|
74
|
-
static get observedAttributes() {
|
|
75
|
-
this.finalise();
|
|
76
|
-
return this.attributeConfig.keys().toArray();
|
|
77
|
-
}
|
|
78
|
-
static finalise() {
|
|
79
|
-
if (!Object.hasOwn(this, finalised)) {
|
|
80
|
-
this[finalised] = true;
|
|
81
|
-
const parent = Object.getPrototypeOf(this);
|
|
82
|
-
parent.finalise();
|
|
83
|
-
this.attributeConfig = new Map([
|
|
84
|
-
...parent.attributeConfig,
|
|
85
|
-
...(this[Symbol.metadata]?.[attributeConfig] ??
|
|
86
|
-
[]),
|
|
87
|
-
]);
|
|
88
|
-
this.requiredProperties = new Set([
|
|
89
|
-
...parent.requiredProperties,
|
|
90
|
-
...(this[Symbol.metadata]?.[requiredProperties] ?? []),
|
|
91
|
-
]);
|
|
92
|
-
this.initialisers = new Set([...parent.initialisers, ...this.initialisers]);
|
|
93
|
-
this.elementStyles = [...parent.elementStyles];
|
|
94
|
-
if (Object.hasOwn(this, "styles")) {
|
|
95
|
-
if (Array.isArray(this.styles)) {
|
|
96
|
-
const sheets = new Set(this.styles
|
|
97
|
-
.flat(Infinity)
|
|
98
|
-
.reverse());
|
|
99
|
-
for (const sheet of sheets) {
|
|
100
|
-
this.elementStyles.unshift(processCSSStyleSpec(sheet));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
else if (this.styles !== undefined) {
|
|
104
|
-
this.elementStyles.push(processCSSStyleSpec(this.styles));
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
constructor() {
|
|
110
|
-
super();
|
|
111
|
-
this.renderOptions = { host: this };
|
|
112
|
-
this.#controllers = new Set();
|
|
113
|
-
this.#connectedContext = new DisposableContext();
|
|
114
|
-
this.#dirty = false;
|
|
115
|
-
this.#isUpdatePending = false;
|
|
116
|
-
this.#updateSignalWatcher = new Signal.subtle.Watcher(() => this.requestUpdate());
|
|
117
|
-
this.#updateResult = Promise.withResolvers();
|
|
118
|
-
this.#stabilised = Promise.withResolvers();
|
|
119
|
-
this.#firstUpdate = false;
|
|
120
|
-
this.#initialised = false;
|
|
121
|
-
this.#viewTransitionRequested = false;
|
|
122
|
-
this.renderRoot = this.createRenderRoot();
|
|
123
|
-
this.#abortController = new AbortController();
|
|
124
|
-
this.#ignoreAttributeUpdates = 1;
|
|
125
|
-
// set up reactive fields, because decorators can't do this themselves
|
|
126
|
-
const fields = this.constructor[Symbol.metadata]?.[reactiveFields] ?? [];
|
|
127
|
-
for (const field of fields) {
|
|
128
|
-
const sig = signalForObject(this, field, () => Signal(undefined, { equals: Object.is }));
|
|
129
|
-
Object.defineProperty(this, field, {
|
|
130
|
-
get() {
|
|
131
|
-
return sig.get();
|
|
132
|
-
},
|
|
133
|
-
set(value) {
|
|
134
|
-
sig.set(value);
|
|
135
|
-
},
|
|
136
|
-
enumerable: true,
|
|
137
|
-
configurable: true,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
// run initialisers
|
|
141
|
-
for (const init of this.constructor.initialisers) {
|
|
142
|
-
init.call(this);
|
|
143
|
-
}
|
|
144
|
-
this.#ignoreAttributeUpdates--;
|
|
145
|
-
this.#initialised = false;
|
|
146
|
-
}
|
|
147
|
-
connectedCallback() {
|
|
148
|
-
this.#connectedContext.dispose();
|
|
149
|
-
this.#controllers.forEach((c) => c.hostConnected?.());
|
|
150
|
-
this.#rootPart?.setConnected(true);
|
|
151
|
-
for (const job of connectedJobs(this)) {
|
|
152
|
-
const result = job.call(this);
|
|
153
|
-
const items = isNullish(result)
|
|
154
|
-
? Iterator.from([])
|
|
155
|
-
: isIterable(result)
|
|
156
|
-
? Iterator.from(result)
|
|
157
|
-
: Iterator.from([result]);
|
|
158
|
-
items.filter((i) => i !== undefined).forEach(this.useWhileConnected.bind(this));
|
|
159
|
-
}
|
|
160
|
-
this.useWhileConnected(Signal.effect(() => {
|
|
161
|
-
if (this.hasRequiredProperties().get()) {
|
|
162
|
-
if (!this.#initialised) {
|
|
163
|
-
this.#initialised = true;
|
|
164
|
-
this.firstInitialised();
|
|
165
|
-
}
|
|
166
|
-
this.initialised();
|
|
167
|
-
this.requestUpdate();
|
|
168
|
-
}
|
|
169
|
-
}));
|
|
170
|
-
this.requestUpdate();
|
|
171
|
-
}
|
|
172
|
-
disconnectedCallback() {
|
|
173
|
-
if (this.#updateSignal !== undefined) {
|
|
174
|
-
this.#updateSignalWatcher.unwatch(this.#updateSignal);
|
|
175
|
-
this.#updateSignal = undefined;
|
|
176
|
-
}
|
|
177
|
-
this.#isUpdatePending = false;
|
|
178
|
-
this.#abortController.abort(new DOMException(`${this.tagName} element disconnected`, "AbortError"));
|
|
179
|
-
this.#abortController = new AbortController();
|
|
180
|
-
this.#rootPart?.setConnected(false);
|
|
181
|
-
this.#controllers.forEach((c) => c.hostDisconnected?.());
|
|
182
|
-
this.#connectedContext.dispose();
|
|
183
|
-
}
|
|
184
|
-
setAttributeQuietly(name, value) {
|
|
185
|
-
this.#ignoreAttributeUpdates++;
|
|
186
|
-
if (value === null) {
|
|
187
|
-
this.removeAttribute(name);
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
this.setAttribute(name, value);
|
|
191
|
-
}
|
|
192
|
-
this.#ignoreAttributeUpdates--;
|
|
193
|
-
}
|
|
194
|
-
attributeChangedCallback(name, old, valueString) {
|
|
195
|
-
if (this.#ignoreAttributeUpdates > 0 || old === valueString) {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
const attrConfig = this.constructor.attributeConfig.get(name);
|
|
199
|
-
if (attrConfig !== undefined) {
|
|
200
|
-
const value = fromAttribute(valueString, attrConfig.type);
|
|
201
|
-
this[attrConfig.property] = value;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
$signal(prop) {
|
|
205
|
-
const _value = this[prop];
|
|
206
|
-
return signalForObject(this, prop, () => {
|
|
207
|
-
throw new TypeError(`Object has no reactive property ${JSON.stringify(prop)}`);
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
addController(controller) {
|
|
211
|
-
this.#controllers.add(controller);
|
|
212
|
-
if (this.renderRoot !== undefined && this.isConnected) {
|
|
213
|
-
controller.hostConnected?.();
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
removeController(controller) {
|
|
217
|
-
this.#controllers.delete(controller);
|
|
218
|
-
}
|
|
219
|
-
createRenderRoot() {
|
|
220
|
-
const renderRoot = this.shadowRoot ??
|
|
221
|
-
this.attachShadow(this.constructor.shadowRootOptions);
|
|
222
|
-
adoptStyles(renderRoot, [...this.constructor.elementStyles]);
|
|
223
|
-
this.renderOptions.renderBefore ??= renderRoot.firstChild;
|
|
224
|
-
return renderRoot;
|
|
225
|
-
}
|
|
226
|
-
requestUpdate(opts) {
|
|
227
|
-
this.#dirty = true;
|
|
228
|
-
if (opts?.viewTransition === true) {
|
|
229
|
-
this.#viewTransitionRequested = true;
|
|
230
|
-
}
|
|
231
|
-
if (!this.isUpdatePending && this.isConnected && this.#initialised) {
|
|
232
|
-
this.#isUpdatePending = true;
|
|
233
|
-
this.#updateResult = Promise.withResolvers();
|
|
234
|
-
scheduler(this);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
#hasRequiredProperties;
|
|
238
|
-
hasRequiredProperties() {
|
|
239
|
-
if (this.#hasRequiredProperties === undefined) {
|
|
240
|
-
const requiredProperties = this.constructor.requiredProperties;
|
|
241
|
-
this.#hasRequiredProperties = Signal.computed(() => {
|
|
242
|
-
return requiredProperties.size === 0
|
|
243
|
-
? true
|
|
244
|
-
: requiredProperties
|
|
245
|
-
.keys()
|
|
246
|
-
.every((key) => this[key] !== undefined);
|
|
247
|
-
},
|
|
248
|
-
// every signal update is relevant, even if the signal value doesn't
|
|
249
|
-
// change, because the required values probably did.
|
|
250
|
-
{ equals: () => false });
|
|
251
|
-
}
|
|
252
|
-
return this.#hasRequiredProperties;
|
|
253
|
-
}
|
|
254
|
-
async performUpdate() {
|
|
255
|
-
if (!this.isConnected || !this.isUpdatePending) {
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
let didFirstUpdate = false;
|
|
259
|
-
const runUpdate = () => {
|
|
260
|
-
this.#controllers.forEach((c) => c.hostUpdate?.());
|
|
261
|
-
this.update();
|
|
262
|
-
this.#controllers.forEach((c) => c.hostUpdated?.());
|
|
263
|
-
if (!this.#firstUpdate) {
|
|
264
|
-
this.#firstUpdate = true;
|
|
265
|
-
this.firstUpdated();
|
|
266
|
-
didFirstUpdate = true;
|
|
267
|
-
}
|
|
268
|
-
this.updated();
|
|
269
|
-
};
|
|
270
|
-
try {
|
|
271
|
-
let count = 0;
|
|
272
|
-
while (this.#dirty) {
|
|
273
|
-
// Retry this.update() until it runs without causing dirtiness.
|
|
274
|
-
// This is to allow render() to react to things like slot
|
|
275
|
-
// queries responding to slots being created.
|
|
276
|
-
this.#dirty = false;
|
|
277
|
-
count++;
|
|
278
|
-
// If it runs dirty too many times, that's an error.
|
|
279
|
-
if (count > 4) {
|
|
280
|
-
throw new ComponentUpdateLoopError(`Component.update() ran dirty ${count} times, ensure you're not accidentally triggering updates inside render()`);
|
|
281
|
-
}
|
|
282
|
-
if (this.#viewTransitionRequested &&
|
|
283
|
-
typeof document.startViewTransition === "function") {
|
|
284
|
-
this.#viewTransitionRequested = false;
|
|
285
|
-
await document.startViewTransition(runUpdate).finished;
|
|
286
|
-
}
|
|
287
|
-
else {
|
|
288
|
-
runUpdate();
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
this.#isUpdatePending = false;
|
|
292
|
-
this.#updateResult.resolve(true);
|
|
293
|
-
if (didFirstUpdate) {
|
|
294
|
-
await this.stabilise();
|
|
295
|
-
this.stabilised();
|
|
296
|
-
this.#stabilised.resolve();
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
catch (e) {
|
|
300
|
-
this.#isUpdatePending = false;
|
|
301
|
-
this.#updateResult.reject(e);
|
|
302
|
-
if (didFirstUpdate) {
|
|
303
|
-
this.#stabilised.reject(e);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
update() {
|
|
308
|
-
if (this.#updateSignal !== undefined) {
|
|
309
|
-
this.#updateSignalWatcher.unwatch(this.#updateSignal);
|
|
310
|
-
}
|
|
311
|
-
this.#updateSignal = Signal.computed(() => {
|
|
312
|
-
this.renderOptions.isConnected = this.isConnected;
|
|
313
|
-
this.#rootPart = render(this.render(), this.renderRoot, this.renderOptions);
|
|
314
|
-
});
|
|
315
|
-
this.#updateSignalWatcher.watch(this.#updateSignal);
|
|
316
|
-
this.#updateSignal.get();
|
|
317
|
-
}
|
|
318
|
-
findChildComponents(root = this.renderRoot) {
|
|
319
|
-
let all = childElements(root).toArray();
|
|
320
|
-
const top = [...all];
|
|
321
|
-
for (const el of top) {
|
|
322
|
-
all = [...all, ...this.findChildComponents(el)];
|
|
323
|
-
}
|
|
324
|
-
return Iterator.from(all).filter((el) => el instanceof Component);
|
|
325
|
-
}
|
|
326
|
-
async stabilise() {
|
|
327
|
-
// wait for children to stabilise
|
|
328
|
-
const children = this.findChildComponents();
|
|
329
|
-
// eslint-disable-next-line no-console
|
|
330
|
-
await Promise.all(children.map((child) => child.hasStabilised)).catch(console.error);
|
|
331
|
-
}
|
|
332
|
-
updated() {
|
|
333
|
-
// called when an update has completed
|
|
334
|
-
}
|
|
335
|
-
firstUpdated() {
|
|
336
|
-
// called when the first update has completed, and before
|
|
337
|
-
// {@link Component.updated}.
|
|
338
|
-
}
|
|
339
|
-
stabilised() {
|
|
340
|
-
// called when the component has stabilised after its first update
|
|
341
|
-
}
|
|
342
|
-
initialised() {
|
|
343
|
-
// called when a property marked `@require` has changed and every
|
|
344
|
-
// such property is non-`undefined`.
|
|
345
|
-
}
|
|
346
|
-
firstInitialised() {
|
|
347
|
-
// called the first time all properties marked `@require` become
|
|
348
|
-
// defined, and before {@link Component.initialised}.
|
|
349
|
-
}
|
|
350
|
-
render() {
|
|
351
|
-
return nothing;
|
|
352
|
-
}
|
|
353
|
-
[(_a = finalised, Symbol.dispose)]() {
|
|
354
|
-
for (const child of this.findChildComponents()) {
|
|
355
|
-
child[Symbol.dispose]();
|
|
356
|
-
}
|
|
357
|
-
this.disconnectedCallback();
|
|
358
|
-
this.#rootPart?._$clear?.();
|
|
359
|
-
this.#rootPart = undefined;
|
|
360
|
-
this.remove();
|
|
361
|
-
}
|
|
362
|
-
useWhileConnected(disposifiable) {
|
|
363
|
-
if (isNullish(disposifiable)) {
|
|
364
|
-
return disposifiable;
|
|
365
|
-
}
|
|
366
|
-
const disposable = toDisposable(disposifiable);
|
|
367
|
-
this.#connectedContext.use(disposable);
|
|
368
|
-
return disposable;
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Attach an event listener to an event on this component.
|
|
372
|
-
*
|
|
373
|
-
* @returns A {@link Disposable} to subsequently detach the event listener.
|
|
374
|
-
*/
|
|
375
|
-
on(type, callback, options) {
|
|
376
|
-
return eventListener(this, type, callback, options);
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* If an element that is either inside this element's shadow root or is a
|
|
380
|
-
* child of this element (ie. slotted) currently has focus, return that
|
|
381
|
-
* element. Otherwise, return null.
|
|
382
|
-
*/
|
|
383
|
-
getFocusedElement() {
|
|
384
|
-
return this.shadowRoot?.activeElement ?? this.querySelector(":focus");
|
|
385
|
-
}
|
|
386
|
-
query(selector) {
|
|
387
|
-
return this.renderRoot.querySelector(selector);
|
|
388
|
-
}
|
|
389
|
-
queryAll(selector) {
|
|
390
|
-
return this.renderRoot.querySelectorAll(selector);
|
|
391
|
-
}
|
|
392
|
-
querySlot(options) {
|
|
393
|
-
const { slot, selector, instanceOf, nodes, reactive } = options ?? {};
|
|
394
|
-
const query = getOrSetQuery(this, options ?? {}, () => (slotEl) => {
|
|
395
|
-
const elements = isNullish(slotEl)
|
|
396
|
-
? []
|
|
397
|
-
: nodes === true
|
|
398
|
-
? slotEl.assignedNodes(options)
|
|
399
|
-
: slotEl.assignedElements(options);
|
|
400
|
-
const selectedElements = selector !== undefined && nodes !== true
|
|
401
|
-
? elements.filter((node) => node.matches(selector))
|
|
402
|
-
: elements;
|
|
403
|
-
return instanceOf !== undefined
|
|
404
|
-
? selectedElements.filter((el) => el instanceof instanceOf)
|
|
405
|
-
: selectedElements;
|
|
406
|
-
});
|
|
407
|
-
const slotEl = findSlot(this, slot);
|
|
408
|
-
if (reactive !== true) {
|
|
409
|
-
return query(slotEl);
|
|
410
|
-
}
|
|
411
|
-
const sig = getOrSetSignal(this, query, () => {
|
|
412
|
-
const sig = Signal(query(slotEl), { equals: listsEqual });
|
|
413
|
-
this.addController(new SlotChangeController(this, slot, sig, query));
|
|
414
|
-
return sig.readOnly();
|
|
415
|
-
});
|
|
416
|
-
return sig;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
//# sourceMappingURL=component.js.map
|
package/dist/component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAsB,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,MAAM,EACN,SAAS,GAOZ,MAAM,KAAK,CAAC;AAGb,OAAO,EAAE,eAAe,EAAE,aAAa,EAAwB,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAA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