@microsoft/fast-element 2.0.0-beta.2 → 2.0.0-beta.20

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 (113) hide show
  1. package/CHANGELOG.json +488 -0
  2. package/CHANGELOG.md +180 -1
  3. package/dist/dts/components/attributes.d.ts +15 -0
  4. package/dist/dts/components/{controller.d.ts → element-controller.d.ts} +74 -28
  5. package/dist/dts/components/fast-definitions.d.ts +41 -9
  6. package/dist/dts/components/fast-element.d.ts +14 -26
  7. package/dist/dts/components/hydration.d.ts +14 -0
  8. package/dist/{esm/observation/behavior.js → dts/components/install-hydration.d.ts} +0 -0
  9. package/dist/dts/context.d.ts +1 -1
  10. package/dist/dts/di/di.d.ts +894 -0
  11. package/dist/dts/dom-policy.d.ts +68 -0
  12. package/dist/dts/dom.d.ts +100 -0
  13. package/dist/dts/index.d.ts +5 -4
  14. package/dist/dts/index.rollup.d.ts +0 -1
  15. package/dist/dts/index.rollup.debug.d.ts +0 -1
  16. package/dist/dts/interfaces.d.ts +60 -79
  17. package/dist/dts/observation/observable.d.ts +99 -54
  18. package/dist/dts/pending-task.d.ts +20 -0
  19. package/dist/dts/platform.d.ts +7 -0
  20. package/dist/dts/polyfills.d.ts +0 -8
  21. package/dist/dts/state/exports.d.ts +3 -0
  22. package/dist/dts/state/reactive.d.ts +8 -0
  23. package/dist/dts/state/state.d.ts +141 -0
  24. package/dist/dts/state/visitor.d.ts +6 -0
  25. package/dist/dts/state/watch.d.ts +10 -0
  26. package/dist/dts/styles/css-directive.d.ts +2 -2
  27. package/dist/dts/styles/css.d.ts +0 -5
  28. package/dist/dts/styles/element-styles.d.ts +10 -17
  29. package/dist/dts/styles/host.d.ts +68 -0
  30. package/dist/dts/styles/style-strategy.d.ts +42 -0
  31. package/dist/dts/templating/binding-signal.d.ts +12 -27
  32. package/dist/dts/templating/binding-two-way.d.ts +22 -37
  33. package/dist/dts/templating/binding.d.ts +76 -208
  34. package/dist/dts/templating/children.d.ts +1 -1
  35. package/dist/dts/templating/compiler.d.ts +11 -13
  36. package/dist/dts/templating/html-directive.d.ts +91 -97
  37. package/dist/dts/templating/node-observation.d.ts +15 -6
  38. package/dist/dts/templating/ref.d.ts +7 -11
  39. package/dist/dts/templating/render.d.ts +296 -0
  40. package/dist/dts/templating/repeat.d.ts +23 -34
  41. package/dist/dts/templating/slotted.d.ts +1 -1
  42. package/dist/dts/templating/template.d.ts +92 -14
  43. package/dist/dts/templating/view.d.ts +81 -11
  44. package/dist/dts/templating/when.d.ts +3 -3
  45. package/dist/dts/testing/exports.d.ts +3 -0
  46. package/dist/dts/testing/fakes.d.ts +14 -0
  47. package/dist/dts/testing/fixture.d.ts +84 -0
  48. package/dist/dts/testing/timeout.d.ts +7 -0
  49. package/dist/dts/utilities.d.ts +53 -18
  50. package/dist/esm/components/attributes.js +28 -5
  51. package/dist/esm/components/{controller.js → element-controller.js} +239 -137
  52. package/dist/esm/components/fast-definitions.js +38 -30
  53. package/dist/esm/components/fast-element.js +27 -16
  54. package/dist/esm/components/hydration.js +35 -0
  55. package/dist/esm/components/install-hydration.js +2 -0
  56. package/dist/esm/context.js +5 -1
  57. package/dist/esm/debug.js +40 -5
  58. package/dist/esm/di/di.js +1430 -0
  59. package/dist/esm/dom-policy.js +337 -0
  60. package/dist/esm/dom.js +101 -0
  61. package/dist/esm/index.js +4 -2
  62. package/dist/esm/index.rollup.debug.js +3 -1
  63. package/dist/esm/index.rollup.js +3 -1
  64. package/dist/esm/interfaces.js +52 -0
  65. package/dist/esm/observation/arrays.js +303 -2
  66. package/dist/esm/observation/observable.js +88 -142
  67. package/dist/esm/observation/update-queue.js +2 -2
  68. package/dist/esm/pending-task.js +16 -0
  69. package/dist/esm/platform.js +27 -2
  70. package/dist/esm/polyfills.js +3 -61
  71. package/dist/esm/state/exports.js +3 -0
  72. package/dist/esm/state/reactive.js +34 -0
  73. package/dist/esm/state/state.js +148 -0
  74. package/dist/esm/state/visitor.js +28 -0
  75. package/dist/esm/state/watch.js +36 -0
  76. package/dist/esm/styles/css.js +4 -9
  77. package/dist/esm/styles/element-styles.js +14 -33
  78. package/dist/esm/styles/host.js +1 -0
  79. package/dist/esm/styles/style-strategy.js +1 -0
  80. package/dist/esm/templating/binding-signal.js +67 -62
  81. package/dist/esm/templating/binding-two-way.js +72 -39
  82. package/dist/esm/templating/binding.js +142 -286
  83. package/dist/esm/templating/children.js +8 -4
  84. package/dist/esm/templating/compiler.js +59 -43
  85. package/dist/esm/templating/html-directive.js +56 -75
  86. package/dist/esm/templating/node-observation.js +20 -13
  87. package/dist/esm/templating/ref.js +4 -12
  88. package/dist/esm/templating/render.js +402 -0
  89. package/dist/esm/templating/repeat.js +88 -75
  90. package/dist/esm/templating/template.js +132 -60
  91. package/dist/esm/templating/view.js +113 -29
  92. package/dist/esm/templating/when.js +5 -4
  93. package/dist/esm/testing/exports.js +3 -0
  94. package/dist/esm/testing/fakes.js +107 -0
  95. package/dist/esm/testing/fixture.js +86 -0
  96. package/dist/esm/testing/timeout.js +24 -0
  97. package/dist/esm/utilities.js +95 -95
  98. package/dist/fast-element.api.json +9487 -8326
  99. package/dist/fast-element.d.ts +847 -644
  100. package/dist/fast-element.debug.js +1993 -1166
  101. package/dist/fast-element.debug.min.js +1 -1
  102. package/dist/fast-element.js +1903 -1111
  103. package/dist/fast-element.min.js +1 -1
  104. package/dist/fast-element.untrimmed.d.ts +911 -701
  105. package/docs/api-report.md +329 -252
  106. package/package.json +38 -16
  107. package/dist/dts/hooks.d.ts +0 -20
  108. package/dist/dts/observation/behavior.d.ts +0 -19
  109. package/dist/dts/observation/splice-strategies.d.ts +0 -13
  110. package/dist/dts/templating/dom.d.ts +0 -41
  111. package/dist/esm/hooks.js +0 -32
  112. package/dist/esm/observation/splice-strategies.js +0 -400
  113. package/dist/esm/templating/dom.js +0 -49
