@microsoft/fast-element 1.7.1 → 1.9.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.
Files changed (56) hide show
  1. package/.eslintrc.json +30 -0
  2. package/CHANGELOG.json +73 -1
  3. package/CHANGELOG.md +26 -2
  4. package/dist/dts/components/attributes.d.ts +1 -1
  5. package/dist/dts/components/controller.d.ts +6 -6
  6. package/dist/dts/components/fast-definitions.d.ts +5 -5
  7. package/dist/dts/components/fast-element.d.ts +2 -2
  8. package/dist/dts/dom.d.ts +4 -4
  9. package/dist/dts/index.d.ts +26 -26
  10. package/dist/dts/observation/behavior.d.ts +1 -1
  11. package/dist/dts/observation/observable.d.ts +51 -50
  12. package/dist/dts/platform.d.ts +37 -0
  13. package/dist/dts/styles/css-directive.d.ts +2 -2
  14. package/dist/dts/styles/css.d.ts +2 -2
  15. package/dist/dts/styles/element-styles.d.ts +1 -1
  16. package/dist/dts/templating/binding.d.ts +3 -3
  17. package/dist/dts/templating/children.d.ts +2 -2
  18. package/dist/dts/templating/compiler.d.ts +1 -1
  19. package/dist/dts/templating/html-directive.d.ts +1 -1
  20. package/dist/dts/templating/node-observation.d.ts +1 -1
  21. package/dist/dts/templating/ref.d.ts +2 -2
  22. package/dist/dts/templating/repeat.d.ts +6 -6
  23. package/dist/dts/templating/slotted.d.ts +2 -2
  24. package/dist/dts/templating/template.d.ts +3 -3
  25. package/dist/dts/templating/view.d.ts +2 -2
  26. package/dist/dts/templating/when.d.ts +2 -2
  27. package/dist/esm/components/attributes.js +2 -2
  28. package/dist/esm/components/controller.js +4 -4
  29. package/dist/esm/components/fast-definitions.js +31 -14
  30. package/dist/esm/components/fast-element.js +2 -2
  31. package/dist/esm/dom.js +55 -50
  32. package/dist/esm/index.js +23 -23
  33. package/dist/esm/observation/array-change-records.js +1 -1
  34. package/dist/esm/observation/array-observer.js +12 -6
  35. package/dist/esm/observation/observable.js +244 -236
  36. package/dist/esm/platform.js +23 -0
  37. package/dist/esm/styles/css.js +2 -2
  38. package/dist/esm/styles/element-styles.js +1 -1
  39. package/dist/esm/templating/binding.js +5 -5
  40. package/dist/esm/templating/children.js +2 -2
  41. package/dist/esm/templating/compiler.js +2 -2
  42. package/dist/esm/templating/html-directive.js +1 -1
  43. package/dist/esm/templating/node-observation.js +2 -2
  44. package/dist/esm/templating/ref.js +1 -1
  45. package/dist/esm/templating/repeat.js +6 -6
  46. package/dist/esm/templating/slotted.js +2 -2
  47. package/dist/esm/templating/template.js +6 -6
  48. package/dist/fast-element.api.json +43 -48
  49. package/dist/fast-element.d.ts +53 -13
  50. package/dist/fast-element.js +428 -344
  51. package/dist/fast-element.min.js +1 -1
  52. package/docs/api-report.md +39 -12
  53. package/docs/guide/observables-and-state.md +10 -8
  54. package/docs/guide/using-directives.md +1 -1
  55. package/karma.conf.cjs +152 -0
  56. package/package.json +11 -10
package/.eslintrc.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "extends": ["@microsoft/eslint-config-fast-dna", "prettier"],
3
+ "rules": {
4
+ "max-classes-per-file": "off",
5
+ "no-case-declarations": "off",
6
+ "@typescript-eslint/ban-types": [
7
+ "error",
8
+ {
9
+ "types": {
10
+ "{}": false,
11
+ "Function": false,
12
+ "Object": false
13
+ },
14
+ "extendDefaults": true
15
+ }
16
+ ],
17
+ "@typescript-eslint/no-use-before-define": ["error", { "typedefs": false }],
18
+ "@typescript-eslint/no-non-null-assertion": "off",
19
+ "@typescript-eslint/explicit-function-return-type": [
20
+ "error",
21
+ {
22
+ "allowExpressions": true
23
+ }
24
+ ],
25
+ "import/extensions": [
26
+ "error",
27
+ "always"
28
+ ]
29
+ }
30
+ }
package/CHANGELOG.json CHANGED
@@ -2,7 +2,79 @@
2
2
  "name": "@microsoft/fast-element",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 24 Feb 2022 22:19:38 GMT",
