@microsoft/fast-element 2.0.0-beta.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.eslintrc.json +1 -1
  2. package/CHANGELOG.json +497 -0
  3. package/CHANGELOG.md +172 -1
  4. package/README.md +1 -9
  5. package/api-extractor.context.json +14 -0
  6. package/api-extractor.di.json +14 -0
  7. package/dist/context/context.api.json +1068 -0
  8. package/dist/di/di.api.json +4929 -0
  9. package/dist/dts/binding/binding.d.ts +49 -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/{templating/binding-signal.d.ts → binding/signal.d.ts} +19 -4
  14. package/dist/dts/{templating/binding-two-way.d.ts → binding/two-way.d.ts} +9 -5
  15. package/dist/dts/components/attributes.d.ts +6 -0
  16. package/dist/dts/components/element-controller.d.ts +104 -8
  17. package/dist/dts/components/element-hydration.d.ts +2 -0
  18. package/dist/dts/components/fast-definitions.d.ts +6 -0
  19. package/dist/dts/components/hydration.d.ts +56 -0
  20. package/dist/dts/components/install-hydration.d.ts +1 -0
  21. package/dist/dts/context.d.ts +29 -15
  22. package/dist/dts/di/di.d.ts +0 -5
  23. package/dist/dts/dom-policy.d.ts +83 -0
  24. package/dist/dts/dom.d.ts +100 -0
  25. package/dist/dts/hydration/target-builder.d.ts +63 -0
  26. package/dist/dts/index.d.ts +33 -26
  27. package/dist/dts/index.rollup.d.ts +0 -1
  28. package/dist/dts/index.rollup.debug.d.ts +0 -1
  29. package/dist/dts/interfaces.d.ts +32 -82
  30. package/dist/dts/metadata.d.ts +6 -5
  31. package/dist/dts/observation/arrays.d.ts +1 -1
  32. package/dist/dts/observation/observable.bench.d.ts +18 -0
  33. package/dist/dts/observation/observable.d.ts +5 -5
  34. package/dist/dts/pending-task.d.ts +19 -7
  35. package/dist/dts/platform.d.ts +11 -2
  36. package/dist/dts/polyfills.d.ts +0 -8
  37. package/dist/dts/styles/css-binding-directive.d.ts +60 -0
  38. package/dist/dts/styles/css.d.ts +9 -7
  39. package/dist/dts/styles/element-styles.d.ts +1 -14
  40. package/dist/dts/styles/host.d.ts +2 -5
  41. package/dist/dts/styles/style-strategy.d.ts +42 -0
  42. package/dist/dts/templating/compiler.d.ts +11 -13
  43. package/dist/dts/templating/{binding.d.ts → html-binding-directive.d.ts} +21 -41
  44. package/dist/dts/templating/html-directive.d.ts +44 -140
  45. package/dist/dts/templating/install-hydratable-view-templates.d.ts +1 -0
  46. package/dist/dts/templating/node-observation.d.ts +11 -1
  47. package/dist/dts/templating/ref.d.ts +4 -0
  48. package/dist/dts/templating/render.bench.d.ts +3 -0
  49. package/dist/dts/templating/render.d.ts +49 -9
  50. package/dist/dts/templating/repeat-basic-reverse.bench.d.ts +3 -0
  51. package/dist/dts/templating/repeat-basic-shift.bench.d.ts +3 -0
  52. package/dist/dts/templating/repeat.d.ts +31 -9
  53. package/dist/dts/templating/template.d.ts +97 -12
  54. package/dist/dts/templating/view.d.ts +146 -29
  55. package/dist/dts/templating/when-basic.bench.d.ts +3 -0
  56. package/dist/dts/templating/when-conditional.bench.d.ts +3 -0
  57. package/dist/dts/templating/when-switch.bench.d.ts +3 -0
  58. package/dist/dts/templating/when.d.ts +3 -1
  59. package/dist/dts/testing/fakes.d.ts +12 -1
  60. package/dist/dts/tsdoc-metadata.json +1 -1
  61. package/dist/dts/utilities.d.ts +55 -1
  62. package/dist/esm/binding/binding.js +18 -0
  63. package/dist/esm/binding/normalize.js +17 -0
  64. package/dist/esm/binding/one-time.js +21 -0
  65. package/dist/esm/binding/one-way.js +30 -0
  66. package/dist/esm/{templating/binding-signal.js → binding/signal.js} +22 -6
  67. package/dist/esm/{templating/binding-two-way.js → binding/two-way.js} +18 -12
  68. package/dist/esm/components/attributes.js +16 -1
  69. package/dist/esm/components/element-controller.js +319 -49
  70. package/dist/esm/components/element-hydration.js +2 -0
  71. package/dist/esm/components/fast-definitions.js +12 -4
  72. package/dist/esm/components/fast-element.js +3 -1
  73. package/dist/esm/components/hydration.js +104 -0
  74. package/dist/esm/components/install-hydration.js +3 -0
  75. package/dist/esm/context.js +26 -4
  76. package/dist/esm/debug.js +8 -2
  77. package/dist/esm/di/di.js +9 -12
  78. package/dist/esm/dom-policy.js +345 -0
  79. package/dist/esm/dom.js +101 -0
  80. package/dist/esm/hydration/target-builder.js +175 -0
  81. package/dist/esm/index.js +34 -25
  82. package/dist/esm/index.rollup.debug.js +3 -1
  83. package/dist/esm/index.rollup.js +3 -1
  84. package/dist/esm/interfaces.js +51 -3
  85. package/dist/esm/metadata.js +11 -8
  86. package/dist/esm/observation/arrays.js +1 -1
  87. package/dist/esm/observation/observable.bench.js +79 -0
  88. package/dist/esm/observation/observable.js +20 -15
  89. package/dist/esm/observation/update-queue.js +2 -2
  90. package/dist/esm/pending-task.js +13 -1
  91. package/dist/esm/platform.js +12 -2
  92. package/dist/esm/polyfills.js +3 -61
  93. package/dist/esm/styles/css-binding-directive.js +76 -0
  94. package/dist/esm/styles/css.js +14 -7
  95. package/dist/esm/styles/element-styles.js +0 -33
  96. package/dist/esm/styles/style-strategy.js +1 -0
  97. package/dist/esm/templating/children.js +8 -4
  98. package/dist/esm/templating/compiler.js +37 -44
  99. package/dist/esm/templating/html-binding-directive.js +218 -0
  100. package/dist/esm/templating/html-directive.js +25 -152
  101. package/dist/esm/templating/install-hydratable-view-templates.js +17 -0
  102. package/dist/esm/templating/node-observation.js +14 -8
  103. package/dist/esm/templating/ref.js +1 -1
  104. package/dist/esm/templating/render.bench.js +56 -0
  105. package/dist/esm/templating/render.js +74 -30
  106. package/dist/esm/templating/repeat-basic-reverse.bench.js +43 -0
  107. package/dist/esm/templating/repeat-basic-shift.bench.js +43 -0
  108. package/dist/esm/templating/repeat.js +116 -17
  109. package/dist/esm/templating/template.js +135 -60
  110. package/dist/esm/templating/view.js +254 -34
  111. package/dist/esm/templating/when-basic.bench.js +36 -0
  112. package/dist/esm/templating/when-conditional.bench.js +39 -0
  113. package/dist/esm/templating/when-switch.bench.js +68 -0
  114. package/dist/esm/templating/when.js +12 -5
  115. package/dist/esm/testing/fakes.js +32 -1
  116. package/dist/esm/testing/fixture.js +1 -1
  117. package/dist/esm/utilities.js +97 -1
  118. package/dist/fast-element.api.json +9788 -5666
  119. package/dist/fast-element.d.ts +813 -2392
  120. package/dist/fast-element.debug.js +2785 -969
  121. package/dist/fast-element.debug.min.js +3 -1
  122. package/dist/fast-element.js +2638 -828
  123. package/dist/fast-element.min.js +3 -1
  124. package/dist/fast-element.untrimmed.d.ts +661 -313
  125. package/docs/{api-report.md → api-report.api.md} +238 -151
  126. package/docs/context/api-report.api.md +69 -0
  127. package/docs/di/api-report.api.md +315 -0
  128. package/karma.conf.cjs +2 -1
  129. package/package.json +59 -47
  130. package/scripts/run-api-extractor.js +51 -0
  131. package/scripts/run-benchmarks.js +46 -0
  132. package/tensile.config.js +12 -0
  133. package/dist/dts/templating/dom.d.ts +0 -41
  134. package/dist/esm/templating/binding.js +0 -282
  135. package/dist/esm/templating/dom.js +0 -49
  136. package/docs/guide/declaring-templates.md +0 -230
  137. package/docs/guide/defining-elements.md +0 -214
  138. package/docs/guide/leveraging-css.md +0 -253
  139. package/docs/guide/next-steps.md +0 -13
  140. package/docs/guide/observables-and-state.md +0 -213
  141. package/docs/guide/using-directives.md +0 -576
  142. package/docs/guide/working-with-shadow-dom.md +0 -296