@@ -12,24 +12,11 @@ export interface Accessor {
12
12
  }
13
13
 
14
14
  // @public
15
- export type AddBehavior = (behavior: Behavior<HTMLElement>) => void;
15
+ export type AddBehavior = (behavior: HostBehavior<HTMLElement>) => void;
16
16
 
17
17
  // @public
18
18
  export type AddViewBehaviorFactory = (factory: ViewBehaviorFactory) => string;
19
19
 
20
- // Warning: (ae-internal-missing-underscore) The name "AdoptedStyleSheetsStrategy" should be prefixed with an underscore because the declaration is marked as @internal
21
- //
22
- // @internal
23
- export class AdoptedStyleSheetsStrategy implements StyleStrategy {
24
- constructor(styles: (string | CSSStyleSheet)[]);
25
- // (undocumented)
26
- addStylesTo(target: StyleTarget): void;
27
- // (undocumented)
28
- removeStylesFrom(target: StyleTarget): void;
29
- // (undocumented)
30
- readonly sheets: CSSStyleSheet[];
31
- }
32
-
33
20
  // @public
34
21
  export interface ArrayObserver extends SubscriberSet {
35
22
  addSplice(splice: Splice): void;
@@ -44,25 +31,10 @@ export const ArrayObserver: Readonly<{
44
31
  readonly enable: () => void;
45
32
  }>;
46
33
 
47
- // @public
48
- export const Aspect: Readonly<{
49
- readonly none: 0;
50
- readonly attribute: 1;
51
- readonly booleanAttribute: 2;
52
- readonly property: 3;
53
- readonly content: 4;
54
- readonly tokenList: 5;
55
- readonly event: 6;
56
- readonly assign: (directive: Aspected, value: string) => void;
57
- }>;
58
-
59
- // @public
60
- export type Aspect = typeof Aspect[Exclude<keyof typeof Aspect, "assign" | "none">];
61
-
62
34
  // @public
63
35
  export interface Aspected {
64
- aspectType: Aspect;
65
- binding?: Binding;
36
+ aspectType: DOMAspect;
37
+ dataBinding?: Binding;
66
38
  sourceAspect: string;
67
39
  targetAspect: string;
68
40
  }
@@ -81,6 +53,11 @@ export type AttributeConfiguration = {
81
53
  converter?: ValueConverter;
82
54
  };
83
55
 
56
+ // @public
57
+ export const AttributeConfiguration: Readonly<{
58
+ locate: (target: {}) => AttributeConfiguration[];
59
+ }>;
60
+
84
61
  // @public
85
62
  export class AttributeDefinition implements Accessor {
86
63
  constructor(Owner: Function, name: string, attribute?: string, mode?: AttributeMode, converter?: ValueConverter);
@@ -104,44 +81,19 @@ export class AttributeDefinition implements Accessor {
104
81
  export type AttributeMode = typeof reflectMode | typeof booleanMode | "fromView";
105
82
 
106
83
  // @public
107
- export interface Behavior<TSource = any, TParent = any> {
108
- bind(source: TSource, context: ExecutionContext<TParent>): void;
109
- unbind(source: TSource, context: ExecutionContext<TParent>): void;
110
- }
111
-
112
- // @public
113
- export function bind<T = any>(binding: Binding<T>, config?: BindingConfig | DefaultBindingOptions): CaptureType<T>;
114
-
115
- // @public
116
- export type Binding<TSource = any, TReturn = any, TParent = any> = (source: TSource, context: ExecutionContext<TParent>) => TReturn;
84
+ export function bind<T = any>(expression: Expression<T>, policy?: DOMPolicy, isVolatile?: boolean): Binding<T>;
117
85
 
118
86
  // @public
119
- export interface BindingConfig<T = any> {
120
- mode: BindingMode;
121
- options: T;
122
- }
123
-
124
- // @public
125
- export const BindingConfig: Readonly<{
126
- define<T>(mode: BindingMode, defaultOptions: T): BindingConfig<T> & BindingConfigResolver<T>;
127
- }>;
128
-
129
- // @public
130
- export type BindingConfigResolver<T> = (options: T) => BindingConfig<T>;
131
-
132
- // @public
133
- export type BindingMode = Record<Aspect, (directive: HTMLBindingDirective) => Pick<ViewBehaviorFactory, "createBehavior">>;
134
-
135
- // @public
136
- export const BindingMode: Readonly<{
137
- define(UpdateType: typeof UpdateBinding, EventType?: typeof EventBinding): BindingMode;
138
- }>;
139
-
140
- // @public
141
- export interface BindingObserver<TSource = any, TReturn = any, TParent = any> extends Notifier, Disposable {
142
- observe(source: TSource, context?: ExecutionContext<TParent>): TReturn;
143
- records(): IterableIterator<ObservationRecord>;
144
- setMode(isAsync: boolean): void;
87
+ export abstract class Binding<TSource = any, TReturn = any, TParent = any> {
88
+ constructor(evaluate: Expression<TSource, TReturn, TParent>, policy?: DOMPolicy | undefined, isVolatile?: boolean);
89
+ abstract createObserver(directive: HTMLDirective, subscriber: Subscriber): ExpressionObserver<TSource, TReturn, TParent>;
90
+ // (undocumented)
91
+ evaluate: Expression<TSource, TReturn, TParent>;
92
+ // (undocumented)
93
+ isVolatile: boolean;
94
+ options?: any;
95
+ // (undocumented)
96
+ policy?: DOMPolicy | undefined;
145
97
  }
146
98
 
147
99
  // @public
@@ -153,17 +105,7 @@ export type Callable = typeof Function.prototype.call | {
153
105
  };
154
106
 
155
107
  // @public
156
- export interface CaptureType<TSource> {
157
- }
158
-
159
- // @public
160
- export class ChangeBinding extends UpdateBinding {
161
- constructor(directive: HTMLBindingDirective, updateTarget: UpdateTarget);
162
- bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
163
- protected getObserver(target: Node): BindingObserver;
164
- // @internal (undocumented)
165
- handleChange(binding: Binding, observer: BindingObserver): void;
166
- unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
108
+ export interface CaptureType<TSource, TParent> {
167
109
  }
168
110
 
169
111
  // @public
@@ -171,7 +113,7 @@ export interface ChildListDirectiveOptions<T = any> extends NodeBehaviorOptions<
171
113
  }
172
114
 
173
115
  // @public
174
- export function children<T = any>(propertyOrOptions: (keyof T & string) | ChildrenDirectiveOptions<keyof T & string>): CaptureType<T>;
116
+ export function children<TSource = any, TParent = any>(propertyOrOptions: (keyof TSource & string) | ChildrenDirectiveOptions<keyof TSource & string>): CaptureType<TSource, TParent>;
175
117
 
176
118
  // @public
177
119
  export class ChildrenDirective extends NodeObservationDirective<ChildrenDirectiveOptions> {
@@ -184,17 +126,25 @@ export class ChildrenDirective extends NodeObservationDirective<ChildrenDirectiv
184
126
  // @public
185
127
  export type ChildrenDirectiveOptions<T = any> = ChildListDirectiveOptions<T> | SubtreeDirectiveOptions<T>;
186
128
 
129
+ // @public
130
+ export type Class<T, C = {}> = C & Constructable<T> & {
131
+ readonly prototype: T;
132
+ };
133
+
187
134
  // @public
188
135
  export type CompilationStrategy = (
189
136
  html: string | HTMLTemplateElement,
190
- factories: Record<string, ViewBehaviorFactory>) => HTMLTemplateCompilationResult;
137
+ factories: Record<string, ViewBehaviorFactory>,
138
+ policy: DOMPolicy) => HTMLTemplateCompilationResult;
139
+
140
+ // @public
141
+ export type CompiledViewBehaviorFactory = Required<ViewBehaviorFactory>;
191
142
 
192
143
  // @public
193
144
  export const Compiler: {
194
- setHTMLPolicy(policy: TrustedTypesPolicy): void;
195
- compile<TSource = any, TParent = any>(html: string | HTMLTemplateElement, directives: Record<string, ViewBehaviorFactory>): HTMLTemplateCompilationResult<TSource, TParent>;
145
+ compile<TSource = any, TParent = any>(html: string | HTMLTemplateElement, factories: Record<string, ViewBehaviorFactory>, policy?: DOMPolicy): HTMLTemplateCompilationResult<TSource, TParent>;
196
146
  setDefaultStrategy(strategy: CompilationStrategy): void;
197
- aggregate(parts: (string | ViewBehaviorFactory)[]): ViewBehaviorFactory;
147
+ aggregate(parts: (string | ViewBehaviorFactory)[], policy?: DOMPolicy): ViewBehaviorFactory;
198
148
  };
199
149
 
200
150
  // @public
@@ -211,28 +161,25 @@ export type ConstructibleStyleStrategy = {
211
161
  };
212
162
 
213
163
  // @public
214
- export class Controller<TElement extends HTMLElement = HTMLElement> extends PropertyChangeNotifier {
215
- // @internal
216
- constructor(element: TElement, definition: FASTElementDefinition);
217
- addBehaviors(behaviors: ReadonlyArray<Behavior<TElement>>): void;
218
- addStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
219
- readonly definition: FASTElementDefinition;
220
- readonly element: TElement;
221
- emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): void | boolean;
222
- static forCustomElement(element: HTMLElement): Controller;
223
- get isConnected(): boolean;
224
- onAttributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
225
- onConnectedCallback(): void;
226
- onDisconnectedCallback(): void;
227
- removeBehaviors(behaviors: ReadonlyArray<Behavior<TElement>>, force?: boolean): void;
228
- removeStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
229
- get styles(): ElementStyles | null;
230
- set styles(value: ElementStyles | null);
231
- get template(): ElementViewTemplate<TElement> | null;
232
- set template(value: ElementViewTemplate<TElement> | null);
233
- readonly view: ElementView<TElement> | null;
164
+ export interface ContentTemplate {
165
+ create(): ContentView;
234
166
  }
235
167
 
168
+ // @public
169
+ export interface ContentView {
170
+ bind(source: any, context?: ExecutionContext): void;
171
+ // (undocumented)
172
+ readonly context: ExecutionContext;
173
+ insertBefore(node: Node): void;
174
+ remove(): void;
175
+ unbind(): void;
176
+ }
177
+
178
+ // Warning: (ae-internal-missing-underscore) The name "createMetadataLocator" should be prefixed with an underscore because the declaration is marked as @internal
179
+ //
180
+ // @internal
181
+ export function createMetadataLocator<TMetadata>(): (target: {}) => TMetadata[];
182
+
236
183
  // Warning: (ae-internal-missing-underscore) The name "createTypeRegistry" should be prefixed with an underscore because the declaration is marked as @internal
237
184
  //
238
185
  // @internal
@@ -261,9 +208,6 @@ export interface CSSDirectiveDefinition<TType extends Constructable<CSSDirective
261
208
  readonly type: TType;
262
209
  }
263
210
 
264
- // @public @deprecated (undocumented)
265
- export const cssPartial: (strings: TemplateStringsArray, ...values: (ComposableStyles | CSSDirective)[]) => CSSDirective;
266
-
267
211
  // @public
268
212
  export type CSSTemplateTag = ((strings: TemplateStringsArray, ...values: (ComposableStyles | CSSDirective)[]) => ElementStyles) & {
269
213
  partial(strings: TemplateStringsArray, ...values: (ComposableStyles | CSSDirective)[]): CSSDirective;
@@ -275,9 +219,6 @@ export function customElement(nameOrDef: string | PartialFASTElementDefinition):
275
219
  // @public
276
220
  export type DecoratorAttributeConfiguration = Omit<AttributeConfiguration, "property">;
277
221
 
278
- // @public
279
- export type DefaultBindingOptions = AddEventListenerOptions;
280
-
281
222
  // @public
282
223
  export interface Disposable {
283
224
  dispose(): void;
@@ -285,27 +226,82 @@ export interface Disposable {
285
226
 
286
227
  // @public
287
228
  export const DOM: Readonly<{
288
- queueUpdate: (callable: Callable) => void;
289
- nextUpdate: () => Promise<void>;
290
- processUpdates: () => void;
229
+ readonly policy: DOMPolicy;
230
+ setPolicy(value: DOMPolicy): void;
291
231
  setAttribute(element: HTMLElement, attributeName: string, value: any): void;
292
232
  setBooleanAttribute(element: HTMLElement, attributeName: string, value: boolean): void;
293
233
  }>;
294
234
 
235
+ // @public
236
+ export const DOMAspect: Readonly<{
237
+ readonly none: 0;
238
+ readonly attribute: 1;
239
+ readonly booleanAttribute: 2;
240
+ readonly property: 3;
241
+ readonly content: 4;
242
+ readonly tokenList: 5;
243
+ readonly event: 6;
244
+ }>;
245
+
246
+ // @public
247
+ export type DOMAspect = typeof DOMAspect[Exclude<keyof typeof DOMAspect, "none">];
248
+
249
+ // @public
250
+ export interface DOMPolicy {
251
+ createHTML(value: string): string;
252
+ protect(tagName: string | null, aspect: DOMAspect, aspectName: string, sink: DOMSink): DOMSink;
253
+ }
254
+
255
+ // @public
256
+ export type DOMSink = (target: Node, aspectName: string, value: any, ...args: any[]) => void;
257
+
258
+ // @public
259
+ export class ElementController<TElement extends HTMLElement = HTMLElement> extends PropertyChangeNotifier implements HostController<TElement> {
260
+ // @internal
261
+ constructor(element: TElement, definition: FASTElementDefinition);
262
+ addBehavior(behavior: HostBehavior<TElement>): void;
263
+ addStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
264
+ connect(): void;
265
+ readonly definition: FASTElementDefinition;
266
+ disconnect(): void;
267
+ emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): void | boolean;
268
+ static forCustomElement(element: HTMLElement): ElementController;
269
+ get isConnected(): boolean;
270
+ get mainStyles(): ElementStyles | null;
271
+ set mainStyles(value: ElementStyles | null);
272
+ onAttributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
273
+ removeBehavior(behavior: HostBehavior<TElement>, force?: boolean): void;
274
+ removeStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
275
+ static setStrategy(strategy: ElementControllerStrategy): void;
276
+ readonly source: TElement;
277
+ get template(): ElementViewTemplate<TElement> | null;
278
+ set template(value: ElementViewTemplate<TElement> | null);
279
+ // @internal
280
+ toJSON: () => undefined;
281
+ readonly view: ElementView<TElement> | null;
282
+ }
283
+
284
+ // @public
285
+ export interface ElementControllerStrategy {
286
+ // (undocumented)
287
+ new (element: HTMLElement, definition: FASTElementDefinition): ElementController;
288
+ }
289
+
295
290
  // @public
296
291
  export const elements: (selector?: string) => ElementsFilter;
297
292
 
298
293
  // @public
299
- export type ElementsFilter = (value: Node, index: number, array: Node[]) => boolean;
294
+ export type ElementsFilter = (value: Node, index?: number, array?: Node[]) => boolean;
300
295
 
301
296
  // @public
302
297
  export class ElementStyles {
303
298
  constructor(styles: ReadonlyArray<ComposableStyles>);
304
299
  // @internal (undocumented)
305
300
  addStylesTo(target: StyleTarget): void;
306
- readonly behaviors: ReadonlyArray<Behavior<HTMLElement>> | null;
301
+ readonly behaviors: ReadonlyArray<HostBehavior<HTMLElement>> | null;
307
302
  // @internal (undocumented)
308
303
  isAttachedTo(target: StyleTarget): boolean;
304
+ static normalize(styles: ComposableStyles | ComposableStyles[] | undefined): ElementStyles | undefined;
309
305
  // @internal (undocumented)
310
306
  removeStylesFrom(target: StyleTarget): void;
311
307
  static setDefaultStrategy(Strategy: ConstructibleStyleStrategy): void;
@@ -313,7 +309,7 @@ export class ElementStyles {
313
309
  // (undocumented)
314
310
  readonly styles: ReadonlyArray<ComposableStyles>;
315
311
  static readonly supportsAdoptedStyleSheets: boolean;
316
- withBehaviors(...behaviors: Behavior<HTMLElement>[]): this;
312
+ withBehaviors(...behaviors: HostBehavior<HTMLElement>[]): this;
317
313
  withStrategy(Strategy: ConstructibleStyleStrategy): this;
318
314
  }
319
315
 
@@ -332,38 +328,52 @@ export interface ElementViewTemplate<TSource = any, TParent = any> {
332
328
  export const emptyArray: readonly never[];
333
329
 
334
330
  // @public
335
- export class EventBinding {
336
- constructor(directive: HTMLBindingDirective);
337
- bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
338
- createBehavior(targets: ViewBehaviorTargets): ViewBehavior;
339
- // (undocumented)
340
- readonly directive: HTMLBindingDirective;
341
- // @internal (undocumented)
342
- handleEvent(event: Event): void;
343
- unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
344
- }
345
-
346
- // @public
347
- export class ExecutionContext<TParentSource = any> {
348
- static create(): ExecutionContext;
349
- createChildContext<TParentSource>(parentSource: TParentSource): ExecutionContext<TParentSource>;
350
- createItemContext(index: number, length: number): ExecutionContext<TParentSource>;
351
- static readonly default: ExecutionContext<any>;
352
- get event(): Event;
331
+ export interface ExecutionContext<TParent = any> {
332
+ readonly event: Event;
353
333
  eventDetail<TDetail>(): TDetail;
354
334
  eventTarget<TTarget extends EventTarget>(): TTarget;
355
335
  index: number;
356
- get isEven(): boolean;
357
- get isFirst(): boolean;
358
- get isInMiddle(): boolean;
359
- get isLast(): boolean;
360
- get isOdd(): boolean;
336
+ readonly isEven: boolean;
337
+ readonly isFirst: boolean;
338
+ readonly isInMiddle: boolean;
339
+ readonly isLast: boolean;
340
+ readonly isOdd: boolean;
361
341
  length: number;
362
- readonly parent: TParentSource;
363
- readonly parentContext: ExecutionContext<TParentSource>;
364
- // @internal
365
- static setEvent(event: Event | null): void;
366
- updatePosition(index: number, length: number): void;
342
+ parent: TParent;
343
+ parentContext: ExecutionContext<TParent>;
344
+ }
345
+
346
+ // @public
347
+ export const ExecutionContext: Readonly<{
348
+ default: ExecutionContext<any>;
349
+ getEvent(): Event | null;
350
+ setEvent(event: Event | null): void;
351
+ }>;
352
+
353
+ // @public
354
+ export type Expression<TSource = any, TReturn = any, TParent = any> = (source: TSource, context: ExecutionContext<TParent>) => TReturn;
355
+
356
+ // @public
357
+ export interface ExpressionController<TSource = any, TParent = any> {
358
+ readonly context: ExecutionContext<TParent>;
359
+ readonly isBound: boolean;
360
+ onUnbind(behavior: {
361
+ unbind(controller: ExpressionController<TSource, TParent>): any;
362
+ }): void;
363
+ readonly source: TSource;
364
+ readonly sourceLifetime?: SourceLifetime;
365
+ }
366
+
367
+ // @public
368
+ export interface ExpressionNotifier<TSource = any, TReturn = any, TParent = any> extends Notifier, ExpressionObserver<TSource, TReturn, TParent>, Disposable {
369
+ observe(source: TSource, context?: ExecutionContext): TReturn;
370
+ records(): IterableIterator<ObservationRecord>;
371
+ setMode(isAsync: boolean): void;
372
+ }
373
+
374
+ // @public
375
+ export interface ExpressionObserver<TSource = any, TReturn = any, TParent = any> {
376
+ bind(controller: ExpressionController<TSource, TParent>): TReturn;
367
377
  }
368
378
 
369
379
  // Warning: (ae-internal-missing-underscore) The name "FAST" should be prefixed with an underscore because the declaration is marked as @internal
@@ -374,35 +384,36 @@ export const FAST: FASTGlobal;
374
384
  // @public
375
385
  export interface FASTElement extends HTMLElement {
376
386
  $emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): boolean | void;
377
- readonly $fastController: Controller;
387
+ readonly $fastController: ElementController;
378
388
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
379
389
  connectedCallback(): void;
380
390
  disconnectedCallback(): void;
381
391
  }
382
392
 
383
393
  // @public
384
- export const FASTElement: (new () => HTMLElement & FASTElement) & {
385
- from<TBase extends {
386
- new (): HTMLElement;
387
- prototype: HTMLElement;
388
- }>(BaseType: TBase): new () => InstanceType<TBase> & FASTElement;
389
- define<TType extends Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): TType;
390
- metadata<TType_1 extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType_1, nameOrDef?: string | PartialFASTElementDefinition): FASTElementDefinition<TType_1>;
394
+ export const FASTElement: {
395
+ new (): FASTElement;
396
+ define: typeof define;
397
+ compose: typeof compose;
398
+ from: typeof from;
391
399
  };
392
400
 
393
401
  // @public
394
402
  export class FASTElementDefinition<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>> {
395
- constructor(type: TType, nameOrConfig?: PartialFASTElementDefinition | string);
396
403
  readonly attributeLookup: Record<string, AttributeDefinition>;
397
404
  readonly attributes: ReadonlyArray<AttributeDefinition>;
405
+ static compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition): FASTElementDefinition<TType>;
398
406
  define(registry?: CustomElementRegistry): this;
399
- readonly elementOptions?: ElementDefinitionOptions;
407
+ readonly elementOptions: ElementDefinitionOptions;
400
408
  static readonly getByType: (key: Function) => FASTElementDefinition<Constructable<HTMLElement>> | undefined;
401
409
  static readonly getForInstance: (object: any) => FASTElementDefinition<Constructable<HTMLElement>> | undefined;
402
410
  get isDefined(): boolean;
403
411
  readonly name: string;
404
412
  readonly propertyLookup: Record<string, AttributeDefinition>;
405
- readonly shadowOptions?: ShadowRootInit;
413
+ // @internal
414
+ static registerBaseType(type: Function): void;
415
+ readonly registry: CustomElementRegistry;
416
+ readonly shadowOptions?: ShadowRootOptions;
406
417
  readonly styles?: ElementStyles;
407
418
  readonly template?: ElementViewTemplate;
408
419
  readonly type: TType;
@@ -413,33 +424,58 @@ export class FASTElementDefinition<TType extends Constructable<HTMLElement> = Co
413
424
  // @internal
414
425
  export interface FASTGlobal {
415
426
  addMessages(messages: Record<number, string>): void;
416
- error(code: number, ...args: any[]): Error;
427
+ error(code: number, values?: Record<string, any>): Error;
417
428
  getById<T>(id: string | number): T | null;
418
429
  // (undocumented)
419
430
  getById<T>(id: string | number, initialize: () => T): T;
420
431
  readonly versions: string[];
421
- warn(code: number, ...args: any[]): void;
432
+ warn(code: number, values?: Record<string, any>): void;
422
433
  }
423
434
 
424
435
  // @public
425
- export function html<TSource = any, TParent = any>(strings: TemplateStringsArray, ...values: TemplateValue<TSource, TParent>[]): ViewTemplate<TSource, TParent>;
436
+ export interface HostBehavior<TSource = any> {
437
+ addedCallback?(controller: HostController<TSource>): void;
438
+ connectedCallback?(controller: HostController<TSource>): void;
439
+ disconnectedCallback?(controller: HostController<TSource>): void;
440
+ removedCallback?(controller: HostController<TSource>): void;
441
+ }
426
442
 
427
443
  // @public
428
- export class HTMLBindingDirective implements HTMLDirective, ViewBehaviorFactory, Aspected {
429
- constructor(binding: Binding, mode: BindingMode, options: any);
430
- aspectType: Aspect;
431
- // (undocumented)
432
- binding: Binding;
433
- createBehavior(targets: ViewBehaviorTargets): ViewBehavior;
444
+ export interface HostController<TSource = any> {
445
+ addBehavior(behavior: HostBehavior<TSource>): void;
446
+ addStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
447
+ readonly isConnected: boolean;
448
+ mainStyles: ElementStyles | null;
449
+ removeBehavior(behavior: HostBehavior<TSource>, force?: boolean): void;
450
+ removeStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
451
+ readonly source: TSource;
452
+ }
453
+
454
+ // @public
455
+ export const html: HTMLTemplateTag;
456
+
457
+ // @public
458
+ export class HTMLBindingDirective implements HTMLDirective, ViewBehaviorFactory, ViewBehavior, Aspected {
459
+ constructor(dataBinding: Binding);
460
+ aspectType: DOMAspect;
461
+ // @internal (undocumented)
462
+ bind(controller: ViewController): void;
463
+ createBehavior(): ViewBehavior;
434
464
  createHTML(add: AddViewBehaviorFactory): string;
435
- id: string;
436
- // (undocumented)
437
- mode: BindingMode;
438
- nodeId: string;
439
465
  // (undocumented)
440
- options: any;
466
+ dataBinding: Binding;
467
+ // @internal (undocumented)
468
+ handleChange(binding: Expression, observer: ExpressionObserver): void;
469
+ // @internal (undocumented)
470
+ handleEvent(event: Event): void;
471
+ id: string;
472
+ policy: DOMPolicy;
441
473
  sourceAspect: string;
442
474
  targetAspect: string;
475
+ targetNodeId: string;
476
+ targetTagName: string | null;
477
+ // @internal (undocumented)
478
+ unbind(controller: ViewController): void;
443
479
  }
444
480
 
445
481
  // @public
@@ -452,6 +488,7 @@ export const HTMLDirective: Readonly<{
452
488
  getForInstance: (object: any) => HTMLDirectiveDefinition<Constructable<HTMLDirective>> | undefined;
453
489
  getByType: (key: Function) => HTMLDirectiveDefinition<Constructable<HTMLDirective>> | undefined;
454
490
  define<TType extends Constructable<HTMLDirective>>(type: TType, options?: PartialHTMLDirectiveDefinition): TType;
491
+ assignAspect(directive: Aspected, value?: string): void;
455
492
  }>;
456
493
 
457
494
  // @public
@@ -468,21 +505,55 @@ export interface HTMLTemplateCompilationResult<TSource = any, TParent = any> {
468
505
  }
469
506
 
470
507
  // @public
471
- export class HTMLView<TSource = any, TParent = any> implements ElementView<TSource, TParent>, SyntheticView<TSource, TParent> {
472
- constructor(fragment: DocumentFragment, factories: ReadonlyArray<ViewBehaviorFactory>, targets: ViewBehaviorTargets);
508
+ export type HTMLTemplateTag = (<TSource = any, TParent = any>(strings: TemplateStringsArray, ...values: TemplateValue<TSource, TParent>[]) => ViewTemplate<TSource, TParent>) & {
509
+ partial(html: string): InlineTemplateDirective;
510
+ };
511
+
512
+ // @public
513
+ export class HTMLView<TSource = any, TParent = any> implements ElementView<TSource, TParent>, SyntheticView<TSource, TParent>, ExecutionContext<TParent> {
514
+ constructor(fragment: DocumentFragment, factories: ReadonlyArray<CompiledViewBehaviorFactory>, targets: ViewBehaviorTargets);
473
515
  appendTo(node: Node): void;
474
- bind(source: TSource, context: ExecutionContext<TParent>): void;
475
- context: ExecutionContext<TParent> | null;
516
+ bind(source: TSource, context?: ExecutionContext<TParent>): void;
517
+ context: ExecutionContext<TParent>;
476
518
  dispose(): void;
477
519
  static disposeContiguousBatch(views: SyntheticView[]): void;
520
+ get event(): Event;
521
+ eventDetail<TDetail>(): TDetail;
522
+ eventTarget<TTarget extends EventTarget>(): TTarget;
478
523
  firstChild: Node;
524
+ index: number;
479
525
  insertBefore(node: Node): void;
526
+ isBound: boolean;
527
+ get isEven(): boolean;
528
+ get isFirst(): boolean;
529
+ get isInMiddle(): boolean;
530
+ get isLast(): boolean;
531
+ get isOdd(): boolean;
480
532
  lastChild: Node;
533
+ length: number;
534
+ // (undocumented)
535
+ onUnbind(behavior: {
536
+ unbind(controller: ViewController<TSource, TParent>): any;
537
+ }): void;
538
+ readonly parent: TParent;
539
+ readonly parentContext: ExecutionContext<TParent>;
481
540
  remove(): void;
482
541
  source: TSource | null;
542
+ readonly sourceLifetime: SourceLifetime;
543
+ // (undocumented)
544
+ readonly targets: ViewBehaviorTargets;
545
+ // @internal
546
+ toJSON: () => undefined;
483
547
  unbind(): void;
484
548
  }
485
549
 
550
+ // @public
551
+ export class InlineTemplateDirective implements HTMLDirective {
552
+ constructor(html: string, factories?: Record<string, ViewBehaviorFactory>);
553
+ createHTML(add: AddViewBehaviorFactory): string;
554
+ static readonly empty: InlineTemplateDirective;
555
+ }
556
+
486
557
  // @public
487
558
  export interface LengthObserver extends Subscriber {
488
559
  length: number;
@@ -491,6 +562,9 @@ export interface LengthObserver extends Subscriber {
491
562
  // @public
492
563
  export function lengthOf<T>(array: readonly T[]): number;
493
564
 
565
+ // @public
566
+ export function listener<T = any>(expression: Expression<T>, options?: AddEventListenerOptions): Binding<T>;
567
+
494
568
  // @public
495
569
  export const Markup: Readonly<{
496
570
  interpolation: (id: string) => string;
@@ -498,13 +572,6 @@ export const Markup: Readonly<{
498
572
  comment: (id: string) => string;
499
573
  }>;
500
574
 
501
- // Warning: (ae-internal-missing-underscore) The name "Mutable" should be prefixed with an underscore because the declaration is marked as @internal
502
- //
503
- // @internal
504
- export type Mutable<T> = {
505
- -readonly [P in keyof T]: T[P];
506
- };
507
-
508
575
  // @public
509
576
  export interface NodeBehaviorOptions<T = any> {
510
577
  filter?: ElementsFilter;
@@ -513,16 +580,22 @@ export interface NodeBehaviorOptions<T = any> {
513
580
 
514
581
  // @public
515
582
  export abstract class NodeObservationDirective<T extends NodeBehaviorOptions> extends StatelessAttachedAttributeDirective<T> {
516
- bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
583
+ bind(controller: ViewController): void;
517
584
  protected computeNodes(target: any): Node[];
518
585
  protected abstract disconnect(target: any): void;
519
586
  protected abstract getNodes(target: any): Node[];
520
587
  protected getSource(target: Node): any;
588
+ get id(): string;
589
+ set id(value: string);
521
590
  protected abstract observe(target: any): void;
522
- unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
591
+ targetNodeId: string;
592
+ unbind(controller: ViewController): void;
523
593
  protected updateTarget(source: any, value: ReadonlyArray<any>): void;
524
594
  }
525
595
 
596
+ // @public
597
+ export function normalizeBinding<TSource = any, TReturn = any, TParent = any>(value: Expression<TSource, TReturn, TParent> | Binding<TSource, TReturn, TParent> | {}): Binding<TSource, TReturn, TParent>;
598
+
526
599
  // @public
527
600
  export interface Notifier {
528
601
  notify(args: any): void;
@@ -531,6 +604,9 @@ export interface Notifier {
531
604
  unsubscribe(subscriber: Subscriber, propertyToUnwatch?: any): void;
532
605
  }
533
606
 
607
+ // @public
608
+ export const nullableBooleanConverter: ValueConverter;
609
+
534
610
  // @public
535
611
  export const nullableNumberConverter: ValueConverter;
536
612
 
@@ -543,8 +619,8 @@ export const Observable: Readonly<{
543
619
  notify(source: unknown, args: any): void;
544
620
  defineProperty(target: {}, nameOrAccessor: string | Accessor): void;
545
621
  getAccessors: (target: {}) => Accessor[];
546
- binding<TSource = any, TReturn = any>(binding: Binding<TSource, TReturn, any>, initialSubscriber?: Subscriber, isVolatileBinding?: boolean): BindingObserver<TSource, TReturn, any>;
547
- isVolatileBinding<TSource_1 = any, TReturn_1 = any>(binding: Binding<TSource_1, TReturn_1, any>): boolean;
622
+ binding<TSource = any, TReturn = any>(expression: Expression<TSource, TReturn, any>, initialSubscriber?: Subscriber, isVolatileBinding?: boolean): ExpressionNotifier<TSource, TReturn, any>;
623
+ isVolatileBinding<TSource_1 = any, TReturn_1 = any>(expression: Expression<TSource_1, TReturn_1, any>): boolean;
548
624
  }>;
549
625
 
550
626
  // @public
@@ -557,15 +633,7 @@ export interface ObservationRecord {
557
633
  }
558
634
 
559
635
  // @public
560
- export const onChange: BindingConfig<AddEventListenerOptions> & BindingConfigResolver<AddEventListenerOptions>;
561
-
562
- // @public
563
- export const oneTime: BindingConfig<AddEventListenerOptions> & BindingConfigResolver<AddEventListenerOptions>;
564
-
565
- // @public
566
- export class OneTimeBinding extends UpdateBinding {
567
- bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
568
- }
636
+ export function oneTime<T = any>(expression: Expression<T>, policy?: DOMPolicy): Binding<T>;
569
637
 
570
638
  // @public
571
639
  export const Parser: Readonly<{
@@ -577,7 +645,8 @@ export interface PartialFASTElementDefinition {
577
645
  readonly attributes?: (AttributeConfiguration | string)[];
578
646
  readonly elementOptions?: ElementDefinitionOptions;
579
647
  readonly name: string;
580
- readonly shadowOptions?: Partial<ShadowRootInit> | null;
648
+ readonly registry?: CustomElementRegistry;
649
+ readonly shadowOptions?: Partial<ShadowRootOptions> | null;
581
650
  readonly styles?: ComposableStyles | ComposableStyles[];
582
651
  readonly template?: ElementViewTemplate;
583
652
  }
@@ -597,36 +666,37 @@ export class PropertyChangeNotifier implements Notifier {
597
666
  }
598
667
 
599
668
  // @public
600
- export const ref: <T = any>(propertyName: keyof T & string) => CaptureType<T>;
669
+ export const ref: <TSource = any, TParent = any>(propertyName: keyof TSource & string) => CaptureType<TSource, TParent>;
601
670
 
602
671
  // @public
603
672
  export class RefDirective extends StatelessAttachedAttributeDirective<string> {
604
- bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
605
- unbind(): void;
673
+ bind(controller: ViewController): void;
674
+ targetNodeId: string;
606
675
  }
607
676
 
608
677
  // @public
609
- export function repeat<TSource = any, TArray extends ReadonlyArray<any> = ReadonlyArray<any>>(itemsBinding: Binding<TSource, TArray, ExecutionContext<TSource>>, templateOrTemplateBinding: ViewTemplate | Binding<TSource, ViewTemplate>, options?: RepeatOptions): CaptureType<TSource>;
678
+ export function repeat<TSource = any, TArray extends ReadonlyArray<any> = ReadonlyArray<any>, TParent = any>(items: Expression<TSource, TArray, TParent> | Binding<TSource, TArray, TParent> | ReadonlyArray<any>, template: Expression<TSource, ViewTemplate<any, TSource>> | Binding<TSource, ViewTemplate<any, TSource>> | ViewTemplate<any, TSource>, options?: RepeatOptions): CaptureType<TSource, TParent>;
610
679
 
611
680
  // @public
612
- export class RepeatBehavior<TSource = any> implements Behavior, Subscriber {
613
- constructor(location: Node, itemsBinding: Binding<TSource, any[]>, isItemsBindingVolatile: boolean, templateBinding: Binding<TSource, SyntheticViewTemplate>, isTemplateBindingVolatile: boolean, options: RepeatOptions);
614
- bind(source: TSource, context: ExecutionContext): void;
615
- handleChange(source: any, args: Splice[]): void;
681
+ export class RepeatBehavior<TSource = any> implements ViewBehavior, Subscriber {
682
+ constructor(directive: RepeatDirective);
683
+ bind(controller: ViewController): void;
684
+ handleChange(source: any, args: Splice[] | ExpressionObserver): void;
616
685
  unbind(): void;
686
+ // @internal (undocumented)
687
+ views: SyntheticView[];
617
688
  }
618
689
 
619
690
  // @public
620
691
  export class RepeatDirective<TSource = any> implements HTMLDirective, ViewBehaviorFactory {
621
- constructor(itemsBinding: Binding, templateBinding: Binding<TSource, SyntheticViewTemplate>, options: RepeatOptions);
622
- createBehavior(targets: ViewBehaviorTargets): RepeatBehavior<TSource>;
692
+ constructor(dataBinding: Binding<TSource>, templateBinding: Binding<TSource, SyntheticViewTemplate>, options: RepeatOptions);
693
+ createBehavior(): RepeatBehavior<TSource>;
623
694
  createHTML(add: AddViewBehaviorFactory): string;
624
- id: string;
625
695
  // (undocumented)
626
- readonly itemsBinding: Binding;
627
- nodeId: string;
696
+ readonly dataBinding: Binding<TSource>;
628
697
  // (undocumented)
629
698
  readonly options: RepeatOptions;
699
+ targetNodeId: string;
630
700
  // (undocumented)
631
701
  readonly templateBinding: Binding<TSource, SyntheticViewTemplate>;
632
702
  }
@@ -638,7 +708,13 @@ export interface RepeatOptions {
638
708
  }
639
709
 
640
710
  // @public
641
- export function slotted<T = any>(propertyOrOptions: (keyof T & string) | SlottedDirectiveOptions<keyof T & string>): CaptureType<T>;
711
+ export interface ShadowRootOptions extends ShadowRootInit {
712
+ // @beta
713
+ registry?: CustomElementRegistry;
714
+ }
715
+
716
+ // @public
717
+ export function slotted<TSource = any, TParent = any>(propertyOrOptions: (keyof TSource & string) | SlottedDirectiveOptions<keyof TSource & string>): CaptureType<TSource, TParent>;
642
718
 
643
719
  // @public
644
720
  export class SlottedDirective extends NodeObservationDirective<SlottedDirectiveOptions> {
@@ -653,6 +729,15 @@ export class SlottedDirective extends NodeObservationDirective<SlottedDirectiveO
653
729
  export interface SlottedDirectiveOptions<T = any> extends NodeBehaviorOptions<T>, AssignedNodesOptions {
654
730
  }
655
731
 
732
+ // @public
733
+ export const SourceLifetime: Readonly<{
734
+ readonly unknown: undefined;
735
+ readonly coupled: 1;
736
+ }>;
737
+
738
+ // @public
739
+ export type SourceLifetime = typeof SourceLifetime[keyof typeof SourceLifetime];
740
+
656
741
  // @public
657
742
  export class Splice {
658
743
  constructor(index: number, removed: any[], addedCount: number);
@@ -696,16 +781,15 @@ export const SpliceStrategySupport: Readonly<{
696
781
  export type SpliceStrategySupport = typeof SpliceStrategySupport[keyof typeof SpliceStrategySupport];
697
782
 
698
783
  // @public
699
- export abstract class StatelessAttachedAttributeDirective<T> implements HTMLDirective, ViewBehaviorFactory, ViewBehavior {
700
- constructor(options: T);
701
- abstract bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
702
- createBehavior(targets: ViewBehaviorTargets): ViewBehavior;
784
+ export abstract class StatelessAttachedAttributeDirective<TOptions> implements HTMLDirective, ViewBehaviorFactory, ViewBehavior {
785
+ constructor(options: TOptions);
786
+ abstract bind(controller: ViewController): void;
787
+ createBehavior(): ViewBehavior;
703
788
  createHTML(add: AddViewBehaviorFactory): string;
704
- id: string;
705
- nodeId: string;
706
789
  // (undocumented)
707
- protected options: T;
708
- abstract unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
790
+ protected options: TOptions;
791
+ // @internal
792
+ toJSON: () => undefined;
709
793
  }
710
794
 
711
795
  // @public
@@ -715,7 +799,7 @@ export interface StyleStrategy {
715
799
  }
716
800
 
717
801
  // @public
718
- export interface StyleTarget {
802
+ export interface StyleTarget extends Pick<Node, "getRootNode"> {
719
803
  adoptedStyleSheets?: CSSStyleSheet[];
720
804
  append(styles: HTMLStyleElement): void;
721
805
  querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
@@ -754,15 +838,11 @@ export interface SyntheticView<TSource = any, TParent = any> extends View<TSourc
754
838
  // @public
755
839
  export interface SyntheticViewTemplate<TSource = any, TParent = any> {
756
840
  create(): SyntheticView<TSource, TParent>;
841
+ inline(): CaptureType<TSource, TParent>;
757
842
  }
758
843
 
759
844
  // @public
760
- export type TemplateValue<TSource, TParent = any> = Binding<TSource, any, TParent> | HTMLDirective | CaptureType<TSource>;
761
-
762
- // @public
763
- export type TrustedTypes = {
764
- createPolicy(name: string, rules: TrustedTypesPolicy): TrustedTypesPolicy;
765
- };
845
+ export type TemplateValue<TSource, TParent = any> = Expression<TSource, any, TParent> | Binding<TSource, any, TParent> | HTMLDirective | CaptureType<TSource, TParent>;
766
846
 
767
847
  // @public
768
848
  export type TrustedTypesPolicy = {
@@ -789,18 +869,6 @@ export interface TypeRegistry<TDefinition extends TypeDefinition> {
789
869
  register(definition: TDefinition): boolean;
790
870
  }
791
871
 
792
- // @public
793
- export class UpdateBinding implements ViewBehavior {
794
- constructor(directive: HTMLBindingDirective, updateTarget: UpdateTarget);
795
- bind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
796
- createBehavior(targets: ViewBehaviorTargets): ViewBehavior;
797
- // (undocumented)
798
- readonly directive: HTMLBindingDirective;
799
- unbind(source: any, context: ExecutionContext, targets: ViewBehaviorTargets): void;
800
- // (undocumented)
801
- protected updateTarget: UpdateTarget;
802
- }
803
-
804
872
  // @public
805
873
  export interface UpdateQueue {
806
874
  enqueue(callable: Callable): void;
@@ -812,14 +880,6 @@ export interface UpdateQueue {
812
880
  // @public
813
881
  export const Updates: UpdateQueue;
814
882
 
815
- // @public
816
- export type UpdateTarget = (this: UpdateTargetThis, target: Node, aspect: string, value: any, source: any, context: ExecutionContext) => void;
817
-
818
- // @public
819
- export interface UpdateTargetThis {
820
- directive: HTMLBindingDirective;
821
- }
822
-
823
883
  // @public
824
884
  export interface ValueConverter {
825
885
  fromView(value: any): any;
@@ -828,23 +888,24 @@ export interface ValueConverter {
828
888
 
829
889
  // @public
830
890
  export interface View<TSource = any, TParent = any> extends Disposable {
831
- bind(source: TSource, context: ExecutionContext<TParent>): void;
832
- readonly context: ExecutionContext<TParent> | null;
891
+ bind(source: TSource, context?: ExecutionContext<TParent>): void;
892
+ readonly context: ExecutionContext<TParent>;
833
893
  readonly source: TSource | null;
834
894
  unbind(): void;
835
895
  }
836
896
 
837
897
  // @public
838
898
  export interface ViewBehavior<TSource = any, TParent = any> {
839
- bind(source: TSource, context: ExecutionContext<TParent>, targets: ViewBehaviorTargets): void;
840
- unbind(source: TSource, context: ExecutionContext<TParent>, targets: ViewBehaviorTargets): void;
899
+ bind(controller: ViewController<TSource, TParent>): void;
841
900
  }
842
901
 
843
902
  // @public
844
903
  export interface ViewBehaviorFactory {
845
- createBehavior(targets: ViewBehaviorTargets): Behavior | ViewBehavior;
846
- id: string;
847
- nodeId: string;
904
+ createBehavior(): ViewBehavior;
905
+ id?: string;
906
+ policy?: DOMPolicy;
907
+ targetNodeId?: string;
908
+ targetTagName?: string | null;
848
909
  }
849
910
 
850
911
  // @public
@@ -852,20 +913,36 @@ export type ViewBehaviorTargets = {
852
913
  [id: string]: Node;
853
914
  };
854
915
 
916
+ // @public
917
+ export interface ViewController<TSource = any, TParent = any> extends ExpressionController<TSource, TParent> {
918
+ readonly targets: ViewBehaviorTargets;
919
+ }
920
+
855
921
  // @public
856
922
  export class ViewTemplate<TSource = any, TParent = any> implements ElementViewTemplate<TSource, TParent>, SyntheticViewTemplate<TSource, TParent> {
857
- constructor(html: string | HTMLTemplateElement, factories: Record<string, ViewBehaviorFactory>);
923
+ constructor(html: string | HTMLTemplateElement, factories?: Record<string, ViewBehaviorFactory>, policy?: DOMPolicy | undefined);
858
924
  create(hostBindingTarget?: Element): HTMLView<TSource, TParent>;
925
+ static create<TSource = any, TParent = any>(strings: string[], values: TemplateValue<TSource, TParent>[], policy?: DOMPolicy): ViewTemplate<TSource, TParent>;
859
926
  readonly factories: Record<string, ViewBehaviorFactory>;
860
927
  readonly html: string | HTMLTemplateElement;
861
- render(source: TSource, host: Node, hostBindingTarget?: Element, context?: ExecutionContext): HTMLView<TSource, TParent>;
928
+ inline(): CaptureType<TSource, TParent>;
929
+ render(source: TSource, host: Node, hostBindingTarget?: Element): HTMLView<TSource, TParent>;
930
+ // @internal
931
+ toJSON: () => undefined;
932
+ withPolicy(policy: DOMPolicy): this;
862
933
  }
863
934
 
864
935
  // @public
865
936
  export function volatile(target: {}, name: string | Accessor, descriptor: PropertyDescriptor): PropertyDescriptor;
866
937
 
867
938
  // @public
868
- export function when<TSource = any, TReturn = any>(binding: Binding<TSource, TReturn>, templateOrTemplateBinding: SyntheticViewTemplate | Binding<TSource, SyntheticViewTemplate>): CaptureType<TSource>;
939
+ export function when<TSource = any, TReturn = any, TParent = any>(condition: Expression<TSource, TReturn, TParent> | boolean, templateOrTemplateBinding: SyntheticViewTemplate<TSource, TParent> | Expression<TSource, SyntheticViewTemplate<TSource, TParent>, TParent>): CaptureType<TSource, TParent>;
940
+
941
+ // Warnings were encountered during analysis:
942
+ //
943
+ // dist/dts/components/fast-element.d.ts:60:5 - (ae-forgotten-export) The symbol "define" needs to be exported by the entry point index.d.ts
944
+ // dist/dts/components/fast-element.d.ts:61:5 - (ae-forgotten-export) The symbol "compose" needs to be exported by the entry point index.d.ts
945
+ // dist/dts/components/fast-element.d.ts:62:5 - (ae-forgotten-export) The symbol "from" needs to be exported by the entry point index.d.ts
869
946
 
870
947
  // (No @packageDocumentation comment for this package)
871
948