ev-interactivity-player 0.1.0

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.
@@ -0,0 +1,1028 @@
1
+ import { ScenesShape } from "ev-interactivity-core";
2
+
3
+ //#region ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/css-tag.d.ts
4
+ /**
5
+ * @license
6
+ * Copyright 2019 Google LLC
7
+ * SPDX-License-Identifier: BSD-3-Clause
8
+ */
9
+ /**
10
+ * A CSSResult or native CSSStyleSheet.
11
+ *
12
+ * In browsers that support constructible CSS style sheets, CSSStyleSheet
13
+ * object can be used for styling along side CSSResult from the `css`
14
+ * template tag.
15
+ */
16
+ type CSSResultOrNative = CSSResult | CSSStyleSheet;
17
+ type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;
18
+ /**
19
+ * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.
20
+ */
21
+ type CSSResultGroup = CSSResultOrNative | CSSResultArray;
22
+ /**
23
+ * A container for a string of CSS text, that may be used to create a CSSStyleSheet.
24
+ *
25
+ * CSSResult is the return value of `css`-tagged template literals and
26
+ * `unsafeCSS()`. In order to ensure that CSSResults are only created via the
27
+ * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.
28
+ */
29
+ declare class CSSResult {
30
+ ['_$cssResult$']: boolean;
31
+ readonly cssText: string;
32
+ private _styleSheet?;
33
+ private _strings;
34
+ private constructor();
35
+ get styleSheet(): CSSStyleSheet | undefined;
36
+ toString(): string;
37
+ }
38
+ //#endregion
39
+ //#region ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-controller.d.ts
40
+ /**
41
+ * @license
42
+ * Copyright 2021 Google LLC
43
+ * SPDX-License-Identifier: BSD-3-Clause
44
+ */
45
+ /**
46
+ * An object that can host Reactive Controllers and call their lifecycle
47
+ * callbacks.
48
+ */
49
+ interface ReactiveControllerHost {
50
+ /**
51
+ * Adds a controller to the host, which sets up the controller's lifecycle
52
+ * methods to be called with the host's lifecycle.
53
+ */
54
+ addController(controller: ReactiveController): void;
55
+ /**
56
+ * Removes a controller from the host.
57
+ */
58
+ removeController(controller: ReactiveController): void;
59
+ /**
60
+ * Requests a host update which is processed asynchronously. The update can
61
+ * be waited on via the `updateComplete` property.
62
+ */
63
+ requestUpdate(): void;
64
+ /**
65
+ * Returns a Promise that resolves when the host has completed updating.
66
+ * The Promise value is a boolean that is `true` if the element completed the
67
+ * update without triggering another update. The Promise result is `false` if
68
+ * a property was set inside `updated()`. If the Promise is rejected, an
69
+ * exception was thrown during the update.
70
+ *
71
+ * @return A promise of a boolean that indicates if the update resolved
72
+ * without triggering another update.
73
+ */
74
+ readonly updateComplete: Promise<boolean>;
75
+ }
76
+ /**
77
+ * A Reactive Controller is an object that enables sub-component code
78
+ * organization and reuse by aggregating the state, behavior, and lifecycle
79
+ * hooks related to a single feature.
80
+ *
81
+ * Controllers are added to a host component, or other object that implements
82
+ * the `ReactiveControllerHost` interface, via the `addController()` method.
83
+ * They can hook their host components's lifecycle by implementing one or more
84
+ * of the lifecycle callbacks, or initiate an update of the host component by
85
+ * calling `requestUpdate()` on the host.
86
+ */
87
+ interface ReactiveController {
88
+ /**
89
+ * Called when the host is connected to the component tree. For custom
90
+ * element hosts, this corresponds to the `connectedCallback()` lifecycle,
91
+ * which is only called when the component is connected to the document.
92
+ */
93
+ hostConnected?(): void;
94
+ /**
95
+ * Called when the host is disconnected from the component tree. For custom
96
+ * element hosts, this corresponds to the `disconnectedCallback()` lifecycle,
97
+ * which is called the host or an ancestor component is disconnected from the
98
+ * document.
99
+ */
100
+ hostDisconnected?(): void;
101
+ /**
102
+ * Called during the client-side host update, just before the host calls
103
+ * its own update.
104
+ *
105
+ * Code in `update()` can depend on the DOM as it is not called in
106
+ * server-side rendering.
107
+ */
108
+ hostUpdate?(): void;
109
+ /**
110
+ * Called after a host update, just before the host calls firstUpdated and
111
+ * updated. It is not called in server-side rendering.
112
+ *
113
+ */
114
+ hostUpdated?(): void;
115
+ }
116
+ //#endregion
117
+ //#region ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts
118
+ /**
119
+ * Converts property values to and from attribute values.
120
+ */
121
+ interface ComplexAttributeConverter<Type = unknown, TypeHint = unknown> {
122
+ /**
123
+ * Called to convert an attribute value to a property
124
+ * value.
125
+ */
126
+ fromAttribute?(value: string | null, type?: TypeHint): Type;
127
+ /**
128
+ * Called to convert a property value to an attribute
129
+ * value.
130
+ *
131
+ * It returns unknown instead of string, to be compatible with
132
+ * https://github.com/WICG/trusted-types (and similar efforts).
133
+ */
134
+ toAttribute?(value: Type, type?: TypeHint): unknown;
135
+ }
136
+ type AttributeConverter<Type = unknown, TypeHint = unknown> = ComplexAttributeConverter<Type> | ((value: string | null, type?: TypeHint) => Type);
137
+ /**
138
+ * Defines options for a property accessor.
139
+ */
140
+ interface PropertyDeclaration<Type = unknown, TypeHint = unknown> {
141
+ /**
142
+ * When set to `true`, indicates the property is internal private state. The
143
+ * property should not be set by users. When using TypeScript, this property
144
+ * should be marked as `private` or `protected`, and it is also a common
145
+ * practice to use a leading `_` in the name. The property is not added to
146
+ * `observedAttributes`.
147
+ */
148
+ readonly state?: boolean;
149
+ /**
150
+ * Indicates how and whether the property becomes an observed attribute.
151
+ * If the value is `false`, the property is not added to `observedAttributes`.
152
+ * If true or absent, the lowercased property name is observed (e.g. `fooBar`
153
+ * becomes `foobar`). If a string, the string value is observed (e.g
154
+ * `attribute: 'foo-bar'`).
155
+ */
156
+ readonly attribute?: boolean | string;
157
+ /**
158
+ * Indicates the type of the property. This is used only as a hint for the
159
+ * `converter` to determine how to convert the attribute
160
+ * to/from a property.
161
+ */
162
+ readonly type?: TypeHint;
163
+ /**
164
+ * Indicates how to convert the attribute to/from a property. If this value
165
+ * is a function, it is used to convert the attribute value a the property
166
+ * value. If it's an object, it can have keys for `fromAttribute` and
167
+ * `toAttribute`. If no `toAttribute` function is provided and
168
+ * `reflect` is set to `true`, the property value is set directly to the
169
+ * attribute. A default `converter` is used if none is provided; it supports
170
+ * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,
171
+ * when a property changes and the converter is used to update the attribute,
172
+ * the property is never updated again as a result of the attribute changing,
173
+ * and vice versa.
174
+ */
175
+ readonly converter?: AttributeConverter<Type, TypeHint>;
176
+ /**
177
+ * Indicates if the property should reflect to an attribute.
178
+ * If `true`, when the property is set, the attribute is set using the
179
+ * attribute name determined according to the rules for the `attribute`
180
+ * property option and the value of the property converted using the rules
181
+ * from the `converter` property option.
182
+ */
183
+ readonly reflect?: boolean;
184
+ /**
185
+ * A function that indicates if a property should be considered changed when
186
+ * it is set. The function should take the `newValue` and `oldValue` and
187
+ * return `true` if an update should be requested.
188
+ */
189
+ hasChanged?(value: Type, oldValue: Type): boolean;
190
+ /**
191
+ * Indicates whether an accessor will be created for this property. By
192
+ * default, an accessor will be generated for this property that requests an
193
+ * update when set. If this flag is `true`, no accessor will be created, and
194
+ * it will be the user's responsibility to call
195
+ * `this.requestUpdate(propertyName, oldValue)` to request an update when
196
+ * the property changes.
197
+ */
198
+ readonly noAccessor?: boolean;
199
+ /**
200
+ * When `true`, uses the initial value of the property as the default value,
201
+ * which changes how attributes are handled:
202
+ * - The initial value does *not* reflect, even if the `reflect` option is `true`.
203
+ * Subsequent changes to the property will reflect, even if they are equal to the
204
+ * default value.
205
+ * - When the attribute is removed, the property is set to the default value
206
+ * - The initial value will not trigger an old value in the `changedProperties` map
207
+ * argument to update lifecycle methods.
208
+ *
209
+ * When set, properties must be initialized, either with a field initializer, or an
210
+ * assignment in the constructor. Not initializing the property may lead to
211
+ * improper handling of subsequent property assignments.
212
+ *
213
+ * While this behavior is opt-in, most properties that reflect to attributes should
214
+ * use `useDefault: true` so that their initial values do not reflect.
215
+ */
216
+ useDefault?: boolean;
217
+ }
218
+ /**
219
+ * Map of properties to PropertyDeclaration options. For each property an
220
+ * accessor is made, and the property is processed according to the
221
+ * PropertyDeclaration options.
222
+ */
223
+ interface PropertyDeclarations {
224
+ readonly [key: string]: PropertyDeclaration;
225
+ }
226
+ type PropertyDeclarationMap = Map<PropertyKey, PropertyDeclaration>;
227
+ /**
228
+ * A Map of property keys to values.
229
+ *
230
+ * Takes an optional type parameter T, which when specified as a non-any,
231
+ * non-unknown type, will make the Map more strongly-typed, associating the map
232
+ * keys with their corresponding value type on T.
233
+ *
234
+ * Use `PropertyValues<this>` when overriding ReactiveElement.update() and
235
+ * other lifecycle methods in order to get stronger type-checking on keys
236
+ * and values.
237
+ */
238
+ type PropertyValues<T = any> = T extends object ? PropertyValueMap<T> : Map<PropertyKey, unknown>;
239
+ /**
240
+ * Do not use, instead prefer {@linkcode PropertyValues}.
241
+ */
242
+ interface PropertyValueMap<T> extends Map<PropertyKey, unknown> {
243
+ get<K extends keyof T>(k: K): T[K] | undefined;
244
+ set<K extends keyof T>(key: K, value: T[K]): this;
245
+ has<K extends keyof T>(k: K): boolean;
246
+ delete<K extends keyof T>(k: K): boolean;
247
+ }
248
+ /**
249
+ * A string representing one of the supported dev mode warning categories.
250
+ */
251
+ type WarningKind = 'change-in-update' | 'migration' | 'async-perform-update';
252
+ type Initializer = (element: ReactiveElement) => void;
253
+ declare global {
254
+ interface SymbolConstructor {
255
+ readonly metadata: unique symbol;
256
+ }
257
+ }
258
+ declare global {
259
+ var litPropertyMetadata: WeakMap<object, Map<PropertyKey, PropertyDeclaration>>;
260
+ }
261
+ /**
262
+ * Base element class which manages element properties and attributes. When
263
+ * properties change, the `update` method is asynchronously called. This method
264
+ * should be supplied by subclasses to render updates as desired.
265
+ * @noInheritDoc
266
+ */
267
+ declare abstract class ReactiveElement extends HTMLElement implements ReactiveControllerHost {
268
+ /**
269
+ * Read or set all the enabled warning categories for this class.
270
+ *
271
+ * This property is only used in development builds.
272
+ *
273
+ * @nocollapse
274
+ * @category dev-mode
275
+ */
276
+ static enabledWarnings?: WarningKind[];
277
+ /**
278
+ * Enable the given warning category for this class.
279
+ *
280
+ * This method only exists in development builds, so it should be accessed
281
+ * with a guard like:
282
+ *
283
+ * ```ts
284
+ * // Enable for all ReactiveElement subclasses
285
+ * ReactiveElement.enableWarning?.('migration');
286
+ *
287
+ * // Enable for only MyElement and subclasses
288
+ * MyElement.enableWarning?.('migration');
289
+ * ```
290
+ *
291
+ * @nocollapse
292
+ * @category dev-mode
293
+ */
294
+ static enableWarning?: (warningKind: WarningKind) => void;
295
+ /**
296
+ * Disable the given warning category for this class.
297
+ *
298
+ * This method only exists in development builds, so it should be accessed
299
+ * with a guard like:
300
+ *
301
+ * ```ts
302
+ * // Disable for all ReactiveElement subclasses
303
+ * ReactiveElement.disableWarning?.('migration');
304
+ *
305
+ * // Disable for only MyElement and subclasses
306
+ * MyElement.disableWarning?.('migration');
307
+ * ```
308
+ *
309
+ * @nocollapse
310
+ * @category dev-mode
311
+ */
312
+ static disableWarning?: (warningKind: WarningKind) => void;
313
+ /**
314
+ * Adds an initializer function to the class that is called during instance
315
+ * construction.
316
+ *
317
+ * This is useful for code that runs against a `ReactiveElement`
318
+ * subclass, such as a decorator, that needs to do work for each
319
+ * instance, such as setting up a `ReactiveController`.
320
+ *
321
+ * ```ts
322
+ * const myDecorator = (target: typeof ReactiveElement, key: string) => {
323
+ * target.addInitializer((instance: ReactiveElement) => {
324
+ * // This is run during construction of the element
325
+ * new MyController(instance);
326
+ * });
327
+ * }
328
+ * ```
329
+ *
330
+ * Decorating a field will then cause each instance to run an initializer
331
+ * that adds a controller:
332
+ *
333
+ * ```ts
334
+ * class MyElement extends LitElement {
335
+ * @myDecorator foo;
336
+ * }
337
+ * ```
338
+ *
339
+ * Initializers are stored per-constructor. Adding an initializer to a
340
+ * subclass does not add it to a superclass. Since initializers are run in
341
+ * constructors, initializers will run in order of the class hierarchy,
342
+ * starting with superclasses and progressing to the instance's class.
343
+ *
344
+ * @nocollapse
345
+ */
346
+ static addInitializer(initializer: Initializer): void;
347
+ static _initializers?: Initializer[];
348
+ /**
349
+ * Maps attribute names to properties; for example `foobar` attribute to
350
+ * `fooBar` property. Created lazily on user subclasses when finalizing the
351
+ * class.
352
+ * @nocollapse
353
+ */
354
+ private static __attributeToPropertyMap;
355
+ /**
356
+ * Marks class as having been finalized, which includes creating properties
357
+ * from `static properties`, but does *not* include all properties created
358
+ * from decorators.
359
+ * @nocollapse
360
+ */
361
+ protected static finalized: true | undefined;
362
+ /**
363
+ * Memoized list of all element properties, including any superclass
364
+ * properties. Created lazily on user subclasses when finalizing the class.
365
+ *
366
+ * @nocollapse
367
+ * @category properties
368
+ */
369
+ static elementProperties: PropertyDeclarationMap;
370
+ /**
371
+ * User-supplied object that maps property names to `PropertyDeclaration`
372
+ * objects containing options for configuring reactive properties. When
373
+ * a reactive property is set the element will update and render.
374
+ *
375
+ * By default properties are public fields, and as such, they should be
376
+ * considered as primarily settable by element users, either via attribute or
377
+ * the property itself.
378
+ *
379
+ * Generally, properties that are changed by the element should be private or
380
+ * protected fields and should use the `state: true` option. Properties
381
+ * marked as `state` do not reflect from the corresponding attribute
382
+ *
383
+ * However, sometimes element code does need to set a public property. This
384
+ * should typically only be done in response to user interaction, and an event
385
+ * should be fired informing the user; for example, a checkbox sets its
386
+ * `checked` property when clicked and fires a `changed` event. Mutating
387
+ * public properties should typically not be done for non-primitive (object or
388
+ * array) properties. In other cases when an element needs to manage state, a
389
+ * private property set with the `state: true` option should be used. When
390
+ * needed, state properties can be initialized via public properties to
391
+ * facilitate complex interactions.
392
+ * @nocollapse
393
+ * @category properties
394
+ */
395
+ static properties: PropertyDeclarations;
396
+ /**
397
+ * Memoized list of all element styles.
398
+ * Created lazily on user subclasses when finalizing the class.
399
+ * @nocollapse
400
+ * @category styles
401
+ */
402
+ static elementStyles: Array<CSSResultOrNative>;
403
+ /**
404
+ * Array of styles to apply to the element. The styles should be defined
405
+ * using the {@linkcode css} tag function, via constructible stylesheets, or
406
+ * imported from native CSS module scripts.
407
+ *
408
+ * Note on Content Security Policy:
409
+ *
410
+ * Element styles are implemented with `<style>` tags when the browser doesn't
411
+ * support adopted StyleSheets. To use such `<style>` tags with the style-src
412
+ * CSP directive, the style-src value must either include 'unsafe-inline' or
413
+ * `nonce-<base64-value>` with `<base64-value>` replaced be a server-generated
414
+ * nonce.
415
+ *
416
+ * To provide a nonce to use on generated `<style>` elements, set
417
+ * `window.litNonce` to a server-generated nonce in your page's HTML, before
418
+ * loading application code:
419
+ *
420
+ * ```html
421
+ * <script>
422
+ * // Generated and unique per request:
423
+ * window.litNonce = 'a1b2c3d4';
424
+ * </script>
425
+ * ```
426
+ * @nocollapse
427
+ * @category styles
428
+ */
429
+ static styles?: CSSResultGroup;
430
+ /**
431
+ * Returns a list of attributes corresponding to the registered properties.
432
+ * @nocollapse
433
+ * @category attributes
434
+ */
435
+ static get observedAttributes(): string[];
436
+ private __instanceProperties?;
437
+ /**
438
+ * Creates a property accessor on the element prototype if one does not exist
439
+ * and stores a {@linkcode PropertyDeclaration} for the property with the
440
+ * given options. The property setter calls the property's `hasChanged`
441
+ * property option or uses a strict identity check to determine whether or not
442
+ * to request an update.
443
+ *
444
+ * This method may be overridden to customize properties; however,
445
+ * when doing so, it's important to call `super.createProperty` to ensure
446
+ * the property is setup correctly. This method calls
447
+ * `getPropertyDescriptor` internally to get a descriptor to install.
448
+ * To customize what properties do when they are get or set, override
449
+ * `getPropertyDescriptor`. To customize the options for a property,
450
+ * implement `createProperty` like this:
451
+ *
452
+ * ```ts
453
+ * static createProperty(name, options) {
454
+ * options = Object.assign(options, {myOption: true});
455
+ * super.createProperty(name, options);
456
+ * }
457
+ * ```
458
+ *
459
+ * @nocollapse
460
+ * @category properties
461
+ */
462
+ static createProperty(name: PropertyKey, options?: PropertyDeclaration): void;
463
+ /**
464
+ * Returns a property descriptor to be defined on the given named property.
465
+ * If no descriptor is returned, the property will not become an accessor.
466
+ * For example,
467
+ *
468
+ * ```ts
469
+ * class MyElement extends LitElement {
470
+ * static getPropertyDescriptor(name, key, options) {
471
+ * const defaultDescriptor =
472
+ * super.getPropertyDescriptor(name, key, options);
473
+ * const setter = defaultDescriptor.set;
474
+ * return {
475
+ * get: defaultDescriptor.get,
476
+ * set(value) {
477
+ * setter.call(this, value);
478
+ * // custom action.
479
+ * },
480
+ * configurable: true,
481
+ * enumerable: true
482
+ * }
483
+ * }
484
+ * }
485
+ * ```
486
+ *
487
+ * @nocollapse
488
+ * @category properties
489
+ */
490
+ protected static getPropertyDescriptor(name: PropertyKey, key: string | symbol, options: PropertyDeclaration): PropertyDescriptor | undefined;
491
+ /**
492
+ * Returns the property options associated with the given property.
493
+ * These options are defined with a `PropertyDeclaration` via the `properties`
494
+ * object or the `@property` decorator and are registered in
495
+ * `createProperty(...)`.
496
+ *
497
+ * Note, this method should be considered "final" and not overridden. To
498
+ * customize the options for a given property, override
499
+ * {@linkcode createProperty}.
500
+ *
501
+ * @nocollapse
502
+ * @final
503
+ * @category properties
504
+ */
505
+ static getPropertyOptions(name: PropertyKey): PropertyDeclaration<unknown, unknown>;
506
+ static [Symbol.metadata]: object & Record<PropertyKey, unknown>;
507
+ /**
508
+ * Initializes static own properties of the class used in bookkeeping
509
+ * for element properties, initializers, etc.
510
+ *
511
+ * Can be called multiple times by code that needs to ensure these
512
+ * properties exist before using them.
513
+ *
514
+ * This method ensures the superclass is finalized so that inherited
515
+ * property metadata can be copied down.
516
+ * @nocollapse
517
+ */
518
+ private static __prepare;
519
+ /**
520
+ * Finishes setting up the class so that it's ready to be registered
521
+ * as a custom element and instantiated.
522
+ *
523
+ * This method is called by the ReactiveElement.observedAttributes getter.
524
+ * If you override the observedAttributes getter, you must either call
525
+ * super.observedAttributes to trigger finalization, or call finalize()
526
+ * yourself.
527
+ *
528
+ * @nocollapse
529
+ */
530
+ protected static finalize(): void;
531
+ /**
532
+ * Options used when calling `attachShadow`. Set this property to customize
533
+ * the options for the shadowRoot; for example, to create a closed
534
+ * shadowRoot: `{mode: 'closed'}`.
535
+ *
536
+ * Note, these options are used in `createRenderRoot`. If this method
537
+ * is customized, options should be respected if possible.
538
+ * @nocollapse
539
+ * @category rendering
540
+ */
541
+ static shadowRootOptions: ShadowRootInit;
542
+ /**
543
+ * Takes the styles the user supplied via the `static styles` property and
544
+ * returns the array of styles to apply to the element.
545
+ * Override this method to integrate into a style management system.
546
+ *
547
+ * Styles are deduplicated preserving the _last_ instance in the list. This
548
+ * is a performance optimization to avoid duplicated styles that can occur
549
+ * especially when composing via subclassing. The last item is kept to try
550
+ * to preserve the cascade order with the assumption that it's most important
551
+ * that last added styles override previous styles.
552
+ *
553
+ * @nocollapse
554
+ * @category styles
555
+ */
556
+ protected static finalizeStyles(styles?: CSSResultGroup): Array<CSSResultOrNative>;
557
+ /**
558
+ * Node or ShadowRoot into which element DOM should be rendered. Defaults
559
+ * to an open shadowRoot.
560
+ * @category rendering
561
+ */
562
+ readonly renderRoot: HTMLElement | DocumentFragment;
563
+ /**
564
+ * Returns the property name for the given attribute `name`.
565
+ * @nocollapse
566
+ */
567
+ private static __attributeNameForProperty;
568
+ private __updatePromise;
569
+ /**
570
+ * True if there is a pending update as a result of calling `requestUpdate()`.
571
+ * Should only be read.
572
+ * @category updates
573
+ */
574
+ isUpdatePending: boolean;
575
+ /**
576
+ * Is set to `true` after the first update. The element code cannot assume
577
+ * that `renderRoot` exists before the element `hasUpdated`.
578
+ * @category updates
579
+ */
580
+ hasUpdated: boolean;
581
+ /**
582
+ * Records property default values when the
583
+ * `useDefault` option is used.
584
+ */
585
+ private __defaultValues?;
586
+ /**
587
+ * Properties that should be reflected when updated.
588
+ */
589
+ private __reflectingProperties?;
590
+ /**
591
+ * Name of currently reflecting property
592
+ */
593
+ private __reflectingProperty;
594
+ /**
595
+ * Set of controllers.
596
+ */
597
+ private __controllers?;
598
+ constructor();
599
+ /**
600
+ * Internal only override point for customizing work done when elements
601
+ * are constructed.
602
+ */
603
+ private __initialize;
604
+ /**
605
+ * Registers a `ReactiveController` to participate in the element's reactive
606
+ * update cycle. The element automatically calls into any registered
607
+ * controllers during its lifecycle callbacks.
608
+ *
609
+ * If the element is connected when `addController()` is called, the
610
+ * controller's `hostConnected()` callback will be immediately called.
611
+ * @category controllers
612
+ */
613
+ addController(controller: ReactiveController): void;
614
+ /**
615
+ * Removes a `ReactiveController` from the element.
616
+ * @category controllers
617
+ */
618
+ removeController(controller: ReactiveController): void;
619
+ /**
620
+ * Fixes any properties set on the instance before upgrade time.
621
+ * Otherwise these would shadow the accessor and break these properties.
622
+ * The properties are stored in a Map which is played back after the
623
+ * constructor runs.
624
+ */
625
+ private __saveInstanceProperties;
626
+ /**
627
+ * Returns the node into which the element should render and by default
628
+ * creates and returns an open shadowRoot. Implement to customize where the
629
+ * element's DOM is rendered. For example, to render into the element's
630
+ * childNodes, return `this`.
631
+ *
632
+ * @return Returns a node into which to render.
633
+ * @category rendering
634
+ */
635
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
636
+ /**
637
+ * On first connection, creates the element's renderRoot, sets up
638
+ * element styling, and enables updating.
639
+ * @category lifecycle
640
+ */
641
+ connectedCallback(): void;
642
+ /**
643
+ * Note, this method should be considered final and not overridden. It is
644
+ * overridden on the element instance with a function that triggers the first
645
+ * update.
646
+ * @category updates
647
+ */
648
+ protected enableUpdating(_requestedUpdate: boolean): void;
649
+ /**
650
+ * Allows for `super.disconnectedCallback()` in extensions while
651
+ * reserving the possibility of making non-breaking feature additions
652
+ * when disconnecting at some point in the future.
653
+ * @category lifecycle
654
+ */
655
+ disconnectedCallback(): void;
656
+ /**
657
+ * Synchronizes property values when attributes change.
658
+ *
659
+ * Specifically, when an attribute is set, the corresponding property is set.
660
+ * You should rarely need to implement this callback. If this method is
661
+ * overridden, `super.attributeChangedCallback(name, _old, value)` must be
662
+ * called.
663
+ *
664
+ * See [responding to attribute changes](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#responding_to_attribute_changes)
665
+ * on MDN for more information about the `attributeChangedCallback`.
666
+ * @category attributes
667
+ */
668
+ attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
669
+ private __propertyToAttribute;
670
+ /**
671
+ * Requests an update which is processed asynchronously. This should be called
672
+ * when an element should update based on some state not triggered by setting
673
+ * a reactive property. In this case, pass no arguments. It should also be
674
+ * called when manually implementing a property setter. In this case, pass the
675
+ * property `name` and `oldValue` to ensure that any configured property
676
+ * options are honored.
677
+ *
678
+ * @param name name of requesting property
679
+ * @param oldValue old value of requesting property
680
+ * @param options property options to use instead of the previously
681
+ * configured options
682
+ * @param useNewValue if true, the newValue argument is used instead of
683
+ * reading the property value. This is important to use if the reactive
684
+ * property is a standard private accessor, as opposed to a plain
685
+ * property, since private members can't be dynamically read by name.
686
+ * @param newValue the new value of the property. This is only used if
687
+ * `useNewValue` is true.
688
+ * @category updates
689
+ */
690
+ requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration, useNewValue?: boolean, newValue?: unknown): void;
691
+ /**
692
+ * Sets up the element to asynchronously update.
693
+ */
694
+ private __enqueueUpdate;
695
+ /**
696
+ * Schedules an element update. You can override this method to change the
697
+ * timing of updates by returning a Promise. The update will await the
698
+ * returned Promise, and you should resolve the Promise to allow the update
699
+ * to proceed. If this method is overridden, `super.scheduleUpdate()`
700
+ * must be called.
701
+ *
702
+ * For instance, to schedule updates to occur just before the next frame:
703
+ *
704
+ * ```ts
705
+ * override protected async scheduleUpdate(): Promise<unknown> {
706
+ * await new Promise((resolve) => requestAnimationFrame(() => resolve()));
707
+ * super.scheduleUpdate();
708
+ * }
709
+ * ```
710
+ * @category updates
711
+ */
712
+ protected scheduleUpdate(): void | Promise<unknown>;
713
+ /**
714
+ * Performs an element update. Note, if an exception is thrown during the
715
+ * update, `firstUpdated` and `updated` will not be called.
716
+ *
717
+ * Call `performUpdate()` to immediately process a pending update. This should
718
+ * generally not be needed, but it can be done in rare cases when you need to
719
+ * update synchronously.
720
+ *
721
+ * @category updates
722
+ */
723
+ protected performUpdate(): void;
724
+ /**
725
+ * Invoked before `update()` to compute values needed during the update.
726
+ *
727
+ * Implement `willUpdate` to compute property values that depend on other
728
+ * properties and are used in the rest of the update process.
729
+ *
730
+ * ```ts
731
+ * willUpdate(changedProperties) {
732
+ * // only need to check changed properties for an expensive computation.
733
+ * if (changedProperties.has('firstName') || changedProperties.has('lastName')) {
734
+ * this.sha = computeSHA(`${this.firstName} ${this.lastName}`);
735
+ * }
736
+ * }
737
+ *
738
+ * render() {
739
+ * return html`SHA: ${this.sha}`;
740
+ * }
741
+ * ```
742
+ *
743
+ * @category updates
744
+ */
745
+ protected willUpdate(_changedProperties: PropertyValues): void;
746
+ private __markUpdated;
747
+ /**
748
+ * Returns a Promise that resolves when the element has completed updating.
749
+ * The Promise value is a boolean that is `true` if the element completed the
750
+ * update without triggering another update. The Promise result is `false` if
751
+ * a property was set inside `updated()`. If the Promise is rejected, an
752
+ * exception was thrown during the update.
753
+ *
754
+ * To await additional asynchronous work, override the `getUpdateComplete`
755
+ * method. For example, it is sometimes useful to await a rendered element
756
+ * before fulfilling this Promise. To do this, first await
757
+ * `super.getUpdateComplete()`, then any subsequent state.
758
+ *
759
+ * @return A promise of a boolean that resolves to true if the update completed
760
+ * without triggering another update.
761
+ * @category updates
762
+ */
763
+ get updateComplete(): Promise<boolean>;
764
+ /**
765
+ * Override point for the `updateComplete` promise.
766
+ *
767
+ * It is not safe to override the `updateComplete` getter directly due to a
768
+ * limitation in TypeScript which means it is not possible to call a
769
+ * superclass getter (e.g. `super.updateComplete.then(...)`) when the target
770
+ * language is ES5 (https://github.com/microsoft/TypeScript/issues/338).
771
+ * This method should be overridden instead. For example:
772
+ *
773
+ * ```ts
774
+ * class MyElement extends LitElement {
775
+ * override async getUpdateComplete() {
776
+ * const result = await super.getUpdateComplete();
777
+ * await this._myChild.updateComplete;
778
+ * return result;
779
+ * }
780
+ * }
781
+ * ```
782
+ *
783
+ * @return A promise of a boolean that resolves to true if the update completed
784
+ * without triggering another update.
785
+ * @category updates
786
+ */
787
+ protected getUpdateComplete(): Promise<boolean>;
788
+ /**
789
+ * Controls whether or not `update()` should be called when the element requests
790
+ * an update. By default, this method always returns `true`, but this can be
791
+ * customized to control when to update.
792
+ *
793
+ * @param _changedProperties Map of changed properties with old values
794
+ * @category updates
795
+ */
796
+ protected shouldUpdate(_changedProperties: PropertyValues): boolean;
797
+ /**
798
+ * Updates the element. This method reflects property values to attributes.
799
+ * It can be overridden to render and keep updated element DOM.
800
+ * Setting properties inside this method will *not* trigger
801
+ * another update.
802
+ *
803
+ * @param _changedProperties Map of changed properties with old values
804
+ * @category updates
805
+ */
806
+ protected update(_changedProperties: PropertyValues): void;
807
+ /**
808
+ * Invoked whenever the element is updated. Implement to perform
809
+ * post-updating tasks via DOM APIs, for example, focusing an element.
810
+ *
811
+ * Setting properties inside this method will trigger the element to update
812
+ * again after this update cycle completes.
813
+ *
814
+ * @param _changedProperties Map of changed properties with old values
815
+ * @category updates
816
+ */
817
+ protected updated(_changedProperties: PropertyValues): void;
818
+ /**
819
+ * Invoked when the element is first updated. Implement to perform one time
820
+ * work on the element after update.
821
+ *
822
+ * ```ts
823
+ * firstUpdated() {
824
+ * this.renderRoot.getElementById('my-text-area').focus();
825
+ * }
826
+ * ```
827
+ *
828
+ * Setting properties inside this method will trigger the element to update
829
+ * again after this update cycle completes.
830
+ *
831
+ * @param _changedProperties Map of changed properties with old values
832
+ * @category updates
833
+ */
834
+ protected firstUpdated(_changedProperties: PropertyValues): void;
835
+ }
836
+ //#endregion
837
+ //#region ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/development/lit-html.d.ts
838
+ /** TemplateResult types */
839
+ declare const HTML_RESULT = 1;
840
+ declare const SVG_RESULT = 2;
841
+ declare const MATHML_RESULT = 3;
842
+ type ResultType = typeof HTML_RESULT | typeof SVG_RESULT | typeof MATHML_RESULT;
843
+ /**
844
+ * The return type of the template tag functions, {@linkcode html} and
845
+ * {@linkcode svg} when it hasn't been compiled by @lit-labs/compiler.
846
+ *
847
+ * A `TemplateResult` object holds all the information about a template
848
+ * expression required to render it: the template strings, expression values,
849
+ * and type of template (html or svg).
850
+ *
851
+ * `TemplateResult` objects do not create any DOM on their own. To create or
852
+ * update DOM you need to render the `TemplateResult`. See
853
+ * [Rendering](https://lit.dev/docs/components/rendering) for more information.
854
+ *
855
+ */
856
+ type UncompiledTemplateResult<T extends ResultType = ResultType> = {
857
+ ['_$litType$']: T;
858
+ strings: TemplateStringsArray;
859
+ values: unknown[];
860
+ };
861
+ /**
862
+ * The return type of the template tag functions, {@linkcode html} and
863
+ * {@linkcode svg}.
864
+ *
865
+ * A `TemplateResult` object holds all the information about a template
866
+ * expression required to render it: the template strings, expression values,
867
+ * and type of template (html or svg).
868
+ *
869
+ * `TemplateResult` objects do not create any DOM on their own. To create or
870
+ * update DOM you need to render the `TemplateResult`. See
871
+ * [Rendering](https://lit.dev/docs/components/rendering) for more information.
872
+ *
873
+ * In Lit 4, this type will be an alias of
874
+ * MaybeCompiledTemplateResult, so that code will get type errors if it assumes
875
+ * that Lit templates are not compiled. When deliberately working with only
876
+ * one, use either {@linkcode CompiledTemplateResult} or
877
+ * {@linkcode UncompiledTemplateResult} explicitly.
878
+ */
879
+ type TemplateResult<T extends ResultType = ResultType> = UncompiledTemplateResult<T>;
880
+ /**
881
+ * Object specifying options for controlling lit-html rendering. Note that
882
+ * while `render` may be called multiple times on the same `container` (and
883
+ * `renderBefore` reference node) to efficiently update the rendered content,
884
+ * only the options passed in during the first render are respected during
885
+ * the lifetime of renders to that unique `container` + `renderBefore`
886
+ * combination.
887
+ */
888
+ interface RenderOptions {
889
+ /**
890
+ * An object to use as the `this` value for event listeners. It's often
891
+ * useful to set this to the host component rendering a template.
892
+ */
893
+ host?: object;
894
+ /**
895
+ * A DOM node before which to render content in the container.
896
+ */
897
+ renderBefore?: ChildNode | null;
898
+ /**
899
+ * Node used for cloning the template (`importNode` will be called on this
900
+ * node). This controls the `ownerDocument` of the rendered DOM, along with
901
+ * any inherited context. Defaults to the global `document`.
902
+ */
903
+ creationScope?: {
904
+ importNode(node: Node, deep?: boolean): Node;
905
+ };
906
+ /**
907
+ * The initial connected state for the top-level part being rendered. If no
908
+ * `isConnected` option is set, `AsyncDirective`s will be connected by
909
+ * default. Set to `false` if the initial render occurs in a disconnected tree
910
+ * and `AsyncDirective`s should see `isConnected === false` for their initial
911
+ * render. The `part.setConnected()` method must be used subsequent to initial
912
+ * render to change the connected state of the part.
913
+ */
914
+ isConnected?: boolean;
915
+ }
916
+ //#endregion
917
+ //#region ../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/development/lit-element.d.ts
918
+ /**
919
+ * Base element class that manages element properties and attributes, and
920
+ * renders a lit-html template.
921
+ *
922
+ * To define a component, subclass `LitElement` and implement a
923
+ * `render` method to provide the component's template. Define properties
924
+ * using the {@linkcode LitElement.properties properties} property or the
925
+ * {@linkcode property} decorator.
926
+ */
927
+ declare class LitElement extends ReactiveElement {
928
+ static ['_$litElement$']: boolean;
929
+ /**
930
+ * @category rendering
931
+ */
932
+ readonly renderOptions: RenderOptions;
933
+ private __childPart;
934
+ /**
935
+ * @category rendering
936
+ */
937
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
938
+ /**
939
+ * Updates the element. This method reflects property values to attributes
940
+ * and calls `render` to render DOM via lit-html. Setting properties inside
941
+ * this method will *not* trigger another update.
942
+ * @param changedProperties Map of changed properties with old values
943
+ * @category updates
944
+ */
945
+ protected update(changedProperties: PropertyValues): void;
946
+ /**
947
+ * Invoked when the component is added to the document's DOM.
948
+ *
949
+ * In `connectedCallback()` you should setup tasks that should only occur when
950
+ * the element is connected to the document. The most common of these is
951
+ * adding event listeners to nodes external to the element, like a keydown
952
+ * event handler added to the window.
953
+ *
954
+ * ```ts
955
+ * connectedCallback() {
956
+ * super.connectedCallback();
957
+ * addEventListener('keydown', this._handleKeydown);
958
+ * }
959
+ * ```
960
+ *
961
+ * Typically, anything done in `connectedCallback()` should be undone when the
962
+ * element is disconnected, in `disconnectedCallback()`.
963
+ *
964
+ * @category lifecycle
965
+ */
966
+ connectedCallback(): void;
967
+ /**
968
+ * Invoked when the component is removed from the document's DOM.
969
+ *
970
+ * This callback is the main signal to the element that it may no longer be
971
+ * used. `disconnectedCallback()` should ensure that nothing is holding a
972
+ * reference to the element (such as event listeners added to nodes external
973
+ * to the element), so that it is free to be garbage collected.
974
+ *
975
+ * ```ts
976
+ * disconnectedCallback() {
977
+ * super.disconnectedCallback();
978
+ * window.removeEventListener('keydown', this._handleKeydown);
979
+ * }
980
+ * ```
981
+ *
982
+ * An element may be re-connected after being disconnected.
983
+ *
984
+ * @category lifecycle
985
+ */
986
+ disconnectedCallback(): void;
987
+ /**
988
+ * Invoked on each update to perform rendering tasks. This method may return
989
+ * any value renderable by lit-html's `ChildPart` - typically a
990
+ * `TemplateResult`. Setting properties inside this method will *not* trigger
991
+ * the element to update.
992
+ * @category rendering
993
+ */
994
+ protected render(): unknown;
995
+ }
996
+ //#endregion
997
+ //#region ../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/development/index.d.ts
998
+ //#endregion
999
+ //#region src/element.d.ts
1000
+ declare class EgPlayer extends LitElement {
1001
+ static override styles: CSSResult;
1002
+ scenes: ScenesShape[];
1003
+ currentSceneId: string | null;
1004
+ currentTime: number;
1005
+ sceneDuration: number;
1006
+ private _visible;
1007
+ /** Selected option id per quiz interaction, set once the learner answers. */
1008
+ private _answers;
1009
+ /** Required interactions whose action has fired (gate satisfied). */
1010
+ private _completed;
1011
+ private _prevVisibleIds;
1012
+ private _autoAdvancedSceneId;
1013
+ private _prevSeekable;
1014
+ override willUpdate(): void;
1015
+ override render(): TemplateResult;
1016
+ private renderButton;
1017
+ private renderQuiz;
1018
+ private answer;
1019
+ private emitIntentForAction;
1020
+ }
1021
+ declare global {
1022
+ interface HTMLElementTagNameMap {
1023
+ "eg-player": EgPlayer;
1024
+ }
1025
+ }
1026
+ //#endregion
1027
+ export { EgPlayer };
1028
+ //# sourceMappingURL=index.d.mts.map