@microsoft/fast-element 2.8.3 → 2.8.5
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.
- package/.eslintrc.json +1 -1
- package/CHANGELOG.json +46 -1
- package/CHANGELOG.md +18 -2
- package/api-extractor.context.json +1 -1
- package/api-extractor.di.json +1 -1
- package/dist/dts/components/element-controller.d.ts +4 -5
- package/dist/dts/components/hydration.d.ts +8 -0
- package/dist/dts/index.d.ts +2 -1
- package/dist/esm/components/element-controller.js +6 -9
- package/dist/esm/components/hydration.js +6 -0
- package/dist/esm/index.js +2 -1
- package/dist/fast-element.api.json +323 -3
- package/dist/fast-element.debug.js +8 -9
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +8 -9
- package/dist/fast-element.min.js +2 -2
- package/dist/fast-element.untrimmed.d.ts +94 -1
- package/docs/api-report.api.md +21 -1
- package/package.json +7 -6
package/.eslintrc.json
CHANGED
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,52 @@
|
|
|
2
2
|
"name": "@microsoft/fast-element",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 02 Dec 2025 21:46:27 GMT",
|
|
6
|
+
"version": "2.8.5",
|
|
7
|
+
"tag": "@microsoft/fast-element_v2.8.5",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "863023+radium-v@users.noreply.github.com",
|
|
12
|
+
"package": "@microsoft/fast-element",
|
|
13
|
+
"commit": "78c90cc517baa58b21e1dfc99939636fac7fbac6",
|
|
14
|
+
"comment": "fix: move hydration lifecycle callback to correct position"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 01 Dec 2025 18:46:00 GMT",
|
|
21
|
+
"version": "2.8.4",
|
|
22
|
+
"tag": "@microsoft/fast-element_v2.8.4",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "mmansour@microsoft.com",
|
|
27
|
+
"package": "@microsoft/fast-element",
|
|
28
|
+
"commit": "ed14307460fecef6636c0402199528f1db2cf97d",
|
|
29
|
+
"comment": "chore: add interfaces to sideEffects"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Sun, 16 Nov 2025 07:14:24 GMT",
|
|
36
|
+
"version": "2.8.3",
|
|
37
|
+
"tag": "@microsoft/fast-element_v2.8.3",
|
|
38
|
+
"comments": {
|
|
39
|
+
"none": [
|
|
40
|
+
{
|
|
41
|
+
"author": "13071055+chrisdholt@users.noreply.github.com",
|
|
42
|
+
"package": "@microsoft/fast-element",
|
|
43
|
+
"commit": "acbdd78666f70b0b49dc99f61b71af7c0b3e259e",
|
|
44
|
+
"comment": "chore: flatten repository package structure"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Wed, 12 Nov 2025 20:41:54 GMT",
|
|
6
51
|
"version": "2.8.3",
|
|
7
52
|
"tag": "@microsoft/fast-element_v2.8.3",
|
|
8
53
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-element
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Tue, 02 Dec 2025 21:46:27 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.8.5
|
|
8
|
+
|
|
9
|
+
Tue, 02 Dec 2025 21:46:27 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- fix: move hydration lifecycle callback to correct position (863023+radium-v@users.noreply.github.com)
|
|
14
|
+
|
|
15
|
+
## 2.8.4
|
|
16
|
+
|
|
17
|
+
Mon, 01 Dec 2025 18:46:00 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- chore: add interfaces to sideEffects (mmansour@microsoft.com)
|
|
22
|
+
|
|
7
23
|
## 2.8.3
|
|
8
24
|
|
|
9
|
-
Wed, 12 Nov 2025 20:41:
|
|
25
|
+
Wed, 12 Nov 2025 20:41:54 GMT
|
|
10
26
|
|
|
11
27
|
### Patches
|
|
12
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "
|
|
3
|
+
"extends": "../../api-extractor.json",
|
|
4
4
|
"mainEntryPointFilePath": "./dist/dts/context.d.ts",
|
|
5
5
|
"apiReport": {
|
|
6
6
|
"enabled": true,
|
package/api-extractor.di.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "
|
|
3
|
+
"extends": "../../api-extractor.json",
|
|
4
4
|
"mainEntryPointFilePath": "./dist/dts/di/di.d.ts",
|
|
5
5
|
"apiReport": {
|
|
6
6
|
"enabled": true,
|
|
@@ -6,6 +6,10 @@ import type { StyleStrategy, StyleTarget } from "../styles/style-strategy.js";
|
|
|
6
6
|
import type { ElementViewTemplate } from "../templating/template.js";
|
|
7
7
|
import type { ElementView } from "../templating/view.js";
|
|
8
8
|
import { FASTElementDefinition, ShadowRootOptions } from "./fast-definitions.js";
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use the export from ./hydration.js instead.
|
|
11
|
+
*/
|
|
12
|
+
export { deferHydrationAttribute } from "./hydration.js";
|
|
9
13
|
/**
|
|
10
14
|
* A type that instantiates an ElementController
|
|
11
15
|
* @public
|
|
@@ -256,11 +260,6 @@ export declare class StyleElementStrategy implements StyleStrategy {
|
|
|
256
260
|
addStylesTo(target: StyleTarget): void;
|
|
257
261
|
removeStylesFrom(target: StyleTarget): void;
|
|
258
262
|
}
|
|
259
|
-
/**
|
|
260
|
-
* The attribute used to defer hydration of an element.
|
|
261
|
-
* @public
|
|
262
|
-
*/
|
|
263
|
-
export declare const deferHydrationAttribute = "defer-hydration";
|
|
264
263
|
/**
|
|
265
264
|
* The attribute used to indicate that an element needs hydration.
|
|
266
265
|
* @public
|
|
@@ -58,6 +58,14 @@ export declare const Hydratable: unique symbol;
|
|
|
58
58
|
* @beta
|
|
59
59
|
*/
|
|
60
60
|
export declare function isHydratable(view: ViewController): view is HydrationView;
|
|
61
|
+
/** @beta */
|
|
61
62
|
export declare function isHydratable<TSource = any, TParent = any>(template: SyntheticViewTemplate<TSource, TParent>): template is HydratableSyntheticViewTemplate<TSource, TParent>;
|
|
63
|
+
/** @beta */
|
|
62
64
|
export declare function isHydratable<TSource = any, TParent = any>(template: ElementViewTemplate<TSource, TParent>): template is HydratableElementViewTemplate<TSource, TParent>;
|
|
65
|
+
/** @beta */
|
|
63
66
|
export declare function isHydratable(template: ContentTemplate): template is HydratableContentTemplate;
|
|
67
|
+
/**
|
|
68
|
+
* The attribute used to defer hydration of an element.
|
|
69
|
+
* @beta
|
|
70
|
+
*/
|
|
71
|
+
export declare const deferHydrationAttribute = "defer-hydration";
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -31,4 +31,5 @@ export { render, RenderBehavior, RenderDirective } from "./templating/render.js"
|
|
|
31
31
|
export { customElement, FASTElement } from "./components/fast-element.js";
|
|
32
32
|
export { FASTElementDefinition, PartialFASTElementDefinition, ShadowRootOptions, fastElementRegistry, TemplateOptions, TypeRegistry, type TemplateLifecycleCallbacks, } from "./components/fast-definitions.js";
|
|
33
33
|
export { attr, AttributeConfiguration, AttributeDefinition, AttributeMode, booleanConverter, DecoratorAttributeConfiguration, nullableBooleanConverter, nullableNumberConverter, ValueConverter, } from "./components/attributes.js";
|
|
34
|
-
export {
|
|
34
|
+
export { ElementController, ElementControllerStrategy, HydratableElementController, type HydrationControllerCallbacks, needsHydrationAttribute, Stages, } from "./components/element-controller.js";
|
|
35
|
+
export { deferHydrationAttribute, isHydratable } from "./components/hydration.js";
|
|
@@ -5,7 +5,11 @@ import { FAST, makeSerializationNoop } from "../platform.js";
|
|
|
5
5
|
import { ElementStyles } from "../styles/element-styles.js";
|
|
6
6
|
import { UnobservableMutationObserver } from "../utilities.js";
|
|
7
7
|
import { FASTElementDefinition, TemplateOptions, } from "./fast-definitions.js";
|
|
8
|
-
import { HydrationMarkup, isHydratable } from "./hydration.js";
|
|
8
|
+
import { deferHydrationAttribute, HydrationMarkup, isHydratable } from "./hydration.js";
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use the export from ./hydration.js instead.
|
|
11
|
+
*/
|
|
12
|
+
export { deferHydrationAttribute } from "./hydration.js";
|
|
9
13
|
const defaultEventOptions = {
|
|
10
14
|
bubbles: true,
|
|
11
15
|
composed: true,
|
|
@@ -623,11 +627,6 @@ if (ElementStyles.supportsAdoptedStyleSheets) {
|
|
|
623
627
|
else {
|
|
624
628
|
ElementStyles.setDefaultStrategy(StyleElementStrategy);
|
|
625
629
|
}
|
|
626
|
-
/**
|
|
627
|
-
* The attribute used to defer hydration of an element.
|
|
628
|
-
* @public
|
|
629
|
-
*/
|
|
630
|
-
export const deferHydrationAttribute = "defer-hydration";
|
|
631
630
|
/**
|
|
632
631
|
* The attribute used to indicate that an element needs hydration.
|
|
633
632
|
* @public
|
|
@@ -712,9 +711,6 @@ export class HydratableElementController extends ElementController {
|
|
|
712
711
|
// Initialize needsHydration on first connect
|
|
713
712
|
this.needsHydration =
|
|
714
713
|
(_a = this.needsHydration) !== null && _a !== void 0 ? _a : this.source.hasAttribute(needsHydrationAttribute);
|
|
715
|
-
if (this.needsHydration) {
|
|
716
|
-
(_c = (_b = HydratableElementController.lifecycleCallbacks) === null || _b === void 0 ? void 0 : _b.elementWillHydrate) === null || _c === void 0 ? void 0 : _c.call(_b, this.definition.name);
|
|
717
|
-
}
|
|
718
714
|
// If the `defer-hydration` attribute exists on the source,
|
|
719
715
|
// wait for it to be removed before continuing connection behavior.
|
|
720
716
|
if (this.source.hasAttribute(deferHydrationAttribute)) {
|
|
@@ -736,6 +732,7 @@ export class HydratableElementController extends ElementController {
|
|
|
736
732
|
if (this.stage !== 3 /* Stages.disconnected */) {
|
|
737
733
|
return;
|
|
738
734
|
}
|
|
735
|
+
(_c = (_b = HydratableElementController.lifecycleCallbacks) === null || _b === void 0 ? void 0 : _b.elementWillHydrate) === null || _c === void 0 ? void 0 : _c.call(_b, this.definition.name);
|
|
739
736
|
this.stage = 0 /* Stages.connecting */;
|
|
740
737
|
this.bindObservables();
|
|
741
738
|
this.connectBehaviors();
|
|
@@ -122,6 +122,12 @@ function parseIndexAndIdMarker(regex, content) {
|
|
|
122
122
|
* @internal
|
|
123
123
|
*/
|
|
124
124
|
export const Hydratable = Symbol.for("fe-hydration");
|
|
125
|
+
/** @beta */
|
|
125
126
|
export function isHydratable(value) {
|
|
126
127
|
return value[Hydratable] === Hydratable;
|
|
127
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* The attribute used to defer hydration of an element.
|
|
131
|
+
* @beta
|
|
132
|
+
*/
|
|
133
|
+
export const deferHydrationAttribute = "defer-hydration";
|
package/dist/esm/index.js
CHANGED
|
@@ -36,4 +36,5 @@ export { render, RenderBehavior, RenderDirective } from "./templating/render.js"
|
|
|
36
36
|
export { customElement, FASTElement } from "./components/fast-element.js";
|
|
37
37
|
export { FASTElementDefinition, fastElementRegistry, TemplateOptions, } from "./components/fast-definitions.js";
|
|
38
38
|
export { attr, AttributeConfiguration, AttributeDefinition, booleanConverter, nullableBooleanConverter, nullableNumberConverter, } from "./components/attributes.js";
|
|
39
|
-
export {
|
|
39
|
+
export { ElementController, HydratableElementController, needsHydrationAttribute, } from "./components/element-controller.js";
|
|
40
|
+
export { deferHydrationAttribute, isHydratable } from "./components/hydration.js";
|
|
@@ -4286,7 +4286,7 @@
|
|
|
4286
4286
|
{
|
|
4287
4287
|
"kind": "Variable",
|
|
4288
4288
|
"canonicalReference": "@microsoft/fast-element!deferHydrationAttribute:var",
|
|
4289
|
-
"docComment": "/**\n * The attribute used to defer hydration of an element.\n *\n * @
|
|
4289
|
+
"docComment": "/**\n * The attribute used to defer hydration of an element.\n *\n * @beta\n */\n",
|
|
4290
4290
|
"excerptTokens": [
|
|
4291
4291
|
{
|
|
4292
4292
|
"kind": "Content",
|
|
@@ -4297,13 +4297,13 @@
|
|
|
4297
4297
|
"text": "\"defer-hydration\""
|
|
4298
4298
|
}
|
|
4299
4299
|
],
|
|
4300
|
-
"fileUrlPath": "dist/dts/components/
|
|
4300
|
+
"fileUrlPath": "dist/dts/components/hydration.d.ts",
|
|
4301
4301
|
"initializerTokenRange": {
|
|
4302
4302
|
"startIndex": 1,
|
|
4303
4303
|
"endIndex": 2
|
|
4304
4304
|
},
|
|
4305
4305
|
"isReadonly": true,
|
|
4306
|
-
"releaseTag": "
|
|
4306
|
+
"releaseTag": "Beta",
|
|
4307
4307
|
"name": "deferHydrationAttribute",
|
|
4308
4308
|
"variableTypeTokenRange": {
|
|
4309
4309
|
"startIndex": 0,
|
|
@@ -13411,6 +13411,326 @@
|
|
|
13411
13411
|
}
|
|
13412
13412
|
]
|
|
13413
13413
|
},
|
|
13414
|
+
{
|
|
13415
|
+
"kind": "Function",
|
|
13416
|
+
"canonicalReference": "@microsoft/fast-element!isHydratable:function(1)",
|
|
13417
|
+
"docComment": "/**\n * Tests if a template or ViewController is hydratable.\n *\n * @beta\n */\n",
|
|
13418
|
+
"excerptTokens": [
|
|
13419
|
+
{
|
|
13420
|
+
"kind": "Content",
|
|
13421
|
+
"text": "export declare function isHydratable(view: "
|
|
13422
|
+
},
|
|
13423
|
+
{
|
|
13424
|
+
"kind": "Reference",
|
|
13425
|
+
"text": "ViewController",
|
|
13426
|
+
"canonicalReference": "@microsoft/fast-element!ViewController:interface"
|
|
13427
|
+
},
|
|
13428
|
+
{
|
|
13429
|
+
"kind": "Content",
|
|
13430
|
+
"text": "): "
|
|
13431
|
+
},
|
|
13432
|
+
{
|
|
13433
|
+
"kind": "Reference",
|
|
13434
|
+
"text": "view",
|
|
13435
|
+
"canonicalReference": "@microsoft/fast-element!~view"
|
|
13436
|
+
},
|
|
13437
|
+
{
|
|
13438
|
+
"kind": "Content",
|
|
13439
|
+
"text": " is "
|
|
13440
|
+
},
|
|
13441
|
+
{
|
|
13442
|
+
"kind": "Reference",
|
|
13443
|
+
"text": "HydrationView",
|
|
13444
|
+
"canonicalReference": "@microsoft/fast-element!~HydrationView:class"
|
|
13445
|
+
},
|
|
13446
|
+
{
|
|
13447
|
+
"kind": "Content",
|
|
13448
|
+
"text": ";"
|
|
13449
|
+
}
|
|
13450
|
+
],
|
|
13451
|
+
"fileUrlPath": "dist/dts/components/hydration.d.ts",
|
|
13452
|
+
"returnTypeTokenRange": {
|
|
13453
|
+
"startIndex": 3,
|
|
13454
|
+
"endIndex": 6
|
|
13455
|
+
},
|
|
13456
|
+
"releaseTag": "Beta",
|
|
13457
|
+
"overloadIndex": 1,
|
|
13458
|
+
"parameters": [
|
|
13459
|
+
{
|
|
13460
|
+
"parameterName": "view",
|
|
13461
|
+
"parameterTypeTokenRange": {
|
|
13462
|
+
"startIndex": 1,
|
|
13463
|
+
"endIndex": 2
|
|
13464
|
+
},
|
|
13465
|
+
"isOptional": false
|
|
13466
|
+
}
|
|
13467
|
+
],
|
|
13468
|
+
"name": "isHydratable"
|
|
13469
|
+
},
|
|
13470
|
+
{
|
|
13471
|
+
"kind": "Function",
|
|
13472
|
+
"canonicalReference": "@microsoft/fast-element!isHydratable:function(2)",
|
|
13473
|
+
"docComment": "/**\n * @beta\n */\n",
|
|
13474
|
+
"excerptTokens": [
|
|
13475
|
+
{
|
|
13476
|
+
"kind": "Content",
|
|
13477
|
+
"text": "export declare function isHydratable<TSource = "
|
|
13478
|
+
},
|
|
13479
|
+
{
|
|
13480
|
+
"kind": "Content",
|
|
13481
|
+
"text": "any"
|
|
13482
|
+
},
|
|
13483
|
+
{
|
|
13484
|
+
"kind": "Content",
|
|
13485
|
+
"text": ", TParent = "
|
|
13486
|
+
},
|
|
13487
|
+
{
|
|
13488
|
+
"kind": "Content",
|
|
13489
|
+
"text": "any"
|
|
13490
|
+
},
|
|
13491
|
+
{
|
|
13492
|
+
"kind": "Content",
|
|
13493
|
+
"text": ">(template: "
|
|
13494
|
+
},
|
|
13495
|
+
{
|
|
13496
|
+
"kind": "Reference",
|
|
13497
|
+
"text": "SyntheticViewTemplate",
|
|
13498
|
+
"canonicalReference": "@microsoft/fast-element!SyntheticViewTemplate:interface"
|
|
13499
|
+
},
|
|
13500
|
+
{
|
|
13501
|
+
"kind": "Content",
|
|
13502
|
+
"text": "<TSource, TParent>"
|
|
13503
|
+
},
|
|
13504
|
+
{
|
|
13505
|
+
"kind": "Content",
|
|
13506
|
+
"text": "): "
|
|
13507
|
+
},
|
|
13508
|
+
{
|
|
13509
|
+
"kind": "Reference",
|
|
13510
|
+
"text": "template",
|
|
13511
|
+
"canonicalReference": "@microsoft/fast-element!~template"
|
|
13512
|
+
},
|
|
13513
|
+
{
|
|
13514
|
+
"kind": "Content",
|
|
13515
|
+
"text": " is "
|
|
13516
|
+
},
|
|
13517
|
+
{
|
|
13518
|
+
"kind": "Reference",
|
|
13519
|
+
"text": "HydratableSyntheticViewTemplate",
|
|
13520
|
+
"canonicalReference": "@microsoft/fast-element!~HydratableSyntheticViewTemplate:interface"
|
|
13521
|
+
},
|
|
13522
|
+
{
|
|
13523
|
+
"kind": "Content",
|
|
13524
|
+
"text": "<TSource, TParent>"
|
|
13525
|
+
},
|
|
13526
|
+
{
|
|
13527
|
+
"kind": "Content",
|
|
13528
|
+
"text": ";"
|
|
13529
|
+
}
|
|
13530
|
+
],
|
|
13531
|
+
"fileUrlPath": "dist/dts/components/hydration.d.ts",
|
|
13532
|
+
"returnTypeTokenRange": {
|
|
13533
|
+
"startIndex": 8,
|
|
13534
|
+
"endIndex": 12
|
|
13535
|
+
},
|
|
13536
|
+
"releaseTag": "Beta",
|
|
13537
|
+
"overloadIndex": 2,
|
|
13538
|
+
"parameters": [
|
|
13539
|
+
{
|
|
13540
|
+
"parameterName": "template",
|
|
13541
|
+
"parameterTypeTokenRange": {
|
|
13542
|
+
"startIndex": 5,
|
|
13543
|
+
"endIndex": 7
|
|
13544
|
+
},
|
|
13545
|
+
"isOptional": false
|
|
13546
|
+
}
|
|
13547
|
+
],
|
|
13548
|
+
"typeParameters": [
|
|
13549
|
+
{
|
|
13550
|
+
"typeParameterName": "TSource",
|
|
13551
|
+
"constraintTokenRange": {
|
|
13552
|
+
"startIndex": 0,
|
|
13553
|
+
"endIndex": 0
|
|
13554
|
+
},
|
|
13555
|
+
"defaultTypeTokenRange": {
|
|
13556
|
+
"startIndex": 1,
|
|
13557
|
+
"endIndex": 2
|
|
13558
|
+
}
|
|
13559
|
+
},
|
|
13560
|
+
{
|
|
13561
|
+
"typeParameterName": "TParent",
|
|
13562
|
+
"constraintTokenRange": {
|
|
13563
|
+
"startIndex": 0,
|
|
13564
|
+
"endIndex": 0
|
|
13565
|
+
},
|
|
13566
|
+
"defaultTypeTokenRange": {
|
|
13567
|
+
"startIndex": 3,
|
|
13568
|
+
"endIndex": 4
|
|
13569
|
+
}
|
|
13570
|
+
}
|
|
13571
|
+
],
|
|
13572
|
+
"name": "isHydratable"
|
|
13573
|
+
},
|
|
13574
|
+
{
|
|
13575
|
+
"kind": "Function",
|
|
13576
|
+
"canonicalReference": "@microsoft/fast-element!isHydratable:function(3)",
|
|
13577
|
+
"docComment": "/**\n * @beta\n */\n",
|
|
13578
|
+
"excerptTokens": [
|
|
13579
|
+
{
|
|
13580
|
+
"kind": "Content",
|
|
13581
|
+
"text": "export declare function isHydratable<TSource = "
|
|
13582
|
+
},
|
|
13583
|
+
{
|
|
13584
|
+
"kind": "Content",
|
|
13585
|
+
"text": "any"
|
|
13586
|
+
},
|
|
13587
|
+
{
|
|
13588
|
+
"kind": "Content",
|
|
13589
|
+
"text": ", TParent = "
|
|
13590
|
+
},
|
|
13591
|
+
{
|
|
13592
|
+
"kind": "Content",
|
|
13593
|
+
"text": "any"
|
|
13594
|
+
},
|
|
13595
|
+
{
|
|
13596
|
+
"kind": "Content",
|
|
13597
|
+
"text": ">(template: "
|
|
13598
|
+
},
|
|
13599
|
+
{
|
|
13600
|
+
"kind": "Reference",
|
|
13601
|
+
"text": "ElementViewTemplate",
|
|
13602
|
+
"canonicalReference": "@microsoft/fast-element!ElementViewTemplate:interface"
|
|
13603
|
+
},
|
|
13604
|
+
{
|
|
13605
|
+
"kind": "Content",
|
|
13606
|
+
"text": "<TSource, TParent>"
|
|
13607
|
+
},
|
|
13608
|
+
{
|
|
13609
|
+
"kind": "Content",
|
|
13610
|
+
"text": "): "
|
|
13611
|
+
},
|
|
13612
|
+
{
|
|
13613
|
+
"kind": "Reference",
|
|
13614
|
+
"text": "template",
|
|
13615
|
+
"canonicalReference": "@microsoft/fast-element!~template"
|
|
13616
|
+
},
|
|
13617
|
+
{
|
|
13618
|
+
"kind": "Content",
|
|
13619
|
+
"text": " is "
|
|
13620
|
+
},
|
|
13621
|
+
{
|
|
13622
|
+
"kind": "Reference",
|
|
13623
|
+
"text": "HydratableElementViewTemplate",
|
|
13624
|
+
"canonicalReference": "@microsoft/fast-element!~HydratableElementViewTemplate:interface"
|
|
13625
|
+
},
|
|
13626
|
+
{
|
|
13627
|
+
"kind": "Content",
|
|
13628
|
+
"text": "<TSource, TParent>"
|
|
13629
|
+
},
|
|
13630
|
+
{
|
|
13631
|
+
"kind": "Content",
|
|
13632
|
+
"text": ";"
|
|
13633
|
+
}
|
|
13634
|
+
],
|
|
13635
|
+
"fileUrlPath": "dist/dts/components/hydration.d.ts",
|
|
13636
|
+
"returnTypeTokenRange": {
|
|
13637
|
+
"startIndex": 8,
|
|
13638
|
+
"endIndex": 12
|
|
13639
|
+
},
|
|
13640
|
+
"releaseTag": "Beta",
|
|
13641
|
+
"overloadIndex": 3,
|
|
13642
|
+
"parameters": [
|
|
13643
|
+
{
|
|
13644
|
+
"parameterName": "template",
|
|
13645
|
+
"parameterTypeTokenRange": {
|
|
13646
|
+
"startIndex": 5,
|
|
13647
|
+
"endIndex": 7
|
|
13648
|
+
},
|
|
13649
|
+
"isOptional": false
|
|
13650
|
+
}
|
|
13651
|
+
],
|
|
13652
|
+
"typeParameters": [
|
|
13653
|
+
{
|
|
13654
|
+
"typeParameterName": "TSource",
|
|
13655
|
+
"constraintTokenRange": {
|
|
13656
|
+
"startIndex": 0,
|
|
13657
|
+
"endIndex": 0
|
|
13658
|
+
},
|
|
13659
|
+
"defaultTypeTokenRange": {
|
|
13660
|
+
"startIndex": 1,
|
|
13661
|
+
"endIndex": 2
|
|
13662
|
+
}
|
|
13663
|
+
},
|
|
13664
|
+
{
|
|
13665
|
+
"typeParameterName": "TParent",
|
|
13666
|
+
"constraintTokenRange": {
|
|
13667
|
+
"startIndex": 0,
|
|
13668
|
+
"endIndex": 0
|
|
13669
|
+
},
|
|
13670
|
+
"defaultTypeTokenRange": {
|
|
13671
|
+
"startIndex": 3,
|
|
13672
|
+
"endIndex": 4
|
|
13673
|
+
}
|
|
13674
|
+
}
|
|
13675
|
+
],
|
|
13676
|
+
"name": "isHydratable"
|
|
13677
|
+
},
|
|
13678
|
+
{
|
|
13679
|
+
"kind": "Function",
|
|
13680
|
+
"canonicalReference": "@microsoft/fast-element!isHydratable:function(4)",
|
|
13681
|
+
"docComment": "/**\n * @beta\n */\n",
|
|
13682
|
+
"excerptTokens": [
|
|
13683
|
+
{
|
|
13684
|
+
"kind": "Content",
|
|
13685
|
+
"text": "export declare function isHydratable(template: "
|
|
13686
|
+
},
|
|
13687
|
+
{
|
|
13688
|
+
"kind": "Reference",
|
|
13689
|
+
"text": "ContentTemplate",
|
|
13690
|
+
"canonicalReference": "@microsoft/fast-element!ContentTemplate:interface"
|
|
13691
|
+
},
|
|
13692
|
+
{
|
|
13693
|
+
"kind": "Content",
|
|
13694
|
+
"text": "): "
|
|
13695
|
+
},
|
|
13696
|
+
{
|
|
13697
|
+
"kind": "Reference",
|
|
13698
|
+
"text": "template",
|
|
13699
|
+
"canonicalReference": "@microsoft/fast-element!~template"
|
|
13700
|
+
},
|
|
13701
|
+
{
|
|
13702
|
+
"kind": "Content",
|
|
13703
|
+
"text": " is "
|
|
13704
|
+
},
|
|
13705
|
+
{
|
|
13706
|
+
"kind": "Reference",
|
|
13707
|
+
"text": "HydratableContentTemplate",
|
|
13708
|
+
"canonicalReference": "@microsoft/fast-element!~HydratableContentTemplate:interface"
|
|
13709
|
+
},
|
|
13710
|
+
{
|
|
13711
|
+
"kind": "Content",
|
|
13712
|
+
"text": ";"
|
|
13713
|
+
}
|
|
13714
|
+
],
|
|
13715
|
+
"fileUrlPath": "dist/dts/components/hydration.d.ts",
|
|
13716
|
+
"returnTypeTokenRange": {
|
|
13717
|
+
"startIndex": 3,
|
|
13718
|
+
"endIndex": 6
|
|
13719
|
+
},
|
|
13720
|
+
"releaseTag": "Beta",
|
|
13721
|
+
"overloadIndex": 4,
|
|
13722
|
+
"parameters": [
|
|
13723
|
+
{
|
|
13724
|
+
"parameterName": "template",
|
|
13725
|
+
"parameterTypeTokenRange": {
|
|
13726
|
+
"startIndex": 1,
|
|
13727
|
+
"endIndex": 2
|
|
13728
|
+
},
|
|
13729
|
+
"isOptional": false
|
|
13730
|
+
}
|
|
13731
|
+
],
|
|
13732
|
+
"name": "isHydratable"
|
|
13733
|
+
},
|
|
13414
13734
|
{
|
|
13415
13735
|
"kind": "Interface",
|
|
13416
13736
|
"canonicalReference": "@microsoft/fast-element!LengthObserver:interface",
|
|
@@ -2442,9 +2442,15 @@ function parseIndexAndIdMarker(regex, content) {
|
|
|
2442
2442
|
* @internal
|
|
2443
2443
|
*/
|
|
2444
2444
|
const Hydratable = Symbol.for("fe-hydration");
|
|
2445
|
+
/** @beta */
|
|
2445
2446
|
function isHydratable(value) {
|
|
2446
2447
|
return value[Hydratable] === Hydratable;
|
|
2447
2448
|
}
|
|
2449
|
+
/**
|
|
2450
|
+
* The attribute used to defer hydration of an element.
|
|
2451
|
+
* @beta
|
|
2452
|
+
*/
|
|
2453
|
+
const deferHydrationAttribute = "defer-hydration";
|
|
2448
2454
|
|
|
2449
2455
|
const marker = `fast-${Math.random().toString(36).substring(2, 8)}`;
|
|
2450
2456
|
const interpolationStart = `${marker}{`;
|
|
@@ -6088,11 +6094,6 @@ if (ElementStyles.supportsAdoptedStyleSheets) {
|
|
|
6088
6094
|
else {
|
|
6089
6095
|
ElementStyles.setDefaultStrategy(StyleElementStrategy);
|
|
6090
6096
|
}
|
|
6091
|
-
/**
|
|
6092
|
-
* The attribute used to defer hydration of an element.
|
|
6093
|
-
* @public
|
|
6094
|
-
*/
|
|
6095
|
-
const deferHydrationAttribute = "defer-hydration";
|
|
6096
6097
|
/**
|
|
6097
6098
|
* The attribute used to indicate that an element needs hydration.
|
|
6098
6099
|
* @public
|
|
@@ -6177,9 +6178,6 @@ class HydratableElementController extends ElementController {
|
|
|
6177
6178
|
// Initialize needsHydration on first connect
|
|
6178
6179
|
this.needsHydration =
|
|
6179
6180
|
(_a = this.needsHydration) !== null && _a !== void 0 ? _a : this.source.hasAttribute(needsHydrationAttribute);
|
|
6180
|
-
if (this.needsHydration) {
|
|
6181
|
-
(_c = (_b = HydratableElementController.lifecycleCallbacks) === null || _b === void 0 ? void 0 : _b.elementWillHydrate) === null || _c === void 0 ? void 0 : _c.call(_b, this.definition.name);
|
|
6182
|
-
}
|
|
6183
6181
|
// If the `defer-hydration` attribute exists on the source,
|
|
6184
6182
|
// wait for it to be removed before continuing connection behavior.
|
|
6185
6183
|
if (this.source.hasAttribute(deferHydrationAttribute)) {
|
|
@@ -6201,6 +6199,7 @@ class HydratableElementController extends ElementController {
|
|
|
6201
6199
|
if (this.stage !== 3 /* Stages.disconnected */) {
|
|
6202
6200
|
return;
|
|
6203
6201
|
}
|
|
6202
|
+
(_c = (_b = HydratableElementController.lifecycleCallbacks) === null || _b === void 0 ? void 0 : _b.elementWillHydrate) === null || _c === void 0 ? void 0 : _c.call(_b, this.definition.name);
|
|
6204
6203
|
this.stage = 0 /* Stages.connecting */;
|
|
6205
6204
|
this.bindObservables();
|
|
6206
6205
|
this.connectBehaviors();
|
|
@@ -6393,4 +6392,4 @@ function customElement(nameOrDef) {
|
|
|
6393
6392
|
|
|
6394
6393
|
DOM.setPolicy(DOMPolicy.create());
|
|
6395
6394
|
|
|
6396
|
-
export { ArrayObserver, AttributeConfiguration, AttributeDefinition, Binding, CSSBindingDirective, CSSDirective, ChildrenDirective, Compiler, DOM, DOMAspect, ElementController, ElementStyles, ExecutionContext, FAST, FASTElement, FASTElementDefinition, HTMLBindingDirective, HTMLDirective, HTMLView, HydratableElementController, HydrationBindingError, InlineTemplateDirective, Markup, NodeObservationDirective, Observable, Parser, PropertyChangeNotifier, RefDirective, RenderBehavior, RenderDirective, RepeatBehavior, RepeatDirective, SlottedDirective, Sort, SourceLifetime, Splice, SpliceStrategy, SpliceStrategySupport, StatelessAttachedAttributeDirective, SubscriberSet, TemplateOptions, Updates, ViewTemplate, attr, booleanConverter, children, css, cssDirective, customElement, deferHydrationAttribute, elements, emptyArray, fastElementRegistry, html, htmlDirective, lengthOf, listener, needsHydrationAttribute, normalizeBinding$1 as normalizeBinding, nullableBooleanConverter, nullableNumberConverter, observable, oneTime, oneWay, ref, render, repeat, slotted, sortedCount, volatile, when };
|
|
6395
|
+
export { ArrayObserver, AttributeConfiguration, AttributeDefinition, Binding, CSSBindingDirective, CSSDirective, ChildrenDirective, Compiler, DOM, DOMAspect, ElementController, ElementStyles, ExecutionContext, FAST, FASTElement, FASTElementDefinition, HTMLBindingDirective, HTMLDirective, HTMLView, HydratableElementController, HydrationBindingError, InlineTemplateDirective, Markup, NodeObservationDirective, Observable, Parser, PropertyChangeNotifier, RefDirective, RenderBehavior, RenderDirective, RepeatBehavior, RepeatDirective, SlottedDirective, Sort, SourceLifetime, Splice, SpliceStrategy, SpliceStrategySupport, StatelessAttachedAttributeDirective, SubscriberSet, TemplateOptions, Updates, ViewTemplate, attr, booleanConverter, children, css, cssDirective, customElement, deferHydrationAttribute, elements, emptyArray, fastElementRegistry, html, htmlDirective, isHydratable, lengthOf, listener, needsHydrationAttribute, normalizeBinding$1 as normalizeBinding, nullableBooleanConverter, nullableNumberConverter, observable, oneTime, oneWay, ref, render, repeat, slotted, sortedCount, volatile, when };
|