@lushly-dev/fast-element 3.0.1-preview.0 → 3.0.1-preview.2

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 (250) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/command/command.api.json +7857 -0
  3. package/dist/context/context.api.json +1084 -0
  4. package/dist/declarative/declarative.api.json +8130 -0
  5. package/dist/definition-schema/definition-schema.api.json +2689 -0
  6. package/dist/di/di.api.json +4945 -0
  7. package/dist/dts/arrays.d.ts +2 -0
  8. package/dist/dts/binding/binding.d.ts +59 -0
  9. package/dist/dts/binding/exports.d.ts +9 -0
  10. package/dist/dts/binding/normalize.d.ts +9 -0
  11. package/dist/dts/binding/one-time.d.ts +11 -0
  12. package/dist/dts/binding/one-way.d.ts +20 -0
  13. package/dist/dts/binding/signal.d.ts +36 -0
  14. package/dist/dts/binding/two-way.d.ts +44 -0
  15. package/dist/dts/command/behavior.d.ts +94 -0
  16. package/dist/dts/command/behaviors/confirm-behavior.d.ts +139 -0
  17. package/dist/dts/command/behaviors/undo-behavior.d.ts +178 -0
  18. package/dist/dts/command/command.d.ts +79 -0
  19. package/dist/dts/command/component-registry.d.ts +50 -0
  20. package/dist/dts/command/components/confirm-dialog.d.ts +117 -0
  21. package/dist/dts/command/index.d.ts +21 -0
  22. package/dist/dts/command/registry.d.ts +201 -0
  23. package/dist/dts/command/schema-validation.d.ts +45 -0
  24. package/dist/dts/command/types.d.ts +332 -0
  25. package/dist/dts/command/validation.d.ts +116 -0
  26. package/dist/dts/command/weak-ref.d.ts +11 -0
  27. package/dist/dts/components/attributes.d.ts +153 -0
  28. package/dist/dts/components/definition-schema-transforms.d.ts +9 -0
  29. package/dist/dts/components/element-controller.d.ts +349 -0
  30. package/dist/dts/components/element-hydration.d.ts +2 -0
  31. package/dist/dts/components/enable-hydration.d.ts +66 -0
  32. package/dist/dts/components/fast-definitions.d.ts +211 -0
  33. package/dist/dts/components/fast-element-registry.d.ts +23 -0
  34. package/dist/dts/components/fast-element.d.ts +91 -0
  35. package/dist/dts/components/hydration-tracker.d.ts +110 -0
  36. package/dist/dts/components/hydration.d.ts +52 -0
  37. package/dist/dts/components/schema.d.ts +205 -0
  38. package/dist/dts/context.d.ts +171 -0
  39. package/dist/dts/debug.d.ts +5 -0
  40. package/dist/dts/declarative/attribute-map.d.ts +58 -0
  41. package/dist/dts/declarative/debug.d.ts +4 -0
  42. package/dist/dts/declarative/index.d.ts +14 -0
  43. package/dist/dts/declarative/interfaces.d.ts +8 -0
  44. package/dist/dts/declarative/observer-map-utilities.d.ts +58 -0
  45. package/dist/dts/declarative/observer-map.d.ts +89 -0
  46. package/dist/dts/declarative/runtime.d.ts +5 -0
  47. package/dist/dts/declarative/syntax.d.ts +21 -0
  48. package/dist/dts/declarative/template-bridge.d.ts +33 -0
  49. package/dist/dts/declarative/template-parser.d.ts +98 -0
  50. package/dist/dts/declarative/template.d.ts +9 -0
  51. package/dist/dts/declarative/utilities.d.ts +358 -0
  52. package/dist/dts/definition-schema/api.d.ts +42 -0
  53. package/dist/dts/definition-schema/cem.d.ts +78 -0
  54. package/dist/dts/definition-schema/extension.d.ts +18 -0
  55. package/dist/dts/definition-schema/extract.d.ts +38 -0
  56. package/dist/dts/definition-schema/index.d.ts +9 -0
  57. package/dist/dts/definition-schema/storage.d.ts +35 -0
  58. package/dist/dts/definition-schema/types.d.ts +176 -0
  59. package/dist/dts/dev-mode.d.ts +13 -0
  60. package/dist/dts/di/di.d.ts +894 -0
  61. package/dist/dts/dom-policy.d.ts +101 -0
  62. package/dist/dts/dom.d.ts +88 -0
  63. package/dist/dts/hydration/diagnostics.d.ts +93 -0
  64. package/dist/dts/hydration/exports.d.ts +18 -0
  65. package/dist/dts/hydration/hydration-debugger.d.ts +35 -0
  66. package/dist/dts/hydration/messages.d.ts +62 -0
  67. package/dist/dts/hydration/runtime.d.ts +7 -0
  68. package/dist/dts/hydration/target-builder.d.ts +107 -0
  69. package/dist/dts/index.d.ts +51 -0
  70. package/dist/dts/index.debug.d.ts +1 -0
  71. package/dist/dts/index.rollup.d.ts +1 -0
  72. package/dist/dts/index.rollup.debug.d.ts +1 -0
  73. package/dist/dts/interfaces.d.ts +106 -0
  74. package/dist/dts/metadata.d.ts +26 -0
  75. package/dist/dts/observation/arrays.d.ts +248 -0
  76. package/dist/dts/observation/notifier.d.ts +127 -0
  77. package/dist/dts/observation/observable.d.ts +276 -0
  78. package/dist/dts/observation/update-queue.d.ts +40 -0
  79. package/dist/dts/observation/volatile.d.ts +9 -0
  80. package/dist/dts/platform.d.ts +87 -0
  81. package/dist/dts/registry.d.ts +2 -0
  82. package/dist/dts/render.d.ts +7 -0
  83. package/dist/dts/schema.d.ts +1 -0
  84. package/dist/dts/scoped/detection.d.ts +55 -0
  85. package/dist/dts/scoped/index.d.ts +68 -0
  86. package/dist/dts/scoped/mixin.d.ts +118 -0
  87. package/dist/dts/scoped/registry.d.ts +76 -0
  88. package/dist/dts/scoped/types.d.ts +48 -0
  89. package/dist/dts/state/exports.d.ts +3 -0
  90. package/dist/dts/state/reactive.d.ts +8 -0
  91. package/dist/dts/state/state.d.ts +141 -0
  92. package/dist/dts/state/visitor.d.ts +6 -0
  93. package/dist/dts/state/watch.d.ts +10 -0
  94. package/dist/dts/styles/css-directive.d.ts +50 -0
  95. package/dist/dts/styles/css.d.ts +34 -0
  96. package/dist/dts/styles/element-styles.d.ts +61 -0
  97. package/dist/dts/styles/host.d.ts +65 -0
  98. package/dist/dts/styles/style-strategy.d.ts +42 -0
  99. package/dist/dts/templating/children.d.ts +62 -0
  100. package/dist/dts/templating/compiler.d.ts +54 -0
  101. package/dist/dts/templating/html-binding-directive.d.ts +155 -0
  102. package/dist/dts/templating/html-directive.d.ts +218 -0
  103. package/dist/dts/templating/html.d.ts +1 -0
  104. package/dist/dts/templating/hydration-view.d.ts +130 -0
  105. package/dist/dts/templating/markup.d.ts +48 -0
  106. package/dist/dts/templating/node-observation.d.ts +99 -0
  107. package/dist/dts/templating/ref.d.ts +23 -0
  108. package/dist/dts/templating/render.d.ts +318 -0
  109. package/dist/dts/templating/repeat.d.ts +131 -0
  110. package/dist/dts/templating/slotted.d.ts +38 -0
  111. package/dist/dts/templating/template.d.ts +221 -0
  112. package/dist/dts/templating/view.d.ts +268 -0
  113. package/dist/dts/templating/when.d.ts +12 -0
  114. package/dist/dts/testing/exports.d.ts +3 -0
  115. package/dist/dts/testing/fakes.d.ts +16 -0
  116. package/dist/dts/testing/fixture.d.ts +84 -0
  117. package/dist/dts/testing/models.d.ts +20 -0
  118. package/dist/dts/testing/timeout.d.ts +7 -0
  119. package/dist/dts/trust/index.d.ts +8 -0
  120. package/dist/dts/trust/types.d.ts +48 -0
  121. package/dist/dts/trust/utils.d.ts +26 -0
  122. package/dist/dts/tsdoc-metadata.json +11 -0
  123. package/dist/dts/utilities.d.ts +76 -0
  124. package/dist/esm/arrays.js +1 -0
  125. package/dist/esm/binding/binding.js +18 -0
  126. package/dist/esm/binding/exports.js +6 -0
  127. package/dist/esm/binding/normalize.js +17 -0
  128. package/dist/esm/binding/one-time.js +21 -0
  129. package/dist/esm/binding/one-way.js +30 -0
  130. package/dist/esm/binding/signal.js +99 -0
  131. package/dist/esm/binding/two-way.js +109 -0
  132. package/dist/esm/command/behavior.js +155 -0
  133. package/dist/esm/command/behaviors/confirm-behavior.js +225 -0
  134. package/dist/esm/command/behaviors/undo-behavior.js +313 -0
  135. package/dist/esm/command/command.js +104 -0
  136. package/dist/esm/command/component-registry.js +107 -0
  137. package/dist/esm/command/components/confirm-dialog.js +370 -0
  138. package/dist/esm/command/index.js +22 -0
  139. package/dist/esm/command/registry.js +755 -0
  140. package/dist/esm/command/schema-validation.js +194 -0
  141. package/dist/esm/command/types.js +86 -0
  142. package/dist/esm/command/validation.js +508 -0
  143. package/dist/esm/command/weak-ref.js +5 -0
  144. package/dist/esm/components/attributes.js +219 -0
  145. package/dist/esm/components/definition-schema-transforms.js +23 -0
  146. package/dist/esm/components/element-controller.js +840 -0
  147. package/dist/esm/components/element-hydration.js +2 -0
  148. package/dist/esm/components/enable-hydration.js +123 -0
  149. package/dist/esm/components/fast-definitions.js +294 -0
  150. package/dist/esm/components/fast-element-registry.js +67 -0
  151. package/dist/esm/components/fast-element.js +82 -0
  152. package/dist/esm/components/hydration-tracker.js +211 -0
  153. package/dist/esm/components/hydration.js +187 -0
  154. package/dist/esm/components/schema.js +253 -0
  155. package/dist/esm/context.js +185 -0
  156. package/dist/esm/debug.js +71 -0
  157. package/dist/esm/declarative/attribute-map.js +122 -0
  158. package/dist/esm/declarative/debug.js +4 -0
  159. package/dist/esm/declarative/index.js +10 -0
  160. package/dist/esm/declarative/interfaces.js +9 -0
  161. package/dist/esm/declarative/observer-map-utilities.js +565 -0
  162. package/dist/esm/declarative/observer-map.js +216 -0
  163. package/dist/esm/declarative/runtime.js +14 -0
  164. package/dist/esm/declarative/syntax.js +36 -0
  165. package/dist/esm/declarative/template-bridge.js +160 -0
  166. package/dist/esm/declarative/template-parser.js +306 -0
  167. package/dist/esm/declarative/template.js +116 -0
  168. package/dist/esm/declarative/utilities.js +1069 -0
  169. package/dist/esm/definition-schema/api.js +129 -0
  170. package/dist/esm/definition-schema/cem.js +89 -0
  171. package/dist/esm/definition-schema/extension.js +53 -0
  172. package/dist/esm/definition-schema/extract.js +167 -0
  173. package/dist/esm/definition-schema/index.js +8 -0
  174. package/dist/esm/definition-schema/storage.js +58 -0
  175. package/dist/esm/definition-schema/types.js +8 -0
  176. package/dist/esm/dev-mode.js +22 -0
  177. package/dist/esm/di/di.js +1441 -0
  178. package/dist/esm/dom-policy.js +374 -0
  179. package/dist/esm/dom.js +101 -0
  180. package/dist/esm/hydration/diagnostics.js +50 -0
  181. package/dist/esm/hydration/exports.js +6 -0
  182. package/dist/esm/hydration/hydration-debugger.js +112 -0
  183. package/dist/esm/hydration/messages.js +84 -0
  184. package/dist/esm/hydration/runtime.js +33 -0
  185. package/dist/esm/hydration/target-builder.js +264 -0
  186. package/dist/esm/index.debug.js +3 -0
  187. package/dist/esm/index.js +49 -0
  188. package/dist/esm/index.rollup.debug.js +6 -0
  189. package/dist/esm/index.rollup.js +4 -0
  190. package/dist/esm/interfaces.js +55 -0
  191. package/dist/esm/metadata.js +57 -0
  192. package/dist/esm/observation/arrays.js +661 -0
  193. package/dist/esm/observation/notifier.js +162 -0
  194. package/dist/esm/observation/observable.js +324 -0
  195. package/dist/esm/observation/update-queue.js +56 -0
  196. package/dist/esm/observation/volatile.js +16 -0
  197. package/dist/esm/platform.js +98 -0
  198. package/dist/esm/registry.js +2 -0
  199. package/dist/esm/render.js +1 -0
  200. package/dist/esm/schema.js +1 -0
  201. package/dist/esm/scoped/detection.js +102 -0
  202. package/dist/esm/scoped/index.js +69 -0
  203. package/dist/esm/scoped/mixin.js +127 -0
  204. package/dist/esm/scoped/registry.js +125 -0
  205. package/dist/esm/scoped/types.js +4 -0
  206. package/dist/esm/state/exports.js +3 -0
  207. package/dist/esm/state/reactive.js +34 -0
  208. package/dist/esm/state/state.js +148 -0
  209. package/dist/esm/state/visitor.js +28 -0
  210. package/dist/esm/state/watch.js +36 -0
  211. package/dist/esm/styles/css-directive.js +36 -0
  212. package/dist/esm/styles/css.js +56 -0
  213. package/dist/esm/styles/element-styles.js +144 -0
  214. package/dist/esm/styles/host.js +1 -0
  215. package/dist/esm/styles/style-strategy.js +1 -0
  216. package/dist/esm/templating/children.js +67 -0
  217. package/dist/esm/templating/compiler.js +359 -0
  218. package/dist/esm/templating/html-binding-directive.js +288 -0
  219. package/dist/esm/templating/html-directive.js +113 -0
  220. package/dist/esm/templating/html.js +1 -0
  221. package/dist/esm/templating/hydration-view.js +228 -0
  222. package/dist/esm/templating/markup.js +83 -0
  223. package/dist/esm/templating/node-observation.js +84 -0
  224. package/dist/esm/templating/ref.js +21 -0
  225. package/dist/esm/templating/render.js +468 -0
  226. package/dist/esm/templating/repeat.js +434 -0
  227. package/dist/esm/templating/slotted.js +49 -0
  228. package/dist/esm/templating/template.js +206 -0
  229. package/dist/esm/templating/view.js +298 -0
  230. package/dist/esm/templating/when.js +22 -0
  231. package/dist/esm/testing/exports.js +3 -0
  232. package/dist/esm/testing/fakes.js +107 -0
  233. package/dist/esm/testing/fixture.js +86 -0
  234. package/dist/esm/testing/models.js +58 -0
  235. package/dist/esm/testing/timeout.js +24 -0
  236. package/dist/esm/trust/index.js +7 -0
  237. package/dist/esm/trust/types.js +6 -0
  238. package/dist/esm/trust/utils.js +126 -0
  239. package/dist/esm/utilities.js +140 -0
  240. package/dist/fast-element.api.json +26798 -0
  241. package/dist/fast-element.d.ts +3985 -0
  242. package/dist/fast-element.debug.js +7604 -0
  243. package/dist/fast-element.debug.min.js +3 -0
  244. package/dist/fast-element.js +7603 -0
  245. package/dist/fast-element.min.js +3 -0
  246. package/dist/fast-element.untrimmed.d.ts +4103 -0
  247. package/dist/observation/arrays/arrays.api.json +2621 -0
  248. package/dist/scoped/scoped.api.json +891 -0
  249. package/dist/trust/trust.api.json +629 -0
  250. package/package.json +21 -23
