@bodil/dom 0.2.0 → 0.2.1
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.d.ts +68 -0
- package/dist/component.js +65 -0
- package/dist/component.js.map +1 -1
- package/dist/emitter.d.ts +6 -0
- package/dist/emitter.js +4 -0
- package/dist/emitter.js.map +1 -1
- package/package.json +1 -1
- package/src/component.ts +80 -0
- package/src/emitter.ts +6 -0
package/dist/component.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
47
47
|
* class MyComponent extends Component {
|
|
48
48
|
* static deps: Deps = [ MySubcomponent, MyOtherSubcomponent ];
|
|
49
49
|
* }
|
|
50
|
+
*
|
|
51
|
+
* @category Declarations
|
|
50
52
|
*/
|
|
51
53
|
static deps: Deps;
|
|
52
54
|
/**
|
|
@@ -66,8 +68,13 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
66
68
|
* }
|
|
67
69
|
* `;
|
|
68
70
|
* }
|
|
71
|
+
*
|
|
72
|
+
* @category Declarations
|
|
69
73
|
*/
|
|
70
74
|
static styles?: CSSStyleSpecDeclaration;
|
|
75
|
+
/**
|
|
76
|
+
* @category Advanced
|
|
77
|
+
*/
|
|
71
78
|
static shadowRootOptions: ShadowRootInit;
|
|
72
79
|
private static initialisers;
|
|
73
80
|
/** @ignore */
|
|
@@ -77,13 +84,28 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
77
84
|
/** @ignore */
|
|
78
85
|
protected static requiredProperties: Set<string | symbol>;
|
|
79
86
|
private static [finalised];
|
|
87
|
+
/**
|
|
88
|
+
* @category Advanced
|
|
89
|
+
*/
|
|
80
90
|
renderOptions: RenderOptions;
|
|
91
|
+
/**
|
|
92
|
+
* {@inheritDoc EmitterElement.emits}
|
|
93
|
+
* @category Declarations
|
|
94
|
+
*/
|
|
81
95
|
emits: object;
|
|
96
|
+
/**
|
|
97
|
+
* @category Advanced
|
|
98
|
+
*/
|
|
82
99
|
readonly renderRoot: ShadowRoot | HTMLElement;
|
|
83
100
|
/**
|
|
84
101
|
* True if this component had scheduled an update which has not yet started.
|
|
102
|
+
*
|
|
103
|
+
* @category Render
|
|
85
104
|
*/
|
|
86
105
|
get isUpdatePending(): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* @category Render
|
|
108
|
+
*/
|
|
87
109
|
get updateComplete(): Promise<boolean>;
|
|
88
110
|
/**
|
|
89
111
|
* A {@link Promise} which resolves when this component has completed its
|
|
@@ -92,6 +114,8 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
92
114
|
*
|
|
93
115
|
* By default, a component considers itself stabilised when all of its
|
|
94
116
|
* children which are also {@link Component}s are reporting as stabilised.
|
|
117
|
+
*
|
|
118
|
+
* @category Render
|
|
95
119
|
*/
|
|
96
120
|
get hasStabilised(): Promise<void>;
|
|
97
121
|
/**
|
|
@@ -101,11 +125,15 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
101
125
|
* This can be passed along to asynchronous tasks such as {@link fetch}
|
|
102
126
|
* initiated by this component, which will then be aborted automatically if
|
|
103
127
|
* the component is removed from the DOM.
|
|
128
|
+
*
|
|
129
|
+
* @category Advanced
|
|
104
130
|
*/
|
|
105
131
|
get abortSignal(): AbortSignal;
|
|
106
132
|
/**
|
|
107
133
|
* Register a function which will be executed whenever an instance of this
|
|
108
134
|
* class is constructed.
|
|
135
|
+
*
|
|
136
|
+
* @category Advanced
|
|
109
137
|
*/
|
|
110
138
|
static addInitialiser(init: (this: Component) => void): void;
|
|
111
139
|
/**
|
|
@@ -133,7 +161,16 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
133
161
|
* @ignore
|
|
134
162
|
*/
|
|
135
163
|
$signal<K extends keyof this & string, V extends this[K]>(prop: K): Signal.Computed<V>;
|
|
164
|
+
/**
|
|
165
|
+
* Adds a controller to the host, which sets up the controller's lifecycle
|
|
166
|
+
* methods to be called with the host's lifecycle.
|
|
167
|
+
* @category Advanced
|
|
168
|
+
*/
|
|
136
169
|
addController(controller: ReactiveController): void;
|
|
170
|
+
/**
|
|
171
|
+
* Removes a controller from the host.
|
|
172
|
+
* @category Advanced
|
|
173
|
+
*/
|
|
137
174
|
removeController(controller: ReactiveController): void;
|
|
138
175
|
/**
|
|
139
176
|
* Create the component's render root.
|
|
@@ -144,10 +181,20 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
144
181
|
* If you don't want to use a shadow DOM, you can override this method to
|
|
145
182
|
* just `return this`, which causes the component's contents to render as
|
|
146
183
|
* direct children of the component itself.
|
|
184
|
+
*
|
|
185
|
+
* @category Advanced
|
|
147
186
|
*/
|
|
148
187
|
protected createRenderRoot(): HTMLElement | ShadowRoot;
|
|
188
|
+
/**
|
|
189
|
+
* Add a style sheet to the component's shadow root.
|
|
190
|
+
*
|
|
191
|
+
* @category Advanced
|
|
192
|
+
*/
|
|
193
|
+
addStyleSheet(spec: CSSStyleSpecDeclaration): void;
|
|
149
194
|
/**
|
|
150
195
|
* Ask this component to update itself.
|
|
196
|
+
*
|
|
197
|
+
* @category Render
|
|
151
198
|
*/
|
|
152
199
|
requestUpdate(opts?: UpdateConfig): void;
|
|
153
200
|
/**
|
|
@@ -161,6 +208,8 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
161
208
|
/**
|
|
162
209
|
* Return an iterator over this component's children which are also
|
|
163
210
|
* {@link Component}s.
|
|
211
|
+
*
|
|
212
|
+
* @category Queries
|
|
164
213
|
*/
|
|
165
214
|
protected findChildComponents(root?: Element | ShadowRoot): IteratorObject<Component>;
|
|
166
215
|
/**
|
|
@@ -169,25 +218,31 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
169
218
|
*
|
|
170
219
|
* The default implementation waits for any children which are also
|
|
171
220
|
* {@link Component}s to report that they have also stabilised.
|
|
221
|
+
*
|
|
222
|
+
* @category Render
|
|
172
223
|
*/
|
|
173
224
|
protected stabilise(): Promise<void>;
|
|
174
225
|
/**
|
|
175
226
|
* This lifecycle callback is called each time this component is connected
|
|
176
227
|
* to the DOM.
|
|
228
|
+
* @category Lifecycle
|
|
177
229
|
*/
|
|
178
230
|
protected connected(): void;
|
|
179
231
|
/**
|
|
180
232
|
* This lifecycle callback is called each time this component is
|
|
181
233
|
* disconnected from the DOM.
|
|
234
|
+
* @category Lifecycle
|
|
182
235
|
*/
|
|
183
236
|
protected disconnected(): void;
|
|
184
237
|
/**
|
|
185
238
|
* This lifecycle callback is called each time an update has completed.
|
|
239
|
+
* @category Lifecycle
|
|
186
240
|
*/
|
|
187
241
|
protected updated(): void;
|
|
188
242
|
/**
|
|
189
243
|
* This lifecycle callback is called after the component's first update has
|
|
190
244
|
* completed, and before {@link Component.updated}.
|
|
245
|
+
* @category Lifecycle
|
|
191
246
|
*/
|
|
192
247
|
protected firstUpdated(): void;
|
|
193
248
|
/**
|
|
@@ -195,18 +250,21 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
195
250
|
* stabilised after its first update.
|
|
196
251
|
*
|
|
197
252
|
* @see {@link Component.hasStabilised}
|
|
253
|
+
* @category Lifecycle
|
|
198
254
|
*/
|
|
199
255
|
protected stabilised(): void;
|
|
200
256
|
/**
|
|
201
257
|
* This lifecycle callback is called every time a property decorated with
|
|
202
258
|
* the @{@link require} decorator has changed, but only when every property
|
|
203
259
|
* marked as such is not `undefined`.
|
|
260
|
+
* @category Lifecycle
|
|
204
261
|
*/
|
|
205
262
|
protected initialised(): void;
|
|
206
263
|
/**
|
|
207
264
|
* This lifecycle callback is called the first time every property decorated
|
|
208
265
|
* with @{@link require} has been defined, and before
|
|
209
266
|
* {@link Component.initialised}.
|
|
267
|
+
* @category Lifecycle
|
|
210
268
|
*/
|
|
211
269
|
protected firstInitialised(): void;
|
|
212
270
|
/**
|
|
@@ -224,12 +282,16 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
224
282
|
* `;
|
|
225
283
|
* }
|
|
226
284
|
* }
|
|
285
|
+
*
|
|
286
|
+
* @category Render
|
|
227
287
|
*/
|
|
228
288
|
protected render(): unknown;
|
|
289
|
+
/** @internal */
|
|
229
290
|
[Symbol.dispose](): void;
|
|
230
291
|
/**
|
|
231
292
|
* Register a {@link Disposable} for automatic disposal when this component
|
|
232
293
|
* is disposed.
|
|
294
|
+
* @category Resources
|
|
233
295
|
*/
|
|
234
296
|
use(disposifiable: undefined): undefined;
|
|
235
297
|
use(disposifiable: null): null;
|
|
@@ -251,6 +313,7 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
251
313
|
* super.connectedCallback();
|
|
252
314
|
* this.useWhileConnected(this.on("click", this.handleClick.bind(this)));
|
|
253
315
|
* }
|
|
316
|
+
* @category Resources
|
|
254
317
|
*/
|
|
255
318
|
useWhileConnected(disposifiable: Disposifiable, secondDisposable: Disposifiable, ...disposifiables: Array<Disposifiable>): Array<Disposable>;
|
|
256
319
|
useWhileConnected(disposifiable: undefined): undefined;
|
|
@@ -262,12 +325,14 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
262
325
|
* Attach an event listener to an event on this component.
|
|
263
326
|
*
|
|
264
327
|
* @returns A {@link Disposable} to subsequently detach the event listener.
|
|
328
|
+
* @category Events
|
|
265
329
|
*/
|
|
266
330
|
on<K extends keyof HTMLElementEventMap>(type: K, callback: (event: HTMLElementEventMap[K]) => void, options?: AddEventListenerOptions | boolean): Disposable;
|
|
267
331
|
/**
|
|
268
332
|
* If an element that is either inside this element's shadow root or is a
|
|
269
333
|
* child of this element (ie. slotted) currently has focus, return that
|
|
270
334
|
* element. Otherwise, return null.
|
|
335
|
+
* @category Queries
|
|
271
336
|
*/
|
|
272
337
|
getFocusedElement(): Element | null;
|
|
273
338
|
/**
|
|
@@ -290,6 +355,7 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
290
355
|
* return html`<button>I am a button</button>`;
|
|
291
356
|
* }
|
|
292
357
|
* }
|
|
358
|
+
* @category Queries
|
|
293
359
|
*/
|
|
294
360
|
query<El extends keyof HTMLElementTagNameMap>(selector: El): HTMLElementTagNameMap[El] | null;
|
|
295
361
|
query<El extends keyof SVGElementTagNameMap>(selector: El): SVGElementTagNameMap[El] | null;
|
|
@@ -320,6 +386,7 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
320
386
|
* `;
|
|
321
387
|
* }
|
|
322
388
|
* }
|
|
389
|
+
* @category Queries
|
|
323
390
|
*/
|
|
324
391
|
queryAll<El extends keyof HTMLElementTagNameMap>(selector: El): NodeListOf<HTMLElementTagNameMap[El]>;
|
|
325
392
|
queryAll<El extends keyof SVGElementTagNameMap>(selector: El): NodeListOf<SVGElementTagNameMap[El]>;
|
|
@@ -333,6 +400,7 @@ export declare abstract class Component extends EmitterElement implements Reacti
|
|
|
333
400
|
*
|
|
334
401
|
* If you include `reactive: true` in your query, the result will be a
|
|
335
402
|
* signal which updates with the contents of the slot.
|
|
403
|
+
* @category Queries
|
|
336
404
|
*/
|
|
337
405
|
querySlot(options: QuerySlotOptions & {
|
|
338
406
|
nodes: true;
|
package/dist/component.js
CHANGED
|
@@ -48,8 +48,13 @@ export class Component extends EmitterElement {
|
|
|
48
48
|
* class MyComponent extends Component {
|
|
49
49
|
* static deps: Deps = [ MySubcomponent, MyOtherSubcomponent ];
|
|
50
50
|
* }
|
|
51
|
+
*
|
|
52
|
+
* @category Declarations
|
|
51
53
|
*/
|
|
52
54
|
static { this.deps = []; }
|
|
55
|
+
/**
|
|
56
|
+
* @category Advanced
|
|
57
|
+
*/
|
|
53
58
|
static { this.shadowRootOptions = { mode: "open" }; }
|
|
54
59
|
static { this.initialisers = new Set(); }
|
|
55
60
|
/** @ignore */
|
|
@@ -75,10 +80,15 @@ export class Component extends EmitterElement {
|
|
|
75
80
|
#ignoreAttributeUpdates;
|
|
76
81
|
/**
|
|
77
82
|
* True if this component had scheduled an update which has not yet started.
|
|
83
|
+
*
|
|
84
|
+
* @category Render
|
|
78
85
|
*/
|
|
79
86
|
get isUpdatePending() {
|
|
80
87
|
return this.#isUpdatePending;
|
|
81
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* @category Render
|
|
91
|
+
*/
|
|
82
92
|
get updateComplete() {
|
|
83
93
|
return this.#updateResult.promise;
|
|
84
94
|
}
|
|
@@ -89,6 +99,8 @@ export class Component extends EmitterElement {
|
|
|
89
99
|
*
|
|
90
100
|
* By default, a component considers itself stabilised when all of its
|
|
91
101
|
* children which are also {@link Component}s are reporting as stabilised.
|
|
102
|
+
*
|
|
103
|
+
* @category Render
|
|
92
104
|
*/
|
|
93
105
|
get hasStabilised() {
|
|
94
106
|
return this.#stabilised.promise;
|
|
@@ -100,6 +112,8 @@ export class Component extends EmitterElement {
|
|
|
100
112
|
* This can be passed along to asynchronous tasks such as {@link fetch}
|
|
101
113
|
* initiated by this component, which will then be aborted automatically if
|
|
102
114
|
* the component is removed from the DOM.
|
|
115
|
+
*
|
|
116
|
+
* @category Advanced
|
|
103
117
|
*/
|
|
104
118
|
get abortSignal() {
|
|
105
119
|
return this.#abortController.signal;
|
|
@@ -108,6 +122,8 @@ export class Component extends EmitterElement {
|
|
|
108
122
|
/**
|
|
109
123
|
* Register a function which will be executed whenever an instance of this
|
|
110
124
|
* class is constructed.
|
|
125
|
+
*
|
|
126
|
+
* @category Advanced
|
|
111
127
|
*/
|
|
112
128
|
static addInitialiser(init) {
|
|
113
129
|
if (!Object.hasOwn(this, "initialisers")) {
|
|
@@ -158,6 +174,9 @@ export class Component extends EmitterElement {
|
|
|
158
174
|
/** @ignore */
|
|
159
175
|
constructor() {
|
|
160
176
|
super();
|
|
177
|
+
/**
|
|
178
|
+
* @category Advanced
|
|
179
|
+
*/
|
|
161
180
|
this.renderOptions = { host: this };
|
|
162
181
|
this.#controllers = new Set();
|
|
163
182
|
this.#connectedContext = new DisposableContext();
|
|
@@ -170,6 +189,9 @@ export class Component extends EmitterElement {
|
|
|
170
189
|
this.#firstUpdate = false;
|
|
171
190
|
this.#initialised = false;
|
|
172
191
|
this.#viewTransitionRequested = false;
|
|
192
|
+
/**
|
|
193
|
+
* @category Advanced
|
|
194
|
+
*/
|
|
173
195
|
this.renderRoot = this.createRenderRoot();
|
|
174
196
|
this.#abortController = new AbortController();
|
|
175
197
|
this.#ignoreAttributeUpdates = 1;
|
|
@@ -282,12 +304,21 @@ export class Component extends EmitterElement {
|
|
|
282
304
|
throw new TypeError(`Object has no reactive property ${JSON.stringify(prop)}`);
|
|
283
305
|
});
|
|
284
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Adds a controller to the host, which sets up the controller's lifecycle
|
|
309
|
+
* methods to be called with the host's lifecycle.
|
|
310
|
+
* @category Advanced
|
|
311
|
+
*/
|
|
285
312
|
addController(controller) {
|
|
286
313
|
this.#controllers.add(controller);
|
|
287
314
|
if (this.renderRoot !== undefined && this.isConnected) {
|
|
288
315
|
controller.hostConnected?.();
|
|
289
316
|
}
|
|
290
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* Removes a controller from the host.
|
|
320
|
+
* @category Advanced
|
|
321
|
+
*/
|
|
291
322
|
removeController(controller) {
|
|
292
323
|
this.#controllers.delete(controller);
|
|
293
324
|
}
|
|
@@ -300,6 +331,8 @@ export class Component extends EmitterElement {
|
|
|
300
331
|
* If you don't want to use a shadow DOM, you can override this method to
|
|
301
332
|
* just `return this`, which causes the component's contents to render as
|
|
302
333
|
* direct children of the component itself.
|
|
334
|
+
*
|
|
335
|
+
* @category Advanced
|
|
303
336
|
*/
|
|
304
337
|
createRenderRoot() {
|
|
305
338
|
const renderRoot = this.shadowRoot ??
|
|
@@ -308,8 +341,24 @@ export class Component extends EmitterElement {
|
|
|
308
341
|
this.renderOptions.renderBefore ??= renderRoot.firstChild;
|
|
309
342
|
return renderRoot;
|
|
310
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* Add a style sheet to the component's shadow root.
|
|
346
|
+
*
|
|
347
|
+
* @category Advanced
|
|
348
|
+
*/
|
|
349
|
+
addStyleSheet(spec) {
|
|
350
|
+
if (!(this.renderRoot instanceof ShadowRoot)) {
|
|
351
|
+
throw new Error("Component needs a shadow root in order to add a style sheet");
|
|
352
|
+
}
|
|
353
|
+
const sheets = (Array.isArray(spec)
|
|
354
|
+
? spec.flat(Infinity)
|
|
355
|
+
: [spec]).map(processCSSStyleSpec);
|
|
356
|
+
adoptStyles(this.renderRoot, sheets);
|
|
357
|
+
}
|
|
311
358
|
/**
|
|
312
359
|
* Ask this component to update itself.
|
|
360
|
+
*
|
|
361
|
+
* @category Render
|
|
313
362
|
*/
|
|
314
363
|
requestUpdate(opts) {
|
|
315
364
|
this.#dirty = true;
|
|
@@ -409,6 +458,8 @@ export class Component extends EmitterElement {
|
|
|
409
458
|
/**
|
|
410
459
|
* Return an iterator over this component's children which are also
|
|
411
460
|
* {@link Component}s.
|
|
461
|
+
*
|
|
462
|
+
* @category Queries
|
|
412
463
|
*/
|
|
413
464
|
findChildComponents(root = this.renderRoot) {
|
|
414
465
|
return findDescendants(root, (el) => el instanceof Component);
|
|
@@ -419,6 +470,8 @@ export class Component extends EmitterElement {
|
|
|
419
470
|
*
|
|
420
471
|
* The default implementation waits for any children which are also
|
|
421
472
|
* {@link Component}s to report that they have also stabilised.
|
|
473
|
+
*
|
|
474
|
+
* @category Render
|
|
422
475
|
*/
|
|
423
476
|
async stabilise() {
|
|
424
477
|
// wait for children to stabilise
|
|
@@ -429,6 +482,7 @@ export class Component extends EmitterElement {
|
|
|
429
482
|
/**
|
|
430
483
|
* This lifecycle callback is called each time this component is connected
|
|
431
484
|
* to the DOM.
|
|
485
|
+
* @category Lifecycle
|
|
432
486
|
*/
|
|
433
487
|
connected() {
|
|
434
488
|
//
|
|
@@ -436,12 +490,14 @@ export class Component extends EmitterElement {
|
|
|
436
490
|
/**
|
|
437
491
|
* This lifecycle callback is called each time this component is
|
|
438
492
|
* disconnected from the DOM.
|
|
493
|
+
* @category Lifecycle
|
|
439
494
|
*/
|
|
440
495
|
disconnected() {
|
|
441
496
|
//
|
|
442
497
|
}
|
|
443
498
|
/**
|
|
444
499
|
* This lifecycle callback is called each time an update has completed.
|
|
500
|
+
* @category Lifecycle
|
|
445
501
|
*/
|
|
446
502
|
updated() {
|
|
447
503
|
//
|
|
@@ -449,6 +505,7 @@ export class Component extends EmitterElement {
|
|
|
449
505
|
/**
|
|
450
506
|
* This lifecycle callback is called after the component's first update has
|
|
451
507
|
* completed, and before {@link Component.updated}.
|
|
508
|
+
* @category Lifecycle
|
|
452
509
|
*/
|
|
453
510
|
firstUpdated() {
|
|
454
511
|
//
|
|
@@ -458,6 +515,7 @@ export class Component extends EmitterElement {
|
|
|
458
515
|
* stabilised after its first update.
|
|
459
516
|
*
|
|
460
517
|
* @see {@link Component.hasStabilised}
|
|
518
|
+
* @category Lifecycle
|
|
461
519
|
*/
|
|
462
520
|
stabilised() {
|
|
463
521
|
//
|
|
@@ -466,6 +524,7 @@ export class Component extends EmitterElement {
|
|
|
466
524
|
* This lifecycle callback is called every time a property decorated with
|
|
467
525
|
* the @{@link require} decorator has changed, but only when every property
|
|
468
526
|
* marked as such is not `undefined`.
|
|
527
|
+
* @category Lifecycle
|
|
469
528
|
*/
|
|
470
529
|
initialised() {
|
|
471
530
|
//
|
|
@@ -474,6 +533,7 @@ export class Component extends EmitterElement {
|
|
|
474
533
|
* This lifecycle callback is called the first time every property decorated
|
|
475
534
|
* with @{@link require} has been defined, and before
|
|
476
535
|
* {@link Component.initialised}.
|
|
536
|
+
* @category Lifecycle
|
|
477
537
|
*/
|
|
478
538
|
firstInitialised() {
|
|
479
539
|
//
|
|
@@ -493,10 +553,13 @@ export class Component extends EmitterElement {
|
|
|
493
553
|
* `;
|
|
494
554
|
* }
|
|
495
555
|
* }
|
|
556
|
+
*
|
|
557
|
+
* @category Render
|
|
496
558
|
*/
|
|
497
559
|
render() {
|
|
498
560
|
return nothing;
|
|
499
561
|
}
|
|
562
|
+
/** @internal */
|
|
500
563
|
[(_a = finalised, Symbol.dispose)]() {
|
|
501
564
|
for (const child of this.findChildComponents()) {
|
|
502
565
|
child[Symbol.dispose]();
|
|
@@ -534,6 +597,7 @@ export class Component extends EmitterElement {
|
|
|
534
597
|
* Attach an event listener to an event on this component.
|
|
535
598
|
*
|
|
536
599
|
* @returns A {@link Disposable} to subsequently detach the event listener.
|
|
600
|
+
* @category Events
|
|
537
601
|
*/
|
|
538
602
|
on(type, callback, options) {
|
|
539
603
|
return eventListener(this, type, callback, options);
|
|
@@ -542,6 +606,7 @@ export class Component extends EmitterElement {
|
|
|
542
606
|
* If an element that is either inside this element's shadow root or is a
|
|
543
607
|
* child of this element (ie. slotted) currently has focus, return that
|
|
544
608
|
* element. Otherwise, return null.
|
|
609
|
+
* @category Queries
|
|
545
610
|
*/
|
|
546
611
|
getFocusedElement() {
|
|
547
612
|
return this.shadowRoot?.activeElement ?? this.querySelector(":focus");
|
package/dist/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,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,GASZ,MAAM,KAAK,CAAC;AAGb,OAAO,EACH,eAAe,EACf,aAAa,EACb,WAAW,GAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,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 +67,8 @@ export declare class EmitterElement extends HTMLElement {
|
|
|
67
67
|
* class MyElement extends EmitterElement {
|
|
68
68
|
* emits!: Emits<"my-event" | "my-other-event";
|
|
69
69
|
* }
|
|
70
|
+
*
|
|
71
|
+
* @category Events
|
|
70
72
|
*/
|
|
71
73
|
emits: {
|
|
72
74
|
[K in keyof HTMLElementEventMap]?: never;
|
|
@@ -75,6 +77,8 @@ export declare class EmitterElement extends HTMLElement {
|
|
|
75
77
|
* Emit a custom event with the given name and detail.
|
|
76
78
|
*
|
|
77
79
|
* Event init options default to `{ bubbles: true, composed: true }`.
|
|
80
|
+
*
|
|
81
|
+
* @category Events
|
|
78
82
|
*/
|
|
79
83
|
emit<M extends CustomEventTypes<keyof this["emits"] & keyof HTMLElementEventMap>, K extends Extract<keyof M, string>, D extends M[K]>(name: K, detail?: D, options?: EventInit): CustomEvent<D>;
|
|
80
84
|
/**
|
|
@@ -86,6 +90,8 @@ export declare class EmitterElement extends HTMLElement {
|
|
|
86
90
|
* @example
|
|
87
91
|
* this.emitEvent("click", MouseEvent, { button: 2 });
|
|
88
92
|
* // emits: new MouseEvent("click", { button: 2 });
|
|
93
|
+
*
|
|
94
|
+
* @category Events
|
|
89
95
|
*/
|
|
90
96
|
emitEvent<K extends keyof this["emits"] & keyof HTMLElementEventMap, E extends HTMLElementEventMap[K], C extends new (type: string, ...args: Args) => E, Args extends Array<any>>(name: K, constructor: C, ...args: Args): E;
|
|
91
97
|
}
|
package/dist/emitter.js
CHANGED
|
@@ -27,6 +27,8 @@ export class EmitterElement extends HTMLElement {
|
|
|
27
27
|
* Emit a custom event with the given name and detail.
|
|
28
28
|
*
|
|
29
29
|
* Event init options default to `{ bubbles: true, composed: true }`.
|
|
30
|
+
*
|
|
31
|
+
* @category Events
|
|
30
32
|
*/
|
|
31
33
|
emit(name, detail, options) {
|
|
32
34
|
const event = new CustomEvent(name, {
|
|
@@ -47,6 +49,8 @@ export class EmitterElement extends HTMLElement {
|
|
|
47
49
|
* @example
|
|
48
50
|
* this.emitEvent("click", MouseEvent, { button: 2 });
|
|
49
51
|
* // emits: new MouseEvent("click", { button: 2 });
|
|
52
|
+
*
|
|
53
|
+
* @category Events
|
|
50
54
|
*/
|
|
51
55
|
emitEvent(name, constructor, ...args) {
|
|
52
56
|
const event = new constructor(name, ...args);
|
package/dist/emitter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../src/emitter.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../src/emitter.ts"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAa3C;;;;;;OAMG;IACH,IAAI,CAIF,IAAO,EAAE,MAAU,EAAE,OAAmB;QACtC,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE;YAChC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM;YACN,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;SACrB,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1B,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,SAAS,CAKP,IAAO,EAAE,WAAc,EAAE,GAAG,IAAU;QACpC,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1B,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
|
package/package.json
CHANGED
package/src/component.ts
CHANGED
|
@@ -107,6 +107,8 @@ export abstract class Component
|
|
|
107
107
|
* class MyComponent extends Component {
|
|
108
108
|
* static deps: Deps = [ MySubcomponent, MyOtherSubcomponent ];
|
|
109
109
|
* }
|
|
110
|
+
*
|
|
111
|
+
* @category Declarations
|
|
110
112
|
*/
|
|
111
113
|
static deps: Deps = [];
|
|
112
114
|
|
|
@@ -127,9 +129,14 @@ export abstract class Component
|
|
|
127
129
|
* }
|
|
128
130
|
* `;
|
|
129
131
|
* }
|
|
132
|
+
*
|
|
133
|
+
* @category Declarations
|
|
130
134
|
*/
|
|
131
135
|
static styles?: CSSStyleSpecDeclaration;
|
|
132
136
|
|
|
137
|
+
/**
|
|
138
|
+
* @category Advanced
|
|
139
|
+
*/
|
|
133
140
|
static shadowRootOptions: ShadowRootInit = { mode: "open" };
|
|
134
141
|
|
|
135
142
|
private static initialisers = new Set<() => void>();
|
|
@@ -142,7 +149,15 @@ export abstract class Component
|
|
|
142
149
|
protected static requiredProperties = new Set<string | symbol>();
|
|
143
150
|
private static [finalised] = true;
|
|
144
151
|
|
|
152
|
+
/**
|
|
153
|
+
* @category Advanced
|
|
154
|
+
*/
|
|
145
155
|
renderOptions: RenderOptions = { host: this };
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* {@inheritDoc EmitterElement.emits}
|
|
159
|
+
* @category Declarations
|
|
160
|
+
*/
|
|
146
161
|
emits!: object;
|
|
147
162
|
|
|
148
163
|
readonly #controllers = new Set<ReactiveController>();
|
|
@@ -160,15 +175,23 @@ export abstract class Component
|
|
|
160
175
|
#viewTransitionRequested = false;
|
|
161
176
|
#ignoreAttributeUpdates: number;
|
|
162
177
|
|
|
178
|
+
/**
|
|
179
|
+
* @category Advanced
|
|
180
|
+
*/
|
|
163
181
|
readonly renderRoot: ShadowRoot | HTMLElement = this.createRenderRoot();
|
|
164
182
|
|
|
165
183
|
/**
|
|
166
184
|
* True if this component had scheduled an update which has not yet started.
|
|
185
|
+
*
|
|
186
|
+
* @category Render
|
|
167
187
|
*/
|
|
168
188
|
get isUpdatePending(): boolean {
|
|
169
189
|
return this.#isUpdatePending;
|
|
170
190
|
}
|
|
171
191
|
|
|
192
|
+
/**
|
|
193
|
+
* @category Render
|
|
194
|
+
*/
|
|
172
195
|
get updateComplete(): Promise<boolean> {
|
|
173
196
|
return this.#updateResult.promise;
|
|
174
197
|
}
|
|
@@ -180,6 +203,8 @@ export abstract class Component
|
|
|
180
203
|
*
|
|
181
204
|
* By default, a component considers itself stabilised when all of its
|
|
182
205
|
* children which are also {@link Component}s are reporting as stabilised.
|
|
206
|
+
*
|
|
207
|
+
* @category Render
|
|
183
208
|
*/
|
|
184
209
|
get hasStabilised(): Promise<void> {
|
|
185
210
|
return this.#stabilised.promise;
|
|
@@ -192,6 +217,8 @@ export abstract class Component
|
|
|
192
217
|
* This can be passed along to asynchronous tasks such as {@link fetch}
|
|
193
218
|
* initiated by this component, which will then be aborted automatically if
|
|
194
219
|
* the component is removed from the DOM.
|
|
220
|
+
*
|
|
221
|
+
* @category Advanced
|
|
195
222
|
*/
|
|
196
223
|
get abortSignal(): AbortSignal {
|
|
197
224
|
return this.#abortController.signal;
|
|
@@ -201,6 +228,8 @@ export abstract class Component
|
|
|
201
228
|
/**
|
|
202
229
|
* Register a function which will be executed whenever an instance of this
|
|
203
230
|
* class is constructed.
|
|
231
|
+
*
|
|
232
|
+
* @category Advanced
|
|
204
233
|
*/
|
|
205
234
|
static addInitialiser(init: (this: Component) => void) {
|
|
206
235
|
if (!Object.hasOwn(this, "initialisers")) {
|
|
@@ -388,6 +417,11 @@ export abstract class Component
|
|
|
388
417
|
}) as Signal.Computed<V>;
|
|
389
418
|
}
|
|
390
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Adds a controller to the host, which sets up the controller's lifecycle
|
|
422
|
+
* methods to be called with the host's lifecycle.
|
|
423
|
+
* @category Advanced
|
|
424
|
+
*/
|
|
391
425
|
addController(controller: ReactiveController) {
|
|
392
426
|
this.#controllers.add(controller);
|
|
393
427
|
if (this.renderRoot !== undefined && this.isConnected) {
|
|
@@ -395,6 +429,10 @@ export abstract class Component
|
|
|
395
429
|
}
|
|
396
430
|
}
|
|
397
431
|
|
|
432
|
+
/**
|
|
433
|
+
* Removes a controller from the host.
|
|
434
|
+
* @category Advanced
|
|
435
|
+
*/
|
|
398
436
|
removeController(controller: ReactiveController) {
|
|
399
437
|
this.#controllers.delete(controller);
|
|
400
438
|
}
|
|
@@ -408,6 +446,8 @@ export abstract class Component
|
|
|
408
446
|
* If you don't want to use a shadow DOM, you can override this method to
|
|
409
447
|
* just `return this`, which causes the component's contents to render as
|
|
410
448
|
* direct children of the component itself.
|
|
449
|
+
*
|
|
450
|
+
* @category Advanced
|
|
411
451
|
*/
|
|
412
452
|
protected createRenderRoot(): HTMLElement | ShadowRoot {
|
|
413
453
|
const renderRoot =
|
|
@@ -418,8 +458,27 @@ export abstract class Component
|
|
|
418
458
|
return renderRoot;
|
|
419
459
|
}
|
|
420
460
|
|
|
461
|
+
/**
|
|
462
|
+
* Add a style sheet to the component's shadow root.
|
|
463
|
+
*
|
|
464
|
+
* @category Advanced
|
|
465
|
+
*/
|
|
466
|
+
addStyleSheet(spec: CSSStyleSpecDeclaration) {
|
|
467
|
+
if (!(this.renderRoot instanceof ShadowRoot)) {
|
|
468
|
+
throw new Error("Component needs a shadow root in order to add a style sheet");
|
|
469
|
+
}
|
|
470
|
+
const sheets = (
|
|
471
|
+
Array.isArray(spec)
|
|
472
|
+
? ((spec as Array<unknown>).flat(Infinity) as Array<CSSStyleSpec>)
|
|
473
|
+
: [spec]
|
|
474
|
+
).map(processCSSStyleSpec);
|
|
475
|
+
adoptStyles(this.renderRoot, sheets);
|
|
476
|
+
}
|
|
477
|
+
|
|
421
478
|
/**
|
|
422
479
|
* Ask this component to update itself.
|
|
480
|
+
*
|
|
481
|
+
* @category Render
|
|
423
482
|
*/
|
|
424
483
|
requestUpdate(opts?: UpdateConfig) {
|
|
425
484
|
this.#dirty = true;
|
|
@@ -529,6 +588,8 @@ export abstract class Component
|
|
|
529
588
|
/**
|
|
530
589
|
* Return an iterator over this component's children which are also
|
|
531
590
|
* {@link Component}s.
|
|
591
|
+
*
|
|
592
|
+
* @category Queries
|
|
532
593
|
*/
|
|
533
594
|
protected findChildComponents(
|
|
534
595
|
root: Element | ShadowRoot = this.renderRoot,
|
|
@@ -542,6 +603,8 @@ export abstract class Component
|
|
|
542
603
|
*
|
|
543
604
|
* The default implementation waits for any children which are also
|
|
544
605
|
* {@link Component}s to report that they have also stabilised.
|
|
606
|
+
*
|
|
607
|
+
* @category Render
|
|
545
608
|
*/
|
|
546
609
|
protected async stabilise(): Promise<void> {
|
|
547
610
|
// wait for children to stabilise
|
|
@@ -553,6 +616,7 @@ export abstract class Component
|
|
|
553
616
|
/**
|
|
554
617
|
* This lifecycle callback is called each time this component is connected
|
|
555
618
|
* to the DOM.
|
|
619
|
+
* @category Lifecycle
|
|
556
620
|
*/
|
|
557
621
|
protected connected(): void {
|
|
558
622
|
//
|
|
@@ -561,6 +625,7 @@ export abstract class Component
|
|
|
561
625
|
/**
|
|
562
626
|
* This lifecycle callback is called each time this component is
|
|
563
627
|
* disconnected from the DOM.
|
|
628
|
+
* @category Lifecycle
|
|
564
629
|
*/
|
|
565
630
|
protected disconnected(): void {
|
|
566
631
|
//
|
|
@@ -568,6 +633,7 @@ export abstract class Component
|
|
|
568
633
|
|
|
569
634
|
/**
|
|
570
635
|
* This lifecycle callback is called each time an update has completed.
|
|
636
|
+
* @category Lifecycle
|
|
571
637
|
*/
|
|
572
638
|
protected updated(): void {
|
|
573
639
|
//
|
|
@@ -576,6 +642,7 @@ export abstract class Component
|
|
|
576
642
|
/**
|
|
577
643
|
* This lifecycle callback is called after the component's first update has
|
|
578
644
|
* completed, and before {@link Component.updated}.
|
|
645
|
+
* @category Lifecycle
|
|
579
646
|
*/
|
|
580
647
|
protected firstUpdated() {
|
|
581
648
|
//
|
|
@@ -586,6 +653,7 @@ export abstract class Component
|
|
|
586
653
|
* stabilised after its first update.
|
|
587
654
|
*
|
|
588
655
|
* @see {@link Component.hasStabilised}
|
|
656
|
+
* @category Lifecycle
|
|
589
657
|
*/
|
|
590
658
|
protected stabilised() {
|
|
591
659
|
//
|
|
@@ -595,6 +663,7 @@ export abstract class Component
|
|
|
595
663
|
* This lifecycle callback is called every time a property decorated with
|
|
596
664
|
* the @{@link require} decorator has changed, but only when every property
|
|
597
665
|
* marked as such is not `undefined`.
|
|
666
|
+
* @category Lifecycle
|
|
598
667
|
*/
|
|
599
668
|
protected initialised() {
|
|
600
669
|
//
|
|
@@ -604,6 +673,7 @@ export abstract class Component
|
|
|
604
673
|
* This lifecycle callback is called the first time every property decorated
|
|
605
674
|
* with @{@link require} has been defined, and before
|
|
606
675
|
* {@link Component.initialised}.
|
|
676
|
+
* @category Lifecycle
|
|
607
677
|
*/
|
|
608
678
|
protected firstInitialised() {
|
|
609
679
|
//
|
|
@@ -624,11 +694,14 @@ export abstract class Component
|
|
|
624
694
|
* `;
|
|
625
695
|
* }
|
|
626
696
|
* }
|
|
697
|
+
*
|
|
698
|
+
* @category Render
|
|
627
699
|
*/
|
|
628
700
|
protected render(): unknown {
|
|
629
701
|
return nothing;
|
|
630
702
|
}
|
|
631
703
|
|
|
704
|
+
/** @internal */
|
|
632
705
|
[Symbol.dispose](): void {
|
|
633
706
|
for (const child of this.findChildComponents()) {
|
|
634
707
|
child[Symbol.dispose]();
|
|
@@ -643,6 +716,7 @@ export abstract class Component
|
|
|
643
716
|
/**
|
|
644
717
|
* Register a {@link Disposable} for automatic disposal when this component
|
|
645
718
|
* is disposed.
|
|
719
|
+
* @category Resources
|
|
646
720
|
*/
|
|
647
721
|
use(disposifiable: undefined): undefined;
|
|
648
722
|
use(disposifiable: null): null;
|
|
@@ -673,6 +747,7 @@ export abstract class Component
|
|
|
673
747
|
* super.connectedCallback();
|
|
674
748
|
* this.useWhileConnected(this.on("click", this.handleClick.bind(this)));
|
|
675
749
|
* }
|
|
750
|
+
* @category Resources
|
|
676
751
|
*/
|
|
677
752
|
useWhileConnected(
|
|
678
753
|
disposifiable: Disposifiable,
|
|
@@ -709,6 +784,7 @@ export abstract class Component
|
|
|
709
784
|
* Attach an event listener to an event on this component.
|
|
710
785
|
*
|
|
711
786
|
* @returns A {@link Disposable} to subsequently detach the event listener.
|
|
787
|
+
* @category Events
|
|
712
788
|
*/
|
|
713
789
|
on<K extends keyof HTMLElementEventMap>(
|
|
714
790
|
type: K,
|
|
@@ -722,6 +798,7 @@ export abstract class Component
|
|
|
722
798
|
* If an element that is either inside this element's shadow root or is a
|
|
723
799
|
* child of this element (ie. slotted) currently has focus, return that
|
|
724
800
|
* element. Otherwise, return null.
|
|
801
|
+
* @category Queries
|
|
725
802
|
*/
|
|
726
803
|
getFocusedElement(): Element | null {
|
|
727
804
|
return this.shadowRoot?.activeElement ?? this.querySelector(":focus");
|
|
@@ -747,6 +824,7 @@ export abstract class Component
|
|
|
747
824
|
* return html`<button>I am a button</button>`;
|
|
748
825
|
* }
|
|
749
826
|
* }
|
|
827
|
+
* @category Queries
|
|
750
828
|
*/
|
|
751
829
|
query<El extends keyof HTMLElementTagNameMap>(selector: El): HTMLElementTagNameMap[El] | null;
|
|
752
830
|
query<El extends keyof SVGElementTagNameMap>(selector: El): SVGElementTagNameMap[El] | null;
|
|
@@ -785,6 +863,7 @@ export abstract class Component
|
|
|
785
863
|
* `;
|
|
786
864
|
* }
|
|
787
865
|
* }
|
|
866
|
+
* @category Queries
|
|
788
867
|
*/
|
|
789
868
|
queryAll<El extends keyof HTMLElementTagNameMap>(
|
|
790
869
|
selector: El,
|
|
@@ -810,6 +889,7 @@ export abstract class Component
|
|
|
810
889
|
*
|
|
811
890
|
* If you include `reactive: true` in your query, the result will be a
|
|
812
891
|
* signal which updates with the contents of the slot.
|
|
892
|
+
* @category Queries
|
|
813
893
|
*/
|
|
814
894
|
querySlot(
|
|
815
895
|
options: QuerySlotOptions & { nodes: true; reactive: true },
|
package/src/emitter.ts
CHANGED
|
@@ -69,6 +69,8 @@ export class EmitterElement extends HTMLElement {
|
|
|
69
69
|
* class MyElement extends EmitterElement {
|
|
70
70
|
* emits!: Emits<"my-event" | "my-other-event";
|
|
71
71
|
* }
|
|
72
|
+
*
|
|
73
|
+
* @category Events
|
|
72
74
|
*/
|
|
73
75
|
emits!: { [K in keyof HTMLElementEventMap]?: never };
|
|
74
76
|
|
|
@@ -76,6 +78,8 @@ export class EmitterElement extends HTMLElement {
|
|
|
76
78
|
* Emit a custom event with the given name and detail.
|
|
77
79
|
*
|
|
78
80
|
* Event init options default to `{ bubbles: true, composed: true }`.
|
|
81
|
+
*
|
|
82
|
+
* @category Events
|
|
79
83
|
*/
|
|
80
84
|
emit<
|
|
81
85
|
M extends CustomEventTypes<keyof this["emits"] & keyof HTMLElementEventMap>,
|
|
@@ -101,6 +105,8 @@ export class EmitterElement extends HTMLElement {
|
|
|
101
105
|
* @example
|
|
102
106
|
* this.emitEvent("click", MouseEvent, { button: 2 });
|
|
103
107
|
* // emits: new MouseEvent("click", { button: 2 });
|
|
108
|
+
*
|
|
109
|
+
* @category Events
|
|
104
110
|
*/
|
|
105
111
|
emitEvent<
|
|
106
112
|
K extends keyof this["emits"] & keyof HTMLElementEventMap,
|