5
+ "date": "Wed, 06 Apr 2022 07:10:25 GMT",
6
+ "tag": "@microsoft/fast-element_v1.9.0",
7
+ "version": "1.9.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "comment": "convert fast-element to type:module",
12
+ "author": "nicholasrice@users.noreply.github.com",
13
+ "commit": "ead7f7340654236f2503359e2fc6f0b41639b507",
14
+ "package": "@microsoft/fast-element"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Sun, 03 Apr 2022 07:12:01 GMT",
21
+ "tag": "@microsoft/fast-element_v1.8.0",
22
+ "version": "1.8.0",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "comment": "Fixed a typo in a doc example",
27
+ "author": "47367562+bheston@users.noreply.github.com",
28
+ "commit": "35913ce3a2dcba83bebb63cce2b8edf4e9da7df9",
29
+ "package": "@microsoft/fast-element"
30
+ },
31
+ {
32
+ "comment": "add comment-style tags for syntax highlighting (#5561)",
33
+ "author": "chhol@microsoft.com",
34
+ "commit": "7495a63e6e89b6e92e2d7f289eea063a8a354108",
35
+ "package": "@microsoft/fast-element"
36
+ },
37
+ {
38
+ "comment": "Update binding documentation to have an accurate example. Changes \"Bindings\" to \"Volatile Properties\".",
39
+ "author": "tgoze@ntst.com",
40
+ "commit": "1ffb431816f418864d2385b29ba494efcb3fa844",
41
+ "package": "@microsoft/fast-element"
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "date": "Tue, 08 Mar 2022 07:12:45 GMT",
48
+ "tag": "@microsoft/fast-element_v1.8.0",
49
+ "version": "1.8.0",
50
+ "comments": {
51
+ "minor": [
52
+ {
53
+ "comment": "feat: enable multiple fast-element instances in browser at once",
54
+ "author": "roeisenb@microsoft.com",
55
+ "commit": "0e506c6c67a8a7d75e4ef9cfbd000f9da810dc14",
56
+ "package": "@microsoft/fast-element"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ {
62
+ "date": "Fri, 25 Feb 2022 17:09:32 GMT",
63
+ "tag": "@microsoft/fast-element_v1.7.2",
64
+ "version": "1.7.2",
65
+ "comments": {
66
+ "patch": [
67
+ {
68
+ "comment": "fix: defend against for/in use on arrays",
69
+ "author": "roeisenb@microsoft.com",
70
+ "commit": "76a9c866277cd13a92a9ca6b3518eae2fb625d79",
71
+ "package": "@microsoft/fast-element"
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "date": "Thu, 24 Feb 2022 22:21:55 GMT",
6
78
  "tag": "@microsoft/fast-element_v1.7.1",
7
79
  "version": "1.7.1",
8
80
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,36 @@
1
1
  # Change Log - @microsoft/fast-element
2
2
 
3
- This log was last generated on Thu, 24 Feb 2022 22:19:38 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 06 Apr 2022 07:10:25 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.9.0
8
+
9
+ Wed, 06 Apr 2022 07:10:25 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - convert fast-element to type:module (nicholasrice@users.noreply.github.com)
14
+
15
+ ## 1.8.0
16
+
17
+ Tue, 08 Mar 2022 07:12:45 GMT
18
+
19
+ ### Minor changes
20
+
21
+ - feat: enable multiple fast-element instances in browser at once (roeisenb@microsoft.com)
22
+
23
+ ## 1.7.2
24
+
25
+ Fri, 25 Feb 2022 17:09:32 GMT
26
+
27
+ ### Patches
28
+
29
+ - fix: defend against for/in use on arrays (roeisenb@microsoft.com)
30
+
7
31
  ## 1.7.1
8
32
 
9
- Thu, 24 Feb 2022 22:19:38 GMT
33
+ Thu, 24 Feb 2022 22:21:55 GMT
10
34
 
11
35
  ### Patches
12
36
 
@@ -1,4 +1,4 @@
1
- import { Accessor } from "../observation/observable";
1
+ import { Accessor } from "../observation/observable.js";
2
2
  /**
3
3
  * Represents objects that can convert values to and from
4
4
  * view or model representations.
@@ -1,9 +1,9 @@
1
- import type { Behavior } from "../observation/behavior";
2
- import { PropertyChangeNotifier } from "../observation/notifier";
3
- import type { ElementStyles } from "../styles/element-styles";
4
- import type { ElementViewTemplate } from "../templating/template";
5
- import type { ElementView } from "../templating/view";
6
- import { FASTElementDefinition } from "./fast-definitions";
1
+ import type { Behavior } from "../observation/behavior.js";
2
+ import { PropertyChangeNotifier } from "../observation/notifier.js";
3
+ import type { ElementStyles } from "../styles/element-styles.js";
4
+ import type { ElementViewTemplate } from "../templating/template.js";
5
+ import type { ElementView } from "../templating/view.js";
6
+ import { FASTElementDefinition } from "./fast-definitions.js";
7
7
  /**
8
8
  * Controls the lifecycle and rendering of a `FASTElement`.
9
9
  * @public
@@ -1,6 +1,6 @@
1
- import { ComposableStyles, ElementStyles } from "../styles/element-styles";
2
- import type { ElementViewTemplate } from "../templating/template";
3
- import { AttributeConfiguration, AttributeDefinition } from "./attributes";
1
+ import { ComposableStyles, ElementStyles } from "../styles/element-styles.js";
2
+ import type { ElementViewTemplate } from "../templating/template.js";
3
+ import { AttributeConfiguration, AttributeDefinition } from "./attributes.js";
4
4
  /**
5
5
  * Represents metadata configuration for a custom element.
6
6
  * @public
@@ -44,7 +44,7 @@ export declare class FASTElementDefinition<TType extends Function = Function> {
44
44
  /**
45
45
  * Indicates if this element has been defined in at least one registry.
46
46
  */
47
- readonly isDefined: boolean;
47
+ get isDefined(): boolean;
48
48
  /**
49
49
  * The name of the custom element.
50
50
  */
@@ -93,5 +93,5 @@ export declare class FASTElementDefinition<TType extends Function = Function> {
93
93
  * Gets the element definition associated with the specified type.
94
94
  * @param type - The custom element type to retrieve the definition for.
95
95
  */
96
- static forType<TType extends Function>(type: TType): FASTElementDefinition | undefined;
96
+ static readonly forType: <TType_1 extends Function>(key: TType_1) => FASTElementDefinition<Function> | undefined;
97
97
  }
@@ -1,5 +1,5 @@
1
- import { Controller } from "./controller";
2
- import { PartialFASTElementDefinition } from "./fast-definitions";
1
+ import { Controller } from "./controller.js";
2
+ import { PartialFASTElementDefinition } from "./fast-definitions.js";
3
3
  /**
4
4
  * Represents a custom element based on the FASTElement infrastructure.
5
5
  * @public
package/dist/dts/dom.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { Callable } from "./interfaces";
2
- import { TrustedTypesPolicy } from "./platform";
1
+ import type { Callable } from "./interfaces.js";
2
+ import { TrustedTypesPolicy } from "./platform.js";
3
3
  /** @internal */
4
4
  export declare const _interpolationStart: string;
5
5
  /** @internal */
@@ -67,7 +67,7 @@ export declare const DOM: Readonly<{
67
67
  * Schedules DOM update work in the next async batch.
68
68
  * @param callable - The callable function or object to queue.
69
69
  */
70
- queueUpdate(callable: Callable): void;
70
+ queueUpdate: (callable: Callable) => void;
71
71
  /**
72
72
  * Immediately processes all work previously scheduled
73
73
  * through queueUpdate.
@@ -75,7 +75,7 @@ export declare const DOM: Readonly<{
75
75
  * This also forces nextUpdate promises
76
76
  * to resolve.
77
77
  */
78
- processUpdates(): void;
78
+ processUpdates: () => void;
79
79
  /**
80
80
  * Resolves with the next DOM update.
81
81
  */
@@ -1,26 +1,26 @@
1
- export * from "./platform";
2
- export * from "./templating/template";
3
- export * from "./components/fast-element";
4
- export { FASTElementDefinition, PartialFASTElementDefinition, } from "./components/fast-definitions";
5
- export * from "./components/attributes";
6
- export * from "./components/controller";
7
- export type { Callable, Constructable, Mutable } from "./interfaces";
8
- export * from "./templating/compiler";
9
- export { ElementStyles, ElementStyleFactory, ComposableStyles, StyleTarget, } from "./styles/element-styles";
10
- export { css, cssPartial } from "./styles/css";
11
- export { CSSDirective } from "./styles/css-directive";
12
- export * from "./templating/view";
13
- export * from "./observation/observable";
14
- export * from "./observation/notifier";
15
- export { Splice } from "./observation/array-change-records";
16
- export { enableArrayObservation } from "./observation/array-observer";
17
- export { DOM } from "./dom";
18
- export type { Behavior } from "./observation/behavior";
19
- export * from "./templating/binding";
20
- export * from "./templating/html-directive";
21
- export * from "./templating/ref";
22
- export * from "./templating/when";
23
- export * from "./templating/repeat";
24
- export * from "./templating/slotted";
25
- export * from "./templating/children";
26
- export { elements, ElementsFilter, NodeBehaviorOptions, } from "./templating/node-observation";
1
+ export * from "./platform.js";
2
+ export * from "./templating/template.js";
3
+ export * from "./components/fast-element.js";
4
+ export { FASTElementDefinition, PartialFASTElementDefinition, } from "./components/fast-definitions.js";
5
+ export * from "./components/attributes.js";
6
+ export * from "./components/controller.js";
7
+ export type { Callable, Constructable, Mutable } from "./interfaces.js";
8
+ export * from "./templating/compiler.js";
9
+ export { ElementStyles, ElementStyleFactory, ComposableStyles, StyleTarget, } from "./styles/element-styles.js";
10
+ export { css, cssPartial } from "./styles/css.js";
11
+ export { CSSDirective } from "./styles/css-directive.js";
12
+ export * from "./templating/view.js";
13
+ export * from "./observation/observable.js";
14
+ export * from "./observation/notifier.js";
15
+ export { Splice } from "./observation/array-change-records.js";
16
+ export { enableArrayObservation } from "./observation/array-observer.js";
17
+ export { DOM } from "./dom.js";
18
+ export type { Behavior } from "./observation/behavior.js";
19
+ export * from "./templating/binding.js";
20
+ export * from "./templating/html-directive.js";
21
+ export * from "./templating/ref.js";
22
+ export * from "./templating/when.js";
23
+ export * from "./templating/repeat.js";
24
+ export * from "./templating/slotted.js";
25
+ export * from "./templating/children.js";
26
+ export { elements, ElementsFilter, NodeBehaviorOptions, } from "./templating/node-observation.js";
@@ -1,4 +1,4 @@
1
- import type { ExecutionContext } from "./observable";
1
+ import type { ExecutionContext } from "./observable.js";
2
2
  /**
3
3
  * Represents and object that can contribute behavior to a view or
4
4
  * element's bind/unbind operations.
@@ -1,4 +1,4 @@
1
- import type { Notifier, Subscriber } from "./notifier";
1
+ import type { Notifier, Subscriber } from "./notifier.js";
2
2
  /**
3
3
  * Represents a getter/setter property accessor on an object.
4
4
  * @public
@@ -20,6 +20,48 @@ export interface Accessor {
20
20
  */
21
21
  setValue(source: any, value: any): void;
22
22
  }
23
+ /**
24
+ * The signature of an arrow function capable of being evaluated
25
+ * as part of a template binding update.
26
+ * @public
27
+ */
28
+ export declare type Binding<TSource = any, TReturn = any, TParent = any> = (source: TSource, context: ExecutionContext<TParent>) => TReturn;
29
+ /**
30
+ * A record of observable property access.
31
+ * @public
32
+ */
33
+ export interface ObservationRecord {
34
+ /**
35
+ * The source object with an observable property that was accessed.
36
+ */
37
+ propertySource: any;
38
+ /**
39
+ * The name of the observable property on {@link ObservationRecord.propertySource} that was accessed.
40
+ */
41
+ propertyName: string;
42
+ }
43
+ /**
44
+ * Enables evaluation of and subscription to a binding.
45
+ * @public
46
+ */
47
+ export interface BindingObserver<TSource = any, TReturn = any, TParent = any> extends Notifier {
48
+ /**
49
+ * Begins observing the binding for the source and returns the current value.
50
+ * @param source - The source that the binding is based on.
51
+ * @param context - The execution context to execute the binding within.
52
+ * @returns The value of the binding.
53
+ */
54
+ observe(source: TSource, context: ExecutionContext<TParent>): TReturn;
55
+ /**
56
+ * Unsubscribe from all dependent observables of the binding.
57
+ */
58
+ disconnect(): void;
59
+ /**
60
+ * Gets {@link ObservationRecord|ObservationRecords} that the {@link BindingObserver}
61
+ * is observing.
62
+ */
63
+ records(): IterableIterator<ObservationRecord>;
64
+ }
23
65
  /**
24
66
  * Common Observable APIs.
25
67
  * @public
@@ -34,7 +76,7 @@ export declare const Observable: Readonly<{
34
76
  * Gets a notifier for an object or Array.
35
77
  * @param source - The object or Array to get the notifier for.
36
78
  */
37
- getNotifier(source: any): Notifier;
79
+ getNotifier: (source: any) => Notifier;
38
80
  /**
39
81
  * Records a property change for a source object.
40
82
  * @param source - The object to record the change against.
@@ -64,7 +106,7 @@ export declare const Observable: Readonly<{
64
106
  * including its prototype chain.
65
107
  * @param target - The target object to search for accessor on.
66
108
  */
67
- getAccessors(target: {}): Accessor[];
109
+ getAccessors: (target: {}) => Accessor[];
68
110
  /**
69
111
  * Creates a {@link BindingObserver} that can watch the
70
112
  * provided {@link Binding} for changes.
@@ -95,11 +137,6 @@ export declare function observable(target: {}, nameOrAccessor: string | Accessor
95
137
  * @public
96
138
  */
97
139
  export declare function volatile(target: {}, name: string | Accessor, descriptor: PropertyDescriptor): PropertyDescriptor;
98
- /**
99
- * @param event - The event to set as current for the context.
100
- * @internal
101
- */
102
- export declare function setCurrentEvent(event: Event | null): void;
103
140
  /**
104
141
  * Provides additional contextual information available to behaviors and expressions.
105
142
  * @public
@@ -150,51 +187,15 @@ export declare class ExecutionContext<TParent = any, TGrandparent = any> {
150
187
  * is the last item in the collection.
151
188
  */
152
189
  get isLast(): boolean;
153
- }
154
- /**
155
- * The default execution context used in binding expressions.
156
- * @public
157
- */
158
- export declare const defaultExecutionContext: ExecutionContext<any, any>;
159
- /**
160
- * The signature of an arrow function capable of being evaluated
161
- * as part of a template binding update.
162
- * @public
163
- */
164
- export declare type Binding<TSource = any, TReturn = any, TParent = any> = (source: TSource, context: ExecutionContext<TParent>) => TReturn;
165
- /**
166
- * A record of observable property access.
167
- * @public
168
- */
169
- export interface ObservationRecord {
170
190
  /**
171
- * The source object with an observable property that was accessed.
172
- */
173
- propertySource: any;
174
- /**
175
- * The name of the observable property on {@link ObservationRecord.propertySource} that was accessed.
191
+ * Sets the event for the current execution context.
192
+ * @param event - The event to set.
193
+ * @internal
176
194
  */
177
- propertyName: string;
195
+ static setEvent(event: Event | null): void;
178
196
  }
179
197
  /**
180
- * Enables evaluation of and subscription to a binding.
198
+ * The default execution context used in binding expressions.
181
199
  * @public
182
200
  */
183
- export interface BindingObserver<TSource = any, TReturn = any, TParent = any> extends Notifier {
184
- /**
185
- * Begins observing the binding for the source and returns the current value.
186
- * @param source - The source that the binding is based on.
187
- * @param context - The execution context to execute the binding within.
188
- * @returns The value of the binding.
189
- */
190
- observe(source: TSource, context: ExecutionContext): TReturn;
191
- /**
192
- * Unsubscribe from all dependent observables of the binding.
193
- */
194
- disconnect(): void;
195
- /**
196
- * Gets {@link ObservationRecord|ObservationRecords} that the {@link BindingObserver}
197
- * is observing.
198
- */
199
- records(): IterableIterator<ObservationRecord>;
200
- }
201
+ export declare const defaultExecutionContext: ExecutionContext<any, any>;
@@ -21,6 +21,23 @@ export declare type TrustedTypes = {
21
21
  */
22
22
  createPolicy(name: string, rules: TrustedTypesPolicy): TrustedTypesPolicy;
23
23
  };
24
+ /**
25
+ * The FAST global.
26
+ * @internal
27
+ */
28
+ export interface FASTGlobal {
29
+ /**
30
+ * The list of loaded versions.
31
+ */
32
+ readonly versions: string[];
33
+ /**
34
+ * Gets a kernel value.
35
+ * @param id - The id to get the value for.
36
+ * @param initialize - Creates the initial value for the id if not already existing.
37
+ */
38
+ getById<T>(id: string | number): T | null;
39
+ getById<T>(id: string | number, initialize: () => T): T;
40
+ }
24
41
  /**
25
42
  * The platform global type.
26
43
  * @public
@@ -30,6 +47,11 @@ export declare type Global = typeof globalThis & {
30
47
  * Enables working with trusted types.
31
48
  */
32
49
  trustedTypes: TrustedTypes;
50
+ /**
51
+ * The FAST global.
52
+ * @internal
53
+ */
54
+ readonly FAST: FASTGlobal;
33
55
  };
34
56
  /**
35
57
  * A reference to globalThis, with support
@@ -37,6 +59,21 @@ export declare type Global = typeof globalThis & {
37
59
  * @public
38
60
  */
39
61
  export declare const $global: Global;
62
+ /**
63
+ * The FAST global.
64
+ * @internal
65
+ */
66
+ export declare const FAST: FASTGlobal;
67
+ /**
68
+ * Core services shared across FAST instances.
69
+ * @internal
70
+ */
71
+ export declare const enum KernelServiceId {
72
+ updateQueue = 1,
73
+ observable = 2,
74
+ contextEvent = 3,
75
+ elementRegistry = 4
76
+ }
40
77
  /**
41
78
  * A readonly, empty array.
42
79
  * @remarks
@@ -1,5 +1,5 @@
1
- import type { Behavior } from "../observation/behavior";
2
- import type { ComposableStyles } from "./element-styles";
1
+ import type { Behavior } from "../observation/behavior.js";
2
+ import type { ComposableStyles } from "./element-styles.js";
3
3
  /**
4
4
  * Directive for use in {@link css}.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { CSSDirective } from "./css-directive";
2
- import { ComposableStyles, ElementStyles } from "./element-styles";
1
+ import { CSSDirective } from "./css-directive.js";
2
+ import { ComposableStyles, ElementStyles } from "./element-styles.js";
3
3
  /**
4
4
  * Transforms a template literal string into styles.
5
5
  * @param strings - The string fragments that are interpolated with the values.
@@ -1,4 +1,4 @@
1
- import type { Behavior } from "../observation/behavior";
1
+ import type { Behavior } from "../observation/behavior.js";
2
2
  /**
3
3
  * A node that can be targeted by styles.
4
4
  * @public
@@ -1,6 +1,6 @@
1
- import type { Behavior } from "../observation/behavior";
2
- import { Binding, BindingObserver, ExecutionContext } from "../observation/observable";
3
- import { TargetedHTMLDirective } from "./html-directive";
1
+ import type { Behavior } from "../observation/behavior.js";
2
+ import { Binding, BindingObserver, ExecutionContext } from "../observation/observable.js";
3
+ import { TargetedHTMLDirective } from "./html-directive.js";
4
4
  declare function normalBind(this: BindingBehavior, source: unknown, context: ExecutionContext): void;
5
5
  declare function normalUnbind(this: BindingBehavior): void;
6
6
  declare function updatePropertyTarget(this: BindingBehavior, value: unknown): void;
@@ -1,5 +1,5 @@
1
- import { NodeBehaviorOptions, NodeObservationBehavior } from "./node-observation";
2
- import type { CaptureType } from "./template";
1
+ import { NodeBehaviorOptions, NodeObservationBehavior } from "./node-observation.js";
2
+ import type { CaptureType } from "./template.js";
3
3
  /**
4
4
  * The options used to configure child list observation.
5
5
  * @public
@@ -1,4 +1,4 @@
1
- import type { HTMLDirective, NodeBehaviorFactory } from "./html-directive";
1
+ import type { HTMLDirective, NodeBehaviorFactory } from "./html-directive.js";
2
2
  /**
3
3
  * The result of compiling a template and its directives.
4
4
  * @beta
@@ -1,4 +1,4 @@
1
- import type { Behavior } from "../observation/behavior";
1
+ import type { Behavior } from "../observation/behavior.js";
2
2
  /**
3
3
  * A factory that can create a {@link Behavior} associated with a particular
4
4
  * location within a DOM fragment.
@@ -1,4 +1,4 @@
1
- import type { Behavior } from "../observation/behavior";
1
+ import type { Behavior } from "../observation/behavior.js";
2
2
  /**
3
3
  * Options for configuring node observation behavior.
4
4
  * @public
@@ -1,5 +1,5 @@
1
- import type { Behavior } from "../observation/behavior";
2
- import type { CaptureType } from "./template";
1
+ import type { Behavior } from "../observation/behavior.js";
2
+ import type { CaptureType } from "./template.js";
3
3
  /**
4
4
  * The runtime behavior for template references.
5
5
  * @public
@@ -1,9 +1,9 @@
1
- import { Binding, ExecutionContext } from "../observation/observable";
2
- import type { Subscriber } from "../observation/notifier";
3
- import type { Splice } from "../observation/array-change-records";
4
- import type { Behavior } from "../observation/behavior";
5
- import { HTMLDirective } from "./html-directive";
6
- import type { CaptureType, SyntheticViewTemplate } from "./template";
1
+ import { Binding, ExecutionContext } from "../observation/observable.js";
2
+ import type { Subscriber } from "../observation/notifier.js";
3
+ import type { Splice } from "../observation/array-change-records.js";
4
+ import type { Behavior } from "../observation/behavior.js";
5
+ import { HTMLDirective } from "./html-directive.js";
6
+ import type { CaptureType, SyntheticViewTemplate } from "./template.js";
7
7
  /**
8
8
  * Options for configuring repeat behavior.
9
9
  * @public
@@ -1,5 +1,5 @@
1
- import { NodeBehaviorOptions, NodeObservationBehavior } from "./node-observation";
2
- import type { CaptureType } from "./template";
1
+ import { NodeBehaviorOptions, NodeObservationBehavior } from "./node-observation.js";
2
+ import type { CaptureType } from "./template.js";
3
3
  /**
4
4
  * The options used to configure slotted node observation.
5
5
  * @public
@@ -1,6 +1,6 @@
1
- import { Binding } from "../observation/observable";
2
- import { ElementView, HTMLView, SyntheticView } from "./view";
3
- import { HTMLDirective } from "./html-directive";
1
+ import { Binding } from "../observation/observable.js";
2
+ import { ElementView, HTMLView, SyntheticView } from "./view.js";
3
+ import { HTMLDirective } from "./html-directive.js";
4
4
  /**
5
5
  * A template capable of creating views specifically for rendering custom elements.
6
6
  * @public
@@ -1,5 +1,5 @@
1
- import type { Behavior } from "../observation/behavior";
2
- import type { ExecutionContext } from "../observation/observable";
1
+ import type { Behavior } from "../observation/behavior.js";
2
+ import type { ExecutionContext } from "../observation/observable.js";
3
3
  /**
4
4
  * Represents a collection of DOM nodes which can be bound to a data source.
5
5
  * @public
@@ -1,5 +1,5 @@
1
- import type { Binding } from "../observation/observable";
2
- import type { CaptureType, SyntheticViewTemplate } from "./template";
1
+ import type { Binding } from "../observation/observable.js";
2
+ import type { CaptureType, SyntheticViewTemplate } from "./template.js";
3
3
  /**
4
4
  * A directive that enables basic conditional rendering in a template.
5
5
  * @param binding - The condition to test for rendering.
@@ -1,5 +1,5 @@
1
- import { Observable } from "../observation/observable";
2
- import { DOM } from "../dom";
1
+ import { Observable } from "../observation/observable.js";
2
+ import { DOM } from "../dom.js";
3
3
  /**
4
4
  * A {@link ValueConverter} that converts to and from `boolean` values.
5
5
  * @remarks
@@ -1,7 +1,7 @@
1
- import { DOM } from "../dom";
2
- import { PropertyChangeNotifier } from "../observation/notifier";
3
- import { defaultExecutionContext, Observable } from "../observation/observable";
4
- import { FASTElementDefinition } from "./fast-definitions";
1
+ import { DOM } from "../dom.js";
2
+ import { PropertyChangeNotifier } from "../observation/notifier.js";
3
+ import { defaultExecutionContext, Observable } from "../observation/observable.js";
4
+ import { FASTElementDefinition } from "./fast-definitions.js";
5
5
  const shadowRoots = new WeakMap();
6
6
  const defaultEventOptions = {
7
7
  bubbles: true,