@ixfx/components 0.0.9 → 0.1.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.
@@ -0,0 +1,1583 @@
1
+ import { Rect, RectPositioned } from "ixfx/geometry.js";
2
+ import { Trees } from "ixfx/collections.js";
3
+ import { CanvasHelper, Colour, DrawingHelper } from "ixfx/visual.js";
4
+
5
+ //#region node_modules/@lit/reactive-element/development/css-tag.d.ts
6
+
7
+ /**
8
+ * A CSSResult or native CSSStyleSheet.
9
+ *
10
+ * In browsers that support constructible CSS style sheets, CSSStyleSheet
11
+ * object can be used for styling along side CSSResult from the `css`
12
+ * template tag.
13
+ */
14
+ type CSSResultOrNative = CSSResult | CSSStyleSheet;
15
+ type CSSResultArray = Array<CSSResultOrNative | CSSResultArray>;
16
+ /**
17
+ * A single CSSResult, CSSStyleSheet, or an array or nested arrays of those.
18
+ */
19
+ type CSSResultGroup = CSSResultOrNative | CSSResultArray;
20
+ /**
21
+ * A container for a string of CSS text, that may be used to create a CSSStyleSheet.
22
+ *
23
+ * CSSResult is the return value of `css`-tagged template literals and
24
+ * `unsafeCSS()`. In order to ensure that CSSResults are only created via the
25
+ * `css` tag and `unsafeCSS()`, CSSResult cannot be constructed directly.
26
+ */
27
+ declare class CSSResult {
28
+ ['_$cssResult$']: boolean;
29
+ readonly cssText: string;
30
+ private _styleSheet?;
31
+ private _strings;
32
+ private constructor();
33
+ get styleSheet(): CSSStyleSheet | undefined;
34
+ toString(): string;
35
+ }
36
+ /**
37
+ * Wrap a value for interpolation in a {@linkcode css} tagged template literal.
38
+ *
39
+ * This is unsafe because untrusted CSS text can be used to phone home
40
+ * or exfiltrate data to an attacker controlled site. Take care to only use
41
+ * this with trusted input.
42
+ */
43
+ //#endregion
44
+ //#region node_modules/@lit/reactive-element/development/reactive-controller.d.ts
45
+ /**
46
+ * @license
47
+ * Copyright 2021 Google LLC
48
+ * SPDX-License-Identifier: BSD-3-Clause
49
+ */
50
+ /**
51
+ * An object that can host Reactive Controllers and call their lifecycle
52
+ * callbacks.
53
+ */
54
+ interface ReactiveControllerHost {
55
+ /**
56
+ * Adds a controller to the host, which sets up the controller's lifecycle
57
+ * methods to be called with the host's lifecycle.
58
+ */
59
+ addController(controller: ReactiveController): void;
60
+ /**
61
+ * Removes a controller from the host.
62
+ */
63
+ removeController(controller: ReactiveController): void;
64
+ /**
65
+ * Requests a host update which is processed asynchronously. The update can
66
+ * be waited on via the `updateComplete` property.
67
+ */
68
+ requestUpdate(): void;
69
+ /**
70
+ * Returns a Promise that resolves when the host has completed updating.
71
+ * The Promise value is a boolean that is `true` if the element completed the
72
+ * update without triggering another update. The Promise result is `false` if
73
+ * a property was set inside `updated()`. If the Promise is rejected, an
74
+ * exception was thrown during the update.
75
+ *
76
+ * @return A promise of a boolean that indicates if the update resolved
77
+ * without triggering another update.
78
+ */
79
+ readonly updateComplete: Promise<boolean>;
80
+ }
81
+ /**
82
+ * A Reactive Controller is an object that enables sub-component code
83
+ * organization and reuse by aggregating the state, behavior, and lifecycle
84
+ * hooks related to a single feature.
85
+ *
86
+ * Controllers are added to a host component, or other object that implements
87
+ * the `ReactiveControllerHost` interface, via the `addController()` method.
88
+ * They can hook their host components's lifecycle by implementing one or more
89
+ * of the lifecycle callbacks, or initiate an update of the host component by
90
+ * calling `requestUpdate()` on the host.
91
+ */
92
+ interface ReactiveController {
93
+ /**
94
+ * Called when the host is connected to the component tree. For custom
95
+ * element hosts, this corresponds to the `connectedCallback()` lifecycle,
96
+ * which is only called when the component is connected to the document.
97
+ */
98
+ hostConnected?(): void;
99
+ /**
100
+ * Called when the host is disconnected from the component tree. For custom
101
+ * element hosts, this corresponds to the `disconnectedCallback()` lifecycle,
102
+ * which is called the host or an ancestor component is disconnected from the
103
+ * document.
104
+ */
105
+ hostDisconnected?(): void;
106
+ /**
107
+ * Called during the client-side host update, just before the host calls
108
+ * its own update.
109
+ *
110
+ * Code in `update()` can depend on the DOM as it is not called in
111
+ * server-side rendering.
112
+ */
113
+ hostUpdate?(): void;
114
+ /**
115
+ * Called after a host update, just before the host calls firstUpdated and
116
+ * updated. It is not called in server-side rendering.
117
+ *
118
+ */
119
+ hostUpdated?(): void;
120
+ }
121
+ //# sourceMappingURL=reactive-controller.d.ts.map
122
+ //#endregion
123
+ //#region node_modules/@lit/reactive-element/development/reactive-element.d.ts
124
+ /**
125
+ * Converts property values to and from attribute values.
126
+ */
127
+ interface ComplexAttributeConverter<Type = unknown, TypeHint = unknown> {
128
+ /**
129
+ * Called to convert an attribute value to a property
130
+ * value.
131
+ */
132
+ fromAttribute?(value: string | null, type?: TypeHint): Type;
133
+ /**
134
+ * Called to convert a property value to an attribute
135
+ * value.
136
+ *
137
+ * It returns unknown instead of string, to be compatible with
138
+ * https://github.com/WICG/trusted-types (and similar efforts).
139
+ */
140
+ toAttribute?(value: Type, type?: TypeHint): unknown;
141
+ }
142
+ type AttributeConverter<Type = unknown, TypeHint = unknown> = ComplexAttributeConverter<Type> | ((value: string | null, type?: TypeHint) => Type);
143
+ /**
144
+ * Defines options for a property accessor.
145
+ */
146
+ interface PropertyDeclaration<Type = unknown, TypeHint = unknown> {
147
+ /**
148
+ * When set to `true`, indicates the property is internal private state. The
149
+ * property should not be set by users. When using TypeScript, this property
150
+ * should be marked as `private` or `protected`, and it is also a common
151
+ * practice to use a leading `_` in the name. The property is not added to
152
+ * `observedAttributes`.
153
+ */
154
+ readonly state?: boolean;
155
+ /**
156
+ * Indicates how and whether the property becomes an observed attribute.
157
+ * If the value is `false`, the property is not added to `observedAttributes`.
158
+ * If true or absent, the lowercased property name is observed (e.g. `fooBar`
159
+ * becomes `foobar`). If a string, the string value is observed (e.g
160
+ * `attribute: 'foo-bar'`).
161
+ */
162
+ readonly attribute?: boolean | string;
163
+ /**
164
+ * Indicates the type of the property. This is used only as a hint for the
165
+ * `converter` to determine how to convert the attribute
166
+ * to/from a property.
167
+ */
168
+ readonly type?: TypeHint;
169
+ /**
170
+ * Indicates how to convert the attribute to/from a property. If this value
171
+ * is a function, it is used to convert the attribute value a the property
172
+ * value. If it's an object, it can have keys for `fromAttribute` and
173
+ * `toAttribute`. If no `toAttribute` function is provided and
174
+ * `reflect` is set to `true`, the property value is set directly to the
175
+ * attribute. A default `converter` is used if none is provided; it supports
176
+ * `Boolean`, `String`, `Number`, `Object`, and `Array`. Note,
177
+ * when a property changes and the converter is used to update the attribute,
178
+ * the property is never updated again as a result of the attribute changing,
179
+ * and vice versa.
180
+ */
181
+ readonly converter?: AttributeConverter<Type, TypeHint>;
182
+ /**
183
+ * Indicates if the property should reflect to an attribute.
184
+ * If `true`, when the property is set, the attribute is set using the
185
+ * attribute name determined according to the rules for the `attribute`
186
+ * property option and the value of the property converted using the rules
187
+ * from the `converter` property option.
188
+ */
189
+ readonly reflect?: boolean;
190
+ /**
191
+ * A function that indicates if a property should be considered changed when
192
+ * it is set. The function should take the `newValue` and `oldValue` and
193
+ * return `true` if an update should be requested.
194
+ */
195
+ hasChanged?(value: Type, oldValue: Type): boolean;
196
+ /**
197
+ * Indicates whether an accessor will be created for this property. By
198
+ * default, an accessor will be generated for this property that requests an
199
+ * update when set. If this flag is `true`, no accessor will be created, and
200
+ * it will be the user's responsibility to call
201
+ * `this.requestUpdate(propertyName, oldValue)` to request an update when
202
+ * the property changes.
203
+ */
204
+ readonly noAccessor?: boolean;
205
+ /**
206
+ * When `true`, uses the initial value of the property as the default value,
207
+ * which changes how attributes are handled:
208
+ * - The initial value does *not* reflect, even if the `reflect` option is `true`.
209
+ * Subsequent changes to the property will reflect, even if they are equal to the
210
+ * default value.
211
+ * - When the attribute is removed, the property is set to the default value
212
+ * - The initial value will not trigger an old value in the `changedProperties` map
213
+ * argument to update lifecycle methods.
214
+ *
215
+ * When set, properties must be initialized, either with a field initializer, or an
216
+ * assignment in the constructor. Not initializing the property may lead to
217
+ * improper handling of subsequent property assignments.
218
+ *
219
+ * While this behavior is opt-in, most properties that reflect to attributes should
220
+ * use `useDefault: true` so that their initial values do not reflect.
221
+ */
222
+ useDefault?: boolean;
223
+ }
224
+ /**
225
+ * Map of properties to PropertyDeclaration options. For each property an
226
+ * accessor is made, and the property is processed according to the
227
+ * PropertyDeclaration options.
228
+ */
229
+ interface PropertyDeclarations {
230
+ readonly [key: string]: PropertyDeclaration;
231
+ }
232
+ type PropertyDeclarationMap = Map<PropertyKey, PropertyDeclaration>;
233
+ /**
234
+ * A Map of property keys to values.
235
+ *
236
+ * Takes an optional type parameter T, which when specified as a non-any,
237
+ * non-unknown type, will make the Map more strongly-typed, associating the map
238
+ * keys with their corresponding value type on T.
239
+ *
240
+ * Use `PropertyValues<this>` when overriding ReactiveElement.update() and
241
+ * other lifecycle methods in order to get stronger type-checking on keys
242
+ * and values.
243
+ */
244
+ type PropertyValues<T = any> = T extends object ? PropertyValueMap<T> : Map<PropertyKey, unknown>;
245
+ /**
246
+ * Do not use, instead prefer {@linkcode PropertyValues}.
247
+ */
248
+ interface PropertyValueMap<T> extends Map<PropertyKey, unknown> {
249
+ get<K extends keyof T>(k: K): T[K] | undefined;
250
+ set<K extends keyof T>(key: K, value: T[K]): this;
251
+ has<K extends keyof T>(k: K): boolean;
252
+ delete<K extends keyof T>(k: K): boolean;
253
+ }
254
+ /**
255
+ * A string representing one of the supported dev mode warning categories.
256
+ */
257
+ type WarningKind = 'change-in-update' | 'migration' | 'async-perform-update';
258
+ type Initializer = (element: ReactiveElement) => void;
259
+ declare global {
260
+ interface SymbolConstructor {
261
+ readonly metadata: unique symbol;
262
+ }
263
+ }
264
+ declare global {
265
+ var litPropertyMetadata: WeakMap<object, Map<PropertyKey, PropertyDeclaration>>;
266
+ }
267
+ /**
268
+ * Base element class which manages element properties and attributes. When
269
+ * properties change, the `update` method is asynchronously called. This method
270
+ * should be supplied by subclasses to render updates as desired.
271
+ * @noInheritDoc
272
+ */
273
+ declare abstract class ReactiveElement extends HTMLElement implements ReactiveControllerHost {
274
+ /**
275
+ * Read or set all the enabled warning categories for this class.
276
+ *
277
+ * This property is only used in development builds.
278
+ *
279
+ * @nocollapse
280
+ * @category dev-mode
281
+ */
282
+ static enabledWarnings?: WarningKind[];
283
+ /**
284
+ * Enable the given warning category for this class.
285
+ *
286
+ * This method only exists in development builds, so it should be accessed
287
+ * with a guard like:
288
+ *
289
+ * ```ts
290
+ * // Enable for all ReactiveElement subclasses
291
+ * ReactiveElement.enableWarning?.('migration');
292
+ *
293
+ * // Enable for only MyElement and subclasses
294
+ * MyElement.enableWarning?.('migration');
295
+ * ```
296
+ *
297
+ * @nocollapse
298
+ * @category dev-mode
299
+ */
300
+ static enableWarning?: (warningKind: WarningKind) => void;
301
+ /**
302
+ * Disable the given warning category for this class.
303
+ *
304
+ * This method only exists in development builds, so it should be accessed
305
+ * with a guard like:
306
+ *
307
+ * ```ts
308
+ * // Disable for all ReactiveElement subclasses
309
+ * ReactiveElement.disableWarning?.('migration');
310
+ *
311
+ * // Disable for only MyElement and subclasses
312
+ * MyElement.disableWarning?.('migration');
313
+ * ```
314
+ *
315
+ * @nocollapse
316
+ * @category dev-mode
317
+ */
318
+ static disableWarning?: (warningKind: WarningKind) => void;
319
+ /**
320
+ * Adds an initializer function to the class that is called during instance
321
+ * construction.
322
+ *
323
+ * This is useful for code that runs against a `ReactiveElement`
324
+ * subclass, such as a decorator, that needs to do work for each
325
+ * instance, such as setting up a `ReactiveController`.
326
+ *
327
+ * ```ts
328
+ * const myDecorator = (target: typeof ReactiveElement, key: string) => {
329
+ * target.addInitializer((instance: ReactiveElement) => {
330
+ * // This is run during construction of the element
331
+ * new MyController(instance);
332
+ * });
333
+ * }
334
+ * ```
335
+ *
336
+ * Decorating a field will then cause each instance to run an initializer
337
+ * that adds a controller:
338
+ *
339
+ * ```ts
340
+ * class MyElement extends LitElement {
341
+ * @myDecorator foo;
342
+ * }
343
+ * ```
344
+ *
345
+ * Initializers are stored per-constructor. Adding an initializer to a
346
+ * subclass does not add it to a superclass. Since initializers are run in
347
+ * constructors, initializers will run in order of the class hierarchy,
348
+ * starting with superclasses and progressing to the instance's class.
349
+ *
350
+ * @nocollapse
351
+ */
352
+ static addInitializer(initializer: Initializer): void;
353
+ static _initializers?: Initializer[];
354
+ /**
355
+ * Maps attribute names to properties; for example `foobar` attribute to
356
+ * `fooBar` property. Created lazily on user subclasses when finalizing the
357
+ * class.
358
+ * @nocollapse
359
+ */
360
+ private static __attributeToPropertyMap;
361
+ /**
362
+ * Marks class as having been finalized, which includes creating properties
363
+ * from `static properties`, but does *not* include all properties created
364
+ * from decorators.
365
+ * @nocollapse
366
+ */
367
+ protected static finalized: true | undefined;
368
+ /**
369
+ * Memoized list of all element properties, including any superclass
370
+ * properties. Created lazily on user subclasses when finalizing the class.
371
+ *
372
+ * @nocollapse
373
+ * @category properties
374
+ */
375
+ static elementProperties: PropertyDeclarationMap;
376
+ /**
377
+ * User-supplied object that maps property names to `PropertyDeclaration`
378
+ * objects containing options for configuring reactive properties. When
379
+ * a reactive property is set the element will update and render.
380
+ *
381
+ * By default properties are public fields, and as such, they should be
382
+ * considered as primarily settable by element users, either via attribute or
383
+ * the property itself.
384
+ *
385
+ * Generally, properties that are changed by the element should be private or
386
+ * protected fields and should use the `state: true` option. Properties
387
+ * marked as `state` do not reflect from the corresponding attribute
388
+ *
389
+ * However, sometimes element code does need to set a public property. This
390
+ * should typically only be done in response to user interaction, and an event
391
+ * should be fired informing the user; for example, a checkbox sets its
392
+ * `checked` property when clicked and fires a `changed` event. Mutating
393
+ * public properties should typically not be done for non-primitive (object or
394
+ * array) properties. In other cases when an element needs to manage state, a
395
+ * private property set with the `state: true` option should be used. When
396
+ * needed, state properties can be initialized via public properties to
397
+ * facilitate complex interactions.
398
+ * @nocollapse
399
+ * @category properties
400
+ */
401
+ static properties: PropertyDeclarations;
402
+ /**
403
+ * Memoized list of all element styles.
404
+ * Created lazily on user subclasses when finalizing the class.
405
+ * @nocollapse
406
+ * @category styles
407
+ */
408
+ static elementStyles: Array<CSSResultOrNative>;
409
+ /**
410
+ * Array of styles to apply to the element. The styles should be defined
411
+ * using the {@linkcode css} tag function, via constructible stylesheets, or
412
+ * imported from native CSS module scripts.
413
+ *
414
+ * Note on Content Security Policy:
415
+ *
416
+ * Element styles are implemented with `<style>` tags when the browser doesn't
417
+ * support adopted StyleSheets. To use such `<style>` tags with the style-src
418
+ * CSP directive, the style-src value must either include 'unsafe-inline' or
419
+ * `nonce-<base64-value>` with `<base64-value>` replaced be a server-generated
420
+ * nonce.
421
+ *
422
+ * To provide a nonce to use on generated `<style>` elements, set
423
+ * `window.litNonce` to a server-generated nonce in your page's HTML, before
424
+ * loading application code:
425
+ *
426
+ * ```html
427
+ * <script>
428
+ * // Generated and unique per request:
429
+ * window.litNonce = 'a1b2c3d4';
430
+ * </script>
431
+ * ```
432
+ * @nocollapse
433
+ * @category styles
434
+ */
435
+ static styles?: CSSResultGroup;
436
+ /**
437
+ * Returns a list of attributes corresponding to the registered properties.
438
+ * @nocollapse
439
+ * @category attributes
440
+ */
441
+ static get observedAttributes(): string[];
442
+ private __instanceProperties?;
443
+ /**
444
+ * Creates a property accessor on the element prototype if one does not exist
445
+ * and stores a {@linkcode PropertyDeclaration} for the property with the
446
+ * given options. The property setter calls the property's `hasChanged`
447
+ * property option or uses a strict identity check to determine whether or not
448
+ * to request an update.
449
+ *
450
+ * This method may be overridden to customize properties; however,
451
+ * when doing so, it's important to call `super.createProperty` to ensure
452
+ * the property is setup correctly. This method calls
453
+ * `getPropertyDescriptor` internally to get a descriptor to install.
454
+ * To customize what properties do when they are get or set, override
455
+ * `getPropertyDescriptor`. To customize the options for a property,
456
+ * implement `createProperty` like this:
457
+ *
458
+ * ```ts
459
+ * static createProperty(name, options) {
460
+ * options = Object.assign(options, {myOption: true});
461
+ * super.createProperty(name, options);
462
+ * }
463
+ * ```
464
+ *
465
+ * @nocollapse
466
+ * @category properties
467
+ */
468
+ static createProperty(name: PropertyKey, options?: PropertyDeclaration): void;
469
+ /**
470
+ * Returns a property descriptor to be defined on the given named property.
471
+ * If no descriptor is returned, the property will not become an accessor.
472
+ * For example,
473
+ *
474
+ * ```ts
475
+ * class MyElement extends LitElement {
476
+ * static getPropertyDescriptor(name, key, options) {
477
+ * const defaultDescriptor =
478
+ * super.getPropertyDescriptor(name, key, options);
479
+ * const setter = defaultDescriptor.set;
480
+ * return {
481
+ * get: defaultDescriptor.get,
482
+ * set(value) {
483
+ * setter.call(this, value);
484
+ * // custom action.
485
+ * },
486
+ * configurable: true,
487
+ * enumerable: true
488
+ * }
489
+ * }
490
+ * }
491
+ * ```
492
+ *
493
+ * @nocollapse
494
+ * @category properties
495
+ */
496
+ protected static getPropertyDescriptor(name: PropertyKey, key: string | symbol, options: PropertyDeclaration): PropertyDescriptor | undefined;
497
+ /**
498
+ * Returns the property options associated with the given property.
499
+ * These options are defined with a `PropertyDeclaration` via the `properties`
500
+ * object or the `@property` decorator and are registered in
501
+ * `createProperty(...)`.
502
+ *
503
+ * Note, this method should be considered "final" and not overridden. To
504
+ * customize the options for a given property, override
505
+ * {@linkcode createProperty}.
506
+ *
507
+ * @nocollapse
508
+ * @final
509
+ * @category properties
510
+ */
511
+ static getPropertyOptions(name: PropertyKey): PropertyDeclaration<unknown, unknown>;
512
+ static [Symbol.metadata]: object & Record<PropertyKey, unknown>;
513
+ /**
514
+ * Initializes static own properties of the class used in bookkeeping
515
+ * for element properties, initializers, etc.
516
+ *
517
+ * Can be called multiple times by code that needs to ensure these
518
+ * properties exist before using them.
519
+ *
520
+ * This method ensures the superclass is finalized so that inherited
521
+ * property metadata can be copied down.
522
+ * @nocollapse
523
+ */
524
+ private static __prepare;
525
+ /**
526
+ * Finishes setting up the class so that it's ready to be registered
527
+ * as a custom element and instantiated.
528
+ *
529
+ * This method is called by the ReactiveElement.observedAttributes getter.
530
+ * If you override the observedAttributes getter, you must either call
531
+ * super.observedAttributes to trigger finalization, or call finalize()
532
+ * yourself.
533
+ *
534
+ * @nocollapse
535
+ */
536
+ protected static finalize(): void;
537
+ /**
538
+ * Options used when calling `attachShadow`. Set this property to customize
539
+ * the options for the shadowRoot; for example, to create a closed
540
+ * shadowRoot: `{mode: 'closed'}`.
541
+ *
542
+ * Note, these options are used in `createRenderRoot`. If this method
543
+ * is customized, options should be respected if possible.
544
+ * @nocollapse
545
+ * @category rendering
546
+ */
547
+ static shadowRootOptions: ShadowRootInit;
548
+ /**
549
+ * Takes the styles the user supplied via the `static styles` property and
550
+ * returns the array of styles to apply to the element.
551
+ * Override this method to integrate into a style management system.
552
+ *
553
+ * Styles are deduplicated preserving the _last_ instance in the list. This
554
+ * is a performance optimization to avoid duplicated styles that can occur
555
+ * especially when composing via subclassing. The last item is kept to try
556
+ * to preserve the cascade order with the assumption that it's most important
557
+ * that last added styles override previous styles.
558
+ *
559
+ * @nocollapse
560
+ * @category styles
561
+ */
562
+ protected static finalizeStyles(styles?: CSSResultGroup): Array<CSSResultOrNative>;
563
+ /**
564
+ * Node or ShadowRoot into which element DOM should be rendered. Defaults
565
+ * to an open shadowRoot.
566
+ * @category rendering
567
+ */
568
+ readonly renderRoot: HTMLElement | DocumentFragment;
569
+ /**
570
+ * Returns the property name for the given attribute `name`.
571
+ * @nocollapse
572
+ */
573
+ private static __attributeNameForProperty;
574
+ private __updatePromise;
575
+ /**
576
+ * True if there is a pending update as a result of calling `requestUpdate()`.
577
+ * Should only be read.
578
+ * @category updates
579
+ */
580
+ isUpdatePending: boolean;
581
+ /**
582
+ * Is set to `true` after the first update. The element code cannot assume
583
+ * that `renderRoot` exists before the element `hasUpdated`.
584
+ * @category updates
585
+ */
586
+ hasUpdated: boolean;
587
+ /**
588
+ * Records property default values when the
589
+ * `useDefault` option is used.
590
+ */
591
+ private __defaultValues?;
592
+ /**
593
+ * Properties that should be reflected when updated.
594
+ */
595
+ private __reflectingProperties?;
596
+ /**
597
+ * Name of currently reflecting property
598
+ */
599
+ private __reflectingProperty;
600
+ /**
601
+ * Set of controllers.
602
+ */
603
+ private __controllers?;
604
+ constructor();
605
+ /**
606
+ * Internal only override point for customizing work done when elements
607
+ * are constructed.
608
+ */
609
+ private __initialize;
610
+ /**
611
+ * Registers a `ReactiveController` to participate in the element's reactive
612
+ * update cycle. The element automatically calls into any registered
613
+ * controllers during its lifecycle callbacks.
614
+ *
615
+ * If the element is connected when `addController()` is called, the
616
+ * controller's `hostConnected()` callback will be immediately called.
617
+ * @category controllers
618
+ */
619
+ addController(controller: ReactiveController): void;
620
+ /**
621
+ * Removes a `ReactiveController` from the element.
622
+ * @category controllers
623
+ */
624
+ removeController(controller: ReactiveController): void;
625
+ /**
626
+ * Fixes any properties set on the instance before upgrade time.
627
+ * Otherwise these would shadow the accessor and break these properties.
628
+ * The properties are stored in a Map which is played back after the
629
+ * constructor runs.
630
+ */
631
+ private __saveInstanceProperties;
632
+ /**
633
+ * Returns the node into which the element should render and by default
634
+ * creates and returns an open shadowRoot. Implement to customize where the
635
+ * element's DOM is rendered. For example, to render into the element's
636
+ * childNodes, return `this`.
637
+ *
638
+ * @return Returns a node into which to render.
639
+ * @category rendering
640
+ */
641
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
642
+ /**
643
+ * On first connection, creates the element's renderRoot, sets up
644
+ * element styling, and enables updating.
645
+ * @category lifecycle
646
+ */
647
+ connectedCallback(): void;
648
+ /**
649
+ * Note, this method should be considered final and not overridden. It is
650
+ * overridden on the element instance with a function that triggers the first
651
+ * update.
652
+ * @category updates
653
+ */
654
+ protected enableUpdating(_requestedUpdate: boolean): void;
655
+ /**
656
+ * Allows for `super.disconnectedCallback()` in extensions while
657
+ * reserving the possibility of making non-breaking feature additions
658
+ * when disconnecting at some point in the future.
659
+ * @category lifecycle
660
+ */
661
+ disconnectedCallback(): void;
662
+ /**
663
+ * Synchronizes property values when attributes change.
664
+ *
665
+ * Specifically, when an attribute is set, the corresponding property is set.
666
+ * You should rarely need to implement this callback. If this method is
667
+ * overridden, `super.attributeChangedCallback(name, _old, value)` must be
668
+ * called.
669
+ *
670
+ * See [responding to attribute changes](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements#responding_to_attribute_changes)
671
+ * on MDN for more information about the `attributeChangedCallback`.
672
+ * @category attributes
673
+ */
674
+ attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
675
+ private __propertyToAttribute;
676
+ /**
677
+ * Requests an update which is processed asynchronously. This should be called
678
+ * when an element should update based on some state not triggered by setting
679
+ * a reactive property. In this case, pass no arguments. It should also be
680
+ * called when manually implementing a property setter. In this case, pass the
681
+ * property `name` and `oldValue` to ensure that any configured property
682
+ * options are honored.
683
+ *
684
+ * @param name name of requesting property
685
+ * @param oldValue old value of requesting property
686
+ * @param options property options to use instead of the previously
687
+ * configured options
688
+ * @category updates
689
+ */
690
+ requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration): 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
+ //# sourceMappingURL=reactive-element.d.ts.map
837
+ //#endregion
838
+ //#region node_modules/lit-html/development/lit-html.d.ts
839
+
840
+ /** TemplateResult types */
841
+ declare const HTML_RESULT = 1;
842
+ declare const SVG_RESULT = 2;
843
+ declare const MATHML_RESULT = 3;
844
+ type ResultType = typeof HTML_RESULT | typeof SVG_RESULT | typeof MATHML_RESULT;
845
+ /**
846
+ * The return type of the template tag functions, {@linkcode html} and
847
+ * {@linkcode svg} when it hasn't been compiled by @lit-labs/compiler.
848
+ *
849
+ * A `TemplateResult` object holds all the information about a template
850
+ * expression required to render it: the template strings, expression values,
851
+ * and type of template (html or svg).
852
+ *
853
+ * `TemplateResult` objects do not create any DOM on their own. To create or
854
+ * update DOM you need to render the `TemplateResult`. See
855
+ * [Rendering](https://lit.dev/docs/components/rendering) for more information.
856
+ *
857
+ */
858
+ type UncompiledTemplateResult<T extends ResultType = ResultType> = {
859
+ ['_$litType$']: T;
860
+ strings: TemplateStringsArray;
861
+ values: unknown[];
862
+ };
863
+ /**
864
+ * This is a template result that may be either uncompiled or compiled.
865
+ *
866
+ * In the future, TemplateResult will be this type. If you want to explicitly
867
+ * note that a template result is potentially compiled, you can reference this
868
+ * type and it will continue to behave the same through the next major version
869
+ * of Lit. This can be useful for code that wants to prepare for the next
870
+ * major version of Lit.
871
+ */
872
+
873
+ /**
874
+ * The return type of the template tag functions, {@linkcode html} and
875
+ * {@linkcode svg}.
876
+ *
877
+ * A `TemplateResult` object holds all the information about a template
878
+ * expression required to render it: the template strings, expression values,
879
+ * and type of template (html or svg).
880
+ *
881
+ * `TemplateResult` objects do not create any DOM on their own. To create or
882
+ * update DOM you need to render the `TemplateResult`. See
883
+ * [Rendering](https://lit.dev/docs/components/rendering) for more information.
884
+ *
885
+ * In Lit 4, this type will be an alias of
886
+ * MaybeCompiledTemplateResult, so that code will get type errors if it assumes
887
+ * that Lit templates are not compiled. When deliberately working with only
888
+ * one, use either {@linkcode CompiledTemplateResult} or
889
+ * {@linkcode UncompiledTemplateResult} explicitly.
890
+ */
891
+ type TemplateResult<T extends ResultType = ResultType> = UncompiledTemplateResult<T>;
892
+ /**
893
+ * Object specifying options for controlling lit-html rendering. Note that
894
+ * while `render` may be called multiple times on the same `container` (and
895
+ * `renderBefore` reference node) to efficiently update the rendered content,
896
+ * only the options passed in during the first render are respected during
897
+ * the lifetime of renders to that unique `container` + `renderBefore`
898
+ * combination.
899
+ */
900
+ interface RenderOptions {
901
+ /**
902
+ * An object to use as the `this` value for event listeners. It's often
903
+ * useful to set this to the host component rendering a template.
904
+ */
905
+ host?: object;
906
+ /**
907
+ * A DOM node before which to render content in the container.
908
+ */
909
+ renderBefore?: ChildNode | null;
910
+ /**
911
+ * Node used for cloning the template (`importNode` will be called on this
912
+ * node). This controls the `ownerDocument` of the rendered DOM, along with
913
+ * any inherited context. Defaults to the global `document`.
914
+ */
915
+ creationScope?: {
916
+ importNode(node: Node, deep?: boolean): Node;
917
+ };
918
+ /**
919
+ * The initial connected state for the top-level part being rendered. If no
920
+ * `isConnected` option is set, `AsyncDirective`s will be connected by
921
+ * default. Set to `false` if the initial render occurs in a disconnected tree
922
+ * and `AsyncDirective`s should see `isConnected === false` for their initial
923
+ * render. The `part.setConnected()` method must be used subsequent to initial
924
+ * render to change the connected state of the part.
925
+ */
926
+ isConnected?: boolean;
927
+ }
928
+ //#endregion
929
+ //#region node_modules/lit-element/development/lit-element.d.ts
930
+ /**
931
+ * Base element class that manages element properties and attributes, and
932
+ * renders a lit-html template.
933
+ *
934
+ * To define a component, subclass `LitElement` and implement a
935
+ * `render` method to provide the component's template. Define properties
936
+ * using the {@linkcode LitElement.properties properties} property or the
937
+ * {@linkcode property} decorator.
938
+ */
939
+ declare class LitElement extends ReactiveElement {
940
+ static ['_$litElement$']: boolean;
941
+ /**
942
+ * @category rendering
943
+ */
944
+ readonly renderOptions: RenderOptions;
945
+ private __childPart;
946
+ /**
947
+ * @category rendering
948
+ */
949
+ protected createRenderRoot(): HTMLElement | DocumentFragment;
950
+ /**
951
+ * Updates the element. This method reflects property values to attributes
952
+ * and calls `render` to render DOM via lit-html. Setting properties inside
953
+ * this method will *not* trigger another update.
954
+ * @param changedProperties Map of changed properties with old values
955
+ * @category updates
956
+ */
957
+ protected update(changedProperties: PropertyValues): void;
958
+ /**
959
+ * Invoked when the component is added to the document's DOM.
960
+ *
961
+ * In `connectedCallback()` you should setup tasks that should only occur when
962
+ * the element is connected to the document. The most common of these is
963
+ * adding event listeners to nodes external to the element, like a keydown
964
+ * event handler added to the window.
965
+ *
966
+ * ```ts
967
+ * connectedCallback() {
968
+ * super.connectedCallback();
969
+ * addEventListener('keydown', this._handleKeydown);
970
+ * }
971
+ * ```
972
+ *
973
+ * Typically, anything done in `connectedCallback()` should be undone when the
974
+ * element is disconnected, in `disconnectedCallback()`.
975
+ *
976
+ * @category lifecycle
977
+ */
978
+ connectedCallback(): void;
979
+ /**
980
+ * Invoked when the component is removed from the document's DOM.
981
+ *
982
+ * This callback is the main signal to the element that it may no longer be
983
+ * used. `disconnectedCallback()` should ensure that nothing is holding a
984
+ * reference to the element (such as event listeners added to nodes external
985
+ * to the element), so that it is free to be garbage collected.
986
+ *
987
+ * ```ts
988
+ * disconnectedCallback() {
989
+ * super.disconnectedCallback();
990
+ * window.removeEventListener('keydown', this._handleKeydown);
991
+ * }
992
+ * ```
993
+ *
994
+ * An element may be re-connected after being disconnected.
995
+ *
996
+ * @category lifecycle
997
+ */
998
+ disconnectedCallback(): void;
999
+ /**
1000
+ * Invoked on each update to perform rendering tasks. This method may return
1001
+ * any value renderable by lit-html's `ChildPart` - typically a
1002
+ * `TemplateResult`. Setting properties inside this method will *not* trigger
1003
+ * the element to update.
1004
+ * @category rendering
1005
+ */
1006
+ protected render(): unknown;
1007
+ }
1008
+ /**
1009
+ * END USERS SHOULD NOT RELY ON THIS OBJECT.
1010
+ *
1011
+ * Private exports for use by other Lit packages, not intended for use by
1012
+ * external users.
1013
+ *
1014
+ * We currently do not make a mangled rollup build of the lit-ssr code. In order
1015
+ * to keep a number of (otherwise private) top-level exports mangled in the
1016
+ * client side code, we export a _$LE object containing those members (or
1017
+ * helper methods for accessing private fields of those members), and then
1018
+ * re-export them for use in lit-ssr. This keeps lit-ssr agnostic to whether the
1019
+ * client-side code is being used in `dev` mode or `prod` mode.
1020
+ *
1021
+ * This has a unique name, to disambiguate it from private exports in
1022
+ * lit-html, since this module re-exports all of lit-html.
1023
+ *
1024
+ * @private
1025
+ */
1026
+ //#endregion
1027
+ //#region src/util/circle-arc.d.ts
1028
+ type CircleArcAnchor = `south` | `south-east` | `east` | `north`;
1029
+ //#endregion
1030
+ //#region node_modules/lit-html/development/directives/ref.d.ts
1031
+ /**
1032
+ * An object that holds a ref value.
1033
+ */
1034
+ declare class Ref<T = Element> {
1035
+ /**
1036
+ * The current Element value of the ref, or else `undefined` if the ref is no
1037
+ * longer rendered.
1038
+ */
1039
+ readonly value?: T;
1040
+ }
1041
+ //#endregion
1042
+ //#region src/util/svg-editable-text.d.ts
1043
+ type SvgEditLabelData = {
1044
+ editMode: boolean;
1045
+ hideValue: boolean;
1046
+ x: number;
1047
+ y: number;
1048
+ anchor: `start` | `middle` | `end`;
1049
+ displayValue: number | string;
1050
+ editValue: number | string;
1051
+ fill: string;
1052
+ };
1053
+ declare class SvgEditLabel extends EventTarget {
1054
+ #private;
1055
+ textRef: Ref<SVGTextElement>;
1056
+ editorRef: Ref<HTMLDivElement>;
1057
+ onEditMode?: (enabled: boolean, source: SvgEditLabel) => void;
1058
+ onInput?: (value: string) => void;
1059
+ render(data: SvgEditLabelData): TemplateResult<2>;
1060
+ onUpdated(): void;
1061
+ static styles: CSSResult;
1062
+ }
1063
+ //# sourceMappingURL=svg-editable-text.d.ts.map
1064
+ //#endregion
1065
+ //#region src/dial.d.ts
1066
+ type LabelPosition = `edge` | `inner` | `below`;
1067
+ type ValueToLabelFormat = (value: number) => string;
1068
+ type NeedleStyle = `none` | `to-track` | `to-knob`;
1069
+ /**
1070
+ * Numeric DOM attributes
1071
+ * * rangeAngle: range of dial in degrees (default: 300)
1072
+ * * value, min, max, step, stepFine
1073
+ * * radius: max radius of dial (default: 0.5)
1074
+ * * textRelativeHeight: how much vertical space to give labels (default: 10)
1075
+ *
1076
+ * String DOM attributes
1077
+ * * rangeAnchor: `south`,`south-east`,`east`,`north` (default: `south`)
1078
+ * * labelPosition: `edge`|`inner`
1079
+ * * needleStyle: `none`, `to-track`, `to-knob`
1080
+ * * title: a caption for dial
1081
+ *
1082
+ * Boolean DOM attributes
1083
+ * * hideTitle, hideValue, hideTerminators, showKnob, bipolar
1084
+ *
1085
+ * CSS variables
1086
+ * --[track,needle,value]-width
1087
+ * --[track,needle,value]-color
1088
+ * --needle-start: relative to radius of circle. eg 0.6 starts needle 60% out from center (default: 0.6)
1089
+ * --needle_overshoot: % of increase of needle size (default: 0.2)
1090
+ * --value-label-color: colour of value label
1091
+ * --value-label-x: x offset (in 0..100 coords)
1092
+ * --value-label-y: y offset (in 0..100 coords)
1093
+ * --knob-color
1094
+ * --knob-radius: % of circle to use for knob (default: 0.8)
1095
+ */
1096
+ declare class DialElement extends LitElement {
1097
+ #private;
1098
+ rangeAngle: number;
1099
+ rangeAnchor: CircleArcAnchor;
1100
+ labelPosition: LabelPosition;
1101
+ spread: boolean;
1102
+ hideValue: boolean;
1103
+ hideTerminators: boolean;
1104
+ showKnob: boolean;
1105
+ bipolar: boolean;
1106
+ needleStyle: NeedleStyle;
1107
+ value: number;
1108
+ step: number;
1109
+ stepFine: number;
1110
+ radius: number;
1111
+ min: number;
1112
+ max: number;
1113
+ textRelativeHeight: number;
1114
+ valueLabelRef: Ref<SvgEditLabel>;
1115
+ valueLabel: SvgEditLabelData;
1116
+ constructor();
1117
+ getRelativeValue(): number;
1118
+ render(): TemplateResult<1>;
1119
+ protected updated(_changedProperties: PropertyValues): void;
1120
+ onMidpointClick(): void;
1121
+ onMouseWheel(event: WheelEvent): void;
1122
+ deltaChange(amount: number): void;
1123
+ onKeyDown(event: KeyboardEvent): void;
1124
+ onPointerMove(event: PointerEvent): void;
1125
+ resolveVariables(): {
1126
+ track_width: number;
1127
+ track_color: string;
1128
+ value_width: number;
1129
+ value_color: string;
1130
+ value_label_color: string;
1131
+ value_label_x: number;
1132
+ value_label_y: number;
1133
+ needle_overshoot: number;
1134
+ needle_start: number;
1135
+ needle_color: string;
1136
+ needle_width: number;
1137
+ knob_color: string;
1138
+ knob_radius: number;
1139
+ };
1140
+ set valueToLabel(fn: (value: number) => string);
1141
+ get valueToLabel(): (value: number) => string;
1142
+ get range(): number;
1143
+ static styles: CSSResult;
1144
+ }
1145
+ declare global {
1146
+ interface HTMLElementTagNameMap {
1147
+ "ixfx-dial": DialElement;
1148
+ }
1149
+ }
1150
+ //# sourceMappingURL=dial.d.ts.map
1151
+ //#endregion
1152
+ //#region src/selecthorizontal.d.ts
1153
+ declare class SelectHorizontalElement extends LitElement {
1154
+ editMode: boolean;
1155
+ render(): TemplateResult<1>;
1156
+ static styles: CSSResult;
1157
+ }
1158
+ declare global {
1159
+ interface HTMLElementTagNameMap {
1160
+ "ixfx-selecthorizontal-element": SelectHorizontalElement;
1161
+ }
1162
+ }
1163
+ //# sourceMappingURL=selecthorizontal.d.ts.map
1164
+ //#endregion
1165
+ //#region src/crumb-navigation.d.ts
1166
+ type CrumbNavigationPart = {
1167
+ label: string;
1168
+ key: string;
1169
+ };
1170
+ /**
1171
+ * Events
1172
+ * * 'change': yields newly selected node and previous
1173
+ *
1174
+ * CSS variables
1175
+ * * --text-highlight: red; // highlight on mouse hover
1176
+ * * --separator: silver; // text colour of separator character
1177
+ * * --padding-s: 0.12ch; // padding between items
1178
+ */
1179
+ declare class CrumbNavigationElement extends LitElement {
1180
+ #private;
1181
+ tree: Trees.TreeNode<CrumbNavigationPart>;
1182
+ selectedNode: Trees.TreeNode<CrumbNavigationPart> | undefined;
1183
+ constructor();
1184
+ protected updated(_changedProperties: PropertyValues): void;
1185
+ render(): TemplateResult<1>;
1186
+ static styles: CSSResult;
1187
+ }
1188
+ declare global {
1189
+ interface HTMLElementTagNameMap {
1190
+ "ixfx-crumb-navigation": CrumbNavigationElement;
1191
+ }
1192
+ }
1193
+ //# sourceMappingURL=crumb-navigation.d.ts.map
1194
+ //#endregion
1195
+ //#region src/crumb-nav.d.ts
1196
+ type CrumbNavigation2Part = {
1197
+ label: string;
1198
+ key: string;
1199
+ icon?: string;
1200
+ showLabel?: boolean;
1201
+ showIcon?: boolean;
1202
+ ensureVisible?: boolean;
1203
+ };
1204
+ type RequestPopup = (segment: CrumbNavigation2Part) => AsyncGenerator<CrumbNavigation2Part | CrumbNavigation2Part[]>;
1205
+ /**
1206
+ * Events
1207
+ * * 'change': yields newly selected node and previous
1208
+ *
1209
+ * CSS variables
1210
+ * * --text-highlight: red; // highlight on mouse hover
1211
+ * * --separator: silver; // text colour of separator character
1212
+ * * --padding-s: 0.12ch; // padding between items
1213
+ */
1214
+ declare class CrumbNavElement extends LitElement {
1215
+ segments: CrumbNavigation2Part[];
1216
+ editing: boolean;
1217
+ editPath: string;
1218
+ onNavPopup: RequestPopup | undefined;
1219
+ constructor();
1220
+ protected updated(_changedProperties: PropertyValues): void;
1221
+ setSegmentsWithPath(path: string, separator?: string): void;
1222
+ private renderSegment;
1223
+ onCaretClick(event: MouseEvent): Promise<void>;
1224
+ onLabelClick(event: MouseEvent): void;
1225
+ protected render(): TemplateResult<1>;
1226
+ onInputKeyUp(event: KeyboardEvent): void;
1227
+ onInputBlur(): void;
1228
+ static styles: CSSResult;
1229
+ }
1230
+ declare global {
1231
+ interface HTMLElementTagNameMap {
1232
+ "ixfx-crumb-nav": CrumbNavElement;
1233
+ }
1234
+ }
1235
+ //# sourceMappingURL=crumb-nav.d.ts.map
1236
+ //#endregion
1237
+ //#region src/tabs/tab-list-item.d.ts
1238
+ /**
1239
+ * CSS vars
1240
+ * * --selected-colour: text colour
1241
+ * * --selected-border-width: bottom border width
1242
+ * * --padding
1243
+ */
1244
+ declare class TabListItemElement extends LitElement {
1245
+ closeable: boolean;
1246
+ render(): TemplateResult<1>;
1247
+ static styles: CSSResult;
1248
+ }
1249
+ declare global {
1250
+ interface HTMLElementTagNameMap {
1251
+ "ixfx-tab-list-item": TabListItemElement;
1252
+ }
1253
+ }
1254
+ //# sourceMappingURL=tab-list-item.d.ts.map
1255
+ //#endregion
1256
+ //#region src/tabs/tab-list.d.ts
1257
+ /**
1258
+ * Events
1259
+ * * 'change' - new tab selected { previous:string, selected:string, for:string }
1260
+ */
1261
+ declare class TabListElement extends LitElement {
1262
+ #private;
1263
+ horizontal: boolean;
1264
+ _listItems: TabListItemElement[];
1265
+ render(): TemplateResult<1>;
1266
+ getSelectedElement(): TabListItemElement | undefined;
1267
+ selectElement(el: HTMLElement): void;
1268
+ static styles: CSSResult;
1269
+ }
1270
+ declare global {
1271
+ interface HTMLElementTagNameMap {
1272
+ "ixfx-tab-list": TabListElement;
1273
+ }
1274
+ }
1275
+ //# sourceMappingURL=tab-list.d.ts.map
1276
+ //#endregion
1277
+ //#region src/tabs/tab-panel.d.ts
1278
+ declare class TabPanelElement extends LitElement {
1279
+ render(): TemplateResult<1>;
1280
+ static styles: CSSResult;
1281
+ }
1282
+ declare global {
1283
+ interface HTMLElementTagNameMap {
1284
+ "ixfx-tab-panel": TabPanelElement;
1285
+ }
1286
+ }
1287
+ //# sourceMappingURL=tab-panel.d.ts.map
1288
+ //#endregion
1289
+ //#region src/tabs/tab-panels.d.ts
1290
+ declare class TabPanelsElement extends LitElement {
1291
+ #private;
1292
+ _listItems: TabPanelElement[];
1293
+ /**
1294
+ * Triggered when a panel is being de-selected
1295
+ */
1296
+ onUnselectedPanel?: (id: string, el: TabPanelElement) => void;
1297
+ /**
1298
+ * Triggered before panel is selected
1299
+ */
1300
+ onSelectingPanel?: (id: string, el: TabPanelElement) => void;
1301
+ /**
1302
+ * Triggered after panel is selected
1303
+ */
1304
+ onSelectedPanel?: (id: string, el: TabPanelElement) => void;
1305
+ render(): TemplateResult<1>;
1306
+ getSelectedElement(): TabPanelElement | undefined;
1307
+ syncWithList(el: TabListElement): void;
1308
+ selectPanel(id: string): boolean | undefined;
1309
+ static styles: CSSResult;
1310
+ }
1311
+ declare global {
1312
+ interface HTMLElementTagNameMap {
1313
+ "ixfx-tab-panels": TabPanelsElement;
1314
+ }
1315
+ }
1316
+ //# sourceMappingURL=tab-panels.d.ts.map
1317
+ //#endregion
1318
+ //#region src/split-layout/split-layout.d.ts
1319
+ /**
1320
+ * Lays out two elements within a container, with a bar to resize them
1321
+ * proportionally.
1322
+ *
1323
+ * Events
1324
+ * * _none_
1325
+ * Attributes
1326
+ * * layout: `vertical`|`horizontal`
1327
+ * * sizeA/B: CSS size of section A or B. Can use relative or absolute values
1328
+ * * fixedA/B: If _true_ size will be calculated in pixels. By default (_false_) it uses % of whole
1329
+ *
1330
+ * CSS variables
1331
+ * * --handle-size: 2px; // Width/height of resize handle
1332
+ * * --handle-colour: whitesmoke; // Colour of handle
1333
+ * * --handle-hover-colour: darkblue; // Colour of handle when hovering
1334
+ * * --handle-active-colour: blue; // Colour of handle when being used
1335
+ */
1336
+ declare class SplitLayoutElement extends LitElement {
1337
+ #private;
1338
+ layout: `vertical` | `horizontal`;
1339
+ sizeA: string;
1340
+ sizeB: string;
1341
+ fixedA: boolean;
1342
+ fixedB: boolean;
1343
+ render(): TemplateResult<1>;
1344
+ getZone(): HTMLElement | undefined;
1345
+ static styles: CSSResult;
1346
+ }
1347
+ declare global {
1348
+ interface HTMLElementTagNameMap {
1349
+ "ixfx-split-layout": SplitLayoutElement;
1350
+ }
1351
+ }
1352
+ //# sourceMappingURL=split-layout.d.ts.map
1353
+ //#endregion
1354
+ //#region src/charts/plot.d.ts
1355
+ /**
1356
+ * Attributes
1357
+ * * streaming: true/false (default: true)
1358
+ * * max-length: number (default: 500). How many data points per series to store
1359
+ * * data-width: when streaming, how much horizontal width per point
1360
+ * * fixed-max/fixed-min: global input scaling (default: NaN, ie. disabled)
1361
+ *
1362
+ * * line-width: stroke width of drawing line (default:2)
1363
+ *
1364
+ * * render: 'dot' or 'line' (default: 'dot')
1365
+ * * hide-legend: If added, legend is not shown
1366
+ * * manual-draw: If added, automatic drawning is disabled
1367
+ *
1368
+ * Styling variables
1369
+ * * --legend-fg: legend foreground text
1370
+ */
1371
+ declare class PlotElement extends LitElement {
1372
+ #private;
1373
+ streaming: boolean;
1374
+ hideLegend: boolean;
1375
+ maxLength: number;
1376
+ dataWidth: number;
1377
+ fixedMax: number;
1378
+ fixedMin: number;
1379
+ lineWidth: number;
1380
+ renderStyle: string;
1381
+ manualDraw: boolean;
1382
+ padding: number;
1383
+ paused: boolean;
1384
+ canvasEl: Ref<HTMLCanvasElement>;
1385
+ seriesRanges: Map<string, [min: number, max: number]>;
1386
+ get series(): PlotSeries[];
1387
+ get seriesCount(): number;
1388
+ /**
1389
+ * Returns a `PlotElement` instance based on a query
1390
+ * ```js
1391
+ * PlotElement.fromQuery(`#someplot`); // PlotElement
1392
+ * ```
1393
+ *
1394
+ * Throws an error if query does not match.
1395
+ * @param query
1396
+ * @returns
1397
+ */
1398
+ static fromQuery(query: string): PlotElement;
1399
+ /**
1400
+ * Delete a series.
1401
+ * Returns _true_ if there was a series to delete
1402
+ * @param name
1403
+ * @returns
1404
+ */
1405
+ deleteSeries(name: string): boolean;
1406
+ /**
1407
+ * Keeps the series, but deletes its data
1408
+ * @param name
1409
+ * @returns
1410
+ */
1411
+ clearSeries(name: string): boolean;
1412
+ /**
1413
+ * Delete all data & series
1414
+ */
1415
+ clear(): void;
1416
+ /**
1417
+ * Keeps all series, but deletes their data
1418
+ */
1419
+ clearData(): void;
1420
+ render(): TemplateResult<1>;
1421
+ connectedCallback(): void;
1422
+ protected firstUpdated(_changedProperties: PropertyValues): void;
1423
+ updateColours(): void;
1424
+ plot(value: number, seriesName?: string, skipDrawing?: boolean): PlotSeries;
1425
+ /**
1426
+ * Draw a set of key-value pairs as a batch.
1427
+ * @param value
1428
+ */
1429
+ plotObject(value: object): void;
1430
+ colourGenerator(_series: string): Colour.Colourish;
1431
+ draw(): void;
1432
+ drawLegend(cl: RectPositioned, d: DrawingHelper): void;
1433
+ drawLineSeries(data: number[], cp: Rect, d: DrawingHelper, colour: string): void;
1434
+ drawDotSeries(data: number[], cp: Rect, d: DrawingHelper, colour: string): void;
1435
+ computePlot(c: CanvasHelper, plotHeight: number, axisYwidth: number, padding: number): {
1436
+ x: number;
1437
+ y: number;
1438
+ width: number;
1439
+ height: number;
1440
+ };
1441
+ computeAxisYWidth(_c: CanvasHelper): number;
1442
+ computeLegend(c: CanvasHelper, maxWidth: number, padding: number): {
1443
+ bounds: {
1444
+ width: number;
1445
+ height: number;
1446
+ };
1447
+ parts: {
1448
+ width: number;
1449
+ height: number;
1450
+ x: number;
1451
+ y: number;
1452
+ }[];
1453
+ };
1454
+ getSeries(name: string): PlotSeries | undefined;
1455
+ static styles: CSSResult;
1456
+ }
1457
+ declare class PlotSeries {
1458
+ name: string;
1459
+ colour: Colour.Colourish;
1460
+ private plot;
1461
+ data: number[];
1462
+ minSeen: number;
1463
+ maxSeen: number;
1464
+ constructor(name: string, colour: Colour.Colourish, plot: PlotElement);
1465
+ clear(): void;
1466
+ /**
1467
+ * Returns a copy of the data scaled by the current
1468
+ * range of the data
1469
+ * @returns
1470
+ */
1471
+ getScaled(): number[];
1472
+ getScaledBy(scaler: (v: number) => number): number[];
1473
+ push(value: number): void;
1474
+ resetScale(): void;
1475
+ }
1476
+ declare global {
1477
+ interface HTMLElementTagNameMap {
1478
+ "ixfx-plot-element": PlotElement;
1479
+ }
1480
+ }
1481
+ //# sourceMappingURL=plot.d.ts.map
1482
+ //#endregion
1483
+ //#region src/util/primitive-types.d.ts
1484
+ type StringOrNumber = string | number | bigint;
1485
+ type KeyValue = readonly [key: string, value: StringOrNumber];
1486
+ //# sourceMappingURL=primitive-types.d.ts.map
1487
+ //#endregion
1488
+ //#region src/charts/histogram-vis.d.ts
1489
+ type Bar = {
1490
+ readonly percentage: number;
1491
+ readonly data: KeyValue;
1492
+ };
1493
+ /**
1494
+ * Usage in HTML:
1495
+ * ```html
1496
+ * <style>
1497
+ * histogram-vis {
1498
+ * display: block;
1499
+ * height: 7em;
1500
+ * --histogram-bar-color: pink;
1501
+ * }
1502
+ * </style>
1503
+ * <histogram-vis>
1504
+ * [
1505
+ * ["apples", 5],
1506
+ * ["oranges", 3],
1507
+ * ["pineapple", 0],
1508
+ * ["limes", 9]
1509
+ * ]
1510
+ * </histogram-vis>
1511
+ * ```
1512
+ *
1513
+ * CSS colour theming:
1514
+ * --histogram-bar-color
1515
+ * --histogram-label-color
1516
+ *
1517
+ * HTML tag attributes
1518
+ * showXAxis (boolean)
1519
+ * showDataLabels (boolean)
1520
+ *
1521
+ * @export
1522
+ * @class HistogramVis
1523
+ * @extends {LitElement}
1524
+ **/
1525
+ declare class HistogramVis extends LitElement {
1526
+ static readonly styles: CSSResult;
1527
+ data: readonly KeyValue[];
1528
+ showDataLabels: boolean;
1529
+ height: string;
1530
+ showXAxis: boolean;
1531
+ json: readonly KeyValue[] | undefined;
1532
+ constructor();
1533
+ connectedCallback(): void;
1534
+ barTemplate(bar: Bar, index: number, _totalBars: number): TemplateResult<1>;
1535
+ render(): TemplateResult<1>;
1536
+ }
1537
+ declare global {
1538
+ interface HTMLElementTagNameMap {
1539
+ readonly "histogram-vis": HistogramVis;
1540
+ }
1541
+ }
1542
+ //#endregion
1543
+ //#region src/charts/frequency-histogram-plot.d.ts
1544
+ /**
1545
+ * Creates and drives a HistogramVis instance.
1546
+ * Data should be an outer array containing two-element arrays for each
1547
+ * data point. The first element of the inner array is expected to be the key, the second the frequency.
1548
+ * For example, `[`apples`, 2]` means the key `apples` was counted twice.
1549
+ *
1550
+ * Usage:
1551
+ * .sortBy() automatically sorts prior to visualisation. By default off.
1552
+ * .update(data) full set of data to plot
1553
+ * .clear() empties plot - same as calling `update([])`
1554
+ * .el - The `HistogramVis` instance, or undefined if not created/disposed
1555
+ *
1556
+ * ```
1557
+ * const plot = new FrequencyHistogramPlot(document.getElementById('histogram'));
1558
+ * plot.sortBy('key'); // Automatically sort by key
1559
+ * ...
1560
+ * plot.update([[`apples`, 2], [`oranges', 0], [`bananas`, 5]])
1561
+ * ```
1562
+ *
1563
+ * @export
1564
+ * @class FrequencyHistogramPlot
1565
+ */
1566
+ declare class FrequencyHistogramPlot {
1567
+ #private;
1568
+ readonly el: HistogramVis | undefined;
1569
+ constructor(el: HistogramVis);
1570
+ setAutoSort(sortStyle: `value` | `value-reverse` | `key` | `key-reverse`): void;
1571
+ clear(): void;
1572
+ dispose(): void;
1573
+ update(data: readonly (readonly [key: string, count: number])[]): void;
1574
+ }
1575
+ //# sourceMappingURL=frequency-histogram-plot.d.ts.map
1576
+ //#endregion
1577
+ //#region src/index.d.ts
1578
+ declare const init: () => void;
1579
+ //# sourceMappingURL=index.d.ts.map
1580
+
1581
+ //#endregion
1582
+ export { CrumbNavElement, CrumbNavigation2Part, CrumbNavigationElement, CrumbNavigationPart, DialElement, FrequencyHistogramPlot, HistogramVis, LabelPosition, NeedleStyle, PlotElement, PlotSeries, RequestPopup, SelectHorizontalElement, SplitLayoutElement, TabListElement, TabListItemElement, TabPanelElement, TabPanelsElement, ValueToLabelFormat, init };
1583
+ //# sourceMappingURL=index.d.ts.map