@microsoft/fast-element 2.10.4 → 3.0.0-rc.1
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/ARCHITECTURE_HTML_TAGGED_TEMPLATE_LITERAL.md +1 -1
- package/ARCHITECTURE_OVERVIEW.md +2 -2
- package/CHANGELOG.json +1 -1
- package/CHANGELOG.md +2 -2
- package/DECLARATIVE_DESIGN.md +806 -0
- package/DECLARATIVE_HTML.md +470 -0
- package/DECLARATIVE_MIGRATION.md +215 -0
- package/DECLARATIVE_RENDERING.md +530 -0
- package/DECLARATIVE_RENDERING_LIFECYCLE.md +288 -0
- package/DECLARATIVE_SCHEMA_OBSERVER_MAP.md +489 -0
- package/DESIGN.md +138 -33
- package/MIGRATION.md +387 -0
- package/README.md +208 -1
- package/SIZES.md +25 -0
- package/api-extractor.arrays.json +15 -0
- package/api-extractor.context.json +1 -0
- package/api-extractor.declarative.json +15 -0
- package/api-extractor.di.json +1 -0
- package/api-extractor.hydration.json +15 -0
- package/api-extractor.styles.json +15 -0
- package/dist/arrays/arrays.api.json +2621 -0
- package/dist/declarative/declarative.api.json +7844 -0
- package/dist/di/di.api.json +1 -1
- package/dist/dts/array-observer.d.ts +2 -0
- package/dist/dts/arrays.d.ts +2 -0
- package/dist/dts/attr.d.ts +1 -0
- package/dist/dts/binding/signal.d.ts +6 -6
- package/dist/dts/binding/two-way.d.ts +1 -0
- package/dist/dts/binding.d.ts +7 -0
- package/dist/dts/components/attributes.d.ts +2 -5
- package/dist/dts/components/definition-schema-transforms.d.ts +9 -0
- package/dist/dts/components/element-controller.d.ts +80 -114
- package/dist/dts/components/element-hydration.d.ts +1 -1
- package/dist/dts/components/enable-hydration.d.ts +34 -0
- package/dist/dts/components/fast-definitions.d.ts +91 -42
- package/dist/dts/components/fast-element.d.ts +5 -8
- package/dist/dts/components/hydration-tracker.d.ts +40 -0
- package/dist/dts/components/hydration.d.ts +18 -53
- package/dist/dts/components/schema.d.ts +205 -0
- package/dist/dts/context.d.ts +6 -6
- package/dist/dts/css.d.ts +3 -0
- package/dist/dts/debug.d.ts +5 -1
- package/dist/dts/declarative/attribute-map.d.ts +58 -0
- package/dist/dts/declarative/debug.d.ts +5 -0
- package/dist/dts/declarative/index.d.ts +13 -0
- package/dist/dts/declarative/interfaces.d.ts +9 -0
- package/dist/dts/declarative/observer-map-utilities.d.ts +58 -0
- package/dist/dts/declarative/observer-map.d.ts +89 -0
- package/dist/dts/declarative/runtime.d.ts +5 -0
- package/dist/dts/declarative/syntax.d.ts +21 -0
- package/dist/dts/declarative/template-bridge.d.ts +33 -0
- package/dist/dts/declarative/template-parser.d.ts +98 -0
- package/dist/dts/declarative/template.d.ts +9 -0
- package/dist/dts/declarative/utilities.d.ts +312 -0
- package/dist/dts/di/di.d.ts +1 -1
- package/dist/dts/directives/children.d.ts +2 -0
- package/dist/dts/directives/node-observation.d.ts +2 -0
- package/dist/dts/directives/ref.d.ts +2 -0
- package/dist/dts/directives/repeat.d.ts +4 -0
- package/dist/dts/directives/slotted.d.ts +2 -0
- package/dist/dts/directives/when.d.ts +3 -0
- package/dist/dts/dom-policy.d.ts +1 -1
- package/dist/dts/html.d.ts +5 -0
- package/dist/dts/hydration/runtime.d.ts +7 -0
- package/dist/dts/hydration/target-builder.d.ts +15 -12
- package/dist/dts/hydration.d.ts +14 -0
- package/dist/dts/index.d.ts +38 -42
- package/dist/dts/index.debug.d.ts +0 -1
- package/dist/dts/index.rollup.debug.d.ts +0 -1
- package/dist/dts/interfaces.d.ts +1 -49
- package/dist/dts/observable.d.ts +3 -6
- package/dist/dts/observation/arrays.d.ts +1 -1
- package/dist/dts/observation/update-queue.d.ts +1 -1
- package/dist/dts/platform.d.ts +25 -4
- package/dist/dts/render.d.ts +7 -0
- package/dist/dts/schema.d.ts +1 -0
- package/dist/dts/state/exports.d.ts +1 -1
- package/dist/dts/state/state.d.ts +2 -2
- package/dist/dts/styles/css-directive.d.ts +5 -12
- package/dist/dts/styles/css.d.ts +5 -7
- package/dist/dts/styles/element-styles.d.ts +0 -10
- package/dist/dts/styles.d.ts +6 -0
- package/dist/dts/templating/children.d.ts +1 -1
- package/dist/dts/templating/html-binding-directive.d.ts +4 -0
- package/dist/dts/templating/html-directive.d.ts +17 -0
- package/dist/dts/templating/hydration-view.d.ts +109 -0
- package/dist/dts/templating/ref.d.ts +1 -1
- package/dist/dts/templating/render.d.ts +1 -1
- package/dist/dts/templating/repeat.d.ts +2 -2
- package/dist/dts/templating/slotted.d.ts +1 -1
- package/dist/dts/templating/template.d.ts +17 -9
- package/dist/dts/templating/view.d.ts +25 -102
- package/dist/dts/templating/when.d.ts +1 -1
- package/dist/dts/templating.d.ts +10 -0
- package/dist/dts/testing/exports.d.ts +2 -2
- package/dist/dts/updates.d.ts +1 -0
- package/dist/dts/volatile.d.ts +2 -0
- package/dist/esm/array-observer.js +1 -0
- package/dist/esm/arrays.js +1 -0
- package/dist/esm/attr.js +1 -0
- package/dist/esm/binding/normalize.js +1 -1
- package/dist/esm/binding/signal.js +4 -4
- package/dist/esm/binding/two-way.js +2 -1
- package/dist/esm/binding.js +4 -0
- package/dist/esm/components/attributes.js +8 -5
- package/dist/esm/components/definition-schema-transforms.js +23 -0
- package/dist/esm/components/element-controller.js +200 -269
- package/dist/esm/components/element-hydration.js +1 -1
- package/dist/esm/components/enable-hydration.js +100 -0
- package/dist/esm/components/fast-definitions.js +211 -49
- package/dist/esm/components/fast-element.js +18 -27
- package/dist/esm/components/hydration-tracker.js +93 -0
- package/dist/esm/components/hydration.js +62 -144
- package/dist/esm/components/schema.js +253 -0
- package/dist/esm/context.js +6 -6
- package/dist/esm/css.js +3 -0
- package/dist/esm/debug.js +26 -26
- package/dist/esm/declarative/attribute-map.js +121 -0
- package/dist/esm/declarative/debug.js +5 -0
- package/dist/esm/declarative/index.js +3 -0
- package/dist/esm/declarative/interfaces.js +10 -0
- package/dist/esm/declarative/observer-map-utilities.js +562 -0
- package/dist/esm/declarative/observer-map.js +216 -0
- package/dist/esm/declarative/runtime.js +14 -0
- package/dist/esm/declarative/syntax.js +36 -0
- package/dist/esm/declarative/template-bridge.js +170 -0
- package/dist/esm/declarative/template-parser.js +306 -0
- package/dist/esm/declarative/template.js +142 -0
- package/dist/esm/declarative/utilities.js +834 -0
- package/dist/esm/di/di.js +6 -8
- package/dist/esm/directives/children.js +1 -0
- package/dist/esm/directives/node-observation.js +1 -0
- package/dist/esm/directives/ref.js +1 -0
- package/dist/esm/directives/repeat.js +1 -0
- package/dist/esm/directives/slotted.js +1 -0
- package/dist/esm/directives/when.js +1 -0
- package/dist/esm/dom-policy.js +2 -2
- package/dist/esm/dom.js +1 -1
- package/dist/esm/html.js +2 -0
- package/dist/esm/hydration/runtime.js +33 -0
- package/dist/esm/hydration/target-builder.js +97 -90
- package/dist/esm/hydration.js +4 -0
- package/dist/esm/index.debug.js +2 -1
- package/dist/esm/index.js +34 -29
- package/dist/esm/index.rollup.debug.js +3 -2
- package/dist/esm/index.rollup.js +1 -1
- package/dist/esm/interfaces.js +1 -45
- package/dist/esm/observable.js +1 -4
- package/dist/esm/observation/arrays.js +1 -1
- package/dist/esm/observation/observable.js +5 -5
- package/dist/esm/observation/update-queue.js +47 -58
- package/dist/esm/platform.js +31 -30
- package/dist/esm/render.js +1 -0
- package/dist/esm/schema.js +1 -0
- package/dist/esm/state/exports.js +1 -1
- package/dist/esm/styles/css-directive.js +1 -2
- package/dist/esm/styles/css.js +15 -56
- package/dist/esm/styles/element-styles.js +69 -15
- package/dist/esm/styles.js +2 -0
- package/dist/esm/templating/html-binding-directive.js +10 -8
- package/dist/esm/templating/hydration-view.js +235 -0
- package/dist/esm/templating/render.js +1 -1
- package/dist/esm/templating/repeat.js +36 -34
- package/dist/esm/templating/template.js +7 -7
- package/dist/esm/templating/view.js +24 -233
- package/dist/esm/templating.js +7 -0
- package/dist/esm/testing/exports.js +2 -2
- package/dist/esm/updates.js +1 -0
- package/dist/esm/volatile.js +1 -0
- package/dist/fast-element.api.json +9016 -6995
- package/dist/fast-element.d.ts +3557 -796
- package/dist/fast-element.debug.js +5088 -4437
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +5369 -4649
- package/dist/fast-element.min.js +2 -2
- package/dist/fast-element.untrimmed.d.ts +863 -475
- package/dist/hydration/hydration.api.json +5237 -0
- package/dist/styles/styles.api.json +2672 -0
- package/docs/api-report.api.md +343 -166
- package/docs/arrays/api-report.api.md +114 -0
- package/docs/declarative/api-report.api.md +397 -0
- package/docs/hydration/api-report.api.md +285 -0
- package/docs/styles/api-report.api.md +135 -0
- package/package.json +149 -41
- package/playwright.declarative.config.ts +26 -0
- package/playwright.declarative.webui.config.ts +20 -0
- package/scripts/declarative/build-fixtures-with-webui.js +135 -0
- package/scripts/declarative/build-fixtures.js +49 -0
- package/scripts/declarative/build-fixtures.utilities.js +101 -0
- package/scripts/measure-sizes.js +219 -0
- package/scripts/run-api-extractor.js +39 -20
- package/test/declarative/fixtures/README.md +72 -0
- package/test/declarative/fixtures/WRITING_FIXTURES.md +330 -0
- package/test/declarative/fixtures/bindings/README.md +12 -0
- package/test/declarative/fixtures/bindings/attribute/entry.html +13 -0
- package/test/declarative/fixtures/bindings/attribute/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/attribute/index.html +25 -0
- package/test/declarative/fixtures/bindings/attribute/main.ts +41 -0
- package/test/declarative/fixtures/bindings/attribute/state.json +8 -0
- package/test/declarative/fixtures/bindings/attribute/templates.html +11 -0
- package/test/declarative/fixtures/bindings/content/entry.html +12 -0
- package/test/declarative/fixtures/bindings/content/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/content/index.html +19 -0
- package/test/declarative/fixtures/bindings/content/main.ts +27 -0
- package/test/declarative/fixtures/bindings/content/state.json +4 -0
- package/test/declarative/fixtures/bindings/content/templates.html +6 -0
- package/test/declarative/fixtures/bindings/dot-syntax/entry.html +11 -0
- package/test/declarative/fixtures/bindings/dot-syntax/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/dot-syntax/index.html +47 -0
- package/test/declarative/fixtures/bindings/dot-syntax/main.ts +59 -0
- package/test/declarative/fixtures/bindings/dot-syntax/state.json +16 -0
- package/test/declarative/fixtures/bindings/dot-syntax/templates.html +17 -0
- package/test/declarative/fixtures/bindings/event/entry.html +11 -0
- package/test/declarative/fixtures/bindings/event/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/event/index.html +43 -0
- package/test/declarative/fixtures/bindings/event/main.ts +43 -0
- package/test/declarative/fixtures/bindings/event/state.json +3 -0
- package/test/declarative/fixtures/bindings/event/templates.html +18 -0
- package/test/declarative/fixtures/bindings/host/entry.html +40 -0
- package/test/declarative/fixtures/bindings/host/fast-build.config.json +6 -0
- package/test/declarative/fixtures/bindings/host/index.html +96 -0
- package/test/declarative/fixtures/bindings/host/main.ts +222 -0
- package/test/declarative/fixtures/bindings/host/state.json +9 -0
- package/test/declarative/fixtures/bindings/host/templates.html +55 -0
- package/test/declarative/fixtures/directives/README.md +12 -0
- package/test/declarative/fixtures/directives/children/entry.html +11 -0
- package/test/declarative/fixtures/directives/children/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/children/index.html +15 -0
- package/test/declarative/fixtures/directives/children/main.ts +22 -0
- package/test/declarative/fixtures/directives/children/state.json +3 -0
- package/test/declarative/fixtures/directives/children/templates.html +3 -0
- package/test/declarative/fixtures/directives/ref/entry.html +11 -0
- package/test/declarative/fixtures/directives/ref/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/ref/index.html +15 -0
- package/test/declarative/fixtures/directives/ref/main.ts +17 -0
- package/test/declarative/fixtures/directives/ref/state.json +1 -0
- package/test/declarative/fixtures/directives/ref/templates.html +3 -0
- package/test/declarative/fixtures/directives/repeat/entry.html +21 -0
- package/test/declarative/fixtures/directives/repeat/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/repeat/index.html +133 -0
- package/test/declarative/fixtures/directives/repeat/main.ts +110 -0
- package/test/declarative/fixtures/directives/repeat/sprites.svg +8 -0
- package/test/declarative/fixtures/directives/repeat/state.json +10 -0
- package/test/declarative/fixtures/directives/repeat/templates.html +75 -0
- package/test/declarative/fixtures/directives/slotted/entry.html +17 -0
- package/test/declarative/fixtures/directives/slotted/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/slotted/index.html +27 -0
- package/test/declarative/fixtures/directives/slotted/main.ts +29 -0
- package/test/declarative/fixtures/directives/slotted/state.json +1 -0
- package/test/declarative/fixtures/directives/slotted/templates.html +7 -0
- package/test/declarative/fixtures/directives/when/entry.html +51 -0
- package/test/declarative/fixtures/directives/when/fast-build.config.json +6 -0
- package/test/declarative/fixtures/directives/when/index.html +136 -0
- package/test/declarative/fixtures/directives/when/main.ts +172 -0
- package/test/declarative/fixtures/directives/when/state.json +12 -0
- package/test/declarative/fixtures/directives/when/templates.html +75 -0
- package/test/declarative/fixtures/ecosystem/README.md +11 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/entry.html +12 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/index.html +20 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/main.ts +68 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/state.json +4 -0
- package/test/declarative/fixtures/ecosystem/declarative-no-hydration/templates.html +7 -0
- package/test/declarative/fixtures/ecosystem/errors/entry.html +12 -0
- package/test/declarative/fixtures/ecosystem/errors/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/errors/index.html +20 -0
- package/test/declarative/fixtures/ecosystem/errors/main.ts +17 -0
- package/test/declarative/fixtures/ecosystem/errors/state.json +1 -0
- package/test/declarative/fixtures/ecosystem/errors/templates.html +7 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/entry.html +17 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/index.html +56 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/main.ts +134 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/state.json +12 -0
- package/test/declarative/fixtures/ecosystem/lifecycle-callbacks/templates.html +34 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/entry.html +25 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/fast-build.config.json +6 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/fast-card.css +10 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/index.html +181 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/main.ts +58 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/state.json +6 -0
- package/test/declarative/fixtures/ecosystem/performance-metrics/templates.html +15 -0
- package/test/declarative/fixtures/extensions/README.md +15 -0
- package/test/declarative/fixtures/extensions/attribute-map/entry.html +14 -0
- package/test/declarative/fixtures/extensions/attribute-map/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/attribute-map/index.html +31 -0
- package/test/declarative/fixtures/extensions/attribute-map/main.ts +40 -0
- package/test/declarative/fixtures/extensions/attribute-map/state.json +4 -0
- package/test/declarative/fixtures/extensions/attribute-map/templates.html +14 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/entry.html +12 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/fast-build.config.json +7 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/index.html +25 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/main.ts +31 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/state.json +5 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy/templates.html +11 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/entry.html +13 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/fast-build.config.json +7 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/index.html +23 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/main.ts +37 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/state.json +1 -0
- package/test/declarative/fixtures/extensions/attribute-map-naming-strategy-camel-case/templates.html +9 -0
- package/test/declarative/fixtures/extensions/observer-map/entry.html +15 -0
- package/test/declarative/fixtures/extensions/observer-map/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map/index.html +442 -0
- package/test/declarative/fixtures/extensions/observer-map/main.ts +482 -0
- package/test/declarative/fixtures/extensions/observer-map/state.json +158 -0
- package/test/declarative/fixtures/extensions/observer-map/templates.html +172 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/entry.html +16 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/index.html +27 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/main.ts +53 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/state.json +9 -0
- package/test/declarative/fixtures/extensions/observer-map-config-object/templates.html +12 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/README.md +98 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/entry.html +156 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/index.html +376 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/main.ts +366 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/state.json +69 -0
- package/test/declarative/fixtures/extensions/observer-map-deep-merge/templates.html +91 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/entry.html +14 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/fast-build.config.json +6 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/index.html +110 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/main.ts +175 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/state.json +29 -0
- package/test/declarative/fixtures/extensions/observer-map-properties/templates.html +55 -0
- package/test/declarative/fixtures/scenarios/README.md +7 -0
- package/test/declarative/fixtures/scenarios/nested-elements/entry.html +16 -0
- package/test/declarative/fixtures/scenarios/nested-elements/fast-build.config.json +6 -0
- package/test/declarative/fixtures/scenarios/nested-elements/index.html +126 -0
- package/test/declarative/fixtures/scenarios/nested-elements/main.ts +214 -0
- package/test/declarative/fixtures/scenarios/nested-elements/state.json +10 -0
- package/test/declarative/fixtures/scenarios/nested-elements/templates.html +54 -0
- package/test/declarative/index.html +12 -0
- package/test/declarative/vite.config.ts +55 -0
- package/test/declarative-main.ts +6 -0
- package/test/extension-subpaths-main.ts +9 -0
- package/test/main.ts +38 -33
- package/test/pure-declarative-main.ts +1 -0
- package/dist/dts/components/install-hydration.d.ts +0 -1
- package/dist/dts/pending-task.d.ts +0 -32
- package/dist/dts/polyfills.d.ts +0 -0
- package/dist/dts/styles/css-binding-directive.d.ts +0 -60
- package/dist/dts/templating/install-hydratable-view-templates.d.ts +0 -1
- package/dist/esm/components/install-hydration.js +0 -3
- package/dist/esm/pending-task.js +0 -28
- package/dist/esm/polyfills.js +0 -60
- package/dist/esm/styles/css-binding-directive.js +0 -76
- package/dist/esm/templating/install-hydratable-view-templates.js +0 -23
package/DESIGN.md
CHANGED
|
@@ -10,7 +10,7 @@ For deep dives into specific areas, see the linked detailed documents.
|
|
|
10
10
|
|
|
11
11
|
1. [High-Level Overview](#high-level-overview)
|
|
12
12
|
2. [Core Concepts](#core-concepts)
|
|
13
|
-
- [FAST
|
|
13
|
+
- [FAST Object](#fast-object)
|
|
14
14
|
- [FASTElement & ElementController](#fastelement--elementcontroller)
|
|
15
15
|
- [Observables & Notifiers](#observables--notifiers)
|
|
16
16
|
- [Bindings](#bindings)
|
|
@@ -42,35 +42,33 @@ For deep dives into specific areas, see the linked detailed documents.
|
|
|
42
42
|
| Element authoring | `FASTElement` base class + `@customElement`, `@attr`, `@observable` decorators |
|
|
43
43
|
| Reactive data binding | `Observable`, `ExpressionNotifier`, `oneWay`/`oneTime`/`listener` bindings |
|
|
44
44
|
| Declarative templating | `html` tagged template literal → `ViewTemplate` → compiled `HTMLView` |
|
|
45
|
+
| Declarative HTML runtime | `@microsoft/fast-element/declarative.js` → `declarativeTemplate()`, `TemplateParser`; `@microsoft/fast-element/schema.js` → `Schema` |
|
|
46
|
+
| Schema-driven extensions | `@microsoft/fast-element/attribute-map.js` and `@microsoft/fast-element/observer-map.js` → map helpers usable with declarative or manually supplied schemas |
|
|
45
47
|
| Async DOM updates | `Updates` queue (batched, `requestAnimationFrame`-aligned) |
|
|
46
48
|
| Scoped styles | `css` tagged template literal → `ElementStyles` → `adoptedStylesheets` / `<style>` |
|
|
47
49
|
| Dependency injection | `DI` container, `@inject`, `@singleton`, `@transient`, resolvers |
|
|
48
50
|
| Context protocol | W3C community Context protocol (`Context.create`, `Context.for`) |
|
|
49
51
|
| Reactive state helpers | `state()`, `watch()` (beta) |
|
|
50
52
|
|
|
51
|
-
The library's kernel
|
|
53
|
+
The library's kernel is module-scoped rather than stored on `globalThis`: import `FAST` from `@microsoft/fast-element`, `Updates` from `@microsoft/fast-element`, and `Observable` from `@microsoft/fast-element`.
|
|
54
|
+
|
|
55
|
+
The root entrypoint exports the FAST Element implementation APIs. Focused package
|
|
56
|
+
path exports remain available when a consumer wants a narrower entrypoint.
|
|
52
57
|
|
|
53
58
|
---
|
|
54
59
|
|
|
55
60
|
## Core Concepts
|
|
56
61
|
|
|
57
|
-
### FAST
|
|
62
|
+
### FAST Object
|
|
58
63
|
|
|
59
64
|
**File**: `src/platform.ts`, `src/interfaces.ts`
|
|
60
65
|
|
|
61
|
-
`FAST` is a singleton
|
|
66
|
+
`FAST` is a module-scoped singleton exported from `@microsoft/fast-element`. It is **not** attached to `globalThis`. It provides:
|
|
62
67
|
|
|
63
|
-
- `FAST.getById(id, initializer)` – shared kernel slot registry (used to share the update queue and observable system across FAST instances)
|
|
64
68
|
- `FAST.warn(code, values)` / `FAST.error(code, values)` – structured diagnostic messages
|
|
65
|
-
- `FAST.addMessages(dict)` – registers human-readable debug messages
|
|
66
|
-
|
|
67
|
-
The `KernelServiceId` object controls which numeric/string keys are used for shared services. Three modes are supported via a `fast-kernel` attribute on the current `<script>` tag:
|
|
69
|
+
- `FAST.addMessages(dict)` – registers human-readable debug messages used by `enableDebug()` and declarative runtime diagnostics
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|---|---|
|
|
71
|
-
| `share` | Share the kernel across any FAST version |
|
|
72
|
-
| `share-v2` | Share only with other v2 instances |
|
|
73
|
-
| *(default)* | Fully isolated instance with a random postfix |
|
|
71
|
+
The previous `FAST.getById()` slot registry, `FASTGlobal` type, and `KernelServiceId` enum have been removed. Kernel services (update queue, observable system, etc.) are resolved through standard ES module imports rather than a shared global registry.
|
|
74
72
|
|
|
75
73
|
---
|
|
76
74
|
|
|
@@ -88,14 +86,40 @@ The `KernelServiceId` object controls which numeric/string keys are used for sha
|
|
|
88
86
|
|
|
89
87
|
`ElementController` is the real workhorse. It:
|
|
90
88
|
|
|
91
|
-
-
|
|
89
|
+
- Uses composition with an internal `_notifier` field (rather than extending `PropertyChangeNotifier`) and implements the `Notifier` interface directly, so the element still participates in the observable system.
|
|
92
90
|
- Holds the element's `FASTElementDefinition` (name, template, styles, observed attributes).
|
|
93
91
|
- Manages a `Stages` state machine: `disconnected → connecting → connected → disconnecting → disconnected`.
|
|
94
|
-
-
|
|
92
|
+
- Exposes `isPrerendered: Promise<boolean>` which resolves to `true` when the element had a declarative shadow root (DSD) at connect time, regardless of whether hydration ran. Exposes `isHydrated: Promise<boolean>` which resolves to `true` only when hydration actually ran successfully. The `ViewController` interface also exposes both `isPrerendered` and `isHydrated` as `Promise<boolean>` for custom directives. Attribute-skip logic during the hydration bind uses an internal `_skipAttrUpdates` flag that is never exposed as a public boolean.
|
|
93
|
+
- On `connect()`: restores pre-upgrade observable values, calls `connectedCallback` on all `HostBehavior`s, renders the current template into the shadow root when one is available, and applies styles.
|
|
94
|
+
- Rendering is split into two modular paths. Hydration is pluggable: `enableHydration()` from `@microsoft/fast-element/hydration.js` installs a hook via `ElementController.installHydrationHook()`, keeping zero hydration imports in the core controller:
|
|
95
|
+
- **Prerendered**: The hydration hook (installed by `enableHydration()`) registers the element in the static hydration tracker, fires the definition's `elementWillHydrate` callback, swaps `onAttributeChangedCallback` to a no-op so the upgrade-time burst of callbacks is discarded, hydrates the existing DOM via `template.hydrate()`, fires `elementDidHydrate`, then restores the standard handler and removes the element from the tracker. The entire method is wrapped in `try/finally` to guarantee cleanup even if an error occurs during hydration. After this point, all future attribute changes flow through the real handler with zero overhead.
|
|
96
|
+
- **Client-side**: `renderClientSide()` clones the compiled fragment, binds, and appends to the host — the standard path with no prerender logic.
|
|
97
|
+
- **Static hydration tracking**: Hydration is opt-in via `enableHydration()` from `@microsoft/fast-element/hydration.js`, which creates a `HydrationTracker` and installs a pluggable hydration hook on `ElementController` via `ElementController.installHydrationHook()`. Until this is called, `renderTemplate()` always uses the client-side path — even if the element has a pre-existing shadow root. `HydrationTracker` manages a `Set<HTMLElement>` of pending elements, fires global callbacks (`hydrationStarted`, `hydrationComplete`), and fires `hydrationComplete` via a debounced `setTimeout(0)` after the last element finishes binding — ensuring all async template batches settle first. Per-element hydration callbacks (`elementWillHydrate`, `elementDidHydrate`) are stored on the `FASTElementDefinition.lifecycleCallbacks` and fired directly by the hydration hook.
|
|
95
98
|
- On `disconnect()`: calls `disconnectedCallback` on behaviors, unbinds the view.
|
|
99
|
+
- `onAttributeChangedCallback()` is the standard handler that processes attribute changes. During the prerendered bind, it is temporarily swapped to a no-op (see above) to avoid redundant processing of server-rendered attribute values.
|
|
96
100
|
- Exposes `addBehavior` / `removeBehavior` for dynamic `HostBehavior` management (used by `ElementStyles`).
|
|
97
101
|
|
|
98
|
-
`FASTElementDefinition` wraps all the metadata for a custom element class: its tag name, template, styles, and observed attribute list. It is created by `FASTElement.compose()` and registered globally via `fastElementRegistry`.
|
|
102
|
+
`FASTElementDefinition` wraps all the metadata for a custom element class: its tag name, template, styles, and observed attribute list. It is created by `FASTElement.compose()` (which returns `Promise<FASTElementDefinition>`, always resolving immediately) and registered globally via `fastElementRegistry`. `PartialFASTElementDefinition.template` may be either a concrete `ElementViewTemplate<InstanceType<TType>>` or a `FASTElementTemplateResolver<TType>` function that receives the composed definition and returns the concrete template (sync or async). `FASTElementDefinition.template` always stores the concrete `ElementViewTemplate<InstanceType<TType>>` after composition or resolver settlement. `FASTElement.define()` returns `Promise<TType>` — resolving immediately for complete definitions or definitions without an initial template, and resolving async template resolver functions only after extensions have had a chance to update the definition. `FASTElementDefinition.register()` returns `Promise<Function>` — resolving when a definition with the given name has been registered.
|
|
103
|
+
|
|
104
|
+
#### Extensions
|
|
105
|
+
|
|
106
|
+
`FASTElement.define()` and `FASTElementDefinition.define()` accept an optional array of **extension callbacks** (`FASTElementExtension`). Each extension is a function that receives the resolved `FASTElementDefinition` and is invoked **before** the element is registered with the platform via `customElements.define()`. `FASTElement.define()` also invokes extensions before any template resolver function is asked to produce a concrete `ElementViewTemplate`, so plugins can attach state that affects template resolution without leaving non-template values on `definition.template`.
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
type FASTElementExtension = (definition: FASTElementDefinition) => void;
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Extensions are typically produced by factory functions:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
function myPlugin() {
|
|
116
|
+
return (definition: FASTElementDefinition) => {
|
|
117
|
+
console.log(`Registering: ${definition.name}`);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
MyComponent.define({ name: "my-component" }, [myPlugin()]);
|
|
122
|
+
```
|
|
99
123
|
|
|
100
124
|
---
|
|
101
125
|
|
|
@@ -227,7 +251,7 @@ See [src/templating/TEMPLATE-BINDINGS.md](./src/templating/TEMPLATE-BINDINGS.md)
|
|
|
227
251
|
|
|
228
252
|
**Exported as**: `Updates`
|
|
229
253
|
|
|
230
|
-
`Updates` is a shared, batched task queue used to synchronise writes to the DOM. It is
|
|
254
|
+
`Updates` is a shared, batched task queue used to synchronise writes to the DOM. It is resolved through standard ES module imports so multiple parts of the application share a single flush cycle.
|
|
231
255
|
|
|
232
256
|
- `Updates.enqueue(callable)` – schedules a task for the next batch.
|
|
233
257
|
- `Updates.process()` – forces immediate synchronous flush (useful in tests).
|
|
@@ -246,7 +270,19 @@ See [ARCHITECTURE_UPDATES.md](./ARCHITECTURE_UPDATES.md) for more detail.
|
|
|
246
270
|
|
|
247
271
|
**Files**: `src/styles/css.ts`, `src/styles/element-styles.ts`, `src/styles/css-directive.ts`
|
|
248
272
|
|
|
249
|
-
|
|
273
|
+
**Exported from**: `@microsoft/fast-element`
|
|
274
|
+
|
|
275
|
+
The `css` tag, `ElementStyles`, `CSSDirective`, `cssDirective`,
|
|
276
|
+
`ComposableStyles`, `HostBehavior`, `HostController`, `StyleStrategy`, and
|
|
277
|
+
`StyleTarget` are imported from `@microsoft/fast-element`. The `css` tag
|
|
278
|
+
(analogous to `html`) builds `ElementStyles` objects. During
|
|
279
|
+
`ElementController.connect()`, styles are applied to the element's shadow root
|
|
280
|
+
either via `adoptedStylesheets` (preferred) or an appended `<style>` node,
|
|
281
|
+
depending on platform support. `CSSDirective`s can contribute additional static
|
|
282
|
+
CSS during template composition, but runtime CSS bindings and style-attached
|
|
283
|
+
`HostBehavior`s are not supported. Arbitrary runtime style toggling is handled
|
|
284
|
+
through `ElementController.addStyles()` / `removeStyles()`; `ElementStyles`
|
|
285
|
+
itself is a static container.
|
|
250
286
|
|
|
251
287
|
---
|
|
252
288
|
|
|
@@ -296,13 +332,52 @@ See `docs/di/api-report.api.md` for the full public API surface.
|
|
|
296
332
|
|
|
297
333
|
---
|
|
298
334
|
|
|
335
|
+
### Declarative HTML
|
|
336
|
+
|
|
337
|
+
**Files**: `src/declarative/index.ts`, `src/declarative/*`
|
|
338
|
+
|
|
339
|
+
FAST Element also owns the declarative HTML runtime that previously lived in a
|
|
340
|
+
separate package. `@microsoft/fast-element` exports the declarative runtime API:
|
|
341
|
+
`declarativeTemplate()`, `TemplateParser`, `Schema`, `schemaRegistry`, and
|
|
342
|
+
related parser/schema types. Map helpers are also exported from the root so they
|
|
343
|
+
can be used with declarative templates or manually supplied schemas. The
|
|
344
|
+
`<f-template>` element is an internal native `HTMLElement` publisher that
|
|
345
|
+
`declarativeTemplate()` defines in the target registry; it is not part of the
|
|
346
|
+
public API.
|
|
347
|
+
|
|
348
|
+
The declarative runtime intentionally reuses the same FAST Element primitives as
|
|
349
|
+
the imperative `html` API:
|
|
350
|
+
|
|
351
|
+
- The internal `<f-template>` publisher parses HTML and returns concrete
|
|
352
|
+
`ViewTemplate` instances through the registry-aware declarative template
|
|
353
|
+
bridge.
|
|
354
|
+
- `TemplateParser` lowers declarative syntax to the same `strings` / `values`
|
|
355
|
+
shape used by `ViewTemplate.create()`.
|
|
356
|
+
- `attributeMap()` and `observerMap()` are `FASTElementExtension` factories
|
|
357
|
+
exported from `@microsoft/fast-element/attribute-map.js` and
|
|
358
|
+
`@microsoft/fast-element/observer-map.js`. With `declarativeTemplate()` they
|
|
359
|
+
register schema transforms on the element definition, and those transforms run
|
|
360
|
+
after parsing in deterministic order (`attributeMap()` before
|
|
361
|
+
`observerMap()`). Outside declarative templates, `attributeMap()` uses
|
|
362
|
+
`definition.schema`, while `observerMap()` can use either `definition.schema`
|
|
363
|
+
or `observerMap({ schema })`.
|
|
364
|
+
|
|
365
|
+
The `src/declarative/index.ts` entrypoint is pure at module evaluation time. Running a
|
|
366
|
+
declarative API lazily installs declarative debug messages only. Hydration hooks
|
|
367
|
+
and hydratable `ViewTemplate` support are installed exclusively by
|
|
368
|
+
`enableHydration()` from `@microsoft/fast-element/hydration.js`. See
|
|
369
|
+
[`DECLARATIVE_DESIGN.md`](./DECLARATIVE_DESIGN.md) for the detailed
|
|
370
|
+
architecture.
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
299
374
|
## Data Flow Diagrams
|
|
300
375
|
|
|
301
376
|
### Module Load & Registration
|
|
302
377
|
|
|
303
378
|
```mermaid
|
|
304
379
|
flowchart TD
|
|
305
|
-
A([Browser loads script]) --> B[FAST
|
|
380
|
+
A([Browser loads script]) --> B[FAST module initialises singleton]
|
|
306
381
|
B --> C[FASTElement subclass executes FASTElement.compose]
|
|
307
382
|
C --> D[Observable decorators register accessors on the prototype]
|
|
308
383
|
C --> E[Attribute decorators push AttributeDefinition to the class]
|
|
@@ -320,13 +395,22 @@ flowchart TD
|
|
|
320
395
|
EC --> ATTACH[Controller captures element + definition, sets $fastController]
|
|
321
396
|
|
|
322
397
|
CONN[connectedCallback] --> STAGE[stage = connecting]
|
|
323
|
-
STAGE -->
|
|
398
|
+
STAGE --> PRERENDER{Existing shadow root\nfrom SSR/DSD?}
|
|
399
|
+
PRERENDER -->|yes| SETFLAG[isPrerendered = true\nisHydrated = pending]
|
|
400
|
+
PRERENDER -->|no| NORMAL[isPrerendered = false\nisHydrated = false]
|
|
401
|
+
SETFLAG --> OBS[Restore pre-upgrade observable values]
|
|
402
|
+
NORMAL --> OBS
|
|
324
403
|
OBS --> BEHAV[Connect HostBehaviors]
|
|
325
|
-
BEHAV --> RENDER
|
|
326
|
-
RENDER
|
|
404
|
+
BEHAV --> RENDER{isPrerendered AND\ntemplate is hydratable?}
|
|
405
|
+
RENDER -->|yes| HYDRATE[template.hydrate → HydrationView\nmaps existing DOM to binding targets\nisHydrated = true]
|
|
406
|
+
RENDER -->|no| CLONE[ViewTemplate.render → HTMLView.appendTo shadow root]
|
|
407
|
+
HYDRATE --> STYLES[Apply ElementStyles to shadow root]
|
|
408
|
+
CLONE --> STYLES
|
|
327
409
|
STYLES --> DONE[stage = connected]
|
|
328
410
|
|
|
329
|
-
ATTR[attributeChangedCallback] -->
|
|
411
|
+
ATTR[attributeChangedCallback] --> ATTRGUARD{isPrerendered AND\nneedsInitialization?}
|
|
412
|
+
ATTRGUARD -->|yes| SKIP[Skip — server-rendered values already correct]
|
|
413
|
+
ATTRGUARD -->|no| ACD[AttributeDefinition.onAttributeChangedCallback]
|
|
330
414
|
ACD --> ENQ[Updates.enqueue – reflect new value via Observable accessor]
|
|
331
415
|
|
|
332
416
|
DISC[disconnectedCallback] --> DBEHAV[Disconnect HostBehaviors]
|
|
@@ -386,10 +470,10 @@ Below is a conceptual map of the major subsystems and their relationships:
|
|
|
386
470
|
|
|
387
471
|
```
|
|
388
472
|
┌──────────────────────────────────────────────────────────────────────────────┐
|
|
389
|
-
│
|
|
390
|
-
│
|
|
473
|
+
│ FAST (module-scoped singleton) │
|
|
474
|
+
│ warn / error / addMessages — diagnostic messaging │
|
|
391
475
|
└────────────────────┬─────────────────────────────────────────────────────────┘
|
|
392
|
-
│
|
|
476
|
+
│ ES module imports
|
|
393
477
|
┌───────────┴───────────┐
|
|
394
478
|
│ │
|
|
395
479
|
┌────────▼──────────┐ ┌────────▼────────────────────┐
|
|
@@ -432,7 +516,7 @@ Below is a conceptual map of the major subsystems and their relationships:
|
|
|
432
516
|
1. Developer writes a class extending `FASTElement`, decorates properties with `@observable` / `@attr`, and calls `FASTElement.define({ name, template, styles })`.
|
|
433
517
|
2. `FASTElement.define` → `FASTElementDefinition.compose(...).define()` registers the element with the Custom Element Registry.
|
|
434
518
|
3. When the browser upgrades the element, `ElementController.forCustomElement(element)` is called in the constructor.
|
|
435
|
-
4. On `connectedCallback`, the controller renders the template (`
|
|
519
|
+
4. On `connectedCallback`, the controller renders the template into the shadow root. If the element already has a shadow root from SSR (prerendered content) and hydration has been enabled via `enableHydration()`, the installed hydration hook uses `template.hydrate()` to map existing DOM nodes to binding targets instead of cloning new DOM. If no template is available yet, the element connects without rendering until a later `definition.template` update recreates the controller. Compilation is lazy: the first render call triggers `Compiler.compile()`, subsequent calls clone the already-compiled `DocumentFragment`.
|
|
436
520
|
5. `HTMLView.bind(source)` wires up each `ViewBehavior`. `oneWay` bindings create `ExpressionNotifier`s that track observable dependencies automatically.
|
|
437
521
|
6. When an observed property changes, its notifier fans out to all subscribers. Each binding enqueues a DOM update via `Updates`. The next animation frame drains the queue and applies the mutations.
|
|
438
522
|
7. On `disconnectedCallback`, `HTMLView.unbind()` tears down all bindings; behaviors disconnect; styles are removed.
|
|
@@ -443,13 +527,14 @@ Below is a conceptual map of the major subsystems and their relationships:
|
|
|
443
527
|
|
|
444
528
|
```
|
|
445
529
|
src/
|
|
446
|
-
├── interfaces.ts # Core types: Callable, Constructable,
|
|
447
|
-
├── platform.ts # FAST
|
|
530
|
+
├── interfaces.ts # Core types: Callable, Constructable, Message codes
|
|
531
|
+
├── platform.ts # FAST module-scoped singleton, TypeRegistry
|
|
532
|
+
├── declarative/ # Pure declarative entrypoint and map helpers
|
|
448
533
|
├── dom.ts # DOMAspect enum, DOMPolicy, DOMSink
|
|
449
534
|
├── dom-policy.ts # Default DOM security policy (TrustedTypes integration)
|
|
450
535
|
├── metadata.ts # Reflect-based metadata helpers
|
|
451
536
|
├── utilities.ts # UnobservableMutationObserver and other helpers
|
|
452
|
-
├── debug.ts #
|
|
537
|
+
├── debug.ts # Exports enableDebug() for human-readable FAST errors
|
|
453
538
|
├── observation/
|
|
454
539
|
│ ├── observable.ts # Observable, @observable, ExpressionNotifier, ExecutionContext
|
|
455
540
|
│ ├── notifier.ts # Subscriber, Notifier, SubscriberSet, PropertyChangeNotifier
|
|
@@ -482,12 +567,25 @@ src/
|
|
|
482
567
|
├── components/
|
|
483
568
|
│ ├── fast-element.ts # FASTElement, @customElement
|
|
484
569
|
│ ├── element-controller.ts # ElementController, Stages
|
|
485
|
-
│ ├── fast-definitions.ts # FASTElementDefinition,
|
|
486
|
-
│ ├──
|
|
487
|
-
│
|
|
570
|
+
│ ├── fast-definitions.ts # FASTElementDefinition, optional definition schema
|
|
571
|
+
│ ├── schema.ts # Schema class and schemaRegistry
|
|
572
|
+
│ ├── definition-schema-transforms.ts # Definition-scoped schema transform storage
|
|
573
|
+
│ └── attributes.ts # AttributeDefinition, @attr, converters
|
|
574
|
+
├── extensions/
|
|
575
|
+
│ ├── observer-map.ts # observerMap() extension and proxy-backed observation helpers
|
|
576
|
+
│ └── attribute-map.ts # attributeMap() extension and automatic @attr helpers
|
|
488
577
|
├── di/
|
|
489
578
|
│ └── di.ts # DI container, decorators, resolvers, Registration
|
|
490
579
|
├── context.ts # Context, FASTContext, Context protocol
|
|
580
|
+
├── declarative/
|
|
581
|
+
│ ├── template.ts # declarativeTemplate() and internal f-template publisher
|
|
582
|
+
│ ├── template-parser.ts # Declarative HTML parser → ViewTemplate strings/values
|
|
583
|
+
│ ├── schema.ts # Compatibility re-export for Schema
|
|
584
|
+
│ ├── definition-options.ts # Compatibility re-export for schema transforms
|
|
585
|
+
│ ├── observer-map.ts # Internal observer-map extension alias (not a package export)
|
|
586
|
+
│ ├── attribute-map.ts # Internal attribute-map extension alias (not a package export)
|
|
587
|
+
│ ├── utilities.ts # Declarative parsing utilities
|
|
588
|
+
│ └── syntax.ts # Declarative syntax constants
|
|
491
589
|
├── state/
|
|
492
590
|
│ ├── state.ts # state() helper (beta)
|
|
493
591
|
│ └── watch.ts # watch() helper (beta)
|
|
@@ -506,5 +604,12 @@ src/
|
|
|
506
604
|
| [ARCHITECTURE_FASTELEMENT.md](./ARCHITECTURE_FASTELEMENT.md) | FASTElement & ElementController lifecycle in detail |
|
|
507
605
|
| [ARCHITECTURE_HTML_TAGGED_TEMPLATE_LITERAL.md](./ARCHITECTURE_HTML_TAGGED_TEMPLATE_LITERAL.md) | `html` tag, directives, binding pre-processing |
|
|
508
606
|
| [ARCHITECTURE_UPDATES.md](./ARCHITECTURE_UPDATES.md) | Updates queue, attribute and observable change batching |
|
|
607
|
+
| [DECLARATIVE_DESIGN.md](./DECLARATIVE_DESIGN.md) | Declarative HTML runtime, parser, schema, maps, and fixture architecture |
|
|
509
608
|
| [src/templating/TEMPLATE-BINDINGS.md](./src/templating/TEMPLATE-BINDINGS.md) | Full template binding pipeline: authoring → compilation → binding → DOM updates |
|
|
510
609
|
| [docs/fast-element-2-changes.md](./docs/fast-element-2-changes.md) | Breaking changes from v1 to v2 |
|
|
610
|
+
|
|
611
|
+
---
|
|
612
|
+
|
|
613
|
+
## Bundle Size Reporting
|
|
614
|
+
|
|
615
|
+
The build generates a `SIZES.md` file that records minified, gzip, and brotli sizes for the CDN rollup bundle and each individually tree-shaken export. Sizes are measured using `esbuild` for per-export bundles and from the Rollup minified output for the CDN rollup bundle. Compression sizes use Node.js `node:zlib`. The documentation site copies this file into the resources section during its prebuild step.
|