@@ -0,0 +1,4103 @@
1
+ /**
2
+ * Core APIs for building standards-based Web Components with FAST Element.
3
+ * @packageDocumentation
4
+ */
5
+
6
+ /**
7
+ * A path discovered from an access expression.
8
+ * @public
9
+ */
10
+ export declare interface AccessCachedPath extends CachedPathCommon {
11
+ type: "access";
12
+ }
13
+
14
+ /**
15
+ * Represents a getter/setter property accessor on an object.
16
+ * @public
17
+ */
18
+ export declare interface Accessor {
19
+ /**
20
+ * The name of the property.
21
+ */
22
+ name: string;
23
+ /**
24
+ * Gets the value of the property on the source object.
25
+ * @param source - The source object to access.
26
+ */
27
+ getValue(source: any): any;
28
+ /**
29
+ * Sets the value of the property on the source object.
30
+ * @param source - The source object to access.
31
+ * @param value - The value to set the property to.
32
+ */
33
+ setValue(source: any, value: any): void;
34
+ }
35
+
36
+ /**
37
+ * Used to add behavior factories when constructing templates.
38
+ * @public
39
+ */
40
+ export declare type AddViewBehaviorFactory = (factory: ViewBehaviorFactory) => string;
41
+
42
+ /**
43
+ * An observer for arrays.
44
+ * @public
45
+ */
46
+ export declare interface ArrayObserver extends SubscriberSet {
47
+ /**
48
+ * The strategy to use for tracking changes.
49
+ */
50
+ strategy: SpliceStrategy | null;
51
+ /**
52
+ * The length observer for the array.
53
+ */
54
+ readonly lengthObserver: LengthObserver;
55
+ /**
56
+ * The sort observer for the array.
57
+ */
58
+ readonly sortObserver: SortObserver;
59
+ /**
60
+ * Adds a splice to the list of changes.
61
+ * @param splice - The splice to add.
62
+ */
63
+ addSplice(splice: Splice): void;
64
+ /**
65
+ * Adds a sort to the list of changes.
66
+ * @param sort - The sort to add.
67
+ */
68
+ addSort(sort: Sort): void;
69
+ /**
70
+ * Indicates that a reset change has occurred.
71
+ * @param oldCollection - The collection as it was before the reset.
72
+ */
73
+ reset(oldCollection: any[] | undefined): void;
74
+ /**
75
+ * Flushes the changes to subscribers.
76
+ */
77
+ flush(): void;
78
+ }
79
+
80
+ /**
81
+ * An observer for arrays.
82
+ * @public
83
+ */
84
+ export declare const ArrayObserver: Readonly<{
85
+ readonly sorted: 0;
86
+ /**
87
+ * Enables the array observation mechanism.
88
+ * @remarks
89
+ * Array observation is enabled automatically when using the
90
+ * `RepeatDirective`, so calling this API manually is
91
+ * not typically necessary.
92
+ */
93
+ readonly enable: () => void;
94
+ }>;
95
+
96
+ /**
97
+ * Represents something that applies to a specific aspect of the DOM.
98
+ * @public
99
+ */
100
+ export declare interface Aspected {
101
+ /**
102
+ * The original source aspect exactly as represented in markup.
103
+ */
104
+ sourceAspect: string;
105
+ /**
106
+ * The evaluated target aspect, determined after processing the source.
107
+ */
108
+ targetAspect: string;
109
+ /**
110
+ * The type of aspect to target.
111
+ */
112
+ aspectType: DOMAspect;
113
+ /**
114
+ * A binding if one is associated with the aspect.
115
+ */
116
+ dataBinding?: Binding;
117
+ }
118
+
119
+ /**
120
+ * Decorator: Specifies an HTML attribute.
121
+ * @param config - The configuration for the attribute.
122
+ * @public
123
+ */
124
+ export declare function attr(config?: DecoratorAttributeConfiguration): (target: {}, property: string) => void;
125
+
126
+ /**
127
+ * Decorator: Specifies an HTML attribute.
128
+ * @param target - The class to define the attribute on.
129
+ * @param prop - The property name to be associated with the attribute.
130
+ * @public
131
+ */
132
+ export declare function attr(target: {}, prop: string): void;
133
+
134
+ /**
135
+ * Metadata used to configure a custom attribute's behavior.
136
+ * @public
137
+ */
138
+ export declare type AttributeConfiguration = {
139
+ property: string;
140
+ attribute?: string;
141
+ mode?: AttributeMode;
142
+ converter?: ValueConverter;
143
+ };
144
+
145
+ /**
146
+ * Metadata used to configure a custom attribute's behavior.
147
+ * @public
148
+ */
149
+ export declare const AttributeConfiguration: Readonly<{
150
+ /**
151
+ * Locates all attribute configurations associated with a type.
152
+ */
153
+ locate: (target: {}) => AttributeConfiguration[];
154
+ }>;
155
+
156
+ /**
157
+ * An implementation of {@link Accessor} that supports reactivity,
158
+ * change callbacks, attribute reflection, and type conversion for
159
+ * custom elements.
160
+ * @public
161
+ */
162
+ export declare class AttributeDefinition implements Accessor {
163
+ private readonly fieldName;
164
+ private readonly callbackName;
165
+ private readonly hasCallback;
166
+ private readonly guards;
167
+ /**
168
+ * The class constructor that owns this attribute.
169
+ */
170
+ readonly Owner: Function;
171
+ /**
172
+ * The name of the property associated with the attribute.
173
+ */
174
+ readonly name: string;
175
+ /**
176
+ * The name of the attribute in HTML.
177
+ */
178
+ readonly attribute: string;
179
+ /**
180
+ * The {@link AttributeMode} that describes the behavior of this attribute.
181
+ */
182
+ readonly mode: AttributeMode;
183
+ /**
184
+ * A {@link ValueConverter} that integrates with the property getter/setter
185
+ * to convert values to and from a DOM string.
186
+ */
187
+ readonly converter?: ValueConverter;
188
+ /**
189
+ * Creates an instance of AttributeDefinition.
190
+ * @param Owner - The class constructor that owns this attribute.
191
+ * @param name - The name of the property associated with the attribute.
192
+ * @param attribute - The name of the attribute in HTML.
193
+ * @param mode - The {@link AttributeMode} that describes the behavior of this attribute.
194
+ * @param converter - A {@link ValueConverter} that integrates with the property getter/setter
195
+ * to convert values to and from a DOM string.
196
+ */
197
+ constructor(Owner: Function, name: string, attribute?: string, mode?: AttributeMode, converter?: ValueConverter);
198
+ /**
199
+ * Sets the value of the attribute/property on the source element.
200
+ * @param source - The source element to access.
201
+ * @param newValue - The value to set the attribute/property to.
202
+ */
203
+ setValue(source: HTMLElement, newValue: any): void;
204
+ /**
205
+ * Gets the value of the attribute/property on the source element.
206
+ * @param source - The source element to access.
207
+ */
208
+ getValue(source: HTMLElement): any;
209
+ /** @internal */
210
+ onAttributeChangedCallback(element: HTMLElement, value: any): void;
211
+ private tryReflectToAttribute;
212
+ /**
213
+ * Collects all attribute definitions associated with the owner.
214
+ * @param Owner - The class constructor to collect attribute for.
215
+ * @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.
216
+ * @internal
217
+ */
218
+ static collect(Owner: Function, ...attributeLists: (ReadonlyArray<string | AttributeConfiguration> | undefined)[]): ReadonlyArray<AttributeDefinition>;
219
+ }
220
+
221
+ /**
222
+ * The mode that specifies the runtime behavior of the attribute.
223
+ * @remarks
224
+ * By default, attributes run in `reflect` mode, propagating their property
225
+ * values to the DOM and DOM values to the property. The `boolean` mode also
226
+ * reflects values, but uses the HTML standard boolean attribute behavior,
227
+ * interpreting the presence of the attribute as `true` and the absence as
228
+ * `false`. The `fromView` behavior only updates the property value based on
229
+ * changes in the DOM, but does not reflect property changes back.
230
+ * @public
231
+ */
232
+ export declare type AttributeMode = "reflect" | "boolean" | "fromView";
233
+
234
+ /**
235
+ * Captures a binding expression along with related information and capabilities.
236
+ *
237
+ * @public
238
+ */
239
+ export declare abstract class Binding<TSource = any, TReturn = any, TParent = any> {
240
+ /**
241
+ * Options associated with the binding.
242
+ */
243
+ options?: any;
244
+ /**
245
+ * Evaluates the binding.
246
+ */
247
+ evaluate: Expression<TSource, TReturn, TParent>;
248
+ /**
249
+ * The security policy to associate with this binding.
250
+ */
251
+ policy?: DOMPolicy;
252
+ /**
253
+ * Indicates whether the binding is volatile.
254
+ */
255
+ isVolatile: boolean;
256
+ /**
257
+ * Creates a binding.
258
+ * @param evaluate - Evaluates the binding.
259
+ * @param policy - The security policy to associate with this binding.
260
+ * @param isVolatile - Indicates whether the binding is volatile.
261
+ */
262
+ constructor(evaluate: Expression<TSource, TReturn, TParent>, policy?: DOMPolicy, isVolatile?: boolean);
263
+ /**
264
+ * Creates an observer capable of notifying a subscriber when the output of a binding changes.
265
+ * @param subscriber - The subscriber to changes in the binding.
266
+ * @param directive - The Binding directive to create the observer for.
267
+ */
268
+ abstract createObserver(subscriber: Subscriber, directive: BindingDirective): ExpressionObserver<TSource, TReturn, TParent>;
269
+ }
270
+
271
+ /**
272
+ * The directive from which a binding originates.
273
+ *
274
+ * @public
275
+ */
276
+ export declare interface BindingDirective {
277
+ /**
278
+ * The binding.
279
+ */
280
+ readonly dataBinding: Binding;
281
+ /**
282
+ * The evaluated target aspect.
283
+ */
284
+ readonly targetAspect?: string;
285
+ /**
286
+ * The type of aspect to target.
287
+ */
288
+ readonly aspectType?: DOMAspect;
289
+ }
290
+
291
+ /**
292
+ * A {@link ValueConverter} that converts to and from `boolean` values.
293
+ * @remarks
294
+ * Used automatically when the `boolean` {@link AttributeMode} is selected.
295
+ * @public
296
+ */
297
+ export declare const booleanConverter: ValueConverter;
298
+
299
+ /**
300
+ * A path discovered while parsing a template.
301
+ * @public
302
+ */
303
+ export declare type CachedPath = DefaultCachedPath | RepeatCachedPath | AccessCachedPath | EventCachedPath;
304
+
305
+ /**
306
+ * Common metadata for paths cached while parsing a template.
307
+ * @public
308
+ */
309
+ export declare interface CachedPathCommon {
310
+ parentContext: string | null;
311
+ currentContext: string | null;
312
+ path: string;
313
+ }
314
+
315
+ /**
316
+ * A map from element names and root properties to JSON schemas.
317
+ * @public
318
+ */
319
+ export declare type CachedPathMap = Map<string, Map<string, JSONSchema>>;
320
+
321
+ /**
322
+ * Represents a callable type such as a function or an object with a "call" method.
323
+ * @public
324
+ */
325
+ export declare type Callable = typeof Function.prototype.call | {
326
+ call(): void;
327
+ };
328
+
329
+ /**
330
+ * A marker interface used to capture types when interpolating Directive helpers
331
+ * into templates.
332
+ * @public
333
+ */
334
+ export declare interface CaptureType<TSource = any, TParent = any> {
335
+ }
336
+
337
+ /**
338
+ * The options used to configure child list observation.
339
+ * @public
340
+ */
341
+ export declare interface ChildListDirectiveOptions<T = any> extends NodeBehaviorOptions<T>, Omit<MutationObserverInit, "subtree" | "childList"> {
342
+ }
343
+
344
+ /**
345
+ * A directive that observes the `childNodes` of an element and updates a property
346
+ * whenever they change.
347
+ * @param propertyOrOptions - The options used to configure child node observation.
348
+ * @public
349
+ */
350
+ export declare function children<TSource = any, TParent = any>(propertyOrOptions: (keyof TSource & string) | ChildrenDirectiveOptions<keyof TSource & string>): CaptureType<TSource, TParent>;
351
+
352
+ /**
353
+ * The runtime behavior for child node observation.
354
+ * @public
355
+ */
356
+ export declare class ChildrenDirective extends NodeObservationDirective<ChildrenDirectiveOptions> {
357
+ private observerProperty;
358
+ /**
359
+ * Creates an instance of ChildrenDirective.
360
+ * @param options - The options to use in configuring the child observation behavior.
361
+ */
362
+ constructor(options: ChildrenDirectiveOptions);
363
+ /**
364
+ * Begins observation of the nodes.
365
+ * @param target - The target to observe.
366
+ */
367
+ observe(target: any): void;
368
+ /**
369
+ * Disconnects observation of the nodes.
370
+ * @param target - The target to unobserve.
371
+ */
372
+ disconnect(target: any): void;
373
+ /**
374
+ * Retrieves the raw nodes that should be assigned to the source property.
375
+ * @param target - The target to get the node to.
376
+ */
377
+ getNodes(target: Element): Node[];
378
+ }
379
+
380
+ /**
381
+ * The options used to configure child/subtree node observation.
382
+ * @public
383
+ */
384
+ export declare type ChildrenDirectiveOptions<T = any> = ChildListDirectiveOptions<T> | SubtreeDirectiveOptions<T>;
385
+
386
+ /**
387
+ * Describes a child custom element binding referenced by a schema path.
388
+ * @public
389
+ */
390
+ export declare interface ChildrenMap {
391
+ customElementName: string;
392
+ attributeName: string;
393
+ }
394
+
395
+ /**
396
+ * Represents a constructable class with a prototype.
397
+ * @public
398
+ */
399
+ export declare type Class<T, C = {}> = C & Constructable<T> & {
400
+ /**
401
+ * The class's prototype;
402
+ */
403
+ readonly prototype: T;
404
+ };
405
+
406
+ /**
407
+ * A function capable of compiling a template from the preprocessed form produced
408
+ * by the html template function into a result that can instantiate views.
409
+ * @public
410
+ */
411
+ export declare type CompilationStrategy = (
412
+ /**
413
+ * The preprocessed HTML string or template to compile.
414
+ */
415
+ html: string | HTMLTemplateElement,
416
+ /**
417
+ * The behavior factories used within the html that is being compiled.
418
+ */
419
+ factories: Record<string, ViewBehaviorFactory>,
420
+ /**
421
+ * The security policy to compile the html with.
422
+ */
423
+ policy: DOMPolicy) => HTMLTemplateCompilationResult;
424
+
425
+ /**
426
+ * Represents a ViewBehaviorFactory after the compilation process has completed.
427
+ * @public
428
+ */
429
+ export declare type CompiledViewBehaviorFactory = Required<ViewBehaviorFactory>;
430
+
431
+ /**
432
+ * Common APIs related to compilation.
433
+ * @public
434
+ */
435
+ export declare const Compiler: {
436
+ /**
437
+ * Compiles a template and associated directives into a compilation
438
+ * result which can be used to create views.
439
+ * @param html - The html string or template element to compile.
440
+ * @param factories - The behavior factories referenced by the template.
441
+ * @param policy - The security policy to compile the html with.
442
+ * @remarks
443
+ * The template that is provided for compilation is altered in-place
444
+ * and cannot be compiled again. If the original template must be preserved,
445
+ * it is recommended that you clone the original and pass the clone to this API.
446
+ * @public
447
+ */
448
+ compile<TSource = any, TParent = any>(html: string | HTMLTemplateElement, factories: Record<string, ViewBehaviorFactory>, policy?: DOMPolicy): HTMLTemplateCompilationResult<TSource, TParent>;
449
+ /**
450
+ * Sets the default compilation strategy that will be used by the ViewTemplate whenever
451
+ * it needs to compile a view preprocessed with the html template function.
452
+ * @param strategy - The compilation strategy to use when compiling templates.
453
+ */
454
+ setDefaultStrategy(strategy: CompilationStrategy): void;
455
+ /**
456
+ * Aggregates an array of strings and directives into a single directive.
457
+ * @param parts - A heterogeneous array of static strings interspersed with
458
+ * directives.
459
+ * @param policy - The security policy to use with the aggregated bindings.
460
+ * @returns A single inline directive that aggregates the behavior of all the parts.
461
+ */
462
+ aggregate(parts: (string | ViewBehaviorFactory)[], policy?: DOMPolicy): ViewBehaviorFactory;
463
+ };
464
+
465
+ /**
466
+ * Represents styles that can be composed into the ShadowDOM of a custom element.
467
+ * @public
468
+ */
469
+ export declare type ComposableStyles = string | ElementStyles | CSSStyleSheet;
470
+
471
+ /**
472
+ * Determines if the reference element contains the test element in a "composed" DOM tree that
473
+ * ignores shadow DOM boundaries.
474
+ *
475
+ * Returns true of the test element is a descendent of the reference, or exists in
476
+ * a shadow DOM that is a logical descendent of the reference. Otherwise returns false.
477
+ * @param reference - The element to test for containment against.
478
+ * @param test - The element being tested for containment.
479
+ *
480
+ * @public
481
+ */
482
+ export declare function composedContains(reference: HTMLElement, test: HTMLElement): boolean;
483
+
484
+ /**
485
+ * Retrieves the "composed parent" element of a node, ignoring DOM tree boundaries.
486
+ * When the parent of a node is a shadow-root, it will return the host
487
+ * element of the shadow root. Otherwise it will return the parent node or null if
488
+ * no parent node exists.
489
+ * @param element - The element for which to retrieve the composed parent
490
+ *
491
+ * @public
492
+ */
493
+ export declare function composedParent<T extends HTMLElement>(element: T): HTMLElement | null;
494
+
495
+ /**
496
+ * Provides computed state capabilities.
497
+ * @beta
498
+ */
499
+ export declare type ComputedBuilder = {
500
+ /**
501
+ * Callbacks related to computed state.
502
+ */
503
+ on: {
504
+ /**
505
+ * Provides a setup callback for the computation.
506
+ * @param callback - The callback to run to setup the computation.
507
+ */
508
+ setup(callback: ComputedSetupCallback): void;
509
+ };
510
+ };
511
+
512
+ /**
513
+ * A callback that initializes the computation.
514
+ * @beta
515
+ */
516
+ export declare type ComputedInitializer<T> = (builder: ComputedBuilder) => () => T;
517
+
518
+ /**
519
+ * A callback that enables computation setup.
520
+ * @beta
521
+ */
522
+ export declare type ComputedSetupCallback = () => (() => void) | void;
523
+
524
+ /**
525
+ * State whose value is computed from other dependencies.
526
+ * @beta
527
+ */
528
+ export declare type ComputedState<T> = ReadonlyState<T> & Disposable & {
529
+ /**
530
+ * Subscribes to notification of changes in the state.
531
+ * @param subscriber - The object that is subscribing for change notification.
532
+ */
533
+ subscribe(subscriber: Subscriber): void;
534
+ /**
535
+ * Unsubscribes from notification of changes in the state.
536
+ * @param subscriber - The object that is unsubscribing from change notification.
537
+ */
538
+ unsubscribe(subscriber: Subscriber): void;
539
+ };
540
+
541
+ /**
542
+ * Creates a ComputedState.
543
+ * @param initialize - The initialization callback.
544
+ * @param name - A friendly name for this computation.
545
+ * @returns A ComputedState
546
+ * @beta
547
+ */
548
+ export declare function computedState<T>(initialize: ComputedInitializer<T>, name?: string): ComputedState<T>;
549
+
550
+ /**
551
+ * Represents a type which can be constructed with the new operator.
552
+ *
553
+ * @public
554
+ */
555
+ export declare type Constructable<T = {}> = {
556
+ new (...args: any[]): T;
557
+ };
558
+
559
+ /**
560
+ * A type that instantiates a StyleStrategy.
561
+ * @public
562
+ */
563
+ export declare type ConstructibleStyleStrategy = {
564
+ /**
565
+ * Creates an instance of the strategy.
566
+ * @param styles - The styles to initialize the strategy with.
567
+ */
568
+ new (styles: (string | CSSStyleSheet)[]): StyleStrategy;
569
+ };
570
+
571
+ /**
572
+ * A simple template that can create ContentView instances.
573
+ * @public
574
+ */
575
+ export declare interface ContentTemplate {
576
+ /**
577
+ * Creates a simple content view instance.
578
+ */
579
+ create(): ContentView;
580
+ }
581
+
582
+ /**
583
+ * A simple View that can be interpolated into HTML content.
584
+ * @public
585
+ */
586
+ export declare interface ContentView {
587
+ readonly context: ExecutionContext;
588
+ /**
589
+ * Binds a view's behaviors to its binding source.
590
+ * @param source - The binding source for the view's binding behaviors.
591
+ * @param context - The execution context to run the view within.
592
+ */
593
+ bind(source: any, context?: ExecutionContext): void;
594
+ /**
595
+ * Unbinds a view's behaviors from its binding source and context.
596
+ */
597
+ unbind(): void;
598
+ /**
599
+ * Inserts the view's DOM nodes before the referenced node.
600
+ * @param node - The node to insert the view's DOM before.
601
+ */
602
+ insertBefore(node: Node): void;
603
+ /**
604
+ * Removes the view's DOM nodes.
605
+ * The nodes are not disposed and the view can later be re-inserted.
606
+ */
607
+ remove(): void;
608
+ }
609
+
610
+ /**
611
+ * Transforms a template literal string into styles.
612
+ * @param strings - The string fragments that are interpolated with the values.
613
+ * @param values - The values that are interpolated with the string fragments.
614
+ * @remarks
615
+ * The css helper supports interpolation of static composable styles and CSS directives.
616
+ * @public
617
+ */
618
+ export declare const css: CSSTemplateTag;
619
+
620
+ /**
621
+ * Directive for use in CSS templates.
622
+ *
623
+ * @public
624
+ */
625
+ export declare interface CSSDirective {
626
+ /**
627
+ * Creates static styles to interpolate into the CSS document.
628
+ * @returns - the styles to interpolate into CSS
629
+ */
630
+ createCSS(): ComposableStyles;
631
+ }
632
+
633
+ /**
634
+ * Instructs the css engine to provide styles during CSS template composition.
635
+ * @public
636
+ */
637
+ export declare const CSSDirective: Readonly<{
638
+ /**
639
+ * Gets the directive definition associated with the instance.
640
+ * @param instance - The directive instance to retrieve the definition for.
641
+ */
642
+ getForInstance: (object: any) => CSSDirectiveDefinition<Constructable<CSSDirective>> | undefined;
643
+ /**
644
+ * Gets the directive definition associated with the specified type.
645
+ * @param type - The directive type to retrieve the definition for.
646
+ */
647
+ getByType: (key: Function) => CSSDirectiveDefinition<Constructable<CSSDirective>> | undefined;
648
+ /**
649
+ * Defines a CSSDirective.
650
+ * @param type - The type to define as a directive.
651
+ */
652
+ define<TType extends Constructable<CSSDirective>>(type: any): TType;
653
+ }>;
654
+
655
+ /**
656
+ * Decorator: Defines a CSSDirective.
657
+ * @public
658
+ */
659
+ export declare function cssDirective(): (type: Constructable<CSSDirective>) => void;
660
+
661
+ /**
662
+ * Defines metadata for a CSSDirective.
663
+ * @public
664
+ */
665
+ export declare interface CSSDirectiveDefinition<TType extends Constructable<CSSDirective> = Constructable<CSSDirective>> {
666
+ /**
667
+ * The type that the definition provides metadata for.
668
+ */
669
+ readonly type: TType;
670
+ }
671
+
672
+ /**
673
+ * Transforms a template literal string into styles.
674
+ * @param strings - The string fragments that are interpolated with the values.
675
+ * @param values - The values that are interpolated with the string fragments.
676
+ * @remarks
677
+ * The css helper supports interpolation of static composable styles and CSS directives.
678
+ * Use the .partial method to create partial CSS fragments.
679
+ * @public
680
+ */
681
+ export declare type CSSTemplateTag = ((strings: TemplateStringsArray, ...values: CSSValue[]) => ElementStyles) & {
682
+ /**
683
+ * Transforms a template literal string into partial CSS.
684
+ * @param strings - The string fragments that are interpolated with the values.
685
+ * @param values - The values that are interpolated with the string fragments.
686
+ * @public
687
+ */
688
+ partial(strings: TemplateStringsArray, ...values: CSSValue[]): CSSDirective;
689
+ };
690
+
691
+ /**
692
+ * Represents the types of values that can be interpolated into a template.
693
+ * @public
694
+ */
695
+ export declare type CSSValue = ComposableStyles | CSSDirective;
696
+
697
+ /**
698
+ * Decorator: Defines a platform custom element based on `FASTElement`.
699
+ * @param nameOrDef - The name of the element to define or a definition object
700
+ * that describes the element to define.
701
+ * @public
702
+ */
703
+ export declare function customElement(nameOrDef: string | PartialFASTElementDefinition): (type: Constructable<HTMLElement>) => void;
704
+
705
+ /**
706
+ * Metadata used to configure a custom attribute's behavior through a decorator.
707
+ * @public
708
+ */
709
+ export declare type DecoratorAttributeConfiguration = Omit<AttributeConfiguration, "property">;
710
+
711
+ /**
712
+ * A path discovered from a default binding.
713
+ * @public
714
+ */
715
+ export declare interface DefaultCachedPath extends CachedPathCommon {
716
+ type: "default";
717
+ }
718
+
719
+ /**
720
+ * The default execution context for template views.
721
+ * @public
722
+ */
723
+ export declare class DefaultExecutionContext<TParent> implements ExecutionContext<TParent> {
724
+ /**
725
+ * The index of the current item within a repeat context.
726
+ */
727
+ index: number;
728
+ /**
729
+ * The length of the current collection within a repeat context.
730
+ */
731
+ length: number;
732
+ /**
733
+ * The parent data source within a nested context.
734
+ */
735
+ readonly parent: TParent;
736
+ /**
737
+ * The parent execution context when in nested context scenarios.
738
+ */
739
+ readonly parentContext: ExecutionContext<TParent>;
740
+ /**
741
+ * The current event within an event handler.
742
+ */
743
+ get event(): Event;
744
+ /**
745
+ * Indicates whether the current item within a repeat context
746
+ * has an even index.
747
+ */
748
+ get isEven(): boolean;
749
+ /**
750
+ * Indicates whether the current item within a repeat context
751
+ * has an odd index.
752
+ */
753
+ get isOdd(): boolean;
754
+ /**
755
+ * Indicates whether the current item within a repeat context
756
+ * is the first item in the collection.
757
+ */
758
+ get isFirst(): boolean;
759
+ /**
760
+ * Indicates whether the current item within a repeat context
761
+ * is somewhere in the middle of the collection.
762
+ */
763
+ get isInMiddle(): boolean;
764
+ /**
765
+ * Indicates whether the current item within a repeat context
766
+ * is the last item in the collection.
767
+ */
768
+ get isLast(): boolean;
769
+ /**
770
+ * Returns the typed event detail of a custom event.
771
+ */
772
+ eventDetail<TDetail>(): TDetail;
773
+ /**
774
+ * Returns the typed event target of the event.
775
+ */
776
+ eventTarget<TTarget extends EventTarget>(): TTarget;
777
+ }
778
+
779
+ /**
780
+ * Provides a mechanism for releasing resources.
781
+ * @public
782
+ */
783
+ export declare interface Disposable {
784
+ /**
785
+ * Disposes the resources.
786
+ */
787
+ dispose(): void;
788
+ }
789
+
790
+ /**
791
+ * Common DOM APIs.
792
+ * @public
793
+ */
794
+ export declare const DOM: Readonly<{
795
+ /**
796
+ * Gets the dom policy used by the templating system.
797
+ */
798
+ readonly policy: DOMPolicy;
799
+ /**
800
+ * Sets the dom policy used by the templating system.
801
+ * @param policy - The policy to set.
802
+ * @remarks
803
+ * This API can only be called once, for security reasons. It should be
804
+ * called by the application developer at the start of their program.
805
+ */
806
+ setPolicy(value: DOMPolicy): void;
807
+ /**
808
+ * Sets an attribute value on an element.
809
+ * @param element - The element to set the attribute value on.
810
+ * @param attributeName - The attribute name to set.
811
+ * @param value - The value of the attribute to set.
812
+ * @remarks
813
+ * If the value is `null` or `undefined`, the attribute is removed, otherwise
814
+ * it is set to the provided value using the standard `setAttribute` API.
815
+ */
816
+ setAttribute(element: HTMLElement, attributeName: string, value: any): void;
817
+ /**
818
+ * Sets a boolean attribute value.
819
+ * @param element - The element to set the boolean attribute value on.
820
+ * @param attributeName - The attribute name to set.
821
+ * @param value - The value of the attribute to set.
822
+ * @remarks
823
+ * If the value is true, the attribute is added; otherwise it is removed.
824
+ */
825
+ setBooleanAttribute(element: HTMLElement, attributeName: string, value: boolean): void;
826
+ }>;
827
+
828
+ /**
829
+ * The type of HTML aspect to target.
830
+ * @public
831
+ */
832
+ export declare const DOMAspect: Readonly<{
833
+ /**
834
+ * Not aspected.
835
+ */
836
+ readonly none: 0;
837
+ /**
838
+ * An attribute.
839
+ */
840
+ readonly attribute: 1;
841
+ /**
842
+ * A boolean attribute.
843
+ */
844
+ readonly booleanAttribute: 2;
845
+ /**
846
+ * A property.
847
+ */
848
+ readonly property: 3;
849
+ /**
850
+ * Content
851
+ */
852
+ readonly content: 4;
853
+ /**
854
+ * A token list.
855
+ */
856
+ readonly tokenList: 5;
857
+ /**
858
+ * An event.
859
+ */
860
+ readonly event: 6;
861
+ }>;
862
+
863
+ /**
864
+ * The type of HTML aspect to target.
865
+ * @public
866
+ */
867
+ export declare type DOMAspect = (typeof DOMAspect)[Exclude<keyof typeof DOMAspect, "none">];
868
+
869
+ /**
870
+ * Aspect-specific guards for a DOM Policy.
871
+ * @public
872
+ */
873
+ export declare type DOMAspectGuards = {
874
+ /**
875
+ * Guards for attributes.
876
+ */
877
+ [DOMAspect.attribute]?: DOMSinkGuards;
878
+ /**
879
+ * Guards for boolean attributes.
880
+ */
881
+ [DOMAspect.booleanAttribute]?: DOMSinkGuards;
882
+ /**
883
+ * Guards for properties.
884
+ */
885
+ [DOMAspect.property]?: DOMSinkGuards;
886
+ /**
887
+ * Guards for content.
888
+ */
889
+ [DOMAspect.content]?: DOMSinkGuards;
890
+ /**
891
+ * Guards for token list manipulation.
892
+ */
893
+ [DOMAspect.tokenList]?: DOMSinkGuards;
894
+ /**
895
+ * Guards for events.
896
+ */
897
+ [DOMAspect.event]?: DOMSinkGuards;
898
+ };
899
+
900
+ /**
901
+ * Element-specific guards for a DOM Policy.
902
+ * @public
903
+ */
904
+ export declare type DOMElementGuards = Record<string, DOMAspectGuards>;
905
+
906
+ /**
907
+ * Guard configuration for a DOM Policy.
908
+ * @public
909
+ */
910
+ export declare type DOMGuards = {
911
+ /**
912
+ * Guards for specific elements.
913
+ */
914
+ elements: DOMElementGuards;
915
+ /**
916
+ * General aspect guards independent of the element type.
917
+ */
918
+ aspects: DOMAspectGuards;
919
+ };
920
+
921
+ /**
922
+ * A policy that controls whether values can be written to DOM sinks.
923
+ * @public
924
+ */
925
+ export declare interface DOMPolicy {
926
+ /**
927
+ * Creates safe HTML from the provided value.
928
+ * @param value - The source to convert to safe HTML.
929
+ */
930
+ createHTML(value: string): string;
931
+ /**
932
+ * Protects a DOM sink that intends to write to the DOM.
933
+ * @param tagName - The tag name for the element to write to.
934
+ * @param aspect - The aspect of the DOM to write to.
935
+ * @param aspectName - The name of the aspect to write to.
936
+ * @param sink - The sink that is used to write to the DOM.
937
+ */
938
+ protect(tagName: string | null, aspect: DOMAspect, aspectName: string, sink: DOMSink): DOMSink;
939
+ }
940
+
941
+ /**
942
+ * A helper for creating DOM policies.
943
+ * @public
944
+ */
945
+ export declare const DOMPolicy: Readonly<{
946
+ /**
947
+ * Creates a new DOM Policy object.
948
+ * @param options - The options to use in creating the policy.
949
+ * @returns The newly created DOMPolicy.
950
+ */
951
+ create(options?: DOMPolicyOptions): Readonly<DOMPolicy>;
952
+ }>;
953
+
954
+ /**
955
+ * Options for creating a DOM Policy.
956
+ * @public
957
+ */
958
+ export declare type DOMPolicyOptions = {
959
+ /**
960
+ * The trusted type to use for HTML creation.
961
+ */
962
+ trustedType?: TrustedTypesPolicy;
963
+ /**
964
+ * The DOM guards used to override or extend the defaults.
965
+ */
966
+ guards?: Partial<DOMGuards>;
967
+ };
968
+
969
+ /**
970
+ * A function used to send values to a DOM sink.
971
+ * @public
972
+ */
973
+ export declare type DOMSink = (target: Node, aspectName: string, value: any, ...args: any[]) => void;
974
+
975
+ /**
976
+ * A specific DOM sink guard for a node aspect.
977
+ * @public
978
+ */
979
+ export declare type DOMSinkGuards = Record<string, (tagName: string | null, aspect: DOMAspect, aspectName: string, sink: DOMSink) => DOMSink>;
980
+
981
+ /**
982
+ * Controls the lifecycle and rendering of a `FASTElement`.
983
+ * @public
984
+ */
985
+ export declare class ElementController<TElement extends HTMLElement = HTMLElement> implements Notifier, HostController<TElement> {
986
+ /**
987
+ * Internal notifier used to delegate subscriber management.
988
+ */
989
+ private _notifier;
990
+ /**
991
+ * A map of observable properties that were set on the element before upgrade.
992
+ */
993
+ private boundObservables;
994
+ /**
995
+ * Indicates whether the controller needs to perform initial rendering.
996
+ */
997
+ protected needsInitialization: boolean;
998
+ /**
999
+ * Indicates whether the element has an existing shadow root (e.g. from declarative shadow DOM).
1000
+ */
1001
+ protected hasExistingShadowRoot: boolean;
1002
+ /**
1003
+ * Resolves the isPrerendered promise.
1004
+ */
1005
+ private _resolvePrerendered;
1006
+ /**
1007
+ * Resolves the isHydrated promise.
1008
+ */
1009
+ private _resolveHydrated;
1010
+ /**
1011
+ * Resolves `true` when the element had an existing shadow root
1012
+ * (from SSR or declarative shadow DOM) at connect time, `false`
1013
+ * otherwise.
1014
+ */
1015
+ readonly isPrerendered: Promise<boolean>;
1016
+ /**
1017
+ * Resolves `true` after prerendered content has been successfully
1018
+ * hydrated, or `false` when the component is client-side rendered
1019
+ * or hydration is not enabled.
1020
+ */
1021
+ readonly isHydrated: Promise<boolean>;
1022
+ /**
1023
+ * The template used to render the component.
1024
+ */
1025
+ private _template;
1026
+ /**
1027
+ * The shadow root options for the component.
1028
+ */
1029
+ private _shadowRootOptions;
1030
+ /**
1031
+ * The current lifecycle stage of the controller.
1032
+ */
1033
+ protected stage: Stages;
1034
+ /**
1035
+ * A guard against connecting behaviors multiple times
1036
+ * during connect in scenarios where a behavior adds
1037
+ * another behavior during it's connectedCallback
1038
+ */
1039
+ private guardBehaviorConnection;
1040
+ /**
1041
+ * The behaviors associated with the component.
1042
+ */
1043
+ protected behaviors: Map<HostBehavior<TElement>, number> | null;
1044
+ /**
1045
+ * Tracks whether behaviors are connected so that
1046
+ * behaviors cant be connected multiple times
1047
+ */
1048
+ private behaviorsConnected;
1049
+ /**
1050
+ * The main set of styles used for the component, independent of any
1051
+ * dynamically added styles.
1052
+ */
1053
+ private _mainStyles;
1054
+ /**
1055
+ * This allows Observable.getNotifier(...) to return the Controller
1056
+ * when the notifier for the Controller itself is being requested. The
1057
+ * result is that the Observable system does not need to create a separate
1058
+ * instance of Notifier for observables on the Controller. The component and
1059
+ * the controller will now share the same notifier, removing one-object construct
1060
+ * per web component instance.
1061
+ */
1062
+ private readonly $fastController;
1063
+ /**
1064
+ * The element being controlled by this controller.
1065
+ */
1066
+ readonly source: TElement;
1067
+ /**
1068
+ * The element definition that instructs this controller
1069
+ * in how to handle rendering and other platform integrations.
1070
+ */
1071
+ readonly definition: FASTElementDefinition;
1072
+ /**
1073
+ * The view associated with the custom element.
1074
+ * @remarks
1075
+ * If `null` then the element is managing its own rendering.
1076
+ */
1077
+ readonly view: ElementView<TElement> | null;
1078
+ /**
1079
+ * Indicates whether or not the custom element has been
1080
+ * connected to the document.
1081
+ */
1082
+ get isConnected(): boolean;
1083
+ /**
1084
+ * The context the expression is evaluated against.
1085
+ */
1086
+ get context(): ExecutionContext;
1087
+ /**
1088
+ * Indicates whether the controller is bound.
1089
+ */
1090
+ get isBound(): boolean;
1091
+ /**
1092
+ * Indicates how the source's lifetime relates to the controller's lifetime.
1093
+ */
1094
+ get sourceLifetime(): SourceLifetime | undefined;
1095
+ /**
1096
+ * Gets/sets the template used to render the component.
1097
+ * @remarks
1098
+ * This value can only be accurately read after connect but can be set at any time.
1099
+ */
1100
+ get template(): ElementViewTemplate<TElement> | null;
1101
+ set template(value: ElementViewTemplate<TElement> | null);
1102
+ /**
1103
+ * The shadow root options for the component.
1104
+ */
1105
+ get shadowOptions(): ShadowRootOptions | undefined;
1106
+ set shadowOptions(value: ShadowRootOptions | undefined);
1107
+ /**
1108
+ * The main set of styles used for the component, independent
1109
+ * of any dynamically added styles.
1110
+ */
1111
+ get mainStyles(): ElementStyles | null;
1112
+ set mainStyles(value: ElementStyles | null);
1113
+ /**
1114
+ * Creates a Controller to control the specified element.
1115
+ * @param element - The element to be controlled by this controller.
1116
+ * @param definition - The element definition metadata that instructs this
1117
+ * controller in how to handle rendering and other platform integrations.
1118
+ * @internal
1119
+ */
1120
+ constructor(element: TElement, definition: FASTElementDefinition);
1121
+ /**
1122
+ * The subject that subscribers will receive notifications for.
1123
+ */
1124
+ get subject(): TElement;
1125
+ /**
1126
+ * Notifies all subscribers of a property change.
1127
+ * @param args - The property name that changed.
1128
+ */
1129
+ notify(args: any): void;
1130
+ /**
1131
+ * Subscribes to notification of changes in the element's state.
1132
+ * @param subscriber - The object that is subscribing for change notification.
1133
+ * @param propertyToWatch - The name of the property to watch for changes.
1134
+ */
1135
+ subscribe(subscriber: Subscriber, propertyToWatch?: any): void;
1136
+ /**
1137
+ * Unsubscribes from notification of changes in the element's state.
1138
+ * @param subscriber - The object that is unsubscribing from change notification.
1139
+ * @param propertyToUnwatch - The name of the property to unsubscribe from.
1140
+ */
1141
+ unsubscribe(subscriber: Subscriber, propertyToUnwatch?: any): void;
1142
+ /**
1143
+ * Registers an unbind handler with the controller.
1144
+ * @param behavior - An object to call when the controller unbinds.
1145
+ */
1146
+ onUnbind(behavior: {
1147
+ unbind(controller: ExpressionController<TElement>): any;
1148
+ }): void;
1149
+ /**
1150
+ * Adds the behavior to the component.
1151
+ * @param behavior - The behavior to add.
1152
+ */
1153
+ addBehavior(behavior: HostBehavior<TElement>): void;
1154
+ /**
1155
+ * Removes the behavior from the component.
1156
+ * @param behavior - The behavior to remove.
1157
+ * @param force - Forces removal even if this behavior was added more than once.
1158
+ */
1159
+ removeBehavior(behavior: HostBehavior<TElement>, force?: boolean): void;
1160
+ /**
1161
+ * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.
1162
+ * @param styles - The styles to add.
1163
+ */
1164
+ addStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
1165
+ /**
1166
+ * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.
1167
+ * @param styles - the styles to remove.
1168
+ */
1169
+ removeStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
1170
+ /**
1171
+ * Runs connected lifecycle behavior on the associated element.
1172
+ */
1173
+ connect(): void;
1174
+ /**
1175
+ * Binds any observables that were set before upgrade.
1176
+ */
1177
+ protected bindObservables(): void;
1178
+ /**
1179
+ * Captures public own-properties that shadow observable accessors on the
1180
+ * prototype so they can be rebound through the accessor before rendering.
1181
+ */
1182
+ protected captureBoundObservables(): void;
1183
+ /**
1184
+ * Synchronizes late-defined attribute-map attributes from the live DOM to the
1185
+ * associated property values before the initial render occurs.
1186
+ */
1187
+ protected syncLateAttributes(): void;
1188
+ /**
1189
+ * Observes late-defined attribute-map attributes that the platform does not
1190
+ * surface through attributeChangedCallback because they were added after
1191
+ * customElements.define() completed.
1192
+ */
1193
+ protected observeLateAttributes(): void;
1194
+ /**
1195
+ * Connects any existing behaviors on the associated element.
1196
+ */
1197
+ protected connectBehaviors(): void;
1198
+ /**
1199
+ * Disconnects any behaviors on the associated element.
1200
+ */
1201
+ protected disconnectBehaviors(): void;
1202
+ /**
1203
+ * Runs disconnected lifecycle behavior on the associated element.
1204
+ */
1205
+ disconnect(): void;
1206
+ /**
1207
+ * Runs the attribute changed callback for the associated element.
1208
+ * @param name - The name of the attribute that changed.
1209
+ * @param oldValue - The previous value of the attribute.
1210
+ * @param newValue - The new value of the attribute.
1211
+ */
1212
+ onAttributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
1213
+ /**
1214
+ * Emits a custom HTML event.
1215
+ * @param type - The type name of the event.
1216
+ * @param detail - The event detail object to send with the event.
1217
+ * @param options - The event options. By default bubbles and composed.
1218
+ * @remarks
1219
+ * Only emits events if connected.
1220
+ */
1221
+ emit(type: string, detail?: any, options?: TrustEmitOptions): void | boolean;
1222
+ /**
1223
+ * Renders the provided template to the element.
1224
+ *
1225
+ * @param template - The template to render.
1226
+ * @remarks
1227
+ * If `null` is provided, any existing view will be removed.
1228
+ */
1229
+ protected renderTemplate(template: ElementViewTemplate | null | undefined): void;
1230
+ /**
1231
+ * Standard client-side render: clears any stale content, clones the
1232
+ * compiled fragment, binds, and appends to the host.
1233
+ */
1234
+ private renderClientSide;
1235
+ /**
1236
+ * Locates or creates a controller for the specified element.
1237
+ * @param element - The element to return the controller for.
1238
+ * @param override - Reset the controller even if one has been defined.
1239
+ * @remarks
1240
+ * The specified element must have a {@link FASTElementDefinition}
1241
+ * registered either through the use of the {@link customElement}
1242
+ * decorator or a call to `FASTElement.define`.
1243
+ */
1244
+ static forCustomElement(element: HTMLElement, override?: boolean): ElementController;
1245
+ /**
1246
+ * Sets the strategy that ElementController.forCustomElement uses to construct
1247
+ * ElementController instances for an element.
1248
+ * @param strategy - The strategy to use.
1249
+ */
1250
+ static setStrategy(strategy: ElementControllerStrategy): void;
1251
+ /**
1252
+ * A hook that, when set, handles prerendered content hydration.
1253
+ * Called by renderTemplate when an existing shadow root is detected.
1254
+ * Returns true if hydration was performed, false to fall back to client-side.
1255
+ * @internal
1256
+ */
1257
+ private static hydrationHook;
1258
+ /**
1259
+ * Installs the hydration hook. Called by enableHydration().
1260
+ * @internal
1261
+ */
1262
+ static installHydrationHook(hook: (controller: ElementController, template: ElementViewTemplate, element: HTMLElement, host: Node) => boolean): void;
1263
+ }
1264
+
1265
+ /**
1266
+ * A type that instantiates an ElementController
1267
+ * @public
1268
+ */
1269
+ export declare interface ElementControllerStrategy {
1270
+ new (element: HTMLElement, definition: FASTElementDefinition): ElementController;
1271
+ }
1272
+
1273
+ /**
1274
+ * Creates a function that can be used to filter a Node array, selecting only elements.
1275
+ * @param selector - An optional selector to restrict the filter to.
1276
+ * @public
1277
+ */
1278
+ export declare const elements: (selector?: string) => ElementsFilter;
1279
+
1280
+ /**
1281
+ * Elements filter function type.
1282
+ *
1283
+ * @public
1284
+ */
1285
+ export declare type ElementsFilter = (value: Node, index?: number, array?: Node[]) => boolean;
1286
+
1287
+ /**
1288
+ * Represents styles that can be applied to a custom element.
1289
+ * @public
1290
+ */
1291
+ export declare class ElementStyles {
1292
+ readonly styles: ReadonlyArray<ComposableStyles>;
1293
+ private targets;
1294
+ private _strategy;
1295
+ /**
1296
+ * Gets the StyleStrategy associated with these element styles.
1297
+ */
1298
+ get strategy(): StyleStrategy;
1299
+ /**
1300
+ * Creates an instance of ElementStyles.
1301
+ * @param styles - The styles that will be associated with elements.
1302
+ */
1303
+ constructor(styles: ReadonlyArray<ComposableStyles>);
1304
+ /** @internal */
1305
+ addStylesTo(target: StyleTarget): void;
1306
+ /** @internal */
1307
+ removeStylesFrom(target: StyleTarget): void;
1308
+ /** @internal */
1309
+ isAttachedTo(target: StyleTarget): boolean;
1310
+ /**
1311
+ * Sets the strategy that handles adding/removing these styles for an element.
1312
+ * @param strategy - The strategy to use.
1313
+ */
1314
+ withStrategy(Strategy: ConstructibleStyleStrategy): this;
1315
+ /**
1316
+ * Sets the default strategy type to use when creating style strategies.
1317
+ * @param Strategy - The strategy type to construct.
1318
+ */
1319
+ static setDefaultStrategy(Strategy: ConstructibleStyleStrategy): void;
1320
+ /**
1321
+ * Normalizes a set of composable style options.
1322
+ * @param styles - The style options to normalize.
1323
+ * @returns A singular ElementStyles instance or undefined.
1324
+ */
1325
+ static normalize(styles: ComposableStyles | ComposableStyles[] | undefined): ElementStyles | undefined;
1326
+ /**
1327
+ * Indicates whether the DOM supports the adoptedStyleSheets feature.
1328
+ */
1329
+ static readonly supportsAdoptedStyleSheets: boolean;
1330
+ }
1331
+
1332
+ /**
1333
+ * A View representing DOM nodes specifically for rendering the view of a custom element.
1334
+ * @public
1335
+ */
1336
+ export declare interface ElementView<TSource = any, TParent = any> extends View<TSource, TParent> {
1337
+ /**
1338
+ * Indicates how the source's lifetime relates to the controller's lifetime.
1339
+ */
1340
+ readonly sourceLifetime?: SourceLifetime;
1341
+ /**
1342
+ * Registers an unbind handler with the controller.
1343
+ * @param behavior - An object to call when the controller unbinds.
1344
+ */
1345
+ onUnbind(behavior: {
1346
+ unbind(controller: ViewController<TSource, TParent>): any;
1347
+ }): void;
1348
+ /**
1349
+ * Appends the view's DOM nodes to the referenced node.
1350
+ * @param node - The parent node to append the view's DOM nodes to.
1351
+ */
1352
+ appendTo(node: Node): void;
1353
+ }
1354
+
1355
+ /**
1356
+ * A template capable of creating views specifically for rendering custom elements.
1357
+ * @public
1358
+ */
1359
+ export declare interface ElementViewTemplate<TSource = any, TParent = any> {
1360
+ /**
1361
+ * Creates an ElementView instance based on this template definition.
1362
+ * @param hostBindingTarget - The element that host behaviors will be bound to.
1363
+ * @param scope - The shadow root whose scoped custom element registry child
1364
+ * elements should be created against, when it has one.
1365
+ */
1366
+ create(hostBindingTarget: Element, scope?: ShadowRoot): ElementView<TSource, TParent>;
1367
+ /**
1368
+ * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.
1369
+ * @param source - The data source to bind the template to.
1370
+ * @param host - The Element where the template will be rendered.
1371
+ * @param hostBindingTarget - An HTML element to target the host bindings at if different from the
1372
+ * host that the template is being attached to.
1373
+ * @param scope - The shadow root whose scoped custom element registry child
1374
+ * elements should be created against, when it has one.
1375
+ */
1376
+ render(source: TSource, host: Node, hostBindingTarget?: Element, scope?: ShadowRoot): ElementView<TSource, TParent>;
1377
+ }
1378
+
1379
+ /**
1380
+ * A readonly, empty array.
1381
+ * @remarks
1382
+ * Typically returned by APIs that return arrays when there are
1383
+ * no actual items to return.
1384
+ * @public
1385
+ */
1386
+ export declare const emptyArray: readonly never[];
1387
+
1388
+ /**
1389
+ * Enables human-readable FAST debug messages.
1390
+ * @public
1391
+ */
1392
+ export declare function enableDebug(): void;
1393
+
1394
+ /**
1395
+ * A path discovered from an event binding.
1396
+ * @public
1397
+ */
1398
+ export declare interface EventCachedPath extends CachedPathCommon {
1399
+ type: "event";
1400
+ }
1401
+
1402
+ /**
1403
+ * Provides additional contextual information available to behaviors and expressions.
1404
+ * @public
1405
+ */
1406
+ export declare interface ExecutionContext<TParent = any> {
1407
+ /**
1408
+ * The index of the current item within a repeat context.
1409
+ */
1410
+ index: number;
1411
+ /**
1412
+ * The length of the current collection within a repeat context.
1413
+ */
1414
+ length: number;
1415
+ /**
1416
+ * The parent data source within a nested context.
1417
+ */
1418
+ parent: TParent;
1419
+ /**
1420
+ * The parent execution context when in nested context scenarios.
1421
+ */
1422
+ parentContext: ExecutionContext<TParent>;
1423
+ /**
1424
+ * The current event within an event handler.
1425
+ */
1426
+ readonly event: Event;
1427
+ /**
1428
+ * Indicates whether the current item within a repeat context
1429
+ * has an even index.
1430
+ */
1431
+ readonly isEven: boolean;
1432
+ /**
1433
+ * Indicates whether the current item within a repeat context
1434
+ * has an odd index.
1435
+ */
1436
+ readonly isOdd: boolean;
1437
+ /**
1438
+ * Indicates whether the current item within a repeat context
1439
+ * is the first item in the collection.
1440
+ */
1441
+ readonly isFirst: boolean;
1442
+ /**
1443
+ * Indicates whether the current item within a repeat context
1444
+ * is somewhere in the middle of the collection.
1445
+ */
1446
+ readonly isInMiddle: boolean;
1447
+ /**
1448
+ * Indicates whether the current item within a repeat context
1449
+ * is the last item in the collection.
1450
+ */
1451
+ readonly isLast: boolean;
1452
+ /**
1453
+ * Returns the typed event detail of a custom event.
1454
+ */
1455
+ eventDetail<TDetail>(): TDetail;
1456
+ /**
1457
+ * Returns the typed event target of the event.
1458
+ */
1459
+ eventTarget<TTarget extends EventTarget>(): TTarget;
1460
+ }
1461
+
1462
+ /**
1463
+ * Provides additional contextual information available to behaviors and expressions.
1464
+ * @public
1465
+ */
1466
+ export declare const ExecutionContext: Readonly<{
1467
+ /**
1468
+ * A default execution context.
1469
+ */
1470
+ default: ExecutionContext;
1471
+ /**
1472
+ * Gets the current event.
1473
+ * @returns An event object.
1474
+ */
1475
+ getEvent(): Event | null;
1476
+ /**
1477
+ * Sets the current event.
1478
+ * @param event - An event object.
1479
+ */
1480
+ setEvent(event: Event | null): void;
1481
+ }>;
1482
+
1483
+ /**
1484
+ * The signature of an arrow function capable of being evaluated
1485
+ * against source data and within an execution context.
1486
+ * @public
1487
+ */
1488
+ export declare type Expression<TSource = any, TReturn = any, TParent = any> = (source: TSource, context: ExecutionContext<TParent>) => TReturn;
1489
+
1490
+ /**
1491
+ * Controls the lifecycle of an expression and provides relevant context.
1492
+ * @public
1493
+ */
1494
+ export declare interface ExpressionController<TSource = any, TParent = any> {
1495
+ /**
1496
+ * The source the expression is evaluated against.
1497
+ */
1498
+ readonly source: TSource;
1499
+ /**
1500
+ * Indicates how the source's lifetime relates to the controller's lifetime.
1501
+ */
1502
+ readonly sourceLifetime?: SourceLifetime;
1503
+ /**
1504
+ * The context the expression is evaluated against.
1505
+ */
1506
+ readonly context: ExecutionContext<TParent>;
1507
+ /**
1508
+ * Indicates whether the controller is bound.
1509
+ */
1510
+ readonly isBound: boolean;
1511
+ /**
1512
+ * Registers an unbind handler with the controller.
1513
+ * @param behavior - An object to call when the controller unbinds.
1514
+ */
1515
+ onUnbind(behavior: {
1516
+ unbind(controller: ExpressionController<TSource, TParent>): any;
1517
+ }): void;
1518
+ }
1519
+
1520
+ /**
1521
+ * Enables evaluation of and subscription to a binding.
1522
+ * @public
1523
+ */
1524
+ export declare interface ExpressionNotifier<TSource = any, TReturn = any, TParent = any> extends Notifier, ExpressionObserver<TSource, TReturn, TParent>, Disposable {
1525
+ /**
1526
+ * Observes the expression.
1527
+ * @param source - The source for the expression.
1528
+ * @param context - The context for the expression.
1529
+ */
1530
+ observe(source: TSource, context?: ExecutionContext): TReturn;
1531
+ /**
1532
+ * Gets {@link ObservationRecord|ObservationRecords} that the {@link ExpressionNotifier}
1533
+ * is observing.
1534
+ */
1535
+ records(): IterableIterator<ObservationRecord>;
1536
+ /**
1537
+ * Sets the update mode used by the observer.
1538
+ * @param isAsync - Indicates whether updates should be asynchronous.
1539
+ * @remarks
1540
+ * By default, the update mode is asynchronous, since that provides the best
1541
+ * performance for template rendering scenarios. Passing false to setMode will
1542
+ * instead cause the observer to notify subscribers immediately when changes occur.
1543
+ */
1544
+ setMode(isAsync: boolean): void;
1545
+ }
1546
+
1547
+ /**
1548
+ * Observes an expression for changes.
1549
+ * @public
1550
+ */
1551
+ export declare interface ExpressionObserver<TSource = any, TReturn = any, TParent = any> {
1552
+ /**
1553
+ * Binds the expression to the source.
1554
+ * @param controller - The controller that manages the lifecycle and related
1555
+ * context for the expression.
1556
+ */
1557
+ bind(controller: ExpressionController<TSource, TParent>): TReturn;
1558
+ }
1559
+
1560
+ /**
1561
+ * The FAST messaging API for warnings and errors.
1562
+ * @public
1563
+ */
1564
+ export declare const FAST: {
1565
+ /**
1566
+ * Sends a warning to the developer.
1567
+ * @param code - The warning code to send.
1568
+ * @param values - Values relevant for the warning message.
1569
+ */
1570
+ warn(_code: number, _values?: Record<string, any>): void;
1571
+ /**
1572
+ * Creates an error from a code.
1573
+ * @param code - The error code.
1574
+ * @param values - Values relevant for the error message.
1575
+ */
1576
+ error(code: number, _values?: Record<string, any>): Error;
1577
+ /**
1578
+ * Adds debug messages for errors and warnings.
1579
+ * @param messages - The message dictionary to add.
1580
+ */
1581
+ addMessages(messages: Record<number, string>): void;
1582
+ };
1583
+
1584
+ /**
1585
+ * Represents a custom element based on the FASTElement infrastructure.
1586
+ * @public
1587
+ */
1588
+ export declare interface FASTElement extends HTMLElement {
1589
+ /**
1590
+ * The underlying controller that handles the lifecycle and rendering of
1591
+ * this FASTElement.
1592
+ */
1593
+ readonly $fastController: ElementController;
1594
+ /**
1595
+ * Emits a custom HTML event.
1596
+ * @param type - The type name of the event.
1597
+ * @param detail - The event detail object to send with the event.
1598
+ * @param options - The event options. By default bubbles and composed.
1599
+ * @remarks
1600
+ * Only emits events if the element is connected.
1601
+ */
1602
+ $emit(type: string, detail?: any, options?: TrustEmitOptions): boolean | void;
1603
+ /**
1604
+ * The connected callback for this FASTElement.
1605
+ * @remarks
1606
+ * This method is invoked by the platform whenever this FASTElement
1607
+ * becomes connected to the document.
1608
+ */
1609
+ connectedCallback(): void;
1610
+ /**
1611
+ * The disconnected callback for this FASTElement.
1612
+ * @remarks
1613
+ * This method is invoked by the platform whenever this FASTElement
1614
+ * becomes disconnected from the document.
1615
+ */
1616
+ disconnectedCallback(): void;
1617
+ /**
1618
+ * The attribute changed callback for this FASTElement.
1619
+ * @param name - The name of the attribute that changed.
1620
+ * @param oldValue - The previous value of the attribute.
1621
+ * @param newValue - The new value of the attribute.
1622
+ * @remarks
1623
+ * This method is invoked by the platform whenever an observed
1624
+ * attribute of FASTElement has a value change.
1625
+ */
1626
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
1627
+ }
1628
+
1629
+ /**
1630
+ * A minimal base class for FASTElements that also provides
1631
+ * static helpers for working with FASTElements.
1632
+ * @public
1633
+ */
1634
+ export declare const FASTElement: FASTElementConstructor;
1635
+
1636
+ /**
1637
+ * The FASTElement constructor and static registration helpers.
1638
+ * @public
1639
+ */
1640
+ export declare interface FASTElementConstructor {
1641
+ /**
1642
+ * Creates a FASTElement instance.
1643
+ */
1644
+ new (): FASTElement;
1645
+ /**
1646
+ * Defines a platform custom element based on the provided type and definition.
1647
+ * @param nameOrDef - The name of the element to define or a definition object.
1648
+ * @param extensions - Optional callbacks to run before registration.
1649
+ */
1650
+ define<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(this: TType, nameOrDef: string | PartialFASTElementDefinition<TType>, extensions?: FASTElementExtension[]): Promise<TType>;
1651
+ /**
1652
+ * Defines a platform custom element based on the provided type and definition.
1653
+ * @param type - The custom element type to define.
1654
+ * @param nameOrDef - The name of the element to define or a definition object.
1655
+ * @param extensions - Optional callbacks to run before registration.
1656
+ */
1657
+ define<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition<TType>, extensions?: FASTElementExtension[]): Promise<TType>;
1658
+ /**
1659
+ * Creates a new FASTElement base class inherited from the provided base type.
1660
+ * @param BaseType - The base element type to inherit from.
1661
+ */
1662
+ from<TBase extends typeof HTMLElement>(BaseType: TBase): {
1663
+ new (): InstanceType<TBase> & FASTElement;
1664
+ };
1665
+ }
1666
+
1667
+ /**
1668
+ * Defines metadata for a FASTElement.
1669
+ * @public
1670
+ */
1671
+ export declare class FASTElementDefinition<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>> {
1672
+ private platformDefined;
1673
+ /**
1674
+ * The type this element definition describes.
1675
+ */
1676
+ readonly type: TType;
1677
+ /**
1678
+ * Indicates if this element has been defined in at least one registry.
1679
+ */
1680
+ get isDefined(): boolean;
1681
+ /**
1682
+ * The name of the custom element.
1683
+ */
1684
+ readonly name: string;
1685
+ /**
1686
+ * The custom attributes of the custom element.
1687
+ */
1688
+ readonly attributes: ReadonlyArray<AttributeDefinition>;
1689
+ /**
1690
+ * A map enabling lookup of attribute by associated property name.
1691
+ */
1692
+ readonly propertyLookup: Record<string, AttributeDefinition>;
1693
+ /**
1694
+ * A map enabling lookup of property by associated attribute name.
1695
+ */
1696
+ readonly attributeLookup: Record<string, AttributeDefinition>;
1697
+ /**
1698
+ * The template to render for the custom element.
1699
+ */
1700
+ template?: ElementViewTemplate<InstanceType<TType>>;
1701
+ /**
1702
+ * The styles to associate with the custom element.
1703
+ */
1704
+ readonly styles?: ElementStyles;
1705
+ /**
1706
+ * Options controlling the creation of the custom element's shadow DOM.
1707
+ */
1708
+ shadowOptions?: ShadowRootOptions;
1709
+ /**
1710
+ * Options controlling how the custom element is defined with the platform.
1711
+ */
1712
+ readonly elementOptions: ElementDefinitionOptions;
1713
+ /**
1714
+ * The registry to register this component in by default.
1715
+ */
1716
+ readonly registry: CustomElementRegistry;
1717
+ /**
1718
+ * The optional schema associated with the custom element definition.
1719
+ * Declarative templates assign this automatically during template resolution.
1720
+ * Non-declarative callers can provide one for schema-driven extensions.
1721
+ */
1722
+ schema?: Schema;
1723
+ private constructor();
1724
+ /**
1725
+ * Defines a custom element based on this definition.
1726
+ * @param registry - The element registry to define the element in.
1727
+ * @param extensions - An optional array of extension callbacks to invoke
1728
+ * with this definition before platform registration.
1729
+ * @remarks
1730
+ * This operation is idempotent per registry.
1731
+ */
1732
+ define(registry?: CustomElementRegistry, extensions?: FASTElementExtension[]): this;
1733
+ /**
1734
+ * Creates an instance of FASTElementDefinition.
1735
+ * @param type - The type this definition is being created for.
1736
+ * @param nameOrDef - The name of the element to define or a config object
1737
+ * that describes the element to define.
1738
+ */
1739
+ static compose<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>>(type: TType, nameOrDef?: string | PartialFASTElementDefinition<TType>): Promise<FASTElementDefinition<TType>>;
1740
+ /**
1741
+ * Registers a FASTElement base type.
1742
+ * @param type - The type to register as a base type.
1743
+ * @internal
1744
+ */
1745
+ static registerBaseType(type: Function): void;
1746
+ /**
1747
+ * Gets the element definition associated with the specified type.
1748
+ * @param type - The custom element type to retrieve the definition for.
1749
+ */
1750
+ static readonly getByType: (key: Function) => FASTElementDefinition<Constructable<HTMLElement>> | undefined;
1751
+ /**
1752
+ * Gets the element definition associated with the instance.
1753
+ * @param instance - The custom element instance to retrieve the definition for.
1754
+ */
1755
+ static readonly getForInstance: (object: any) => FASTElementDefinition<Constructable<HTMLElement>> | undefined;
1756
+ }
1757
+
1758
+ /**
1759
+ * A callback that receives a FASTElementDefinition during element registration.
1760
+ * Extensions are invoked before the element is registered with the platform,
1761
+ * allowing plugins to inspect or act on the resolved definition.
1762
+ * @public
1763
+ */
1764
+ export declare type FASTElementExtension = (definition: FASTElementDefinition, registry: CustomElementRegistry) => void;
1765
+
1766
+ /**
1767
+ * The FAST custom element registry.
1768
+ * @public
1769
+ */
1770
+ export declare interface FASTElementRegistry extends TypeRegistry<FASTElementDefinition> {
1771
+ /**
1772
+ * Resolves when a FAST element definition has been registered for the tag name.
1773
+ * @param name - The custom element tag name.
1774
+ * @param registry - The custom element registry to observe.
1775
+ */
1776
+ whenRegistered(name: string, registry?: CustomElementRegistry): Promise<FASTElementDefinition>;
1777
+ }
1778
+
1779
+ /**
1780
+ * The FAST custom element registry.
1781
+ * @remarks
1782
+ * This registry stores FAST element definitions by constructor so consumers can
1783
+ * look up the `FASTElementDefinition` associated with an element type, instance,
1784
+ * or registered tag name.
1785
+ * @public
1786
+ */
1787
+ export declare const fastElementRegistry: FASTElementRegistry;
1788
+
1789
+ /**
1790
+ * Resolves an element template from a composed definition.
1791
+ * @public
1792
+ */
1793
+ export declare type FASTElementTemplateResolver<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>> = (definition: FASTElementDefinition<TType>) => ElementViewTemplate<InstanceType<TType>> | Promise<ElementViewTemplate<InstanceType<TType>>>;
1794
+
1795
+ /**
1796
+ * Represents an object that can contribute behavior to a host.
1797
+ * @public
1798
+ */
1799
+ export declare interface HostBehavior<TSource = any> {
1800
+ /**
1801
+ * Executed when this behavior is attached to a controller.
1802
+ * @param controller - Controls the behavior lifecycle.
1803
+ */
1804
+ addedCallback?(controller: HostController<TSource>): void;
1805
+ /**
1806
+ * Executed when this behavior is detached from a controller.
1807
+ * @param controller - Controls the behavior lifecycle.
1808
+ */
1809
+ removedCallback?(controller: HostController<TSource>): void;
1810
+ /**
1811
+ * Executed when this behavior's host is connected.
1812
+ * @param controller - Controls the behavior lifecycle.
1813
+ */
1814
+ connectedCallback?(controller: HostController<TSource>): void;
1815
+ /**
1816
+ * Executed when this behavior's host is disconnected.
1817
+ * @param controller - Controls the behavior lifecycle.
1818
+ */
1819
+ disconnectedCallback?(controller: HostController<TSource>): void;
1820
+ }
1821
+
1822
+ /**
1823
+ * Controls the lifecycle and context of behaviors and styles
1824
+ * associated with a component host.
1825
+ * @public
1826
+ */
1827
+ export declare interface HostController<TSource = any> extends ExpressionController<TSource> {
1828
+ /**
1829
+ * Indicates whether the host is connected or not.
1830
+ */
1831
+ readonly isConnected: boolean;
1832
+ /**
1833
+ * The main set of styles used for the component, independent
1834
+ * of any behavior-specific styles.
1835
+ */
1836
+ mainStyles: ElementStyles | null;
1837
+ /**
1838
+ * Adds the behavior to the component.
1839
+ * @param behavior - The behavior to add.
1840
+ */
1841
+ addBehavior(behavior: HostBehavior<TSource>): void;
1842
+ /**
1843
+ * Removes the behavior from the component.
1844
+ * @param behavior - The behavior to remove.
1845
+ * @param force - Forces removal even if this behavior was added more than once.
1846
+ */
1847
+ removeBehavior(behavior: HostBehavior<TSource>, force?: boolean): void;
1848
+ /**
1849
+ * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.
1850
+ * @param styles - The styles to add.
1851
+ */
1852
+ addStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
1853
+ /**
1854
+ * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.
1855
+ * @param styles - the styles to remove.
1856
+ */
1857
+ removeStyles(styles: ElementStyles | HTMLStyleElement | null | undefined): void;
1858
+ }
1859
+
1860
+ /**
1861
+ * Transforms a template literal string into a ViewTemplate.
1862
+ * @param strings - The string fragments that are interpolated with the values.
1863
+ * @param values - The values that are interpolated with the string fragments.
1864
+ * @remarks
1865
+ * The html helper supports interpolation of strings, numbers, binding expressions,
1866
+ * other template instances, and Directive instances.
1867
+ * @public
1868
+ */
1869
+ export declare const html: HTMLTemplateTag;
1870
+
1871
+ /**
1872
+ * The central binding directive that bridges data expressions and DOM updates.
1873
+ *
1874
+ * HTMLBindingDirective fulfills three roles simultaneously:
1875
+ * - **HTMLDirective**: Produces placeholder HTML via createHTML() during template authoring.
1876
+ * - **ViewBehaviorFactory**: Creates behaviors (returns itself) during view creation.
1877
+ * - **ViewBehavior / EventListener**: Attaches to a DOM node during bind, manages
1878
+ * expression observers for reactive updates, and handles DOM events directly.
1879
+ *
1880
+ * The aspectType (set by HTMLDirective.assignAspect during template processing)
1881
+ * determines which DOM "sink" function is used to apply values — e.g.,
1882
+ * setAttribute for attributes, addEventListener for events, textContent for content.
1883
+ *
1884
+ * @public
1885
+ */
1886
+ export declare class HTMLBindingDirective implements HTMLDirective, ViewBehaviorFactory, ViewBehavior, Aspected, BindingDirective {
1887
+ private data;
1888
+ private updateTarget;
1889
+ /**
1890
+ * The unique id of the factory.
1891
+ */
1892
+ id: string;
1893
+ /**
1894
+ * The structural id of the DOM node to which the created behavior will apply.
1895
+ */
1896
+ targetNodeId: string;
1897
+ /**
1898
+ * The tagname associated with the target node.
1899
+ */
1900
+ targetTagName: string | null;
1901
+ /**
1902
+ * The policy that the created behavior must run under.
1903
+ */
1904
+ policy: DOMPolicy;
1905
+ /**
1906
+ * The original source aspect exactly as represented in markup.
1907
+ */
1908
+ sourceAspect: string;
1909
+ /**
1910
+ * The evaluated target aspect, determined after processing the source.
1911
+ */
1912
+ targetAspect: string;
1913
+ /**
1914
+ * The type of aspect to target.
1915
+ */
1916
+ aspectType: DOMAspect;
1917
+ /**
1918
+ * The binding configuration to apply.
1919
+ */
1920
+ dataBinding: Binding;
1921
+ /**
1922
+ * Creates an instance of HTMLBindingDirective.
1923
+ * @param dataBinding - The binding configuration to apply.
1924
+ */
1925
+ constructor(dataBinding: Binding);
1926
+ /**
1927
+ * Creates HTML to be used within a template.
1928
+ * @param add - Can be used to add behavior factories to a template.
1929
+ */
1930
+ createHTML(add: AddViewBehaviorFactory): string;
1931
+ /**
1932
+ * Creates a behavior.
1933
+ */
1934
+ createBehavior(): ViewBehavior;
1935
+ /**
1936
+ * Attaches this binding to its target DOM node.
1937
+ * - For events: stores the controller reference on the target element and registers
1938
+ * this directive as the EventListener via addEventListener. The directive's
1939
+ * handleEvent() method will be called when the event fires.
1940
+ * - For content bindings: registers an unbind handler, then falls through to the
1941
+ * default path.
1942
+ * - For all non-event bindings: creates (or reuses) an ExpressionObserver, evaluates
1943
+ * the binding expression, and applies the result to the DOM via the updateTarget
1944
+ * sink function. The observer will call handleChange() on future data changes.
1945
+ * @internal
1946
+ */
1947
+ bind(controller: ViewController): void;
1948
+ /** @internal */
1949
+ unbind(controller: ViewController): void;
1950
+ /**
1951
+ * Implements the EventListener interface. When a DOM event fires on the target
1952
+ * element, this method retrieves the ViewController stored on the element,
1953
+ * sets the event on the ExecutionContext so `c.event` is available to the
1954
+ * binding expression, and evaluates the expression. If the expression returns
1955
+ * anything other than `true`, the event's default action is prevented.
1956
+ * @internal
1957
+ */
1958
+ handleEvent(event: Event): void;
1959
+ /**
1960
+ * Called by the ExpressionObserver when a tracked dependency changes.
1961
+ * Re-evaluates the binding expression via observer.bind() and pushes
1962
+ * the new value to the DOM through the updateTarget sink function.
1963
+ * This is the reactive update path that keeps the DOM in sync with data.
1964
+ *
1965
+ * Guards against stale notifications: when a view is unbound (e.g., after
1966
+ * a parent `when` directive tears down a child element), coupled-lifetime
1967
+ * observers may still hold active subscriptions. If a property change fires
1968
+ * on the source element while the view is inactive, this guard prevents
1969
+ * the binding expression from evaluating with a null source.
1970
+ * @internal
1971
+ */
1972
+ handleChange(binding: Expression, observer: ExpressionObserver): void;
1973
+ }
1974
+
1975
+ /**
1976
+ * Instructs the template engine to apply behavior to a node.
1977
+ * @public
1978
+ */
1979
+ export declare interface HTMLDirective {
1980
+ /**
1981
+ * Creates HTML to be used within a template.
1982
+ * @param add - Can be used to add behavior factories to a template.
1983
+ */
1984
+ createHTML(add: AddViewBehaviorFactory): string;
1985
+ }
1986
+
1987
+ /**
1988
+ * Instructs the template engine to apply behavior to a node.
1989
+ * @public
1990
+ */
1991
+ export declare const HTMLDirective: Readonly<{
1992
+ /**
1993
+ * Gets the directive definition associated with the instance.
1994
+ * @param instance - The directive instance to retrieve the definition for.
1995
+ */
1996
+ getForInstance: (object: any) => HTMLDirectiveDefinition<Constructable<HTMLDirective>> | undefined;
1997
+ /**
1998
+ * Gets the directive definition associated with the specified type.
1999
+ * @param type - The directive type to retrieve the definition for.
2000
+ */
2001
+ getByType: (key: Function) => HTMLDirectiveDefinition<Constructable<HTMLDirective>> | undefined;
2002
+ /**
2003
+ * Defines an HTMLDirective based on the options.
2004
+ * @param type - The type to define as a directive.
2005
+ * @param options - Options that specify the directive's application.
2006
+ */
2007
+ define<TType extends Constructable<HTMLDirective>>(type: TType, options?: PartialHTMLDirectiveDefinition): TType;
2008
+ /**
2009
+ * Determines the DOM aspect type for a directive based on attribute name prefix.
2010
+ * The prefix convention maps to aspect types as follows:
2011
+ * - No prefix (e.g. "class") → DOMAspect.attribute
2012
+ * - ":" prefix (e.g. ":value") → DOMAspect.property (":classList" → DOMAspect.tokenList)
2013
+ * - "?" prefix (e.g. "?disabled") → DOMAspect.booleanAttribute
2014
+ * - `@` prefix (e.g. `@click`) → DOMAspect.event
2015
+ * - Falsy or absent value → DOMAspect.content (see remarks)
2016
+ * @param directive - The directive to assign the aspect to.
2017
+ * @param value - The value to base the aspect determination on.
2018
+ * @remarks
2019
+ * If a falsy value is provided, then the content aspect will be assigned.
2020
+ */
2021
+ assignAspect(directive: Aspected, value?: string): void;
2022
+ }>;
2023
+
2024
+ /**
2025
+ * Decorator: Defines an HTMLDirective.
2026
+ * @param options - Provides options that specify the directive's application.
2027
+ * @public
2028
+ */
2029
+ export declare function htmlDirective(options?: PartialHTMLDirectiveDefinition): (type: Constructable<HTMLDirective>) => void;
2030
+
2031
+ /**
2032
+ * Defines metadata for an HTMLDirective.
2033
+ * @public
2034
+ */
2035
+ export declare interface HTMLDirectiveDefinition<TType extends Constructable<HTMLDirective> = Constructable<HTMLDirective>> extends Required<PartialHTMLDirectiveDefinition> {
2036
+ /**
2037
+ * The type that the definition provides metadata for.
2038
+ */
2039
+ readonly type: TType;
2040
+ }
2041
+
2042
+ /**
2043
+ * The result of a template compilation operation.
2044
+ * @public
2045
+ */
2046
+ export declare interface HTMLTemplateCompilationResult<TSource = any, TParent = any> {
2047
+ /**
2048
+ * Creates a view instance.
2049
+ * @param hostBindingTarget - The host binding target for the view.
2050
+ * @param scope - The shadow root whose scoped custom element registry the view's
2051
+ * elements should be created against, when it has one.
2052
+ */
2053
+ createView(hostBindingTarget?: Element, scope?: ShadowRoot): HTMLView<TSource, TParent>;
2054
+ readonly factories: CompiledViewBehaviorFactory[];
2055
+ }
2056
+
2057
+ /**
2058
+ * Transforms a template literal string into a ViewTemplate.
2059
+ * @param strings - The string fragments that are interpolated with the values.
2060
+ * @param values - The values that are interpolated with the string fragments.
2061
+ * @remarks
2062
+ * The html helper supports interpolation of strings, numbers, binding expressions,
2063
+ * other template instances, and Directive instances.
2064
+ * @public
2065
+ */
2066
+ export declare type HTMLTemplateTag = (<TSource = any, TParent = any>(strings: TemplateStringsArray, ...values: TemplateValue<TSource, TParent>[]) => ViewTemplate<TSource, TParent>) & {
2067
+ /**
2068
+ * Transforms a template literal string into partial HTML.
2069
+ * @param html - The HTML string fragment to interpolate.
2070
+ * @public
2071
+ */
2072
+ partial(html: string): InlineTemplateDirective;
2073
+ };
2074
+
2075
+ /**
2076
+ * The standard View implementation, which also implements ElementView and SyntheticView.
2077
+ * @public
2078
+ */
2079
+ export declare class HTMLView<TSource = any, TParent = any> extends DefaultExecutionContext<TParent> implements ElementView<TSource, TParent>, SyntheticView<TSource, TParent>, ExecutionContext<TParent> {
2080
+ private fragment;
2081
+ private factories;
2082
+ readonly targets: ViewBehaviorTargets;
2083
+ /**
2084
+ * The shadow root whose scoped custom element registry this view's
2085
+ * elements were created against, if any. Child views inherit it.
2086
+ * @internal
2087
+ */
2088
+ readonly _scope?: ShadowRoot | undefined;
2089
+ private behaviors;
2090
+ private unbindables;
2091
+ /**
2092
+ * The data that the view is bound to.
2093
+ */
2094
+ source: TSource | null;
2095
+ /**
2096
+ * Indicates whether the controller is bound.
2097
+ */
2098
+ isBound: boolean;
2099
+ /**
2100
+ * Indicates how the source's lifetime relates to the controller's lifetime.
2101
+ */
2102
+ readonly sourceLifetime: SourceLifetime;
2103
+ /**
2104
+ * When true, directives skip attribute/booleanAttribute DOM
2105
+ * updates during bind(). Set only during the prerendered bind
2106
+ * window and cleared immediately after.
2107
+ * @internal
2108
+ */
2109
+ _skipAttrUpdates: boolean;
2110
+ /**
2111
+ * A promise that resolves with `true` after prerendered content
2112
+ * has been hydrated, or `false` when the view is client-side
2113
+ * rendered. Resolves once the first bind completes.
2114
+ */
2115
+ isPrerendered: Promise<boolean>;
2116
+ /**
2117
+ * Resolves `true` after prerendered content has been hydrated,
2118
+ * `false` when client-side rendered or hydration not enabled.
2119
+ */
2120
+ isHydrated: Promise<boolean>;
2121
+ /**
2122
+ * The execution context the view is running within.
2123
+ */
2124
+ context: ExecutionContext<TParent>;
2125
+ /**
2126
+ * The first DOM node in the range of nodes that make up the view.
2127
+ */
2128
+ firstChild: Node;
2129
+ /**
2130
+ * The last DOM node in the range of nodes that make up the view.
2131
+ */
2132
+ lastChild: Node;
2133
+ /**
2134
+ * Constructs an instance of HTMLView.
2135
+ * @param fragment - The html fragment that contains the nodes for this view.
2136
+ * @param behaviors - The behaviors to be applied to this view.
2137
+ */
2138
+ constructor(fragment: DocumentFragment, factories: ReadonlyArray<CompiledViewBehaviorFactory>, targets: ViewBehaviorTargets,
2139
+ /**
2140
+ * The shadow root whose scoped custom element registry this view's
2141
+ * elements were created against, if any. Child views inherit it.
2142
+ * @internal
2143
+ */
2144
+ _scope?: ShadowRoot | undefined);
2145
+ /**
2146
+ * Appends the view's DOM nodes to the referenced node.
2147
+ * @param node - The parent node to append the view's DOM nodes to.
2148
+ */
2149
+ appendTo(node: Node): void;
2150
+ /**
2151
+ * Inserts the view's DOM nodes before the referenced node.
2152
+ * @param node - The node to insert the view's DOM before.
2153
+ */
2154
+ insertBefore(node: Node): void;
2155
+ /**
2156
+ * Removes the view's DOM nodes.
2157
+ * The nodes are not disposed and the view can later be re-inserted.
2158
+ */
2159
+ remove(): void;
2160
+ /**
2161
+ * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.
2162
+ * Once a view has been disposed, it cannot be inserted or bound again.
2163
+ */
2164
+ dispose(): void;
2165
+ onUnbind(behavior: {
2166
+ unbind(controller: ViewController<TSource, TParent>): void;
2167
+ }): void;
2168
+ /**
2169
+ * Binds a view's behaviors to its binding source.
2170
+ *
2171
+ * On the first call, this iterates through all compiled factories, calling
2172
+ * createBehavior() on each to produce a ViewBehavior instance (e.g., an
2173
+ * HTMLBindingDirective), and then immediately binds it. This is where event
2174
+ * listeners are registered, expression observers are created, and initial
2175
+ * DOM values are set.
2176
+ *
2177
+ * On subsequent calls with a new source, existing behaviors are re-bound
2178
+ * to the new data source, which re-evaluates all binding expressions and
2179
+ * updates the DOM accordingly.
2180
+ *
2181
+ * @param source - The binding source for the view's binding behaviors.
2182
+ * @param context - The execution context to run the behaviors within.
2183
+ */
2184
+ bind(source: TSource, context?: ExecutionContext<TParent>): void;
2185
+ /**
2186
+ * Unbinds a view's behaviors from its binding source.
2187
+ */
2188
+ unbind(): void;
2189
+ private evaluateUnbindables;
2190
+ /**
2191
+ * Efficiently disposes of a contiguous range of synthetic view instances.
2192
+ * @param views - A contiguous range of views to be disposed.
2193
+ */
2194
+ static disposeContiguousBatch(views: SyntheticView[]): void;
2195
+ }
2196
+
2197
+ /**
2198
+ * Inlines a template into another template.
2199
+ * @public
2200
+ */
2201
+ export declare class InlineTemplateDirective implements HTMLDirective {
2202
+ private html;
2203
+ private factories;
2204
+ /**
2205
+ * An empty template partial.
2206
+ */
2207
+ static readonly empty: InlineTemplateDirective;
2208
+ /**
2209
+ * Creates an instance of InlineTemplateDirective.
2210
+ * @param template - The template to inline.
2211
+ */
2212
+ constructor(html: string, factories?: Record<string, ViewBehaviorFactory>);
2213
+ /**
2214
+ * Creates HTML to be used within a template.
2215
+ * @param add - Can be used to add behavior factories to a template.
2216
+ */
2217
+ createHTML(add: AddViewBehaviorFactory): string;
2218
+ }
2219
+
2220
+ /**
2221
+ * A JSON schema describing a root property.
2222
+ * @public
2223
+ */
2224
+ export declare interface JSONSchema extends JSONSchemaCommon {
2225
+ $schema: string;
2226
+ $id: string;
2227
+ $defs?: Record<string, JSONSchemaDefinition>;
2228
+ }
2229
+
2230
+ /**
2231
+ * Common properties shared by schema nodes.
2232
+ * @public
2233
+ */
2234
+ export declare interface JSONSchemaCommon {
2235
+ type?: string;
2236
+ properties?: any;
2237
+ items?: any;
2238
+ anyOf?: Array<any>;
2239
+ $ref?: string;
2240
+ /**
2241
+ * Stamped by `applyConfigToSchema` when an `ObserverMapConfig` excludes
2242
+ * this path. When `false`, the proxy system skips observation for this
2243
+ * node and (if all descendants are also `false`) its subtree.
2244
+ */
2245
+ $observe?: boolean;
2246
+ }
2247
+
2248
+ /**
2249
+ * A reusable JSON schema definition.
2250
+ * @public
2251
+ */
2252
+ export declare interface JSONSchemaDefinition extends JSONSchemaCommon {
2253
+ $fast_context: string;
2254
+ $fast_parent_contexts: Array<string>;
2255
+ }
2256
+
2257
+ /**
2258
+ * Observes array lengths.
2259
+ * @public
2260
+ */
2261
+ export declare interface LengthObserver extends Subscriber {
2262
+ /**
2263
+ * The length of the observed array.
2264
+ */
2265
+ length: number;
2266
+ }
2267
+
2268
+ /**
2269
+ * Enables observing the length of an array.
2270
+ * @param array - The array to observe the length of.
2271
+ * @returns The length of the array.
2272
+ * @public
2273
+ */
2274
+ export declare function lengthOf<T>(array: readonly T[]): number;
2275
+
2276
+ /**
2277
+ * Creates an event listener binding.
2278
+ * @param expression - The binding to invoke when the event is raised.
2279
+ * @param options - Event listener options.
2280
+ * @returns A binding configuration.
2281
+ * @public
2282
+ */
2283
+ export declare function listener<T = any>(expression: Expression<T>, options?: AddEventListenerOptions): Binding<T>;
2284
+
2285
+ /**
2286
+ * Common APIs related to markup generation.
2287
+ * @public
2288
+ */
2289
+ export declare const Markup: Readonly<{
2290
+ /**
2291
+ * Creates a placeholder string suitable for marking out a location *within*
2292
+ * an attribute value or HTML content.
2293
+ * @param index - The directive index to create the placeholder for.
2294
+ * @remarks
2295
+ * Used internally by binding directives.
2296
+ */
2297
+ interpolation: (id: string) => string;
2298
+ /**
2299
+ * Creates a placeholder that manifests itself as an attribute on an
2300
+ * element.
2301
+ * @param attributeName - The name of the custom attribute.
2302
+ * @param index - The directive index to create the placeholder for.
2303
+ * @remarks
2304
+ * Used internally by attribute directives such as `ref`, `slotted`, and `children`.
2305
+ */
2306
+ attribute: (id: string) => string;
2307
+ /**
2308
+ * Creates a placeholder that manifests itself as a marker within the DOM structure.
2309
+ * @param index - The directive index to create the placeholder for.
2310
+ * @remarks
2311
+ * Used internally by structural directives such as `repeat`.
2312
+ */
2313
+ comment: (id: string) => string;
2314
+ }>;
2315
+
2316
+ /**
2317
+ * Options for configuring node observation behavior.
2318
+ * @public
2319
+ */
2320
+ export declare interface NodeBehaviorOptions<T = any> {
2321
+ /**
2322
+ * The property to assign the observed nodes to.
2323
+ */
2324
+ property: T;
2325
+ /**
2326
+ * Filters nodes that are synced with the property.
2327
+ * Called one time for each element in the array.
2328
+ * @param value - The Node that is being inspected.
2329
+ * @param index - The index of the node within the array.
2330
+ * @param array - The Node array that is being filtered.
2331
+ */
2332
+ filter?: ElementsFilter;
2333
+ }
2334
+
2335
+ /**
2336
+ * A base class for node observation.
2337
+ * @public
2338
+ * @remarks
2339
+ * Internally used by the SlottedDirective and the ChildrenDirective.
2340
+ */
2341
+ export declare abstract class NodeObservationDirective<T extends NodeBehaviorOptions> extends StatelessAttachedAttributeDirective<T> {
2342
+ private _id;
2343
+ private _controllerProperty;
2344
+ /**
2345
+ * The unique id of the factory.
2346
+ */
2347
+ get id(): string;
2348
+ set id(value: string);
2349
+ /**
2350
+ * The structural id of the DOM node to which the created behavior will apply.
2351
+ */
2352
+ targetNodeId: string;
2353
+ /**
2354
+ * Bind this behavior to the source.
2355
+ * @param source - The source to bind to.
2356
+ * @param context - The execution context that the binding is operating within.
2357
+ * @param targets - The targets that behaviors in a view can attach to.
2358
+ */
2359
+ bind(controller: ViewController): void;
2360
+ /**
2361
+ * Unbinds this behavior from the source.
2362
+ * @param source - The source to unbind from.
2363
+ * @param context - The execution context that the binding is operating within.
2364
+ * @param targets - The targets that behaviors in a view can attach to.
2365
+ */
2366
+ unbind(controller: ViewController): void;
2367
+ /**
2368
+ * Gets the data source for the target.
2369
+ * @param target - The target to get the source for.
2370
+ * @returns The source.
2371
+ */
2372
+ protected getSource(target: Node): any;
2373
+ /**
2374
+ * Updates the source property with the computed nodes.
2375
+ * @param source - The source object to assign the nodes property to.
2376
+ * @param value - The nodes to assign to the source object property.
2377
+ */
2378
+ protected updateTarget(source: any, value: ReadonlyArray<any>): void;
2379
+ /**
2380
+ * Computes the set of nodes that should be assigned to the source property.
2381
+ * @param target - The target to compute the nodes for.
2382
+ * @returns The computed nodes.
2383
+ * @remarks
2384
+ * Applies filters if provided.
2385
+ */
2386
+ protected computeNodes(target: any): Node[];
2387
+ /**
2388
+ * Begins observation of the nodes.
2389
+ * @param target - The target to observe.
2390
+ */
2391
+ protected abstract observe(target: any): void;
2392
+ /**
2393
+ * Disconnects observation of the nodes.
2394
+ * @param target - The target to unobserve.
2395
+ */
2396
+ protected abstract disconnect(target: any): void;
2397
+ /**
2398
+ * Retrieves the raw nodes that should be assigned to the source property.
2399
+ * @param target - The target to get the node to.
2400
+ */
2401
+ protected abstract getNodes(target: any): Node[];
2402
+ }
2403
+
2404
+ /**
2405
+ * Normalizes the input value into a binding.
2406
+ * @param value - The value to create the default binding for.
2407
+ * @returns A binding configuration for the provided value.
2408
+ * @public
2409
+ */
2410
+ export declare function normalizeBinding<TSource = any, TReturn = any, TParent = any>(value: Expression<TSource, TReturn, TParent> | Binding<TSource, TReturn, TParent> | {}): Binding<TSource, TReturn, TParent>;
2411
+
2412
+ /**
2413
+ * Provides change notifications for an observed subject.
2414
+ * @public
2415
+ */
2416
+ export declare interface Notifier {
2417
+ /**
2418
+ * The object that subscribers will receive notifications for.
2419
+ */
2420
+ readonly subject: any;
2421
+ /**
2422
+ * Notifies all subscribers, based on the args.
2423
+ * @param args - Data passed along to subscribers during notification.
2424
+ * @remarks
2425
+ * In some implementations, the args may be used to target specific subscribers.
2426
+ * This is usually in the case where a propertyName was passed during subscription.
2427
+ */
2428
+ notify(args: any): void;
2429
+ /**
2430
+ * Subscribes to notification of changes in an object's state.
2431
+ * @param subscriber - The object that is subscribing for change notification.
2432
+ * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.
2433
+ * @remarks
2434
+ * Some implementation may or may not require the propertyToWatch.
2435
+ */
2436
+ subscribe(subscriber: Subscriber, propertyToWatch?: any): void;
2437
+ /**
2438
+ * Unsubscribes from notification of changes in an object's state.
2439
+ * @param subscriber - The object that is unsubscribing from change notification.
2440
+ * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.
2441
+ * @remarks
2442
+ * Some implementation may or may not require the propertyToUnwatch.
2443
+ */
2444
+ unsubscribe(subscriber: Subscriber, propertyToUnwatch?: any): void;
2445
+ }
2446
+
2447
+ /**
2448
+ * A {@link ValueConverter} that converts to and from `boolean` values. `null`, `undefined`, `""`,
2449
+ * and `void` values are converted to `null`.
2450
+ * @public
2451
+ */
2452
+ export declare const nullableBooleanConverter: ValueConverter;
2453
+
2454
+ /**
2455
+ * A {@link ValueConverter} that converts to and from `number` values.
2456
+ * @remarks
2457
+ * This converter allows for nullable numbers, returning `null` if the
2458
+ * input was `null`, `undefined`, or `NaN`.
2459
+ * @public
2460
+ */
2461
+ export declare const nullableNumberConverter: ValueConverter;
2462
+
2463
+ /**
2464
+ * Common Observable APIs.
2465
+ * @public
2466
+ */
2467
+ export declare const Observable: Readonly<{
2468
+ /**
2469
+ * @internal
2470
+ * @param factory - The factory used to create array observers.
2471
+ */
2472
+ setArrayObserverFactory(factory: (collection: any[]) => Notifier): void;
2473
+ /**
2474
+ * Gets a notifier for an object or Array.
2475
+ * @param source - The object or Array to get the notifier for.
2476
+ */
2477
+ getNotifier: <T extends Notifier = Notifier>(source: any) => T;
2478
+ /**
2479
+ * Records a property change for a source object.
2480
+ * @param source - The object to record the change against.
2481
+ * @param propertyName - The property to track as changed.
2482
+ */
2483
+ track(source: unknown, propertyName: string): void;
2484
+ /**
2485
+ * Notifies watchers that the currently executing property getter or function is volatile
2486
+ * with respect to its observable dependencies.
2487
+ */
2488
+ trackVolatile(): void;
2489
+ /**
2490
+ * Notifies subscribers of a source object of changes.
2491
+ * @param source - the object to notify of changes.
2492
+ * @param args - The change args to pass to subscribers.
2493
+ */
2494
+ notify(source: unknown, args: any): void;
2495
+ /**
2496
+ * Defines an observable property on an object or prototype.
2497
+ * @param target - The target object to define the observable on.
2498
+ * @param nameOrAccessor - The name of the property to define as observable;
2499
+ * or a custom accessor that specifies the property name and accessor implementation.
2500
+ */
2501
+ defineProperty(target: {}, nameOrAccessor: string | Accessor): void;
2502
+ /**
2503
+ * Finds all the observable accessors defined on the target,
2504
+ * including its prototype chain.
2505
+ * @param target - The target object to search for accessor on.
2506
+ */
2507
+ getAccessors: (target: {}) => Accessor[];
2508
+ /**
2509
+ * Creates a {@link ExpressionNotifier} that can watch the
2510
+ * provided {@link Expression} for changes.
2511
+ * @param expression - The binding to observe.
2512
+ * @param initialSubscriber - An initial subscriber to changes in the binding value.
2513
+ * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
2514
+ */
2515
+ binding<TSource = any, TReturn = any>(expression: Expression<TSource, TReturn>, initialSubscriber?: Subscriber, isVolatileBinding?: boolean): ExpressionNotifier<TSource, TReturn>;
2516
+ /**
2517
+ * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
2518
+ * on every evaluation of the value.
2519
+ * @param expression - The binding to inspect.
2520
+ */
2521
+ isVolatileBinding<TSource = any, TReturn = any>(expression: Expression<TSource, TReturn>): boolean;
2522
+ }>;
2523
+
2524
+ /**
2525
+ * Decorator: Defines an observable property on the target.
2526
+ * @param target - The target to define the observable on.
2527
+ * @param nameOrAccessor - The property name or accessor to define the observable as.
2528
+ * @public
2529
+ */
2530
+ export declare function observable(target: {}, nameOrAccessor: string | Accessor): void;
2531
+
2532
+ /**
2533
+ * A record of observable property access.
2534
+ * @public
2535
+ */
2536
+ export declare interface ObservationRecord {
2537
+ /**
2538
+ * The source object with an observable property that was accessed.
2539
+ */
2540
+ propertySource: any;
2541
+ /**
2542
+ * The name of the observable property on {@link ObservationRecord.propertySource} that was accessed.
2543
+ */
2544
+ propertyName: string;
2545
+ }
2546
+
2547
+ /**
2548
+ * Creates a one time binding
2549
+ * @param expression - The binding to refresh when signaled.
2550
+ * @param policy - The security policy to associate with th binding.
2551
+ * @returns A binding configuration.
2552
+ * @public
2553
+ */
2554
+ export declare function oneTime<T = any>(expression: Expression<T>, policy?: DOMPolicy): Binding<T>;
2555
+
2556
+ /**
2557
+ * Creates an standard binding.
2558
+ * @param expression - The binding to refresh when changed.
2559
+ * @param policy - The security policy to associate with th binding.
2560
+ * @param isVolatile - Indicates whether the binding is volatile or not.
2561
+ * @returns A binding configuration.
2562
+ * @public
2563
+ */
2564
+ export declare function oneWay<T = any>(expression: Expression<T>, policy?: DOMPolicy, isVolatile?: boolean): Binding<T>;
2565
+
2566
+ /**
2567
+ * A read/write stateful value associated with an owner.
2568
+ * @beta
2569
+ */
2570
+ export declare type OwnedState<T> = ReadonlyOwnedState<T> & {
2571
+ /**
2572
+ * Sets
2573
+ * @param owner - The object to set the state for the owner.
2574
+ * @param value - The new state value.
2575
+ */
2576
+ set(owner: any, value: T): void;
2577
+ /**
2578
+ * Creates a readonly version of the state.
2579
+ */
2580
+ asReadonly(): ReadonlyOwnedState<T>;
2581
+ };
2582
+
2583
+ /**
2584
+ * Creates a reactive state that has its value associated with a specific owner.
2585
+ * @param value - The initial value or a factory that provides an initial value for each owner.
2586
+ * @param options - Options to customize the state or a friendly name.
2587
+ * @returns An OwnedState instance.
2588
+ * @beta
2589
+ */
2590
+ export declare function ownedState<T>(value: T | (() => T), options?: string | StateOptions): OwnedState<T>;
2591
+
2592
+ /**
2593
+ * Common APIs related to content parsing.
2594
+ * @public
2595
+ */
2596
+ export declare const Parser: Readonly<{
2597
+ /**
2598
+ * Parses text content or HTML attribute content, separating out the static strings
2599
+ * from the directives.
2600
+ * @param value - The content or attribute string to parse.
2601
+ * @param factories - A list of directives to search for in the string.
2602
+ * @returns A heterogeneous array of static strings interspersed with
2603
+ * directives or null if no directives are found in the string.
2604
+ */
2605
+ parse(value: string, factories: Record<string, ViewBehaviorFactory>): (string | ViewBehaviorFactory)[] | null;
2606
+ }>;
2607
+
2608
+ /**
2609
+ * Represents metadata configuration for a custom element.
2610
+ * @public
2611
+ */
2612
+ export declare interface PartialFASTElementDefinition<TType extends Constructable<HTMLElement> = Constructable<HTMLElement>> {
2613
+ /**
2614
+ * The name of the custom element.
2615
+ */
2616
+ readonly name: string;
2617
+ /**
2618
+ * The template, or template resolver, for the custom element.
2619
+ */
2620
+ readonly template?: ElementViewTemplate<InstanceType<TType>> | FASTElementTemplateResolver<TType>;
2621
+ /**
2622
+ * The styles to associate with the custom element.
2623
+ */
2624
+ readonly styles?: ComposableStyles | ComposableStyles[];
2625
+ /**
2626
+ * The custom attributes of the custom element.
2627
+ */
2628
+ readonly attributes?: (AttributeConfiguration | string)[];
2629
+ /**
2630
+ * Options controlling the creation of the custom element's shadow DOM.
2631
+ * @remarks
2632
+ * If not provided, defaults to an open shadow root. Provide null
2633
+ * to render to the associated template to the light DOM instead.
2634
+ */
2635
+ readonly shadowOptions?: Partial<ShadowRootOptions> | null;
2636
+ /**
2637
+ * Options controlling how the custom element is defined with the platform.
2638
+ */
2639
+ readonly elementOptions?: ElementDefinitionOptions;
2640
+ /**
2641
+ * The registry to register this component in by default.
2642
+ * @remarks
2643
+ * If not provided, defaults to the global registry.
2644
+ */
2645
+ readonly registry?: CustomElementRegistry;
2646
+ /**
2647
+ * The optional schema associated with the custom element definition.
2648
+ * Declarative templates assign this automatically during template resolution.
2649
+ * Non-declarative callers can provide one for schema-driven extensions.
2650
+ */
2651
+ readonly schema?: Schema;
2652
+ }
2653
+
2654
+ /**
2655
+ * Represents metadata configuration for an HTMLDirective.
2656
+ * @public
2657
+ */
2658
+ export declare interface PartialHTMLDirectiveDefinition {
2659
+ /**
2660
+ * Indicates whether the directive needs access to template contextual information
2661
+ * such as the sourceAspect, targetAspect, and aspectType.
2662
+ */
2663
+ aspected?: boolean;
2664
+ }
2665
+
2666
+ /**
2667
+ * An implementation of Notifier that allows subscribers to be notified
2668
+ * of individual property changes on an object.
2669
+ * @public
2670
+ */
2671
+ export declare class PropertyChangeNotifier implements Notifier {
2672
+ private subscribers;
2673
+ private subjectSubscribers;
2674
+ /**
2675
+ * The subject that property changes are being notified for.
2676
+ */
2677
+ readonly subject: any;
2678
+ /**
2679
+ * Creates an instance of PropertyChangeNotifier for the specified subject.
2680
+ * @param subject - The object that subscribers will receive notifications for.
2681
+ */
2682
+ constructor(subject: any);
2683
+ /**
2684
+ * Notifies all subscribers, based on the specified property.
2685
+ * @param propertyName - The property name, passed along to subscribers during notification.
2686
+ */
2687
+ notify(propertyName: string): void;
2688
+ /**
2689
+ * Subscribes to notification of changes in an object's state.
2690
+ * @param subscriber - The object that is subscribing for change notification.
2691
+ * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.
2692
+ */
2693
+ subscribe(subscriber: Subscriber, propertyToWatch?: string): void;
2694
+ /**
2695
+ * Unsubscribes from notification of changes in an object's state.
2696
+ * @param subscriber - The object that is unsubscribing from change notification.
2697
+ * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.
2698
+ */
2699
+ unsubscribe(subscriber: Subscriber, propertyToUnwatch?: string): void;
2700
+ }
2701
+
2702
+ /**
2703
+ * Converts a plain object to a reactive, observable object.
2704
+ * @param object - The object to make reactive.
2705
+ * @param deep - Indicates whether or not to deeply convert the oject.
2706
+ * @returns The converted object.
2707
+ * @beta
2708
+ */
2709
+ export declare function reactive<T>(object: T, deep?: boolean): T;
2710
+
2711
+ /**
2712
+ * A readonly stateful value associated with an object owner.
2713
+ * @beta
2714
+ */
2715
+ export declare type ReadonlyOwnedState<T> = {
2716
+ /**
2717
+ * Gets the current stateful value for the owner.
2718
+ */
2719
+ (owner: any): T;
2720
+ };
2721
+
2722
+ /**
2723
+ * A readonly stateful value.
2724
+ * @beta
2725
+ */
2726
+ export declare type ReadonlyState<T> = {
2727
+ /**
2728
+ * Gets the current state value.
2729
+ */
2730
+ (): T;
2731
+ /**
2732
+ * Gets the current state value.
2733
+ */
2734
+ readonly current: T;
2735
+ };
2736
+
2737
+ /**
2738
+ * A directive that observes the updates a property with a reference to the element.
2739
+ * @param propertyName - The name of the property to assign the reference to.
2740
+ * @public
2741
+ */
2742
+ export declare const ref: <TSource = any, TParent = any>(propertyName: keyof TSource & string) => CaptureType<TSource, TParent>;
2743
+
2744
+ /**
2745
+ * The runtime behavior for template references.
2746
+ * @public
2747
+ */
2748
+ export declare class RefDirective extends StatelessAttachedAttributeDirective<string> {
2749
+ /**
2750
+ * The structural id of the DOM node to which the created behavior will apply.
2751
+ */
2752
+ targetNodeId: string;
2753
+ /**
2754
+ * Bind this behavior.
2755
+ * @param controller - The view controller that manages the lifecycle of this behavior.
2756
+ */
2757
+ bind(controller: ViewController): void;
2758
+ }
2759
+
2760
+ /**
2761
+ * Configuration for registering a path with a schema.
2762
+ * @public
2763
+ */
2764
+ export declare interface RegisterPathConfig {
2765
+ rootPropertyName: string;
2766
+ pathConfig: CachedPath;
2767
+ childrenMap: ChildrenMap | null;
2768
+ }
2769
+
2770
+ /**
2771
+ * Creates a RenderDirective for use in advanced rendering scenarios.
2772
+ * @param value - The binding expression that returns the data to be rendered. The expression
2773
+ * can also return a Node to render directly.
2774
+ * @param template - A template to render the data with
2775
+ * or a string to indicate which RenderInstruction to use when looking up a RenderInstruction.
2776
+ * Expressions can also be provided to dynamically determine either the template or the name.
2777
+ * @returns A RenderDirective suitable for use in a template.
2778
+ * @remarks
2779
+ * If no binding is provided, then a default binding that returns the source is created.
2780
+ * If no template is provided, then a binding is created that will use registered
2781
+ * RenderInstructions to determine the view.
2782
+ * If the template binding returns a string, then it will be used to look up a
2783
+ * RenderInstruction to determine the view.
2784
+ * @public
2785
+ */
2786
+ export declare function render<TSource = any, TItem = any, TParent = any>(value?: Expression<TSource, TItem> | Binding<TSource, TItem> | {}, template?: ContentTemplate | string | Expression<TSource, ContentTemplate | string | Node, TParent> | Binding<TSource, ContentTemplate | string | Node, TParent>): CaptureType<TSource, TParent>;
2787
+
2788
+ /**
2789
+ * A Behavior that enables advanced rendering.
2790
+ * @public
2791
+ */
2792
+ export declare class RenderBehavior<TSource = any> implements ViewBehavior, Subscriber {
2793
+ private directive;
2794
+ private location;
2795
+ private controller;
2796
+ private view;
2797
+ private template;
2798
+ private templateBindingObserver;
2799
+ private data;
2800
+ private dataBindingObserver;
2801
+ /**
2802
+ * Creates an instance of RenderBehavior.
2803
+ * @param directive - The render directive that created this behavior.
2804
+ */
2805
+ constructor(directive: RenderDirective);
2806
+ /**
2807
+ * Bind this behavior.
2808
+ * @param controller - The view controller that manages the lifecycle of this behavior.
2809
+ */
2810
+ bind(controller: ViewController): void;
2811
+ /**
2812
+ * Unbinds this behavior.
2813
+ * @param controller - The view controller that manages the lifecycle of this behavior.
2814
+ */
2815
+ unbind(controller: ViewController): void;
2816
+ /**
2817
+ * Handles changes from data or template binding observers.
2818
+ * Guards against stale notifications that may arrive after the
2819
+ * controller's view has been unbound (e.g., when a parent `when`
2820
+ * directive tears down and later recreates a child element).
2821
+ * @internal
2822
+ */
2823
+ handleChange(source: any, observer: ExpressionObserver): void;
2824
+ private bindView;
2825
+ private refreshView;
2826
+ }
2827
+
2828
+ /**
2829
+ * A Directive that enables use of the RenderBehavior.
2830
+ * @public
2831
+ */
2832
+ export declare class RenderDirective<TSource = any> implements HTMLDirective, ViewBehaviorFactory, BindingDirective {
2833
+ readonly dataBinding: Binding<TSource>;
2834
+ readonly templateBinding: Binding<TSource, ContentTemplate>;
2835
+ readonly templateBindingDependsOnData: boolean;
2836
+ /**
2837
+ * The structural id of the DOM node to which the created behavior will apply.
2838
+ */
2839
+ targetNodeId: string;
2840
+ /**
2841
+ * Creates an instance of RenderDirective.
2842
+ * @param dataBinding - A binding expression that returns the data to render.
2843
+ * @param templateBinding - A binding expression that returns the template to use to render the data.
2844
+ */
2845
+ constructor(dataBinding: Binding<TSource>, templateBinding: Binding<TSource, ContentTemplate>, templateBindingDependsOnData: boolean);
2846
+ /**
2847
+ * Creates HTML to be used within a template.
2848
+ * @param add - Can be used to add behavior factories to a template.
2849
+ */
2850
+ createHTML(add: AddViewBehaviorFactory): string;
2851
+ /**
2852
+ * Creates a behavior.
2853
+ * @param targets - The targets available for behaviors to be attached to.
2854
+ */
2855
+ createBehavior(): RenderBehavior<TSource>;
2856
+ }
2857
+
2858
+ /**
2859
+ * A directive that enables list rendering.
2860
+ * @param items - The array to render.
2861
+ * @param template - The template or a template binding used obtain a template
2862
+ * to render for each item in the array.
2863
+ * @param options - Options used to turn on special repeat features.
2864
+ * @public
2865
+ */
2866
+ export declare 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>;
2867
+
2868
+ /**
2869
+ * A behavior that renders a template for each item in an array.
2870
+ * @public
2871
+ */
2872
+ export declare class RepeatBehavior<TSource = any> implements ViewBehavior, Subscriber {
2873
+ private directive;
2874
+ private location;
2875
+ private controller;
2876
+ private isBound;
2877
+ private template;
2878
+ private templateBindingObserver;
2879
+ private items;
2880
+ private itemsObserver;
2881
+ private itemsBindingObserver;
2882
+ private bindView;
2883
+ /** @internal */
2884
+ views: SyntheticView[];
2885
+ /**
2886
+ * Creates an instance of RepeatBehavior.
2887
+ * @param location - The location in the DOM to render the repeat.
2888
+ * @param dataBinding - The array to render.
2889
+ * @param isItemsBindingVolatile - Indicates whether the items binding has volatile dependencies.
2890
+ * @param templateBinding - The template to render for each item.
2891
+ * @param isTemplateBindingVolatile - Indicates whether the template binding has volatile dependencies.
2892
+ * @param options - Options used to turn on special repeat features.
2893
+ */
2894
+ constructor(directive: RepeatDirective);
2895
+ /**
2896
+ * Bind this behavior.
2897
+ * @param controller - The view controller that manages the lifecycle of this behavior.
2898
+ */
2899
+ bind(controller: ViewController): void;
2900
+ /**
2901
+ * Unbinds this behavior.
2902
+ */
2903
+ unbind(): void;
2904
+ /**
2905
+ * Handles changes in the array, its items, and the repeat template.
2906
+ * @param source - The source of the change.
2907
+ * @param args - The details about what was changed.
2908
+ */
2909
+ handleChange(source: any, args: Splice[] | Sort[] | ExpressionObserver): void;
2910
+ private observeItems;
2911
+ private updateSortedViews;
2912
+ private updateSplicedViews;
2913
+ private refreshAllViews;
2914
+ private unbindAllViews;
2915
+ private hydrateViews;
2916
+ }
2917
+
2918
+ /**
2919
+ * A path discovered from a repeat directive.
2920
+ * @public
2921
+ */
2922
+ export declare interface RepeatCachedPath extends CachedPathCommon {
2923
+ type: "repeat";
2924
+ }
2925
+
2926
+ /**
2927
+ * A directive that configures list rendering.
2928
+ * @public
2929
+ */
2930
+ export declare class RepeatDirective<TSource = any> implements HTMLDirective, ViewBehaviorFactory, BindingDirective {
2931
+ readonly dataBinding: Binding<TSource>;
2932
+ readonly templateBinding: Binding<TSource, SyntheticViewTemplate>;
2933
+ readonly options: RepeatOptions;
2934
+ /**
2935
+ * The structural id of the DOM node to which the created behavior will apply.
2936
+ */
2937
+ targetNodeId: string;
2938
+ /**
2939
+ * Creates a placeholder string based on the directive's index within the template.
2940
+ * @param index - The index of the directive within the template.
2941
+ */
2942
+ createHTML(add: AddViewBehaviorFactory): string;
2943
+ /**
2944
+ * Creates an instance of RepeatDirective.
2945
+ * @param dataBinding - The binding that provides the array to render.
2946
+ * @param templateBinding - The template binding used to obtain a template to render for each item in the array.
2947
+ * @param options - Options used to turn on special repeat features.
2948
+ */
2949
+ constructor(dataBinding: Binding<TSource>, templateBinding: Binding<TSource, SyntheticViewTemplate>, options: RepeatOptions);
2950
+ /**
2951
+ * Creates a behavior for the provided target node.
2952
+ * @param target - The node instance to create the behavior for.
2953
+ */
2954
+ createBehavior(): RepeatBehavior<TSource>;
2955
+ }
2956
+
2957
+ /**
2958
+ * Options for configuring repeat behavior.
2959
+ * @public
2960
+ */
2961
+ export declare interface RepeatOptions {
2962
+ /**
2963
+ * Enables index, length, and dependent positioning updates in item templates.
2964
+ */
2965
+ positioning?: boolean;
2966
+ /**
2967
+ * Enables view recycling
2968
+ */
2969
+ recycle?: boolean;
2970
+ }
2971
+
2972
+ /**
2973
+ * A constructed JSON schema from a template
2974
+ * @public
2975
+ */
2976
+ export declare class Schema {
2977
+ /**
2978
+ * The name of the custom element
2979
+ */
2980
+ private customElementName;
2981
+ /**
2982
+ * Instance-level JSON schema map describing each root property
2983
+ */
2984
+ private schemaMap;
2985
+ constructor(name: string);
2986
+ /**
2987
+ * Add a path to a schema
2988
+ * @param config - The path registration configuration.
2989
+ */
2990
+ addPath(config: RegisterPathConfig): void;
2991
+ /**
2992
+ * Gets the JSON schema for a property name
2993
+ * @param rootPropertyName - the root property the JSON schema is mapped to
2994
+ * @returns The JSON schema for the root property
2995
+ */
2996
+ getSchema(rootPropertyName: string): JSONSchema | null;
2997
+ /**
2998
+ * Gets root properties
2999
+ * @returns IterableIterator<string>
3000
+ */
3001
+ getRootProperties(): IterableIterator<string>;
3002
+ /**
3003
+ * Get a path split into property names
3004
+ * @param path - The dot syntax path, e.g. `a.b.c`.
3005
+ * @returns An array of items in the path
3006
+ */
3007
+ private getSplitPath;
3008
+ /**
3009
+ * Gets the path to the $def
3010
+ * @param context - The context name. For example, `item in items` creates the `item` context.
3011
+ * @returns A string to use as a $ref
3012
+ */
3013
+ private getDefsPath;
3014
+ /**
3015
+ * Get the schema $id
3016
+ * @param customElementName - The custom element name
3017
+ * @param propertyName - The property name
3018
+ * @returns The ID that can be used in the JSON schema as $id
3019
+ */
3020
+ private getSchemaId;
3021
+ /**
3022
+ * Add a new JSON schema to the JSON schema map
3023
+ * @param propertyName - The name of the property to assign this JSON schema to.
3024
+ */
3025
+ private addNewSchema;
3026
+ /**
3027
+ * Add properties to a context
3028
+ * @param schema - The schema to add the properties to.
3029
+ * @param splitPath - The path split into property/context names.
3030
+ * @param context - The path context.
3031
+ */
3032
+ private addPropertiesToAContext;
3033
+ /**
3034
+ * Add properties to an object
3035
+ * @param schema - The schema to add the properties to.
3036
+ * @param splitPath - The path split into property/context names.
3037
+ * @param context - The path context.
3038
+ * @param type - The data type (see JSON schema for details).
3039
+ */
3040
+ private addPropertiesToAnObject;
3041
+ /**
3042
+ * Add an array to an object property
3043
+ * @param schema - The schema to add the properties to.
3044
+ * @param context - The name of the context.
3045
+ */
3046
+ private addArrayToAnObject;
3047
+ /**
3048
+ * Add a context to the $defs property
3049
+ * @param schema - The schema to use.
3050
+ * @param propertyName - The name of the property the context belongs to.
3051
+ * @param currentContext - The current context.
3052
+ * @param parentContext - The parent context.
3053
+ * @returns
3054
+ */
3055
+ private addContext;
3056
+ /**
3057
+ * Get parent contexts
3058
+ * @param schema - The schema to use.
3059
+ * @param parentContext - The parent context.
3060
+ * @param contexts - A list of parent contexts.
3061
+ * @returns
3062
+ */
3063
+ private getParentContexts;
3064
+ }
3065
+
3066
+ /**
3067
+ * Module-level registry that maps custom element names to their schema maps.
3068
+ * Used for cross-element `$ref` resolution (e.g. nested element schemas).
3069
+ * Each Schema instance registers itself here on construction.
3070
+ * @public
3071
+ */
3072
+ export declare const schemaRegistry: CachedPathMap;
3073
+
3074
+ /**
3075
+ * Shadow root initialization options.
3076
+ * @public
3077
+ */
3078
+ export declare interface ShadowRootOptions extends ShadowRootInit {
3079
+ /**
3080
+ * A registry that provides the custom elements visible
3081
+ * from within this shadow root.
3082
+ * @beta
3083
+ */
3084
+ registry?: CustomElementRegistry;
3085
+ }
3086
+
3087
+ /**
3088
+ * The gateway to signal APIs.
3089
+ * @public
3090
+ */
3091
+ export declare const Signal: Readonly<{
3092
+ /**
3093
+ * Subscribes to a signal.
3094
+ * @param signal - The signal to subscribe to.
3095
+ * @param subscriber - The subscriber.
3096
+ */
3097
+ subscribe(signal: string, subscriber: Subscriber): void;
3098
+ /**
3099
+ * Unsubscribes from the signal.
3100
+ * @param signal - The signal to unsubscribe from.
3101
+ * @param subscriber - The subscriber.
3102
+ */
3103
+ unsubscribe(signal: string, subscriber: Subscriber): void;
3104
+ /**
3105
+ * Sends the specified signal to subscribers.
3106
+ * @param signal - The signal to send.
3107
+ */
3108
+ send(signal: string): void;
3109
+ }>;
3110
+
3111
+ /**
3112
+ * Creates a signal binding configuration with the supplied options.
3113
+ * @param expression - The binding to refresh when signaled.
3114
+ * @param options - The signal name or a binding to use to retrieve the signal name.
3115
+ * @param policy - The security policy to associate with th binding.
3116
+ * @returns A binding configuration.
3117
+ * @public
3118
+ */
3119
+ export declare function signal<T = any>(expression: Expression<T>, options: string | Expression<T>, policy?: DOMPolicy): Binding<T>;
3120
+
3121
+ /**
3122
+ * A directive that observes the `assignedNodes()` of a slot and updates a property
3123
+ * whenever they change.
3124
+ * @param propertyOrOptions - The options used to configure slotted node observation.
3125
+ * @public
3126
+ */
3127
+ export declare function slotted<TSource = any, TParent = any>(propertyOrOptions: (keyof TSource & string) | SlottedDirectiveOptions<keyof TSource & string>): CaptureType<TSource, TParent>;
3128
+
3129
+ /**
3130
+ * The runtime behavior for slotted node observation.
3131
+ * @public
3132
+ */
3133
+ export declare class SlottedDirective extends NodeObservationDirective<SlottedDirectiveOptions> {
3134
+ /**
3135
+ * Begins observation of the nodes.
3136
+ * @param target - The target to observe.
3137
+ */
3138
+ observe(target: EventSource): void;
3139
+ /**
3140
+ * Disconnects observation of the nodes.
3141
+ * @param target - The target to unobserve.
3142
+ */
3143
+ disconnect(target: EventSource): void;
3144
+ /**
3145
+ * Retrieves the raw nodes that should be assigned to the source property.
3146
+ * @param target - The target to get the node to.
3147
+ */
3148
+ getNodes(target: HTMLSlotElement): Node[];
3149
+ /** @internal */
3150
+ handleEvent(event: Event): void;
3151
+ }
3152
+
3153
+ /**
3154
+ * The options used to configure slotted node observation.
3155
+ * @public
3156
+ */
3157
+ export declare interface SlottedDirectiveOptions<T = any> extends NodeBehaviorOptions<T>, AssignedNodesOptions {
3158
+ }
3159
+
3160
+ /**
3161
+ * A sort array indicates new index positions of array items.
3162
+ * @public
3163
+ */
3164
+ export declare class Sort {
3165
+ sorted?: number[] | undefined;
3166
+ /**
3167
+ * Creates a sort update.
3168
+ * @param sorted - The updated index of sorted items.
3169
+ */
3170
+ constructor(sorted?: number[] | undefined);
3171
+ }
3172
+
3173
+ /**
3174
+ * Enables observing the sorted property of an array.
3175
+ * @param array - The array to observe the sorted property of.
3176
+ * @returns The sorted property.
3177
+ * @public
3178
+ */
3179
+ export declare function sortedCount<T>(array: readonly T[]): number;
3180
+
3181
+ /**
3182
+ * Observes array sort.
3183
+ * @public
3184
+ */
3185
+ export declare interface SortObserver extends Subscriber {
3186
+ /**
3187
+ * The sorted times on the observed array, this should be incremented every time
3188
+ * an item in the array changes location.
3189
+ */
3190
+ sorted: number;
3191
+ }
3192
+
3193
+ /**
3194
+ * Describes how the source's lifetime relates to its controller's lifetime.
3195
+ * @public
3196
+ */
3197
+ export declare const SourceLifetime: Readonly<{
3198
+ /**
3199
+ * The source to controller lifetime relationship is unknown.
3200
+ */
3201
+ readonly unknown: undefined;
3202
+ /**
3203
+ * The source and controller lifetimes are coupled to one another.
3204
+ * They can/will be GC'd together.
3205
+ */
3206
+ readonly coupled: 1;
3207
+ }>;
3208
+
3209
+ /**
3210
+ * Describes how the source's lifetime relates to its controller's lifetime.
3211
+ * @public
3212
+ */
3213
+ export declare type SourceLifetime = (typeof SourceLifetime)[keyof typeof SourceLifetime];
3214
+
3215
+ /**
3216
+ * A splice map is a representation of how a previous array of items
3217
+ * was transformed into a new array of items. Conceptually it is a list of
3218
+ * tuples of
3219
+ *
3220
+ * (index, removed, addedCount)
3221
+ *
3222
+ * which are kept in ascending index order of. The tuple represents that at
3223
+ * the |index|, |removed| sequence of items were removed, and counting forward
3224
+ * from |index|, |addedCount| items were added.
3225
+ * @public
3226
+ */
3227
+ export declare class Splice {
3228
+ index: number;
3229
+ removed: any[];
3230
+ addedCount: number;
3231
+ /**
3232
+ * Indicates that this splice represents a complete array reset.
3233
+ */
3234
+ reset?: boolean;
3235
+ /**
3236
+ * Creates a splice.
3237
+ * @param index - The index that the splice occurs at.
3238
+ * @param removed - The items that were removed.
3239
+ * @param addedCount - The number of items that were added.
3240
+ */
3241
+ constructor(index: number, removed: any[], addedCount: number);
3242
+ /**
3243
+ * Adjusts the splice index based on the provided array.
3244
+ * @param array - The array to adjust to.
3245
+ * @returns The same splice, mutated based on the reference array.
3246
+ */
3247
+ adjustTo(array: any[]): this;
3248
+ }
3249
+
3250
+ /**
3251
+ * An approach to tracking changes in an array.
3252
+ * @public
3253
+ */
3254
+ export declare interface SpliceStrategy {
3255
+ /**
3256
+ * The level of feature support the splice strategy provides.
3257
+ */
3258
+ readonly support: SpliceStrategySupport;
3259
+ /**
3260
+ * Normalizes the splices before delivery to array change subscribers.
3261
+ * @param previous - The previous version of the array if a reset has taken place.
3262
+ * @param current - The current version of the array.
3263
+ * @param changes - The set of changes tracked against the array.
3264
+ */
3265
+ normalize(previous: unknown[] | undefined, current: unknown[], changes: Splice[] | undefined): readonly Splice[];
3266
+ /**
3267
+ * Performs and tracks a pop operation on an array.
3268
+ * @param array - The array to track the change for.
3269
+ * @param observer - The observer to register the change with.
3270
+ * @param pop - The operation to perform.
3271
+ * @param args - The arguments for the operation.
3272
+ */
3273
+ pop(array: any[], observer: ArrayObserver, pop: typeof Array.prototype.pop, args: any[]): any;
3274
+ /**
3275
+ * Performs and tracks a push operation on an array.
3276
+ * @param array - The array to track the change for.
3277
+ * @param observer - The observer to register the change with.
3278
+ * @param push - The operation to perform.
3279
+ * @param args - The arguments for the operation.
3280
+ */
3281
+ push(array: any[], observer: ArrayObserver, push: typeof Array.prototype.push, args: any[]): any;
3282
+ /**
3283
+ * Performs and tracks a reverse operation on an array.
3284
+ * @param array - The array to track the change for.
3285
+ * @param observer - The observer to register the change with.
3286
+ * @param reverse - The operation to perform.
3287
+ * @param args - The arguments for the operation.
3288
+ */
3289
+ reverse(array: any[], observer: ArrayObserver, reverse: typeof Array.prototype.reverse, args: any[]): any;
3290
+ /**
3291
+ * Performs and tracks a shift operation on an array.
3292
+ * @param array - The array to track the change for.
3293
+ * @param observer - The observer to register the change with.
3294
+ * @param shift - The operation to perform.
3295
+ * @param args - The arguments for the operation.
3296
+ */
3297
+ shift(array: any[], observer: ArrayObserver, shift: typeof Array.prototype.shift, args: any[]): any;
3298
+ /**
3299
+ * Performs and tracks a sort operation on an array.
3300
+ * @param array - The array to track the change for.
3301
+ * @param observer - The observer to register the change with.
3302
+ * @param sort - The operation to perform.
3303
+ * @param args - The arguments for the operation.
3304
+ */
3305
+ sort(array: any[], observer: ArrayObserver, sort: typeof Array.prototype.sort, args: any[]): any[];
3306
+ /**
3307
+ * Performs and tracks a splice operation on an array.
3308
+ * @param array - The array to track the change for.
3309
+ * @param observer - The observer to register the change with.
3310
+ * @param splice - The operation to perform.
3311
+ * @param args - The arguments for the operation.
3312
+ */
3313
+ splice(array: any[], observer: ArrayObserver, splice: typeof Array.prototype.splice, args: any[]): any;
3314
+ /**
3315
+ * Performs and tracks an unshift operation on an array.
3316
+ * @param array - The array to track the change for.
3317
+ * @param observer - The observer to register the change with.
3318
+ * @param unshift - The operation to perform.
3319
+ * @param args - The arguments for the operation.
3320
+ */
3321
+ unshift(array: any[], observer: ArrayObserver, unshift: typeof Array.prototype.unshift, args: any[]): any[];
3322
+ }
3323
+
3324
+ /**
3325
+ * Functionality related to tracking changes in arrays.
3326
+ * @public
3327
+ */
3328
+ export declare const SpliceStrategy: Readonly<{
3329
+ /**
3330
+ * A set of changes that represent a full array reset.
3331
+ */
3332
+ readonly reset: Splice[];
3333
+ /**
3334
+ * Sets the default strategy to use for array observers.
3335
+ * @param strategy - The splice strategy to use.
3336
+ */
3337
+ readonly setDefaultStrategy: (strategy: SpliceStrategy) => void;
3338
+ }>;
3339
+
3340
+ /**
3341
+ * Indicates what level of feature support the splice
3342
+ * strategy provides.
3343
+ * @public
3344
+ */
3345
+ export declare const SpliceStrategySupport: Readonly<{
3346
+ /**
3347
+ * Only supports resets.
3348
+ */
3349
+ readonly reset: 1;
3350
+ /**
3351
+ * Supports tracking splices and resets.
3352
+ */
3353
+ readonly splice: 2;
3354
+ /**
3355
+ * Supports tracking splices and resets, while applying some form
3356
+ * of optimization, such as merging, to the splices.
3357
+ */
3358
+ readonly optimized: 3;
3359
+ }>;
3360
+
3361
+ /**
3362
+ * The available values for SpliceStrategySupport.
3363
+ * @public
3364
+ */
3365
+ export declare type SpliceStrategySupport = (typeof SpliceStrategySupport)[keyof typeof SpliceStrategySupport];
3366
+
3367
+ /**
3368
+ * The various lifecycle stages of an ElementController.
3369
+ * @public
3370
+ */
3371
+ export declare const enum Stages {
3372
+ /** The element is in the process of connecting. */
3373
+ connecting = 0,
3374
+ /** The element is connected. */
3375
+ connected = 1,
3376
+ /** The element is in the process of disconnecting. */
3377
+ disconnecting = 2,
3378
+ /** The element is disconnected. */
3379
+ disconnected = 3
3380
+ }
3381
+
3382
+ /**
3383
+ * A read/write stateful value.
3384
+ * @beta
3385
+ */
3386
+ export declare type State<T> = ReadonlyState<T> & {
3387
+ /**
3388
+ * Gets or sets the current state value.
3389
+ */
3390
+ current: T;
3391
+ /**
3392
+ * Sets the current state value.
3393
+ * @param value - The new state value.
3394
+ */
3395
+ set(value: T): void;
3396
+ /**
3397
+ * Creates a readonly version of the state.
3398
+ */
3399
+ asReadonly(): ReadonlyState<T>;
3400
+ };
3401
+
3402
+ /**
3403
+ * Creates a reactive state value.
3404
+ * @param value - The initial state value.
3405
+ * @param options - Options to customize the state or a friendly name.
3406
+ * @returns A State instance.
3407
+ * @beta
3408
+ */
3409
+ export declare function state<T>(value: T, options?: string | StateOptions): State<T>;
3410
+
3411
+ /**
3412
+ * A base class used for attribute directives that don't need internal state.
3413
+ * @public
3414
+ */
3415
+ export declare abstract class StatelessAttachedAttributeDirective<TOptions> implements HTMLDirective, ViewBehaviorFactory, ViewBehavior {
3416
+ protected options: TOptions;
3417
+ /**
3418
+ * Creates an instance of RefDirective.
3419
+ * @param options - The options to use in configuring the directive.
3420
+ */
3421
+ constructor(options: TOptions);
3422
+ /**
3423
+ * Creates a placeholder string based on the directive's index within the template.
3424
+ * @param index - The index of the directive within the template.
3425
+ * @remarks
3426
+ * Creates a custom attribute placeholder.
3427
+ */
3428
+ createHTML(add: AddViewBehaviorFactory): string;
3429
+ /**
3430
+ * Creates a behavior.
3431
+ * @param targets - The targets available for behaviors to be attached to.
3432
+ */
3433
+ createBehavior(): ViewBehavior;
3434
+ /**
3435
+ * Bind this behavior.
3436
+ * @param controller - The view controller that manages the lifecycle of this behavior.
3437
+ */
3438
+ abstract bind(controller: ViewController): void;
3439
+ }
3440
+
3441
+ /**
3442
+ * Options for creating state.
3443
+ * @beta
3444
+ */
3445
+ export declare type StateOptions = {
3446
+ /**
3447
+ * Indicates whether to deeply make the state value observable.
3448
+ */
3449
+ deep?: boolean;
3450
+ /**
3451
+ * A friendly name for the state.
3452
+ */
3453
+ name?: string;
3454
+ };
3455
+
3456
+ /**
3457
+ * Implemented to provide specific behavior when adding/removing styles
3458
+ * for elements.
3459
+ * @public
3460
+ */
3461
+ export declare interface StyleStrategy {
3462
+ /**
3463
+ * Adds styles to the target.
3464
+ * @param target - The target to add the styles to.
3465
+ */
3466
+ addStylesTo(target: StyleTarget): void;
3467
+ /**
3468
+ * Removes styles from the target.
3469
+ * @param target - The target to remove the styles from.
3470
+ */
3471
+ removeStylesFrom(target: StyleTarget): void;
3472
+ }
3473
+
3474
+ /**
3475
+ * A node that can be targeted by styles.
3476
+ * @public
3477
+ */
3478
+ export declare interface StyleTarget extends Pick<Node, "getRootNode"> {
3479
+ /**
3480
+ * Stylesheets to be adopted by the node.
3481
+ */
3482
+ adoptedStyleSheets?: CSSStyleSheet[];
3483
+ /**
3484
+ * Adds styles to the target by appending the styles.
3485
+ * @param styles - The styles element to add.
3486
+ */
3487
+ append(styles: HTMLStyleElement): void;
3488
+ /**
3489
+ * Removes styles from the target.
3490
+ * @param styles - The styles element to remove.
3491
+ */
3492
+ removeChild(styles: HTMLStyleElement): void;
3493
+ /**
3494
+ * Returns all element descendants of node that match selectors.
3495
+ * @param selectors - The CSS selector to use for the query.
3496
+ */
3497
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
3498
+ }
3499
+
3500
+ /**
3501
+ * Implemented by objects that are interested in change notifications.
3502
+ * @public
3503
+ */
3504
+ export declare interface Subscriber {
3505
+ /**
3506
+ * Called when a subject this instance has subscribed to changes.
3507
+ * @param subject - The subject of the change.
3508
+ * @param args - The event args detailing the change that occurred.
3509
+ */
3510
+ handleChange(subject: any, args: any): void;
3511
+ }
3512
+
3513
+ /**
3514
+ * An implementation of {@link Notifier} that efficiently keeps track of
3515
+ * subscribers interested in a specific change notification on an
3516
+ * observable subject.
3517
+ *
3518
+ * @remarks
3519
+ * This set is optimized for the most common scenario of 1 or 2 subscribers.
3520
+ * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.
3521
+ * If the set ever exceeds two subscribers, it upgrades to an array automatically.
3522
+ * @public
3523
+ */
3524
+ export declare class SubscriberSet implements Notifier {
3525
+ private sub1;
3526
+ private sub2;
3527
+ private spillover;
3528
+ /**
3529
+ * The object that subscribers will receive notifications for.
3530
+ */
3531
+ readonly subject: any;
3532
+ /**
3533
+ * Creates an instance of SubscriberSet for the specified subject.
3534
+ * @param subject - The subject that subscribers will receive notifications from.
3535
+ * @param initialSubscriber - An initial subscriber to changes.
3536
+ */
3537
+ constructor(subject: any, initialSubscriber?: Subscriber);
3538
+ /**
3539
+ * Checks whether the provided subscriber has been added to this set.
3540
+ * @param subscriber - The subscriber to test for inclusion in this set.
3541
+ */
3542
+ has(subscriber: Subscriber): boolean;
3543
+ /**
3544
+ * Subscribes to notification of changes in an object's state.
3545
+ * @param subscriber - The object that is subscribing for change notification.
3546
+ */
3547
+ subscribe(subscriber: Subscriber): void;
3548
+ /**
3549
+ * Unsubscribes from notification of changes in an object's state.
3550
+ * @param subscriber - The object that is unsubscribing from change notification.
3551
+ */
3552
+ unsubscribe(subscriber: Subscriber): void;
3553
+ /**
3554
+ * Notifies all subscribers.
3555
+ * @param args - Data passed along to subscribers during notification.
3556
+ */
3557
+ notify(args: any): void;
3558
+ }
3559
+
3560
+ /**
3561
+ * The options used to configure subtree observation.
3562
+ * @public
3563
+ */
3564
+ export declare interface SubtreeDirectiveOptions<T = any> extends NodeBehaviorOptions<T>, Omit<MutationObserverInit, "subtree" | "childList"> {
3565
+ /**
3566
+ * Indicates that child subtrees should be observed for changes.
3567
+ */
3568
+ subtree: boolean;
3569
+ /**
3570
+ * When subtrees are observed, a query selector is required to indicate
3571
+ * which of potentially many nodes should be assigned to the property.
3572
+ */
3573
+ selector: string;
3574
+ }
3575
+
3576
+ /**
3577
+ * A view representing a range of DOM nodes which can be added/removed ad hoc.
3578
+ * @public
3579
+ */
3580
+ export declare interface SyntheticView<TSource = any, TParent = any> extends View<TSource, TParent> {
3581
+ /**
3582
+ * The first DOM node in the range of nodes that make up the view.
3583
+ */
3584
+ readonly firstChild: Node;
3585
+ /**
3586
+ * The last DOM node in the range of nodes that make up the view.
3587
+ */
3588
+ readonly lastChild: Node;
3589
+ /**
3590
+ * Inserts the view's DOM nodes before the referenced node.
3591
+ * @param node - The node to insert the view's DOM before.
3592
+ */
3593
+ insertBefore(node: Node): void;
3594
+ /**
3595
+ * Removes the view's DOM nodes.
3596
+ * The nodes are not disposed and the view can later be re-inserted.
3597
+ */
3598
+ remove(): void;
3599
+ }
3600
+
3601
+ /**
3602
+ * A template capable of rendering views not specifically connected to custom elements.
3603
+ * @public
3604
+ */
3605
+ export declare interface SyntheticViewTemplate<TSource = any, TParent = any> {
3606
+ /**
3607
+ * Creates a SyntheticView instance based on this template definition.
3608
+ */
3609
+ create(): SyntheticView<TSource, TParent>;
3610
+ /**
3611
+ * Returns a directive that can inline the template.
3612
+ */
3613
+ inline(): CaptureType<TSource, TParent>;
3614
+ }
3615
+
3616
+ /**
3617
+ * Represents the types of values that can be interpolated into a template.
3618
+ * @public
3619
+ */
3620
+ export declare type TemplateValue<TSource, TParent = any> = Expression<TSource, any, TParent> | Binding<TSource, any, TParent> | HTMLDirective | CaptureType<TSource, TParent>;
3621
+
3622
+ /**
3623
+ * A policy for use with the standard trustedTypes platform API.
3624
+ * @public
3625
+ */
3626
+ export declare type TrustedTypesPolicy = {
3627
+ /**
3628
+ * Creates trusted HTML.
3629
+ * @param html - The HTML to clear as trustworthy.
3630
+ */
3631
+ createHTML(html: string): string;
3632
+ };
3633
+
3634
+ /**
3635
+ * Extended emit options with trust signals.
3636
+ * @public
3637
+ */
3638
+ export declare interface TrustEmitOptions extends Omit<CustomEventInit, "detail">, TrustSignals {
3639
+ }
3640
+
3641
+ /**
3642
+ * Trust signals attached to component events.
3643
+ * @public
3644
+ */
3645
+ export declare interface TrustSignals {
3646
+ /** Confidence level 0-1. Higher = more certain. */
3647
+ confidence?: number;
3648
+ /** Human-readable explanation of why this event occurred. */
3649
+ reasoning?: string;
3650
+ /** Non-fatal issues to surface to the user. An empty array is preserved. */
3651
+ warnings?: Warning[];
3652
+ }
3653
+
3654
+ /**
3655
+ * Creates a default binding.
3656
+ * @param expression - The binding to refresh when changed.
3657
+ * @param optionsOrChangeEvent - The binding options or the name of the change event to use.
3658
+ * @param policy - The security policy to associate with the binding.
3659
+ * @param isBindingVolatile - Indicates whether the binding is volatile or not.
3660
+ * @returns A binding.
3661
+ * @public
3662
+ */
3663
+ export declare function twoWay<T = any>(expression: Expression<T>, optionsOrChangeEvent?: TwoWayBindingOptions | string, policy?: DOMPolicy, isBindingVolatile?: boolean): Binding<T>;
3664
+
3665
+ /**
3666
+ * The twoWay binding options.
3667
+ * @public
3668
+ */
3669
+ export declare type TwoWayBindingOptions = {
3670
+ changeEvent?: string;
3671
+ fromView?: (value: any) => any;
3672
+ };
3673
+
3674
+ /**
3675
+ * The settings required to enable two-way binding.
3676
+ * @public
3677
+ */
3678
+ export declare interface TwoWaySettings {
3679
+ /**
3680
+ * Determines which event to listen to, to detect changes in the view.
3681
+ * @param bindingSource - The directive to determine the change event for.
3682
+ * @param target - The target element to determine the change event for.
3683
+ */
3684
+ determineChangeEvent(bindingSource: BindingDirective, target: HTMLElement): string;
3685
+ }
3686
+
3687
+ /**
3688
+ * Enables configuring two-way binding settings.
3689
+ * @public
3690
+ */
3691
+ export declare const TwoWaySettings: Readonly<{
3692
+ /**
3693
+ * Configures two-way binding.
3694
+ * @param settings - The settings to use for the two-way binding system.
3695
+ */
3696
+ configure(settings: TwoWaySettings): void;
3697
+ }>;
3698
+
3699
+ /**
3700
+ * A type that can be registered with a `TypeRegistry`.
3701
+ * @public
3702
+ */
3703
+ export declare interface TypeDefinition {
3704
+ /**
3705
+ * The registered type constructor.
3706
+ */
3707
+ type: Function;
3708
+ }
3709
+
3710
+ /**
3711
+ * A registry that stores definitions by type.
3712
+ * @public
3713
+ */
3714
+ export declare interface TypeRegistry<TDefinition extends TypeDefinition> {
3715
+ /**
3716
+ * Registers a type definition.
3717
+ * @param definition - The type definition to register.
3718
+ * @returns `true` when the definition was registered, otherwise `false`.
3719
+ */
3720
+ register(definition: TDefinition): boolean;
3721
+ /**
3722
+ * Gets a definition by type.
3723
+ * @param key - The type to retrieve the definition for.
3724
+ */
3725
+ getByType(key: Function): TDefinition | undefined;
3726
+ /**
3727
+ * Gets a definition by instance.
3728
+ * @param object - The instance to retrieve the definition for.
3729
+ */
3730
+ getForInstance(object: any): TDefinition | undefined;
3731
+ }
3732
+
3733
+ /**
3734
+ * An extension of MutationObserver that supports unobserving nodes.
3735
+ * @internal
3736
+ */
3737
+ export declare class UnobservableMutationObserver extends MutationObserver {
3738
+ private readonly callback;
3739
+ private observedNodes;
3740
+ /**
3741
+ * Creates an instance of UnobservableMutationObserver.
3742
+ * @param callback - The callback to invoke when observed nodes are changed.
3743
+ */
3744
+ constructor(callback: MutationCallback);
3745
+ observe(target: Node, options?: MutationObserverInit | undefined): void;
3746
+ unobserve(target: Node): void;
3747
+ }
3748
+
3749
+ /**
3750
+ * A work queue used to synchronize writes to the DOM.
3751
+ * @public
3752
+ */
3753
+ export declare interface UpdateQueue {
3754
+ /**
3755
+ * Schedules DOM update work in the next batch.
3756
+ * @param callable - The callable function or object to queue.
3757
+ */
3758
+ enqueue(callable: Callable): void;
3759
+ /**
3760
+ * Resolves with the next DOM update.
3761
+ */
3762
+ next(): Promise<void>;
3763
+ /**
3764
+ * Immediately processes all work previously scheduled
3765
+ * through enqueue.
3766
+ * @remarks
3767
+ * This also forces next() promises
3768
+ * to resolve.
3769
+ */
3770
+ process(): void;
3771
+ /**
3772
+ * Sets the update mode used by enqueue.
3773
+ * @param isAsync - Indicates whether DOM updates should be asynchronous.
3774
+ * @remarks
3775
+ * By default, the update mode is asynchronous, since that provides the best
3776
+ * performance in the browser. Passing false to setMode will instead cause
3777
+ * the queue to be immediately processed for each call to enqueue. However,
3778
+ * ordering will still be preserved so that nested tasks do not run until
3779
+ * after parent tasks complete.
3780
+ */
3781
+ setMode(isAsync: boolean): void;
3782
+ }
3783
+
3784
+ /**
3785
+ * The default UpdateQueue.
3786
+ * @public
3787
+ */
3788
+ export declare const Updates: UpdateQueue;
3789
+
3790
+ /**
3791
+ * Represents objects that can convert values to and from
3792
+ * view or model representations.
3793
+ * @public
3794
+ */
3795
+ export declare interface ValueConverter {
3796
+ /**
3797
+ * Converts a value from its representation in the model, to a representation for the view.
3798
+ * @param value - The value to convert to a view representation.
3799
+ */
3800
+ toView(value: any): any;
3801
+ /**
3802
+ * Converts a value from its representation in the view, to a representation for the model.
3803
+ * @param value - The value to convert to a model representation.
3804
+ */
3805
+ fromView(value: any): any;
3806
+ }
3807
+
3808
+ /**
3809
+ * Represents a collection of DOM nodes which can be bound to a data source.
3810
+ * @public
3811
+ */
3812
+ export declare interface View<TSource = any, TParent = any> extends Disposable {
3813
+ /**
3814
+ * The execution context the view is running within.
3815
+ */
3816
+ readonly context: ExecutionContext<TParent>;
3817
+ /**
3818
+ * The data that the view is bound to.
3819
+ */
3820
+ readonly source: TSource | null;
3821
+ /**
3822
+ * Indicates whether the controller is bound.
3823
+ */
3824
+ readonly isBound: boolean;
3825
+ /**
3826
+ * Binds a view's behaviors to its binding source.
3827
+ * @param source - The binding source for the view's binding behaviors.
3828
+ */
3829
+ bind(source: TSource, context?: ExecutionContext<TParent>): void;
3830
+ /**
3831
+ * Unbinds a view's behaviors from its binding source and context.
3832
+ */
3833
+ unbind(): void;
3834
+ }
3835
+
3836
+ /**
3837
+ * Represents an object that can contribute behavior to a view.
3838
+ * @public
3839
+ */
3840
+ export declare interface ViewBehavior<TSource = any, TParent = any> {
3841
+ /**
3842
+ * Bind this behavior.
3843
+ * @param controller - The view controller that manages the lifecycle of this behavior.
3844
+ */
3845
+ bind(controller: ViewController<TSource, TParent>): void;
3846
+ }
3847
+
3848
+ /**
3849
+ * A factory that can create a {@link ViewBehavior} associated with a particular
3850
+ * location within a DOM fragment.
3851
+ * @public
3852
+ */
3853
+ export declare interface ViewBehaviorFactory {
3854
+ /**
3855
+ * The unique id of the factory.
3856
+ */
3857
+ id?: string;
3858
+ /**
3859
+ * The structural id of the DOM node to which the created behavior will apply.
3860
+ */
3861
+ targetNodeId?: string;
3862
+ /**
3863
+ * The tag name of the DOM node to which the created behavior will apply.
3864
+ */
3865
+ targetTagName?: string | null;
3866
+ /**
3867
+ * The policy that the created behavior must run under.
3868
+ */
3869
+ policy?: DOMPolicy;
3870
+ /**
3871
+ * Creates a behavior.
3872
+ */
3873
+ createBehavior(): ViewBehavior;
3874
+ }
3875
+
3876
+ /**
3877
+ * Bridges between ViewBehaviors and HostBehaviors, enabling a host to
3878
+ * control ViewBehaviors.
3879
+ * @public
3880
+ */
3881
+ export declare interface ViewBehaviorOrchestrator<TSource = any, TParent = any> extends ViewController<TSource, TParent>, HostBehavior<TSource> {
3882
+ /**
3883
+ *
3884
+ * @param nodeId - The structural id of the DOM node to which a behavior will apply.
3885
+ * @param target - The DOM node associated with the id.
3886
+ */
3887
+ addTarget(nodeId: string, target: Node): void;
3888
+ /**
3889
+ * Adds a behavior.
3890
+ * @param behavior - The behavior to add.
3891
+ */
3892
+ addBehavior(behavior: ViewBehavior): void;
3893
+ /**
3894
+ * Adds a behavior factory.
3895
+ * @param factory - The behavior factory to add.
3896
+ * @param target - The target the factory will create behaviors for.
3897
+ */
3898
+ addBehaviorFactory(factory: ViewBehaviorFactory, target: Node): void;
3899
+ }
3900
+
3901
+ /**
3902
+ * Bridges between ViewBehaviors and HostBehaviors, enabling a host to
3903
+ * control ViewBehaviors.
3904
+ * @public
3905
+ */
3906
+ export declare const ViewBehaviorOrchestrator: Readonly<{
3907
+ /**
3908
+ * Creates a ViewBehaviorOrchestrator.
3909
+ * @param source - The source to to associate behaviors with.
3910
+ * @returns A ViewBehaviorOrchestrator.
3911
+ */
3912
+ create<TSource = any, TParent = any>(source: TSource): ViewBehaviorOrchestrator<TSource, TParent>;
3913
+ }>;
3914
+
3915
+ /**
3916
+ * The target nodes available to a behavior.
3917
+ * @public
3918
+ */
3919
+ export declare type ViewBehaviorTargets = {
3920
+ [id: string]: Node;
3921
+ };
3922
+
3923
+ /**
3924
+ * Controls the lifecycle of a view and provides relevant context.
3925
+ * @public
3926
+ */
3927
+ export declare interface ViewController<TSource = any, TParent = any> extends ExpressionController<TSource, TParent> {
3928
+ /**
3929
+ * The parts of the view that are targeted by view behaviors.
3930
+ */
3931
+ readonly targets: ViewBehaviorTargets;
3932
+ /**
3933
+ * When true, directives skip attribute/booleanAttribute DOM
3934
+ * updates during bind(). This is an internal flag set only
3935
+ * during the prerendered bind window.
3936
+ * @internal
3937
+ */
3938
+ readonly _skipAttrUpdates?: boolean;
3939
+ /**
3940
+ * The shadow root whose scoped custom element registry the view's elements
3941
+ * were created against. Directives pass it on when they create child views.
3942
+ * @internal
3943
+ */
3944
+ readonly _scope?: ShadowRoot;
3945
+ /**
3946
+ * Resolves `true` when the view's host element had prerendered
3947
+ * content (existing shadow root).
3948
+ */
3949
+ readonly isPrerendered?: Promise<boolean>;
3950
+ /**
3951
+ * Resolves `true` after prerendered content has been hydrated,
3952
+ * `false` when client-side rendered or hydration not enabled.
3953
+ */
3954
+ readonly isHydrated?: Promise<boolean>;
3955
+ }
3956
+
3957
+ /**
3958
+ * A template capable of creating HTMLView instances or rendering directly to DOM.
3959
+ * @public
3960
+ */
3961
+ export declare class ViewTemplate<TSource = any, TParent = any> implements ElementViewTemplate<TSource, TParent>, SyntheticViewTemplate<TSource, TParent> {
3962
+ private policy?;
3963
+ private result;
3964
+ /**
3965
+ * The html representing what this template will
3966
+ * instantiate, including placeholders for directives.
3967
+ */
3968
+ readonly html: string | HTMLTemplateElement;
3969
+ /**
3970
+ * The directives that will be connected to placeholders in the html.
3971
+ */
3972
+ readonly factories: Record<string, ViewBehaviorFactory>;
3973
+ /**
3974
+ * Creates an instance of ViewTemplate.
3975
+ * @param html - The html representing what this template will instantiate, including placeholders for directives.
3976
+ * @param factories - The directives that will be connected to placeholders in the html.
3977
+ * @param policy - The security policy to use when compiling this template.
3978
+ */
3979
+ constructor(html: string | HTMLTemplateElement, factories?: Record<string, ViewBehaviorFactory>, policy?: DOMPolicy | undefined);
3980
+ /**
3981
+ * @internal
3982
+ */
3983
+ compile(): HTMLTemplateCompilationResult<TSource, TParent>;
3984
+ /**
3985
+ * Returns a directive that can inline the template.
3986
+ */
3987
+ inline(): CaptureType<TSource, TParent>;
3988
+ /**
3989
+ * Sets the DOMPolicy for this template.
3990
+ * @param policy - The policy to associated with this template.
3991
+ * @returns The modified template instance.
3992
+ * @remarks
3993
+ * The DOMPolicy can only be set once for a template and cannot be
3994
+ * set after the template is compiled.
3995
+ */
3996
+ withPolicy(policy: DOMPolicy): this;
3997
+ /**
3998
+ * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.
3999
+ * @param source - The data source to bind the template to.
4000
+ * @param host - The Element where the template will be rendered.
4001
+ * @param hostBindingTarget - An HTML element to target the host bindings at if different from the
4002
+ * host that the template is being attached to.
4003
+ * @param scope - The shadow root whose scoped custom element registry child
4004
+ * elements should be created against, when it has one.
4005
+ */
4006
+ render(source: TSource, host: Node, hostBindingTarget?: Element, scope?: ShadowRoot): HTMLView<TSource, TParent>;
4007
+ /**
4008
+ * Creates an HTMLView instance based on this template definition.
4009
+ * @param hostBindingTarget - The element that host behaviors will be bound to.
4010
+ * @param scope - The shadow root whose scoped custom element registry child
4011
+ * elements should be created against, when it has one.
4012
+ */
4013
+ create(hostBindingTarget?: Element, scope?: ShadowRoot): HTMLView<TSource, TParent>;
4014
+ /**
4015
+ * Processes the tagged template literal's static strings and interpolated values and
4016
+ * creates a ViewTemplate.
4017
+ *
4018
+ * For each interpolated value:
4019
+ * 1. Functions (binding expressions, e.g., `x => x.name`) → wrapped in a one-way HTMLBindingDirective
4020
+ * 2. Binding instances → wrapped in an HTMLBindingDirective
4021
+ * 3. HTMLDirective instances → used as-is
4022
+ * 4. Static values (strings, numbers) → wrapped in a one-time HTMLBindingDirective
4023
+ *
4024
+ * Each directive's createHTML() is called with an `add` callback that registers
4025
+ * the factory in the factories record under a unique ID and returns that ID.
4026
+ * The directive inserts a placeholder marker (e.g., `fast-abc123{0}fast-abc123`) into
4027
+ * the HTML string so the compiler can later find and associate it with the factory.
4028
+ *
4029
+ * Aspect detection happens here too: the `lastAttributeNameRegex` checks whether
4030
+ * the placeholder appears inside an attribute value, and if so, assignAspect()
4031
+ * sets the correct DOMAspect (attribute, property, event, etc.) based on the
4032
+ * attribute name prefix.
4033
+ *
4034
+ * @param strings - The static strings to create the template with.
4035
+ * @param values - The dynamic values to create the template with.
4036
+ * @param policy - The DOMPolicy to associated with the template.
4037
+ * @returns A ViewTemplate.
4038
+ * @remarks
4039
+ * This API should not be used directly under normal circumstances because constructing
4040
+ * a template in this way, if not done properly, can open up the application to XSS
4041
+ * attacks. When using this API, provide a strong DOMPolicy that can properly sanitize
4042
+ * and also be sure to manually sanitize all static strings particularly if they can
4043
+ * come from user input.
4044
+ */
4045
+ static create<TSource = any, TParent = any>(strings: string[], values: TemplateValue<TSource, TParent>[], policy?: DOMPolicy): ViewTemplate<TSource, TParent>;
4046
+ }
4047
+
4048
+ /**
4049
+ * Decorator: Marks a property getter as having volatile observable dependencies.
4050
+ * @param target - The target that the property is defined on.
4051
+ * @param name - The property name.
4052
+ * @param descriptor - The existing descriptor.
4053
+ * @public
4054
+ */
4055
+ export declare function volatile(target: {}, name: string | Accessor, descriptor: PropertyDescriptor): PropertyDescriptor;
4056
+
4057
+ /**
4058
+ * A non-fatal issue surfaced alongside an event.
4059
+ *
4060
+ * @remarks
4061
+ * Local stub that mirrors the `Warning` type of AFD's `CommandResult`; it can be
4062
+ * re-exported from `@lushly-dev/afd-core` once that package is a dependency.
4063
+ *
4064
+ * @public
4065
+ */
4066
+ export declare interface Warning {
4067
+ /** Machine-readable warning code. */
4068
+ code: string;
4069
+ /** Human-readable warning message. */
4070
+ message: string;
4071
+ /** Optional severity. Unknown values are dropped when signals are read. */
4072
+ severity?: WarningSeverity;
4073
+ /** Optional structured details. Only plain objects are kept when signals are read. */
4074
+ details?: Record<string, unknown>;
4075
+ }
4076
+
4077
+ /**
4078
+ * Severity of a {@link Warning}.
4079
+ * @public
4080
+ */
4081
+ export declare type WarningSeverity = "info" | "warning" | "caution";
4082
+
4083
+ /**
4084
+ * Deeply subscribes to changes in existing observable objects.
4085
+ * @param object - The observable object to watch.
4086
+ * @param subscriber - The handler to call when changes are made to the object.
4087
+ * @returns A disposable that can be used to unsubscribe from change updates.
4088
+ * @beta
4089
+ */
4090
+ export declare function watch(object: any, subscriber: Subscriber | ((subject: any, args: any) => void)): Disposable;
4091
+
4092
+ /**
4093
+ * A directive that enables basic conditional rendering in a template.
4094
+ * @param condition - The condition to test for rendering.
4095
+ * @param templateOrTemplateBinding - The template or a binding that gets
4096
+ * the template to render when the condition is true.
4097
+ * @param elseTemplateOrTemplateBinding - Optional template or binding that that
4098
+ * gets the template to render when the conditional is false.
4099
+ * @public
4100
+ */
4101
+ export declare function when<TSource = any, TReturn = any, TParent = any>(condition: Expression<TSource, TReturn, TParent> | boolean, templateOrTemplateBinding: SyntheticViewTemplate<TSource, TParent> | Expression<TSource, SyntheticViewTemplate<TSource, TParent>, TParent>, elseTemplateOrTemplateBinding?: SyntheticViewTemplate<TSource, TParent> | Expression<TSource, SyntheticViewTemplate<TSource, TParent>, TParent>): CaptureType<TSource, TParent>;
4102
+
4103
+ export { }