@microsoft/fast-element 2.10.3 → 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 +31 -1
- package/CHANGELOG.md +10 -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 +143 -34
- 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/context/context.api.json +1 -1
- package/dist/declarative/declarative.api.json +7844 -0
- package/dist/di/di.api.json +2 -2
- 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 +10 -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 +8 -2
- 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/tsdoc-metadata.json +1 -1
- 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 +24 -10
- package/dist/esm/templating/hydration-view.js +235 -0
- package/dist/esm/templating/render.js +13 -2
- 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 +9017 -6996
- package/dist/fast-element.d.ts +3557 -796
- package/dist/fast-element.debug.js +5093 -4419
- package/dist/fast-element.debug.min.js +2 -2
- package/dist/fast-element.js +5398 -4655
- package/dist/fast-element.min.js +2 -2
- package/dist/fast-element.untrimmed.d.ts +881 -481
- package/dist/hydration/hydration.api.json +5237 -0
- package/dist/styles/styles.api.json +2672 -0
- package/docs/api-report.api.md +344 -167
- 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 -40
- 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
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Deep Merge Test Fixture</title>
|
|
6
|
+
<style>
|
|
7
|
+
body {
|
|
8
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
9
|
+
max-width: 1200px;
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
padding: 20px;
|
|
12
|
+
background: #f5f5f5;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
h1 {
|
|
16
|
+
color: #333;
|
|
17
|
+
border-bottom: 2px solid #0078d4;
|
|
18
|
+
padding-bottom: 10px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
h2 {
|
|
22
|
+
color: #555;
|
|
23
|
+
margin-top: 30px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.container {
|
|
27
|
+
background: white;
|
|
28
|
+
padding: 20px;
|
|
29
|
+
border-radius: 8px;
|
|
30
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.stats {
|
|
34
|
+
background: #e3f2fd;
|
|
35
|
+
padding: 15px;
|
|
36
|
+
border-radius: 6px;
|
|
37
|
+
margin: 20px 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.stats p {
|
|
41
|
+
margin: 8px 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.controls {
|
|
45
|
+
background: #f5f5f5;
|
|
46
|
+
padding: 15px;
|
|
47
|
+
border-radius: 6px;
|
|
48
|
+
margin: 20px 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
button {
|
|
52
|
+
background: #0078d4;
|
|
53
|
+
color: white;
|
|
54
|
+
border: none;
|
|
55
|
+
padding: 10px 16px;
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
margin: 5px;
|
|
59
|
+
font-size: 14px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
button:hover {
|
|
63
|
+
background: #106ebe;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
button:active {
|
|
67
|
+
background: #005a9e;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.user-card {
|
|
71
|
+
border: 1px solid #ddd;
|
|
72
|
+
border-radius: 6px;
|
|
73
|
+
padding: 15px;
|
|
74
|
+
margin: 15px 0;
|
|
75
|
+
background: #fafafa;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.user-card h3 {
|
|
79
|
+
margin-top: 0;
|
|
80
|
+
color: #0078d4;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.profile {
|
|
84
|
+
background: white;
|
|
85
|
+
padding: 10px;
|
|
86
|
+
border-radius: 4px;
|
|
87
|
+
margin: 10px 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.profile h4 {
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.orders {
|
|
95
|
+
margin-top: 15px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.order {
|
|
99
|
+
background: white;
|
|
100
|
+
padding: 10px;
|
|
101
|
+
border-radius: 4px;
|
|
102
|
+
margin: 10px 0;
|
|
103
|
+
border-left: 3px solid #0078d4;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.items {
|
|
107
|
+
list-style: none;
|
|
108
|
+
padding: 0;
|
|
109
|
+
margin: 10px 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.item {
|
|
113
|
+
padding: 8px;
|
|
114
|
+
margin: 5px 0;
|
|
115
|
+
background: #f9f9f9;
|
|
116
|
+
border-radius: 4px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.stock {
|
|
120
|
+
margin-left: 10px;
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.tags {
|
|
125
|
+
margin-top: 5px;
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.tag {
|
|
130
|
+
background: #0078d4;
|
|
131
|
+
color: white;
|
|
132
|
+
padding: 2px 8px;
|
|
133
|
+
border-radius: 3px;
|
|
134
|
+
margin-right: 5px;
|
|
135
|
+
display: inline-block;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.metadata {
|
|
139
|
+
margin-top: 5px;
|
|
140
|
+
color: #666;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
strong {
|
|
144
|
+
color: #333;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
em {
|
|
148
|
+
color: #999;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
151
|
+
</head>
|
|
152
|
+
<body>
|
|
153
|
+
<deep-merge-test-element><template shadowrootmode="open" shadowroot="open"><div class="container">
|
|
154
|
+
<h1>Deep Merge Test Fixture</h1>
|
|
155
|
+
|
|
156
|
+
<!-- Stats Section with Deep Property Access -->
|
|
157
|
+
<div class="stats">
|
|
158
|
+
<h2>Statistics</h2>
|
|
159
|
+
<p>Total Orders: <strong><!--fe:b-->3<!--fe:/b--></strong></p>
|
|
160
|
+
<p>Total Revenue: <strong>$<!--fe:b-->425.5<!--fe:/b--></strong></p>
|
|
161
|
+
<p>Active Users: <strong><!--fe:b-->2<!--fe:/b--></strong></p>
|
|
162
|
+
<button data-fe="1">Update Stats</button>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<!-- Control Buttons -->
|
|
166
|
+
<div class="controls">
|
|
167
|
+
<h2>Test Actions</h2>
|
|
168
|
+
<button data-fe="1">Update User Profile</button>
|
|
169
|
+
<button data-fe="1">Replace Orders</button>
|
|
170
|
+
<button data-fe="1">Remove Order Items</button>
|
|
171
|
+
<button data-fe="1">Update Product Tags</button>
|
|
172
|
+
<button data-fe="1">Add New User</button>
|
|
173
|
+
<button data-fe="1">Toggle Details</button>
|
|
174
|
+
<button data-fe="1">Increment Age</button>
|
|
175
|
+
<button data-fe="1">Test Undefined Merge</button>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<!-- Users List with Conditional Rendering -->
|
|
179
|
+
<div class="users">
|
|
180
|
+
<h2>Users (<!--fe:b-->2<!--fe:/b--> total)</h2>
|
|
181
|
+
|
|
182
|
+
<!--fe:b--><!--fe:r-->
|
|
183
|
+
<div class="user-card">
|
|
184
|
+
<h3><!--fe:b-->Alice Johnson<!--fe:/b--> (ID: <!--fe:b-->1<!--fe:/b-->)</h3>
|
|
185
|
+
<p>Email: <!--fe:b-->alice@example.com<!--fe:/b--></p>
|
|
186
|
+
|
|
187
|
+
<!-- Conditional Details Section -->
|
|
188
|
+
<!--fe:b-->
|
|
189
|
+
<div class="profile">
|
|
190
|
+
<h4>Profile</h4>
|
|
191
|
+
<p>Age: <!--fe:b-->28<!--fe:/b--></p>
|
|
192
|
+
<p>Location: <!--fe:b-->New York<!--fe:/b-->, <!--fe:b-->USA<!--fe:/b--></p>
|
|
193
|
+
<p>Theme: <!--fe:b-->dark<!--fe:/b--></p>
|
|
194
|
+
<p>Notifications: <!--fe:b-->Enabled<!--fe:/b--><!--fe:b--><!--fe:/b--></p>
|
|
195
|
+
</div>
|
|
196
|
+
<!--fe:/b-->
|
|
197
|
+
|
|
198
|
+
<!-- Orders Section with Nested Repeats -->
|
|
199
|
+
<div class="orders">
|
|
200
|
+
<h4>Orders (<!--fe:b-->1<!--fe:/b-->)</h4>
|
|
201
|
+
|
|
202
|
+
<!--fe:b-->
|
|
203
|
+
<!--fe:b--><!--fe:r-->
|
|
204
|
+
<div class="order">
|
|
205
|
+
<p><strong>Order #<!--fe:b-->101<!--fe:/b--></strong> - <!--fe:b-->2024-01-15<!--fe:/b--> - Total: $<!--fe:b-->150.5<!--fe:/b--></p>
|
|
206
|
+
|
|
207
|
+
<!-- Items with Nested Array -->
|
|
208
|
+
<ul class="items">
|
|
209
|
+
<!--fe:b--><!--fe:r-->
|
|
210
|
+
<li class="item">
|
|
211
|
+
<strong><!--fe:b-->Laptop<!--fe:/b--></strong> - $<!--fe:b-->100<!--fe:/b-->
|
|
212
|
+
<span class="stock"><!--fe:b-->✓ In Stock<!--fe:/b--><!--fe:b--><!--fe:/b--></span>
|
|
213
|
+
|
|
214
|
+
<!-- Tags Array -->
|
|
215
|
+
<div class="tags">
|
|
216
|
+
Tags: <!--fe:b--><!--fe:r--><span class="tag"><!--fe:b-->electronics<!--fe:/b--></span><!--fe:/r--><!--fe:r--><span class="tag"><!--fe:b-->computers<!--fe:/b--></span><!--fe:/r--><!--fe:/b-->
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<!-- Metadata -->
|
|
220
|
+
<!--fe:b-->
|
|
221
|
+
<div class="metadata">
|
|
222
|
+
<small>Views: <!--fe:b-->250<!--fe:/b--> | Rating: <!--fe:b-->4.5<!--fe:/b--></small>
|
|
223
|
+
</div>
|
|
224
|
+
<!--fe:/b-->
|
|
225
|
+
</li>
|
|
226
|
+
<!--fe:/r--><!--fe:r-->
|
|
227
|
+
<li class="item">
|
|
228
|
+
<strong><!--fe:b-->Mouse<!--fe:/b--></strong> - $<!--fe:b-->50.5<!--fe:/b-->
|
|
229
|
+
<span class="stock"><!--fe:b-->✓ In Stock<!--fe:/b--><!--fe:b--><!--fe:/b--></span>
|
|
230
|
+
|
|
231
|
+
<!-- Tags Array -->
|
|
232
|
+
<div class="tags">
|
|
233
|
+
Tags: <!--fe:b--><!--fe:r--><span class="tag"><!--fe:b-->electronics<!--fe:/b--></span><!--fe:/r--><!--fe:r--><span class="tag"><!--fe:b-->accessories<!--fe:/b--></span><!--fe:/r--><!--fe:/b-->
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<!-- Metadata -->
|
|
237
|
+
<!--fe:b-->
|
|
238
|
+
<div class="metadata">
|
|
239
|
+
<small>Views: <!--fe:b-->180<!--fe:/b--> | Rating: <!--fe:b-->4<!--fe:/b--></small>
|
|
240
|
+
</div>
|
|
241
|
+
<!--fe:/b-->
|
|
242
|
+
</li>
|
|
243
|
+
<!--fe:/r--><!--fe:/b-->
|
|
244
|
+
</ul>
|
|
245
|
+
</div>
|
|
246
|
+
<!--fe:/r--><!--fe:/b-->
|
|
247
|
+
<!--fe:/b-->
|
|
248
|
+
|
|
249
|
+
<!--fe:b--><!--fe:/b-->
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
<!--fe:/r--><!--fe:r-->
|
|
253
|
+
<div class="user-card">
|
|
254
|
+
<h3><!--fe:b-->Bob Smith<!--fe:/b--> (ID: <!--fe:b-->2<!--fe:/b-->)</h3>
|
|
255
|
+
<p>Email: <!--fe:b-->bob@example.com<!--fe:/b--></p>
|
|
256
|
+
|
|
257
|
+
<!-- Conditional Details Section -->
|
|
258
|
+
<!--fe:b-->
|
|
259
|
+
<div class="profile">
|
|
260
|
+
<h4>Profile</h4>
|
|
261
|
+
<p>Age: <!--fe:b-->35<!--fe:/b--></p>
|
|
262
|
+
<p>Location: <!--fe:b-->London<!--fe:/b-->, <!--fe:b-->UK<!--fe:/b--></p>
|
|
263
|
+
<p>Theme: <!--fe:b-->light<!--fe:/b--></p>
|
|
264
|
+
<p>Notifications: <!--fe:b--><!--fe:/b--><!--fe:b-->Disabled<!--fe:/b--></p>
|
|
265
|
+
</div>
|
|
266
|
+
<!--fe:/b-->
|
|
267
|
+
|
|
268
|
+
<!-- Orders Section with Nested Repeats -->
|
|
269
|
+
<div class="orders">
|
|
270
|
+
<h4>Orders (<!--fe:b-->0<!--fe:/b-->)</h4>
|
|
271
|
+
|
|
272
|
+
<!--fe:b--><!--fe:/b-->
|
|
273
|
+
|
|
274
|
+
<!--fe:b-->
|
|
275
|
+
<p><em>No orders yet</em></p>
|
|
276
|
+
<!--fe:/b-->
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
<!--fe:/r--><!--fe:/b-->
|
|
280
|
+
</div>
|
|
281
|
+
</div></template></deep-merge-test-element>
|
|
282
|
+
<f-template name="deep-merge-test-element">
|
|
283
|
+
<template>
|
|
284
|
+
<div class="container">
|
|
285
|
+
<h1>Deep Merge Test Fixture</h1>
|
|
286
|
+
|
|
287
|
+
<!-- Stats Section with Deep Property Access -->
|
|
288
|
+
<div class="stats">
|
|
289
|
+
<h2>Statistics</h2>
|
|
290
|
+
<p>Total Orders: <strong>{{stats.totalOrders}}</strong></p>
|
|
291
|
+
<p>Total Revenue: <strong>${{stats.totalRevenue}}</strong></p>
|
|
292
|
+
<p>Active Users: <strong>{{stats.activeUsers}}</strong></p>
|
|
293
|
+
<button @click="{updateStats()}">Update Stats</button>
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
<!-- Control Buttons -->
|
|
297
|
+
<div class="controls">
|
|
298
|
+
<h2>Test Actions</h2>
|
|
299
|
+
<button @click="{updateUserProfile()}">Update User Profile</button>
|
|
300
|
+
<button @click="{updateUserOrders()}">Replace Orders</button>
|
|
301
|
+
<button @click="{removeOrderItems()}">Remove Order Items</button>
|
|
302
|
+
<button @click="{updateProductTags()}">Update Product Tags</button>
|
|
303
|
+
<button @click="{addNewUser()}">Add New User</button>
|
|
304
|
+
<button @click="{toggleDetails()}">Toggle Details</button>
|
|
305
|
+
<button @click="{incrementAge()}">Increment Age</button>
|
|
306
|
+
<button @click="{testUndefinedMerge()}">Test Undefined Merge</button>
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
<!-- Users List with Conditional Rendering -->
|
|
310
|
+
<div class="users">
|
|
311
|
+
<h2>Users ({{users.length}} total)</h2>
|
|
312
|
+
|
|
313
|
+
<f-repeat value="{{user in users}}">
|
|
314
|
+
<div class="user-card">
|
|
315
|
+
<h3>{{user.name}} (ID: {{user.id}})</h3>
|
|
316
|
+
<p>Email: {{user.email}}</p>
|
|
317
|
+
|
|
318
|
+
<!-- Conditional Details Section -->
|
|
319
|
+
<f-when value="{{showDetails}}">
|
|
320
|
+
<div class="profile">
|
|
321
|
+
<h4>Profile</h4>
|
|
322
|
+
<p>Age: {{user.profile.age}}</p>
|
|
323
|
+
<p>Location: {{user.profile.location.city}}, {{user.profile.location.country}}</p>
|
|
324
|
+
<p>Theme: {{user.profile.preferences.theme}}</p>
|
|
325
|
+
<p>Notifications: <f-when value="{{user.profile.preferences.notifications}}">Enabled</f-when><f-when value="{{!user.profile.preferences.notifications}}">Disabled</f-when></p>
|
|
326
|
+
</div>
|
|
327
|
+
</f-when>
|
|
328
|
+
|
|
329
|
+
<!-- Orders Section with Nested Repeats -->
|
|
330
|
+
<div class="orders">
|
|
331
|
+
<h4>Orders ({{user.orders.length}})</h4>
|
|
332
|
+
|
|
333
|
+
<f-when value="{{user.orders.length > 0}}">
|
|
334
|
+
<f-repeat value="{{order in user.orders}}">
|
|
335
|
+
<div class="order">
|
|
336
|
+
<p><strong>Order #{{order.id}}</strong> - {{order.date}} - Total: ${{order.total}}</p>
|
|
337
|
+
|
|
338
|
+
<!-- Items with Nested Array -->
|
|
339
|
+
<ul class="items">
|
|
340
|
+
<f-repeat value="{{item in order.items}}">
|
|
341
|
+
<li class="item">
|
|
342
|
+
<strong>{{item.name}}</strong> - ${{item.price}}
|
|
343
|
+
<span class="stock"><f-when value="{{item.inStock}}">✓ In Stock</f-when><f-when value="{{!item.inStock}}">✗ Out of Stock</f-when></span>
|
|
344
|
+
|
|
345
|
+
<!-- Tags Array -->
|
|
346
|
+
<div class="tags">
|
|
347
|
+
Tags: <f-repeat value="{{tag in item.tags}}"><span class="tag">{{tag}}</span></f-repeat>
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
<!-- Metadata -->
|
|
351
|
+
<f-when value="{{showDetails}}">
|
|
352
|
+
<div class="metadata">
|
|
353
|
+
<small>Views: {{item.metadata.views}} | Rating: {{item.metadata.rating}}</small>
|
|
354
|
+
</div>
|
|
355
|
+
</f-when>
|
|
356
|
+
</li>
|
|
357
|
+
</f-repeat>
|
|
358
|
+
</ul>
|
|
359
|
+
</div>
|
|
360
|
+
</f-repeat>
|
|
361
|
+
</f-when>
|
|
362
|
+
|
|
363
|
+
<f-when value="{{user.orders.length == 0}}">
|
|
364
|
+
<p><em>No orders yet</em></p>
|
|
365
|
+
</f-when>
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
</f-repeat>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
</template>
|
|
372
|
+
</f-template>
|
|
373
|
+
|
|
374
|
+
<script type="module" src="./main.ts"></script>
|
|
375
|
+
</body>
|
|
376
|
+
</html>
|