@@ -0,0 +1,1068 @@
1
+ {
2
+ "metadata": {
3
+ "toolPackage": "@microsoft/api-extractor",
4
+ "toolVersion": "7.47.0",
5
+ "schemaVersion": 1011,
6
+ "oldestForwardsCompatibleVersion": 1001,
7
+ "tsdocConfig": {
8
+ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
9
+ "noStandardTags": true,
10
+ "tagDefinitions": [
11
+ {
12
+ "tagName": "@alpha",
13
+ "syntaxKind": "modifier"
14
+ },
15
+ {
16
+ "tagName": "@beta",
17
+ "syntaxKind": "modifier"
18
+ },
19
+ {
20
+ "tagName": "@defaultValue",
21
+ "syntaxKind": "block"
22
+ },
23
+ {
24
+ "tagName": "@decorator",
25
+ "syntaxKind": "block",
26
+ "allowMultiple": true
27
+ },
28
+ {
29
+ "tagName": "@deprecated",
30
+ "syntaxKind": "block"
31
+ },
32
+ {
33
+ "tagName": "@eventProperty",
34
+ "syntaxKind": "modifier"
35
+ },
36
+ {
37
+ "tagName": "@example",
38
+ "syntaxKind": "block",
39
+ "allowMultiple": true
40
+ },
41
+ {
42
+ "tagName": "@experimental",
43
+ "syntaxKind": "modifier"
44
+ },
45
+ {
46
+ "tagName": "@inheritDoc",
47
+ "syntaxKind": "inline"
48
+ },
49
+ {
50
+ "tagName": "@internal",
51
+ "syntaxKind": "modifier"
52
+ },
53
+ {
54
+ "tagName": "@label",
55
+ "syntaxKind": "inline"
56
+ },
57
+ {
58
+ "tagName": "@link",
59
+ "syntaxKind": "inline",
60
+ "allowMultiple": true
61
+ },
62
+ {
63
+ "tagName": "@override",
64
+ "syntaxKind": "modifier"
65
+ },
66
+ {
67
+ "tagName": "@packageDocumentation",
68
+ "syntaxKind": "modifier"
69
+ },
70
+ {
71
+ "tagName": "@param",
72
+ "syntaxKind": "block",
73
+ "allowMultiple": true
74
+ },
75
+ {
76
+ "tagName": "@privateRemarks",
77
+ "syntaxKind": "block"
78
+ },
79
+ {
80
+ "tagName": "@public",
81
+ "syntaxKind": "modifier"
82
+ },
83
+ {
84
+ "tagName": "@readonly",
85
+ "syntaxKind": "modifier"
86
+ },
87
+ {
88
+ "tagName": "@remarks",
89
+ "syntaxKind": "block"
90
+ },
91
+ {
92
+ "tagName": "@returns",
93
+ "syntaxKind": "block"
94
+ },
95
+ {
96
+ "tagName": "@sealed",
97
+ "syntaxKind": "modifier"
98
+ },
99
+ {
100
+ "tagName": "@see",
101
+ "syntaxKind": "block"
102
+ },
103
+ {
104
+ "tagName": "@throws",
105
+ "syntaxKind": "block",
106
+ "allowMultiple": true
107
+ },
108
+ {
109
+ "tagName": "@typeParam",
110
+ "syntaxKind": "block",
111
+ "allowMultiple": true
112
+ },
113
+ {
114
+ "tagName": "@virtual",
115
+ "syntaxKind": "modifier"
116
+ },
117
+ {
118
+ "tagName": "@betaDocumentation",
119
+ "syntaxKind": "modifier"
120
+ },
121
+ {
122
+ "tagName": "@internalRemarks",
123
+ "syntaxKind": "block"
124
+ },
125
+ {
126
+ "tagName": "@preapproved",
127
+ "syntaxKind": "modifier"
128
+ }
129
+ ],
130
+ "supportForTags": {
131
+ "@alpha": true,
132
+ "@beta": true,
133
+ "@defaultValue": true,
134
+ "@decorator": true,
135
+ "@deprecated": true,
136
+ "@eventProperty": true,
137
+ "@example": true,
138
+ "@experimental": true,
139
+ "@inheritDoc": true,
140
+ "@internal": true,
141
+ "@label": true,
142
+ "@link": true,
143
+ "@override": true,
144
+ "@packageDocumentation": true,
145
+ "@param": true,
146
+ "@privateRemarks": true,
147
+ "@public": true,
148
+ "@readonly": true,
149
+ "@remarks": true,
150
+ "@returns": true,
151
+ "@sealed": true,
152
+ "@see": true,
153
+ "@throws": true,
154
+ "@typeParam": true,
155
+ "@virtual": true,
156
+ "@betaDocumentation": true,
157
+ "@internalRemarks": true,
158
+ "@preapproved": true
159
+ },
160
+ "reportUnsupportedHtmlElements": false
161
+ }
162
+ },
163
+ "kind": "Package",
164
+ "canonicalReference": "@microsoft/fast-element!",
165
+ "docComment": "",
166
+ "name": "@microsoft/fast-element",
167
+ "preserveMemberOrder": false,
168
+ "members": [
169
+ {
170
+ "kind": "EntryPoint",
171
+ "canonicalReference": "@microsoft/fast-element!",
172
+ "name": "",
173
+ "preserveMemberOrder": false,
174
+ "members": [
175
+ {
176
+ "kind": "TypeAlias",
177
+ "canonicalReference": "@microsoft/fast-element!Context:type",
178
+ "docComment": "/**\n * A Context object defines an optional initial value for a Context, as well as a name identifier for debugging purposes.\n *\n * @public\n */\n",
179
+ "excerptTokens": [
180
+ {
181
+ "kind": "Content",
182
+ "text": "export declare type Context<T> = "
183
+ },
184
+ {
185
+ "kind": "Content",
186
+ "text": "{\n readonly name: string;\n readonly initialValue?: T;\n}"
187
+ },
188
+ {
189
+ "kind": "Content",
190
+ "text": ";"
191
+ }
192
+ ],
193
+ "fileUrlPath": "dist/dts/context.d.ts",
194
+ "releaseTag": "Public",
195
+ "name": "Context",
196
+ "typeParameters": [
197
+ {
198
+ "typeParameterName": "T",
199
+ "constraintTokenRange": {
200
+ "startIndex": 0,
201
+ "endIndex": 0
202
+ },
203
+ "defaultTypeTokenRange": {
204
+ "startIndex": 0,
205
+ "endIndex": 0
206
+ }
207
+ }
208
+ ],
209
+ "typeTokenRange": {
210
+ "startIndex": 1,
211
+ "endIndex": 2
212
+ }
213
+ },
214
+ {
215
+ "kind": "Variable",
216
+ "canonicalReference": "@microsoft/fast-element!Context:var",
217
+ "docComment": "/**\n * Enables using: {@link https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md | W3C Community Context protocol.}\n *\n * @public\n */\n",
218
+ "excerptTokens": [
219
+ {
220
+ "kind": "Content",
221
+ "text": "Context: "
222
+ },
223
+ {
224
+ "kind": "Reference",
225
+ "text": "Readonly",
226
+ "canonicalReference": "!Readonly:type"
227
+ },
228
+ {
229
+ "kind": "Content",
230
+ "text": "<{\n eventType: \"context-request\";\n for<T = unknown>(name: string): "
231
+ },
232
+ {
233
+ "kind": "Reference",
234
+ "text": "FASTContext",
235
+ "canonicalReference": "@microsoft/fast-element!FASTContext:type"
236
+ },
237
+ {
238
+ "kind": "Content",
239
+ "text": "<T>;\n create<T_1 = unknown>(name: string, initialValue?: T_1 | undefined): "
240
+ },
241
+ {
242
+ "kind": "Reference",
243
+ "text": "FASTContext",
244
+ "canonicalReference": "@microsoft/fast-element!FASTContext:type"
245
+ },
246
+ {
247
+ "kind": "Content",
248
+ "text": "<T_1>;\n setDefaultRequestStrategy(strategy: "
249
+ },
250
+ {
251
+ "kind": "Reference",
252
+ "text": "FASTContextRequestStrategy",
253
+ "canonicalReference": "@microsoft/fast-element!FASTContextRequestStrategy:type"
254
+ },
255
+ {
256
+ "kind": "Content",
257
+ "text": "): void;\n get<T_2 extends "
258
+ },
259
+ {
260
+ "kind": "Reference",
261
+ "text": "UnknownContext",
262
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
263
+ },
264
+ {
265
+ "kind": "Content",
266
+ "text": ">(target: "
267
+ },
268
+ {
269
+ "kind": "Reference",
270
+ "text": "EventTarget",
271
+ "canonicalReference": "!EventTarget:interface"
272
+ },
273
+ {
274
+ "kind": "Content",
275
+ "text": ", context: T_2): "
276
+ },
277
+ {
278
+ "kind": "Reference",
279
+ "text": "ContextType",
280
+ "canonicalReference": "@microsoft/fast-element!ContextType:type"
281
+ },
282
+ {
283
+ "kind": "Content",
284
+ "text": "<T_2>;\n request<T_3 extends "
285
+ },
286
+ {
287
+ "kind": "Reference",
288
+ "text": "UnknownContext",
289
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
290
+ },
291
+ {
292
+ "kind": "Content",
293
+ "text": ">(target: "
294
+ },
295
+ {
296
+ "kind": "Reference",
297
+ "text": "EventTarget",
298
+ "canonicalReference": "!EventTarget:interface"
299
+ },
300
+ {
301
+ "kind": "Content",
302
+ "text": ", context: T_3, callback: "
303
+ },
304
+ {
305
+ "kind": "Reference",
306
+ "text": "ContextCallback",
307
+ "canonicalReference": "@microsoft/fast-element!ContextCallback:type"
308
+ },
309
+ {
310
+ "kind": "Content",
311
+ "text": "<"
312
+ },
313
+ {
314
+ "kind": "Reference",
315
+ "text": "ContextType",
316
+ "canonicalReference": "@microsoft/fast-element!ContextType:type"
317
+ },
318
+ {
319
+ "kind": "Content",
320
+ "text": "<T_3>>, multiple?: boolean): void;\n dispatch<T_4 extends "
321
+ },
322
+ {
323
+ "kind": "Reference",
324
+ "text": "UnknownContext",
325
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
326
+ },
327
+ {
328
+ "kind": "Content",
329
+ "text": ">(target: "
330
+ },
331
+ {
332
+ "kind": "Reference",
333
+ "text": "EventTarget",
334
+ "canonicalReference": "!EventTarget:interface"
335
+ },
336
+ {
337
+ "kind": "Content",
338
+ "text": ", context: T_4, callback: "
339
+ },
340
+ {
341
+ "kind": "Reference",
342
+ "text": "ContextCallback",
343
+ "canonicalReference": "@microsoft/fast-element!ContextCallback:type"
344
+ },
345
+ {
346
+ "kind": "Content",
347
+ "text": "<"
348
+ },
349
+ {
350
+ "kind": "Reference",
351
+ "text": "ContextType",
352
+ "canonicalReference": "@microsoft/fast-element!ContextType:type"
353
+ },
354
+ {
355
+ "kind": "Content",
356
+ "text": "<T_4>>, multiple?: boolean): void;\n provide<T_5 extends "
357
+ },
358
+ {
359
+ "kind": "Reference",
360
+ "text": "UnknownContext",
361
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
362
+ },
363
+ {
364
+ "kind": "Content",
365
+ "text": ">(target: "
366
+ },
367
+ {
368
+ "kind": "Reference",
369
+ "text": "EventTarget",
370
+ "canonicalReference": "!EventTarget:interface"
371
+ },
372
+ {
373
+ "kind": "Content",
374
+ "text": ", context: T_5, value: "
375
+ },
376
+ {
377
+ "kind": "Reference",
378
+ "text": "ContextType",
379
+ "canonicalReference": "@microsoft/fast-element!ContextType:type"
380
+ },
381
+ {
382
+ "kind": "Content",
383
+ "text": "<T_5>): void;\n handle<T_6 extends "
384
+ },
385
+ {
386
+ "kind": "Reference",
387
+ "text": "UnknownContext",
388
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
389
+ },
390
+ {
391
+ "kind": "Content",
392
+ "text": ">(target: "
393
+ },
394
+ {
395
+ "kind": "Reference",
396
+ "text": "EventTarget",
397
+ "canonicalReference": "!EventTarget:interface"
398
+ },
399
+ {
400
+ "kind": "Content",
401
+ "text": ", callback: (event: "
402
+ },
403
+ {
404
+ "kind": "Reference",
405
+ "text": "ContextEvent",
406
+ "canonicalReference": "@microsoft/fast-element!ContextEvent:class"
407
+ },
408
+ {
409
+ "kind": "Content",
410
+ "text": "<T_6>) => void, context?: T_6 | undefined): void;\n defineProperty<T_7 extends "
411
+ },
412
+ {
413
+ "kind": "Reference",
414
+ "text": "UnknownContext",
415
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
416
+ },
417
+ {
418
+ "kind": "Content",
419
+ "text": ">(target: "
420
+ },
421
+ {
422
+ "kind": "Reference",
423
+ "text": "Constructable",
424
+ "canonicalReference": "@microsoft/fast-element!~Constructable:type"
425
+ },
426
+ {
427
+ "kind": "Content",
428
+ "text": "<"
429
+ },
430
+ {
431
+ "kind": "Reference",
432
+ "text": "EventTarget",
433
+ "canonicalReference": "!EventTarget:interface"
434
+ },
435
+ {
436
+ "kind": "Content",
437
+ "text": "> | "
438
+ },
439
+ {
440
+ "kind": "Reference",
441
+ "text": "EventTarget",
442
+ "canonicalReference": "!EventTarget:interface"
443
+ },
444
+ {
445
+ "kind": "Content",
446
+ "text": ", propertyName: string, context: T_7): void;\n}>"
447
+ }
448
+ ],
449
+ "fileUrlPath": "dist/dts/context.d.ts",
450
+ "isReadonly": true,
451
+ "releaseTag": "Public",
452
+ "name": "Context",
453
+ "variableTypeTokenRange": {
454
+ "startIndex": 1,
455
+ "endIndex": 51
456
+ }
457
+ },
458
+ {
459
+ "kind": "TypeAlias",
460
+ "canonicalReference": "@microsoft/fast-element!ContextCallback:type",
461
+ "docComment": "/**\n * A callback which is provided by a context requester and is called with the value satisfying the request. This callback can be called multiple times by context providers as the requested value is changed.\n *\n * @public\n */\n",
462
+ "excerptTokens": [
463
+ {
464
+ "kind": "Content",
465
+ "text": "export declare type ContextCallback<ValueType> = "
466
+ },
467
+ {
468
+ "kind": "Content",
469
+ "text": "(value: ValueType, dispose?: () => void) => void"
470
+ },
471
+ {
472
+ "kind": "Content",
473
+ "text": ";"
474
+ }
475
+ ],
476
+ "fileUrlPath": "dist/dts/context.d.ts",
477
+ "releaseTag": "Public",
478
+ "name": "ContextCallback",
479
+ "typeParameters": [
480
+ {
481
+ "typeParameterName": "ValueType",
482
+ "constraintTokenRange": {
483
+ "startIndex": 0,
484
+ "endIndex": 0
485
+ },
486
+ "defaultTypeTokenRange": {
487
+ "startIndex": 0,
488
+ "endIndex": 0
489
+ }
490
+ }
491
+ ],
492
+ "typeTokenRange": {
493
+ "startIndex": 1,
494
+ "endIndex": 2
495
+ }
496
+ },
497
+ {
498
+ "kind": "TypeAlias",
499
+ "canonicalReference": "@microsoft/fast-element!ContextDecorator:type",
500
+ "docComment": "/**\n * A constant key that can be used to represent a Context dependency. The key can be used for context or DI but also doubles as a decorator for resolving the associated dependency.\n *\n * @public\n */\n",
501
+ "excerptTokens": [
502
+ {
503
+ "kind": "Content",
504
+ "text": "export declare type ContextDecorator<T = "
505
+ },
506
+ {
507
+ "kind": "Content",
508
+ "text": "any"
509
+ },
510
+ {
511
+ "kind": "Content",
512
+ "text": "> = "
513
+ },
514
+ {
515
+ "kind": "Reference",
516
+ "text": "Readonly",
517
+ "canonicalReference": "!Readonly:type"
518
+ },
519
+ {
520
+ "kind": "Content",
521
+ "text": "<"
522
+ },
523
+ {
524
+ "kind": "Reference",
525
+ "text": "Context",
526
+ "canonicalReference": "@microsoft/fast-element!Context:type"
527
+ },
528
+ {
529
+ "kind": "Content",
530
+ "text": "<T>> & "
531
+ },
532
+ {
533
+ "kind": "Reference",
534
+ "text": "PropertyDecorator",
535
+ "canonicalReference": "!PropertyDecorator:type"
536
+ },
537
+ {
538
+ "kind": "Content",
539
+ "text": " & "
540
+ },
541
+ {
542
+ "kind": "Reference",
543
+ "text": "ParameterDecorator",
544
+ "canonicalReference": "@microsoft/fast-element!~ParameterDecorator_2:type"
545
+ },
546
+ {
547
+ "kind": "Content",
548
+ "text": ";"
549
+ }
550
+ ],
551
+ "fileUrlPath": "dist/dts/context.d.ts",
552
+ "releaseTag": "Public",
553
+ "name": "ContextDecorator",
554
+ "typeParameters": [
555
+ {
556
+ "typeParameterName": "T",
557
+ "constraintTokenRange": {
558
+ "startIndex": 0,
559
+ "endIndex": 0
560
+ },
561
+ "defaultTypeTokenRange": {
562
+ "startIndex": 1,
563
+ "endIndex": 2
564
+ }
565
+ }
566
+ ],
567
+ "typeTokenRange": {
568
+ "startIndex": 3,
569
+ "endIndex": 10
570
+ }
571
+ },
572
+ {
573
+ "kind": "Class",
574
+ "canonicalReference": "@microsoft/fast-element!ContextEvent:class",
575
+ "docComment": "/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `multiple` value, then a provider can call the callback multiple times if the value is changed, if this is the case the provider should pass a `dispose` method to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n *\n * @public\n */\n",
576
+ "excerptTokens": [
577
+ {
578
+ "kind": "Content",
579
+ "text": "export declare class ContextEvent<T extends "
580
+ },
581
+ {
582
+ "kind": "Reference",
583
+ "text": "UnknownContext",
584
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
585
+ },
586
+ {
587
+ "kind": "Content",
588
+ "text": "> extends "
589
+ },
590
+ {
591
+ "kind": "Reference",
592
+ "text": "Event",
593
+ "canonicalReference": "!Event:interface"
594
+ },
595
+ {
596
+ "kind": "Content",
597
+ "text": " "
598
+ }
599
+ ],
600
+ "fileUrlPath": "dist/dts/context.d.ts",
601
+ "releaseTag": "Public",
602
+ "typeParameters": [
603
+ {
604
+ "typeParameterName": "T",
605
+ "constraintTokenRange": {
606
+ "startIndex": 1,
607
+ "endIndex": 2
608
+ },
609
+ "defaultTypeTokenRange": {
610
+ "startIndex": 0,
611
+ "endIndex": 0
612
+ }
613
+ }
614
+ ],
615
+ "isAbstract": false,
616
+ "name": "ContextEvent",
617
+ "preserveMemberOrder": false,
618
+ "members": [
619
+ {
620
+ "kind": "Constructor",
621
+ "canonicalReference": "@microsoft/fast-element!ContextEvent:constructor(1)",
622
+ "docComment": "/**\n * Constructs a new instance of the `ContextEvent` class\n */\n",
623
+ "excerptTokens": [
624
+ {
625
+ "kind": "Content",
626
+ "text": "constructor(context: "
627
+ },
628
+ {
629
+ "kind": "Content",
630
+ "text": "T"
631
+ },
632
+ {
633
+ "kind": "Content",
634
+ "text": ", callback: "
635
+ },
636
+ {
637
+ "kind": "Reference",
638
+ "text": "ContextCallback",
639
+ "canonicalReference": "@microsoft/fast-element!ContextCallback:type"
640
+ },
641
+ {
642
+ "kind": "Content",
643
+ "text": "<"
644
+ },
645
+ {
646
+ "kind": "Reference",
647
+ "text": "ContextType",
648
+ "canonicalReference": "@microsoft/fast-element!ContextType:type"
649
+ },
650
+ {
651
+ "kind": "Content",
652
+ "text": "<T>>"
653
+ },
654
+ {
655
+ "kind": "Content",
656
+ "text": ", multiple?: "
657
+ },
658
+ {
659
+ "kind": "Content",
660
+ "text": "boolean | undefined"
661
+ },
662
+ {
663
+ "kind": "Content",
664
+ "text": ");"
665
+ }
666
+ ],
667
+ "releaseTag": "Public",
668
+ "isProtected": false,
669
+ "overloadIndex": 1,
670
+ "parameters": [
671
+ {
672
+ "parameterName": "context",
673
+ "parameterTypeTokenRange": {
674
+ "startIndex": 1,
675
+ "endIndex": 2
676
+ },
677
+ "isOptional": false
678
+ },
679
+ {
680
+ "parameterName": "callback",
681
+ "parameterTypeTokenRange": {
682
+ "startIndex": 3,
683
+ "endIndex": 7
684
+ },
685
+ "isOptional": false
686
+ },
687
+ {
688
+ "parameterName": "multiple",
689
+ "parameterTypeTokenRange": {
690
+ "startIndex": 8,
691
+ "endIndex": 9
692
+ },
693
+ "isOptional": true
694
+ }
695
+ ]
696
+ },
697
+ {
698
+ "kind": "Property",
699
+ "canonicalReference": "@microsoft/fast-element!ContextEvent#callback:member",
700
+ "docComment": "",
701
+ "excerptTokens": [
702
+ {
703
+ "kind": "Content",
704
+ "text": "readonly callback: "
705
+ },
706
+ {
707
+ "kind": "Reference",
708
+ "text": "ContextCallback",
709
+ "canonicalReference": "@microsoft/fast-element!ContextCallback:type"
710
+ },
711
+ {
712
+ "kind": "Content",
713
+ "text": "<"
714
+ },
715
+ {
716
+ "kind": "Reference",
717
+ "text": "ContextType",
718
+ "canonicalReference": "@microsoft/fast-element!ContextType:type"
719
+ },
720
+ {
721
+ "kind": "Content",
722
+ "text": "<T>>"
723
+ },
724
+ {
725
+ "kind": "Content",
726
+ "text": ";"
727
+ }
728
+ ],
729
+ "isReadonly": true,
730
+ "isOptional": false,
731
+ "releaseTag": "Public",
732
+ "name": "callback",
733
+ "propertyTypeTokenRange": {
734
+ "startIndex": 1,
735
+ "endIndex": 5
736
+ },
737
+ "isStatic": false,
738
+ "isProtected": false,
739
+ "isAbstract": false
740
+ },
741
+ {
742
+ "kind": "Property",
743
+ "canonicalReference": "@microsoft/fast-element!ContextEvent#context:member",
744
+ "docComment": "",
745
+ "excerptTokens": [
746
+ {
747
+ "kind": "Content",
748
+ "text": "readonly context: "
749
+ },
750
+ {
751
+ "kind": "Content",
752
+ "text": "T"
753
+ },
754
+ {
755
+ "kind": "Content",
756
+ "text": ";"
757
+ }
758
+ ],
759
+ "isReadonly": true,
760
+ "isOptional": false,
761
+ "releaseTag": "Public",
762
+ "name": "context",
763
+ "propertyTypeTokenRange": {
764
+ "startIndex": 1,
765
+ "endIndex": 2
766
+ },
767
+ "isStatic": false,
768
+ "isProtected": false,
769
+ "isAbstract": false
770
+ },
771
+ {
772
+ "kind": "Property",
773
+ "canonicalReference": "@microsoft/fast-element!ContextEvent#multiple:member",
774
+ "docComment": "",
775
+ "excerptTokens": [
776
+ {
777
+ "kind": "Content",
778
+ "text": "readonly multiple?: "
779
+ },
780
+ {
781
+ "kind": "Content",
782
+ "text": "boolean | undefined"
783
+ },
784
+ {
785
+ "kind": "Content",
786
+ "text": ";"
787
+ }
788
+ ],
789
+ "isReadonly": true,
790
+ "isOptional": true,
791
+ "releaseTag": "Public",
792
+ "name": "multiple",
793
+ "propertyTypeTokenRange": {
794
+ "startIndex": 1,
795
+ "endIndex": 2
796
+ },
797
+ "isStatic": false,
798
+ "isProtected": false,
799
+ "isAbstract": false
800
+ }
801
+ ],
802
+ "extendsTokenRange": {
803
+ "startIndex": 3,
804
+ "endIndex": 4
805
+ },
806
+ "implementsTokenRanges": []
807
+ },
808
+ {
809
+ "kind": "TypeAlias",
810
+ "canonicalReference": "@microsoft/fast-element!ContextType:type",
811
+ "docComment": "/**\n * A helper type which can extract a Context value type from a Context type\n *\n * @public\n */\n",
812
+ "excerptTokens": [
813
+ {
814
+ "kind": "Content",
815
+ "text": "export declare type ContextType<T extends "
816
+ },
817
+ {
818
+ "kind": "Reference",
819
+ "text": "UnknownContext",
820
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
821
+ },
822
+ {
823
+ "kind": "Content",
824
+ "text": "> = "
825
+ },
826
+ {
827
+ "kind": "Content",
828
+ "text": "T extends "
829
+ },
830
+ {
831
+ "kind": "Reference",
832
+ "text": "Context",
833
+ "canonicalReference": "@microsoft/fast-element!Context:type"
834
+ },
835
+ {
836
+ "kind": "Content",
837
+ "text": "<infer Y> ? Y : never"
838
+ },
839
+ {
840
+ "kind": "Content",
841
+ "text": ";"
842
+ }
843
+ ],
844
+ "fileUrlPath": "dist/dts/context.d.ts",
845
+ "releaseTag": "Public",
846
+ "name": "ContextType",
847
+ "typeParameters": [
848
+ {
849
+ "typeParameterName": "T",
850
+ "constraintTokenRange": {
851
+ "startIndex": 1,
852
+ "endIndex": 2
853
+ },
854
+ "defaultTypeTokenRange": {
855
+ "startIndex": 0,
856
+ "endIndex": 0
857
+ }
858
+ }
859
+ ],
860
+ "typeTokenRange": {
861
+ "startIndex": 3,
862
+ "endIndex": 6
863
+ }
864
+ },
865
+ {
866
+ "kind": "TypeAlias",
867
+ "canonicalReference": "@microsoft/fast-element!FASTContext:type",
868
+ "docComment": "/**\n * A Context object defines an optional initial value for a Context, as well as a name identifier for debugging purposes. The FASTContext can also be used as a decorator to declare context dependencies or as a key for DI.\n *\n * @public\n */\n",
869
+ "excerptTokens": [
870
+ {
871
+ "kind": "Content",
872
+ "text": "export declare type FASTContext<T> = "
873
+ },
874
+ {
875
+ "kind": "Reference",
876
+ "text": "ContextDecorator",
877
+ "canonicalReference": "@microsoft/fast-element!ContextDecorator:type"
878
+ },
879
+ {
880
+ "kind": "Content",
881
+ "text": "<T> & {\n get(target: "
882
+ },
883
+ {
884
+ "kind": "Reference",
885
+ "text": "EventTarget",
886
+ "canonicalReference": "!EventTarget:interface"
887
+ },
888
+ {
889
+ "kind": "Content",
890
+ "text": "): T;\n provide(target: "
891
+ },
892
+ {
893
+ "kind": "Reference",
894
+ "text": "EventTarget",
895
+ "canonicalReference": "!EventTarget:interface"
896
+ },
897
+ {
898
+ "kind": "Content",
899
+ "text": ", value: T): void;\n request(target: "
900
+ },
901
+ {
902
+ "kind": "Reference",
903
+ "text": "EventTarget",
904
+ "canonicalReference": "!EventTarget:interface"
905
+ },
906
+ {
907
+ "kind": "Content",
908
+ "text": ", callback: "
909
+ },
910
+ {
911
+ "kind": "Reference",
912
+ "text": "ContextCallback",
913
+ "canonicalReference": "@microsoft/fast-element!ContextCallback:type"
914
+ },
915
+ {
916
+ "kind": "Content",
917
+ "text": "<T>, multiple?: boolean): void;\n handle(target: "
918
+ },
919
+ {
920
+ "kind": "Reference",
921
+ "text": "EventTarget",
922
+ "canonicalReference": "!EventTarget:interface"
923
+ },
924
+ {
925
+ "kind": "Content",
926
+ "text": ", callback: (event: "
927
+ },
928
+ {
929
+ "kind": "Reference",
930
+ "text": "ContextEvent",
931
+ "canonicalReference": "@microsoft/fast-element!ContextEvent:class"
932
+ },
933
+ {
934
+ "kind": "Content",
935
+ "text": "<"
936
+ },
937
+ {
938
+ "kind": "Reference",
939
+ "text": "FASTContext",
940
+ "canonicalReference": "@microsoft/fast-element!FASTContext:type"
941
+ },
942
+ {
943
+ "kind": "Content",
944
+ "text": "<T>>) => void): void;\n}"
945
+ },
946
+ {
947
+ "kind": "Content",
948
+ "text": ";"
949
+ }
950
+ ],
951
+ "fileUrlPath": "dist/dts/context.d.ts",
952
+ "releaseTag": "Public",
953
+ "name": "FASTContext",
954
+ "typeParameters": [
955
+ {
956
+ "typeParameterName": "T",
957
+ "constraintTokenRange": {
958
+ "startIndex": 0,
959
+ "endIndex": 0
960
+ },
961
+ "defaultTypeTokenRange": {
962
+ "startIndex": 0,
963
+ "endIndex": 0
964
+ }
965
+ }
966
+ ],
967
+ "typeTokenRange": {
968
+ "startIndex": 1,
969
+ "endIndex": 17
970
+ }
971
+ },
972
+ {
973
+ "kind": "TypeAlias",
974
+ "canonicalReference": "@microsoft/fast-element!FASTContextRequestStrategy:type",
975
+ "docComment": "/**\n * A strategy that controls how all Context.request API calls are handled.\n *\n * @remarks\n *\n * By default this is handled via Context.dispatch, which dispatches a ContextEvent.\n *\n * @public\n */\n",
976
+ "excerptTokens": [
977
+ {
978
+ "kind": "Content",
979
+ "text": "export declare type FASTContextRequestStrategy = "
980
+ },
981
+ {
982
+ "kind": "Content",
983
+ "text": "<T extends "
984
+ },
985
+ {
986
+ "kind": "Reference",
987
+ "text": "UnknownContext",
988
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type"
989
+ },
990
+ {
991
+ "kind": "Content",
992
+ "text": ">(target: "
993
+ },
994
+ {
995
+ "kind": "Reference",
996
+ "text": "EventTarget",
997
+ "canonicalReference": "!EventTarget:interface"
998
+ },
999
+ {
1000
+ "kind": "Content",
1001
+ "text": ", context: T, callback: "
1002
+ },
1003
+ {
1004
+ "kind": "Reference",
1005
+ "text": "ContextCallback",
1006
+ "canonicalReference": "@microsoft/fast-element!ContextCallback:type"
1007
+ },
1008
+ {
1009
+ "kind": "Content",
1010
+ "text": "<"
1011
+ },
1012
+ {
1013
+ "kind": "Reference",
1014
+ "text": "ContextType",
1015
+ "canonicalReference": "@microsoft/fast-element!ContextType:type"
1016
+ },
1017
+ {
1018
+ "kind": "Content",
1019
+ "text": "<T>>, multiple: any) => void"
1020
+ },
1021
+ {
1022
+ "kind": "Content",
1023
+ "text": ";"
1024
+ }
1025
+ ],
1026
+ "fileUrlPath": "dist/dts/context.d.ts",
1027
+ "releaseTag": "Public",
1028
+ "name": "FASTContextRequestStrategy",
1029
+ "typeTokenRange": {
1030
+ "startIndex": 1,
1031
+ "endIndex": 10
1032
+ }
1033
+ },
1034
+ {
1035
+ "kind": "TypeAlias",
1036
+ "canonicalReference": "@microsoft/fast-element!UnknownContext:type",
1037
+ "docComment": "/**\n * An unknown context type.\n *\n * @public\n */\n",
1038
+ "excerptTokens": [
1039
+ {
1040
+ "kind": "Content",
1041
+ "text": "export declare type UnknownContext = "
1042
+ },
1043
+ {
1044
+ "kind": "Reference",
1045
+ "text": "Context",
1046
+ "canonicalReference": "@microsoft/fast-element!Context:type"
1047
+ },
1048
+ {
1049
+ "kind": "Content",
1050
+ "text": "<unknown>"
1051
+ },
1052
+ {
1053
+ "kind": "Content",
1054
+ "text": ";"
1055
+ }
1056
+ ],
1057
+ "fileUrlPath": "dist/dts/context.d.ts",
1058
+ "releaseTag": "Public",
1059
+ "name": "UnknownContext",
1060
+ "typeTokenRange": {
1061
+ "startIndex": 1,
1062
+ "endIndex": 3
1063
+ }
1064
+ }
1065
+ ]
1066
+ }
1067
+ ]
1068
+ }