@microsoft/fast-element 3.0.0-rc.1 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -1
- package/README.md +50 -14
- package/dist/context/context.api.json +13 -13
- package/dist/declarative/declarative.api.json +654 -15
- package/dist/di/di.api.json +15 -15
- package/dist/dts/__test__/helpers.d.ts +6 -0
- package/dist/dts/__test__/setup-node.d.ts +0 -0
- package/dist/dts/binding/binding.d.ts +15 -5
- package/dist/dts/binding/one-time.d.ts +1 -1
- package/dist/dts/binding/one-way.d.ts +1 -1
- package/dist/dts/binding/signal.d.ts +1 -1
- package/dist/dts/binding/two-way.d.ts +1 -1
- package/dist/dts/components/attributes.d.ts +1 -1
- package/dist/dts/components/enable-hydration.d.ts +22 -2
- package/dist/dts/components/fast-definitions.d.ts +7 -4
- package/dist/dts/components/fast-element.d.ts +42 -12
- package/dist/dts/components/hydration-tracker.d.ts +47 -4
- package/dist/dts/components/hydration.d.ts +5 -0
- package/dist/dts/context.d.ts +7 -7
- package/dist/dts/declarative/debug.d.ts +2 -3
- package/dist/dts/declarative/index.d.ts +3 -2
- package/dist/dts/declarative/interfaces.d.ts +1 -2
- package/dist/dts/declarative/template.d.ts +2 -1
- package/dist/dts/declarative/utilities.d.ts +50 -4
- package/dist/dts/di/di.d.ts +6 -6
- package/dist/dts/dom-policy.d.ts +22 -4
- package/dist/dts/dom.d.ts +4 -16
- package/dist/dts/hydration/diagnostics.d.ts +93 -0
- package/dist/dts/hydration/hydration-debugger.d.ts +35 -0
- package/dist/dts/hydration/messages.d.ts +62 -0
- package/dist/dts/hydration/target-builder.d.ts +26 -1
- package/dist/dts/hydration.d.ts +7 -3
- package/dist/dts/index.d.ts +7 -3
- package/dist/dts/interfaces.d.ts +1 -0
- package/dist/dts/observation/observable.d.ts +3 -3
- package/dist/dts/platform.d.ts +20 -4
- package/dist/dts/registry.d.ts +1 -0
- package/dist/dts/templating/children.d.ts +1 -1
- package/dist/dts/templating/compiler.d.ts +1 -1
- package/dist/dts/templating/html-binding-directive.d.ts +6 -2
- package/dist/dts/templating/html-directive.d.ts +2 -1
- package/dist/dts/templating/hydration-view.d.ts +24 -3
- package/dist/dts/templating/ref.d.ts +1 -1
- package/dist/dts/templating/render.d.ts +2 -2
- package/dist/dts/templating/repeat.d.ts +1 -1
- package/dist/dts/templating/slotted.d.ts +1 -1
- package/dist/dts/templating/template.d.ts +5 -5
- package/dist/dts/templating/when.d.ts +1 -1
- package/dist/dts/testing/fakes.d.ts +4 -4
- package/dist/esm/__test__/helpers.js +22 -0
- package/dist/esm/__test__/setup-node.js +18 -0
- package/dist/esm/binding/two-way.js +1 -2
- package/dist/esm/components/attributes.js +12 -8
- package/dist/esm/components/element-controller.js +11 -6
- package/dist/esm/components/enable-hydration.js +27 -3
- package/dist/esm/components/fast-definitions.js +19 -18
- package/dist/esm/components/hydration-tracker.js +34 -5
- package/dist/esm/components/hydration.js +85 -6
- package/dist/esm/debug.js +1 -0
- package/dist/esm/declarative/attribute-map.js +2 -1
- package/dist/esm/declarative/debug.js +0 -1
- package/dist/esm/declarative/index.js +1 -0
- package/dist/esm/declarative/interfaces.js +0 -1
- package/dist/esm/declarative/observer-map-utilities.js +58 -55
- package/dist/esm/declarative/template-bridge.js +4 -14
- package/dist/esm/declarative/template.js +4 -3
- package/dist/esm/declarative/utilities.js +236 -1
- package/dist/esm/di/di.js +2 -1
- package/dist/esm/dom-policy.js +33 -4
- package/dist/esm/hydration/diagnostics.js +50 -0
- package/dist/esm/hydration/hydration-debugger.js +112 -0
- package/dist/esm/hydration/messages.js +84 -0
- package/dist/esm/hydration/target-builder.js +65 -19
- package/dist/esm/hydration.js +3 -1
- package/dist/esm/index.js +6 -2
- package/dist/esm/interfaces.js +1 -0
- package/dist/esm/metadata.js +2 -8
- package/dist/esm/observation/notifier.js +2 -4
- package/dist/esm/registry.js +1 -0
- package/dist/esm/templating/html-binding-directive.js +1 -1
- package/dist/esm/templating/hydration-view.js +20 -27
- package/dist/esm/templating/render.js +39 -18
- package/dist/esm/templating/repeat.js +51 -17
- package/dist/esm/templating/view.js +1 -1
- package/dist/esm/testing/fixture.js +2 -2
- package/dist/esm/testing/timeout.js +2 -2
- package/dist/fast-element.api.json +1329 -99
- package/dist/fast-element.d.ts +147 -66
- package/dist/fast-element.debug.js +392 -99
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +392 -99
- package/dist/fast-element.min.js +2 -2
- package/dist/fast-element.untrimmed.d.ts +133 -70
- package/dist/hydration/hydration.api.json +1280 -57
- package/dist/styles/styles.api.json +1 -1
- package/package.json +21 -9
- package/ARCHITECTURE_FASTELEMENT.md +0 -63
- package/ARCHITECTURE_HTML_TAGGED_TEMPLATE_LITERAL.md +0 -36
- package/ARCHITECTURE_INTRO.md +0 -10
- package/ARCHITECTURE_OVERVIEW.md +0 -52
- package/ARCHITECTURE_UPDATES.md +0 -11
- package/CHANGELOG.json +0 -2275
- package/DECLARATIVE_DESIGN.md +0 -806
- package/DECLARATIVE_HTML.md +0 -470
- package/DECLARATIVE_MIGRATION.md +0 -215
- package/DECLARATIVE_RENDERING.md +0 -530
- package/DECLARATIVE_RENDERING_LIFECYCLE.md +0 -288
- package/DECLARATIVE_SCHEMA_OBSERVER_MAP.md +0 -489
- package/DESIGN.md +0 -615
- package/MIGRATION.md +0 -387
- package/SIZES.md +0 -25
- package/api-extractor.arrays.json +0 -15
- package/api-extractor.context.json +0 -15
- package/api-extractor.declarative.json +0 -15
- package/api-extractor.di.json +0 -15
- package/api-extractor.hydration.json +0 -15
- package/api-extractor.styles.json +0 -15
- package/biome.json +0 -4
- package/docs/ACKNOWLEDGEMENTS.md +0 -12
- package/docs/api-report.api.md +0 -1299
- package/docs/arrays/api-report.api.md +0 -114
- package/docs/context/api-report.api.md +0 -69
- package/docs/declarative/api-report.api.md +0 -397
- package/docs/di/api-report.api.md +0 -315
- package/docs/fast-element-2-changes.md +0 -15
- package/docs/hydration/api-report.api.md +0 -285
- package/docs/styles/api-report.api.md +0 -135
- package/playwright.config.ts +0 -26
- package/playwright.declarative.config.ts +0 -26
- package/playwright.declarative.webui.config.ts +0 -20
- package/scripts/declarative/build-fixtures-with-webui.js +0 -135
- package/scripts/declarative/build-fixtures.js +0 -49
- package/scripts/declarative/build-fixtures.utilities.js +0 -101
- package/scripts/measure-sizes.js +0 -219
- package/scripts/run-api-extractor.js +0 -70
- package/test/declarative/fixtures/README.md +0 -72
- package/test/declarative/fixtures/WRITING_FIXTURES.md +0 -330
- package/test/declarative/fixtures/bindings/README.md +0 -12
- package/test/declarative/fixtures/bindings/attribute/entry.html +0 -13
- package/test/declarative/fixtures/bindings/attribute/fast-build.config.json +0 -6
- package/test/declarative/fixtures/bindings/attribute/index.html +0 -25
- package/test/declarative/fixtures/bindings/attribute/main.ts +0 -41
- package/test/declarative/fixtures/bindings/attribute/state.json +0 -8
- package/test/declarative/fixtures/bindings/attribute/templates.html +0 -11
- package/test/declarative/fixtures/bindings/content/entry.html +0 -12
- package/test/declarative/fixtures/bindings/content/fast-build.config.json +0 -6
- package/test/declarative/fixtures/bindings/content/index.html +0 -19
- package/test/declarative/fixtures/bindings/content/main.ts +0 -27
- package/test/declarative/fixtures/bindings/content/state.json +0 -4
- package/test/declarative/fixtures/bindings/content/templates.html +0 -6
- package/test/declarative/fixtures/bindings/dot-syntax/entry.html +0 -11
- package/test/declarative/fixtures/bindings/dot-syntax/fast-build.config.json +0 -6
- package/test/declarative/fixtures/bindings/dot-syntax/index.html +0 -47
- package/test/declarative/fixtures/bindings/dot-syntax/main.ts +0 -59
- package/test/declarative/fixtures/bindings/dot-syntax/state.json +0 -16
- package/test/declarative/fixtures/bindings/dot-syntax/templates.html +0 -17
- package/test/declarative/fixtures/bindings/event/entry.html +0 -11
- package/test/declarative/fixtures/bindings/event/fast-build.config.json +0 -6
- package/test/declarative/fixtures/bindings/event/index.html +0 -43
- package/test/declarative/fixtures/bindings/event/main.ts +0 -43
- package/test/declarative/fixtures/bindings/event/state.json +0 -3
- package/test/declarative/fixtures/bindings/event/templates.html +0 -18
- package/test/declarative/fixtures/bindings/host/entry.html +0 -40
- package/test/declarative/fixtures/bindings/host/fast-build.config.json +0 -6
- package/test/declarative/fixtures/bindings/host/index.html +0 -96
- package/test/declarative/fixtures/bindings/host/main.ts +0 -222
- package/test/declarative/fixtures/bindings/host/state.json +0 -9
- package/test/declarative/fixtures/bindings/host/templates.html +0 -55
- package/test/declarative/fixtures/directives/README.md +0 -12
- package/test/declarative/fixtures/directives/children/entry.html +0 -11
- package/test/declarative/fixtures/directives/children/fast-build.config.json +0 -6
- package/test/declarative/fixtures/directives/children/index.html +0 -15
- package/test/declarative/fixtures/directives/children/main.ts +0 -22
- package/test/declarative/fixtures/directives/children/state.json +0 -3
- package/test/declarative/fixtures/directives/children/templates.html +0 -3
- package/test/declarative/fixtures/directives/ref/entry.html +0 -11
- package/test/declarative/fixtures/directives/ref/fast-build.config.json +0 -6
- package/test/declarative/fixtures/directives/ref/index.html +0 -15
- package/test/declarative/fixtures/directives/ref/main.ts +0 -17
- package/test/declarative/fixtures/directives/ref/state.json +0 -1
- package/test/declarative/fixtures/directives/ref/templates.html +0 -3
- package/test/declarative/fixtures/directives/repeat/entry.html +0 -21
- package/test/declarative/fixtures/directives/repeat/fast-build.config.json +0 -6
- package/test/declarative/fixtures/directives/repeat/index.html +0 -133
- package/test/declarative/fixtures/directives/repeat/main.ts +0 -110
- package/test/declarative/fixtures/directives/repeat/sprites.svg +0 -8
- package/test/declarative/fixtures/directives/repeat/state.json +0 -10
- package/test/declarative/fixtures/directives/repeat/templates.html +0 -75
- package/test/declarative/fixtures/directives/slotted/entry.html +0 -17
- package/test/declarative/fixtures/directives/slotted/fast-build.config.json +0 -6
- package/test/declarative/fixtures/directives/slotted/index.html +0 -27
- package/test/declarative/fixtures/directives/slotted/main.ts +0 -29
- package/test/declarative/fixtures/directives/slotted/state.json +0 -1
- package/test/declarative/fixtures/directives/slotted/templates.html +0 -7
- package/test/declarative/fixtures/directives/when/entry.html +0 -51
- package/test/declarative/fixtures/directives/when/fast-build.config.json +0 -6
- package/test/declarative/fixtures/directives/when/index.html +0 -136
- package/test/declarative/fixtures/directives/when/main.ts +0 -172
- package/test/declarative/fixtures/directives/when/state.json +0 -12
- package/test/declarative/fixtures/directives/when/templates.html +0 -75
- package/test/declarative/fixtures/ecosystem/README.md +0 -11
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/entry.html +0 -12
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/fast-build.config.json +0 -6
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/index.html +0 -20
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/main.ts +0 -68
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/state.json +0 -4
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/templates.html +0 -7
- package/test/declarative/fixtures/ecosystem/errors/entry.html +0 -12
- package/test/declarative/fixtures/ecosystem/errors/fast-build.config.json +0 -6
- package/test/declarative/fixtures/ecosystem/errors/index.html +0 -20
- package/test/declarative/fixtures/ecosystem/errors/main.ts +0 -17
- package/test/declarative/fixtures/ecosystem/errors/state.json +0 -1
- package/test/declarative/fixtures/ecosystem/errors/templates.html +0 -7
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/entry.html +0 -17
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/fast-build.config.json +0 -6
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/index.html +0 -56
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/main.ts +0 -134
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/state.json +0 -12
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/templates.html +0 -34
- package/test/declarative/fixtures/ecosystem/performance-metrics/entry.html +0 -25
- package/test/declarative/fixtures/ecosystem/performance-metrics/fast-build.config.json +0 -6
- package/test/declarative/fixtures/ecosystem/performance-metrics/fast-card.css +0 -10
- package/test/declarative/fixtures/ecosystem/performance-metrics/index.html +0 -181
- package/test/declarative/fixtures/ecosystem/performance-metrics/main.ts +0 -58
- package/test/declarative/fixtures/ecosystem/performance-metrics/state.json +0 -6
- package/test/declarative/fixtures/ecosystem/performance-metrics/templates.html +0 -15
- package/test/declarative/fixtures/extensions/README.md +0 -15
- package/test/declarative/fixtures/extensions/attribute-map/entry.html +0 -14
- package/test/declarative/fixtures/extensions/attribute-map/fast-build.config.json +0 -6
- package/test/declarative/fixtures/extensions/attribute-map/index.html +0 -31
- package/test/declarative/fixtures/extensions/attribute-map/main.ts +0 -40
- package/test/declarative/fixtures/extensions/attribute-map/state.json +0 -4
- package/test/declarative/fixtures/extensions/attribute-map/templates.html +0 -14
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/entry.html +0 -12
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/fast-build.config.json +0 -7
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/index.html +0 -25
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/main.ts +0 -31
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/state.json +0 -5
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/templates.html +0 -11
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/entry.html +0 -13
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/fast-build.config.json +0 -7
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/index.html +0 -23
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/main.ts +0 -37
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/state.json +0 -1
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/templates.html +0 -9
- package/test/declarative/fixtures/extensions/observer-map/entry.html +0 -15
- package/test/declarative/fixtures/extensions/observer-map/fast-build.config.json +0 -6
- package/test/declarative/fixtures/extensions/observer-map/index.html +0 -442
- package/test/declarative/fixtures/extensions/observer-map/main.ts +0 -482
- package/test/declarative/fixtures/extensions/observer-map/state.json +0 -158
- package/test/declarative/fixtures/extensions/observer-map/templates.html +0 -172
- package/test/declarative/fixtures/extensions/observer-map-config-object/entry.html +0 -16
- package/test/declarative/fixtures/extensions/observer-map-config-object/fast-build.config.json +0 -6
- package/test/declarative/fixtures/extensions/observer-map-config-object/index.html +0 -27
- package/test/declarative/fixtures/extensions/observer-map-config-object/main.ts +0 -53
- package/test/declarative/fixtures/extensions/observer-map-config-object/state.json +0 -9
- package/test/declarative/fixtures/extensions/observer-map-config-object/templates.html +0 -12
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/README.md +0 -98
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/entry.html +0 -156
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/fast-build.config.json +0 -6
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/index.html +0 -376
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/main.ts +0 -366
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/state.json +0 -69
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/templates.html +0 -91
- package/test/declarative/fixtures/extensions/observer-map-properties/entry.html +0 -14
- package/test/declarative/fixtures/extensions/observer-map-properties/fast-build.config.json +0 -6
- package/test/declarative/fixtures/extensions/observer-map-properties/index.html +0 -110
- package/test/declarative/fixtures/extensions/observer-map-properties/main.ts +0 -175
- package/test/declarative/fixtures/extensions/observer-map-properties/state.json +0 -29
- package/test/declarative/fixtures/extensions/observer-map-properties/templates.html +0 -55
- package/test/declarative/fixtures/scenarios/README.md +0 -7
- package/test/declarative/fixtures/scenarios/nested-elements/entry.html +0 -16
- package/test/declarative/fixtures/scenarios/nested-elements/fast-build.config.json +0 -6
- package/test/declarative/fixtures/scenarios/nested-elements/index.html +0 -126
- package/test/declarative/fixtures/scenarios/nested-elements/main.ts +0 -214
- package/test/declarative/fixtures/scenarios/nested-elements/state.json +0 -10
- package/test/declarative/fixtures/scenarios/nested-elements/templates.html +0 -54
- package/test/declarative/index.html +0 -12
- package/test/declarative/vite.config.ts +0 -55
- package/test/declarative-main.ts +0 -6
- package/test/extension-subpaths-main.ts +0 -9
- package/test/index.html +0 -11
- package/test/main.ts +0 -109
- package/test/pure-declarative-main.ts +0 -1
- package/test/vite.config.ts +0 -19
- package/tsconfig.api-extractor.json +0 -6
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
## API Report File for "@microsoft/fast-element"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
// @public
|
|
8
|
-
export const all: (key: any, searchAncestors?: boolean) => ReturnType<typeof DI.inject>;
|
|
9
|
-
|
|
10
|
-
// @public
|
|
11
|
-
export type AsyncRegistrationLocator = (key: Key) => Promise<Registration | null>;
|
|
12
|
-
|
|
13
|
-
// @public
|
|
14
|
-
export interface Container extends ServiceLocator {
|
|
15
|
-
createChild(config?: Partial<Omit<ContainerConfiguration, "parentLocator">>): Container;
|
|
16
|
-
getFactory<T extends Constructable>(key: T): Factory<T>;
|
|
17
|
-
getResolver<K extends Key, T = K>(key: K | Key, autoRegister?: boolean): Resolver<T> | null;
|
|
18
|
-
register(...params: any[]): Container;
|
|
19
|
-
// Warning: (ae-forgotten-export) The symbol "Constructable" needs to be exported by the entry point di.d.ts
|
|
20
|
-
registerFactory<T extends Constructable>(key: T, factory: Factory<T>): void;
|
|
21
|
-
registerResolver<K extends Key, T = K>(key: K, resolver: Resolver<T>): Resolver<T>;
|
|
22
|
-
registerTransformer<K extends Key, T = K>(key: K, transformer: Transformer_2<T>): boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Warning: (ae-forgotten-export) The symbol "ContextDecorator" needs to be exported by the entry point di.d.ts
|
|
26
|
-
//
|
|
27
|
-
// @public
|
|
28
|
-
export const Container: ContextDecorator<Container>;
|
|
29
|
-
|
|
30
|
-
// @public
|
|
31
|
-
export interface ContainerConfiguration {
|
|
32
|
-
asyncRegistrationLocator: AsyncRegistrationLocator;
|
|
33
|
-
defaultResolver(key: Key, handler: Container): Resolver;
|
|
34
|
-
parentLocator: ParentLocator;
|
|
35
|
-
responsibleForOwnerRequests: boolean;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// @public
|
|
39
|
-
export const ContainerConfiguration: Readonly<{
|
|
40
|
-
default: Readonly<ContainerConfiguration>;
|
|
41
|
-
}>;
|
|
42
|
-
|
|
43
|
-
// Warning: (ae-internal-missing-underscore) The name "ContainerImpl" should be prefixed with an underscore because the declaration is marked as @internal
|
|
44
|
-
//
|
|
45
|
-
// @internal (undocumented)
|
|
46
|
-
export class ContainerImpl implements DOMContainer {
|
|
47
|
-
constructor(owner: any, config: ContainerConfiguration);
|
|
48
|
-
// (undocumented)
|
|
49
|
-
protected config: ContainerConfiguration;
|
|
50
|
-
// (undocumented)
|
|
51
|
-
createChild(config?: Partial<Omit<ContainerConfiguration, "parentLocator">>): Container;
|
|
52
|
-
// (undocumented)
|
|
53
|
-
get depth(): number;
|
|
54
|
-
// (undocumented)
|
|
55
|
-
get<K extends Key>(key: K): Resolved<K>;
|
|
56
|
-
// (undocumented)
|
|
57
|
-
getAll<K extends Key>(key: K, searchAncestors?: boolean): readonly Resolved<K>[];
|
|
58
|
-
// (undocumented)
|
|
59
|
-
getAsync<K extends Key>(key: K): Promise<Resolved<K>>;
|
|
60
|
-
// (undocumented)
|
|
61
|
-
getFactory<K extends Constructable>(Type: K): Factory<K>;
|
|
62
|
-
// (undocumented)
|
|
63
|
-
getResolver<K extends Key, T = K>(key: K | Key, autoRegister?: boolean): Resolver<T> | null;
|
|
64
|
-
// (undocumented)
|
|
65
|
-
handleContextRequests(enable: boolean): void;
|
|
66
|
-
// (undocumented)
|
|
67
|
-
has<K extends Key>(key: K, searchAncestors?: boolean): boolean;
|
|
68
|
-
// (undocumented)
|
|
69
|
-
protected owner: any;
|
|
70
|
-
// (undocumented)
|
|
71
|
-
get parent(): ContainerImpl | null;
|
|
72
|
-
// (undocumented)
|
|
73
|
-
register(...params: any[]): Container;
|
|
74
|
-
// (undocumented)
|
|
75
|
-
registerFactory<K extends Constructable>(key: K, factory: Factory<K>): void;
|
|
76
|
-
// (undocumented)
|
|
77
|
-
registerResolver<K extends Key, T = K>(key: K, resolver: Resolver<T>): Resolver<T>;
|
|
78
|
-
// (undocumented)
|
|
79
|
-
registerTransformer<K extends Key, T = K>(key: K, transformer: Transformer_2<T>): boolean;
|
|
80
|
-
// (undocumented)
|
|
81
|
-
get responsibleForOwnerRequests(): boolean;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// @public
|
|
85
|
-
export const DefaultResolver: Readonly<{
|
|
86
|
-
none(key: Key): Resolver;
|
|
87
|
-
singleton(key: Key): Resolver;
|
|
88
|
-
transient(key: Key): Resolver;
|
|
89
|
-
}>;
|
|
90
|
-
|
|
91
|
-
// @public
|
|
92
|
-
export const DI: Readonly<{
|
|
93
|
-
installAsContextRequestStrategy(fallback?: () => DOMContainer): void;
|
|
94
|
-
createContainer(config?: Partial<ContainerConfiguration>): Container;
|
|
95
|
-
findResponsibleContainer(target: EventTarget, fallback?: () => DOMContainer): DOMContainer;
|
|
96
|
-
findParentContainer(target: EventTarget, fallback?: () => DOMContainer): DOMContainer;
|
|
97
|
-
getOrCreateDOMContainer(target?: EventTarget, config?: Partial<Omit<ContainerConfiguration, "parentLocator">>): DOMContainer;
|
|
98
|
-
getDependencies(Type: Constructable | Injectable): Key[];
|
|
99
|
-
defineProperty(target: {}, propertyName: string, key: Key, respectConnection?: boolean): void;
|
|
100
|
-
createContext: typeof createContext;
|
|
101
|
-
inject(...dependencies: Key[]): (target: any, key?: string | number, descriptor?: PropertyDescriptor | number) => void;
|
|
102
|
-
transient<T extends Constructable>(target: T & Partial<RegisterSelf<T>>): T & RegisterSelf<T>;
|
|
103
|
-
singleton<T_1 extends Constructable>(target: T_1 & Partial<RegisterSelf<T_1>>, options?: SingletonOptions): T_1 & RegisterSelf<T_1>;
|
|
104
|
-
}>;
|
|
105
|
-
|
|
106
|
-
// @public
|
|
107
|
-
export interface DOMContainer extends Container {
|
|
108
|
-
// @beta
|
|
109
|
-
handleContextRequests(enable: boolean): void;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// @public
|
|
113
|
-
export const DOMContainer: ContextDecorator<DOMContainer>;
|
|
114
|
-
|
|
115
|
-
// @public
|
|
116
|
-
export interface Factory<T extends Constructable = any> {
|
|
117
|
-
construct(container: Container, dynamicDependencies?: Key[]): Resolved<T>;
|
|
118
|
-
constructAsync(container: Container, dynamicDependencies?: Key[]): Promise<Resolved<T>>;
|
|
119
|
-
registerTransformer(transformer: Transformer_2<T>): void;
|
|
120
|
-
readonly Type: T;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Warning: (ae-internal-missing-underscore) The name "FactoryImpl" should be prefixed with an underscore because the declaration is marked as @internal
|
|
124
|
-
//
|
|
125
|
-
// @internal (undocumented)
|
|
126
|
-
export class FactoryImpl<T extends Constructable = any> implements Factory<T> {
|
|
127
|
-
constructor(Type: T, dependencies: Key[]);
|
|
128
|
-
// (undocumented)
|
|
129
|
-
construct(container: Container, dynamicDependencies?: Key[]): Resolved<T>;
|
|
130
|
-
// (undocumented)
|
|
131
|
-
constructAsync(container: Container, dynamicDependencies?: Key[]): Promise<Resolved<T>>;
|
|
132
|
-
// (undocumented)
|
|
133
|
-
registerTransformer(transformer: (instance: any) => any): void;
|
|
134
|
-
// (undocumented)
|
|
135
|
-
Type: T;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// @public
|
|
139
|
-
export function ignore(target: Injectable, property?: string | number, descriptor?: PropertyDescriptor | number): void;
|
|
140
|
-
|
|
141
|
-
// @public
|
|
142
|
-
export const inject: (...dependencies: Key[]) => (target: any, key?: string | number, descriptor?: PropertyDescriptor | number) => void;
|
|
143
|
-
|
|
144
|
-
// @public
|
|
145
|
-
export type Injectable<T = {}> = Constructable<T> & {
|
|
146
|
-
inject?: Key[];
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// @public
|
|
150
|
-
export interface InterfaceConfiguration {
|
|
151
|
-
friendlyName?: string;
|
|
152
|
-
respectConnection?: boolean;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// @public
|
|
156
|
-
export type Key = PropertyKey | object | ContextDecorator | Constructable | Resolver;
|
|
157
|
-
|
|
158
|
-
// @public
|
|
159
|
-
export const lazy: (key: any) => any;
|
|
160
|
-
|
|
161
|
-
// @public
|
|
162
|
-
export const newInstanceForScope: (key: any) => any;
|
|
163
|
-
|
|
164
|
-
// @public
|
|
165
|
-
export const newInstanceOf: (key: any) => any;
|
|
166
|
-
|
|
167
|
-
// @public
|
|
168
|
-
export const optional: (key: any) => any;
|
|
169
|
-
|
|
170
|
-
// @public
|
|
171
|
-
export type ParentLocator = (owner: any) => Container | null;
|
|
172
|
-
|
|
173
|
-
// @public
|
|
174
|
-
export type RegisterSelf<T extends Constructable> = {
|
|
175
|
-
register(container: Container): Resolver<InstanceType<T>>;
|
|
176
|
-
registerInRequestor: boolean;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// @public
|
|
180
|
-
export interface Registration<K = any> {
|
|
181
|
-
register(container: Container): Resolver<K>;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// @public
|
|
185
|
-
export const Registration: Readonly<{
|
|
186
|
-
instance<T>(key: Key, value: T): Registration<T>;
|
|
187
|
-
singleton<T_1 extends Constructable>(key: Key, value: T_1): Registration<InstanceType<T_1>>;
|
|
188
|
-
transient<T_2 extends Constructable>(key: Key, value: T_2): Registration<InstanceType<T_2>>;
|
|
189
|
-
callback<T_3>(key: Key, callback: ResolveCallback<T_3>): Registration<Resolved<T_3>>;
|
|
190
|
-
cachedCallback<T_4>(key: Key, callback: ResolveCallback<T_4>): Registration<Resolved<T_4>>;
|
|
191
|
-
aliasTo<T_5>(originalKey: T_5, aliasKey: Key): Registration<Resolved<T_5>>;
|
|
192
|
-
}>;
|
|
193
|
-
|
|
194
|
-
// @public
|
|
195
|
-
export interface Registry {
|
|
196
|
-
register(container: Container, ...params: unknown[]): void | Resolver;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// @public
|
|
200
|
-
export type ResolveCallback<T = any> = (handler: Container, requestor: Container, resolver: Resolver<T>) => T;
|
|
201
|
-
|
|
202
|
-
// Warning: (ae-forgotten-export) The symbol "ResolverLike" needs to be exported by the entry point di.d.ts
|
|
203
|
-
//
|
|
204
|
-
// @public
|
|
205
|
-
export type Resolved<K> = K extends ContextDecorator<infer T> ? T : K extends Constructable ? InstanceType<K> : K extends ResolverLike<any, infer T1> ? T1 extends Constructable ? InstanceType<T1> : T1 : K;
|
|
206
|
-
|
|
207
|
-
// @public
|
|
208
|
-
export interface Resolver<K = any> extends ResolverLike<Container, K> {
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// @public
|
|
212
|
-
export class ResolverBuilder<K> {
|
|
213
|
-
constructor(container: Container, key: Key);
|
|
214
|
-
aliasTo(destinationKey: Key): Resolver<K>;
|
|
215
|
-
cachedCallback(value: ResolveCallback<K>): Resolver<K>;
|
|
216
|
-
callback(value: ResolveCallback<K>): Resolver<K>;
|
|
217
|
-
instance(value: K): Resolver<K>;
|
|
218
|
-
singleton(value: Constructable): Resolver<K>;
|
|
219
|
-
transient(value: Constructable): Resolver<K>;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Warning: (ae-internal-missing-underscore) The name "ResolverImpl" should be prefixed with an underscore because the declaration is marked as @internal
|
|
223
|
-
//
|
|
224
|
-
// @internal (undocumented)
|
|
225
|
-
export class ResolverImpl implements Resolver, Registration {
|
|
226
|
-
// (undocumented)
|
|
227
|
-
get $isResolver(): true;
|
|
228
|
-
constructor(key: Key, strategy: ResolverStrategy, state: any);
|
|
229
|
-
// (undocumented)
|
|
230
|
-
getFactory(container: Container): Factory | null;
|
|
231
|
-
// (undocumented)
|
|
232
|
-
key: Key;
|
|
233
|
-
// (undocumented)
|
|
234
|
-
register(container: Container): Resolver;
|
|
235
|
-
// (undocumented)
|
|
236
|
-
resolve(handler: Container, requestor: Container): any;
|
|
237
|
-
// (undocumented)
|
|
238
|
-
resolveAsync(handler: Container, requestor: Container): Promise<any>;
|
|
239
|
-
// (undocumented)
|
|
240
|
-
state: any;
|
|
241
|
-
// (undocumented)
|
|
242
|
-
strategy: ResolverStrategy;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// Warning: (ae-internal-missing-underscore) The name "ResolverStrategy" should be prefixed with an underscore because the declaration is marked as @internal
|
|
246
|
-
//
|
|
247
|
-
// @internal (undocumented)
|
|
248
|
-
export const enum ResolverStrategy {
|
|
249
|
-
// (undocumented)
|
|
250
|
-
alias = 5,
|
|
251
|
-
// (undocumented)
|
|
252
|
-
array = 4,
|
|
253
|
-
// (undocumented)
|
|
254
|
-
callback = 3,
|
|
255
|
-
// (undocumented)
|
|
256
|
-
instance = 0,
|
|
257
|
-
// (undocumented)
|
|
258
|
-
singleton = 1,
|
|
259
|
-
// (undocumented)
|
|
260
|
-
transient = 2
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// @public
|
|
264
|
-
export interface ServiceLocator {
|
|
265
|
-
get<K extends Key>(key: K): Resolved<K>;
|
|
266
|
-
get<K extends Key>(key: Key): Resolved<K>;
|
|
267
|
-
get<K extends Key>(key: K | Key): Resolved<K>;
|
|
268
|
-
getAll<K extends Key>(key: K, searchAncestors?: boolean): readonly Resolved<K>[];
|
|
269
|
-
getAll<K extends Key>(key: Key, searchAncestors?: boolean): readonly Resolved<K>[];
|
|
270
|
-
getAll<K extends Key>(key: K | Key, searchAncestors?: boolean): readonly Resolved<K>[];
|
|
271
|
-
getAsync<K extends Key>(key: K): Promise<Resolved<K>>;
|
|
272
|
-
getAsync<K extends Key>(key: Key): Promise<Resolved<K>>;
|
|
273
|
-
getAsync<K extends Key>(key: K | Key): Promise<Resolved<K>>;
|
|
274
|
-
has<K extends Key>(key: K | Key, searchAncestors: boolean): boolean;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// @public
|
|
278
|
-
export const ServiceLocator: ContextDecorator<ServiceLocator>;
|
|
279
|
-
|
|
280
|
-
// Warning: (ae-forgotten-export) The symbol "singletonDecorator" needs to be exported by the entry point di.d.ts
|
|
281
|
-
//
|
|
282
|
-
// @public
|
|
283
|
-
export function singleton<T extends Constructable>(): typeof singletonDecorator;
|
|
284
|
-
|
|
285
|
-
// @public (undocumented)
|
|
286
|
-
export function singleton<T extends Constructable>(options?: SingletonOptions): typeof singletonDecorator;
|
|
287
|
-
|
|
288
|
-
// @public
|
|
289
|
-
export function singleton<T extends Constructable>(target: T & Partial<RegisterSelf<T>>): T & RegisterSelf<T>;
|
|
290
|
-
|
|
291
|
-
// @public
|
|
292
|
-
type Transformer_2<K> = (instance: Resolved<K>) => Resolved<K>;
|
|
293
|
-
export { Transformer_2 as Transformer }
|
|
294
|
-
|
|
295
|
-
// Warning: (ae-forgotten-export) The symbol "transientDecorator" needs to be exported by the entry point di.d.ts
|
|
296
|
-
//
|
|
297
|
-
// @public
|
|
298
|
-
export function transient<T extends Constructable>(): typeof transientDecorator;
|
|
299
|
-
|
|
300
|
-
// @public
|
|
301
|
-
export function transient<T extends Constructable>(target: T & Partial<RegisterSelf<T>>): T & RegisterSelf<T>;
|
|
302
|
-
|
|
303
|
-
// Warning: (ae-internal-missing-underscore) The name "validateKey" should be prefixed with an underscore because the declaration is marked as @internal
|
|
304
|
-
//
|
|
305
|
-
// @internal (undocumented)
|
|
306
|
-
export function validateKey(key: any): void;
|
|
307
|
-
|
|
308
|
-
// Warnings were encountered during analysis:
|
|
309
|
-
//
|
|
310
|
-
// dist/dts/di/di.d.ts:479:5 - (ae-forgotten-export) The symbol "createContext" needs to be exported by the entry point di.d.ts
|
|
311
|
-
// dist/dts/di/di.d.ts:540:5 - (ae-forgotten-export) The symbol "SingletonOptions" needs to be exported by the entry point di.d.ts
|
|
312
|
-
|
|
313
|
-
// (No @packageDocumentation comment for this package)
|
|
314
|
-
|
|
315
|
-
```
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Changes in FASTElement 2.0
|
|
2
|
-
|
|
3
|
-
## Breaking Changes
|
|
4
|
-
|
|
5
|
-
* `HTMLDirective` - The `targetIndex: number` property has been replaced by a `targetId: string` property. The `createBehavior` method no longer takes a target `Node` but instead takes a `BehaviorTargets` instance. The actual target can be looked up on the `BehaviorTargets` instance by indexing with the `targetId` property.
|
|
6
|
-
* `compileTemplate()` - Internals have been significantly changed. The implementation no longer uses a TreeWalker. The return type has change to an `HTMLTemplateCompilationResult` with different properties.
|
|
7
|
-
* `View` and `HTMLView` - Type parameters added to enable strongly typed views based on their data source. The constructor of `HTMLView` has a new signature based on changes to the compiler's output. Internals have been cleaned up and no longer rely on the Range type.
|
|
8
|
-
* `ElementViewTemplate`, `SyntheticViewTemplate`, and `ViewTemplate` - Added type parameters throughout. Logic to instantiate and apply behaviors moved out of the template and into the view where it can be lazily executed. Removed the ability of the `render` method to take a string id of the node to render to. You must provide a node.
|
|
9
|
-
* `DOM` - Tree Walker methods are no longer used and are thus removed. The API for removing child nodes has been removed as well since it was only used in one place and could be inlined. The helper `createCustomAttributePlaceholder()` no longer requires an attribute name. It will be uniquely generated internally.
|
|
10
|
-
* `class` - Bindings to `class` are now more nuanced. Binding directly to `class` will simply set the `className` property. If you need to bind to `class` knowing that manual JS will also manipulate the `classList` in addition to the binding, then you should now bind to `:classList` instead. This allows for performance optimizations in the simple, most common case.
|
|
11
|
-
* `Behavior` and `ViewBehavior` - `Behavior` now requires an `ExecutionContext` for `unbind`. Behaviors can be used for elements or views. `ViewBehavior` has been introduced for use exclusively with views, and provides some optimization opportunities.
|
|
12
|
-
* `RefBehavior` has been replaced with `RefDirective`. The directive also implements `ViewBehavior` allowing a single directive instance to be shared across all template instances that use the ref.
|
|
13
|
-
* Removed `SlottedBehavior` and `ChildrenBehavior` have been replaced with `SlottedDirective` and `ChildrenDirective`. These directives allow a single directive instance to be shared across all template instances that use the ref.
|
|
14
|
-
* Removed `AttachedBehaviorHTMLDirective` and `AttachedBehaviorType` since they are no longer used in the new directive/behavior architecture for ref, slotted, and children.
|
|
15
|
-
* Renamed `Notifier#source` to `Notifier#subject` to align with other observable terminology and prevent name clashes with `BindingObserver` properties.
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
## API Report File for "@microsoft/fast-element"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
// @public
|
|
8
|
-
export interface CaptureType {
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// @public
|
|
12
|
-
export interface ContentTemplate {
|
|
13
|
-
create(): ContentView;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// @public
|
|
17
|
-
export interface ContentView {
|
|
18
|
-
bind(source: any, context?: ExecutionContext): void;
|
|
19
|
-
// (undocumented)
|
|
20
|
-
readonly context: ExecutionContext;
|
|
21
|
-
insertBefore(node: Node): void;
|
|
22
|
-
remove(): void;
|
|
23
|
-
unbind(): void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// @public
|
|
27
|
-
export class DefaultExecutionContext<TParent> implements ExecutionContext<TParent> {
|
|
28
|
-
get event(): Event;
|
|
29
|
-
eventDetail<TDetail>(): TDetail;
|
|
30
|
-
eventTarget<TTarget extends EventTarget>(): TTarget;
|
|
31
|
-
index: number;
|
|
32
|
-
get isEven(): boolean;
|
|
33
|
-
get isFirst(): boolean;
|
|
34
|
-
get isInMiddle(): boolean;
|
|
35
|
-
get isLast(): boolean;
|
|
36
|
-
get isOdd(): boolean;
|
|
37
|
-
length: number;
|
|
38
|
-
readonly parent: TParent;
|
|
39
|
-
readonly parentContext: ExecutionContext<TParent>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// @beta
|
|
43
|
-
export const deferHydrationAttribute = "defer-hydration";
|
|
44
|
-
|
|
45
|
-
// @public
|
|
46
|
-
interface Disposable_2 {
|
|
47
|
-
dispose(): void;
|
|
48
|
-
}
|
|
49
|
-
export { Disposable_2 as Disposable }
|
|
50
|
-
|
|
51
|
-
// @public
|
|
52
|
-
export const DOMAspect: Readonly<{
|
|
53
|
-
readonly none: 0;
|
|
54
|
-
readonly attribute: 1;
|
|
55
|
-
readonly booleanAttribute: 2;
|
|
56
|
-
readonly property: 3;
|
|
57
|
-
readonly content: 4;
|
|
58
|
-
readonly tokenList: 5;
|
|
59
|
-
readonly event: 6;
|
|
60
|
-
}>;
|
|
61
|
-
|
|
62
|
-
// @public
|
|
63
|
-
export type DOMAspect = (typeof DOMAspect)[Exclude<keyof typeof DOMAspect, "none">];
|
|
64
|
-
|
|
65
|
-
// @public
|
|
66
|
-
export interface DOMPolicy {
|
|
67
|
-
createHTML(value: string): string;
|
|
68
|
-
protect(tagName: string | null, aspect: DOMAspect, aspectName: string, sink: DOMSink): DOMSink;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// @public
|
|
72
|
-
export type DOMSink = (target: Node, aspectName: string, value: any, ...args: any[]) => void;
|
|
73
|
-
|
|
74
|
-
// @public
|
|
75
|
-
export interface ElementView<TSource = any, TParent = any> extends View<TSource, TParent> {
|
|
76
|
-
appendTo(node: Node): void;
|
|
77
|
-
onUnbind(behavior: {
|
|
78
|
-
unbind(controller: ViewController<TSource, TParent>): any;
|
|
79
|
-
}): void;
|
|
80
|
-
readonly sourceLifetime?: SourceLifetime;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// @public
|
|
84
|
-
export interface ElementViewTemplate<TSource = any, TParent = any> {
|
|
85
|
-
create(hostBindingTarget: Element): ElementView<TSource, TParent>;
|
|
86
|
-
render(source: TSource, host: Node, hostBindingTarget?: Element): ElementView<TSource, TParent>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// @public
|
|
90
|
-
export function enableHydration(options?: HydrationOptions): void;
|
|
91
|
-
|
|
92
|
-
// @public
|
|
93
|
-
export interface ExecutionContext<TParent = any> {
|
|
94
|
-
readonly event: Event;
|
|
95
|
-
eventDetail<TDetail>(): TDetail;
|
|
96
|
-
eventTarget<TTarget extends EventTarget>(): TTarget;
|
|
97
|
-
index: number;
|
|
98
|
-
readonly isEven: boolean;
|
|
99
|
-
readonly isFirst: boolean;
|
|
100
|
-
readonly isInMiddle: boolean;
|
|
101
|
-
readonly isLast: boolean;
|
|
102
|
-
readonly isOdd: boolean;
|
|
103
|
-
length: number;
|
|
104
|
-
parent: TParent;
|
|
105
|
-
parentContext: ExecutionContext<TParent>;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// @public
|
|
109
|
-
export const ExecutionContext: Readonly<{
|
|
110
|
-
default: ExecutionContext<any>;
|
|
111
|
-
getEvent(): Event | null;
|
|
112
|
-
setEvent(event: Event | null): void;
|
|
113
|
-
}>;
|
|
114
|
-
|
|
115
|
-
// @public
|
|
116
|
-
export interface ExpressionController<TSource = any, TParent = any> {
|
|
117
|
-
readonly context: ExecutionContext<TParent>;
|
|
118
|
-
readonly isBound: boolean;
|
|
119
|
-
onUnbind(behavior: {
|
|
120
|
-
unbind(controller: ExpressionController<TSource, TParent>): any;
|
|
121
|
-
}): void;
|
|
122
|
-
readonly source: TSource;
|
|
123
|
-
readonly sourceLifetime?: SourceLifetime;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// @beta
|
|
127
|
-
export interface HydratableContentTemplate extends ContentTemplate {
|
|
128
|
-
hydrate(first: Node, last: Node): ContentView;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// @beta
|
|
132
|
-
export interface HydratableElementViewTemplate<TSource = any, TParent = any> extends ElementViewTemplate<TSource, TParent> {
|
|
133
|
-
// (undocumented)
|
|
134
|
-
hydrate(firstChild: Node, lastChild: Node, hostBindingTarget?: Element): ElementView<TSource, TParent>;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// @beta
|
|
138
|
-
export interface HydratableSyntheticViewTemplate<TSource = any, TParent = any> extends SyntheticViewTemplate {
|
|
139
|
-
// (undocumented)
|
|
140
|
-
hydrate(firstChild: Node, lastChild: Node): SyntheticView<TSource, TParent>;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// @public (undocumented)
|
|
144
|
-
export interface HydratableView<TSource = any, TParent = any> extends ElementView, SyntheticView, DefaultExecutionContext<TParent> {
|
|
145
|
-
// (undocumented)
|
|
146
|
-
[Hydratable]: symbol;
|
|
147
|
-
// (undocumented)
|
|
148
|
-
readonly bindingViewBoundaries: Record<string, ViewNodes>;
|
|
149
|
-
// (undocumented)
|
|
150
|
-
readonly hydrationStage: keyof typeof HydrationStage;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// @beta
|
|
154
|
-
export type HydratableViewController<TSource = any, TParent = any> = HydratableView<TSource, TParent> & ViewController<TSource, TParent>;
|
|
155
|
-
|
|
156
|
-
// @public (undocumented)
|
|
157
|
-
export class HydrationBindingError extends Error {
|
|
158
|
-
constructor(
|
|
159
|
-
message: string | undefined,
|
|
160
|
-
factory: ViewBehaviorFactory,
|
|
161
|
-
fragment: DocumentFragment,
|
|
162
|
-
templateString: string);
|
|
163
|
-
readonly factory: ViewBehaviorFactory;
|
|
164
|
-
readonly fragment: DocumentFragment;
|
|
165
|
-
readonly templateString: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// @public
|
|
169
|
-
export interface HydrationOptions {
|
|
170
|
-
hydrationComplete?(): void;
|
|
171
|
-
hydrationStarted?(): void;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// @public (undocumented)
|
|
175
|
-
export const HydrationStage: {
|
|
176
|
-
readonly unhydrated: "unhydrated";
|
|
177
|
-
readonly hydrating: "hydrating";
|
|
178
|
-
readonly hydrated: "hydrated";
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
// @public
|
|
182
|
-
export class HydrationTracker {
|
|
183
|
-
constructor(options: HydrationOptions);
|
|
184
|
-
add(element: HTMLElement): void;
|
|
185
|
-
mergeOptions(incoming: HydrationOptions): void;
|
|
186
|
-
remove(element: HTMLElement): void;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// @beta
|
|
190
|
-
export function isHydratable(view: ViewController): view is HydratableViewController;
|
|
191
|
-
|
|
192
|
-
// @beta (undocumented)
|
|
193
|
-
export function isHydratable<TSource = any, TParent = any>(template: SyntheticViewTemplate<TSource, TParent>): template is HydratableSyntheticViewTemplate<TSource, TParent>;
|
|
194
|
-
|
|
195
|
-
// @beta (undocumented)
|
|
196
|
-
export function isHydratable<TSource = any, TParent = any>(template: ElementViewTemplate<TSource, TParent>): template is HydratableElementViewTemplate<TSource, TParent>;
|
|
197
|
-
|
|
198
|
-
// @beta (undocumented)
|
|
199
|
-
export function isHydratable(template: ContentTemplate): template is HydratableContentTemplate;
|
|
200
|
-
|
|
201
|
-
// @public
|
|
202
|
-
export const SourceLifetime: Readonly<{
|
|
203
|
-
readonly unknown: undefined;
|
|
204
|
-
readonly coupled: 1;
|
|
205
|
-
}>;
|
|
206
|
-
|
|
207
|
-
// @public
|
|
208
|
-
export type SourceLifetime = (typeof SourceLifetime)[keyof typeof SourceLifetime];
|
|
209
|
-
|
|
210
|
-
// @public
|
|
211
|
-
export interface SyntheticView<TSource = any, TParent = any> extends View<TSource, TParent> {
|
|
212
|
-
readonly firstChild: Node;
|
|
213
|
-
insertBefore(node: Node): void;
|
|
214
|
-
readonly lastChild: Node;
|
|
215
|
-
remove(): void;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// @public
|
|
219
|
-
export interface SyntheticViewTemplate<TSource = any, TParent = any> {
|
|
220
|
-
create(): SyntheticView<TSource, TParent>;
|
|
221
|
-
inline(): CaptureType;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// @public
|
|
225
|
-
export interface View<TSource = any, TParent = any> extends Disposable_2 {
|
|
226
|
-
bind(source: TSource, context?: ExecutionContext<TParent>): void;
|
|
227
|
-
readonly context: ExecutionContext<TParent>;
|
|
228
|
-
readonly isBound: boolean;
|
|
229
|
-
readonly source: TSource | null;
|
|
230
|
-
unbind(): void;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// @public
|
|
234
|
-
export interface ViewBehavior<TSource = any, TParent = any> {
|
|
235
|
-
bind(controller: ViewController<TSource, TParent>): void;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// @public
|
|
239
|
-
export interface ViewBehaviorBoundaries {
|
|
240
|
-
// (undocumented)
|
|
241
|
-
[factoryId: string]: ViewBoundaries;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// @public
|
|
245
|
-
export interface ViewBehaviorFactory {
|
|
246
|
-
createBehavior(): ViewBehavior;
|
|
247
|
-
id?: string;
|
|
248
|
-
policy?: DOMPolicy;
|
|
249
|
-
targetNodeId?: string;
|
|
250
|
-
targetTagName?: string | null;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
// @public
|
|
254
|
-
export type ViewBehaviorTargets = {
|
|
255
|
-
[id: string]: Node;
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
// @public
|
|
259
|
-
export interface ViewBoundaries {
|
|
260
|
-
// (undocumented)
|
|
261
|
-
first: Node;
|
|
262
|
-
// (undocumented)
|
|
263
|
-
last: Node;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// @public
|
|
267
|
-
export interface ViewController<TSource = any, TParent = any> extends ExpressionController<TSource, TParent> {
|
|
268
|
-
readonly isHydrated?: Promise<boolean>;
|
|
269
|
-
readonly isPrerendered?: Promise<boolean>;
|
|
270
|
-
// @internal
|
|
271
|
-
readonly _skipAttrUpdates?: boolean;
|
|
272
|
-
readonly targets: ViewBehaviorTargets;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// @public (undocumented)
|
|
276
|
-
export interface ViewNodes {
|
|
277
|
-
// (undocumented)
|
|
278
|
-
first: Node;
|
|
279
|
-
// (undocumented)
|
|
280
|
-
last: Node;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
// (No @packageDocumentation comment for this package)
|
|
284
|
-
|
|
285
|
-
```
|