@microsoft/fast-element 2.9.2 → 2.10.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.
- package/CHANGELOG.json +43 -0
- package/CHANGELOG.md +14 -1
- package/dist/dts/binding/one-way.d.ts +1 -1
- package/dist/dts/binding/two-way.d.ts +2 -2
- package/dist/dts/components/attributes.d.ts +1 -1
- package/dist/dts/components/element-controller.d.ts +19 -8
- package/dist/dts/components/fast-definitions.d.ts +4 -4
- package/dist/dts/components/fast-element.d.ts +2 -2
- package/dist/dts/context.d.ts +1 -1
- package/dist/dts/di/di.d.ts +2 -2
- package/dist/dts/dom-policy.d.ts +3 -3
- package/dist/dts/index.d.ts +41 -28
- package/dist/dts/observable.d.ts +4 -2
- package/dist/dts/observation/arrays.d.ts +1 -1
- package/dist/dts/observation/observable.d.ts +1 -1
- package/dist/dts/observation/update-queue.d.ts +1 -1
- package/dist/dts/platform.d.ts +1 -1
- package/dist/dts/state/state.d.ts +1 -1
- package/dist/dts/state/watch.d.ts +1 -1
- package/dist/dts/styles/css-binding-directive.d.ts +1 -1
- package/dist/dts/styles/css.d.ts +2 -2
- package/dist/dts/templating/children.d.ts +1 -1
- package/dist/dts/templating/compiler.d.ts +2 -2
- package/dist/dts/templating/html-binding-directive.d.ts +3 -3
- package/dist/dts/templating/html-directive.d.ts +2 -2
- package/dist/dts/templating/node-observation.d.ts +1 -1
- package/dist/dts/templating/ref.d.ts +1 -1
- package/dist/dts/templating/render.d.ts +4 -4
- package/dist/dts/templating/repeat.d.ts +4 -4
- package/dist/dts/templating/slotted.d.ts +1 -1
- package/dist/dts/templating/template.d.ts +2 -2
- package/dist/dts/templating/view.d.ts +2 -2
- package/dist/esm/binding/one-way.js +1 -1
- package/dist/esm/binding/two-way.js +3 -3
- package/dist/esm/components/element-controller.js +69 -23
- package/dist/esm/components/fast-definitions.js +1 -1
- package/dist/esm/context.js +2 -2
- package/dist/esm/di/di.js +61 -51
- package/dist/esm/dom-policy.js +2 -2
- package/dist/esm/dom.js +2 -2
- package/dist/esm/index.js +21 -22
- package/dist/esm/interfaces.js +38 -0
- package/dist/esm/observable.js +1 -1
- package/dist/esm/observation/arrays.js +17 -10
- package/dist/esm/observation/observable.js +3 -3
- package/dist/esm/styles/css.js +2 -2
- package/dist/esm/templating/children.js +1 -1
- package/dist/esm/templating/compiler.js +5 -5
- package/dist/esm/templating/html-binding-directive.js +2 -2
- package/dist/esm/templating/node-observation.js +1 -1
- package/dist/esm/templating/render.js +4 -4
- package/dist/esm/templating/repeat.js +4 -4
- package/dist/esm/templating/slotted.js +1 -1
- package/dist/esm/templating/template.js +7 -7
- package/dist/fast-element.api.json +70 -11
- package/dist/fast-element.debug.js +2506 -2415
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +2506 -2415
- package/dist/fast-element.min.js +2 -2
- package/dist/fast-element.untrimmed.d.ts +17 -6
- package/docs/api-report.api.md +5 -4
- package/package.json +4 -3
- package/playwright.config.ts +18 -0
- package/test/index.html +11 -0
- package/test/main.ts +10 -0
- package/test/vite.config.ts +19 -0
- package/dist/dts/observation/observable.bench.d.ts +0 -18
- package/dist/dts/templating/render.bench.d.ts +0 -3
- package/dist/dts/templating/repeat-basic-reverse.bench.d.ts +0 -3
- package/dist/dts/templating/repeat-basic-shift.bench.d.ts +0 -3
- package/dist/dts/templating/when-basic.bench.d.ts +0 -3
- package/dist/dts/templating/when-conditional.bench.d.ts +0 -3
- package/dist/dts/templating/when-switch.bench.d.ts +0 -3
- package/dist/esm/observation/observable.bench.js +0 -79
- package/dist/esm/templating/render.bench.js +0 -56
- package/dist/esm/templating/repeat-basic-reverse.bench.js +0 -43
- package/dist/esm/templating/repeat-basic-shift.bench.js +0 -43
- package/dist/esm/templating/when-basic.bench.js +0 -36
- package/dist/esm/templating/when-conditional.bench.js +0 -39
- package/dist/esm/templating/when-switch.bench.js +0 -68
- package/scripts/run-benchmarks.js +0 -46
- package/tensile.config.js +0 -12
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/fast-element",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Tue, 17 Feb 2026 20:49:29 GMT",
|
|
6
|
+
"version": "2.10.0",
|
|
7
|
+
"tag": "@microsoft/fast-element_v2.10.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "863023+radium-v@users.noreply.github.com",
|
|
12
|
+
"package": "@microsoft/fast-element",
|
|
13
|
+
"commit": "4176d0cb01260e6c5d03c53351eb9be0d2736b90",
|
|
14
|
+
"comment": "chore: enable verbatimModuleSyntax to identify type-only imports and exports"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"none": [
|
|
18
|
+
{
|
|
19
|
+
"author": "863023+radium-v@users.noreply.github.com",
|
|
20
|
+
"package": "@microsoft/fast-element",
|
|
21
|
+
"commit": "65f87c8f1fff03011d77f8159bae96e0f3fe9fce",
|
|
22
|
+
"comment": "chore: remove benchmark scripts and related utilities from fast-element package"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "machi@microsoft.com",
|
|
26
|
+
"package": "@microsoft/fast-element",
|
|
27
|
+
"commit": "b5ed37b3aa98bc37430f2ba5cd47de3768066a3a",
|
|
28
|
+
"comment": "introduce playwright for testing"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"minor": [
|
|
32
|
+
{
|
|
33
|
+
"author": "863023+radium-v@users.noreply.github.com",
|
|
34
|
+
"package": "@microsoft/fast-element",
|
|
35
|
+
"commit": "350bb02ec3c35f7b354314dd9e4dfb614c335723",
|
|
36
|
+
"comment": "feat: pass source element to hydration lifecycle callbacks"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"author": "863023+radium-v@users.noreply.github.com",
|
|
40
|
+
"package": "@microsoft/fast-element",
|
|
41
|
+
"commit": "57ef1a5495298ad3aadc6b74c95b10bbdbdde3ca",
|
|
42
|
+
"comment": "feat(hydration): add hydrationStarted callback and update documentation"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
4
47
|
{
|
|
5
48
|
"date": "Tue, 27 Jan 2026 17:28:54 GMT",
|
|
6
49
|
"version": "2.9.2",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-element
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Tue,
|
|
3
|
+
<!-- This log was last generated on Tue, 17 Feb 2026 20:49:29 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.10.0
|
|
8
|
+
|
|
9
|
+
Tue, 17 Feb 2026 20:49:29 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- feat: pass source element to hydration lifecycle callbacks (863023+radium-v@users.noreply.github.com)
|
|
14
|
+
- feat(hydration): add hydrationStarted callback and update documentation (863023+radium-v@users.noreply.github.com)
|
|
15
|
+
|
|
16
|
+
### Patches
|
|
17
|
+
|
|
18
|
+
- chore: enable verbatimModuleSyntax to identify type-only imports and exports (863023+radium-v@users.noreply.github.com)
|
|
19
|
+
|
|
7
20
|
## 2.9.2
|
|
8
21
|
|
|
9
22
|
Tue, 27 Jan 2026 17:28:54 GMT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DOMPolicy } from "../dom.js";
|
|
2
|
-
import { Expression } from "../observation/observable.js";
|
|
3
|
-
import { Binding, BindingDirective } from "./binding.js";
|
|
2
|
+
import { type Expression } from "../observation/observable.js";
|
|
3
|
+
import { Binding, type BindingDirective } from "./binding.js";
|
|
4
4
|
/**
|
|
5
5
|
* The twoWay binding options.
|
|
6
6
|
* @public
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PropertyChangeNotifier } from "../observation/notifier.js";
|
|
2
|
-
import { ExecutionContext, ExpressionController, SourceLifetime } from "../observation/observable.js";
|
|
2
|
+
import { ExecutionContext, type ExpressionController, SourceLifetime } from "../observation/observable.js";
|
|
3
3
|
import { ElementStyles } from "../styles/element-styles.js";
|
|
4
4
|
import type { HostBehavior, HostController } from "../styles/host.js";
|
|
5
5
|
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
|
-
import { FASTElementDefinition, ShadowRootOptions } from "./fast-definitions.js";
|
|
8
|
+
import { FASTElementDefinition, type ShadowRootOptions } from "./fast-definitions.js";
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Use the export from ./hydration.js instead.
|
|
11
11
|
*/
|
|
@@ -269,15 +269,22 @@ export declare const needsHydrationAttribute = "needs-hydration";
|
|
|
269
269
|
* Lifecycle callbacks for element hydration events
|
|
270
270
|
* @public
|
|
271
271
|
*/
|
|
272
|
-
export interface HydrationControllerCallbacks {
|
|
272
|
+
export interface HydrationControllerCallbacks<TElement extends HTMLElement = HTMLElement> {
|
|
273
273
|
/**
|
|
274
|
-
* Called
|
|
274
|
+
* Called once when the first element enters the hydration pipeline.
|
|
275
|
+
* This is the earliest point at which we know a component has been
|
|
276
|
+
* async-defined with `defer-and-hydrate`, a template is pending via
|
|
277
|
+
* `<f-template>`, and the element has `needs-hydration`.
|
|
275
278
|
*/
|
|
276
|
-
|
|
279
|
+
hydrationStarted?(): void;
|
|
277
280
|
/**
|
|
278
|
-
* Called
|
|
281
|
+
* Called before an individual element's hydration begins
|
|
279
282
|
*/
|
|
280
|
-
|
|
283
|
+
elementWillHydrate?(source: TElement): void;
|
|
284
|
+
/**
|
|
285
|
+
* Called after an individual element's hydration has finished
|
|
286
|
+
*/
|
|
287
|
+
elementDidHydrate?(source: TElement): void;
|
|
281
288
|
/**
|
|
282
289
|
* Called after all elements have completed hydration
|
|
283
290
|
*/
|
|
@@ -305,7 +312,11 @@ export declare class HydratableElementController<TElement extends HTMLElement =
|
|
|
305
312
|
/**
|
|
306
313
|
* Lifecycle callbacks for hydration events
|
|
307
314
|
*/
|
|
308
|
-
static lifecycleCallbacks
|
|
315
|
+
static lifecycleCallbacks: HydrationControllerCallbacks;
|
|
316
|
+
/**
|
|
317
|
+
* Whether the hydrationStarted callback has already been invoked.
|
|
318
|
+
*/
|
|
319
|
+
private static hydrationStarted;
|
|
309
320
|
/**
|
|
310
321
|
* An idle callback ID used to track hydration completion
|
|
311
322
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Constructable } from "../interfaces.js";
|
|
2
|
-
import { TypeRegistry } from "../platform.js";
|
|
3
|
-
import { ComposableStyles, ElementStyles } from "../styles/element-styles.js";
|
|
1
|
+
import { type Constructable } from "../interfaces.js";
|
|
2
|
+
import { type TypeRegistry } from "../platform.js";
|
|
3
|
+
import { type ComposableStyles, ElementStyles } from "../styles/element-styles.js";
|
|
4
4
|
import type { ElementViewTemplate } from "../templating/template.js";
|
|
5
5
|
import { AttributeConfiguration, AttributeDefinition } from "./attributes.js";
|
|
6
6
|
/**
|
|
@@ -8,7 +8,7 @@ import { AttributeConfiguration, AttributeDefinition } from "./attributes.js";
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export declare const fastElementRegistry: TypeRegistry<FASTElementDefinition>;
|
|
11
|
-
export { TypeRegistry };
|
|
11
|
+
export type { TypeRegistry };
|
|
12
12
|
/**
|
|
13
13
|
* Shadow root initialization options.
|
|
14
14
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Constructable } from "../interfaces.js";
|
|
1
|
+
import { type Constructable } from "../interfaces.js";
|
|
2
2
|
import { ElementController } from "./element-controller.js";
|
|
3
|
-
import { FASTElementDefinition, PartialFASTElementDefinition } from "./fast-definitions.js";
|
|
3
|
+
import { FASTElementDefinition, type PartialFASTElementDefinition } from "./fast-definitions.js";
|
|
4
4
|
/**
|
|
5
5
|
* Represents a custom element based on the FASTElement infrastructure.
|
|
6
6
|
* @public
|
package/dist/dts/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Constructable, ParameterDecorator } from "./interfaces.js";
|
|
1
|
+
import { type Constructable, type ParameterDecorator } from "./interfaces.js";
|
|
2
2
|
/**
|
|
3
3
|
* A Context object defines an optional initial value for a Context, as well as a name identifier for debugging purposes.
|
|
4
4
|
* @public
|
package/dist/dts/di/di.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Big thanks to https://github.com/fkleuver and the https://github.com/aurelia/aurelia project
|
|
3
3
|
* for the bulk of this code and many of the associated tests.
|
|
4
4
|
*/
|
|
5
|
-
import { ContextDecorator } from "../context.js";
|
|
6
|
-
import { Constructable } from "../interfaces.js";
|
|
5
|
+
import { type ContextDecorator } from "../context.js";
|
|
6
|
+
import { type Constructable } from "../interfaces.js";
|
|
7
7
|
/**
|
|
8
8
|
* Represents a custom callback for resolving a request from the container.
|
|
9
9
|
* The handler is the container that is invoking the callback. The requestor
|
package/dist/dts/dom-policy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DOMAspect,
|
|
2
|
-
import { TrustedTypesPolicy } from "./interfaces.js";
|
|
1
|
+
import { DOMAspect, type DOMSink, type DOMPolicy as IDOMPolicy } from "./dom.js";
|
|
2
|
+
import { type TrustedTypesPolicy } from "./interfaces.js";
|
|
3
3
|
/**
|
|
4
4
|
* A specific DOM sink guard for a node aspect.
|
|
5
5
|
* @public
|
|
@@ -78,6 +78,6 @@ declare const DOMPolicy: Readonly<{
|
|
|
78
78
|
* @param options The options to use in creating the policy.
|
|
79
79
|
* @returns The newly created DOMPolicy.
|
|
80
80
|
*/
|
|
81
|
-
create(options?: DOMPolicyOptions): Readonly<
|
|
81
|
+
create(options?: DOMPolicyOptions): Readonly<IDOMPolicy>;
|
|
82
82
|
}>;
|
|
83
83
|
export { DOMPolicy };
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,35 +1,48 @@
|
|
|
1
|
-
export type { Callable,
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export { Binding, BindingDirective } from "./binding/binding.js";
|
|
9
|
-
export { listener, oneWay } from "./binding/one-way.js";
|
|
10
|
-
export { oneTime } from "./binding/one-time.js";
|
|
1
|
+
export type { Callable, Class, Constructable, Disposable, FASTGlobal, TrustedTypesPolicy, } from "./interfaces.js";
|
|
2
|
+
export { emptyArray, FAST } from "./platform.js";
|
|
3
|
+
export { DOM, DOMAspect, type DOMPolicy, type DOMSink } from "./dom.js";
|
|
4
|
+
export { ArrayObserver, lengthOf, Sort, sortedCount, Splice, SpliceStrategy, SpliceStrategySupport, type LengthObserver, type SortObserver, } from "./observation/arrays.js";
|
|
5
|
+
export { PropertyChangeNotifier, SubscriberSet, type Notifier, type Subscriber, } from "./observation/notifier.js";
|
|
6
|
+
export { ExecutionContext, Observable, observable, SourceLifetime, volatile, type Accessor, type Expression, type ExpressionController, type ExpressionNotifier, type ExpressionObserver, type ObservationRecord, } from "./observation/observable.js";
|
|
7
|
+
export { Updates, type UpdateQueue } from "./observation/update-queue.js";
|
|
8
|
+
export { Binding, type BindingDirective } from "./binding/binding.js";
|
|
11
9
|
export { normalizeBinding } from "./binding/normalize.js";
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export { AddBehavior, cssDirective, CSSDirective, CSSDirectiveDefinition, } from "./styles/css-directive.js";
|
|
15
|
-
export { HostController, HostBehavior } from "./styles/host.js";
|
|
16
|
-
export { StyleStrategy, StyleTarget } from "./styles/style-strategy.js";
|
|
10
|
+
export { oneTime } from "./binding/one-time.js";
|
|
11
|
+
export { listener, oneWay } from "./binding/one-way.js";
|
|
17
12
|
export { CSSBindingDirective } from "./styles/css-binding-directive.js";
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
13
|
+
export { cssDirective, CSSDirective, type AddBehavior, type CSSDirectiveDefinition, } from "./styles/css-directive.js";
|
|
14
|
+
export { css, type CSSTemplateTag, type CSSValue } from "./styles/css.js";
|
|
15
|
+
export { ElementStyles, type ComposableStyles, type ConstructibleStyleStrategy, } from "./styles/element-styles.js";
|
|
16
|
+
export { type HostBehavior } from "./styles/host.js";
|
|
17
|
+
export type { HostController } from "./styles/host.js";
|
|
18
|
+
export type { StyleStrategy, StyleTarget } from "./styles/style-strategy.js";
|
|
19
|
+
export { children, ChildrenDirective } from "./templating/children.js";
|
|
20
|
+
export type { ChildListDirectiveOptions, ChildrenDirectiveOptions, SubtreeDirectiveOptions, } from "./templating/children.js";
|
|
21
|
+
export { Compiler } from "./templating/compiler.js";
|
|
22
|
+
export type { CompilationStrategy } from "./templating/compiler.js";
|
|
23
|
+
export { HTMLBindingDirective } from "./templating/html-binding-directive.js";
|
|
24
|
+
export type { ContentTemplate, ContentView, } from "./templating/html-binding-directive.js";
|
|
25
|
+
export { htmlDirective, HTMLDirective, StatelessAttachedAttributeDirective, } from "./templating/html-directive.js";
|
|
26
|
+
export type { AddViewBehaviorFactory, Aspected, CompiledViewBehaviorFactory, HTMLDirectiveDefinition, PartialHTMLDirectiveDefinition, ViewBehavior, ViewBehaviorFactory, ViewBehaviorTargets, ViewController, } from "./templating/html-directive.js";
|
|
20
27
|
export { Markup, Parser } from "./templating/markup.js";
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
28
|
+
export { elements, NodeObservationDirective } from "./templating/node-observation.js";
|
|
29
|
+
export type { ElementsFilter, NodeBehaviorOptions, } from "./templating/node-observation.js";
|
|
23
30
|
export { ref, RefDirective } from "./templating/ref.js";
|
|
24
|
-
export { when } from "./templating/when.js";
|
|
25
|
-
export { repeat, RepeatBehavior, RepeatDirective, RepeatOptions, } from "./templating/repeat.js";
|
|
26
|
-
export { slotted, SlottedDirective, SlottedDirectiveOptions, } from "./templating/slotted.js";
|
|
27
|
-
export { children, ChildrenDirective, ChildrenDirectiveOptions, ChildListDirectiveOptions, SubtreeDirectiveOptions, } from "./templating/children.js";
|
|
28
|
-
export { ElementView, HTMLView, SyntheticView, View, HydratableView, HydrationBindingError, } from "./templating/view.js";
|
|
29
|
-
export { elements, ElementsFilter, NodeBehaviorOptions, NodeObservationDirective, } from "./templating/node-observation.js";
|
|
30
31
|
export { render, RenderBehavior, RenderDirective } from "./templating/render.js";
|
|
32
|
+
export { repeat, RepeatBehavior, RepeatDirective } from "./templating/repeat.js";
|
|
33
|
+
export type { RepeatOptions } from "./templating/repeat.js";
|
|
34
|
+
export { slotted, SlottedDirective } from "./templating/slotted.js";
|
|
35
|
+
export type { SlottedDirectiveOptions } from "./templating/slotted.js";
|
|
36
|
+
export { html, InlineTemplateDirective, ViewTemplate } from "./templating/template.js";
|
|
37
|
+
export type { CaptureType, ElementViewTemplate, HTMLTemplateCompilationResult, HTMLTemplateTag, SyntheticViewTemplate, TemplateValue, } from "./templating/template.js";
|
|
38
|
+
export { HTMLView, HydrationBindingError } from "./templating/view.js";
|
|
39
|
+
export type { ElementView, HydratableView, SyntheticView, View, } from "./templating/view.js";
|
|
40
|
+
export { when } from "./templating/when.js";
|
|
41
|
+
export { attr, AttributeConfiguration, AttributeDefinition, booleanConverter, nullableBooleanConverter, nullableNumberConverter, } from "./components/attributes.js";
|
|
42
|
+
export type { AttributeMode, DecoratorAttributeConfiguration, ValueConverter, } from "./components/attributes.js";
|
|
43
|
+
export { ElementController, HydratableElementController, needsHydrationAttribute, Stages, type HydrationControllerCallbacks, } from "./components/element-controller.js";
|
|
44
|
+
export type { ElementControllerStrategy } from "./components/element-controller.js";
|
|
45
|
+
export { FASTElementDefinition, fastElementRegistry, TemplateOptions, type TemplateLifecycleCallbacks, } from "./components/fast-definitions.js";
|
|
46
|
+
export type { PartialFASTElementDefinition, ShadowRootOptions, TypeRegistry, } from "./components/fast-definitions.js";
|
|
31
47
|
export { customElement, FASTElement } from "./components/fast-element.js";
|
|
32
|
-
export { FASTElementDefinition, PartialFASTElementDefinition, ShadowRootOptions, fastElementRegistry, TemplateOptions, TypeRegistry, type TemplateLifecycleCallbacks, } from "./components/fast-definitions.js";
|
|
33
|
-
export { attr, AttributeConfiguration, AttributeDefinition, AttributeMode, booleanConverter, DecoratorAttributeConfiguration, nullableBooleanConverter, nullableNumberConverter, ValueConverter, } from "./components/attributes.js";
|
|
34
|
-
export { ElementController, ElementControllerStrategy, HydratableElementController, type HydrationControllerCallbacks, needsHydrationAttribute, Stages, } from "./components/element-controller.js";
|
|
35
48
|
export { deferHydrationAttribute, isHydratable } from "./components/hydration.js";
|
package/dist/dts/observable.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Observable exports for easy access to the Observable API
|
|
3
3
|
*/
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { ExecutionContext, Observable, observable, SourceLifetime, volatile, } from "./observation/observable.js";
|
|
5
|
+
export type { Accessor, Expression, ExpressionController, ExpressionNotifier, ExpressionObserver, ObservationRecord, } from "./observation/observable.js";
|
|
6
|
+
export { PropertyChangeNotifier, SubscriberSet } from "./observation/notifier.js";
|
|
7
|
+
export type { Notifier, Subscriber } from "./observation/notifier.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Subscriber, SubscriberSet } from "./notifier.js";
|
|
1
|
+
import { type Subscriber, SubscriberSet } from "./notifier.js";
|
|
2
2
|
/**
|
|
3
3
|
* A splice map is a representation of how a previous array of items
|
|
4
4
|
* was transformed into a new array of items. Conceptually it is a list of
|
package/dist/dts/platform.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Binding, BindingDirective } from "../binding/binding.js";
|
|
2
2
|
import type { Subscriber } from "../observation/notifier.js";
|
|
3
3
|
import type { ExpressionObserver } from "../observation/observable.js";
|
|
4
|
-
import { AddBehavior, CSSDirective } from "./css-directive.js";
|
|
4
|
+
import { type AddBehavior, CSSDirective } from "./css-directive.js";
|
|
5
5
|
import type { ComposableStyles } from "./element-styles.js";
|
|
6
6
|
import type { HostBehavior, HostController } from "./host.js";
|
|
7
7
|
type CSSBindingEntry = {
|
package/dist/dts/styles/css.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Expression } from "../observation/observable.js";
|
|
2
1
|
import { Binding } from "../binding/binding.js";
|
|
2
|
+
import type { Expression } from "../observation/observable.js";
|
|
3
3
|
import { CSSDirective } from "./css-directive.js";
|
|
4
|
-
import { ComposableStyles, ElementStyles } from "./element-styles.js";
|
|
4
|
+
import { type ComposableStyles, ElementStyles } from "./element-styles.js";
|
|
5
5
|
/**
|
|
6
6
|
* Represents the types of values that can be interpolated into a template.
|
|
7
7
|
* @public
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeBehaviorOptions, NodeObservationDirective } from "./node-observation.js";
|
|
1
|
+
import { type NodeBehaviorOptions, NodeObservationDirective } from "./node-observation.js";
|
|
2
2
|
import type { CaptureType } from "./template.js";
|
|
3
3
|
/**
|
|
4
4
|
* The options used to configure child list observation.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DOMPolicy } from "../dom.js";
|
|
2
|
-
import { ViewBehaviorFactory } from "./html-directive.js";
|
|
1
|
+
import { type DOMPolicy } from "../dom.js";
|
|
2
|
+
import { type ViewBehaviorFactory } from "./html-directive.js";
|
|
3
3
|
import type { HTMLTemplateCompilationResult as TemplateCompilationResult } from "./template.js";
|
|
4
4
|
/**
|
|
5
5
|
* A function capable of compiling a template from the preprocessed form produced
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DOMAspect, DOMPolicy } from "../dom.js";
|
|
2
|
-
import { ExecutionContext, Expression, ExpressionObserver } from "../observation/observable.js";
|
|
3
1
|
import type { Binding, BindingDirective } from "../binding/binding.js";
|
|
4
|
-
import {
|
|
2
|
+
import { DOMAspect, type DOMPolicy } from "../dom.js";
|
|
3
|
+
import { ExecutionContext, type Expression, type ExpressionObserver } from "../observation/observable.js";
|
|
4
|
+
import { type AddViewBehaviorFactory, type Aspected, HTMLDirective, type ViewBehavior, type ViewBehaviorFactory, type ViewController } from "./html-directive.js";
|
|
5
5
|
/**
|
|
6
6
|
* A simple View that can be interpolated into HTML content.
|
|
7
7
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DOMAspect, DOMPolicy } from "../dom.js";
|
|
2
|
-
import type { Constructable } from "../interfaces.js";
|
|
3
1
|
import type { Binding } from "../binding/binding.js";
|
|
2
|
+
import { DOMAspect, type DOMPolicy } from "../dom.js";
|
|
3
|
+
import type { Constructable } from "../interfaces.js";
|
|
4
4
|
import type { ExpressionController } from "../observation/observable.js";
|
|
5
5
|
/**
|
|
6
6
|
* The target nodes available to a behavior.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StatelessAttachedAttributeDirective, ViewController } from "./html-directive.js";
|
|
1
|
+
import { StatelessAttachedAttributeDirective, type ViewController } from "./html-directive.js";
|
|
2
2
|
import type { CaptureType } from "./template.js";
|
|
3
3
|
/**
|
|
4
4
|
* The runtime behavior for template references.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { Binding, type BindingDirective } from "../binding/binding.js";
|
|
1
2
|
import type { FASTElement } from "../components/fast-element.js";
|
|
2
3
|
import type { DOMPolicy } from "../dom.js";
|
|
3
|
-
import { Constructable } from "../interfaces.js";
|
|
4
|
-
import { Binding, BindingDirective } from "../binding/binding.js";
|
|
4
|
+
import { type Constructable } from "../interfaces.js";
|
|
5
5
|
import type { Subscriber } from "../observation/notifier.js";
|
|
6
6
|
import type { ExecutionContext, Expression, ExpressionObserver } from "../observation/observable.js";
|
|
7
7
|
import type { ContentTemplate, ContentView } from "./html-binding-directive.js";
|
|
8
|
-
import { AddViewBehaviorFactory, HTMLDirective, ViewBehavior, ViewBehaviorFactory, ViewController } from "./html-directive.js";
|
|
9
|
-
import { CaptureType, SyntheticViewTemplate, TemplateValue, ViewTemplate } from "./template.js";
|
|
8
|
+
import { type AddViewBehaviorFactory, HTMLDirective, type ViewBehavior, type ViewBehaviorFactory, type ViewController } from "./html-directive.js";
|
|
9
|
+
import { type CaptureType, type SyntheticViewTemplate, type TemplateValue, ViewTemplate } from "./template.js";
|
|
10
10
|
/**
|
|
11
11
|
* A Behavior that enables advanced rendering.
|
|
12
12
|
* @public
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { Binding, BindingDirective } from "../binding/binding.js";
|
|
1
2
|
import { Sort, Splice } from "../observation/arrays.js";
|
|
2
3
|
import type { Subscriber } from "../observation/notifier.js";
|
|
3
|
-
import { Expression, ExpressionObserver } from "../observation/observable.js";
|
|
4
|
-
import type
|
|
5
|
-
import { AddViewBehaviorFactory, HTMLDirective, ViewBehavior, ViewBehaviorFactory, ViewController } from "./html-directive.js";
|
|
4
|
+
import { type Expression, type ExpressionObserver } from "../observation/observable.js";
|
|
5
|
+
import { type AddViewBehaviorFactory, HTMLDirective, type ViewBehavior, type ViewBehaviorFactory, type ViewController } from "./html-directive.js";
|
|
6
6
|
import type { CaptureType, SyntheticViewTemplate, ViewTemplate } from "./template.js";
|
|
7
|
-
import { SyntheticView } from "./view.js";
|
|
7
|
+
import { type SyntheticView } from "./view.js";
|
|
8
8
|
/**
|
|
9
9
|
* Options for configuring repeat behavior.
|
|
10
10
|
* @public
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeBehaviorOptions, NodeObservationDirective } from "./node-observation.js";
|
|
1
|
+
import { type NodeBehaviorOptions, NodeObservationDirective } from "./node-observation.js";
|
|
2
2
|
import type { CaptureType } from "./template.js";
|
|
3
3
|
/**
|
|
4
4
|
* The options used to configure slotted node observation.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { DOMPolicy } from "../dom.js";
|
|
2
1
|
import { Binding } from "../binding/binding.js";
|
|
2
|
+
import type { DOMPolicy } from "../dom.js";
|
|
3
3
|
import type { Expression } from "../observation/observable.js";
|
|
4
|
-
import { AddViewBehaviorFactory, CompiledViewBehaviorFactory, HTMLDirective, ViewBehaviorFactory } from "./html-directive.js";
|
|
4
|
+
import { type AddViewBehaviorFactory, type CompiledViewBehaviorFactory, HTMLDirective, type ViewBehaviorFactory } from "./html-directive.js";
|
|
5
5
|
import type { ElementView, HTMLView, SyntheticView } from "./view.js";
|
|
6
6
|
/**
|
|
7
7
|
* A template capable of creating views specifically for rendering custom elements.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Hydratable } from "../components/hydration.js";
|
|
2
|
-
import { ViewBehaviorBoundaries } from "../hydration/target-builder.js";
|
|
3
|
-
import type { ViewTemplate } from "../templating/template.js";
|
|
2
|
+
import { type ViewBehaviorBoundaries } from "../hydration/target-builder.js";
|
|
4
3
|
import type { Disposable } from "../interfaces.js";
|
|
5
4
|
import { ExecutionContext, SourceLifetime } from "../observation/observable.js";
|
|
5
|
+
import type { ViewTemplate } from "../templating/template.js";
|
|
6
6
|
import type { CompiledViewBehaviorFactory, ViewBehaviorFactory, ViewBehaviorTargets, ViewController } from "./html-directive.js";
|
|
7
7
|
/**
|
|
8
8
|
* Represents a collection of DOM nodes which can be bound to a data source.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isString } from "../interfaces.js";
|
|
2
|
-
import { Observable, } from "../observation/observable.js";
|
|
1
|
+
import { isString, Message } from "../interfaces.js";
|
|
2
|
+
import { ExecutionContext, Observable, } from "../observation/observable.js";
|
|
3
3
|
import { FAST, makeSerializationNoop } from "../platform.js";
|
|
4
4
|
import { Binding } from "./binding.js";
|
|
5
5
|
const defaultOptions = {
|
|
@@ -56,7 +56,7 @@ class TwoWayObserver {
|
|
|
56
56
|
const notifier = this.notifier;
|
|
57
57
|
const last = notifier.last; // using internal API!!!
|
|
58
58
|
if (!last) {
|
|
59
|
-
FAST.warn(
|
|
59
|
+
FAST.warn(Message.twoWayBindingRequiresObservables);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
let value;
|